summaryrefslogtreecommitdiff
path: root/macros/latex-dev
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex-dev
Initial commit
Diffstat (limited to 'macros/latex-dev')
-rw-r--r--macros/latex-dev/base/README.md103
-rw-r--r--macros/latex-dev/base/TEMPLATE-IncludeInRelease.txt19
-rw-r--r--macros/latex-dev/base/alltt.dtx213
-rw-r--r--macros/latex-dev/base/alltt.ins87
-rw-r--r--macros/latex-dev/base/alltt.pdfbin0 -> 172938 bytes
-rw-r--r--macros/latex-dev/base/bugs.txt89
-rw-r--r--macros/latex-dev/base/changes.old.txt1271
-rw-r--r--macros/latex-dev/base/changes.txt10436
-rw-r--r--macros/latex-dev/base/classes.dtx4470
-rw-r--r--macros/latex-dev/base/classes.ins121
-rw-r--r--macros/latex-dev/base/classes.pdfbin0 -> 508697 bytes
-rw-r--r--macros/latex-dev/base/cmextra.ins160
-rw-r--r--macros/latex-dev/base/cmfonts.fdd1301
-rw-r--r--macros/latex-dev/base/cmfonts.ins124
-rw-r--r--macros/latex-dev/base/cmfonts.pdfbin0 -> 270766 bytes
-rw-r--r--macros/latex-dev/base/doc.dtx4941
-rw-r--r--macros/latex-dev/base/doc.pdfbin0 -> 621079 bytes
-rw-r--r--macros/latex-dev/base/docstrip.dtx4370
-rw-r--r--macros/latex-dev/base/docstrip.ins135
-rw-r--r--macros/latex-dev/base/docstrip.pdfbin0 -> 469784 bytes
-rw-r--r--macros/latex-dev/base/ec.ins141
-rw-r--r--macros/latex-dev/base/exscale.dtx202
-rw-r--r--macros/latex-dev/base/exscale.ins103
-rw-r--r--macros/latex-dev/base/exscale.pdfbin0 -> 195895 bytes
-rw-r--r--macros/latex-dev/base/fix-cm.dtx829
-rw-r--r--macros/latex-dev/base/fix-cm.ins88
-rw-r--r--macros/latex-dev/base/fix-cm.pdfbin0 -> 261919 bytes
-rw-r--r--macros/latex-dev/base/fontdef.dtx1413
-rw-r--r--macros/latex-dev/base/format.ins267
-rw-r--r--macros/latex-dev/base/graphpap.dtx195
-rw-r--r--macros/latex-dev/base/graphpap.ins86
-rw-r--r--macros/latex-dev/base/graphpap.pdfbin0 -> 156297 bytes
-rw-r--r--macros/latex-dev/base/idx.tex94
-rw-r--r--macros/latex-dev/base/ifthen.dtx526
-rw-r--r--macros/latex-dev/base/ifthen.ins86
-rw-r--r--macros/latex-dev/base/ifthen.pdfbin0 -> 205221 bytes
-rw-r--r--macros/latex-dev/base/inputenc.dtx3053
-rw-r--r--macros/latex-dev/base/inputenc.ins181
-rw-r--r--macros/latex-dev/base/inputenc.pdfbin0 -> 294773 bytes
-rw-r--r--macros/latex-dev/base/kernel-external-commands.txt1356
-rw-r--r--macros/latex-dev/base/kernel-internal-commands.txt1268
-rw-r--r--macros/latex-dev/base/lablst.tex160
-rw-r--r--macros/latex-dev/base/latex209.dtx1136
-rw-r--r--macros/latex-dev/base/latex209.ins129
-rw-r--r--macros/latex-dev/base/latexrelease.dtx1011
-rw-r--r--macros/latex-dev/base/latexrelease.ins148
-rw-r--r--macros/latex-dev/base/latexrelease.pdfbin0 -> 245931 bytes
-rw-r--r--macros/latex-dev/base/latexsym.dtx203
-rw-r--r--macros/latex-dev/base/latexsym.ins157
-rw-r--r--macros/latex-dev/base/latexsym.pdfbin0 -> 192300 bytes
-rw-r--r--macros/latex-dev/base/lb2.err1622
-rw-r--r--macros/latex-dev/base/lb2.pdfbin0 -> 238193 bytes
-rw-r--r--macros/latex-dev/base/legal.txt48
-rw-r--r--macros/latex-dev/base/letter.dtx1903
-rw-r--r--macros/latex-dev/base/letter.ins109
-rw-r--r--macros/latex-dev/base/letter.pdfbin0 -> 301141 bytes
-rw-r--r--macros/latex-dev/base/lgc2.err697
-rw-r--r--macros/latex-dev/base/lgc2.pdfbin0 -> 202911 bytes
-rw-r--r--macros/latex-dev/base/lppl-1-0.txt211
-rw-r--r--macros/latex-dev/base/lppl-1-1.txt314
-rw-r--r--macros/latex-dev/base/lppl-1-2.txt318
-rw-r--r--macros/latex-dev/base/lppl.pdfbin0 -> 125868 bytes
-rw-r--r--macros/latex-dev/base/lppl.tex511
-rw-r--r--macros/latex-dev/base/lppl.txt416
-rw-r--r--macros/latex-dev/base/ltalloc.dtx176
-rw-r--r--macros/latex-dev/base/ltbibl.dtx409
-rw-r--r--macros/latex-dev/base/ltboxes.dtx1306
-rw-r--r--macros/latex-dev/base/ltclass.dtx2598
-rw-r--r--macros/latex-dev/base/ltcntrl.dtx326
-rw-r--r--macros/latex-dev/base/ltcounts.dtx682
-rw-r--r--macros/latex-dev/base/ltdefns.dtx1544
-rw-r--r--macros/latex-dev/base/ltdirchk.dtx993
-rw-r--r--macros/latex-dev/base/lterror.dtx763
-rw-r--r--macros/latex-dev/base/ltfiles.dtx1129
-rw-r--r--macros/latex-dev/base/ltfinal.dtx1119
-rw-r--r--macros/latex-dev/base/ltfloat.dtx1517
-rw-r--r--macros/latex-dev/base/ltfntcmd.dtx776
-rw-r--r--macros/latex-dev/base/ltfssbas.dtx2031
-rw-r--r--macros/latex-dev/base/ltfsscmp.dtx378
-rw-r--r--macros/latex-dev/base/ltfssdcl.dtx1639
-rw-r--r--macros/latex-dev/base/ltfssini.dtx595
-rw-r--r--macros/latex-dev/base/ltfsstrc.dtx1845
-rw-r--r--macros/latex-dev/base/lthyphen.dtx143
-rw-r--r--macros/latex-dev/base/ltidxglo.dtx217
-rw-r--r--macros/latex-dev/base/ltlength.dtx167
-rw-r--r--macros/latex-dev/base/ltlists.dtx1097
-rw-r--r--macros/latex-dev/base/ltlogos.dtx123
-rw-r--r--macros/latex-dev/base/ltluatex.dtx1788
-rw-r--r--macros/latex-dev/base/ltluatex.pdfbin0 -> 302382 bytes
-rw-r--r--macros/latex-dev/base/ltmath.dtx1104
-rw-r--r--macros/latex-dev/base/ltmiscen.dtx1119
-rw-r--r--macros/latex-dev/base/ltnews.cls684
-rw-r--r--macros/latex-dev/base/ltoutenc.dtx4239
-rw-r--r--macros/latex-dev/base/ltoutenc.ins107
-rw-r--r--macros/latex-dev/base/ltoutput.dtx5035
-rw-r--r--macros/latex-dev/base/ltpage.dtx334
-rw-r--r--macros/latex-dev/base/ltpageno.dtx101
-rw-r--r--macros/latex-dev/base/ltpar.dtx181
-rw-r--r--macros/latex-dev/base/ltpictur.dtx1542
-rw-r--r--macros/latex-dev/base/ltplain.dtx1588
-rw-r--r--macros/latex-dev/base/ltsect.dtx948
-rw-r--r--macros/latex-dev/base/ltspace.dtx1210
-rw-r--r--macros/latex-dev/base/lttab.dtx1607
-rw-r--r--macros/latex-dev/base/ltthm.dtx289
-rw-r--r--macros/latex-dev/base/ltvers.dtx273
-rw-r--r--macros/latex-dev/base/ltxcheck.tex975
-rw-r--r--macros/latex-dev/base/ltxdoc.dtx588
-rw-r--r--macros/latex-dev/base/ltxdoc.pdfbin0 -> 215562 bytes
-rw-r--r--macros/latex-dev/base/ltxguide.cls252
-rw-r--r--macros/latex-dev/base/ltxref.dtx341
-rw-r--r--macros/latex-dev/base/makeindx.dtx313
-rw-r--r--macros/latex-dev/base/makeindx.ins104
-rw-r--r--macros/latex-dev/base/makeindx.pdfbin0 -> 160692 bytes
-rw-r--r--macros/latex-dev/base/manifest.txt225
-rw-r--r--macros/latex-dev/base/manual.err365
-rw-r--r--macros/latex-dev/base/manual.pdfbin0 -> 151372 bytes
-rw-r--r--macros/latex-dev/base/minimal.cls51
-rw-r--r--macros/latex-dev/base/newdc.ins133
-rw-r--r--macros/latex-dev/base/newlfont.dtx204
-rw-r--r--macros/latex-dev/base/nfssfont.dtx497
-rw-r--r--macros/latex-dev/base/nfssfont.ins87
-rw-r--r--macros/latex-dev/base/nfssfont.pdfbin0 -> 202441 bytes
-rw-r--r--macros/latex-dev/base/olddc.ins124
-rw-r--r--macros/latex-dev/base/oldlfont.dtx252
-rw-r--r--macros/latex-dev/base/preload.dtx269
-rw-r--r--macros/latex-dev/base/proc.dtx441
-rw-r--r--macros/latex-dev/base/proc.ins105
-rw-r--r--macros/latex-dev/base/proc.pdfbin0 -> 216909 bytes
-rw-r--r--macros/latex-dev/base/sample2e.tex204
-rw-r--r--macros/latex-dev/base/slides.dtx2733
-rw-r--r--macros/latex-dev/base/slides.ins213
-rw-r--r--macros/latex-dev/base/slides.pdfbin0 -> 351780 bytes
-rw-r--r--macros/latex-dev/base/slifonts.fdd496
-rw-r--r--macros/latex-dev/base/slifonts.pdfbin0 -> 214308 bytes
-rw-r--r--macros/latex-dev/base/small2e.tex40
-rw-r--r--macros/latex-dev/base/source2e.pdfbin0 -> 2698128 bytes
-rw-r--r--macros/latex-dev/base/source2e.tex503
-rw-r--r--macros/latex-dev/base/syntonly.dtx282
-rw-r--r--macros/latex-dev/base/syntonly.ins88
-rw-r--r--macros/latex-dev/base/syntonly.pdfbin0 -> 182080 bytes
-rw-r--r--macros/latex-dev/base/testpage.tex523
-rw-r--r--macros/latex-dev/base/tex2.txt83
-rw-r--r--macros/latex-dev/base/texpert.txt210
-rw-r--r--macros/latex-dev/base/tlc2.err4630
-rw-r--r--macros/latex-dev/base/tlc2.pdfbin0 -> 273666 bytes
-rw-r--r--macros/latex-dev/base/tulm.fdd330
-rw-r--r--macros/latex-dev/base/tulm.ins113
-rw-r--r--macros/latex-dev/base/tulm.pdfbin0 -> 156547 bytes
-rw-r--r--macros/latex-dev/base/unpack.ins135
-rw-r--r--macros/latex-dev/base/utf8ienc.dtx2264
-rw-r--r--macros/latex-dev/base/utf8ienc.pdfbin0 -> 337796 bytes
-rw-r--r--macros/latex-dev/base/webcomp.err381
-rw-r--r--macros/latex-dev/base/webcomp.pdfbin0 -> 136173 bytes
-rw-r--r--macros/latex-dev/doc/README-doc.md29
l---------macros/latex-dev/doc/README.md1
-rw-r--r--macros/latex-dev/doc/cfgguide.pdfbin0 -> 219621 bytes
-rw-r--r--macros/latex-dev/doc/cfgguide.tex561
-rw-r--r--macros/latex-dev/doc/changes-doc.txt32
-rw-r--r--macros/latex-dev/doc/clsguide.pdfbin0 -> 371876 bytes
-rw-r--r--macros/latex-dev/doc/clsguide.tex1874
-rw-r--r--macros/latex-dev/doc/cyrguide.pdfbin0 -> 223453 bytes
-rw-r--r--macros/latex-dev/doc/cyrguide.tex398
-rw-r--r--macros/latex-dev/doc/encguide.pdfbin0 -> 1244414 bytes
-rw-r--r--macros/latex-dev/doc/encguide.tex1481
-rw-r--r--macros/latex-dev/doc/fntguide.pdfbin0 -> 356631 bytes
-rw-r--r--macros/latex-dev/doc/fntguide.tex1907
-rw-r--r--macros/latex-dev/doc/latexchanges.pdfbin0 -> 385193 bytes
-rw-r--r--macros/latex-dev/doc/latexchanges.tex756
-rw-r--r--macros/latex-dev/doc/ltnews.pdfbin0 -> 831633 bytes
-rw-r--r--macros/latex-dev/doc/ltnews.tex276
-rw-r--r--macros/latex-dev/doc/ltnews01.tex152
-rw-r--r--macros/latex-dev/doc/ltnews02.tex154
-rw-r--r--macros/latex-dev/doc/ltnews03.tex145
-rw-r--r--macros/latex-dev/doc/ltnews04.tex143
-rw-r--r--macros/latex-dev/doc/ltnews05.tex158
-rw-r--r--macros/latex-dev/doc/ltnews06.tex149
-rw-r--r--macros/latex-dev/doc/ltnews07.tex146
-rw-r--r--macros/latex-dev/doc/ltnews08.tex154
-rw-r--r--macros/latex-dev/doc/ltnews09.tex142
-rw-r--r--macros/latex-dev/doc/ltnews10.tex153
-rw-r--r--macros/latex-dev/doc/ltnews11.tex141
-rw-r--r--macros/latex-dev/doc/ltnews12.tex154
-rw-r--r--macros/latex-dev/doc/ltnews13.tex201
-rw-r--r--macros/latex-dev/doc/ltnews14.tex169
-rw-r--r--macros/latex-dev/doc/ltnews15.tex169
-rw-r--r--macros/latex-dev/doc/ltnews16.tex161
-rw-r--r--macros/latex-dev/doc/ltnews17.tex230
-rw-r--r--macros/latex-dev/doc/ltnews18.tex51
-rw-r--r--macros/latex-dev/doc/ltnews19.tex116
-rw-r--r--macros/latex-dev/doc/ltnews20.tex153
-rw-r--r--macros/latex-dev/doc/ltnews21.tex255
-rw-r--r--macros/latex-dev/doc/ltnews22.tex244
-rw-r--r--macros/latex-dev/doc/ltnews23.tex257
-rw-r--r--macros/latex-dev/doc/ltnews24.tex263
-rw-r--r--macros/latex-dev/doc/ltnews25.tex137
-rw-r--r--macros/latex-dev/doc/ltnews26.tex239
-rw-r--r--macros/latex-dev/doc/ltnews27.tex135
-rw-r--r--macros/latex-dev/doc/ltnews28.tex365
-rw-r--r--macros/latex-dev/doc/ltnews29.tex526
-rw-r--r--macros/latex-dev/doc/ltnews30.tex297
-rw-r--r--macros/latex-dev/doc/ltx3info.pdfbin0 -> 197812 bytes
-rw-r--r--macros/latex-dev/doc/ltx3info.tex474
-rw-r--r--macros/latex-dev/doc/modguide.pdfbin0 -> 226660 bytes
-rw-r--r--macros/latex-dev/doc/modguide.tex412
-rw-r--r--macros/latex-dev/doc/usrguide.pdfbin0 -> 396659 bytes
-rw-r--r--macros/latex-dev/doc/usrguide.tex1817
-rw-r--r--macros/latex-dev/required/graphics/README.md64
-rw-r--r--macros/latex-dev/required/graphics/cat.eps305
-rw-r--r--macros/latex-dev/required/graphics/changes.txt951
-rw-r--r--macros/latex-dev/required/graphics/color.dtx963
-rw-r--r--macros/latex-dev/required/graphics/color.pdfbin0 -> 201388 bytes
-rw-r--r--macros/latex-dev/required/graphics/drivers.dtx1701
-rw-r--r--macros/latex-dev/required/graphics/drivers.pdfbin0 -> 263550 bytes
-rw-r--r--macros/latex-dev/required/graphics/epsfig.dtx142
-rw-r--r--macros/latex-dev/required/graphics/epsfig.pdfbin0 -> 154501 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphics-2017-06-25.sty526
-rw-r--r--macros/latex-dev/required/graphics/graphics-drivers.ins92
-rw-r--r--macros/latex-dev/required/graphics/graphics.dtx1992
-rw-r--r--macros/latex-dev/required/graphics/graphics.ins43
-rw-r--r--macros/latex-dev/required/graphics/graphics.pdfbin0 -> 282826 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphicx.dtx939
-rw-r--r--macros/latex-dev/required/graphics/graphicx.pdfbin0 -> 232397 bytes
-rw-r--r--macros/latex-dev/required/graphics/grfguide.pdfbin0 -> 310552 bytes
-rw-r--r--macros/latex-dev/required/graphics/grfguide.tex1031
-rw-r--r--macros/latex-dev/required/graphics/keyval.dtx419
-rw-r--r--macros/latex-dev/required/graphics/keyval.pdfbin0 -> 222532 bytes
-rw-r--r--macros/latex-dev/required/graphics/lscape.dtx135
-rw-r--r--macros/latex-dev/required/graphics/lscape.pdfbin0 -> 150124 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotating.dtx686
-rw-r--r--macros/latex-dev/required/graphics/rotating.pdfbin0 -> 246259 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotex.pdfbin0 -> 162266 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotex.tex500
-rw-r--r--macros/latex-dev/required/graphics/trig.dtx329
-rw-r--r--macros/latex-dev/required/graphics/trig.pdfbin0 -> 191711 bytes
234 files changed, 135692 insertions, 0 deletions
diff --git a/macros/latex-dev/base/README.md b/macros/latex-dev/base/README.md
new file mode 100644
index 0000000000..fc5e0b5080
--- /dev/null
+++ b/macros/latex-dev/base/README.md
@@ -0,0 +1,103 @@
+The LaTeX kernel
+================
+
+Release 2019-10-01 pre-release 2
+
+Overview
+--------
+
+This bundle provides the core LaTeX kernel. In addition to this bundle,
+a minimal LaTeX system also needs the files contained in the
+
+- LaTeX team documentation (`doc`)
+- Packages which must be available (`required`). These are
+ - Essential tools (`tools`)
+ - Core graphics and color support (`graphics`)
+ - Key mathematics support (`amsmath`)
+
+This file contains a small set of pointers to other more complete
+documentation on installing and using a LaTeX system.
+
+Documentation
+-------------
+
+Full documentation of the LaTeX system is provided by
+
+- _LaTeX: A Document Preparation System_; Lamport, Addison-Wesley
+- _The LaTeX Companion_, 2ed; Mittelbach and Goossens with Braams, Carlisle
+ and Rowley, Addison-Wesley
+- _Guide to LaTeX_, 4ed; Kopka and Daly, Addison-Wesley
+
+The distribution is described in files ending `.txt` or `.md`; briefly,
+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:
+
+ <xxx>guide.tex
+
+You will probably need to update your system before you can typeset
+these files. Each file needs three LaTeX runs. Some of these are
+also available as PDF files on [CTAN](https://www.ctan.org).
+
+The following files contain further information:
+
+- `ltx3info.tex` gives you some historical information about the LaTeX3
+ project
+- `manual.err` lists errata in _LaTeX: A Document Preparation System_ (Lamport)
+- `tlc2.err` lists errata in _The LaTeX Companion_ (Mittelbach et al.)
+
+The files `ltnews*.tex` (part of the `doc` bundle) contain the LaTeX
+newsletters, the highest number being the most recent.
+
+For historical reasons, the base distribution and the core documentation
+are bundled separately. Documentation is found in the `doc` bundle. In an
+installed TeX system, `base` and `doc` should be placed within the same
+location; the distinction is therefore primarily of importance when looking
+at the development code.
+
+Installation
+------------
+
+We no longer distribute installation instructions for the various TeX
+implementations. All modern TeX systems include LaTeX as-standard, and end
+users should in general use the release versions supplied in this way.
+
+Release distribution is carried out only through the CTAN archives.
+
+Requirements
+------------
+
+The LaTeX kernel requires the e-TeX extensions to TeX, which were finalised
+in the late 1990s and are available in modern TeX-derived engines. Some new
+features require `\ifincsname`, which is currently available in release
+versions of pdfTeX, XeTeX and LuaTeX, and is being introduced shortly in
+e-pTeX and e-upTeX.
+
+License
+-------
+
+The contents of this bundle are distributed under the [LaTeX Project
+Public License](https://www.latex-project.org/lppl/lppl-1-3c/),
+version 1.3c or later.
+
+-----
+
+<p>Copyright (C) 1989-2019 The LaTeX Project <br />
+<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
+All rights reserved.</p>
+
diff --git a/macros/latex-dev/base/TEMPLATE-IncludeInRelease.txt b/macros/latex-dev/base/TEMPLATE-IncludeInRelease.txt
new file mode 100644
index 0000000000..ae509a90f7
--- /dev/null
+++ b/macros/latex-dev/base/TEMPLATE-IncludeInRelease.txt
@@ -0,0 +1,19 @@
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\XXX}{Info}%
+
+
+
+
+
+
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\XXX}{Info}%
+
+%<latexrelease>
+
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
diff --git a/macros/latex-dev/base/alltt.dtx b/macros/latex-dev/base/alltt.dtx
new file mode 100644
index 0000000000..358a059902
--- /dev/null
+++ b/macros/latex-dev/base/alltt.dtx
@@ -0,0 +1,213 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%
+%% File `alltt.dtx'.
+%% Copyright (C) 1987 by Leslie Lamport
+%% Copyright (C) 1994--1997 LaTeX3 project, Johannes Braams
+%% all rights reserved.
+%%
+%<*dtx>
+\ProvidesFile{alltt.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{alltt}
+%<driver>\ProvidesFile{alltt.drv}
+%\ProvidesFile{alltt.dtx}
+ [1997/06/16 v2.0g defines alltt environment]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+\providecommand{\Lenv}[1]{\textsf{#1}}
+\providecommand{\pkg}[1]{\texttt{#1}}
+\providecommand{\file}[1]{\texttt{#1}}
+\DocInput{alltt.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{v2.0g}{1997/06/16}{A few documentation fixes (PR 2520)}
+% \changes{v2.0d}{1995/04/02}{A few documentation fixes (PR 1517)}
+%
+% \GetFileInfo{alltt.dtx}
+% \title{The \texttt{alltt} environment\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{Johannes Braams}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \begin{abstract}
+% This package defines the \Lenv{alltt} environment, which is like
+% the \Lenv{verbatim} environment except that |\|, |{|, and |}|
+% have their usual meanings.
+%
+% Thus, other commands and environments can appear within an
+% \Lenv{alltt} environment.
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% \DescribeEnv{alltt}
+% Here are some things you may want to do in an \Lenv{alltt}
+% environment:
+% \begin{itemize}
+% \item Change fonts--e.g., by typing |{\em emphasized text\/}|
+%
+% \item Insert text from a file \file{foo.tex} by typing
+% |\input{foo}|. Beware that each |<return>| starts a new line, so
+% if \file{foo.tex} ends with a |<return>| you can wind up with an
+% extra blank line if you're not careful.
+%
+% \item Insert a math formula. Note that |$| just produces a dollar
+% sign, so you'll have to type |\(...\)| or |\[...\]|. Also, |^|
+% and |_| just produce their characters; use |\sp| or |\sb| for
+% super- and subscripts, as in |\(x\sp{2}\)|.
+% \end{itemize}
+%
+% \StopEventually{}
+%
+% \section{The Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{environment}{alltt}
+% The \Lenv{alltt} environment is similar to the \Lenv{verbatim}
+% environment, except that |\|, |{| and |}| have their usual
+% behaviour.
+% \changes{v2.0b}{1994/10/29}{Added a missing \cs{dospecials}}
+% \changes{v2.0c}{1995/01/27}{Reset \cs{dospecials} after its changed
+% version is executed}
+% \changes{v2.0e}{1995/05/13}{brought definition up to date with the
+% verbatim environment}
+% \changes{v2.0e}{1995/05/13}{Save and restore (in math mode) the
+% definition of the \texttt{'} character}
+% \begin{macrocode}
+\begingroup
+\lccode`\~=`\'
+\lowercase{\endgroup
+\newenvironment{alltt}{%
+ \trivlist
+ \item\relax
+ \if@minipage
+ \else
+ \vskip\parskip
+ \fi
+ \leftskip\@totalleftmargin
+ \rightskip\z@skip
+ \parindent\z@
+ \parfillskip\@flushglue
+ \parskip\z@skip
+ \@@par
+ \@tempswafalse
+ \def\par{%
+ \if@tempswa
+ \leavevmode\null\@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}
+ \obeylines
+ \verbatim@font
+ \let\org@prime~%
+ \@noligs
+% \end{macrocode}
+% \changes{v2.0f}{1995/07/24}{Added setting of the \cs{catcode} of the
+% \texttt{'} character}
+% \begin{macrocode}
+ \everymath\expandafter{\the\everymath
+ \catcode`\'=12 \let~\org@prime}
+ \everydisplay\expandafter{\the\everydisplay
+ \catcode`\'=12 \let~\org@prime}
+ \let\org@dospecials\dospecials
+ \g@remfrom@specials{\\}
+ \g@remfrom@specials{\{}
+ \g@remfrom@specials{\}}
+ \let\do\@makeother
+ \dospecials
+ \let\dospecials\org@dospecials
+ \frenchspacing\@vobeyspaces
+ \everypar \expandafter{\the\everypar \unpenalty}}
+{\endtrivlist}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\g@remfrom@specials}
+% In the old implementation of the \pkg{alltt} package a fixed
+% |\dospecials| was used. However nowadays the |\dospecials|
+% command might contain more special characters at run-time then as
+% was defined in the format. Therefore we remove the necessary
+% special character from |\dospecials| at the start of the
+% \Lenv{alltt} environment. For this we need a macro. Remember that
+% the list of special characters in |\dospecials| contains the
+% control sequence |\do| between the characters. We use that to
+% check whether a character has to be removed.
+%
+% The macro |\g@remfrom@specials| takes one argument, the chracter
+% to be removed from the list.
+% \begin{macrocode}
+\def\g@remfrom@specials#1{%
+% \end{macrocode}
+% We build up a new list in |\@new@speicals|.
+% \begin{macrocode}
+ \def\@new@specials{}
+% \end{macrocode}
+% The command |\@remove| compares its argument with the argument of\\
+% |\g@remfrom@specials|.
+% \begin{macrocode}
+ \def\@remove##1{%
+ \ifx##1#1\else
+% \end{macrocode}
+% When they are not the same the argument of |\@remove| is added
+% (together with |\do|) to the new list.
+% \begin{macrocode}
+ \g@addto@macro\@new@specials{\do ##1}\fi}
+% \end{macrocode}
+% Now we |\let| |\do| be equal to |\@remove| and execute
+% |\dospecials|.
+% \begin{macrocode}
+ \let\do\@remove\dospecials
+% \end{macrocode}
+% All that's left is to make |\dospecials| point to the new list.
+% \begin{macrocode}
+ \let\dospecials\@new@specials
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/alltt.ins b/macros/latex-dev/base/alltt.ins
new file mode 100644
index 0000000000..73d2d0b420
--- /dev/null
+++ b/macros/latex-dev/base/alltt.ins
@@ -0,0 +1,87 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{alltt.sty}{t}{%
+ \from{alltt.dtx}{package}}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/alltt.pdf b/macros/latex-dev/base/alltt.pdf
new file mode 100644
index 0000000000..021c5fb92d
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..86bdb734c8
--- /dev/null
+++ b/macros/latex-dev/base/bugs.txt
@@ -0,0 +1,89 @@
+ LaTeX Error Reports
+
+ January 2017
+
+ERROR REPORTS
+
+Before you report an error, please check that:
+
+ * Your LaTeX system is not too old, i.e., your version is the
+ current or the previous release. Information about the latest
+ release can be found at
+ https://www.latex-project.org/news/latex2e-news/
+
+ * The error is not already mentioned in the documentation of the
+ 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:
+
+ https://www.latex-project.org/bugs.html
+
+ * The error is not caused by software other than the core LaTeX
+ software that is produced and maintained by the LaTeX3 project
+ team. Please report problems with other software to the authors
+ or suppliers of that software, and not to us!
+
+ Thus you should check that the problem is not caused by, for
+ example, the viewer or printing software you use.
+
+ Also, the test file demonstrating the error should not use any
+ classes or packages other than those authored and supported by the
+ LaTeX3 team. The files for the package or class will tell you how
+ it is supported. The test file should use the package latexbug to
+ check that all packages in the file are supported by the LaTeX3
+ Project (see the discussion on the website why this is important).
+
+ * The error is not caused by using an obsolete version of any file or
+ of other software.
+
+ * You are using the original version of all files, not one that has
+ been modified elsewhere.
+
+If you think you have found a genuine bug in a recent version of the
+core LaTeX software, please report it in the following way:
+
+ * Prepare a *short* test file, as described above, that clearly
+ demonstrates your problem; see below for a discussion of `short'.
+
+ * Run this file through latex to obtain the transcript file
+ (often .log) since you will need to submit this file also.
+
+
+ Submit the test and transcript files through the Web interface at:
+
+ https://www.latex-project.org/bugs/bugs-upload.html
+
+ Please fill in all required fields; in particular, make sure
+ that your name, email address, and the summary description
+ are correct (the email address will not be shared or made public).
+
+
+
+
+
+DOCUMENTATION ERRORS
+
+If you find an error in one of the following books:
+
+ TITLE Author Errata File
+
+ The LaTeX Manual, 2ed Lamport manual.err
+ The LaTeX Companion, 2ed Mittelbach, Goossens, et al tlc2.err
+ The LaTeX Graphics
+ Companion Goossens, Mittelbach, Rahtz grphcomp.err
+ Der LaTeX Begleiter, 2ed Mittelbach, Goossens, et al lb2.err
+ The LaTeX Web Companion Goossens, Rahtz webcomp.err
+
+
+then please check first whether it is already mentioned in the errata
+file for that book (these files are part of the LaTeX distribution).
+If this is not the case then please report the error to the address
+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 ---
+
+
diff --git a/macros/latex-dev/base/changes.old.txt b/macros/latex-dev/base/changes.old.txt
new file mode 100644
index 0000000000..b764e8da16
--- /dev/null
+++ b/macros/latex-dev/base/changes.old.txt
@@ -0,0 +1,1271 @@
+
+This is from pr/3051 (internal-latex) from Ulrik Vieth,
+submitted Wed Jun 23 00:51:06 +0200 1999.
+Ulrik's message is attached in full below.
+
+--
+
+After having moved house recently, I found a pile of old
+floppies containing various ancient LaTeX2e releases.
+Looking through the original 1994/06/01 release I happened
+to find a few changes.txt entries that somehow got lost
+during conversion to GNU ChangeLog format. Enclosed is
+a patch to recover this intersting part of the history.
+It is based on the 9906 test release of changes.txt
+
+Cheers, Ulrik.
+
+P.S. From the historical point-of-view, it is interesting
+to note that files like ltherest.dtx are first mentioned
+in mid-1991. That's way _before_ the last official releases
+of 2.09 (in December 1991 and March 1992).
+
+
+--- changes.txt.orig Fri May 28 00:00:00 1999
++++ changes.txt Wed Jun 23 00:14:30 1999
+@@ -7696,29 +7696,29 @@
+
+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 <latex-bugs@latex-project.org>
+
+@@ -7728,30 +7728,30 @@
+
+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>
+
+@@ -7766,16 +7766,16 @@
+
+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 <latex-bugs@latex-project.org>
+
+@@ -7823,32 +7823,32 @@
+
+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 <latex-bugs@latex-project.org>
+@@ -7897,12 +7897,12 @@
+
+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>
+
+@@ -8031,60 +8031,60 @@
+
+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
++ * 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
++ * 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
++ * 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>
+@@ -8110,13 +8110,13 @@
+
+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>
+@@ -8127,7 +8127,7 @@
+
+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 <latex-bugs@latex-project.org>
+
+@@ -8139,11 +8139,11 @@
+
+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>
+
+@@ -8191,9 +8191,10 @@
+ makeidx class option, as it is now a proper package. Changed
+ leqno class option t oread leqno.clo. Added fleqn class
+ 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 <latex-bugs@latex-project.org>
+@@ -8284,6 +8285,13 @@
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
++1994-02-25 David Carlisle <latex-bugs@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
++
+1994-02-24 Frank Mittelbach <latex-bugs@latex-project.org>
+
+ * fam.dtx (subsection{Macros for loading fonts}):
+@@ -8291,4 +8299,931 @@
+ \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 \ No newline at end of file
diff --git a/macros/latex-dev/base/changes.txt b/macros/latex-dev/base/changes.txt
new file mode 100644
index 0000000000..11ad40cf3f
--- /dev/null
+++ b/macros/latex-dev/base/changes.txt
@@ -0,0 +1,10436 @@
+This file lists changes to the LaTeX2e files in reverse chronological order.
+It is provided for convenience only. It therefore makes no claims to
+completeness or accuracy and it contains some references to files that
+are not part of the distribution.
+=======================================================================
+
+2019-07-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx (subsection{The mapping table}):
+ Accept typical f-ligatures and st in utf8 encoding (github/154)
+
+2019-07-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx (subsection{Housekeeping}):
+ Temp rollback fix for e-pTeX as that engines doesn't yet know
+ \ifincsname (so now features are unavailable there)
+
+ * ltfssbas.dtx (subsection{Macros for loading fonts}):
+ Don't set any \f@... macros in \DeclareErrorFont as this side
+ effect is wrong! (pr/4399)
+
+ * ltfssini.dtx (subsection{Miscellaneous}):
+ Explicitly set some defaults for NFSS
+ (because of change to \DeclareErrorFont)
+
+ * slifonts.fdd: Explicitly set some defaults for NFSS
+ (because of change to \DeclareErrorFont)
+
+2019-07-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfiles.dtx (section{File Handling}):
+ Support UTF-8 in \includeonly
+ (subsection{Safe Input Macros}):
+ Support UTF-8 and spaces in \IfFileExists and \InputIfFileExists
+
+ * ltclass.dtx (subsection{Providing shipment}):
+ Support UTF-8 and spaces in filecontents environment file name.
+
+2019-04-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: adjustment for extended UTF-8 support in pdftex,
+ supporting UTF-8 in labels and refs and in filenames and typeouts.
+
+ * ltfinal.dtx: adjustment for extened UTF-8 support in pdftex
+
+2019-03-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * nfssfont.dtx (section{The code}): Added a default action
+ "\table\bye" which is the most common case, so one can now simply
+ hit enter and doesn't need to type something in.
+
+2019-02-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx (subsection{The mapping table}):
+ Added 27E8 and 27E9 (github/110)
+
+2019-02-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssbas.dtx (subsection{Macros for loading fonts}):
+ Changed wording of warning (github/107)
+
+2019-02-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfiles.dtx (subsection{Safe Input Macros}):
+ Expand \@filef@und before executing second argument (github/109)
+
+2019-02-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx (subsection{The mapping table}):
+ Fixed U+012F which should have an i not a dotless i (github/122)
+
+2018-12-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lttab.dtx (subsection{array and tabular environments}):
+ Add extra \hskip1sp to guard against an \unskip at the start of
+ a c-column cell (gh/102)
+
+#########################
+# 2018-12-01 Release
+#########################
+
+2018-11-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx (subsection{Floats}): Unbox \@outputbox to preserve boxing
+ level (github/94)
+
+2018-11-18 Enrico Gregorio <Enrico.Gregorio@latex-project.org>
+
+ * ltoutenc.dtx
+ Added \Hwithstroke and \hwithstroke
+
+2018-11-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltbibl.dtx (section{Bibliography Generation}):
+ Zap spaces in the argument of \bibliography
+ as BibTeX doesn't support them (github/88)
+
+2018-10-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx (subsection{Verbatim}):
+ Provide visible space in \verb* also for XeTeX and LuaTeX (github/69)
+ Provide \verbvisiblespace such that it is usable in normal text (github/70)
+
+2018-10-10 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltspace.dtx: prevent space hacks adding breakpoints (github/81)
+
+2018-10-05 David Carlisle <David.Carlisle@latex-project.org>
+
+ * utf8ienc.dtx: Use hex in invalid byte error (suggested in PR 82 from mirabilos)
+
+2018-09-30 David Carlisle <David.Carlisle@latex-project.org>
+
+ * utf8ienc.dtx: Fix display of codepoints in error messages (PR 63 from mirabilos)
+
+2018-09-28 David Carlisle <David.Carlisle@latex-project.org>
+
+ * utf8ienc.dtx: Fix to handling of 4-octet UTF-8. Mostly from github PR 60
+
+2018-09-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx (subsection{Environments}):
+ * ltsect.dtx (section| or |\caption|):
+ Sometimes mask the endline char when writing to files (github/73)
+
+2018-09-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx (subsection{Command definitions}):
+ In the error messages always explicitly generate a space
+ after the csname and not rely on \noexpand to save tokens (github/41)
+
+2018-09-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (section*{Index}):
+ Guard against following \unskip (github/23) also fixes (github/75)
+
+2018-09-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (subsection{Horizontal space (and breaks)}):
+ Start LR-mode for \thinspace and friends if necessary (github/49)
+
+ * ltmath.dtx (subsubsection{The UNSORTED Rest}):
+ Start LR-mode for \smash \phantom and variants if necessary (github/49)
+
+ * exscale.dtx (section{Implementation}):
+ * fontdef.dtx (subsubsection{Biggggg}):
+ Start LR-mode for \big and friends if necessary (github/49)
+
+2018-09-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx
+ Prevent protrusion in TOC lines (https://tex.stackexchange.com/q/172785/10109)
+
+2018-09-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltsect.dtx (section| or |\caption|):
+ Prevent protrusion in TOC lines (https://tex.stackexchange.com/q/172785/10109)
+
+2018-08-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx (subsection{Hyphenation}): Added
+ \document@default@language to latexrelease mechanism (github/68)
+
+2018-08-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx Use \guillemetleft and \guillemetright
+ instead of old Adobe names in all encoding files (github/65)
+
+ * ltoutenc.dtx Provide \guillemetleft and \guillemetright (github/65)
+
+ * latex209.dtx Allow \guillemetleft and \guillemetright to be
+ (re)defined. (github/65)
+
+2018-07-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: added missing declarations for \j (0237), \SS (1E9E),
+ \k{} (02DB) and \.{} {02D9)
+
+2018-05-29 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltclass.dtx: use \csname test rather than \@ifundefined to get \relax side effect.
+
+#########################
+# 2018-04-01 PL 5 Release
+#########################
+
+2018-05-11 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltfinal.dtx: Make \UTFviii@undefined@err and \UTFviii@invalid@err
+ also safe for initial file name for invalid UTF-8 and non-UTF-8 filesystems.
+ issue #48
+
+2018-05-08 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltclass.dtx:
+ Update to suspicious rollback code for issue #43
+
+ Make the suspicious rollback message a warning not error.
+
+ Make the current and latest options to latexrelease set the
+ default rollback request to 0 so package rollback is disabled.
+
+#########################
+# 2018-04-01 PL 4 Release
+#########################
+
+2018-05-03 David Carlisle <David.Carlisle@latex-project.org>
+
+ * docstrip.dtx: Reset catcodes for non ASCII .ins files
+
+#########################
+# 2018-04-01 PL 3 Release
+#########################
+
+2018-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltcounts.dtx: added missing '.' in default for \the<counter>
+ when using \counterwithin (issue/38)
+
+2018-04-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx (subsection{Batchfile commands}): Read 8bit input
+ raw to leave high bits in the code to unchanged without utf8
+ handling (issue 34)
+ Without this change a dtx file with 8bit chars in the code need to
+ have \UseRawInputEncoding in the .ins file to work.
+
+#########################
+# 2018-04-01 PL 2 Release
+#########################
+
+2018-04-08 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltclass.dtx: Guard against spaces in \providesPackage (for issue 33)
+ * ltfinal.dtx: adjust UTF-8 handling in \everyjob (for issue 32)
+
+#########################
+# 2018-04-01 PL 1 Release
+#########################
+
+2018-04-07 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltfinal.dtx: Reset \inputencodingname in \UseRawInputEncoding
+
+
+#########################
+# 2018-04-01 Release
+#########################
+
+2018-04-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx (subsection{Input encoding}):
+ * inputenc.dtx:
+ Handle special case of utf8x incompatibility
+
+2018-04-05 David Carlisle <David.Carlisle@latex-project.org>
+
+ * utf8ienc.dtx: add BOM default definition
+
+2018-03-30 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltfinal.dtx: add \UseRawInputEncoding and further
+ adjustments to the input encoding setup.
+
+
+2018-03-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx (subsection{Providing shipment}): ensure that
+ chars in the range of 128-255 are not active during filecontents
+ writing.
+
+2018-03-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * utf8ienc.dtx: Add \UTFviii@invalid
+
+ * inputenc.dtx: Make \inputencoding{..} do nothing if it
+ specified the current encoding.
+
+ * ltfinal.dtx: Default to UTF-8 input encoding
+
+2018-03-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx: Package/class rollback mechanism: use full file
+ name to specify old release
+
+2018-03-15 <Frank.Mittelbach@latex-project.org>
+
+ * ltxdoc.dtx: Set up \protect in index entries
+
+2018-03-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltcounts.dtx: added \@removefromreset, \counterwithin and
+ \counterwithout
+
+2018-02-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx: add rollback concept for packages and classes
+
+2018-02-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * doc.dtx: Only use\DocStyleParms if defined
+ (previously the test defined it but this will change in the kernel)
+
+2018-01-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Modify \IncludeInRelease code to check matching \EndIncluderelease
+ * ldefns.dtx ltfiles.dtx ltoutput.dtx ltclass.dtx fixes to \EndIncludeInRelease
+ * tlb-latexrelease.lvt check \IncludeInRelease markup
+
+2018-01-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: possible 2018-02-01 release
+
+ * ltdefns.dtx: new \@ifundefined definitions to avoid setting
+ csname to \relax
+
+2017-12-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexrelease.dtx: Add \latexreleaseversion info
+ to \ProvidesPackage output so that different versions announce
+ themselves properly
+
+2017-04-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: possible PL1
+
+ * ltluatex.dtx: glyph_stream_provider is back in luatex 1.04
+
+#########################
+# 2017-04-15 Release
+#########################
+
+
+2017-04-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: add a test on the value of \prevdepth
+ so that the depth of the last line is preserved in forced page breaks.
+
+2017-04-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: fix code to skip write18 for luatex.
+
+2017-04-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: If a composite is declared with an undeclared
+ comand, declare it first as an encoding specific command that
+ generates an error. This allows the declared composite to
+ work as expected.
+
+2017-03-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: reset \lineskiplimit to \normallineskiplimit
+ in \@arrayparboxrestore. https://tex.stackexchange.com/a/359934
+
+2017-03-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: luatex 1.04 primitives
+
+2017-03-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: move the definition of \@dischyph to be after that
+ of \- again.
+
+2017-03-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltsect.dtx: Adjust the documentation of
+ \@afterheading and \@xsect, to document that
+ \clubpenalty is set locally not globally.
+
+2017-03-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: Update the definition of \- pr/3855
+
+2017-03-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: Reset \language in Output Routine
+ To protect hyphenation in page head.
+
+ * ltfiles.dtx: Save \document@default@language
+
+ * ltmiscen.dtx: Use \language to prevent hypenenation in \verb
+ Do same, replacing setting of \hyphenchar in verbatim.
+
+2017-03-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx, latexrelease.ins: support yyyy-mm-dd format
+ in addition to yyyy/mm/dd
+
+2017-03-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: remove 2017-01-20 hack for luaotfload issue
+ as no longer needed.
+
+2017-02-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: \DeclareTextCompositeCommand check that
+ the accent command has been declared.
+ Make TU accents fall back to combining character if precomposed
+ character is not in the font.
+
+#########################
+# 2017/01/01 PL 3 Release
+#########################
+
+2017-02-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Correction to test for empty argument in TU
+ accents.
+
+#########################
+# 2017/01/01 PL 2 Release
+#########################
+
+2017-02-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Guard against empty base in
+ \DeclareTextCompositeCommand, and \add@unicode@accent.
+ Declare \^{} and \~{} in tuenc.def.
+ Declare \textquotesingle, \textasciigrave and
+ \textquotedbl for TU encoding (\remove@tlig version)
+
+2017-02-18 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: parametrise Lua access to register
+ allocation count data
+
+2017-02-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: add fallback code for \textasteriskcentered
+ in TU encoding (https://tex.stackexchange.com/q/353425/)
+
+2017-01-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * build.lua bugs.txt, manifest.txt: drop latexbug.tex from the
+ distribution
+
+ * ltoutenc.dtx, utf8ienc.dtx: add \= for YyGg
+ U+0232, U+0233, U+1E20, U+1E21
+
+2017-01-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: add new banner suggesting to use latexbug.sty
+ instead.
+
+ * tulm.fdd: New file tu*fd file sources, including tulmssq,
+ tulmvtt and tulmdh (all based on eu1*fd files from fontspec).
+
+#########################
+# 2017/01/01 PL 1 Release
+#########################
+
+
+2017-01-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * tulmtt.fd: force fontdimens 3 and 4 of lmtt to zero (for xetex)
+
+ * ltoutenc.dtx: add composites for i and j duplicating those for
+ \i and \j
+
+2017-01-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: the TeX ligature syntax for xetex and luatex was
+ reversed in tuenc.def
+ Change \textasteriskcentered from U+204E to U+2217
+ as the former is not available in common fonts (Latin
+ Modern, TeX Gyre Pagella,LinLibertine...)
+
+2017-01-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: PL1
+
+ * ltoutenc.dtx: add commands for ascii symbols pr/4500
+
+
+#########################
+# 2017/01/01 Release
+#########################
+
+
+2017-01-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: work around luaotfload issues 382 and 387
+
+2017-01-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssbas.dtx: Add version of \showhyphens that works in XeTeX.
+
+2016-12-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: build_page_insert callback and documentation updates.
+
+2016-12-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexrelease.dtx: re-instate the old 2014 version of
+ fixltx2e.sty protected by \IncludeInRelease guards
+
+ * ltboxes.dtx, ltmath.dtx: undefine internal MakeRobust commands
+ for latexrelease
+
+2016-12-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: add TU encoding
+
+2016-12-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx, fontdef.dtx: Add support for defaulting to TU encoding
+
+2016-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: 2017/01/01
+
+2016-11-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx call_edit callback added
+
+2016-11-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: modify \ifx tests in \@onefilewithoptions
+ (latex/4497)
+
+2016-11-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: Give a bit more space for section numbers
+ in the toc (eg 19.10, 74.17.2)
+
+2016-10-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: luatex allows \language up to 16383,
+ and unlike pdftex gives an error for \language16384
+ (rather than treating it as 0)
+
+2016-10-15 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Require e-TeX
+
+2016-10-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: Avoid deadcycles error building float pages
+ with negative sized floats
+
+2016-10-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: update to ignore spaces between options in
+ \ExecuteOptions and in the option clash checking.
+
+ * ltvers.dtx: 2016/12/01 release (perhaps)
+
+2016-09-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltsect.dtx: documentation update, default section depth
+ is chapter=0.
+
+#########################
+# 2016/03/31 PL 3 Release
+#########################
+
+2016-07-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Patch level 3
+
+ * ltplain.dtx: out by one error when \newinsert switches to
+ \extrafloats (tlb-newinsert-001, Maïeul Rouquette)
+ add \global to \chardefs in \extrafloats in case used in a group
+ Done as patch level as recent code so no need for \IncludeInRelease
+
+2016-07-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltspace.dtx: Typos in \IncludeInRelease guards (Hironobu Yamashita)
+
+ * latexrelease.dtx: use \latexreleaseversion not \fmtversion
+ in old latexrelease package warning (Hironobu Yamashita)
+
+
+#########################
+# 2016/03/31 PL 2 Release
+#########################
+
+2016-06-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Patch level 2
+
+ * ltvers.dtx: define \@currname to be empty here (done again in ltfinal)
+ in case \IncludeInRelease used in a .def or .cfg file input in the format.
+
+ * ltclass.dtx: allow \@parse@version after \begin{document}
+
+2016-06-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: fix \c{g} in OT1 (erroneously specified as T1 in ot1enc.def)
+ Adjust latexrelease to undo comma accents for old format dates
+ (Hironobu Yamashita)
+
+
+#########################
+# 2016/03/31 PL 1 Release
+#########################
+
+2016-05-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: Pick up patch level from ltvers (not ltfinal)
+ (Hironobu Yamashita)
+
+2016-04-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx, ltfinal.dtx: 4096 character classes in latest xetex.
+
+#########################
+# 2016/03/31 Release
+#########################
+
+
+2016-03-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpictur.dtx, slides.dtx: Add tests to avoid leaders of
+ almost zero length (latex/4452)
+
+2016-03-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: new insert_local_par callback in luatex 0.89.4
+ and contribute_filter from luatex 0.89.5
+
+2016-02-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * utf8ienc.dtx: added approximations to additional dashes
+ U+2010, U+2011, U+2102, U+2015
+
+2016-02-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: Modify checks in \DeclareMathSymbol and related
+ commands so they do not give errors for \U... required for luatex
+ 0.87 which reports \mathchardef tokens as \Umathchar.
+
+2016-02-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: Fix \changes when used inside the environment env.
+ Use a sort of raggedright in the change history
+
+2016-02-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: Suppress \CheckSum check if no checksum is given in the file.
+
+2016-02-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * Lose \CharacterTable and \CheckSum from various documentation files.
+
+2016-02-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: adjust callback list to luatex 0.89
+
+ * ltvers.dtx: TL 2016 edition
+
+#########################
+# 2016/02/01 Release
+#########################
+
+2016-01-04 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Drop loading XeTeX character class data,
+ adjust \newXeTeXintercharclass to allocate from 1 not 4.
+
+2015-12-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: add \textcommaabove (Enrico Gregorio)
+ and several overloads in T1 encoding
+ for \c to \textcommabelow or \textcommasbove
+ https://tex.stackexchange.com/questions/282900
+ Add overload for (just) \c{g} in OT1 encoding.
+
+2015-12-10 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Load Unicode settings via new common system
+ (generic package "unicode-data").
+
+2015-12-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * utf8ienc.dtx: Additional accents that may be constructed in T1
+ encoding
+
+2015-11-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: test for undefined callback list latex/4445
+
+2015-11-14 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx: Updates for luatex 0.85
+
+2015-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: Support extended \newwrite and \newread in luatex
+
+2015-11-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: It's 2016 already.
+
+#########################
+# 2015/10/01 PL 2 Release
+#########################
+
+
+2015-10-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: globally assign the count to 256/266
+ when switching to extended range.
+
+2015-10-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * build.lua, manifest.txt ltpatch.ltx patches.txt bugs.txt
+ lose ltpatch.ltx
+ (which has not been used since the mechanism changed at
+ 2015/01/01 patch level 1)
+
+2015-10-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx (luatexbase): write lua allocation messages to the log (only)
+
+#########################
+# 2015/10/01 PL 1 Release
+#########################
+
+2015-10-02 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: PL1
+
+ * ltdirchk.dtx: Allow for full reversal of LuaTeX support
+ * ltluatex.dtx
+
+#########################
+# 2015/10/01 Release
+#########################
+
+
+2015-09-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * utf8ienc.dtx: \^W \^w \^Y \^y U+0174-0177
+
+2015-09-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexrelease.sty: increase default float list from 18 to 52
+ registers.
+
+2015-09-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltluatex.dtx (luatexbase): Adjust lua code for module messages.
+
+2015-08-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: Add extended \newinsert, taking inserts from float
+ list.
+
+2015-08-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * utf8ienc.dtx: add A0 (no break space) and AD (\-), add Romanian
+ comma below accent for SsTt. Display U+<hex number> notation
+ in error message.
+
+ * ltoutenc.dtx: Add \textcommabelow accent
+
+2015-08-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Allow negative patch levels for pre-release
+
+ * ltdirchk.dtx, ltluatex.dtx: Do not prefix luatex primitives
+ * (was in ltluatex.dtx)
+
+2015-08-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: bump date and reset patch level
+
+ * ltplain.dtx: add \string to allocation checking
+ * ltluatex.dtx: add luatex allocation support
+ * format.ins: add luatex allocation support
+
+2015-08-06 Joseph Wright <latex-bugs@latex-project.org>
+
+ * Store Unicode data more efficiently
+
+2015-07-30 Joseph Wright <latex-bugs@latex-project.org>
+
+ * README.txt: Retain extension when releasing
+ (CTAN policy change)
+
+
+#########################
+# 2015/01/01 PL 2 Release
+#########################
+
+2015-07-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: PL2
+
+ * ltoutput.dtx: fix docstrip guard for latexrelease latex/4434
+
+#########################
+# 2015/01/01 PL 1 Release
+#########################
+
+2015-06-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * utf8ienc.dtx: fix accents for 0403,0453,040C,045C
+ see https://tex.stackexchange.com/q/252521/1090
+
+2015-06-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: set version to 2015/01/01 PL 1, and remove ltpatch.ltx system.
+
+ * ltfsscmp.dtx: use 0000/00/00 date for old version.
+
+2015-06-20 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltunicode.dtx: Include first token in a range in
+ catcode settings.
+
+2015-06-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: date
+
+ * ltplain.dtx: remove duplicated (old) definition of \newtoks and
+ use -1 for the first upper bound on register types that need a
+ contiguous range so that the allocation is never restarted at 256.
+
+2015-06-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexrelease.ins: add ltcounts.dtx to the latexrelease.sty sources
+
+######################
+# 2015/01/01 Release
+######################
+
+2015-05-11 Joseph Wright <joseph.wright@morningstar2.co.uk>
+
+ * ltunicode.dtx: Apply East Asian catcode settings to LuaTeX
+
+2015-05-10 <Frank.Mittelbach@latex-project.org>
+
+ * ltlists.dtx: explicitly reset \clubpenalty to default in
+ \@doendpe so that a change done by a heading doesn't survive
+ forever
+
+2015-05-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx, latexrelease.dtx: add the old definition of \newXeTeXintercharclass
+ when emulating old releases.
+
+2015-04-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: define \xe@alloc@intercharclass for compatibility with older xelatex.ini
+
+2015-04-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssbas.dtx: Try loading fd file if family has changed
+
+2015-04-03 Joseph Wright <latex-bugs@latex-project.org>
+
+ * Update file manifest
+
+2015-03-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexrelease.dtx: give fixltx2e its own version number
+
+2015-03-26 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltunicode.dtx: Rename data file to unicode-letters.def
+
+2015-03-25 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltunicode.dtx: Add version and MD5 information to generated file
+
+2015-03-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxdoc.dtx: add \MaintainedByLaTeXTeam
+
+2015-03-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: Allow math alphabets in full range 0-255
+ Restrict symbol fonts 0-15 (no change with classic tex)
+
+2015-03-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: save catcode of % for latex/4420
+
+2015-03-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: Add \hideoutput and \tracingnone, reorganise
+ \tracingall (as sugested by GL on c.t.t)
+
+2015-03-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: Allocate mathgroups up to 255 in xetex and luatex
+
+2015-02-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: \EndIncludeRelease version (multiple files affected)
+
+2015-02-22 <Frank.Mittelbach@latex-project.org>
+
+ * latex209.dtx: Dropped \@no@font@optfalse in various places
+ - no longer provided by ltfsscmp.dtx.
+
+2015-02-22 <Frank.Mittelbach@latex-project.org>
+
+ * ltfsscmp.dtx: Moved all code into latexrelease - obsolete commands are no
+ longer automatically part of the kernel
+
+2015-02-21 <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx, ltfloat.dtx: Fixed code for fltrace.sty and
+ flafter.sty that got incorporated from fixltx2e into the kernel.
+
+2015-02-21 <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx, lterror.dtx, ltfiles.dtx, ltfssbas.dtx, ltfsscmp.dtx,
+ ltfssdcl.dtx, ltfsstrc.dtx, ltoutenc.dtx, ltoutput.dtx, ltpictur.dtx,
+ ltplain.dtx, lttab.dtx, ltvers.dtx, manifest.txt:
+ Removed all autoloading code as this is not any longer functional.
+
+2015-02-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * fix-cm.dtx: rename from fixltx2e.dtx
+
+2015-02-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: add lmtt for latex/4415
+
+2015-01-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx, ltfinal.dtx: reserve counts 256-255
+
+2015-01-22 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Allow \everyjob to be set before latex.ltx
+
+2015-01-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: etex \tracingall if available
+
+ * ltoutput.dtx: Reset \IncludeInRelease flags so flafter can be loaded twice.
+
+2015-01-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexrelease.dtx: Optional argument for \IncludeInRelease
+
+ * ltvers.dtx: Optional argument for \IncludeInRelease
+
+2015-01-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Add \@currname so \IncludeInRelese tests are package-local
+
+2015-01-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexrelease.dtx: add "current" option
+
+2015-01-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltspace.dtx: Modify \addpenalty so it doesn't add redundant
+ skips (+ and - the same value)
+
+ * fixltx2e.dtx: remove code from fixltx2e, add a stub package warning.
+
+ * ltfloat.dtx: 2 column float order (latexrelease)
+
+ * ltoutput.dtx: 2 column float order, merge with fltrace (latexrelease)
+
+2015-01-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmath.dtx: fleqn version of robust \[\]
+
+ * ltcounts.dtx: Use \TextOrMath switch in \@fnsymbol (latexrelease)
+
+ * ltspace.dtx: Allow hyphenation after space hacks (latexrelease)
+
+ * ltfloat.dtx: check float options (latexrelease)
+
+2015-01-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltcounts.dtx: Reset all within counter levels (latexrelease)
+
+2015-01-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssini.dtx: \eminnershape from fixltx2e
+
+ * ltspace.dtx: update \addpenalty from fixltx2e
+
+2015-01-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: \MakeRobust from fixltx2e
+
+ * ltboxes.dtx: make \makebox \parbox etc robust
+
+ * ltmath.dtx: make \( \) and \[ \] robust
+
+ * ltlength.dtx: add = to setlength (latexrelease)
+
+2015-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexversion.dtx: New option handling
+
+ * ltvers.dtx: define \IncludeInRelease and latexvesrsion date
+ docstrip guards
+
+2015-01-03 Joseph Wright <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Load information derived from Unicode Consortium
+ data to set \catcode, \lccode, \uccode, \sfcode information when
+ using a Unicode-based engine (XeTeX/LuaTeX), and initialise
+ XeTeX features for line breaking between character classes.
+
+ * ltdirchk.dtx: Enable extended primitives for LuaTeX
+
+2015-01-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexrelease.dtx: rename from patchltx2e
+
+ * ltdefns.dtx: Use luatex compatible definition of \typein
+ if luatex is being used.
+
+2014-12-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * patchltx2e.dtx:
+ * patchltx2e.ins:
+ * unpack.ins:
+ * manifest.txt New patchltx2e package added
+
+ * ltfssbas.dtx: move allocation definition to ltplain
+
+ * ltplain.dtx: Add new allocation code for extended registers
+ and \extrafloats command.
+
+ * ltfinal.dtx: add \newmarks if e-tex marks are defined
+
+ * ltfinal.dtx: add \newXeTeXintercharclass in xetex
+
+ * ltfloat.dtx: \textsubscript from fixltx2e
+
+ * ltspace.dtx: definition of \@ from fixltx2e
+
+2014-11-07 Joseph Wright <latex-bugs@latex-project.org>
+
+ * Rename 00readme.txt to README (named README.txt in the development
+ repository)
+
+######################
+# 2014/05/01 Release
+######################
+
+2014-09-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * nfssfont.dtx Typo in definition of \encoding (no change to processing)
+
+2014-09-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx Typo in \Ask argument fixed
+
+2014-09-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cmfonts.fdd, ltoutput.dtx, letter.dtx, ltoutenc.stx, lterror.dtx,
+ * ltfssbas.dtx, ltsect.dtx, proc.dtx, fixltx2e.dtx, docstrip.dtx,
+ * oldlfont.dtx, ltclass.dtx, ltplain.dtx, classes.dtx, ltmiscen.dtx,
+ * utf8ienc.dtx, ltfntcmd.dtx, ltxdoc.dtx, encguide.tex, ltspace.dtx,
+ * lttab.dtx, ltdirchk.dtx, slides.dtx, ltfssdcl.dtx, ifthen.dtx,
+ * ltxref.dtx, ltfsstrc.dtx, source2e.tex, tlc2.err, latexbug.el,
+ * makeindx.dtx, lb2.err, ltlists.dtx, ltdefns.dtx, ltfinal.dtx,
+ * doc.dtx, ltboxes.dtx, exscale.dtx, ltfssini.dtx, ltthm.dtx,
+ * fontdef.dtx, usrguide.tex, ltfloat.dtx, preload.dtx, nfssfont.dtx
+ Typos in documentation found by Karl Berry - thanks
+ (date but not version number changed)
+
+2014-08-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: Reset all within counters in one go (pr/4393)
+
+2014-06-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: add missing \fi reported by Ulrike Fischer
+
+2014-05-13 <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: missing dostrip guard added to prevent some float
+ code ending up in fix-cm
+
+2014-04-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Allow (x-)ascii and utf8x aliases for utf8 in
+ xetex/luatex
+
+2014-04-27 <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: change to allow for (slightly) better compatibility
+ with packages that change float handling but are not aware of the
+ modification in the core algorithm done in fixltx2e
+
+ * syntonly.dtx: fix to work together with fixltx2e
+
+2014-04-23 <Frank.Mittelbach@latex-project.org>
+
+ * fltrace.ins: extract fltrace.sty from sources
+
+2014-04-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: allow \usepackage[utf8]{inputenc} with luatex and xetex
+
+2014-04-18 <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: Handle infinite glue from \enlargethispage in
+ twocolumn mode (pr/4023)
+
+2013-12-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Check float optional argument for incorrect values
+
+2012-06-06 <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: Save and restore catcode of @ when reading a .def file
+ instead of setting it always to \makeatother afterwards (pr/4192)
+
+2011-09-03 Will Robertson <will.robertson@latex-project.org>
+
+ * ltfssbas.dtx: Remove \global before \newcount in definition of
+ \new@mathversion; the \global is redundant and caused a rare error
+ in conjunction with etex.sty when the lower level register pool
+ was exhaused.
+
+2011-08-19 Will Robertson <will.robertson@latex-project.org>
+
+ * ltclass.dtx: Update \@if@pti@ns to match new definition
+ of \in@ (pr/4166)
+
+######################
+# 2011/06/27 Release
+######################
+
+2011-05-08 Will Robertson <will.robertson@latex-project.org>
+
+ * ltfssdcl.dtx: Bruno's improvement to \in@
+
+2011-02-25 Will Robertson <will.robertson@latex-project.org>
+
+ * ltfntcmd.dtx: Bug fix for 2009-12 change to address pr/4092
+
+2011-02-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lppl.tex: removed spurious \null from the source that generates
+ an empty line.
+
+2010-08-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx: Use braces around \input arg (pr/4124)
+ * ltmiscen.dtx: Change of plan: Use \@@input instead (pr/4124)
+
+2010-02-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: Added mathcodes for +,-,:, and = (pr/4096)
+
+2009-12-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfntcmd.dtx: Use private switch to avoid issue (pr/4092)
+
+2009-10-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: Added Latin Modern and TeX Gyre subsets
+
+2009-10-20 Will Robertson <will.robertson@latex-project.org>
+
+ * ltfssdcl.dtx: Improve the definition of \in@ thanks to Heiko
+
+######################
+# 2009/09/24 Release
+######################
+
+2008-04-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: Ensure we don't lose spaces in the log (pr/4016)
+
+2008-03-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: added documentation on UTF8 handling and error
+ messages (pr/4002)
+
+2007-11-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: Many more updates (and comments) to the Cyrillic
+ code points, largely due to work by Matthias Noe -- thanks
+
+ * <various>.err: changed internally generated class file name from
+ errata.cls -> ttcterrata.cls
+
+2007-11-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: Added a few new unicode decls in cyrillic (pr/3988)
+
+2007-10-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * exscale.dtx: Use box 0 within group to avoid changing this
+ scratch register (some bug reported on ctt)
+
+2007-10-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx: Explain why \@mkboth is insde the heading
+ arg for \tableofcontents (pr/3285 and pr/3984)
+
+2007-08-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssdcl.dtx: changed font encoding changed warning in
+ \SetSymbolfont from screen warning to log info (pr/3975)
+
+2006-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: Added missing \ProvidesFile line for cp1257 (pr/3892)
+
+2006-10-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx: corrected documentation for \@startsection (pr/3891)
+
+2006-09-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.ins: changed \usedir declaration for makeindex files as
+ requested by Karl Berry
+
+2006-09-13 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Ensure that vrule is in \normalcolor in output
+ routine
+
+######################
+# 2005/12/01 Release
+######################
+
+2006-05-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lppl.tex: 1.3c clarification that the license text can not
+ be changed.
+
+ * lppl.txt: 1.3c clarification that the license text can not
+ be changed.
+
+2006-05-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.ins: put a correct \usedir declaration in for
+ generating the makeindex files (pr/3863)
+
+ * ltboxes.dtx: Ensure \@parboxto holds the value of \@tempdimb
+ not the register itself (pr/3867)
+
+2006-03-24 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Added \MakeRobust and made several kernel macros
+ robust (pr/3816).
+
+2006-03-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: large number of corrections for a number of
+ input encodings (pr/3849)
+ Number of normalisations in the LICR representation (pr/3849)
+ Avoid displaying warning about empty encoding file for "ascii"
+ encoding.
+
+ * utf8ienc.dtx: omsenc.dfu contained an incorrect ref from
+ 02D9 to \textperiodcentered (should have been 00B7)
+
+2006-02-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cleanup of .txt files: obsolete installation instructions
+ removed
+
+2006-02-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: added \inputencodingname and the two hooks
+ \newtoks\inpenc@prehook \newtoks\inpenc@posthook
+ to run code before and after an encoding change (suggested by
+ Philipp Lehman)
+
+2006-02-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: added \ij and \IJ mappings (beta test)
+
+2006-01-12 Johannes Braams <latex-bugs@latex-project.org>
+
+ * lppl.tex: Created from lppl.txt
+
+2006-01-08 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Changed \@fnsymbol to use the new robust
+ \TextOrMath command instead (pr/3752).
+
+2006-01-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * nfssfont.dtx: fixing bug pr/3789
+
+2005-11-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lppl.txt: small update, fixing typo and clarifying the term
+ "Base Interpreter" (found by Karl Berry)
+
+2005-11-10 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Make sure \addpenalty ultimately adds the correct
+ skip (pr/3073).
+
+ * ltmath.dtx: Fixed potential problem in \[ (pr/3399) +
+ documentation fix (pr/3802).
+
+2005-11-08 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added \ij and \IJ from babel (pr/3771).
+
+2005-09-29 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Fixed blank lines (editor problem).
+
+2005-09-27 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: Fixed a few oversights when making the
+ commands robust.
+
+2005-09-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx: Added \ltx@sh@ft (pr/3469)
+
+ * ltoutenc.dtx: Replace \sh@ft by \ltx@sh@ft (pr/3469)
+
+ * utf8ienc.dtx: Fixed error messages not showing spaces.
+ Added ``else'' clause that got deleted by mistake.
+
+2005-09-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx: small docu update
+
+2005-07-29 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * docstrip.dtx: Added \kernel@ifnextchar.
+
+2005-07-27 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: Changed \mathbf etc. to be naturally robust.
+
+2005-07-13 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Added \textsuperscript and made
+ \DeclareMathSizes allow dimensions in all arguments.
+
+2005-01-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx ( \fnsymbol should use text symbols ):
+ that change made \@fnsymbol too robust (pr/3752)
+
+2004-10-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * vtexfree.txt: added info about *.dfu files (pr/3652)
+
+ * install.txt: added info about *.dfu files (pr/3652)
+
+2004-10-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx: Removed dead code in \@makecol
+
+2004-09-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: \textasciitilde mapping changed (pr/3721)
+
+2004-09-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * sample2e.tex: fixed small glitches in the text (pr/3703)
+
+2004-07-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: environment names incorrectly sorted in
+ index (pr/3615)
+
+2004-05-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: explicitly set catcode of space within utf8.def
+
+2004-05-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * tlc2.err: LaTeX Companion 2ed errata added to distribution
+
+ * inputenc.ins: split utf8 file generation into two parts for OSes
+ with a small limit on open output files
+
+ * utf8ienc.dtx: fixed typo in \ProvidesFile line for ly1enc.dfu
+
+2004-05-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: properly allow \inputencoding in horizontal mode
+ (forgotten to set \catcode of space) (pr/3273)
+
+2004-05-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: Typo in \textquotedblleft (pr/3673)
+
+
+######################
+# 2003/12/01 Release
+######################
+
+2004-02-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx: added \loggingall and \loggingoutput as variant of
+ \tracingall and \showoutput (write only to transcript)
+
+ * manifest.txt: added lppl-1.2.txt to the distribution since we
+ are now at version 1.3
+
+2004-02-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: changed warning text for oldstyle digits
+
+2004-02-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx: docu fix (pr/3620)
+
+2004-02-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx (section*{\indexname}]): Moved setting of \columnsep and
+ \columnseprule later to avoid affecting the wrong page (pr/3616)
+
+2004-02-15 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltspace.dtx
+
+ Added better \nobreakdashes
+
+2004-02-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: fix for \@Esphack forgotten (pr/3498)
+
+2004-02-11 Rainer Sch�pf <latex-bugs@latex-project.org>
+
+ * pict2e.inx/.dtx: Removed.
+
+2004-02-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros for generating index entries}):
+ environment names incorrectly sorted in index (pr/3615)
+
+2004-02-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * utf8ienc.dtx: no newlines in error messages allowed
+ (due to inputenc)
+ space in the wrong place "\count @64"
+ added commands already defined in the kernel (found by BG)
+ added test file pr/3480
+
+2004-02-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: coding change, to follow bug fix by DEK in
+ plain.tex in OT4 (pr/3469)
+
+ * inputenc.dtx: Added ISO 8859-16 Latin10 (pr/3568)
+
+2004-02-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx
+
+ Small fix for \enlargethispage, pr/3528
+
+2004-02-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx
+
+ Tidied up a bit more of the code
+
+2004-02-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * fontdef.dtx
+
+ Many math things made robust
+
+ Added two `bigtriangle synonyms' for compatibility with the
+ stmaryrd symbols package
+
+2004-02-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Added \textbigcircle to OMS
+
+ Fixed bad bug in \DeclareTextSymbol as per Heiko
+ in pr/3563
+
+2004-02-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * Makefiles
+
+ Lots of minor fixes
+
+2004-01-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx (section{Implementation}): internal kernel version
+ of \@ifnextchar used in some places, see next entry (pr/3501)
+
+ * ltdefns.dtx: internal kernel version for \@ifnextchar added
+ to prevent the amsmath package to highjack this command in random
+ places, this is really a bug in amsmath which should finally be
+ fixed there (pr/3501)
+
+2004-01-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltvers.dtx: warning for old latex 5 years grace (pr/3601)
+
+ * latexbug.tex: warning for old latex 5 years grace (pr/3601)
+
+2004-01-23 Rainer Sch�pf <latex-bugs@latex-project.org>
+
+ * fixltx2e.dtx: Replace the double dangerous bend sign by a
+ huge double exclamation mark. This is to mark important
+ bits in the documentation.
+
+2004-01-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltbibl.dtx: Changed error message for \nocite
+
+2004-01-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: Use \ooalign for \k (pr/3532)
+ Added \textogonekcentered (pr/3532)
+ Added composites \k{o} and \k{O} (pr/3532)
+
+2003-12-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpictur.dtx: issue warning if circle size can't be met
+
+ * nfssfont.ins: support for nfssfont.dtx
+
+2003-12-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: fixing a typo in \DeclareInputText recently
+ introduced.
+
+2003-12-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx: Ensure that \@elt has a defined
+ state in \@makecol (pr/3586)
+
+2003-12-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: added support for \MakeShortVerb* as suggested by
+ Hubert Gaesslein <hubertjg@open.mind.de>
+
+2003-12-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * source2e.tex: changed typeout message
+
+2003-11-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: docu changes for latin 4 (pr/3585)
+
+ * ltplain.dtx: docu fixes (pr/3584)
+
+2003-10-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx: Added extra \lccode for \- and \textcompwordmark
+ to allow hyphenation in the remainder of the word
+
+2003-10-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx: docu fixes (pr/3575)
+
+2003-09-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: No hyphenation in first word after float
+ environmentb (pr/3498)
+ Allow \emph to produce small caps
+
+2003-09-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx: removed surplus dot from error message
+
+2003-08-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpictur.dtx (section{Picture Mode}):
+ check for \cs{@linechar} being empty (pr/3570)
+ (subsection{Curves}): added missing displacement (pr/3566)
+
+2003-05-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltbibl.dtx: raise an error is \nocite is used before begin
+ document (until now it simply failed)
+
+2003-05-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: new implementation of textcomp with options and
+ subencodings
+
+2003-05-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: incorporated new definition for \@fnsymbol to use
+ text symbols if available (pr/3400)
+
+2003-04-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: incorporated fix-cm.sty by Walter Schmidt
+
+2003-02-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: added a number of options to textcomp to enable
+ only some characters since most of the chars are ont generally
+ available.
+
+2003-01-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * nfssfont.dtx: added interactive support to allow font spec via
+ nfss classification.
+
+2002-12-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltbibl.dtx (section{Bibliography Generation}):
+ Added \leavevmode in case citation is at start of paragraph (pr/3486)
+
+2002-11-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: Added cp858 (cp850 with euro symbol) (pr/3464)
+
+2002-10-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: coding change for \r{A} in OT1 to follow bug fix
+ by DEK in plain.tex, but it is still a hack!
+ (better solution: do not use OT1 encoded fonts) (pr/3469)
+
+ * ltlists.dtx: Check for math mode when ending a list to
+ give a better error message than "perhaps a missing item" (pr/3437)
+ First change to this part of LaTeX since 1997!
+
+2002-10-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: Added cp1257 (Baltic)
+
+2002-10-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssbas.dtx (section{Macros for setting up the tables}): Adding
+ \LastDeclaredEncoding introduced a bug in
+ \DeclareFontSubstitution. Instead of the real encoding name the
+ token \LastDeclaredEncoding got into the internal lists causing
+ havoc. (pr/3459)
+
+2002-10-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfloat.dtx: Use braces around \itshape to keep font change
+ local in \thempfootnote; bug introduced 7 years earlier
+ (pr/3460)
+
+2002-07-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: Added code 128 (texteuro) for cp1250
+
+2002-07-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: added \texteuro for ansinew (pr/3423)
+
+2002-06-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexbug.tex: actually complained when format are older than 18
+ months (now we accept 30)
+
+ * ltvers.dtx: error message still talked about 1 year old sources
+ being too old (though in fact it is 30 months)
+
+ * ltoutenc.dtx: Corrected \cs{c} for T1 (pr/3442)
+ Added \cs{textbardbl} (pr/3400)
+ Definition of \textexclamdown changed (pr/3368)
+ Definition of \textquestiondown changed (pr/3368)
+ Changed def for \textregistered to avoid small caps (pr/3420)
+
+2002-06-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: added macce (pr/3433)
+ added code points to 1252 (pr/3441)
+
+2002-04-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * oztex.txt: new version added
+
+
+######################
+# 2001/06/01 Release
+######################
+
+2001-08-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx: readded lost catcode setting for space in
+ ProvidesFile (pr/3353)
+
+2001-07-12 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx:
+
+ Added latin9.def (from Karsten Tinnefeld)
+
+2001-07-12 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltnews.cls:
+
+ Added eTeX logo
+
+2001-06-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltvers.dtx: check for old format disabled --- perhaps we have
+ reached the last release of 2e already?
+
+ * inputenc.dtx: Added \textkra, \texttstroke and
+ \textTstroke to latin4 (pr/3336)
+
+ * ltpictur.dtx: Don't warn if \line or \vector command
+ has zero length argument pr/3318
+
+ * fontdef.dtx (subsubsection{Arrows}): Guard against math active
+ = and math active | in \Relbar and \models (pr/3333)
+
+2001-06-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * format.ins: added default cfg files that are simple
+ wrappers for fonttext.ltx, fontmath.ltx, and preload.ltx (pr/3264)
+
+ * fontdef.dtx: added default cfg files that are simple
+ wrappers for fonttext.ltx, fontmath.ltx, and preload.ltx (pr/3264)
+
+2001-06-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx: some docu changes
+
+2001-05-28 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Added \NeedsTeXFormat{LaTeX2e}[2000/06/01] to .def
+ files, pr/3255
+
+ Made compatible T1 and OT1 accents (on i and \i), pr/3295
+
+2001-05-28 Chris Rowley <latex-bugs@latex-project.org>
+
+ * usrguide.tex
+
+ Described short-form for guillemets in T1 encoding, pr/3192
+
+2001-05-28 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltxguide.cls:
+
+ Added some definitions
+
+2001-05-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: extended NEXT encoding (pr/3281)
+ suppress all spaces for horizontal mode (pr/3273)
+
+ * minimal.cls: added \pagenumbering{arabic} to define \thepage
+ (pr/3275)
+
+ * ifthen.dtx: Added \AND, \OR and \NOT as boolean operators as
+ alternative to the lower case versions (pr/3297)
+
+ * ltdirchk.dtx: Explicitly set \endlinechar to 10 (pr/3334)
+
+ * ltclass.dtx: Explicitly set \endlinechar to 10 (pr/3334)
+
+ * classes.dtx: Replaced all tilde chars used with \nobreakspace
+ (pr/3310)
+
+2001-05-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: partly support docstrip's ``verbatim''
+ directive, at least ensure that it can be processed without and
+ error message (pr/3331)
+
+2001-04-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: added missing \section to docu
+
+2001-04-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx (section*{\contentsname): initialize \@tempdima
+ within \l@part so that \numberline can be used pr/3327
+
+2001-04-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews14.tex: added
+
+2001-02-16 Johannes Braams <latex-bugs@latex-project.org>
+
+ * ltxref.dtx (subsection{Cross Referencing}): Added an extra level
+ of grouping to \@newl@bel as suggested in PR3250 by
+ Harald Hanche-Olsen <hanche@math.ntnu.no>
+
+2001-01-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx (subsection{Floats}): reset @newlist flag in output
+ routine (pr/3286). This was done before (pr3231) but the code
+ ended up in the wrong place by mistake.
+
+2001-01-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx: Moved \@mkboth out of heading args for
+ thebibliography and \listof... command as this can fail with the
+ slightly strange definition for \chapter in twocolumn mode (pr/3285)
+
+2000-09-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: for some unknown reason the version of fix2col
+ integrated was not the latest one --- so a number of bugs already
+ corrected crept up again (1.1d fixes those)
+
+ Don't change \setlength if it isn't the kernel default any longer
+
+ \addpenalty fix proposed in 3073 was not sufficient if the command
+ was used when \prevdepth=-1000pt (ie after \nointerlineskip)
+
+2000-09-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx: finally moved emptying \errhelp to a place
+ after its last use (pr/449)
+
+
+######################
+# 2000/06/01 Release
+######################
+
+2000-08-30 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Much editing but no code changes
+
+2000-08-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx:
+
+ Fixed typo in warning message
+
+2000-07-31 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx:
+
+ Changed handling of space above footnotes.
+
+2000-07-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexbug.tex: complain about old LaTeX only after 18 months
+
+ * ltvers.dtx: changed distribution check to yearly distribution
+
+2000-07-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: locally reset \if@newlist so that
+ list structures in head/foot don't interfere with
+ lists in the MVL. internal/3231
+
+2000-07-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews13.tex: update to ltnews13
+
+2000-07-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx: Ensure that rule between column is in \normalcolor
+ (it did depend on the color in the text at the column break!)
+
+2000-07-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx: fix typo in warning message
+
+2000-07-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: ... and another fix for (pr/3170), sigh
+
+2000-07-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: incorporating latin4.def contributed by
+ Hana Skoumalov\'a
+
+ * inputenc.ins: incorporating latin4.def contributed by
+ Hana Skoumalov\'a
+
+2000-06-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Bells and whistles}): extending (or say
+ fixing?) change for (pr/3170)
+
+2000-06-01 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltpage.dtx:
+
+ Changed grouping method in \markboth and \markright
+ (see also pr/3203)
+
+ Less expansion by using token register in \markboth
+ and \markright
+
+2000-05-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx (subsubsection{Declaration commands}):
+ reimplemented \UseTextSymbol and \UseTextAccent to support
+ reference over more than one level (pr/3160)
+
+2000-05-22 Chris Rowley <latex-bugs@latex-project.org>
+
+ * doc.dtx:
+
+ Less obscure wording at start of index? (pr/3202)
+
+ * inputenc.dtx:
+
+ Added latin2 option for textdegree (pr/3207)
+ Updated documantaion
+
+ * ltpage.dtx: reimplementation of \markboth and \markright to
+ avoid problem with expanion at wrong point in time in some cases
+ (pr/3203)
+
+2000-05-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Bells and whistles}): new implementation
+ for \meta command (pr/3170)
+
+2000-05-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx (subsubsection{Parts}): Only add empty page after
+ part if twoside and openright (pr/3155)
+
+ * ltmiscen.dtx: Reset \AtEndDocument for latex/3060
+
+2000-04-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * manifest.txt: ltnews13.tex added
+
+2000-01-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: added \hmode@bgroup as shorthand for
+ \leavevmode\bgroup use \hmode@bgroup...\egroup instead of
+ \leavevmode{...} where applicable in most cases \leavevmode was
+ missing before (pr/3160)
+
+ * ltfntcmd.dtx: use \hmode@bgroup...\egroup instead of \leavevmode{...}
+
+2000-01-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: allow \inputencoding also in hoizontal mode (or rather
+ make it do something there --- it was allowed before (pr/2888))
+
+2000-01-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: fix error message for undefined code points
+ (pr/3158)
+
+######################
+# 1999/12/01 Release
+######################
+
+2000-01-07 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: Disable hyphenation in verbatim even if the font
+ allows it.
+
+1999-12-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews12.tex: final adjustments
+
+1999-12-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews.cls: fixed a curious bug lurking in the class since its
+ beginning: putting a list directly after a paragraph would make the
+ paragraph before(!) the list justified (while the rest of the document
+ was set ragged right)
+
+ * ltnews12.tex: added fixltx2e section
+
+1999-12-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx (subsection{The fontenc package}):
+ Changed \cs{CYRRHOOK} and \cs{cyrrhook} to
+ \cs{CYRRHK} and \cs{cyrrhk} as name changed in the cyrillic
+ bundle for naming consistency with other ``hook'' glyphs.
+
+1999-12-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews12.tex (section{Outcome of TUG '99 (Vancouver)}):
+ added text on TUG 99 and other bits
+
+1999-11-08 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltx3info.tex: Typo corrected.
+
+ * emtex.txt: Correct name of file ltxcheck.tex.
+
+1999-11-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltx3info.tex: fixed typo
+
+1999-10-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx (subsubsection{Declaration commands}):
+ Give \accent@spacefactor a default definition to prevent horrible
+ death in case or incorrect input (pr/3084)
+
+1999-10-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fixltx2e.dtx: added first version
+
+ * manifest.txt: added draft ltnews12.tex
+
+ * inputenc.dtx: removed left over beta test message
+
+1999-10-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: Reset definition of active math ' to
+ \active@math@prime within the output routine.
+
+ * ltmath.dtx: Introduce macro \active@math@prime for the active
+ prime character in math mode.
+
+1999-09-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * usrguide.tex (subsection{Definitions}): show syntax of all
+ declaration commands (pr/3102)
+
+1999-09-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: removed extra change entry.
+
+ * classes.dtx: found two changes entries claiming to have been done
+ in 1955 (exactly 40 years too early :-)
+
+ * makeindx.dtx: fixed two changes entries (arg order wrong)
+
+ * syntonly.dtx: updated changes entry to have four digits years
+
+ * classes.dtx: update of label names in docu
+
+ * ifthen.dtx: make this a proper LaTeXable package
+
+ * pict2e.dtx: make this a proper LaTeXable package (even if not containing code)
+
+ * ltxdoc.dtx: also accept .fdd files in DocInclude (code by M Schroeder)
+
+1999-09-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx: renamed a few labels to support production of general docu
+
+ * ifthen.dtx: changed driver file
+
+1999-09-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: did some spellchecking of docu after noticing
+ a few glaring typos
+
+1999-09-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lppl-1-1.txt: added LPPL 1.1 under this name to the distribution.
+
+ * DEFAULT.pre: updated for LPPL 1.2
+
+ * DEFAULT.hea: updated for LPPL 1.2
+
+ * copyfd.pre: updated for LPPL 1.2
+
+ * copycfg.pre: updated for LPPL 1.2
+
+ * copyins.hea: updated for LPPL 1.2
+
+1999-08-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lppl.txt: fixed minor glitches found by Matt and Eberhard
+ This is probably going to be LPPL 1.2
+
+
+######################
+# 1999/06/01 Release
+######################
+
+1999-07-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lppl.txt: final changes to LPPL 1.1
+
+1999-07-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * updated headers to reflect LPPL 1.1
+ updated legal.txt to say that use of LaTeX is unrestricted
+
+1999-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews11.tex (section{Fontenc package peculiarities}):
+ document the special behaviour of fontenc
+
+ * ltclass.dtx: document that fontenc pretends it wasn't loaded
+
+1999-06-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx (subsection{The fontenc package}):
+ ensure that \@uclclist is extended only once (if at all)
+
+1999-06-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: ensure that fontenc doesn't load encodings from
+ previous calls again (pr/2888)
+
+1999-05-28 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * bugs.txt: Added reference to webcomp.err.
+
+ * readme.txt: Added reference to webcomp.err.
+
+ * manifest.txt: Added reference to webcomp.err.
+
+1999-05-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * webcomp.err: file added
+
+1999-05-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltnews11.tex: updates
+
+1999-05-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cmfonts.ins: removed "fd" guard since never used these days
+
+1999-05-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cmfonts.fdd: docstrip `nowarn' guard was the wrong way around
+ for font OT1/cmr/bx/ui (pr/3036)
+
+1999-04-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx: fixed typo in documentation (pr2973)
+
+1999-04-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx
+
+ Corrected cp852 for pr/2992
+
+ * ltboxex.dtx
+
+ Made robust the flag in \@iiiparbox: pr/2975}
+
+ * ltdefns.dtx
+
+ Fixed new version of \@yargdef: pr/3013
+
+ * usrguide.tex
+
+ Added to documentation of uc/lc list
+
+1999-03-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * doc.dtx: Correct last change.
+
+1999-03-12 Chris Rowley <latex-bugs@latex-project.org>
+
+ * clsguide.tex
+
+ Added to documentation of options
+
+ * cyrguide.tex:
+
+ Further editing
+
+1999-03-08 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * cyrguide.tex: Use \URL command.
+
+ * ltxguide.cls: Added \URL command.
+
+1999-03-04 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * usrguide.tex: Refer to cyrguide.tex.
+
+ * ltxguide.cls: Added \cyrguide.
+
+ * All copyright headers and preambles: updated for lppl.txt.
+
+ * 00readme.txt: Refer to lppl.txt, add new LaTeX books.
+
+1999-03-03 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltxguide.cls:
+
+ Added some definitions
+
+1999-03-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: Remove change from 1999-01-08 internal/2967
+
+ * lppl.txt: minor rewordings after comments from
+ Arnoud Engelfriet and John Hasler.
+
+1999-03-01 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * handbuch.err: Added.
+
+ * install.txt: Add link to truetex.txt and vtex.txt. Remove
+ timings for slow computers.
+
+1999-02-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx: temp fix for pr/2968
+
+1999-02-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx (subsection{The fontenc package}):
+
+ Corrected cyrillic uc/lc list
+
+1999-02-23 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltnews.cls:
+
+ Added some definitions
+
+1999-02-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * legal.txt: refer to LPPL
+
+ * lppl.txt: more fiddling
+
+1999-02-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx: changed \oldstylenums to use \rmdefault instead of
+ cmm hardwired. This doesn't change much in standard cases but allows
+ other font sets to work without redefining \oldstylenums as long as
+ the right .fd files are available (pr/2954)
+
+ * truetex.txt: Updated version.
+
+1999-02-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * letter.dtx: Reset footnote counter for every new letter (PR
+ 2957).
+
+1999-02-09 Chris Rowley <latex-bugs@latex-project.org>
+
+ * cyrguide.tex:
+
+ Major editing (new file)
+
+ * usrguide.tex (section{Commands}):
+
+ Updated
+
+ * minimal.cls:
+
+ Small reordering to better support the documented method of use
+
+ * cfgguide.tex (section{System configuration}):
+
+ Clarification and emphasis changed re fontdef.dtx cfgs
+
+1999-02-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: catch \newcommand[10] or \newcommand[X]
+
+1999-02-05 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cyrguide.tex: small updates
+
+1999-01-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: new go faster \newcommand implementation /2942.
+
+1999-01-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fntguide.tex (subsection{Selection commands}): added documentation
+ for \linespread (pr/2891)
+
+ * ltnews10.tex: updates
+
+ * ltoutenc.dtx: Simplified solution for pr/2930
+
+1999-01-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: two more \long in \@ifnextchar for latex/2902
+
+1999-01-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fntguide.tex (subsection{Encoding definition file commands}):
+ Added documentation about \LastDeclaredEncoding
+
+1999-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ifthen.dtx: \isundefined for /2824
+
+ * latexbug.tex: cyrillic
+
+ * latexbug.el: cyrillic
+
+1999-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: add extra braces and \long declartions so
+ [{]}] and [\par] work. latex/2896.
+
+1999-01-07 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * bugs.txt: Added description how to follow up a problem report.
+
+ * latexbugs.tex: Added description how to follow up a problem
+ report.
+
+ * classes.dtx: Added check of @noskipsec switch in \part for
+ article class.
+
+1999-01-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: Hackery to support reading in fontenc.sty several
+ times (really the wrong interface and needs changing)
+
+ Hackery to support cyrillic uc/lc update --- that will definitely go
+ somewhere else in a later release
+
+1999-01-06 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * emtextds.txt: Added to distribution. Installation procedure for
+ Walter Schmidt's emTeX/TDS for OS/2.
+
+ * ltoutenc.dtx: Minor documentation fix (PR 2939).
+
+1999-01-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssbas.dtx: Added \LastDeclaredEncoding to support cyrillic
+ integration (pr/2988)
+
+ * ltoutput.dtx: Added negative vskip, as when processing outputbox
+ as suggested by Fred Bartlett pr/2892
+
+ * classes.dtx: Check \if@noskipsec in \part see pr/2889
+
+ * ltoutenc.dtx: New impl of \@text@composite and \@text@composite@x
+ (pr/2930)
+
+1999-01-05 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * fontdef.dtx: Need special protection for character
+ \texttt{\char62} in \cs{changes} entry, as this is the makeindex
+ actualchar.
+
+1998-12-28 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * doc.dtx: The case-changing trick in the definition of
+ \short@macro didn't work, as the category code was changed inside
+ the macro replacement text, not during the definition.
+
+1998-12-27 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * doc.dtx (subsection{Macros for generating index entries}): Use
+ \string, not \protect in argument of \special@index.
+
+1998-12-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros for generating index entries}):
+ Correctly handle second index entry for \SpecialMainEnvIndex
+ by using \special@index not \index (pr/2928)
+
+1998-12-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * nfssfont.dtx: cosmetic change: \documentstyle -> \documentclass
+ Program still would need a major user interface upgrade
+ ... one day (pr/2915)
+
+1998-11-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lttab.dtx: prevent an endless loop from incorrect input like
+ \begin{tabular}{l|l{11.5cm}} (pr/2884)
+
+1998-09-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: added \string to definition of \a so that \a'
+ works even if ' is active at that time (pr/2878)
+
+ * classes.dtx: redefine \thesection, \thechapter and \@chapapp
+ globally (using \gdef) in \appendix so that these redefinitions
+ survive even if \appendix is used within an environment such as
+ multicols
+
+1998-09-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cfgguide.tex (section Configuration files for
+ standard packages and classes]):
+ added info about ltnews.cfg (pr/2875)
+
+ * ltoutenc.dtx: Explicitly set \spacefactor after \accent in
+ OT1 type accents like \`A (pr/2877)
+
+1998-08-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * doc.dtx: Correction for PR 2563: doc.dtx produces incorrect
+ index entries for some single character control sequences
+ (like <).
+
+1998-08-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * (Various source files): Replaced old form `commandname by
+ \cs{commandname} in changes entries.
+
+ * (Various source files): Replaced \cmd{\commandname} by
+ \cs{commandname} in changes entries.
+
+ * ltfssdcl.dtx: Corrected documentation glitch in changes entry.
+
+ * ltmiscen.dtx: Corrected documentation glitch in changes entry.
+
+ * latexsym.dtx: Corrected documentation glitch in changes entry.
+
+1998-08-01 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx (section{Announcing the files}):
+
+ Corrected version number
+
+1998-07-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: give better error message if source document contains
+ a character which is not defined by current input encoding (pr/2845)
+
+######################
+# 1998/06/01 Release
+######################
+
+1998-06-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * clsguide.tex (subsection{Identification}): Explicitly warn that
+ the optional date argument of \Provides... must be in the format
+ yyyy/mm/dd and will produce low-level errors otherwise
+
+1998-06-17 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx:
+
+ Spanish ords changed to text chars, pr/2579
+
+ Fixed typo in `next'
+
+ * lttab.dtx:
+
+ Enhanced documentation
+
+ * ltoutenc.dtx:
+
+ Fixed \textcircled
+ Fixed wrong code in \t
+ Added masc/fem ords defaults
+ Swapped acutedbl and gravedbl in TS1
+ Renamed macron in TS1
+
+ * pict2e.dtx:
+
+ Wording changed, and "documentation"
+
+1998-06-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * slifonts.fdd: fix provides files for T1* (Bernard Gaulle)
+
+1998-06-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltboxes.dtx: support calc expressions in \rule command
+ (that one was forgotten or so it seems)
+
+1998-05-26 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx:
+
+ Set-up lccodes (and uccodes) before reading in
+ hyphenation files
+
+1998-05-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (section{The Description of Macros}):
+ reinit ^^A as comment char at beginning of document to allow use
+ of inputenc with doc since inputenc disables ^^A (pr2581)
+
+1998-05-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews09.tex more text
+
+1998-05-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros surrounding the `definition parts'}):
+ small change that defers freezing of \MacroFont until after the
+ preamble so that people can change its definition in the preamble.
+ As we have been on 1.9z this is now 2.0a but it isn't really
+ something exciting ... :-)
+
+ * ltxref.dtx: added documentation about extending the
+ \ref mechanism as suggested in pr2801
+
+ * ltcounts.dtx: small documentation updates
+
+1998-05-13 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltspace.dtx:
+
+ Documented lots of bugs and problems with the present code,
+ and even some solutions
+
+ * latex209.dtx:
+
+ Added experimental long typeout about abuse of
+ compatibility mode to possibly avoid prs like 2807
+
+1998-05-13 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * lttab.dtx Use \setlength to set size of p-column and for
+ argument of tabular* environment, so that the benefits of the
+ calc package apply.
+
+1998-05-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * letter.dtx: removed space at the right of address (pr2794)
+
+1998-05-09 Chris Rowley <latex-bugs@latex-project.org>
+
+ * classes.dtx:
+
+ Reverted openany change to \mainmatter
+
+1998-05-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Modify option clash error help message. latex/2805
+
+1998-04-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx (IMPORTANT NOTICE): renamed \orginaldefault to
+ \originaldefault
+
+1998-04-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx: some fixes for pr2662
+
+1998-04-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fntguide.tex: explain new \DeclareMathDelimiter syntax (pr2662)
+
+1998-04-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx: use new \DeclareMathDelimiter syntax (pr2662)
+
+ * ltfssdcl.dtx: allow \DeclareMathDelimiter to always use 6 args
+ (pr2662)
+
+1998-04-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx: added \mathring accent (pr2785)
+
+1998-04-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * distrib.txt: Update from 1994 version with a view to adding
+ to june release, better late than never.
+
+ * docstrip.dtx: CHANGE to default header placed on extracted
+ files, to allow extracted files to be distributed as long as
+ sources also distributed. This does not affect any .ins files that
+ explicitly set a preamble with the docstrip \preamble or
+ \usepreamble commands. If you currently distribute a package and
+ want to keep the old preamble, add \usepackage\originalpreamble
+ to your .ins files. Note that the old text forbids inclusion of
+ the package on `ready to run' TeX distributions such as TeXLive
+ or tetex.
+
+
+
+1998-04-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * distrib.txt: Update from 1994 version with a view to adding
+ to june release, better late than never.
+
+ * docstrip.dtx: CHANGE to default header placed on extracted
+ files, to allow extracted files to be distributed as long as
+ sources also distributed. This does not affect any .ins files that
+ explicitly set a preamble with the docstrip \preamble or
+ \usepreamble commands. If you currently distribute a package and
+ want to keep the old preamble, add \usepackage\originalpreamble
+ to your .ins files. Note that the old text forbids inclusion of
+ the package on `ready to run' TeX distributions such as TeXLive
+ or tetex.
+
+1998-03-30 David Carlisle <latex-bugs@latex-project.org>
+
+1998-03-30 David Carlisle <latex-bugs@latex-project.org>
+
+1998-03-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cmfonts.fdd: added substiution for cmss/bx/sc to produce
+ cmr/m/sc; much better would be to have the real thing ---
+ anybody cares to contribute those to the ec fonts? (pr2586)
+
+1998-03-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * bugs.txt: say that reports have to be in English
+
+ * ltoutenc.dtx: Documentation added about removing declaration
+ of encoding specific commands (pr/2783)
+ Command \UndeclareTextCommand added (pr/2783)
+ Added \UndeclareTextCommand declarations to textcomp.sty (pr/2783)
+
+ * ltdefns.dtx: \@thirdofthree added for \UndeclareTextCommand
+
+1998-03-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: Added documentation about the best order of
+ declarations for encoding specific commands.
+ Also moved loading ofts1enc.def after declaring the defaults
+ for such reasons.
+
+1998-03-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * bugs.txt: added info about not changing established (mis)behavior
+
+1998-03-11 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * miktex.txt: Added to distribution.
+
+1998-02-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: fixed typo iso-8859-5 should have been iso-8859-9
+ (pr/2748)
+
+1998-01-31 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltx3info.tex:
+
+ Updated
+
+1998-01-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * install.txt: small updates such as isbn numbers
+
+1998-01-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx: adding \nopreamble and \nopostamble
+ and making sure that \usepreamble\empty really doesn't write
+ anything to the stripped file (pr/2726)
+
+ * ltclass.dtx: make \& locally safe in \ProvidesFile /2702
+ fix up pkgindoc.sty which probably hasn't worked since
+ {v1.0p}{1995/05/25}{Delete \cs{filec@ntents} after preamble}
+
+1998-01-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Fix \t for latex/2734.
+
+ * ltclass.dtx: make \& locally safe in \ProvidesFile /2702
+ fix up pkgindoc.sty which probably hasn't worked since
+ {v1.0p}{1995/05/25}{Delete \cs{filec@ntents} after preamble}
+
+1998-01-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Fix \t for latex/2734.
+
+1998-01-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * multitex.txt: New version from Markus Kohm latex/2721
+
+1998-01-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * multitex.txt: New version from Markus Kohm latex/2721
+
+1998-01-10 Chris Rowley <latex-bugs@latex-project.org>
+
+ * cmfonts.fdd:
+
+ Added large sizes for ec fonts only
+ Removed long lines
+
+######################
+# 1997/12/01 Release
+######################
+
+1998-01-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: added missing braces and \upshape for \textcircled
+
+1998-01-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * emtex.txt: small clarification as suggested by Heinz
+
+1997-12-31 Chris Rowley <latex-bugs@latex-project.org>
+
+ * fntguide.tex:
+
+ Corrections to math font declarations
+ Tidying
+ Added new encoding information
+
+ * ltoutenc.dtx:
+
+ Documentation correction
+
+1997-12-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * grphcomp.err: added further errate entries, updated cls file
+
+1997-12-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx: fixed header info for textcomp.sty
+ (missing \ProvidesPackage)
+
+1997-12-22 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Added textcomp package
+ Corrections and additions to documentation
+ Removed all octal and hex codes
+ Added \textperthousand and \textpertenthousand to T1
+ Added \leavevmode at start of \c in T1
+
+ * inputenc.dtx
+
+ Made next encoding consistent with others
+ Consistently used math-or-text command when
+ available: THIS MAY CHANGE
+ Changed \mathdegree to \textdegree
+ \inputencoding now works only in vmode
+ Temporarily fixed \IeC
+ Merged latin1 code with ansinew/cp1252
+ Changed `\k{}' to `\k\ '
+ Added textcomp package
+ Corrections and additions to documentation
+
+ * fontdef.dtx
+
+ Added documentation
+
+ * ltnews08.tex
+
+ Added stuff
+
+1997-12-18 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * doc.dtx: Fix small documentation glitch.
+
+ * ltpatch.ltx: Replace reference to ,,June'' release by ,,last''
+ release.
+
+1997-12-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: expl3
+
+ * latexbug.el (ltxbug-categories): expl3
+
+1997-12-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * fntguide.tex: Removed obsolete \setbox construct.
+
+1997-12-15 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * clsguide.tex (section{Upgrading \LaTeX~2.09 classes and
+ packages}): Added documentation for \if@compatibility switch
+ (supplied by Barbara Beeton).
+
+1997-12-11 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * usrguide.tex (subsection{\LaTeXe---The new \LaTeX~release}):
+ Improved the sentence about formerly separate formats.
+
+ * ltoutput.dtx: Documentation fixes.
+
+ * ltlogos.dtx: Documentation fix.
+
+1997-12-06 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx (subsection{Floats}):
+
+ Removed incorrect error code in \output
+
+ * ltnews08.tex:
+
+ Revised text
+
+ * ltnews.cls:
+
+ Added definition environment
+
+1997-11-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Use \textperthousand not \textpermill. /2673
+
+ * ltoutenc.dtx: Use \textperthousand, \textpertenthousand and
+ \textfractionsolidus not \textpermill, \textpertenmill and
+ \textfraction. /2673
+
+1997-11-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: inline \stepcounter /2669/2661
+
+1997-11-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: reindent \@xtryfc and friends (no code change).
+
+ * ltfloat.dtx: missing percent in @footnotetext. /2670
+
+1997-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * manifest.txt: ltnews08
+
+ * ltnews08.tex: first attempt.
+
+ * source2e.tex: ltcounts and ltlength before NFSS /2669/2661
+
+ * format.ins: ltcounts and ltlength before NFSS /2669/2661
+
+1997-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * compan.err: rewrote that file to be processable by LaTeX
+
+ * grphcomp.err: rewrote that file to be processable by LaTeX
+
+1997-11-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: Fix \DeclareSymbolFont so it updates \group@list
+ for latex/2661.
+ Remove duplicate (unused) definition of \stepcounter.
+ Add a few macro envs to the documentation.
+
+1997-11-03 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ifthen.dtx: Documentation fix.
+
+1997-10-28 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: Minor documentation fixes.
+
+1997-10-23 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltoutenc.ins: Unpack ts1enc.def.
+
+1997-10-21 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfssbas.dtx: Added \makeatletter to \nfss@catcodes (and removed
+ it from \try@load@font@shape).
+
+ * ltdefns.dtx: Change \renew@command to use \begingroup/\endgroup
+ for grouping, to avoid generation of empty math atoms.
+
+1997-10-20 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Removed \aa and \AA from \@uclclist as these are
+ macros.
+
+ * slifonts.fdd(ullasy.fd): Removed superfluous pair of braces at
+ end of \DeclareFontFamily command.
+
+1997-10-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx: Moved check for vertical mode from
+ \DeclareTextFontCommand to \check@nocorr@.
+
+1997-10-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: back out \today change.
+
+ * install.txt: --release--date--goes--here--
+
+ * ltpatch.ltx: --release--date--goes--here--
+
+ * patches.txt: --release--date--goes--here--
+
+ * Makefile: install.txt patches.txt ltpatch.ltx
+ --release--date--goes--here--
+
+1997-10-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Check for text before or after \end{filecontents}
+ latex/2636
+
+1997-10-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * classes.dtx(\l@part): Removed setting of \@tempdima as
+ this macro does not use \numberline to set the toc line.
+
+1997-10-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: renamed \perthousand to \textpermill as this is the
+ TS1 name (and it wasn't available before) (pr/2622)
+ added code page 1250 (pr/2515)
+
+1997-10-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: Move expansion of \today here from document class
+ files. latex/2620
+
+ * classes.dtx: use \def not \edef for \today. latex/2620
+
+1997-10-08 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltlogos.dtx: Simplified macro \LaTeX: use only \check@mathfonts
+ to force loading of fonts suitable for the letter `A'.
+
+1997-10-06 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltcounts.dtx: Replaced \@Roman by a new version that is fully
+ expandable, so that the correct sequence of letters is written to
+ files.
+
+1997-09-30 Johannes Braams <latex-bugs@latex-project.org>
+
+ * slides.dtx (subsection{Date}): Use \edef to define to
+ in order to save space; following change to classes.dtx, dated
+ 1995/08/16.
+
+ * letter.dtx (subsection{Date}): Use \edef to define to
+ in order to save space; following change to classes.dtx, dated
+ 1995/08/16.
+
+1997-09-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpictur.dtx: warn if \line etc is too small to get printed.
+ (pr/2524)
+
+1997-09-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx: Use \begingroup \endgroup instead of { ... }
+ to avoid generating math ords if used in math mode. (pr/2573)
+
+1997-09-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * inputenc.dtx: added decmulti input encoding for DEC Multinational
+ Character Set (pr/2599)
+
+1997-08-19 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * inputenc.dtx(latin2.def,cp852.def): Replaced \dh and \DH by \dj
+ and \DJ.
+
+ * inputenc.dtx(ansinew.def): Exchanged codes for \textendash and
+ \textemdash.
+
+ * inputenc.dtx: Enclosed all encoding definition files by
+ \makeatletter/\makeatother.
+
+1997-08-15 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.dtx: Added initialization of \leftmargin to \@listi
+ (obviously forgotten and never noticed before).
+
+1997-08-05 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Corrected order of arguments in \UseTextSymbol
+ example (PR latex/2572).
+
+1997-07-31 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * cfgguide.tex: Put braces around argument of \sffamily,
+ to keep latex2html happy.
+
+1997-07-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx: support compiling docstrip without statistics
+ (pr/2429)
+
+ * fntguide.tex: documentation updates (pr/2550)
+
+1997-07-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.el: Use default name and address from user-...
+ and make current directory setting more robust.
+ Both fixes from Andreas Schwab, latex/2547.
+
+1997-07-15 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * manifest.txt: Replaced slides.fdd by slifonts.fdd.
+
+ * ec.ins: Replaced slides.fdd by slifonts.fdd.
+
+ * slides.ins: Replaced slides.fdd by slifonts.fdd.
+
+ * slides.fdd: Renamed to slifonts.fdd, there is a name clash with
+ slides.dtx when run through LaTeX.
+
+ * truetex.txt: New version by Richard Kinch.
+
+1997-07-09 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * classes.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * doc.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * exscale.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * fontdef.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ifthen.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * inputenc.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * latex209.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * latexsym.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * letter.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltboxes.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltclass.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltdirchk.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * lterror.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltfinal.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltfloat.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltfssbas.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltfssdcl.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltfssini.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltfsstrc.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltlists.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltmath.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltoutenc.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltoutput.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltpictur.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltplain.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltsect.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * ltxdoc.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * makeindx.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * newlfont.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * oldlfont.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * slides.dtx: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * cmextra.ins: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * clsguide.tex: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+ * lablst.tex: Documentation fixes by Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+######################
+# 1997/06/01 Release
+######################
+
+1997-06-17 Chris Rowley <latex-bugs@latex-project.org>
+
+ * fntguide.tex:
+
+ Changed information about fontname
+ .fd filenames to lowercase
+ Removed long lines, and a few typos
+
+1997-06-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * emtex.txt: Updated by Heinz Kusnier.
+
+ * web2ctex.txt: Updated by David Outteridge.
+
+ * manifest.txt: Added truetex.txt.
+
+ * truetex.txt: New file by Richard Kinch.
+
+1997-06-16 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx (section{Introduction}): Documentation fix.
+
+ * ltdirchk.dtx: Documentation fixes.
+
+ * exscale.dtx: Documentation fix.
+
+ * classes.dtx: Documentation fixes.
+
+ * ltfloat.dtx: Documentation fix.
+
+ * alltt.dtx: Documentation fixes.
+
+1997-06-11 Chris Rowley <latex-bugs@latex-project.org>
+
+ * readme.txt:
+
+ Added information re ltnews files
+
+ * usrguide.tex:
+
+ Updating information: fonts, addresses, CD-ROMs
+
+ * clsguide.tex:
+
+ Added information: normalsfcodes, policy on chnages
+ to standard styles
+
+1997-06-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxcheck.tex: Change texts referring to dc/ec fonts.
+ internal/2513
+
+ * latexbug.tex: Fix save stack problem, internal/2514, and
+ other minor improvements.
+
+1997-06-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * cmfonts.fdd: add bold sc fonts for latex/2497
+
+1997-05-26 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.fdd: Removed spaces in and around arguments to
+ \DeclareFontShape.
+
+ * cmfonts.fdd: Removed spaces in and around arguments to
+ \DeclareFontShape and \EC@family.
+
+1997-05-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltlogos.dtx: Added \m@th to definition of \LaTeXe so that
+ the logo works with non-zero values of \mathsurround.
+
+ * ltfsstrc.dtx (section{Handling Options}): Replaced \\ by
+ \MessageBreak in Option `pausing' (suggested by Donald Arseneau).
+
+1997-05-10 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx:
+
+ Corrected typo in cp852.def
+
+1997-05-08 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.ins:
+
+ Split up \generate for PC
+
+1997-05-07 Chris Rowley <latex-bugs@latex-project.org>
+
+ * inputenc.dtx:
+
+ Added latin3.def
+ Some rearrangments
+ Removed long lines
+
+ * ltspace.dtx
+
+ Made \newline robust
+
+ * ltoutenc.dtx
+
+1997-04-30 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * inputenc.ins: Added generation of latin5.def.
+
+ * inputenc.dtx: Latin5 encoding added.
+
+1997-04-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltbibl.dtx: add \@empty to \@citex for latex/2432.
+
+1997-04-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * cmextra.ins: Remove concrete fd file generation.
+
+1997-04-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * usrguide.tex: bm package.
+
+1997-04-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * letter.dtx: remove hidden math from itemize labels latex/2419
+
+ * ltnews07.tex: first draft.
+
+1997-04-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * texpert.txt: default install uses ec.
+
+ * install.txt: default install uses ec.
+
+ * readme.txt: 1997/06/01
+
+ * unpack2e.ins: include ec.ins not newdc.ins by default.
+
+ * ltpatch.ltx: 1997/06/01
+
+ * patches.txt: 1997/06/01
+
+ * Makefile: 1997/06/01
+
+1997-04-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: normalsfcodes latex/2404 (from patch file)
+
+ * ltfiles.dtx: \normalsfcodes latex/2404 (from patch file)
+
+1997-03-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * amiweb2c.txt: update from Andreas Scherer.
+
+1997-03-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltcounts.dtx: Use \mathsection and \mathparagraph in \fnsymbol
+ latex/2445
+
+ * inputenc.dtx: Use decimal rather than hex to avoid active
+ character problems. latex/2451
+
+1997-02-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * cmfonts.fdd: typo fixed in ot1cmvtt \ProvidesFile latex/2394
+
+ * slides.fdd: typo fixed in cccsc10 latex/2395
+
+1997-02-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * patches.txt: patch level 1
+
+ * ltpatch.ltx: /2414 fix.
+
+ * ltlists.dtx: Support \noindent after \item. latex/2414
+
+1997-02-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * doc.dtx (subsection{GetFileInfo}): missing % latex/2404.
+
+ * ltpatch.ltx: had to happen.
+
+ * ltclass.dtx: missing % in last g@addto@macro change.
+
+######################
+# 1996/12/01 Release
+######################
+
+1997-01-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * install.txt: ec fonts.
+
+ * ltnews06.tex: ec fonts.
+
+ * ec.ins: add slitex fonts
+
+ * slides.fdd: ec fonts.
+ lowercase fd file \input.
+
+ * ltxcheck.tex: ec fonts.
+
+1997-01-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * manifest.txt: ec.ins.
+
+ * Makefile: ec.ins.
+
+ * ec.ins: new file. Alternative to newdc.ins
+
+ * cmfonts.fdd: Add ec fonts
+
+1997-01-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * fontdef.dtx: Use \DeclareMathDelimiter and \DeclareMathSymbol
+ On remaining cases using primitive assignments.
+
+ * ltfiles.dtx: reset \deadcycles in \include for latex/2365.
+
+ * ltmath.dtx: Remove spurious space tokens from \root.
+ General cleanup of the docs, lots of macro envs added.
+
+1997-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * letter.dtx: modify \\ in \startbreaks for /2341.
+
+1997-01-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews06.tex: minor edits.
+
+1996-12-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltsect.dtx: \nobreak added to \@dottedtocline for latex/2343
+
+1996-12-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * modguide.tex: Fix spelling for latex/2345
+
+1996-12-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Use \begingroup so \g@addto@macro does not make
+ a \mathord.
+
+1996-12-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * docstrip.dtx: Fix for /2340 (From Marcin).
+
+1996-12-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx: Call \@setminpage if needed. latex/2318.
+ General doc improvements (add macro envs, indent code, etc).
+
+1996-12-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * fontdef.dtx: ***
+
+ * ltfssini.dtx: ***
+
+ * ltvers.dtx: ***.
+
+ * ltdirchk.dtx: Remove *** from messages. internal/2338.
+
+1996-11-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: documentation changes.
+
+ * ltvers.dtx: Check for old format modified again. /2319
+
+1996-11-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews06.tex: document fd file change.
+
+1996-11-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: change documentation of release schedule /2319
+
+ * ltvers.dtx: Check for old format modified. /2319
+
+ * ltxcheck.tex: lowercase fd and *enc.def filenames. /1044
+
+ * fontdef.dtx: lowercase fd and *enc.def filenames. /1044
+
+ * slides.fdd: lowercase fd file names. /1044
+
+ * latexsym.dtx: lowercase fd file names. /1044
+
+ * latexsym.ins: lowercase fd file names. /1044
+
+ * slides.ins: lowercase fd file names. /1044
+
+ * cmfonts.fdd: lowercase fd file names. /1044
+
+ * cmextra.ins: lowercase fd file names. /1044
+
+ * newdc.ins: lowercase fd file names. /1044
+
+ * olddc.ins: lowercase fd file names. /1044
+
+ * cmfonts.ins: lowercase fd file names. /1044
+
+ * ltoutenc.ins: lowercase fd and *enc.def file names. /1044
+
+ * ltoutenc.dtx: lowercase fd and *enc.def file names. /1044
+
+ * ltfssbas.dtx: lowercase fd file names. internal/1044
+
+1996-11-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmath.dtx: Reinstate \ensuremath as \long /2104.
+
+1996-11-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: resend patch from Sept 11
+
+ Added ts1enc.def (but it is not unpacked)
+ Changed copyright, underscore (\_) and registered
+ Added \leavevmode to compwordmark
+ Added hex index tabs (experimental)
+
+1996-11-05 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx
+
+ Added standard nobreak check to the write used for \nofiles case
+
+1996-11-04 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltlists.dtx
+
+ Added test for no \item between an inner and
+ outer list
+
+ * ltplain.dtx:
+
+ Use \hbox to in \dotfill
+
+
+1996-11-04 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * lterror.dtx (autoload version): Move \@nodocument into kernel,
+ so that it can be \let to \relax in \begin{document}.
+
+1996-11-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * docstrip.dtx: Change MW address.
+
+ * cmfonts.ins: split up \generate (again) for PC.
+
+1996-10-31 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx
+
+ Added \lccode for \oe in OT1
+
+ * classes.dtx:
+
+ Changed numbering of figures, tables and equations outside chapters
+ in book and report (pr/2178)
+
+ Removed math-mode from itemize labels
+
+ * ltspace.dtx
+
+ Reimplemented \(no)linebreak
+ Reimplemented \\ and \newline
+
+ * ltsect.dtx:
+
+ Documentation changes
+
+1996-10-28 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Removed defs of \aa \AA
+ Removed \@strip@args (no longer used)
+ Corrected documentation
+
+ * inputenc.dtx
+
+ Added cp865.def
+ Added \textasteriskcentered
+ Removed \aa \AA as internal forms
+ Other minor additions and corrections to .def files
+
+ * ltplain.dtx
+
+ Removed math from \dotfill
+ Added \aa and \AA
+ Updated and corrected documention
+
+1996-10-25 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltlists.dtx:
+
+ Added explicit flag resetting to \endtrivlist
+
+ * ltoutput.dtx
+
+ Added documentation
+
+1996-10-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx:
+
+ Added local settings of flags in
+ \@arrayparboxrestore: dangerous!
+ Used \@setminipage in minipages
+
+ * ltfloat.dtx:
+
+ Prevent floats in preamble
+ \@setnobreak no longer used in resets (but see above)
+
+ * ltoutput.dtx
+
+ Changes when nobreak is true
+ Prevent \twocolumn in preamble
+ Added error code to \newpage
+
+1996-10-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: Remove redefinion of \Ask and add \askonceonly
+ (which is the same thing, but looks nicer).
+
+ * docstrip.dtx: Change MDW's address. Add \askonceonly.
+
+1996-10-23 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltlists.dtx
+
+ Use \setboz\z@ to remove parindent in \@item
+ Set \clubpenalty correctly in \@item
+ Do not reset \@nobreak unconditionally
+ Added documentation
+
+ * ltsect.dtx
+
+ Use \setboz\z@ to remove parindent in \@xsect
+ Added documentation
+
+1996-10-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * docstrip.dtx: Delay setting the `current directory syntax'
+ commands so that a configuration file can reset them if
+ necessary.
+
+1996-10-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * autoload.ins: add \usedir
+
+1996-10-21 Chris Rowley <latex-bugs@latex-project.org>
+
+ * lttab.dtx
+
+ Small change in tabbing to make the later change in items
+ (see pr/2211) work properly
+
+ Moved some code \@array, to make this environment more robust
+ (pr/2183), uncovering an interesting feature of the original
+ code; changed to use \set@typeset@protect
+
+ Made \multicolumn \long
+
+1996-10-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * Makefile (DSTS): add format.ins
+
+ * manifest.txt: add format.ins
+
+1996-10-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ds/docstrip.dtx: merge in Marcin's latest.
+ More DPC changes:
+ Make missing batchfile an error
+ Change name of config file to docstrip.cfg.
+ Add \endbatchfile.
+ Change all the .ins files for new style.
+
+1996-10-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ds/docstrip.dtx: Add initex support, and
+ auto setting of \batchfile from \jobname to the new
+ `TDS' version from Marcin.
+
+1996-10-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * manifest.txt: Add ltxcheck.tex
+
+1996-10-08 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx
+
+ Fixed bug in \text.. commands (pr/2157)
+
+1996-10-05 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx
+
+ Added setting of \@clubpenalty
+
+ * classes.dtx (chapter*{\bibname):
+
+ Added setting of \@clubpenalty
+
+1996-10-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * Makefile: remove testdist.dtx, add ltxcheck.tex
+
+ * unpack2e.ins: Remove \testdistribution. internal/2251
+
+ * ltxcheck.tex: New version independent of ltdirchk
+ Add checking for files `unpacked; during LaTeX install.
+
+ * ltdirchk.dtx: Remove ltxcheck.tex. internal/2251
+
+ * Makefile: 1996/12/01.
+
+ * ltclass.dtx: Reset \@unprocessedoptions in
+ \RequirePackageWithOptions for internal/2269.
+
+1996-09-29 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltsect.dtx
+
+ Added documentation
+
+ * ltfiles.dtx
+
+ Added disabling of \@nodocument to \document
+ Tidied up documentation
+
+ * ltoutput.dtx
+
+ Checks for noskipsec and inlabel added to \newpage
+
+ * ltmiscen.dtx:
+
+ Moved \@xobeysp to ltspace.dtxx
+
+ * ltspace.dtx
+
+ Added \@xobeysp linked to \nobreakspace
+
+1996-09-26 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * cmfonts.ins: Added guard `nowarn' to generation of OT1cmtt.fd
+ file, to avoid annoying substitution messages if a bold typewriter
+ font is selected (as, for example, in section headings).
+
+ * newdc.ins: Added guard `nowarn' to generation of T1cmtt.fd file,
+ to avoid annoying substitution messages if a bold typewriter font
+ is selected (as, for example, in section headings).
+
+ * cmfonts.fdd (subsubsection{Computer Modern Typewriter}), Added
+ silent substitutions for T1 bold extended typewriter fonts (new
+ version).
+
+1996-09-21 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx:
+
+ Change to using \@parboxrestore in \@outputpage
+
+1996-09-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * classes.dtx: Quote > in changes entry (from 1994/10/29:-)
+ as it is special due to setting in gglo.ist.
+
+1996-09-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Fix loop for latex/2257
+
+1996-09-09 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx, letter.dtx, slides.dtx (subsubsection{Itemize}):
+ replace \endash with \textendash (stupid typo)
+
+1996-08-25 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsubsection{Itemize}): Replaced -- with \endash
+ in the definition of \labelitemii. (saves a token)
+
+ * slides.dtx (subsubsection{Itemize}): Replaced -- with \endash
+ in the definition of \labelitemii. (saves a token)
+
+ * ltpatch.ltx: Add the characters ', `, and " to \nfss@catcodes as
+ they might be active while LaTeX processes an .fd file.
+
+ * ltfssbas.dtx (subsection{Macros for loading fonts}): Added the
+ characters ', `, and " to \nfss@catcodes as they might be active
+ while LaTeX processes an .fd file.
+
+1996-08-24 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Itemize}): Replaced -- with \endash
+ in the definition of \labelitemii. (saves a token)
+
+1996-08-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: swap mathordxxx in cp850. latex/2203
+
+1996-07-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssbas.dtx:
+ definition of if@inmath switch removed (see below)
+
+ * ltfsstrc.dtx:
+ removed if@inmath switch and replaced with inline code
+ \init@restore@glb@settings saving space macro names and
+ execution time
+
+ * ltfssdcl.dtx:
+ removed ifrestore@version switch and replaced with inline
+ code \init@restore@version
+
+1996-07-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx:
+ make third arg of \@reargdef implicit
+ replace {} args by \relax
+ use \noexpand instead of \string in error message
+
+ * ltoutput.dtx:
+ set if@test always globally
+ add some missing percent signs in \clearpage
+
+ * ltboxes.dtx:
+ set if@minipage always globally
+
+ * ltmath.dtx:
+ set if@ignore always globally
+
+ * ltmiscen.dtx:
+ set if@ignore always globally
+ add user command \ignorespacesafterend to be used in env defs
+
+ * ltfloat.dtx:
+ set if@nobreak always globally
+ set if@minipage always globally
+
+ * ltspace.dtx:
+ fix typo in doc.
+ set if@nobreak always globally
+
+ * ltlists.dtx:
+ set if@nobreak always globally
+ set if@minipage always globally
+
+ * ltsect.dtx:
+ set if@nobreak always globally
+
+ * ltclass.dtx:
+ made \@classoptionslist and \@unusedoptionlist only preamble
+ to save space
+
+ * ltfssbas.dtx:
+ removed unnecessary \relax (6 times) in \nfss@catcodes
+ use faster \if$#3$ test in \@DeclareMathsizes
+
+ * ltalloc.dtx:
+ don't set a default for @tempswa -- nobody can rely on that
+
+ * ltplain.dtx:
+ removed setting of \vsize and \hsize (done later)
+ changed \dimen\z@ to \dimen@ to save space (and time)
+
+1996-07-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * patches.txt: latex/2197
+
+ * ltpatch.ltx: Use char0 not @ for \lowercase trick: latex/2197
+
+ * ltoutenc.dtx: Use char0 not @ for \lowercase trick: latex/2197
+
+ * patches.txt: add ltxcheck.tex to list of changed files.
+
+ * ltpatch.ltx: add ltxcheck.tex to list of changed files.
+
+ * ltdirchk.dtx: Check for unauthorised cmr10 changes.
+
+1996-07-18 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltspace.dtx:
+
+ Added commentary on some known problems
+
+1996-07-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * Makefile: Add vtex.txt
+
+ * manifest.txt: Add vtex.txt
+
+ * ltpatch.ltx: pl1
+
+ * patches.txt: pl1
+
+ * ltfinal.dtx: Free up token registers /2213
+
+1996-07-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * pastex.txt: Update (Lars Hecking/Christian Bauernfeind)
+
+1996-06-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Fix to give correct error with plain TeX.
+
+1996-06-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews05.tex: (Barbara Beeton) Wrong attribution for IPA fonts
+
+######################
+# 1996/06/01 Release
+######################
+
+1996-06-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * classes.dtx: spelling... J"org Knappen /2176
+
+1996-06-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * lttab.dtx: Change \hskip\z@skip to \hskip1sp in for /2160
+
+ * syntonly.dtx: Fix \GetFileInfo usage in documentation /2174
+
+1996-06-13 Chris Rowley <latex-bugs@latex-project.org>
+
+ * clsguide.tex:
+
+ Updated for new release
+ General minor edits
+
+1996-06-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: doc improvements, mainly from /2174 again.
+
+ * ltdefns.dtx: doc improvements J"org Knappen /2174
+
+ * ltcounts.dtx: doc improvements J"org Knappen /2174
+
+ * ltalloc.dtx: doc improvements J"org Knappen /2174
+
+ * inputenc.dtx: doc improvements J"org Knappen /2174
+
+1996-06-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Fix Checksum Ulrik Vieth /2171
+
+1996-06-11 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx:
+
+ Added resetting of \everypar in the output routine
+
+1996-06-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews04.tex: typo: \ProcessOptions not \ProcessOption.
+
+ * ltnews05.tex: Advertise Mainz copy of GNATS.
+
+ * ltnews.cls: Add extra line in lw35fonts option.
+ Make font scaling messages `s'.
+
+ * ltboxes.dtx: use \@@par not \endgraf.
+
+ * ltsect.dtx: use \@@par not \endgraf.
+
+1996-06-07 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltnews05.tex:
+
+ Revised text
+
+ * ltnews.cls:
+
+ Changed fonts for lw35 option, for logical and aesthetic
+ reasons
+ Added support for T1 encoding with lw35 option
+ Corrected grammar in footer
+
+ * fntguide.tex:
+
+ Updated for new release
+
+1996-06-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltspace.dtx: doc improvements Donald Arseneau /2166
+
+ * ltpage.dtx: doc improvements Donald Arseneau /2166
+
+ * latex209.dtx: doc improvements Donald Arseneau /2166
+
+ * bugs.txt: remove duplicate line J"org Knappen/2165
+
+1996-06-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: modify vms suggestion slightly (J"org Knappen)
+
+1996-06-04 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: \verbatim@noligs@list now processed after
+ \dospecials (PR 2138).
+
+1996-06-03 Chris Rowley <latex-bugs@latex-project.org>
+
+ * install.txt:
+
+ Changed reference from texpert.txt to cfgguide.tex
+
+1996-06-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Look for dcfonts release 1.3 in ltxcheck
+
+1996-05-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews05.tex: more changes.
+
+1996-05-26 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx : Make the commands \frontmatter, \mainmatter and
+ \part react to [openany] in the same way as \backmatter and
+ \chapter do. (PR 2106)
+
+1996-05-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Redid \(@)normalsize checks. internal/2153
+ Reinstated old definition of \nofiles. latex/2146
+
+1996-05-23 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Extra documentation
+
+ * ltoutput.dtx
+
+ Changed test for a text page full of floats
+ Tidied documentation
+
+1996-05-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Preset accent arguments in a box to stop font
+ loading interfering with accent position. latex/2133.
+
+1996-05-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews05.tex: needs more work, but...
+
+1996-05-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltsect.dtx: CHANGE: Allow commands with arguments (eg
+ \MakeUppercase) to be used in the `style' argument of
+ \@startsection. The section heading text including any number
+ etc will be supplied as the argument of this
+ command. internal/2148
+
+1996-05-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * minimal.cls: Documentation improvements.
+
+1996-05-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cmfonts.fdd:
+ Added Computer Modern Variable Typewriter family.
+
+1996-05-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx:
+ Produce better error message when encoding is misspelled. pr/2054
+
+1996-05-17 Chris Rowley <latex-bugs@latex-project.org>
+
+ * fontdef.dtx
+
+ Removed \@@sqrt
+
+ * slides.dtx
+
+ Removed \@@sqrt
+
+1996-05-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * slides.fdd: Force \hyphenchar of OT1 fonts to 45, in case
+ \defaulthyphenchar has changed.
+ Remove some spurious extra empty arguments to \DeclareFontFamily
+
+ * cmfonts.fdd: Force \hyphenchar of OT1 fonts to 45, in case
+ \defaulthyphenchar has changed.
+ Remove some spurious extra empty arguments to \DeclareFontFamily
+
+ * ltfiles.dtx: Add \write\m@ne{} to \nofiles so that
+ \label (and other things) don't change the vertical spacing when
+ \nofiles is used. latex/2146
+
+1996-05-09 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx
+
+ Made more robust to errors
+
+ * slides.dtx
+
+ Made \include mechanism work
+
+1996-05-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Enable activation of codes below 32. latex/2071
+ Add warning if nothing defined by the encoding file latex/2136
+
+1996-05-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * unpacked.txt:
+ added cp852.def. pr/2081
+
+1996-05-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * legal.txt: Modify `rename changed files' clause to explicitly
+ forbid `double renaming' back to the original names.
+
+1996-05-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfsstrc.dtx:
+ Changed \begingroup to \bgroup to match a change to the kernel
+ done in 1994!!! It took a long time to find that one. pr/2100
+
+ * inputenc.dtx:
+ Added encoding definitions for cp852 contributed by Petr Sojka.
+ pr/2081
+
+1996-05-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews05.tex: make a start at this ....
+
+1996-04-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: reset \AtBeginDocument inside \begin{document}
+ for latex/1297. Small documentation improvements.
+
+1996-04-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: Documentation improvements.
+
+ * ltcounts.dtx: Documentation improvements.
+
+1996-04-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * Makefile: perl -p -e s#--release--date--goes--here--#1996/06/01#
+ spring is in the air....
+
+ * ltspace.dtx: documentation improvements.
+
+ * lttab.dtx: add extra \hskip to preserve tabcolsep in empty
+ l columns. latex/2122.
+ Small documentation improvements.
+
+1996-04-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpage.dtx: Minor documentation improvements.
+
+1996-04-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (section*{Index}%):
+ Definition of \printindex removed because no longer needed.
+ pr/2095
+
+1996-04-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: ansinew 09f is \"Y not \"y, latex/2119
+
+1996-03-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmath.dtx: Modify \ensuremath for amslatex/2104
+
+1996-03-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * ifthen.dtx: latex/2105 fix: dont leave mathord {} groups.
+
+1996-02-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * multitex.txt: Update from Markus Kohm, latex/2051
+
+1996-02-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Cedilla (\c\ ) rather than (\c{}) latex/2077
+ 0F0 corrected in cp850 latex/2080
+ 0B2 corrected in latin2 latex/2079
+
+1996-01-31 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * slides.dtx: fixed \cline which wasn't updated after internal
+ interface change pr/2067
+
+1996-01-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros surrounding the `definition parts'}):
+ support doc files also in compatibility mode (so far doc did typeset
+ the code in cmr instead of cmtt in compat mode)
+
+1996-01-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltidxglo.dtx:
+ turn \makeindex and \makeglossary into noops after use to avoid
+ problems with combinations of \PageIndex \makeindex etc. pr/2048
+
+ * letter.dtx:
+ Made redefinition of \vspace robust. pr/2049
+ Nevertheless, they syntax used in the pr is considered
+ incorrect!
+
+ * ltspace.dtx:
+ Made \vspace robust. Enhancement suggested by pr/2049
+
+1996-01-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx:
+ Changed default text preceding the index so that it depends on
+ the use of code line numbering.
+
+ * ltxdoc.dtx:
+ Removed \star since useless. pr/2039
+
+1996-01-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: latex/2024 ensure setting \input@path does not
+ change behaviour of ##1 in \IfFileExists.
+
+1996-01-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * bugs.txt:
+ Added a comment about where to send errata entries for the books.
+
+1995-12-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Bells and whistles}):
+ Added \AlsoImplementation as a counterpart to \OnlyDescription
+ pr/2040.
+
+ * texpert.txt:
+ clarified info about warnings happening when using makeindex.
+
+ * doc.dtx (section*{Index}%):
+ Turn \PrintIndex into noop after use. pr/2038
+ (section*{{Change History}}%):
+ Turn \PrintChanges into noop after use. pr/2038
+
+1995-12-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex209.dtx:
+ Corrected printout of index. pr/2028
+
+ * ltmath.dtx:
+ Corrected printout of documentation. pr/2030
+
+ * ltfntcmd.dtx:
+ Corrected changes entry. pr/2029
+
+1995-12-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * cmfonts.fdd: Ulrik Vieth /2017: fix up T1cmfib.fd file.
+
+1995-12-13 Chris Rowley <latex-bugs@latex-project.org>
+
+ * copypre.txt
+
+ New version, removing long lines
+
+ * copyins.txt
+
+ New version, removing long lines
+
+ * copyhead.txt
+
+ New version, removing long lines
+
+ * bugs.txt
+
+ Additions, updates and corrections
+
+ * autoload.txt
+
+ Additions, updates and corrections
+
+ * texpert.txt
+
+ Additions, updates and corrections
+
+ * ltnews.cls
+
+ Removed long lines
+ Changed capitalisation
+
+ * cmfonts.fdd
+
+ Removed long lines
+
+ * slides.fdd
+
+ Removed long lines
+
+ * olddc.dst
+
+ New preambles
+
+ * newdc.dst
+
+ New preambles
+
+ * cmextra.dst
+
+ New preambles
+
+ * cmfonts.dst
+
+ New preambles
+
+ * latexsym.dst
+
+ New preambles
+
+ * autoload.dst
+
+ New preambles
+
+ * unpack2e.ins
+
+ New preambles
+
+ * slides.dst
+
+ New preambles
+
+ * legal.txt
+
+ New version
+
+ * readme.txt
+
+ New version
+
+ * ltclass.dtx
+
+ Documentation added
+
+ * fontdef.dtx
+
+ Documentation added
+
+ * latex209.dst
+
+ Smaller batches for old emtex
+
+ * modguide.tex
+
+ Additions, updates and corrections
+
+ * cfgguide.tex
+
+ Additions, updates and corrections
+
+ * clsguide.tex
+
+ Additions, updates and corrections
+
+ * fntguide.tex
+
+ Additions, updates and corrections
+
+ * ltx3info.tex
+
+ Additions, updates and corrections
+
+ * usrguide.tex
+
+ Additions, updates and corrections
+
+ * ltxguide.cls
+
+ Corrected cfg loading
+
+ * inputenc.dtx
+
+ Detailed corrections
+
+ * ltdefns.dtx
+
+ Added documentation
+
+######################
+# 1995/12/01 Release
+######################
+
+1995-12-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * install.txt (NOTE): add info to run olddc.ins.
+
+1995-12-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Modify \IeC and add missing % in
+ \DeclareInputText.
+
+1995-12-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: (Bernd Raichle) Check for dcfonts 1.2 patch
+ level 1. Latest TeX is now 3.14159.
+
+ * ltoutenc.dtx: TEMPORARY \copyright fixes.
+
+ * amiweb2c.txt: new version from Andreas Scherer.
+
+1995-12-08 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Switched off \@inmathwarn.
+
+1995-12-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx: Move \m@th out of \ensuremath in \textsuperscript
+
+ * ltbibl.dtx: restore \G@refundefinedtrue
+
+ * ltxref.dtx: restore \G@refundefinedtrue
+
+ * ltnews04.tex: new input encodings.
+
+1995-12-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * docstrip.dst: Remove writing of \@currdir by .ins file.
+
+ * ltfssbas.dtx: reset catcode of ^ in fd files.
+
+1995-12-06 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * encguide.tex: Added examples of new \text* commands.
+
+ * usrguide.tex: Added documentation for new \text* commands.
+
+1995-12-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * cstex.txt: New file (from Markus Kohm)
+
+ * multitex.txt: New file (from Markus Kohm)
+
+ * ltfiles.dtx: add \ignorespaces to \begin{document} latex/1933
+
+ * ltdefns.dtx: Remove \@unexpandable@noexpand (never used) /1733
+
+ * ltfloat.dtx: \textsuperscript in math mode. latex/1984
+
+1995-12-05 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Changed text of \TextSymbolUnavailable.
+
+1995-12-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * lthyphen.dtx: minor doc edits for /1989
+
+ * preload.dtx: 12pt OMS and OML preloads added /1989.
+
+ * fontdef.dtx: minor doc edits for /1989
+
+ * cmfonts.fdd: upright italic and tt small caps re-added. /1989.
+
+ * modguide.tex: edits for /1989
+
+1995-12-04 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dst: Added cp437de.def.
+
+ * inputenc.dtx: Added \@tabacckludge commands to the Next encoding.
+ Replaced ~ by \nobreakspace.
+ Added a `test version' to the \ProvidesFile.
+ Made <pounds> and <uumlaut> text char in cp437.
+ Made <fraction> a math char in Next.
+ Made <cdot> and <bullet> text chars in all encodings.
+ Added cp437de (cp437 but with ss rather than beta).
+
+1995-12-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * cmfonts.fdd: Dont force \hyphenchar=127 on T1 fonts /1853
+ Documentation changes and some font shapes modified
+ Ulrik Vieth /1989,
+
+1995-12-01 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Removed extraneous {} from the <superior> glyphs.
+
+ * ltoutenc.dtx: Made \SS a default command rather than making the
+ OT1 definition the default.
+
+1995-11-30 Johannes Braams <latex-bugs@latex-project.org>
+
+ * proc.dtx, classes.dtx (section{Identification}): Added the date
+ of the LaTeX format to the optional argument of \NeedsTeXformat in
+ order to signal newer class files being used with an old format
+ (PR1971).
+
+1995-11-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * cfgguide.tex: dont change uc lc tables...
+
+1995-11-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * clsguide.tex: Minor edits.
+
+ * cfgguide.tex: minor edits.
+
+ * ltxguide.cls: modify verbatim slightly.
+
+ * cmextra.dst: Use concurrent features for speed (/1985 again)
+
+ * oldlfont.dtx: Remove duplicate driver code (/1985 again)
+
+ * newlfont.dtx: Remove duplicate driver code (/1985 again)
+
+ * ltoutput.dtx: add \ProvidesFile to flafter.sty (/1985 again)
+
+1995-11-29 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added \textless, \textgreater, et al.
+
+ * inputenc.dtx: Replaced \textsterling with \pounds.
+ Added default error-message definitions for \textyen et al.
+ Added a \NeedsTeXFormat line.
+ Tidied up the Next encoding.
+
+1995-11-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: 2 (not 3) column index and modified script
+ Allow control names to hyphenate in the ChangeLog.
+
+ * latexsym.dst: \input docstrip before using docstrip commands.
+
+ * latexsym.dtx: Stop rogue %% comments apearing in generated
+ files. Another one from Ulrik Vieth's /1985.
+
+ * ltxdoc.dtx: Increase left margin and marginpar width
+
+ * ltclass.dtx: minor improvements.
+
+ * ltnews04.tex: minor improvements.
+
+ * lterror.dtx: Typo in autoload \ClassError version. /1985
+
+ * ltmath.dtx: doc fixes for /1979.
+
+ * ltsect.dtx: doc fixes for /1985.
+
+ * ltfntcmd.dtx: doc fixes for /1985.
+
+ * ltplain.dtx: doc fixes for /1985.
+
+ * ltlists.dtx: doc fixes for /1985.
+
+ * ltoutenc.dtx: doc fixes for /1985.
+
+ * ltfsstrc.dtx: doc fixes for /1985.
+
+ * ltfloat.dtx: doc fixes for /1985.
+
+1995-11-28 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added test for math mode to text commands.
+ Renamed \@changed@x@err to \TextSymbolUnavailable.
+
+1995-11-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssbas.dtx: reset catcode of # in fd files internal/1982
+
+ * exscale.dtx: add \ProvideFile to fd file for latex/1987
+
+1995-11-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltspace.dtx
+
+ \nobreakspace added
+
+1995-11-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxguide.cls: typo ltxdoc.cls for ltxguide.cls
+
+1995-11-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * texpert.txt: describe updated ltxcheck
+
+ * manifest.txt: ltnews04
+
+ * Makefile (TEXS): ltnews04
+
+ * ltnews04.tex: New TUG Address, \LoadClassWithOptions
+
+ * doc.dtx: Make \MakeShortVerb use an \PackageInfo rather
+ than \tyepout. internal/1938
+
+1995-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * docstrip.dtx: Minor documentation cleanups.
+
+ * ltoutenc.dtx: add `symbol' to the message.
+
+1995-11-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * docstrip.dtx: Merge in Marcin's new code restoring
+ \inFileName functionality.
+ Remove generation date/version number from generated files
+ Add \AddGenerationDate batchfile command to put them back.
+ Force whole file through ispell!!
+
+ * ltoutenc.dtx: Use \@wrong@font@char in \UseTextSymbol. /1676
+
+ * ltfssbas.dtx: Make missing fd file \typeout a Font Info
+ and add \@wrong@font@char for use in \UseTextSymbol. /1676
+ Clean up many \changes entries.
+
+1995-11-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: Exchange order of ltdefns and ltalloc
+ (Matches code change of 24th May.)
+ Modify \changes def to match doc.sty 1.9u
+
+1995-11-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Dont make a ! BAD typeout if just the old (or new)
+ dc fonts are installed.
+
+ * ltclass.dtx: Add \LoadClassWithOptions for latex/1556
+ Add \RequirePackageWithOptions to match.
+ Stop \@unprocessedoptions complaining about empty options
+ noticed whilest debugging the above change...
+
+ * inputenc.dtx: remove rogue \endinput. Wrap long lines.
+
+1995-11-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Check default font encoding/family etc.
+
+1995-11-10 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx:
+
+ Made code in-line to remove pseudo-hooks
+
+1995-11-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * autoload.dst: fix order of files in autoerr for new docstrip.
+
+ * ltnews04.tex: first draft
+
+1995-11-07 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx (subsection{Definitions for the OT1 encoding}):
+ Changed \char32 to \@xxxii (two tokens less). Replaced octal
+ number 27 by decimal number 23 to protect against the quote
+ character being active. Added \leavevmode at start of \c,
+ otherwise the output routine might be invoked within the macro
+ (suggested by Donald Arseneau). Replaced some 0's by \z@
+ (faster).
+
+ * ltlists.dtx (\@doendpe): Enclosed \setbox0 assignment by a
+ group so that it leaves the contents of box $0$ intact.
+ Discovered by Donald Arseneau.
+
+ * cmfonts.fdd: Use decimal rather than octal character
+ specification for \hyphenchar and \skewchar so that there is
+ no problem with an active quote character.
+
+1995-11-03 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * unpack.ins: Updated for new concurrent docstrip.
+
+ * ltoutenc.dst: Updated for new concurrent docstrip.
+
+ * newdc.dst: Updated for new concurrent docstrip.
+
+ * olddc.dst: Updated for new concurrent docstrip.
+
+ * proc.dst: Updated for new concurrent docstrip.
+
+ * autoload.dst: Updated for new concurrent docstrip.
+
+ * latex209.dst: Updated for new concurrent docstrip.
+
+ * inputenc.dst: Updated for new concurrent docstrip.
+
+ * cmfonts.dst: Updated for new concurrent docstrip.
+
+ * classes.dst: Updated for new concurrent docstrip.
+
+ * slides.dst: Updated for new concurrent docstrip.
+
+ * latexsym.dst: Updated for new concurrent docstrip.
+
+ * makeindx.dst: Updated for new concurrent docstrip.
+
+ * docstrip.dst: Updated for new concurrent docstrip.
+
+ * docstrip.dtx: New concurrent docstrip by Marcin Woli\'nski.
+
+1995-11-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * classes.dtx
+
+ Made \footnote always work in frontmatter
+
+1995-11-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssbas.dtx: Remove spurious space from NFSS font warning
+ latex/1676
+
+ * ltxdoc.dtx: Add silent font substitutions.
+
+1995-11-02 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Added code for fleqn.sty, leqno.sty,
+ openbib.sty.
+
+ * latex209.dst: Added generation of files fleqn.sty, leqno.sty,
+ openbib.sty for compatibility mode.
+
+ * inputenc.dtx: Changed internal name \a to \@tabacckludge to
+ protect against redefinition by malicicous users. Wrapped long
+ lines.
+
+ * ltoutenc.dtx: Changed internal name \a to \@tabacckludge to
+ protect against redefinition by malicicous users.
+
+1995-11-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Only list `configuration' input files.
+
+ * ltfinal.dtx: Modify \@addtofilelist during initex so only
+ non-standard (cfg) inputs listed.
+
+ * ltfssini.dtx: Modify \@addtofilelist during initex so only
+ non-standard (cfg) inputs listed.
+
+ * ltdirchk.dtx: Modify \@addtofilelist during initex so only
+ non-standard (cfg) inputs listed.
+
+ * Makefile: Add newdc/olddc
+
+ * unpack2e.ins: Add newdc.ins.
+
+ * cmfonts.fdd: Modify T1 and TS1 generation.
+
+ * cmfonts.dst: remove dc font generation.
+
+ * olddc.dst: NEW: Generate fd files for obsolete dcfonts 1.1
+ and earlier.
+
+ * newdc.dst: NEW: Generate fd files for dcfonts 1.2
+
+ * fontdef.dtx: Wrap fd inputs in \nfss@catcodes. internal/1932
+
+ * ltfssbas.dtx: Correct undefined font family test internal/1933
+
+1995-10-31 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: CHANGE: Add \nobreak to \@finalstrut to allow
+ hyphenation of the last word of a p-column (and footnotes).
+ internal/1931
+
+ * ltdirchk.dtx: more robust checking of dc fonts.
+
+1995-10-31 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.fdd: Added extra substitutions for shape `ui' to make
+ \pounds work properly in the slides class (mostly).
+
+1995-10-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxcheck.tex: Check that if you have the old dc fonts, then the
+ initex run loaded a suitable old fd file.
+
+ * fntguide.tex: Describe genb size function.
+
+ * clsguide.tex: Mention minimal.cls is now in the distribution.
+
+ * minimal.cls: Bring into line with version in clsguide.tex
+
+1995-10-29 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsection{The title}): empty \@date as well at the
+ end of \maketitle
+ (subsection{Paragraphing}): Added the setting of \...skipamount,
+ just a copy of the kernel values. (PR 1464)
+
+1995-10-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpictur.dtx: Initialise \@wholewidth in autoload kernel.
+ General doc cleanup.
+
+ * usrguide.tex: Describe minimal.cls
+
+1995-10-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * minimal.cls: A masterpiece of typographical design.
+
+ * ltfssbas.dtx: Disable autofss2 for now.
+
+1995-10-25 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx
+
+ Corrected bug in \end@dblfloat, made code more robust
+
+1995-10-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmath.dtx: modify docstrip guards so
+ \ProvidesFile{ltmath.dtx} seen by source2e.tex.
+
+ * ltidxglo.dtx: General doc cleanup.
+
+ * ltsect.dtx: Initilalise mark commands using \let to save space
+
+ * ltalloc.dtx: General doc cleanup.
+
+1995-10-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx
+
+ Removed one-way switches from \endocument
+
+ * ltxref.dtx
+
+ Removed one-way switches from \endocument
+ Tidying.
+
+ * ltfssbas.dtx
+
+ Removed one-way switches from \endocument
+
+ * ltbibl.dtx
+
+ Removed one-way switches from \endocument
+
+ * ltmiscen.dtx
+
+ Removed one-way switches from \endocument
+ Tidying.
+
+1995-10-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: Make \@autoload files ignore EOL.
+
+ * lterror.dtx: modify autoload \@preamerr.
+ Add % to some lines as \@autoload files now ignore line ends.
+
+1995-10-23 Chris Rowley <latex-bugs@latex-project.org>
+
+ * lttab.dtx
+
+ Made poptabs more robust
+ Tidied up documentation
+
+1995-10-23 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Abstract}): Added setting of
+ \cs{beginparpenalty} to discourage page break before abstract
+ heading.
+
+1995-10-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * cmfonts.fdd: Added support for new (version 1.2) DC fonts and
+ text companion fonts in encoding TS1.
+
+ * inputenc.dst: Added generation of ansinew.def file.
+
+ * inputenc.dtx: Added ansinew encoding (Windows 3.1 ANSI), as
+ contributed by Berthold K.P. Horn (bkph@ai.mit.edu).
+
+1995-10-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Clarify output format a bit.
+
+ * ltclass.dtx: modify autoload support
+
+ * ltfsstrc.dtx: Keep autofss2 code in kernel until
+ \begin{document}.
+
+ * ltfssbas.dtx: Keep autofss2 code in kernel until
+ \begin{document}.
+ use \@undefined not \undefined
+
+ * ltfinal.dtx: \@filelist zapped too early.
+
+1995-10-19 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Replaced \' \` \= by \a' \a` \a in order to get
+ correct accents in a tabbing environment.
+
+1995-10-18 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltspace.dtx (subsection{Horizontal space}): Moved \changes
+ from \@ to \hspace where it belongs.
+
+1995-10-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Reset \ProvidesFile, Preserve initex file list in
+ \reserved@a
+
+ * ltclass.dtx: Remove \ProvidesFile redefinition to ltfinal.
+ Reset \CurrentOption in \ProcessOptions for graphics/1873
+
+ * ltdirchk.dtx: Modify \ProvidesFile during initex to save
+ debugging info and not waste \ver@... csnames.
+
+ * latexbug.tex: Show initex file list.
+
+ * latexbug.el: use \@@input not \input
+
+ * latex209.dtx: \supereject, \mscount, old style \@imakepicbox
+
+ * ltplain.dtx: Move \supereject to latex209
+
+ * lttab.dtx: move \mscount to latex209 use \@multicnt instead.
+
+1995-10-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltbibl.dtx: make \cite robust /1808
+
+ * ltmath.dtx: Make \sqrt robust /1808
+ Use \@testopt in eqnarray's \\ /1911.
+
+ * ltspace.dtx: Use \@testopt in \[no]{line|page}preak (/1911)
+
+ * ltdefns.dtx: new \@ifstar CHANGE: require ##1 in both arguments
+ not ####1 in one and ##1 in the other. (internal/1910)
+ Use \@testopt in \newcommand and \newenvironment (/1911)
+
+ * ltboxes.dtx: Clarify \makebox(,)[b] description.
+
+ * ltthm.dtx: Allow \newtheorem after \begin{document} again.
+ (LaTeX Book, page 57)
+
+1995-10-16 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfssini.dtx: Added \relax at the end of the definition of
+ \normalfont to prevent it and \textnormal from eating up leading
+ spaces.
+
+1995-10-11 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx
+
+ New check in \clearpage.
+
+1995-10-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: autoload error message
+
+ * ltthm.dtx: Make \newtheorem and its internals `only preamble'
+ to save memory.
+
+ * ltplain.dtx: autoload tracing code
+
+ * ltfssbas.dtx: Make \showhyphens colour safe and autoloadable.
+
+1995-10-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.dtx (subsection{The title}): In \maketitle, move \par
+ inside the scope of \Large, to get even line spacing.
+
+1995-10-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: use \@@input to load autoload files.
+
+ * lterror.dtx: more autoload mods.
+
+ * ltoutenc.dtx: Autoload \@changed@x@err (autoerr.sty)
+
+1995-10-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * autoload.dst: update autoerr generation.
+
+ * ltfiles.dtx: autoload missing file error command
+
+ * ltplain.dtx: autoload \new... error message.
+
+ * ltdefns.dtx Use \aut@global in \DeclareRobustCommand
+
+1995-10-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfsstrc.dtx: Use new \@autoload feature.
+
+ * ltfssbas.dtx: Use new \@autoload feature.
+
+ * ltoutput.dtx: Use new \@autoload feature.
+
+ * lttab.dtx: Use new \@autoload feature.
+
+1995-10-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpatch.ltx: 1995/12/01 Christmas is nearly here...
+
+ * Makefile: 1995/12/01 Christmas is nearly here...
+
+ * ltdefns.dtx: Fix \@xtypein (from patch file)
+
+ * fontdef.dtx: Define \@@sqrt (from patch file)
+
+ * lterror.dtx: Use new \@autoload feature.
+
+ * ltpictur.dtx: Use new \@autoload feature.
+
+ * autoload.dst: autoload module in ltdefns.dtx.
+
+1995-10-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: Move \newif to ltdefns.dtx.
+ Use \sbox in \underbar (saves tokens, and works with colour)
+
+ * ltdefns.dtx: \futurelet with \@let@token for internal/924
+ New implementation of \@xargdef in terms of the new
+ \@protected@testopt. Saves tokens and makes user defined
+ commands with optional arguments robust. internal/1733
+ Move \newif here from ltplain.
+ Autoload support. Add \aut@global and \@autoload. internal/1617.
+
+1995-09-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Check \filename parser in ltxcheck.tex
+ for latex/1624 latex/1754 and graphics/1336
+ Check for dc fonts in ltxcheck.tex
+
+1995-09-27 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.dtx, slides.fdd: Globally replaced scale factor 19.91
+ by 19.907 in \DeclareFontShape, as this gives better rounded
+ font sizes at 600dpi (suggested by Denis Roegel).
+
+ * docstrip.dtx: Changed address of Johannes Braams.
+
+1995-09-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Declare 2 count registers previously used
+ in \cline. /1723
+
+1995-09-25 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * web2ctex.txt: Added some comments about using non-csh, index
+ style files and some other missing files.
+
+1995-09-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxguide.cls: \RequirePackage{shortvrb} for latex/1875
+
+ * latexbug.el (report-latex-bug): Rainer's fix for latex/1675
+
+1995-09-21 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * inputenc.dst: Added generation of next.def file.
+
+ * inputenc.dtx: Added next encoding, as contributed by
+ Stefan Ried <stef@theo-phys.uni-essen.de> and Holger Uhr
+ <huhr@uni-paderborn.de>.
+
+1995-09-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * slides.dtx: Fix \hline for latex/1871.
+
+1995-09-20 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * cmextra.dst: Added generation of OMLccm.fd file, which had
+ previsouly been removed from cmfonts.dst.
+
+ * slides.dtx: Replace \@tempa by \reserved@a. Wrap some long
+ lines and use \null instead of \hbox{} (by DPC).
+
+1995-09-19 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.fdd: Corrected names of .fd file names in argument to
+ \ProvidesFile commands.
+
+ * ltmiscen.dtx: Moved call to \@noligs macro after call to
+ \verbatim@font in \verb command, just as it is already in the
+ verbatim environment.
+
+1995-09-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssini.dtx: Modify TeX2 message.
+
+1995-09-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * lttab.dtx: New \cline implementation. No longer declare
+ counters \@cla \@clb. More macro envs in documentation.
+
+ * ltplain.dtx: Move \multispan to lttab.dtx. Loads more macro
+ environments in the documentation.
+
+1995-09-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * tex2.txt: typos...
+
+ * ltplain.dtx: Minor space savings. Add a few more macro envs.
+
+ * autoload.dst: add the l-terror.
+
+ * lterror.dtx: Add autoload support.
+
+1995-08-31 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Added 0 to the beginning of every number.
+ Changed the definition of "AD in latin1 and latin2 to be \-.
+ Swapped ordfeminine and ordmasculine around in latin1.
+
+1995-08-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx:
+ Reimplemented openbib option to save space (hash and mem).
+ Disable \title \author \date \and after \maketitle.
+ Default for \newblock outside thebibliography env changed.
+
+1995-08-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutput.dtx:
+ Added autoload code for autoout1.sty (\enlargethispage).
+
+ * ltfsscmp.dtx:
+ Added \@preambleonly lines from ltfssdcl.dtx.
+ Moved compat code from ltfssbas.dtx to this file.
+
+ * autoload.dst:
+ Added new autoload files.
+
+1995-08-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssdcl.dtx:
+ Moved most of the \@onlypreamble declarations to the right places.
+ Added forgotten \DeclareSymbolFontAlphabet@ to \@preambleonly
+ (400 useless tokens)!
+
+ * ltfssbas.dtx:
+ Added to the documentation.
+
+1995-08-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssbas.dtx:
+ Added autoload code for autofss1.sty.
+ Added autoload code for autofss2.sty.
+
+
+ * ltfsstrc.dtx:
+ Macro \gobble@font@spec eliminated.
+ Added autoload code for autofss1.sty.
+ Added autoload code for autofss2.sty.
+
+1995-08-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * encguide.tex:
+ First draft.
+
+1995-08-16 Chris Rowley <latex-bugs@latex-project.org>
+
+ * tex2.txt:
+
+ Clearer wordings
+
+ * ltcntrl.dtx:
+
+ Made most loop macros \long
+ Removed unnecessary \...noop macros
+ Tidied up documentation
+
+1995-08-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfiles.dtx:
+ set \@maxdepth at begin document not in class file
+ add a couple of \global's
+
+ * usrguide.tex:
+ typo corrections pr/1809
+
+ * ltmath.dtx:
+ fixed mistake added with last update
+
+ * classes.dtx:
+ throw in a couple of forgotten percents
+ reprogram a couple of macros to save space or macro names
+ update the documentation
+
+1995-08-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltlength.dtx: Fix doc typos for latex/753
+
+1995-08-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltxdoc.dtx:
+ updated \marg etc to use \meta, suggested by pr/1370
+ added missing braces in definition of \star
+
+1995-08-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * cmfonts.fdd:
+ Fixed setup for OMScmr.fd as pointed out by Christian Spieler. pr/1804
+
+ * ltmath.dtx:
+ Added code for leqno.clo and fleqn.clo
+
+ * classes.dtx:
+ Moved code for leqno and fleqn to kernel files.
+
+1995-08-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx:
+ Implemented titlepage differently to support twoside,openight
+ options correctly. pr/1783.
+
+ * docstrip.dst:
+ Removed part that might add non-standard setting of \@currdir
+ into docstrip.tex so that unpacked distribution stays portable. pr/1765
+
+1995-08-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros for the `documentation parts'}):
+ Fixed problem that \begin{macro}{\foo} doesn't suppress
+ index entries for \foo within its body. pr/343
+ (subsection[Dealing with the change history]):
+ \changes entries on top-level now preceed themselves with
+ the expansion of \generalname rather than producing the
+ fixed string "General".
+
+ * docstrip.dtx:
+ Clarified default "copying conditions" as suggested by
+ Richard Stallman
+
+1995-07-23 Chris Rowley <latex-bugs@latex-project.org>
+
+ * clsguide.tex:
+
+ Added notices concerning use of `Standard LaTeX'
+
+ * cfgguide.tex:
+
+ Started major expansion and rewrite
+
+ * modguide.tex:
+
+ Rewrite adding section on modfying LaTeX
+
+ * legal.txt:
+
+ Further expansion and changes
+
+ * ltxguide.cls:
+
+ Changed configuration file messages
+
+1995-07-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * classes.dtx: reduce save stack usage for latex/1742
+
+ * ltfssbas.dtx: reduce save stack usage for latex/1742
+
+ * ltpage.dtx: Save a few tokens in \sloppy and \fussy
+
+ * ltboxes.dtx: Use \sbox in \@save(pic)box
+
+ * ltlogos.dtx: Save a few tokens in logo defs.
+
+1995-07-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * manifest.txt: tex2.txt
+
+ * tex2.txt: TeX2 installation instructions first draft.
+
+ * ltfssini.dtx: Test for TeX2 before reading fonttext.???
+
+1995-07-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * patches.txt: PL3 Add proc and latex209 fixes missed yesterday.
+
+ * ltpatch.ltx: PL3 Add proc and latex209 fixes missed yesterday.
+
+ * proc.dtx: fix \thanks for /1735
+
+1995-07-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * patches.txt: patch level 2.
+
+ * ltpatch.ltx: Patch level 2 (accents)c ../mir
+
+1995-07-16 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx:
+
+ New version of \@outputpage
+
+1995-07-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltbibl.dtx: Remove \@onlypreamble from \bibcite
+
+ * ltxref.dtx: Remove \@onlypreamble from \newlabel
+
+1995-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltidxglo.dtx:
+ Added \@preambleonly statements
+
+ * ltfssbas.dtx:
+ Updates to documentation
+ Use macro rather than switch to flag default font
+ substitutions pr/1236
+
+ * ltfiles.dtx:
+ Updates to documentation
+
+ * ltdefns.dtx:
+ Updates to documentation
+
+ * ltmiscen.dtx:
+ Removed surplus \@onlypreamble stuff
+ Updated documentation
+ Streamlined code in \enddocument
+ Streamlined code for \@xobeysp
+
+1995-07-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * autopict.sty: Allow 2e commands in the autoload file /1737
+
+1995-07-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * syntonly.dtx:
+ Fix incorrect checksum.
+
+1995-07-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltthm.dtx:
+ Updates to documentation (partly pr/1734)
+
+ * lttab.dtx:
+ Updates to documentation (partly pr/1734)
+
+ * ltplain.dtx:
+ Updates to documentation (partly pr/1734)
+
+ * ltoutput.dtx:
+ Updates to documentation pr/1734
+
+ * ltlists.dtx:
+ Updates to documentation (partly pr/1734)
+
+ * ltfloat.dtx:
+ Updates to documentation pr/1734
+
+ * lterror.dtx:
+ Updates to documentation pr/1734
+
+ * ltbibl.dtx:
+ Updates to documentation (partly pr/1734)
+
+1995-07-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltcntrl.dtx:
+ Reimplemented loop structures using Kabelschacht method.
+
+ * ltlists.dtx:
+ Some updates to the docu.
+ Shortend defs of enumerate and itemize by using \expandafter.
+
+ * ltdefns.dtx:
+ Removed a couple of surplus tokens, updated docu.
+ (subsection{Command definitions}):
+ Make \CheckCommand preambly only to save valuable space.
+
+1995-07-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * patches.txt: document /1722 fix.
+
+ * latex209.dtx: Fudge \@textsuperscript for /1722.
+
+1995-07-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * letter.dtx: documentation updates as suggested by Christian Spieler
+ pr/1721
+
+1995-07-05 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (section{Spacing}):
+ Reimplementation of \[no]pagebreak to save space.
+ Cleanup parts of the docu.
+
+ * ltfntcmd.dtx:
+ Use proper interface to jump out of \@tfor loop.
+ Some docu update.
+ Renamed \test@next to \t@st@ic.
+
+1995-07-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexsym.dtx:
+ Free space taking up by \not@base error message since
+ that one isn't any longer necessary.
+ Some documentation update.
+
+1995-07-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx:
+ Small space changes in various places.
+
+1995-07-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx: Moved debugging code to ltplain.
+
+ * ltfssini.dtx:
+ Fixing a mistake in shortening lines.
+
+1995-06-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * patches.txt: document patches.
+
+ * ltpatch.ltx: Oh well. I suppose it had to happen.
+
+ * latex209.dtx: \@fnsymbol added (without \ensuremath) for /1684
+
+1995-06-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmath.dtx: fix \changes entries for /1677
+
+ * ltfssini.dtx: fix \changes entries for /1677
+
+1995-06-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx:
+ Fixed the definition for footnotemarks in \maketitle for article
+ which got corrupted in the june release. pr/1683
+
+######################
+# 1995/06/01 Release
+######################
+
+1995-06-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltbibl.dtx: Modify \bibcite so a repeated key produces
+ LaTeX Warning: Label `aaa' multiply defined.
+ ...
+ LaTeX Warning: There were multiply-defined labels.
+ instead of
+ LaTeX Warning: Label(s) may have changed.
+ Rerun to get cross-references right.
+
+ * ltxref.dtx: Modify \newlabel so \bibcite can share code.
+
+ * ltclass.dtx: Stop \documentstyle re-enabling \usepackage
+ After it has been disabled by latex209.def (latex/1634)
+
+1995-06-18 Chris Rowley <latex-bugs@latex-project.org>
+
+ * Makefile:
+
+ Changed to use copypre.txt and copyhead.txt
+
+ * cfgguide.tex:
+
+ Configuration stuff transferred from texpert.txt
+
+ * autoload.txt:
+
+ Tidying, removed long lines
+
+ * cm*.dst, docstrip.dst,latex*.dst,exscale.dst
+
+ New preambles
+
+ * inputenc.dst,ltoutenc.dst,slides.dst:
+
+ New preambles
+
+ * unpack2e.ins:
+
+ New preambles
+
+ * copyright.txt:
+
+ No longer used
+
+ * copyins.txt:
+
+ New text
+
+ * copypre.txt:
+
+ New file
+
+ * copyhead.txt:
+
+ New file
+
+ * copydisf.txt:
+
+ New file
+
+ * copydisg.tex:
+
+ New file
+
+1995-06-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfssdcl.dtx: Minor documentation edits.
+
+ * ltfsscmp.dtx: Minor documentation edits.
+
+ * ltfssbas.dtx: Minor documentation edits.
+
+ * ltfsstrc.dtx: Take \ProvidesFile out of \iffalse clause
+ so it shows up in \listfiles in source2e.tex.
+ Wrap some long lines to 72.
+
+1995-06-15 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews03.tex: Added pointer to autoload.txt.
+
+1995-06-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: modify printing of patch level on page 1.
+
+ * manifest.txt: autoload files.
+
+ * autoload.txt: initial version
+
+ * Makefile: add autoload files
+
+ * autoload.dst: initial version of .ins file for autoload.
+
+ * lttab.dtx: Add \ProvidesFile to autoload file.
+
+1995-06-14 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dst: Fixed typo cp850 -> cp437
+
+1995-06-14 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dst: Fixed typo cp850 -> cp437
+
+1995-06-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpictur.dtx: Add \ProvidesFile to autoload file.
+
+ * ltfinal.dtx: Moddify method of adding patchlevel banner
+ Force format to be in errorstopmode, even if an installer
+ scrolled past an error during initex run.
+
+1995-06-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx: Add Auotoload banner
+ Check for old source files (older than a year).
+
+1995-06-11 Chris Rowley <latex-bugs@latex-project.org>
+
+ * legal.txt:
+
+ Major changes
+
+ * usrguide.tex:
+
+ Added ltx3info.tex info
+
+ * fntguide.tex:
+
+ Added note re using non-cmr fonts in T1
+
+ * clsguide.tex:
+
+ Hash marks in option declarations OK
+ Added Case cHANGING commands
+
+ * cfgguide.tex:
+
+ Configuration stuff transferred from texpert.txt
+
+ * lablst.tex:
+
+ Improved version: lists all bibitems separately
+ Changed internal commands
+
+ * Makefile:
+
+ Added modguide.tex
+
+ * manifest.txt:
+
+ Added ltnews03.tex and modguide.tex
+
+ * install.txt:
+
+ File name corrected
+ Added ltx3info.tex info
+
+ * emtex.txt:
+
+ Added info re batch file
+
+ * texpert.txt:
+
+ Configuration details transferred to cfgguide.tex
+
+ * readme.txt:
+
+ Added pointers to various other info files
+
+ * ltspace.dtx:
+
+ Added \relax to \obeycr
+
+1995-06-09 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Made composites declared with DeclareTextComposite
+ use no-argument macros rather than one-argument macros.
+
+ * ltnews03.tex: Changed modify.tex to modguide.tex, updated
+ figures for space savings.
+
+1995-06-08 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews03.tex: New issue of LaTeX News.
+
+1995-06-06 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Made \MakeUppercase and \MakeLowercase grab their
+ argument and brace it.
+
+1995-06-05 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltpatch.ltx: Removed patch for latex/1240 (now in ltoutenc.dtx).
+ Removed patch for tools/1296 (now in ltoutenc.dtx).
+ Removed patch for latex/1322 (now in ltoutenc.dtx).
+ We now have an empty patch file again!
+
+ * fontdef.dtx: Moved math commands from ltoutenc.dtx.
+
+ * ltoutenc.dtx: Redid protection in DeclareTextCommand so that it
+ uses \noexpand rather than \protect. This should stop the
+ problems with \'\i putting the acute on a \protect rather than
+ on the \i. Commented out the defaults for textless and
+ textgreater. Allow \ProvideTextCommandDefault after
+ \begin{document} so it can be used in inputenc.def files.
+ Save some tokens in \textvisiblespace and \textunderscore.
+ Moved math commands to fontdef.dtx.
+
+ * classes.dtx: Replaced \uppercase with \MakeUppercase
+
+ * ltfinal.dtx: Added \MakeUppercase and \MakeLowercase.
+
+1995-05-30 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Made hex numbers safe against active ". Added
+ docstrip commands to applemac.def.
+
+1995-05-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx:
+ Made \filec@ntents preamble only to save space.
+
+ * ltfssbas.dtx:
+ Added definition of \new@mathgroup again which got lost.
+ (should be moved to other file one day).
+
+1995-05-26 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltplain.dtx (section{Plain \TeX}):
+
+ Made \loop long
+ Made \underbar use \box \tw@
+
+ * ltdefns.dtx (subsection{Command definitions}):
+
+ Made \@gobble commands \long
+
+1995-05-26 Johannes Braams <latex-bugs@latex-project.org>
+
+ * proc.dtx (subsection{The page style}): Removed \rmfamily from
+ definition of \@oddfoot (PR 1578)
+
+ * ltmath.dtx : Removed \rmfamily from definition of \@eqnnum
+ (PR 1578)
+
+ * ltpage.dtx : Removed \rmfamily from definition of \ps@plain
+ (PR 1578)
+
+1995-05-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * Makefile: Remove generation of ltnfss.dtx
+
+ * unpack2e.ins Add new NFSS files
+
+ * manifest.txt: Add new NFSS files.
+
+ * source2e.tex: Include new NFSS files
+
+ * ltfssdcl.dtx: Initial version (latint.dtx)
+
+ * ltfssini.dtx: Initial version (lfonts.dtx)
+
+ * ltfsscmp.dtx: Initial version (fam.dtx)
+
+ * ltfsstrc.dtx: Initial version (tracefnt.dtx)
+
+ * ltfssbas.dtx: Initial version (fam.dtx)
+
+1995-05-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Macros surrounding the `definition parts'}):
+ Removed \math@fontsfalse in \MacroFont and \AltMacroFont because
+ this isn't any longer correct with the new math font setup in NFSS2.
+ pr/1622 (and some earlier one)
+ Use \GetFileInfo.
+
+1995-05-25 Chris Rowley <latex-bugs@latex-project.org>
+
+ * latex209.dtx:
+
+ Changed float reset hooks to empty
+
+ * ltfloat.dtx:
+
+ Moved new resettings into hooks so that they can be removed in
+ latex209.dtx
+
+ * ltspace.dtx/ltlists.dtx
+
+ Moved \endtrivlist and friends to ltlists.dtx
+
+ * ltfiles.dtx (section{File Handling}):
+
+ Added check for zero \topskip to \begin{document}
+ Added some \longs
+
+ * ltspace.dtx
+
+ Made \vspace and \vspace* more efficient and more robust
+
+ Commented out unused code
+
+1995-05-25 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsubsection{Defining the page styles}): replace
+ \rmfamily with \normalfont (PR 1578)
+
+ * classes.dtx : Replace \reset@font by \normalfont
+ (subsubsection{Defining the page styles}): Replace
+ \hskip 1em\relax with \quad
+ Removed \rmfamily from definition of \@eqnnum (PR 1578, leqno)
+
+1995-05-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: Documented form from Tobi.
+
+1995-05-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: Exchange order of ltdefns and ltalloc
+ as latter now needs \@gobbletwo from former.
+
+ * usrguide.tex (subsection{Setting text susperscripts}):
+ \textsuperscript now access the current font (except for size
+ attribute)
+
+ * ltfloat.dtx: redefine \textsuperscript in terms of
+ \@textsuperscript
+
+ * ltdefns.dtx: new \typein implementation
+
+ * ltplain.dtx: New \newif implementation.
+
+1995-05-23 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dst: Added applemac.def.
+
+ * inputenc.dtx: Added applemac.def.
+ Added test for whether definition of a text character ends in a
+ macro.
+ Corrected \mathordfeminine and \mathordmasculine.
+
+ * inputenc.dst: Added applemac.def.
+
+1995-05-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * lttab.dtx: Add code and docstrip modules to support
+ autoloading of tabbing.
+
+1995-05-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltplain.dtx/ltfloat.dtx: Moved definitions of \footins and
+ \footnoterule from ltplain to ltfloat.
+
+1995-05-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latint.dtx:
+ Fix \DeclareMathRadical so that it does work (never did :-)
+
+1995-05-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx:
+ Updated \mathhexbox to use \mbox.
+
+ * ltmath.dtx:
+ Removed \mathhexbox from this file because it is essentially an
+ obsolete text command (despite the name). It is still in ltlain.dtx
+ Streamlined bits of code.
+
+ * latint.dtx:
+ coded \set@mathradical inline to save space.
+ Also fixed bug in \DeclareMathRadical.
+
+ * fontdef.dtx: defined \sqrtsign to be the square root symbol not
+ \sqrt since this is later overwritten by the kernel anyway.
+
+ * fam.dtx: removed definition of \on@line since already in lterror.dtx
+
+ * ltcounts.dtx:
+ Allow \fnsymbol in text and math now (neccessary for pr/1503).
+ Streamlined code for \@definecounter and \@arabic and friends.
+
+ * latex209.dtx (subsection{Layout}):
+ Added old definition for \@makefnmark and \thempfootnote to
+ use math mode. pr/1503
+
+ * ltfloat.dtx:
+ Moved \normalfont to \textsuperscript.
+
+1995-05-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpictur.dtx: Add code and docstrip modules to support
+ autoloading feature.
+
+1995-05-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltboxes.dtx:
+ Moved some code from ltplain to this file.
+
+ * ltspace.dtx:
+ Moved some code from ltplain to this file.
+
+ * latint.dtx:
+ Added some commands from NFSS1 compat code to \@preambleonly
+ to save space.
+
+ * fam.dtx:
+ Moved all compatibility code for NFSS1 interfaces to one place
+ to allow making them auto-loadable one day.
+
+ * usrguide.tex (subsection{Setting text susperscripts}):
+ Added a description of \textsuperscript. pr/1503
+
+1995-05-18 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx: replaced all \hbox to with \hb@xt@; replaced all
+ constructs such as \arabic{enumi} with \@arabic\c@enumi
+ Cleaned up the \changes entries
+ removed some unnecessary braces
+
+1995-05-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfloat.dtx:
+ Added \normalfont to the footnote mark (since it is now a text font).
+ For similar reason \thempfootnote needs \itshape to look like before.
+
+1995-05-17 Johannes Braams <latex-bugs@latex-project.org>
+
+ * slides.dtx: replaced all \hbox to with \hb@xt@; replaced all
+ constructs such as \arabic{enumi} with \@arabic\c@enumi
+ Cleaned up the \changes entries
+
+ * classes.dtx: replaced all \hbox to with \hb@xt@; replaced all
+ constructs such as \arabic{enumi} with \@arabic\c@enumi
+ (subsection{Footnotes}): Use \@width instead of width
+ (subsection{The title}): Use \cs{\@makefnmark} in definition of
+ \cs{@makefntext}
+ Cleaned up the \changes entries
+
+1995-05-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: make \g@addto@macro \long for latex/1522
+
+ * ltboxes.dtx: Removed surplus { } in \@irsbox
+
+ * ltlists.dtx: Start of documented version from Tobi.
+ Removed surplus { } and used `\thr@@' not `3 ' to save tokens.
+
+1995-05-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfloat.dtx (subsection{Footnotes}):
+ Added command \textsuperscript to provide footnotes with digits
+ in the text font. pr/1503
+ Streamlined bits of the code.
+
+ * readme.txt: updated.
+
+1995-05-16 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx: removed lots of unnecessary braces
+
+1995-05-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * unpack2e.ins: added tracefnt.sty generattion.
+
+ * ltsect.dtx:
+ Remove some surplus braces in \@startsection.
+
+ * fam.dtx:
+ Streamline some of the compat code.
+
+ * ltdefns.dtx:
+ Streamline code of \@typein slightly.
+
+ * fam.dtx:
+ Documentation update.
+
+ * tracefnt.dtx:
+ Further documentation.
+
+1995-05-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * usrguide.tex: Slightly re-word the `warning' in the\listfiles
+ description, for latex/1474.
+
+1995-05-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * tracefnt.dtx:
+ Updated the documentation.
+
+1995-05-13 Johannes Braams <latex-bugs@latex-project.org>
+
+ * alltt.dtx (section{The Implementation}): TeX goes into an
+ infinite loop when the alltt environment contains a construct such
+ as \( x' \); this can be prevented by restoring the original
+ definition of ' *inside* math mode.
+ Brought the definition of the alltt environment up-to-date with
+ the current definition of the verbatim environment.
+
+1995-05-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * tracefnt.dtx:
+ Updated \DeclareOption declarations to reflect ##1 -> #1 change. pr/1557
+
+1995-05-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Use a token register in \DeclareOption(*)
+ So that # need not be written as ##
+ INCOMPATIBLE CHANGE: see latex/1557
+
+ * ltpictur.dtx: Modify \picture so a missing ( in the first
+ argument generates an error. latex/1355
+ Add a few more macro environments.
+
+ * latex209.dtx: Restore old definition of \@footnotemark
+
+ * ltfloat.dtx: Add \nobreak to allow hyphenation before a
+ footnotemark.
+ Add loads of macro environments to the docs.
+
+1995-05-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx:
+ Moved a number of commands to different files following suggestions by
+ Ulrik Vieth. pr/1180
+
+ * ltmath.dtx:
+ Updates to \displ@y \displaylines \bmod to reflect changes in plain.tex.
+
+ * fontdef.dtx:
+ Upates to \skew \rightarrowfill \leftarrowfill \@vereq to reflect changes
+ in plain.tex.
+
+1995-05-09 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (\subsection{Bibliography}): Added a missing %-sign
+
+1995-05-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltbibl.dtx: Use \@firstofone instead of \@iden.
+ * tracefnt.dtx: Use \@firstofone instead of \@iden.
+ * ltdefns.dtx: Use \@firstofone instead of \@iden.
+
+1995-05-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx:
+ Updated definitions of \d and \b because of changes in plain.tex
+
+ * ltplain.dtx: Use \hb@xt@.
+ * ltsect.dtx: Use \hb@xt@.
+ * ltpictur.dtx: Use \hb@xt@.
+ * ltoutput.dtx: Use \hb@xt@.
+ * ltoutenc.dtx: Use \hb@xt@.
+ * ltboxes.dtx: Use \hb@xt@.
+
+ * ltdefns.dtx:
+ Added \hb@xt@ as abbreviation for "\hbox to".
+
+ * manifest.txt:
+ Added ltx3info.tex. Rearranged some bits.
+
+ * ltx3info.tex:
+ Added this file. Information about the latex3 project.
+
+ * cmfonts.dst:
+ Removed generation of OMLccm.fd file.
+
+ * unpacked.txt:
+ Removed surplus OMLccm.fd file. All concrete font files are now in
+ mfnfss.
+
+1995-05-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltsect.dtx (paragraph{...}):
+ Use \quad instead of \hskip 1em in \@seccntformat. pr/1596
+ Add \relax to prevent `plus/minus' problem with improper redefinition
+ of \@seccntformat. pr/1596
+
+1995-05-04 David Carlisle <latex-bugs@latex-project.org>
+
+* ltsect.dtx: Documented version from Tobias Oetiker.
+
+1995-05-03 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * idx.tex: Added missing curly brace in \setlength command.
+
+1995-05-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltsect.dtx:
+ Surround the . in \@dottedcontextline by \hbox to typeset it in the text
+ font. pr/1503
+ Don't reset to \rmfamily just to \normalfont in case the document font is
+ not the roman one. pr/1578
+
+1995-05-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpar.dtx: Documentation reworked by Tobias Oetiker.
+ (Thanks to Tobi for volunteering.)
+
+1995-04-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx (subsection{Robust commands and protect}):
+ Moved the initialisation of \protect to this file.
+
+ * ltcntrl.dtx:
+ Removed unused defs for \@setprotect and \@resetprotect.
+ Moved initialisation of \protect to ltdefns.dtx.
+
+ * ltpar.dtx (subsection{Implementation}):
+ Made \@par default to \@@par. (shorter)
+ Tobi kindly updated the documentation for this file.
+
+1995-04-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: Move some \leavevmodes earlier, for graphics/1512
+
+ * latex209.dtx: Add \hang and \textindent
+
+ * ltplain.dtx: Move \hang and \textindent to latex209.dtx
+ Remove some commands which are (re)defined later.
+
+1995-04-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltoutenc.dtx:
+ Add a number of \@onlypreamble commands to save space. pr/1240
+
+ * ltfiles.dtx (section{File Handling}):
+ Support for pr/1121. see below.
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Limited support for \AtBeginDocument{\begin{foo}}
+ \AtEndDocument{\end{foo}}.
+ Be careful to get the order right if you do it more than once. pr/1121
+
+ * unpacked.txt:
+ Added names of new encodings.
+
+1995-04-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: remove \the\every@math@size from \document
+ for latex/1407 + 1420 (from patch file)
+
+ * ltdefns.dtx: From patch file: make \@check@c \long
+ (latex/1346) \newenvironment argument handling /1507.
+
+ * ifthen.dtx: Fix `driver' docstrip guard. Reported by
+ Martin Schr"oder.
+
+1995-04-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpage.dtx: Reset \emergencystretch in \fussy latex /1344
+ (fom patch file). Clean up documentation slightly.
+
+ * ltcntrl.dtx: fix for /1317 (internal) \@for expanding its
+ argument incorectly
+
+ * ltxref.dtx:\newlabel \@onlypreamble for /1388 from patch file.
+
+ * ltbibl.dtx: Add \mbox to \cite for latex/1239 from patch file.
+ Make \@onlypreamble\bibcite /1388 (from patch file)
+ Add some macro envs to documentation.
+
+ * ltoutput.dtx: Modify docstrip guards to keep trace code out of
+ the kernel, unless `trace' specified.
+ 2 more fixes from patch file
+ latex/1451: newline command \\ in eqnarray and output routine
+ %%% latex/1392: AtBeginDvi broken
+
+ * latex209.dtx: Add \proclaim and \ttraggedright
+
+ * ltplain.dtx: Make \new... non outer: /1405 (from patch file)
+ Move \proclaim and \ttragedright to latex209.dtx
+
+1995-04-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltsect.dtx (section or \caption command.):
+ Implement \addcontentsline with \addtocontents to save space.
+
+ * manifest.txt:
+ Added begleit.err (errata for the German translation of the
+ LaTeX Companion).
+
+ * inputenc.dtx (section{The ISO Latin-1 encoding}):
+ \textonequarter and friends incorrectly declared as math chars.
+ (section{Default definitions for characters}):
+ Default values moved to own section.
+ (section{The ISO Latin-2 encoding}):
+ latin2 added. pr/1447.
+ (section{The IBM code page 850}):
+ cp850 added. pr/1330.
+
+1995-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx:
+ Removed surplus definition of \@gobble. pr/1361
+
+ * ltfiles.dtx:
+ Allow blanks within \includeonly argument. pr/1514
+
+ * cmfonts.fdd:
+ Fixed typo in OMLcmr. pr/1485
+
+ * syntonly.dtx:
+ Removed surplus \typeout lines containing the now undefined commands
+ \filedate etc. pr/1471
+
+1995-04-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: add \null to \k for latex/1274 (from patch file)
+
+ * Makefile (cleanupsrc): set date to June 1995
+
+ * ltclass.dtx: Fix filecontents and \DeclareOption
+ pr's 1487 and 1498 . (moved from patch file.)
+
+ * ltfinal.dtx: Modify to allow ltpatch.ltx (patch level 0)
+ For a full release. To solve problems of initial install picking
+ up old patch files.
+
+1995-04-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * makeindx.dtx:
+ Changed \see to use \emph as suggested by Mats Dahlgren.
+
+1995-04-14 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Margins}): Also take the
+ \marginparsep into account when calculating the width of the
+ margin paragraph.
+
+1995-04-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: Missing %%% identification.
+
+1995-04-03 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (Defining the page styles): Removed extra dot after
+ \thesection in article/twoside/headings case. (PR #1519)
+
+1995-04-02 Johannes Braams <latex-bugs@latex-project.org>
+
+ * slides.dtx: A slight documentation fix (PR #1517)
+
+ * alltt.dtx: A few documentation fixes (PR #1517)
+
+1995-04-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfntcmd.dtx (section{The implementation}):
+ Fixed problem with $...\it\mbox...$ in compat mode. pr/1275
+
+ * latint.dtx:
+ Fixed problem with $...\it\mbox...$ in compat mode. pr/1275
+
+ * newlfont.dtx: Corrected bad error message if math alphabet is
+ misused. pr/1440
+
+ * lfonts.dtx:
+ Corrected bad error message if math alphabet is misused. pr/1440
+
+ * latint.dtx:
+ Fixed problem with "\abovewithdelims(\rfloor 1pt"
+ pr/1329
+
+1995-03-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Fixes for latex/1460 (infinite looping on 2nd
+ \documentstyle command) and latex/1424 (\newcommand{\r}{})
+ Also wrap some long lines to 72.
+
+1995-03-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpatch.ltx: patch level 2
+
+ * patches.txt: patch level 2
+
+ * slides.dtx: Modify framebox redefinition for : graphics/1335
+
+1995-03-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexsym.dtx (section{The Implementation}):
+ Fixed lhd and friends which are supposed to be binary ops and not
+ relations. pr/1459
+
+1995-03-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.el (report-latex-bug): Support transient mark mode
+ Also use shell-command so that shell variables are initialised.
+
+1995-03-14 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx : Various documentation changes
+ (subsection{Customizing the labels}): Changed the width of the
+ labels slightly to prevent LaTeX stuffing two on each line
+ (PR #1375)
+
+1995-01-31 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Description}): made \descriptionlabel
+ a short command (PR #1399)
+ * letter.dtx (subsubsection{Description}): made \descriptionlabel
+ a short command (PR #1399)
+
+1995-01-27 Johannes Braams <latex-bugs@latex-project.org>
+
+ * alltt.dtx (section{The Implementation}): Reset \dospecials to
+ its original value after the modified version has been
+ executed. This is to make \verb?\{}? work inside the altt
+ environment (PR 1369)
+
+1995-01-12 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsection{Left equation numbering}): Added
+ \normalcolor to defintion of \@eqnnum (PR 1351)
+
+######################
+# 1994/12/01 Release
+######################
+
+1994-12-17 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews02.tex: Edited description of AMS-LaTeX to get everything
+ to fit onto one page.
+
+1994-12-16 Johannes Braams <latex-bugs@latex-project.org>
+
+ * slides.dtx (subsection{Macros for font handling}): Added the
+ declaration of the lasy font family.
+ Use \newcommand* for commands with arguments instead of
+ \newcommand.
+ * latexsym.dtx: Removed the former change by outdating the last
+ version.
+
+1994-12-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.el: (Matt Swift) Support old emacs (tested with 18.57
+ in addition to 19.28)
+
+1994-12-14 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx
+
+ Corrected typo
+
+ * usrguide.tex
+
+ Removed some commands
+
+ * cfgguide.tex
+
+ Tidying
+
+1994-12-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxguide.cls: add \par to verbatim redefinition.
+
+1994-12-14 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added braces to \copyright so it works unbraced in
+ subscripts.
+ Added \ifmmode check to \@changed@cmd so that redefinitions aren't
+ made in math mode (which can also foul up unbraced subscripts).
+ Commented out \textasciicircum,
+ \textasciitilde, \textbackslash, \textbar,
+ \textgreater, \texthyphenchar, \texthyphen and
+ \textless to save memory.
+
+1994-12-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * cfgguide.tex: A bit more detail re ltxdoc.cfg.
+
+ * directex.txt: lthyphen.cfg now hyphen.cfg.
+
+ * decustex.txt: lthyphen.cfg now hyphen.cfg.
+
+1994-12-12 Johannes Braams <latex-bugs@latex-project.org>
+
+ * latexsym.dtx (section{The Implementation}): Introduced the cs
+ \@fam@lasy to hold the name of the font family; this will either
+ be lasy or llasy, depending on whether the main class is slides or
+ not. This new cs is now also used to prevent loading the package
+ twice.
+
+ * slides.dtx (subsection{Font changing}): Define \cal and \mit using
+ \DeclareRobustCommand
+ (subsubsection{Enumerate}): Handle \labelenumi cs. like in
+ classes.dtx; using \theenumi in its definition
+ (subsection{Macros for font handling}): Made \familydefault point
+ to \sfdefault in slides.def (PR #1020)
+
+1994-12-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.el: Add missing (defvar ltxbug-mail-headers
+ (Matt Swift: latex/1255)
+
+ * ltxguide.cls: Stop \small in verbatim affecting previous para.
+
+ * manifest.txt: cfgguide.
+
+ * ltfloat.dtx: New version from Chris.
+
+1994-12-12 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Tidied up documentation.
+
+1994-12-11 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx
+
+ * cfgguide.tex
+
+ Major editing
+
+1994-12-11 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsection{Customizing the labels}): Redefined
+ \mlabel to use the new \parbox syntax instead of using the
+ \setbox primitive.
+ (subsection{Font changing}): Define \cal and \mit using
+ \DeclareRobustCommand
+ (subsection{The generic letter commands}): Use
+ \let\protect\@unexpandable@protect instead of redefining it.
+
+1994-12-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfntcmd.dtx (section{The implementation}):
+ Make arguments to \@fontswitch implicit, needed for \select@group
+ change.
+ Use \space command in \text@command directly for comparison.
+
+ * latint.dtx:
+ Surround \select@group with {} so that it can be used after _ and ^.
+
+ * fam.dtx (subsection{Macros for loading fonts}):
+ Don't define \ifG@defaultsubs via \newif to save macro names
+
+1994-12-10 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Removed useless catcode setting of ~.
+ Made letters active and undefined by default, rather than illegal.
+ Added `beta test' message.
+
+ * ltoutenc.dtx: Added documentation for the OML encoding, after
+ the last lot got lost by the server...
+ Replaced width with \@width in vrules.
+
+1994-12-09 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Captions}): Added the setting of
+ \if@minipage to false; floats now set it to true to prevent extra
+ white space from appearing when the float starts with a list; this
+ affected the spacing around a caption above a centered table.
+
+1994-12-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * cfgguide.tex: Initial draft, Configuration docs.
+
+ * ltbibl.dtx: Allow \bibliographystyle in the preamble.
+
+1994-12-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * usrguide.tex: \arraynewline RIP.
+
+ * lttab.dtx: Make \tabularnewline work in array.
+ \arraynewline deleted.
+
+ * latexbug.el: mention public database.
+
+ * latexbug.tex: Call category 0 LaTeX not base
+ Add >Confidential no field to all messages by default.
+ Add message about public database to final typeout.
+ Compress messages to fit on 25-line screen.
+
+ * usrguide.tex: mention list of packages in LaTeXBook.
+
+1994-12-08 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * bugs.txt: Added pointer to ltxbugs2html.
+
+ * ltoutenc.dtx: Added \null and \sh@ft to \b and \d.
+
+1994-12-07 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx: corrected checksum (PR #1243)
+
+1994-12-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * usrguide.tex: Document ltx3pub papers on ctan.
+ Other small corrections.
+
+1994-12-07 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * tlb1042.lvt: Rewrote test file to avoid printing out internal
+ details of how \ENC-cmd is implemented.
+
+ * tlb0552.lvt: Rewrote test file to do a showbox on $\_$ rather
+ than a \tracingall.
+
+1994-12-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * fntguide.tex fix dates.
+
+ * clsguide.tex: fix dates.
+
+ * usrguide.tex: fix dates.
+
+1994-12-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx:
+ Added <tab> to the ignored chars in \nfss@catcodes. pr/1064
+ Use \nfss@catcodes in \DeclareFontEncoding.
+ (subsection{Macros for loading fonts}):
+ set \nfss@catcodes locally to \relax in \try@load@fontshape
+ so that it isn't executed several times when an .fd file is
+ read in.
+
+ * updated various test files.
+
+1994-12-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Add \pause so messages do not scroll off screen.
+ Suggested by Rosemary Bailey.
+
+ * lablst.tex: Print labels verbatim, and input packages.
+ Fixing problems reported via c.t.t.
+
+1994-12-05 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added braces round the \ooalign in \textcircled.
+
+ * tlb1233.lvt: Added test file for unbraced \ooalign's.
+
+1994-12-02 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * fontdef.dtx: Commented out \ldots.
+
+ * lfonts.dtx: Commented out \copyright.
+
+ * tlb1214.lvt: Test file for symbols like \pounds.
+
+ * tlb1217.lvt: Test file for \a.
+
+ * ltoutenc.dtx: Fixed a bug with \a.
+
+ * cmfonts.fdd: Added font substitutions for \pounds.
+
+1994-12-01 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx : Made the oneside option work for the book class
+ (PR #1195)
+ (section{Initial Code}): Moved the allocation of \if@mainmatter to
+ this section in order to let it be known when the pagestyles are
+ defined. The switch is used there and needs to be known then;
+ otherwise TeX finds the wrong \fi in an \if@twoside...\else...\fi
+ construct.
+ (subsection{Font changing}): Define \cal and \mit using
+ \DeclareRobustCommand
+ (the driver): use \newcommand* for shorthands with argument
+ (whole file): Use \newcommand* for commands with arguments
+
+1994-12-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: lthyphen.ltx|cfg now hyphen.ltx|cfg
+
+ * ltfinal.dtx: lthyphen.ltx|cfg now hyphen.ltx|cfg
+
+ * lthyphen.dtx: lthyphen.ltx|cfg now hyphen.ltx|cfg
+
+ * texpert.txt: Document ltxcheck font checks.
+ lthyphen.cfg now (or soon will be) hyphen.cfg
+
+ * ltplain.dtx: remove some {oldcomments} and other tidying up.
+
+1994-11-30 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Chapters}): Made chapter titles more
+ robust against pagebreaks in the middle of them. Added an extra
+ \nobreak and a \interlinepenalty\@M to \@makechapterhead and
+ \@makeschapterhead (PR #1016, #1135)
+
+1994-11-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: Use new \@dofilelist.
+
+ * ltmiscen.dtx: Add new \@dofilelist to \enddocument
+ Move some of the warnings in \enddocument out of \if@filesw.
+
+ * Makefile (TEXTS): add latexbug.el
+
+ * unpack2e.ins: add pict2e and graphpap.
+
+1994-11-30 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * fam.dtx: Set \FOO-cmd to \@current@cmd rather than \relax when
+ entering encoding FOO.
+
+ * ltoutenc.dtx: Made text commands expand (almost) entirely in the
+ mouth.
+
+1994-11-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltcntrl.dtx: Doc improvements.
+
+1994-11-28 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: Corrected \changes entries.
+
+ * ltfiles.dtx: Corrected \changes entries.
+
+ * lterror.dtx: Corrected \changes entries.
+
+ * ltxref.dtx: Corrected \changes entries.
+
+ * ltsect.dtx: Corrected \changes entries.
+
+ * ltidxglo.dtx: Corrected \changes entries.
+
+ * lttab.dtx: Corrected \changes entries (wrong format).
+
+ * ltoutenc.dtx: Added new definitions of \b, \c and \d.
+ Fixed bug with accents on commands which aren't allowed in
+ \csname.
+
+ * inputenc.dtx: Moved a docstrip option to it's correct home.
+
+ * latex209.dtx: Added hacks for space around floats.
+
+ * tlb1184.lvt: Added check file for default accent and symbol
+ definitions.
+
+1994-11-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: Comment out lots of now obsolete code.
+
+ * source2e.tex: Add source2e.ist, and other small improvements.
+
+1994-11-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * unpack2e.dst: Correct the preamble written to generated files.
+
+ * ltdefns.dtx: modify \newenvironment so that a graf environment
+ is not allowed (Piet van Oostrum latex/1037). Previous attemt
+ to do this removed...
+
+1994-11-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: typos.. (Ulrik Vieth)
+
+ * usrguide.tex: Small updates, and typos. Add xr.sty.
+
+ * latexbug.el: Make completion case insensitive.
+
+ * latexbug.tex: Prompt for >Class if no test file given.
+
+1994-11-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * clsguide.tex: typo in decls argument.
+
+ * latint.dtx: wrap long lines.
+
+ * source2e.tex: Make frontmatter \pagenumbering{roman}
+ So can be processed with only 2 latex runs. (Ulrik Vieth)
+ Add lthyphen.dtx.
+
+1994-11-22 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * tlb0574.lvt: Added check file for empyt accents and accents in
+ tocs.
+
+ * ltoutenc.dtx: Fixed `empty accent' bug.
+
+ * inputenc.dtx: Fixed typo A1 -> A0.
+
+1994-11-21 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Fixed \dots so that it has no extra space in a
+ monowidth font.
+ Corrected typo in the definition of \mathunderscore.
+
+ * inputenc.dtx: Added \textregistered.
+ Added "A0 (nbs) to Latin-1.
+
+1994-11-20 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx
+
+ * ltoutput.dtx
+
+ * ltxguide.cls
+
+ Tidied formatting
+
+ * patches.txt
+
+ Updated
+
+ * bugs.txt
+
+ Updated
+
+ * install.txt
+
+ Updated
+
+ * template.txt
+
+ Updated
+
+ * texpert.txt
+
+ Updated
+
+ * usrguide.tex
+
+ Major update
+
+ * clsguide.tex
+
+ Major update
+
+ * fntguide.tex
+
+ Major update
+
+1994-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: reallow 8-bit input.
+
+ * ltboxes.dtx: Add \color@vbox
+
+ * tracefnt.dtx: \next renamed to \reserved@f
+
+ * fam.dtx: \next renamed to \reserved@f
+
+ * latint.dtx: use \expandafter instead of \next in
+ \DeclareMathDelimiter.
+
+ * ltplain.dtx: Remove \pt, now defined elsewhere.
+
+ * ltmath.dtx Use \expandafter trick instead of \next
+ in a' \phantom and \smash. Colour support to \phantom and \smash
+
+1994-11-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: remove \phantom (now in ltmath)
+
+ * fam.dtx: Replace \@tempa by \reserved@a.
+
+ * latint.dtx: Replace \@tempa by \reserved@a.
+
+ * ltboxes.dtx: Replace \@tempa by \reserved@a.
+
+ * ltclass.dtx: Replace \@tempa by \reserved@a.
+
+ * ltcntlen.dtx: Replace \@tempa by \reserved@a.
+
+ * ltcntrl.dtx: Replace \@tempa by \reserved@a.
+
+ * ltdefns.dtx: Replace \@tempa by \reserved@a.
+
+ * ltdirchk.dtx: Replace \@tempa by \reserved@a.
+
+ * lterror.dtx: Replace \@tempa by \reserved@a.
+
+ * ltfiles.dtx: Replace \@tempa by \reserved@a.
+
+ * ltfinal.dtx: Replace \@tempa by \reserved@a.
+
+ * ltfloat.dtx: Replace \@tempa by \reserved@a.
+
+ * ltfntcmd.dtx: Replace \@tempa by \reserved@a.
+
+ * ltmath.dtx: Replace \@tempa by \reserved@a.
+
+ * ltmiscen.dtx: Replace \@tempa by \reserved@a.
+
+ * ltoutenc.dtx: Replace \@tempa by \reserved@a.
+
+ * ltoutput.dtx: Replace \@tempa by \reserved@a.
+
+ * ltpictur.dtx: Replace \@tempa by \reserved@a.
+
+ * ltsect.dtx: Replace \@tempa by \reserved@a.
+
+ * lttab.dtx: Replace \@tempa by \reserved@a.
+
+ * tracefnt.dtx: Replace \@tempa by \reserved@a.
+
+1994-11-16 Chris Rowley <latex-bugs@latex-project.org>
+
+ * latex209.dtx
+
+ Restored 2e logo
+
+1994-11-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * fontdef.dtx: Remove \{ and \}
+
+1994-11-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * ifthen.dtx: Use \@unexpandable@protect and modify
+ \@setref to fix bug /946 (/1023) \pageref breaking tests.
+
+1994-11-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * lttab.dtx: Add \tabularnewline and \arraynewline.
+
+ * ltspace.dtx: Make \\ robust
+
+1994-11-12 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx
+
+ Tidied \endtrivlists
+
+ * ltspace.dtx
+
+ Attempted to improve error messages
+
+ * ltfntcmd.dtx
+
+ Added line-break to error message
+
+ * lablst.tex
+
+ Simpler with better layout
+
+1994-11-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: replace sfcode settings. Remove \dag and friends.
+
+1994-11-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * makeindx.dtx: remove spurious \wlog.
+
+1994-11-10 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltbibl.dtx
+
+ Patched \nocite{*}
+
+ * ltplain.dtx
+
+1994-11-10 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsection{Flush left equations}): Added the value
+ of \parskip to \abovedisplayskip to compensate for negative
+ \topsep settings. (PR #881)
+ (subsection{Single or double sided printing}): removed typo (PR
+ #881)
+
+ * slides.dtx (subsection{Font changing}): Removed two typos
+
+1994-11-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: use new definition of \loop
+
+ * ltoutput.dtx: modify \protect setting.
+
+ * newlfont.dtx: modify \ProvidesFile usage.
+
+ * oldlfont.dtx: modify \ProvidesFile usage.
+
+1994-11-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * lthyphen.dtx: Use \ProvidesFile.
+
+ * lfonts.dtx: Use \ProvidesFile.
+
+ * setsize.dtx: RIP
+
+ * fam.dtx: Add definitions of \@vpt (from setsize.dtx).
+
+ * fontdef.dtx: Add \DeclareMathSizes (from setsize.dtx).
+
+ * Makefile: Generate new release date 1994/12/01
+ Remove setfile.dtx from generation of ltfss.dtx
+
+ * ltpatch.ltx: Change to patch 1994/12/01 release.
+
+ * ltboxes.dtx: More colour changes.
+ Fix \@finalstrut (from ltpatch).
+
+ * source2e.tex: Move ltoutenc. Add fontdef and preload.
+
+1994-11-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * fontdef.dtx: Use GetFileInfo style doc header.
+
+ * preload.dtx: Use GetFileInfo style doc header.
+
+ * ltdefns.dtx: Move \newwrite's to ltfiles.
+
+ * ltfiles.dtx: Move \newwrite's here from ltdefns. Remove
+ duplcate decalaration of \@mainaux.
+
+1994-11-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltboxes.dtx:
+ Added braces again that have been incorrectly removed.
+
+ * test files:
+ Updated a large number of test files that had changed
+ due to protect handling changes and bug fix in font selection.
+
+ * oldlfont.dtx:
+ Test for \protect being \@typeset@protect in \@setfontsize.
+
+ * newlfont.dtx:
+ Test for \protect being \@typeset@protect in \@setfontsize.
+
+ * lfonts.dtx:
+ Test for \protect being \@typeset@protect in \@setfontsize.
+
+ * exscale.dtx:
+ Renamed \every@size to \every@math@size.
+ Update \big@size globally (new \every@math@size concept).
+
+ * ltfiles.dtx:
+ Renamed \every@size to \every@math@size.
+
+ * fam.dtx:
+ Renamed \every@size to \every@math@size.
+ Allow several encoding changes before running \selectfont. pr/1042
+
+ * tracefnt.dtx (section{Scaled font extraction}):
+ Changed the font size substitution to really select
+ the nearest size available. pr/747
+ Fixed incorrect size selection if math fonts are not set up. pr/848
+ Start cleaning up documentation.
+ Fix bug that produced extra "No math setup" message if
+ tracefont was loaded with default options.
+
+ Patched \loop
+
+1994-11-05 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx (subsection{Floating Environments}):
+
+ Introduced \color@hbox
+ Changed colour resetting for footnotes (again)
+ Introduced a simulacrum of compatibility to old \@xfloat
+ Changed float setup
+
+ * ltboxes.dtx (section{\LaTeX\ Box commands}):
+
+ Introduced \color@hbox
+ Changed colour resetting for minipage footnotes
+ Added to documentation
+
+ * ltoutput.dtx (subsection{Floats}):
+
+ Introduced \color@hbox
+ New style protect settings in shipout
+ Tidied shipout and added to documentation
+ Added begindvi stuff
+
+1994-11-05 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added setting of \@typeset@protect to \patterns
+ and \hyphenation.
+
+ * ltnews02.tex: First draft.
+
+1994-11-04 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx: Added \protected@xdef to \footnote, \@footnotetext,
+ and \footnotemark.
+
+ * ltoutenc.dtx: Added \_.
+
+ * ltpage.dtx: Added \@unexpandable@protect to \markboth and
+ \markright.
+
+ * lttab.dtx: Added \set@typeset@protect to \@array and
+ \multicolumn.
+ Added \@unexpandable@protect to \@mkpream.
+
+ * ltboxes.dtx: Added \protected@edef to \@mpfootnotetext.
+
+ * ltidxglo.dtx: Added \protected@write to \index and \glossary.
+ Removed \if@filesw from \makeindex and \makeglossary.
+
+ * ltsect.dtx: Added \protected@write to \addtocontents and
+ \addcontentsline.
+ Added \protected@edef to \@sect.
+ Added \protected@xdef to \thanks.
+
+ * ltxref.dtx: Added \protected@write to \label.
+ Added \protected@edef to \refstepcounter.
+
+ * ltmiscen.dtx: Removed setting of \protect from \@writefile.
+
+ * lterror.dtx: Added \set@display@protect to messages.
+
+ * ltfiles.dtx: Added \protected@write and a new definition of
+ \nofiles.
+
+ * ltdefns.dtx: Added \x@protect and a new mechanism for protecting
+ short commands.
+ Added commands for safely performing edefs.
+ Added \set@display@protect to \typeout
+
+1994-11-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Check that latex.ltx is used with an initex with
+ no format preloaded. (VMS initex defaults to loading
+ plain.fmt)
+
+ * ltdefns.dtx: rename \long@def to \l@ngrel@x
+
+ * ltclass.dtx: move \@missingfileerror to ltfiles.
+
+ * ltfiles.dtx: add \@missingfileerror
+
+1994-11-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.el 2nd attempt.
+
+ * latexbug.tex: more alterations to work with .el file.
+
+1994-11-02 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Wrapped long lines.
+
+1994-10-31 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Add line count to discourage large test files.
+
+1994-10-31 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * Makefile: Added inputenc.dst and ltoutenc.dst, and inputenc.dtx.
+
+ * fontdef.dtx: Added OMLenc.def.
+
+ * unpack2e.ins: Added inputenc.ins.
+
+ * unpacked.txt: Added inputenc.sty, font encoding and input
+ encoding files.
+
+ * fntguide.tex: Added documentation on the new text declaration
+ commands.
+
+ * usrguide.tex: Added documentation on the new text commands.
+
+1994-10-30 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx (subsection{Floating Environments}):
+
+ In float handling:
+ major changes to parameter parsing, setting of local
+ variables, etc;
+ two-column and one-column cases merged; space hacks moved;
+ colour support improved and corrected, including extra boxes.
+ In marginpars:
+ colour support improved and corrected, including extra boxes.
+ In footnotes:
+ colour support improved.
+
+ * ltoutput.dtx (subsection{Floats}):
+
+ Small changes to documentation
+ Added colour support to \@topnewpage
+ Added colour support for footnotes to \@makecol
+ Added warning to \@fpsadddefault
+
+ * ltdefns.dtx (subsection{Internal defining commands}):
+
+ Added \@onelevel@sanitize
+
+1994-10-30 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * cmfonts.dst: Added OMScmnr and OMLcmr.
+
+ * cmfonts.fdd: Added OMScmr and OMLcmr.
+
+ * ltxguide.cls: Added \NEWdescription, \NEWfeature and the
+ optional argument to desc.
+
+ * ltoutenc.dst: Added OMLenc.def.
+
+ * ltoutenc.dtx: added encoding-specific commands from ltmath.
+ Added OML encoding.
+ Added \textcircled and removed \textregistered.
+ Added \DeclareTextCompositeCommand.
+ Added \t.
+
+ * ltmath.dtx: Removed encoding-specific commands to ltoutenc.
+
+1994-10-29 Johannes Braams <latex-bugs@latex-project.org>
+
+ * Makefile: Added the alltt package.
+
+ * alltt.dtx (section{The Implementation}): Added a missing
+ \dospecials in the alltt environment code.
+
+ * classes.dtx (section{Cross Referencing}): Fixed a typo in the
+ documentation of \@tocrmarg. (PR #904)
+
+1994-10-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * Makefile (INSTS):
+ Added ltoutenc.ins.
+
+ * manifest.txt:
+ Added ltoutenc.ins.
+
+1994-10-29 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * fontsmpl.dtx: Added tests for \copyright, \dots and
+ \textregistered.
+
+ * ltmath.dtx: Added \mathellipsis, \mathparagraph, etc.
+ Removed all of the oldcomments and generally tidied up.
+ Added \DeclareMathOperator.
+
+ * ltoutenc.dtx: Added copyright and textregistered.
+ Renamed the text versions of \P, \S, etc. to \textparagraph,
+ \textsection, etc.
+ Added the definitions of \dots etc. which work in math and text.
+
+1994-10-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx:
+ Added a numer of \noexpand's to \err@rel@i. pr/1088
+
+1994-10-28 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: Added OMSenc.def.
+
+ * fontsmpl.dtx: Added the text commands defined in ltoutenc.dtx.
+
+ * asajtest.ins: An installation file for asajtest.dtx.
+
+ * asajtest.tex: A test file for ltoutenc.dtx. This should become
+ part of the test suite eventually.
+
+ * asajtest.dtx: This is a scratch version of ltoutenc.dtx.
+ Rewrote the enc.def files to use the new default settings.
+
+1994-10-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.el: First attempt at emacs interface.
+
+1994-10-27 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Removed loading of enc.def files.
+
+ * fontdef.dtx: Added OMSenc.def.
+
+ * ltoutenc.dst: Added OMSenc.def.
+
+1994-10-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: Add ltmath.
+
+1994-10-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: Add documentation of star form of \newcommand.
+ Remove all `oldcomments' environments.
+ Add lots of `macro' environments.
+
+ * ltboxes.dtx: missing % in \@isavepicbox (was in ltpatch.ltx)
+
+1994-10-25 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Added default encodings.
+ Added \ProvideTextCommand and \ProvideTextCommandDefault.
+ Added the OMS encoding.
+
+1994-10-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltmath.dtx:
+
+ Removed a TAB
+
+1994-10-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: Add inner braces to fbox to keep inner settings
+ of \fboxsep local (latex/1061)
+
+1994-10-23 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltmath.dtx:
+
+ Added \normalcolor to \@eqnnum
+ Removed braces from \ensuremath
+
+1994-10-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Modify pkgindoc because of Tuesday's change.
+
+1994-10-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltboxes.dtx:
+ Put \changes cmd behind % :-)
+
+1994-10-20 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Split characters into text-only and math-only.
+ Reded some of the \providecommand's in latin1.def.
+
+ * latex209.dtx: Corrected a typo---\mark{}{} should have been
+ \mark{{}{}}.
+
+1994-10-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx:
+ Added missing \relax to \DeclareFontEncoding so the args can
+ contain newlines. pr/1026
+
+1994-10-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdefns.dtx: Add *-forms to define non-long variants of
+ commands.
+ Add extra check so \newenvironment{graf} generates an error.
+
+ * ltfiles.dtx: move \listfiles and \@addtofilelist here.
+
+ * ltclass.dtx: move \listfiles and \@addtofilelist to ltfiles.
+
+1994-10-17 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Added empty initial mark.
+ New method of switching off 2e commands.
+ Allow \newcommand on 2e commands.
+
+1994-10-16 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltsect.dtx:
+
+ Added \normalcolor to page-numbers in toc
+
+ * ltfntcmd.dtx:
+
+ Tidying, and typos fixed in documentation
+ Added check for empty text
+ Removed space from \nfss@text
+ Renamed \check@nocorr to \text@command:
+ to improve error messages
+
+ * ltboxes.dtx (section{\LaTeX\ Box commands}):
+
+ Added \long to \fbox, \mbox, \sbox (from ltpatch)
+ \leavevmode corrected for frame boxes (from ltpatch)
+ \@parboxto macro added to \@iiiparbox,
+ to remove misuse of \@empty
+
+1994-10-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: stop expansion occurring on synopsis and other
+ fields.
+
+1994-10-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * nfssfont.dtx:
+ Change \end to \stop in help message. pr/615
+
+1994-10-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx:
+ Warn, if math alphabet is used outside math (from patch)
+
+ * fontdef.dtx (subsubsection{The log-like functions}):
+ Somehow lost \operator@font while moving code.
+
+ * ltmath.dtx:
+ Comment out definition of \, is defined earlier as robust
+
+ * fam.dtx:
+ Added [ and ] to the reset macro for .fd file loading pr/872
+
+1994-10-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Add latexbug.cfg system, so that personal
+ details do not need to be entered every time.
+
+1994-10-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx:
+ Separate text font and math font setup. Added a lot of math
+ font setup stuff from other files.
+
+ * ltmath.dtx:
+ File added to the distribution.
+
+ * manifest.txt:
+ Added new files.
+
+ * ltmiscen.dtx:
+ Moved math enviornments to ltmath.dtx
+
+ * unpack2e.ins:
+ Added fontmath.ltx and fonttext.ltx generation,
+ removed fontdef.ltx generation,
+
+ * doc.dtx (subsection{Macros for generating index entries}):
+ Added missing percent and use \ttfamily not \texttt
+
+1994-10-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx (section{Plain \TeX}):
+ Moved math code to ltmath.dtx.
+ Removed old code that was commented out long time ago.
+
+ * lfonts.dtx:
+ Moved log-like functions to ltmath.dtx.
+ Removed the unnecessary refernce to \tenex.
+
+1994-10-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Add more GNATS fields.
+
+ * ltsect.dtx: remove < > from a \changes entry (upset makeindex)
+
+1994-10-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Redo ltxcheck: more friendly messages, check
+ for TeX3.14, and missing fonts.
+ Add automatic detection of TeX3.14 (previously in ltpatch.ltx)
+
+ * latexbug.tex: Modify to prompt for synopsis information.
+
+1994-10-07 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * pastex.txt: Installation guide for PasTeX on the Amiga.
+
+ * ltoutenc.dtx: Moved ogonek accent.
+
+1994-09-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * idx.tex:
+ Add missing brace in \setlength. pr/589
+
+1994-09-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexsym.dtx (subsection{\LaTeX{} symbols fonts}):
+ Use silent substitution for the bold lasy fonts below 10pt
+
+1994-09-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: Fix \newcount typo (which caused `4pt' to appear
+ in the change log and index)
+
+ * manifest.txt: added pctex.txt
+
+ * Makefile (TEXTS): added pctex.txt
+
+ * pctex.txt: New version from PCI
+
+1994-09-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpatch.ltx:
+ patch for pr872 ([] with catcode active)
+
+1994-09-23 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Added spaces to \@halfmag and friends.
+
+ * ltxguide.cls: Replaced \PassOptionsToPackage{article} by
+ \PassOptionsToClass{article}.
+
+1994-09-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * manifest.txt: add graphpap.{ins|dtx}
+
+ * Makefile: add graphpap.{dst|ins|dtx}
+
+ * manifest.txt: Add textures.txt, pict2e.{ins|dtx}
+
+ * Makefile: Add textures.txt, pict2e.{dst|ins|dtx}
+
+ * pict2e.dtx: Wrote pict2e.dtx (It just generates an error
+ message, saying the package has not been written)
+
+1994-09-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Modify printing of \everyjob so babel formats
+ work correctly.
+
+1994-09-04 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Added \cs{DeclareInputComposite} and the
+ \cs{ProvidesCommand}s to the encoding files.
+ Removed the definition of the accent slots in Latin-1.
+
+1994-08-31 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * oztex.txt: Checked in revised version from Andrew.
+
+1994-08-30 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * yandytex.txt: Checked in revised version from Berthold.
+
+1994-08-26 Johannes Braams <latex-bugs@latex-project.org>
+
+ * slides.dtx (subsection{Font changing}): changed documentation to
+ mention \DeclareOldFontCommand instead of @renewfontswitch (PR #812)
+
+ * letter.dtx (section{The documentation driver file}): added
+ missing comma in a \DoNotIndex entry (PR #857)
+ (subsection{Setting Paper Sizes}): Added the landscape option,
+ because Leslie Lamport wants to make landscape letters.
+
+1994-08-24 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * tlb0143.lvt, tlb0162.lvt, tlb0380.lvt, tlb0498.lvt, tlb0642.lvt,
+ tlb0830.lvt: Checked in.
+
+1994-08-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphpap.dtx: add \leavevmode to \graphpaper.
+
+ * textures.txt: Added file. Mainly written by Blue Sky Research.
+
+######################
+# 1994/06/01 PL3 Release
+######################
+
+1994-07-28 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Correct Checksum.
+
+1994-07-27 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews.cls: Replaced \PassOptionToClass by \PassOptionsToClass.
+
+1994-07-25 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * microtex.txt: Removed extraneous \dump.
+
+1994-07-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Add definition of \@secondoftwo, so latexbug
+ may once again be used with initex.
+
+1994-07-18 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * microtex.txt: Added installation guide for MicroTeX.
+
+1994-07-14 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * inputenc.dtx: Replaced \Dh by \DH and \Th by \TH.
+ Added \ensuremath to the math commands.
+ Added \inputencoding.
+
+1994-07-13 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Margins}): Moved the rounding of
+ \topmargin into native mode only (PR #93)
+
+ * letter.dtx (subsubsection{The dimension of text}): The setting
+ of \textwidth and \textheight to a fixed value should only happen
+ in comnpatibility mode. (PR #714)
+ (subsubsection{Margins}): Added fixed values for \oddsidemargin,
+ \evensidemargin and \marginparwidth to compatibility mode
+
+1994-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * patches.txt:
+ Added description for additional patches.
+
+ * ltpatch.ltx:
+ Added patches for:
+ \ensuremath
+ \LaTeXe not allowed in compat mode (exception)
+
+ * usrguide.tex (subsection{Ensuring math mode}):
+ Corrected the description of \ensuremath so that it really does nothing
+ other than producing its argument in math mode.
+
+ * cmfonts.fdd:
+ Added additional font shapes for Concrete Roman Fonts
+
+1994-07-13 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * fontsmpl.dtx: Added an \upshape.
+
+1994-07-11 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsubsection{Itemize}): \labelitemiii was
+ mistakenly called \labelitemiiii (bug report # 711)
+
+1994-07-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpatch.ltx: added patch for latex/667, minipage and \parbox
+ failing if used with height argument before math setup.
+
+1994-07-05 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpatch.ltx:
+ Added patches for:
+ empty p-column problem
+ figure* with color package problem
+ \^{\i} in toc problem (T1 encoding)
+
+ * patches.txt:
+ Added description for additional patches.
+
+1994-07-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpatch.ltx:
+ Extended patch for T1+german so that composite chars are used instead of
+ accents
+
+1994-07-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpatch.ltx:
+ Added patches for:
+ \mathit in text mode
+ \loop could do one iteration too much in certain situations
+ T1 breaks german 2.4a (this is a german.sty problem actually)
+
+ * patches.txt:
+ Added descritions of further patch level 3 patches.
+
+
+1994-06-30 Chris Rowley <latex-bugs@latex-project.org>
+
+ * fntguide.tex
+
+ Warning about enc.def commands added
+ Stuff on font definition files and encoding definition files
+ changed
+ <cdp> removed, for consistency, use <encoding> throughout
+ Small edits
+
+ * clsguide.tex
+
+ Michael's amendments added
+
+1994-06-26 Chris Rowley <latex-bugs@latex-project.org>
+
+ * usrguide.tex
+
+ Minor edits
+
+ * clsguide.tex
+
+ Added stuff
+ Changed usage of <>
+ Reordered update stuff
+ Added Summary sheet
+ Removed draft status
+
+ * ltxguide.cls
+
+1994-06-23 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsection{Global Declarations}): Removed a typo
+ (#[] instead of [1])
+ Ran letter.dtx through ispell.
+
+1994-06-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * patches.txt:
+ Added descritions of patch level 3 patches.
+
+ * ltpatch.ltx:
+ Added patches for:
+ inefficient text encoding handling
+ \"\i problem
+ \"{} problem
+ \dag \ddag \P \S lost sometimes
+ \t problem
+ \test..{} problem
+
+ Changed usage of <>
+ Changed definition of verbatim
+
+1994-06-22 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx (section{The implementation}):
+
+ Removed space from \DeclareTextCommand
+ Improved error messages from \DeclareTextCommand
+
+ * usrguide.tex
+
+ Changed usage of <>
+
+ * clsguide.tex
+
+ Added stuff
+ Changed usage of <>
+ Rationalised encoding stuff
+
+ * fntguide.tex
+
+ Rationalised usage of cdp, ENC, encoding
+ Changed usage of <>
+ Fixed overfull box and long lines
+
+1994-06-22 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsection{Flush left equations}): Defer the
+ setting of \mathindent to the end of the class instead of to
+ \begin{document}. This way it is possible for packages to change
+ its value (fixes bug report #577)
+ Refrased a few sentences to prevent overfull hbox messages.
+
+1994-06-19 Chris Rowley <latex-bugs@latex-project.org>
+
+ * usrguide.tex
+
+ Added stuff on project, money etc.
+
+ * fntguide.tex
+
+ Corrcted largesymbols stuff.
+
+ * clsguide.tex
+
+ Major revision and additons.
+ Spell checked.
+ Removed \typeouts.
+ Removed overfull boxes.
+
+ * ltfntcmd.dtx:
+
+ Experimental fixes to \nocorr stuff.
+
+1994-06-17 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsubsection{Defining the page styles}): Added a
+ missing closing brace. Made a lot of small changes to the
+ documentation.
+
+1994-06-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * update.ins: modify for new distribution `ins' files.
+
+1994-06-12 Chris Rowley <latex-bugs@latex-project.org>
+
+ * template.txt
+
+ Changed 2e to new.
+
+ * fntguide.tex
+
+ Tidying.
+
+ * directex.txt
+
+ Corrected layout.
+
+1994-06-12 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * Makefile: Split distrib directory into distrib/base and
+ distrib/unpacked.
+
+ * ltpatch.dtx: Don't set catcodes of upper 128 characters in
+ TeX2.
+
+ * manifest.txt: Added directex.txt.
+
+ * Makefile (TEXTS): Added directex.txt.
+
+1994-06-11 Chris Rowley <latex-bugs@latex-project.org>
+
+ * usrguide.tex
+
+ Typography of tools list changed.
+ Added typeouts.
+ Added letter to list of standard packages.
+ Removed these typeouts:
+ \typeout{CONTENTS OF THE TOOLS BUNDLE: needs checking}
+ \typeout{Marion said: Perhaps the different uses of
+ `newcommand and `providecommand can be shown a bit clearer}
+ \typeout{List of stuff in mfnfss, psnfss, babel not done}
+
+ * fntguide.tex
+
+ Editorial changes.
+ Removed duplicated text.
+ Removed unwanted blank lines.
+
+ * emtex.txt
+
+ Added section on memory problems.
+
+ * directex.txt
+
+ New file added.
+
+ * install.txt
+
+ Added new file to list.
+
+ * readme.txt
+
+ Editorial changes.
+ Added patches.txt, etc.
+
+ * patches.txt
+
+ Editorial changes.
+ Removed references to lists.
+ Documented lack of lists.
+
+ * ltfntcmd.dtx
+
+ Corrected documentation, title etc.
+ Corrected dates in changes entries.
+
+1994-06-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * patches.txt:
+ Added descritions of patch level 2 patches.
+
+ * ltpatch.ltx:
+ Added patches for:
+ 8bit chars problem
+ \nocite{*} problem
+ \_ in math mode (T1 encoding)
+
+ * added tests for problem 549, 554, 557.
+
+
+1994-06-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * manifest.txt: Added ltpatch.ltx and patches.txt.
+
+ * ltfinal.dtx (subsection{Input encoding}): Do not set codes for
+ higher half of character table for TeX2.
+
+1994-06-09 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * Makefile (LATEXS): Added ltpatch.ltx.
+
+1994-06-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx (subsection{Bells and whistles}):
+ Use new definitions for footnote macros within \maketitle.
+ Otherwise \thanks entries will overprint.
+
+ * docstrip.dtx:
+ Corrected typo in documentation
+
+1994-06-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpatch.ltx: New file fixing bugs in the major release.
+
+ * ltfinal.dtx: Add new feature input ltpatch.ltx if the file
+ exists.
+
+ * latexbug.tex: Add babel.
+ Use \everyjob to print format info (for new patch system)
+
+1994-06-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: Fix bug introduced last week. Add \leavevmode to
+ \fbox, and make \long. At the same time make \sbox and \mbox
+ \long even though they were not \long in 2.09.
+
+1994-06-06 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * Makefile.dist: Changed mv to cp, added installation of *.ist
+ files, added target `clean'.
+
+ * manifest.txt: Changed name of distributed Makefile from
+ Makefile to Makefile.unx.
+
+ * Makefile: Changed name of distributed Makefile from Makefile
+ to Makefile.unx.
+
+1994-06-03 Chris Rowley <latex-bugs@latex-project.org>
+
+ * usrguide.tex
+
+ Changed preamble.
+
+ * fntguide.tex
+
+ Changed preamble.
+
+ * clsguide.tex
+
+ Changed preamble.
+
+1994-06-02 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (section{Identification}): Fixed bug in the driver,
+ the line with \ProvidesFile was not seen by LaTeX
+ (section{A driver for this document}): rearranged the \DoNotIndex
+ stuff
+
+######################
+# 1994/06/01 Release
+######################
+
+1994-06-02 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * copyright.txt and others: Changed copyright message.
+
+1994-06-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: Modify \framebox and \fbox so \width in the
+ optional argument of \framebox refers to the natural width
+ of the text,
+
+ * latexbug.tex: add amslatex category.
+
+ * ltlogos.dtx: add $\m@th$ to \LaTeX to force math size
+ calculations.
+
+1994-06-01 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * letter.dtx: Corrected driver code.
+
+ * slides.dtx: Added definition of \SLiTeX.
+
+ * Makefile: Don't add extra copyright headers to *.txt and *.err
+ files.
+
+1994-06-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fntguide.tex:
+ Added description of \DeclareTextFontCommand.
+ Small updates and changes.
+
+ * clsguide.tex:
+ Updates and corrections.
+
+ * latint.dtx:
+ Corrected help info for \newmathalphabet error
+ in compat mode.
+
+ * fntguide.tex:
+ Several small updates.
+
+1994-06-01 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews01.tex: Corrected grammar.
+
+1994-05-31 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx:
+
+ Removed overfull boxes.
+
+1994-05-31 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Switch to new latex-bugs@uni-mainz.de
+ address.
+
+1994-05-31 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * Makefile: Added clsguide.tex, fntguide.tex, usrguide.tex,
+ ltnews01.tex, ltxguide.cls, ltnews.cls.
+
+ * ltfinal.dtx: Renamed lthyphen.* to lthyphen.*.
+
+ * unpacked.txt: Renamed lthyphen.* to lthyphen.*.
+
+ * unpack2e.ins: Renamed lthyphen.* to lthyphen.*.
+
+ * manifest.txt: Renamed lthyphen.dtx to lthyphen.dtx, added
+ clsguide.tex, fntguide.tex, usrguide.tex, ltnews01.tex,
+ ltxguide.cls, ltnews.cls, ltnews01.ps, manual.err, compan.err.
+
+1994-05-31 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Added SLiTeX logo again.
+
+ * ltnews01.tex: Finished off.
+
+ * ltnews.cls: Added downloaded PS fonts options.
+ Removed angle brackets from <...> since these were the last
+ remaining bitmaps!
+ Added variants of the LaTeX logo.
+ Added the ltnews.cfg file.
+
+1994-05-30 Johannes Braams <latex-bugs@latex-project.org>
+
+ * texpert.txt: Added the section about configuring hyphenation.
+
+1994-05-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Add interactive request for a `category'
+ Also add non-interactive field showing \@TeXversion.
+
+1994-05-30 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: Moved pandora, oldgerm, amsfonts, euscript,
+ eufrak from main distribution to extra package directory..
+
+ * unpacked.txt: Moved pandora, oldgerm, amsfonts, euscript,
+ eufrak from main distribution to extra package directory..
+
+ * manifest.txt: Moved pandora, oldgerm, amsfonts, euscript,
+ eufrak from main distribution to extra package directory.
+ Removed features.tex from distribution.
+
+1994-05-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fntguide.tex:
+ Several updates and additions.
+
+1994-05-30 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * usrguide.tex: Removed the description of mfnfss and tools
+ packages.
+ Removed sections that were commented out.
+ Removed typeouts.
+ Wrapped long lines.
+ Rewrote to remove overfull hboxes.
+ Moved the stuff on \newmathalphabet to the section on LaTeX
+ errors.
+ Rewrote the stuff on latex209.cfg, and replaced
+ \PassOptionsToClass (which requires you to list all the
+ known classes) with \ds@oldlfont.
+ Added the `LaTeX2e command in LaTeX 2.09 document' error.
+ Added the SLiTeX logo to the list of unsupported commands.
+ Added the full list of \text..., \...family, \...series, \...shape
+ and \math... commands.
+
+1994-05-29 Johannes Braams <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Captions}): Make \@makecaption colour
+ safe by using \sbox\@tempboxa rather than \setbox\@temboxa\hbox.
+
+1994-05-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * usrguide.tex:
+ Small general updates.
+ Rewrote section on compatibility.
+
+ * Makefile:
+ Removed vmstex.txt and textures.txt since currently empty.
+
+ * copyins.txt:
+ Removed prelim message, say that files are mentioned in
+ manifest.txt.
+
+ * copyright.txt:
+ Removed prelim message, say that files are mentioned in
+ manifest.txt.
+
+ * manifest.txt:
+ Removed vmstex.txt and textures.txt since currently empty.
+
+1994-05-29 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltxguide.cls: Added italic correction to <...>.
+ Added \sourcecode.
+
+ * fntguide.tex: Corrected typos spotted by FMi.
+ Added the `math selection commands' section.
+ Replaced the notion of math font attributes with a description
+ closer to that in the Companion.
+ Moved stuff on declaring encodings into its own section
+ Moved stuff on font installation into its own section.
+ Moved stuff on initialization into its own section.
+ Moved stuff on naming conventions into its own section.
+ Moved DeclareFixedFont into text font selection.
+ Added text to the introduction.
+ Moved all of the enc.def file commands into one subsection.
+ Moved everything that's left without a home into the `miscellania'
+ section.
+ Generally tidied up.
+
+1994-05-28 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltxguide.cls: Made << and >> produce < and > inside verbatim.
+ Added ltxguide.cfg.
+
+ * fntguide.tex: Created file out of features.tex.
+ Redid document structure to fit with usrguide and clsguide.
+ Removed stuff on old style digits.
+ Moved text font stuff before math font stuff.
+ Removed `utilities' section.
+ Removed the author font commands (covered by usrguide).
+ Added description of the text font attributes.
+ Redid the description of the \f@... commands.
+ Redid the description of the \...default commands.
+ Added the section on the \DeclareTextWidget commands.
+ Added the section on math attributes.
+
+1994-05-27 Johannes Braams <latex-bugs@latex-project.org>
+
+ * proc.dtx (section{Implementation}): Added a missiing docstrip
+ guard.
+
+ * classes.dtx: Moved the identification and driver sections to
+ the beginning of the file.
+ (subsubsection{Table of Contents}): Wrapped a long line
+
+ * letter.dtx: Added \CharacterTable
+ Moved identification and driver to the front of the file.
+ Removed references to the book class from the documentation
+
+1994-05-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxdoc.dtx: Use sequence a,..,z,A,..,Z not aa,..az,ba,..,bz
+ As Makeindex is not keen on the latter.
+
+ * source2e.tex: Modify printing of line numbers in index,
+
+ * ifthen.dtx: Use new style error commands.
+
+ * ltboxes.dtx: Add some more names in \author, so I don't get
+ all the blame.
+
+1994-05-27 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * tlb0438.tlg: Line number change in exscale package.
+
+ * Makefile: Renamed unpack2e.ins to unpack.ins and latex2e.ltx
+ to latex.ltx, renamed format file to latex.fmt. Added test
+ tlb0483.
+
+ * manifest.txt: Renamed unpack2e.ins to unpack.ins and
+ latex2e.ltx to latex.ltx, rearranged a few lines.
+
+ * unpack2e.ins: Renamed unpack2e.ins to unpack.ins and
+ latex2e.ltx to latex.ltx.
+
+ * unpacked.txt: Renamed unpack2e.ins to unpack.ins and
+ latex2e.ltx to latex.ltx.
+
+ * tracefnt.dtx: Changed copyright line.
+
+ * pandora.dtx: Updated for new driver format, changed \wlog to
+ \ProvidesFile and \ProvidesPackage.
+
+ * oldgerm.dtx: Updated for new driver format, changed \wlog to
+ \ProvidesFile and \ProvidesPackage.
+
+ * oldgerm.dst: Changed copyright line, removed generation of
+ documentation driver.
+
+ * pandora.dst: Changed copyright line, removed generation of
+ documentation driver.
+
+ * latexsym.dst: Changed copyright line.
+
+ * amsfonts.dst: Changed copyright line.
+
+ * latexsym.dtx: Added \ProvidesPackage and \ProvidesFile
+ declaration.
+
+ * euscript.dtx: Corrected \ProvidesPackage declaration.
+
+ * vtl2e02.tlg: Removed test for \SLiTeX command.
+
+ * vtl2e02.lvt: Removed test for \SLiTeX command.
+
+1994-05-27 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews01.tex: Corrected filenames of usrguie and clsguide.
+ Removed ltnews.cls from filecontents.
+
+ * ltnews.cls: Checked this in. Added angle brackets to <...>.
+ Added AMS and SliTeX logos.
+
+ * latex209.dtx: Added SliTeX logo.
+
+ * ltxguide.cls: Added SliTeX logo.
+
+1994-05-26 Johannes Braams <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsection{Single or double sided printing}):
+ wrapped a long line.
+
+ * slides.dtx:
+ (subsection{The class code}): Use \input instead of \@@input. This
+ way it also works when \input@path is being used. Also changed
+ \IfFileExists to \InputIfFileExists for the same reason
+
+ * slides.dtx: Wrapped two long lines
+ Moved the identification and driver to the front of the file.
+
+ * proc.dtx (subsection{Identification}):
+ The second argument to \cmd\ProvidesFile wasn't closed in the
+ driver and the style file
+
+ * ifthen.dtx: Wrapped a long line
+ Added a \ProvidesFile command to the driver
+ Added \CharacterTable
+
+ * proc.dtx:
+ Added \CharacterTable
+ Changed some \changes entries to have a 'v' in front of the
+ version number.
+ Moved the identification and driver sections to the front of the
+ file in order to make \GetFileInfo work.
+ (subsection{Identification}):
+ Removed \cmd\typeout from .sty file; changed description
+ (subsection{The page style}):
+ Changed \rm to \normalfont\rmfamily in the definition of
+ \@oddfoot.
+
+1994-05-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltlogos.dtx: remove \SLiTeX.
+
+ * ltsect.dtx: Add initial documentation section.
+
+ * ltfloat.dtx: Add initial documentation section.
+
+ * ltclass.dtx: Modify format of \@missingfileerror message.
+
+ * ltmiscen.dtx: remove \literal.
+
+ * ltxdoc.dtx: Add silent substitution for bold tt.
+
+ * ltdirchk.dtx: Fix bug in Mac parser. typo " should have been :
+ (reported by Andrew Trevorrow)
+
+ * ltbibl.dtx: Add initial documentation section.
+
+ * ltpageno.dtx: Add initial documentation section.
+
+ * ltlength.dtx: Improve documetation.
+
+ * ltidxglo.dtx: Add initial documentation section.
+
+ * ltvers.dtx: Remove PRELIMINARY TEST RELEASE from
+ startup banner (spring is here)
+
+ * ltthm.dtx: wrap long lines to 72.
+ (long line added last night:-)
+
+ * ltpage.dtx: wrap long lines to 72.
+
+ * ltcounts.dtx: Add initial documentation section.
+
+ * ltpictur.dtx: Add initial documentation section.
+
+ * lttab.dtx: Add initial documentation section.
+
+1994-05-26 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * pandora.dtx: Folded a long line.
+
+ * lablst.tex: Folded long lines.
+
+ * copyright.txt: Removed remark about this release being
+ preliminary.
+
+ * copyins.txt: Removed remark about this release being
+ preliminary.
+
+ * Makefile: No list of files at end of 00readme.txt, check for
+ long lines added, make sure that small2e.tex and sample2e.tex
+ don't get a standard header.
+
+ * testpage.tex: Folded long lines.
+
+ * manifest.txt: Shortened long lines.
+
+ * tnfss7.tlg: Removed blank lines around font warnings in log
+ file.
+
+ * tnfss4.tlg: Removed blank lines around font warnings in log
+ file.
+
+ * tnfss1.tlg: Removed blank lines around font warnings in log
+ file.
+
+1994-05-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * newlfont.dtx:
+ Wrapped long lines.
+
+ * docstrip.dtx:
+ Wrapped long lines.
+
+ * doc.dtx:
+ Wrapped long lines.
+
+1994-05-25 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx:
+
+ Added task.
+
+ Corrected processing of \nocorr.
+
+ * ltoutput.dtx:
+
+ Fixed typos and checksum.
+
+ Extra documentation.
+
+1994-05-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltthm.dtx: Move user level documentation earlier in the file.
+
+ * ltxref.dtx: Move user level documentation earlier in the file.
+
+ * tracefnt.dtx: wrap long lines to 72.
+
+ * fam.dtx: wrap long lines to 72.
+
+ * ltoutenc.dtx: wrap long lines to 72.
+
+ * ltclass.dtx: wrap long lines to 72.
+
+ * ltxdoc.dtx: Increase \marginparwidth for long command names,
+
+ * ltboxes.dtx: wrap long lines to 72.
+
+ * ltlists.dtx: wrap long lines to 72.
+
+ * ltxref.dtx: wrap long lines to 72.
+
+ * ltdefns.dtx: wrap long lines to 72.
+
+ * ltplain.dtx: wrap long lines to 72.
+
+1994-05-25 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * manifest.txt: Added changes.txt.
+
+ * ltsect.dtx (\@dottedtocline): Put braces around argument 4
+ (the actual toc entry) to avoid font (and possibly other)
+ changes leaking out to the leaders.
+
+ * vlatex01.tlg: Updated for extra lines around warning
+ messages, removed trailing space in error help messages.
+ Change in strut for footnotes causes blank line to disappear.
+
+ * tnfss7.tlg: Update for new \protect handling, updated for new
+ values of \sfcode and correct \hbar accent.
+
+ * tnfss7.lvt: Added space after number to prevent too much
+ expansion.
+
+ * tlcs01b.tlg: Update for new \protect handling.
+
+ * tlcs07b2.tlg: Update for new \protect handling.
+
+ * tlxs01b.tlg: Update for new \protect handling.
+
+ * tlxs07b2.tlg: Update for new \protect handling.
+
+ * tltc001.tlg: Updated for extra lines around info and warning
+ messages, update for new \protect handling, update for change in
+ value of \errorcontextlines counter in tltc001.lvt.
+
+ * tl2e1.tlg: Updated for extra lines around info messages.
+
+ * vtl2e01.tlg: Updated for extra lines around warning messages,
+ removed trailing space in error help messages.
+
+ * tlb0250.tlg: Omit printout from \documentclass command.
+
+ * tlb0250.lvt: Omit printout from \documentclass command.
+
+ * vlatex03.tlg: Updated for extra lines around warning messages.
+
+1994-05-25 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * clsguide.tex: Added introduction.
+ Added section on command naming.
+ Added section on docstrip.
+ Added details of option processing.
+ Added example of DeclareRobustCommand.
+ Checked the document in with the server.
+
+1994-05-24 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfntcmd.dtx:
+
+ Tidied, fixed some typos in documentation.
+
+ * ltoutput.dtx (subsection{Floats}):
+
+ Changed outputpage.
+
+ Changed warnings etc to new commands.
+
+ Added \MessageBreak.
+
+1994-05-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * lterror.dtx: Wrap long lines to 72.
+
+ * ltdirchk.dtx: Set \@TeXversion to `2' by default for TeX2. Add
+ info about setting \@TeXversion to ltxcheck.dtx.
+
+ * lterror.dtx Add \@latex@info@no@line, remove some obsolete
+ code.
+
+1994-05-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * tltx003.tlg:
+ Regenerated because of message changes.
+
+ * usrguide.tex:
+ Updates and additions.
+
+ * tnfss5.lvt:
+ Updated because check for bug (40) no longer appropriate.
+
+ * tnfss5.tlg:
+ Regenerated because of .lvt change.
+
+ * vlatex07.tlg:
+ Regenerated to reflect new layout of error and warning messages.
+
+ * tltx001.lvt:
+ Set errorcontextlines to -1 for better high-level checks.
+
+ * tltx001.tlg:
+ Regenerated to reflect new layout of error and warning messages.
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Changed outer default of \@currenvline to \@empty to avoid
+ double braces.
+
+ * classes.dtx (section{Identification}):
+ Changed file information that appears in \listfiles.
+
+1994-05-24 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltxguide.tex: Checked in document class.
+
+ * clsguide.tex: Added sections on 2e font commands, defining \rm
+ etc., and obsolete commands.
+ Added stuff about \normalsize, \textheight and \textwidth being the
+ only mandatory commands.
+ Implemented Frank's suggestions for additions to the `loading other
+ files' section (which is now a subsection of `upgrading').
+ Added stuff on why primitive \input is a bad idea.
+ Added stuff on boxes and colour.
+ Moved general style stuff to overview section rather than 2.09
+ section.
+ Added newsletter example.
+
+1994-05-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: Add coments describing \@TeXversion which must
+ be defined if a TeX older than 3.141 is being used.
+
+ * lterror.dtx: Modify the definition of \GenericError slightly.
+ Also add completely new definition, using \typeout rather than
+ \errmessage. Used with TeX's older than 3.141, which have a
+ bug such that ^^J appears literally rather than breaking the
+ line in messages.
+
+1994-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * usrguide.tex:
+ Updates and additions.
+
+ * copyright.txt:
+ Point to bugs.txt for error reports.
+ Changed .l2e extension to .txt.
+
+ * tracefnt.dtx:
+ Changed info in \ProvidesPackage.
+
+ * latexsym.dtx:
+ Changed info in \ProvidesPackage.
+
+ * ltdefns.dtx:
+ Removed \MessageQuote since not used otherwise.
+
+ * lterror.dtx:
+ Corrected documentation.
+ Removed definitions for \@font@... since they are defined
+ in tracefnt.dtx.
+
+ * ltclass.dtx:
+ Added missing percents in filecontents definition :-(
+ Corrected several typos.
+ Cleaned up help texts.
+ Don't stop completely if \NeedsTeXFormat finds the wrong format,
+ just end inputting the current file.
+
+ * unpack2e.ins:
+ Changed .l2e extension to .txt.
+
+ * install.txt:
+ Changed .l2e extension to .txt.
+
+ * othertex.txt:
+ Remove bug address; mention bugs.txt instead.
+ Changed .l2e extension to .txt.
+
+ * readme.txt:
+ Changed .l2e extension to .txt.
+ Removed test release info.
+
+ * texpert.txt:
+ Changed .l2e extension to .txt.
+ Correct LaTeX source file name.
+
+ * web2ctex.txt:
+ Changed .l2e extension to .txt.
+
+ * yandytex.txt:
+ Changed .l2e extension to .txt.
+
+ * manifest.txt:
+ Changed .l2e extension to .txt.
+
+ * ltdefns.dtx:
+ Replaced ^^J by \MessageBreak.
+
+ * ltclass.dtx:
+ Replaced many ^^J by \MessageBreak.
+ Reworded several help texts.
+
+ * ltfinal.dtx:
+ Replaced \f@warn@break with \MessageBreak.
+
+ * ltmiscen.dtx:
+ Replaced \f@warn@break with \MessageBreak.
+
+ * fam.dtx:
+ Replaced \f@warn@break with \MessageBreak.
+
+ * tracefnt.dtx:
+ Removed definition of \f@warn@break.
+ Replaced \f@warn@break with \MessageBreak.
+
+ * latint.dtx:
+ Replaced \f@warn@break with \MessageBreak.
+
+ * tl2e5.lvt:
+ Changed test for bug (40) of NFSS1, old test no longer
+ appropriate.
+
+ * vtl2e07.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * vtl2e03.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tnfss3.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlxs03r.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlxs03b.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlxs03a.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlcs03r.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlcs03b.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlcs03a.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlb0202.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tlb0073.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+ * tl2e5.tlg:
+ Regenerated because of lvt file change.
+
+ * tl2e4.tlg:
+ Regenerated because of extra blank lines between warnings.
+
+1994-05-23 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * clsguide.tex: Redid document structure to be more like
+ usrguide.
+ Added section on class/package structure.
+ Restructured the commands list.
+
+1994-05-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx:
+ New \protect logic.
+
+ * ltfloat.dtx:
+ Changed \@warning to \@latex@warning.
+
+ * doc.dtx:
+ Added \PackageError commands.
+
+ * tracefnt.dtx:
+ Complete new definitions for \@fontwarning and
+ \@font@info.
+
+ * lterror.dtx (subsection{Specific errors}):
+ Added \MessageBreak to various help messages.
+ Reset \protect to \relax for \@preamerr.
+
+ * lttab.dtx:
+ New \protect logic in \@mkpream.
+
+ * classes.dtx:
+ Use new warning message commands.
+
+ * slides.dtx:
+ Use new warning commands for classes.
+ twocolumn option will produce warning (not error).
+
+ * letter.dtx:
+ Use new warning and error commands. (we use \@latex@error
+ in compatibility mode)
+ Some documentation updates.
+
+ * ltclass.dtx:
+ Use new warning and error commands.
+
+ * ltdefns.dtx:
+ Removed surplus \space in error message
+ Use new warning and error commands.
+
+ * proc.dtx:
+ Replaced \@latexerr with \ClassError{proc}.
+ Replaced \@@warning with \ClassWarningNoLine{proc}.
+ Added \Finale in documentation.
+
+ * ltpictur.dtx:
+ Replaced \@warning by \@latex@warning.
+
+ * tracefnt.dtx:
+ Use old spacing rules of font warnings so that test suite
+ isn't complaining.
+
+1994-05-22 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * usrguide.tex: Rewrote description of the new argument to
+ \newcommand.
+ Added section on classes and packages, on package options, and on
+ standard classes and packages.
+ Added some examples.
+ Added filecontents* and paragraph on what files can be sent.
+ Added section on latexsym in `old commands'.
+ Rewrote some stuff on 2.09 documents.
+ Added section on \frontmatter, \mainmatter and \backmatter.
+ Wrote `problems' section, including new error messages, stuff on
+ \tenrm and friends, old versions of files, and submitting a bug
+ report.
+ Added overview.
+
+ * lterror.dtx: Replaced braces with begingroup, to stop mathords
+ from sneaking into math mode.
+ Replaced \@generic@message and \@generic@error by \GenericError,
+ \GenericWarning and \GenericInfo.
+ Made \GenericError, \GenericWarning and \GenericInfor robust.
+ Replaced \\ and ~ by \MessageBreak and \space.
+ Replaced \string by \protect in some messages.
+
+1994-05-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: new style \protect code in \changes.
+
+ * ltxdoc.dtx: Define \aalph as there are currently more than 26
+ files included into source2e.tex.
+ New style \cmd and \cs so Alan can go \cmd\{ in ltoutenc.
+
+1994-05-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * doc.dtx:
+ Replaced \@latexerr by \@latex@error.
+
+ * ltxref.dtx:
+ Don't produce line number when warning about multiple labels
+ (would be the line number from the aux file).
+ Replaced \@warning by \@latex@warning.
+
+ * ltbibl.dtx:
+ Replaced \@warning by \@latex@warning.
+
+ * lttab.dtx:
+ Replaced \@latexerr by \@latex@error.
+
+ * ltsect.dtx:
+ Replaced \@latexerr by \@latex@error.
+ Replaced \@@warning by \@latex@warning@no@line.
+
+ * ltmiscen.dtx:
+ Replaced \@latexerr by \@latex@error.
+
+ * ltfiles.dtx:
+ Replaced \@latexerr by \@latex@error.
+ Replaced \@warning by \@latex@warning@no@line; again line numbers
+ do not make much sense in this file.
+
+ * ltlists.dtx:
+ Replaced \@latexerr by \@latex@error.
+
+ * lhyphen.dtx:
+ Fixed checksum.
+
+ * classes.dtx (subsection{Font changing}):
+ Fixed wrong \changes entry.
+
+ * letter.dtx (subsection{Font changing}):
+ Fixed wrong \changes entry.
+
+1994-05-21 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltnews01.tex: Wrote 1st draft of LaTeX News #1.
+
+ * lterror.dtx: Made \@generic@message robust.
+
+1994-05-20 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * vtl2e06.tlg: Update for new \protect handling, change in
+ format of error messages, change in glue for framed boxes.
+
+ * vlatex06.tlg: Update for new \protect handling, change in
+ format of error messages, change in glue for framed boxes.
+
+ * ltpage.dtx (\marboth, \markright): Changed setting for
+ \protect.
+
+ * tl2e7.tlg: Update for new \protect handling.
+
+ * tl2e2.tlg: Update for new \protect handling.
+
+ * tlb0427.tlg: Update for new \protect handling.
+
+ * tlb0027a.tlg: Update for new \protect handling.
+
+ * tlb0027b.tlg: Update for new \protect handling.
+
+ * tlb0018.tlg: Update for new \protect handling.
+
+ * vtl2e05.tlg: Update for new \protect handling.
+
+ * vtl2e04.tlg: Update for new \protect handling.
+
+ * vtl2e03.tlg: Update for new \protect handling.
+
+ * vtl2e02.tlg: Update for new \protect handling.
+
+ * vlatex05.tlg: Update for new \protect handling.
+
+ * vlatex04.tlg: Update for new \protect handling.
+
+ * vlatex03.tlg: Update for new \protect handling.
+
+ * vlatex02.tlg: Update for new \protect handling.
+
+ * tnfss2.tlg: Update for new \protect handling.
+
+ * ltsect.dtx (\addtocontents): Correct setting of \protect.
+
+ * ltsect.dtx (\addcontentsline): Correct setting of \protect.
+
+ * ltmiscen.dtx (\@writefile): Added correct setting of \protect.
+
+ * ltfloat.dtx (\@xfloat): Restore @nobreak switch inside float
+ to default value false.
+
+ * ltoutput.dtx (\@outputpage): Added setting of \protect during
+ \shipout.
+
+1994-05-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx :
+ Replaced \font@warning by \@font@warning.
+
+ * ltmiscen.dtx:
+ Replaced \@@warning by \@latex@warning@no@line.
+ Replaced \font@warning by \@font@warning.
+
+ * ltfntcmd.dtx:
+ Replaced \@latexerr by \@latex@error.
+
+ * newlfont.dtx:
+ Replaced \@latexerr by \@latex@error.
+
+ * lfonts.dtx:
+ Replaced \font@warning by \@font@warning.
+ Replaced \@latexerr by \@latex@error.
+
+ * latint.dtx:
+ Replaced \font@warning by \@font@warning.
+ Replaced \font@log by \@font@info.
+ Replaced \@latexerr by \@latex@error.
+
+ * fam.dtx:
+ Replaced \font@warning by \@font@warning.
+ Replaced \font@log by \@font@info.
+ Replaced \@latexerr by \@latex@error.
+
+ * tracefnt.dtx:
+ Replaced \font@warning by \@font@warning.
+ Replaced \font@log by \@font@info.
+ Replaced \@latexerr by \@latex@error.
+ Use new generic error commands.
+
+1994-05-20 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * lterror.dtx: Fixed a bug with \@inmatherr.
+
+ * ltfinal.dtx: Corrected checksum.
+
+ * lterror.dtx: Added \@latex@info@no@line.
+ Added missing full stops.
+
+ * ltdefns.dtx: Renamed @checkcommand to CheckCommand.
+
+ * latex209.dst: Added t1enc.sty.
+
+ * latex209.dtx: Changed \@finalstrut.
+ Added t1enc.sty.
+
+1994-05-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: use \maxdimen not 9999p in \showoutput.
+
+ * test2e.tex: add test2e.cfg for customisation (suggested by
+ Rainer)
+
+1994-05-19 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * tlb0109.tlg: Change in format of error messages.
+
+ * tlb0063.tlg: Change in format of error messages.
+
+ * vtl2e03.tlg: Change in format of error messages.
+
+ * vtl2e02.tlg: Change in definition of \TeX logo.
+
+ * vtl2e01.tlg: Change in format of error messages, change in
+ definition of \TeX logo.
+
+ * tltx002.tlg: Change in format of error messages.
+
+ * vlatex03.tlg: Change in format of error messages.
+
+ * vlatex02.tlg: Change in definition of \TeX logo.
+
+ * vlatex01.tlg: Change in format of error messages, change in
+ definition of \TeX logo.
+
+ * tltc002.tlg: Change in format of error messages.
+
+ * source2e.tex: Changed according to split in files.
+
+ * manifest.l2e: Changed according to split in files.
+
+ * unpack2e.ins: Changed according to split in files.
+
+ * ltdefns.dtx: Added definitions for \@namedef and \@nameuse
+ again.
+
+ * ltcntlen.dtx: Split into ltcounts.dtx (counters), ltpageno.dtx
+ (page numbering), ltxref.dtx (cross referencing), ltlength.dtx
+ (lengths).
+
+ * ltidxbib.dtx: Split into ltidxglo.dtx (index and glossary) and
+ ltbibl.dtx (bibliography commands).
+
+ * tlb0268.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tlb0077.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * vtl2e01.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tl2e1.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tlxs04a.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tlxs02.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tlxs01p.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tltx001.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * vlatex05.tlg: Strut in footnotes back to old version for
+ compatibility mode.
+
+ * vlatex04.tlg: Strut in footnotes back to old version for
+ compatibility mode.
+
+ * vlatex03.tlg: Strut in footnotes back to old version for
+ compatibility mode.
+
+ * vlatex02.tlg: Strut in footnotes back to old version for
+ compatibility mode.
+
+ * vlatex01.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tnfss1.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tlcs02.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tlcs01b.tlg: Change in test2e setup causes box printout to
+ reappear.
+
+ * tltc001.tlg: Change in test2e setup causes box printout to
+ reappear, strut in footnotes back to old version for
+ compatibility mode.
+
+1994-05-18 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * tnfss4.tlg: With new handling of changes to font size and
+ \baselinestretch the tracefnt messages are slightly different.
+
+ * tl2e4.tlg: With new handling of changes to font size and
+ \baselinestretch the tracefnt messages are slightly different.
+
+ * vtl2e02.tlg: New definitions for LaTeX and SLiTeX logos now
+ active, change in writing of robust commands, change in glue for
+ framed boxes.
+
+ * vlatex02.tlg: New definitions for LaTeX and SLiTeX logos now
+ active, change in writing of robust commands, change in glue for
+ framed boxes.
+
+ * tl2e7.tlg: Updated for new values of \sfcode and correct
+ \hbar accent.
+
+ * tl2e7.lvt: Replace package t1enc by fontenc, added a space.
+ Added space after number to prevent too much expansion.
+
+ * vtl2e01.tlg: Change in strut for footnotes causes blank
+ line to disappear.
+
+1994-05-18 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Added \@finalstrut.
+
+ * ltlogos.dtx: Added the TeX logo.
+ Made the LaTeX2e logo use the text font 2 rather than the math
+ font 2.
+
+ * ltoutenc.dtx: Fixed a typo with fontenc.sty... it's
+ \encodingdefault, not \defaultencoding!
+
+ * ltfinal.dtx: Corrected the lccode for d-bar.
+
+ * ltoutenc.dtx: Made \.i produce i.
+
+1994-05-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Modify \@use@option so Alan can use
+ \OptionNotUsed within the code for a declared option.
+
+1994-05-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * tl2e7.lvt: Corrected: \documentstyle --> \documentclass.
+
+ * tlb0039.tlg: Removed \usepage{t1ot1}.
+
+ * tlb0039.lvt: Removed \usepage{t1ot1}.
+
+ * latint.dtx: Added missing \let in \@no@font@optfalse, added
+ \ProvidesFile and \GetFileInfo.
+
+ * tlb0438.tlg: Updated for \every@size now working correctly.
+
+ * vlatex07.tlg: Change in strut for array/tabular parboxes and
+ footnotes.
+
+ * vtl2e07.tlg: Change in strut for array/tabular parboxes and
+ footnotes.
+
+ * vlatex05.tlg: Change in strut for footnotes, change in
+ writing of robust commands, change in glue for framed boxes.
+
+ * vtl2e05.tlg: Change in strut for footnotes, change in
+ writing of robust commands, change in glue for framed boxes.
+
+ * vlatex03.tlg: Change in strut for footnotes, change in glue
+ for framed boxes.
+
+ * vlatex04.tlg: Change in strut for footnotes.
+
+ * tltx001.tlg: Change in glue for framed boxes, change in args
+ to \@ifstar, change in colorendbox.
+
+ * tl2e3.tlg: Change in strut for footnotes.
+
+ * vtl2e03.tlg: Change in strut for footnotes, change in glue
+ for framed boxes.
+
+ * vtl2e04.tlg: Change in strut for footnotes.
+
+ * tlb0202.tlg: Change in expansion of accent macros.
+
+ * tltc001.tlg: Change in glue for framed boxes, change in args
+ to \@ifstar, change in colorendbox.
+
+1994-05-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: An underscore character with catcode 12 in math
+ mode produced an error since the active underscore was \let to
+ \_ before the latter was defined. \global\let replaced by \gdef.
+
+1994-05-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lfonts.dtx:
+ Added extra braces to \copyright.
+ Added extra braces to \nfss@text (allow direct use in subscript).
+
+1994-05-17 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * lterror.dtx: Moved error commands from ltdefns.dtx.
+
+ * ltdefns.dtx: Added section on \protect. Moved error commands to
+ lterror.dtx.
+
+ * ltoutenc.dtx: Removed braces from \$ since they're now in
+ nfss@text.
+
+ * latex209.dtx: Fixed a bug with \ds@newlfont.
+ Removed extra spaces from the missing file error.
+ Commented out bezier with \iffalse...\fi rather than %% to avoid
+ bezier turning up in every file.
+ Corrected some documentation.
+
+1994-05-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: Use \DeclareRobustCommand to define \ensuremath,
+ and add extra braces so a_\ensuremath{foo} works.
+
+ * ltoutput.dtx: Add \color@begingroup to protect \normalcolor.
+ move \normalcolor out of the inner box.
+
+1994-05-16 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: Added batch file ltoutenc.ins.
+
+ * ltoutenc.dst: Capitalize encoding names.
+
+1994-05-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx (subsection{Macros for the user}):
+ Removed surplus braces from robust command \linespread.
+ Pass \baselinestretch not \f@linespread in \fontsize.
+
+ * ltoutenc.dtx:
+ \DeclareTextCommand now uses specified encoding again in
+ top-level part.
+ Encoding files now use mixed case names, eg OT1enc.def
+ (subsection{Definitions for the OT1 encoding}):
+ Added extra braces in def of \$.
+
+ * ltplain.dtx:
+ Changed \loop ...\repeat to use Kabelschacht method (TUB 8#2)
+ Comment out encoding specific commands which are defined by
+ ltoutenc.dtx.
+
+ * ltoutput.dtx:
+ Use \let to get original defs of accents back in output routine.
+
+ * ltfinal.dtx:
+ Removed loading of ot1enc.sty (not longer available).
+ Moved definitions of \@acci and friends to lfonts.dtx.
+
+ * lfonts.dtx (subsection{Miscellaneous}):
+ Define saved versions of accents (\@acci and friends) here.
+
+ * fontdef.dtx (subsection{Encodings}):
+ Declare default encoding first.
+ Load encoding specific files for OT1 and T1.
+
+1994-05-16 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltcntrl.dtx: Split file from ltinit.dtx.
+
+ * ltcounts.dtx: Split file from ltinit.dtx.
+
+ * ltdefns.dtx: Split file from ltinit.dtx.
+
+ * lterror.dtx: Split file from ltinit.dtx.
+
+ * ltlogos.dtx: Split file from ltinit.dtx.
+
+ * ltpar.dtx: Split file from ltinit.dtx.
+
+ * ltspace.dtx: Split file from ltinit.dtx.
+
+ * ltoutenc.dtx: Removed \P, since it's not in the T1 encoding.
+ Added \r and \k accents.
+ Added \NG, \ng, \TH, \th, \DH, \dh, \DJ and \dj.
+
+ * latex209.dtx: Fixed a bug with \mediumseries.
+
+ * ltoutenc.dtx: Redid fontenc.sty to use the new mixed-case
+ encoding files.
+ Fixed a bug with \pounds.
+
+ * latex209.dtx: Fixed a bug with the margid option.
+
+ * ltfinal.dtx: Removed ot1enc.sty.
+
+1994-05-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lfonts.dtx:
+ \$ and \pdollar removed since now part of encoding cmds.
+ \pounds and \ppounds ditto.
+
+ * fam.dtx:
+ Names of encoding commands changed to \<enc>-cmd.
+
+1994-05-15 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Added the nomargid and margid options.
+
+1994-05-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ifthen.dtx: Add \TE@repl, to make \or safe in \equal.
+
+1994-05-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx (subsection{Encodings}):
+ Don't input .def files in encoding declarations.
+
+ * fam.dtx (section{Macros for setting up the tables}):
+ Init the encoding change macro only for new \DeclareFontEncoding.
+ Log redeclarations of font encodings.
+ (subsection{Macros for the user}):
+ Added missing \noexpand to \enc@update.
+ Initialise all \f@... macros with \@empty.
+ (subsection{Macros for loading fonts}):
+ Don't change \f@encoding in \DeclareErrorFont. Removed
+ definitions for \makeatletter and \@input etc. since they are not
+ longer necessary.
+
+ * lfonts.dtx (subsection{Miscellaneous}):
+ Removed surplus braces within \normalfont.
+ Added \DeclareErrorFont.
+
+ * unpack2e.ins (IMPORTANT NOTICE):
+ Moved ltoutenc.dtx before ltfss.dtx since ltfss needs parts of the
+ code.
+
+ * tracefnt.dtx (section{Macros common to \texttt{fam.tex} and
+ \texttt{tracefnt.sty}}): Added \enc@update to selectfont.
+
+ * fam.dtx (section{Macros for setting up the tables}):
+ Initialise \<enc>@cmd in \DeclareFontEncoding.
+ (subsection{Macros for the user}):
+ Added \enc@update to \fontencoding. Thus now encoding updates are
+ deferred until the following \selectfont (as they should). One
+ action of \enc@update is to update \<enc>@cmd for the old and the
+ new encoding.
+
+1994-05-14 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltoutenc.dtx: Renamed \ENC@cmd to \ENC-cmd, to avoid collisions
+ with commands like \U@cmd.
+
+ * ltoutenc.dst: Updated the dst file to match ltoutenc.dtx.
+
+ * latex209.dtx: Redid the oldlfont and newlfont options to set the
+ \@no@font@optfalse flag.
+
+ * fontsmpl.dtx: Split font sample document and package out of
+ ltoutenc.
+
+ * ltoutenc.dtx: Stopped commands declared with DeclareTextWidget
+ from going into an infinite loop if f@encoding isn't the current
+ encoding.
+ Added fontenc package.
+ Made ot1enc.def and t1enc.def files rather than packages.
+
+ * latex209.dtx: Changed how 2e commands are switched off.
+ Removed the date from the announcement of 2.09 mode.
+
+1994-05-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * lfonts.dtx: remove file identification typeout.
+
+ * latint.dtx: remove file identification typeout.
+
+ * setsize.dtx: remove file identification typeout.
+
+ * tracefnt.dtx: remove file identification typeout.
+
+ * fam.dtx: remove file identification typeout.
+
+ * lttab.dtx: Remove definition of \a \a' etc. Now in
+ ltoutenc.dtx
+
+ * ltboxes.dtx: New accent handling in parboxrestore.
+
+ * newlfont.dtx: \DeclareProtectedCommand now
+ \DeclareRobustCommand
+
+ * oldlfont.dtx: \DeclareProtectedCommand now
+ \DeclareRobustCommand
+
+ * ltpictur.dtx: Removed unnecessary braces from \@ifnextchar and
+ \@ifstar constructions.
+
+ * ltclass.dtx: Stop \listfiles being run twice, (A second
+ occurrence in the preamble is silently ignored)
+
+ * lttab.dtx: Add colour support to tabbing macros.
+ Use \@finalstrut in @endpbox.
+
+ * ltfloat.dtx: Add colour support (back again:-) to
+ \@footnotetext. Safe this time, using \normalcolor in an inner
+ group, leaving \reset@font\footnotesize in an outer group so
+ that \split... get set correctly. Also use \@finalstrut, and
+ remove some superfluous braces.
+ Add \normalcolor to \@xfloat, so floats do not pick up the
+ current colour.
+
+1994-05-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx:
+ Use \@input@ for .fd files so that they show up with
+ \listfiles.
+
+ * ltfntcmd.dtx:
+ Replaced \@protecteddef by \DeclareRobustCommand.
+
+ * fontcmds.dtx:
+ File renamed to ltfntcmd.dtx.
+
+ * unpack2e.ins:
+ Added Welcome message.
+ Update kernel generation.
+
+ * ltsect.dtx:
+ Added file identification string.
+
+ * ltpictur.dtx:
+ Added file identification string.
+
+ * ltcntlen.dtx:
+ Added file identification string.
+ Removed \@Ialph and \@ialph since they neither save space
+ nor execution time.
+
+ * ltfiles.dtx:
+ Added file identification string.
+ Execute \every@size hook at begin document.
+
+ * ltvers.dtx:
+ Added file identification string.
+ Added \endinput at the end. This is necessary for running
+ unpack2e.ins.
+ Use \fmtname in \everyjob and welcome message.
+
+ * tracefnt.dtx:
+ Change \DeclareProtectedCommand to \DeclareRobustCommand.
+
+ * lfonts.dtx:
+ Change \DeclareProtectedCommand to \DeclareRobustCommand.
+
+ * fam.dtx:
+ Change \DeclareProtectedCommand to \DeclareRobustCommand.
+
+1994-05-13 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: Added \@backslashchar.
+ Improved coding of \@ifdefinable.
+
+ * testdist.dtx: Improved documentation.
+
+ * emtex.l2e: Created this file.
+
+ * ltfinal.dtx: Loaded package ot1enc, and defined \@acci and
+ friends.
+
+ * ltinit.dtx: Added logging to DeclareProtectedCommand.
+
+ * ltoutenc.dtx: Renamed accents.dtx to ltoutenc.dtx.
+ After all these months It's now a real bit of kernel! :-)
+
+ * accents.dtx: Replaces \space by ` ' in csname.
+
+ * ltinit.dtx: Replaced \space by ` ' in \csname
+
+ * accents.dtx: Added \{, \} and \$.
+
+ * ltinit.dtx: Renamed DeclareProtectedCommand to
+ DeclareRobustCommand.
+ Moved DeclareRobustCommand after @gobble.
+ Removed @if@short@command.
+ Removed \{ and \}.
+
+ * accents.dtx: Redid all the kernel commands. Made t1.def and
+ ot1.def into t1enc.sty and ot1enc.sty.
+
+1994-05-12 Braams J.L. <latex-bugs@latex-project.org>
+
+ * slides.dtx:
+ Changed some \changes entries to have a 'v' in front of the
+ version number.
+ (section{A driver for this document}):
+ A missing \begin{macrocode} line caused LaTeX to loop and complain
+ about \begin{document} only being allowed in the preamble.
+ Wrapped a number of long lines to prevent overfull hbox messages
+ and fixed improper nesting of macro and macrocode environments.
+
+ * letter.dtx:
+ Changed some \changes entries to have a 'v' in front of the
+ version number.
+ (subsubsection{Defining the page styles}):
+ Made running heads the same for odd and even pages in twoside
+ mode.
+
+1994-05-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * amsfonts.dst: Remove generation of the drv file.
+
+ * amsfonts.fdd: Add \ProvidesFile comments to all the files
+ generated.
+
+ * slides.fdd: Add \ProvidesFile comments to all the files
+ generated.
+
+ * ltdirchk.dtx: Add early definition of \ProvidesFile,
+ so fd files read at initex time work OK.
+ Add `v' to \changes entries.
+
+ * cmfonts.fdd: Add \ProvidesFile comments to all the files
+ generated.
+
+ * newlfont.dtx: \DeclareProtectedCommand to define \em. Remove
+ the definitions of \prm and friends.
+
+ * oldlfont.dtx: use \DeclareProtectedCommand to define \rm and
+ friends. Also use \normalfont rather than \reset@font.
+
+1994-05-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: Added \normalcolor to the output routine just
+ before the head and foot are placed. Needed now color.sty does
+ not redefine \reset@font.
+
+ * ltboxes.dtx: merged \fbox and \framebox.
+ Defined \@finalstrut (used in \@mpfootnotetext)
+ Defined \normalcolor (\let to \relax)
+
+1994-05-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * tracefnt.dtx:
+ New \baselinestretch concept.
+ Added some tracing again that was incorrectly removed.
+ Ensure that ltfss can be processed with main mem
+ less than 65000 by adding macrocode envs.
+ Defined all robust commands vi \DeclareProtectedCommand.
+
+ * lfonts.dtx:
+ Ensure that ltfss can be processed with main mem
+ less than 65000 by adding macrocode envs.
+ Defined all robust commands vi \DeclareProtectedCommand.
+
+ * fam.dtx:
+ New \baselinestretch concept.
+ Ensure that ltfss can be processed with main mem
+ less than 65000 by adding macrocode envs.
+ Defined all robust commands vi \DeclareProtectedCommand.
+
+ * latint.dtx:
+ Allow commands to be \let to \relax in the argument of
+ \DeclareMathSymbol, etc. So far only undefined commands
+ or commands of the right type (eg mathchars) were
+ allowed.
+ Ensure that ltfss can be processed with main mem
+ less than 65000 by adding macrocode envs.
+
+1994-05-12 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: Fixed a bug with DeclareProtectedCommand.
+
+1994-05-11 Braams J.L. <latex-bugs@latex-project.org>
+
+ * classes.dtx:
+ Changed some \changes entries to have a 'v' in front of the
+ version number.
+
+1994-05-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: Superfluous braces removed from several commands
+
+ * ltclass.dtx: modify filecontents environment so that ctrl-L
+ and ctrl-I are written as a blank line and space respectively.
+ A warning is given if either of these translations takes
+ place, using a devious use of \@ifundefined.
+
+1994-05-11 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: Moved the logos to after \DeclareProtectedCommand.
+ Defined them using \DeclareProtectedCommand.
+ Made the SLiTeX logo use the TeX logo.
+ Made \, and \hspace use \DeclareProtectedCommand.
+
+ * ltfinal.dtx: Added %%% ltfinal.dtx line.
+
+ * ltinit.dtx: Added %%% ltinit.dtx line.
+
+ * latex209.dst: Added dummy bezier.sty.
+
+ * latex209.dtx: Added dummy bezier.sty.
+
+1994-05-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: Slight change in text of error message for
+ \verb in command argument.
+
+1994-05-10 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: Added documentation sent by DPC.
+ Moved \makeatletter and \maketother into ltinit.
+ Added extra ^^Js to \@latexerr.
+ Removed a couple of spurious braces.
+
+1994-05-09 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * fontcmds.dtx: Temporary fix: Make sure that \next is not
+ dangerously \let to \relax.
+
+ * exscale.dtx:
+ Added code for scaling of \big... delimiters.
+
+1994-05-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx:
+ Added file identification string.
+ Changed error message to fit linewidth.
+
+ * latint.dtx:
+ Added file identification string.
+ Added test to \newmathalphabet to produce an error if
+ used in old 209 sources without explicit newlfont or oldlfont
+ option. (New compatibility concept)
+
+ * oldlfont.dtx (section{The Code}):
+ Setting of \math@bgroup and \math@egroup outside latex209
+ part. (New compatibility concept)
+
+ * fontcmds.dtx:
+ Replaced use of \next by \@let@token and undid temp fix 3.3e.
+
+1994-05-08 Chris Rowley <latex-bugs@latex-project.org>
+
+ * fontcmds.dtx:
+
+1994-05-08 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * exscale.dtx: Changed to conform to new documentation
+ standard.
+
+ * euscript.dtx: Changed to conform to new documentation
+ standard.
+
+ * eufrak.dtx: Changed to conform to new documentation
+ standard.
+
+ * eufrak.dst: Removed generation of .drv file.
+
+1994-05-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltxdoc.dtx:
+ Moved definition of \GetFileInfo to doc.dtx.
+
+ * doc.dtx (subsection{GetFileInfo}):
+ Moved definition of \GetFileInfo into this file.
+
+ * ltthm.dtx:
+ Added file identification string.
+
+1994-05-08 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * somedefs.dtx: Produced v0.01.
+
+ * rawfonts.dtx: Produced v0.01, using somedefs.dtx.
+
+1994-05-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lttab.dtx:
+ Added file identification string.
+ Changed \@firsttab and \@maxtab from counters to chardefs.
+ Removed surplus {} in \@ifnextchar and \@ifstar constructs.
+ Removed plain TeX definition of \+
+
+1994-05-06 Braams J.L. <latex-bugs@latex-project.org>
+
+ * letter.dtx (subsubsection{Itemize}):
+ Inserted \normalfont before \bfseries in second level list label.
+ (subsubsection{Description}):
+ Inserted \normalfont before \bfseries in \descriptionlabel
+ Modified the documentation to use doc's `environment' environment
+ when documenting new environments.
+ (subsubsection{Vertical spacing}):
+ Added the setting of \maxdepth and \@maxdepth.
+
+ * slides.dtx:
+ Modified the documentation to use doc's `environment' environment
+ when documenting new environments.
+ (subsubsection{Vertical spacing}):
+ Added the setting of \maxdepth and \@maxdepth.
+
+ * classes.dtx (subsection{The title}):
+ Now check whether we are in the first or second column in
+ twocolumn mode.
+ (subsubsection{Vertical spacing}):
+ Added the setting of \maxdepth and \@maxdepth.
+ (subsubsection{Itemize}):
+ Inserted \normalfont before \bfseries in second level list label.
+ (subsubsection{Description}):
+ Inserted \normalfont before \bfseries in \descriptionlabel
+
+1994-05-05 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltidxbib.dtx: Do not write page number in \nocite warning
+ message. Set switch for warning and end of run.
+
+1994-05-05 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * preload.dtx:
+ Added some explanation about the need to have the encoding
+ predeclared as well.
+
+1994-05-05 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Added empty \errhelp.
+
+1994-05-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Changed the wording of the warning in
+ \NeedsTeXFormat.
+
+ * ltinit.dtx: added patch (from Frank)
+ @badcrerr error message removed
+
+1994-05-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latint.dtx:
+ Renamed \@@DeclareMathDelimiter to \@xDeclareMathDelimiter
+
+1994-05-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: add \@break@tfor
+ Remove many superfluous braces around arguments of \@ifnextchar
+ and \@ifstar.
+
+ * source2e.tex: allow full indexing on \@latexerr \@warning, and
+ \@tempboxa and friends.
+
+ * ltfiles.dtx: add \@onlypreamble\@obsoletefile
+ remove some obsolete code which was previously commented out.
+ rename \@break@loop to \@break@tfor, and move its definition to
+ ltinit.
+
+ * tlb0203.lvt: new test file for \@tfor bug.
+
+1994-05-03 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltidxbib.dtx: Make \nocite issue a warning for an undefined
+ citation key.
+
+ * ltfinal.dtx: Corrected setting catcode for ctrl-j.
+
+ * amsfonts.fdd: Removed definitions for AMS-supplied cm fonts.
+
+ * cmfonts.fdd: Included definitions for AMS-supplied cm fonts.
+
+1994-05-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx:
+ \@badcrerr replaced by \@nolnerr.
+
+ * ltinit.dtx:
+ \@badcrerr error message removed.
+
+1994-05-03 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Set the catcode of ^^J to other.
+
+ Removed \@undefinedfonterror.
+
+1994-05-02 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx (subsubsection{Float control}):
+
+ Shortened code of \@resethfps.
+
+ Corrected info message code.
+
+ * fontcmds.dtx:
+
+1994-05-02 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Redid the method of switching off 2e commands.
+
+ * ltfinal.dtx: Set all the catcodes before dumping. Made 127
+ illegal.
+
+ * install.l2e: Added yandytex.l2e
+
+ * accents.dtx: Rewrote almost everything from scratch.
+
+ * yandytex.l2e: Installed a file from Berthold
+
+ Corrected \@fontswitch.
+
+1994-05-01 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx (subsection{Floating Environments}):
+
+ Added \@largefloatcheck.
+
+ Removed unnecessary braces from arguments of \@ifnextchar.
+
+1994-05-01 Braams J.L. <latex-bugs@latex-project.org>
+
+ * classes.dst:
+ Removed line left over from the driver generation.
+
+ * slides.dtx (subsection{The class code}):
+ Removed the use of variables to store the version information.
+ Added \ProvidesFile to slides.def
+
+ * letter.dtx (section{Identification}):
+ Removed the use of variables to store the version information.
+
+ * classes.dtx (section{Identification}):
+ Removed the use of variables to store the version information.
+
+ * proc.dtx (subsection{Identification}):
+ Removed the use of variables to store the version information.
+
+ * makeindx.dtx (subsection{Identification}):
+ Removed the use of variables to store the version information.
+
+1994-04-30 Chris Rowley <latex-bugs@latex-project.org>
+
+ * ltinit.dtx:
+
+ Added latexinfo commands.
+
+ * fontcmds.dtx:
+
+ Changed prefix in \@protecteddef from frag@ to frag.
+ Changed warning therein to an info message.
+
+ Removed long lines.
+
+ Changed to, eg, v1.0l.
+
+ * ltoutput.dtx:
+
+ Rogue space removed.
+
+ Cut-off points for adding \@emptycol changed.
+
+ Empty column action added: \@emptycol.
+
+ Full of floats action improved.
+
+ Changed `active characters warning' to an info message.
+
+ (subsection{Floats}):
+
+ Changed wording of some error messages.
+
+ Changed 9* to 199* in dates.
+
+ Fixed bug from \dblfigrule with \@topnewpage.
+
+ Removed long lines.
+
+ Changed to, eg, v1.0l.
+1994-04-29 Braams J.L. <latex-bugs@latex-project.org>
+
+ * letter.dtx (section{Identification}):
+ Use the generic name LaTeX instead of LaTeX2e in the arguments of
+ \ProvidesClass and removed typeout message.
+
+1994-04-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx: use `v' in \changes entries.
+
+ * ltxdoc.dtx: Update the documentation. (source2e now has an
+ index by default.)
+
+ * ltclass.dtx: upgrade version to 1 (no other change, except
+ using `v' in \changes entries in to match the other kernel
+ files.)
+
+ * test2e.tex: reset the original \showbox parameters. (As
+ ltplain now sets them to -1)
+
+1994-04-28 Braams J.L. <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Table of Contents}):
+ Changed the definitions of \l@part, \l@chapter and \l@section
+ (article only) to check the value of tocdepth. :
+ (section{Identification}):
+ Use the generic name LaTeX instead of LaTeX2e in the arguments of
+ \ProvidesClass and \ProvidesFile
+
+ * letter.dtx (subsection{Two-side or one-side printing}):
+ Allow the twoside option in native mode; introduced oneside
+ option.
+ (subsubsection{Defining the page styles}):
+ Changed the definition of the pagestyles plain and empty to also
+ define the head and feet for even pages; Added different
+ definition for pagestyle headings when twoside is in effect.
+ (subsection{The generic letter commands}):
+ A letter has to start on a `right' page when in twosided mode.
+
+1994-04-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphpap.dtx: Leslie's \graphpaper macros, Converted to
+ ignore spaces between arguments, and documented using doc.
+
+ * ltxdoc.dtx: add \parg for picture mode args.
+
+ * ltpictur.dtx (subsection{Curves}): added \bezier and \qbezier
+ (section{Picture Mode}): Modified \picture \multiput and \bezier
+ so that they ignore spaces between arguments.
+ (section{Picture Mode}): made \circle use \@inmatherr
+
+1994-04-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx (section{Plain \TeX}):
+ Turn off overrfull box tracing in trancript file.
+
+ * doc.dtx (subsection{Bells and whistles}):
+ Ignore \Finale without \StopEventually.
+
+ * latint.dtx:
+ Removed \uppercase from all counter assignments dealing possibly
+ with hex numbers. That means that
+ \DeclareMathSymbol{m}{\mathord}{operators}{"6d}
+ doesn't work any longer (must be "6D now).
+ On the other hand
+ \DeclareMathSymbol{m}{\mathord}{operators}{`m}
+ although we would suggest to use at least `\m
+
+ * ltlists.dtx:
+ Replaced the warning \@ltxnomath by \@inmatherr.
+
+ * ltinit.dtx (section{Initex initialisations}):
+ Added error macro \@inmatherr#1 to be issued by commands
+ that will not work in math mode (like (\circle))
+
+ * doc.dtx (subsection{Redefining the \textsf{index} environment}):
+ Use \RequirePackage to input multicol.
+
+1994-04-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: Remove extra full stops from the ends of some
+ error messages.
+
+1994-04-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx:
+ message changed to "\verb ended by end of line"
+
+1994-04-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltpage.dtx:
+ Redefine \@leftmark and \@rightmark to use \@firstoftwo
+ and \@secondoftwo.
+
+ * classes.dtx (subsection{Font changing}):
+ We do warn now if \sl or \sc is found in math
+ (not that they should be used at all.
+
+ * ltpictur.dtx:
+ Removed surplus spaces after "\hbox to " in several cases.
+
+1994-04-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfinal.dtx (subsection{Font loading}):
+ Checked the value of \font@submax. If greater 0pt issue a
+ bold warning and reset it to 0pt.
+
+ * ltmiscen.dtx:
+ \verb error messages reworded.
+
+1994-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltplain.dtx:
+ Replaced width, height, depth by \@wifth, \@height, \@depth.
+
+ * latint.dtx:
+ Replace the use of \@leftmark with \@firstoftwo.
+ Moved \@tempdimc to ltinit.dtx.
+
+ * ltinit.dtx:
+ Moved all \@gobble... macros to this file.
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Messages generated by \enddocument reworded.
+
+1994-04-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx (section{\LaTeX\ Box commands}): add colour
+ support to minipage. add comments throughout the file.
+
+ * source2e.tex: modify to always print the index and change
+ history, no longer need to use ltxdoc.cfg to get the index.
+
+1994-04-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * newlfont.dtx:
+ Changed message "Don't use ..." to "Command \foo invalid in math mode".
+
+ * lfonts.dtx:
+ Changed message "Don't use ..." to "Command \foo invalid in math mode".
+
+ * fam.dtx:
+ Changed message "Don't use ..." to "Command \foo invalid in math mode".
+ Changed \errmessage's to \@latexerr's.
+
+1994-04-21 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * install.l2e: Corrected the wording of the bug report.
+
+ * ltfinal.dtx: Added some documentation, incorporated ltcodes.dtx.
+ This now includes setting the catcodes of 128--255 to `illegal'.
+
+1994-04-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * features.tex: New name for dircheck.
+ Improve description of package option names. Modify
+ description of dtx extension (as they may now be directly
+ processed by LaTeX.
+ \@filename@parse typo corrected to \filename@parse.
+
+1994-04-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fam.dtx (subsection{Macros for loading fonts}):
+ Added the global flag \ifG@fontsubs. This will be set to true
+ when automatic font substitution happened.
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Moved the warning messages in \enddocument so that they will appear in
+ succession. Also ensure that the aux file is always read so that toc etc.
+ will be correctly produced even in case of multiple labels.
+ Query \ifG@fontsubs and issue a warning in \enddocument when set to true.
+ Also check if size substitution has happened and issue a warning if it
+ is greater than \fontsubfuzz.
+
+1994-04-20 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Redefined \verbatim@noligs@list.
+
+1994-04-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltpage.dtx Improve documentation.
+
+1994-04-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfinal.dtx: Use catcode15 not catcode13 for control chars.
+ Initialise \textwidth \textheight and page style.
+
+ * ltfloat.dtx: removed colour support from \@footnotetext and
+ \@savemarbox. The `simple' extra groups that had been added
+ cause incorrect spacing. More complicated modifications
+ required for colour support will be done in color.sty.
+
+1994-04-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latint.dtx:
+ Removed surplus definition of \no@alphabet@error (see fam.dtx entry).
+ Corrected an error in \DeclareMathAlphabet M@#3 -> M@#2.
+ Added a missing % in \SetMathAlphabet@.
+ Changed two error message helps still containing \documentstyle. :-)
+ Changed all "Redeclaring something..." messages to log only infos.
+ Changed "Check substitution defaults ..." message to "Checking defaults ..."
+
+ * fam.dtx:
+ Changed message "Calculating math sizes ..." to appear only in
+ transcript file.
+ \no@alphabet@error reimplemented to be LaTeX err message.
+ \no@alphabet@help removed.
+
+ * tracefnt.dtx:
+ Changed line breaks and wording in some messages.
+ Removed surplus "." from some warning messages.
+ All warning/error messages changed to start "LaTeX Font Warning" etc.
+ Continuation lines are changed to "(Font)".
+
+ * tracefnt.dtx (section{Scaled font extraction}):
+ Removed dimen regs \fontsubfuzz and \fontsubmax and replaced them
+ by macros \fontsubfuzz and \font@submax.
+
+1994-04-18 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * web2ctex.l2e: Changed name from unixtex.l2e. Changed the
+ example shell script to look for a LATEX209INPUTS environment
+ variable.
+
+ * install.l2e: Changed name of unixtex.l2e to
+ web2ctex.l2e.
+
+ * latint.dtx: Changed \font@warning to \font@log for redefining
+ math alphabets and symbol fonts.
+
+1994-04-17 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltcntlen.dtx:
+ Use new std counter error message \@nocounterr.
+
+ * ltthm.dtx:
+ Use new std counter error message \@nocounterr.
+
+ * ltinit.dtx:
+ Defined \@nocounterr to be the LaTeX2e error command with one
+ argument that announces unknown counters. Changed \@nocnterr
+ back to no-arg syntax for compatibility with old styles making
+ use of that error message. \@nocnterr should not be used by
+ new LaTeX2e applications.
+
+1994-04-15 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * proc.dtx: Adding missing guard /class, this produced
+ incorrect proc.sty.
+
+ * ltboxes.dtx: Added missing % character in definition of
+ \@isavebox.
+
+1994-04-14 Braams J.L. <latex-bugs@latex-project.org>
+
+ * slides.dtx (subsection{Font changing}):
+ \@renewfontswitch has gone; \@newfontswitch has become
+ \DeclareOldFontCommand
+
+ * letter.dtx (subsection{Font changing}):
+ \@renewfontswitch has gone; \@newfontswitch has become
+ \DeclareOldFontCommand
+
+ * classes.dtx (subsection{Fonts}):
+ The size changing commands are no longer defined in the
+ kernel. Use \newcommand instead of \renewcommand.
+ (subsection{Font changing}):
+ \@renewfontswitch has gone; \@newfontswitch has become
+ \DeclareOldFontCommand
+
+ * oldgerm.dtx:
+ Renamed \@newtextcmd to \DeclareTextFontCommand
+
+ * fontcmds.dtx:
+ Renamed \@newtextcmd to \DeclareTextFontCommand and
+ \@newfontswitch to \DeclareOldFontCommand as agreed in Warwick.
+
+1994-04-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: fix to pagestyle in change log.
+
+1994-04-14 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latexbug.tex: Changed the prompt for `a list of files' to a
+ prompt for a single filename. Made latexbug look to see if it
+ could find the file, and if it can, it includes the file and the
+ logfile in the latexbug.msg.
+
+1994-04-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: Add definition of \@dischyph (was in ltboxes).
+
+ * ltboxes.dtx: Remove redefinition \@acci-iii. (now defined in
+ ltplain). Remove definition of \@dischyph (now in ltinit).
+
+ * ltplain.dtx: define \' \` \= in terms of \@acci-iii.
+ Use NFSS font commands in \ttraggedright and \proclaim.
+
+1994-04-12 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * manifest.l2e: Changes according to splitting of kernel.
+
+ * ltvers.dtx: Have Expansion of \fmtversion (version info)
+ generated automatically.
+
+ * accdefs.dtx: Removed definitions of accent macros \' \` \=
+ as these are in the kernel.
+
+1994-04-12 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * oztex.l2e: Added warning that lines are > 80 chars
+
+1994-04-11 Braams J.L. <latex-bugs@latex-project.org>
+
+ * classes.dtx (subsubsection{Titlepage}):
+ Removed bug introduced by inserting \cleardoublepage in the wrong
+ place.
+
+ Checked the file for long lines and wrapped them.
+
+ LL introduced options openright and openany fot the report and
+ book classes.
+
+ LL introduced commands \frontmatter, \mainmatter and \backmatter
+ to the book class.
+
+1994-04-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: add * form of filecontents environment.
+ Protect \ProvidesFile against space and / having strange
+ catcodes.
+
+ * ltinit.dtx: remove setting of errorcontextlines in \@latexerr
+ remove old definition of the \LaTeX logo.
+
+ * source2e.tex: minor improvements (mainly to the comments)
+
+ * ltthm.dtx: use new style \@nocnterr (diff from Frank, dated
+ 1994/04/09)
+
+1994-04-11 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * fam.dtx: Added `defaultscriptratio and
+ `defaultscriptscriptratio.
+
+ * latex209.dtx: Switched off `enlargethispage and the `!' float
+ option.
+
+1994-04-10 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * install.l2e: Split the installation guide into install.l2e,
+ texpert.l2e, and system-specific oztex.l2e and unixtex.l2e files.
+
+ * template.l2e: Created a template for system.l2e files.
+
+1994-04-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltherest.dtx:
+ Use standard counter missing error message for \newtheorem.
+
+ * ltcntlen.dtx:
+ Use \setcounter in \stepcounter to have counter name checked.
+ Change usage of \@nocnterr to have counter name as argument.
+
+ * ltinit.dtx:
+ Change default err message to point to the LaTeX manual or
+ LaTeX companion.
+
+1994-04-05 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * latex209.dtx: Switched off `lrbox, `width, `height and `depth in
+ 2.09 mode.
+
+ Removed optional arguments to `parbox, `minipage and `newcommand.
+
+ Made `ProvidesPackage and `ProvidesClass produce log entries
+ rather than warnings.
+
+ Removed `filedate.
+
+1994-03-31 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltxdoc.dtx: Minor improvements.
+
+ * manifest.l2e: update this file with all the new file names.
+
+ * source2e.tex: update this file with all the new file names.
+
+ * unpack2e.ins: update this file with all the new file names.
+
+ * ltherest.dtx: The only thing left in this file is the old
+ definition of \documentstyle and \@options, which are
+ redefined in ltclass.dtx. This file is now removed.
+
+ * ltpage.dtx: Create file. Page style + \raggedbottom \sloppy
+ etc. Taken from ltherest.dtx.
+
+ * ltidxbib.dtx: create file. index and bibliography stuff from
+ ltherest.dtx.
+
+1994-03-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltcntlen.dtx: create file. Contains counter and length macros.
+
+ * ltmiscen.dtx: remove counter macros.
+
+1994-03-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfloat.dtx: create file by removing sectioning commands from
+ ltherest.dtx
+ Use \normalsize in \@caption in place of \@normalsize.
+
+ * ltsect.dtx: create file by removing sectioning commands from
+ ltherest.dtx.
+
+ * ltthm.dtx: create file by removing theorem environment from
+ ltherest.dtx.
+
+ * lttab.dtx: Improve documentation, mainly making sure that
+ \changes entries are not in the scope of `oldcomments'.
+
+ * ltlists.dtx: Improve documentation, mainly making sure that
+ \changes entries are not in the scope of `oldcomments'.
+
+ * ltmiscen.dtx: Improve documentation, mainly making sure that
+ \changes entries are not in the scope of `oldcomments'.
+
+ * ltfiles.dtx: remove \@normalsize test from \document. Use
+ \normalsize instead of \@normalsize.
+
+ * ltinit.dtx: Remove redefinition of \newcount and friends as
+ version in ltplain.dtx is no longer \outer.
+ Comment out the experimental version of \@bsphack.
+
+ Remove test for \cs{inputlineno} undefined as it is
+ defined in ltplain.dtx
+
+ * ltplain.dtx: remove \outer from \newskip \newdimen \newwrite
+ and \newfam. Also comment out the definition of the `log like'
+ operators. (This does not alter the format, as they were
+ previously redefined by later files.)
+
+ * ltdirchk.dtx: Improve documentation. (Removal of comments
+ refering to obsolete versions of the file.)
+
+1994-03-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * source2e.tex: fix date to be \fmtversion, and add authors.
+
+ * ltxdoc.dtx (section{DocInclude}): Use \part to separate the
+ individual file sections.
+
+ * Started Keeping Change log in GNU format. All entries below
+ this point, have been converted from the LaTeX/doc \changes
+ log.
+
+1994-03-16 Braams J.L. <latex-bugs@latex-project.org>
+
+ * proc.dtx:
+ Removed the use of \wlog and included \fileversion in the optional
+ argument of \ProvidesClass
+
+ * slides.dtx:
+ Removed the \typeout lines since they are no longer needed.
+
+ * varioref.dtx (subsection{Options}):
+ Inserted missing hash mark in the code for the spanish option.
+
+1994-03-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx v1.0c \document (DPC) directly add file list
+ settings
+
+ * ltclass.dtx 0.3f \listfiles Move this code directly into
+ \document
+
+ * 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
+
+ * 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
+ all sizes except \normalize
+
+ * fontcmds.dtx v3.2a "General" Removed \@renewfontswitch
+
+ * fontcmds.dtx v3.2a "General" Changed \/ to \@@italiccorr
+
+ * fontcmds.dtx v3.2a "General" Adapted to mass formatting
+
+1994-03-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * 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 \@xfloat (DPC) Use \color@begingroup
+
+ * ltherest.dtx v1.0c \@savemarbox (DPC) Use \color@begingroup
+
+ * ltherest.dtx v1.0c \@footnotetext (DPC) Use
+ \color@begingroup, add \endgraf
+
+ * ltherest.dtx 1.0c \@xympar (DPC) Use \color@begingroup
+
+ * ltboxes.dtx 1.0b \sbox Use \color@begingroup
+
+ * ltboxes.dtx 1.0b \lrbox Use \color@begingroup
+
+ * ltboxes.dtx 1.0b \color@endgroup macro added for colour
+ support
+
+ * ltboxes.dtx 1.0b \color@begingroup macro added for colour
+ support
+
+ * ltboxes.dtx 1.0b \@isavepicbox Use \color@begingroup
+
+ * ltboxes.dtx 1.0b \@isavebox Use \color@begingroup
+
+1994-03-14 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * lablst.tex: Added.
+
+ * idx.tex: Added.
+
+1994-03-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * 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
+ correctly treated.
+
+ * ltfiles.dtx 0.3b \InputIfFileExists Use new cmd
+ \@addtofilelist
+
+ * ltclass.dtx 0.3d \listfiles Reset \@addtofilelist at begin
+ document
+
+ * ltclass.dtx 0.3d \@addtofilelist Macro added
+
+1994-03-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * docstrip.dtx:
+ Replaced \if!#2! by \if>#2> in \from to allow negated modules
+ appearing in this place.
+
+ * doc.dtx:
+ Removed \typeout's
+
+ * eufrak.dtx:
+ Removed \typeout's
+
+ * euscript.dtx:
+ Removed \typeout's
+
+ * latexsym.dtx:
+ Removed \typeout's
+
+ * exscale.dtx:
+ Removed \typeout's
+
+ * oldgerm.dtx:
+ Removed \typeout's
+
+ * varioref.dtx:
+ Removed \typeout's
+
+ * pandora.dtx:
+ Removed \typeout's
+
+ * docstrip.dst:
+ Corrected unpacking for ltxdoc.cls (change of docstrip module).
+
+ * classes.dtx
+ (subsubsection{The dimension of text}):
+ Use same default values for native mode as in old styles.
+
+ (section{Identification}):
+ Added file versions to the \Provides... commands
+
+ (subsection{Footnotes}):
+ Use \@makefnmark rather than its expansion in the definition
+ of \@makefntext.
+
+1994-03-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * 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 \@reargdef New defn, in terms of \@yargdef
+
+ * ltherest.dtx v0.1b \@xympar (DPC) Extra bgroup for colour
+
+ * ltherest.dtx v0.1b \@savemarbox (DPC) Extra group for colour
+
+ * ltdirchk.dtx 1.0b "General" Minor edits to the typeouts in
+ ltxcheck
+
+ * ltdirchk.dtx 1.0b "General" Change name from dircheck.dtx
+
+ * ltclass.dtx 0.3c \ProvidesPackage use \@gtempa
+
+ * ltclass.dtx 0.3c \ProvidesPackage Add \wlog
+
+ * ltclass.dtx 0.3c \ProvidesFile Add \wlog
+
+ * ltclass.dtx 0.3c "General" Change name from docclass to
+ ltclass
+
+ * ltclass.dtx 0.3c \@fileswithoptions Do not use
+ \@pr@videpackage to avoid typeout
+
+1994-03-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * classes.dtx
+ (section{Identification}):
+ Removed \typeout statements since this is now handled by
+ \Provide...
+
+ (subsubsection{Margins}):
+ New algorithm for calculation \oddsidemargin.
+ New algorithm for calculating \marginparwidth.
+
+ * unpack2e.ins:
+ Changed kernel generation using new file names.
+
+1994-03-11 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.dtx: Corrected \@oval, like previous change to
+ latex.dtx.
+
+ * latint.dtx: \DeclareSymbolFontAlphabet: Added check against
+ use of alphabet switch outside of math mode.
+
+1994-03-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * newlfont.dtx: Changed \math@bgroup/\math@egroup to use
+ \bgroup/\egroup, to follow the change in fam.dtx.
+
+ * fam.dtx: Changed \math@bgroup/\math@egroup to use
+ \bgroup/\egroup rather than \begingroup/\endgroup to avoid
+ leaking out of style changes. Side effect: now always produce
+ mathord atoms.
+
+ * tlb0320.lvt: Added \showoutput and \scrollmode.
+
+ * manifest.l2e: Added syntonly.dtx, syntonly.ins and
+ nfssfont.tex.
+
+ * l2extra.dst: Added generation of syntonly package. Removed
+ generation of .drv file for varioref.
+
+ * syntonly.dst: Added to distribution.
+
+ * syntonly.dtx: Added to distribution.
+
+1994-03-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx v1.0a "General" Remove need for a driver file.
+
+ * ltdirchk.dtx 1.0a "General" Reorganise driver module into `new
+ style'
+
+ * ltclass.dtx 0.3b "General" Modify driver code into `new style'
+
+1994-03-08 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * slides.dtx: Changed \@makefnmark to call \@makefntext rather
+ that \@thefnmark directly.
+
+ * letter.dtx: Changed \@makefnmark to call \@makefntext rather
+ that \@thefnmark directly. Changed class to always write an
+ .aux file, so that, e.g., cross referencing commands work.
+
+ * tl2e4.tlg: Update for new versions of packages latexsym,
+ newlfont, euscript.
+
+ * tlxs05s.tlg: Update for removal of declared option `twoside'
+ in slides.dtx.
+
+ * tlcs05s.tlg: Update for removal of declared option `twoside'
+ in slides.dtx.
+
+ * tlcs01a.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs01b.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs01l.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs01p.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tltc001.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tltc002.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs01r.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs02.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs04a.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs04b.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs04r.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlcs08.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * slides.dtx: Corrected first argument of \IfFileExists for
+ reading sfonts.cfg: sfonts.def to sfonts.cfg.
+
+ * tnfss1.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tnfss2.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tnfss3.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tnfss4.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tnfss5.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tnfss6.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tl2e5.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlb0014.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * vlatex01.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * vlatex02.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * vlatex03.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * vlatex04.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * vlatex06.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * vlatex07.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tl2e1.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tl2e2.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tl2e3.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlb0057.tlg: Updated for new filedate (\docdate taken up
+ from some file).
+
+ * tlb0010.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlb0018.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlb0073.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * tlb0077.tlg: Updated for change in latexsym.dtx (v2.1a -->
+ v2.1b).
+
+ * fontcmds.dtx: Corrected typo in documentation.
+
+1994-03-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * 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" Initial version, split from
+ latex.dtx
+
+ * 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 \@@italiccorr Macro added
+
+ * ltinit.dtx v0.1a "General" Long lines wrapped to 72 columns
+
+ * 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 "General" Long lines wrapped to 72 columns
+
+ * 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 \@settodim (DPC) Extra group for colour
+
+ * ltherest.dtx v0.1a \@hangfrom (DPC)Extra groups 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" Initial version, split from
+ latex.dtx
+
+ * 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" Add code from the old dump.dtx
+
+ * ltfiles.dtx v1.0a "General" Long lines wrapped to 72 columns
+
+ * ltfiles.dtx v1.0a "General" Initial version, split from
+ latex.dtx
+
+ * ltboxes.dtx v1.0a "General" Unify format with other Kernel
+ files
+
+ * ltboxes.dtx v0.1a \@mpfootnotetext (DPC) Extra group for
+ colour
+
+1994-03-07 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * cmextra.dst: Corrected `cyrilic' --> `cyrillic'. Changed
+ 1993 to 1994.
+
+ * slides.dtx: Removed declared option `twoside' (Suggested by
+ Joachim Schrod).
+
+1994-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * makeindx.dtx (subsection{Makeidx}):
+ Changed \newcommand to \providecommand for \seename.
+
+1994-03-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latexsym.dtx:
+ Changed \typeout's to \wlog's
+
+ * newlfont.dtx (section{The Code}):
+ Define \cal and \mit to behave as in NFSS1
+
+1994-03-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltvers.dtx v1.0a "General" Initial version, split from
+ latex.dtx
+
+ * lttab.dtx v1.0a "General" Initial version, split from
+ latex.dtx
+
+ * ltlists.dtx v1.0a "General" Initial version, split from
+ latex.dtx
+
+1994-03-04 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * testpage.tex: Changed question asking for paper type so that
+ the answer must now include `paper'. Added question for
+ doublesided printing.
+
+1994-03-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltboxes.dtx 0.1f \@irsbox Replaced a missing \else
+
+1994-03-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltxdoc.dtx:
+ Added driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+ Set counter StandardModuleDepth to 1, since all ltx documentation
+ needs that setting anyway.
+
+1994-03-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * 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" Add 2ekernel module
+
+1994-03-02 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * unpack2e.ins: Added 2ekernel conditional to generation of
+ ltboxes.ltx from ltboxes.dtx since this is now necessary
+ (cf. last change to ltboxes.dtx).
+
+ * unpack2e.ins: Added 2ekernel conditional to generation of
+ latex2e.ltx from docclass.dtx since this is now necessary
+ (cf. last change to docclass.dtx).
+
+ * unpack2e.ins: Removed generation of latex2e.drv and
+ dircheck.drv.
+
+ * slides.dst: Renamed sfontdef.* to sfonts.*.
+
+ * unpacked.l2e: Removed *.drv files (no longer generated)
+ Renamed slides .ltx files to .def.
+
+ * slides.fdd: Removed extra pair of curly braces after
+ DeclareFontFamily. Corrected Documentation to refer to
+ sfonts.*, not to sfontdef.*.
+
+ * slides.dtx: Renamed files sfontdef.* to sfonts.*.
+
+ * letter.dtx: Moved documentation driver further up, so that
+ "latex2e letter.dtx" works.
+
+ * letter.dst: Removed generation of .drv file, changed typeout
+ message that explains how to typeset the documentation.
+
+ * slides.dtx: Added forgotten changes entry for last change.
+
+ * slides.dtx: Renamed files slides.ltx and sfontdef.ltx to
+ slides.def and sfontdef.def.
+
+ * slides.fdd: Moved driver further up so that no extra .drv
+ file is needed, but "latex2e slides.fdd" works.
+
+ * slides.dst: Updated copyright message to show 1994. Removed
+ generation of .drv files. Renamed .ltx --> .def
+
+ * slides.dtx: Moved driver further up so that no extra .drv
+ file is needed, but "latex2e slides.dtx" works. Removed
+ makeidx class option, as it is now a proper package. Changed
+ leqno class option t oread leqno.clo. Added fleqn class
+ option (reads fleqn.clo).
+1994-03-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * 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>
+
+ * unpack2e.ins:
+ Removed unnecessary .drv generation (some are still there)
+ Added the the WITHOUT ANY WARRANTY message to some preambles.
+
+ * oldgerm.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+ Removed extra pair of braces after \DeclareFontFamily which has
+ only three arguments not four.
+
+ * oldlfont.dtx:
+ Removed surplus \ShortVerb setting.
+
+ * lhyphen.dtx:
+ Corrected typo in documentation.
+
+1994-02-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * varioref.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+1994-02-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latint.dtx:
+ Removed decl of \@unused since defined earlier.
+ Removed decl of \typeout.
+ Removed decl of \@tempdima \@tempdimb.
+
+1994-02-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * eufrak.dtx:
+ Changed driver code slightly.
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * euscript.dtx:
+ Changed driver code slightly.
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * exscale.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * nfssfont.dtx:
+ Added to the distribution.
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * docstrip.dtx (section{Producing the documentation}):
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * oldlfont.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * latexsym.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * newlfont.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * pandora.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * preload.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * lhyphen.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * fontdef.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+ * fontcmds.dtx:
+ Moved the driver code in front so that the documentation can be
+ processed by simply running the file through LaTeX2e.
+
+1994-02-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * 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.
+
diff --git a/macros/latex-dev/base/classes.dtx b/macros/latex-dev/base/classes.dtx
new file mode 100644
index 0000000000..a2dde6ade1
--- /dev/null
+++ b/macros/latex-dev/base/classes.dtx
@@ -0,0 +1,4470 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+% \section{Identification}
+%
+% These document classes can only be used with \LaTeXe, so we make
+% sure that an appropriate message is displayed when another \TeX{}
+% format is used.
+% \changes{v1.3p}{1995/11/30}{Added date of \LaTeX\ format to argument
+% of \cs{NeedsTeXFormat}}
+% \begin{macrocode}
+%<article|report|book>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+% \end{macrocode}
+%
+% Announce the Class name and its version:
+% \begin{macrocode}
+%<article>\ProvidesClass{article}
+%<report>\ProvidesClass{report}
+%<book>\ProvidesClass{book}
+%<10pt&!bk>\ProvidesFile{size10.clo}
+%<11pt&!bk>\ProvidesFile{size11.clo}
+%<12pt&!bk>\ProvidesFile{size12.clo}
+%<10pt&bk>\ProvidesFile{bk10.clo}
+%<11pt&bk>\ProvidesFile{bk11.clo}
+%<12pt&bk>\ProvidesFile{bk12.clo}
+%<*driver>
+\ProvidesFile{classes.drv}
+%</driver>
+ [2018/09/03 v1.4i
+%<article|report|book> Standard LaTeX document class]
+%<10pt|11pt|12pt> Standard LaTeX file (size option)]
+% \end{macrocode}
+%
+% \section{A driver for this document}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you are
+% currently reading. It will be extracted from this file by the
+% {\sc docstrip} program.
+%
+% \changes{1.0f}{1993/12/07}{Use class ltxdoc document class}
+% \changes{1.0r}{1994/02/28}{Moved driver code in order not to need a
+% separate driver}
+% \begin{macrocode}
+%<*driver>
+]
+\documentclass{ltxdoc}
+% \end{macrocode}
+%
+% We don't want everything to appear in the index
+% \begin{macrocode}
+\DoNotIndex{\',\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic}
+\DoNotIndex{\@badmath,\@centercr,\@cite}
+\DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
+\DoNotIndex{\@input,\@ixpt,\@m,\@minus,\@mkboth}
+\DoNotIndex{\@ne,\@nil,\@nomath,\@plus,\roman,\@set@topoint}
+\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
+\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
+\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
+\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
+\DoNotIndex{\advance,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
+\DoNotIndex{\bullet}
+\DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
+\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
+\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
+\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
+\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
+\DoNotIndex{\fbox}
+\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
+\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
+\DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
+\DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
+\DoNotIndex{\input}
+\DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
+\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
+\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
+\DoNotIndex{\NeedsTeXFormat,\newdimen}
+\DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
+\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
+\DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
+\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
+\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
+\DoNotIndex{\refstepcounter,\relax,\renewcommand}
+\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily}
+\DoNotIndex{\secdef,\selectfont,\setbox,\setcounter,\setlength}
+\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
+\DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
+\DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
+\DoNotIndex{\viipt,\vipt,\vskip,\vspace}
+\DoNotIndex{\wd,\xiipt,\year,\z@}
+% \end{macrocode}
+% We do want an index, using linenumbers
+% \begin{macrocode}
+\EnableCrossrefs
+\CodelineIndex
+% \end{macrocode}
+% We use so many \file{docstrip} modules that we set the
+% \texttt{StandardModuleDepth} counter to 1.
+% \begin{macrocode}
+\setcounter{StandardModuleDepth}{1}
+% \end{macrocode}
+% The following command retrieves the date and version information
+% from the file.
+% \begin{macrocode}
+\GetFileInfo{classes.drv}
+% \end{macrocode}
+% Some commonly used abbreviations
+% \changes{v1.2w}{1994/12/01}{Use \cs{newcommand*}}
+% \begin{macrocode}
+\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}
+\begin{document}
+\DocInput{classes.dtx}
+\PrintIndex
+% ^^A\PrintChanges
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \fi
+%
+% \changes{v1.0d}{1993/11/30}{remove \cs{@in}, made option makeindex
+% a synonym for option makeidx}
+% \changes{v1.0d}{1993/11/30}{removed \cs{@minus}, \cs{@plus},
+% \cs{@settopoint}, \cs{@setfontsize}; they are now in the
+% kernel}
+% \changes{v1.0d}{1993/11/30}{Added use of \cs{NeedsTeXFormat}}
+% \changes{v1.0d}{1993/11/30}{Replaced \cs{bf} with \cs{bfseries};
+% \cs{rm} with \cs{rmfamily}}
+% \changes{v1.0d}{1993/11/30}{Made equation and eqnarray environments
+% in the fleqn option up to date with latex.dtx}
+% \changes{v1.0f}{1993/12/08}{Made all lines shorter than 72 characters}
+% \changes{v1.0g}{1993/12/08}{Made change in eqnarray for the fleqn
+% option, as suggested by Rainer.}
+% \changes{v1.0h}{1993/12/18}{Made the definitions of the font- and
+% size-changing commands use \cs{renew} rather than \cs{new}.
+% Defined the float parameters with \cs{renewcommand} rather than
+% \cs{newcommand}. Corrected some typos in the fleqn option.
+% Replaced two occurrences of -\cs{@secpenalty} by
+% \cs{@secpenalty}. ASAJ.}
+% \changes{v1.0j}{1993/12/20}{Added \cs{ProvidesFile} to size files}
+% \changes{v1.0j}{1993/12/10}{Use \cs{cmd} in change entries}
+% \changes{v1.0k}{1994/01/09}{Removed some typos/bugs}
+% \changes{v1.0l}{1994/01/11}{add the extension to the names of the
+% files}
+% \changes{v1.0l}{1994/01/10}{Changed version numbering; moved leqno
+% and fleqn options to an external file.}
+% \changes{v1.0n}{1994/01/19}{Removed code for makeidx option and made
+% it a separate package; removed use of \cs{setlength} from list
+% parameters.}
+% \changes{v1.0o}{1994/01/31}{Small documentation changes}
+% \changes{v1.0q}{1994/02/16}{Small documentation changes}
+% \changes{v1.1a}{1994/03/12}{Removed \cs{typeout} messages}
+% \changes{v1.1f}{1994/04/15}{Inserted forgotten line break}
+% \changes{v1.2a}{1994/03/17}{Added openright option. (LL)}
+% \changes{v1.2b}{1994/03/17}{Added the \ldots{}matter commands. (LL)}
+% \changes{v1.2c}{1994/03/17}{Fixed page numbering in titlepage
+% env. (LL)}
+% \changes{v1.2d}{1994/04/11}{Checked the file for long lines and
+% wrapped them when necessary; made a slight implementation
+% modification to the openright and openany options.}
+% \changes{v1.2i}{1994/04/28}{Use LaTeX instead of LaTeX2e in messages}
+% \changes{v1.2j}{1994/05/01}{Removed the use of \cs{fileversion}
+% c.s.}
+% \changes{v1.2l}{1994/05/11}{changed some \cs{changes} entries}
+% \changes{v1.2m}{1994/05/12}{Forgot a few entries}
+% \changes{v1.2o}{1994/05/24}{Changed file information}
+% \changes{v1.2p}{1994/05/27}{Moved identification and driver to the
+% front of the file}
+% \changes{v1.2t}{1994/06/22}{Refrased a few sentences to prevent
+% overfull hboxes}
+% \changes{v1.2v}{1994/12/01}{Made the oneside option work for the
+% book class}
+% \changes{v1.2w}{1994/12/01}{Use \cs{newcommand*} for commands with
+% arguments}
+% \changes{v1.2z}{1995/05/16}{Always use \cs{cs} in \cs{changes}
+% entries}
+% \changes{v1.3a}{1995/05/17}{Replaced all \cs{hbox to} by \cs{hb@xt@}}
+% \changes{v1.3d}{1995/06/05}{Replaced all \cs{uppercase} by
+% \cs{MakeUppercase}}
+% \changes{v1.3l}{1995/10/20}{Disabled in compatibility mode all
+% options that are new in \LaTeXe.}
+% \changes{v1.3v}{1997/06/16}{Documentation fixes.}
+%
+%
+% \title{Standard Document Classes for \LaTeX{} version 2e\thanks{This
+% file has version number \fileversion, last revised \filedate.}}
+%
+% \author{%
+% Copyright (C) 1992 by Leslie Lamport \and
+% Copyright (C) 1994-97 by Frank Mittelbach \and Johannes Braams
+% }
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+% \tableofcontents
+%
+% \StopEventually{} ^^A
+%
+% \section{The {\sc docstrip} modules}
+%
+% The following modules are used in the implementation to direct
+% {\sc docstrip} in generating the external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% article & produce the documentclass article\\
+% report & produce the documentclass report\\
+% size10 & produce the class option for 10pt\\
+% size11 & produce the class option for 11pt\\
+% size12 & produce the class option for 12pt\\
+% book & produce the documentclass book\\
+% bk10 & produce the book class option for 10pt\\
+% bk11 & produce the book class option for 11pt\\
+% bk12 & produce the book class option for 12pt\\
+% driver & produce a documentation driver file \\
+% \end{tabular}
+% \end{center}
+%
+% \section{Initial Code}
+%
+% In this part we define a few commands that are used later on.
+%
+% \begin{macro}{\@ptsize}
+% This control sequence is used to store the second digit of the
+% pointsize we are typesetting in. So, normally, it's value is one
+% of 0, 1 or 2.
+% \begin{macrocode}
+%<*article|report|book>
+\newcommand\@ptsize{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@restonecol}
+% When the document has to be printed in two columns, we sometimes
+% have to temporarily switch to one column. This switch is used to
+% remember to switch back.
+% \begin{macrocode}
+\newif\if@restonecol
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@titlepage}
+% A switch to indicate if a titlepage has to be produced. For the
+% article document class the default is not to make a separate
+% titlepage.
+% \begin{macrocode}
+\newif\if@titlepage
+%<article>\@titlepagefalse
+%<!article>\@titlepagetrue
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@openright}
+% A switch to indicate if chapters must start on a right-hand page.
+% The default for the report class is no; for the book class it's
+% yes.
+% \begin{macrocode}
+%<!article>\newif\if@openright
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.3k}{1995/08/27}{Macro \cs{if@openbib} removed}
+%
+% \begin{macro}{\if@mainmatter}
+% \changes{v1.2v}{1994/12/01}{Moved the allocation of
+% \cs{if@mainmatter} here}
+%
+% The switch |\if@mainmatter|, only available in the document class
+% book, indicates whether we are processing the main material in
+% the book.
+% \begin{macrocode}
+%<book>\newif\if@mainmatter \@mainmattertrue
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Declaration of Options}
+%
+%
+% \subsection{Setting Paper Sizes}
+%
+% The variables |\paperwidth| and |\paperheight| should reflect the
+% physical paper size after trimming. For desk printer output this
+% is usually the real paper size since there is no post-processing.
+% Classes for real book production will probably add other paper
+% sizes and additionally the production of crop marks for trimming.
+% In compatibility mode, these (and some of the subsequent) options
+% are disabled, as they were not present in \LaTeX 2.09.
+% \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}}
+% \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}}
+\fi
+% \end{macrocode}
+%
+% \subsection{Choosing the type size}
+%
+% The type size options are handled by defining |\@ptsize| to contain
+% the last digit of the size in question and branching on |\ifcase|
+% statements. This is done for historical reasons to stay compatible
+% with other packages that use the |\@ptsize| variable to select
+% special actions. It makes the declarations of size options less
+% than 10pt difficult, although one can probably use \texttt{9}
+% and \texttt{8} assuming that a class wont define both
+% \Lopt{8pt} and \Lopt{18pt} options.
+%
+% \begin{macrocode}
+\if@compatibility
+ \renewcommand\@ptsize{0}
+\else
+\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+\fi
+\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
+\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
+% \end{macrocode}
+%
+%
+% \subsection{Two-side or one-side printing}
+%
+% For two-sided printing we use the switch |\if@twoside|. In
+% addition we have to set the |\if@mparswitch| to get any margin
+% paragraphs into the outside margin.
+% \begin{macrocode}
+\if@compatibility\else
+\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+\fi
+\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
+% \end{macrocode}
+%
+%
+% \subsection{Draft option}
+%
+% If the user requests \Lopt{draft} we show any overfull boxes.
+% We could probably add some more interesting stuff to this option.
+% \begin{macrocode}
+\DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\if@compatibility\else
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
+\fi
+% \end{macrocode}
+%
+% \subsection{Titlepage option}
+% An article usually has no separate titlepage, but the user can
+% request one.
+% \begin{macrocode}
+\DeclareOption{titlepage}{\@titlepagetrue}
+\if@compatibility\else
+\DeclareOption{notitlepage}{\@titlepagefalse}
+\fi
+% \end{macrocode}
+%
+% \subsection{openright option}
+% This option determines whether or not a chapter must start on
+% a right-hand page
+% request one.
+% \begin{macrocode}
+%<!article>\if@compatibility
+%<book>\@openrighttrue
+%<!article>\else
+%<!article>\DeclareOption{openright}{\@openrighttrue}
+%<!article>\DeclareOption{openany}{\@openrightfalse}
+%<!article>\fi
+% \end{macrocode}
+%
+% \subsection{Twocolumn printing}
+%
+% Two-column and one-column printing is again realized via a switch.
+% \begin{macrocode}
+\if@compatibility\else
+\DeclareOption{onecolumn}{\@twocolumnfalse}
+\fi
+\DeclareOption{twocolumn}{\@twocolumntrue}
+% \end{macrocode}
+%
+% \subsection{Equation numbering on the left}
+%
+% The option \Lopt{leqno} can be used to get the equation numbers
+% on the left side of the equation. It loads code which is generated
+% automatically from the kernel files when the format is built.
+% If the equation number does get a special formatting then instead
+% of using the kernel file the class would need to provide the code
+% explicitly.
+% \begin{macrocode}
+\DeclareOption{leqno}{\input{leqno.clo}}
+% \end{macrocode}
+%
+% \subsection{Flush left displays}
+%
+% The option \Lopt{fleqn} redefines the displayed math environments
+% in such a way that they come out flush left, with an indentation
+% of |\mathindent| from the prevailing left margin. It loads
+% code which is generated
+% automatically from the kernel files when the format is built.
+% \changes{v1.0h}{1993/12/18}{Corrected some typos. ASAJ.}
+% \begin{macrocode}
+\DeclareOption{fleqn}{\input{fleqn.clo}}
+% \end{macrocode}
+%
+% \subsection{Open bibliography}
+%
+% The option \Lopt{openbib} produces the ``open'' bibliography
+% style, in which each block starts on a new line, and succeeding
+% lines in a block are indented by |\bibindent|.
+% \changes{v1.3k}{1995/08/27}{openbib option reimplemented}
+% \begin{macrocode}
+\DeclareOption{openbib}{%
+% \end{macrocode}
+% First some hook into the bibliography environment is filled.
+% \begin{macrocode}
+ \AtEndOfPackage{%
+ \renewcommand\@openbib@code{%
+ \advance\leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ }%
+% \end{macrocode}
+% In addition the definition of |\newblock| is overwritten.
+% \begin{macrocode}
+ \renewcommand\newblock{\par}}%
+}
+% \end{macrocode}
+%
+%
+% \section{Executing Options}
+%
+% Here we execute the default options to initialize certain
+% variables. Note that the document class `book' always uses two
+% sided printing.
+% \begin{macrocode}
+%<*article>
+\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final}
+%</article>
+%<*report>
+\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany}
+%</report>
+%<*book>
+\ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright}
+%</book>
+% \end{macrocode}
+%
+% The |\ProcessOptions| command causes the execution of the code
+% for every option \Lopt{FOO}
+% which is declared and for which the user typed
+% the \Lopt{FOO} option in his
+% |\documentclass| command. For every option \Lopt{BAR} he typed,
+% which is not declared, the option is assumed to be a global option.
+% All options will be passed as document options to any
+% |\usepackage| command in the document preamble.
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+% Now that all the options have been executed we can load the
+% chosen class option file that contains all size dependent code.
+% \begin{macrocode}
+%<!book>\input{size1\@ptsize.clo}
+%<book>\input{bk1\@ptsize.clo}
+%</article|report|book>
+% \end{macrocode}
+%
+% \section{Loading Packages}
+%
+% The standard class files do not load additional packages.
+%
+%
+% \section{Document Layout}
+% \label{sec:classes:maincode}
+%
+% In this section we are finally dealing with the nasty typographical
+% details.
+%
+% \subsection{Fonts}
+%
+% \LaTeX\ offers the user commands to change the size of the font,
+% relative to the `main' size. Each relative size changing command
+% |\size| executes the command
+% |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where:
+%
+% \begin{description}
+% \item[\meta{font-size}] The absolute size of the font to use from
+% now on.
+%
+% \item[\meta{baselineskip}] The normal value of |\baselineskip|
+% for the size of the font selected. (The actual value will be
+% |\baselinestretch| * \meta{baselineskip}.)
+% \end{description}
+%
+% A number of commands, defined in the \LaTeX{} kernel, shorten the
+% following definitions and are used throughout. They are:
+% \begin{center}
+% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
+% \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
+% \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
+% \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
+% ...
+% \end{tabular}
+% \end{center}
+%
+% \begin{macro}{\normalsize}
+% \begin{macro}{\@normalsize}
+% \changes{v1.0o}{1994/01/31}{\cs{@normalsize} now defined in the
+% kernel}
+%
+% The user level command for the main size is |\normalsize|.
+% Internally \LaTeX{} uses |\@normalsize| when it refers to the
+% main size. |\@normalsize| will be defined to work like
+% |\normalsize| if the latter is redefined from its default
+% definition (that just issues an error message). Otherwise
+% |\@normalsize| simply selects a 10pt/12pt size.
+%
+% The |\normalsize| macro also sets new values for\\
+% |\abovedisplayskip|, |\abovedisplayshortskip| and
+% |\belowdisplayshortskip|.
+%
+% \changes{v1.0e}{1993/12/07}{\cs{normalsize} doesn't exist, so use
+% \cs{newcommand}}
+% \changes{v1.0h}{1993/12/18}{\cs{normalsize} is now defined in the
+% kernel, so use \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+%<*10pt|11pt|12pt>
+\renewcommand\normalsize{%
+%<*10pt>
+ \@setfontsize\normalsize\@xpt\@xiipt
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+%</10pt>
+%<*11pt>
+ \@setfontsize\normalsize\@xipt{13.6}%
+ \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
+%</11pt>
+%<*12pt>
+ \@setfontsize\normalsize\@xiipt{14.5}%
+ \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
+%</12pt>
+% \end{macrocode}
+% The |\belowdisplayskip| is always equal to the
+% |\abovedisplayskip|. The parameters of the first level list are
+% always given by |\@listI|.
+% \begin{macrocode}
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+% \end{macrocode}
+%
+% We initially choose the normalsize font.
+% \begin{macrocode}
+\normalsize
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\small}
+% This is similar to |\normalsize|.
+% \changes{v1.0h}{1993/12/18}{\cs{small} is now defined in the kernel,
+% so use \cs{renewcommand}. ASAJ.}
+% \changes{v1.2e}{1994/04/14}{\cs{small} is no longer defined in the
+% kernel; use \cs{newcommand}}
+% \begin{macrocode}
+\newcommand\small{%
+%<*10pt>
+ \@setfontsize\small\@ixpt{11}%
+ \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus2\p@
+ \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 4\p@ \@plus2\p@ \@minus2\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep}%
+%</10pt>
+%<*11pt>
+ \@setfontsize\small\@xpt\@xiipt
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 6\p@ \@plus2\p@ \@minus2\p@
+ \parsep 3\p@ \@plus2\p@ \@minus\p@
+ \itemsep \parsep}%
+%</11pt>
+%<*12pt>
+ \@setfontsize\small\@xipt{13.6}%
+ \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 9\p@ \@plus3\p@ \@minus5\p@
+ \parsep 4.5\p@ \@plus2\p@ \@minus\p@
+ \itemsep \parsep}%
+%</12pt>
+ \belowdisplayskip \abovedisplayskip
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footnotesize}
+% This is similar to |\normalsize|.
+% \changes{v1.0h}{1993/12/18}{\cs{footnotesize} is now defined in the
+% kernel, so use \cs{renewcommand}. ASAJ.}
+% \changes{v1.2e}{1994/04/14}{use \cs{newcommand} again}
+% \begin{macrocode}
+\newcommand\footnotesize{%
+%<*10pt>
+ \@setfontsize\footnotesize\@viiipt{9.5}%
+ \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus\p@
+ \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 3\p@ \@plus\p@ \@minus\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep}%
+%</10pt>
+%<*11pt>
+ \@setfontsize\footnotesize\@ixpt{11}%
+ \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
+ \abovedisplayshortskip \z@ \@plus\p@
+ \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 4\p@ \@plus2\p@ \@minus2\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+ \itemsep \parsep}%
+%</11pt>
+%<*12pt>
+ \@setfontsize\footnotesize\@xpt\@xiipt
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 6\p@ \@plus2\p@ \@minus2\p@
+ \parsep 3\p@ \@plus2\p@ \@minus\p@
+ \itemsep \parsep}%
+%</12pt>
+ \belowdisplayskip \abovedisplayskip
+}
+%</10pt|11pt|12pt>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\scriptsize}
+% \begin{macro}{\tiny}
+% \begin{macro}{\large}
+% \begin{macro}{\Large}
+% \begin{macro}{\LARGE}
+% \begin{macro}{\huge}
+% \begin{macro}{\Huge}
+% These are all much simpler than the previous macros, they just
+% select a new fontsize, but leave the parameters for displays and
+% lists alone.
+% \changes{v1.0h}{1993/12/18}{These are now defined in the kernel,
+% so use \cs{renewcommand}. ASAJ.}
+% \changes{v1.2e}{1994/04/14}{use \cs{newcommand} again}
+% \begin{macrocode}
+%<*10pt>
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%</10pt>
+%<*11pt>
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%</11pt>
+%<*12pt>
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xivpt{18}}
+\newcommand\Large{\@setfontsize\Large\@xviipt{22}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xxpt{25}}
+\newcommand\huge{\@setfontsize\huge\@xxvpt{30}}
+\let\Huge=\huge
+%</12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Paragraphing}
+%
+% \begin{macro}{\lineskip}
+% \begin{macro}{\normallineskip}
+% These parameters control \TeX's behaviour when two lines tend to
+% come too close together.
+% \begin{macrocode}
+%<*article|report|book>
+\setlength\lineskip{1\p@}
+\setlength\normallineskip{1\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\baselinestretch}
+% This is used as a multiplier for |\baselineskip|. The default is
+% to \emph{not} stretch the baselines. Note that if this command
+% doesn't resolve to ``empty'' any \texttt{plus} or \texttt{minus}
+% part in the specification of |\baselineskip| is ignored.
+% \begin{macrocode}
+\renewcommand\baselinestretch{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parskip}
+% \begin{macro}{\parindent}
+% |\parskip| gives extra vertical space between paragraphs and
+% |\parindent| is the width of the paragraph indentation. The value
+% of |\parindent| depends on whether we are in two column mode.
+% \changes{v1.0m}{1994/01/12}{\cs{parindent} should be different,
+% depending on the pointsize}
+% \begin{macrocode}
+\setlength\parskip{0\p@ \@plus \p@}
+%</article|report|book>
+%<*10pt|11pt|12pt>
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+%<10pt> \setlength\parindent{15\p@}
+%<11pt> \setlength\parindent{17\p@}
+%<12pt> \setlength\parindent{1.5em}
+\fi
+%</10pt|11pt|12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\smallskipamount}
+% \begin{macro}{\medskipamount}
+% \begin{macro}{\bigskipamount}
+% The values for these three parameters are set in the \LaTeX\
+% kernel. They should perhaps vary, according to the size option
+% specified. But as they have always had the same value regardless
+% of the size option we do not change them to stay compatible with
+% both \LaTeX~2.09 and older releases of \LaTeXe.
+% \changes{v1.3n}{1995/10/29}{Added setting the values of
+% \cs{...skipamount}}
+% \begin{macrocode}
+%<*10pt|11pt|12pt>
+\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}
+%</10pt|11pt|12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@lowpenalty}
+% \begin{macro}{\@medpenalty}
+% \begin{macro}{\@highpenalty}%
+% The commands |\nopagebreak| and |\nolinebreak| put in penalties
+% to discourage these breaks at the point they are put in.
+% They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
+% dependent on their argument.
+% \begin{macrocode}
+%<*article|report|book>
+\@lowpenalty 51
+\@medpenalty 151
+\@highpenalty 301
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\clubpenalty}
+% \begin{macro}{\widowpenalty}
+% These penalties are use to discourage club and widow lines.
+% Because we use their default values we only show them here,
+% commented out.
+% \begin{macrocode}
+% \clubpenalty 150
+% \widowpenalty 150
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\displaywidowpenalty}
+% \begin{macro}{\predisplaypenalty}
+% \begin{macro}{\postdisplaypenalty}
+% Discourage (but not so much) widows in front of a math display
+% and forbid breaking directly in front of a display. Allow break
+% after a display without a penalty. Again the default values are
+% used, therefore we only show them here.
+% \begin{macrocode}
+% \displaywidowpenalty 50
+% \predisplaypenalty 10000
+% \postdisplaypenalty 0
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\interlinepenalty}
+% Allow the breaking of a page in the middle of a paragraph.
+% \begin{macrocode}
+% \interlinepenalty 0
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\brokenpenalty}
+% We allow the breaking of a page after a hyphenated line.
+% \changes{v1.1a}{1994/03/12}{Show correct default which is 100}
+% \begin{macrocode}
+% \brokenpenalty 100
+%</article|report|book>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Page Layout}
+%
+% All margin dimensions are measured from a point one inch from the
+% top and lefthand side of the page.
+%
+% \subsubsection{Vertical spacing}
+%
+% \begin{macro}{\headheight}
+% \begin{macro}{\headsep}
+% \begin{macro}{\topskip}
+% The |\headheight| is the height of the box that will contain the
+% running head. The |\headsep| is the distance between the bottom
+% of the running head and the top of the text. The |\topskip| is
+% the |\baselineskip| for the first line on a page; \LaTeX's output
+% routine will not work properly if it has the value 0pt, so do not
+% do that!
+% \begin{macrocode}
+%<*10pt|11pt|12pt>
+\setlength\headheight{12\p@}
+%<!bk>\setlength\headsep {25\p@}
+%<10pt&bk>\setlength\headsep {.25in}
+%<11pt&bk>\setlength\headsep {.275in}
+%<12pt&bk>\setlength\headsep {.275in}
+%<10pt>\setlength\topskip {10\p@}
+%<11pt>\setlength\topskip {11\p@}
+%<12pt>\setlength\topskip {12\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\footskip}
+% The distance from the baseline of the box which contains the
+% running footer to the baseline of last line of text is controlled
+% by the |\footskip|.
+% \begin{macrocode}
+%<!bk>\setlength\footskip{30\p@}
+%<10pt&bk>\setlength\footskip{.35in}
+%<11pt&bk>\setlength\footskip{.38in}
+%<12pt&bk>\setlength\footskip{30\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maxdepth}
+% \changes{v1.2k}{1994/05/06}{Added setting of \cs{maxdepth} and
+% \cs{@maxdepth}}
+% \changes{v1.3j}{1995/08/16}{Take setting of
+% \cs{@maxdepth} out again}
+% The \TeX\ primitive register |\maxdepth| has a function that is
+% similar to that of |\topskip|. The register |\@maxdepth| should
+% always contain a copy of |\maxdepth|. This is achieved by setting
+% it internally at |\begin{document}|. In both plain \TeX\ and
+% \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in
+% native \LaTeX2e\ mode we let the value depend on the typesize. We
+% set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times
+% 1.5$. As it happens, in these classes |\topskip| is equal to the
+% typesize, therefore we set |\maxdepth| to half the value of
+% |\topskip|.
+% \begin{macrocode}
+\if@compatibility \setlength\maxdepth{4\p@} \else
+\setlength\maxdepth{.5\topskip} \fi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{The dimension of text}
+%
+% \begin{macro}{\textwidth}
+% When we are in compatibility mode we have to make sure that the
+% dimensions of the printed area are not different from what the
+% user was used to see.
+%
+% \begin{macrocode}
+\if@compatibility
+ \if@twocolumn
+ \setlength\textwidth{410\p@}
+ \else
+%<10pt&!bk> \setlength\textwidth{345\p@}
+%<11pt&!bk> \setlength\textwidth{360\p@}
+%<12pt&!bk> \setlength\textwidth{390\p@}
+%<10pt&bk> \setlength\textwidth{4.5in}
+%<11pt&bk> \setlength\textwidth{5in}
+%<12pt&bk> \setlength\textwidth{5in}
+ \fi
+% \end{macrocode}
+% When we are not in compatibility mode we can set some of the
+% dimensions differently, taking into account the paper size for
+% instance.
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% First, we calculate the maximum |\textwidth|, which we will allow
+% on the selected paper and store it in |\@tempdima|. Then we store
+% the length of a line with approximately 60--70 characters in
+% |\@tempdimb|. The values given are more or less suitable when
+% Computer Modern fonts are used.
+% \changes{v1.1a}{1994/03/12}{Have old values for width in native mode}
+% \begin{macrocode}
+ \setlength\@tempdima{\paperwidth}
+ \addtolength\@tempdima{-2in}
+%<10pt> \setlength\@tempdimb{345\p@}
+%<11pt> \setlength\@tempdimb{360\p@}
+%<12pt> \setlength\@tempdimb{390\p@}
+% \end{macrocode}
+%
+% Now we can set the |\textwidth|, depending on whether we will be
+% setting one or two columns.
+%
+% In two column mode each \emph{column} shouldn't be wider than
+% |\@tempdimb| (which could happen on \textsc{a3} paper for
+% instance).
+% \begin{macrocode}
+ \if@twocolumn
+ \ifdim\@tempdima>2\@tempdimb\relax
+ \setlength\textwidth{2\@tempdimb}
+ \else
+ \setlength\textwidth{\@tempdima}
+ \fi
+% \end{macrocode}
+%
+% In one column mode the text should not be wider than the minimum
+% of the paperwidth (minus 2 inches for the margins) and the
+% maximum length of a line as defined by the number of characters.
+% \begin{macrocode}
+ \else
+ \ifdim\@tempdima>\@tempdimb\relax
+ \setlength\textwidth{\@tempdimb}
+ \else
+ \setlength\textwidth{\@tempdima}
+ \fi
+ \fi
+\fi
+% \end{macrocode}
+%
+% Here we modify the width of the text a little to be a whole
+% number of points.
+% \begin{macrocode}
+\if@compatibility\else
+ \@settopoint\textwidth
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textheight}
+% Now that we have computed the width of the text, we have to take
+% care of the height. The |\textheight| is the height of text
+% (including footnotes and figures, excluding running head and
+% foot).
+%
+% First make sure that the compatibility mode gets the same
+% dimensions as we had with \LaTeX2.09. The number of lines was
+% calculated as the floor of the old |\textheight| minus
+% |\topskip|, divided by |\baselineskip| for |\normalsize|. The
+% old value of |\textheight| was 528pt.
+%
+% \begin{macrocode}
+\if@compatibility
+%<10pt&!bk> \setlength\textheight{43\baselineskip}
+%<10pt&bk> \setlength\textheight{41\baselineskip}
+%<11pt> \setlength\textheight{38\baselineskip}
+%<12pt> \setlength\textheight{36\baselineskip}
+% \end{macrocode}
+%
+% Again we compute this, depending on the papersize and depending
+% on the baselineskip that is used, in order to have a whole number
+% of lines on the page.
+% \begin{macrocode}
+\else
+ \setlength\@tempdima{\paperheight}
+% \end{macrocode}
+%
+% We leave at least a 1 inch margin on the top and the bottom of
+% the page.
+% \begin{macrocode}
+ \addtolength\@tempdima{-2in}
+% \end{macrocode}
+%
+% We also have to leave room for the running headers and footers.
+% \begin{macrocode}
+ \addtolength\@tempdima{-1.5in}
+% \end{macrocode}
+%
+% Then we divide the result by the current |\baselineskip| and
+% store this in the count register |\@tempcnta|, which then
+% contains the number of lines that fit on this page.
+% \begin{macrocode}
+ \divide\@tempdima\baselineskip
+ \@tempcnta=\@tempdima
+% \end{macrocode}
+%
+% From this we can calculate the height of the text.
+% \begin{macrocode}
+ \setlength\textheight{\@tempcnta\baselineskip}
+\fi
+% \end{macrocode}
+%
+% The first line on the page has a height of |\topskip|.
+% \begin{macrocode}
+\addtolength\textheight{\topskip}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Margins}
+%
+% Most of the values of these parameters are now calculated, based
+% on the papersize in use. In the calculations the |\marginparsep|
+% needs to be taken into account so we give it its value first.
+%
+% \begin{macro}{\marginparsep}
+% \begin{macro}{\marginparpush}
+% The horizontal space between the main text and marginal notes is
+% determined by |\marginparsep|, the minimum vertical separation
+% between two marginal notes is controlled by |\marginparpush|.
+% \begin{macrocode}
+\if@twocolumn
+ \setlength\marginparsep {10\p@}
+\else
+%<10pt&!bk> \setlength\marginparsep{11\p@}
+%<11pt&!bk> \setlength\marginparsep{10\p@}
+%<12pt&!bk> \setlength\marginparsep{10\p@}
+%<bk> \setlength\marginparsep{7\p@}
+\fi
+%<10pt|11pt>\setlength\marginparpush{5\p@}
+%<12pt>\setlength\marginparpush{7\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Now we can give the values for the other margin parameters. For
+% native \LaTeXe, these are calculated.
+% \begin{macro}{\oddsidemargin}
+% \begin{macro}{\evensidemargin}
+% \begin{macro}{\marginparwidth}
+% First we give the values for the compatibility mode.
+%
+% Values for two-sided printing:
+% \begin{macrocode}
+\if@compatibility
+%<*bk>
+%<10pt> \setlength\oddsidemargin {.5in}
+%<11pt> \setlength\oddsidemargin {.25in}
+%<12pt> \setlength\oddsidemargin {.25in}
+%<10pt> \setlength\evensidemargin {1.5in}
+%<11pt> \setlength\evensidemargin {1.25in}
+%<12pt> \setlength\evensidemargin {1.25in}
+%<10pt> \setlength\marginparwidth {.75in}
+%<11pt> \setlength\marginparwidth {1in}
+%<12pt> \setlength\marginparwidth {1in}
+%</bk>
+%<*!bk>
+ \if@twoside
+%<10pt> \setlength\oddsidemargin {44\p@}
+%<11pt> \setlength\oddsidemargin {36\p@}
+%<12pt> \setlength\oddsidemargin {21\p@}
+%<10pt> \setlength\evensidemargin {82\p@}
+%<11pt> \setlength\evensidemargin {74\p@}
+%<12pt> \setlength\evensidemargin {59\p@}
+%<10pt> \setlength\marginparwidth {107\p@}
+%<11pt> \setlength\marginparwidth {100\p@}
+%<12pt> \setlength\marginparwidth {85\p@}
+% \end{macrocode}
+% Values for one-sided printing:
+% \begin{macrocode}
+ \else
+%<10pt> \setlength\oddsidemargin {63\p@}
+%<11pt> \setlength\oddsidemargin {54\p@}
+%<12pt> \setlength\oddsidemargin {39.5\p@}
+%<10pt> \setlength\evensidemargin {63\p@}
+%<11pt> \setlength\evensidemargin {54\p@}
+%<12pt> \setlength\evensidemargin {39.5\p@}
+%<10pt> \setlength\marginparwidth {90\p@}
+%<11pt> \setlength\marginparwidth {83\p@}
+%<12pt> \setlength\marginparwidth {68\p@}
+ \fi
+%</!bk>
+% \end{macrocode}
+% And values for two column mode:
+% \begin{macrocode}
+ \if@twocolumn
+ \setlength\oddsidemargin {30\p@}
+ \setlength\evensidemargin {30\p@}
+ \setlength\marginparwidth {48\p@}
+ \fi
+% \end{macrocode}
+%
+% When we are not in compatibility mode we can take the dimensions
+% of the selected paper into account.
+%
+% The values for |\oddsidemargin| and |\marginparwidth| will be set
+% depending on the status of the |\if@twoside|.
+%
+% If |@twoside| is true (which is always the case for book) we make
+% the inner margin smaller than the outer one.
+% \begin{macrocode}
+\else
+ \if@twoside
+ \setlength\@tempdima {\paperwidth}
+ \addtolength\@tempdima {-\textwidth}
+ \setlength\oddsidemargin {.4\@tempdima}
+ \addtolength\oddsidemargin {-1in}
+% \end{macrocode}
+% The width of the margin for text is set to the remainder of the
+% width except for a `real margin' of white space of width 0.4in.
+% A check should perhaps be built in to ensure that the (text)
+% margin width does not get too small!
+%
+% \changes{v1.1a}{1994/03/12}{New algorithm for \cs{oddsidemargin}}
+% \changes{v1.1a}{1994/03/12}{New algorithm for \cs{marginparwidth}}
+% \changes{v1.2z}{1995/04/14}{Also take \cs{marginparsep} into account
+% here}
+% \begin{macrocode}
+ \setlength\marginparwidth {.6\@tempdima}
+ \addtolength\marginparwidth {-\marginparsep}
+ \addtolength\marginparwidth {-0.4in}
+% \end{macrocode}
+% For one-sided printing we center the text on the page, by
+% calculating the difference between |\textwidth| and
+% |\paperwidth|. Half of that difference is than used for
+% the margin (thus |\oddsidemargin| is |1in| less).
+% \begin{macrocode}
+ \else
+ \setlength\@tempdima {\paperwidth}
+ \addtolength\@tempdima {-\textwidth}
+ \setlength\oddsidemargin {.5\@tempdima}
+ \addtolength\oddsidemargin {-1in}
+ \setlength\marginparwidth {.5\@tempdima}
+ \addtolength\marginparwidth {-\marginparsep}
+ \addtolength\marginparwidth {-0.4in}
+ \addtolength\marginparwidth {-.4in}
+ \fi
+% \end{macrocode}
+% With the above algorithm the |\marginparwidth| can come out quite
+% large which we may not want.
+% \begin{macrocode}
+ \ifdim \marginparwidth >2in
+ \setlength\marginparwidth{2in}
+ \fi
+% \end{macrocode}
+% Having done these calculations we make them pt values.
+% \begin{macrocode}
+ \@settopoint\oddsidemargin
+ \@settopoint\marginparwidth
+% \end{macrocode}
+%
+% The |\evensidemargin| can now be computed from the values set
+% above.
+% \changes{v1.0l}{1994/01/11}{Computing of \cs{evensidemargin}
+% should only occur in compatibility mode}
+% \begin{macrocode}
+ \setlength\evensidemargin {\paperwidth}
+ \addtolength\evensidemargin{-2in}
+ \addtolength\evensidemargin{-\textwidth}
+ \addtolength\evensidemargin{-\oddsidemargin}
+% \end{macrocode}
+% Setting |\evensidemargin| to a full point value may produce a
+% small error. However it will lie within the error range a
+% doublesided printer of today's technology can accurately print.
+% \begin{macrocode}
+ \@settopoint\evensidemargin
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\topmargin}
+% The |\topmargin| is the distance between the top of `the
+% printable area'---which is 1 inch below the top of the
+% paper--and the top of the box which contains the running head.
+%
+% It can now be computed from the values set above.
+% \begin{macrocode}
+\if@compatibility
+%<!bk> \setlength\topmargin{27pt}
+%<10pt&bk> \setlength\topmargin{.75in}
+%<11pt&bk> \setlength\topmargin{.73in}
+%<12pt&bk> \setlength\topmargin{.73in}
+\else
+ \setlength\topmargin{\paperheight}
+ \addtolength\topmargin{-2in}
+ \addtolength\topmargin{-\headheight}
+ \addtolength\topmargin{-\headsep}
+ \addtolength\topmargin{-\textheight}
+ \addtolength\topmargin{-\footskip} % this might be wrong!
+% \end{macrocode}
+% By changing the factor in the next line the complete page
+% can be shifted vertically.
+% \changes{v1.2u}{1994/07/13}{Moved rounding of \cs{topmargin} to
+% native mode}
+% \begin{macrocode}
+ \addtolength\topmargin{-.5\topmargin}
+ \@settopoint\topmargin
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Footnotes}
+%
+% \begin{macro}{\footnotesep}
+% |\footnotesep| is the height of the strut placed at the beginning
+% of every footnote. It equals the height of a normal
+% |\footnotesize| strut in this
+% class, thus no extra space occurs between footnotes.
+% \begin{macrocode}
+%<10pt>\setlength\footnotesep{6.65\p@}
+%<11pt>\setlength\footnotesep{7.7\p@}
+%<12pt>\setlength\footnotesep{8.4\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footins}
+% |\skip\footins| is the space between the last line of the main
+% text and the top of the first footnote.
+% \begin{macrocode}
+%<10pt>\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%<11pt>\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@}
+%<12pt>\setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@}
+%</10pt|11pt|12pt>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Float placement parameters}
+%
+% All float parameters are given default values in the \LaTeXe{}
+% kernel. For this reason parameters that are not counters
+% need to be set with |\renewcommand|.
+%
+% \paragraph{Limits for the placement of floating objects}
+%
+% \begin{macro}{\c@topnumber}
+% The \Lcount{topnumber} counter holds the maximum number of
+% floats that can appear on the top of a text page.
+% \begin{macrocode}
+%<*article|report|book>
+\setcounter{topnumber}{2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\topfraction}
+% This indicates the maximum part of a text page that can be
+% occupied by floats at the top.
+% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
+% \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+\renewcommand\topfraction{.7}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@bottomnumber}
+% The \Lcount{bottomnumber} counter holds the maximum number of
+% floats that can appear on the bottom of a text page.
+% \begin{macrocode}
+\setcounter{bottomnumber}{1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bottomfraction}
+% This indicates the maximum part of a text page that can be
+% occupied by floats at the bottom.
+% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
+% \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+\renewcommand\bottomfraction{.3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@totalnumber}
+% This indicates the maximum number of floats that can appear on
+% any text page.
+% \begin{macrocode}
+\setcounter{totalnumber}{3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textfraction}
+% This indicates the minimum part of a text page that has to be
+% occupied by text.
+% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
+% \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+\renewcommand\textfraction{.2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\floatpagefraction}
+% This indicates the minimum part of a page that has to be
+% occupied by floating objects before a `float page' is produced.
+% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
+% \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+\renewcommand\floatpagefraction{.5}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@dbltopnumber}
+% The \Lcount{dbltopnumber} counter holds the maximum number of
+% two column floats that can appear on the top of a two column text
+% page.
+% \begin{macrocode}
+\setcounter{dbltopnumber}{2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dbltopfraction}
+% This indicates the maximum part of a two column text page that
+% can be occupied by two column floats at the top.
+% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
+% \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+\renewcommand\dbltopfraction{.7}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dblfloatpagefraction}
+% This indicates the minimum part of a page that has to be
+% occupied by two column wide floating objects before a `float
+% page' is produced.
+% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
+% \cs{renewcommand}. ASAJ.}
+% \begin{macrocode}
+\renewcommand\dblfloatpagefraction{.5}
+%</article|report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Floats on a text page}
+%
+% \begin{macro}{\floatsep}
+% \begin{macro}{\textfloatsep}
+% \begin{macro}{\intextsep}
+% When a floating object is placed on a page with text, these
+% parameters control the separation between the float and the other
+% objects on the page. These parameters are used for both
+% one-column mode and single-column floats in two-column mode.
+%
+% |\floatsep| is the space between adjacent floats that are moved
+% to the top or bottom of the text page.
+%
+% |\textfloatsep| is the space between the main text and floats
+% at the top or bottom of the page.
+%
+% |\intextsep| is the space between in-text floats and the text.
+% \begin{macrocode}
+%<*10pt>
+\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+%</10pt>
+%<*11pt>
+\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+%</11pt>
+%<*12pt>
+\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\intextsep {14\p@ \@plus 4\p@ \@minus 4\p@}
+%</12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\dblfloatsep}
+% \begin{macro}{\dbltextfloatsep}
+% When floating objects that span the whole |\textwidth| are placed
+% on a text page when we are in twocolumn mode the separation
+% between the float and the text is controlled by |\dblfloatsep|
+% and |\dbltextfloatsep|.
+%
+% |\dblfloatsep| is the space between adjacent floats that are moved
+% to the top or bottom of the text page.
+%
+% |\dbltextfloatsep| is the space between the main text and floats
+% at the top or bottom of the page.
+%
+% \begin{macrocode}
+%<*10pt>
+\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+%</10pt>
+%<*11pt>
+\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+%</11pt>
+%<*12pt>
+\setlength\dblfloatsep {14\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+%</12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \paragraph{Floats on their own page or column}
+%
+% \begin{macro}{\@fptop}
+% \begin{macro}{\@fpsep}
+% \begin{macro}{\@fpbot}
+% When floating objects are placed on separate pages the layout of
+% such pages is controlled by these parameters. At the top of the
+% page |\@fptop| amount of stretchable whitespace is inserted, at
+% the bottom of the page we get an |\@fpbot| amount of stretchable
+% whitespace. Between adjacent floats the |\@fpsep| is inserted.
+%
+% These parameters are used for the placement of floating objects
+% in one column mode, or in single column floats in two column
+% mode.
+%
+% Note that at least one of the two parameters |\@fptop| and
+% |\@fpbot| should contain a |plus ...fil| to allow filling the
+% remaining empty space.
+% \begin{macrocode}
+%<*10pt>
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+%</10pt>
+%<*11pt>
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+%</11pt>
+%<*12pt>
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{10\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+%</12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@dblfptop}
+% \begin{macro}{\@dblfpsep}
+% \begin{macro}{\@dblfpbot}
+% Double column floats in two column mode are handled with similar
+% parameters.
+% \begin{macrocode}
+%<*10pt>
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+%</10pt>
+%<*11pt>
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+%</11pt>
+%<*12pt>
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{10\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+%</12pt>
+%<*article|report|book>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Page Styles}
+%
+% The page style \pstyle{foo} is defined by defining the command
+% |\ps@foo|. This command should make only local definitions.
+% There should be no stray spaces in the definition, since they
+% could lead to mysterious extra spaces in the output (well, that's
+% something that should be always avoided).
+%
+% \begin{macro}{\@evenhead}
+% \begin{macro}{\@oddhead}
+% \begin{macro}{\@evenfoot}
+% \begin{macro}{\@oddfoot}
+% The |\ps@...| command defines the macros |\@oddhead|,
+% |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
+% heads and feet---e.g., |\@oddhead| is the macro to produce the
+% contents of the heading box for odd-numbered pages. It is called
+% inside an |\hbox| of width |\textwidth|.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Marking conventions}
+%
+% To make headings determined by the sectioning commands, the page
+% style defines the commands |\chaptermark|, |\sectionmark|,
+% \ldots,\\
+% where |\chaptermark{|\meta{TEXT}|}| is called by
+% |\chapter| to set a mark, and so on.
+%
+% The |\...mark| commands and the |\...head| macros are defined
+% with the help of the following macros. (All the |\...mark|
+% commands should be initialized to no-ops.)
+%
+% \LaTeX{} extends \TeX's |\mark| facility by producing two kinds
+% of marks, a `left' and a `right' mark, using the following
+% commands:
+% \begin{flushleft}
+% |\markboth{|\meta{LEFT}|}{|\meta{RIGHT}|}|: Adds both marks.
+%
+% |\markright{|\meta{RIGHT}|}|: Adds a `right' mark.
+%
+% |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
+% or |\@evenfoot| macros, it gets the current `left'
+% mark. |\leftmark| works like \TeX's |\botmark|
+% command.
+%
+% |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
+% or |\@evenfoot| macros, it gets the current
+% `right' mark. |\rightmark| works like \TeX's
+% |\firstmark| command.
+% \end{flushleft}
+%
+% The marking commands work reasonably well for right marks
+% `numbered within' left marks---e.g., the left mark is changed by a
+% |\chapter| command and the right mark is changed by a |\section|
+% command. However, it does produce somewhat anomalous results if
+% two |\markboth|'s occur on the same page.
+%
+%
+% Commands like |\tableofcontents| that should set the marks in some
+% page styles use a |\@mkboth| command, which is |\let| by the
+% pagestyle command (|\ps@...|) to |\markboth| for setting the
+% heading or to |\@gobbletwo| to do nothing.
+%
+%
+% \subsubsection{Defining the page styles}
+% \label{sec:classes:pagestyle}
+%
+% The pagestyles \pstyle{empty} and \pstyle{plain} are defined in
+% \file{latex.dtx}.
+%
+% \begin{macro}{\ps@headings}
+% The definition of the page style \pstyle{headings} has to be
+% different for two sided printing than it is for one sided
+% printing.
+%
+% \begin{macrocode}
+\if@twoside
+ \def\ps@headings{%
+% \end{macrocode}
+% The running feet are empty in this page style, the running head
+% contains the page number and one of the marks.
+% \begin{macrocode}
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \end{macrocode}
+%
+% When using this page style, the contents of the running head is
+% determined by the chapter and section titles. So we |\let|
+% |\@mkboth| to |\markboth|.
+% \begin{macrocode}
+ \let\@mkboth\markboth
+% \end{macrocode}
+%
+% For the article document class we define |\sectionmark| to clear
+% the right mark and put the number of the section (when it is
+% numbered) and its title in the left mark. The rightmark is set by
+% |\subsectionmark| to contain the subsection titles.
+%
+% Note the use of |##1| for the parameter of the |\sectionmark|
+% command, which will be defined when |\ps@headings| is executed.
+%
+% \changes{v1.2z}{1995/04/03}{Removed extra dot after \cs{thesection}
+% (PR 1519)}
+% \changes{v1.3c}{1995/05/25}{Replace \cs{hskip}
+% \texttt{1em}\cs{relax} with \cs{quad}}
+% \begin{macrocode}
+%<*article>
+ \def\sectionmark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \thesection\quad
+ \fi
+ ##1}}{}}%
+ \def\subsectionmark##1{%
+ \markright {%
+ \ifnum \c@secnumdepth >\@ne
+ \thesubsection\quad
+ \fi
+ ##1}}}
+%</article>
+% \end{macrocode}
+%
+% In the report and book document classes we use the |\chaptermark|
+% and |\sectionmark| macros to fill the running heads.
+%
+% Note the use of |##1| for the parameter of the |\chaptermark|
+% command, which will be defined when |\ps@headings| is executed.
+%
+% \begin{macrocode}
+%<*report|book>
+ \def\chaptermark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+%<book> \if@mainmatter
+ \@chapapp\ \thechapter. \ %
+%<book> \fi
+ \fi
+ ##1}}{}}%
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \thesection. \ %
+ \fi
+ ##1}}}}
+%</report|book>
+% \end{macrocode}
+%
+% The definition of |\ps@headings| for one sided printing can be
+% much simpler, because we treat even and odd pages the same.
+% Therefore we don't need to define |\@even...|.
+% \begin{macrocode}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+% \end{macrocode}
+% We use |\markright| now instead of |\markboth| as we did for two
+% sided printing.
+% \begin{macrocode}
+%<*article>
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \thesection\quad
+ \fi
+ ##1}}}}
+%</article>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*report|book>
+ \def\chaptermark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+%<book> \if@mainmatter
+ \@chapapp\ \thechapter. \ %
+%<book> \fi
+ \fi
+ ##1}}}}
+%</report|book>
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ps@myheadings}
+% The definition of the page style \pstyle{myheadings} is fairly
+% simple because the user determines the contents of the running
+% head himself by using the |\markboth| and |\markright| commands.
+%
+% \begin{macrocode}
+\def\ps@myheadings{%
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \end{macrocode}
+%
+% We have to make sure that the marking commands that are used by
+% the chapter and section headings are disabled. We do this
+% |\let|ting them to a macro that gobbles its argument(s).
+% \begin{macrocode}
+ \let\@mkboth\@gobbletwo
+%<!article> \let\chaptermark\@gobble
+ \let\sectionmark\@gobble
+%<article> \let\subsectionmark\@gobble
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Document Markup}
+%
+% \subsection{The title}
+%
+% \begin{macro}{\title}
+% \begin{macro}{\author}
+% \begin{macro}{\date}
+% These three macros are provided by \file{latex.dtx} to provide
+% information about the title, author(s) and date of the document.
+% The information is stored away in internal control sequences.
+% It is the task of the |\maketitle| command to use the
+% information provided. The definitions of these macros are shown
+% here for information.
+% \begin{macrocode}
+% \newcommand*{\title}[1]{\gdef\@title{#1}}
+% \newcommand*{\author}[1]{\gdef\@author{#1}}
+% \newcommand*{\date}[1]{\gdef\@date{#1}}
+% \end{macrocode}
+% The |\date| macro gets today's date by default.
+% \begin{macrocode}
+% \date{\today}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\maketitle}
+% The definition of |\maketitle| depends on whether a separate
+% title page is made. This is the default for the report and book
+% document classes, but for the article class it is optional.
+%
+% When we are making a title page, we locally redefine
+% |\footnotesize| and |footnoterule| to change the appearance of
+% the footnotes that are produced by the |\thanks| command;
+% these changes affect all footnotes.
+% \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in
+% title, etc}
+% \begin{macrocode}
+ \if@titlepage
+ \newcommand\maketitle{\begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+% \end{macrocode}
+% We center the entire title vertically; the centering is set off a
+% little by adding a |\vskip|. (In compatibility mode the pagenumber
+% is set to 0 by the titlepage environment to keep the behaviour
+% of \LaTeX\ 2.09 style files.)
+% \changes{v1.0g}{1993/12/09}{Removed the setting of the page number,
+% when not in compatibility mode}
+% \changes{v1.2c}{1994/03/17}{Removed setting of page number, now done
+% in titlepage environment}
+% \begin{macrocode}
+ \null\vfil
+ \vskip 60\p@
+% \end{macrocode}
+% Then we set the title, in a |\LARGE| font; leave a little space
+% and set the author(s) in a |\large| font. We do this inside a
+% tabular environment to get them in a single column.
+% Before the date we leave a little whitespace again.
+% \begin{macrocode}
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 3em%
+ {\large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1.5em%
+ {\large \@date \par}% % Set date in \large size.
+ \end{center}\par
+% \end{macrocode}
+% Then we call |\@thanks| to print the information that goes into
+% the footnote and finish the page.
+% \begin{macrocode}
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+% \end{macrocode}
+% We reset the \Lcount{footnote} counter, disable |\thanks| and
+% |\maketitle| and save some storage space by emptying the internal
+% information macros.
+% \changes{v1.3j}{1995/08/16}{use \cs{let} to save space}
+% \changes{v1.3n}{1995/10/29}{Empty \cs{@date} as well}
+% \begin{macrocode}
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+% \end{macrocode}
+% After the title is set the declaration commands |\title|, etc.\
+% can vanish.
+% The definition of |\and| makes only sense within the argument of
+% |\author| so this can go as well.
+% \changes{v1.3k}{1995/08/27}{Disable \cs{title} and similar decls}
+% \begin{macrocode}
+ \global\let\title\relax
+ \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
+% and we have to deal with two column documents.
+%
+% Therefore we first start a new group to keep changes local. Then
+% we redefine |\thefootnote| to use |\fnsymbol|; and change
+% |\@makefnmark| so that footnotemarks have zero width (to make the
+% centering of the author names look better).
+% \changes{v1.2s}{1994/06/02}{Reset \cs{@makefntext}}
+% \changes{v1.3a}{1995/05/17}{Use \cs{@makefnmark} in definition of
+% \cs{@makefntext}}
+% \changes{v1.3g}{1995/06/26}{Fix definition of \cs{@makefnmark} and
+% \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{%
+ \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
+% \end{macrocode}
+% If this is a twocolumn document we start a new page in twocolumn
+% mode, with the title set to the full width of the text. The
+% actual printing of the title information is left to
+% |\@maketitle|.
+% \changes{v1.2k}{1994/05/06}{Added check on number of columns in use
+% locally}
+% \begin{macrocode}
+ \if@twocolumn
+ \ifnum \col@number=\@ne
+ \@maketitle
+ \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
+% \end{macrocode}
+% This page gets a \pstyle{plain} layout. We call |\@thanks| to
+% produce the footnotes.
+% \begin{macrocode}
+ \thispagestyle{plain}\@thanks
+% \end{macrocode}
+% Now we can close the group, reset the \Lcount{footnote} counter,
+% disable |\thanks|, |\maketitle| and |\@maketitle| and save some
+% storage space by emptying the internal information macros.
+% \changes{v1.3j}{1995/08/16}{use \cs{let} to save space}
+% \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
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@maketitle}
+% This macro takes care of formatting the title information when we
+% have no separate title page.
+%
+% We always start a new page, leave some white space and center the
+% information. The title is set in a |\LARGE| font, the author
+% names and the date in a |\large| font.
+% \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in
+% title, etc}
+% \begin{macrocode}
+\def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \end{center}%
+ \par
+ \vskip 1.5em}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Chapters and Sections}
+%
+% \subsubsection{Building blocks} The definitions in this part of the
+% class file make use of two internal macros, |\@startsection| and
+% |\secdef|. To understand
+% what is going on here, we describe their syntax.
+%
+% The macro |\@startsection| has 6 required arguments, optionally
+% followed by a $*$, an optional argument and a required argument:
+%
+% |\@startsection|\meta{name}\meta{level}\meta{indent}^^A
+% \meta{beforeskip}\meta{afterskip}\meta{style}
+% optional *\\
+% \null\hphantom{\bslash @startsection}^^A
+% |[|\meta{altheading}|]|\meta{heading}
+%
+% It is a generic command to start a section, the arguments have
+% the following meaning:
+%
+% \begin{description}
+% \item[\meta{name}] The name of the user level command, e.g.,
+% `section'.
+% \item[\meta{level}] A number, denoting the depth of the section
+% -- e.g., chapter=1, section = 2, etc. A section number
+% will be printed if and only if \meta{level} $<=$ the value
+% of the \Lcount{secnumdepth} counter.
+% \item[\meta{indent}] The indentation of the heading from the left
+% margin
+% \item[\meta{beforeskip}] The absolute value of this argument
+% gives the skip to leave above the heading. If it is
+% negative, then the paragraph indent of the text following
+% the heading is suppressed.
+% \item[\meta{afterskip}] If positive, this gives the skip to leave
+% below the heading, else it gives the skip to leave to the
+% right of a run-in heading.
+% \item[\meta{style}] Commands to set the style of the heading.
+% \item[$*$] When this is missing the heading is numbered and the
+% corresponding counter is incremented.
+% \item[\meta{altheading}] Gives an alternative heading to use in
+% the table of contents and in the running heads. This should
+% not be present when the $*$ form is used.
+% \item[\meta{heading}] The heading of the new section.
+% \end{description}
+% A sectioning command is normally defined to |\@startsection| and
+% its first six arguments.
+%
+% The macro |\secdef| can be used when a sectioning command is
+% defined without using |\@startsection|. It has two arguments:
+%
+% |\secdef|\meta{unstarcmds}\meta{starcmds}
+%
+% \begin{description}
+% \item[\meta{unstarcmds}] Used for the normal form of the
+% sectioning command.
+% \item[\meta{starcmds}] Used for the $*$-form of the
+% sectioning command.
+% \end{description}
+%
+% You can use |\secdef| as follows:
+% \begin{verbatim}
+% \def\chapter { ... \secdef \CMDA \CMDB }
+% \def\CMDA [#1]#2{ ... } % Command to define
+% % \chapter[...]{...}
+% \def\CMDB #1{ ... } % Command to define
+% % \chapter*{...}
+% \end{verbatim}
+%
+% \subsubsection{Mark commands}
+%
+% \begin{macro}{\chaptermark}
+% \begin{macro}{\sectionmark}
+% \begin{macro}{\subsectionmark}
+% \begin{macro}{\subsubsectionmark}
+% \begin{macro}{\paragraphmark}
+% \begin{macro}{\subparagraphmark}
+% Default initializations of |\...mark| commands. These commands
+% are used in the definition of the page styles (see
+% section~\ref{sec:classes:pagestyle}) Most of them are already defined by
+% \file{latex.dtx}, so they are only shown here.
+%
+% \begin{macrocode}
+%<!article>\newcommand*\chaptermark[1]{}
+% \newcommand*\sectionmark[1]{}
+% \newcommand*\subsectionmark[1]{}
+% \newcommand*\subsubsectionmark[1]{}
+% \newcommand*\paragraphmark[1]{}
+% \newcommand*\subparagraphmark[1]{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Define Counters}
+%
+% \begin{macro}{\c@secnumdepth}
+% The value of the counter \Lcount{secnumdepth} gives the depth of
+% the highest-level sectioning command that is to produce section
+% numbers.
+% \begin{macrocode}
+%<article>\setcounter{secnumdepth}{3}
+%<!article>\setcounter{secnumdepth}{2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@part}
+% \begin{macro}{\c@chapter}
+% \begin{macro}{\c@section}
+% \begin{macro}{\c@subsection}
+% \begin{macro}{\c@subsubsection}
+% \begin{macro}{\c@paragraph}
+% \begin{macro}{\c@subparagraph}
+% These counters are used for the section numbers. The macro\\
+% |\newcounter{|\meta{newctr}|}[|\meta{oldctr}|]|\\
+% defines\meta{newctr} to be a counter, which is reset to zero when
+% counter \meta{oldctr} is stepped. Counter \meta{oldctr} must
+% already be defined.
+%
+% \begin{macrocode}
+\newcounter {part}
+%<article>\newcounter {section}
+%<*report|book>
+\newcounter {chapter}
+\newcounter {section}[chapter]
+%</report|book>
+\newcounter {subsection}[section]
+\newcounter {subsubsection}[subsection]
+\newcounter {paragraph}[subsubsection]
+\newcounter {subparagraph}[paragraph]
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\thepart}
+% \begin{macro}{\thechapter}
+% \begin{macro}{\thesection}
+% \begin{macro}{\thesubsection}
+% \begin{macro}{\thesubsubsection}
+% \begin{macro}{\theparagraph}
+% \begin{macro}{\thesubparagraph}
+% For any counter \Lcount{CTR}, |\theCTR| is a macro that defines
+% the printed version of counter \Lcount{CTR}. It is defined in
+% terms of the following macros:
+%
+% |\arabic{|\Lcount{COUNTER}|}| prints the value of
+% \Lcount{COUNTER} as an arabic numeral.
+%
+% |\roman{|\Lcount{COUNTER}|}| prints the value of
+% \Lcount{COUNTER} as a lowercase roman numberal.
+%
+% |\Roman{|\Lcount{COUNTER}|}| prints the value of
+% \Lcount{COUNTER} as an uppercase roman numberal.
+%
+% |\alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER}
+% as a lowercase letter: $1 =$~a, $2 =$~ b, etc.
+%
+% |\Alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER}
+% as an uppercase letter: $1 =$~A, $2 =$~B, etc.
+%
+% Actually to save space the internal counter repesentations
+% and the commands operating on those are used.
+% \begin{macrocode}
+\renewcommand \thepart {\@Roman\c@part}
+%<article>\renewcommand \thesection {\@arabic\c@section}
+%<*report|book>
+\renewcommand \thechapter {\@arabic\c@chapter}
+\renewcommand \thesection {\thechapter.\@arabic\c@section}
+%</report|book>
+\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
+\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
+\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
+\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@chapapp}
+% |\@chapapp| is initially defined to be `|\chaptername|'. The
+% |\appendix| command redefines it to be `|\appendixname|'.
+%
+% \begin{macrocode}
+%<report|book>\newcommand\@chapapp{\chaptername}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Front Matter, Main Matter, and Back Matter}
+%
+% A book contains these three (logical) sections. The switch
+% |\@mainmatter| is true iff we are processing Main Matter. When
+% this switch is false, the |\chapter| command does not print
+% chapter numbers.
+%
+% Here we define the commands that start these sections.
+% \begin{macro}{\frontmatter}
+% This command starts Roman page numbering and turns off chapter
+% numbering. Since this restarts the page numbering from 1, it
+% should also ensure that a recto page is used.
+% \changes{v1.3r}{1996/05/26}{Make this command react to the option
+% \texttt{openany}}
+% \changes{v1.3y}{1998/05/05}{Two years on: Make this command not
+% react to the option \texttt{openany} as this makes the
+% verso/recto numbering wrong: see pr/2754 for discussion}
+% \begin{macrocode}
+%<*book>
+\newcommand\frontmatter{%
+% \if@openright
+ \cleardoublepage
+% \else
+% \clearpage
+% \fi
+ \@mainmatterfalse
+ \pagenumbering{roman}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mainmatter}
+% This command clears the page, starts arabic page numbering and
+% turns on chapter numbering. Since this restarts the page numbering
+% from 1, it should also ensure that a recto page is used.
+% \changes{v1.3r}{1996/05/26}{Make this command react to the option
+% \texttt{openany}}
+% \changes{v1.3y}{1998/05/05}{Two years on: Make this command not
+% react to the option \texttt{openany} as this makes the
+% verso/recto numbering wrong: see pr/2754 for discussion}
+% \begin{macrocode}
+\newcommand\mainmatter{%
+% \if@openright
+ \cleardoublepage
+% \else
+% \clearpage
+% \fi
+ \@mainmattertrue
+ \pagenumbering{arabic}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\backmatter}
+% This clears the page, turns off chapter numbering and leaves page
+% numbering unchanged.
+% \begin{macrocode}
+\newcommand\backmatter{%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \@mainmatterfalse}
+%</book>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Parts}
+%
+% \begin{macro}{\part}
+% The command to start a new part of our document.
+%
+% In the article class the definition of |\part| is rather simple;
+% we start a new paragraph, add a little white space, suppress the
+% indentation of the first paragraph and make use of |\secdef|.
+% As in other sectioning commands (cf.\ |\@startsection| in the
+% {\LaTeXe} kernel), we need to check the |@noskipsec| switch and
+% force horizontal mode if it is set.
+% \changes{v1.4a}{1999/01/07}{Check \texttt{@noskipsec} switch and
+% possibly force horizontal mode; see PR/2889.}
+% \begin{macrocode}
+%<*article>
+\newcommand\part{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \addvspace{4ex}%
+ \@afterindentfalse
+ \secdef\@part\@spart}
+%</article>
+% \end{macrocode}
+%
+% For the report and book classes we things a bit different.
+%
+% We start a new (righthand) page and use the \pstyle{plain}
+% pagestyle.
+% \changes{v1.3r}{1996/05/26}{Make this command react to the option
+% \texttt{openany}}
+% \begin{macrocode}
+%<*report|book>
+\newcommand\part{%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{plain}%
+% \end{macrocode}
+% When we are making a two column document, this will be a one
+% column page. We use |@tempswa| to remember to switch back to two
+% columns.
+% \begin{macrocode}
+ \if@twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+% \end{macrocode}
+% We need an empty box to prevent the fil glue from disappearing.
+% \changes{v1.3j}{1995/08/16}{Replace \cs{hbox} by \cs{null}}
+% \begin{macrocode}
+ \null\vfil
+% \end{macrocode}
+% Here we use |\secdef| to indicate which commands to use to make
+% the actual heading.
+% \begin{macrocode}
+ \secdef\@part\@spart}
+%</report|book>
+% \end{macrocode}
+%
+% \begin{macro}{\@part}
+% This macro does the actual formatting of the title of the part.
+% Again the macro is differently defined for the article document
+% class than for the document classes report and book.
+
+% When \Lcount{secnumdepth} is larger than $-1$ for the
+% document class article, we have a numbered
+% part, otherwise it is unnumbered.
+% \begin{macrocode}
+%<*article>
+\def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+% \end{macrocode}
+% We print the title flush left in the article class.
+% Also we prevent breaking between lines and reset the font.
+% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}}
+% \begin{macrocode}
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+% \end{macrocode}
+% When this is a numbered part we have to print the number and the
+% title. The |\nobreak| should prevent a page break here.
+% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace}
+% (pr/3310)}
+% \begin{macrocode}
+ \ifnum \c@secnumdepth >\m@ne
+ \Large\bfseries \partname\nobreakspace\thepart
+ \par\nobreak
+ \fi
+ \huge \bfseries #2%
+% \end{macrocode}
+% Now we empty the mark registers, leave some white space and let
+% |\@afterheading| take care of suppressing the indentation.
+% \begin{macrocode}
+ \markboth{}{}\par}%
+ \nobreak
+ \vskip 3ex
+ \@afterheading}
+%</article>
+% \end{macrocode}
+%
+% When \Lcount{secnumdepth} is larger than $-2$ for the
+% document class report and book, we have a numbered
+% part, otherwise it is unnumbered.
+% \begin{macrocode}
+%<*report|book>
+\def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >-2\relax
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+% \end{macrocode}
+% We empty the mark registers and center the title on the page in the
+% report and book document classes.
+% Also we prevent breaking between lines and reset the font.
+% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}}
+% \changes{v1.3j}{1995/08/16}{add missing percent}
+% \begin{macrocode}
+ \markboth{}{}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+% \end{macrocode}
+% When this is a numbered part we have to print the number.
+% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace}
+% (pr/3310)}
+% \begin{macrocode}
+ \ifnum \c@secnumdepth >-2\relax
+ \huge\bfseries \partname\nobreakspace\thepart
+ \par
+% \end{macrocode}
+% We leave some space before we print the title and leave the
+% finishing up to |\@endpart|.
+% \begin{macrocode}
+ \vskip 20\p@
+ \fi
+ \Huge \bfseries #2\par}%
+ \@endpart}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@spart}
+% This macro does the actual formatting of the title of the part
+% when the star form of the user command was used. In this case we
+% \emph{never} print a number. Otherwise the formatting is the
+% same.
+%
+% The differences between the definition of this macro in the
+% article document class and in the report and book document
+% classes are similar as they were for |\@part|.
+% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}}
+% \begin{macrocode}
+%<*article>
+\def\@spart#1{%
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \huge \bfseries #1\par}%
+ \nobreak
+ \vskip 3ex
+ \@afterheading}
+%</article>
+%<*report|book>
+\def\@spart#1{%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \Huge \bfseries #1\par}%
+ \@endpart}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@endpart}
+% \changes{v1.3j}{1995/08/16}{move docstrip guard to avoid defining
+% \cs{@endpart} in article}
+% This macro finishes the part page, for both |\@part| and
+% |\@spart|.
+%
+% First we fill the current page.
+% \begin{macrocode}
+%<*report|book>
+\def\@endpart{\vfil\newpage
+% \end{macrocode}
+% Then, when we are in twosided mode and chapters are supposed to
+% be on right hand sides, we produce a completely blank page.
+% \changes{v1.4b}{2000/05/19}{Only add empty page after part if
+% twoside and openright (pr/3155)}
+% \begin{macrocode}
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+% \end{macrocode}
+% When this was a two column document we have to switch back to two
+% column mode.
+% \begin{macrocode}
+ \if@tempswa
+ \twocolumn
+ \fi}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Chapters}
+%
+% \begin{macro}{\chapter}
+% A chapter should always start on a new page therefore we start by
+% calling |\clearpage| and setting the pagestyle for this page to
+% \pstyle{plain}.
+% \begin{macrocode}
+%<*report|book>
+\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+% \end{macrocode}
+% Then we prevent floats from appearing at the top of this page
+% because it looks weird to see a floating object above a chapter
+% title.
+% \begin{macrocode}
+ \global\@topnum\z@
+% \end{macrocode}
+% Then we suppress the indentation of the first paragraph by
+% setting the switch |\@afterindent| to |false|. We use |\secdef|
+% to specify the macros to use for actually setting the chapter
+% title.
+% \begin{macrocode}
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
+% \end{macrocode}
+%
+% \begin{macro}{\@chapter}
+% This macro is called when we have a numbered chapter. When
+% \Lcount{secnumdepth} is larger than $-1$ and, in the book
+% class, |\@mainmatter| is true, we display the chapter
+% number. We also inform the user that a new chapter is about to be
+% typeset by writing a message to the terminal.
+% \begin{macrocode}
+\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
+%<book> \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter}#1}%
+%<*book>
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+%</book>
+ \else
+ \addcontentsline{toc}{chapter}{#1}%
+ \fi
+% \end{macrocode}
+% After having written an entry to the table of contents we store
+% the (alternative) title of this chapter with |\chaptermark| and
+% add some white space to the lists of figures and tables.
+% \begin{macrocode}
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+% \end{macrocode}
+% Then we call upon |\@makechapterhead| to format the actual
+% chapter title. We have to do this in a special way when we are in
+% twocolumn mode in order to have the chapter title use the entire
+% |\textwidth|. In one column mode we call |\@afterheading| which
+% takes care of suppressing the indentation.
+% \begin{macrocode}
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\@makechapterhead}
+% The macro above uses |\@makechapterhead|\meta{text} to format the
+% heading of the chapter.
+%
+% We begin by leaving some white space. The we open a group in
+% which we have a paragraph indent of 0pt, and in which we have the
+% text set ragged right. We also reset the font.
+% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}}
+% \begin{macrocode}
+\def\@makechapterhead#1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+% \end{macrocode}
+% Then we check whether the number of the chapter has to be printed.
+% If so we leave some whitespace between the chapternumber and its
+% title.
+% \changes{v1.2v}{1994/11/30}{Added a \cs{nobreak} to prevent a
+% pagebreak between the chapternumber and the chaptertitle}
+% \changes{v1.3j}{1995/08/16}{replace braces by \cs{space}}
+% \begin{macrocode}
+ \ifnum \c@secnumdepth >\m@ne
+%<book> \if@mainmatter
+ \huge\bfseries \@chapapp\space \thechapter
+ \par\nobreak
+ \vskip 20\p@
+%<book> \fi
+ \fi
+% \end{macrocode}
+% Now we set the title in a large bold font. We prevent a pagebreak
+% from occurring in the middle of or after the title. Finally we
+% leave some whitespace before the text begins.
+% \changes{v1.2v}{1994/11/30}{Added \cs{interlinepenalty}\cs{@M} to
+% prevent a pagebreak in the middle of a title}
+% \begin{macrocode}
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@schapter}
+% This macro is called when we have an unnumbered chapter. It is
+% much simpler than |\@chapter| because it only needs to typeset
+% the chapter title.
+% \begin{macrocode}
+\def\@schapter#1{\if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\@makeschapterhead}
+% The macro above uses |\@makeschapterhead|\meta{text}to format
+% the heading of the chapter. It is similar to |\@makechapterhead|
+% except that it never has to print a chapter number.
+%
+% \changes{v1.2v}{1994/11/30}{Added \cs{interlinepenalty}\cs{@M} to
+% prevent a pagebreak in the middle of a title}
+% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}}
+% \begin{macrocode}
+\def\@makeschapterhead#1{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Lower level headings}
+%
+% These commands all make use of |\@startsection|.
+% \begin{macro}{\section}
+% This gives a normal heading with white space above and below the
+% heading, the title set in |\Large\bfseries|, and no indentation
+% on the first paragraph.
+% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}}
+% \begin{macrocode}
+\newcommand\section{\@startsection {section}{1}{\z@}%
+ {-3.5ex \@plus -1ex \@minus -.2ex}%
+ {2.3ex \@plus.2ex}%
+ {\normalfont\Large\bfseries}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subsection}
+% This gives a normal heading with white space above and below the
+% heading, the title set in |\large\bfseries|, and no indentation
+% on the first paragraph.
+% \begin{macrocode}
+\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\large\bfseries}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subsubsection}
+% This gives a normal heading with white space above and below the
+% heading, the title set in |\normalsize\bfseries|, and no
+% indentation on the first paragraph.
+% \begin{macrocode}
+\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\paragraph}
+% This gives a run-in heading with white space above and to the
+% right of the heading, the title set in |\normalsize\bfseries|.
+% \begin{macrocode}
+\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {3.25ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subparagraph}
+% This gives an indented run-in heading with white space above and
+% to the right of the heading, the title set in
+% |\normalsize\bfseries|.
+% \begin{macrocode}
+\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
+ {3.25ex \@plus1ex \@minus .2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lists}
+%
+% \subsubsection{General List Parameters}
+%
+% The following commands are used to set the default values for the list
+% environment's parameters. See the \LaTeX{} manual for an explanation
+% of the meanings of the parameters. Defaults for the list
+% environment are set as follows. First, |\rightmargin|,
+% |\listparindent| and |\itemindent| are set to 0pt. Then, for a Kth
+% level list, the command |\@listK| is called, where `K' denotes `i',
+% '`i', ... , `vi'. (I.e., |\@listiii| is called for a third-level
+% list.) By convention, |\@listK| should set |\leftmargin| to
+% |\leftmarginK|.
+%
+% \begin{macro}{\leftmargin}
+% \begin{macro}{\leftmargini}
+% \begin{macro}{\leftmarginii}
+% \begin{macro}{\leftmarginiii}
+% \begin{macro}{\leftmarginiv}
+% \begin{macro}{\leftmarginv}
+% \begin{macro}{\leftmarginvi}
+% \changes{v1.0m}{1994/01/12}{Use em instead of pt to remain
+% compatible with old styles}
+% \changes{v1.3q}{1995/12/20}{Temporary(?) fix: revert to setting
+% \cs{leftmargin} at outer level}
+%
+% When we are in two column mode some of the margins are set somewhat
+% smaller.
+% \begin{macrocode}
+\if@twocolumn
+ \setlength\leftmargini {2em}
+\else
+ \setlength\leftmargini {2.5em}
+\fi
+% \end{macrocode}
+% Until the whole of the parameter setting in these files is
+% rationalised, we need to set the value of |\leftmargin| at this
+% outer level.
+% \begin{macrocode}
+\leftmargin \leftmargini
+% \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
+% are `(m)', `vii.' and `M.').
+% \begin{macrocode}
+\setlength\leftmarginii {2.2em}
+\setlength\leftmarginiii {1.87em}
+\setlength\leftmarginiv {1.7em}
+\if@twocolumn
+ \setlength\leftmarginv {.5em}
+ \setlength\leftmarginvi {.5em}
+\else
+ \setlength\leftmarginv {1em}
+ \setlength\leftmarginvi {1em}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\labelsep}
+% \begin{macro}{\labelwidth}
+% \changes{v1.0m}{1994/01/12}{Use em instead of pt to remain
+% compatible with old styles}
+% |\labelsep| is the distance between the label and the text of an
+% item; |\labelwidth| is the width of the label.
+% \begin{macrocode}
+\setlength \labelsep {.5em}
+\setlength \labelwidth{\leftmargini}
+\addtolength\labelwidth{-\labelsep}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\partopsep}
+% When the user leaves a blank line before the environment an extra
+% vertical space of |\partopsep| is inserted, in addition to
+% |\parskip| and |\topsep|.
+% \changes{v1.0m}{1994/01/12}{\cs{partopsep} should be different,
+% depending on the pointsize}
+% \begin{macrocode}
+%</article|report|book>
+%<10pt>\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+%<11pt>\setlength\partopsep{3\p@ \@plus 1\p@ \@minus 1\p@}
+%<12pt>\setlength\partopsep{3\p@ \@plus 2\p@ \@minus 2\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@beginparpenalty}
+% \begin{macro}{\@endparpenalty}
+% These penalties are inserted before and after a list or paragraph
+% environment. They are set to a bonus value to encourage page
+% breaking at these points.
+% \begin{macro}{\@itempenalty}
+% This penalty is inserted between list items.
+% \begin{macrocode}
+%<*article|report|book>
+\@beginparpenalty -\@lowpenalty
+\@endparpenalty -\@lowpenalty
+\@itempenalty -\@lowpenalty
+%</article|report|book>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@listi}
+% \begin{macro}{\@listI}
+% |\@listi| defines the values of
+% |\leftmargin|, |\parsep|, |\topsep|, |\itemsep|, etc.\ for the
+% lists that appear on top-level. Its definition is modified by the
+% font-size commands (eg within |\small| the list parameters get
+% ``smaller'' values).
+%
+% For this reason \@listI is defined to hold a saved copy of \@listi
+% so that |\normalsize| can switch all parameters back.
+%
+% \begin{macrocode}
+%<*10pt|11pt|12pt>
+\def\@listi{\leftmargin\leftmargini
+%<*10pt>
+ \parsep 4\p@ \@plus2\p@ \@minus\p@
+ \topsep 8\p@ \@plus2\p@ \@minus4\p@
+ \itemsep4\p@ \@plus2\p@ \@minus\p@}
+%</10pt>
+%<*11pt>
+ \parsep 4.5\p@ \@plus2\p@ \@minus\p@
+ \topsep 9\p@ \@plus3\p@ \@minus5\p@
+ \itemsep4.5\p@ \@plus2\p@ \@minus\p@}
+%</11pt>
+%<*12pt>
+ \parsep 5\p@ \@plus2.5\p@ \@minus\p@
+ \topsep 10\p@ \@plus4\p@ \@minus6\p@
+ \itemsep5\p@ \@plus2.5\p@ \@minus\p@}
+%</12pt>
+\let\@listI\@listi
+% \end{macrocode}
+% We initialise the parameters although strictly speaking that
+% is not necessary.
+% \begin{macrocode}
+\@listi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@listii}
+% \begin{macro}{\@listiii}
+% \begin{macro}{\@listiv}
+% \begin{macro}{\@listv}
+% \begin{macro}{\@listvi}
+% Here are the same macros for the higher level lists. Note that
+% they don't have saved versions and are not modified by the font
+% size commands. In other words this class assumes that nested
+% lists only appear in |\normalsize|, i.e.\ the main document size.
+% \begin{macrocode}
+\def\@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+%<*10pt>
+ \topsep 4\p@ \@plus2\p@ \@minus\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+%</10pt>
+%<*11pt>
+ \topsep 4.5\p@ \@plus2\p@ \@minus\p@
+ \parsep 2\p@ \@plus\p@ \@minus\p@
+%</11pt>
+%<*12pt>
+ \topsep 5\p@ \@plus2.5\p@ \@minus\p@
+ \parsep 2.5\p@ \@plus\p@ \@minus\p@
+%</12pt>
+ \itemsep \parsep}
+\def\@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+%<10pt> \topsep 2\p@ \@plus\p@\@minus\p@
+%<11pt> \topsep 2\p@ \@plus\p@\@minus\p@
+%<12pt> \topsep 2.5\p@\@plus\p@\@minus\p@
+ \parsep \z@
+ \partopsep \p@ \@plus\z@ \@minus\p@
+ \itemsep \topsep}
+\def\@listiv {\leftmargin\leftmarginiv
+ \labelwidth\leftmarginiv
+ \advance\labelwidth-\labelsep}
+\def\@listv {\leftmargin\leftmarginv
+ \labelwidth\leftmarginv
+ \advance\labelwidth-\labelsep}
+\def\@listvi {\leftmargin\leftmarginvi
+ \labelwidth\leftmarginvi
+ \advance\labelwidth-\labelsep}
+%</10pt|11pt|12pt>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Enumerate}
+%
+% The enumerate environment uses four counters: \Lcount{enumi},
+% \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
+% \Lcount{enumN} controls the numbering of the Nth level
+% enumeration.
+%
+% \begin{macro}{\theenumi}
+% \begin{macro}{\theenumii}
+% \begin{macro}{\theenumiii}
+% \begin{macro}{\theenumiv}
+% The counters are already defined in \file{latex.dtx}, but their
+% representation is changed here.
+%
+% \begin{macrocode}
+%<*article|report|book>
+\renewcommand\theenumi{\@arabic\c@enumi}
+\renewcommand\theenumii{\@alph\c@enumii}
+\renewcommand\theenumiii{\@roman\c@enumiii}
+\renewcommand\theenumiv{\@Alph\c@enumiv}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\labelenumi}
+% \begin{macro}{\labelenumii}
+% \begin{macro}{\labelenumiii}
+% \begin{macro}{\labelenumiv}
+% The label for each item is generated by the commands\\
+% |\labelenumi| \ldots\ |\labelenumiv|.
+% \begin{macrocode}
+\newcommand\labelenumi{\theenumi.}
+\newcommand\labelenumii{(\theenumii)}
+\newcommand\labelenumiii{\theenumiii.}
+\newcommand\labelenumiv{\theenumiv.}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\p@enumii}
+% \begin{macro}{\p@enumiii}
+% \begin{macro}{\p@enumiv}
+% The expansion of |\p@enumN||\theenumN| defines the output of a
+% |\ref| command when referencing an item of the Nth level of an
+% enumerated list.
+% \begin{macrocode}
+\renewcommand\p@enumii{\theenumi}
+\renewcommand\p@enumiii{\theenumi(\theenumii)}
+\renewcommand\p@enumiv{\p@enumiii\theenumiii}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Itemize}
+%
+% \begin{macro}{\labelitemi}
+% \begin{macro}{\labelitemii}
+% \changes{v1.2k}{1994/05/06}{Inserted \cs{normalfont}}
+% \changes{v1.3s}{1996/08/24}{Replaced -{}- with \cs{textendash}}
+% \changes{v1.3u}{1996/10/31}{Changed to \cs{textbullet},
+% \cs{textasteriskcentered} and \cs{textperiodcentered}}
+% \begin{macro}{\labelitemiii}
+% \begin{macro}{\labelitemiv}
+% Itemization is controlled by four commands: |\labelitemi|,
+% |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define
+% the labels of thevarious itemization levels: the symbols used are
+% bullet, bold en-dash, centered asterisk and centred dot.
+%
+% \begin{macrocode}
+\newcommand\labelitemi{\textbullet}
+\newcommand\labelitemii{\normalfont\bfseries \textendash}
+\newcommand\labelitemiii{\textasteriskcentered}
+\newcommand\labelitemiv{\textperiodcentered}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Description}
+%
+% \begin{environment}{description}
+% The description environment is defined here -- while the itemize
+% and enumerate environments are defined in \file{latex.dtx}.
+%
+% \begin{macrocode}
+\newenvironment{description}
+ {\list{}{\labelwidth\z@ \itemindent-\leftmargin
+ \let\makelabel\descriptionlabel}}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\descriptionlabel}
+% To change the formatting of the label, you must redefine
+% |\descriptionlabel|.
+%
+% \changes{v1.2k}{1994/05/06}{Inserted \cs{normalfont}}
+% \changes{v1.2y}{1995/01/31}{made command short}
+% \begin{macrocode}
+\newcommand*\descriptionlabel[1]{\hspace\labelsep
+ \normalfont\bfseries #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Defining new environments}
+%
+% \subsubsection{Abstract}
+%
+% \begin{environment}{abstract}
+% When we are producing a separate titlepage we also put the
+% abstract on a page of its own. It will be centred vertically on
+% the page.
+%
+% Note that this environment is not defined for books.
+% \changes{v1.3e}{1995/06/19}{Added setting of \cs{@endparpenalty}
+% to avoid page break after abstract heading.}
+% \begin{macrocode}
+% \changes{v1.3m}{1995/10/23}{Added setting of \cs{beginparpenalty} to
+% discourage page break before abstract heading.}
+%<*article|report>
+\if@titlepage
+ \newenvironment{abstract}{%
+ \titlepage
+ \null\vfil
+ \@beginparpenalty\@lowpenalty
+ \begin{center}%
+ \bfseries \abstractname
+ \@endparpenalty\@M
+ \end{center}}%
+ {\par\vfil\null\endtitlepage}
+% \end{macrocode}
+% When we are not making a separate titlepage --the default for the
+% article document class-- we have to check if we are in twocolumn
+% mode. In that case the abstract is as a |\section*|, otherwise
+% the quotation environment is used to typeset the abstract.
+% \begin{macrocode}
+\else
+ \newenvironment{abstract}{%
+ \if@twocolumn
+ \section*{\abstractname}%
+ \else
+ \small
+ \begin{center}%
+ {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
+ \end{center}%
+ \quotation
+ \fi}
+ {\if@twocolumn\else\endquotation\fi}
+\fi
+%</article|report>
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Verse}
+%
+% \begin{environment}{verse}
+% The verse environment is defined by making clever use of the
+% list environment's parameters. The user types |\\| to end a line.
+% This is implemented by |\let|'ing |\\| equal |\@centercr|.
+%
+% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with
+% \cs{relax}}
+% \begin{macrocode}
+\newenvironment{verse}
+ {\let\\\@centercr
+ \list{}{\itemsep \z@
+ \itemindent -1.5em%
+ \listparindent\itemindent
+ \rightmargin \leftmargin
+ \advance\leftmargin 1.5em}%
+ \item\relax}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Quotation}
+%
+% \begin{environment}{quotation}
+% The quotation environment is also defined by making clever use of
+% the list environment's parameters. The lines in the environment
+% are set smaller than |\textwidth|. The first line of a paragraph
+% inside this environment is indented.
+%
+% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with
+% \cs{relax}}
+% \begin{macrocode}
+\newenvironment{quotation}
+ {\list{}{\listparindent 1.5em%
+ \itemindent \listparindent
+ \rightmargin \leftmargin
+ \parsep \z@ \@plus\p@}%
+ \item\relax}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Quote}
+%
+% \begin{environment}{quote}
+% The quote environment is like the quotation environment except
+% that paragraphs are not indented.
+%
+% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with
+% \cs{relax}}
+% \begin{macrocode}
+\newenvironment{quote}
+ {\list{}{\rightmargin\leftmargin}%
+ \item\relax}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Theorem}
+%
+% This document class does not define it's own theorem environments,
+% the defaults, supplied by \file{latex.dtx} are available.
+%
+% \subsubsection{Titlepage}
+%
+% \begin{environment}{titlepage}
+% In the normal environments, the titlepage environment does nothing
+% but start and end a page, and inhibit page numbers. In the report
+% style, it also resets the page number to one, and then sets it
+% back to one at the end. In compatibility mode, it sets the
+% page number to zero. This is incorrect since it results in using
+% the page parameters for a right-hand page but it is the way it was.
+% In two-column style, it still makes a
+% one-column page.
+%
+% \changes{v1.0g}{1993/12/09}{Moved the setting of
+% \cs{@restonecolfalse}}
+% \changes{v1.2c}{1994/03/17}{page :!= 0 only in compatibility mode
+% (LL)}
+% \changes{v1.2d}{1994/04/11}{Moved \cs{cleardoublepage} inside
+% definition of titlepage environment}
+% \changes{v1.3i}{1995/08/08}{New implementation with support for
+% twoside and openright option}
+%
+% First we do give the definition for compatibility mode.
+% \begin{macrocode}
+\if@compatibility
+\newenvironment{titlepage}
+ {%
+%<book> \cleardoublepage
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse\newpage
+ \fi
+ \thispagestyle{empty}%
+ \setcounter{page}\z@
+ }%
+ {\if@restonecol\twocolumn \else \newpage \fi
+ }
+% \end{macrocode}
+%
+% And here is the one for native \LaTeXe{}.
+% \begin{macrocode}
+\else
+\newenvironment{titlepage}
+ {%
+%<book> \cleardoublepage
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse\newpage
+ \fi
+ \thispagestyle{empty}%
+ \setcounter{page}\@ne
+ }%
+ {\if@restonecol\twocolumn \else \newpage \fi
+% \end{macrocode}
+% If we are not in two-side mode the first page after the title page
+% should also get page number 1.
+% \begin{macrocode}
+ \if@twoside\else
+ \setcounter{page}\@ne
+ \fi
+ }
+\fi
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Appendix}
+%
+% \begin{macro}{\appendix}
+%
+% The |\appendix| command is not really an environment, it is a
+% macro that makes some changes in the way things are done.
+%
+% In the article document class the |\appendix| command must do the
+% following:
+% \begin{itemize}
+% \item reset the section and subsection counters to zero,
+% \item redefine |\thesection| to produce alphabetic appendix
+% numbers. This redefinition is done globally to ensure that it
+% survives even if |\appendix| is issued within an environment such
+% as \texttt{multicols}.
+% \end{itemize}
+%
+% \changes{1.3z}{1998/09/19}{Redefine \cs{thesection} globally (pr/2862)}
+% \begin{macrocode}
+%<*article>
+\newcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@Alph\c@section}}
+%</article>
+% \end{macrocode}
+%
+% In the report and book document classes the |\appendix| command
+% must do the following:
+% \begin{itemize}
+% \item reset the chapter and section counters to zero,
+% \item set |\@chapapp| to |\appendixname| (for messages),
+% \item redefine the chapter counter to produce appendix numbers,
+% \item possibly redefine the |\chapter| command if appendix titles
+% and headings are to look different from chapter titles and
+% headings. This redefinition is done globally to ensure that it
+% survives even if |\appendix| is issued within an environment such
+% as \texttt{multicols}.
+% \end{itemize}
+%
+% \changes{1.3z}{1998/09/19}{Redefine \cs{thechapter} and
+% \cs{@chapapp} globally (pr/2862)}
+% \begin{macrocode}
+%<*report|book>
+\newcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@Alph\c@chapter}}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Setting parameters for existing environments}
+%
+% \subsubsection{Array and tabular}
+%
+% \begin{macro}{\arraycolsep}
+% The columns in an array environment are separated by
+% 2|\arraycolsep|.
+% \begin{macrocode}
+\setlength\arraycolsep{5\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabcolsep}
+% The columns in an tabular environment are separated by
+% 2|\tabcolsep|.
+% \begin{macrocode}
+\setlength\tabcolsep{6\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\arrayrulewidth}
+% The width of rules in the array and tabular environments is given
+% by\\ |\arrayrulewidth|.
+% \begin{macrocode}
+\setlength\arrayrulewidth{.4\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\doublerulesep}
+% The space between adjacent rules in the array and tabular
+% environments is given by |\doublerulesep|.
+% \begin{macrocode}
+\setlength\doublerulesep{2\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Tabbing}
+%
+% \begin{macro}{\tabbingsep}
+% This controls the space that the |\'| command puts in. (See
+% \LaTeX{} manual for an explanation.)
+% \begin{macrocode}
+\setlength\tabbingsep{\labelsep}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Minipage}
+%
+% \begin{macro}{\@minipagerestore}
+% The macro |\@minipagerestore| is called upon entry to a minipage
+% environment to set up things that are to be handled differently
+% inside a minipage environment. In the current styles, it does
+% nothing.
+% \end{macro}
+%
+% \begin{macro}{\@mpfootins}
+% Minipages have their own footnotes; |\skip||\@mpfootins| plays
+% same r\^ole for footnotes in a minipage as |\skip||\footins| does
+% for ordinary footnotes.
+%
+% \begin{macrocode}
+\skip\@mpfootins = \skip\footins
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Framed boxes}
+%
+% \begin{macro}{\fboxsep}
+% The space left by |\fbox| and |\framebox| between the box and the
+% text in it.
+% \begin{macro}{\fboxrule}
+% The width of the rules in the box made by |\fbox| and |\framebox|.
+% \begin{macrocode}
+\setlength\fboxsep{3\p@}
+\setlength\fboxrule{.4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Equation and eqnarray}
+%
+% \begin{macro}{\theequation}
+% When within chapters, the equation counter will be reset at
+% the beginning of a new chapter and the equation number will
+% be prefixed by the chapter number.
+% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number}
+%
+% This code must follow the |\chapter| definition or, more exactly,
+% the definition of the chapter counter.
+% \begin{macrocode}
+%<article>\renewcommand \theequation {\@arabic\c@equation}
+%<*report|book>
+\@addtoreset {equation}{chapter}
+\renewcommand\theequation
+ {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\jot}
+% |\jot| is the extra space added between lines of an eqnarray
+% environment. The default value is used.
+% \begin{macrocode}
+% \setlength\jot{3pt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@eqnnum}
+% The macro |\@eqnnum| defines how equation numbers are to appear in
+% equations. Again the default is used.
+%
+% \begin{macrocode}
+% \def\@eqnnum{(\theequation)}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Floating objects}
+%
+% The file \file{latex.dtx} only defines a number of tools with
+% which floating objects can be defined. This is done in the
+% document class. It needs to define the following macros for each
+% floating object of type \texttt{TYPE} (e.g., \texttt{TYPE} =
+% figure).
+%
+% \begin{description}
+% \item[\texttt{\bslash fps@TYPE}]
+% The default placement specifier for floats of type
+% \texttt{TYPE}.
+%
+% \item[\texttt{\bslash ftype@TYPE}]
+% The type number for floats of type \texttt{TYPE}. Each
+% \texttt{TYPE} has associated a unique positive \texttt
+% {TYPE} number, which is a power of two. E.g., figures might
+% have type number 1, tables type number 2, programs type
+% number 4, etc.
+%
+% \item[\texttt{\bslash ext@TYPE}]
+% The file extension indicating the file on which the contents
+% list for float type \texttt{TYPE} is stored. For example,
+% |\ext@figure| = `lof'.
+%
+% \item[\texttt{\bslash fnum@TYPE}]
+% A macro to generate the figure number for a caption. For
+% example, |\fnum@TYPE| == `Figure |\thefigure|'.
+%
+% \item[\texttt{\bslash @makecaption}{\meta{num}}{\meta{text}}]
+% A macro to make a caption, with \meta{num} the value produced
+% by |\fnum@...| and \meta{text} the text of the caption. It
+% can assume it's in a |\parbox| of the appropriate width.
+% This will be used for \emph{all} floating objects.
+%
+% \end{description}
+%
+% The actual environment that implements a floating object such as
+% a figure is defined using the macros |\@float| and |\end@float|,
+% which are defined in \file{latex.dtx}.
+%
+% An environment that implements a single column floating object is
+% started with |\@float{|\texttt{TYPE}|}[|\meta{placement}|]| of type
+% \texttt{TYPE} with \meta{placement} as the placement specifier.
+% The default value of \meta{PLACEMENT} is defined by |\fps@TYPE|.
+%
+% The environment is ended by |\end@float|. E.g., |\figure| ==
+% |\@float|{figure}, |\endfigure| == |\end@float|.
+%
+% \subsubsection{Figure}
+%
+% Here is the implementation of the figure environment.
+%
+% \begin{macro}{\c@figure}
+% First we have to allocate a counter to number the figures.
+%
+% In the report and book document classes figures within chapters are
+% numbered per chapter.
+% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number}
+% \begin{macrocode}
+%<*article>
+\newcounter{figure}
+\renewcommand \thefigure {\@arabic\c@figure}
+%</article>
+%<*report|book>
+\newcounter{figure}[chapter]
+\renewcommand \thefigure
+ {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fps@figure}
+% \begin{macro}{\ftype@figure}
+% \begin{macro}{\ext@figure}
+% \begin{macro}{\num@figure}
+% Here are the parameters for the floating objects of type `figure'.
+% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace}
+% (pr/3310)}
+% \begin{macrocode}
+\def\fps@figure{tbp}
+\def\ftype@figure{1}
+\def\ext@figure{lof}
+\def\fnum@figure{\figurename\nobreakspace\thefigure}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{figure}
+% \begin{environment}{figure*}
+% And the definition of the actual environment. The form with the
+% |*| is used for double column figures.
+% \begin{macrocode}
+\newenvironment{figure}
+ {\@float{figure}}
+ {\end@float}
+\newenvironment{figure*}
+ {\@dblfloat{figure}}
+ {\end@dblfloat}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+% \subsubsection{Table}
+%
+% Here is the implementation of the table environment. It is very
+% much the same as the figure environment.
+%
+% \begin{macro}{\c@table}
+% First we have to allocate a counter to number the tables.
+%
+% In the report and book document classes tables within chapters are
+% numbered per chapter.
+% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number}
+% \begin{macrocode}
+%<*article>
+\newcounter{table}
+\renewcommand\thetable{\@arabic\c@table}
+%</article>
+%<*report|book>
+\newcounter{table}[chapter]
+\renewcommand \thetable
+ {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fps@table}
+% \begin{macro}{\ftype@table}
+% \begin{macro}{\ext@table}
+% \begin{macro}{\num@table}
+% Here are the parameters for the floating objects of type `table'.
+% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace}
+% (pr/3310)}
+% \begin{macrocode}
+\def\fps@table{tbp}
+\def\ftype@table{2}
+\def\ext@table{lot}
+\def\fnum@table{\tablename\nobreakspace\thetable}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{table}
+% \begin{environment}{table*}
+% And the definition of the actual environment. The form with the
+% |*| is used for double column tables.
+% \begin{macrocode}
+\newenvironment{table}
+ {\@float{table}}
+ {\end@float}
+\newenvironment{table*}
+ {\@dblfloat{table}}
+ {\end@dblfloat}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+% \subsubsection{Captions}
+%
+% \begin{macro}{\@makecaption}
+% The |\caption| command calls |\@makecaption| to format the
+% caption of floating objects. It gets two arguments,
+% \meta{number}, the number of the floating object and \meta{text},
+% the text of the caption. Usually \meta{number} contains a string
+% such as `Figure 3.2'. The macro can assume it is called inside a
+% |\parbox| of right width, with |\normalsize|.
+%
+% \begin{macro}{\abovecaptionskip}
+% \begin{macro}{\belowcaptionskip}
+% These lengths contain the amount of white space to leave above
+% and below the caption.
+% \begin{macrocode}
+\newlength\abovecaptionskip
+\newlength\belowcaptionskip
+\setlength\abovecaptionskip{10\p@}
+\setlength\belowcaptionskip{0\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The definition of this macro is |\long| in order to allow more
+% then one paragraph in a caption.
+% \begin{macrocode}
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+% \end{macrocode}
+% We want to see if the caption fits on one line on the page,
+% therefore we first typeset it in a temporary box.
+% \changes{v1.2q}{1994/05/29}{Use \cs{sbox}\cs{@tempboxa} instead of
+% \cs{setbox}\cs{@tempboxa}\cs{hbox} to make this colour safe}
+% \begin{macrocode}
+ \sbox\@tempboxa{#1: #2}%
+% \end{macrocode}
+% We can the measure its width. It that is larger than the current
+% |\hsize| we typeset the caption as an ordinary paragraph.
+% \begin{macrocode}
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+% \end{macrocode}
+% If the caption fits, we center it. Because this uses an |\hbox|
+% directly in vertical mode, it does not execute the |\everypar|
+% tokens; the only thing that could be needed here is resetting the
+% `minipage flag' so we do this explicitly.
+% \changes{v1.2x}{1994/12/09}{Due to a change in the way floats are
+% handled we need to set the \cs{if@minipage} switch to false}
+% \begin{macrocode}
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Font changing}
+%
+% Here we supply the declarative font changing commands that were
+% common in \LaTeX\ version 2.09 and earlier. These commands work
+% in text mode \emph{and} in math mode. They are provided for
+% compatibility, but one should start using the |\text...| and
+% |\math...| commands instead. These commands are defined using
+% |\DeclareTextFontCommand|, a command with three arguments: the
+% user command to be defined; \LaTeX\ commands to execute in text
+% mode and \LaTeX\ commands to execute in math mode.
+%
+% \changes{v1.0g}{1993/12/12}{Distinguished between compatibility and
+% `normal' mode for the font changing commands.}
+% \changes{v1.0h}{1993/12/18}{These are now defined in the kernel, so
+% use \cs{@renewfontswitch}. Compatibility mode defines
+% \cs{@renewfontswitch} to do nothing, so we don't need to check
+% for compatibility mode any more.}
+% \changes{v1.0j}{1993/12/20}{Added \cs{normalfont} back in the
+% definitions of \cs{rm} etc. as this should be the default
+% behaviour}
+% \changes{v1.2e}{1994/04/14}{\cs{@renewfontswitch} has become
+% \cs{DeclareOldFontCommand}}
+%
+% \begin{macro}{\rm}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+% \begin{macro}{\tt}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+% \begin{macro}{\sf}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+%
+% The commands to change the family. When in compatibility mode we
+% select the `default' font first, to get \LaTeX2.09 behaviour.
+% \begin{macrocode}
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bf}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+% The command to change to the bold series. One should use
+% |\mdseries| to explicitly switch back to medium series.
+% \begin{macrocode}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sl}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+% \changes{v1.2g}{1994/04/24}{Added warning if used in math mode}
+% \begin{macro}{\it}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+% \begin{macro}{\sc}
+% \changes{v1.0f}{1993/12/08}{Macro added}
+% \changes{v1.2g}{1994/04/24}{Added warning if used in math mode}
+%
+% And the commands to change the shape of the font. The slanted and
+% small caps shapes are not available by default as math alphabets,
+% so those changes do nothing in math mode. However, we do warn the
+% user that the selection will not have any effect.One should use
+% |\upshape| to explicitly change back to the upright shape.
+% \begin{macrocode}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cal}
+% \changes{v1.0g}{1993/12/12}{Macro added}
+% \begin{macro}{\mit}
+% \changes{v1.0g}{1993/12/12}{Macro added}
+%
+% The commands |\cal| and |\mit| should only be used in math mode,
+% outside math mode they have no effect. Currently the New Font
+% Selection Scheme defines these commands to generate warning
+% messages. Therefore we have to define them `by hand'.
+% \changes{v1.2w}{1994/12/01}{Now define \cs{cal} and \cs{mit} using
+% \cs{DeclareRobustCommand*}}
+% \changes{v1.3j}{1995/08/16}{Remove surplus braces}
+% \begin{macrocode}
+\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
+\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Cross Referencing}
+% \subsection{Table of Contents, etc.}
+%
+% A |\section| command writes a
+% |\contentsline{section}{|\meta{title}|}{|\meta{page}|}| command
+% on the \file{.toc} file, where \meta{title} contains the
+% contents of the entry and \meta{page} is the page number. If
+% sections are being numbered, then \meta{title} will be of the
+% form |\numberline{|\meta{num}|}{|\meta{heading}|}| where
+% \meta{num} is the number produced by |\thesection|. Other
+% sectioning commands work similarly.
+%
+% A |\caption| command in a `figure' environment writes
+%
+% |\contentsline{figure}{\numberline{|\meta{num}|}{|%
+% \meta{caption}|}}{|\meta{page}|}|
+%
+% on the .\file{lof} file, where \meta{num} is the number produced
+% by |\thefigure| and \meta{caption} is the figure caption. It
+% works similarly for a `table' environment.
+%
+% The command |\contentsline{|\meta{name}|}| expands to
+% |\l@|\meta{name}. So, to specify the table of contents, we must
+% define |\l@chapter|, |\l@section|, |\l@subsection|, ... ; to
+% specify the list of figures, we must define |\l@figure|; and so
+% on. Most of these can be defined with the |\@dottedtocline|
+% command, which works as follows.
+%
+% |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|^^A
+% \meta{numwidth}|}{|^^A
+% \meta{title}|}{|\meta{page}|}|
+%
+% \begin{description}
+% \item[\meta{level}] An entry is produced only if\meta{ level}
+% $<=$ value of the \Lcount{tocdepth} counter. Note,
+% |\chapter| is level 0, |\section| is level 1, etc.
+% \item[\meta{indent}] The indentation from the outer left margin
+% of the start of the contents line.
+% \item[\meta{numwidth}] The width of a box in which the section
+% number is to go, if \meta{title} includes a |\numberline|
+% command.
+% \end{description}
+%
+% \begin{macro}{\@pnumwidth}
+% \begin{macro}{\@tocrmarg}
+% \begin{macro}{\@dotsep}
+% This command uses the following three parameters, which are set
+% with a |\newcommand| (so em's can be used to make them depend upon
+% the font).
+% \begin{description}
+% \item[\texttt{\bslash @pnumwidth}] The width of a box in which the
+% page number is put.
+% \changes{v1.2v}{1994/10/29}{Changed documentation from $!>$ or $!=$ to
+% $\ge$}
+% \item[\texttt{\bslash @tocrmarg}] The right margin for multiple
+% line entries. One wants |\@tocrmarg| $\ge$ |\@pnumwidth|
+% \item[\texttt{\bslash @dotsep}] Separation between dots, in mu
+% units. Should be defined as a number like 2 or 1.7
+% \end{description}
+%
+% \begin{macrocode}
+\newcommand\@pnumwidth{1.55em}
+\newcommand\@tocrmarg{2.55em}
+\newcommand\@dotsep{4.5}
+%<article>\setcounter{tocdepth}{3}
+%<!article>\setcounter{tocdepth}{2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Table of Contents}
+%
+% \begin{macro}{\tableofcontents}
+% This macro is used to request that \LaTeX{} produces a table of
+% contents. In the report and book document classes the tables of
+% contents, figures etc. are always set in single-column style.
+%
+% \changes{v1.0g}{1993/12/09}{Moved the setting of
+% \cs{@restonecolfalse}}
+% \changes{v1.4h}{2007/10/19}{Explain why \cs{@mkboth} is inside the heading
+% arg for \cs{tableofcontents} (pr/3285 and pr/3984)}
+% \begin{macrocode}
+\newcommand\tableofcontents{%
+%<*report|book>
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+% \end{macrocode}
+% The title is set using the |\chapter*| command, making sure that
+% the running head --if one is required-- contains the right
+% information.
+% \begin{macrocode}
+ \chapter*{\contentsname
+%</report|book>
+%<article> \section*{\contentsname
+% \end{macrocode}
+% The code for |\@mkboth| is placed inside the heading to avoid any
+% influence on vertical spacing after the heading (in some cases). For
+% other commands, such as |\listoffigures| below this has been changed from
+% the \LaTeX{}2.09 version as it will produce a serious bug if used in
+% two-column mode (see, pr/3285). However |\tableofcontents| is always
+% typeset in one-column mode in these classes, therefore the somewhat
+% inconsistent setting has been retained for compatibility reasons.
+% \begin{macrocode}
+ \@mkboth{%
+ \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
+% \end{macrocode}
+% The the actual table of contents is made by calling
+% |\@starttoc{toc}|. After that we restore twocolumn mode if
+% necessary.
+% \begin{macrocode}
+ \@starttoc{toc}%
+%<!article> \if@restonecol\twocolumn\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l@part}
+% Each sectioning command needs an additional macro to format its
+% entry in the table of contents, as described above. The macro for
+% the entry for parts is defined in a special way.
+%
+% First we make sure that if a pagebreak should occur, it occurs
+% \emph{before} this entry. Also a little whitespace is added and a
+% group begun to keep changes local.
+% \changes{v1.0h}{1993/12/18}{Replaced -\cs{@secpenalty} by
+% \cs{@secpenalty}. ASAJ.}
+% \changes{v1.2i}{1994/04/28}{Don't print a toc line when the tocdepth
+% counter is less then -1}
+% \changes{v1.3b}{1995/05/23}{Added missing braces around argument
+% to \cs{addpenalty}.}
+% \changes{v1.3x}{1997/10/10}{Removed setting of \cs{@tempdima} as
+% this macro does not use \cs{numberline} to set the toc line.}
+% \changes{v1.4a}{1998/10/12}{we should use \cs{@tocrmarg}; see PR/2881.}
+% \begin{macrocode}
+\newcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+%<article> \addpenalty\@secpenalty
+%<!article> \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\p@}%
+% \end{macrocode}
+% The macro |\numberline| requires that the width of the box that
+% holds the part number is stored in \LaTeX's scratch register
+% |\@tempdima|. Therefore we initialize it there even though we do
+% not use |\numberline| internally---the value used is quite large
+% so that something like |\numberline{VIII}| would still work.
+% \changes{v1.4d}{2001/04/21}{Initialize \cs{@tempdima} to some
+% sensible value (pr/3327)}
+% \begin{macrocode}
+ \setlength\@tempdima{3em}%
+ \begingroup
+% \end{macrocode}
+% We set |\parindent| to 0pt and use |\rightskip| to leave
+% enough room for the pagenumbers.\footnote{^^A
+% We should really set \cs{rightskip} to \cs{@tocrmarg} instead
+% of \cs{@pnumwidth} (no version of {\LaTeX} ever did this),
+% otherwise the \cs{rightskip} is too small.
+% Unfortunately this can't be changed in {\LaTeXe} as we don't
+% want to create different versions of {\LaTeXe} which produce
+% different typset output unless this is absolutely necessary;
+% instead we suspend it for \LaTeX3.}
+% To prevent overfull box messages the |\parfillskip| is set to a
+% negative value.
+% \begin{macrocode}
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+% \end{macrocode}
+% Now we can set the entry, in a large bold font. We make sure to
+% leave vertical mode, set the part title and add the pagenumber,
+% set flush right.
+% \begin{macrocode}
+ {\leavevmode
+ \large \bfseries #1\hfil
+ \hb@xt@\@pnumwidth{\hss #2%
+% \end{macrocode}
+%
+% \changes{v1.4i}{2018/09/03}{Prevent protrusion
+% (\url{https://tex.stackexchange.com/q/172785/10109})}
+% \begin{macrocode}
+ \kern-\p@\kern\p@}}\par
+% \end{macrocode}
+% Prevent a pagebreak immediately after this entry, but use
+% |\everypar| to reset the |\if@nobreak| switch. Finally we close
+% the group.
+% \changes{v1.3j}{1995/08/16}{Add missing percent}
+% \begin{macrocode}
+ \nobreak
+%<article> \if@compatibility
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+%<article> \fi
+ \endgroup
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l@chapter}
+% This macro formats the entries in the table of contents for
+% chapters. It is very similar to |\l@part|
+%
+% First we make sure that if a pagebreak should occur, it occurs
+% \emph{before} this entry. Also a little whitespace is added and a
+% group begun to keep changes local.
+% \changes{v1.2i}{1994/04/28}{Don't print a toc line when the tocdepth
+% counter is less than 0}
+% \changes{v1.3b}{1995/05/23}{Added missing braces around argument
+% to \cs{addpenalty}.}
+% \changes{v1.4a}{1998/10/12}{we should use \cs{@tocrmarg}; see PR/2881.}
+% \begin{macrocode}
+%<*report|book>
+\newcommand*\l@chapter[2]{%
+ \ifnum \c@tocdepth >\m@ne
+ \addpenalty{-\@highpenalty}%
+ \vskip 1.0em \@plus\p@
+% \end{macrocode}
+%
+% The macro |\numberline| requires that the width of the box that
+% holds the part number is stored in \LaTeX's scratch register
+% |\@tempdima|. Therefore we initialize it there even though we do
+% not use |\numberline| internally (the position as well as the
+% values seems questionable but can't be changed without producing
+% compatibility problems). We begin a group, and change
+% some of the paragraph parameters (see also the remark at
+% \cs{l@part} regarding \cs{rightskip}).
+% \begin{macrocode}
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+% \end{macrocode}
+% Then we leave vertical mode and switch to a bold font.
+% \begin{macrocode}
+ \leavevmode \bfseries
+% \end{macrocode}
+% Because we do not use |\numberline| here, we have do some fine
+% tuning `by hand', before we can set the entry. We discourage but
+% not disallow a pagebreak immediately after a chapter entry.
+% \begin{macrocode}
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ #1\nobreak\hfil
+ \nobreak\hb@xt@\@pnumwidth{\hss #2%
+% \end{macrocode}
+%
+% \changes{v1.4i}{2018/09/03}{Prevent protrusion
+% (\url{https://tex.stackexchange.com/q/172785/10109})}
+% \begin{macrocode}
+ \kern-\p@\kern\p@}\par
+ \penalty\@highpenalty
+ \endgroup
+ \fi}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l@section}
+% In the article document class the entry in the table of contents
+% for sections looks much like the chapter entries for the report
+% and book document classes.
+%
+% First we make sure that if a pagebreak should occur, it occurs
+% \emph{before} this entry. Also a little whitespace is added and a
+% group begun to keep changes local.
+% \changes{v1.0h}{1993/12/18}{Replaced -\cs{@secpenalty} by
+% \cs{@secpenalty}. ASAJ.}
+% \changes{v1.2i}{1994/04/28}{Don't print a toc line when the tocdepth
+% counter is less than 1.}
+% \changes{v1.4a}{1998/10/12}{we should use \cs{@tocrmarg}; see PR/2881.}
+% \begin{macrocode}
+%<*article>
+\newcommand*\l@section[2]{%
+ \ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
+% \end{macrocode}
+%
+% The macro |\numberline| requires that the width of the box that
+% holds the part number is stored in \LaTeX's scratch register
+% |\@tempdima|. Therefore we put it there. We begin a group, and
+% change some of the paragraph parameters (see also the remark at
+% \cs{l@part} regarding \cs{rightskip}).
+% \begin{macrocode}
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+% \end{macrocode}
+% Then we leave vertical mode and switch to a bold font.
+% \begin{macrocode}
+ \leavevmode \bfseries
+% \end{macrocode}
+% Because we do not use |\numberline| here, we have do some fine
+% tuning `by hand', before we can set the entry. We discourage but
+% not disallow a pagebreak immediately after a chapter entry.
+% \begin{macrocode}
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ #1\nobreak\hfil
+ \nobreak\hb@xt@\@pnumwidth{\hss #2%
+% \end{macrocode}
+%
+% \changes{v1.4i}{2018/09/03}{Prevent protrusion
+% (\url{https://tex.stackexchange.com/q/172785/10109})}
+% \begin{macrocode}
+ \kern-\p@\kern\p@}\par
+ \endgroup
+ \fi}
+%</article>
+% \end{macrocode}
+% In the report and book document classes the definition for
+% |\l@section| is much simpler.
+% \begin{macrocode}
+%<*report|book>
+\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l@subsection}
+% \begin{macro}{\l@subsubsection}
+% \begin{macro}{\l@paragraph}
+% \begin{macro}{\l@subparagraph}
+% All lower level entries are defined using the macro
+% |\@dottedtocline| (see above).
+% \begin{macrocode}
+%<*article>
+\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
+\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
+\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
+\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
+%</article>
+%<*report|book>
+\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
+\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
+\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}}
+\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}
+%</report|book>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{List of figures}
+%
+% \begin{macro}{\listoffigures}
+% This macro is used to request that \LaTeX{} produces a list of
+% figures. It is very similar to |\tableofcontents|.
+%
+% \changes{v1.0g}{1993/12/09}{Moved the setting of
+% \cs{@restonecolfalse}}
+% \changes{v1.4c}{2001/01/06}{Moved \cs{@mkboth} out of heading
+% arg (pr/3285)}
+% \begin{macrocode}
+\newcommand\listoffigures{%
+%<*report|book>
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ \chapter*{\listfigurename}%
+%</report|book>
+%<article> \section*{\listfigurename}%
+ \@mkboth{\MakeUppercase\listfigurename}%
+ {\MakeUppercase\listfigurename}%
+ \@starttoc{lof}%
+%<report|book> \if@restonecol\twocolumn\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l@figure}
+% This macro produces an entry in the list of figures.
+% \begin{macrocode}
+\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{List of tables}
+%
+% \begin{macro}{\listoftables}
+% This macro is used to request that \LaTeX{} produces a list of
+% tables. It is very similar to |\tableofcontents|.
+%
+% \changes{v1.0g}{1993/12/09}{Moved the setting of
+% \cs{@restonecolfalse}}
+% \changes{v1.4c}{2001/01/06}{Moved \cs{@mkboth} out of heading
+% arg (pr/3285)}
+% \begin{macrocode}
+\newcommand\listoftables{%
+%<*report|book>
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ \chapter*{\listtablename}%
+%</report|book>
+%<article> \section*{\listtablename}%
+ \@mkboth{%
+ \MakeUppercase\listtablename}%
+ {\MakeUppercase\listtablename}%
+ \@starttoc{lot}%
+%<report|book> \if@restonecol\twocolumn\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l@table}
+% This macro produces an entry in the list of tables.
+% \begin{macrocode}
+\let\l@table\l@figure
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Bibliography}
+%
+% \begin{macro}{\bibindent}
+% The ``open'' bibliography format uses an indentation of
+% |\bibindent|.
+% \begin{macrocode}
+\newdimen\bibindent
+\setlength\bibindent{1.5em}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{thebibliography}
+% The `thebibliography' environment executes the following
+% commands:
+%
+% |\renewcommand{\newblock}{\hskip.11em \@plus.33em \@minus.07em}|\\
+% --- Defines the ``closed'' format, where the blocks (major units
+% of information) of an entry run together.
+%
+% |\sloppy| --- Used because it's rather hard to do line breaks in
+% bibliographies,
+%
+% |\sfcode`\.=1000\relax| ---
+% Causes a `.' (period) not to produce an end-of-sentence space.
+%
+% The implementation of this environment is based on the generic
+% list environment. It uses the \Lcount{enumiv} counter internally
+% to generate the labels of the list.
+%
+% When an empty `thebibliography' environment is found, a warning
+% is issued.
+%
+% \changes{v1.0i}{1993/12/19}{Corrected definition of thebibliography
+% for article}
+% \changes{v1.2z}{1995/05/09}{added a missing percent character}
+% \changes{v1.3b}{1995/05/23}{Added missing braces in definition
+% of thebibliography environment.}
+% \changes{v1.3j}{1995/08/16}{remove surplus spaces}
+% \changes{v1.3k}{1995/08/27}{Code for openbib changed}
+% \changes{v1.3t}{1996/10/05}{Added setting value of \cs{@clubpenalty}}
+% \begin{macrocode}
+\newenvironment{thebibliography}[1]
+%<*article>
+ {\section*{\refname}%
+% \end{macrocode}
+% The |\@mkboth| was moved out of the heading argument since at
+% least in report and book (twocolumn option) there are definitions
+% for |\chapter| which would swallow it otherwise.
+% \changes{v1.4c}{2001/01/06}{Moved \cs{@mkboth} out of heading
+% arg (pr/3285)}
+% \begin{macrocode}
+ \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
+%</article>
+%<*!article>
+ {\chapter*{\bibname}%
+ \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
+%</!article>
+ \list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+% \end{macrocode}
+% This is setting the normal (non-infinite) value of
+% |\clubpenalty| for the whole of this environment,
+% so we must reset its stored value also. (Why is there a |%| after
+% the second 4000 below?)
+% \begin{macrocode}
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\newblock}
+% The default definition for |\newblock| is to produce a small space.
+% \changes{v1.3k}{1995/08/27}{Default changed.}
+% \begin{macrocode}
+\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@openbib@code}
+% The default definition for |\@openbib@code| is to do nothing.
+% It will be changed by the \Lopt{openbib} option.
+% \changes{v1.3k}{1995/08/27}{Macro added}
+% \begin{macrocode}
+\let\@openbib@code\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@biblabel}
+% The label for a |\bibitem[...]| command is produced by this
+% macro. The default from \file{latex.dtx} is used.
+% \begin{macrocode}
+% \renewcommand*{\@biblabel}[1]{[#1]\hfill}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@cite}
+% The output of the |\cite| command is produced by this macro. The
+% default from \file{latex.dtx} is used.
+% \begin{macrocode}
+% \renewcommand*{\@cite}[1]{[#1]}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The index}
+%
+% \begin{environment}{theindex}
+% The environment `theindex' can be used for indices. It makes an
+% index with two columns, with each entry a separate paragraph. At
+% the user level the commands |\item|, |\subitem| and |\subsubitem|
+% are used to produce index entries of various levels. When a new
+% letter of the alphabet is encountered an amount of |\indexspace|
+% white space can be added.
+%
+%
+% \changes{v1.0g}{1993/12/09}{Moved the setting of
+% \cs{@restonecoltrue}}
+% \begin{macrocode}
+\newenvironment{theindex}
+ {\if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+%<article> \twocolumn[\section*{\indexname}]%
+%<!article> \twocolumn[\@makeschapterhead{\indexname}]%
+ \@mkboth{\MakeUppercase\indexname}%
+ {\MakeUppercase\indexname}%
+ \thispagestyle{plain}\parindent\z@
+% \end{macrocode}
+% Parameter changes to |\columnseprule| and |\columnsep| have to be
+% done after |\twocolumn| has acted. Otherwise they can affect the
+% last page before the index.
+% \changes{ v1.4f}{2004/02/16}{Moved setting of \cs{columnsep} and
+% \cs{columnseprule} later to avoid affecting the wrong page (pr/3616)}
+% \begin{macrocode}
+ \parskip\z@ \@plus .3\p@\relax
+ \columnseprule \z@
+ \columnsep 35\p@
+ \let\item\@idxitem}
+% \end{macrocode}
+% When the document continues after the index and it was a one
+% column document we have to switch back to one column after the
+% index.
+% \begin{macrocode}
+ {\if@restonecol\onecolumn\else\clearpage\fi}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\@idxitem}
+% \begin{macro}{\subitem}
+% \begin{macro}{\subsubitem}
+% These macros are used to format the entries in the index. ^^AA ???
+% \changes{v1.3f}{1995/06/23}{Corrected error in definition of
+% \cs{@idxitem}.}
+% \changes{v1.3j}{1995/08/16}{use \cs{@idxitem} to save space}
+% \begin{macrocode}
+\newcommand\@idxitem{\par\hangindent 40\p@}
+\newcommand\subitem{\@idxitem \hspace*{20\p@}}
+\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\indexspace}
+% The amount of white space that is inserted between `letter
+% blocks' in the index.
+% \begin{macrocode}
+\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Footnotes}
+%
+% \begin{macro}{\footnoterule}
+% Usually, footnotes are separated from the main body of the text
+% by a small rule. This rule is drawn by the macro |\footnoterule|.
+% We have to make sure that the rule takes no vertical space (see
+% \file{plain.tex}) so we compensate for the natural height of the
+% rule of 0.4pt by adding the right amount of vertical skip.
+%
+% To prevent the rule from colliding with the footnote we first add
+% a little negative vertical skip, then we put the rule and make
+% sure we end up at the same point where we begun this operation.
+% \changes{v1.3a}{1995/05/17}{use \cs{@width}}
+% \begin{macrocode}
+\renewcommand\footnoterule{%
+ \kern-3\p@
+ \hrule\@width.4\columnwidth
+ \kern2.6\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@footnote}
+% Footnotes are numbered within chapters in the report and book
+% document styles.
+% \begin{macrocode}
+%<!article>\@addtoreset{footnote}{chapter}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefntext}
+% The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
+% to produce the actual footnote. The macro gets the text of the
+% footnote as its argument and should use |\@thefnmark| as the mark
+% of the footnote. The macro |\@makefntext|is called when
+% effectively inside a |\parbox| of width |\columnwidth| (i.e.,
+% with |\hsize| = |\columnwidth|).
+%
+% An example of what can be achieved is given by the following piece
+% of \TeX\ code.
+% \begin{verbatim}
+% \newcommand\@makefntext[1]{%
+% \@setpar{\@@par
+% \@tempdima = \hsize
+% \advance\@tempdima-10pt
+% \parshape \@ne 10pt \@tempdima}%
+% \par
+% \parindent 1em\noindent
+% \hbox to \z@{\hss\@makefnmark}#1}
+% \end{verbatim}
+% The effect of this definition is that all lines of the footnote
+% are indented by 10pt, while the first line of a new paragraph is
+% indented by 1em. To change these dimensions, just substitute the
+% desired value for `10pt' (in both places) or `1em'. The mark is
+% flushright against the footnote.
+%
+% In these document classes we use a simpler macro, in which the
+% footnote text is set like an ordinary text paragraph, with no
+% indentation except on the first line of a paragraph, and the
+% first line of the footnote. Thus, all the macro must do is set
+% |\parindent| to the appropriate value for succeeding paragraphs
+% and put the proper indentation before the mark.
+%
+% \changes{v1.1a}{1994/03/13}{Use \cs{@makefnmark} to generate
+% footnote marker}
+% \begin{macrocode}
+\newcommand\@makefntext[1]{%
+ \parindent 1em%
+ \noindent
+ \hb@xt@1.8em{\hss\@makefnmark}#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefnmark}
+% The footnote markers that are printed in the text to point to the
+% footnotes should be produced by the macro |\@makefnmark|. We use
+% the default definition for it.
+% \begin{macrocode}
+%\renewcommand\@makefnmark{\hbox{\@textsuperscript
+% {\normalfont\@thefnmark}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Initialization}
+%
+% \subsection{Words}
+%
+% This document class is for documents prepared in the English language.
+% To prepare a version for another language, various English words must
+% be replaced. All the English words that require replacement are
+% defined below in command names. These commands may be redefined in
+% any class or package that is customising \LaTeX\ for use with
+% non-English languages.
+% \changes{v1.3h}{1995/07/20}{Split up to save save stack /1742}
+%
+% \begin{macro}{\contentsname}
+% \begin{macro}{\listfigurename}
+% \begin{macro}{\listtablename}
+% \begin{macrocode}
+\newcommand\contentsname{Contents}
+\newcommand\listfigurename{List of Figures}
+\newcommand\listtablename{List of Tables}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\refname}
+% \begin{macro}{\bibname}
+% \begin{macro}{\indexname}
+% \begin{macrocode}
+%<article>\newcommand\refname{References}
+%<report|book>\newcommand\bibname{Bibliography}
+\newcommand\indexname{Index}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\figurename}
+% \begin{macro}{\tablename}
+% \begin{macrocode}
+\newcommand\figurename{Figure}
+\newcommand\tablename{Table}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\partname}
+% \begin{macro}{\chaptername}
+% \begin{macro}{\appendixname}
+% \begin{macro}{\abstractname}
+% \begin{macrocode}
+\newcommand\partname{Part}
+%<report|book>\newcommand\chaptername{Chapter}
+\newcommand\appendixname{Appendix}
+%<!book>\newcommand\abstractname{Abstract}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Date}
+%
+% \begin{macro}{\today}
+% This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
+% to provide the date of the \LaTeX-run.
+%
+% At |\begin{document}| this definition will be optimised
+% so that the names of all the `wrong' months are not stored.
+% This optimisation is not done here as that would `freeze'
+% |\today| in any special purpose format made by loading the class
+% file into the format file.
+% \changes{v1.3j}{1995/08/16}{use \cs{edef} to save a lot of space}
+% \changes{v1.3w}{1997/10/06}{use \cs{def} again, latex/2620}
+% \begin{macrocode}
+\def\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}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Two column mode}
+%
+% \begin{macro}{\columnsep}
+% This gives the distance between two columns in two column mode.
+% \begin{macrocode}
+\setlength\columnsep{10\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\columnseprule}
+% This gives the width of the rule between two columns in two
+% column mode. We have no visible rule.
+% \begin{macrocode}
+\setlength\columnseprule{0\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The page style}
+% We have \pstyle{plain} pages in the document classes article and
+% report unless the user specified otherwise. In the `book'
+% document class we use the page style \pstyle{headings} by
+% default. We use arabic pagenumbers.
+% \begin{macrocode}
+%<!book>\pagestyle{plain}
+%<book>\pagestyle{headings}
+\pagenumbering{arabic}
+% \end{macrocode}
+%
+% \subsection{Single or double sided printing}
+%
+%
+% \changes{v1.2v}{1994/11/10}{removed typo}
+% When the \Lopt{twoside} option wasn't specified, we don't try to
+% make each page as long as all the others.
+% \begin{macrocode}
+\if@twoside
+\else
+ \raggedbottom
+\fi
+% \end{macrocode}
+% When the \Lopt{twocolumn} option was specified we call
+% |\twocolumn| to activate this mode. We try to make each column as
+% long as the others, but call |sloppy| to make our life easier.
+% \begin{macrocode}
+\if@twocolumn
+ \twocolumn
+ \sloppy
+ \flushbottom
+% \end{macrocode}
+% Normally we call |\onecolumn| to initiate typesetting in one
+% column.
+% \begin{macrocode}
+\else
+ \onecolumn
+\fi
+%</article|report|book>
+% \end{macrocode}
+%
+% \changes{v1.3i}{1995/08/09}{Moved code for generic class options
+% leqno and fleqn to kernel file}
+%
+% \Finale
+%
+\endinput
+
diff --git a/macros/latex-dev/base/classes.ins b/macros/latex-dev/base/classes.ins
new file mode 100644
index 0000000000..b87115cee6
--- /dev/null
+++ b/macros/latex-dev/base/classes.ins
@@ -0,0 +1,121 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{\file{article.cls}{\from{classes.dtx}{article}}
+ \file{report.cls}{\from{classes.dtx}{report}}
+ \file{book.cls}{\from{classes.dtx}{book}}
+ \file{size10.clo}{\from{classes.dtx}{10pt}}
+ \file{size11.clo}{\from{classes.dtx}{11pt}}
+ \file{size12.clo}{\from{classes.dtx}{12pt}}
+ \file{bk10.clo}{\from{classes.dtx}{10pt,bk}}
+ \file{bk11.clo}{\from{classes.dtx}{11pt,bk}}
+ \file{bk12.clo}{\from{classes.dtx}{12pt,bk}}
+ }
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space article.cls}
+\Msg{* \space\space report.cls}
+\Msg{* \space\space book.cls}
+\Msg{* \space\space size10.clo}
+\Msg{* \space\space size11.clo}
+\Msg{* \space\space size12.clo}
+\Msg{* \space\space bk10.clo}
+\Msg{* \space\space bk11.clo}
+\Msg{* \space\space bk12.clo}
+\Msg{* \space\space leqno.clo}
+\Msg{* \space\space fleqn.clo}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
+
diff --git a/macros/latex-dev/base/classes.pdf b/macros/latex-dev/base/classes.pdf
new file mode 100644
index 0000000000..2decd1439d
--- /dev/null
+++ b/macros/latex-dev/base/classes.pdf
Binary files differ
diff --git a/macros/latex-dev/base/cmextra.ins b/macros/latex-dev/base/cmextra.ins
new file mode 100644
index 0000000000..292bcd46d6
--- /dev/null
+++ b/macros/latex-dev/base/cmextra.ins
@@ -0,0 +1,160 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2018
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2018
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+% Concrete font support removed: Use the contributed package available
+% from ctan:macros/latex/contrib/supported/ccfonts.
+%
+% \Ask\answer{%
+% **************************************************************
+% ^^J*
+% ^^J* Do you have the Concrete Roman fonts installed on your system,
+% ^^J* or do you intend to install them?
+% ^^J*
+% ^^J* If so please answer with `y' otherwise with `n' below.
+% ^^J*
+% ^^J* You can easily redo this installation later in case you
+% ^^J* change your mind.
+% ^^J**************************************************************}
+%
+% {\ifx\answer\y
+%
+% \Msg{*** Generating font defs for Cork encoded fonts ***}
+% \Msg{*** Generating font defs for old TeX Text encoding ***}
+% \Msg{*** Generating font defs for math italic encoding ***}
+%
+% \generate{%
+% \file{t1ccr.fd}{\from{cmfonts.fdd}{fd,T1ccr}}
+% \file{ot1ccr.fd}{\from{cmfonts.fdd}{fd,OT1ccr}}
+% \file{omlccm.fd}{\from{cmfonts.fdd}{fd,OMLccm}}}
+%
+% \fi}
+
+\Ask\answer{%
+ **************************************************************
+ ^^J*
+ ^^J* Do you have the cyrillic fonts from the University of
+ ^^J* Washington installed on your system,
+ ^^J* or do you intend to install them?
+ ^^J*
+ ^^J* If so please answer with `y' otherwise with `n' below.
+ ^^J*
+ ^^J* You can easily redo this installation later in case you
+ ^^J* change your mind.
+ ^^J*
+ ^^J* Normally it is better *not* to install these files, but use
+ ^^J* the support files provided in the cyrillic bundle instead!!!
+ ^^J*
+ ^^J* For that reason this installation file is no longer used
+ ^^J* when generating the run-time system.
+ ^^J*
+ ^^J**************************************************************}
+
+{\ifx\answer\y
+
+\Msg{*** Generating font defs for old TeX cyrillic text encoding ***}
+
+\generate{%
+ \file{ot2cmr.fd}{\from{cmfonts.fdd}{fd,OT2cmr}}
+ \file{ot2cmss.fd}{\from{cmfonts.fdd}{fd,OT2cmss}}}
+
+\fi}
+
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/cmfonts.fdd b/macros/latex-dev/base/cmfonts.fdd
new file mode 100644
index 0000000000..1c83814ee5
--- /dev/null
+++ b/macros/latex-dev/base/cmfonts.fdd
@@ -0,0 +1,1301 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \CheckSum{295}
+%
+%\iffalse This is a META comment
+%
+% File `cmfonts.fdd'.
+% Copyright (C) 1989-1999 Frank Mittelbach and Rainer Sch\"opf,
+% all rights reserved.
+%
+%<OMLccm, >\ProvidesFile{omlccm.fd}
+%<OMLcmm, >\ProvidesFile{omlcmm.fd}
+%<OMLcmr, >\ProvidesFile{omlcmr.fd}
+%<OMScmr, >\ProvidesFile{omscmr.fd}
+%<OMScmsy, >\ProvidesFile{omscmsy.fd}
+%<OMXcmex, >\ProvidesFile{omxcmex.fd}
+%<OT1ccr, >\ProvidesFile{ot1ccr.fd}
+%<OT1cmdh, >\ProvidesFile{ot1cmdh.fd}
+%<OT1cmfib, >\ProvidesFile{ot1cmfib.fd}
+%<OT1cmfr, >\ProvidesFile{ot1cmfr.fd}
+%<OT1cmr, >\ProvidesFile{ot1cmr.fd}
+%<OT1cmss, >\ProvidesFile{ot1cmss.fd}
+%<OT1cmtt, >\ProvidesFile{ot1cmtt.fd}
+%<OT1cmvtt, >\ProvidesFile{ot1cmvtt.fd}
+%<OT2cmr, >\ProvidesFile{ot2cmr.fd}
+%<OT2cmss, >\ProvidesFile{ot2cmss.fd}
+%<T1ccr, >\ProvidesFile{t1ccr.fd}
+%<T1cmdh, >\ProvidesFile{t1cmdh.fd}
+%<T1cmfib, >\ProvidesFile{t1cmfib.fd}
+%<T1cmfr, >\ProvidesFile{t1cmfr.fd}
+%<T1cmr, >\ProvidesFile{t1cmr.fd}
+%<T1cmss, >\ProvidesFile{t1cmss.fd}
+%<T1cmtt, >\ProvidesFile{t1cmtt.fd}
+%<T1cmvtt, >\ProvidesFile{t1cmvtt.fd}
+%<TS1cmr, >\ProvidesFile{ts1cmr.fd}
+%<TS1cmss, >\ProvidesFile{ts1cmss.fd}
+%<TS1cmtt, >\ProvidesFile{ts1cmtt.fd}
+%<TS1cmvtt, >\ProvidesFile{ts1cmvtt.fd}
+%<Ucmr, >\ProvidesFile{ucmr.fd}
+%<Ucmss, >\ProvidesFile{ucmss.fd}
+%<Ucmtt, >\ProvidesFile{ucmtt.fd}
+%<*driver, >
+ \ProvidesFile{cmfonts.drv}
+%</driver, >
+ [2014/09/29 v2.5h Standard LaTeX font definitions]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{cmfonts.drv}
+\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+\title{The file \texttt{cmfonts.fdd} for use with
+ \LaTeXe.\thanks{This file has version
+ number \fileversion, dated \filedate.}}
+\date{\filedate}\author{Frank Mittelbach \and Rainer Sch\"opf}
+\begin{document}
+\MaintainedByLaTeXTeam{latex}
+\maketitle
+ \DocInput{cmfonts.fdd}
+\end{document}
+%</driver>
+%
+%\fi
+%
+%
+%
+% \changes{v2.5e}{1997/06/16}{Replaced reference to DC-fonts by ec
+% fonts.}
+% \changes{v2.5c}{1997/05/26}{Removed spaces in and around arguments
+% to \cs{DeclareFontShape} and \cs{EC@family}.}
+% \changes{v2.4j}{1996/11/20}{lowercase filenames /1044}
+% \changes{v2.4h}{1996/05/19}{Added CM variable typewriter family}
+% \changes{v2.4g}{1996/05/17}
+% {Force \cs{hyphenchar} of OT1 fonts to 45, in case
+% \cs{defaulthyphenchar} has changed.}
+% \changes{v2.4g}{1996/05/17}
+% {Remove some spurious extra empty arguments to
+% \cs{DeclareFontFamily} calls}
+% \changes{v2.4d}{1995/12/01}
+% {Documentation changes from Ulrik Vieth /1989}
+% \changes{v2.4d}{1995/12/01}
+% {Dont force T1 hyphenchar to 127. latex/1853}
+% \changes{v2.4c}{1995/11/07}{Use decimal rather than octal character
+% specification for \cs{hyphenchar} and \cs{skewchar} so that there is
+% no problem with an active quote character.}
+% \changes{v2.4a}{1995/10/22}{Added support for new (v1.2) DC fonts
+% and text companion fonts (TS1 encoding).}
+% \changes{v2.3d}{1994/11/02}{Added more font substitutions for
+% \cs{pounds}.}
+% \changes{v2.3d}{1994/10/30}{Added OMLcmr.fd and OMScmr.fd.}
+% \changes{v2.3b}{1994/05/12}{Added \cs{ProvidesFile} commands}
+% \changes{v2.3a}{1994/05/03}{Included definitions for
+% AMS-supplied cm fonts.}
+% \changes{v2.2f}{1994/02/07}{Added missing size 10.95 for
+% cmr/b/n and cmr/m/ui.}
+% \changes{v2.2e}{1994/02/02}{Corrected encoding scheme U.}
+% \changes{v2.2d}{1994/01/27}{Replaced most ssub with sub}
+% \changes{v2.2a}{1993/12/13}{Removed \cs{CodelineIndex} from the
+% driver code.}
+%
+% \changes{v2.1a}{1993/10/17}{Shape u renamed to ui.}
+% \changes{v2.1a}{1993/10/17}{File renamed to cmfonts.fdd.}
+%
+%
+%
+% \section{Introduction}
+%
+% This file contains the external font information needed to load
+% the Computer Modern fonts designed by Don Knuth and distributed with
+% \TeX.
+%
+% From this file all {\ttfamily.fd} files (font definition files) for
+% the Computer Modern fonts, both with old encoding (|OT1|) and Cork
+% encoding (|T1|) are generated. The Cork encoded fonts are known
+% under the name ec fonts.
+%
+% \section{Customization}
+%
+% If you plan to install the AMS font package or if you have it
+% already installed, please note that within this package there are
+% additional sizes of the Computer Modern symbol and math italic
+% fonts. With the release of \LaTeXe, these AMS `extracm' fonts have
+% been included in the \LaTeX\ font set. Therefore, the math |.fd| files
+% produced here assume the presence of these AMS extensions.
+%
+% For text fonts in \texttt{T1} encoding, the directive |new| selects
+% the new (version 1.2) DC fonts.
+%
+% For the text fonts in \texttt{OT1} and \texttt{U} encoding,
+% the optional \dst{} directive |ori| selects a conservatively
+% generated set of font definition files,
+% which means that only the basic font sizes coming with an old
+% \LaTeX~2.09 installation are included into the |\DeclareFontShape|
+% commands. However, on many installations, people have added missing
+% sizes by scaling up or down available Metafont sources. For example,
+% the Computer Modern Roman italic font |cmti| is only available in
+% the sizes 7, 8, 9, and 10pt. Nevertheless one could generate it for
+% the sizes 5, and 6pt by using the source from |cmti7| scaled
+% downwards. The corresponding enlarged font set is generated if the
+% \dst{} directive |ori| is not used.
+%
+% When you generate the |.fd| files using the installation script
+% |cmfonts.ins| distributed with \LaTeXe, the enlarged font set is
+% selected.
+% If you want to select the conservative set of |.fd| files, you have to
+% replace statements like
+% \begin{verbatim}
+% \generateFile{OT1cmr.fd}{t}{\from{cmfonts.fdd}{fd,OT1cmr}}
+%\end{verbatim}
+% with
+% \begin{verbatim}
+% \generateFile{OT1cmr.fd}{t}{\from{cmfonts.fdd}{fd,OT1cmr,ori}}
+%\end{verbatim}
+% in the installation script, or more exactly by copying the
+% installation script to a file with a new name and change that copy.
+%
+% \StopEventually{}
+%
+% \section{The \texttt{docstrip} modules}
+%
+% The following modules are used to direct \texttt{docstrip} in
+% generating external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% nowarn & produce |.fd| files that do not warn about substitutions\\
+% ori & make conservative |.fd| files\\
+% new & select version 1.2 DC fonts\\
+% ec & select EC fonts\\
+% fd & produce a font definition file (actually no longer used)\\[2pt]
+% OMLccm & make Concrete Roman Math italic\\
+% OMLcmm & make Computer Modern Math italic\\
+% OMLcmr & make Computer Modern Roman (math italic encoding)\\
+% OMScmr & make Computer Modern Roman (math symbol encoding)\\
+% OMScmsy & make Computer Modern Symbols \\
+% OMXcmex & make Computer Modern large Symbols\\
+% OT1ccr & make Concrete Roman (old encoding) \\
+% OT1cmdh & make Computer Modern Dunhill (old encoding)\\
+% OT1cmfib & make Computer Modern Fibonacci (old encoding)\\
+% OT1cmfr & make Computer Modern Funny (old encoding)\\
+% OT1cmr & make Computer Modern Roman (old encoding)\\
+% OT1cmss & make Computer Modern Sans (old encoding)\\
+% OT1cmtt & make Computer Modern Typewriter (old encoding)\\
+% OT1cmvtt & make Computer Modern Variable Typewriter (old encoding)\\
+% OT2cmr & make Computer Modern Roman (old cyrillic encoding)\\
+% OT2cmss & make Computer Modern Sans (old cyrillic encoding)\\
+% T1ccr & make Concrete Roman (Cork encoding)\\
+% T1cmdh & make Computer Modern Dunhill (Cork encoding)\\
+% T1cmfib & make Computer Modern Fibonacci (Cork encoding)\\
+% T1cmfr & make Computer Modern Funny (Cork encoding)\\
+% T1cmr & make Computer Modern Roman (Cork encoding)\\
+% T1cmss & make Computer Modern Sans (Cork encoding)\\
+% T1cmtt & make Computer Modern Typewriter (Cork encoding)\\
+% T1cmvtt & make Computer Modern Variable Typewriter (Cork
+% encoding)\\
+% TS1cmr & make Computer Modern Roman text companion fonts\\
+% TS1cmss & make Computer Modern Sans text companion fonts\\
+% TS1cmtt & make Computer Modern Typewriter text companion fonts\\
+% TS1cmvtt & make Computer Modern Variable Typewriter text
+% companion fonts\\
+% Ucmr & make Computer Modern Roman (unknown encoding)\\
+% Ucmss & make Computer Modern Sans (unknown encoding)\\
+% Ucmtt & make Computer Modern Typewriter (unknown encoding)\\
+% \end{tabular}
+% \end{center}
+% A typical \texttt{docstrip} command file would then have entries like:
+% \begin{verbatim}
+%\generateFile{OT1cmr.fd}{t}{\from{cmfonts.fdd}{fd,OT1cmr}}
+%\end{verbatim}
+%
+%
+% \section{The font definition files}
+%
+% As always we begin by identifying the latest version of the files
+% in the \textsf{log} file. The explicit spaces are necessary in an
+% |.fd| file and the |\string| guards against situations where |`|,
+% |<| or |>| is active.
+% \changes{v2.2g}{1994/02/15}{Removed surplus \cs{string}}
+%
+% \subsection{Fonts with Cork encoding (\texttt{T1})}
+%
+% We start with the DC-fonts. These are Computer Modern fonts
+% reimplemented originally by Norbert Schwarz, and since release~1.2
+% by J\"org Knappen.
+% You can get them from \TeX{}
+% archives and from \TeX{} organizations. We strongly recommend
+% that you use them because they are encoded in the approved
+% standard encoding for text fonts.
+%
+% \subsubsection{Commands for fonts with the `EC' naming scheme}
+% Before the declarations for the individual fonts, first define
+% some abbreviations that may be used as most of the fonts in the
+% `new' dc font distribution come in the same range of sizes.
+% The same is true for the ec fonts, with a somewhat enlarged font
+% size range.
+% \changes{v2.5f}{1998/01/10}{Added larger sizes for ec fonts only
+% (thanks to Christian Cornelssen)}
+% \begin{macrocode}
+%<*new|ec>
+%<*!tt>
+\providecommand{\EC@family}[5]{%
+ \DeclareFontShape{#1}{#2}{#3}{#4}%
+ {<5><6><7><8><9><10><10.95><12><14.4>%
+%<ec> <17.28><20.74><24.88><29.86><35.83>genb*#5}{}}
+%<!ec> <17.28><20.74><24.88>genb*#5}{}}
+%</!tt>
+% \end{macrocode}
+% For monospaced fonts, the normal interpolation breaks down below
+% 8pt, so scale the 8pt fonts instead.
+% \changes{v2.5f}{1998/01/10}{Added larger sizes for ec fonts only
+% (thanks to Christian Cornelssen)}
+% \begin{macrocode}
+%<*tt>
+\providecommand{\EC@ttfamily}[5]{%
+ \DeclareFontShape{#1}{#2}{#3}{#4}%
+ {<5><6><7><8>#50800%
+%<ec> <9><10><10.95><12><14.4><17.28><20.74><24.88><29.86>%
+%<ec> <35.83>genb*#5}{}}
+%<!ec> <9><10><10.95><12><14.4><17.28><20.74><24.88>genb*#5}{}}
+%</tt>
+%</new|ec>
+% \end{macrocode}
+%
+% \subsubsection{The Computer Modern Roman}
+%
+% This family is available in the shapes |n|, |sl|, |it|, |sc|, and
+% |ui|.
+% \begin{macrocode}
+%<*T1cmr>
+\DeclareFontFamily{T1}{cmr}{}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmr}{m}{n}{%
+ <5><6><7><8><9>gen*dcr%
+ <10><10.95>dcr10%
+ <12><14.4>dcr12%
+ <17.28><20.74><24.88>dcr17}{}
+\DeclareFontShape{T1}{cmr}{m}{sl}{%
+ <5><6><7><8>dcsl8%
+ <9>dcsl9%
+ <10><10.95>dcsl10%
+ <12><14.4>dcsl12%
+ <17.28><20.74><24.88>dcsl17%
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{it}{%
+ <5><6>dcti7%
+ <7><8><9>gen*dcti%
+ <10><10.95>dcti10%
+ <12><14.4>dcti12%
+ <17.28><20.74><24.88>dcti17%
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{sc}{%
+ <5><6><7><8><9><10><10.95>dccsc10%
+ <12><14.4>dccsc12%
+ <17.28><20.74><24.88>dccsc17%
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{ui}{%
+ <5><6>dcu7%
+ <7><8><9>gen*dcu%
+ <10><10.95>dcu10%
+ <12><14.4>dcu12%
+ <17.28><20.74><24.88>dcu17%
+ }{}
+% \end{macrocode}
+% There is a bold `|b|' series, but unfortunately only the normal
+% shape is available in this series.
+% \begin{macrocode}
+%<+T1cmr>%%%%%%% bold series
+\DeclareFontShape{T1}{cmr}{b}{n}{%
+ <5><6><7><8><9>gen*dcb%
+ <10><10.95>dcb10%
+ <12><14.4>dcb12%
+ <17.28><20.74><24.88>dcb17%
+ }{}
+% \end{macrocode}
+% Finally there is a bold extended series `|bx|' with the shapes
+% |n|, |sl|, and |it|.
+% \begin{macrocode}
+%<+T1cmr>%%%%%%%% bold extended series
+\DeclareFontShape{T1}{cmr}{bx}{n}{%
+ <5><6><7><8><9>gen*dcbx%
+ <10><10.95>dcbx10%
+ <12><14.4><17.28><20.74><24.88>dcbx12%
+ }{}
+\DeclareFontShape{T1}{cmr}{bx}{sl}{%
+ <5><6><7><8><9>gen*dcbxsl%
+ <10><10.95>dcbxsl10%
+ <12><14.4><17.28><20.74><24.88>dcbxsl12%
+ }{}
+\DeclareFontShape{T1}{cmr}{bx}{it}{%
+ <5><6><7><8><9><10><10.95>dcbxti10%
+ <12><14.4>dcbxti12%
+ <17.28><20.74><24.88>dcbxti17%
+ }{}
+%</!new&!ec>
+% \end{macrocode}
+% \changes{v2.4d}{1995/12/01}
+% {Ulrik Vieth. Add ui shape /1989}
+% \begin{macrocode}
+%<*new>
+\EC@family{T1}{cmr}{m}{n}{dcr}
+\EC@family{T1}{cmr}{m}{sl}{dcsl}
+\EC@family{T1}{cmr}{m}{it}{dcti}
+\EC@family{T1}{cmr}{m}{sc}{dccc}
+\EC@family{T1}{cmr}{bx}{n}{dcbx}
+\EC@family{T1}{cmr}{b}{n}{dcb}
+\EC@family{T1}{cmr}{bx}{it}{dcbi}
+\EC@family{T1}{cmr}{bx}{sl}{dcbl}
+\EC@family{T1}{cmr}{m}{ui}{dcu}
+%</new>
+% \end{macrocode}
+% \changes{v2.5a}{1997/01/14}
+% {EC fonts}
+% \changes{v2.5d}{1997/06/02}{bold sc fonts latex/2497}
+% \begin{macrocode}
+%<*ec>
+\EC@family{T1}{cmr}{m}{n}{ecrm}
+\EC@family{T1}{cmr}{m}{sl}{ecsl}
+\EC@family{T1}{cmr}{m}{it}{ecti}
+\EC@family{T1}{cmr}{m}{sc}{eccc}
+\EC@family{T1}{cmr}{bx}{n}{ecbx}
+\EC@family{T1}{cmr}{b}{n}{ecrb}
+\EC@family{T1}{cmr}{bx}{it}{ecbi}
+\EC@family{T1}{cmr}{bx}{sl}{ecbl}
+\EC@family{T1}{cmr}{bx}{sc}{ecxc}
+\EC@family{T1}{cmr}{m}{ui}{ecui}
+%</ec>
+%</T1cmr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Fibonacci}
+%
+% This family was created by Don Knuth as an experiment, supplying
+% only Fibonacci numbers to the parameters of the Metafont sources
+% of the Computer Modern Meta family.
+% \begin{macrocode}
+%<*T1cmfib>
+\DeclareFontFamily{T1}{cmfib}{}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmfib}{m}{n}{%
+ <8><9><10><12>gen*dcfib%
+ }{}
+%</!new&!ec>
+% \end{macrocode}
+% \changes{v2.4f}{1995/12/20}
+% {Family name and external file name corrected Ulrik Vieth /2017}
+% In fact these `dcfb' fonts are currently withdrawn as they generate
+% metafont errors.
+% \begin{macrocode}
+%<*new>
+\EC@family{T1}{cmfib}{m}{n}{dcfb}
+%</new>
+% \end{macrocode}
+% \changes{v2.5a}{1997/01/14}
+% {EC fonts, new slanted fibonacci}
+% \begin{macrocode}
+%<*ec>
+\EC@family{T1}{cmfib}{m}{n}{ecfb}
+\EC@family{T1}{cmfib}{m}{sl}{ecfs}
+%</ec>
+%</T1cmfib>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Funny (Roman)}
+%
+% This family was created by Don Knuth as another experiment.
+% \begin{macrocode}
+%<*T1cmfr>
+\DeclareFontFamily{T1}{cmfr}{}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmfr}{m}{n}{%
+ <10>dcff10%
+ }{}
+\DeclareFontShape{T1}{cmfr}{m}{it}{%
+ <10>dcfi10%
+ }{}
+%</!new&!ec>
+%<*new>
+\EC@family{T1}{cmfr}{m}{n}{dcff}
+\EC@family{T1}{cmfr}{m}{it}{dcfi}
+%</new>
+% \end{macrocode}
+% \changes{v2.5a}{1997/01/14}
+% {EC fonts}
+% \begin{macrocode}
+%<*ec>
+\EC@family{T1}{cmfr}{m}{n}{ecff}
+\EC@family{T1}{cmfr}{m}{it}{ecfi}
+%</ec>
+%</T1cmfr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Sans}
+%
+% \begin{macrocode}
+%<*T1cmss>
+\DeclareFontFamily{T1}{cmss}{}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmss}{m}{n}{%
+ <5><6><7><8>dcss8%
+ <9>dcss9%
+ <10><10.95>dcss10%
+ <12><14.4>dcss12%
+ <17.28><20.74><24.88>dcss17%
+ }{}
+\DeclareFontShape{T1}{cmss}{m}{it}%
+ {<->sub*cmss/m/sl}{}
+\DeclareFontShape{T1}{cmss}{m}{sl}{%
+ <5><6><7><8>dcssi8%
+ <9>dcssi9%
+ <10><10.95>dcssi10%
+ <12><14.4>dcssi12%
+ <17.28><20.74><24.88>dcssi17%
+ }{}
+%</!new&!ec>
+%<*new>
+\EC@family{T1}{cmss}{m}{n}{dcss}
+\EC@family{T1}{cmss}{m}{sl}{dcsi}
+\EC@family{T1}{cmss}{m}{it}{dcsi}
+\EC@family{T1}{cmss}{bx}{n}{dcsx}
+\EC@family{T1}{cmss}{bx}{it}{dcso}
+\EC@family{T1}{cmss}{bx}{sl}{dcso}
+%</new>
+% \end{macrocode}
+% \changes{v2.5a}{1997/01/14}
+% {EC fonts}
+% \begin{macrocode}
+%<*ec>
+\EC@family{T1}{cmss}{m}{n}{ecss}
+\EC@family{T1}{cmss}{m}{sl}{ecsi}
+\EC@family{T1}{cmss}{m}{it}{ecsi}
+\EC@family{T1}{cmss}{bx}{n}{ecsx}
+\EC@family{T1}{cmss}{bx}{it}{ecso}
+\EC@family{T1}{cmss}{bx}{sl}{ecso}
+%</ec>
+% \end{macrocode}
+% The next substitution is very questionable.
+% \begin{macrocode}
+%<+T1cmss>%%%%%% Font/shape undefined, therefore substituted
+\DeclareFontShape{T1}{cmss}{m}{sc}%
+ {<->sub*cmr/m/sc}{}
+% \end{macrocode}
+% The next font group is quite attractive for display.
+% \begin{macrocode}
+%<+T1cmss>%%%%%%% semibold condensed series
+\DeclareFontShape{T1}{cmss}{sbc}{n}{%
+ <5><6><7><8><9><10><10.95><12><14.4><17.28>%
+ <20.74><24.88>%
+%<!ec>dcssdc10
+%<ec>ecssdc10
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!new&!ec>
+%<+T1cmss>%%%%%%%% bold extended series
+\DeclareFontShape{T1}{cmss}{bx}{n}{%
+ <5><6><7><8><9><10><10.95><12><14.4><17.28>%
+ <20.74><24.88>dcssbx10%
+ }{}
+% \end{macrocode}
+% Another questionable substitution, but if we have the above
+% we might as well have this one
+% \changes{v2.5g}{1998/03/27}{Added subst for cmss/bx/sc (pr/2586)}
+% \begin{macrocode}
+%<+T1cmss>%%%%%% Font/shape undefined, therefore substituted
+\DeclareFontShape{T1}{cmss}{bx}{sc}%
+ {<->sub*cmr/m/sc}{}
+%</!new&!ec>
+%</T1cmss>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Typewriter}
+%
+% Perhaps the best font in the Computer Modern suite.
+% \begin{macrocode}
+%<*T1cmtt>
+\DeclareFontFamily{T1}{cmtt}{\hyphenchar \font\m@ne}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmtt}{m}{n}{%
+ <8><9>gen*dctt%
+ <10><10.95>dctt10%
+ <12><14.4><17.28><20.74><24.88>dctt12%
+ }{}
+\DeclareFontShape{T1}{cmtt}{m}{it}{%
+ <8><9>gen*dcitt%
+ <10><10.95>dcitt10%
+ <12><14.4>dcitt12%
+ <17.28><20.74><24.88>dcitt17%
+ }{}
+\DeclareFontShape{T1}{cmtt}{m}{sl}{%
+ <8><9>gen*dcsltt%
+ <10><10.95>dcsltt10%
+ <12><14.4><17.28><20.74><24.88>dcsltt12%
+ }{}
+\DeclareFontShape{T1}{cmtt}{m}{sc}{%
+ <10><10.95>dctcsc10%
+ <12><14.4>dctcsc12%
+ <17.28><20.74><24.88>dctcsc17%
+ }{}
+%</!new&!ec>
+% \end{macrocode}
+% \changes{v2.4e}{1995/12/04}
+% {Ulrik Vieth. added dctc /1989}
+% \begin{macrocode}
+%<*new>
+\EC@ttfamily{T1}{cmtt}{m}{n}{dctt}
+\EC@ttfamily{T1}{cmtt}{m}{sl}{dcst}
+\EC@ttfamily{T1}{cmtt}{m}{it}{dcit}
+\EC@ttfamily{T1}{cmtt}{m}{sc}{dctc}
+% \end{macrocode}
+% \changes{v2.4i}{1996/09/26}{Added substitutions for T1 bold
+% extended typewriter fonts (new version).}
+% Finally, we define substitutions for the series |bx|. It comes
+% with or without a warning.
+% \begin{macrocode}
+\DeclareFontShape{T1}{cmtt}{bx}{n}%
+%<-nowarn> {<->sub*cmtt/m/n}{}
+%<+nowarn> {<->ssub*cmtt/m/n}{}
+\DeclareFontShape{T1}{cmtt}{bx}{it}%
+%<-nowarn> {<->sub*cmtt/m/it}{}
+%<+nowarn> {<->ssub*cmtt/m/it}{}
+%</new>
+% \end{macrocode}
+% \changes{v2.5a}{1997/01/14}
+% {EC fonts}
+% \begin{macrocode}
+%<*ec>
+\EC@ttfamily{T1}{cmtt}{m}{n}{ectt}
+\EC@ttfamily{T1}{cmtt}{m}{sl}{ecst}
+\EC@ttfamily{T1}{cmtt}{m}{it}{ecit}
+\EC@ttfamily{T1}{cmtt}{m}{sc}{ectc}
+% \end{macrocode}
+% \changes{v2.4i}{1996/09/26}{Added substitutions for T1 bold
+% extended typewriter fonts (new version).}
+% Finally, we define substitutions for the series |bx|. It comes
+% with or without a warning.
+% \begin{macrocode}
+\DeclareFontShape{T1}{cmtt}{bx}{n}%
+%<-nowarn> {<->sub*cmtt/m/n}{}
+%<+nowarn> {<->ssub*cmtt/m/n}{}
+\DeclareFontShape{T1}{cmtt}{bx}{it}%
+%<-nowarn> {<->sub*cmtt/m/it}{}
+%<+nowarn> {<->ssub*cmtt/m/it}{}
+%</ec>
+%</T1cmtt>
+% \end{macrocode}
+%
+%
+% \subsubsection{Computer Modern Variable Typewriter}
+%
+% The Computer Modern Variable Typewriter family is the
+% proportional spaced version of the Computer Modern Typewriter
+% family. It is implemented as a separate family to allow easy use
+% in normal text, including changes of shape/series etc if available.
+% This family also allows normal hyphenation.
+%
+% In the first implementations for the Cork encoding only the
+% normal shape is available. Starting with release 1.3 italic will
+% be provided as well.
+% \begin{macrocode}
+%<*T1cmvtt>
+\DeclareFontFamily{T1}{cmvtt}{}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmvtt}{m}{n}{%
+ <8><9>gen*dcvtt%
+ <10><10.95>dcvtt10%
+ <12><14.4><17.28><20.74><24.88>dcvtt12%
+ }{}
+%</!new&!ec>
+% \end{macrocode}
+% With release 1.3 there will be an italic shape as well.
+% \begin{macrocode}
+%<*new>
+\EC@ttfamily{T1}{cmvtt}{m}{n}{dcvt}
+\EC@ttfamily{T1}{cmvtt}{m}{it}{dcvi}
+%</new>
+%<*ec>
+\EC@ttfamily{T1}{cmvtt}{m}{n}{ecvt}
+\EC@ttfamily{T1}{cmvtt}{m}{it}{ecvi}
+%</ec>
+%</T1cmvtt>
+% \end{macrocode}
+%
+%
+% \subsubsection{Computer Modern Dunhill}
+%
+% The smoker's choice? Within the Cork encoding this font comes with
+% a full size range by default but only with one series.
+% \begin{macrocode}
+%<*T1cmdh>
+\DeclareFontFamily{T1}{cmdh}{}
+%<*!new&!ec>
+\DeclareFontShape{T1}{cmdh}{m}{n}{%
+ <5><6><7><8><9>gen*dcdunh%
+ <10><10.95>dcdunh10%
+ <12><14.4>dcdunh12%
+ <17.28><20.74><24.88>dcdunh17}{}
+%</!new&!ec>
+%<*new>
+\EC@family{T1}{cmdh}{m}{n}{dcdh}
+%</new>
+%<*ec>
+\EC@family{T1}{cmdh}{m}{n}{ecdh}
+%</ec>
+%</T1cmdh>
+% \end{macrocode}
+%
+% \subsubsection{Concrete Roman}
+%
+% A font near to Computer Modern Typewriter designed to go with the
+% Euler Math fonts.
+% \begin{macrocode}
+%<*T1ccr>
+\DeclareFontFamily{T1}{ccr}{}
+\DeclareFontShape{T1}{ccr}{m}{n}{%
+ <5><6><7><8><9><10><12>gen*dccr%
+ <10.95>dccr11 <14.4>dccr14%
+ <17.28><20.74><24.88>dccr17}{}
+\DeclareFontShape{T1}{ccr}{m}{it}{%
+ <10><10.95><12>dcti10}{}
+\DeclareFontShape{T1}{ccr}{m}{sc}{%
+ <10><10.95><12>dccsc10 }{}
+% \end{macrocode}
+% Note the condensed slanted variant (not used).
+% \changes{v2.4d}{1995/12/01}
+% {Ulrik Vieth. Removed dcslc9 (no such font...) /1989}
+% \begin{macrocode}
+%\DeclareFontShape{T1}{ccr}{c}{sl}{<9>dcslc9}{}
+% \end{macrocode}
+% Finally a few substitution fonts for combinations not available.
+% As suggested by Leslie Lamport and several others the
+% substitution should warn by default. We control this my a \dst{}
+% module so that one can modify this behavior from the outside.
+% \changes{v2.0f}{1993/09/24}{Added substitution fonts}
+% \begin{macrocode}
+\DeclareFontShape{T1}{ccr}{bx}{sl}{%
+%<-nowarn> <->sub*cmr/bx/it
+%<+nowarn> <->ssub*cmr/bx/it
+}{}
+\DeclareFontShape{T1}{ccr}{bx}{n}{%
+%<-nowarn> <->sub*cmr/bx/n
+%<+nowarn> <->ssub*cmr/bx/n
+}{}
+\DeclareFontShape{T1}{ccr}{bx}{it}{%
+%<-nowarn> <->sub*cmr/bx/it
+%<+nowarn> <->ssub*cmr/bx/it
+}{}
+%</T1ccr>
+% \end{macrocode}
+%
+%
+% \subsubsection{The text companion fonts for \texttt{T1} encoding}
+%
+% \changes{v2.4e}{1995/12/04}
+% {Ulrik Vieth. added tcu /1989}
+% \begin{macrocode}
+%<*TS1cmr>
+\DeclareFontFamily{TS1}{cmr}{\hyphenchar\font\m@ne}
+%<!ec>\EC@family{TS1}{cmr}{m}{n}{tcr}
+%<ec>\EC@family{TS1}{cmr}{m}{n}{tcrm}
+\EC@family{TS1}{cmr}{m}{sl}{tcsl}
+\EC@family{TS1}{cmr}{m}{it}{tcti}
+\EC@family{TS1}{cmr}{bx}{n}{tcbx}
+%<!ec>\EC@family{TS1}{cmr}{b}{n}{tcb}
+%<ec>\EC@family{TS1}{cmr}{b}{n}{tcrb}
+\EC@family{TS1}{cmr}{bx}{it}{tcbi}
+\EC@family{TS1}{cmr}{bx}{sl}{tcbl}
+%<!ec>\EC@family{TS1}{cmr}{m}{ui}{tcu}
+%<ec>\EC@family{TS1}{cmr}{m}{ui}{tcui}
+%</TS1cmr>
+%<*TS1cmss>
+\DeclareFontFamily{TS1}{cmss}{\hyphenchar\font\m@ne}
+\EC@family{TS1}{cmss}{m}{n}{tcss}
+\EC@family{TS1}{cmss}{m}{sl}{tcsi}
+\EC@family{TS1}{cmss}{m}{it}{tcsi}
+\EC@family{TS1}{cmss}{bx}{n}{tcsx}
+\EC@family{TS1}{cmss}{bx}{it}{tcso}
+\EC@family{TS1}{cmss}{bx}{sl}{tcso}
+%</TS1cmss>
+%<*TS1cmtt>
+\DeclareFontFamily{TS1}{cmtt}{\hyphenchar\font\m@ne}
+\EC@ttfamily{TS1}{cmtt}{m}{n}{tctt}
+\EC@ttfamily{TS1}{cmtt}{m}{sl}{tcst}
+\EC@ttfamily{TS1}{cmtt}{m}{it}{tcit}
+%</TS1cmtt>
+% \end{macrocode}
+% Again the italic shape is only available with release 1.3.
+% \begin{macrocode}
+%<*TS1cmvtt>
+\DeclareFontFamily{TS1}{cmvtt}{}
+\EC@ttfamily{TS1}{cmvtt}{m}{n}{tcvt}
+\EC@ttfamily{TS1}{cmvtt}{m}{it}{tcvi}
+%</TS1cmvtt>
+% \end{macrocode}
+%
+% \subsection{Fonts with the old \TeX{} text encoding (\texttt{OT1})}
+%
+% Note that in contrast to the Cork encoding, which is fully
+% defined, the old \TeX{} text encoding isn't implemented consistent
+% within all fonts. Most noticeably is that a dollar sign (\$) in
+% some fonts is replaced by a pound symbol (\pounds) in others,
+% which produced quite a number of bug fixes in the NFSS1. Also the
+% typewriter fonts contain a few different characters which are not
+% present in other fonts.
+%
+% If one would use the philosophy of NFSS2 consequently all these
+% would therefore be different encodings and font mixing would
+% therefore be nearly impossible with older fonts. Therefore such
+% encodings are considered the same but one should be remember that
+% in some situations this may cause problems.
+%
+% In other words, use |T1| encoding whenever possible, the |OT..|
+% encodings will be removed in some future release.
+%
+% \subsubsection{Computer Modern Roman (\texttt{OT1})}
+%
+% Beside the |OT1| encoding we also define the same family as |U|
+% encoded which is used for accepting old sources with stuff like
+% |\newmathalphabet| in it.
+% \begin{macrocode}
+%<*OT1cmr,Ucmr>
+%<+OT1cmr>\DeclareFontFamily{OT1}{cmr}{\hyphenchar\font45 }
+%<+Ucmr>\DeclareFontFamily{U}{cmr}{\hyphenchar\font45 }
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{m}{n}%
+%<+Ucmr>\DeclareFontShape{U}{cmr}{m}{n}%
+ {<5><6><7><8><9><10><12>gen*cmr%
+ <10.95>cmr10%
+ <14.4>cmr12%
+ <17.28><20.74><24.88>cmr17}{}
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{m}{sl}%
+%<+Ucmr>\DeclareFontShape{U}{cmr}{m}{sl}%
+ {%
+%<+ori> <5-8>sub*cmr/m/n%
+%<-ori> <5><6><7>cmsl8%
+ <8><9>gen*cmsl%
+ <10><10.95>cmsl10%
+ <12><14.4><17.28><20.74><24.88>cmsl12%
+ }{}
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{m}{it}%
+%<+Ucmr>\DeclareFontShape{U}{cmr}{m}{it}%
+ {%
+%<+ori> <5-7>sub*cmr/m/n%
+%<+ori> <7>cmti7%
+%<-ori> <5><6><7>cmti7%
+ <8>cmti8%
+ <9>cmti9%
+ <10><10.95>cmti10%
+ <12><14.4><17.28><20.74><24.88>cmti12%
+ }{}
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{m}{sc}%
+%<+Ucmr>\DeclareFontShape{U}{cmr}{m}{sc}%
+ {%
+%<+ori> <5-8>sub*cmr/m/n%
+%<+ori> <8><9><10><10.95><12>%
+%<+ori> <14.4><17.28><20.74><24.88>cmcsc10%
+%<-ori> <5><6><7><8><9><10><10.95><12>%
+%<-ori> <14.4><17.28><20.74><24.88>cmcsc10%
+ }{}
+% \end{macrocode}
+% Here we try to cure the famous \$ $\to$ \pounds{} bug:
+% \changes{v2.2c}{1994/01/18}{Corrected forgotten renaming of font
+% shape u to ui in substitution.}
+% \begin{macrocode}
+%<+OT1cmr,Ucmr>% Warning: please note that the upright shape below is
+%<+OT1cmr,Ucmr>% used for the \pounds symbol of LaTeX. So this
+%<+OT1cmr,Ucmr>% font definition shouldn't be removed.
+%<+OT1cmr,Ucmr>%
+%<+ori>% If cmu below 10pt is not available we substitute
+%<+ori>% cmti as far as possible (sizes 7, 8, 9). This is
+%<+ori>% done because cmu is used mainly for producing the
+%<+ori>% the \pound symbol and it is better to get a slanted
+%<+ori>% (or bigger) pound then to get a $ sign in such
+%<+ori>% situations.
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{m}{ui}
+%<+Ucmr>\DeclareFontShape{U}{cmr}{m}{ui}
+ {
+%<+ori> <7>subf*cmti7%
+%<+ori> <8>subf*cmti8%
+%<+ori> <9>subf*cmti9%
+%<+ori> <10><10.95><12><14.4><17.28><20.74><24.88>cmu10%
+%<-ori> <5><6><7><8><9><10><10.95><12>%
+%<-ori> <14.4><17.28><20.74><24.88>cmu10%
+ }{}
+%<+OT1cmr,Ucmr>%%%%%%% bold series
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{b}{n}
+%<+Ucmr>\DeclareFontShape{U}{cmr}{b}{n}%
+ {%
+%<+ori> <-10>sub*cmr/bx/n%
+%<+ori> <10><10.95><12><14.4><17.28><20.74><24.88>cmb10%
+%<-ori> <5><6><7><8><9><10><10.95><12>%
+%<-ori> <14.4><17.28><20.74><24.88>cmb10%
+ }{}
+%<+OT1cmr,Ucmr>%%%%%%%% bold extended series
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{bx}{n}
+%<+Ucmr>\DeclareFontShape{U}{cmr}{bx}{n}%
+ {%
+ <5><6><7><8><9>gen*cmbx%
+ <10><10.95>cmbx10%
+ <12><14.4><17.28><20.74><24.88>cmbx12%
+ }{}
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{bx}{sl}
+%<+Ucmr>\DeclareFontShape{U}{cmr}{bx}{sl}%
+ {%
+%<+ori> <-10>sub*cmr/bx/n%
+%<+ori> <10><10.95><12><14.4><17.28><20.74><24.88>cmbxsl10%
+%<-ori> <5><6><7><8><9>%
+%<-ori> <10><10.95><12><14.4><17.28><20.74><24.88>cmbxsl10%
+ }{}
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{bx}{it}
+%<+Ucmr>\DeclareFontShape{U}{cmr}{bx}{it}%
+ {%
+%<+ori> <-10>sub*cmr/bx/n%
+%<+ori> <10><10.95><12><14.4><17.28><20.74><24.88>cmbxti10%
+%<-ori> <5><6><7><8><9>%
+%<-ori> <10><10.95><12><14.4><17.28><20.74><24.88>cmbxti10%
+ }{}
+% \end{macrocode}
+% \changes{v2.5h}{1999/05/09}{docstrip `nowarn' guard was the wrong way
+% around (pr/3036)}
+% \begin{macrocode}
+%<+OT1cmr,Ucmr>% Again this is necessary for a correct \pounds symbol in
+%<+OT1cmr,Ucmr>% the cmr fonts Hopefully the dc/ec font layout will take
+%<+OT1cmr,Ucmr>% over soon.
+%<+OT1cmr,Ucmr>%
+%<+OT1cmr>\DeclareFontShape{OT1}{cmr}{bx}{ui}
+%<+Ucmr>\DeclareFontShape{U}{cmr}{bx}{ui}%
+%<-nowarn> {<->sub*cmr/m/ui}{}
+%<+nowarn> {<->ssub*cmr/m/ui}{}
+%</OT1cmr,Ucmr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Sans (\texttt{OT1})}
+%
+% Same game for the Sans family.
+% \begin{macrocode}
+%<*OT1cmss,Ucmss>
+%<+OT1cmss>\DeclareFontFamily{OT1}{cmss}{\hyphenchar\font45 }
+%<+Ucmss>\DeclareFontFamily{U}{cmss}{\hyphenchar\font45 }
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{m}{n}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{m}{n}%
+ {%
+%<+ori> <-8>sub*cmr/m/n%
+%<+ori> <8>cmss8%
+%<-ori> <5><6><7><8>cmss8%
+ <9>cmss9%
+ <10><10.95>cmss10%
+ <12><14.4>cmss12%
+ <17.28><20.74><24.88>cmss17%
+ }{}
+%<+OT1cmss,Ucmss>% Font undefined, therefore substituted
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{m}{it}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{m}{it}%
+%<-nowarn> {<->sub*cmss/m/sl}{}
+%<+nowarn> {<->ssub*cmss/m/sl}{}
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{m}{sl}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{m}{sl}%
+ {%
+%<+ori> <-8>sub*cmss/m/n%
+%<+ori> <8><9>gen*cmssi%
+%<-ori> <5><6><7><8>cmssi8<9>cmssi9%
+ <10><10.95>cmssi10%
+ <12><14.4>cmssi12%
+ <17.28><20.74><24.88>cmssi17%
+ }{}
+%<+OT1cmss,Ucmss>%%%%%%% Font/shape undefined, therefore substituted
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{m}{sc}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{m}{sc}%
+ {<->sub*cmr/m/sc}{}
+%<+OT1cmss,Ucmss>%%%%%%% Font/shape undefined, therefore substituted
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{m}{ui}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{m}{ui}%
+ {<->sub*cmr/m/ui}{}
+%<+OT1cmss,Ucmss>%%%%%%%% semibold condensed series
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{sbc}{n}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{sbc}{n}%
+ {%
+%<+ori> <-10>sub*cmss/m/n%
+%<-ori> <5><6><7><8><9>cmssdc10%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmssdc10%
+ }{}
+
+%<+OT1cmss,Ucmss>%%%%%%%%% bold extended series
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{bx}{n}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{bx}{n}%
+ {%
+%<+ori> <-10>sub*cmss/m/n%
+%<-ori> <5><6><7><8><9>cmssbx10%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmssbx10%
+ }{}
+%<+OT1cmss,Ucmss>%%%%%%% Font/shape undefined, therefore substituted
+%<+OT1cmss>\DeclareFontShape{OT1}{cmss}{bx}{ui}
+%<+Ucmss>\DeclareFontShape{U}{cmss}{bx}{ui}%
+ {<->sub*cmr/bx/ui}{}
+%</OT1cmss,Ucmss>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Typewriter (\texttt{OT1})}
+%
+% Notice that this encoding is in fact quite different and we
+% shouldn't therefore substitute some other font group if the
+% correct size or shape isn't available. Otherwise, we may end with
+% a |\verb| suddenly producing a lot of funny chars instead of the
+% desired ones.
+% \begin{macrocode}
+%<*OT1cmtt,Ucmtt>
+%<+OT1cmtt>\DeclareFontFamily{OT1}{cmtt}{\hyphenchar \font\m@ne}
+%<+Ucmtt>\DeclareFontFamily{U}{cmtt}{\hyphenchar \font\m@ne}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{m}{n}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{m}{n}%
+ {%
+% \end{macrocode}
+% This substitution for |ori| is wrong and only in here because
+% that was the way stuff has be set up in the old |lfonts.tex| file.
+% \begin{macrocode}
+%<+ori> <-8>sub*cmr/m/n%
+%<+ori> <8><9>gen*cmtt%
+%<-ori> <5><6><7><8>cmtt8<9>cmtt9%
+ <10><10.95>cmtt10%
+ <12><14.4><17.28><20.74><24.88>cmtt12%
+ }{}
+%<+OT1cmtt,Ucmtt>%%%%%% make sure subst shapes are available
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{m}{it}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{m}{it}%
+ {%
+% \end{macrocode}
+% The following substitution however is okay since both fonts have
+% the same encoding.
+% \begin{macrocode}
+%<+ori> <-10>sub*cmtt/m/n%
+%<-ori> <5><6><7><8><9>%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmitt10%
+ }{}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{m}{sl}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{m}{sl}%
+ {%
+%<+ori> <-10>sub*cmtt/m/n%
+%<-ori> <5><6><7><8><9>%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmsltt10%
+ }{}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{m}{sc}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{m}{sc}%
+ {%
+%<+ori> <-10>sub*cmtt/m/n%
+%<-ori> <5><6><7><8><9>%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmtcsc10%
+ }{}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{m}{ui}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{m}{ui}%
+%<-nowarn> {<->sub*cmtt/m/it}{}
+%<+nowarn> {<->ssub*cmtt/m/it}{}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{bx}{n}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{bx}{n}%
+%<-nowarn> {<->sub*cmtt/m/n}{}
+%<+nowarn> {<->ssub*cmtt/m/n}{}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{bx}{it}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{bx}{it}%
+%<-nowarn> {<->sub*cmtt/m/it}{}
+%<+nowarn> {<->ssub*cmtt/m/it}{}
+%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{bx}{ui}
+%<+Ucmtt>\DeclareFontShape{U}{cmtt}{bx}{ui}%
+%<-nowarn> {<->sub*cmtt/m/it}{}
+%<+nowarn> {<->ssub*cmtt/m/it}{}
+%</OT1cmtt,Ucmtt>
+% \end{macrocode}
+%
+%
+% \subsubsection{Computer Modern Variable Typewriter (\texttt{OT1})}
+%
+% The Computer Modern Variable Typewriter family is the
+% proportional spaced version of the Computer Modern Typewriter
+% family. It is implemented as a separate family to allow easy use
+% in normal text, including changes of shape/series etc if available.
+% This family also allows normal hyphenation.
+% \changes{v2.5b}{1997/02/25}
+% {typo fixed in ot1cmvtt \cs{ProvidesFile} latex/2394}
+% \begin{macrocode}
+%<*OT1cmvtt>
+\DeclareFontFamily{OT1}{cmvtt}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmvtt}{m}{n}%
+ {%
+ <5><6><7><8><9><10><10.95>%
+ <12><14.4><17.28><20.74><24.88>cmvtt10%
+ }{}
+% \end{macrocode}
+% This font is probably not available to everybody as it is not
+% part of the standard distribution. One might find it in
+% \texttt{.../systems/knuth/local} on CTAN.
+% \begin{macrocode}
+\DeclareFontShape{OT1}{cmvtt}{m}{it}%
+ {%
+ <5><6><7><8><9><10><10.95>%
+ <12><14.4><17.28><20.74><24.88>cmvtti10%
+ }{}
+%</OT1cmvtt>
+% \end{macrocode}
+%
+%
+% \subsubsection{Computer Modern Funny (\texttt{OT1})}
+%
+% \begin{macrocode}
+%<*OT1cmfr>
+\DeclareFontFamily{OT1}{cmfr}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmfr}{m}{n}{%
+ <10>cmff10%
+ }{}
+\DeclareFontShape{OT1}{cmfr}{m}{it}{%
+ <10>cmfi10%
+ }{}
+%</OT1cmfr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Dunhill (\texttt{OT1})}
+%
+% \begin{macrocode}
+%<*OT1cmdh>
+\DeclareFontFamily{OT1}{cmdh}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmdh}{m}{n}{%
+ <10>cmdunh10%
+ }{}
+%</OT1cmdh>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Fibonacci (\texttt{OT1})}
+%
+% \begin{macrocode}
+%<*OT1cmfib>
+\DeclareFontFamily{OT1}{cmfib}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmfib}{m}{n}{%
+ <8>cmfib8%
+ }{}
+%</OT1cmfib>
+% \end{macrocode}
+%
+% \subsection{Math fonts}
+%
+% \subsubsection{Computer Modern Math italics}
+% \changes{v2.0d}{1993/06/12}{OML/cmm/bx/it added for
+% \cs{oldstylenums}}
+% \changes{v2.3a}{1994/05/02}{Included font definitions for
+% AMS-supplied cm fonts.}
+% \begin{macrocode}
+%<*OMLcmm>
+\DeclareFontFamily{OML}{cmm}{\skewchar\font127 }
+\DeclareFontShape{OML}{cmm}{m}{it}%
+ {<5><6><7><8><9>gen*cmmi%
+ <10><10.95>cmmi10%
+ <12><14.4><17.28><20.74><24.88>cmmi12%
+ }{}
+\DeclareFontShape{OML}{cmm}{b}{it}{%
+ <5><6><7><8><9>gen*cmmib%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmmib10%
+ }{}
+% \end{macrocode}
+% This will allow the |\oldstylenums| command to work within
+% |\textbf|.
+% \begin{macrocode}
+\DeclareFontShape{OML}{cmm}{bx}{it}%
+ {<->ssub*cmm/b/it}{}
+%</OMLcmm>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Roman Math italics}
+%
+% \changes{v2.3d}{1994/10/30}{Added OMLcmr font substitutions pointing
+% to OMLcmm. }
+% \changes{v2.3f}{1995/04/22}{Corrected OMLcmr \cs{skewchar}}
+%
+% Some text symbols like `\t oo' and `$<$' are kept in the OML
+% encoding, so we need font substititutions from OML/cmr to OML/cmm.
+% \begin{macrocode}
+%<*OMLcmr>
+\DeclareFontFamily{OML}{cmr}{\skewchar\font127 }
+\DeclareFontShape{OML}{cmr}{m}{n}%
+ {<->ssub*cmm/m/it}{}
+\DeclareFontShape{OML}{cmr}{m}{it}%
+ {<->ssub*cmm/m/it}{}
+\DeclareFontShape{OML}{cmr}{m}{sl}%
+ {<->ssub*cmm/m/it}{}
+\DeclareFontShape{OML}{cmr}{m}{sc}%
+ {<->ssub*cmm/m/it}{}
+\DeclareFontShape{OML}{cmr}{bx}{n}%
+ {<->ssub*cmm/b/it}{}
+\DeclareFontShape{OML}{cmr}{bx}{it}%
+ {<->ssub*cmm/b/it}{}
+\DeclareFontShape{OML}{cmr}{bx}{sl}%
+ {<->ssub*cmm/b/it}{}
+\DeclareFontShape{OML}{cmr}{bx}{sc}%
+ {<->ssub*cmm/b/it}{}
+%</OMLcmr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Math symbols}
+%
+% \changes{v2.3a}{1994/05/02}{Included font definitions for
+% AMS-supplied cm fonts.}
+% \begin{macrocode}
+%<*OMScmsy>
+\DeclareFontFamily{OMS}{cmsy}{\skewchar\font48 }
+\DeclareFontShape{OMS}{cmsy}{m}{n}{%
+ <5><6><7><8><9><10>gen*cmsy%
+ <10.95><12><14.4><17.28><20.74><24.88>cmsy10%
+ }{}
+\DeclareFontShape{OMS}{cmsy}{b}{n}{%
+ <5><6><7><8><9>gen*cmbsy%
+ <10><10.95><12><14.4><17.28><20.74><24.88>cmbsy10%
+ }{}
+%</OMScmsy>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Roman Math symbols}
+%
+% \changes{v2.3d}{1994/10/30}{Added OMScmr font substitutions pointing
+% to OMScmm. }
+%
+% Some text symbols like `\P' and `\dag' are kept in the OMS encoding,
+% so we need font substititutions from OMS/cmr to OMS/cmsy.
+% \begin{macrocode}
+%<*OMScmr>
+\DeclareFontFamily{OMS}{cmr}{\skewchar\font48 }
+\DeclareFontShape{OMS}{cmr}{m}{n}%
+ {<->ssub*cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmr}{m}{it}%
+ {<->ssub*cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmr}{m}{sl}%
+ {<->ssub*cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmr}{m}{sc}%
+ {<->ssub*cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmr}{bx}{n}%
+ {<->ssub*cmsy/b/n}{}
+\DeclareFontShape{OMS}{cmr}{bx}{it}%
+ {<->ssub*cmsy/b/n}{}
+\DeclareFontShape{OMS}{cmr}{bx}{sl}%
+ {<->ssub*cmsy/b/n}{}
+\DeclareFontShape{OMS}{cmr}{bx}{sc}%
+ {<->ssub*cmsy/b/n}{}
+%</OMScmr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern large symbols}
+%
+% \begin{macrocode}
+%<*OMXcmex>
+\DeclareFontFamily{OMX}{cmex}{}
+\DeclareFontShape{OMX}{cmex}{m}{n}{%
+ <->sfixed*cmex10%
+ }{}
+%</OMXcmex>
+% \end{macrocode}
+%
+%
+% \subsubsection{Concrete Roman}
+%
+% \changes{v2.3d}{1994/07/13}{Added new concrete shapes}
+% \begin{macrocode}
+%<*OT1ccr>
+\DeclareFontFamily{OT1}{ccr}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{ccr}{m}{n}{%
+ <5><6><7><8><9><10>gen*ccr%
+ <10.95><12><14.4><17.28><20.74><24.88>ccr10}{}
+\DeclareFontShape{OT1}{ccr}{m}{it}{%
+ <10><10.95><12>ccti10}{}
+\DeclareFontShape{OT1}{ccr}{m}{sc}{%
+ <10><10.95><12>cccsc10}{}
+\DeclareFontShape{OT1}{ccr}{m}{sl}{%
+ <9>ccsl9%
+ <10><10.95><12>ccsl10}{}
+\DeclareFontShape{OT1}{ccr}{c}{sl}{<9>ccslc9}{}
+% \end{macrocode}
+% Finally a few substitution fonts for combinations not available.
+% \changes{v2.0f}{1993/09/24}{Added substitution fonts}
+% \begin{macrocode}
+\DeclareFontShape{OT1}{ccr}{bx}{n}%
+ {<->sub*cmr/bx/n}{}
+\DeclareFontShape{OT1}{ccr}{bx}{sl}%
+ {<->sub*cmr/bx/sl}{}
+\DeclareFontShape{OT1}{ccr}{bx}{it}%
+ {<->sub*cmr/bx/it}{}
+%</OT1ccr>
+% \end{macrocode}
+%
+% \subsubsection{Concrete Roman math italic}
+%
+% \changes{v2.4d}{1995/12/01}
+% {Ulrik Vieth. Add 10.95 and 12 size for ccmi10 /1989}
+% \begin{macrocode}
+%<*OMLccm>
+\DeclareFontFamily{OML}{ccm}{\skewchar\font127 }
+\DeclareFontShape{OML}{ccm}{m}{it}{%
+ <10><10.95><12>ccmi10}{}
+%</OMLccm>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Roman in \texttt{OT2} encoding}
+%
+% These fonts are from the University of Washington. They do not
+% belong into this file but at the moment there is no other place.
+% \begin{macrocode}
+%<*OT2cmr>
+\DeclareFontFamily{OT2}{cmr}{\hyphenchar\font45 }
+\DeclareFontShape{OT2}{cmr}{m}{n}{%
+ <5><6><7><8><9>gen*wncyr%
+ <10><10.95><12><14.4><17.28><20.74><24.88>wncyr10}{}
+\DeclareFontShape{OT2}{cmr}{m}{it}{%
+ <5><6><7><8><9>gen*wncyi%
+ <10><10.95><12><14.4><17.28><20.74><24.88>wncyi10}{}
+\DeclareFontShape{OT2}{cmr}{m}{sc}{%
+ <5><6><7><8><9><10><10.95><12><14.4>%
+ <17.28><20.74><24.88>wncysc10}{}
+%<+OT2cmr>%%%%%%%%%%%%% bold series
+\DeclareFontShape{OT2}{cmr}{b}{n}{%
+ <5><6><7><8><9>gen*wncyb%
+ <10><10.95><12><14.4><17.28><20.74><24.88>wncyb10}{}
+%</OT2cmr>
+% \end{macrocode}
+%
+% \subsubsection{Computer Modern Sans in \texttt{OT2} encoding}
+%
+% Some more fonts from the University of Washington.
+% \begin{macrocode}
+%<*OT2cmss>
+\DeclareFontFamily{OT2}{cmss}{\hyphenchar\font45 }
+\DeclareFontShape{OT2}{cmss}{m}{n}{%
+ <8><9>gen*wncyss%
+ <10><10.95><12><14.4><17.28><20.74><24.88>wncyss10}{}
+%</OT2cmss>
+% \end{macrocode}
+%
+% The next line goes into all files and in addition prevents \dst{}
+% from adding any further code from the main source file (such as a
+% character table.
+% \begin{macrocode}
+\endinput
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/cmfonts.ins b/macros/latex-dev/base/cmfonts.ins
new file mode 100644
index 0000000000..79da8994db
--- /dev/null
+++ b/macros/latex-dev/base/cmfonts.ins
@@ -0,0 +1,124 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{\file{ot1cmss.fd}{\from{cmfonts.fdd}{OT1cmss}}
+ \file{ot1cmr.fd}{\from{cmfonts.fdd}{OT1cmr}}
+ \file{ot1cmtt.fd}{\from{cmfonts.fdd}{OT1cmtt,nowarn}}
+ \file{ot1cmvtt.fd}{\from{cmfonts.fdd}{OT1cmvtt}}
+ \file{ot1cmfib.fd}{\from{cmfonts.fdd}{OT1cmfib}}
+ \file{ot1cmfr.fd}{\from{cmfonts.fdd}{OT1cmfr}}
+ \file{ot1cmdh.fd}{\from{cmfonts.fdd}{OT1cmdh}}}
+
+\generate{\file{ucmr.fd}{\from{cmfonts.fdd}{Ucmr}}
+ \file{ucmss.fd}{\from{cmfonts.fdd}{Ucmss}}
+ \file{ucmtt.fd}{\from{cmfonts.fdd}{Ucmtt}}
+ \file{omlcmm.fd}{\from{cmfonts.fdd}{OMLcmm}}
+ \file{omscmsy.fd}{\from{cmfonts.fdd}{OMScmsy}}
+ \file{omxcmex.fd}{\from{cmfonts.fdd}{OMXcmex}}
+ \file{omlcmr.fd}{\from{cmfonts.fdd}{OMLcmr}}
+ \file{omscmr.fd}{\from{cmfonts.fdd}{OMScmr}}
+ }
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.fdd' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
+
diff --git a/macros/latex-dev/base/cmfonts.pdf b/macros/latex-dev/base/cmfonts.pdf
new file mode 100644
index 0000000000..f475df54a9
--- /dev/null
+++ b/macros/latex-dev/base/cmfonts.pdf
Binary files differ
diff --git a/macros/latex-dev/base/doc.dtx b/macros/latex-dev/base/doc.dtx
new file mode 100644
index 0000000000..aad1551543
--- /dev/null
+++ b/macros/latex-dev/base/doc.dtx
@@ -0,0 +1,4941 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% ^^A -*-LaTeX-*-
+%
+% ^^A These shouldn't come out in .ist files, hence the module
+% ^^A comments, or in the printed version, hence temporary comment
+% ^^A category for `<'
+%\catcode`\<=14
+%<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+%<+package> \ProvidesPackage{doc}
+%<+shortvrb>\ProvidesPackage{shortvrb}
+%<+package|shortvrb> [2018/09/25 v2.1i
+%<+package|shortvrb> Standard LaTeX documentation package (FMi)]
+%\catcode`\<=12
+%
+%%
+%\iffalse This is a METACOMMENT
+% Everything up to the next `\ fi' (without a blank) will
+% be ignored. This is necessary because `%' may no longer
+% be a comment mark when this file is read in.
+%
+%
+%% Package `doc' to use with LaTeX 2e
+%% Copyright (C) 1989-1999 Frank Mittelbach, all rights reserved.
+%
+%
+% Version: Date: Changes:
+%
+% 1.0a 5.5.88 This is nothing but a collection of tests and
+% hacks. It is certainly going to be greatly
+% changed.
+% Better not to use it!
+% 1.5a and earlier... are not longer recorded
+% 1.5b and higher... are documented with the (undocumented) \changes
+% feature.
+%\fi
+% \changes{v1.5f}{1989/04/29}{Thanks to Brian who documented the
+% \cs{changes} macro feature.}
+% \changes{v1.5g}{1989/05/07}{MacroTopsep now called MacrocodeTopsep and
+% new MacroTopsep added}
+% \changes{v1.5h}{1989/05/17}{All lines shortened to <72 characters}
+% \changes{v1.5j}{1989/06/09}{Corrections by Ron Whitney added}
+% \changes{v1.5q}{1989/11/03}{`\ldots{}Listing macros renamed to
+% `\ldots{}Input. Suggested by R. Wonneberger}
+% \changes{v1.5w}{1990/02/05}{Counter codelineno renamed to CodelineNo}
+% \changes{v1.9a}{1993/12/02}{Upgrade for LaTeX2e}
+% \changes{v1.9d}{1993/12/20}{Protected changes entry.}
+% \changes{v1.0p}{1994/05/21}{Use new error commands}
+%
+%
+% \hyphenation{make-index}
+%
+% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
+% \DoNotIndex{\@flushglue,\@gobble,\@input}
+% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
+% \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
+% \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
+% \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
+% \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
+% \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
+% \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
+% \DoNotIndex{\mathcal,\csname,\def,\documentstyle,\dospecials,\edef}
+% \DoNotIndex{\egroup}
+% \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
+% \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
+% \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
+% \DoNotIndex{\ifcase}
+% \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
+% \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
+% \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
+% \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
+% \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
+% \DoNotIndex{\strutbox}
+% \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
+% \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
+% \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
+% \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
+% \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
+% \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
+% \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
+% \DoNotIndex{\nopagebreak}
+% \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
+% \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
+% \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
+% \DoNotIndex{\[,\{,\},\]}
+% \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
+% \DoNotIndex{\baselineskip,\begin,\tw@}
+% \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
+% \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
+% \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
+% \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
+% \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
+% \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
+% \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
+% \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
+% \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
+% \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
+% \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
+% \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
+% \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
+% \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
+% \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
+% \DoNotIndex{\bfdefault}
+%
+% \MakeShortVerb{\"}
+% \setcounter{StandardModuleDepth}{1}
+%
+% {\catcode`\p=12 \catcode`\t=12 ^^A hack used later on to print
+% \gdef\dimenvalue#1pt{$#1$pt}} ^^A a register value with a - sign
+%
+% \newcommand{\DOC}{\texttt{doc}}
+%
+% \changes{v1.9t}{1995/05/11}{Use \cs{GetFileInfo}}
+% \GetFileInfo{doc.sty}
+%
+% \CheckSum{2206} ^^A % keep the checksum in this file
+%
+% \title{The \DOC{} and \texttt{shortvrb} Packages\thanks
+% {This file has version number \fileversion{} dated \filedate{}.}}
+% \author{Frank Mittelbach\thanks{Further commentary added at Royal
+% Military College of Science by B. Hamilton Kelly; English
+% translation of parts of the original German commentary
+% provided by Andrew Mills; fairly substantial additions,
+% particularly from \texttt{newdoc}, and
+% documentation of post-v1.5q features added at v1.7a by Dave
+% Love (SERC Daresbury Lab). Extraction of \texttt{shortvrb}
+% package added by Joachim Schrod (TU~Darmstadt).}}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \begin{abstract}
+% This package contains the definitions that are necessary to
+% format the documentation of package files. The package was
+% developed in Mainz in cooperation with the Royal Military College
+% of Science. This is an update which documents various changes
+% and new features in \DOC{} and integrates the features of
+% \textsf{newdoc}.
+% \end{abstract}
+%
+% \newif\ifmulticols
+% \IfFileExists{multicol.sty}{\multicolstrue}{}
+%
+% \ifmulticols
+% \addtocontents{toc}{\protect\begin{multicols}{2}}
+% \fi
+%
+% {\parskip 0pt ^^A We have to reset \parskip
+% ^^A (bug in \LaTeX)
+% \tableofcontents
+% }
+%
+% \changes{v1.7a}{1992/02/25}{Miscellaneous small changes to the text}
+%
+% \ifmulticols
+% \begin{multicols}{2}[\section*{Preface to version 1.7}]
+% \else \section*{Preface to version 1.7} \fi
+%
+% This version of \texttt{doc.dtx} documents changes which have occurred
+% since the last published version \cite{art:doc} but which have been
+% present in distributed versions of \texttt{doc.sty} for some time. It
+% also integrates the (undocumented) features of the distributed
+% \texttt{newdoc.sty}.
+%
+% The following changes and additions have been made to the user
+% interface since the published version~\cite{art:doc}. See
+% \S\ref{sec:interface} for more details.
+% \begin{description}
+% \item[Driver mechanism] "\DocInput" is now used in the driver file
+% to input possibly multiple independent \DOC{} files and \DOC{} no
+% longer has to be the last package. "\IndexListing" is replaced
+% by "\IndexInput";
+% \item[Indexing] is controlled by "\PageIndex" and "\CodelineIndex",
+% one of which must be specified to produce an index---there is no
+% longer a "\makeindex" in the default "\DocstyleParms";
+% \item[The \texttt{macro} environment] now takes as argument the
+% macro name {\em with\/} the backslash;
+% \item[Verbatim text] Newlines are now forbidden inside "\verb" and
+% commands "\MakeShortVerb" and "\DeleteShortVerb" are provided for
+% verbatim shorthand;
+% \item[\texttt{\bslash par}] can now be used in "\DoNotIndex";
+% \item[Checksum/character table support] for ensuring the integrity
+% of distributions is added;
+% \item[\texttt{\bslash printindex}] becomes "\PrintIndex";
+% \item[\texttt{multicol.sty}] is no longer necessary to use \DOC{} or
+% print the documentation (although it is recommended);
+% \item[`Docstrip' modules] are recognised and formatted specially.
+% \end{description}
+%
+% As well as adding some completely new stuff,
+% the opportunity has been taken to add some commentary to the code
+% formerly in \texttt{newdoc.sty} and that added after version 1.5k of
+% \texttt{doc.sty}. Since (as noted in the sections concerned) this
+% commentary wasn't written by Frank Mittelbach but the code was, it is
+% probably {\em not\/} true in this case that ``if the code and
+% comments disagree both are probably wrong''!
+%
+% \subsection*{Bugs}
+%
+% There are some known bugs in this version:
+% \begin{itemize}
+% \item The "\DoNotIndex" command doesn't work for some single
+% character commands most noticeable "\%".
+% \item The `General changes' glossary entry would come out after
+% macro names with a leading "!" and possibly a leading |"|;
+% \item If you have an old version of \textsf{makeindex} long "\changes"
+% entries will come out strangely and you may find the section
+% header amalgamated with the first changes entry. Try to get an
+% up-to-date one (see p.~\pageref{makeindex:version});
+% \item Because the accompanying \textsf{makeindex} style files support
+% the inconsistent attribute specifications of older and newer
+% versions \textsf{makeindex} always complains about three `unknown
+% specifier's when sorting the index and changes entries.
+% \item If "\MakeShortVerb" and "\DeleteShortVerb" are used with
+% single character arguments, e.g., "{|}" instead of "{\|}" chaos
+% may happen.
+% \end{itemize}
+% (Some `features' are documented below.)
+%
+% \subsection*{Wish list}
+%
+% \begin{itemize}
+% \item Hooks to allow "\DescribeMacro" and "\DescribeEnv" to write
+% out to a special file information about the package's `exported'
+% definitions which they describe. This could subsequently be
+% included in the \texttt{docstrip}ped \texttt{.sty} file in a
+% suitable form for use by smart editors in command completion,
+% spelling checking etc., based on the packages used in a document.
+% This would need agreement on a `suitable form'. \item Indexing of
+% the modules used in \texttt{docstrip}'s "%<" directives. I'm not
+% sure how to index directives containing module combinations; \item
+% Writing out bibliographic information about the package; \item Allow
+% turning off use of the special font for, say, the next guarded
+% block.
+% \end{itemize}
+%
+% \ifmulticols
+% \end{multicols}
+%
+% \begin{multicols}{2}[\medskip \rule{\textwidth}{.3pt}
+% \section{Introduction}]
+% \else
+% \section{Introduction}
+% \fi
+%
+% The \TeX{} macros which are described here allow definitions and
+% documentation to be held in one and the same file. This has the
+% advantage that normally very complicated instructions are made
+% simpler to understand by comments inside the definition. In addition
+% to this, updates are easier and only one source file needs to be
+% changed. On the other hand, because of this, the package files are
+% considerably longer: thus \TeX{} takes longer to load them. If this
+% is a problem, there is an easy remedy: one needs only to run the
+% \texttt{docstrip.tex} program that removes nearly all lines that begin
+% with a
+% percent sign.
+%
+% The idea of integrated documentation was born with the development
+% of the \TeX{} program; it was crystallized in Pascal with the \Web{}
+% system. The advantages of this method are plain to see (it's easy
+% to make comparisons \cite{art:Knuthliterat}). Since this
+% development, systems similar to \Web{} have been developed for other
+% programming languages. But for one of the most complicated
+% programming languages (\TeX) the documentation has however been
+% neglected. The \TeX{} world seems to be divided between:---
+% \begin{itemize} \item a couple of ``wizards'', who produce many
+% lines of completely unreadable code ``off the cuff'', and \item many
+% users who are amazed that it works just how they want it to do. Or
+% rather, who despair that certain macros refuse to do what is
+% expected of them.\end{itemize}
+%
+% I do not think that the \Web{} system is {\em the\/} reference work;
+% on the contrary, it is a prototype which suffices for the
+% development of programs within the \TeX{} world. It is sufficient,
+% but not totally sufficient.\footnote{I know that this will be seen
+% differently by a few people, but this product should not be seen as
+% the finished product, at least as far as applications concerning
+% \TeX{} are concerned. The long-standing debate over `multiple
+% change files' shows this well.} As a result of \Web, new programming
+% perspectives have been demonstrated; unfortunately, though, they
+% haven't been developed further for other programming languages.
+%
+% The method of documentation of \TeX{} macros which I have introduced
+% here should also only be taken as a first sketch. It is designed
+% explicitly to run under \LaTeX{} alone. Not because I was of the
+% opinion that this was the best starting point, but because from this
+% starting point it was the quickest to develop.\footnote{This
+% argument is a bad one, however, it is all too often trotted out.} As
+% a result of this design decision, I had to move away from the
+% concept of modularization; this was certainly a step backward.
+%
+% I would be happy if this article could spark off discussion over
+% \TeX\ documentation. I can only advise anyone who thinks that they
+% can cope without documentation to ``Stop Time'' until he or she
+% completely understands the \AmSTeX{} source code.
+%
+%
+%
+%
+%
+% \subsection{Using the \DOC{} package}
+%
+% Just like any other package, invoke it by requesting it with a
+% |\usepackage| command in the preamble. \textsf{Doc}'s use of
+% |\reversemarginpars| may make it incompatible with some classes.
+% \changes{v1.7a}{1992/02/25}{Altered usage info}
+%
+%
+% \ifmulticols\end{multicols}\fi
+%
+%
+% \section{The User Interface}\label{sec:interface}
+% \subsection{The driver file}
+%
+% If one is going to document a set of macros with the \DOC{}
+% package one has to prepare a special driver file which produces the
+% formatted document. This driver file has the following
+% characteristics:
+%
+% \noindent |\documentclass[|\meta{options}]^^A
+% |{|\meta{document-class}|}|\\[1pt]
+% |\usepackage{doc}|\\[3pt]
+% \hspace*{10pt}\meta{preamble}\\[3pt]
+% |\begin{document}|\\[3pt]
+% \hspace*{10pt}\meta{special input commands}\\[3pt]
+% |\end{document}|
+%
+% The \meta{document-class} might be any document class, I normally
+% use \texttt{article}.
+%
+% In the \meta{preamble} one should place declarations which
+% manipulate the behavior of the \DOC{} package like
+% |\DisableCrossrefs| or |\OnlyDescription|.
+%
+% \DescribeMacro\DocInput \DescribeMacro\IndexInput
+% Finally the \meta{special input commands} part should contain one or
+% more |\DocInput|\meta{file name} and/or
+% |\IndexInput|\meta{file name} commands. The
+% |\DocInput| command is used for files prepared for the
+% \DOC{} package whereas |\IndexInput| can be used for all kinds of
+% macro files. See page \pageref{..Input} for more details of
+% "\IndexInput". Multiple "\DocInput"s can be used with a
+% number of included files which are each self-contained
+% self-documenting packages---for instance, each containing
+% "\maketitle".
+%
+% As an example, the driver file for the \DOC{} package itself is
+% the following text surrounded by "%<*driver>" and "%</driver>".
+% To produce the documentation you can simply run the \texttt{.dtx}
+% file through \LaTeX{} in which case this code will be executed
+% (loading the document class \texttt{ltxdoc}, etc.) or you can
+% extract this into a separate file by using
+% the \texttt{docstrip} program.
+% The line numbers below are added by
+% \DOC{}'s formatting.
+% Note that the class \textsf{ltxdoc} has the \DOC{} package
+% preloaded.
+% \changes{v1.7a}{1992/03/06}{Added
+% docstrip-derivable driver file as example.}
+% \changes{v1.7c}{1992/04/01}{Expurgated ltugboat.sty from driver.}
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+ %\DisableCrossrefs % Say \DisableCrossrefs if index is ready
+\CodelineIndex
+\RecordChanges % Gather update information
+ %\OnlyDescription % comment out for implementation details
+ %\OldMakeindex % use if your MakeIndex is pre-v2.9
+\setlength\hfuzz{15pt} % dont make so many
+\hbadness=7000 % over and under full box warnings
+\begin{document}
+ \DocInput{doc.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+%
+% \subsection{General conventions}
+%
+% A \TeX{} file prepared to be used with the `doc' package
+% consists of `documentation parts' intermixed with `definition
+% parts'.
+%
+% Every line of a `documentation part' starts with a percent sign
+% (|%|) in column one. It may contain arbitrary \TeX{} or
+% \LaTeX{} commands except that the character `|%|' cannot be
+% used as a comment character.
+% \SortIndex{\string^\string^A}{\string\verb\verbatimchar
+% \string^\string^A\verbatimchar \encapchar usage} To allow user
+% comments, the |^^A| character is defined as a comment character
+% later on. Such `metacomments' may be also be included simply by
+% surrounding them with "\iffalse" \ldots~"\fi".
+%
+% All other parts of the file are called `definition parts'. They
+% contain fractions of the macros described in the `documentation
+% parts'.
+%
+% If the file is used to define new macros (e.g.\ as a package file in
+% the |\usepackage| macro), the `documentation parts' are
+% bypassed at high speed and the macro definitions are pasted
+% together, even if they are split into several `definition parts'.
+%
+% \DescribeEnv{macrocode}
+% On the other hand, if the documentation of these macros is to be
+% produced, the `definition parts' should be typeset verbatim. To
+% achieve this, these parts are surrounded by the \textsf{macrocode}
+% environment.
+% More exactly: before a `definition part' there should be a line
+% containing\\
+% \hspace*{\MacroIndent}\verb*+% \begin{macrocode}+\\
+% and after this part a line\\
+% \hspace*{\MacroIndent}\verb*+% \end{macrocode}+\\
+% There must be {\em exactly\/} four spaces between the |%|
+% and |\end{macrocode}| --- \TeX{} is looking for this string
+% and not for the macro while processing a `definition part'.
+%
+% Inside a `definition part' all \TeX{} commands are allowed; even the
+% percent sign could be used to suppress unwanted spaces etc.
+%
+% \DescribeEnv{macrocode*} Instead of the \textsf{macrocode}
+% environment one can also use the \textsf{macrocode$*$} environment
+% which produces the same results except that spaces are printed as
+% \nopagebreak\verb*+ + characters.
+%
+%
+%
+% \subsection{Describing the usage of new macros}
+%
+% \DescribeMacro\DescribeMacro
+% When you describe a new macro you may use |\DescribeMacro| to
+% indicate that at this point the usage of a specific macro is
+% explained. It takes one argument which will be printed in the margin
+% and also produces a special index entry. For example, I used
+% |\DescribeMacro{\DescribeMacro}| to make clear that this is the
+% point where the usage of |\DescribeMacro| is explained.
+%
+% \DescribeMacro\DescribeEnv
+% An analogous macro |\DescribeEnv| should be used to indicate
+% that a \LaTeX{} environment is explained. It will produce a somewhat
+% different index entry. Below I used |\DescribeEnv{verbatim}|.
+%
+% \DescribeEnv{verbatim}
+% It is often a good idea to include examples of the usage of new macros
+% in the text. Because of the |%| sign in the first column of every
+% row, the \textsf{verbatim} environment is slightly altered to suppress
+% those
+% characters.\footnote{These macros were written by Rainer
+% Sch\"opf~\cite{art:verbatim}. He also
+% provided a new \textsf{verbatim} environment
+% which can be used inside of other macros.}
+% \DescribeEnv{verbatim*}
+% The \textsf{verbatim$*$} environment is changed in the same way.
+% \changes{v1.7a}{1992/02/26}{Documented \cs{verb} change.}
+% \DescribeMacro\verb
+% The "\verb" command is re-implemented to give an error report if a
+% newline appears in its argument.
+% The \textsf{verbatim} and \textsf{verbatim$*$} environments set text
+% in the style defined by "\MacroFont"~(\S\ref{sec:macrofont}).
+%
+%
+%
+% \subsection{Describing the definition of new macros}
+%
+% \DescribeEnv{macro}
+% To describe the definition of a new macro we use the \textsf{macro}
+% environment. It has one argument: the name of the new
+% macro.\footnote{This is a change to the style design I described in
+% ^^A \TUB ^^A removed in case ltugboat.sty not used
+% \textsl{TUGboat\/}\ 10\#1 (Jan.~89). We finally decided
+% that it would
+% be better to use the macro name {\em with\/} the
+% backslash as an argument.}
+% This argument is also used to print the name in the margin and to
+% produce an index entry.
+% Actually the index entries for usage and definition are different to
+% allow an easy reference.
+% This environment might be nested. In this case the
+% labels in the margin are placed under each other.
+% \changes{v1.7a}{1992/02/26}{Note on need for some text in macro env.}
+% There should be some text---even if it's just an empty
+% "\mbox{}"---in this environment before "\begin{macrocode}" or the
+% marginal label won't print in the right place.
+%
+% \DescribeMacro\MacrocodeTopsep
+% \DescribeMacro\MacroTopsep
+% There also exist four style parameters: |\MacrocodeTopsep| and
+% |\MacroTopsep| are used to control the vertical spacing above
+% and below the \textsf{macrocode} and the \textsf{macro}
+% \DescribeMacro\MacroIndent
+% environment, |\MacroIndent| is used to indent the lines of code
+% and
+% \DescribeMacro\MacroFont \label{sec:macrofont}
+% |\MacroFont| holds the font and a possible size change command
+% for the code lines, the "verbatim"["*"] environment and the macro
+% names printed in the margin. If you want
+% to change their default values in a
+% class file (like \texttt{ltugboat.cls}) use the |\DocstyleParms|
+% command described below. Starting with release 2.0a it can now
+% be changed directly as long as the redefinition happens before
+% the |\begin{document}|.
+%
+%
+%
+%
+% \subsection{Formatting the margins}
+%
+% \DescribeMacro\PrintDescribeMacro
+% \DescribeMacro\PrintDescribeEnv
+% \DescribeMacro\PrintMacroName
+% \DescribeMacro\PrintEnvName
+% As mentioned earlier, some macros and the \textsf{macro} environment
+% print their arguments in the margin. This is actually done by four
+% macros which are user
+% definable.\footnote{You may place the changed definitions in a
+% separate package
+% file or at the beginning of the documentation
+% file.
+% For example, if you don't like any names in the
+% margin
+% but want a fine index you can simply
+% \texttt{\bslash let}
+% these macros equal \texttt{\bslash @gobble}.
+% The doc package won't redefine any existing
+% definitions of these macros.}
+% They are named |\PrintDescribeMacro|, |\PrintDescribeEnv|,
+% |\PrintMacroName| (called by the \textsf{macro} environment) and
+% |\PrintEnvName| (called by the \textsf{environment} environment).
+%
+%
+% \subsection{Using a special escape character}
+%
+% \DescribeMacro\SpecialEscapechar
+% If one defines complicated macros it is sometimes necessary to
+% introduce a new escape character because the `|\|' has got a
+% special |\catcode|. In this case one can use
+% |\SpecialEscapechar| to indicate which character is actually
+% used to play the r\^ole of the `|\|'. A scheme like this is
+% needed because the \textsf{macrocode} environment and its counterpart
+% \textsf{macrocode$*$} produce an index entry for every occurrence of a
+% macro name. They would be very confused if you didn't tell them that
+% you'd changed |\catcode|$\,$s. The argument to
+% |\SpecialEscapechar| is a single-letter control sequence, that
+% is, one has to use "\|" for example to denote that `\verb+|+'
+% is used as an escape character. |\SpecialEscapechar| only
+% changes the behavior of the next \textsf{macrocode} or
+% \textsf{macrocode$*$} environment.
+%
+% The actual index entries created will all be printed with |\|
+% rather than \verb+|+, but this probably reflects their usage, if not
+% their definition, and anyway must be preferable to not having any
+% entry at all. The entries {\em could\/} be formatted appropriately,
+% but the effort is hardly worth it, and the resulting index might be
+% more confusing (it would certainly be longer!).
+%
+%
+% \subsection{Cross-referencing all macros used}
+%
+% \DescribeMacro\DisableCrossrefs \DescribeMacro\EnableCrossrefs As
+% already mentioned, every new macro name used within a
+% \textsf{macrocode} or \textsf{macrocode$*$} environment will produce
+% an index entry. In this way one can easily find out where a specific
+% macro is used. Since \TeX{} is considerably slower when it has to
+% produce such a bulk of index entries one can turn off this feature
+% by using |\DisableCrossrefs| in the driver file. To turn it on again
+% just use |\EnableCrossrefs|.\footnote{Actually, \texttt{\bslash
+% EnableCrossrefs} changes things more drastically; any following
+% \texttt{\bslash DisableCrossrefs} which might be present in the
+% source will be ignored.}
+%
+%
+% \DescribeMacro\DoNotIndex
+% But also finer control is provided. The |\DoNotIndex| macro
+% takes a list of macro names separated by commas. Those names won't
+% show up in the index. You might use several |\DoNotIndex|
+% commands: their lists will be concatenated. In this article I used
+% |\DoNotIndex| for
+% all macros which are already defined in \LaTeX.
+%
+% All three above declarations are local to the current group.
+%
+% Production (or not) of the index (via the "\makeindex" commend) is
+% controlled by using or omitting the following declarations in the
+% driver file preamble; if neither is used, no index is produced.
+% \DescribeMacro\PageIndex Using "\PageIndex" makes all index
+% entries refer to their page number; with
+% \DescribeMacro\CodelineIndex "\CodelineIndex", index entries
+% produced by "\DescribeMacro" and "\DescribeEnv" refer to page number
+% but those produced by the \textsf{macro} environment refer to the
+% code lines, which will be numbered automatically.\footnote{The line
+% number is actually that of the first line of the first
+% \textsf{macrocode} environment in the \textsf{macro} environment.}
+% \DescribeMacro\theCodelineNo
+% The style of this numbering can be controlled by defining the macro
+% "\theCodelineNo". Its default definition is to use scriptsize
+% arabic numerals; a user-supplied definition won't be overwritten.
+%
+% \DescribeMacro\CodelineNumbered
+% When you don't wish to get an index but want your code lines
+% numbered use "\CodelineNumbered" instead of "\CodelineIndex". This
+% prevents the generation of an unnecessary ".idx" file.
+%
+%
+% \subsection{Producing the actual index entries}
+%
+% Several of the aforementioned macros will produce some sort of index
+% entries. These entries have to be sorted by an external
+% program---the current implementation assumes that the
+% \textsf{makeindex} program by Chen~\cite{art:Chen} is used.
+%
+% But this isn't built in: one has only to redefine some of the
+% following macros to be able to use any other index program. All
+% macros which are installation
+% dependent are defined in such a way that they won't overwrite a
+% previous definition. Therefore it is safe to put the changed
+% versions in a package file which might be read in before the doc
+% package.
+%
+% To allow the user to change the specific characters recognized by
+% his or her index program all characters which have special meaning
+% in the \textsf{makeindex} program are given symbolic
+% names.\footnote{I don't know if there exists a program which needs
+% more command characters, but I hope not.}
+% However, all characters used should be of |\catcode| other than
+% `letter' (11).
+%
+% \DescribeMacro{\actualchar}
+% The |\actualchar| is used to separate the `key' and the actual
+% index entry.
+% \DescribeMacro{\quotechar}
+% The |\quotechar| is used before a special index program
+% character to suppress its special meaning.
+% \DescribeMacro{\encapchar}
+% The |\encapchar| separates the indexing information from a
+% letter string which \textsf{makeindex} uses as a \TeX{} command to
+% format the page number associated with a special entry. It is used
+% in this package to apply the |\main| and the |\usage|
+% commands.
+% \DescribeMacro{\levelchar}
+% Additionally |\levelchar| is used to separate `item',
+% `subitem' and `subsubitem' entries.
+%
+% It is a good idea to stick to these symbolic names even if you know
+% which index program is used. In this way your files will be
+% portable.
+%
+% \DescribeMacro\SpecialMainIndex
+% \DescribeMacro\SpecialMainEnvIndex
+% To produce a main index entry for a macro the
+% |\SpecialMainIndex| macro\footnote{This macro is called by the
+% \textsf{macro} environment.} may be used. It is called `special'
+% because it has to print its argument verbatim.
+% A similar macro, called |\SpecialMainEnvIndex| is used for indexing
+% the main definition point of an
+% environment.\footnote{This macro is called by the
+% \textsf{environment} environment.}
+% \DescribeMacro\SpecialIndex
+% If you want a normal index entry for a macro name
+% |\SpecialIndex| might be used.\footnote{This macro is called
+% within the \textsf{macrocode} environment when encountering a macro
+% name.}
+% \DescribeMacro\SpecialUsageIndex
+% \DescribeMacro\SpecialEnvIndex
+% To index the usage of a macro or an environment
+% |\SpecialUsageIndex| and |\SpecialEnvIndex| may be used.
+% \DescribeMacro\SortIndex
+% Additionally a |\SortIndex| command is provided. It takes two
+% arguments---the sort key and the actual index entry.
+%
+% All these macros are normally used by other macros; you will need
+% them only in an emergency.
+%
+% \DescribeMacro\verbatimchar
+% But there is one characteristic worth mentioning: all macro names in
+% the index are typeset with the |\verb*| command. Therefore one
+% special character is needed to act as a delimiter for this command.
+% To allow a change in this respect, again this character is
+% referenced indirectly, by the macro |\verbatimchar|. It expands
+% by default to \verb?+? but if your code lines contain macros with
+% `\texttt{+}' characters in their names (e.g.\ when you use \verb?\+?)
+% you will end up with an index entry containing \verb?\verb+\++?
+% which will be typeset as `\verb+\++' and not as `\verb?\+?'. In this
+% case you should redefine |\verbatimchar| globally or locally to
+% overcome this problem.
+%
+% \DescribeMacro\*
+% We also provide a |\*| macro. This is intended to be used for
+% index entries like
+% \begin{quote}
+% index entries \\
+% \hspace*{30pt} Special macros for \*
+% \end{quote}
+% Such an entry might be produced with the line:
+%\begin{verbatim}
+% \index{index entries\levelchar Special macros for \*}
+%\end{verbatim}
+%
+% \DescribeMacro\OldMakeindex
+% Versions of \textsf{makeindex} prior to 2.9 had some bugs affecting
+% \DOC{}. One of these,
+% pertaining to the "%" character doesn't have a work-around
+% appropriate for versions with and without the
+% bug.\label{makeindex:version} If
+% you have an old version, invoke "\OldMakeindex" in a
+% package file or the driver file to prevent problems with index entries
+% such as "\%", although you'll probably normally want to turn off
+% indexing of "\%" anyway. Try to get an up-to-date \textsf{makeindex}
+% from one of the \TeX{} repositories.
+%
+%
+% \subsection{Setting the index entries}
+%
+% \changes{v1.7a}{1992/03/11}{Usage note on gind.ist.} After the first
+% formatting pass through the \texttt{.dtx} file you need to sort the
+% index entries written to the \texttt{.idx} file using
+% \textsf{makeindex} or your favourite alternative. You need a
+% suitable style file for \textsf{makeindex} (specified by the
+% \texttt{-s} switch). A suitable one is supplied with \DOC{},
+% called \texttt{gind.ist}.
+%
+% \DescribeMacro\PrintIndex
+% To read in and print the sorted index, just put the
+% |\PrintIndex| command as the last (commented-out, and thus
+% executed during the documentation pass through the file) command
+% in your package file. Precede it by any bibliography commands
+% necessary for your citations.
+% Alternatively, it may be more convenient to put all such calls
+% amongst the arguments of the |\StopEventually| macro, in
+% which case a |\Finale| command should appear at the end of
+% your file.
+%
+% \DescribeEnv{theindex}
+% Contrary to standard \LaTeX, the index is typeset in three columns
+% by default. This is controlled by the \LaTeX{} counter
+% `\textsf{IndexColumns}' and can therefore be changed with a
+% |\setcounter| declaration. Additionally one doesn't want to
+% start a new page unnecessarily. Therefore the \textsf{theindex}
+% environment is redefined.
+% \DescribeMacro\IndexMin
+% When the \textsf{theindex} environment starts it will measure how much
+% space is left on the current page. If this is more than
+% |\IndexMin| then the index will start on this page. Otherwise
+% |\newpage| is called.
+%
+% Then a short introduction about the meaning of several index entries
+% is typeset (still in onecolumn mode). Afterwards the actual index
+% entries follow in multi-column mode.
+% \DescribeMacro\IndexPrologue
+% You can change this prologue with the help of the
+% |\IndexPrologue| macro. Actually the section heading is also
+% produced in this way, so you'd better write something like:
+% \begin{verbatim}
+% \IndexPrologue{\section*{Index} The index entries underlined ...}
+%\end{verbatim}
+% When the \textsf{theindex} environment is finished the last page will
+% be reformatted to produce balanced columns. This improves the layout
+% and allows the next article to start on the same page.
+% \DescribeMacro\IndexParms
+% Formatting of the index columns (values for |\columnssep|
+% etc.)\ is controlled by the |\IndexParms| macro. It assigns the
+% following values:
+% \SpecialUsageIndex{\parindent}\SpecialUsageIndex{\columnsep}^^A
+% \SpecialUsageIndex{\parskip}\SpecialUsageIndex{\rightskip}^^A
+% \SpecialUsageIndex{\mathsurround}\SpecialUsageIndex{\parfillskip}
+% \begin{center}
+% \begin{tabular}{l@{\,=\,}ll@{\,=\,}l}
+% |\parindent| & \IndexParms \the\parindent &
+% |\columnsep| & \IndexParms \the\columnsep \\
+% |\parskip| & \IndexParms \the\parskip &
+% |\rightskip| & \IndexParms
+% \expandafter\dimenvalue\the\rightskip \\
+% |\mathsurround| & \IndexParms \the\mathsurround &
+% |\parfillskip| & \IndexParms
+% \expandafter\dimenvalue\the\parfillskip
+% \end{tabular}
+% \end{center}
+% \DescribeMacro{\@idxitem}
+% Additionally it defines |\@idxitem| (which will be used when an
+% |\item| command is encountered) and selects |\small| size.
+% If you want to change any of these values you have to define them
+% all.
+%
+% \DescribeMacro\main
+% \DescribeMacro\usage
+% The page numbers for main index entries are encapsulated by the
+% |\main| macro (underlining its argument) and the numbers
+% denoting the description are encapsulated by the |\usage| macro
+% (which produces {\em italics}). As usual these commands are user
+% definable.
+%
+%
+% \subsection{Changing the default values of style parameters}
+%
+% \DescribeMacro\DocstyleParms If you want to overwrite some default
+% settings made by the \DOC{} package, you can either put your
+% declarations in the driver file (that is after \texttt{doc.sty} is
+% read in) or use a separate package file for doing this work. In the
+% latter case you can define the macro |\DocstyleParms| to contain all
+% assignments. This indirect approach is necessary if your package file
+% might be read before the \texttt{doc.sty}, when some of the
+% registers are not allocated. Its default definition is null.
+%
+% The doc package currently assigns values to the following
+% registers:
+% \SpecialUsageIndex{\IndexMin}\SpecialUsageIndex{\MacrocodeTopsep}^^A
+% \SpecialUsageIndex{\MacroTopsep}^^A
+% \SpecialUsageIndex{\MacroIndent}\SpecialUsageIndex{\marginparpush}^^A
+% \SpecialUsageIndex{\marginparwidth}\SpecialUsageIndex{\tolerance}
+% \begin{center}
+% \begin{tabular}{l@{\,=\,}ll@{\,=\,}l}
+% |\IndexMin| & \the\IndexMin &
+% |\MacroTopsep| & \the\MacroTopsep \\
+% |\marginparwidth|& \the\marginparwidth &
+% |\MacroIndent| & \the\MacroIndent \\
+% |\marginparpush| & \the\marginparpush &
+% |\MacrocodeTopsep| & \the\MacrocodeTopsep \\
+% |\tolerance| & \the\tolerance
+% \end{tabular}
+% \end{center}
+%
+%
+% \subsection{Short input of verbatim text pieces}
+%
+% \DescribeMacro\MakeShortVerb
+% \DescribeMacro{\MakeShortVerb*} \DescribeMacro\DeleteShortVerb It is
+% awkward to have to type, say, "\verb|"\ldots"|" continually when
+% quoting
+% verbatim bits (like macro names) in the text, so an abbreviation
+% mechanism is provided. Pick a character \meta{c}---one which
+% normally has catcode `other' unless you have very good reason not
+% to---which you don't envisage using in the text, or not using often.
+% (I like |"|, but you may prefer "|" if you have |"| active to do
+% umlauts, for instance.) Then if you say
+% "\MakeShortVerb{\"\meta{c}"}" you can subsequently use
+% \meta{c}\meta{text}\meta{c} as the equivalent of
+% "\verb"\meta{c}\meta{text}\meta{c}; analogously, the "*"-form
+% "\MakeShortVerb*{\"\meta{c}"}" gives you the equivalent of
+% "\verb*"\meta{c}\meta{text}\meta{c}. Use
+% "\DeleteShortVerb{\"\meta{c}"}" if you subsequently want \meta{c} to
+% revert to its previous meaning---you can always turn it on again
+% after the unusual section. The `short verb' commands make global
+% changes. The abbreviated "\verb" may not appear in the argument of
+% another command just like "\verb". However the `short verb'
+% character may be used freely in the \textsf{verbatim} and
+% \textsf{macrocode} environments without ill effect.
+% "\DeleteShortVerb" is silently ignored if its argument does not
+% currently represent a short verb character. Both commands type a
+% message to tell you the meaning of the character is being changed.
+%
+% Please remember that the command "\verb" cannot be used in arguments
+% of other commands. Therefore abbreviation characters for "\verb"
+% cannot be used there either.
+%
+% This feature is also available as a sole package, \texttt{shortvrb}.
+%
+%
+% \subsection{Additional bells and whistles}
+%
+% We provide macros for logos such as \Web, \AmSTeX, \BibTeX,
+% \SliTeX{} and \PlainTeX. Just type |\Web|, |\AmSTeX|,
+% |\BibTeX|, |\SliTeX| or |\PlainTeX|, respectively.
+% \LaTeX{} and \TeX{} are already defined in \texttt{latex.tex}.
+%
+% \DescribeMacro\meta
+% Another useful macro is |\meta| which has one argument and
+% produces something like \meta{dimen parameter}.
+%
+% \DescribeMacro\OnlyDescription
+% \DescribeMacro\StopEventually
+% You can use the |\OnlyDescription| declaration in the driver
+% file to suppress the last part of your document (which presumably
+% exhibits the code). To make this work
+% you have to place the command |\StopEventually| at a suitable
+% point in your file. This macro has one argument in which you put
+% all information you want to see printed if your document ends at
+% this point (for example a bibliography which is normally printed at
+% the very end). When the |\OnlyDescription| declaration is
+% missing the |\StopEventually|
+% \DescribeMacro\Finale
+% macro saves its argument in a macro called |\Finale| which can
+% afterwards be used to get things back (usually at the very end).
+% Such a scheme makes changes in two places unnecessary.
+%
+% Thus you can use this feature to produce a local guide for the
+% \TeX{} users which describes only the usage of macros (most of them
+% won't be interested in your definitions anyway). For the same
+% reason the |\maketitle| \DescribeMacro\maketitle command is slightly
+% changed to allow multiple titles in one document. So you can make
+% one driver file reading in several articles at once.
+% \DescribeMacro{\ps@titlepage} To avoid an unwanted
+% \textsf{pagestyle} on the title page the |\maketitle| command issues
+% a |\thispagestyle{titlepage}| declaration which produces a
+% \textsf{plain} page if the \textsf{titlepage} page style is
+% undefined. This allows class files like \textsf{ltugboat.cls} to
+% define their own page styles for title pages.
+%
+% \DescribeMacro\AlsoImplementation
+% Typesetting the whole document is the default. However, this default
+% can also be explicitly selected using the declaration
+% |\AlsoImplementation|. This overwrites any previous
+% |\OnlyDescription| declaration. The \LaTeXe{} distribution, for
+% example, is documented using the \texttt{ltxdoc} class which allows
+% for a configuration file \texttt{ltxdoc.cfg}. In such a file one
+% could then add the statement
+% \begin{quote}
+% |\AtBeginDocument{\AlsoImplementation}|
+% \end{quote}
+% to make sure that all documents will show the code part.
+%
+% \DescribeMacro\IndexInput \label{..Input} Last but not least I
+% defined an |\IndexInput| macro which takes a file name as an
+% argument and produces a verbatim listing of the file, indexing every
+% command as it goes along. This might be handy, if you want to learn
+% something about macros without enough documentation. I used this
+% feature to cross-reference \texttt{latex.tex} getting a verbatim
+% copy with about 15 pages index.\footnote{It took quite a long time
+% and the resulting \texttt{.idx} file was longer than the
+% \texttt{.dvi} file. Actually too long to be handled by the
+% \textsf{makeindex} program directly (on our MicroVAX) but the final
+% result was worth the trouble.}
+%
+% \changes{v2.1d}{2006/02/02}{Corrected description of \cs{changes}
+% macro.}
+% \DescribeMacro\changes
+% To maintain a change history within the file, the |\changes|
+% command may be placed amongst the description part of the changed
+% code. It takes three arguments, thus:
+% \begin{quote}
+% |\changes{|\meta{version}|}{|\meta{date}|}{|^^A
+% \meta{text}|}|
+% \end{quote}
+% The changes may be used to produce an auxiliary file (\LaTeX's
+% |\glossary| mechanism is used for this) which may be printed
+% after suitable formatting. The |\changes| macro generates the
+% printed entry in such a change history; because old
+% versions\footnote{Before 2.6.} of the \textsf{makeindex}
+% program limit such fields to 64 characters, care should be taken
+% not to exceed this limit when describing the change. The actual
+% entry consists of the \meta{version}, the |\actualchar|, the current
+% macro name, a colon, the |\levelchar|, and, finally, the \meta{text}.
+% The result is a glossaryentry for the \meta{version}, with the name of
+% the current macro as subitem. Outside the |macro| environment, the
+% text |\generalname| is used instead of the macro name. When
+% referring to macros in change descriptions it is conventional to use
+% |\cs{|\meta{macroname}|}| rather than attempting to format it properly
+% and using up valuable characters in the entry with old \textsf{makeindex}
+% versions.
+%
+% \changes{v1.7a}{1992/02/26}{Description of \cs{RecordChanges} etc.
+% added
+% to interface section.} \DescribeMacro\RecordChanges To cause the
+% change information to be written out, include "\RecordChanges" in
+% the driver file. \DescribeMacro\PrintChanges To read in and print
+% the sorted change history (in two columns), just put the
+% |\PrintChanges| command as the last (commented-out, and thus
+% executed during the documentation pass through the file) command in
+% your package file. Alternatively, this command may form one of the
+% arguments of the |\StopEventually| command, although a change
+% history is probably {\em not\/} required if only the description is
+% being printed. The command assumes that \textsf{makeindex} or some
+% other program has processed the \texttt{.glo} file to generate a
+% sorted \texttt{.gls} file. You need a special \textsf{makeindex}
+% style file; a suitable one is supplied with \DOC{}, called
+% \texttt{gglo.ist}. \DescribeMacro\GlossaryMin
+% \DescribeMacro\GlossaryPrologue \DescribeMacro\GlossaryParms The
+% "\GlossaryMin", "\GlossaryPrologue" and "\GlossaryParms" macros are
+% analogous to the "\Index"\ldots\ versions. (The \LaTeX{} `glossary'
+% mechanism is used for the change entries.)
+%
+% \label{sec:checksum}
+% \DescribeMacro\CharacterTable
+% \DescribeMacro\CheckSum
+% To overcome some of the problems of sending files over the networks
+% we developed two macros which should detect corrupted files. If one
+% places the lines
+% \begin{flushleft}
+% \small\ttfamily ^^A \ttfamily to get the blanks between "..."s
+% ^^A right
+%"%%\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"\\
+%"%% Lower-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"\\
+%"%% Digits \0\1\2\3\4\5\6\7\8\9"\\
+%"%% Exclamation \! Double quote "\verb=\"=
+%" Hash (number) \#"\\
+%"%% Dollar \$ Percent \% Ampersand \&"\\
+%"%% Acute accent \' Left paren \( Right paren \)"\\
+%"%% Asterisk \* Plus \+ Comma \,"\\
+%"%% Minus \- Point \. Solidus \/"\\
+%"%% Colon \: Semicolon \; Less than \<"\\
+%"%% Equals \= Greater than \> Question mark \?"\\
+%"%% Commercial at \@ Left bracket \[ Backslash \\"\\
+%"%% Right bracket \] Circumflex \^ Underscore \_"\\
+%"%% Grave accent \` Left brace \{ Vertical bar \|"\\
+%"%% Right brace \} Tilde \~}"\\
+%"%%"
+%\end{flushleft}
+% at the beginning of the file then character translation failures
+% will be detected, provided of course, that the used \DOC{}
+% package has a correct default table. The percent
+% signs\footnote{There are two percent signs in each line. This has
+% the effect that these lines are not removed by the
+% \texttt{docstrip.tex} program.} at the beginning of the lines should
+% be typed in, since only the \DOC{} package should look at this
+% command.
+%
+%
+% Another problem of mailing files is possible truncation. To detect
+% these sort of errors we provide a |\CheckSum| macro. The check-sum
+% of a file is simply the number of backslashes in the code, i.e.\ all
+% lines between the \textsf{macrocode} environments. But don't be
+% afraid: you don't have count the code-lines yourself; this is done
+% by the \DOC{} package for you. You simply have add
+% \begin{quote}
+% |% \CheckSum{0}|
+% \end{quote}
+% near the beginning of the file and
+% use
+% the |\StopEventually| (which starts looking for backslashes) and the
+% |\Finale| command. The latter will inform you either that your file
+% has no check-sum (telling you the right number) or that your number
+% is incorrect if you put in anything other than zero but guessed wrong (this time
+% telling you both the correct and the
+% incorrect one). Then you go to the top of your file again and change the
+% line to the right number, i.e.
+% line
+% \begin{quote}
+% |% \CheckSum{|\meta{number}|}|
+% \end{quote}
+% and that's all.
+%
+% While |\CharacterTable| and |\CheckSum| have been important features
+% in the early days of the public internet when \DOC{} was written as
+% the mail gateways back then were rather unreliable and often mangled
+% files they are these days more a nuisance than any help. They are
+% therefore now fully optional and no longer recommended for use with new files.
+%
+%
+% \DescribeMacro\bslash
+% From time to time, it is necessary to print a |\| without
+% being able to use the |\verb| command because the
+% |\catcode|$\,$s of the symbols are already firmly
+% established. In this instance we can use the command
+% |\bslash| presupposing, of course, that the actual font in
+% use at this point contains a `backslash' as a symbol. Note that
+% this definition of |\bslash| is expandable; it inserts a
+% $"\"_{12}$. This means that you have to |\protect|
+% it if it is used in `moving arguments'.
+%
+% \DescribeMacro\MakePrivateLetters
+% \changes{v1.7a}{1992/02/26}{Documented \cs{MakePrivateLetters} in
+% interface section}^^A
+% If your macros "\catcode" anything other than "@" to `letter', you
+% should redefine "\MakePrivateLetters" so that it also makes the
+% relevant characters `letters' for the benefit of the indexing. The
+% default definition is just "\makeatletter".
+%
+% \DescribeMacro\DontCheckModules \DescribeMacro\CheckModules
+% \DescribeMacro\Module \DescribeMacro\AltMacroFont The `module'
+% directives of the \textsf{docstrip} system \cite{art:docstrip} are
+% normally recognised and invoke special formatting. This can be
+% turned on and off in the \texttt{.dtx} file or the driver file using
+% "\CheckModules" and "\DontCheckModules". If checking for module
+% directives is on (the default) then code in the scope of the
+% directives is set as determined by the hook "\AltMacroFont", which
+% gives {\small\ttfamily\itshape small italic type\-writer\/} by
+% default in the New Font Selection Scheme but just ordinary
+% {\small\ttfamily small type\-writer} in the old one, where a font
+% such as italic typewriter can't be used portably (plug for NFSS);
+% you will need to override this if you don't have the italic
+% typewriter font available. Code is in such a scope if it's on a
+% line beginning with "%<" or is between lines starting with
+% "%<*"\meta{name list}">" and "%</"\meta{name list}">". The
+% directive is formatted by the macro "\Module" whose single argument
+% is the text of the directive between, but not including, the angle
+% brackets; this macro may be re-defined in the driver or package file
+% and by default produces results like \Module{+foo\string|bar} with no
+% following space.
+%
+% \DescribeMacro{StandardModuleDepth} Sometimes (as in this file) the
+% whole code is surrounded by modules to produce several files from a
+% single source. In this case it is clearly not appropriate to format
+% all code lines in a special "\AltMacroFont". For this reason a
+% counter "StandardModuleDepth" is provided which defines the level of
+% module nesting which is still supposed to be formatted in
+% "\MacroFont" rather then "\AltMacroFont". The default setting is
+% "0", for this documentation it was set to
+%\begin{verbatim}
+% \setcounter{StandardModuleDepth}{1}
+%\end{verbatim}
+% at the beginning of the file.
+%
+%
+% \subsection{Basic usage summary}
+% \changes{v1.7a}{1992/03/11}{Added basic usage summary to spell
+% it out.}
+%
+% To sum up, the basic structure of a \texttt{.dtx} file without any
+% refinements is like this:
+% \begin{verse}\small
+% "% "\meta{waffle}\ldots\\
+% \quad\ldots \\
+% "% \DescribeMacro{\fred}"\\
+% "% "\meta{description of fred's use}\\
+% \quad\ldots\\
+% "% \StopEventually{"\meta{finale code}"}"\\
+% \quad\ldots\\
+% "% \begin{macro}{\fred}"\\
+% "% "\meta{commentary on macro fred}\\
+% \verb*+% \begin{macrocode}+\\
+% \meta{code for macro fred}\\
+% \verb*+% \end{macrocode}+\\
+% "% \end{macro}"\\
+% \quad\ldots\\
+% "% \Finale \PrintIndex \PrintChanges"
+% \end{verse}
+% For examples of the use of most---if not all---of the features
+% described above consult the \texttt{doc.dtx} source itself.
+%
+% \subsection{Acknowledgements}
+%
+% I would like to thank all folks at Mainz and at the Royal Military
+% College of Science for their help in this project. Especially Brian
+% and Rainer who pushed everything with their suggestions, bug fixes,
+% etc.
+%
+% A big thank you to David Love who brought the documentation
+% up-to-date again, after I neglected this file for more than two
+% years. This was most certainly a tough job as many features added to
+% \texttt{doc.dtx} after its publication in \textsl{TUGboat\/} have
+% been never properly described. Beside this splendid work he kindly
+% provided additional code (like ``docstrip'' module formatting) which
+% I think every \textsf{doc.dtx} user will be grateful for.
+%
+%
+% \StopEventually{
+% \begin{thebibliography}{1}
+% \bibitem{book:Buerger} \textsc{G. A. B\"urger}.
+% \newblock Wunderbare Reisen zu Wasser und zu Lande, Feldz\"uge
+% und lustige Abenteuer des Freyherrn v.\ M\"unchhausen.
+% \newblock London, 1786 \& 1788.
+% \bibitem{art:Knuthliterat} \textsc{D. E. Knuth}.
+% \newblock Literate Programming.
+% \newblock Computer Journal, Vol.~27, \textit{pp}.~97--111,
+% May 1984.
+% \bibitem{book:KnuthA} \textsc{D. E. Knuth}.
+% \newblock Computers \& Typesetting (The \TeX book).
+% \newblock Addison-Wesley, Vol. A, 1986.
+% \bibitem{art:Chen} \textsc{L. Lamport}.
+% \newblock MakeIndex: An Index Processor for \LaTeX.
+% \newblock 17 February 1987.
+% \newblock (Taken from the file \texttt{makeindex.tex} provided
+% with
+% the program source code.)
+% \bibitem{art:doc} \textsc{Frank Mittelbach}.
+% \newblock The \DOC{}-option.
+% \newblock \textsl{TUGboat}, Vol.~10(2), \textit{pp}.~245--273,
+% July 1989.
+% \bibitem{art:docstrip} \textsc{Frank Mittelbach, Denys Duchier and
+% Johannes Braams}.
+% \newblock \texttt{docstrip.dtx} (to appear).
+% \newblock The file is part of the DOC package.
+% \bibitem{book:Raspe} \textsc{R. E. Raspe} (*1737, \dag 1797).
+% \newblock Baron M\"unchhausens narrative of his marvellous
+% travels and campaigns in Russia.
+% \newblock Oxford, 1785.
+% \bibitem{art:verbatim} \textsc{Rainer Sch\"opf}.
+% \newblock A New Implementation of \LaTeX's \texttt{verbatim} and
+% \texttt{verbatim*} Environments.
+% \newblock File \texttt{verbatim.doc}, version 1.4i.
+% \end{thebibliography}
+%
+% \ifmulticols
+% \addtocontents{toc}{\protect\end{multicols}}
+% \fi
+%
+% } ^^A end \StopEventually
+%
+%
+% \section{The Description of Macros}
+%
+% Most of the following code is destined for \texttt{doc.sty} after
+% processing with \texttt{docstrip} to include the module
+% \textbf{style} indicated here. (All code in this file not
+% appropriate to \texttt{doc.sty} has to be included explicitly by
+% docstrip so that this \texttt{.dtx} file can be used as directly as
+% a package file rather than the stripped version.) The usual font
+% change for the conditionally-included lines between the
+% \Module{*style} and \Module{/style} directives is suppressed since
+% only the lines with an explicit directive are special in this file.
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Under \LaTeXe{} the test to avoid reading
+% \DOC{} in twice is normally unnecessary. It was kept to only to
+% stay compatible with \LaTeX209 styles that |\input| \DOC{}
+% directly.
+% \changes{v1.5i}{1989/06/07}{Avoid reading the file twice.}
+% \begin{macrocode}
+\@ifundefined{macro@cnt}{}{\endinput}
+% \end{macrocode}
+%
+% \DescribeMacro\fileversion
+% \DescribeMacro\filedate
+% \DescribeMacro\docdate
+% As you can see I used macros like |\fileversion| to denote the
+% version number and the date. They are defined at the very beginning
+% of the package file (without a surrounding \textsf{macrocode}
+% environment), so I don't have to search for this place here when I
+% change the version number. You can see their actual outcome in a
+% footnote to the title.
+%
+%
+% The first thing that we do next is to get ourselves a new comment
+% sign. Because all sensible signs are already occupied, we will
+% choose one that can only be entered indirectly:
+% {\DoNotIndex{\^}^^A avoid misinterpretation !!!!! VERIFY
+% \begin{macrocode}
+\catcode`\^^A=14
+% \end{macrocode}
+% We repeat this statement at the beginning of the document in case
+% the \texttt{inputenc} package is used disabling it again.
+% \changes{v2.0b}{1998/05/19}{Init docs private comment char at begin
+% of document again (pr2581)}
+% \begin{macrocode}
+\AtBeginDocument{\catcode`\^^A=14\relax}
+% \end{macrocode}
+% \SortIndex{\string^\string^A}{\string\verb\verbatimchar
+% \string^\string^A\verbatimchar
+% \encapchar main}
+% }
+%
+%
+% \subsection{Options supported by \DOC{}}
+%
+% Not options available at the moment
+%
+% \begin{macrocode}
+% \end{macrocode}
+%
+%
+% \subsection{Macros surrounding the `definition parts'}
+%
+% \begin{environment}{macrocode}
+% Parts of the macro definition will be surrounded by the
+% environment \textsf{macrocode}. Put more precisely, they will be
+% enclosed by a macro whose argument (the text to be set
+% `verbatim') is terminated by the string
+% \verb*+% \end{macrocode}+. Carefully note the number of spaces.
+% |\macrocode| is defined completely analogously to
+% |\verbatim|, but because a few small changes were carried
+% out, almost all internal macros have got new names. We start by
+% calling the macro |\macro@code|, the macro which bears the
+% brunt of most of the work, such as |\catcode| reassignments,
+% etc.
+% \changes{v1.5r}{1989/11/04}{Support for code line no. (Undoc)}
+% \begin{macrocode}
+\def\macrocode{\macro@code
+% \end{macrocode}
+% Then we take care that all spaces have the same width, and that
+% they are not discarded.
+% \begin{macrocode}
+ \frenchspacing \@vobeyspaces
+% \end{macrocode}
+% Before closing, we need to call |\xmacro@code|. It is this
+% macro that expects an argument which is terminated by the above
+% string. This way it is possible to keep the |\catcode|
+% changes local.
+% \changes{v1.5r}{1989/11/04}{Support for code line no. (Undoc)}
+% \changes{v1.5t}{1989/11/07}{Common code moved to \cs{macro@code}.}
+% \begin{macrocode}
+ \xmacro@code}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{macro}{\macro@code}
+% We will now begin with the macro that does the actual work:
+% \begin{macrocode}
+\def\macro@code{%
+% \end{macrocode}
+% In theory it should consist of a \textsf{trivlist} environment, but
+% the empty space before and after the environment should not be
+% too large.
+% \begin{macrocode}
+ \topsep \MacrocodeTopsep
+% \end{macrocode}
+% The next parameter we set is |\@beginparpenalty|, in order
+% to prevent a page break before such an environment.
+% \begin{macrocode}
+ \@beginparpenalty \predisplaypenalty
+% \end{macrocode}
+% We then start a |\trivlist|, set |\parskip| back to
+% zero and start an empty |\item|.
+% \changes{v1.9b}{1993/12/03}{Forcing any label from macro env.}
+% \begin{macrocode}
+ \if@inlabel\leavevmode\fi
+ \trivlist \parskip \z@ \item[]%
+% \end{macrocode}
+% Additionally, everything should be set in \texttt{typewriter} font.
+% Some people might prefer it somewhat differently; because of this
+% the font choice is
+% macro-driven.\footnote{The font change has to be placed
+% {\em after\/}
+% the \texttt{\bslash item}. Otherwise a change to
+% \texttt{\bslash baselineskip} will affect the
+% paragraph above.}
+% \begin{macrocode}
+ \macro@font
+% \end{macrocode}
+% Because |\item| sets various parameters, we have found it
+% necessary to alter some of these retrospectively.
+% \begin{macrocode}
+ \leftskip\@totalleftmargin \advance\leftskip\MacroIndent
+ \rightskip\z@ \parindent\z@ \parfillskip\@flushglue
+% \end{macrocode}
+% The next line consists of the \LaTeX{} definition of |\par|
+% used in |\verbatim| and should result in blank lines being
+% shown as blank lines.
+% \changes{v1.5l}{1989/09/10}{Code line numbers supported.}
+% \changes{v1.5t}{1989/11/07}{Call \cs{leavevmode} to get \cs{everypar}
+% on blank lines.}
+% \changes{v1.7c}{1992/03/24}{Added \cs{interlinepenalty} to
+% \cs{par} from
+% verbatim.sty}
+% \begin{macrocode}
+ \blank@linefalse \def\par{\ifblank@line
+ \leavevmode\fi
+ \blank@linetrue\@@par
+ \penalty\interlinepenalty}
+% \end{macrocode}
+% What use is this definition of |\par|\,? We use the macro
+% |\obeylines| of \cite{book:KnuthA} which changes all |^^M|
+% to |\par| so that each can control its own indentation.
+% Next we must also ensure that all special signs are normalized;
+% that is, they must be given |\catcode| $12$.
+% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX verbatim,
+% which handles more ligatures.}
+% \begin{macrocode}
+ \obeylines
+ \let\do\do@noligs \verbatim@nolig@list
+ \let\do\@makeother \dospecials
+% \end{macrocode}
+% \changes{v1.5t}{1989/11/07}{Common code added.}
+% \changes{v1.5w}{1990/02/05}{Skip of \cs{@totalleftmargin} added.} If
+% indexing by code lines is switched on the line number is incremented
+% and set appropriately. We also check whether the start of the next
+% line indicates a \texttt{docstrip} module directive and process it
+% appropriately if so using "\check@module".
+% \begin{macrocode}
+ \global\@newlistfalse
+ \global\@minipagefalse
+ \ifcodeline@index
+ \everypar{\global\advance\c@CodelineNo\@ne
+ \llap{\theCodelineNo\ \hskip\@totalleftmargin}%
+ \check@module}%
+ \else \everypar{\check@module}%
+ \fi
+% \end{macrocode}
+% We also initialize the cross-referencing feature by calling
+% |\init@crossref|. This will start the scanning mechanism
+% when encountering an escape character.
+% \begin{macrocode}
+ \init@crossref}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ifblank@line}
+% \begin{macro}{\blank@linetrue}
+% \begin{macro}{\blank@linefalse}
+% |\ifblank@line| is the switch used in the definition above.
+% In the original \textsf{verbatim} environment the |\if@tempswa|
+% switch is used. This is dangerous because its value may change
+% while processing lines in the \textsf{macrocode} environment.
+% \begin{macrocode}
+\newif\ifblank@line
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\endmacrocode}
+% Because we have begun a \textsf{trivlist} environment in the
+% \textsf{macrocode} environment, we must also end it. We must
+% also act on the value of the "pm@module" flag (see below) and
+% empty "\everypar".
+% \changes{v1.5r}{1989/11/04}{Support for code line no. (Undoc)}
+% \begin{macrocode}
+\def\endmacrocode{%
+ \ifpm@module \endgroup \pm@modulefalse \fi
+ \everypar{}%
+ \global\@inlabelfalse
+ \endtrivlist
+% \end{macrocode}
+% Additionally |\close@crossref| is used to do anything needed
+% to end the cross-referencing mechanism.
+% \begin{macrocode}
+ \close@crossref}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\MacroFont}
+% Here is the default definition for the |\MacroFont| macro.
+% With the new math font handling in NFSS2 it isn't any longer
+% correct to suppress the math font setup since this is now handled
+% differently. But to keep the font change fast we use only a
+% single |\selectfont| (in |\small|) and do the rest by hand.
+% \changes{v1.5x}{1990/02/17}{\cs{math@fontsfalse} added for NFSS.}
+% \changes{v1.7a}{1992/03/13}{Added \cs{reset@font} for NFSS.}
+% \changes{v1.8c}{1993/10/25}{NFSS standard}
+% \changes{v1.9t}{1995/05/26}{Removed \cs{math@fontsfalse} (different
+% math setup /pr1622}
+% \begin{macrocode}
+\@ifundefined{MacroFont}{%
+ \if@compatibility
+% \end{macrocode}
+% Despite the above statement we will call |\small| first if
+% somebody is using a \LaTeX2.09 document with doc. I wouldn't have
+% bothered since doc-sources should be up-to-date but since the
+% request came from someone called David Carlisle \ldots :-)
+% \changes{v1.9y}{1996/01/26}{Support compat mode}
+% \begin{macrocode}
+ \def\MacroFont{\small
+ \usefont\encodingdefault
+ \ttdefault
+ \mddefault
+ \updefault
+ }%
+ \else
+ \def\MacroFont{\fontencoding\encodingdefault
+ \fontfamily\ttdefault
+ \fontseries\mddefault
+ \fontshape\updefault
+ \small}%
+ \fi
+ }{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AltMacroFont}
+% \begin{macro}{\macro@font}
+% \changes{v1.7a}{1992/03/12}{Added to support distinction of modules.}
+% \changes{v1.7c}{1992/03/26}{Altered font change for OFSS.}
+% \changes{v1.7m}{1992/10/11}{Use sltt as default.}
+% \changes{v1.8c}{1993/10/25}{NFSS standard}
+% \changes{v1.9t}{1995/05/26}{Removed \cs{math@fontsfalse} (different
+% math setup /pr1622}
+% Although most of the macro code is set in "\MacroFont" we want to be
+% able to switch to indicate module code set in "\AltMacroFont".
+% "\macro@font" keeps track of which one we're using. We can't do the
+% same thing sensibly in OFSS as in NFSS.
+% \begin{macrocode}
+\@ifundefined{AltMacroFont}{%
+ \if@compatibility
+% \end{macrocode}
+% Again have |\small| first if we are in compat mode.
+% \changes{v1.9y}{1996/01/26}{Support compat mode}
+% \begin{macrocode}
+ \def\AltMacroFont{\small
+ \usefont\encodingdefault
+ \ttdefault
+ \mddefault
+ \sldefault
+ }%
+ \else
+ \def\AltMacroFont{\fontencoding\encodingdefault
+ \fontfamily\ttdefault
+ \fontseries\mddefault
+ \fontshape\sldefault
+ \small
+ }%
+ \fi
+ }{}
+% \end{macrocode}
+% To allow changing the "\MacroFont" in the preamble we defer
+% defining the internally used "\macro@font" until after the
+% preamble.
+% \changes{v2.0a}{1998/05/16}{Support changing \cs{MacroFont} in
+% preamble}
+% \begin{macrocode}
+\AtBeginDocument{\let\macro@font\MacroFont}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\check@module}
+% \begin{macro}{\ifpm@module}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% This is inserted by "\everypar" at the start of each macrocode line to
+% check whether it starts with module information. (Such information is
+% of the form "%<"\meta{switch}">", where the "%" must be at the
+% start of the line and \meta{switch} comprises names with various
+% possible separators and a possible leading "+", "-", "*" or "/"
+% \cite{art:docstrip}. All that concerns us here is what the first
+% character of \meta{switch} is.) First it checks the "pm@module"
+% flag in case the previous line had a non-block module
+% directive i.e., not "%<*" or "%</"; if it did we need to close the
+% group it started and unset the flag. "\check@module" looks ahead at
+% the next token and then calls "\ch@percent" to take action depending
+% on whether or not it's a "%"; we don't want to expand the token at
+% this stage. This is all done conditionally so it can be turned off
+% if it causes problems with code that wasn't designed to be
+% \texttt{docstrip}ped.
+% \begin{macrocode}
+\def\check@module{%
+ \ifcheck@modules
+ \ifpm@module \endgroup \pm@modulefalse \fi
+ \expandafter\futurelet\expandafter\next\expandafter\ch@percent
+ \fi}
+\newif\ifpm@module
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\DontCheckModules}
+% \begin{macro}{\CheckModules}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% \begin{macro}{\ifcheck@modules}
+% Here are two driver-file interface macros for turning the module
+% checking on and off using the "check@modules" switch.
+% \begin{macrocode}
+\def\DontCheckModules{\check@modulesfalse}
+\def\CheckModules{\check@modulestrue}
+\newif\ifcheck@modules \check@modulestrue
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ch@percent}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% If the lookahead token in "\next" is $"%"_{12}$ we go on to check
+% whether the following one is "<" and otherwise do nothing. Note the
+% "\expandafter" to get past the "\fi".
+% \begin{macrocode}
+\def\ch@percent{%
+ \if \percentchar\next
+ \expandafter\check@angle
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\check@angle}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% Before looking ahead for the "<" the "%" is gobbled by the
+% argument here.
+% \begin{macrocode}
+\def\check@angle#1{\futurelet\next\ch@angle}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ch@angle}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% \changes{v1.9k}{1994/02/22}{Have \texttt{<} active}
+% If the current lookahead token is "<" we are defined to be
+% processing a module directive can go on to look for "+" etc.;
+% otherwise we must put back the gobbled "%". With \LaTeXe{}
+% \texttt{<} is active so we have to be a bit careful.
+% \begin{macrocode}
+\begingroup
+\catcode`\<\active
+\gdef\ch@angle{\ifx<\next
+ \expandafter\ch@plus@etc
+ \else \percentchar \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ch@plus@etc}
+% \begin{macro}{\check@plus@etc}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% We now have to decide what sort of a directive we're dealing with
+% and do the right thing with it.
+% \begin{macrocode}
+\gdef\ch@plus@etc<{\futurelet\next\check@plus@etc}
+\gdef\check@plus@etc{%
+ \if +\next
+ \let\next\pm@module
+ \else\if -\next
+ \let\next\pm@module
+ \else\if *\next
+ \let\next\star@module
+ \else\if /\next
+ \let\next\slash@module
+% \end{macrocode}
+% At some point in the past the \texttt{docstrip} program was
+% partly rewritten and at that time it also got support for a very
+% special directive of the form |%<<| followed by an arbitrary
+% string. This is used for ``verbatim'' inclusion in case of
+% certain problem. We do not really attempt to pretty print that
+% case but we need at least account for it since otherwise we get
+% an error message since this is the only case where we will not
+% have a closing |>|.
+% \changes{v2.0n}{2001/05/16}{Partly support docstrip's ``verbatim''
+% directive (pr/3331)}
+% \begin{macrocode}
+ \else\ifx <\next
+ \percentchar
+ \else
+ \let\next\pm@module
+ \fi\fi\fi\fi\fi
+ \next}
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\pm@module}
+% If we're not dealing with a block
+% directive ("*" or "/") i.e., it's a single special line, we set
+% everything up to the next ">" appropriately and then change to the
+% special macro font inside a group which will be ended at the start
+% of the next line. If the apparent module directive is missing the
+% terminating ">" this will lose, but then so will the \texttt{docstrip}
+% implementation. An alternative strategy would be to have
+% "\pm@module" make ">" active and clear a flag set here to indicate
+% processing the directive. Appropriate action could then be taken if
+% the flag was found still to be set when processing the next line.
+% \changes{v1.7a}{1992/03/12}{Added.}
+% \changes{v1.7i}{1992/07/11}{Support for fonts depending on nesting.}
+% \begin{macrocode}
+\begingroup
+\catcode`\~=\active
+\lccode`\~=`\>
+\lowercase{\gdef\pm@module#1~}{\pm@moduletrue
+ \Module{#1}\begingroup
+% \end{macrocode}
+% We switch to a special font as soon the nesting is higher than
+% the current value of "\c@StandardModuleDepth". We do a local
+% update to the "\guard@level" here which will be restored after
+% the current input line.
+% \begin{macrocode}
+ \advance\guard@level\@ne
+ \ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\star@module}
+% \begin{macro}{\slash@module}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% \changes{v1.7f}{1992/05/16}{Take account of nested guards.}
+% \changes{v1.7i}{1992/07/11}{Add counter to determine when to switch to
+% special font.}
+% If the start or end of a module {\em block\/} is indicated, after
+% setting the guard we have to check whether a change in the macrocode
+% font should be done. This will be the case if we are already inside
+% a block or are ending the outermost block. If so, we globally
+% toggle the font for subsequent macrocode sections between the normal
+% and special form, switching to the new one immediately.
+% \changes{v1.7i}{1992/07/17}{Support for fonts depending on module
+% nesting}
+% \begin{macrocode}
+\lowercase{\gdef\star@module#1~}{%
+ \Module{#1}%
+ \global \advance \guard@level\@ne
+ \ifnum \guard@level>\c@StandardModuleDepth
+ \global\let\macro@font=\AltMacroFont \macro@font
+ \fi}
+\catcode`\>=\active
+\gdef\slash@module#1>{%
+ \Module{#1}%
+ \global \advance \guard@level\m@ne
+ \ifnum \guard@level=\c@StandardModuleDepth
+ \global\let\macro@font\MacroFont \macro@font
+ \fi
+}
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\c@StandardModuleDepth}
+% \changes{v1.7i}{1992/07/11}{Counter added.}
+% Counter defining up to which level modules are considered part of
+% the main code. If, for example, the whole code is surrounded by
+% a |%<*package>| module we better set this counter to |1| to avoid
+% getting the whole code be displayed in typewriter italic.
+% \begin{macrocode}
+\newcounter{StandardModuleDepth}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\guard@level}
+% \changes{v1.7f}{1992/05/16}{Added.}
+% We need a counter to keep track of the guard nesting.
+% \begin{macrocode}
+\newcount \guard@level
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Module}
+% \changes{v1.7a}{1992/03/12}{Added.}
+% \changes{v1.7d}{1992/04/25}{Use sans font for modules.}
+% This provides a hook to determine the way the module directive is
+% set. It gets as argument everything between the angle brackets.
+% The default is to set the contents in sans serif text between
+% $\langle\,\rangle$ with the special characters suitably "\mathcode"d
+% by "\mod@math@codes". (You can't just set it in a sans text font
+% because normally "|" will print as an em-dash.) This is done
+% differently depending on whether we have the NFSS or the old one. In
+% the latter case we can easily change "\fam" appropriately.
+% \changes{v1.8c}{1993/10/25}{NFSS standard}
+% \begin{macrocode}
+\@ifundefined{Module}{%
+% \end{macrocode}
+% With NFSS what we probably {\em should\/} do is change to a new
+% "\mathversion" but I (Dave Love) haven't spotted an easy way to
+% do so correctly if the document uses a version other than
+% "normal". (We need to know in what font to set the other
+% groups.) This uses a new math alphabet rather than version and
+% consequently has to worry about whether we're using
+% \textsf{oldlfnt} or not. I expect there's a better
+% way\ldots
+% \begin{macrocode}
+ \def\Module#1{\mod@math@codes$\langle\mathsf{#1}\rangle$}
+ }{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mod@math@codes}
+% \changes{v1.7c}{1992/03/26}{Added.}
+% \changes{v2.1e}{2010/02/04}{Added mathcodes for +,-,:, and = (pr/4096)}
+% As well as `words', the module
+% directive text might contain any of the characters "*/+-,&|!()"
+% for the current version of \textsf{docstrip}. We only need
+% special action for two of them in the math code changing required
+% above: "|" is changed to a "\mathop" (it's normally |"026A|) and
+% "&" is also made a "\mathop", but in family 0. Remember that "&"
+% will not have a special catcode when it's encountered.
+% \begin{macrocode}
+\def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026
+ \mathcode`\-="702D \mathcode`\+="702B
+ \mathcode`\:="703A \mathcode`\=="703D }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mathsf}
+% \changes{v1.7c}{1992/03/26}{Added.}
+% \changes{v1.7d}{1992/04/25}{Use sans font for modules.}
+% \changes{v1.7n}{1993/02/21}{\cs{sfmath} Renamed to \cs{mathsf}.}
+% \changes{v1.8c}{1993/10/25}{NFSS standard}
+% If NFSS is in use we need a new math alphabet which uses a sans serif
+% font. To support both the release one and two of NFSS the alphabet
+% was renamed to "\mathsf" which is defined in NFSS2.
+% \begin{macrocode}
+%\ifx\selectfont\undefined
+%\else
+% \ifx\mathsf\undefined
+% \newmathalphabet*{\mathsf}{\sfdefault}{m}{n}\fi
+%\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\MacrocodeTopsep}
+% \begin{macro}{\MacroIndent}
+% In the code above, we have used two registers. Therefore we have
+% to allocate them. The default values might be overwritten with
+% the help of the |\DocstyleParms| macro.
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \changes{v1.5y}{1990/02/24}{Default changed.}
+% \changes{v1.6b}{1990/06/15}{\cs{rm} moved before \cs{scriptsize} to
+% avoid unnecessary fontwarning.}
+% \begin{macrocode}
+\newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
+\newdimen\MacroIndent
+\settowidth\MacroIndent{\rmfamily\scriptsize 00\ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{environment}{macrocode*}
+% \begin{macro}{\endmacrocode*}
+% Just as in the \textsf{verbatim} environment, there is also a
+% `star' variant of the \textsf{macrocode} environment in which a
+% space is shown by the symbol \verb*+ +. Until this moment, I
+% have not yet used it (it will be used in the description of the
+% definition of |\xmacro@code| below) but it's exactly on this one
+% occasion {\em here\/} that you can't use it (cf.\ M\"unchhausens
+% Marsh problem)\footnote{Karl Friedrich Hieronymus Frhr.\ v.\
+% M\"unchhausen (*1720, \dag1797). Several books were written
+% about fantastic adventures supposedly told by him (see
+% \cite{book:Raspe} or \cite{book:Buerger}). In one story he
+% escaped from the marsh by pulling himself out by his hair.}
+% directly. Because of this, on this one occasion we'll cheat
+% around the problem with an additional comment character. But now
+% back to |\macrocode*|. We start with the macro |\macro@code|
+% which prepares everything and then call the macro |\sxmacro@code|
+% whose argument is terminated by the string
+%\verb*+% \end{macrocode*}+.
+% \begin{macrocode}
+\@namedef{macrocode*}{\macro@code\sxmacro@code}
+% \end{macrocode}
+% As we know, |\sxmacro@code| and then |\end{macrocode*}|
+% (the macro, not the string), will be executed, so that for a
+% happy ending we still need to define the macro
+% |\endmacrocode*|.
+% \begin{macrocode}
+\expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+%
+%
+%
+%
+%
+%
+% \begin{macro}{\xmacro@code}
+\catcode`\!=\catcode`\% ^^A In this section there must not be
+ ^^A any exclamation marks.
+ ^^A
+% As already mentioned, the macro |\xmacro@code| expects an
+% argument delimited by the string \verb*+% \end{macrocode}+. At
+% the moment that this macro is called, the |\catcode| of
+% \TeX's special characters are 12 (`other') or 13 (`active').
+% Because of this we need to utilize a different escape character
+% during the definition. This happens locally.
+% \begin{macrocode*}
+\begingroup
+\catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
+% \end{macrocode*}
+% Additionally, we need to ensure that the symbols in the above
+% string contain the |\catcode|$\,$s which are available
+% within the \textsf{macrocode} environment.
+% \begin{macrocode*}
+\catcode`\{=12 \catcode`\}=12
+\catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
+!% \end{macrocode*}
+! Next follows the actual definition of |\macro@code|;
+! notice the
+! use of the new escape character. We manage to get the argument
+! surrounded by the string |\end{macrocode}|, but at the end
+! however, in spite of the actual characters used during the
+! definition of
+! this macro, |\end| with the argument |{macrocode}|
+! will be executed, to ensure a balanced environment.
+! \begin{macrocode*}
+|gdef|xmacro@code#1% \end{macrocode}[#1|end[macrocode]]
+!% \end{macrocode*}
+! \begin{macro}{\sxmacro@code}
+! The definition of |\sxmacro@code| is completely analogous,
+! only
+! here a slightly different terminating string will be used.
+! Note that the space is not active in this environment.
+! \begin{macrocode}
+|catcode`| =12
+|gdef|sxmacro@code#1% \end{macrocode*}[#1|end[macrocode*]]
+!% \end{macrocode}
+! because the |\catcode| changes have been made local by
+! commencing a
+! new group, there now follows the matching |\endgroup|
+! in a rather
+! unusual style of writing.
+! \begin{macrocode}
+|endgroup
+!% \end{macrocode}
+\catcode`\!=12
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Macros for the `documentation parts'}
+%
+%
+% \begin{macro}{\DescribeMacro}
+% \begin{macro}{\Describe@Macro}
+% \changes{v1.5v}{1990/01/28}{Macro added.}
+% \changes{v1.5j}{1989/06/09}{\cs{ignorespaces} added as a temporary
+% fix}
+% \begin{macro}{\DescribeEnv}
+% \begin{macro}{\Describe@Env}
+% \changes{v1.5v}{1990/01/28}{Macro added.}
+% \changes{v1.5j}{1989/06/09}{\cs{ignorespaces} added as a temporary
+% fix}
+% The |\DescribeMacro| and |\DescribeEnv| macros should
+% print their arguments in the margin and produce an index entry.
+% We simply use |\marginpar| to get the desired result. This
+% is however not the best solution because the labels might be
+% slightly misplaced. One also might get a lot of `marginpar moved'
+% messages which are hard-wired into the \LaTeX{} output
+% routine.\footnote{It might be better to change these macros into
+% environments like the \textsf{macro} environment.} First we change
+% to horizontal mode if necessary. The \LaTeX{} macros
+% |\@bsphack| and |\@esphack| are used to make those
+% commands invisible (i.e.\ to normalize the surrounding space and
+% to make the |\spacefactor| transparent).
+% \changes{v1.5v}{1990/01/28}{\cs{MakePrivateLetters} added.}
+% \begin{macrocode}
+\def\DescribeMacro{\leavevmode\@bsphack
+% \end{macrocode}
+% When documenting the code for the \texttt{amstex.sty} option we
+% encountered a bug: the |\catcode| of |@| was active and
+% therefore couldn't be used in command names. So we first have to
+% make sure that we get all |\catcode|s right by calling
+% |\MakePrivateLetters| inside a group. Then we call
+% |\Describe@Macro| to do the work.
+% \changes{v2.0g}{1999/03/22}{Parse backslash as letter in argument
+% to \cs{DescribeMacro}.}
+% \changes{v2.0h}{1999/03/25}{Correct errors introduced in v2.0g.}
+% \begin{macrocode}
+ \begingroup\MakePrivateLetters\Describe@Macro}
+\def\Describe@Macro#1{\endgroup
+ \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
+% \end{macrocode}
+% Note the use of |\raggedleft| to place the output flushed
+% right. Finally we call a macro which produces the actual index
+% entry and finish with |\@esphack| to leave no
+% trace.\footnote{The whole mechanism won't work because
+% of the \texttt{\bslash leavevmode} in front.
+% As a temporary change \texttt{\bslash ignorespaces}
+% is added.}
+% \begin{macrocode}
+ \SpecialUsageIndex{#1}\@esphack\ignorespaces}
+% \end{macrocode}
+% The |\DescribeEnv| macro is completely analogous.
+% \changes{v1.5v}{1990/01/28}{\cs{MakePrivateLetters} added.}
+% \begin{macrocode}
+\def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
+ \Describe@Env}
+\def\Describe@Env#1{\endgroup
+ \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
+ \SpecialEnvIndex{#1}\@esphack\ignorespaces}
+% \end{macrocode}
+% To put the labels in the left margin we have to use the
+% |\reversemarginpar| declaration. (This means that the
+% \texttt{doc.sty} can't be used with all classes or packages.)
+% We also
+% make the |\marginparpush| zero and |\marginparwidth| suitably
+% wide.
+% \changes{v1.5d}{1989/04/28}{\cs{marginparwidth} setting added.}
+% \begin{macrocode}
+\reversemarginpar
+\setlength\marginparpush{0pt} \setlength\marginparwidth{8pc}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bslash}
+% \changes{v1.7a}{1992/02/26}{Moved \cs{bslash} documentation to `user
+% interface' part}
+% We start a new group in which to hide the alteration of
+% |\catcode|$\,$s, and make \verb+|+ introduce commands,
+% whilst |\| becomes an `other' character.
+%
+% \begin{macrocode}
+{\catcode`\|=\z@ \catcode`\\=12
+% \end{macrocode}
+% Now we are able to define |\bslash| (globally) to generate a
+% backslash of |\catcode| `other'. We then close this group,
+% restoring original |\catcode|$\,$s.
+% \SpecialEscapechar{\|}
+% \begin{macrocode}
+|gdef|bslash{\}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{environment}{verbatim}
+% \begin{environment}{verbatim*}
+% \changes{v1.7i}{1992/07/12}{Added changed definition for verbatim!*.}
+% The \textsf{verbatim} environment holds no secrets; it consists of
+% the normal \LaTeX{} environment. We also set the
+% |\@beginparpenalty| and change to the font given by
+% |\MacroFont|.
+% \begin{macrocode}
+\def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
+ \MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
+% \end{macrocode}
+% We deal in a similar way with the star form of this environment.
+% \begin{macrocode}
+\@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
+ \MacroFont \@sxverbatim}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+% \begin{macro}{\@verbatim}
+% Additionally we redefine the |\@verbatim| macro so that it
+% suppresses |%| characters at the beginning of the line. The
+% first lines are copied literally from \texttt{latex.tex}.
+% \changes{v1.7i}{1992/07/12}{Added \cs{@@par} to clear possible
+% \cs{parshape}.}
+% \begin{macrocode}
+\def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
+ \leftskip\@totalleftmargin\rightskip\z@
+ \parindent\z@\parfillskip\@flushglue\parskip\z@
+ \@@par
+ \@tempswafalse
+% \end{macrocode}
+% |\@verbatim| sets |^^M|, the end of line character, to
+% be equal to |\par|. This control sequence is redefined
+% here; |\@@par| is the paragraph primitive of \TeX.
+% \changes{v1.7c}{1992/03/24}{Added \cs{interlinepenalty} to
+% \cs{par} from verbatim.sty}
+% \begin{macrocode}
+ \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
+ \penalty\interlinepenalty
+% \end{macrocode}
+% We add a control sequence |\check@percent| to the definition
+% of |\par| whose task it is to check for a percent character.
+% \begin{macrocode}
+ \check@percent}%
+% \end{macrocode}
+% The rest is again copied literally from \texttt{latex.tex} (less
+% "\tt").
+% \changes{v1.7a}{1992/02/26}{Removed redundant \cs{tt}.}
+% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX verbatim,
+% which handles more ligatures.}
+% \begin{macrocode}
+ \obeylines
+ \let\do\do@noligs \verbatim@nolig@list
+ \let\do\@makeother \dospecials}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\check@percent}
+% Finally we define |\check@percent|. Since this must compare a
+% character with a percent sign we must first (locally) change
+% percent's |\catcode| so that it is seen by \TeX. The definition
+% itself is nearly trivial: grab the following character, check if
+% it is a |%|, and insert it again if not. At the end of the
+% \textsf{verbatim} environment this macro will peek at the next
+% input line. In that case the argument to |\check@percent| might
+% be a |\par| or a macro with arguments. Therefore we make the
+% definition |\long| (|\par| allowed) and use the normal |\next|
+% mechanism to reinsert the argument after the |\fi| if necessary.
+% \changes{v1.5i}{1989/06/07}{Definition changed to `long'}
+% \changes{v1.5i}{1989/06/07}{Macro \cs{next} used to guard against
+% macro with arguments}
+% There is a subtle problem here, the equal sign between
+% |\next| and |#1| is actually necessary. Do you see why?
+% The omission of this token once caused a funny error.
+% \changes{v1.5u}{1989/11/14}{equal sign added.}
+% \begin{macrocode}
+{\catcode`\%=12
+ \long\gdef\check@percent#1{\ifx #1%\let\next\@empty \else
+ \let\next=#1\fi \next}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb}
+% \changes{v1.7a}{1992/02/27}{Now warns about newlines (from
+% newdoc with `@noligs added).}
+% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX \cs{verb}}
+% We re-define "\verb" to check for newlines in its argument since a
+% missing delimiter is difficult to detect in \DOC{} source.
+% The code is the same as in \texttt{latex.tex} of September 19, 1993.
+% Perhaps there should be a font-changing
+% hook rather than just using "\ttfamily", but if so it probably should be
+% different from "\MacroFont" since that normally includes "\small"
+% and would look wrong inline.
+% \changes{v1.7a}{1992/02/28}{Added math mode check (from verbatim.sty)}
+% \begin{macrocode}
+\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup \let\do\do@noligs \verbatim@nolig@list
+ \ttfamily \verb@eol@error \let\do\@makeother \dospecials
+ \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb@balance@group}
+% \begin{macro}{\verb@egroup}
+% \begin{macro}{\verb@eol@error}
+% \changes{v1.8b}{1993/09/21}{Renamed \cs{verb@err} to
+% \cs{verb@eol@error}, as in new LaTeX verbatim.}
+% \begin{macrocode}
+\let\verb@balance@group\@empty
+
+\def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
+
+\begingroup
+ \obeylines%
+ \gdef\verb@eol@error{\obeylines%
+ \def^^M{\verb@egroup\@latex@error{%
+ Text for \noexpand\verb command ended by end of line}\@ehc}}%
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@sverb}
+% \changes{v1.7a}{1992/02/27}{Added for \cs{verb} change.}
+% \changes{v1.7a}{1992/02/28}{Now same as in verbatim.sty.}
+% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX verbatim,
+% which has better error trapping.}
+% See \cite{art:verbatim} for commentary.
+% \begin{macrocode}
+\def\@sverb#1{%
+ \catcode`#1\active \lccode`\~`#1%
+ \gdef\verb@balance@group{\verb@egroup
+ \@latex@error{Illegal use of \noexpand\verb command}\@ehc}%
+ \aftergroup\verb@balance@group
+ \lowercase{\let~\verb@egroup}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\verbatim@nolig@list}
+% \begin{macro}{\do@noligs}
+% These macros replace the old "\@noligs" mechanism by an
+% extensible version to allow more ligatures to be added.
+% \begin{macrocode}
+\def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
+\def\do@noligs#1{%
+ \catcode`#1\active
+ \begingroup
+ \lccode`\~=`#1\relax
+ \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\macro}
+% \begin{macro}{\m@cro@}
+% \changes{v1.5v}{1990/01/28}{\cs{macro@} renamed to \cs{m@cro@}
+% since AmSTeX
+% defines another macro of the same name.}
+% \begin{macro}{\macro@cnt}
+% \label{page:macro} The \textsf{macro} environment is implemented as
+% a \textsf{trivlist} environment, whereby in order that the macro
+% names can be placed under one another in the margin
+% (corresponding to the macro's nesting depth), the macro
+% |\makelabel| must be altered. In order to store the nesting
+% depth, we use a counter. We also need a counter to count the
+% number of nested \textsf{macro} environments.
+% \changes{v1.5k}{1989/08/17}{Fix for save stack problem.}
+% \changes{v1.9k}{1994/02/22}{Fix probably no longer necessary}
+% \begin{macrocode}
+\newcount\macro@cnt \macro@cnt=0
+% \end{macrocode}
+% The environment takes an argument---the macro name to be
+% described. Since this name may contain special `letters' we have
+% to re-|\catcode| them before scanning the argument. This is done
+% by the |\MakePrivateLetters| macro.
+% \changes{v1.5k}{1989/08/17}{Fix for save stack problem.}
+% \changes{v1.7a}{1992/02/26}{Catcode backslash to other (from newdoc).}
+% \changes{v1.9k}{1994/02/22}{Don't omit extra group}
+% \begin{macrocode}
+\def\macro{\begingroup
+ \catcode`\\12
+ \MakePrivateLetters \m@cro@ \iftrue}
+% \end{macrocode}
+%
+% \begin{environment}{environment}
+% \changes{v1.8c}{1993/10/25}{Environment added}
+% The ``environment'' envrionment will be implemented just like the
+% ``macro'' environment flagging any differences in the code by
+% passing |\iffalse| or |\iftrue| to the |\m@cro@| environment
+% doing the actual work.
+% \begin{macrocode}
+\def\environment{\begingroup
+ \catcode`\\12
+ \MakePrivateLetters \m@cro@ \iffalse}
+% \end{macrocode}
+% \end{environment}
+%
+% After scanning the argument we close the group to get the normal
+% |\catcode|$\,$s back. Then we assign a special value to
+% |\topsep| and start a \textsf{trivlist} environment.
+% \changes{v1.5f}{1989/05/07}{MacroTopsep parameter added.}
+% \changes{v1.5k}{1989/08/17}{Fix for save stack problem.}
+% \changes{v1.8c}{1993/10/25}{Support ``environment'' env}
+% \changes{v1.9k}{1994/02/22}{Remove \cs{macro@level}}
+% \begin{macrocode}
+\long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
+% \end{macrocode}
+% We also save the name being described in |\saved@macroname| for
+% use in conjunction with the |\changes| macro.
+% \begin{macrocode}
+ \edef\saved@macroname{\string#2}%
+ #1
+% \end{macrocode}
+% If documenting an environment we put is name in |\saved@indexname|
+% otherwise the name without the backslash.
+% \changes{v2.1g}{2016/02/15}{Use \cs{saved@indexname}}
+% \begin{macrocode}
+ \let\saved@indexname\saved@macroname
+ \else
+ \edef\saved@indexname{\expandafter\@gobble\string#2}%
+ \fi
+% \end{macrocode}
+% Now there follows a variation of |\makelabel| which is used
+% should the environment not be nested, or should it lie between
+% two successive |\begin{macro}| instructions or explanatory
+% text. One can recognize this with the switch |\if@inlabel|
+% which will be |true| in the case of successive |\item|
+% commands.
+% \begin{macrocode}
+ \def\makelabel##1{\llap{##1}}%
+% \end{macrocode}
+% If |@inlabel| is |true| and if $\verb=\macro@cnt= > 0$
+% then the above definition needs to be changed, because in this
+% case \LaTeX{} would otherwise put the labels all on the same line
+% and this would lead to them being overprinted on top of each
+% other. Because of this |\makelabel| needs to be redefined
+% in this case.
+% \begin{macrocode}
+ \if@inlabel
+% \end{macrocode}
+% If |\macro@cnt| has the value $1$, then we redefine
+% |\makelabel| so that the label will be positioned in the
+% second line of the margin. As a result of this, two macro names
+% appear correctly, one under the other. It's important whilst
+% doing this that the generated label box is not allowed to have
+% more depth than a normal line since otherwise the distance
+% between the first two text lines of \TeX{} will be incorrectly
+% calculated. The definition should then look like:
+%\begin{verbatim}
+% \def\makelabel##1{\llap{\vtop to \baselineskip
+% {\hbox{\strut}\hbox{##1}\vss}}}
+%\end{verbatim}
+% Completely analogous to this is the case where labels need to be
+% placed one under the other. The lines above are only an example
+% typeset with the \textsf{verbatim} environment. To produce the real
+% definition we save the value of |\macro@cnt| in
+% |\count@| and empty the temp macro |\@tempa| for later
+% use.
+% \begin{macrocode}
+ \let\@tempa\@empty \count@\macro@cnt
+% \end{macrocode}
+% In the following loop we append for every already typeset label
+% an |\hbox{\strut}| to the definition of |\@tempa|.
+% \begin{macrocode}
+ \loop \ifnum\count@>\z@
+ \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
+% \end{macrocode}
+% Now be put the definition of |\makelabel| together.
+% \changes{v1.5b}{1989/04/27}{vbox to vtop changed in makelabel (test)}
+% \changes{v1.5e}{1989/04/28}{ht strutbox changed to baselineskip
+% (test)}
+% \begin{macrocode}
+ \edef\makelabel##1{\llap{\vtop to\baselineskip
+ {\@tempa\hbox{##1}\vss}}}%
+% \end{macrocode}
+% Next we increment the value of the nesting depth counter. This
+% value inside the \textsf{macro} environment is always at least one
+% after this point, but its toplevel definition is zero. Provided
+% this environment has been used correctly, $|\macro@cnt|=0$
+% should not occur when |@inlabel|=\textsf{true}. It is
+% however possible if this environment is used within other list
+% environments (but this would have little point).
+% \begin{macrocode}
+ \advance \macro@cnt \@ne
+% \end{macrocode}
+% If |@inlabel| is false we reset |\macro@cnt| assuming
+% that there is enough room to print the macro name without
+% shifting.
+% \begin{macrocode}
+ \else \macro@cnt\@ne \fi
+% \end{macrocode}
+% Now the label will be produced using |\item|. The following
+% line is only a hack saving the day until a better solution is
+% implemented. We have to face two problems: the argument might be
+% a |\par| which is forbidden in the argument of other macros
+% if they are not defined as |\long|, or it is something like
+% |\iffalse| or |\else|, i.e.\ something which will be
+% misinterpreted when \TeX{} is skipping conditional text. In both
+% cases |\item| will bomb, so we protect the argument by using
+% |\string|.
+% \begin{macrocode}
+ \edef\@tempa{\noexpand\item[%
+% \end{macrocode}
+% Depending on whether we are inside a ``macro'' or ``environment''
+% environment we use |\PrintMacroName| or |\PrintEnvName| to
+% display the name.
+% \begin{macrocode}
+ #1%
+ \noexpand\PrintMacroName
+ \else
+ \noexpand\PrintEnvName
+ \fi
+ {\string#2}]}%
+ \@tempa
+% \end{macrocode}
+% At this point we also produce an index entry. Because it is not
+% known which index sorting program will be used, we do not use the
+% command |\index|, but rather a command
+% |\SpecialMainIndex| after advancing the counter for indexing
+% by line number. This may be redefined by the user in
+% order to generate an index entry which will be understood by the
+% index program in use (note the definition of
+% |\SpecialMainIndex| for our installation).
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \changes{v1.9u}{1995/08/06}{Removed brace group which
+% killed \cs{DoNotIndex}}
+% We advance the current codeline number and after producing an
+% index entry revert to the original value
+% \begin{macrocode}
+ \global\advance\c@CodelineNo\@ne
+% \end{macrocode}
+% Again the macro to call depends on the environment we are
+% actually in.
+% \begin{macrocode}
+ #1%
+ \SpecialMainIndex{#2}\nobreak
+ \DoNotIndex{#2}%
+ \else
+ \SpecialMainEnvIndex{#2}\nobreak
+ \fi
+ \global\advance\c@CodelineNo\m@ne
+% \end{macrocode}
+% The |\nobreak| is needed to prevent a page break after the
+% |\write| produced by the |\SpecialMainIndex| macro. We
+% exclude the new macro in the cross-referencing feature, to
+% prevent spurious non-main entry references. Regarding possibly
+% problematic arguments, the implementation takes
+% care of |\par| and the conditionals are uncritical.
+% \changes{v1.7a}{1992/03/02}{Removed redundant code checking for
+% \cs{par}.}^^A
+%
+% Because the space symbol should be ignored between the
+% |\begin{macro}{...}| and the following text we must take
+% care of this with |\ignorespaces|.
+% \begin{macrocode}
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\endmacro}
+% \begin{macro}{\endenvironment}
+% Older releases of this environment omit the |\endgroup| token,
+% when being nested. This was done to avoid unnecessary stack usage.
+% However it does not work if \textsf{macro} and
+% \textsf{environment} environments are mixed, therefore we now
+% use a simpler approach.
+% \changes{v1.5k}{1989/08/17}{Fix for save stack problem.}
+% \changes{v1.9k}{1994/02/22}{Don't checkfor nesting}
+% \begin{macrocode}
+\let\endmacro \endtrivlist
+\let\endenvironment\endmacro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\MacroTopsep}
+% Here is the default value for the |\MacroTopsep| parameter
+% used above.
+% \begin{macrocode}
+\newskip\MacroTopsep \MacroTopsep = 7pt plus 2pt minus 2pt
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \subsection{Formatting the margin}
+%
+% The following three macros should be user definable.
+% Therefore we define those macros only if they have not already
+% been defined.
+%
+% \begin{macro}{\PrintMacroName}
+% \begin{macro}{\PrintEnvName}
+% \begin{macro}{\PrintDescribeMacro}
+% \begin{macro}{\PrintDescribeEnv}
+% The formatting of the macro name in the left margin is done by
+% these macros. We first set a |\strut| to get the height and
+% depth of the normal lines. Then we change to the
+% |\MacroFont| using |\string| to |\catcode| the
+% argument to other (assuming that it is a macro name). Finally we
+% print a space. The font change remains local since this macro
+% will be called inside an |\hbox|.
+% \begin{macrocode}
+\@ifundefined{PrintMacroName}
+ {\def\PrintMacroName#1{\strut \MacroFont \string #1\ }}{}
+% \end{macrocode}
+% We use the same formatting conventions when describing a macro.
+% \begin{macrocode}
+\@ifundefined{PrintDescribeMacro}
+ {\def\PrintDescribeMacro#1{\strut \MacroFont \string #1\ }}{}
+% \end{macrocode}
+% To format the name of a new environment there is no need to use
+% |\string|.
+% \begin{macrocode}
+\@ifundefined{PrintDescribeEnv}
+ {\def\PrintDescribeEnv#1{\strut \MacroFont #1\ }}{}
+\@ifundefined{PrintEnvName}
+ {\def\PrintEnvName#1{\strut \MacroFont #1\ }}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{Creating index entries by scanning `macrocode'}
+%
+% The following macros ensure that index entries are created for each
+% occurrence of a \TeX-like command (something starting with
+% `|\|') providing indexing has been turned on with "\PageIndex"
+% or "\CodelineIndex". With the default definitions of
+% |\SpecialMainIndex|, etc., the index file generated is
+% intended to be processed by Chen's \textsf{makeindex} program
+% \cite{art:Chen}.
+%
+%
+% Of course, in {\em this\/} package file itself we've sometimes had to
+% make \verb+|+ take the r\^ole of \TeX's escape character to
+% introduce command names at places where |\| has to belong to
+% some other category. Therefore, we may also need to recognize
+% \verb+|+ as the introducer for a command when setting the text
+% inside the \textsf{macrocode} environment. Other users may have the
+% need to make similar reassignments for their macros.
+%
+%
+% \begin{macro}{\SpecialEscapechar}\label{sect:specialescapechar}
+% \begin{macro}{\active@escape@char}
+% \begin{macro}{\special@escape@char}
+% The macro |\SpecialEscapechar| is used to denote a special escape
+% character for the next \textsf{macrocode} environment. It has one
+% argument---the new escape character given as a `single-letter'
+% control sequence. Its main purpose is defining
+% |\special@escape@char| to produce the chosen escape character
+% |\catcode|$\,$d to 12 and |\active@escape@char| to produce the
+% same character but with |\catcode| 13.
+%
+% The macro |\special@escape@char| is used to {\em print\/}
+% the escape character while |\active@escape@char| is needed
+% in the definition of |\init@crossref| to start the scanning
+% mechanism.
+%
+% In the definition of |\SpecialEscapechar| we need an
+% arbitrary character with |\catcode| 13. We use `\~{}' and
+% ensure that it is active. The |\begingroup| is used to make
+% a possible change local to the expansion of
+% |\SpecialEscapechar|.
+% \changes{v1.7g}{1992/06/19}{Making tilde active moved outside
+% definition}
+% \begin{macrocode}
+\begingroup
+\catcode`\~\active
+\gdef\SpecialEscapechar#1{%
+ \begingroup
+% \end{macrocode}
+% Now we are ready for the definition of
+% |\active@escape@char|. It's a little tricky: we first
+% define locally the uppercase code of `\~{}' to be the new escape
+% character.
+% \begin{macrocode}
+ \uccode`\~`#1%
+% \end{macrocode}
+% Around the definition of |\active@escape@char| we place an
+% |\uppercase| command. Recall that the expansion of
+% |\uppercase| changes characters according to their
+% |\uccode|, but leaves their |\catcode|$\,$s untouched
+% (cf.\ \TeX{}book page 41).
+% \begin{macrocode}
+ \uppercase{\gdef\active@escape@char{~}}%
+% \end{macrocode}
+% The definition of |\special@escape@char| is easier, we use
+% |\string| to |\catcode| the argument of
+% |\SpecialEscapechar| to 12 and suppress the preceding
+% |\escapechar|.
+% \begin{macrocode}
+ \escapechar\m@ne \xdef\special@escape@char{\string#1}%
+% \end{macrocode}
+% Now we close the group and end the definition: the value of
+% |\escapechar| as well as the |\uccode| and
+% |\catcode| of `\~{}' will be restored.
+% \begin{macrocode}
+ \endgroup}
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\init@crossref}
+% The replacement text of |\init@crossref| should fulfill the
+% following tasks:
+% \begin{itemize}
+% \parindent4em
+% \item[1)]
+% |\catcode| all characters used in macro names to
+% 11 (i.e.\ `letter').
+% \item[2)]
+% |\catcode| the `|\|' character to 13
+% (i.e.\ `active').
+% \item[3a)]
+% |\let| the `|\|' equal |\scan@macro|
+% (i.e.\ start the macro scanning mechanism) if there is
+% no special escape character (i.e.\ the
+% |\special@escape@char| is `|\|').
+% \item[3b)]
+% Otherwise |\let| it equal |\bslash|, i.e.\
+% produce a printable |\|.
+% \item[4)]
+% Make the \meta{special escape character} active.
+% \item[5)]
+% |\let| the active version of the special escape
+% character
+% (i.e.\ the expansion of |\active@escape@char|) equal
+% |\scan@macro|.
+% \end{itemize}
+% The reader might ask why we bother to |\catcode| the
+% `|\|' first to 12 (at the end of |\macro@code|) then
+% re-|\catcode| it to 13 in order to produce a $|\|_{12}$
+% in case 3b) above. This is done because we have to ensure that
+% `|\|' has |\catcode| 13 within the \textsf{macrocode}
+% environment. Otherwise the delimiter for the argument of
+% |\xmacro@code| would not be found (parameter matching
+% depends on |\catcode|$\,$s).
+%
+% Therefore we first re-|\catcode| some characters.
+% \begin{macrocode}
+\begingroup \catcode`\|=\z@ \catcode`\\=\active
+% \end{macrocode}
+% We carry out tasks 2) and 3b) first.
+% \SpecialEscapechar{\|}
+% \begin{macrocode}
+|gdef|init@crossref{|catcode`|\|active |let\|bslash
+% \end{macrocode}
+% Because of the popularity of the `|@|' character as a
+% `letter' in macros, we normally have to change its
+% |\catcode| here, and thus fulfill task 1). But the macro
+% designer might use other characters as private letters as well,
+% so we use a macro to do the |\catcode| switching.
+% \SpecialEscapechar\|
+% \begin{macrocode}
+ |MakePrivateLetters
+% \end{macrocode}
+% Now we |\catcode| the special escape character to 13 and
+% |\let| it equal |\scan@macro|, i.e.\ fulfill tasks 4)
+% and 5). Note the use of |\expandafter| to insert the chosen
+% escape character saved in |\special@escape@char| and
+% |\active@escape@char|.
+% \SpecialEscapechar\|
+% \begin{macrocode}
+ |catcode|expandafter`|special@escape@char|active
+ |expandafter|let|active@escape@char|scan@macro}
+|endgroup
+% \end{macrocode}
+% If there is no special escape character, i.e.\ if
+% |\SpecialEscapechar| is |\\|, the second last line will
+% overwrite the previous definition of $|\|_{13}$. In this
+% way all tasks are fulfilled.
+%
+% For happy documenting we give default values to
+% |\special@escape@char| and |\active@escape@char| with
+% the following line:
+% \begin{macrocode}
+\SpecialEscapechar{\\}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\MakePrivateLetters}
+% Here is the default definition of this command, which makes just
+% the |@| into a letter. The user may change it if he/she
+% needs more or other characters masquerading as letters.
+% \begin{macrocode}
+\@ifundefined{MakePrivateLetters}
+ {\let\MakePrivateLetters\makeatletter}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\close@crossref}
+% At the end of a cross-referencing part we prepare ourselves for
+% the next one by setting the escape character to `|\|'.
+% \begin{macrocode}
+\def\close@crossref{\SpecialEscapechar\\}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Macros for scanning macro names}
+%
+% \begin{macro}{\scan@macro}
+% \changes{v1.5k}{1989/09/04}{Support for checksum added.}
+% \begin{macro}{\macro@namepart}
+% The |\init@crossref| will have made |\active| our
+% |\special@escape@char|, so that each
+% |\active@escape@char| will invoke |\scan@macro| when
+% within the \textsf{macrocode} environment. By this means, we can
+% automatically add index entries for every \TeX-like command which
+% is met whilst setting (in verbatim) the contents of
+% \textsf{macrocode} environments.
+% \begin{macrocode}
+\def\scan@macro{%
+% \end{macrocode}
+% First we output the character which triggered this macro. Its
+% version |\catcode|$\,$d to 12 is saved in
+% |\special@escape@char|. We also call |\step@checksum|
+% to generate later on a proper check-sum (see section
+% \ref{sec:checksum} for details).
+% \begin{macrocode}
+ \special@escape@char
+ \step@checksum
+% \end{macrocode}
+% If the \textsf{macrocode} environment contains, for example, the
+% command |\\|, the second |\| should not start the
+% scanning mechanism. Therefore we use a switch to decide if
+% scanning of macro names is allowed.
+% \begin{macrocode}
+ \ifscan@allowed
+% \end{macrocode}
+% The macro assembles the letters forming a \TeX\ command in
+% |\macro@namepart| so this is initially cleared; we then set
+% |\next| to the \textit{first\/} character following the
+% |\| and call |\macro@switch| to determine whether that
+% character is a letter or not.
+% \begin{macrocode}
+ \let\macro@namepart\@empty
+ \def\next{\futurelet\next\macro@switch}%
+% \end{macrocode}
+% As you recognize, we actually did something else, because we have
+% to defer the |\futurelet| call until after the final
+% |\fi|. If, on the other hand, the scanning is disabled we
+% simply |\let| |\next| equal `empty'.
+% \begin{macrocode}
+ \else \let\next\@empty \fi
+% \end{macrocode}
+% Now we invoke |\next| to carry out what's needed.
+% \begin{macrocode}
+ \next}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\ifscan@allowed}
+% \begin{macro}{\scan@allowedtrue}
+% \begin{macro}{\scan@allowedfalse}
+% |\ifscan@allowed| is the switch used above to determine if
+% the |\active@escape@char|\SpecialIndex{\active@escape@char}
+% should start the macro scanning mechanism.
+% \begin{macrocode}
+\newif\ifscan@allowed \scan@allowedtrue
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\EnableCrossrefs}
+% \begin{macro}{\DisableCrossrefs}
+% At this point we might define two macros which allow the user to
+% disable or enable the cross-referencing mechanism. Processing of
+% files will be faster if only main index entries are generated
+% (i.e., if |\DisableCrossrefs| is in force).
+% \begin{macrocode}
+\def\DisableCrossrefs{\@bsphack\scan@allowedfalse\@esphack}
+% \end{macrocode}
+% The macro |\EnableCrossrefs| will also disable any
+% |\DisableCrossrefs| command encountered afterwards.
+% \begin{macrocode}
+\def\EnableCrossrefs{\@bsphack\scan@allowedtrue
+ \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\macro@switch}
+% Now that we have the character which follows the escape character
+% (in |\next|), we can determine whether it's a `letter'
+% (which probably includes |@|).
+%
+% If it is, we let |\next| invoke a macro which assembles the
+% full command name.
+% \begin{macrocode}
+\def\macro@switch{\ifcat\noexpand\next a%
+ \let\next\macro@name
+% \end{macrocode}
+% Otherwise, we have a `single-character' command name. For all
+% those single-character names, we use |\short@macro| to
+% process them into suitable index entries.
+% \begin{macrocode}
+ \else \let\next\short@macro \fi
+% \end{macrocode}
+% Now that we know what macro to use to process the macro name, we
+% invoke it~\ldots
+% \begin{macrocode}
+ \next}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\short@macro}
+% \changes{v1.5c}{1989/04/27}{Corrected bad bug by putting the
+% scan@allowedfalse macro before printing
+% the argument.}
+% \changes{v1.7a}{1992/03/10}{Ensure character stored in
+% \cs{macro@namepart} as `letter' so index exclusion works.}
+% This macro will be invoked (with a single character as parameter)
+% when a single-character macro name has been spotted whilst
+% scanning within the \textsf{macrocode} environment.
+%
+% First we take a look at the |\index@excludelist| to see
+% whether this macro name should produce an index entry. This is
+% done by the |\ifnot@excluded| macro which assumes that the
+% macro name is saved in |\macro@namepart|. The character
+% mustn't be stored with a special category code or exclusion from
+% the index won't work, so we employ the case-changing trick used
+% elsewhere. Since the argument might be an active character,
+% |\string| is used to normalize it.
+% \changes{v2.0e}{1998/12/28}{Correctly use the case-changing trick.}
+% \begin{macrocode}
+\begingroup
+\catcode`\&=12
+\gdef\short@macro#1{\begingroup
+ \uccode`\&=\expandafter`\string#1%
+ \uppercase{\def\x{\def\macro@namepart{&}}}%
+ \expandafter\endgroup\x
+ \ifnot@excluded
+% \end{macrocode}
+% If necessary the index entry is produced by the macro
+% |\produce@index|. Depending on the actual character seen,
+% this macro has to do different things, so we pass the character
+% as an argument.
+% \begin{macrocode}
+ \produce@index{#1}\fi
+% \end{macrocode}
+% Then we disable the cross-referencing mechanism with
+% |\scan@allowedfalse| and print the actual character. The
+% index entry was generated first to ensure that no page break
+% intervenes (recall that a |^^M| will start a new line).
+% \begin{macrocode}
+ \scan@allowedfalse#1%
+% \end{macrocode}
+% After typesetting the character we can safely enable the
+% cross-referencing feature again. Note that this macro won't be
+% called (since |\macro@switch| won't be called) if
+% cross-referencing is globally disabled.
+% \begin{macrocode}
+ \scan@allowedtrue }
+\endgroup
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\produce@index}
+% \changes{v1.4s}{1989/04/23}{Added noexpand to all
+% \cs{if} tests
+% to avoid garbage produced by new active chars}
+% \changes{v1.4s}{1989/04/23}{Used \texttt{\protect\bslash string} for
+% the same reason.}
+% \changes{v1.5c}{1989/04/27}{Corrected bad bug by placing the
+% scan@allowedfalse macro into short@macro}
+% This macro is supposed to generate a suitable |\SortIndex|
+% command for a given single-letter control sequence. We test
+% first for the cases which involve active characters (i.e.\ the
+% backslash, the special escape character (if any), the space and
+% the |^^M|). Using the |\if| test (testing for
+% character codes), we have to ensure that the argument isn't
+% expanded.
+% \begin{macrocode}
+\def\produce@index#1{%
+ \if\noexpand#1\special@escape@char
+% \end{macrocode}
+% If the character is the special escape character (or the
+% `|\|' in case there was none) the |\it@is@a| macro is
+% used to produce the actual |\SortIndex| call.
+% \begin{macrocode}
+ \scan@allowedfalse \it@is@a\special@escape@char \else
+% \end{macrocode}
+% Next comes the test for a `|\|' which must be the
+% $|\|_{13}$ expanding to |\bslash|.
+% \begin{macrocode}
+ \if\noexpand#1\bslash \it@is@a\bslash \else
+% \end{macrocode}
+% Another possibility is \verb*+ +$_{13}$. Recall that |\space|
+% produces a \verb*+ +$_{10}$.
+% \begin{macrocode}
+ \if\noexpand#1\space \it@is@a\space \else
+% \end{macrocode}
+% The last\footnote{Well, it isn't the last active character after
+% all. I added \texttt{\bslash @noligs} some days ago and now
+% \texttt{`} too is active. So we have to make sure that such
+% characters don't get expanded in the index.} possibility of an
+% active character is |^^M|\@. In this case we don't test for
+% character codes, since it is easier to look if the character is
+% equal to |\par|. (We are inside the \textsf{macrocode}
+% environment.)
+% \begin{macrocode}
+ \ifx#1\par
+% \end{macrocode}
+% If we end up here we have just scanned a |\^^M| or something
+% similar. Since this will be treated like \verb*+\ + by \TeX{} we
+% produce a corresponding index entry.
+% \begin{macrocode}
+ \it@is@a\space \else
+% \end{macrocode}
+% If it is the token |\relax| we do nothing. This can't happen
+% when the `doc' package is used in the way described here, but was
+% added to allow extensions like the \texttt{idxverb} option.
+% \changes{v1.5t}{1989/11/14}{Added \cs{relax} as a possible token to
+% allow extensions.}
+% \begin{macrocode}
+ \ifx#1\relax \else
+% \end{macrocode}
+% The next three branches are needed because of bugs in
+% our \textsf{makeindex} program. You can't produce unbalanced index
+% entries\footnote{This is possible for \TeX{} if you use
+% \texttt{\string{$_{12}$ \rmfamily or
+% \ttfamily\string}$_{12}$},
+% but \textsf{makeindex} will complain.}
+% and you have to double a percent character. To get around these
+% restrictions we use special macros to produce the |\index|
+% calls.\footnote{Brian \textsc{Hamilton Kelly} has written fixes for
+% all three
+% bugs. When they've found their way through all
+% installations,
+% the lines above will be removed. See
+% page~\pageref{bug:fixes} if you already have them.
+% (I'm not sure which versions incorporate these, but
+% 2.11 is OK. See also
+% \pageref{makeindex:version}.)}
+% \begin{macrocode}
+ \if\noexpand#1\bgroup \LeftBraceIndex \else
+ \if\noexpand#1\egroup \RightBraceIndex \else
+ \if\noexpand#1\percentchar \PercentIndex \else
+% \end{macrocode}
+% All remaining characters are used directly to produce their index
+% entries. This is possible even for the characters which have
+% special meanings in the index program, provided we quote the
+% characters. (This is correctly done in |\it@is@a|.)
+% \begin{macrocode}
+ \it@is@a{\string#1}%
+% \end{macrocode}
+% We now need a whole pile of |\fi|$\,$s to match up with
+% the |\if|$\,$s.
+% \begin{macrocode}
+ \fi \fi \fi \fi \fi \fi \fi \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\macro@name}
+% We now come to the macro which assembles command names which
+% consist of one or more `letters' (which might well include
+% |@| symbols, or anything else which has a |\catcode| of
+% 11).
+%
+% To do this we add the `letter' to the existing definition of
+% |\macro@namepart| (which you will recall was originally set
+% to |\@empty|).
+% \begin{macrocode}
+\def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}%
+% \end{macrocode}
+% Then we grab hold of the {\em next\/} single character and let
+% |\more@macroname| determine whether it belongs to the letter
+% string forming the command name or is a `non-letter'.
+% \begin{macrocode}
+ \futurelet\next\more@macroname}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \begin{macro}{\more@macroname}
+%
+% This causes another call of |\macro@name| to add in the next
+% character, if it is indeed a `letter'.
+% \begin{macrocode}
+\def\more@macroname{\ifcat\noexpand\next a%
+ \let\next\macro@name
+% \end{macrocode}
+% Otherwise, it finishes off the index entry by invoking
+% |\macro@finish|.
+% \begin{macrocode}
+ \else \let\next\macro@finish \fi
+% \end{macrocode}
+% Here's where we invoke whatever macro was |\let| equal to
+% |\next|.
+% \begin{macrocode}
+ \next}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \begin{macro}{\macro@finish}
+% When we've assembled the full `letter'-string which forms the
+% command name, we set the characters forming the entire command
+% name, and generate an appropriate |\index| command (provided
+% the command name is not on the list of exclusions). The
+% `|\|' is already typeset; therefore we only have to output
+% all `letters' saved in |\macro@namepart|.
+% \begin{macrocode}
+\def\macro@finish{%
+ \macro@namepart
+% \end{macrocode}
+% Then we call |\ifnot@excluded| to decide whether we have to
+% produce an index entry. The construction with |\@tempa| is
+% needed because we want the expansion of |\macro@namepart| in
+% the |\index| command.\footnote{The \texttt{\bslash index}
+% command will expand its argument in the \texttt{\bslash output}
+% routine. At this time \texttt{\bslash macro@namepart} might have a
+% new value.}
+% \begin{macrocode}
+ \ifnot@excluded
+ \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
+ \@tempa \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \subsection[The index exclude list]{The index exclude
+% list\footnotemark}
+% \footnotetext{Warning: the incomplete commentary on
+% \texttt{\bslash DoNotIndex} and the macros it calls
+% was written by Dave Love.}
+%
+% The internal form of the index exclude list is
+% \begin{quote}
+% \meta{macro name}|,|\meta{macro name}|,|
+% \ldots|,|
+% \end{quote}
+% where \meta{macro name} is a macro name like
+% $"\"_{12}"p"{_{11}}"@"_{11}$ or $"\"_{12}"$"_{11}$. Note that the "\"
+% has category `other' and the other characters in the name are all
+% `letter', regardless of their normal category.
+%
+% \begin{macro}{\DoNotIndex}
+% This macro is used to suppress macro names in the index. It
+% starts off with a new group because we have to change the
+% |\catcode|$\,$s of all characters which belong to `letters'
+% while macros are defined.
+% \begin{macrocode}
+\def\DoNotIndex{\begingroup \MakePrivateLetters
+ \catcode`\\12
+% \end{macrocode}
+% Then we call the macro which actually reads the argument given by
+% the user.
+% \begin{macrocode}
+ \do@not@index}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\do@not@index}
+% We make the |\do@not@index| macro |\long|
+% since the user might want to exclude the |\par|
+% macro.
+% \begin{macrocode}
+\long\def\do@not@index#1{%
+% \end{macrocode}
+% It just adds to a token list after finishing the group in which
+% the catcodes were changed.
+% \changes{v1.7a}{1992/02/26}{Replaced with newdoc version.}
+% \begin{macrocode}
+ \endgroup
+ \addto@hook\index@excludelist{#1,}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\addto@hook}
+% The code for adding tokens (the second argument) to a token list
+% (the first argument) is taken from~\cite{art:verbatim}, but it needs
+% to be "\long" in case "\par" is amongst the tokens.
+% \begin{macrocode}
+\long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\index@excludelist}
+% We need an initially-empty register for the excluded list.
+% \begin{macrocode}
+\newtoks\index@excludelist
+\index@excludelist{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifnot@excluded}
+% \changes{v1.7a}{1992/02/26}{Replaced with newdoc version.}
+% \begin{macro}{\expanded@notin}
+% Now we take a look at the |\index@excludelist| to see
+% whether a macro name saved in |\macro@namepart| should
+% produce an index entry. This macro is a pseudo |\if|; it
+% should expand to |\iftrue| or |\iffalse| depending on
+% the contents of |\index@excludelist|.
+% \begin{macrocode}
+\begingroup
+% \end{macrocode}
+% First we change "\catcode"s so that "\" is `other' and "|" a
+% temporary for the escape character. This is necessary since our
+% macro names are stored that way in the "\index@excludelist".
+% \begin{macrocode}
+\catcode`\|=0%
+\catcode`\\=12
+% \end{macrocode}
+% Then we define "\ifnot@excluded" to call "\expanded@notin" with
+% two arguments: the first is the string "\" followed by the
+% contents of "\macro@namepart" followed by a "," and the second is
+% "\the" followed by "\index@excludelist". To achieve the expansion
+% of "\macro@namepart", i.e.\ to pass its contents, we need a
+% suitable number of "\expandafter"s.
+% \SpecialEscapechar{\|}
+% \begin{macrocode}
+|gdef|ifnot@excluded{|expandafter
+ |expanded@notin|expandafter{|expandafter
+ \|macro@namepart,}{|the|index@excludelist}}
+|endgroup
+% \end{macrocode}
+% The macro "\expanded@notin" now does the dirty work. It first
+% defines a macro "\in@@" with a very special parameter text. If
+% you look closely "\in@@" has three arguments, the first one is
+% delimited by the first argument of "\expanded@notin" (i.e.\ by
+% the string starting with a "\" and ending with a "," above), the
+% second is undelimited (which means that it will get the next
+% token after our string, and the third is delimited again and will
+% get the rest up to the token "\in@@". In other words the token
+% "\in@@" is also used as a delimiter.
+% \begin{macrocode}
+\def\expanded@notin#1#2{%
+ \def\in@@##1#1##2##3\in@@{%
+% \end{macrocode}
+% Now the replacement text simply compares the second argument
+% (i.e.\ the undelimited one after our string) to the token
+% "\expanded@notin". This is an unclosed "\ifx" statement which
+% means that this macro behaves similar to a normal \TeX{}
+% conditional.
+% \begin{macrocode}
+ \ifx\expanded@notin##2}%
+% \end{macrocode}
+% After all these preparations we call "\in@@". First we expand the
+% token after "\in@@" (which is "\the" from the second argument to
+% "\expanded@notin"). As a result we get the contents of the
+% "\index@excludelist" inserted after "\in@@". After this contents
+% we add once more the string we are looking for, then the token
+% "\expanded@notin" and finally the token "\in@@".
+% \begin{macrocode}
+ \expandafter\in@@#2#1\expanded@notin\in@@}
+% \end{macrocode}
+% Now what happens when the macro "\in@@" above gets called? The
+% first argument to "\in@@" is delimited by our string. In other
+% words it will get everything from the contents of
+% "\index@excludelist" before this string. If the string is not in
+% "\index@excludelist" then it gets the whole contents, since after
+% it we had inserted the string one more. In this case the next
+% token is "\expanded@notin" which gets assigned to the second
+% argument and the third argument will be empty. If, on the other
+% hand, the string was inside "\index@excludelist" then the second
+% argument will not be the token "\expanded@notin" and the third
+% argument will be all the garbage up to "\in@@". Therefore testing
+% the seconded argument, as done in the definition of "\in@@" will
+% tell us whether or not the string is in "\index@includelist" and
+% this was exactly what we wanted. (Deep breath.) You got
+% that?\footnote{\TeX{}book page 125. The code described above is
+% originally due to Michael Spivak who used a similar method within
+% the \AmSTeX{} macros.}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+%
+%
+%
+% \subsection{Macros for generating index entries}
+%
+% Here we provide default definitions for the macros invoked to create
+% index entries; these are either invoked explicitly, or automatically
+% by |\scan@macro|. As already mentioned, the definitions given
+% here presuppose that the |.idx| file will be processed by
+% Chen's \textsf{makeindex} program --- they may be redefined for use
+% with the user's favourite such program.
+%
+% To assist the reader in locating items in the index, all such
+% entries are sorted alphabetically {\em ignoring\/} the initial
+% `|\|'; this is achieved by issuing an |\index| command which
+% contains the `actual' operator for \textsf{makeindex}. The default
+% value for the latter operator is `|@|', but the latter character is
+% so popular in \LaTeX\ package files that it is necessary to substitute
+% another character. This is indicated to \textsf{makeindex} by means
+% of an `index style file'; the character selected for this function
+% is |=|, and therefore this character too must be specially treated
+% when it is met in a \TeX\ command. A suitable index style file is
+% provided amongst the supporting files for this style file in
+% \texttt{gind.ist} and is generated from this source by processing
+% with \texttt{docstrip} to extract the module \textbf{gind}. A
+% similar style file \texttt{gglo.ist} is supplied for sorting the
+% change information in the glossary file and is extracted as module
+% \textbf{gglo}. First of all we add some information to the front of
+% the \texttt{.ist} files. \changes{v1.7a}{1992/03/11}{glo.ist and
+% gind.ist now derivable from doc.dtx with docstrip.}
+% \begin{macrocode}
+%</package>
+%<+gind|gglo>%% This is a MAKEINDEX style file which should be used to
+%<+gind>%% generate the formatted index for use with the doc
+%<+gglo>%% generate the formatted change history for use with the doc
+%<+gind|gglo>%% package. The TeX commands used below are defined in
+%<+gind|gglo>%% doc.sty. The commands for MAKEINDEX like `level'
+%<+gind|gglo>%% `item_x1' are described in `` Makeindex, A General
+%<+gind|gglo>%% Purpose, Formatter-Independent Index Processor'' by
+%<+gind|gglo>%% Pehong Chen.
+%<+gind|gglo>
+% \end{macrocode}
+%
+% \begin{macro}{\actualchar}
+% \begin{macro}{\quotechar}
+% \begin{macro}{\levelchar}
+% First come the definitions of |\actualchar|,
+% |\quotechar| and |\levelchar|. Note, that our defaults
+% are not the ones used by the \textsf{makeindex} program without a
+% style file.
+% \begin{macrocode}
+%<*package>
+\@ifundefined{actualchar}{\def\actualchar{=}}{}
+\@ifundefined{quotechar}{\def\quotechar{!}}{}
+\@ifundefined{levelchar}{\def\levelchar{>}}{}
+%</package>
+%<+gind|gglo>actual '='
+%<+gind|gglo>quote '!'
+%<+gind|gglo>level '>'
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\encapchar}
+% The \textsf{makeindex} default for the |\encapchar| isn't
+% changed.
+% \begin{macrocode}
+\@ifundefined{encapchar}{\def\encapchar{|}}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\verbatimchar}
+% We also need a special character to be used as a delimiter for
+% the |\verb*| command used in the definitions below.
+% \begin{macrocode}
+\@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\SpecialIndex}
+% The |\SpecialIndex| command creates index entries for
+% macros. If the argument is |\|$xyz$, the command produces
+% \verb|\indexentry{|$xyz$\verb|=\verb!*+\|$xyz$\verb|+}{|$n$\verb|}|
+% given the above defined defaults for |\actualchar|,
+% |\quotechar| and |\verbatimchar|. We first remove the
+% initial `|\|' to get a better index.
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \begin{macrocode}
+\def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble
+ \string#1\actualchar
+% \end{macrocode}
+% Then follows the actual entry. A |\quotechar| is placed
+% before the |*| to allow its use as a special \textsf{makeindex}
+% character. Again |\@bsphack| and |\@esphack| are used
+% to make the macros invisible.
+% \begin{macrocode}
+ \string\verb\quotechar*\verbatimchar\string#1\verbatimchar}%
+ \@esphack}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\SpecialMainIndex}
+% \begin{macro}{\SpecialMainEnvIndex}
+% \begin{macro}{\SpecialUsageIndex}
+% The |\SpecialMainIndex| macro is used to cross-reference the
+% names introduced by the \textsf{macro} environment. The action is
+% as for |\SpecialIndex|, except that \textsf{makeindex} is
+% instructed to `encap'sulate the entry with the string
+% \verb=|main= to cause it to generate a call of the |\main|
+% macro.
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \changes{v2.0c}{1998/08/22}{Correctly handle single character
+% control sequences like \cs{<}.}
+%
+% |\SpecialMainIndex| passes the macro name to be indexed on to the
+% macro |\SpecialIndex@|.
+% \begin{macrocode}
+\def\SpecialMainIndex#1{\@bsphack\SpecialIndex@{#1}{\encapchar main}%
+ \@esphack}
+% \end{macrocode}
+%
+% \begin{macro}{\SpecialIndex@}
+% \changes{v2.0c}{1998/08/22}{Macro added.}
+% \changes{v2.0f}{1999/02/27}{Temp fix to allow strange code in arg 1
+% (PR 2968)}
+% The macro |\SpecialIndex@| does the real work for |\SpecialMainIndex|
+% and |\SpecialUsageIndex|. It takes two arguments: the macro to be
+% indexed (as a control sequence or list of character tokens) and the
+% additional text for the index.
+% \changes{v2.0g}{1999/03/22}{Correct so-called temp fix. I'm not going to
+% explain this.}
+% \begin{macrocode}
+\begingroup
+ \catcode`\|=0
+ \catcode`\\=12
+ |gdef|@SpecialIndexHelper@#1#2|@nil{%
+ |if |noexpand#1\%
+ |gdef|@gtempa{#2}%
+ |else
+ |begingroup
+ |escapechar|m@ne
+ |expandafter|gdef|expandafter|@gtempa|expandafter{|string#1#2}%
+ |endgroup
+ |fi}
+|endgroup
+\def\SpecialIndex@#1#2{%
+% \end{macrocode}
+% The first thing it does is to convert the macro into a list of
+% characters. Note that a character token list remains (mostly) unchanged.
+% \begin{macrocode}
+ \@SpecialIndexHelper@#1\@nil
+% \end{macrocode}
+% The macro name \verb*|\ | has to handled in a special way. The reason
+% is that the space token is skipped when \TeX\ is scanning macro
+% parameters, so that the trick used below will not work.
+% So, we check whether the replacement text of |\@tempa| starts with
+% a space token and write the appropriate index entry.
+% \begin{macrocode}
+ \def\@tempb{ }%
+ \ifcat \@tempb\@gtempa
+ \special@index{\quotechar\space\actualchar
+ \string\verb\quotechar*\verbatimchar
+ \quotechar\bslash\quotechar\space\verbatimchar#2}%
+ \else
+% \end{macrocode}
+% Having handled this special case we have to distinguish control
+% sequences consisting of one or more
+% letters and those that consists of exactly one nonletter. As character
+% tokens in the replacement text of the macro |\@gtempa| have all
+% category code $12$ (other), this is difficult. For simplicity, we treat
+% all single character control sequences alike, irregardless of whether
+% the character is a letter or not. This has the advantage that it works
+% even for strange settings of the category codes.
+%
+% We define a utility macro |\@tempb| with two arguments, the second
+% delimited by |\relax|.
+% It will be called later so that the first argument is the first character
+% of the macro name, and the second argument receives the rest of the
+% characters. So we distinguish the two cases above by checking whether
+% the second argument is empty.
+% \begin{macrocode}
+ \def\@tempb##1##2\relax{\ifx\relax##2\relax
+% \end{macrocode}
+% If so, we define the helper macro |\@tempc| in a way that it
+% adds quotechars in critical places.
+% \begin{macrocode}
+ \def\@tempc{\special@index{\quotechar##1\actualchar
+ \string\verb\quotechar*\verbatimchar
+ \quotechar\bslash\quotechar##1\verbatimchar#2}}%
+% \end{macrocode}
+% Otherwise we write the characters as in |\SpecialIndex|.
+% \begin{macrocode}
+ \else
+ \def\@tempc{\special@index{##1##2\actualchar
+ \string\verb\quotechar*\verbatimchar
+ \bslash##1##2\verbatimchar#2}}%
+ \fi}%
+% \end{macrocode}
+% Now pass the list of characters to \@tempb and call \@tempc to do the
+% work.
+% \begin{macrocode}
+ \expandafter\@tempb\@gtempa\relax
+ \@tempc
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% Slightly simpler is the main entry for environments
+% \changes{v1.9e}{1994/02/03}{use \cs{ttfamily} with \cs{string}}
+% \changes{v1.9f}{1994/02/07}{should have used \cs{noexpand}, sigh}
+% \changes{v1.9i}{1994/02/11}{should have used \cs{protect}}
+% \changes{v1.9j}{1994/02/16}{Back to string:-)}
+% \changes{v1.9s}{1994/10/14}{Added missing percent and changed to
+% \cs{ttfamily}}
+% \changes{v2.0d}{1998/12/20}{Correctly handle second index entry
+% by using \cs{special@index} not \cs{index} (PR/2928).}
+% \changes{v2.0e}{1998/12/28}{Use \cs{string}, not \cs{protect} in argument to
+% \cs{special@index}.}
+% \changes{v2.1c}{2004/07/23}{environment names incorrectly sorted in
+% index (pr/3615)}
+% \begin{macrocode}
+\def\SpecialMainEnvIndex#1{\@bsphack\special@index{%
+ #1\actualchar
+ {\string\ttfamily\space#1}
+ (environment)%
+ \encapchar main}%
+ \special@index{environments:\levelchar#1\actualchar{%
+ \string\ttfamily\space#1}\encapchar
+ main}\@esphack}
+% \end{macrocode}
+% The |\SpecialUsageIndex| is similar to |\SpecialMainIndex|, except
+% that it uses the standard |\index| command.
+% \texttt{usage} instead of \texttt{main}.
+% \begin{macrocode}
+\def\SpecialUsageIndex#1{\@bsphack
+ {\let\special@index\index\SpecialIndex@{#1}{\encapchar usage}}%
+ \@esphack}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\SpecialEnvIndex}
+% Indexing environments is done a little bit differently; we produce
+% two index entries with the |\SpecialEnvIndex| macro:
+% \changes{v1.9e}{1994/02/03}{The index needs protecting}
+% \changes{v1.9g}{1994/02/08}{should have used \cs{noexpand}, sigh}
+% \changes{v1.9i}{1994/02/11}{should have used \cs{protect}}
+% \begin{macrocode}
+\def\SpecialEnvIndex#1{\@bsphack
+% \end{macrocode}
+% First we sort the environment under its own name stating in the
+% actual entry that this is an environment.
+% \begin{macrocode}
+ \index{#1\actualchar{\protect\ttfamily#1}
+ (environment)\encapchar usage}%
+% \end{macrocode}
+% The second entry is sorted as a subitem under the key
+% `environments:'.
+% \changes{v2.1b}{2004/02/09}{environment names incorrectly sorted in
+% index (pr/3615)}
+% \begin{macrocode}
+ \index{environments:\levelchar#1\actualchar
+ {\protect\ttfamily#1}\encapchar usage}\@esphack}
+% \end{macrocode}
+% Because both entries correspond to `descriptions' of the
+% environment, we encapsulate the page numbers with the
+% |\usage| macro.
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\SortIndex}
+% This macro is used to generate the index entries for any
+% single-character command that |\scan@macro| encounters. The
+% first parameter specifies the lexical order for the character,
+% whilst the second gives the actual characters to be printed in
+% the entry. It can also be used directly to generate index entries
+% which differ in sort key and actual entry.
+% \begin{macrocode}
+\def\SortIndex#1#2{\index{#1\actualchar#2}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\it@is@a}
+% This macro is supposed to produce a correct |\SortIndex|
+% entry for a given character. Since this character might be
+% recognised as a `command' character by the index program used,
+% all characters are quoted with the |\quotechar|.
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \begin{macrocode}
+\def\it@is@a#1{\special@index{\quotechar #1\actualchar
+ \string\verb\quotechar*\verbatimchar
+ \quotechar\bslash\quotechar#1\verbatimchar}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\LeftBraceIndex}
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \begin{macro}{\RightBraceIndex}
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)} These
+% two macros fix the problems with \textsf{makeindex}. Note the
+% `hack' with |\iffalse}\fi| to satisfy both \TeX{} and the
+% \textsf{makeindex} program. When this is written to the
+% \texttt{.idx} file \TeX{} will see both braces (so we get a
+% balanced text). \textsf{makeindex} will also see balanced braces
+% but when the actual index entry is again processed by \TeX{} the
+% brace in between |\iffalse| |\fi| will vanish.
+% \begin{macrocode}
+\@ifundefined{LeftBraceIndex}{\def\LeftBraceIndex{%
+ \special@index{\bgroup\actualchar\string\verb\quotechar*\verbatimchar
+ \quotechar\bslash{\verbatimchar\string\iffalse}\string\fi}}}{}
+
+\@ifundefined{RightBraceIndex}{\def\RightBraceIndex{%
+ \special@index{\egroup\actualchar\string\iffalse{\string\fi\string\verb
+ \quotechar*\verbatimchar\quotechar\bslash}\verbatimchar}}}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\PercentIndex}
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \changes{v1.7c}{1992/03/25}{Default now for bug-fixed makeindex}
+% By default we assume a version of \textsf{makeindex} without the
+% percent bug is being used.
+% \begin{macrocode}
+\@ifundefined{PercentIndex}
+ {\def\PercentIndex{\it@is@a\percentchar}}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\OldMakeindex}
+% \changes{v1.7c}{1992/03/26}{Replaced \cs{NewMakeIndex}.}
+% \begin{macro}{\percentchar}
+% Here is one solution for the percent bug in \textsf{makeindex}.
+% The macro |\percentchar| denotes a |%|$_{12}$. Calling this from
+% a package or the driver file sets things up
+% appropriately.\label{bug:fixes}
+% \begin{macrocode}
+\def\OldMakeindex{\def\PercentIndex{%
+ \special@index{\quotechar\percentchar\actualchar\string\verb
+ \quotechar*\verbatimchar\quotechar\bslash
+ \percentchar\percentchar\verbatimchar}}}
+{\catcode`\%=12 \gdef\percentchar{%}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+%
+%
+% \subsection{Redefining the \textsf{index} environment}
+%
+%\changes{v1.4r}{1989/04/22}{twocols env. placed into separate file}
+%\changes{v1.4?}{1989/04/19}{use DEK's algorithm and implement
+% a twocols env.}
+%\changes{v1.4?}{1989/04/16}{changes to the index env.}
+%\changes{v1.5a}{1989/04/26}{Now input multicol.sty instead of
+% multcols.sty}
+% \begin{macro}{\ifhave@multicol}
+% \changes{v1.7a}{1992/03/04}{Added to support avoiding multicol.sty} By
+% default the index is set in three columns, and will start on the
+% same page as, and underneath, the last part of the text of the
+% documented package file, if possible. The last page will be
+% reformatted with balanced columns. This requires the
+% \textsf{multicols} environment which is described elsewhere. So
+% that \DOC{} can be run independently of
+% \texttt{multicol.sty} we first check for its existence and set
+% the "have@multicol" flag appropriately for use below.
+% \changes{v1.9a}{1993/12/02}{Use \cs{IfFileExists}}
+% \changes{v1.9m}{1994/04/28}{Use \cs{RequirePackage} to load multicol}
+% \begin{macrocode}
+\newif\ifhave@multicol
+% \end{macrocode}
+% If we found \texttt{multicol.sty} we use it. It would be nice to
+% delay this (and the re-definition of "theindex") until we knew
+% whether an index was actually required \ldots
+% \begin{macrocode}
+\IfFileExists{multicol.sty}{\have@multicoltrue
+ \RequirePackage{multicol}%
+ }{}
+% \end{macrocode}
+% \end{macro}
+
+%
+% \begin{macro}{\IndexMin}
+% \begin{macro}{\c@IndexColumns}
+% \changes{v1.4t}{1989/04/24}{Counter added.}
+% If \texttt{multicol} is in use,
+% when the index is started we compute the remaining space on the
+% current page; if it is greater than |\IndexMin|, the first
+% part of the index will then be placed in the available space.
+% The number of columns set is controlled by the counter
+% |\c@IndexColumns| which can be changed with a
+% |\setcounter| declaration.
+% \begin{macrocode}
+\newdimen\IndexMin \IndexMin = 80pt
+\newcount\c@IndexColumns \c@IndexColumns = 3
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{environment}{theindex}
+% Now we start the multi-column mechanism, if appropriate. We use the
+% \LaTeX{} counter |\c@IndexColumns| declared above to denote
+% the number of columns and insert the `index prologue' text (which
+% might contain a |\section| call, etc.). See the default
+% definition for an example.
+% \changes{v1.4t}{1989/04/24}{Incorporated new multicols env.}
+% \changes{v1.5a}{1989/04/26}{Call multicols first}
+% \changes{v1.6e}{1991/04/03}{Turned into env definition.}
+% \changes{v1.7a}{1992/03/04}{Include test for multicols.}
+% \begin{macrocode}
+\ifhave@multicol
+ \renewenvironment{theindex}
+ {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
+% \end{macrocode}
+% Then we make a few last minute assignments to read the individual
+% index |\item|$\,$s and finish off by ignoring any initial
+% space.
+% \begin{macrocode}
+ \IndexParms \let\item\@idxitem \ignorespaces}%
+% \end{macrocode}
+%
+% \begin{macro}{\endtheindex}
+% \changes{v1.4t}{1989/04/24}{Incorporated new multicols env.}
+% At the end of the index, we have only to end the \textsf{multicols}
+% environment.
+% \begin{macrocode}
+ {\end{multicols}}
+% \end{macrocode}
+% If we can't use \textsf{multicols} we warn the user and use an
+% environment that's basically the one from \texttt{article.sty}.
+% \begin{macrocode}
+\else
+ \typeout{Can't find multicol.sty -- will use normal index layout if
+ necessary.}
+ \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
+ \columnseprule \z@ \columnsep 35\p@
+ \twocolumn[\index@prologue]%
+ \IndexParms \let\item\@idxitem \ignorespaces}
+ \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+% Here are the necessary \textsf{makeindex} declarations. We disable
+% scanning of macro names inside the index with "\scan@allowedfalse\n"
+% to avoid recursion.
+% \begin{macrocode}
+%</package>
+%<+gind>preamble
+%<+gind>"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
+%<+gind>postamble
+%<+gind>"\n\n \\end{theindex}\n"
+%<*package>
+% \end{macrocode}
+%
+%
+% \begin{macro}{\IndexPrologue}
+% \begin{macro}{\index@prologue}
+% \changes{v1.9w}{1995/12/27}{Text changed}
+% \changes{v1.9x}{1996/01/11}{Text depends on code lines used}
+% The |\IndexPrologue| macro is used to place a short message
+% into the document above the index. It is implemented by
+% redefining |\index@prologue|, a macro which holds the
+% default text. We'd better make it a |\long| macro to allow
+% |\par| commands in its argument.
+% \begin{macrocode}
+\long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
+% \end{macrocode}
+% Now we test whether the default is already defined by another
+% package file. If not we define it.
+% \changes{v2.0j}{2000/05/22}{Less obscure wording? (CAR pr/3202)}
+% \begin{macrocode}
+\@ifundefined{index@prologue}
+ {\def\index@prologue{\section*{Index}%
+ \markboth{Index}{Index}%
+ Numbers written in italic refer to the page
+ where the corresponding entry is described;
+ numbers underlined refer to the
+ \ifcodeline@index
+ code line of the
+ \fi
+ definition; numbers in roman refer to the
+ \ifcodeline@index
+ code lines
+ \else
+ pages
+ \fi
+ where the entry is used.
+ }}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\IndexParms}
+% These are some last-minute assignments for formatting the index
+% entries. They are defined in a separate macro so that a user can
+% substitute different definitions. We start by defining the
+% various parameters controlling leading and the separation between
+% the two columns. The entire index is set in |\small| size.
+% \begin{macrocode}
+\@ifundefined{IndexParms}
+ {\def\IndexParms{%
+ \parindent \z@
+ \columnsep 15pt
+ \parskip 0pt plus 1pt
+ \rightskip 15pt
+ \mathsurround \z@
+ \parfillskip=-15pt
+ \small
+% \end{macrocode}
+% \begin{macro}{\@idxitem}
+% \begin{macro}{\subitem}
+% \begin{macro}{\subsubitem}
+% Index items are formatted with hanging indentation for any items
+% which may require more than one line.
+% \begin{macrocode}
+ \def\@idxitem{\par\hangindent 30pt}%
+% \end{macrocode}
+% Any sub-item in the index is formatted with a 15pt indentation
+% under its main heading.
+% \begin{macrocode}
+ \def\subitem{\@idxitem\hspace*{15pt}}%
+% \end{macrocode}
+% Whilst sub-sub-items go in a further 10pt.
+% \begin{macrocode}
+ \def\subsubitem{\@idxitem\hspace*{25pt}}%
+% \end{macrocode}
+% \begin{macro}{\indexspace}
+% The \textsf{makeindex} program generates an |\indexspace|
+% before each new alphabetic section commences. After this final
+% definition we end the |\@ifundefined| and the definition of
+% |\IndexParms|.
+% \begin{macrocode}
+ \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
+ }}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\efill}
+% This definition of |\efill| is intended to be used after index
+% items which have no following text (for example, ``\textit{
+% see\/}'' entries). It just ensures that the current line is
+% filled, preventing ``|Underfull \hbox|'' messages.
+% \begin{macrocode}
+\def\efill{\hfill\nopagebreak}%
+%</package>
+%<+gind|gglo>item_x1 "\\efill \n \\subitem "
+%<+gglo>item_x2 "\\ "
+%<+gind>item_x2 "\\efill \n \\subsubitem "
+%<*package>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\pfill}
+% \begin{macro}{\dotfil}
+% \begin{macro}{\dotfill}
+% The following definitions provide the |\pfill| command; if
+% this is specified in the index style file to \textsf{makeindex} as
+% the delimiter to appear after index items, then the intervening
+% space before the referenced page numbers will be filled with
+% dots, with a little white space interpolated at each end of the
+% dots. If the line is broken the dots will show up on both lines.
+% \changes{v2.1i}{2018/09/25}{Guard against following \cs{unskip} (git/23)}
+% \begin{macrocode}
+\def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus 1fill\kern\z@}%
+\def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil\kern\z@}%
+\def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
+ \dotfil~\ignorespaces}%
+%</package>
+%<+gind|gglo>delim_0 "\\pfill "
+%<+gind|gglo>delim_1 "\\pfill "
+%<+gind|gglo>delim_2 "\\pfill "
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\*}
+% Here is the definition for the |\*| macro. It isn't used in
+% this set of macros.
+% \begin{macrocode}
+\def\*{\leavevmode\lower.8ex\hbox{$\,\widetilde{\ }\,$}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\main}
+% The \textit{defining\/} entry for a macro name is flagged with
+% the string \texttt{\encapchar main}\footnote{With the current
+% definition of \texttt{\bslash encapchar} substituted for
+% \texttt{\encapchar}} in the |\index| command; \textsf{makeindex}
+% processes this so that the |\main| macro will be invoked to
+% underline the page number(s) on which the {\em definition\/} of
+% the macro will be found.
+% \begin{macrocode}
+\@ifundefined{main}{\def\main#1{\underline{#1}}}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\usage}
+% The |\usage| macro is used to indicate entries describing
+% the usage of a macro. The corresponding page number(s) will be
+% set in \textit{italics}.
+% \begin{macrocode}
+\@ifundefined{usage}{\def\usage#1{\textit{#1}}}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\PrintIndex}
+% \changes{v1.5k}{1989/09/04}{\cs{printindex} changed to
+% \cs{PrintIndex}}
+% \changes{v1.7a}{1992/02/26}{Documentation moved to interface section.}
+% \changes{v1.9h}{1994/02/10}{Use \cs{@input@} instead of \cs{@input}.}
+% \changes{v1.9w}{1995/12/29}{Turn the cmd into a noop after use.}
+% This is the same as "\printindex" in the \textsf{makeidx} package.
+% \begin{macrocode}
+\def\PrintIndex{\@input@{\jobname.ind}%
+ \global\let\PrintIndex\@empty}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\printindex}
+% Since the above macro was called |\printindex| in older versions
+% of \texttt{doc.sty} the following definition was provided up to
+% version 1.9y.
+% \changes{v1.9z}{1996/04/17}{Commented out}
+% \begin{macrocode}
+%\def\printindex{\typeout{\string\printindex\space is obsolete!}%
+% \typeout{Please use \string\PrintIndex\space
+% if you are a macro implementor^^J
+% or get a newer version of the documented
+% software if you are a user}%
+% \PrintIndex}
+% \end{macrocode}
+% \end{macro}
+%
+% We want headings in the index (and changes list) according to the
+% initial character of the next block of entries and have to instruct
+% \textsf{makeindex} appropriately. Unfortunately the specification
+% for this changed sometime between versions 2.4 and 2.11 of
+% \textsf{makeindex}. We provide both ways of doing it but
+% unfortunately this will always produce a warning message from
+% \textsf{makeindex}. This is for older versions:
+% \changes{v1.7h}{1992/07/01}{Turn off headings in gls file}
+% \begin{macrocode}
+%</package>
+%<+gind,gglo>% The next lines will produce some warnings when
+%<+gind,gglo>% running Makeindex as they try to cover two different
+%<+gind,gglo>% versions of the program:
+%<+gind,gglo>lethead_prefix "{\\bfseries\\hfil "
+%<+gind,gglo>lethead_suffix "\\hfil}\\nopagebreak\n"
+%<+gind>lethead_flag 1
+%<+gglo>lethead_flag 0
+% \end{macrocode}
+% This works for newer ones:
+% \begin{macrocode}
+%<+gind,gglo>heading_prefix "{\\bfseries\\hfil "
+%<+gind,gglo>heading_suffix "\\hfil}\\nopagebreak\n"
+%<+gind>headings_flag 1
+%<+gglo>headings_flag 0
+%<*package>
+% \end{macrocode}
+%
+%
+%
+% \subsection[Dealing with the change history]
+% {Dealing with the change history\footnotemark}
+% \footnotetext{The whole section was proposed by Brian \textsc{Hamilton
+% Kelly}. He also documented and debugged the macros as
+% well as many other parts of this package.}
+%
+% To provide a change history log, the |\changes| command has
+% been introduced. This takes three arguments, respectively, the
+% version number of the file, the date of the change, and some detail
+% regarding what change has been made. The second of these arguments
+% is otherwise ignored, but the others are written out and may be used
+% to generate a history of changes, to be printed at the end of the
+% document. However, note that older versions of Chen's standard
+% \textsf{makeindex}
+% program limit any textual field to just 64 characters; therefore,
+% is important that the number of characters in the second and third
+% parameters should not exceed 61 altogether (to allow for the
+% parentheses placed around the date).
+%
+% \begin{macro}{\changes}
+% \changes{BHK}{1989/04/26}{Documented \texttt{\protect\bslash changes}
+% command.}
+% \changes{BHK}{1989/04/26}{Changed definition of
+% \texttt{\protect\bslash protect}.} The output of the |\changes|
+% command goes into the \meta{Glossary\_File} and therefore uses
+% the normal |\glossaryentry| commands.\footnote{Note that a recent
+% change in \LaTeX{} 2.09 changed the command name in the
+% \texttt{.glo} file from \texttt{\bslash indexentry} to
+% \texttt{\bslash glossaryentry}. It is therefore necessary to
+% have a special \textsf{makeindex} style file called
+% \texttt{gglo.ist} to process this file correctly.} Thus
+% \textsf{makeindex} or a similar program can be used to process
+% the output into a sorted ``glossary''. The |\changes| command
+% commences by taking the usual measures to hide its spacing, and
+% then redefines |\protect| for use within the argument of the
+% generated |\indexentry| command.
+%
+% We re-code nearly all chars found in |\sanitize| to letter
+% since the use of special package which make some characters
+% active might upset the |\changes| command when writing its
+% entries to the file. However we have to leave |%| as comment
+% and \verb*+ + as \meta{space} otherwise chaos will happen.
+% And, of course the |\| should be available as escape
+% character.
+% \changes{v1.5v}{1990/01/28}{`Re-code a lot of chars.}
+% \changes{v1.5m}{1989/09/20}{\cs{actualchar} in second level removed.}
+% \changes{v1.5o}{1989/09/24}{New sorting.}
+% \changes{v1.6c}{1990/06/29}{Again new sorting.}
+% \changes{v1.9u}{1995/08/06}{Use \cs{protected@edef}}
+% \begin{macrocode}
+\def\changes{\@bsphack\begingroup\@sanitize
+ \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
+ \changes@}
+\def\changes@#1#2#3{%
+ \protected@edef\@tempa{\noexpand\glossary{#1\levelchar
+% \end{macrocode}
+% \changes{v1.9u}{1995/08/06}{Use value of \cs{saved@macroname} to
+% find out about change entries at outer level}
+% If the macro "\saved@macroname" doesn't contain any macro name
+% (ie is empty) the current changes entry was done at top-level.
+% In this case we precede it by "\generalname".
+% \begin{macrocode}
+ \ifx\saved@macroname\@empty
+ \space
+ \actualchar
+ \generalname
+ \else
+% \end{macrocode}
+% \changes{v2.1g}{2016/02/15}{Use \cs{saved@indexname}}
+% \begin{macrocode}
+ \saved@indexname
+ \actualchar
+ \string\verb\quotechar*%
+ \verbatimchar\saved@macroname
+ \verbatimchar
+ \fi
+ :\levelchar #3}}%
+ \@tempa\endgroup\@esphack}
+% \end{macrocode}
+%
+% \begin{macro}{\saved@macroname}
+% \changes{BHK}{1989/04/26}{Provided for sorting outside \textsf{macro}
+% environment} The entries are sorted for convenience by the name
+% of the most recently introduced macroname (i.e., that in the most
+% recent |\begin{macro}| command). We therefore provide
+% |\saved@macroname| to record that argument, and provide a default
+% definition in case |\changes| is used outside a \textsf{macro}
+% environment. (This is a {\em wicked\/} hack to get such entries
+% at the beginning of the sorted list! It works providing no macro
+% names start with "!" or |"|.) \changes{v1.7a}{1992/03/02}{Changed
+% string used for better sorting.}
+% \changes{v1.9u}{1995/08/06}{Now empty by default}
+% \begin{macrocode}
+\def\saved@macroname{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\saved@indexname}
+% \changes{v2.1g}{2016/02/15}{Use \cs{saved@indexname}}
+% The macroname being document without a backslash for the index
+% (or the environment name which doesn't have one in the first place).
+% \begin{macrocode}
+\def\saved@indexname{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\generalname}
+% \changes{v1.9u}{1995/08/06}{Macro added}
+% This macro holds the string placed before changes entries on
+% top-level.
+% \begin{macrocode}
+\def\generalname{General}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\RecordChanges}
+% \changes{BHK}{1989/04/26}{Renames former \texttt{\protect\bslash
+% PrintChanges} command.}
+% To cause the changes to be written (to a \texttt{.glo}) file, we
+% define |\RecordChanges| to invoke \LaTeX's usual
+% |\makeglossary| command.
+% \begin{macrocode}
+\let\RecordChanges\makeglossary
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\GlossaryMin}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% \begin{macro}{\c@GlossaryColumns}
+% \changes{BHK}{1989/04/26}{Added to support \texttt{\protect\bslash
+% changes}.} The remaining macros are all analogues of those used
+% for the \textsf{theindex} environment. When the glossary is
+% started we compute the space which remains at the bottom of the
+% current page; if this is greater than |\GlossaryMin| then the
+% first part of the glossary will be placed in the available space.
+% The number of columns set are controlled by the counter
+% |\c@GlossaryColumns| which can be changed with a |\setcounter|
+% declaration.
+% \begin{macrocode}
+\newdimen\GlossaryMin \GlossaryMin = 80pt
+\newcount\c@GlossaryColumns \c@GlossaryColumns = 2
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{environment}{theglossary}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% \changes{v1.5p}{1989/09/28}{Now call \cs{multicols} first.}
+% \changes{v1.6e}{1991/04/03}{Turned into env definition.}
+% \changes{v1.7a}{1992/03/10}{Changed to work without multicols if
+% necessary.}
+% \begin{macro}{\endglossary}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% The environment \textsf{theglossary} is defined in the same manner
+% as the \textsf{theindex} environment.
+% \begin{macrocode}
+\ifhave@multicol
+ \newenvironment{theglossary}{%
+ \begin{multicols}\c@GlossaryColumns
+ [\glossary@prologue][\GlossaryMin]%
+ \GlossaryParms \let\item\@idxitem \ignorespaces}%
+ {\end{multicols}}
+\else
+ \newenvironment{theglossary}{%
+ \@restonecoltrue\if@twocolumn\@restonecolfalse\fi
+ \columnseprule \z@ \columnsep 35\p@
+ \twocolumn[\glossary@prologue]%
+ \GlossaryParms \let\item\@idxitem \ignorespaces}
+ {\if@restonecol\onecolumn\else\clearpage\fi}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+% Here are the necessary \textsf{makeindex} declarations with scanning
+% disabled as for the index.
+% \begin{macrocode}
+%</package>
+%<+gglo>preamble
+%<+gglo>"\n \\begin{theglossary} \n
+%<+gglo> \\makeatletter\\scan@allowedfalse\n"
+%<+gglo>postamble
+%<+gglo>"\n\n \\end{theglossary}\n"
+% \end{macrocode}
+% This difference from \texttt{gind.ist} is necessary if you have an
+% up-to-date \LaTeX.
+% \begin{macrocode}
+%<+gglo>keyword "\\glossaryentry"
+%<*package>
+% \end{macrocode}
+%
+%
+% \begin{macro}{\GlossaryPrologue}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% \begin{macro}{\glossary@prologue}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% The |\GlossaryPrologue| macro is used to place a short
+% message above the glossary into the document. It is implemented
+% by redefining |\glossary@prologue|, a macro which holds the
+% default text. We better make it a long macro to allow
+% |\par| commands in its argument.
+% \begin{macrocode}
+\long\def\GlossaryPrologue#1{\@bsphack
+ \def\glossary@prologue{#1}%
+ \@esphack}
+% \end{macrocode}
+% Now we test whether the default is already defined by another
+% package file. If not we define it.
+% \begin{macrocode}
+\@ifundefined{glossary@prologue}
+ {\def\glossary@prologue{\section*{{Change History}}%
+ \markboth{{Change History}}{{Change History}}%
+ }}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\GlossaryParms}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% Unless the user specifies otherwise, we set the change history
+% using the same parameters as for the index except that we make it sort
+% of ragged right as it contains text that often doesn't break nicely in
+% small columns.
+% \changes{v2.1g}{2016/02/15}{Use ragged setting by default}
+% \begin{macrocode}
+\@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms
+ \expandafter\def\expandafter\GlossaryParms\expandafter{\GlossaryParms
+ \rightskip 15pt plus 1fil
+ \parfillskip -15pt plus -1fil\relax}
+}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\PrintChanges}
+% \changes{BHK}{1989/04/26}{Added to support
+% \texttt{\protect\bslash changes}.}
+% To read in and print the sorted change history, just put the
+% |\PrintChanges| command as the last (commented-out, and thus
+% executed during the documentation pass through the file) command
+% in your package file. Alternatively, this command may form one of
+% the arguments of the |\StopEventually| command, although a
+% change history is probably {\em not\/} required if only the
+% description is being printed.
+%
+% The command assumes that \textsf{makeindex} or some other program
+% has processed the \texttt{.glo} file to generate a sorted
+% \texttt{.gls} file.
+% \changes{v1.9h}{1994/02/10}{Use \cs{@input@} instead of \cs{@input}.}
+% \changes{v1.9w}{1995/12/29}{Turn the cmd into a noop after use.}
+% \begin{macrocode}
+\def\PrintChanges{\@input@{\jobname.gls}%
+ \global\let\PrintChanges\@empty}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \subsection{Bells and whistles}
+%
+% \begin{macro}{\StopEventually}
+% \changes{v1.5k}{1989/09/04}{Support for checksum.}
+% \begin{macro}{\Finale}
+% \changes{v1.5k}{1989/09/04}{Support for checksum.}
+% \changes{v1.5z}{1990/04/22}{Define \cs{Finale} globally.}
+% \begin{macro}{\AlsoImplementation}
+% \changes{v1.9w}{1995/12/27}{Macro added}
+% \begin{macro}{\OnlyDescription}
+% If |\AlsoImplementation| is in force the whole documentation
+% including the code part will be typeset. This is the default.
+% \begin{macrocode}
+\newcommand\AlsoImplementation{%
+% \end{macrocode}
+% To make this happen we have to define
+% |\StopEventually| in a way that its argument is typeset at the
+% very end or more exactly at |\Finale|. For this we
+% save its argument in the macro |\Finale|.
+% \begin{macrocode}
+ \long\def\StopEventually##1{\@bsphack\gdef\Finale{##1%
+% \end{macrocode}
+% But |\Finale| will be called at the very end of a file. This
+% is exactly the point were we want to know if the file is
+% uncorrupted. Therefore we also call |\check@checksum| at this
+% point.
+% \begin{macrocode}
+ \check@checksum}%
+% \end{macrocode}
+% On the other hand: |\StopEventually| is more or less a
+% dividing point between description and code. So we start to look
+% for the check-sum of the documented file by calling
+% |\init@checksum|.
+% \begin{macrocode}
+ \init@checksum
+ \@esphack}%
+ }
+% \end{macrocode}
+%
+% Since |\AlsoImplementation| should be the default we execute it
+% and thus |\StopEventually| gets the desired meaning.
+% \begin{macrocode}
+\AlsoImplementation
+% \end{macrocode}
+% When the user places an |\OnlyDescription| declaration in
+% the driver file the document should only be typeset up to
+% |\StopEventually|. We therefore have to redefine this macro.
+% \begin{macrocode}
+\def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
+% \end{macrocode}
+% In this case the argument of |\StopEventually| should be set
+% and afterwards \TeX{} should stop reading from this file.
+% Therefore we finish this macro with
+% \begin{macrocode}
+ ##1\endinput}\@esphack}
+% \end{macrocode}
+% If no |\StopEventually| command is given we silently ignore a
+% |\Finale| issued.
+% \changes{v1.9n}{1994/04/28}{Ignore \cs{Finale} if no
+% \cs{StopEventually} is given}
+% \begin{macrocode}
+\let\Finale\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\meta}
+% \changes{v1.4t}{1989/04/24}{Macro added.}
+% \changes{v1.5w}{1990/02/03}{Breaks at space allowed.}
+% \changes{v1.6a}{1990/05/24}{Extra space bug corrected.}
+% The |\meta| macro is a bit tricky. We want to allow line
+% breaks at blanks in the argument but we don't want a break
+% in between. In the past this was done by defining |\meta| in a way that a
+% \verb*+ + is active when the argument is scanned. Words are then
+% scanned into |\hbox|es. The active \verb*+ + will end the
+% preceding |\hbox| add an ordinary space and open a new
+% |\hbox|. In this way breaks are only possible at spaces. The
+% disadvantage of this method was that |\meta| was neither robust
+% nor could it be |\protect|ed. The new implementation fixes this
+% problem by defining |\meta| in a radically different way: we
+% prevent hyphenation by defining a |\language| which has no
+% patterns associated with it and use this to typeset the words
+% within the angle brackets.
+% \changes{v2.0i}{2000/05/21}{New implementation (pr/3170)}
+% \begin{macrocode}
+\ifx\l@nohyphenation\undefined
+ \newlanguage\l@nohyphenation
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\meta[1]{%
+% \end{macrocode}
+% Since the old implementation of |\meta| could be used in math we
+% better ensure that this is possible with the new one as
+% well. So we use |\ensuremath| around |\langle| and
+% |\rangle|. However this is not enough: if |\meta@font@select|
+% below expands to |\itshape| it will fail if used in math
+% mode. For this reason we hide the whole thing inside an
+% |\nfss@text| box in that case.
+% \changes{v2.0l}{2000/06/10}{Fixing changes for (pr/3170)}
+% \begin{macrocode}
+ \ensuremath\langle
+ \ifmmode \expandafter \nfss@text \fi
+ {%
+ \meta@font@select
+% \end{macrocode}
+% Need to keep track of what we changed just in case the user
+% changes font inside the argument so we store the font explicitly.
+% \changes{v2.0m}{2000/07/04}{More fixing changes for (pr/3170)}
+% \begin{macrocode}
+ \edef\meta@hyphen@restore
+ {\hyphenchar\the\font\the\hyphenchar\font}%
+ \hyphenchar\font\m@ne
+ \language\l@nohyphenation
+ #1\/%
+ \meta@hyphen@restore
+ }\ensuremath\rangle
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\meta@font@select}
+% \changes{v2.0k}{2000/05/26}{Macro added (pr/3170)}
+% Maske font used inside |\meta| customizable.
+% \begin{macrocode}
+\def\meta@font@select{\itshape}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\IndexInput}
+% This next macro may be used to read in a separate file (possibly
+% a package file that is {\em not\/} documented by this means) and
+% set it verbatim, whilst scanning for macro names and indexing the
+% latter. This could be a useful first pass in preparing to
+% generate documentation for the file read.
+% \begin{macrocode}
+\def\IndexInput#1{%
+% \end{macrocode}
+% We commence by setting up a group, and initializing a
+% |\trivlist| as is normally done by a
+% |\begin{macrocode}| command.
+% \begin{macrocode}
+ \begingroup \macro@code
+% \end{macrocode}
+% We also make spacing behave as in the \textsf{macrocode}
+% environment, because otherwise all the spaces will be shown
+% explicitly.
+% \begin{macrocode}
+ \frenchspacing \@vobeyspaces
+% \end{macrocode}
+% Then it only remains to read in the specified file, and finish
+% off the |\trivlist|.
+% \changes{v1.5t}{1989/11/07}{Call \cs{endmacrocode} instead
+% of \cs{endtrivlist}.}
+% \begin{macrocode}
+ \input{#1}\endmacrocode
+% \end{macrocode}
+% Of course, we need to finish off the group as well.
+% \begin{macrocode}
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\maketitle}
+% The macro to generate titles is easily altered in order that it
+% can be used more than once (an article with many titles). In the
+% original, diverse macros were concealed after use with
+% |\relax|. We must cancel anything that may have been put
+% into |\@thanks|, etc., otherwise {\em all\/} titles will
+% carry forward any earlier such setting!
+% \changes{v1.5j}{1989/06/09}{thispagestyle plain removed}
+% \changes{v1.9r}{1994/06/09}{Added new definitions of
+% \cs{@makefnmark} and \cs{@makefntext}}
+% \begin{macrocode}
+\def\maketitle{\par
+ \begingroup \def \thefootnote {\fnsymbol {footnote}}%
+ \setcounter {footnote}\z@
+ \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
+ \if@twocolumn \twocolumn [\@maketitle ]%
+ \else \newpage \global \@topnum \z@ \@maketitle \fi
+% \end{macrocode}
+% \changes{v1.5k}{1989/09/04}{Added \cs{ps@titlepage}}
+% For special formatting requirements (such as in TUGboat), we use
+% pagestyle |titlepage| for this; this is later defined to be
+% |plain|, unless already defined, as, for example, by
+% |ltugboat.sty|.
+% \begin{macrocode}
+ \thispagestyle{titlepage}\@thanks \endgroup
+% \end{macrocode}
+% If the driver file documents many files, we don't want parts of a
+% title of one to propagate to the next, so we have to cancel
+% these:
+% \begin{macrocode}
+ \setcounter {footnote}\z@
+ \gdef\@date{\today}\gdef\@thanks{}%
+ \gdef\@author{}\gdef\@title{}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ps@titlepage}
+% \changes{v1.5k}{1989/09/04}{Added \texttt{\protect\bslash
+% ps@titlepage}} When a number of articles are concatenated into a
+% journal, for example, it is not usual for the title pages of such
+% documents to be formatted differently. Therefore, a class
+% such as \textsf{ltugboat} can define this macro in advance.
+% However, if no such definition exists, we use pagestyle
+% \texttt{plain} for title pages.
+% \begin{macrocode}
+\@ifundefined{ps@titlepage}
+ {\let\ps@titlepage=\ps@plain}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MakeShortVerb}
+% \changes{v1.7a}{1992/02/27}{Added (from newdoc but now alters
+% \cs{dospecials}, \cs{@sanitize}).}
+% This arranges an abbreviation for "\verb" such that if you say
+% "\MakeShortVerb{\"\meta{c}"}" subsequently using
+% \meta{c}\meta{text}\meta{c} is equivalent to
+% "\verb"\meta{c}\meta{text}\meta{c}.\footnote{Warning:
+% the commentary in the rest of this section was written by Dave
+% Love.} In addition, the fact
+% that \meta{c} is made active is recorded for the benefit of the
+% \textsf{verbatim} and \textsf{macrocode} environments.
+% Note particularly that the definitions below are global.
+% The first thing we do (it needn't be first) is to record
+% the---presumably new---special character in "\dospecials" and
+% "\@sanitize" using "\add@special".
+%
+% \changes{v1.9e.2}{1994/02/07}{-js: Check if \protect\meta{c} is
+% already an
+% abbreviation for \cs{verb}.}
+% Some unwary user might issue "\MakeShortVerb" for a second time, we
+% better protect against this. We assume that this happened if a
+% control sequence "\cc\"\meta{c} is bound, the probability that this
+% name is used by another module is low. We will output a warning
+% below, so that a possible error might be noticed by the programmer
+% if he reads the "LOG" file. (Should have used module internal names,
+% 'though.)
+%
+% \begin{macro}{\MakeShortVerb*}
+% \changes{v2.1a}{2003/12/09}{(HjG) Added \texttt{*} form}
+% This arranges an abbreviation for "\verb*" such that if you say
+% "\MakeShortVerb*{\"\meta{c}"}" subsequently using
+% \meta{c}\meta{text}\meta{c} is equivalent to
+% "\verb*"\meta{c}\meta{text}\meta{c}.
+% \begin{macrocode}
+%</package>
+%<*package|shortvrb>
+\def\MakeShortVerb{%
+ \@ifstar
+ {\def\@shortvrbdef{\verb*}\@MakeShortVerb}%
+ {\def\@shortvrbdef{\verb}\@MakeShortVerb}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\@MakeShortVerb#1{%
+ \expandafter\ifx\csname cc\string#1\endcsname\relax
+% \end{macrocode}
+% \changes{v1.9v}{1995/11/03}{(DPC) Use \cs{@shortvrbinfo}}
+% \begin{macrocode}
+ \@shortvrbinfo{Made }{#1}\@shortvrbdef
+ \add@special{#1}%
+% \end{macrocode}
+% Then the character's current catcode is stored in "\cc\"\meta{c}.
+% \begin{macrocode}
+ \expandafter
+ \xdef\csname cc\string#1\endcsname{\the\catcode`#1}%
+% \end{macrocode}
+% The character is spliced into the definition using the same trick as
+% used in "\verb" (for instance), having activated "~" in a group.
+% \begin{macrocode}
+ \begingroup
+ \catcode`\~\active \lccode`\~`#1%
+ \lowercase{%
+% \end{macrocode}
+% The character's old meaning is recorded in "\ac\"\meta{c} prior to
+% assigning it a new one.
+% \begin{macrocode}
+ \global\expandafter\let
+ \csname ac\string#1\endcsname~%
+ \expandafter\gdef\expandafter~\expandafter{\@shortvrbdef~}}%
+ \endgroup
+% \end{macrocode}
+% Finally the character is made active.
+% \begin{macrocode}
+ \global\catcode`#1\active
+% \end{macrocode}
+% If we suspect that \meta{c} is already a short reference, we tell
+% the user. Now he or she is responsible if anything goes wrong\,\dots
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+% \changes{v1.9v}{1995/11/03}{(DPC) Use \cs{@shortvrbinfo}}
+% \begin{macrocode}
+ \@shortvrbinfo\@empty{#1 already}{\@empty\verb(*)}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\DeleteShortVerb}
+% \changes{v1.7a}{1992/02/27}{Added (from newdoc but now alters
+% \cs{dospecials}, \cs{@sanitize}).}
+% Here's the means of undoing a "\MakeShortVerb", for instance in a
+% region where you need to use the character outside a verbatim
+% environment. It arranges for "\dospecials" and "\@sanitize" to be
+% altered appropriately, restores the saved catcode and, if necessary,
+% the character's meaning (as stored by
+% "\MakeShortVerb"). If the catcode wasn't stored in
+% "\cc\"\meta{c} (by "\MakeShortVerb") the command is silently
+% ignored.
+% \changes{v1.7a}{1992/02/28}{Check for previous matched
+% \cs{MakeShortVerb}
+% to avoid error.}
+% \begin{macrocode}
+\def\DeleteShortVerb#1{%
+ \expandafter\ifx\csname cc\string#1\endcsname\relax
+% \end{macrocode}
+% \changes{v2.1a}{2003/12/10}{(HjG) Notify user
+% if it's not a short verb character}
+% \begin{macrocode}
+ \@shortvrbinfo\@empty{#1 not}{\@empty\verb(*)}%
+ \else
+% \end{macrocode}
+% \changes{v1.9v}{1995/11/03}{(DPC) Use \cs{@shortvrbinfo}}
+% \begin{macrocode}
+ \@shortvrbinfo{Deleted }{#1 as}{\@empty\verb(*)}%
+ \rem@special{#1}%
+ \global\catcode`#1\csname cc\string#1\endcsname
+% \end{macrocode}
+% \changes{v1.9e.2}{1994/02/07}{-js: Reset `cc`\protect\meta{c} in
+% in \cs{DeleteShortVerb}}
+% We must not forget to reset "\cc\"\meta{c}, otherwise the check in
+% "\MakeShortVerb" for a repeated definition will not work.
+% \begin{macrocode}
+ \global \expandafter\let \csname cc\string#1\endcsname \relax
+ \ifnum\catcode`#1=\active
+ \begingroup
+ \catcode`\~\active \lccode`\~`#1%
+ \lowercase{%
+ \global\expandafter\let\expandafter~%
+ \csname ac\string#1\endcsname}%
+ \endgroup \fi \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@shortvrbinfo}
+% \changes{v1.9v}{1995/11/03}{(DPC) Macro added}
+% \changes{v2.1a}{2003/12/10}{(HjG) Third argument added
+% on behalf of \cmd{\MakeShortVerb*}}
+% Helper function for info messages.
+% \begin{macrocode}
+\def\@shortvrbinfo#1#2#3{%
+%<shortvrb> \PackageInfo{shortvrb}{%
+%<!shortvrb> \PackageInfo{doc}{%
+ #1\expandafter\@gobble\string#2 a short reference
+ for \expandafter\string#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\add@special}
+% \changes{v1.7a}{1992/02/27}{Added for short verb facility.}
+% This helper macro adds its argument to the
+% "\dospecials" macro which is conventionally used by verbatim macros
+% to alter the catcodes of the currently active characters. We need
+% to add "\do\"\meta{c} to the expansion of "\dospecials" after
+% removing the character if it was already there to avoid multiple
+% copies building up should "\MakeShortVerb" not be balanced by
+% "\DeleteShortVerb" (in case anything that uses "\dospecials" cares
+% about repetitions).
+% \begin{macrocode}
+\def\add@special#1{%
+ \rem@special{#1}%
+ \expandafter\gdef\expandafter\dospecials\expandafter
+ {\dospecials \do #1}%
+% \end{macrocode}
+% Similarly we have to add "\@makeother\"\meta{c} to "\@sanitize"
+% (which is used in things like "\index" to re-catcode all special
+% characters except braces).
+% \begin{macrocode}
+ \expandafter\gdef\expandafter\@sanitize\expandafter
+ {\@sanitize \@makeother #1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rem@special}
+% \changes{v1.7a}{1992/02/27}{Added for short verb facility.}
+% The inverse of "\add@special" is slightly trickier. "\do" is
+% re-defined to expand to nothing if its argument is the character of
+% interest, otherwise to expand simply to the argument. We can then
+% re-define "\dospecials" to be the expansion of itself. The space
+% after "=`##1" prevents an expansion to "\relax"!
+% \begin{macrocode}
+\def\rem@special#1{%
+ \def\do##1{%
+ \ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}%
+ \xdef\dospecials{\dospecials}%
+% \end{macrocode}
+% Fixing "\@sanitize" is the same except that we need to re-define
+% "\@makeother" which obviously needs to be done in a group.
+% \begin{macrocode}
+ \begingroup
+ \def\@makeother##1{%
+ \ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
+ \xdef\@sanitize{\@sanitize}%
+ \endgroup}
+%</package|shortvrb>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MakeShortverb}
+% \begin{macro}{\DeleteShortverb}
+% \changes{v1.7a}{1992/02/27}{Added (from newdoc).}
+% These commands from \textsf{newdoc} are now obsolete.
+% \begin{macrocode}
+\def\MakeShortverb{\typeout{*** Switch to \noexpand\MakeShortVerb
+ syntax, this is obsolete ***}\MakeShortVerb}
+\def\DeleteShortverb{\typeout{*** Switch to \noexpand\DeleteShortVerb
+ syntax, this is obsolete ***}\DeleteShortVerb}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection[Providing a checksum and character table]
+% {Providing a checksum and character table\footnotemark}
+% \footnotetext{Warning: the commentary in this section was
+% written by Dave Love. }
+%
+%
+% \begin{macro}{\init@checksum}
+% The checksum mechanism works by counting backslashes in the
+% macrocode. This initialises the count (when called from
+% "\StopEventually").
+% \changes{v1.5k}{1989/09/04}{Macro added to support checksum.}
+% \begin{macrocode}
+\def\init@checksum{\relax
+ \global\bslash@cnt\z@}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\check@checksum}
+% \changes{v1.5k}{1989/09/04}{Macro added to support checksum.}
+% This reports the sum compared with the value ("\bslash@cnt") the
+% file advertises. It's called from "\Finale" (if that hasn't been
+% re-defined).
+% \changes{v2.1f}{2016/02/12}{Suppress \cs{CheckSum} check if no checksum
+% is specified in the file}
+% \begin{macrocode}
+\def\check@checksum{\relax
+ \ifnum\check@sum>\m@ne
+% \end{macrocode}
+% We do nothing if the checksum in the file is negative (or not given as
+% it is initialized with -1).
+% \begin{macrocode}
+ \ifnum\check@sum=\z@
+ \typeout{**********************************}%
+ \typeout{* This macro file has no checksum!}%
+ \typeout{* The checksum should be \the\bslash@cnt!}%
+ \typeout{**********************************}%
+ \else
+ \ifnum\check@sum=\bslash@cnt
+ \typeout{*******************}%
+ \typeout{* Checksum passed *}%
+ \typeout{*******************}%
+ \else
+ \PackageError{doc}{Checksum not passed
+ (\the\check@sum<>\the\bslash@cnt)}%
+ {The file currently documented seems to be wrong.^^J%
+ Try to get a correct version.}%
+ \fi
+ \fi
+ \fi
+ \global\check@sum\m@ne}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\check@sum}
+% \changes{v1.5k}{1989/09/04}{Macro added to support checksum.}
+% \begin{macro}{\bslash@cnt}
+% \changes{v1.5k}{1989/09/04}{Macro added to support checksum.}
+% We need to define counters, "\bslash@cnt" for the number of
+% backslashes counted and "\check@sum" for the value advertised by the
+% file if any. A negative value means there is no checksum checking which is the default.
+% \changes{v2.1f}{2016/02/12}{Suppress \cs{CheckSum} check if no checksum
+% is specified in the file}
+% \begin{macrocode}
+\newcount\check@sum \check@sum = \m@ne
+\newcount\bslash@cnt \bslash@cnt = \z@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\CheckSum}
+% \changes{v1.5k}{1989/09/04}{Macro added to support checksum.}
+% This is the interface to setting "\check@sum".
+% \begin{macrocode}
+\def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\step@checksum}
+% \changes{v1.5k}{1989/09/04}{Macro added to support checksum.}
+% This advances the count when a backslash is encountered in the
+% macrocode.
+% \begin{macrocode}
+\def\step@checksum{\global\advance\bslash@cnt\@ne}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CharacterTable}
+% The user interface to the character table-checking does some
+% "\catcode"ing and then compares the following table with the
+% stored version. We need to have "@" of type ``other'' within the
+% table since this is the way it is usually returned when reading
+% in a normal document. To nevertheless have a private letter we
+% use "~" for this purpose. "~" does no harm as a ``letter'' as it
+% comes last in the table and therefore will not gobble following
+% space.
+% \changes{v1.5m}{1989/09/20}{Macro added to check character translation
+% problems.}
+% \changes{v1.5q}{1989/11/01}{Made character table more readable.}
+% \changes{v1.5t}{1989/11/07}{Make \string\~{} letter in chartable
+% macros.}
+% \changes{v1.5u}{1989/11/14}{Made @ other in default table.}
+% \begin{macrocode}
+\def\CharacterTable{\begingroup \CharTableChanges \character@table}
+% \end{macrocode}
+% \end{macro}
+% \def\MakePrivateLetters{\catcode`\~=11\makeatletter}
+% \begin{macro}{\character@table}
+% This does the work of comparing the tables and reporting the result.
+% Note that the following code is enclosed in a group
+% with "~" catcoded to letter.
+% \begin{macrocode}
+\begingroup
+ \catcode`\~=11
+ \gdef\character@table#1{\def\used~table{#1}%
+ \ifx\used~table\default~table
+ \typeout{***************************}%
+ \typeout{* Character table correct *}%
+ \typeout{***************************}%
+ \else
+ \PackageError{doc}{Character table corrupted}
+ {\the\wrong@table}
+ \show\default~table
+ \show\used~table
+ \fi
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CharTableChanges}
+% When the character table is read in we need to scan it with a
+% fixed set of "\catcode"s. The reference table below was defined by
+% assuming the normal "\catcode"s of \TeX{}, i.e.\ "@" is of type
+% other and the only token of type ``letter'' are the usual letters
+% of the alphabet. If, for some reason, other characters are made
+% ``letters'' then their "\catcode"s need to be restored before
+% checking the table. Otherwise spaces in the table are gobbled and
+% we get the information that the tables are different, even if
+% they are actually equal. For this reason "\CharTableChanges" can
+% be set up to locally restore the "\catcode"s of such ``letters''
+% to ``other''.
+% \begin{macrocode}
+ \global\let\CharTableChanges\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\default~table}
+% Here's what the table {\em should\/} look like (modulo spaces).
+% \begin{macrocode}
+ \makeatother
+ \gdef\default~table
+ {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
+ Lower-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
+ Digits \0\1\2\3\4\5\6\7\8\9
+ Exclamation \! Double quote \" Hash (number) \#
+ Dollar \$ Percent \% Ampersand \&
+ Acute accent \' Left paren \( Right paren \)
+ Asterisk \* Plus \+ Comma \,
+ Minus \- Point \. Solidus \/
+ Colon \: Semicolon \; Less than \<
+ Equals \= Greater than \> Question mark \?
+ Commercial at \@ Left bracket \[ Backslash \\
+ Right bracket \] Circumflex \^ Underscore \_
+ Grave accent \` Left brace \{ Vertical bar \|
+ Right brace \} Tilde \~}
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \let\MakePrivateLetters=\makeatletter
+%
+% \begin{macro}{\wrong@table}
+% \changes{v1.7a}{1992/02/28}{Moved to where the catcodes are right
+% so it works.}
+% We need a help message in case of problems.
+% \begin{macrocode}
+ \newhelp\wrong@table{Some of the ASCII characters are corrupted.^^J
+ I now \string\show\space you both tables for comparison.}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection[Attaching line numbers to code lines]
+% {Attaching line numbers to code lines\footnotemark}
+% \footnotetext{Warning: the commentary was written by Dave
+% Love.}
+%
+%
+% The code in this section allows index entries to refer to code line
+% numbers---the number of the first line of macrocode in the
+% \textsf{macro} environment.
+%
+%
+% \begin{macro}{\codeline@index}
+% Indexing by code line is controlled by the "codeline@index" switch.
+% \changes{v1.5s}{1989/11/05}{Support for code line no. (Undoc)}
+% \changes{v1.7a}{1992/02/24}{Documented code line no. support.}
+% \begin{macro}{\CodelineNumbered}
+% \changes{v1.8a}{1993/05/19}{Macro added}
+% \begin{macrocode}
+\newif\ifcodeline@index \codeline@indexfalse
+\let\CodelineNumbered\codeline@indextrue
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\codeline@wrindex}
+% The code index entries are written out by "\special@index". If
+% indexing is by code line this is "\let" to "\codeline@wrindex";
+% if indexing is by page it is just "\index". However, if
+% "\nofiles" is given, we omit writing such an index entry at all.
+% \changes{v1.7j}{1992/08/14}{Added \cs{if@filesw}.}
+% \begin{macrocode}
+\def\codeline@wrindex#1{\if@filesw
+ \immediate\write\@indexfile
+ {\string\indexentry{#1}%
+ {\number\c@CodelineNo}}\fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\special@index}
+% By default no index entries are written out.
+% \begin{macrocode}
+\let\special@index = \@gobble
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\CodelineIndex}
+% \changes{v1.5u}{1989/11/14}{Added \cs{PageIndex} and
+% \cs{CodelineIndex} (Undoc)}
+% This switches on use of the index file with "\makeindex", sets the
+% switch to indicate code line numbering and defines "\special@index"
+% appropriately.
+% \begin{macrocode}
+\def\CodelineIndex{\makeindex
+ \codeline@indextrue
+ \let\special@index\codeline@wrindex}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\PageIndex}
+% "\PageIndex" is similar.
+% \begin{macrocode}
+\def\PageIndex{\makeindex
+ \codeline@indexfalse
+ \let\special@index\index}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\c@CodelineNo}
+% \changes{v1.5l}{1989/09/10}{Counter added to support code line
+% numbers}
+% \changes{v1.5y}{1990/02/24}{Default changed.}
+% \changes{v1.6b}{1990/06/15}{\cs{rm} moved before \cs{scriptsize} to
+% avoid unnecessary fontwarning.}
+% We need a counter to keep track of the line number.
+% \begin{macrocode}
+\newcount\c@CodelineNo \c@CodelineNo\z@
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\theCodelineNo}
+% \changes{v1.7a}{1992/02/25}{Existing definition not overwritten.}
+% \changes{v1.7a}{1992/03/12}{Use \cs{reset@font} for NFSS.}
+% This provides a hook to control the format of line numbers which may
+% be defined in a class file.
+% \begin{macrocode}
+\@ifundefined{theCodelineNo}
+ {\ifx\selectfont\undefined
+ \def\theCodelineNo{\rmfamily\scriptsize\arabic{CodelineNo}}%
+ \else
+ \def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}}%
+ \fi}
+ {}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Layout Parameters for documenting package files}
+%
+% \begin{macro}{\tolerance}
+% People documenting package files would probably rather have things
+% ``sticking out'' in overfull |\hbox|es and poorish spacing,
+% because they probably don't want to spend a lot of time on making
+% all the line breaks perfect!
+% \begin{macrocode}
+ \tolerance=1000\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \DeleteShortVerb{\"}
+%
+% The following |\mathcode| definitions allow the characters
+% `|\|'
+% and `\texttt{@}' to appear in |\ttfamily| font when invoked in math
+% mode;\footnote{You may wonder why the definitions state that both
+% characters belong to the {\em variable family\/}
+% (i.e.\ the number 7 in front). The reason is this:
+% Originally the \texttt{\bslash mathcode} of
+% \texttt{\bslash} was defined to be \texttt{"075C},
+% i.e.\ ordinary character number 92 (hex 5C) in
+% math family number 7 which is the typewriter family in
+% standard \LaTeX.
+% But this file should not depend on this specific
+% setting, so I changed these
+% \texttt{\bslash mathcode}$\,$s
+% to work with any family assignments. For an example
+% see the article about the new font selection scheme.}
+% particularly for something like $|\@abc|=1$.
+%
+% If an {\em old\/} version of the \textsf{german} package is in
+% force, then the `|"|' character is active and would upset the
+% definition of the \meta{16-bit number} quantities below, therefore
+% we change the |\catcode| of |"| inside a group, and use
+% |\global|.
+% \begin{macrocode}
+{ \catcode`\"=12
+ \global\mathcode`\\="705C \global\mathcode`\@="7040 }
+% \end{macrocode}
+% \MakeShortVerb{\"}
+%
+% \begin{macro}{\DocstyleParms}
+% This macro can be used, for example, to assign new values to
+% |\MacrocodeTopsep| and |\MacroIndent| and some other internal
+% registers. If it is already defined, the default definition
+% won't be carried out. Note that it is necessary to assign new
+% values via this macro if it should be done in a class file (like
+% \texttt{ltugboat.cls} for example) since the registers are
+% undefined before \texttt{doc.sty} is read in. The default values
+% for the internal registers are scattered over this file.
+% \changes{v1.5u}{1989/11/14}{\cs{DocStyleParms} now empty}
+% \changes{v2.1h}{2018/02/01}{Only use\cs{DocStyleParms} if defined
+% (previously the test defined it)}
+% \begin{macrocode}
+\@ifundefined{DocstyleParms}{}{\DocstyleParms}
+% \end{macrocode}
+% Clear out |\DocstyleParms| after use (or non-use).
+% \begin{macrocode}
+ \let\DocstyleParms\relax
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\AmSTeX}
+% \changes{v1.5j}{1989/06/09}{Macro AmsTeX renamed to AmSTeX}
+% \begin{macro}{\BibTeX}
+% \begin{macro}{\SliTeX}
+% Here are a few definitions which can usefully be employed when
+% documenting package files: now we can readily refer to \AmSTeX,
+% \BibTeX\ and \SliTeX, as well as the usual \TeX\ and \LaTeX.
+% \begin{macrocode}
+\@ifundefined{AmSTeX}
+ {\def\AmSTeX{\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
+ \hbox{$\mathcal M$}\kern-.2em\mathcal S$-\TeX}}}{}
+\@ifundefined{BibTeX}
+ {\def\BibTeX{{\rmfamily B\kern-.05em%
+ \textsc{i\kern-.025em b}\kern-.08em%
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
+\@ifundefined{SliTeX}
+ {\def\SliTeX{{\rmfamily S\kern-.06emL\kern-.18em\raise.32ex\hbox
+ {\scshape i}\kern -.03em\TeX}}}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\PlainTeX}
+% \changes{v1.5g}{1989/05/07}{space between plain and TeX changed.}
+% \begin{macro}{\Web}
+% There's even a \PlainTeX{} and a \Web.
+% \begin{macrocode}
+\@ifundefined{PlainTeX}{\def\PlainTeX{\textsc{Plain}\kern2pt\TeX}}{}
+\@ifundefined{Web}{\def\Web{\textsc{Web}}}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Changing the \texttt{\protect\bslash catcode} of \%}
+%
+% \begin{macro}{\MakePercentIgnore}
+% \begin{macro}{\MakePercentComment}
+% And finally the most important bit: we change the |\catcode|
+% of `|%|' so that it is ignored (which is how we are able to
+% produce this document!). We provide two commands to do the actual
+% switching.
+%^^A The |\MakePercentIgnore| is then called as the
+%^^A last command in this file.
+% \begin{macrocode}
+\def\MakePercentIgnore{\catcode`\%9\relax}
+\def\MakePercentComment{\catcode`\%14\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DocInput}
+% The two macros above are now used to define the |\DocInput| macro
+% which was introduced in version v1.5l (or so) of the \DOC{}
+% package. In older versions |\MakePercentIgnore| was placed
+% at the very end of \texttt{doc.sty}.
+% \begin{macrocode}
+\def\DocInput#1{\MakePercentIgnore\input{#1}\MakePercentComment}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{GetFileInfo}
+%
+% \begin{macro}{\GetFileInfo}
+% \changes{v1.9o}{1994/05/08}{Macro added}
+% \changes{v1.9z}{1997/02/05}{Missing percent latex/2404}
+% Define |\filedate| and friends from info in the
+% |\ProvidesPackage| etc.\ commands.
+% \begin{macrocode}
+\def\GetFileInfo#1{%
+ \def\filename{#1}%
+ \def\@tempb##1 ##2 ##3\relax##4\relax{%
+ \def\filedate{##1}%
+ \def\fileversion{##2}%
+ \def\fileinfo{##3}}%
+ \edef\@tempa{\csname ver@#1\endcsname}%
+ \expandafter\@tempb\@tempa\relax? ? \relax\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% We can now finish the \texttt{docstrip} main module.
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+%
+% \Finale
+% \PrintIndex \PrintChanges
+\endinput
diff --git a/macros/latex-dev/base/doc.pdf b/macros/latex-dev/base/doc.pdf
new file mode 100644
index 0000000000..6067252d3b
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..be3dda6d32
--- /dev/null
+++ b/macros/latex-dev/base/docstrip.dtx
@@ -0,0 +1,4370 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+\catcode`\{=1
+\catcode`\}=2
+\def\filename{docstrip.dtx}
+\def\fileversion{2.5g}
+\def\filedate{2018/05/03}
+\def\docdate {2018/05/03}
+%%
+%
+%\iffalse
+%
+%% The docstrip program for use with TeX.
+%% Copyright (C) 1989-1991 Frank Mittelbach
+%% Copyright (C) 1992-1995 Johannes Braams, Denys Duchier,
+%% Frank Mittelbach
+%% Copyright (C) 1995 Marcin Woli\'nski
+%% Copyright (C) 1996-1997 Mark Wooding, Marcin Woli\'nski
+%% Copyright (C) 1998-2003 LaTeX3 project and the above authors
+%% All rights are reserved.
+%%
+%
+% \fi
+%
+% \changes{2.0b}{1991/05/29}{Added bugfix from Denys}
+% \changes{2.0c}{1991/05/29}{Allow almost all characters in guard (DD)}
+% \changes{2.0d}{1991/05/31}{Started merging in some of Franks code}
+% \changes{2.0j}{1992/03/05}{Wrote introduction}
+% \changes{2.0m}{1992/04/21}{Renamed all macros that deal with the
+% parsing of boolean expressions}
+% \changes{2.0m}{1992/04/25}{Removed dependency from ltugboat,
+% incorporated driver file into source.}
+% \changes{2.0m}{1992/04/25}{Added some missing percents; corrected some
+% typos}
+% \changes{2.0m-DL}{1992/05/08}{Various small corrections to English and
+% typos}
+% \changes{2.0q}{1992/07/01}{Changed all dates to yy/mm/dd for better
+% sorting}
+% \changes{2.2a}{1993/12/02}{Update for LaTeX2e}
+% \changes{2.2c}{1993/12/17}{Renamed texsys.tex to texsys.cfg.}
+% \changes{2.3a}{1995/08/17}{Swapped Primary with Secondary since
+% expressions are generally described bottom-up}
+% \changes{2.3b}{1995/08/22}{Completely changed expressions parser}
+% \changes{2.3b}{1995/08/23}{Removed mechanism for checking if previous
+% one-line guard is same as current (\cs{testOption},
+% \cs{closeOption})---this is not a common
+% case and testing complicates things unnecessarily}
+% \changes{2.3c}{1995/08/24}{When file is multiply listed in \cs{file}
+% clause it \emph{is} multiply read}
+% \changes{2.3c}{1995/09/04}{Changed some dirty tricks to be
+% less/more dirty---all uses of \cs{afterfi}}
+% \changes{2.3e}{1995/09/25}{Directories support}
+% \changes{2.3e}{1995/10/24}{added \cs{makepathname} to support
+% systems with bizzare pathnames}
+% \changes{2.3e}{1995/10/25}{batch files work by \cs{input}}
+% \changes{2.3e}{1996/10/02}{Introduced ``open lists''}
+% \changes{2.4a}{1996/06/06}{Add stream limits (MDW)}
+% \changes{2.4c}{1996/06/11}{Add initex support (DPC)}
+%
+% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
+% \DoNotIndex{\@ne}
+% \DoNotIndex{\advance,\begingroup,\catcode,\closein,\closeout}
+% \DoNotIndex{\day,\def,\edef,\else,\empty,\endgroup,\errmessage}
+% \DoNotIndex{\expandafter,\fi,\futurelet,\gdef,\global,\if,\ifeof}
+% \DoNotIndex{\ifx,\immediate,\let,\loop,\m@ne,\message,\month}
+% \DoNotIndex{\newcount}
+% \DoNotIndex{\newif,\newlinechar,\newread,\newtoks,\newwrite}
+% \DoNotIndex{\noexpand,\openin,\openout,\par,\read,\relax,\repeat}
+% \DoNotIndex{\space,\the,\undefined,\write,\xdef,\year,\z@}
+%
+% ^^A some definitions for this documentation
+%
+% \newcommand{\ds}{\textsf{DocStrip}} ^^A maybe?
+% \newcommand{\bsl}{\protect\bslash}
+% \newcommand{\note}[1]{\marginpar{\textbf{#1}}}
+% \newcommand{\netaddress}[1]{\texttt{#1}}
+%
+% ^^A override the default in doc.sty
+% \makeatletter
+% \renewenvironment{theglossary}{%
+% \glossary@prologue%
+% \GlossaryParms \let\item\@idxitem \ignorespaces}%
+% {}
+% \makeatother
+%
+%
+% \changes{2.1c}{1993/02/25}{Added a setting for StandardModuleDepth}
+% \setcounter{StandardModuleDepth}{1}
+%
+% \title{The \ds{} program%
+% \thanks{This file has version number \fileversion,
+% last revised \filedate,
+% documentation dated \docdate.}}
+%
+% \changes{2.1b}{1993/02/23}{modified mailaddress of Johannes}
+% \changes{2.4i}{1998/01/18}{removed mail addresses as it is hopeless
+% to keep them uptodate}
+% \author{%
+% Frank Mittelbach
+% \and
+% Denys Duchier
+% \and
+% Johannes Braams
+% \and
+% Marcin Woli\'nski
+% \and
+% Mark Wooding
+% }
+%
+% \date{Printed \today}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \begin{abstract}
+% This document describes the implementation of the \ds{} program.
+% The original version of this program was developed by Frank
+% Mittelbach to accompany his \texttt{doc.sty} which enables literate
+% programming in \LaTeX\@. Denys Duchier rewrote it to run either
+% with \TeX\ or with \LaTeX, and to allow full boolean expressions in
+% conditional guards instead of just comma-separated lists.
+% Johannes Braams re-united the two implementations, documented and
+% debugged the code.
+%
+% In September 1995 Marcin Woli\'nski changed many parts of the
+% program to make use of \TeX's ability to write to multiple files
+% at the same time to avoid re-reading sources. The performance
+% improvement of version~2.3 came at a price of compatibility with
+% some more obscure operating systems which limit the number of
+% files a process can keep open. This was corrected in September
+% 1996 by Mark Wooding and his changes were ``creatively merged''
+% by Marcin Woli\'nski who made at the same time changes in batch
+% files processing, handling of preambles and introduced ``verbatim
+% mode''. After all that, David Carlisle merged the new version into
+% the \LaTeX\ sources, and made a few other changes, principally
+% making \ds{} work under initex, and removing the need for
+% batch files to say \verb|\def\batchfile{...}|.
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% \subsection{Why the \ds{} program?} When Frank Mittelbach created
+% the \texttt{doc} package, he invented a way to combine \TeX\ code
+% and its documentation. From then on it was more or less possible
+% to do literate programming in \TeX.
+%
+% This way of writing \TeX\ programs obviously has great
+% advantages, especially when the program becomes larger than a
+% couple of macros. There is one drawback however, and that is
+% that such programs may take longer than expected to run because
+% \TeX\ is an interpreter and has to decide for each line of the
+% program file what it has to do with it. Therefore, \TeX\ programs
+% may be sped up by removing all comments from them.
+%
+% By removing the comments from a \TeX\ program a new problem is
+% introduced. We now have two versions of the program and both of
+% them {\em have\/} to be maintained. Therefore it would be nice to
+% have a possibility to remove the comments automatically, instead
+% of doing it by hand. So we need a program to remove comments from
+% \TeX\ programs. This could be programmed in any high level
+% language, but maybe not everybody has the right compiler to
+% compile the program. Everybody who wants to remove comments from
+% \TeX\ programs has \TeX\@. Therefore the \ds{} program is
+% implemented entirely in \TeX.
+%
+% \subsection{Functions of the \ds{} program}
+%
+% Having created the \ds{} program to remove comment lines from
+% \TeX\ programs\footnote{Note that only comment lines, that is
+% lines that start with a single \texttt{\%} character, are removed;
+% all other comments stay in the code.} it became feasible to do more
+% than just strip comments.\\ Wouldn't it be nice to have a way to
+% include parts of the code only when some condition is set true?
+% Wouldn't it be as nice to have the possibility to split the
+% source of a \TeX\ program into several smaller files and combine
+% them later into one `executable'?\\ Both these wishes have been
+% implemented in the \ds{} program.
+%
+% \section{How to use the \ds{} program}
+% A number of ways exist to use the \ds{} program:
+% \begin{enumerate}
+% \item The usual way to use \ds{} is to write a \emph{batch file}
+% in such a way that it can be directly processed by \TeX{}.
+% The batch file should contain the commands described below for
+% controlling the \ds{} program.
+% This allows you to set up a distribution where you can instruct
+% the user to simply run
+% \begin{quote}
+% \texttt{TEX} \meta{batch file}
+% \end{quote}
+% to generate the executable versions of your files from the
+% distribution sources.
+% Most of the \LaTeX\ distribution is packaged this way.
+% To produce such a batch file include a statement in your
+% `batch file' that
+% instructs \TeX\ to read \texttt{docstrip.tex}.
+% The beginning of such a file would look like:
+%\begin{verbatim}
+% \input docstrip
+% ...
+%\end{verbatim}
+% By convention the batch file should have extension |.ins|. But
+% these days \ds{} in fact work with any extension.
+%
+% \item Alternatively you can instruct \TeX\ to read the file
+% \texttt{docstrip.tex} and to see what happens. \TeX\ will ask
+% you a few questions about the file you would like to be
+% processed. When you have answered these questions it does
+% its job and strips the comments from your \TeX\ code.
+% \end{enumerate}
+%
+% \section{Configuring \ds}
+% \subsection{Selecting output directories}
+% \changes{2.3e}{1996/09/19}{Added documentation}
+% Inspired by a desire to simplify reinstallations of \LaTeXe{} and
+% to support operating systems which have an upper limit on the
+% number of files allowed in a directory, \ds\ now allows
+% installation scripts to specify output directories for files it
+% creates. We suggest using TDS (\TeX\ directory structure) names
+% of directories relative to \texttt{texmf} here. However these
+% names should be thought of as a labels rather than actual names
+% of directories. They get translated to actual system-dependent
+% pathnames according to commands contained in a configuration file
+% named \texttt{docstrip.cfg}.
+%
+% The configuration file is read by \ds{} just before it starts to
+% process any batch file commands.
+%
+% If this file is not present \ds{} uses some default settings which
+% ensure that files are only written to the current directory.
+% However by use of this configuration file, a site maintainer can
+% `enable' features of \ds{} that allow files to be written to
+% alternative directories.
+%
+% \DescribeMacro{\usedir}
+% Using this macro package author can tell where a file should be
+% installed. All |\file|s generated in the scope of that
+% declaration are written to a directory specified by its one
+% argument. For example in \LaTeXe{} installation following
+% declarations are used:
+%\begin{verbatim}
+% \usedir{tex/latex/base}
+% \usedir{makeindex}
+%\end{verbatim}
+% And standard packages use
+%\begin{verbatim}
+% \usedir{tex/latex/tools}
+% \usedir{tex/latex/babel}
+%\end{verbatim}
+% etc.
+%
+% \DescribeMacro{\showdirectory}
+% Used to display directory names in messages. If some label is not
+% defined it expands to |UNDEFINED (label is ...)| otherwise to a
+% directory name. It is probably a good idea for every installation
+% script to display at startup list of all directories that would
+% be used and asking user to confirm that.
+%
+% The above macros are used by package/installation script
+% author. The following macros are used in a configuration file,
+% |docstrip.cfg|, by a system administrator to
+% describe her/his local directory structure.
+%
+% \DescribeMacro{\BaseDirectory} This macro is administrator's way of
+% saying ``yes, I want to use that directories support of
+% yours''. \ds{} will write only to current directory unless your
+% config has a call to this macro. (This means \ds{} won't write to
+% random directories unless you tell it to, which is nice.) Using
+% this macro you can specify a base directory for \TeX-related
+% stuff. E.g., for many Unix systems that would be
+%\begin{verbatim}
+% \BaseDirectory{/usr/local/lib/texmf}
+%\end{verbatim}
+% and for standard em\TeX{} installation
+%\begin{verbatim}
+% \BaseDirectory{c:/emtex}
+%\end{verbatim}
+%
+% \DescribeMacro{\DeclareDir}
+% Having specified the base directory you should tell \ds{} how to
+% interpret labels used in |\usedir| commands. This is done with
+% |\DeclareDir| with two arguments. The first is the label and the
+% second is actual name of directory relative to base
+% directory. For example to teach \ds{} using standard em\TeX{}
+% directories one would say:
+%\begin{verbatim}
+% \BaseDirectory{c:/emtex}
+% \DeclareDir{tex/latex/base}{texinput/latex2e}
+% \DeclareDir{tex/latex/tools}{texinput/tools}
+% \DeclareDir{makeindex}{idxstyle}
+%\end{verbatim}
+% This will cause base latex files and font descriptions to be
+% written to directory |c:\emtex\texinput\latex2e|, files of the
+% \texttt{tools} package to be written to |c:\emtex\texinput\tools|
+% and makeindex files to |c:\emtex\idxstyle|.
+%
+% Sometimes it is desirable to put some files outside of the base
+% directory. For that reason |\DeclareDir| has a star form
+% specifying absolute pathname. For example one could say
+%\begin{verbatim}
+% \DeclareDir*{makeindex}{d:/tools/texindex/styles}
+%\end{verbatim}
+%
+% \DescribeMacro{\UseTDS}
+% Users of systems conforming to TDS may well ask here ``do I
+% really need to put a dozen of lines like
+%\begin{verbatim}
+% \DeclareDir{tex/latex/base}{tex/latex/base}
+%\end{verbatim}
+% in my config file''. The answer is |\UseTDS|. This macro causes
+% \ds{} to use labels themselves for any directory you haven't
+% overridden with |\DeclareDir|. The default behaviour is to raise
+% an error on undefined labels because some users may want to know
+% exactly where files go and not to allow \ds{} to write to random
+% places. However I (MW) think this is pretty cool and my
+% config says just (I'm running te\TeX{} under Linux)
+%\begin{verbatim}
+% \BaseDirectory{/usr/local/teTeX/texmf}
+% \UseTDS
+%\end{verbatim}
+%
+% The important thing to note here is that it is impossible to create
+% a new directory from inside \TeX{}. So however you configure
+% \ds, you need to create all needed directories before running
+% the installation. Authors may want to begin
+% every installation script by displaying a list of directories
+% that will be used and asking user if he's sure all of them
+% exist.
+%
+% Since file name syntax is OS specific \ds{} tries to guess it
+% from the current directory syntax. It should succeed for Unix,
+% MSDOS, Macintosh and VMS. However \ds{} will only initially
+% know the current directory syntax if it is used with \LaTeX.
+% If used with plain\TeX\ or initex it will not have this
+% information\footnote{Except when processing the main
+% \texttt{unpack.ins} batch file for the \LaTeX\ distribution, which
+% takes special measures so that initex can learn the directory
+% syntax.}.
+% If you often use \ds{} with formats other than \LaTeX\ you should
+% \emph{start} the file |docstrip.cfg| with a definition of
+% |\WriteToDir|. E.g.,
+% |\def\WriteToDir{./}| on MSDOS/Unix,
+% |\def\WriteToDir{:}| on Macintosh,
+% |\def\WriteToDir{[]}| on VMS.
+%
+% If your system requires something
+% completely different you can define in |docstrip.cfg| macros
+% |\dirsep| and |\makepathname|. Check for their definition in the
+% implementation part. If you want some substantially different
+% scheme of translating |\usedir| labels into directory names try
+% redefining macro |\usedir|.
+%
+% \subsection{Setting maximum numbers of streams}
+%
+% \DescribeMacro{\maxfiles}
+% In support of some of the more obscure operating systems, there's
+% a limit on the number of files a program can have open. This can
+% be expressed to \ds\ through the |\maxfiles| macro. If the number
+% of streams \ds\ is allowed to open is $n$, your configuration file
+% can say |\maxfiles{|$n$|}|, and \ds\ won't try to open more files
+% than this. Note that this limit won't include files which are
+% already open. There'll usually be two of these: the installation
+% script which you started, and the file |docstrip.tex| which it
+% included; you must bear these in mind yourself. \ds\ assumes
+% that it can open at least four files before it hits some kind of
+% maximum: if this isn't the case, you have real problems.
+%
+% \DescribeMacro{\maxoutfiles}
+% Maybe instead of having a limit on the number of files \TeX\ can
+% have open, there's a limit on the number of files it can write
+% to (e.g., \TeX\ itself imposes a limit of 16~files being written
+% at a time). This can be expressed by saying |\maxoutfiles{|$m$|}|
+% in a configuration file. You must be able to have at least one
+% output file open at a time; otherwise \ds\ can't do anything at
+% all.
+%
+% Both these options would typically be put in the |docstrip.cfg|
+% file.
+%
+%
+% \section{The user interface}
+%
+% \subsection{The main program}
+% \DescribeMacro{\processbatchFile} The `main program' starts with
+% trying to process a batch file, this is accomplished by calling
+% the macro |\processbatchFile|. It counts the number of batch
+% files it processes, so that when the number of files processed is
+% still zero after the call to |\processbatchFile| appropriate
+% action can be taken.
+%
+% \DescribeMacro{\interactive} When no batch files have been processed
+% the macro |\interactive| is called. It prompts the user for
+% information. First the extensions of the input and output files
+% is determined. Then a question about optional code is asked and
+% finally the user can give a list of files that have to be
+% processed.
+%
+% \DescribeMacro{\ReportTotals} When the \texttt{stats} option is
+% included in the \ds{}-program it keeps a record of the number of
+% files and lines that are processed. Also the number of comments
+% removed and passed as well as the number of code lines that were
+% passed to the output are accounted. The macro |\ReportTotals|
+% shows a summary of this information.
+%
+% \subsection{Batchfile commands}
+%
+% The commands described in this section are available to build a
+% batch file for \TeX.
+%
+% \DescribeMacro{\input}
+% All \ds{} batch files should start with the line: |\input docstrip|
+%
+% Do not use the \LaTeX\ syntax |\input{docstrip}| as batch files may
+% be used with plain~\TeX\ or ini\TeX.
+% You may find that old batch files always have a line
+% |\def\batchfile{|\meta{filename}|}|
+% just before the input.
+% Such usage is still supported but is now discouraged, as it causes
+% \TeX\ to re-input the same file, using up one of its limited number
+% of input streams.
+%
+% \DescribeMacro{\endbatchfile}
+% All batch files should end with this command. Any lines after this
+% in the file are ignored. In old files that start
+% |\def\batchfile{|\ldots\ this command is optional, but is a good
+% idea anyway. If this command is omitted from a batchfile then
+% normally \TeX\ will go to its interactive |*| prompt, so you may
+% stop \ds{} by typing |\endbatchfile| to this prompt.
+%
+% \DescribeMacro{\generate}
+% \DescribeMacro{\file}
+% \DescribeMacro{\from}
+% The main reason for constructing a \ds{} command file is to
+% describe what files should be generated, from what sources and
+% what optional (`guarded') pieces of code should be included. The
+% macro |\generate| is used to give \TeX\ this information. Its
+% syntax is:
+% \begin{quote}
+% |\generate{|[|\file{|\meta{output}|}{|[|\from{|^^A
+% \meta{input}|}{|\meta{optionlist}|}|]*|}|]*|}|
+% \end{quote}
+% The \meta{output} and \meta{input} are normal file specifications
+% as are appropriate for your computer system. The
+% \meta{optionlist} is a comma separated list of `options' that
+% specify which optional code fragments in \meta{input} should be
+% included in \meta{output}. Argument to |\generate| may contain
+% some local declarations (e.g., the |\use...| commands described
+% below) that will apply to all |\file|s after them. Argument to
+% |\generate| is executed inside a group, so all local declarations
+% are undone when |\generate| concludes.
+%
+% It is possible to specify multiple input files, each with its own
+% \meta{optionlist}. This is indicated by the notation [\ldots]*.
+% Moreover there can be many |\file| specifications in one
+% |\generate| clause. This means that all these \meta{output} files
+% should be generated while reading each of \meta{input} files
+% once. Input files are read in order of first appearance in this
+% clause. E.g.
+%\begin{verbatim}
+% \generate{\file{p1.sty}{\from{s1.dtx}{foo,bar}}
+% \file{p2.sty}{\from{s2.dtx}{baz}
+% \from{s3.dtx}{baz}}
+% \file{p3.sty}{\from{s1.dtx}{zip}
+% \from{s2.dtx}{zip}}
+% }
+%\end{verbatim}
+% will cause \ds{} to read files \texttt{s1.dtx}, \texttt{s2.dtx},
+% \texttt{s3.dtx} (in that order) and produce files
+% \texttt{p1.sty}, \texttt{p2.sty}, \texttt{p3.sty}.
+%
+% The restriction to at most 16 output streams open in a while
+% does not mean that you can produce at most 16 files with one
+% |\generate|. In the example above only 2 streams are needed,
+% since while \texttt{s1.dtx} is processed only \texttt{p1.sty} and
+% \texttt{p3.sty} are being generated; while reading
+% \texttt{s2.dtx} only \texttt{p2.sty} and \texttt{p3.sty}; and
+% while reading \texttt{s3.dtx} file \texttt{p2.sty} . However
+% example below needs 3 streams:
+%\begin{verbatim}
+% \generate{\file{p1.sty}{\from{s1.dtx}{foo,bar}}
+% \file{p2.sty}{\from{s2.dtx}{baz}
+% \from{s3.dtx}{baz}}
+% \file{p3.sty}{\from{s1.dtx}{zip}
+% \from{s3.dtx}{zip}}
+% }
+%\end{verbatim}
+% Although while reading \texttt{s2.dtx} file \texttt{p3.sty} is
+% not written it must remain open since some parts of
+% \texttt{s3.dtx} will go to it later.
+%
+% Sometimes it is not possible to create a file by reading all
+% sources once. Consider the following example:
+%\begin{verbatim}
+% \generate{\file{p1.sty}{\from{s1.dtx}{head}
+% \from{s2.dtx}{foo}
+% \from{s1.dtx}{tail}}
+% \file{s1.drv}{\from{s1.dtx}{driver}}
+% }
+%\end{verbatim}
+% To generate \texttt{p1.sty} file \texttt{s1.dtx} must be read
+% twice: first time with option \texttt{head}, then file
+% \texttt{s2.dtx} is read and then \texttt{s1.dtx} again this time
+% with option \texttt{tail}. \ds{} handles this case correctly: if
+% inside one |\file| declaration there are multiple |\from|es with
+% the same input file this file \emph{is} read multiple times.
+%
+% If the order of |\from|s specified in one of your |\file|
+% specifications does not match the order of input files
+% established by previous |\file|s, \ds{} will raise an error and
+% abort. Then you may either read one of next sections or give up
+% and put that file in separate |\generate| (but then sources will
+% be read again just for that file).
+%
+% \paragraph{For impatient.} Try following algorithm: Find
+% file that is generated from largest number of sources, start
+% writing |\generate| clause with this file and its sources in
+% proper order. Take other files that are to be generated and add
+% them checking if they don't contradict order of sources for the
+% first one. If this doesn't work read next sections.
+%
+% \paragraph{For mathematicians.} Relation ``file $A$ must be
+% read before file $B$'' is a partial order on the set of all your
+% source files. Each |\from| clause adds a chain to this order.
+% What you have to do is to perform a topological sort i.e. to
+% extend partial order to linear one. When you have done it just
+% list your source files in |\generate| in such a way that order of
+% their first appearance in the clause matches linear order. If
+% this cannot be achieved read next paragraph. (Maybe future
+% versions of \ds{} will perform this sort automatically, so all
+% these troubles will disappear.)
+%
+% \paragraph{For that who must know that all.} There is a
+% diverse case when it's not possible to achieve proper order of
+% reading source files. Suppose you have to generate two files,
+% first from \texttt{s1.dtx} and \texttt{s3.dtx} (in that order)
+% and second from \texttt{s2.dtx} and \texttt{s3.dtx}. Whatever
+% way you specify this the files will be read in either as
+% \texttt{s1 s3 s2} or \texttt{s2 s3 s1}. The key to solution is
+% magical macro |\needed| that marks a file as needed to be input
+% but not directing any output from it to current |\file|. In our
+% example proper specification is:
+%\begin{verbatim}
+% \generate{\file{p1.sty}{\from{s1.dtx}{foo}
+% \needed{s2.dtx}
+% \from{s3.dtx}{bar}}
+% \file{p2.sty}{\from{s2.dtx}{zip}
+% \from{s3.dtx}{zap}}
+% }
+%\end{verbatim}
+%
+%
+% \DescribeMacro{\askforoverwritetrue}
+% \DescribeMacro{\askforoverwritefalse}
+% These macros specify what should happen if a file that is to be
+% generated already exists. If |\askforoverwritetrue| is active
+% (the default) the user is asked whether the file should be
+% overwritten. If however |\askforoverwritefalse| was issued
+% existing files will be overwritten silently. These switches are
+% local and can be issued in any place in the file even inside
+% |\generate| clause (between |\file|s however).
+%
+% \DescribeMacro{\askonceonly}
+% You might not want to set |\askforoverwritefalse| in a batch file
+% as that says that it us always all right to overwrite other people's
+% files. However for large installations, such as the base \LaTeX\
+% distribution, being asked individually about hundreds of files
+% is not very helpful either. A batchfile may therefore specify
+% |\askonceonly|. This means that after the first time the batchfile
+% asks the user a question, the user is given an option of to change
+% the behaviour so that `yes' will be automatically assumed for all
+% future questions. This applies to any use of the \ds{} command
+% |\Ask| including, but not restricted to, the file overwrite
+% questions controlled by |\askforoverwritetrue|.
+%
+% \DescribeMacro{\preamble}
+% \DescribeMacro{\endpreamble}
+% \DescribeMacro{\postamble}
+% \DescribeMacro{\endpostamble}
+% It is possible to add a number of lines to the output of the
+% \ds{} program. The information you want to add to the start of
+% the output file should be listed between the |\preamble| and
+% |\endpreamble| commands; the lines you want to add to the end of
+% the output file should be listed between the |\postamble| and
+% |\endpostamble| commands. Everything that \ds{} finds for both
+% the pre- and postamble it writes to the output file, but preceded
+% with value of |\MetaPrefix| (default is two \%-characters). If
+% you include a |^^J| character in one of these lines, everything
+% that follows it on the same line is written to a new line in the
+% output file. This `feature' can be used to add a |\typeout| or
+% |\message| to the stripped file.
+%
+% \DescribeMacro{\declarepreamble}
+% \DescribeMacro{\declarepostamble}
+% \DescribeMacro{\usepreamble}
+% \DescribeMacro{\usepostamble}
+% \DescribeMacro{\nopreamble}
+% \DescribeMacro{\nopostamble}
+% Sometimes it is desirable to have different preambles for different
+% files of a larger package (e.g., because some of them are
+% customisable configuration files and they should be marked as
+% such). In such a case one can say |\declarepreamble\somename|,
+% then type in his/her preamble, end it with |\endpreamble|,
+% and later on |\usepreamble\somename| to switch to this
+% preamble.
+% If no preamble should be used you can deploy the |\nopreamble|
+% command. This command is equivalent to saying |\usepreamble\empty|.
+% The same mechanism works for postambles, |\use...|
+% declarations are local and can appear inside |\generate|.
+%
+% Commands |\preamble| and |\postamble| define and activate
+% pre(post)ambles named |\defaultpreamble| and |\defaultpostamble|.
+%
+% \DescribeMacro{\batchinput}
+% The batch file commands can be put into several batch files which
+% are then executed from a master batch file. This is, for example,
+% useful if a distribution consists of several distinct parts. You
+% can then write individual batch files for every part and in
+% addition a master file that simply calls the batch files for the
+% parts. For this, call the individual batch files from the master
+% file with the command |\batchinput{|\meta{file}|}|. Don't use
+% |\input| for this purpose, this command
+% should be used only for calling the \ds{} program as explained
+% above and is ignored when used for any other purpose.
+%
+% \DescribeMacro{\ifToplevel}
+% When batch files are nested you may want to suppress certain
+% commands in the lower-level batch files such as terminal
+% messages. For this purpose you can use the |\ifToplevel| command
+% which executes its argument only if the current batch file is the
+% outermost one. Make sure that you put the opening brace of the
+% argument into the same line as the command itself, otherwise the
+% \ds{} program will get confused.
+%
+% \DescribeMacro{\showprogress}
+% \DescribeMacro{\keepsilent}
+% When the option \texttt{stats} is included in \ds{} it can
+% write message to the terminal as each line of the input file(s) is
+% processed. This message consists of a single character, indicating
+% kind of that particular line. We use the
+% following characters:
+% \begin{itemize}
+% \item[\texttt{\%}] Whenever an input line is a comment
+% \texttt{\%}-character is written to the terminal.
+% \item[\texttt{.}] Whenever a code line is encountered
+% a \texttt{.}-character is written on the terminal.
+% \item[\texttt{/}] When a number of empty lines appear in a row in the
+% input file, at most one of them is retained. The \ds{}
+% program signals the removal of an empty line with the
+% \texttt{/}-character.
+% \item[\texttt{<}] When a `guard line' is found in the input and it
+% starts a block of optionally included code, this is signalled
+% on the terminal by showing the \texttt{<}-character, together
+% with the boolean expression of the guard.
+% \item[\texttt{>}] The end of a conditionally included block of code is
+% indicated by showing the \texttt{>}-character.
+% \end{itemize}
+% This feature is turned on by default when the option
+% \texttt{stats} is included, otherwise it is turned off. The
+% feature can be toggled with the commands |\showprogress| and
+% |\keepsilent|.
+%
+%
+% \subsubsection{Supporting old interface}
+%
+% \DescribeMacro{\generateFile}
+% Here is the old syntax for specifying what files are to be
+% generated. It allows specification of just one output file.
+% \begin{quote}
+% |\generateFile{|\meta{output}|}{|\meta{ask}|}{|[|\from{|^^A
+% \meta{input}|}{|\meta{optionlist}|}|]*|}|
+% \end{quote}
+% The meaning of \meta{output}, \meta{input} and
+% \meta{optionslist} is just as for |\generate|. With
+% \meta{ask} you can instruct \TeX\ to either silently overwrite a
+% previously existing file (|f|) or to issue a warning and ask you
+% if it should overwrite the existing file (|t|) (it overrides the
+% |\askforoverwrite| setting).
+%
+% \DescribeMacro{\include}
+% \DescribeMacro{\processFile}
+% The earlier version of the \ds{} program supported a
+% different kind of command to tell \TeX\ what to do. This command
+% is less powerful than |\generateFile|; it can be used when
+% \meta{output} is created from one \meta{input}. The syntax is:
+% \begin{quote}
+% |\include{|\meta{optionlist}|}|
+%
+% |\processFile{|\meta{name}|}{|\meta{inext}^^A
+% |}{|\meta{outext}^^A
+% |}{|\meta{ask}|}|
+% \end{quote}
+% This command is based on environments where filenames are
+% constructed of two parts, the name and the extension, separated
+% with a dot. The syntax of this command assumes that the
+% \meta{input} and \meta{output} share the same name and only
+% differ in their extension. This command is retained to be
+% backwards compatible with the older version of \ds{}, but its use
+% is not encouraged.
+%
+% \section{Conditional inclusion of code}
+%
+% When you use the \ds{} program to strip comments out of
+% \TeX\ macro files you have the possibility to make more than one
+% stripped macro file from one documented file. This is achieved by
+% the support for optional code. The optional code is marked
+% in the documented file with a `guard'.
+%
+% A guard is a boolean expression that is enclosed in |<| and |>|.
+% It also {\em has\/} to follow the |%| at the beginning of the line.
+% For example:
+%\begin{verbatim}
+% ...
+% %<bool>\TeX code
+% ...
+%\end{verbatim}
+% In this example the line of code will be included in \meta{output}
+% if the option \texttt{bool} is present in the \meta{optionlist} of
+% the |\generateFile| command.
+%
+% The syntax for the boolean expressions is:
+%
+%\DeleteShortVerb\|
+% \begin{tabular}{lcl}
+% \meta{Expression} & $::=$ & \meta{Secondary}
+% [\{\texttt{|}, \texttt{,}\}
+% \meta{Secondary}]*\\
+% \meta{Secondary} & $::=$ &
+% \meta{Primary} [\texttt{\&}
+% \meta{Primary}]*\\
+% \meta{Primary} & $::=$ &
+% \meta{Terminal} $|$ \texttt{!}\meta{Primary}
+% $|$ \texttt{(}\meta{Expression}\texttt{)}\\
+% \end{tabular}
+%
+% The \texttt{|} stands for disjunction, the \texttt{\&} stands for
+% conjunction and the \texttt{!}\ stands for negation. The
+% \meta{Terminal} is any sequence of letters and evaluates to
+% \meta{true} iff\footnote{iff stands for `if and only if'} it
+% occurs in the list of options that have to be included.
+%\MakeShortVerb\|
+%
+% Two kinds of optional code are supported: one can either have
+% optional code that `fits' on one line of text, like the example
+% above, or one can have blocks of optional code.
+%
+% To distinguish both kinds of optional code the `guard modifier'
+% has been introduced. The `guard modifier' is one character that
+% immediately follows the |<| of the guard. It can be either |*|
+% for the beginning of a block of code, or |/| for the end of a
+% block of code\footnote{To be compatible with the earlier version
+% of \ds{} also \texttt{+} and \texttt{-} are supported as `guard
+% modifiers'. However, there is an incompatibility with the
+% earlier version since a line with a \texttt{+}-modified guard is
+% not included inside a block with a guard that evaluates to false,
+% in contrast to the previous behaviour.}. The beginning and
+% ending guards for a block of code have to be on a line by
+% themselves.
+%
+% When a block of code is {\em not\/} included, any guards that occur
+% within that block are {\em not\/} evaluated.
+%
+% \section{Those other languages}
+% Since \TeX\ is an open system some of \TeX\ packages include
+% non-\TeX\ files. Some authors use \ds\ to generate PostScript
+% headers, shell scripts or programs in other languages. For them
+% the comments-stripping activity of \ds\ may cause some
+% trouble. This section describes how to produce non-\TeX\ files
+% with \ds\ effectively.
+%
+% \subsection{Stuff \ds\ puts in every file}
+% First problem when producing files in ``other'' languages is that
+% \ds\ adds some bits to the beginning and end of every generated
+% file that may not fit with the syntax of the language in
+% question. So we'll study carefully what exactly goes where.
+%
+% The whole text put on beginning of file is kept in a macro defined
+% by |\declarepreamble|. Every line of input presented to
+% |\declarepreamble| is prepended with current value of
+% |\MetaPrefix|. Standard \ds\ header is inserted before your text,
+% and macros |\inFileName|, |\outFileName| and |\ReferenceLines|
+% are used as placeholders for information which will be filled in
+% later (specifically for each output file). Don't try to redefine
+% these macros. After
+%\begin{verbatim}
+% \declarepreamble\foo
+% ____________________________
+% Package FOO for use with TeX
+% \endpreamble
+%\end{verbatim}
+% macro |\foo| is defined as
+%\begin{verbatim}
+% %%^^J
+% %% This is file `\outFileName ',^^J
+% %% generated with the docstrip utility.^^J
+% \ReferenceLines^^J
+% %% ____________________________^^J
+% %% Package FOO for use with TeX.
+%\end{verbatim}
+% You can play with it freely or even define it from scratch. To
+% embed the preamble in Adobe structured comments just use |\edef|:
+%\begin{verbatim}
+% \edef\foo{\perCent!PS-Adobe-3.0^^J%
+% \DoubleperCent\space Title: \outFileName^^J%
+% \foo^^J%
+% \DoubleperCent\space EndComments}
+%\end{verbatim}
+% After that use |\usepreamble\foo| to select your new preamble.
+% Everything above works as well for postambles.
+%
+% You may also prevent \ds\ from adding anything to your file, and
+% put any language specific invocations directly in your code:
+%\begin{verbatim}
+% \generate{\usepreamble\empty
+% \usepostamble\empty
+% \file{foo.ps}{\from{mypackage.dtx}{ps}}}
+%\end{verbatim}
+% or alternatively |\nopreamble| and |\nopostamble|.
+%
+% \subsection{Meta comments}
+% You can change the prefix used for putting meta comments to
+% output files by redefining |\MetaPrefix|. Its default value is
+% |\DoubleperCent|. The preamble uses value of |\MetaPrefix|
+% current at time of |\declarepreamble| while meta comments in the
+% source file use value current at time of |\generate|. Note that
+% this means that you cannot produce concurrently two files using
+% different |\MetaPrefix|es.
+%
+% \subsection{Verbatim mode}
+% If your programming language uses some construct that can
+% interferes badly with \ds\ (e.g., percent in column one) you may
+% need a way for preventing it from being stripped off. For that
+% purpose \ds\ features `verbatim mode'.
+%
+% A `Guard expression' of the form |%<<|\meta{END-TAG} marks
+% the start of a section that will be copied verbatim upto a line
+% containing only a percent in column 1 followed by \meta{END-TAG}.
+% You can select any \meta{END-TAG} you want, but note that spaces
+% count here. Example:
+%\begin{verbatim}
+% %<*myblock>
+% some stupid()
+% #computer<program>
+% %<<COMMENT
+% % These two lines are copied verbatim (including percents
+% %% even if \MetaPrefix is something different than %%).
+% %COMMENT
+% using*strange@programming<language>
+% %</myblock>
+%\end{verbatim}
+% And the output is (when stripped with \texttt{myblock} defined):
+%\begin{verbatim}
+% some stupid()
+% #computer<program>
+% % These two lines are copied verbatim (including percents
+% %% even if \MetaPrefix is something different than %%).
+% using*strange@programming<language>
+%\end{verbatim}
+%
+%\StopEventually{%
+%^^A \section{Conclusion}
+% \PrintIndex
+% \PrintChanges
+%^^A \makesignature
+% }
+%
+% \section{Producing the documentation}
+%
+% We provide a short driver file that can be extracted by the
+% \ds{} program using the conditional `\textsf{driver}'. To
+% allow the use of \texttt{docstrip.dtx} as a program at Ini\TeX{}
+% time (e.g., to strip
+% off its own comments) we need to add a bit of primitive code.
+% With this extra checking it is still possible to process this
+% file with \LaTeXe{} to typeset the documentation.
+% \changes{2.1b}{1993/02/23}{Added fontdefinitions for doc to the driver
+% file, in order to get the layout of the code
+% right; also added the layout definitions
+% that are in effect in \texttt{doc.drv}}
+% \changes{2.1c}{1993/02/23}{Remove definitions for fonts again}
+% \changes{2.2f}{1994/02/26}{Allow direct processing of source}
+% \begin{macrocode}
+%<*driver>
+% \end{macrocode}
+% If |\documentclass| is undefined, e.g., if Ini\TeX{} or plain
+% \TeX{} is used for formatting, we bypass the driver file.
+%
+% \changes{2.3a}{1995/08/20}{Changed driver}
+% We use some trickery to avoid issuing |\end{document}| when
+% the |\ifx| construction is unfinished. If condition below is
+% true a |\fi| is constructed on the fly, the |\ifx| is completed,
+% and the real |\fi| will never be seen as it comes after
+% |\end{document}|. On the other hand if condition is false
+% \TeX\ skips over |\csname fi\endcsname| having no idea that
+% this could stand for |\fi|, driver is skipped and only then
+% the condition completed.
+%
+% Additional guard |gobble| prevents \ds\ from extracting
+% these tricks to real driver file.
+% \begin{macrocode}
+%<*gobble>
+\ifx\jobname\relax\let\documentclass\undefined\fi
+\ifx\documentclass\undefined
+\else \csname fi\endcsname
+%</gobble>
+% \end{macrocode}
+% Otherwise we process the following lines which will result in
+% formatting the documentation.
+% \begin{macrocode}
+ \documentclass{ltxdoc}
+ \EnableCrossrefs
+ % \DisableCrossrefs
+ % use \DisableCrossrefs if the
+ % index is ready
+ \RecordChanges
+ % \OnlyDescription
+ \typeout{Expect some Under- and overfull boxes}
+ \begin{document}
+ \DocInput{docstrip.dtx}
+ \end{document}
+%<*gobble>
+\fi
+%</gobble>
+%</driver>
+% \end{macrocode}
+%
+%
+% \section{The implementation}
+%
+% \subsection{Initex initializations}
+% Allow this program to run with |initex|.
+% The |Z| trickery saves the need to worry about |\outer| stuff in
+% plain \TeX.
+% \begin{macrocode}
+%<*initex>
+\catcode`\Z=\catcode`\%
+\ifnum13=\catcode`\~{\egroup\else
+ \catcode`\Z=9
+Z
+Z \catcode`\{=1 \catcode`\}=2
+Z \catcode`\#=6 \catcode`\^=7
+Z \catcode`\@=11 \catcode`\^^L=13
+Z \let\bgroup={ \let\egroup=}
+Z
+Z \dimendef\z@=10 \z@=0pt \chardef\@ne=1 \countdef\m@ne=22 \m@ne=-1
+Z \countdef\count@=255
+Z
+Z \def\wlog{\immediate\write\m@ne} \def\space{ }
+Z
+Z \count10=22 % allocates \count registers 23, 24, ...
+Z \count15=9 % allocates \toks registers 10, 11, ...
+Z \count16=-1 % allocates input streams 0, 1, ...
+Z \count17=-1 % allocates output streams 0, 1, ...
+Z
+Z \def\alloc@#1#2#3{\advance\count1#1\@ne#2#3\count1#1\relax}
+Z
+Z \def\newcount{\alloc@0\countdef} \def\newtoks{\alloc@5\toksdef}
+Z \def\newread{\alloc@6\chardef} \def\newwrite{\alloc@7\chardef}
+Z
+Z \def\newif#1{%
+Z \count@\escapechar \escapechar\m@ne
+Z \let#1\iffalse
+Z \@if#1\iftrue
+Z \@if#1\iffalse
+Z \escapechar\count@}
+Z \def\@if#1#2{%
+Z \expandafter\def\csname\expandafter\@gobbletwo\string#1%
+Z \expandafter\@gobbletwo\string#2\endcsname
+Z {\let#1#2}}
+Z
+Z \def\@gobbletwo#1#2{}
+Z \def\@gobblethree#1#2#3{}
+Z
+Z \def\loop#1\repeat{\def\body{#1}\iterate}
+Z \def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
+Z \let\repeat\fi
+Z
+Z \def\empty{}
+Z
+Z \def\tracingall{\tracingcommands2 \tracingstats2
+Z \tracingpages1 \tracingoutput1 \tracinglostchars1
+Z \tracingmacros2 \tracingparagraphs1 \tracingrestores1
+Z \showboxbreadth 10000 \showboxdepth 10000 \errorstopmode
+Z \errorcontextlines 10000 \tracingonline1 }
+Z
+\bgroup}\fi\catcode`\Z=11
+\let\bgroup={ \let\egroup=}
+%</initex>
+% \end{macrocode}
+%
+% \subsection{Declarations and initializations}
+%
+% In order to be able to include the \texttt{@}-sign in control
+% sequences its category code is changed to \meta{letter}. The
+% `program' guard here allows most of the code to be excluded when
+% extracting the driver file.
+% \begin{macrocode}
+%<*program>
+\catcode`\@=11
+% \end{macrocode}
+%
+% When we want to write multiple lines to the terminal with one
+% statement, we need a character that tells \TeX\ to break the lines.
+% We use \verb=^^J= for this purpose.
+% \begin{macrocode}
+\newlinechar=`\^^J
+% \end{macrocode}
+%
+% \changes{2.58}{2018/05/03}{Read 8bit raw to leave high bits in the
+% .ins files unchanged}
+% Reset the catcodes of 8-bit characters so that processing a \texttt{.ins}
+% file with plain \TeX\ or \LaTeX\ both work.
+% \begin{macrocode}
+\count@=128\relax
+\loop
+ \catcode\count@ 12\relax
+\ifnum\count@ <255\relax
+ \advance\count@\@ne
+\repeat
+% \end{macrocode}
+%
+% \subsubsection{Switches}
+% \begin{macro}{\ifGenerate}
+% The program will check if a
+% file of the same name as the file it would be creating already
+% exists. The switch |\ifGenerate| is used to indicate if the
+% stripped file has to be generated.
+% \begin{macrocode}
+\newif\ifGenerate
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifContinue}
+% The switch |\ifContinue| is used in various places in the
+% program to indicate if a |\loop| has to end.
+% \begin{macrocode}
+\newif\ifContinue
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifForlist}
+% \changes{2.0g}{1991/06/05}{Macro added.}
+% The program contains an implementation of a for-loop, based on
+% plain \TeX{}'s |\loop| macros. The implementation needs a
+% switch to terminate the loop.
+% \begin{macrocode}
+\newif\ifForlist
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifDefault}
+% The switch |\ifDefault| is used to indicate whether the
+% default batch file has to be used.
+% \changes{2.0f}{1991/06/04}{Macro added.}
+% \begin{macrocode}
+\newif\ifDefault
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifMoreFiles}
+% The switch |\ifMoreFiles| is used to decide if the user
+% wants more files to be processed. It is used only in interactive
+% mode; initially it evaluates to \meta{true}.
+% \changes{2.0h}{1991/06/19}{Macro added.}
+% \begin{macrocode}
+\newif\ifMoreFiles \MoreFilestrue
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ifaskforoverwrite}
+% The switch |\askforoverwrite| is used to decide if the user
+% should be asked when a file is to be overwritten.
+% \begin{macrocode}
+\newif\ifaskforoverwrite \askforoverwritetrue
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Count registers}
+% \begin{macro}{\blockLevel}
+% Optionally included blocks of code can be nested. The counter
+% |\blockLevel| will be used to keep track of the level of
+% nesting. Its initial value is zero.
+% \begin{macrocode}
+\newcount\blockLevel \blockLevel\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\emptyLines}
+% The count register |\emptyLines| is used to count the number
+% of consecutive empty input lines. Only the first will be copied
+% to the output file.
+% \changes{2.0i}{1990/06/27}{Macro added}
+% \begin{macrocode}
+\newcount\emptyLines \emptyLines \z@
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\processedLines}
+% \begin{macro}{\commentsRemoved}
+% \begin{macro}{\commentsPassed}
+% \begin{macro}{\codeLinesPassed}
+% To be able to provide the user with some statistics about the
+% stripping process four counters are allocated if the statistics
+% have been included when this program was \ds{}ped. The number of
+% lines processed is stored in the counter |\processedLines|.
+% The number of lines containing comments that are not written on
+% the output file is stored in the counter |\commentsRemoved|;
+% the number of comments copied to the output file is stored in the
+% counter |\commentsPassed|. The number of lines containing
+% macro code that are copied to the output file is stored in the
+% counter |\codeLinesPassed|.
+% \begin{macrocode}
+%<*stats>
+\newcount\processedLines \processedLines \z@
+\newcount\commentsRemoved \commentsRemoved \z@
+\newcount\commentsPassed \commentsPassed \z@
+\newcount\codeLinesPassed \codeLinesPassed \z@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{2.0e}{1991/05/31}{Added counter allocation for the processing
+% of multiple files}
+% \begin{macro}{\TotalprocessedLines}
+% \begin{macro}{\TotalcommentsRemoved}
+% \begin{macro}{\TotalcommentsPassed}
+% \begin{macro}{\TotalcodeLinesPassed}
+% When more than one file is processed and when statistics have
+% been included we provide the user also with information about the
+% total amount of lines processed. For this purpose four more count
+% registers are allocated here.
+% \begin{macrocode}
+\newcount\TotalprocessedLines \TotalprocessedLines \z@
+\newcount\TotalcommentsRemoved \TotalcommentsRemoved \z@
+\newcount\TotalcommentsPassed \TotalcommentsPassed \z@
+\newcount\TotalcodeLinesPassed \TotalcodeLinesPassed \z@
+%</stats>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NumberOfFiles}
+% When more than one file is processed, the number of files is
+% stored in the count register |\NumberOfFiles|.
+% \changes{2.4h}{1997/07/07}{Declare counter always pr/2429}
+% \begin{macrocode}
+\newcount\NumberOfFiles \NumberOfFiles\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{I/O streams}
+% \begin{macro}{\inFile}
+% For reading the file with documented \TeX-code, an input stream
+% |\inFile| is allocated.
+% \begin{macrocode}
+\newread\inFile
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{2.3a}{1995/08/18}{No allocated streams for console}
+% \begin{macro}{\ttyin}
+% \begin{macro}{\ttyout}
+% Communication with the user goes through (nonexistent) stream 16.
+% \begin{macrocode}
+\chardef\ttyin16
+\chardef\ttyout16
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\inputcheck}
+% This stream is only used for checking for existence of files.
+% \begin{macrocode}
+\newread\inputcheck
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifToplevel}
+% Execute the argument if current batch file is the outermost one.
+% Otherwise suppress it.
+% \begin{macrocode}
+\newif\iftopbatchfile \topbatchfiletrue
+\def\ifToplevel{\relax\iftopbatchfile
+ \expandafter\iden \else \expandafter\@gobble\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\batchinput}
+% \changes{2.0n}{1992/04/26}{Added macro}
+% \changes{2.1a}{1993/02/22}{Completely redefined (so that it works)}
+%
+% When the file \texttt{docstrip.tex} is read because of an
+% |\input| statement in a batch file we have to prevent an
+% endless loop (well, limited by \TeX's stack). Therefore we save
+% the original primitive |\input| and define a new macro with
+% an argument delimited by \verb*= = (i.e.\ a space) that just
+% gobbles the argument. Since the end-of-line character is
+% converted by \TeX{} to a space. This means that |\input| is not
+% available as a command within batch files.
+%
+% \begin{macro}{\@@input}
+% \changes{2.1a}{1993/02/22}{Macro added}
+% We therefore keep a copy of the original under the name
+% |\@@input| for internal use. If \ds{} runs under \LaTeX{} this
+% command is already defined, so we make a quick test.
+% \begin{macrocode}
+\ifx\undefined\@@input \let\@@input\input\fi
+% \end{macrocode}
+% \end{macro}
+%
+% To allow the nesting of batch files the |\batchinput| command is
+% provided it takes one argument, the name of the batch file to
+% switch to.
+% \begin{macrocode}
+\def\batchinput#1{%
+% \end{macrocode}
+% We start a new group and locally redefine |\batchFile| to hold
+% the new batch file name. We toggle the |\iftopbatchfile| switch
+% since this definitely is not top batch file.
+% \begin{macrocode}
+ \begingroup
+ \def\batchfile{#1}%
+ \topbatchfilefalse
+ \Defaultfalse
+ \usepreamble\org@preamble
+ \usepostamble\org@postamble
+ \let\destdir\WriteToDir
+% \end{macrocode}
+% After this we can simply call |\processbatchFile| which will
+% open the new batch file and read it until it
+% is exhausted. Note that if the batch file is not available, or
+% misspelled this routine will produce a warning and return.
+% \begin{macrocode}
+ \processbatchFile
+% \end{macrocode}
+% The value of |\batchfile| as well as local definitions of
+% preambles, directories etc. will be restored
+% at this closing |\endgroup|, so that further processing
+% continues in the calling batch file.
+% \begin{macrocode}
+ \endgroup
+}
+% \end{macrocode}
+% \begin{macro}{\skip@input}
+% \changes{2.0j}{1992/03/03}{Added macro}
+% \changes{2.0n}{1992/04/26}{Argument delimited by space not \cs{relax}}
+% \changes{2.0n}{1992/04/26}{Macro renamed from \cs{skipinput}}
+% And here is the promised redefinition of |\input|:
+% \begin{macrocode}
+\def\skip@input#1 {}
+\let\input\skip@input
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Empty macros and macros that expand to a string}
+% \begin{macro}{\guardStack}
+% \changes{2.0k}{1992/04/06}{Renamed from \texttt{\bsl blockStack}}
+% Because blocks of code that will conditionally be included in the
+% output can be nested, a stack is maintained to keep track of
+% these blocks. The main reason for this is that we want to be able
+% to check if the blocks are properly nested. The stack itself is
+% stored in |\guardStack|.
+% \begin{macrocode}
+\def\guardStack{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\blockHead}
+% The macro |\blockHead| is used for storing and retrieving
+% the boolean expression that starts a block.
+% \begin{macrocode}
+\def\blockHead{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\yes}
+% \begin{macro}{\y}
+% When the user is asked a question that he has to answer with either
+% \meta{yes} or \meta{no}, his response has to be evaluated. For this
+% reason the macros |\yes| and |\y| are defined.
+% \begin{macrocode}
+\def\yes{yes}
+\def\y{y}
+% \end{macrocode}
+% \begin{macro}{\n}
+% We also define |\n| for use in \ds{} command files.
+% \changes{2.1e}{1993/03/09}{Macro added}
+% \begin{macrocode}
+\def\n{n}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Defaultbatchile}
+% \changes{2.0f}{1991/06/04}{Macro added.}
+% When the \ds{} program has to process a batch file it
+% can look for a batch file with a default name. This name
+% is stored in |\DefaultbatchFile|.
+% \begin{macrocode}
+\def\DefaultbatchFile{docstrip.cmd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\perCent}
+% \begin{macro}{\DoubleperCent}
+% \begin{macro}{\MetaPrefix}
+% To be able to display percent-signs on the terminal, a
+% \texttt{\%} with category code 12 is stored in |\perCent| and
+% |\DoubleperCent|. The macro |\MetaPrefix| is put on beginning of
+% every meta-comment line. It is defined indirect way since some
+% applications need redefining it.
+% \begin{macrocode}
+{\catcode`\%=12
+ \gdef\perCent{%}
+ \gdef\DoubleperCent{%%}
+}
+\let\MetaPrefix\DoubleperCent
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% In order to allow formfeeds in the input we define a one-character
+% control sequence \verb=^^L=.
+% \begin{macrocode}
+\def^^L{ }
+% \end{macrocode}
+%
+% The only result of using |\Name| is slowing down execution since
+% its typical use (e.g., |\Name\def{foo bar}...|) has exactly the
+% same number of tokens as its expansion. However I think that it's
+% easier to read. The meaning of |\Name| as a black box is:
+% ``construct a name from second parameter and then pass it to your
+% first parameter as a parameter''.
+%
+% |\@stripstring| is used to get tokens building name of a macro
+% without leading backslash.
+% \begin{macrocode}
+\def\Name#1#2{\expandafter#1\csname#2\endcsname}
+\def\@stripstring{\expandafter\@gobble\string}
+% \end{macrocode}
+%
+% \subsubsection{Miscellaneous variables}
+% \begin{macro}{\sourceFileName}
+% The macro |\sourceFileName| is used to store the name of the
+% current input file.
+% \end{macro}
+% \begin{macro}{\batchfile}
+% The macro |\batchfile| is used to store the name of the
+% batch file.
+% \end{macro}
+% \begin{macro}{\inLine}
+% The macro |\inLine| is used to store the lines, read from
+% the input file, before further processing.
+% \end{macro}
+% \begin{macro}{\answer}
+% When some interaction with the user is needed the macro
+% |\answer| is used to store his response.
+% \end{macro}
+% \begin{macro}{\tmp}
+% Sometimes something has to be temporarily stored in a control
+% sequence. For these purposes the control sequence |\tmp| is
+% used.
+% \end{macro}
+%
+% \subsection{Support macros}
+% \subsubsection{The stack mechanism}
+%
+% It is possible to have `nested guards'. This means that within a
+% block of optionally included code a subgroup is only included
+% when an additional option is specified. To keep track of the
+% nesting of the guards the currently `open' guard can be pushed on
+% the stack |\guardStack| and later popped off the stack again. The
+% macros that implement this stack mechanism are loosely based on
+% code that is developed in the context of the \LaTeX3 project.
+%
+% To be able to implement a stack mechanism we need a couple of
+% support macros.
+% \begin{macro}{\eltStart}
+% \changes{2.0k}{1992/04/06}{Macro added}
+% \begin{macro}{\eltEnd}
+% \changes{2.0k}{1992/04/06}{Macro added}
+% The macros |\eltStart| and |\eltEnd| are used to delimit a stack
+% element. They are both empty.
+% \begin{macrocode}
+\def\eltStart{}
+\def\eltEnd{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\qStop}
+% \changes{2.0k}{1992/04/06}{Macro added}
+% The macro |\qStop| is a so-called `quark', a macro that expands to
+% itself\footnote{The concept of `quarks' is developed for the
+% \LaTeX3 project.}.
+% \begin{macrocode}
+\def\qStop{\qStop}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pop}
+% \changes{2.0k}{1992/04/06}{Macro added} The macro
+% |\pop|\meta{stack}\meta{cs} `pops' the top element from the
+% stack. It assigns the value of the top element to \meta{cs} and
+% removes it from \meta{stack}. When \meta{stack} is empty a
+% warning is issued and \meta{cs} is assigned an empty value.
+% \begin{macrocode}
+\def\pop#1#2{%
+ \ifx#1\empty
+ \Msg{Warning: Found end guard without matching begin}%
+ \let#2\empty
+ \else
+% \end{macrocode}
+% To be able to `peel' off the first guard we use an extra macro
+% |\popX| that receives both the expanded and the unexpanded stack
+% in its arguments. The expanded stack is delimited with the quark
+% |\qStop|.
+% \begin{macrocode}
+ \def\tmp{\expandafter\popX #1\qStop #1#2}%
+ \expandafter\tmp\fi}
+% \end{macrocode}
+% \begin{macro}{\popX}
+% \changes{2.0k}{1992/04/06}{Macro added} When the stack is expanded
+% the elements are surrounded with |\eltStart| and |\eltEnd|. The
+% first element of the stack is assigned to |#4|.
+% \begin{macrocode}
+\def\popX\eltStart #1\eltEnd #2\qStop #3#4{\def#3{#2}\def#4{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\push}
+% \changes{2.0k}{1992/04/06}{Macro added}
+% Guards can be pushed on the stack using the macro
+% |\push|\meta{stack}\meta{guard}. Again we need a secondary macro
+% (|\pushX|) that has both the expanded and the unexpanded stack as
+% arguments.
+% \begin{macrocode}
+\def\push#1#2{\expandafter\pushX #1\qStop #1{\eltStart #2\eltEnd}}
+% \end{macrocode}
+% \begin{macro}{\pushX}
+% \changes{2.0k}{1992/04/06}{Macro added}
+% The macro |\pushX| picks up the complete expansion of the stack as
+% its first argument and places the guard in |#3| on the `top'.
+% \begin{macrocode}
+\def\pushX #1\qStop #2#3{\def #2{#3#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Programming structures}
+%
+% \begin{macro}{\forlist}
+% \changes{2.0g}{1991/06/05}{Macro added.}
+% When the program is used in interactive mode the
+% user can supply a list of files that have to be processed.
+% In order to process this list a for-loop is needed. This
+% implementation of such a programming construct is based on the
+% use of the \verb=\loop{=\meta{body}\verb=}\repeat= macro that
+% is defined in plain \TeX\@. The syntax for this loop is:
+% \begin{flushleft}
+% |\for|\meta{control sequence} |:=| \meta{list}
+% |\do|\\
+% \meta{body}\\
+% |\od|
+% \end{flushleft}
+% The \meta{list} should be a comma separated list.
+%
+% The first actions that have to be taken are to set the switch
+% |\ifForlist| to \meta{true} and to store the loop condition
+% in the macro |\ListCondition|. This is done using an
+% |\edef| to allow for a control sequence that contains a
+% \meta{list}.
+% \begin{macrocode}
+\def\forlist#1:=#2\do#3\od{%
+ \edef\ListCondition{#2}%
+ \Forlisttrue
+% \end{macrocode}
+% Then we start the loop.
+% We store the first element from the |\ListCondition| in the
+% macro that was supplied as the first argument to |\forlist|.
+% This element is then removed from the |\ListCondition|.
+% \begin{macrocode}
+ \loop
+ \edef#1{\expandafter\FirstElt\ListCondition,\empty.}%
+ \edef\ListCondition{\expandafter\OtherElts\ListCondition,\empty.}%
+% \end{macrocode}
+% When the first element from the \meta{list} is empty, we are done
+% processing, so we switch |\ifForlist| to \meta{false}.
+% When it is not empty we execute the third argument that should
+% contain \TeX\ commands to execute.
+% \begin{macrocode}
+ \ifx#1\empty \Forlistfalse \else#3\fi
+% \end{macrocode}
+% Finally we test the switch |\ifForlist| to decide whether the
+% loop has to be continued.
+% \begin{macrocode}
+ \ifForlist
+ \repeat}
+% \end{macrocode}
+% \begin{macro}{\FirstElt}
+% \changes{2.0g}{1991/06/05}{Macro added.}
+% The macro |\FirstElt| is used to get the first element from a
+% comma-separated list.
+% \begin{macrocode}
+\def\FirstElt#1,#2.{#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\OtherElts}
+% \changes{2.0g}{1991/06/05}{Macro added.}
+% The macro |\OtherElts| is used to get all elements {\em but\/}
+% the first element from a comma-separated list.
+% \begin{macrocode}
+\def\OtherElts#1,#2.{#2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\whileswitch}
+% \changes{2.0h}{1991/06/19}{Macro added.} When the program is used in
+% interactive mode the user might want to process several files
+% with different options or extensions. This goal could be reached
+% by running the program several times, but it is more
+% user-friendly to ask if he would like to process more files when
+% we are done processing his last request. To accomplish this we
+% need the implementation of a \texttt{while}-loop. Again plain
+% \TeX's \verb=\loop{=\meta{body}\verb=}\repeat= is used to
+% implement this programming structure.
+%
+% The syntax for this loop is:
+% \begin{flushleft}
+% |\whileswitch|\meta{switch} \verb|\fi| \meta{list}
+% \verb={=\meta{body}\verb=}=\\
+% \end{flushleft}
+% The first argument to this macro has to be a switch, defined
+% using |\newif|; the second argument contains the statements
+% to execute while the switch evaluates to \meta{true}.
+% \begin{macrocode}
+\def\whileswitch#1\fi#2{#1\loop#2#1\repeat\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{2.3a}{1995/08/18}{New mechanism: output streams allocation}
+%
+% \subsubsection{Output streams allocator}
+%
+% For each of sixteen output streams available we have a macro
+% named |\s@0| through |\s@15| saying if the stream is assigned to a
+% file~(1) or not~(0). Initially all streams are not assigned.
+%
+% We also declare 16 counters which will be needed by the conditional
+% code inclusion algorithm.
+%
+% \begin{macrocode}
+\ifx\@tempcnta\undefined \newcount\@tempcnta \fi
+\@tempcnta=0
+\loop
+\Name\chardef{s@\number\@tempcnta}=0
+\csname newcount\expandafter\endcsname%
+ \csname off@\number\@tempcnta\endcsname
+\advance\@tempcnta1
+\ifnum\@tempcnta<16\repeat
+% \end{macrocode}
+%
+% We will use \emph{The \TeX book} style list to search through streams.
+%
+% \begin{macrocode}
+\let\s@do\relax
+\edef\@outputstreams{%
+ \s@do\Name\noexpand{s@0}\s@do\Name\noexpand{s@1}%
+ \s@do\Name\noexpand{s@2}\s@do\Name\noexpand{s@3}%
+ \s@do\Name\noexpand{s@4}\s@do\Name\noexpand{s@5}%
+ \s@do\Name\noexpand{s@6}\s@do\Name\noexpand{s@7}%
+ \s@do\Name\noexpand{s@8}\s@do\Name\noexpand{s@9}%
+ \s@do\Name\noexpand{s@10}\s@do\Name\noexpand{s@11}%
+ \s@do\Name\noexpand{s@12}\s@do\Name\noexpand{s@13}%
+ \s@do\Name\noexpand{s@14}\s@do\Name\noexpand{s@15}%
+ \noexpand\@nostreamerror
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@nostreamerror}\begin{macro}{\@streamfound}
+% When |\@outputstreams| is executed |\s@do| is defined to do
+% something on condition of some test. If condition
+% always fails macro |\@nostreamerror| on the end of the list
+% causes an error. When condition succeeds |\@streamfound| is
+% called, which gobbles rest of the list including the ending
+% |\@nostreamerror|. It also gobbles |\fi| ending the condition, so
+% the |\fi| is reinserted.
+%
+% \begin{macrocode}
+\def\@nostreamerror{\errmessage{No more output streams!}}
+\def\@streamfound#1\@nostreamerror{\fi}
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% |\@stripstr| is auxiliary macro eating characters |\s@|
+% (backslash,s,@). It is defined in somewhat strange way since |\s@|
+% must have all category code 12 (other). This macro is used to
+% extract stream numbers from stream names.
+%
+% \begin{macrocode}
+\bgroup\edef\x{\egroup
+ \def\noexpand\@stripstr\string\s@{}}
+\x
+% \end{macrocode}
+%
+% \begin{macro}{\StreamOpen}\begin{macro}{\StreamPut}
+% \begin{macro}{\StreamClose}
+% Here is stream opening operator. Its parameter should be a macro
+% named the same as the external file being opened. E.g., to
+% write to file |foo.tex| use |\StreamOpen\foo|, then
+% |\StreamPut\foo| and |\StreamClose\foo|.
+%
+% \begin{macrocode}
+\chardef\stream@closed=16
+\def\StreamOpen#1{%
+ \chardef#1=\stream@closed
+ \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 %
+ \@streamfound
+ \fi}
+ \@outputstreams
+ }
+\def\StreamClose#1{%
+ \immediate\closeout#1%
+ \def\s@do##1{\ifnum#1=\expandafter\@stripstr\string##1 %
+ \global\chardef##1=0 %
+ \@streamfound
+ \fi}
+ \@outputstreams
+ \chardef#1=\stream@closed
+ }
+\def\StreamPut{\immediate\write}
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \subsubsection{Input and Output}
+%
+% \begin{macro}{\maybeMsg}
+% \begin{macro}{\showprogress}
+% \begin{macro}{\keepsilent}
+% When this program is used it can optionally show its progress on
+% the terminal. In that case it will write a special character to
+% the terminal (and the transcript file) for each input line. This
+% option is on by default when statistics are included in
+% \texttt{docstrip.tex}. It is off when statistics are excluded. The
+% commands |\showprogress| and |\keepsilent| can be used
+% to choose otherwise.
+% \begin{macrocode}
+\def\showprogress{\let\maybeMsg\message}
+\def\keepsilent{\let\maybeMsg\@gobble}
+%<*stats>
+\showprogress
+%</stats>
+%<-stats>\keepsilent
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Msg}
+% For displaying messages on the terminal the macro |\Msg| is
+% defined to write {\em immediately\/} to |\ttyout|.
+% \begin{macrocode}
+\def\Msg{\immediate\write\ttyout}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ask}
+% The macro
+% \verb=\Ask{=\meta{cs}\verb=}{=\meta{string}\verb=}= is a
+% slightly modified copy of the \LaTeX\ macro |\typein|. It is
+% used to ask the user a question. The \meta{string} will be
+% displayed on his terminal and the response will be stored in the
+% \meta{cs}. The trailing space left over from the carriage return
+% is stripped off by the macro |\strip|. If the user just
+% types a carriage return, the result will be an empty macro.
+% \changes{2.0i}{1991/06/27}{Added check for just \protect\meta{CR}}
+% \begin{macrocode}
+\def\iden#1{#1}
+\def\strip#1#2 \@gobble{\def #1{#2}}
+\def\@defpar{\par}
+\def\Ask#1#2{%
+ \message{#2}\read\ttyin to #1\ifx#1\@defpar\def#1{}\else
+ \iden{\expandafter\strip
+ \expandafter#1#1\@gobble\@gobble} \@gobble\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\OriginalAsk}
+% \changes{2.4e}{1996/10/24}{macro added (was in unpack.ins) (DPC)}
+% \begin{macrocode}
+\let\OriginalAsk=\Ask
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\askonceonly}
+% \changes{2.4e}{1996/10/22}
+% {macro added (essentially from unpack.ins) (DPC)}
+% \begin{macrocode}
+\def\askonceonly{%
+ \def\Ask##1##2{%
+ \OriginalAsk{##1}{##2}%
+ \global\let\Ask\OriginalAsk
+ \Ask\noprompt{%
+ By default you will be asked this question for every file.^^J%
+ If you enter `y' now,^^J%
+ I will assume `y' for all future questions^^J%
+ without prompting.}%
+ \ifx\y\noprompt\let\noprompt\yes\fi
+ \ifx\yes\noprompt\gdef\Ask####1####2{\def####1{y}}\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Miscellaneous}
+%
+% \begin{macro}{\@gobble}
+% \changes{2.0a}{1991/05/25}{Macro added.}
+% A macro that has an argument and puts it in the bitbucket.
+% \begin{macrocode}
+\def\@gobble#1{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Endinput}
+% \changes{2.0f}{1991/06/04}{Macro added.} When a \texttt{doc} file
+% contains a \verb+\endinput+ on a line by itself this normally
+% means that anything following in this file should be ignored.
+% Therefore we need a macro containing |\endinput| as its
+% replacement text to check this against |\inLine| (the
+% current line from the current input file). Of course the
+% backslash has to have the correct |\catcode|. One way of
+% doing this is feeding \verb=\\= to the |\string| operation
+% and afterwards removing one of the |\| characters.
+% \begin{macrocode}
+\edef\Endinput{\expandafter\@gobble\string\\endinput}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makeOther}
+% During the process of reading a file with \TeX\ code the category
+% code of all special characters has to be changed to \meta{other}.
+% The macro |\makeOther| serves this purpose.
+% \begin{macrocode}
+\def\makeOther#1{\catcode`#1=12\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\end}
+% \changes{2.0h}{1991/06/19}{Macro added.} For now we want the \ds{}
+% program to be compatible with both plain \TeX\ and \LaTeX\@.
+% \LaTeX\ hides plain \TeX{}'s |\end| command and
+% calls it |\@@end|. We unhide it here.
+% \begin{macrocode}
+\ifx\undefined\@@end\else\let\end\@@end\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addto}
+% A macro extending macro's definition. The trick with |\csname|
+% is necessary to get around |\newtoks| being outer in plain \TeX{}
+% and \LaTeX\ version 2.09.
+% \begin{macrocode}
+\ifx\@temptokena\undefined \csname newtoks\endcsname\@temptokena\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@addto#1#2{%
+ \@temptokena\expandafter{#1}%
+ \edef#1{\the\@temptokena#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifpresent}
+% This macro checks if its first argument is present on a
+% list passed as the second argument. Depending on the result
+% it executes either its third or fourth argument.
+%
+% \begin{macrocode}
+\def\@ifpresent#1#2#3#4{%
+ \def\tmp##1#1##2\qStop{\ifx!##2!}%
+ \expandafter\tmp#2#1\qStop #4\else #3\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tospaces}
+% This macro converts its argument delimited with |\secapsot| to
+% appropriate number of spaces. We need this for smart displaying
+% messages on the screen.
+%
+% |\@spaces| are used when we need many spaces in a row.
+% \begin{macrocode}
+\def\tospaces#1{%
+ \ifx#1\secapsot\secapsot\fi\space\tospaces}
+\def\secapsot\fi\space\tospaces{\fi}
+\def\@spaces{\space\space\space\space\space}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\uptospace}
+% \changes{2.3c}{1995/08/24}{Macro added}
+% This macro extracts from its argument delimited with |\qStop|
+% part up to first occurrence of space.
+% \begin{macrocode}
+\def\uptospace#1 #2\qStop{#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\afterfi}
+% \changes{2.3c}{1995/09/04}{Macro added}
+% This macro can be used in conditionals to perform some actions
+% (its first parameter) after the condition is completed (i.e.
+% after reading the matching |\fi|. Second parameter is used to
+% gobble the rest of |\if ... \fi| construction (some |\else|
+% maybe). Note that this won't work in nested |\if|s!
+% \begin{macrocode}
+\def\afterfi#1#2\fi{\fi#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@ifnextchar}
+% \changes{2.3e}{1995/09/25}{Macro added}
+% This is one of \LaTeX's macros not defined by plain. My
+% devious definition differs from the standard one but
+% functionality is the same.
+% \begin{macrocode}
+\def\@ifnextchar#1#2#3{\bgroup
+ \def\reserved@a{\ifx\reserved@c #1 \aftergroup\@firstoftwo
+ \else \aftergroup\@secondoftwo\fi\egroup
+ {#2}{#3}}%
+ \futurelet\reserved@c\@ifnch
+ }
+\def\@ifnch{\ifx \reserved@c \@sptoken \expandafter\@xifnch
+ \else \expandafter\reserved@a
+ \fi}
+\def\@firstoftwo#1#2{#1}
+\def\@secondoftwo#1#2{#2}
+\iden{\let\@sptoken= } %
+\iden{\def\@xifnch} {\futurelet\reserved@c\@ifnch}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\kernel@ifnextchar}
+% \changes{v2.5d}{2005/07/29}{Added macro}
+% The 2003/12/01 release of \LaTeX\ incorporated this macro to avoid
+% problems with \texttt{amsmath} but this also means that we have to
+% perform the same trick here when people use \LaTeX\ on a
+% installation file containing |\ProvidesFile|.
+% \begin{macrocode}
+\let\kernel@ifnextchar\@ifnextchar
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{The evaluation of boolean expressions}
+%
+% For clarity we repeat here the syntax for the boolean expressions
+% in a somewhat changed but equivalent way:
+%
+% \DeleteShortVerb\|
+% \begin{tabular}{lcl}
+% \meta{Expression} & $::=$ & \meta{Secondary} $|$
+% \meta{Secondary} \{\texttt{|}, \texttt{,}\}
+% \meta{Expression}\\
+% \meta{Secondary} & $::=$ & \meta{Primary} $|$
+% \meta{Primary} \texttt{\&}
+% \meta{Secondary}\\
+% \meta{Primary} & $::=$ &
+% \meta{Terminal} $|$ \texttt{!}\meta{Primary}
+% $|$
+% \texttt{(}\meta{Expression}\texttt{)}\\
+% \end{tabular}
+%
+% The \texttt{|} stands for disjunction, the \texttt{\&} stands for
+% conjunction and the \texttt{!}\ stands for negation. The
+% \meta{Terminal} is any sequence of letters and evaluates to
+% \meta{true} iff it occurs in the list of options that have to be
+% included.
+% \MakeShortVerb\|
+%
+% Since we can generate multiple output files from one input,
+% same guard expressions can be computed several times with
+% different options. For that reason we first ``compile'' the
+% expression to the form of one parameter macro |\Expr|
+% expanding to nested |\if|s that when given current list of
+% options produces 1 or 0 as a result. The idea is to say
+% |\if1\Expr{|\meta{current set of options}|}...\fi| for all
+% output files.
+%
+% Here is a table recursively defining translations for right
+% sides of the grammar. $\tau(X)$ denotes translation of~$X$.
+%
+% \DeleteShortVerb\|
+% \MakeShortVerb\"
+% \begingroup
+% \addtolength\arraycolsep{-2.1pt}
+% \begin{eqnarray*}
+% \tau(\meta{Terminal})&=&"\t@<Terminal>,#1,<Terminal>,\qStop"\\
+% \tau(!\meta{Primary})&=&"\if1"\,\tau(\meta{Primary})\,"0\else1\fi"\\
+% \tau(\mbox{\texttt{(}\meta{Expression}\texttt{)}})
+% &=&\tau(\meta{Expression})\\
+% \tau(\mbox{\meta{Primary}\texttt{\&}\meta{Secondary}})
+% &=&"\if0"\,\tau(\meta{Primary})\,"0\else"
+% \,\tau(\meta{Secondary})\,"\fi"\\
+% \tau(\mbox{\meta{Secondary}\texttt{|}\meta{Expression}})
+% &=&"\if1"\,\tau(\meta{Secondary})\,"1\else"
+% \,\tau(\meta{Expression})\,"\fi"
+% \end{eqnarray*}
+% \endgroup
+% \DeleteShortVerb\"
+% \MakeShortVerb\|
+% |\t@<Terminal>| denotes macro with name constructed from |t@|
+% with appended tokens of terminal. E.g., for terminal |foo| the
+% translation would be
+%\begin{verbatim}
+% \t@foo,#1,foo,\qStop
+%\end{verbatim}
+% This will end up in definition of |\Expr|, so |#1| here will
+% be substituted by current list of options when |\Expr| is
+% called. Macro |\t@foo| would be defined as
+%\begin{verbatim}
+% \def\t@foo#1,foo,#2\qStop{\ifx>#2>0\else1\fi}
+%\end{verbatim}
+% When called as above this will expand to |1| if |foo| is
+% present on current list of options and to |0| otherwise.
+%
+% Macros below work in ``almost expand-only'' mode i.e.
+% expression is analyzed only by expansion but we have to define
+% some macros on the way (e.g., |\Expr| and |\t@foo|).
+%
+% The first parameter of each of these macros is
+% ``continuation'' (in the sense similar to the language
+% \textsc{Scheme}). Continuation is a function of at least one
+% argument (parameter) being the value of previous steps of
+% computation. For example macro |\Primary| constructs
+% translation of \meta{Primary} expression. When it decides that
+% expression is completed it calls its continuation (its first
+% argument) passing to it whole constructed translation.
+% Continuation may expect more arguments if it wants to see what
+% comes next on the input.
+%
+% We will perform recursive descent parse, but definitions will
+% be presented in bottom-up order.
+%
+% \begin{macro}{\Terminal}
+%
+% \meta{Terminal}s are recognized by macro |\Terminal|. The
+% proper way of calling it is |\Terminal{|\meta{current
+% continuation}|}{}|. Parameters are: continuation,
+% \meta{Terminal} so far and next character from the input.
+% Macro checks if |#3| is one of terminal-ending characters and
+% then takes appropriate actions. Since there are 7 ending
+% chars and probably one |\csname| costs less than 7 nested
+% |\if|s we construct a name and check if it is defined.
+%
+% We must expand |\ifx| completely before taking next actions so
+% we use |\afterfi|.
+% \begin{macrocode}
+\def\Terminal#1#2#3{%
+ \expandafter\ifx\csname eT@#3\endcsname\relax
+% \end{macrocode}
+% If condition is true |#3| belongs to current \meta{Terminal}
+% so we append it to \meta{Terminal}-so-far and call |\Terminal|
+% again.
+% \begin{macrocode}
+ \afterfi{\Terminal{#1}{#2#3}}\else
+% \end{macrocode}
+% When condition is false it's time to end the \meta{Terminal}
+% so we call macro |\TerminalX|. Next character is reinserted to
+% the input.
+%
+% In both cases continuation is passed unchanged.
+% \begin{macrocode}
+ \afterfi{\TerminalX{#1}{#2}#3}\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\eT@}
+% Here we define macros marking characters that cannot appear
+% inside terminal. The value is not important as long as it is
+% different from |\relax|.
+% \begin{macrocode}
+\Name\let{eT@>}=1
+\Name\let{eT@&}=1 \Name\let{eT@!}=1
+\Name\let{eT@|}=1 \Name\let{eT@,}=1
+\Name\let{eT@(}=1 \Name\let{eT@)}=1
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TerminalX}
+% This macro should end scanning of \meta{Terminal}. Parameters
+% are continuation and gathered tokens of \meta{Terminal}.
+%
+% Macro starts by issuing an error message if \meta{Terminal} is
+% empty.
+% \begin{macrocode}
+\def\TerminalX#1#2{%
+ \ifx>#2> \errmessage{Error in expression: empty terminal}\fi
+% \end{macrocode}
+% Then a macro is constructed for checking presence of
+% \meta{Terminal} in options list.
+% \begin{macrocode}
+ \Name\def{t@#2}##1,#2,##2\qStop{\ifx>##2>0\else1\fi}%
+% \end{macrocode}
+% And then current continuation is called with translation of
+% \meta{Terminal} according to formula
+% $$\tau(\meta{Terminal})=|\t@<Terminal>,#1,<Terminal>,\qStop|$$
+% \begin{macrocode}
+ #1{\Name\noexpand{t@#2},##1,#2,\noexpand\qStop}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Primary}
+% Parameters are continuation and next character from the input.
+%
+% According to the syntax \meta{Primari}es can have three forms.
+% This makes us use even more dirty tricks than usual. Note the
+% |\space| after a series of |\ifx|s. This series produces an
+% one digit number of case to be executed. The number is given
+% to |\ifcase| and |\space| stops \TeX{} scanning for a
+% \meta{number}. Use of |\ifcase| gives possibility to have one
+% of three actions selected without placing them in nested
+% |\if|s and so to use |\afterfi|.
+% \begin{macrocode}
+\def\Primary#1#2{%
+ \ifcase \ifx!#20\else\ifx(#21\else2\fi\fi\space
+% \end{macrocode}
+% First case is for |!| i.e. negated \meta{Primary}. In this
+% case we call |\Primary| recursively but we create new
+% continuation: macro |\NPrimary| that will negate result
+% passed by |\Primary| and pass it to current continuation
+% (|#1|).
+% \begin{macrocode}
+ \afterfi{\Primary{\NPrimary{#1}}}\or
+% \end{macrocode}
+% When next character is |(| we call |\Expression| giving it as
+% continuation macro |\PExpression| which will just pass the
+% result up but ensuring first that a |)| comes next.
+% \begin{macrocode}
+ \afterfi{\Expression{\PExpression{#1}}}\or
+% \end{macrocode}
+% Otherwise we start a \meta{Terminal}. |#2| is not passed as
+% \meta{Terminal}-so-far but reinserted to input since we didn't
+% check if it can appear in a \meta{Terminal}.
+% \begin{macrocode}
+ \afterfi{\Terminal{#1}{}#2}\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NPrimary}
+% Parameters are continuation and previously computed
+% \meta{Primary}.
+%
+% This macro negates result of previous computations according
+% to the rule
+% $$\tau(!\meta{Primary})
+% =|\if1|\,\tau(\meta{Primary})\,|0\else1\fi|$$
+% \begin{macrocode}
+\def\NPrimary#1#2{%
+ #1{\noexpand\if1#20\noexpand\else1\noexpand\fi}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\PExpression}
+% Parameters: continuation, \meta{Expression}, next character
+% from input. We are checking if character is |)| and then pass
+% unchanged result to our continuation.
+% \begin{macrocode}
+\def\PExpression#1#2#3{%
+ \ifx)#3\else
+ \errmessage{Error in expression: expected right parenthesis}\fi
+ #1{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Secondary}
+% Each \meta{Secondary} expression starts with \meta{Primary}.
+% Next checks will be performed by |\SecondaryX|.
+% \begin{macrocode}
+\def\Secondary#1{%
+ \Primary{\SecondaryX{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SecondaryX}
+% Parameters: continuation, translation of \meta{Primary}, next
+% character. We start by checking if next character is |&|.
+% \begin{macrocode}
+\bgroup\catcode`\&=12
+\gdef\SecondaryX#1#2#3{%
+ \ifx&#3%
+% \end{macrocode}
+% If it is we should parse next \meta{Secondary} and then
+% combine it with results so far. Note that |\SecondaryXX| will
+% have 3 parameters.
+% \begin{macrocode}
+ \afterfi{\Secondary{\SecondaryXX{#1}{#2}}}\else
+% \end{macrocode}
+% Otherwise \meta{Secondary} turned out to be just
+% \meta{Primary}. We call continuation passing to it translation
+% of that \meta{Primary} not forgetting to reinsert |#3| to the
+% input as it does not belong here.
+% \begin{macrocode}
+ \afterfi{#1{#2}#3}\fi
+ }
+\egroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SecondaryXX}
+% Parameters: continuation, translation of \meta{Primary},
+% translation of \meta{Secondary}. We construct translation of
+% whole construction according to the rule:
+% $$\tau(\mbox{\meta{Primary}\texttt{\&}\meta{Secondary}})
+% =|\if0|\,\tau(\meta{Primary})\,|0\else|
+% \,\tau(\meta{Secondary})\,|\fi| $$
+% and pass it to our continuation.
+% \begin{macrocode}
+\def\SecondaryXX#1#2#3{%
+ #1{\noexpand\if0#20\noexpand\else#3\noexpand\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Expression}
+% Every \meta{Expression} starts with \meta{Secondary}. We
+% construct new continuation and pass it to |\Secondary|.
+% \begin{macrocode}
+\def\Expression#1{%
+ \Secondary{\ExpressionX{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ExpressionX}
+% Parameters: continuation, translation of \meta{Secondary},
+% next character. We perform check if character is
+% \texttt{\char`\|} or |,|.
+% \begin{macrocode}
+\def\ExpressionX#1#2#3{%
+ \if0\ifx|#31\else\ifx,#31\fi\fi0
+% \end{macrocode}
+% If it is not \meta{Expression} is just a \meta{Secondary}. We
+% pass its translation to continuation and reinsert |#3|.
+% \begin{macrocode}
+ \afterfi{#1{#2}#3}\else
+% \end{macrocode}
+% If we are dealing with complex \meta{Expression} we should
+% parse another |\Expression| now.
+% \begin{macrocode}
+ \afterfi{\Expression{\ExpressionXX{#1}{#2}}}\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ExpressionXX}
+% Parameters: continuation, translation of \meta{Secondary},
+% translation of \meta{Expression}.
+% We finish up translating of \meta{Expression} according to
+% the formula:
+% $$\tau(\mbox{\meta{Secondary}\texttt{\char`\|}\meta{Expression}})
+% =|\if1|\,\tau(\meta{Secondary})\,|1\else|
+% \,\tau(\meta{Expression})\,|\fi|$$
+% \begin{macrocode}
+\def\ExpressionXX#1#2#3{%
+ #1{\noexpand\if1#21\noexpand\else#3\noexpand\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\StopParse}
+% Here is initial continuation for whole parse process. It will
+% be used by |\Evaluate|. Note that we assume that expression
+% has |>| on its end. This macro eventually defines |\Expr|.
+% Parameters: translation of whole \meta{Expression} and next
+% character from input.
+% \begin{macrocode}
+\def\StopParse#1#2{%
+ \ifx>#2 \else\errmessage{Error in expression: spurious #2}\fi
+ \edef\Expr##1{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Evaluate}
+% This macro is used to start parsing. We call |\Expression|
+% with continuation defined above. On end of expression we
+% append a |>|.
+% \begin{macrocode}
+\def\Evaluate#1{%
+ \Expression\StopParse#1>}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Processing the input lines}
+%
+% \begin{macro}{\normalLine}
+% The macro |\normalLine| writes its argument (which has to be
+% delimited with |\endLine|) on all active output files i.e.
+% those with off-counters equal to zero.
+% If statistics are included, the counter
+% |\codeLinesPassed| is incremented by $1$.
+% \begin{macrocode}
+\def\normalLine#1\endLine{%
+%<*stats>
+ \advance\codeLinesPassed\@ne
+%</stats>
+ \maybeMsg{.}%
+ \def\inLine{#1}%
+ \let\do\putline@do
+ \activefiles
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\putline@do}
+% \changes{2.3b}{1995/08/22}{Change for pre-constructed
+% off-counters' names}
+% This is a value for |\do| when copying line to output files.
+% \begin{macrocode}
+\def\putline@do#1#2#3{%
+ \StreamPut#1{\inLine}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\removeComment}
+% The macro |\removeComment| throws its argument (which has to be
+% delimited with |\endLine|) away. When statistics are included
+% in the program the removed comment is counted.
+% \begin{macrocode}
+%
+\def\removeComment#1\endLine{%
+%<*stats>
+ \advance\commentsRemoved\@ne
+%</stats>
+ \maybeMsg{\perCent}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\putMetaComment}
+% \changes{2.3e}{1996/09/16}{Introduced \cs{MetaPrefix}}
+% If a line starts with two consecutive percent signs, it is
+% considered to be a {\em MetaComment\/}. Such a comment line is
+% passed on to the output file unmodified.
+% \begin{macrocode}
+\bgroup\catcode`\%=12
+\iden{\egroup
+\def\putMetaComment%}#1\endLine{%
+% \end{macrocode}
+% If statistics are included the line is counted.
+% \begin{macrocode}
+%<*stats>
+ \advance\commentsPassed\@ne
+%</stats>
+% \end{macrocode}
+% The macro |\putMetaComment| has one argument, delimited with
+% |\endLine|. It brings the source line with |%%| stripped. We
+% prepend to it |\MetaPrefix| (which can be different from |%%|)
+% and send the line to all active files.
+% \begin{macrocode}
+ \edef\inLine{\MetaPrefix#1}%
+ \let\do\putline@do
+ \activefiles
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\processLine}
+% \changes{2.3a}{1995/08/18}{Adaptation for concurrent version}
+% \changes{2.3a}{1995/08/20}{Trying to avoid assignments}
+% Each line that is read from the input stream has to be processed
+% to see if it has to be written on the output stream. This task
+% is performed by calling the macro |\processLine|.
+% In order to do
+% that, it needs to check whether the line starts with a
+% `\texttt{\%}'. Therefore the macro is globally defined within a
+% group. Within this group the category code of `\texttt{\%}' is
+% changed to 12 (other). Because a comment character is needed,
+% the category code of `\texttt{*}' is changed to 14 (comment
+% character).
+%
+% The macro increments counter |\processedLines| by $1$ if
+% statistics are included. We cannot include this line with
+% |%<*stats>| since the category of \texttt{\%} is changed and the
+% file must be loadable unstripped. So the whole definition is
+% repeated embedded in guards.
+%
+% The next token from the input stream is passed in |#1|. If it is
+% a `\texttt{\%}' further processing has to be done by
+% |\processLineX|; otherwise this is normal (not commented out)
+% line.
+%
+% In either case the character read is reinserted to the input
+% as it may have to be written out.
+%
+% \begin{macrocode}
+%<*!stats>
+\begingroup
+\catcode`\%=12 \catcode`\*=14
+\gdef\processLine#1{*
+ \ifx%#1
+ \expandafter\processLineX
+ \else
+ \expandafter\normalLine
+ \fi
+ #1}
+\endgroup
+%</!stats>
+%<*stats>
+\begingroup
+\catcode`\%=12 \catcode`\*=14
+\gdef\processLine#1{*
+ \advance\processedLines\@ne
+ \ifx%#1
+ \expandafter\processLineX
+ \else
+ \expandafter\normalLine
+ \fi
+ #1}
+\endgroup
+%</stats>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\processLineX}
+% \changes{2.3a}{1995/08/20}{Trying to avoid assignments}
+% This macro is also defined within a group,
+% because it also has to check if the next
+% token in the input stream is a `\texttt{\%}' character.
+%
+% If the second token in the current line happens to be a
+% `\texttt{\%}', a \meta{MetaComment} has been found. This has to
+% be copied in its entirety to the output. Another possible second
+% character is `\texttt{<}', which introduces a guard expression.
+% The processing of such an expression is started by calling
+% |\checkOption|.
+%
+% When the token was neither a `\texttt{\%}' nor a `\texttt{<}',
+% the line contains a normal comment that has to be removed.
+%
+% We express conditions in such a way that all actions appear
+% on first nesting level of |\if|s. In such conditions just one
+% expandafter pushes us outside whole construction. A thing to
+% watch here is |\relax|. It stops search for numeric constant.
+% If it wasn't here \TeX\ would expand the first case of |\ifcase|
+% before knowing the value.
+%
+% \begin{macrocode}
+\begingroup
+\catcode`\%=12 \catcode`\*=14
+\gdef\processLineX%#1{*
+ \ifcase\ifx%#10\else
+ \ifx<#11\else 2\fi\fi\relax
+ \expandafter\putMetaComment\or
+ \expandafter\checkOption\or
+ \expandafter\removeComment\fi
+ #1}
+\endgroup
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The handling of options}
+%
+% \begin{macro}{\checkOption}
+% \changes{2.3a}{1995/08/18}{Adapted to concurrent version}
+% \changes{2.3a}{1995/08/20}{Trying to avoid assignments}
+% \changes{2.3e}{1996/09/16}{Verbatim mode}
+% When the macros that process a line have found that the line
+% starts with `\texttt{\%<}', a guard line has been encountered.
+% The first character of a guard can be an asterisk (\texttt{*}), a
+% slash (\texttt{/}) a plus (\texttt{+}), a minus (\texttt{-}), a
+% less-than sign (\texttt{<}) starting verbatim mode or
+% any other character that can be found in an option name. This
+% means that we have to peek at the next token and
+% decide what kind of guard we have.
+%
+% We reinsert |#1| as it may be needed by |\doOption|.
+% \begin{macrocode}
+\def\checkOption<#1{%
+ \ifcase
+ \ifx*#10\else \ifx/#11\else
+ \ifx+#12\else \ifx-#13\else
+ \ifx<#14\else 5\fi\fi\fi\fi\fi\relax
+ \expandafter\starOption\or
+ \expandafter\slashOption\or
+ \expandafter\plusOption\or
+ \expandafter\minusOption\or
+ \expandafter\verbOption\or
+ \expandafter\doOption\fi
+ #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\doOption}
+% When no guard modifier is found by |\checkOptions|, the
+% macro |\doOption| is called. It evaluates a boolean
+% expression. The result of this evaluation is stored in
+% |\Expr|. The guard only affects the current
+% line, so |\do| is defined in such a way that depending on the
+% result of the test |\if1\Expr{|\meta{options}|}|, the current
+% line is either copied to the output stream or removed. Then
+% the test is computed for all active output files.
+% \begin{macrocode}
+\def\doOption#1>#2\endLine{%
+ \maybeMsg{<#1 . >}%
+ \Evaluate{#1}%
+ \def\do##1##2##3{%
+ \if1\Expr{##2}\StreamPut##1{#2}\fi
+ }%
+ \activefiles
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\plusOption}
+% When a `\texttt{+}' is found as a guard modifier,
+% |\plusOption| is called. This macro is very similar to
+% |\doOption|, the only difference being that displayed
+% message now contains `\texttt{+}'.
+% \begin{macrocode}
+\def\plusOption+#1>#2\endLine{%
+ \maybeMsg{<+#1 . >}%
+ \Evaluate{#1}%
+ \def\do##1##2##3{%
+ \if1\Expr{##2}\StreamPut##1{#2}\fi
+ }%
+ \activefiles
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\minusOption}
+% When a `\texttt{-}' is found as a guard modifier,
+% |\minusOption| is called. This macro is very similar to
+% |\plusOption|, the difference is that condition is negated.
+% \begin{macrocode}
+\def\minusOption-#1>#2\endLine{%
+ \maybeMsg{<-#1 . >}%
+ \Evaluate{#1}%
+ \def\do##1##2##3{%
+ \if1\Expr{##2}\else \StreamPut##1{#2}\fi
+ }%
+ \activefiles
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\starOption}
+% \changes{2.3a}{1995/08/18}{Adapted to concurrent version}
+% When a `\texttt{*}' is found as a guard modifier,
+% |\starOption| is called. In this case a block of code will
+% be included in the output on the condition that the guard
+% expression evaluates to \meta{true}.
+%
+% The current line is gobbled as |#2|, because it only contains
+% the guard and possibly a comment.
+%
+% \begin{macrocode}
+\def\starOption*#1>#2\endLine{%
+% \end{macrocode}
+% First we optionally write
+% a message to the terminal to indicate that a new option starts
+% here.
+% \begin{macrocode}
+ \maybeMsg{<*#1}%
+% \end{macrocode}
+% Then we push the current contents of |\blockHead| on the
+% stack of blocks, |\guardStack| and increment the counter
+% |\blockLevel| to indicate that we are now one level of
+% nesting deeper.
+% \changes{2.0k}{1992/04/06}{Use new stack mechanism}
+% \changes{2.0k}{1992/04/09}{The macro that holds the guard needs to be
+% expanded}
+% \begin{macrocode}
+ \expandafter\push\expandafter\guardStack\expandafter{\blockHead}%
+ \advance\blockLevel\@ne
+% \end{macrocode}
+% The guard for this block of code is now stored in
+% |\blockHead|.
+% \begin{macrocode}
+ \def\blockHead{#1}%
+% \end{macrocode}
+% Now we evaluate guard expression for all output files
+% updating off-counters. Then we create new list of active
+% output files. Only files that were active in the outer block
+% can remain active now.
+% \begin{macrocode}
+ \Evaluate{#1}%
+ \let\do\checkguard@do
+ \outputfiles
+ \let\do\findactive@do
+ \edef\activefiles{\activefiles}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\checkguard@do}
+% \changes{2.3b}{1995/08/22}{Change for pre-constructed
+% off-counters' names}
+% This form of |\do| updates off-counts according to the value of
+% guard expression.
+% \begin{macrocode}
+\def\checkguard@do#1#2#3{%
+% \end{macrocode}
+% If this block of code occurs inside another block of code that is
+% {\em not\/} included in the output, we increment the off counter.
+% In that case the guard expression will not be
+% evaluated, because a block inside another block that is excluded
+% from the output will also be excluded, regardless of the
+% evaluation of its guard.
+% \begin{macrocode}
+ \ifnum#3>0
+ \advance#3\@ne
+% \end{macrocode}
+% When the off count has value 0, we have
+% to evaluate the guard expression. If the result is \meta{false}
+% we increase the off-counter.
+% \begin{macrocode}
+ \else
+ \if1\Expr{#2}\else
+ \advance#3\@ne\fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\findactive@do}
+% \changes{2.3b}{1995/08/22}{Change for pre-constructed
+% off-counters' names}
+% This form of |\do| picks elements of output files list which
+% have off-counters equal to zero.
+% \begin{macrocode}
+\def\findactive@do#1#2#3{%
+ \ifnum#3=0
+ \noexpand\do#1{#2}#3\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\slashOption}
+% \changes{2.3a}{1995/08/18}{Adapted for concurrent version}
+% The macro |\slashOption| is the counterpart to
+% |\starOption|. It indicates the end of a block of
+% conditionally included code. We store the argument in the
+% temporary control sequence |\tmp|.
+% \begin{macrocode}
+\def\slashOption/#1>#2\endLine{%
+ \def\tmp{#1}%
+% \end{macrocode}
+% When the counter |\blockLevel| has a value less than $1$,
+% this `end-of-block' line has no corresponding `start-of-block'.
+% Therefore we signal an error and ignore this end of block.
+% \begin{macrocode}
+ \ifnum\blockLevel<\@ne
+ \errmessage{Spurious end block </\tmp> ignored}%
+% \end{macrocode}
+% Next we compare the contents of |\tmp| with the contents
+% of |\blockHead|. The latter macro contains the last guard for
+% a block of code that was encountered. If the contents match, we
+% pop the previous guard from the stack.
+% \changes{2.0k}{1992/04/06}{Use new stack mechanism}
+% \begin{macrocode}
+ \else
+ \ifx\tmp\blockHead
+ \pop\guardStack\blockHead
+% \end{macrocode}
+% When the contents of the two macros don't match something is
+% amiss. We signal this to the user, but accept the `end-of-block'.
+%\note{Is this the desired behaviour??}
+% \begin{macrocode}
+ \else
+ \errmessage{Found </\tmp> instead of </\blockHead>}%
+ \fi
+% \end{macrocode}
+% When the end of a block of optionally included code is encountered
+% we optionally signal this on the terminal and decrement the counter
+% |\blockLevel|.
+% \begin{macrocode}
+ \maybeMsg{>}%
+ \advance\blockLevel\m@ne
+% \end{macrocode}
+% The last thing that has to be done is to decrement off-counters and
+% make new list of active files. Now whole list of output files has
+% to be searched since some inactive files could have been
+% reactivated.
+% \begin{macrocode}
+ \let\do\closeguard@do
+ \outputfiles
+ \let\do\findactive@do
+ \edef\activefiles{\outputfiles}
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\closeguard@do}
+% \changes{2.3b}{1995/08/22}{Change for pre-constructed
+% off-counters' names}
+% This macro decrements non-zero off-counters.
+% \begin{macrocode}
+\def\closeguard@do#1#2#3{%
+ \ifnum#3>0
+ \advance#3\m@ne
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\verbOption}
+% \changes{2.3e}{1996/09/16}{Macro added}
+% \changes{2.4g}{1996/12/13}{Reset \cs{putline@do} for /2340}
+% This macro is called when a line starts with |%<<|. It reads a
+% bunch of lines in verbatim mode: the lines are passed unchanged
+% to the output without even checking for starting |%|. This way of
+% processing ends when a line containing only a percent sign
+% followed by stop mark given on the |%<<| line is found.
+% \begin{macrocode}
+\def\verbOption<#1\endLine{{%
+ \edef\verbStop{\perCent#1}\maybeMsg{<<<}%
+ \let\do\putline@do
+ \loop
+ \ifeof\inFile\errmessage{Source file ended while in verbatim
+ mode!}\fi
+ \read\inFile to \inLine
+ \if 1\ifx\inLine\verbStop 0\fi 1% if not inLine==verbStop
+ \activefiles
+ \maybeMsg{.}%
+ \repeat
+ \maybeMsg{>}%
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Batchfile commands}
+% \changes{2.3e}{1996/10/02}{Added doc}
+% \ds{} keeps information needed to control inclusion of sources in
+% several list structures. Lists are macros expanding to a series
+% of calls to macro |\do| with two or three parameters.
+% Subsequently |\do| is redefined in various ways and list
+% macros sometimes are executed to perform some action on every
+% element, and sometimes are used inside an |\edef| to make new
+% list of elements having some properties. For every input file
+% \meta{infile} the following lists are kept:
+% \begin{itemize}
+% \item[\cs{b@}\meta{infile}] the ``open list''---names of all output
+% files such that their generation should start with
+% reading of \meta{infile},
+% \item[\cs{o@}\meta{infile}] the ``output list''---names of all
+% output files generated from that source together with
+% suitable sets of options (guards),
+% \item[\cs{e@}\meta{infile}] the ``close list''---names of all
+% output files that should be closed when this source is
+% read.
+% \end{itemize}
+%
+% For every output file name \meta{outfile} \ds{} keeps following
+% information:
+% \begin{itemize}
+% \item[\cs{pth@}\meta{outfile}] full pathname (including file name),
+% \item[\cs{ref@}\meta{outfile}] reference lines for the file,
+% \item[\cs{in@}\meta{outfile}] names of all source files separated
+% with spaces (needed by \cs{InFileName}),
+% \item[\cs{pre@}\meta{outfile}] preamble template (as defined with
+% |\declarepreamble|),
+% \item[\cs{post@}\meta{outfile}] postamble template.
+% \end{itemize}
+%
+% \begin{macro}{\generate}
+% \changes{2.3a}{1995/08/20}{Messages changed}
+% \changes{2.4a}{1996/06/06}{Repeat processing of files until all
+% done (MDW)}
+% This macro executes its argument in a group. |\inputfiles| is
+% a list of files to be read, |\filestogenerate| list of names
+% of output files (needed for the message below). |\file|s
+% contained in |#1| define |\inputfiles| in such a way that all
+% that has to be done when the parameter is executed is to call
+% this macro. |\inputfiles| command is called over and over again
+% until no output files had to be postponed.
+% \begin{macrocode}
+\def\generate#1{\begingroup
+ \let\inputfiles\empty \let\filestogenerate\empty
+ \let\file\@file
+ #1
+ \ifx\filestogenerate\empty\else
+ \Msg{^^JGenerating file(s) \filestogenerate}\fi
+ \def\inFileName{\csname in@\outFileName\endcsname}%
+ \def\ReferenceLines{\csname ref@\outFileName\endcsname}%
+ \processinputfiles
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\processinputfiles}
+% \changes{2.4a}{1996/10/02}{Macro added (MW)}
+% This is a recurrent function which processes input files until
+% they are all gone.
+% \begin{macrocode}
+\def\processinputfiles{%
+ \let\newinputfiles\empty
+ \inputfiles
+ \let\inputfiles\newinputfiles
+ \ifx\inputfiles\empty\else
+ \expandafter\processinputfiles
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\file}
+% The first argument is the file to produce, the second
+% argument contains the list of input files. Each entry should have
+% the format
+% \verb=\from{=\meta{filename.ext}\verb=}{=\meta{options}\verb=}=.
+%
+% \changes{2.3a}{1995/08/20}{Messages changed}
+% ^^A The macro starts by displaying a message on the terminal to
+% ^^A indicate which file is going to be made.
+% The switch |\ifGenerate| is initially set to \meta{true}.
+% \begin{macrocode}
+\def\file#1#2{\errmessage{Command `\string\file' only allowed in
+ argument to `\string\generate'}}
+\def\@file#1{%
+ \Generatetrue
+% \end{macrocode}
+% Next we construct full path name for output file and check if we
+% have to be careful about overwriting existing files. If the user
+% specified |\askforoverwritetrue| we will ask him if he wants to
+% overwrite an existing file. Otherwise we simply go ahead.
+% \begin{macrocode}
+ \makepathname{#1}%
+ \ifaskforoverwrite
+% \end{macrocode}
+% We try to open a file with the name of the output file for
+% reading. If this succeeds the file exists and we ask the user if
+% he wants to overwrite the file.
+% \changes{2.0p}{1992/06/26}{Added \cs{WriteToDir} (FMi).}
+% \changes{2.3a}{1995/08/18}{Changed \cs{@empty} (which was undefined)
+% to \cs{empty}}
+% \changes{2.3e}{1995/09/25}{Changed \cs{WriteToDir} to \cs{destdir}}
+% \begin{macrocode}
+ \immediate\openin\inFile\@pathname\relax
+ \ifeof\inFile\else
+ \Ask\answer{File \@pathname\space already exists
+ \ifx\empty\destdir somewhere \fi
+ on the system.^^J%
+ Overwrite it%
+ \ifx\empty\destdir\space if necessary\fi
+ ? [y/n]}%
+% \end{macrocode}
+% We set the switch |\ifGenerate| according to his answer. We
+% allow for both ``\texttt{y}'' and ``\texttt{yes}''.
+% \begin{macrocode}
+ \ifx\y \answer \else
+ \ifx\yes\answer \else
+ \Generatefalse\fi\fi\fi
+% \end{macrocode}
+% Don't forget to close the file just opened as we want to write
+% to it.
+% \begin{macrocode}
+ \closein\inFile
+ \fi
+% \end{macrocode}
+% \changes{2.3e}{1995/09/25}{Destination directory handling}
+% If file is to be generated we save its destination pathname and
+% pass control to macro |\@fileX|.
+% Note that file name is turned into control sequence and |\else|
+% branch is skipped before calling |\@fileX|.
+% \begin{macrocode}
+ \ifGenerate
+ \Name\let{pth@#1}\@pathname
+ \@addto\filestogenerate{\@pathname\space}%
+ \Name\@fileX{#1\expandafter}%
+ \else
+% \end{macrocode}
+% In case we were not allowed to overwrite an existing file
+% we inform the user that we are {\em not\/} generating his file
+% and we gobble |\from| specifications.
+% \begin{macrocode}
+ \Msg{Not generating file \@pathname^^J}%
+ \expandafter\@gobble
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fileX}
+% We put name of current output file in |\curout| and initialize
+% |\curinfiles| (the list of source files for this output file)
+% to empty---these will be needed by |\from|. Then we start
+% defining preamble for the current file.
+% \begin{macrocode}
+\def\@fileX#1#2{%
+ \chardef#1=\stream@closed
+ \def\curout{#1}%
+ \let\curinfiles\empty
+ \let\curinnames\empty
+ \def\curref{\MetaPrefix ^^J%
+ \MetaPrefix\space The original source files were:^^J%
+ \MetaPrefix ^^J}%
+% \end{macrocode}
+% Next we execute second parameter. |\from|s will add reference
+% lines to the preamble.
+% \begin{macrocode}
+ \let\from\@from \let\needed\@needed
+ #2%
+ \let\from\err@from \let\needed\err@needed
+% \end{macrocode}
+% We check order of input files.
+% \begin{macrocode}
+ \checkorder
+% \end{macrocode}
+% Each |\from| clause defines |\curin| to be its first parameter.
+% So now |\curin| holds name of last input file for current output
+% file. This means that current output file should be closed after
+% processing |\curin|. We add |#1| to proper `close list'.
+% \begin{macrocode}
+ \Name\@addto{e@\curin}{\noexpand\closeoutput{#1}}%
+% \end{macrocode}
+% Last we save all the interesting information about current file.
+% \begin{macrocode}
+ \Name\let{pre@\@stripstring#1\expandafter}\currentpreamble
+ \Name\let{post@\@stripstring#1\expandafter}\currentpostamble
+ \Name\edef{in@\@stripstring#1}{\expandafter\iden\curinnames}
+ \Name\edef{ref@\@stripstring#1}{\curref}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\checkorder}
+% This macro checks if the order of files in |\curinfiles|
+% agrees with that of |\inputfiles|. The coding is somewhat
+% clumsy.
+% \begin{macrocode}
+\def\checkorder{%
+ \expandafter\expandafter\expandafter
+ \checkorderX\expandafter\curinfiles
+ \expandafter\qStop\inputfiles\qStop
+ }
+\def\checkorderX(#1)#2\qStop#3\qStop{%
+ \def\tmp##1\readsource(#1)##2\qStop{%
+ \ifx!##2! \order@error
+ \else\ifx!#2!\else
+ \checkorderXX##2%
+ \fi\fi}%
+ \def\checkorderXX##1\readsource(#1)\fi\fi{\fi\fi
+ \checkorderX#2\qStop##1\qStop}%
+ \tmp#3\readsource(#1)\qStop
+ }
+\def\order@error#1\fi\fi{\fi
+ \errmessage{DOCSTRIP error: Incompatible order of input
+ files specified for file
+ `\iden{\expandafter\uptospace\curin} \qStop'.^^J
+ Read DOCSTRIP documentation for explanation.^^J
+ This is a serious problem, I'm exiting}\end
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\needed}
+% \changes{2.3c}{1995/08/24}{Macro added}
+% \changes{2.3e}{1996/09/12}{Forced expansion of argument to fix a bug
+% with filenames containing macros}
+% \begin{macro}{\@needed}
+% This macro uniquizes name of an input file passed as a
+% parameter and marks it as needed to be input. It is used
+% internally by |\from|, but can also be issued in argument to
+% |\file| to influence the order in which files are read.
+% \begin{macrocode}
+\def\needed#1{\errmessage{\string\needed\space can only be used in
+ argument to \string\file}}
+\let\err@needed\needed
+\def\@needed#1{%
+ \edef\reserved@a{#1}%
+ \expandafter\@need@d\expandafter{\reserved@a}}
+\def\@need@d#1{%
+ \@ifpresent{(#1)}\curinfiles
+% \end{macrocode}
+% If |#1| is present on list of input files for current output
+% file we add a space on end of its name and try again. The idea
+% is to construct a name that will look different for \TeX\ but
+% will lead to the same file when seen by operating system.
+% \begin{macrocode}
+ {\@need@d{#1 }}%
+% \end{macrocode}
+% When it is not we check if |#1| is present in the list of
+% files to be processed. If not we add it and initialize list of
+% output files for that input and list of output files that
+% should be closed when this file closes. We also add
+% constructed name to |\curinfiles| and define |\curin| to be
+% able to access constructed name from |\@from|.
+% \begin{macrocode}
+ {\@ifpresent{\readsource(#1)}\inputfiles
+ {}{\@addto\inputfiles{\noexpand\readsource(#1)}%
+ \Name\let{b@#1}\empty
+ \Name\let{o@#1}\empty
+ \Name\let{e@#1}\empty}%
+ \@addto\curinfiles{(#1)}%
+ \def\curin{#1}}%
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\from}
+% \changes{2.3c}{1995/08/24}{part of code moved to \cs{needed}}
+% |\from| starts by adding a line to preamble for output file.
+% \begin{macrocode}
+\def\from#1#2{\errmessage{Command `\string\from' only allowed in
+ argument to `\string\file'}}
+\let\err@from\from
+\def\@from#1#2{%
+ \@addto\curref{\MetaPrefix\space #1 \if>#2>\else
+ \space (with options: `#2')\fi^^J}%
+% \end{macrocode}
+% Then we mark the file as needed input file.
+% \begin{macrocode}
+ \needed{#1}%
+% \end{macrocode}
+% \changes{2.3e}{1996/10/02}{Introduced ``open list''}
+% If this is the first |\from| in current |\file| (i.e. if the
+% |\curinnames| so far is empty) the file name is added to the
+% ``open list'' for the current input file.
+% And |\do|\meta{current output}|{|\meta{options}|}| is appended
+% to the list of output files for current input file.
+% \begin{macrocode}
+ \ifx\curinnames\empty
+ \Name\@addto{b@\curin}{\noexpand\openoutput\curout}%
+ \fi
+ \@addto\curinnames{ #1}%
+ \Name\@addto{o@\curin}{\noexpand\do\curout{#2}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\readsource}
+% \changes{2.4a}{1996/06/06}{Extensively hacked to honour stream
+% limits (MDW)}
+% \changes{2.3a}{1995/08/18}{Renamed to \cs{readsource}; adaptation for
+% concurrent version}
+% \changes{2.0f}{1991/06/04}{Added check for lines with \texttt{\bsl
+% endinput}} This macro is called for each input file that
+% is to be processed.
+%
+% \begin{macrocode}
+\def\readsource(#1){%
+% \end{macrocode}
+% We try to open the input file. If this doesn't succeed, we
+% tell the user so and nothing else happens.
+% \begin{macrocode}
+ \immediate\openin\inFile\uptospace#1 \qStop\relax
+ \ifeof\inFile
+ \errmessage{Cannot find file \uptospace#1 \qStop}%
+ \else
+% \end{macrocode}
+% If statistics are included we nullify line counters
+% \begin{macrocode}
+%<*stats>
+ \processedLines\z@
+ \commentsRemoved\z@
+ \commentsPassed\z@
+ \codeLinesPassed\z@
+%</stats>
+% \end{macrocode}
+% \changes{2.3b}{1995/08/22}{Change for pre-constructed
+% off-counters' names}
+% \changes{2.3e}{1996/10/02}{Introduced ``open list''}
+% When the input file was successfully opened, we try to open all
+% needed output files by executing the ``open list''.
+% If any of files couldn't be opened because of number of streams
+% limits, their names are put into |\refusedfiles| list. This list
+% subsequently becomes the open list for the next pass.
+% \begin{macrocode}
+ \let\refusedfiles\empty
+ \csname b@#1\endcsname
+ \Name\let{b@#1}\refusedfiles
+% \end{macrocode}
+% Now all output files that could be opened are open. So we go
+% through the ``output list'' and for every open file we display a
+% message and zero the off-counter, while closed files are appended
+% to |\refusedfiles|.
+% \begin{macrocode}
+ \Msg{} \def\@msg{Processing file \uptospace#1 \qStop}
+ \def\change@msg{%
+ \edef\@msg{\@spaces\@spaces\@spaces\space
+ \expandafter\tospaces\uptospace#1 \qStop\secapsot}
+ \let\change@msg\relax}
+ \let\do\showfiles@do
+ \let\refusedfiles\empty
+ \csname o@#1\endcsname
+% \end{macrocode}
+% If |\refusedfiles| is nonempty current source file needs reread,
+% so we append it to |\newinputfiles|.
+% \begin{macrocode}
+ \ifx\refusedfiles\empty\else
+ \@addto\newinputfiles{\noexpand\readsource(#1)}
+ \fi
+% \end{macrocode}
+% Finally we define |\outputfiles| and construct off-counters
+% names. Now |\do|s will have 3 parameters! All output files become
+% active.
+% \begin{macrocode}
+ \let\do\makeoutlist@do
+ \edef\outputfiles{\csname o@#1\endcsname}%
+ \let\activefiles\outputfiles
+ \Name\let{o@#1}\refusedfiles
+% \end{macrocode}
+% Now we change the category code of a lot of characters to
+% \meta{other} and make sure that no extra spaces appear in the
+% lines read by setting the |\endlinechar| to $-1$.
+% \begin{macrocode}
+ \makeOther\ \makeOther\\\makeOther\$%
+ \makeOther\#\makeOther\^\makeOther\^^K%
+ \makeOther\_\makeOther\^^A\makeOther\%%
+ \makeOther\~\makeOther\{\makeOther\}\makeOther\&%
+ \endlinechar-1\relax
+% \end{macrocode}
+% To avoid any UTF-8 handling of characters we set code points
+% 128--255 to other.
+% \changes{2.5f}{2018/04/10}{Read 8bit raw to leave high bits in the
+% code to unchanged without utf8 handling (issue 34)}
+% \begin{macrocode}
+ \@tempcnta=128\relax
+ \loop
+ \catcode\@tempcnta 12\relax
+ \ifnum\@tempcnta <255\relax
+ \advance\@tempcnta\@ne
+ \repeat
+% \end{macrocode}
+% Then we start a loop to process the lines in the file one by one.
+% \begin{macrocode}
+ \loop
+ \read\inFile to\inLine
+% \end{macrocode}
+% The first thing we check is whether the current line
+% contains an |\endinput|. To allow also real |\endinput|
+% commands in the source file, |\endinput| is only recognized
+% when it occurs directly at the beginning of a line.
+% \begin{macrocode}
+ \ifx\inLine\Endinput
+% \end{macrocode}
+% In this case we output a message to inform the programmer (in
+% case this was a mistake) and end the loop immediately by setting
+% \verb=Continue= to \meta{false}. Note that |\endinput| is
+% not placed into the output file. This is important in cases where
+% the output file is generated from several \texttt{doc} files.
+% \begin{macrocode}
+ \Msg{File #1 ended by \string\endinput.}%
+ \Continuefalse
+ \else
+% \end{macrocode}
+% \changes{2.0j}{1992/03/03}{First check for end of file before check
+% for empty lines} When the end of the file is found we have to
+% interrupt the loop.
+% \begin{macrocode}
+ \ifeof\inFile
+ \Continuefalse
+% \end{macrocode}
+% \changes{2.0i}{1991/06/27}{Added check for consecutive empty lines}
+% If the file did not end we check if the input line is empty.
+% If it is, the counter |\emptyLines| is incremented.
+% \begin{macrocode}
+ \else
+ \Continuetrue
+ \ifx\inLine\empty
+ \advance\emptyLines\@ne
+ \else
+ \emptyLines\z@
+ \fi
+% \end{macrocode}
+% When the number of empty lines seen so far exceeds 1, we skip them.
+% If it doesn't, the expansion of |\inLine| is fed to |\processLine|
+% with |\endLine| appended to indicate the end of the line.
+% \begin{macrocode}
+ \ifnum \emptyLines<2
+ \expandafter\processLine\inLine\endLine
+ \else
+ \maybeMsg{/}%
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% When the processing of the line is finished, we check if there is
+% more to do, in which case we repeat the loop.
+% \begin{macrocode}
+ \ifContinue
+ \repeat
+% \end{macrocode}
+% The input file is closed.
+% \begin{macrocode}
+ \closein\inFile
+% \end{macrocode}
+% We close output files for which this was the last input file.
+% \begin{macrocode}
+ \csname e@#1\endcsname
+% \end{macrocode}
+% If the user was interested in statistics, we inform him of the
+% number of lines processed, the number of comments that were
+% either removed or passed and the number of codelines that were
+% written to the output file. Also the totals are updated.
+% \begin{macrocode}
+%<*stats>
+ \Msg{Lines \space processed: \the\processedLines^^J%
+ Comments removed: \the\commentsRemoved^^J%
+ Comments \space passed: \the\commentsPassed^^J%
+ Codelines passed: \the\codeLinesPassed^^J}%
+ \global\advance\TotalprocessedLines by \processedLines
+ \global\advance\TotalcommentsRemoved by \commentsRemoved
+ \global\advance\TotalcommentsPassed by \commentsPassed
+ \global\advance\TotalcodeLinesPassed by \codeLinesPassed
+%</stats>
+% \end{macrocode}
+% The |\NumberOfFiles| need to be known even if no statistics are
+% gathered so we update it always.
+% \changes{2.4h}{1997/07/07}{update \cs{NumberOfFiles} even if stats are
+% not gathered pr/2429}
+% \begin{macrocode}
+ \global\advance\NumberOfFiles by \@ne
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\showfiles@do}
+% \changes{2.4a}{1996/10/02}{Macro added (MW)}
+% A message is displayed on the terminal telling the user what we
+% are about to do. For each open output file we display one line
+% saying what options it is generated with and the off-counter
+% associated with the file is zeroed. First line contains also name
+% of input file.
+% Names of output files that are closed are appended to
+% |\refusedfiles|.
+% \begin{macrocode}
+\def\showfiles@do#1#2{%
+ \ifnum#1=\stream@closed
+ \@addto\refusedfiles{\noexpand\do#1{#2}}%
+ \else
+ \Msg{\@msg
+ \ifx>#2>\else\space(#2)\fi
+ \space -> \@stripstring#1}
+ \change@msg
+ \csname off@\number#1\endcsname=\z@
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makeoutlist@do}
+% \changes{2.3b}{1995/08/22}{Macro added --- pre-constructed
+% off-counters' names}
+% This macro selects only open output files and constructs names for
+% off-counters.
+% \begin{macrocode}
+\def\makeoutlist@do#1#2{%
+ \ifnum#1=\stream@closed\else
+ \noexpand\do#1{#2}\csname off@\number#1\endcsname
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\openoutput}
+% \changes{2.3e}{1996/10/02}{Change for ``open lists'' -- renamed from
+% \cs{ensureopen@do}}
+% \changes{2.4a}{1996/06/06}{Check whether there are streams left (MDW)}
+% This macro opens output streams if possible.
+% \begin{macrocode}
+\def\openoutput#1{%
+% \end{macrocode}
+% If both maxfile counters are non-zero\dots
+% \begin{macrocode}
+ \if 1\ifnum\@maxfiles=\z@ 0\fi
+ \ifnum\@maxoutfiles=\z@ 0\fi1%
+% \end{macrocode}
+% \dots the stream may be opened and counters decremented. But if
+% that cannot be done\dots
+% \begin{macrocode}
+ \advance\@maxfiles\m@ne
+ \advance\@maxoutfiles\m@ne
+ \StreamOpen#1%
+ \WritePreamble#1%
+ \else
+% \end{macrocode}
+% \dots the file is added to the ``refuse list''.
+% \begin{macrocode}
+ \@addto\refusedfiles{\noexpand\openoutput#1}%
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\closeoutput}
+% \changes{2.4a}{1996/06/06}
+% {Don't close the file if it's not open (MDW)}
+% This macro closes open output stream when it is no longer
+% needed and increments maxfiles counters.
+% \begin{macrocode}
+\def\closeoutput#1{%
+ \ifnum#1=\stream@closed\else
+ \WritePostamble#1%
+ \StreamClose#1%
+ \advance\@maxfiles\@ne
+ \advance\@maxoutfiles\@ne
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Preamble and postamble}
+%
+% \begin{macro}{\ds@heading}
+% \changes{2.3e}{1996/09/16}{Macro added.}
+% This is a couple of lines, stating what file is being written and
+% how it was created.
+% \begin{macrocode}
+\def\ds@heading{%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space This is file `\outFileName',^^J%
+ \MetaPrefix\space generated with the docstrip utility.^^J%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AddGenerationDate}
+% \changes{2.3d}{1995/11/17}{(DPC) Macro added.}
+% Older versions of \ds{} added the date that any file was generated
+% and the version number of \ds{}. This confused some people as they
+% mistook this for the version/date of the file that was being
+% written. So now this information is not normally written, but
+% a batch file may call this to get an old style header.
+% \begin{macrocode}
+\def\AddGenerationDate{%
+ \def\ds@heading{%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space This is file `\outFileName', generated %
+ on <\the\year/\the\month/\the\day> ^^J%
+ \MetaPrefix\space with the docstrip utility (\fileversion).^^J%
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\declarepreamble}
+% \changes{2.3a}{1995/08/18}{renamed from \cs{preamble};
+% interface changed}
+% \changes{2.0e}{1991/06/01}{Macro added.}
+% \changes{2.3e}{1995/09/25}
+% {Change for batchfiles working by \cs{input}}
+% \changes{2.3e}{1996/09/16}{Change to allow customization.}
+% When a batch file is used the
+% user can specify a preamble of his own that will be written to
+% each file that is created. This can be useful to include an extra
+% copyright notice in the stripped version of a file. Also a
+% warning that both versions of a file should {\em always\/} be
+% distributed together could be written to a stripped file by
+% including it in such a preamble.
+%
+% Every line that is written to |\outFile| that belongs to the
+% preamble is preceded by two percent characters. This will prevent
+% \ds{} from stripping these lines off the file.
+%
+% The preamble should be started with the macro
+% |\declarepreamble|; it is ended by |\endpreamble|. All
+% processing is done within a group in order to be able to locally
+% change some values.
+%
+% |\ReferenceLines| is let equal |\relax| to be unexpandable.
+% \begin{macrocode}
+\let\inFileName\relax
+\let\outFileName\relax
+\let\ReferenceLines\relax
+\def\declarepreamble{\begingroup
+\catcode`\^^M=13 \catcode`\ =12 %
+\declarepreambleX}
+{\catcode`\^^M=13 %
+\gdef\declarepreambleX#1#2
+\endpreamble{\endgroup%
+ \def^^M{^^J\MetaPrefix\space}%
+ \edef#1{\ds@heading%
+ \ReferenceLines%
+ \MetaPrefix\space\checkeoln#2\empty}}%
+\gdef\checkeoln#1{\ifx^^M#1\else\expandafter#1\fi}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\declarepostamble}
+% \changes{2.0e}{1991/06/01}{Macro added.}
+% \changes{2.3e}{1995/09/25}
+% {Change for batchfiles working by \cs{input}}
+% Just as a preamble can be
+% specified in a batch file, the same can be done for a {\em
+% post\/}amble.
+%
+% The definition of |\declarepostamble| is very much like the
+% definition above of |\declarepreamble|.
+% \begin{macrocode}
+\def\declarepostamble{\begingroup
+\catcode`\ =12 \catcode`\^^M=13
+\declarepostambleX}
+{\catcode`\^^M=13 %
+\gdef\declarepostambleX#1#2
+\endpostamble{\endgroup%
+ \def^^M{^^J\MetaPrefix\space}%
+ \edef#1{\MetaPrefix\space\checkeoln#2\empty^^J%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space End of file `\outFileName'.%
+ }}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\usepreamble}
+% \begin{macro}{\usepostamble}
+% Macros for selecting [pre/post]amble to be used.
+% \begin{macrocode}
+\def\usepreamble#1{\def\currentpreamble{#1}}
+\def\usepostamble#1{\def\currentpostamble{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\nopreamble}
+% \changes{2.4i}{1998/01/18}{Macro added. pr/2726}
+% \begin{macro}{\nopostamble}
+% \changes{2.4i}{1998/01/18}{Macro added. pr/2726}
+% Shortcuts for disabling the writing of [pre/post]ambles.
+% This is not done by disabling |\WritePreamble| or |\WritePostamble|
+% since that wouldn't
+% revertable afterwards. Instead the empty [pre/post]ambles are handled
+% specially in those macros.
+% \begin{macrocode}
+\def\nopreamble{\usepreamble\empty}
+\def\nopostamble{\usepostamble\empty}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\preamble}
+% \changes{2.3c}{1995/08/28}{Bug fixed: default preamble is now selected
+% not only defined}
+% \begin{macro}{\postamble}
+% \changes{2.3c}{1995/08/28}{As for \cs{preamble}}
+% For backward compatibility we provide these macros defining
+% default preamble and postamble.
+% \begin{macrocode}
+\def\preamble{\usepreamble\defaultpreamble
+ \declarepreamble\defaultpreamble}
+\def\postamble{\usepostamble\defaultpostamble
+ \declarepostamble\defaultpostamble}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\org@preamble}
+% \changes{2.3a}{1995/08/18}{Macro added}
+% \changes{2.3c}{1995/11/16}{With \cs{inFileName} again}
+% \begin{macro}{\org@postamble}
+% \changes{2.3a}{1995/08/18}{Macro added}
+% Default values to use if nothing different is provided.
+% \changes{2.2j}{1995/08/06}{Updated default preamble}
+% \changes{2.5a}{1998/04/03}{Updated default preamble}
+% \begin{macrocode}
+\declarepreamble\org@preamble
+
+IMPORTANT NOTICE:
+
+For the copyright see the source file.
+
+Any modified versions of this file must be renamed
+with new filenames distinct from \outFileName.
+
+For distribution of the original source see the terms
+for copying and modification in the file \inFileName.
+
+This generated file may be distributed as long as the
+original source files, as listed above, are part of the
+same distribution. (The sources need not necessarily be
+in the same archive or directory.)
+\endpreamble
+% \end{macrocode}
+%
+% \begin{macrocode}
+\edef\org@postamble{\string\endinput^^J%
+ \MetaPrefix ^^J%
+ \MetaPrefix\space End of file `\outFileName'.%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\defaultpreamble\org@preamble
+\let\defaultpostamble\org@postamble
+% \end{macrocode}
+%
+% \begin{macrocode}
+\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\originaldefault}
+% \changes{2.5a}{1998/04/03}{Macro added}
+% \changes{2.5b}{1998/04/28}{Macro renamed from \cs{orginaldefault}
+% to \cs{originaldefault}}
+% The default preamble header changed in v2.5 to allow distribution
+% of generated files as long as source also distributed. If you need
+% the original default, not allowing distribution of generated files
+% add |\usepreamble\originaldefault| to your .ins files.
+% Note then that your file can not be included in most TeX distributions
+% on CD which are distributed `pre-installed' with all \LaTeX\ files
+% extracted form the documented sources and moved to a suitable
+% directory in \TeX's search path.
+% \begin{macrocode}
+\declarepreamble\originaldefault
+
+IMPORTANT NOTICE:
+
+For the copyright see the source file.
+
+You are *not* allowed to modify this file.
+
+You are *not* allowed to distribute this file.
+For distribution of the original source see the terms
+for copying and modification in the file \inFileName.
+
+\endpreamble
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\WritePreamble}
+% \changes{2.0e}{1991/06/01}{Macro added.}
+% \changes{2.3c}{1995/11/16}{Added definitions of \cs{inFileName} and
+% \cs{outFileName}}
+% \changes{2.3d}{1995/11/17}{(DPC) Macro added.}
+% \changes{2.4i}{1998/01/18}{Test for \cs{empty} postamble and
+% don't write it out. pr/2726}
+% \begin{macrocode}
+\def\WritePreamble#1{%
+% \end{macrocode}
+% We write out only non-empty preambles.
+% \begin{macrocode}
+ \expandafter\ifx\csname pre@\@stripstring#1\endcsname\empty
+ \else
+ \edef\outFileName{\@stripstring#1}%
+% \end{macrocode}
+% Then the reference lines that tell from what source file(s) the
+% stripped file was created and user supplied preamble.
+% \begin{macrocode}
+ \StreamPut#1{\csname pre@\@stripstring#1\endcsname}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\WritePostamble}
+% \changes{2.0e}{1991/06/01}{Macro added.}
+% \changes{2.3c}{1995/11/16}{Added defs of \cs{inFileName} and
+% \cs{outFileName}}
+% \changes{2.4i}{1998/01/18}{Test for \cs{empty} postamble and
+% don't write it out. pr/2726}
+% Postamble attributed to |#1| is written out. The
+% last line written identifies the file again.
+% \begin{macrocode}
+\def\WritePostamble#1{%
+% \end{macrocode}
+% We write out only non-empty postambles.
+% \begin{macrocode}
+ \expandafter\ifx\csname post@\@stripstring#1\endcsname\empty
+ \else
+ \edef\outFileName{\@stripstring#1}%
+ \StreamPut#1{\csname post@\@stripstring#1\endcsname}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Support for writing to specified directories}
+%
+% As we've seen before every output file is written to directory
+% specified by the value of |\destdir| current at the moment of
+% this file's |\file| declaration.
+%
+% \begin{macro}{\usedir}
+% \changes{2.3e}{1995/09/15}{Macro added}
+% This macro when called should translate its one argument into a
+% directory name and define |\destdir| to that value. The default
+% for |\usedir| is to ignore its argument and return name of
+% current directory (if known). This can be changed by commands
+% from |docstrip.cfg| file.
+%
+% |\showdirectory| is used just to display directory name for
+% user's information.
+% \begin{macrocode}
+\def\usedir#1{\edef\destdir{\WriteToDir}}
+\def\showdirectory#1{\WriteToDir}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\BaseDirectory}
+% \changes{2.3e}{1995/09/15}{Macro added}
+% \changes{2.4e}{1996/10/22}{\cs{@setwritetodir} added (DPC)}
+% This is config file command for specifying root directory of the
+% \TeX{} hierarchy. It enables the whole directory
+% selecting mechanism by redefining |\usedir|.
+% First make sure that the directory syntax commands have been set
+% up by calling |\@setwritedir|, so that the value of |\dirsep|
+% used by the |\edef| is (hopefully) correct.
+% \begin{macrocode}
+\def\BaseDirectory#1{%
+ \@setwritetodir
+ \let\usedir\alt@usedir
+ \let\showdirectory\showalt@directory
+ \edef\basedir{#1\dirsep}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\convsep}
+% \changes{2.3e}{1995/09/15}{Macro added}
+% This macro loops through slashes in its argument replacing them
+% with current |\dirsep|. It should be called
+% |\convsep some/directory/name/\qStop| (with slash on the end).
+% \begin{macrocode}
+\def\convsep#1/#2\qStop{%
+ #1\ifx\qStop#2\qStop \pesvnoc\fi\convsep\dirsep#2\qStop}
+\def\pesvnoc#1\qStop{\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\alt@usedir}
+% \changes{2.3e}{1995/09/15}{Macro added}
+% Directory name construction macro enabling writing to various
+% directories.
+% \begin{macrocode}
+\def\alt@usedir#1{%
+ \Name\ifx{dir@#1}\relax
+ \undefined@directory{#1}%
+ \else
+ \edef\destdir{\csname dir@#1\endcsname}%
+ \fi}
+\def\showalt@directory#1{%
+ \Name\ifx{dir@#1}\relax
+ \showundef@directory{#1}%
+ \else\csname dir@#1\endcsname\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\undefined@directory}
+% \changes{2.4a}{1996/10/04}{Macro added (MW)}
+% \changes{2.4e}{1996/10/22}{Help text added (DPC)}
+% This macro comes into action when undefined label is spotted. The
+% action is to raise an error and define |\destdir| to point to the
+% current directory.
+% \begin{macrocode}
+\def\undefined@directory#1{%
+ \errhelp{docstrip.cfg should specify a target directory for^^J%
+ #1 using \DeclareDir or \UseTDS.}%
+ \errmessage{You haven't defined the output directory for `#1'.^^J%
+ Subsequent files will be written to the current directory}%
+ \let\destdir\WriteToDir
+ }
+\def\showundef@directory#1{UNDEFINED (label is #1)}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\undefined@TDSdirectory}
+% \changes{2.4a}{1996/10/04}{Macro added (MW)}
+% This happens when label is undefined while using TDS. The label
+% is converted to use proper separators and appended to base
+% directory name.
+% \begin{macrocode}
+\def\undefined@TDSdirectory#1{%
+ \edef\destdir{%
+ \basedir\convsep#1/\qStop
+ }}
+\def\showundef@TDSdirectory#1{\basedir\convsep#1/\qStop}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UseTDS}
+% \changes{2.4a}{1996/10/04}{Macro added (MW)}
+% \changes{2.4e}{1996/10/22}{\cs{@setwritetodir} added (DPC)}
+% Change of behaviour for undefined labels is done simply:
+% \begin{macrocode}
+\def\UseTDS{%
+ \@setwritetodir
+ \let\undefined@directory\undefined@TDSdirectory
+ \let\showundef@directory\showundef@TDSdirectory
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareDir}
+% \changes{2.3e}{1995/09/15}{Macro added}
+% \changes{2.4e}{1996/10/22}{\cs{@setwritetodir} added (DPC)}
+% This macro remaps some directory name to another.
+% \begin{macrocode}
+\def\DeclareDir{\@ifnextchar*{\DeclareDirX}{\DeclareDirX\basedir*}}
+\def\DeclareDirX#1*#2#3{%
+ \@setwritetodir
+ \Name\edef{dir@#2}{#1#3}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Compatibility with older versions}
+%
+% \begin{macro}{\generateFile}
+% Main macro of previous versions of \ds.
+% \begin{macrocode}
+\def\generateFile#1#2#3{{%
+ \ifx t#2\askforoverwritetrue
+ \else\askforoverwritefalse\fi
+ \generate{\file{#1}{#3}}%
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% To support command files that were written for the first version
+% of \ds{} the commands |\include| and |\processFile|
+% are defined here. The use of this interface is not recommended
+% as it may be removed in a future release of \ds{}.
+%
+% \begin{macro}{\include}
+% \changes{2.0f}{1991/06/04}{Macro added} To provide the \ds{} program
+% with a list of options that should be included in the output the
+% command \verb=\include{=\meta{Options}\verb=}= can be used. This
+% macro is meant to be used in conjunction with the
+% |\processFile| command.
+% \begin{macrocode}
+\def\include#1{\def\Options{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\processFile}
+% \changes{2.0f}{1991/06/04}{Supply \texttt{\bsl generateFile} with
+% \texttt{\bsl Options}}
+%\DeleteShortVerb\|
+% The macro
+% \verb=\processFile{=\meta{filename}\verb=}{=\meta{inext}\verb=}{=%
+%\unskip\meta{outext}\verb=}{=\meta{t{\fontshape{n}\ttfamily|}f}\verb=}=
+% can be used when a single input file is used to produce
+% a single output file. The macro is also used in the interactive
+% mode of the \ds{} program.
+%\MakeShortVerb\|
+%
+% The arguments \meta{inext} and \meta{outext} denote the
+% extensions of the input and output files respectively. The fourth
+% argument can be used to specify if an existing file should be
+% overwritten without asking. If \meta{t} is specified the program
+% will ask for permission before overwriting an existing file.
+%
+% This macro is defined using the more generic macro |\generateFile|.
+% \begin{macrocode}
+\def\processFile#1#2#3#4{%
+ \generateFile{#1.#3}{#4}{\from{#1.#2}{\Options}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\processfile}
+% \begin{macro}{\generatefile}
+% \changes{2.0m}{1991/04/23}{Now issue a warning when \cs{processfile}
+% or \cs{generatefile} are used}
+% Early
+% versions of \ds{} defined |\processfile| and
+% |\generatefile| instead of the commands as they are defined in
+% this version. To remain upwards compatible, we still provide
+% these commands, but issue a warning when they are used.
+% \begin{macrocode}
+\def\processfile{\Msg{%
+ ^^Jplease use \string\processFile\space instead of
+ \string\processfile!^^J}%
+ \processFile}
+\def\generatefile{\Msg{%
+ ^^Jplease use \string\generateFile\space instead of
+ \string\generatefile!^^J}%
+ \generateFile}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Limiting open file streams}
+%
+% (This section was written by Mark Wooding)
+%
+% \begin{macro}{\maxfiles}
+% \changes{2.4a}{1996/06/06}{Macro added (MDW)}
+% Some operating systems with duff libraries or other restrictions
+% can't cope with all the files which \ds\ tries to output at once.
+% A configuration file can say |\maxfiles{|\meta{number}|}| to
+% describe the maximum limit for the environment.
+%
+% I'll need a counter for this value, so I'd better allocate one.
+%
+% \begin{macrocode}
+\newcount\@maxfiles
+% \end{macrocode}
+%
+% The configuration command |\maxfiles| is just slightly prettier than
+% an assignment, for \LaTeX\ people. It also gives me an opportunity
+% to check that the limit is vaguely sensible. I need at least 4
+% streams:
+% \begin{enumerate}
+% \item A batch file.
+% \item A sub batch file, which \LaTeX's installation utility uses.
+% \item An input stream for reading an unstripped file.
+% \item An output stream for writing a stripped file.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\maxfiles#1{%
+ \@maxfiles#1\relax
+ \ifnum\@maxfiles<4
+ \errhelp{I'm not a magician. I need at least four^^J%
+ streams to be able to work properly, but^^J%
+ you've only let me use \the\@maxfiles.}%
+ \errmessage{\noexpand\maxfiles limit is too strict.}%
+ \@maxfiles4
+ \fi
+}
+% \end{macrocode}
+%
+% \changes{2.4a}{1996/10/03}{No default limit since batchfiles are now
+% \cs{input} (MW)}
+% Since batchfiles are now |\input|ed there should be no default limit
+% here. I'll just use some abstract large number.
+% \begin{macrocode}
+\maxfiles{1972} % year of my birth (MW)
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\maxoutfiles}
+% \changes{2.4a}{1996/06/06}{Macro added (MDW)}
+%
+% Maybe there's a restriction on just output streams. (Well, there is:
+% I know, because \TeX\ only allows 16.) I may as well allow the
+% configuration to set this up.
+%
+% Again, I need a counter.
+%
+% \begin{macrocode}
+\newcount\@maxoutfiles
+% \end{macrocode}
+%
+% And now the macro. I need at least one output stream which I think is
+% reasonable.
+%
+% \begin{macrocode}
+\def\maxoutfiles#1{%
+ \@maxoutfiles=#1\relax
+ \ifnum\@maxoutfiles<1
+ \@maxoutfiles1
+ \errhelp{I'm not a magician. I need at least one output^^J%
+ stream to be able to do anything useful at all.^^J%
+ Please be reasonable.}%
+ \errmessage{\noexpand\maxoutfiles limit is insane}%
+ \fi
+}
+% \end{macrocode}
+%
+% The default limit is 16, because that's what \TeX\ says.
+%
+% \begin{macrocode}
+\maxoutfiles{16}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\checkfilelimit}
+%
+% This checks the file limit when a new batch file is started. If
+% there's fewer than two files left here, we're not going to be able
+% to strip any files. The file limit counter is local to the group
+% which is set up around |\batchinput|, so that's all pretty cool.
+%
+% \begin{macrocode}
+\def\checkfilelimit{%
+ \advance\@maxfiles\m@ne
+ \ifnum\@maxfiles<2 %
+ \errhelp{There aren't enough streams left to do any unpacking.^^J%
+ I can't do anything about this, so complain at the^^J%
+ person who made such a complicated installation.}%
+ \errmessage{Too few streams left.}%
+ \end
+ \fi
+}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \subsection{Interaction with the user}
+%
+% \begin{macro}{\strip@meaning}
+% Throw away the first part of |\meaning| output.
+% \changes{2.4c}{1996/06/11}{Macro added (DPC)}
+% \begin{macrocode}
+\def\strip@meaning#1>{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\processbatchFile}
+% \changes{2.0f}{1991/06/04}{Macro added.}
+% \changes{2.3e}{1995/09/25}{Batch file is \cs{input}ed not \cs{read}}
+% When \ds{} is run it always tries to use a batch file.
+%
+% For this purpose it calls the macro |\processbatchFile|.
+%
+% \changes{2.4a}{1996/06/06}
+% {Added check for file limits (MDW)}
+% \changes{2.4c}{1996/06/11}
+% {Add \cs{jobname} checks (DPC)}
+% \changes{2.4d}{1996/06/17}
+% {Move \cs{jobname} checks to top level (DPC)}
+% The first thing is to check if there are any input streams left.
+% \begin{macrocode}
+\def\processbatchFile{%
+ \checkfilelimit
+ \let\next\relax
+% \end{macrocode}
+% Now we try to open the batch file for reading.
+% \begin{macrocode}
+ \openin\inputcheck \batchfile\relax
+ \ifeof\inputcheck
+% \end{macrocode}
+% If we didn't succeed in opening the file, we assume that it does
+% not exist. If we tried the default filename, we silently
+% continue; the \ds{} program will switch to interactive mode in
+% this case.
+% \begin{macrocode}
+ \ifDefault
+ \else
+% \end{macrocode}
+% \changes{2.4d}{1996/10/17}{Missing batchfile an error (DPC)}
+% If we failed to open the user-supplied file, something is wrong
+% and we warn him about it. This will also result in a switch to
+% interactive mode.
+% \begin{macrocode}
+ \errhelp
+ {A batchfile specified in \batchinput could not be found.}%
+ \errmessage{^^J%
+ **************************************************^^J%
+ * Could not find your \string\batchfile=\batchfile.^^J%
+ **************************************************}%
+ \fi
+ \else
+% \end{macrocode}
+% When we were successful in opening a file, we again have to check
+% whether it was the default file. In that case we tell the user
+% we found that file and ask him if he wants to use it.
+% \begin{macrocode}
+ \ifDefault
+ \Msg{**************************************************^^J%
+ * Batchfile \DefaultbatchFile\space found Use it? (y/n)?}%
+ \Ask\answer{%
+ **************************************************}%
+ \else
+% \end{macrocode}
+% When it was the user-supplied file we can safely assume he wants
+% to use it so we set |\answer| to \texttt{y}.
+% \begin{macrocode}
+ \let\answer\y
+ \fi
+% \end{macrocode}
+% If the macro |\answer| contains a \texttt{y} we can read in the
+% batchfile. We do it in an indirect way---after completing |\if|s.
+% \begin{macrocode}
+ \ifx\answer\y
+ \closein\inputcheck
+ \def\next{\@@input\batchfile\relax}%
+ \fi
+ \fi
+ \next}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ReportTotals}
+% \changes{2.0g}{1991/06/05}{Macro added.} The macro
+% |\ReportTotals| can be used to report total statistics for
+% all files processed. This code is only included in the program if
+% the option \texttt{stats} is included.
+% \begin{macrocode}
+%<*stats>
+\def\ReportTotals{%
+ \ifnum\NumberOfFiles>\@ne
+ \Msg{Overall statistics:^^J%
+ Files \space processed: \the\NumberOfFiles^^J%
+ Lines \space processed: \the\TotalprocessedLines^^J%
+ Comments removed: \the\TotalcommentsRemoved^^J%
+ Comments \space passed: \the\TotalcommentsPassed^^J%
+ Codelines passed: \the\TotalcodeLinesPassed}%
+ \fi}
+%</stats>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SetFileNames}
+% The macro |\SetFileNames| is used when the program runs in
+% interactive mode and the user was asked to supply extensions and
+% a list of filenames.
+% \begin{macrocode}
+\def\SetFileNames{%
+ \edef\sourceFileName{\MainFileName.\infileext}%
+ \edef\destFileName{\MainFileName.\outfileext}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CheckFileNames}
+% In interactive mode, the user gets asked for the extensions for
+% the input and output files. Also the name or names of the input
+% files (without extension) is asked for. Then the names of the
+% input and output files are constructed from this information by
+% |\SetFileNames|. This assumes that the name of the input file is
+% the same as the name of the output file. But we should not write
+% to the same file we're reading from so the extensions should
+% differ.
+%
+% The macro |\CheckFileNames| makes sure that the output goes to a
+% different file to the one where the input comes from.
+% \begin{macrocode}
+\def\CheckFileNames{%
+ \ifx\sourceFileName\destFileName
+% \end{macrocode}
+% If input and output files are the same we signal an error and stop
+% processing.
+% \begin{macrocode}
+ \Msg{^^J%
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
+ ! It is not possible to read from and write to the same file !^^J%
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
+ \Continuefalse
+ \else
+% \end{macrocode}
+% If they are not the same we check if the input file exists by
+% trying to open it for reading.
+% \begin{macrocode}
+ \Continuetrue
+ \immediate\openin\inFile \sourceFileName\relax
+ \ifeof\inFile
+% \end{macrocode}
+% If an end of file was found, the file couldn't be opened, so we
+% signal an error and stop processing.
+% \begin{macrocode}
+ \Msg{^^J%
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
+ ! Your input file `\sourceFileName' was not found !^^J%
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
+ \Continuefalse
+ \else
+% \end{macrocode}
+% The last check we have to make is if the output file already
+% exists. Therefore we try to open it for reading.
+% As a precaution we first close the input stream.
+% \changes{2.0p}{1992/06/26}{Added \cs{WriteToDir} (FMi).}
+% \changes{2.0r}{1992/08/17}{Use \cs{inFile} for reading}
+% \changes{2.0r}{1992/08/17}{Moved \cs{closein} statements}
+% \begin{macrocode}
+ \immediate\closein\inFile
+ \immediate\openin\inFile\destdir \destFileName\relax
+ \ifeof\inFile
+% \end{macrocode}
+% If this fails, it didn't exist and all is well.
+% \begin{macrocode}
+ \Continuetrue
+ \else
+% \end{macrocode}
+% If opening of the output file for reading succeeded we have to
+% ask the user if he wants to overwrite it. We assume he doesn't
+% want to overwrite it, so the switch |\ifContinue| is initially
+% set to \meta{false}. Only if he answers the question positively
+% with `\texttt{y}' or `\texttt{yes}' we set the switch back to
+% \meta{true}.
+% \changes{2.0p}{1992/06/26}{Changed question about overwriting.}
+% \begin{macrocode}
+ \Continuefalse
+ \Ask\answer{File \destdir\destFileName\space already
+ exists
+ \ifx\empty\destdir somewhere \fi
+ on the system.^^J%
+ Overwrite it%
+ \ifx\empty\destdir\space if necessary\fi
+ ? [y/n]}%
+ \ifx\y \answer \Continuetrue \else
+ \ifx\yes\answer \Continuetrue \else
+ \fi\fi
+ \fi
+% \end{macrocode}
+% All checks have been performed now, so we can close any file that
+% was opened just for this purpose.
+% \begin{macrocode}
+ \fi
+ \fi
+ \closein\inFile}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\interactive}
+% The macro |\interactive| implements the interactive mode of the
+% \ds{} program. The macro is implemented using the
+% \meta{while} construction. While the switch |\ifMoreFiles| remains
+% true, we continue processing.
+% \begin{macrocode}
+\def\interactive{%
+ \whileswitch\ifMoreFiles\fi%
+% \end{macrocode}
+% To keep macro redefinitions local we start a group and ask the
+% user some questions about what he wants us to do.
+% \begin{macrocode}
+ {\begingroup
+ \AskQuestions
+% \end{macrocode}
+% The names of the files that have to be processed are stored as a
+% comma-separated list in the macro |\filelist| by |\AskQuestions|.
+% We use a \meta{for} loop to process the files one by one.
+% \begin{macrocode}
+ \forlist\MainFileName:=\filelist
+ \do
+% \end{macrocode}
+% First the names of the input and output files are constructed
+% and a check is made if all filename information is correct.
+% \begin{macrocode}
+ \SetFileNames
+ \CheckFileNames
+ \ifContinue
+% \end{macrocode}
+% If everything was well, produce output file.
+% \changes{2.0q}{1992/07/01}{Preceded filename by \cs{WriteToDir}}
+% \begin{macrocode}
+ \generateFile{\destFileName}{f}%
+ {\from{\sourceFileName}{\Options}}
+ \fi%
+% \end{macrocode}
+% This process is repeated until |\filelist| is exhausted.
+% \begin{macrocode}
+ \od
+ \endgroup
+% \end{macrocode}
+% Maybe the user wants more files to be processed, possibly with
+% another set of options, so we give him the opportunity.
+% \begin{macrocode}
+ \Ask\answer{More files to process (y/n)?}%
+ \ifx\y \answer\MoreFilestrue \else
+ \ifx\yes\answer\MoreFilestrue \else
+% \end{macrocode}
+% If he didn't want to process any more files, the switch
+% |\ifMoreFiles| is set to \meta{false} in order to interrupt the
+% \meta{while} loop.
+% \begin{macrocode}
+ \MoreFilesfalse\fi\fi
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AskQuestions}
+% \changes{2.0e}{1991/06/01}{Macro added.}
+% The macro |\AskQuestions| is called by |\interactive| to get
+% some information from the user concerning the files that need
+% to be processed.
+% \begin{macrocode}
+\def\AskQuestions{%
+ \Msg{^^J%
+ ****************************************************}%
+% \end{macrocode}
+% We want to know the extension of the input files,
+% \begin{macrocode}
+ \Ask\infileext{%
+ * First type the extension of your input file(s): \space *}%
+ \Msg{****************************************************^^J^^J%
+ ****************************************************}%
+% \end{macrocode}
+% the extension of the output files,
+% \begin{macrocode}
+ \Ask\outfileext{%
+ * Now type the extension of your output file(s) \space: *}%
+ \Msg{****************************************************^^J^^J%
+ ****************************************************}%
+% \end{macrocode}
+% if options are to be included and
+% \begin{macrocode}
+ \Ask\Options{%
+ * Now type the name(s) of option(s) to include \space\space: *}%
+ \Msg{****************************************************^^J^^J%
+ ****************************************************^^J%
+ * Finally give the list of input file(s) without \space\space*}%
+% \end{macrocode}
+% the name of the input file or a list of names, separated by commas.
+% \changes{2.5e}{2014/09/29}{Typo in \cs{Ask} argument fixed}
+% \begin{macrocode}
+ \Ask\filelist{%
+ * extension separated by commas if necessary %
+ \space\space\space\space: *}%
+ \Msg{****************************************************^^J}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The main program}
+% When \TeX\ processes the \ds{} program it displays
+% a message about the version of the program and its function
+% on the terminal.
+% \begin{macrocode}
+\Msg{Utility: `docstrip' \fileversion\space <\filedate>^^J%
+ English documentation \space\space\space <\docdate>}%
+\Msg{^^J%
+ **********************************************************^^J%
+ * This program converts documented macro-files into fast *^^J%
+ * loadable files by stripping off (nearly) all comments! *^^J%
+ **********************************************************^^J}%
+% \end{macrocode}
+%
+%
+% \begin{macro}{\WriteToDir}
+% Macro |\WriteToDir| is either empty or holds the prefix
+% necessary to read a file from the current directory. Under UNIX
+% this is |./| but a lot of other systems addopted this concept.
+% This macro is a default value for |\destdir|.
+%
+% The definition of this macro is now delayed until |\@setwritedir|
+% is called.
+% \changes{2.0p}{1992/06/26}{Macro added (FMi).}
+% \changes{2.2a}{1993/12/02}{check texsys file}
+% \changes{2.2d}{1994/01/20}{do not read dircheck/texsys file}
+% \changes{2.4e}{1996/10/22}{set in \cs{@setwritedir} (DPC)}
+% \end{macro}
+%
+% \begin{macro}{\makepathname}
+% \changes{2.3e}{1995/10/24}{Macro added}
+% \changes{2.4e}{1996/10/22}{set in \cs{@setwritedir} (DPC)}
+% This macro should define |\@pathname| to full path name made by
+% combining current value of |\destdir| with its one argument being
+% a file name. Its default value defined here is suitable for
+% \textsc{unix, ms-dos} and Macintosh, but for some systems it may
+% be needed to redefine this in \texttt{docstrip.cfg} file. We
+% provide such redefinition for VMS here.
+%
+% Macro |\dirsep| holds directory separator specific for a
+% system. Default value suitable for UNIX and DOS is slash. It
+% comes in action when |\usedir| labels are used directly.
+%
+% The definition of this macro is now delayed until |\@setwritedir|
+% is called.
+% \end{macro}
+%
+% \begin{macro}{\@setwritedir}
+% \changes{2.4e}{1996/10/22}{macro added (DPC)}
+% The following tests try to automatically set the macros |\WriteToDir|,
+% |\dirname| and |\makepathname| in Unix, Mac, or VMS style.
+% The tests are not run at the top level but held in this macro
+% so that a configuration file has a chance to define |\WriteToDir|
+% which allows the other two to be set automatically. The tests could
+% more simply be run after the configuration file is read, but the
+% configuration commands like |\BaseDirectory| need (at least at
+% present) to have |\dirsep| correctly defined. It does not define
+% any command that is already defined, so by defining these commands
+% a configuration file can produce different effects for special needs.
+% So this command is called by |BaseDirectory|, |\UseTDS|,
+% |\DeclareDir| and finally at the top level after the cfg is run.
+% It begins by redefining itself to be a no-op so it effectively is
+% only called once.
+% \begin{macrocode}
+\def\@setwritetodir{%
+ \let\setwritetodir\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifx\WriteToDir\@undefined
+ \ifx\@currdir\@undefined
+ \def\WriteToDir{}%
+ \else
+ \let\WriteToDir\@currdir
+ \fi
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \let\destdir\WriteToDir
+% \end{macrocode}
+%
+% VMS Style.
+% \begin{macrocode}
+ \def\tmp{[]}%
+ \ifx\tmp\WriteToDir
+ \ifx\dirsep\@undefined
+ \def\dirsep{.}%
+ \fi
+ \ifx\makepathname\@undefined
+ \def\makepathname##1{%
+ \edef\@pathname{\ifx\WriteToDir\destdir
+ \WriteToDir\else[\destdir]\fi##1}}%
+ \fi
+ \fi
+% \end{macrocode}
+%
+% Unix and Mac styles.
+% \begin{macrocode}
+ \ifx\dirsep\@undefined
+ \def\dirsep{/}%
+ \def\tmp{:}%
+ \ifx\tmp\WriteToDir
+ \def\dirsep{:}%
+ \fi
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifx\makepathname\@undefined
+ \def\makepathname##1{%
+ \edef\@pathname{\destdir\ifx\empty\destdir\else
+ \ifx\WriteToDir\destdir\else\dirsep\fi\fi##1}}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% If the user has a |docstrip.cfg| file, use it now.
+% \changes{2.4d}{1995/10/17}{Move config file test to outer level (DPC)}
+% This macro tries to read \texttt{docstrip.cfg} file. If this
+% succeeds executes its first argument, otherwise the second.
+% \begin{macrocode}
+\immediate\openin\inputcheck=docstrip.cfg\relax
+\ifeof\inputcheck
+ \Msg{%
+ ********************************************************^^J%
+ * No Configuration file found, using default settings. *^^J%
+ ********************************************************^^J}%
+\else
+ \Msg{%
+ ******************************************^^J%
+ * Using Configuration file docstrip.cfg. *^^J%
+ ******************************************^^J}%
+ \closein\inputcheck
+ \afterfi{\@@input docstrip.cfg\relax}
+\fi
+% \end{macrocode}
+%
+% Now run |\@setwritedir| in case it has not already been run
+% by a command in a configuration file.
+% \begin{macrocode}
+\@setwritetodir
+% \end{macrocode}
+%
+% \begin{macro}{\process@first@batchfile}
+% \changes{2.4d}{1996/10/17}
+% {Macro added (DPC)}
+% Process the batch file, and then terminate cleanly.
+% This may be set to |\relax| for `new style' batch files that
+% do not start with |\def\batchfile{|\ldots
+% \begin{macrocode}
+\def\process@first@batchfile{%
+ \processbatchFile
+ \ifnum\NumberOfFiles=\z@
+ \interactive
+ \fi
+ \endbatchfile}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\endbatchfile}
+% \changes{2.4d}{1996/10/17}
+% {Macro added (DPC)}
+% User level command to end batch file processing.
+% At the top level, returns totals and then stops \TeX.
+% At nested levels just does |\endinput|.
+% \begin{macrocode}
+\def\endbatchfile{%
+ \iftopbatchfile
+%<*stats>
+ \ReportTotals
+%</stats>
+ \expandafter\end
+ \else
+ \endinput
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% Now we see whether to process a batch file.
+% \changes{2.4d}{1996/10/17}
+% {Move default batchfile check to outer level (DPC)}
+%
+%
+% \begin{macro}{\@jobname}
+% \changes{2.4d}{1996/10/17}
+% {Macro added (DPC)}
+% Jobname (catcode 12)
+% \begin{macrocode}
+\edef\@jobname{\lowercase{\def\noexpand\@jobname{\jobname}}}%
+\@jobname
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@docstrip}
+% \changes{2.4d}{1996/10/17}
+% {Macro added (DPC)}
+% docstrip (catcode 12)
+% \begin{macrocode}
+\def\@docstrip{docstrip}%
+\edef\@docstrip{\expandafter\strip@meaning\meaning\@docstrip}
+% \end{macrocode}
+% \end{macro}
+%
+% First check whether the user has
+% defined the control sequence |\batchfile|. If he did, it should
+% contain the name of the file to process.
+% If he didn't, try the current file, unless that is |docstrip.tex|
+% in which case a default name is tried.
+% Whether or not the default batch file is used is
+% remembered by setting the switch |\ifDefault| to \meta{true} or
+% \meta{false}.
+% \begin{macrocode}
+\Defaultfalse
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\undefined\batchfile
+% \end{macrocode}
+% |\@jobname| is lowercase jobname (catcode 12)\\
+% |\@docstrip| is docstrip (catcode 12)
+% \begin{macrocode}
+ \ifx\@jobname\@docstrip
+% \end{macrocode}
+% Set the batchfile to the default
+% \begin{macrocode}
+ \let\batchfile\DefaultbatchFile
+ \Defaulttrue
+% \end{macrocode}
+% Else don't process a new batchfile, just carry on with past the end
+% of this file. In this case processing will move to the initial
+% batchfile which \emph{must} then be terminated by |\endbatchfile| or
+% \TeX\ will fall to the star prompt.
+% \begin{macrocode}
+ \else
+ \let\process@first@batchfile\relax
+ \fi
+\fi
+\process@first@batchfile
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</program>
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/docstrip.ins b/macros/latex-dev/base/docstrip.ins
new file mode 100644
index 0000000000..61a9343af6
--- /dev/null
+++ b/macros/latex-dev/base/docstrip.ins
@@ -0,0 +1,135 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+% If the top level file is docstrip.ins, most TeXs set \jobname to
+% docstrip which would make docstrip program think it should run
+% in interactive mode. So redefine \jobname in this install file.
+
+\let\jobname\relax
+\input docstrip.dtx
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+
+
+\declarepostamble\istpost
+\endpostamble
+
+\keepsilent
+
+% programs and packages
+
+\usedir{tex/latex/base}
+
+\generate{\file{docstrip.tex}{\from{docstrip.dtx}{initex,program,stats}}
+ }
+
+
+\generate{\file{ltxdoc.cls}{\from{ltxdoc.dtx}{class}}
+ }
+
+\generate{\file{doc.sty}{\from{doc.dtx}{package}}
+ \file{shortvrb.sty}{\from{doc.dtx}{shortvrb}}
+ \usepostamble\istpost
+ \usedir{makeindex/latex}
+ \file{gind.ist}{\from{doc.dtx}{gind}}
+ \file{gglo.ist}{\from{doc.dtx}{gglo}}
+ }
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space doc.sty}
+\Msg{* \space\space shortvrb.sty}
+\Msg{* \space\space docstrip.tex}
+\Msg{*}
+\Msg{* Also move the following files into a directory searched}
+\Msg{* by MakeIndex:}
+\Msg{*}
+\Msg{* \space\space gind.ist}
+\Msg{* \space\space gglo.ist}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+
+\endbatchfile
diff --git a/macros/latex-dev/base/docstrip.pdf b/macros/latex-dev/base/docstrip.pdf
new file mode 100644
index 0000000000..0ab1ce1802
--- /dev/null
+++ b/macros/latex-dev/base/docstrip.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ec.ins b/macros/latex-dev/base/ec.ins
new file mode 100644
index 0000000000..c611508981
--- /dev/null
+++ b/macros/latex-dev/base/ec.ins
@@ -0,0 +1,141 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\Msg{*** Generating font defs for Cork encoded
+ and Text Companion fonts ***}
+
+\generate{
+ \file{t1cmfib.fd}{
+ \from{cmfonts.fdd}{fd,T1cmfib,ec}}
+ \file{t1cmfr.fd}{
+ \from{cmfonts.fdd}{fd,T1cmfr,ec}}
+ \file{t1cmdh.fd}{
+ \from{cmfonts.fdd}{fd,T1cmdh,ec}}
+ \file{t1cmr.fd}{
+ \from{cmfonts.fdd}{fd,T1cmr,ec}}
+ \file{t1cmss.fd}{
+ \from{cmfonts.fdd}{fd,T1cmss,ec}}
+ \file{t1cmtt.fd}{
+ \from{cmfonts.fdd}{fd,T1cmtt,tt,ec,nowarn}}
+ \file{t1cmvtt.fd}{
+ \from{cmfonts.fdd}{fd,T1cmvtt,tt,ec}}
+ \file{ts1cmr.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmr,ec}}
+ \file{ts1cmss.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmss,ec}}
+ \file{ts1cmtt.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmtt,ec,tt}}
+ \file{ts1cmvtt.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmvtt,ec,tt}}
+}
+
+
+\generate{
+ \file{t1lcmss.fd}{
+ \from{slifonts.fdd}{lcmss,fd,ec}}
+ \file{t1lcmtt.fd}{
+ \from{slifonts.fdd}{lcmtt,fd,ec}}
+ }
+
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.fdd' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/exscale.dtx b/macros/latex-dev/base/exscale.dtx
new file mode 100644
index 0000000000..49e53ca5f8
--- /dev/null
+++ b/macros/latex-dev/base/exscale.dtx
@@ -0,0 +1,202 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% File: exscale.dtx
+%% Copyright (C) 1992-1997,2007 Frank Mittelbach and Rainer Sch\"opf,
+%% all rights reserved.
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{exscale}
+%<fd, >\ProvidesFile{OMXcmex.fd}
+%<package,fd> [2018/09/24 v2.1i
+%<package> Standard LaTeX package exscale]
+%<fd, > exscale package font definitions]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{exscale}
+\GetFileInfo{exscale.sty}
+\begin{document}
+\title{The \texttt{exscale} package\thanks
+ {This file has version number \fileversion, dated \filedate.}\\
+ for use with \LaTeX2e}
+\author{Frank Mittelbach \and Rainer Sch\"opf}
+\date{\filedate}
+\MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{exscale.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v2.1g}{1997/06/16}{Documentation fix.}
+% \changes{v2.1d}{1994/05/09}{Added setting \cs{big}... sizes.}
+% \changes{v2.1c}{1994/05/08}{Changed to new documentation standards.}
+% \changes{v2.1a}{1993/12/12}{Update for \LaTeXe}
+%
+% \def\MF{\textsf{Metafont}}
+% \def\dst{{\normalfont\scshape docstrip}}
+%
+%
+% \section{Introduction}
+%
+% On popular request, this package implements scaling of the
+% math extension font `cmex'. If this package is used the site needs
+% scaled versions of the \texttt{cmex10} in the sizes 10.95pt, 12pt,
+% 14.4pt , 17.28pt, 20.74pt, and 24.88pt which corresponds to standard
+% magsteps using |\magstephalf|, and |\magstep1| through |\magstep5|.
+% Additionally `cmex' variants for the sizes 7pt to 9pt are necessary.
+% These fonts are part of the AMS font package and can be found on
+% many servers.
+%
+% We don't think that using a scalable `cmex' font improves the
+% appearance of the document very much because the linear scaling of
+% the font introduces changes to font dimen parameters of the font
+% that are used all over the place in \TeX's math placement routines
+% and definitely shouldn't be scaled linearly. As a positive result,
+% however, symbols from this font will come out in approximately the
+% right size when used with a large basis font size.
+%
+% We therefore strongly recommend the generation of designed fonts for
+% the larger sizes and hope that the corresponding \MF{} sources will
+% be available in the near future.
+%
+%
+% \section{Usage}
+%
+% This file can be used either as a package by placing its name
+% in the argument of
+% |\usepackage|, or by generating from it a |.fd| file which then
+% replaces the normally used |.fd| file |OMXcmex.fd|.
+%
+% For the second solution you should prepare a small \dst{} command
+% file containing the following statements:
+% \begin{quote}
+% |\def\batchfile{|\meta{name-of-your-command-file}|}| \\
+% |\input docstrip.tex| \\
+% |\generateFile{OMXcmex.fd}{t}{\from{exscale.dtx}{fd}}|
+% \end{quote}
+% and then run this file through \LaTeX.
+% This would mean however, that your documents may look different if
+% they are printed on another installation whereas when using the
+% package file they would come out the same on both sites.
+%
+% \StopEventually{}
+%
+%
+% \section{Implementation}
+%
+%
+% In case this should produce a font definition file we write
+% a message to the transcript file only.
+% The explicit spaces are necessary in an
+% |.fd| file and the |\string| guards against situations where |`|,
+% |<| or |>| is active.
+% \changes{v2.1f}{1995/11/27}{Use \cs{ProvidesFile}}
+% \begin{macrocode}
+%\ProvidesFile{OMXcmex.fd}[]% moved to top of the file
+% \end{macrocode}
+%
+% We now define to which external fonts the font/shape Computer Modern
+% Extension Medium Normal. For the sizes 7--10pt we use fonts that are
+% designed for the corresponding size and for the higher sizes we use
+% scaled versions of the 10pt font since for these sizes no designed
+% fonts are easily available.
+% \begin{macrocode}
+%<*fd|package>
+\DeclareFontShape{OMX}{cmex}{m}{n}{%
+% \end{macrocode}
+% According to Michael Downes `cmex5' and `cmex6' are not
+% distributed currently. Therefore we use `cmex7' in those size but
+% we omit a warning.
+% \begin{macrocode}
+ <-8>sfixed * cmex7
+ <8> cmex8
+ <9> cmex9
+ <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>cmex10
+ }{}
+%</fd|package>
+% \end{macrocode}
+%
+% We also redeclare the symbol font for large symbols. This is
+% already done when the base format also uses CM math fonts, but it
+% doesn't hurt either.
+% \begin{macrocode}
+%<*package>
+\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
+% \end{macrocode}
+%
+% Finally we redefine the primitive commands |\big|, |\Big|, |\bigg|
+% and |\Bigg| to change size with main size changes. To this end we
+% need a new dimen register |\big@size|.
+% \begin{macrocode}
+\newdimen\big@size
+% \end{macrocode}
+% This dimen is set with every size change to $1.2$ times the height
+% of a left parenthesis.
+% \changes{v2.1e}{1994/11/06}{Renamed \cs{every@size} to
+% \cs{every@math@size}}
+% \changes{v2.1e}{1994/11/06}{Update \cs{big@size} globally}
+% \changes{v2.1h}{2001/10/29}{Use box 0 within group to avoid changing this
+% scratch register}
+% \begin{macrocode}
+\addto@hook\every@math@size{%
+ \begingroup
+ \setbox\z@\vbox{\hbox{$($}\kern\z@}%
+ \global\big@size 1.2\ht\z@
+ \endgroup}
+% \end{macrocode}
+% Now we can define the macros. Note: |\n@space| sets the internal
+% variables |\nulldelimiterspace| and |\mathsurround| to zero length.
+%
+% Older kernels (e.g in roll back didn't have LR-mode with the
+% these commands) so we test for the support comment. This only works
+% if the rollback request is before loading this package but that is
+% where it should be.
+% \changes{v2.1i}{2018/09/24}{Start LR-mode if necessary (git/49)}
+% \begin{macrocode}
+\ifx\leavevmode@ifvmode\@undefined
+\def\bBigg@#1#2{%
+ {\hbox{$\left#2\vcenter to#1\big@size{}\right.\n@space$}}}
+\else
+\def\bBigg@#1#2{\leavevmode@ifvmode
+ {\hbox{$\left#2\vcenter to#1\big@size{}\right.\n@space$}}}
+\fi
+\def\big{\bBigg@\@ne}
+\def\Big{\bBigg@{1.5}}
+\def\bigg{\bBigg@\tw@}
+\def\Bigg{\bBigg@{2.5}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/exscale.ins b/macros/latex-dev/base/exscale.ins
new file mode 100644
index 0000000000..4e4a36996d
--- /dev/null
+++ b/macros/latex-dev/base/exscale.ins
@@ -0,0 +1,103 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{exscale.sty}{t}{%
+ \from{exscale.dtx}{package}}
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space exscale.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX2e.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/exscale.pdf b/macros/latex-dev/base/exscale.pdf
new file mode 100644
index 0000000000..d2f4ce540c
--- /dev/null
+++ b/macros/latex-dev/base/exscale.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fix-cm.dtx b/macros/latex-dev/base/fix-cm.dtx
new file mode 100644
index 0000000000..b4311efa3c
--- /dev/null
+++ b/macros/latex-dev/base/fix-cm.dtx
@@ -0,0 +1,829 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%
+%<*dtx>
+ \ProvidesFile{fix-cm.dtx}
+%</dtx>
+%<fix-cm>\NeedsTeXFormat{LaTeX2e}
+%<fix-cm>\ProvidesPackage{fix-cm}
+%<driver>\ProvidesFile{fix-cm.drv}
+% \fi
+% \ProvidesFile{fix-cm.dtx}
+ [2015/01/14 v1.1t fixes to LaTeX]
+%
+% \iffalse
+%<*driver>
+ \documentclass{ltxdoc}
+ \newcommand\Lopt[1]{\textsf{#1}}
+ \let\Lpack\Lopt
+ \providecommand{\file}[1]{\texttt{#1}}
+ \providecommand{\MF}{\textsf{Metafont}}
+ \providecommand{\danger}{\marginpar[\hfill\protect\Huge!!]{\protect\Huge!!\hfill}}
+ \begin{document}
+ \DocInput{fix-cm.dtx}
+ \end{document}
+%</driver>
+% \fi
+%
+%
+%
+%
+%
+% \let\package\textsf
+%
+%
+% \GetFileInfo{fix-cm.dtx}
+%
+% \title{The \Lpack{fix-cm} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{Frank Mittelbach, David Carlisle, Chris Rowley, Walter
+% Schmidt\thanks{Walter wrote \Lpack{fix-cm}}}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \begin{abstract}
+%\Lpack{fix-cm} improves the definitions of the Computer Modern
+% font families.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \newpage
+%
+% \section{Introduction}
+%
+%
+% \begin{sloppypar}
+% To use the \Lpack{fix-cm} package,
+% load \danger it \emph{before} \cmd{\documentclass},
+% and use the command \cmd{\RequirePackage} to do so, rather than the
+% normal \cmd{\usepackage}:
+% \end{sloppypar}
+% \begin{verse}
+% |\RequirePackage{fix-cm}|\\
+% |\documentclass| \dots
+% \end{verse}
+%
+%
+% \section{Using EC fonts (T1 encoding) makes my documents look
+% different}
+%
+% No I'm not trying to collect any cites from the news group
+% discussion on this topic. In a nutshell, if one adds
+%\begin{verbatim}
+%\usepackage[T1]{fontenc}
+%\end{verbatim}
+% to a document that uses the Computer Modern typefaces,
+% then not only the T1 encoding is used but the fonts
+% used in the document look noticeably different. This is due to the fact
+% that the EC fonts have more font series designs, e.g.\ a 14.4\,pt bold
+% etc and those get used in the standard \texttt{.fd} files, while
+% with Computer Modern (in OT1 encoding) such sizes were scaled
+% versions of smaller sizes---with a noticeable different look and
+% feel.
+%
+% So we provide a package \Lpack{fix-cm} to ensure that comparable
+% definitions are used. In addition to that, the package
+% \Lpack{fix-cm} also enables continuous scaling of the CM fonts.
+% This package was written by Walter Schmidt.
+%
+%%
+%^^A The documentation in this section was prepared by Walter Schmidt.
+%
+%
+%
+% \subsection{What \Lpack{fix-cm} does}
+%
+
+% Loading the package \Lpack{fix-cm} changes the font definitions of the
+% Computer Modern fonts, in order to achieve the following effects:
+% \begin{itemize}
+% \item
+% The appearance of the T1 and TS1 encoded CM fonts (aka `EC') is
+% made as similar as possible to the traditional (OT1 encoded) ones.
+% Particularly, a number of broken or ugly design sizes are no
+% longer used, the look of the bold sans serif typeface at large
+% sizes is considerably improved, and mismatches between the text
+% fonts and the corresponding math fonts are avoided. As a side
+% effect, PostScript and PDF documents may become smaller, because
+% fewer fonts need to be embedded.
+% \item
+% The Computer Modern fonts are made available with arbitrary sizes.
+% \item
+% Only those design sizes of the fonts will be used, that are
+% normally available in Type1 format, too. You need not load the
+% extra package \Lpack{cmmib57} for this purpose.
+% \end{itemize}
+% The package acts on the following font families:
+% \begin{itemize}
+% \item
+% The text font families \file{cmr}, \file{cmss}, \file{cmtt} and
+% \file{cmvtt} with OT1, T1 and TS1 encoding.
+% \item
+% The default math fonts used by \LaTeX, i.e., the font families
+% \file{cmm} with encoding OML and \file{cms} with encoding OMS.
+% \item
+% The symbols used by the package \Lpack{latexsym}, i.e., the font
+% family \file{lasy}.
+% \end{itemize}
+% Note that the package does \emph{not} act on:
+% \begin{itemize}
+% \item Font families such as CM~Fibonacci, CM~Dunhill etc.,
+% which are provided for experimental purposes or for fun only.
+% \item
+% CM text fonts with character sets other than Latin, e.g.,
+% Cyrillic. Loading of the required font and encoding definitions
+% while the fonts are not actually used, would not be a good idea.
+% This should be addressed by particular packages or by changing the
+% standard FDs of these fonts.
+% \item
+% Extra math fonts such as the AMS symbol fonts. While
+% they match the style of Computer Modern, they are frequently used
+% in conjunction with other font families, too. Thus,
+% \Lpack{fix-cm} is obviously not the right place to make sure that
+% they can be scaled continuously. Ask the maintainers of these
+% fonts to provide this feature, which is badly needed!
+% \item
+% The math extension font \file{cmex}. Whether or not this font
+% should be scaled is a question of its own, and there are other
+% packages (\Lpack{exscale}, \Lpack{amsmath}, \Lpack{amsfonts}) to
+% take care of it.
+% \end{itemize}
+%
+% \subsection{How to load the package}
+% \begin{sloppypar}
+% The package should be loaded \danger \emph{before} \cmd{\documentclass},
+% using the command |\RequirePackage{fix-cm}|, rather than the
+% normal \cmd{\usepackage}.
+% Rationale:
+% If the package is loaded in the preamble, a preceding package or
+% even the code of the document class may have used any of the CM
+% fonts already. However, the definitions of those fonts, that are
+% already in use, cannot be changed any more.
+% \end{sloppypar}
+%
+% \subsection{Usage notes}
+% In contrast to what you may expect, \Lpack{fix-cm} does \emph{not}
+% ensure that line and page breaks stay the same, when you switch an
+% existing document from OT1 to T1 encoding. The package does not
+% turn off all of the additional design sizes in the EC fonts
+% collection: Those, that contribute considerably to the typographical
+% quality and do not conflict with the math fonts,
+% are---indeed---used.
+%
+% Be careful when using arbitrary, non-standard font sizes with
+% applications that need bitmap fonts: You may end up \danger with
+% lots of possibly huge \file{.pk} files. Also, \MF{} chokes
+% sometimes on extremely small or large sizes, because of arithmetic
+% problems.
+%
+% \Lpack{fix-cm} supersedes the experimental packages \Lpack{cmsd} and
+% \Lpack{fix-ec}, which are no longer distributed.
+%
+% The packages \Lpack{type1cm} and \Lpack{type1ec} must not be loaded
+% additionally; they enable only continuous scaling.
+%
+%
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \subsection{Preliminaries}
+% The \LaTeX{} kernel does not declare the font encoding TS1.
+% However, we are going to set up font definitions for this encoding,
+% so we have to declare it now.
+% \begin{macrocode}
+%<*fix-cm>
+\input{ts1enc.def}
+% \end{macrocode}
+%
+% In case the package is loaded in the preamble, any of the CM fonts may
+% have been used already and cannot be redefined. Yet we try to
+% intercept at least the problem that is most likely to occur, i.e.,
+% a hidden \cmd{\normalfont}. Most of the standard definitions
+% are ok, but those for T1 encoding and 10.95\,pt need to be removed:
+% \begin{macrocode}
+\expandafter \let \csname T1/cmr/m/n/10.95\endcsname \relax
+\expandafter \let \csname T1/cmss/m/n/10.95\endcsname \relax
+\expandafter \let \csname T1/cmtt/m/n/10.95\endcsname \relax
+\expandafter \let \csname T1/cmvtt/m/n/10.95\endcsname \relax
+% \end{macrocode}
+%
+% \Lpack{fix-cm} may still fail, if the EC fonts are preloaded in the
+% \LaTeX{} format file. This situation is, however, very unlikely and could occur
+% only with a customized format.
+%
+% The remainder of the package is enclosed in a group, where the catcodes
+% are guaranteed to be appropriate for the processing of font definitions.
+% \begin{macrocode}
+\begingroup
+\nfss@catcodes
+% \end{macrocode}
+%
+% \subsection{T1 encoding}
+%
+% \paragraph{CM Roman}
+% \begin{macrocode}
+\DeclareFontFamily{T1}{cmr}{}
+\DeclareFontShape{T1}{cmr}{m}{n}{
+ <-6> ecrm0500
+ <6-7> ecrm0600
+ <7-8> ecrm0700
+ <8-9> ecrm0800
+ <9-10> ecrm0900
+ <10-12> ecrm1000
+ <12-17> ecrm1200
+ <17-> ecrm1728
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{sl}{
+ <-6> ecsl0500
+ <6-7> ecsl0600
+ <7-8> ecsl0700
+ <8-9> ecsl0800
+ <9-10> ecsl0900
+ <10-12> ecsl1000
+ <12-17> ecsl1200
+ <17-> ecsl1728
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{it}{
+ <-8> ecti0700
+ <8-9> ecti0800
+ <9-10> ecti0900
+ <10-12> ecti1000
+ <12-17> ecti1200
+ <17-> ecti1728
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{sc}{
+ <-6> eccc0500
+ <6-7> eccc0600
+ <7-8> eccc0700
+ <8-9> eccc0800
+ <9-10> eccc0900
+ <10-12> eccc1000
+ <12-17> eccc1200
+ <17-> eccc1728
+ }{}
+\DeclareFontShape{T1}{cmr}{m}{ui}{
+ <-8> ecui0700
+ <8-9> ecui0800
+ <9-10> ecui0900
+ <10-12> ecui1000
+ <12-17> ecui1200
+ <17-> ecui1728
+ }{}
+\DeclareFontShape{T1}{cmr}{b}{n}{
+ <-6> ecrb0500
+ <6-7> ecrb0600
+ <7-8> ecrb0700
+ <8-9> ecrb0800
+ <9-10> ecrb0900
+ <10-12> ecrb1000
+ <12-17> ecrb1200
+ <17-> ecrb1728
+ }{}
+\DeclareFontShape{T1}{cmr}{bx}{n}{
+ <-6> ecbx0500
+ <6-7> ecbx0600
+ <7-8> ecbx0700
+ <8-9> ecbx0800
+ <9-10> ecbx0900
+ <10-12> ecbx1000
+ <12-> ecbx1200
+ }{}
+\DeclareFontShape{T1}{cmr}{bx}{sl}{
+ <-6> ecbl0500
+ <6-7> ecbl0600
+ <7-8> ecbl0700
+ <8-9> ecbl0800
+ <9-10> ecbl0900
+ <10-12> ecbl1000
+ <12-> ecbl1200
+ }{}
+\DeclareFontShape{T1}{cmr}{bx}{it}{
+ <-8> ecbi0700
+ <8-9> ecbi0800
+ <9-10> ecbi0900
+ <10-12> ecbi1000
+ <12-> ecbi1200
+ }{}
+\DeclareFontShape{T1}{cmr}{bx}{sc}{
+ <-6> ecxc0500
+ <6-7> ecxc0600
+ <7-8> ecxc0700
+ <8-9> ecxc0800
+ <9-10> ecxc0900
+ <10-12> ecxc1000
+ <12-> ecxc1200
+ }{}
+%
+% \end{macrocode}
+%
+% \paragraph{CM Sans}
+% \begin{macrocode}
+\DeclareFontFamily{T1}{cmss}{}
+\DeclareFontShape{T1}{cmss}{m}{n}{
+ <-9> ecss0800
+ <9-10> ecss0900
+ <10-12> ecss1000
+ <12-17> ecss1200
+ <17-> ecss1728
+ }{}
+\DeclareFontShape{T1}{cmss}{m}{sl}{
+ <-9> ecsi0800
+ <9-10> ecsi0900
+ <10-12> ecsi1000
+ <12-17> ecsi1200
+ <17-> ecsi1728
+ }{}
+\DeclareFontShape{T1}{cmss}{m}{it}
+ {<->ssub*cmss/m/sl}{}
+\DeclareFontShape{T1}{cmss}{m}{sc}
+ {<->sub*cmr/m/sc}{}
+\DeclareFontShape{T1}{cmss}{sbc}{n}{
+ <-> ecssdc10
+ }{}
+\DeclareFontShape{T1}{cmss}{bx}{n}{
+ <-10> ecsx0900
+ <10-> ecsx1000
+ }{}
+\DeclareFontShape{T1}{cmss}{bx}{sl}{
+ <-10> ecso0900
+ <10-> ecso1000
+ }{}
+\DeclareFontShape{T1}{cmss}{bx}{it}
+ {<->ssub*cmss/bx/sl}{}
+% \end{macrocode}
+% The following substitutions are not provided in the default
+% \file{.fd} files. I have included them, so that you can
+% easily use the EC fonts with the default bold series being
+% \file{b} rather than \file{bx}.
+% \begin{macrocode}
+\DeclareFontShape{T1}{cmss}{b}{n}
+ {<->ssub*cmss/bx/n}{}
+\DeclareFontShape{T1}{cmss}{b}{sl}
+ {<->ssub*cmss/bx/sl}{}
+\DeclareFontShape{T1}{cmss}{b}{it}
+ {<->ssub*cmss/bx/sl}{}
+% \end{macrocode}
+%
+% \paragraph{CM Typewriter}
+% \begin{macrocode}
+\DeclareFontFamily{T1}{cmtt}{\hyphenchar \font\m@ne}
+\DeclareFontShape{T1}{cmtt}{m}{n}{
+ <-9> ectt0800
+ <9-10> ectt0900
+ <10-12> ectt1000
+ <12-17> ectt1200
+ <17-> ectt1728
+ }{}
+\DeclareFontShape{T1}{cmtt}{m}{it}{
+ <-9> ecit0800
+ <9-10> ecit0900
+ <10-12> ecit1000
+ <12-17> ecit1200
+ <17-> ecit1728
+ }{}
+\DeclareFontShape{T1}{cmtt}{m}{sl}{
+ <-9> ecst0800
+ <9-10> ecst0900
+ <10-12> ecst1000
+ <12-17> ecst1200
+ <17-> ecst1728
+ }{}
+\DeclareFontShape{T1}{cmtt}{m}{sc}{
+ <-9> ectc0800
+ <9-10> ectc0900
+ <10-12> ectc1000
+ <12-17> ectc1200
+ <17-> ectc1728
+ }{}
+\DeclareFontShape{T1}{cmtt}{bx}{n}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{T1}{cmtt}{bx}{it}
+ {<->sub * cmtt/m/it}{}
+\DeclareFontShape{T1}{cmtt}{bx}{sl}
+ {<->sub * cmtt/m/sl}{}
+% \end{macrocode}
+% Substitutions not provided in the default \file{.fd} files:
+% \begin{macrocode}
+\DeclareFontShape{T1}{cmtt}{b}{n}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{T1}{cmtt}{b}{it}
+ {<->sub * cmtt/m/it}{}
+\DeclareFontShape{T1}{cmtt}{b}{sl}
+ {<->sub * cmtt/m/sl}{}
+% \end{macrocode}
+%
+% \paragraph{CM Typewiter (var.)}
+% \begin{macrocode}
+\DeclareFontFamily{T1}{cmvtt}{}
+\DeclareFontShape{T1}{cmvtt}{m}{n}{
+ <-9> ecvt0800
+ <9-10> ecvt0900
+ <10-12> ecvt1000
+ <12-17> ecvt1200
+ <17-> ecvt1728
+ }{}
+\DeclareFontShape{T1}{cmvtt}{m}{it}{
+ <-9> ecvi0800
+ <9-10> ecvi0900
+ <10-12> ecvi1000
+ <12-17> ecvi1200
+ <17-> ecvi1728
+ }{}
+% \end{macrocode}
+%
+% \subsection{TS1 encoding}
+%
+% \paragraph{CM Roman}
+% \begin{macrocode}
+\DeclareFontFamily{TS1}{cmr}{\hyphenchar\font\m@ne}
+\DeclareFontShape{TS1}{cmr}{m}{n}{
+ <-6> tcrm0500
+ <6-7> tcrm0600
+ <7-8> tcrm0700
+ <8-9> tcrm0800
+ <9-10> tcrm0900
+ <10-12> tcrm1000
+ <12-17> tcrm1200
+ <17-> tcrm1728
+ }{}
+\DeclareFontShape{TS1}{cmr}{m}{sl}{
+ <-6> tcsl0500
+ <6-7> tcsl0600
+ <7-8> tcsl0700
+ <8-9> tcsl0800
+ <9-10> tcsl0900
+ <10-12> tcsl1000
+ <12-17> tcsl1200
+ <17-> tcsl1728
+ }{}
+\DeclareFontShape{TS1}{cmr}{m}{it}{
+ <-8> tcti0700
+ <8-9> tcti0800
+ <9-10> tcti0900
+ <10-12> tcti1000
+ <12-17> tcti1200
+ <17-> tcti1728
+ }{}
+\DeclareFontShape{TS1}{cmr}{m}{ui}{
+ <-8> tcui0700
+ <8-9> tcui0800
+ <9-10> tcui0900
+ <10-12> tcui1000
+ <12-17> tcui1200
+ <17-> tcui1728
+ }{}
+\DeclareFontShape{TS1}{cmr}{b}{n}{
+ <-6> tcrb0500
+ <6-7> tcrb0600
+ <7-8> tcrb0700
+ <8-9> tcrb0800
+ <9-10> tcrb0900
+ <10-12> tcrb1000
+ <12-17> tcrb1200
+ <17-> tcrb1728
+ }{}
+\DeclareFontShape{TS1}{cmr}{bx}{n}{
+ <-6> tcbx0500
+ <6-7> tcbx0600
+ <7-8> tcbx0700
+ <8-9> tcbx0800
+ <9-10> tcbx0900
+ <10-12> tcbx1000
+ <12-> tcbx1200
+ }{}
+\DeclareFontShape{TS1}{cmr}{bx}{sl}{
+ <-6> tcbl0500
+ <6-7> tcbl0600
+ <7-8> tcbl0700
+ <8-9> tcbl0800
+ <9-10> tcbl0900
+ <10-12> tcbl1000
+ <12-> tcbl1200
+ }{}
+\DeclareFontShape{TS1}{cmr}{bx}{it}{
+ <-8> tcbi0700
+ <8-9> tcbi0800
+ <9-10> tcbi0900
+ <10-12> tcbi1000
+ <12-> tcbi1200
+ }{}
+% \end{macrocode}
+%
+% \paragraph{CM Sans}
+% \begin{macrocode}
+\DeclareFontFamily{TS1}{cmss}{\hyphenchar\font\m@ne}
+\DeclareFontShape{TS1}{cmss}{m}{n}{
+ <-9> tcss0800
+ <9-10> tcss0900
+ <10-12> tcss1000
+ <12-17> tcss1200
+ <17-> tcss1728
+ }{}
+\DeclareFontShape{TS1}{cmss}{m}{it}
+ {<->ssub*cmss/m/sl}{}
+\DeclareFontShape{TS1}{cmss}{m}{sl}{
+ <-9> tcsi0800
+ <9-10> tcsi0900
+ <10-12> tcsi1000
+ <12-17> tcsi1200
+ <17-> tcsi1728
+ }{}
+\DeclareFontShape{TS1}{cmss}{sbc}{n}{
+ <-> tcssdc10
+ }{}
+\DeclareFontShape{TS1}{cmss}{bx}{n}{
+ <-10> tcsx0900
+ <10-> tcsx1000
+ }{}
+\DeclareFontShape{TS1}{cmss}{bx}{sl}{
+ <-10> tcso0900
+ <10-> tcso1000
+ }{}
+\DeclareFontShape{TS1}{cmss}{bx}{it}
+ {<->ssub*cmss/bx/sl}{}
+% \end{macrocode}
+% Substitutions not provided in the default \file{.fd} files:
+% \begin{macrocode}
+\DeclareFontShape{TS1}{cmss}{b}{n}
+ {<->ssub*cmss/bx/n}{}
+\DeclareFontShape{TS1}{cmss}{b}{sl}
+ {<->ssub*cmss/bx/sl}{}
+\DeclareFontShape{TS1}{cmss}{b}{it}
+ {<->ssub*cmss/bx/sl}{}
+% \end{macrocode}
+%
+% \paragraph{CM Typewriter}
+% \begin{macrocode}
+\DeclareFontFamily{TS1}{cmtt}{\hyphenchar \font\m@ne}
+\DeclareFontShape{TS1}{cmtt}{m}{n}{
+ <-9> tctt0800
+ <9-10> tctt0900
+ <10-12> tctt1000
+ <12-17> tctt1200
+ <17-> tctt1728
+ }{}
+\DeclareFontShape{TS1}{cmtt}{m}{it}{
+ <-9> tcit0800
+ <9-10> tcit0900
+ <10-12> tcit1000
+ <12-17> tcit1200
+ <17-> tcit1728
+ }{}
+\DeclareFontShape{TS1}{cmtt}{m}{sl}{
+ <-9> tcst0800
+ <9-10> tcst0900
+ <10-12> tcst1000
+ <12-17> tcst1200
+ <17-> tcst1728
+ }{}
+\DeclareFontShape{TS1}{cmtt}{bx}{n}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{TS1}{cmtt}{bx}{it}
+ {<->sub * cmtt/m/it}{}
+\DeclareFontShape{TS1}{cmtt}{bx}{sl}
+ {<->sub * cmtt/m/sl}{}
+% \end{macrocode}
+% Substitutions not provided in the default \file{.fd} files:
+% \begin{macrocode}
+\DeclareFontShape{TS1}{cmtt}{b}{n}
+ {<->sub * cmtt/m/n}{}
+\DeclareFontShape{TS1}{cmtt}{b}{it}
+ {<->sub * cmtt/m/it}{}
+\DeclareFontShape{TS1}{cmtt}{b}{sl}
+ {<->sub * cmtt/m/sl}{}
+% \end{macrocode}
+%
+% \paragraph{CM Typewriter (var.)}
+% \begin{macrocode}
+\DeclareFontFamily{TS1}{cmvtt}{}
+\DeclareFontShape{TS1}{cmvtt}{m}{n}{
+ <-9> tcvt0800
+ <9-10> tcvt0900
+ <10-12> tcvt1000
+ <12-17> tcvt1200
+ <17-> tcvi1728
+ }{}
+\DeclareFontShape{TS1}{cmvtt}{m}{it}{
+ <-9> tcvi0800
+ <9-10> tcvi0900
+ <10-12> tcvi1000
+ <12-17> tcvi1200
+ <17-> tcvi1728
+ }{}
+% \end{macrocode}
+%
+% \subsection{OT1 encoding}
+%
+% \paragraph{CM Roman}
+% \begin{macrocode}
+\DeclareFontFamily{OT1}{cmr}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmr}{m}{n}{
+ <-6> cmr5
+ <6-7> cmr6
+ <7-8> cmr7
+ <8-9> cmr8
+ <9-10> cmr9
+ <10-12> cmr10
+ <12-17> cmr12
+ <17-> cmr17
+ }{}
+\DeclareFontShape{OT1}{cmr}{m}{sl}{
+ <-9> cmsl8
+ <9-10> cmsl9
+ <10-12> cmsl10
+ <12-> cmsl12
+ }{}
+\DeclareFontShape{OT1}{cmr}{m}{it}{
+ <-8> cmti7
+ <8-9> cmti8
+ <9-10> cmti9
+ <10-12> cmti10
+ <12-> cmti12
+ }{}
+\DeclareFontShape{OT1}{cmr}{m}{sc}{
+ <-> cmcsc10
+ }{}
+\DeclareFontShape{OT1}{cmr}{m}{ui}{
+ <-> cmu10
+ }{}
+\DeclareFontShape{OT1}{cmr}{b}{n}{
+ <-> cmb10
+ }{}
+\DeclareFontShape{OT1}{cmr}{bx}{n}{
+ <-6> cmbx5
+ <6-7> cmbx6
+ <7-8> cmbx7
+ <8-9> cmbx8
+ <9-10> cmbx9
+ <10-12> cmbx10
+ <12-> cmbx12
+ }{}
+\DeclareFontShape{OT1}{cmr}{bx}{sl}{
+ <-> cmbxsl10
+ }{}
+\DeclareFontShape{OT1}{cmr}{bx}{it}{
+ <-> cmbxti10
+ }{}
+\DeclareFontShape{OT1}{cmr}{bx}{ui}
+ {<->sub*cmr/m/ui}{}
+% \end{macrocode}
+%
+% \paragraph{CM Sans}
+% \begin{macrocode}
+\DeclareFontFamily{OT1}{cmss}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmss}{m}{n}{
+ <-9> cmss8
+ <9-10> cmss9
+ <10-12> cmss10
+ <12-17> cmss12
+ <17-> cmss17
+ }{}
+\DeclareFontShape{OT1}{cmss}{m}{it}
+ {<->sub*cmss/m/sl}{}
+\DeclareFontShape{OT1}{cmss}{m}{sl}{
+ <-9> cmssi8
+ <9-10> cmssi9
+ <10-12> cmssi10
+ <12-17> cmssi12
+ <17-> cmssi17
+ }{}
+\DeclareFontShape{OT1}{cmss}{m}{sc}
+ {<->sub*cmr/m/sc}{}
+\DeclareFontShape{OT1}{cmss}{m}{ui}
+ {<->sub*cmr/m/ui}{}
+\DeclareFontShape{OT1}{cmss}{sbc}{n}{
+ <-> cmssdc10
+ }{}
+\DeclareFontShape{OT1}{cmss}{bx}{n}{
+ <-> cmssbx10
+ }{}
+\DeclareFontShape{OT1}{cmss}{bx}{ui}
+ {<->sub*cmr/bx/ui}{}
+% \end{macrocode}
+%
+% \paragraph{CM Typewriter}
+% \begin{macrocode}
+\DeclareFontFamily{OT1}{cmtt}{\hyphenchar \font\m@ne}
+\DeclareFontShape{OT1}{cmtt}{m}{n}{
+ <-9> cmtt8
+ <9-10> cmtt9
+ <10-12> cmtt10
+ <12-> cmtt12
+ }{}
+\DeclareFontShape{OT1}{cmtt}{m}{it}{
+ <-> cmitt10
+ }{}
+\DeclareFontShape{OT1}{cmtt}{m}{sl}{
+ <-> cmsltt10
+ }{}
+\DeclareFontShape{OT1}{cmtt}{m}{sc}{
+ <-> cmtcsc10
+ }{}
+\DeclareFontShape{OT1}{cmtt}{m}{ui}
+ {<->ssub*cmtt/m/it}{}
+\DeclareFontShape{OT1}{cmtt}{bx}{n}
+ {<->ssub*cmtt/m/n}{}
+\DeclareFontShape{OT1}{cmtt}{bx}{it}
+ {<->ssub*cmtt/m/it}{}
+\DeclareFontShape{OT1}{cmtt}{bx}{ui}
+ {<->ssub*cmtt/m/it}{}
+% \end{macrocode}
+%
+% \paragraph{CM Typewriter (var.)}
+% \begin{macrocode}
+\DeclareFontFamily{OT1}{cmvtt}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{cmvtt}{m}{n}{
+ <-> cmvtt10
+ }{}
+\DeclareFontShape{OT1}{cmvtt}{m}{it}{
+ <-> cmvtti10
+ }{}
+% \end{macrocode}
+%
+% \subsection{OML and OMS encoded math fonts}
+% \begin{macrocode}
+\DeclareFontFamily{OML}{cmm}{\skewchar\font127 }
+\DeclareFontShape{OML}{cmm}{m}{it}{
+ <-6> cmmi5
+ <6-7> cmmi6
+ <7-8> cmmi7
+ <8-9> cmmi8
+ <9-10> cmmi9
+ <10-12> cmmi10
+ <12-> cmmi12
+ }{}
+\DeclareFontShape{OML}{cmm}{b}{it}{<-6>cmmib5<6-8>cmmib7<8->cmmib10}{}
+\DeclareFontShape{OML}{cmm}{bx}{it}
+ {<->ssub*cmm/b/it}{}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareFontFamily{OMS}{cmsy}{\skewchar\font48 }
+\DeclareFontShape{OMS}{cmsy}{m}{n}{
+ <-6> cmsy5
+ <6-7> cmsy6
+ <7-8> cmsy7
+ <8-9> cmsy8
+ <9-10> cmsy9
+ <10-> cmsy10
+ }{}
+\DeclareFontShape{OMS}{cmsy}{b}{n}{<-6>cmbsy5<6-8>cmbsy7<8->cmbsy10}{}
+% \end{macrocode}
+%
+% \subsection{\LaTeX{} symbols}
+% \begin{macrocode}
+\DeclareFontFamily{U}{lasy}{}
+\DeclareFontShape{U}{lasy}{m}{n}{
+ <-6> lasy5
+ <6-7> lasy6
+ <7-8> lasy7
+ <8-9> lasy8
+ <9-10> lasy9
+ <10-> lasy10
+ }{}
+\DeclareFontShape{U}{lasy}{b}{n}{
+ <-10> ssub * lasy/m/n
+ <10-> lasyb10
+ }{}
+% \end{macrocode}
+% \begin{macrocode}
+\endgroup
+%</fix-cm>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/fix-cm.ins b/macros/latex-dev/base/fix-cm.ins
new file mode 100644
index 0000000000..56a7923a13
--- /dev/null
+++ b/macros/latex-dev/base/fix-cm.ins
@@ -0,0 +1,88 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+
+\generateFile{fix-cm.sty}{t}{%
+ \from{fix-cm.dtx}{fix-cm}}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/fix-cm.pdf b/macros/latex-dev/base/fix-cm.pdf
new file mode 100644
index 0000000000..6011bf720a
--- /dev/null
+++ b/macros/latex-dev/base/fix-cm.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fontdef.dtx b/macros/latex-dev/base/fontdef.dtx
new file mode 100644
index 0000000000..36a31ef19b
--- /dev/null
+++ b/macros/latex-dev/base/fontdef.dtx
@@ -0,0 +1,1413 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: fontdef.dtx
+%<*dtx>
+ \ProvidesFile{fontdef.dtx}
+%</dtx>
+%<text, >\ProvidesFile{fonttext.ltx}
+%<math, >\ProvidesFile{fontmath.ltx}
+%<+cfgtext>\ProvidesFile{fonttext.cfg}
+%<+cfgmath>\ProvidesFile{fontmath.cfg}
+%<+cfgprel>\ProvidesFile{preload.cfg}
+%<driver, >\ProvidesFile{fontdef.drv}
+% \fi
+% \ProvidesFile{fontdef.dtx}
+%<-latexrelease> [2018/09/24 v3.0b LaTeX Kernel
+% \iftrue (\else
+%<text, >(Text
+%<math, >(Math
+%<+cfgtext>(Uncustomised text
+%<+cfgmath>(Uncustomised math
+%<+cfgprel>(Uncustomised preload
+% \fi
+%<-latexrelease> font setup)]
+%
+%
+%\iffalse This is a META comment
+%
+% File `fontdef.dtx'.
+% Copyright (C) 1989-1999 Frank Mittelbach and Rainer Sch\"opf,
+% All rights reserved.
+%
+%\fi
+%
+% \changes{v2.1a}{1993/12/01}{Update for LaTeX2e}
+% \changes{v2.2a}{1994/10/14}{New coding}
+% \changes{v2.2i}{1994/12/02}{Commented out \cs{ldots}. ASAJ.}
+% \changes{v2.2j}{1995/05/11}{Updates to some plain macros}
+% \changes{v2.2l}{1995/10/03}{\cs{@@sqrt} from patch file for /1701}
+% \changes{v2.2o}{1996/05/17}{\cs{@@sqrt} removed, at last}
+% \changes{v2.2p}{1996/11/20}{lowercase fd and enc.def file names /1044}
+% \changes{v2.2x}{1999/01/05}{Need special protection for character
+% \texttt{\char62} in \cs{changes} entry.}
+%
+% \title{The \texttt{fontdef.dtx} file\thanks
+% {This file has version number \fileversion, dated \filedate}}
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+% \def\dst{{\normalfont\scshape docstrip}}
+% \setcounter{StandardModuleDepth}{1}
+%
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+%
+% This file is used to generate the files \texttt{fonttext.ltx} (text
+% font declarations) and \texttt{fontmath.ltx} (math font
+% declarations), which are used during the format generation. It
+% contains the declaration of the standard text encodings used at the
+% site as well as a minimal subset of font shape groups that NFSS will
+% look at to ensure that the specified encodings are valid.
+%
+% The math part contains the setup for math encodings as well as the
+% default math symbol declarations that belong to the encoding.
+%
+% It is possible to change this setup (by using other fonts, or
+% defaults) without losing the ability to
+% process documents written at other sites. Portability in this sense
+% means that a document will compile without errors. It does not mean,
+% however, that identical output will be produced. For this it is
+% necessary that the distributed setup is used at both installations.
+%
+% \section{Customization}
+%
+% You are not allowed to change this source file! If you want to
+% change the default encodings and/or the font shape groups preloaded
+% you should should create a copy of \texttt{fonttext.ltx}
+% under the name \texttt{fonttext.cfg} and change this copy. If
+% \LaTeXe{} finds a file of this name it will use it, otherwise it
+% uses the standard file which is \texttt{fontdef.ltx}.
+%
+% If you don't plan to use Computer Modern much or at all, it might
+% (!) be a good idea to make your own \texttt{fonttext.cfg}. Look at
+% the comments below (docstrip module `text') to see what should
+% should go into such a file.
+%
+% To change the math font setup use a copy of \texttt{fontmath.ltx}
+% under the name \texttt{fontmath.cfg} and change this copy. However,
+% dealing with this interface is even more a job for an expert than
+% changing the text font setup --- in short, we don't encourage either.
+%
+% \begin{quote}
+% \textbf{Warning:} please note that we don't support customised
+% \LaTeX{} versions. Thus, before sending in a bug report please try
+% your test file with a \LaTeX{} format which is not customised and
+% send in the log from that version (unless the problem goes away).
+% \end{quote}
+%
+% Please note: the following standard encodings have to
+% be defined in all local variants of \texttt{font....cfg} to guarantee
+% that all \LaTeX{} installations behave in the same way.
+% \begin{center}
+% \begin{tabular}{ll}
+% |T1| & Cork \TeX{} text encoding \\
+% |OT1| & old \TeX{} text encoding \\
+% |U| & unknown encoding \\
+% |OML| & old \TeX{} math letters encoding \\
+% |OMS| & old \TeX{} math symbols encoding \\
+% |OMX| & old \TeX{} math extension symbols encoding\\
+% |TU| & Unicode
+% \end{tabular}
+% \end{center}
+% Notice that some of these encodings are `old' in the sense that we
+% hope that they will be superseded soon by encoding standards defined
+% by the \TeX{} user community. Therefore this set of default encodings
+% may change in the future.
+%
+% The first candidate is |OT1| which will soon be replaced by |T1|, the
+% official \TeX{} text encoding.
+%
+% \begin{quote}\textbf{Warning:}
+% If you add additional encodings to this file there is no guarantee
+% any longer that files processable at your installation will also be
+% processable at other installations. Thus, if you make use of
+% such an encoding in your document, e.g.~if you intend to typeset in
+% Cyrillic (|OT2| encoding), you need to specify this encoding in the
+% preamble of your document prior to sending it to another
+% installation. Once the encoding is specified in that place in your
+% document, the document is processable at all \LaTeX{} installations
+% (provided they have suitable fonts installed).
+%
+% For this reason we suggest that you define a short package file that
+% sets up an additional encoding used at your site (rather than
+% putting the encoding into this file) since this package can easily
+% be shipped with your document.
+% \end{quote}
+%
+%
+% \StopEventually{}
+%
+% \section{The \texttt{docstrip} modules}
+%
+% The following modules are used to direct \texttt{docstrip} in
+% generating external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% text & produce the file \texttt{fonttext.ltx}\\
+% math & produce the file \texttt{fontmath.ltx}\\
+% cfgtext & produce a dummy \texttt{fonttext.cfg} file\\
+% cfgmath & produce a dummy \texttt{fontmath.cfg} file\\
+% \end{tabular}
+% \end{center}
+% A typical \texttt{docstrip} command file would then have entries like:
+% \begin{verbatim}
+%\generateFile{fonttext.ltx}{t}{\from{fontdef.dtx}{text}}
+%\end{verbatim}
+%
+%
+% \section{A driver for this document}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e.~the file that will produce the documentation you are
+% currently reading. It will be extracted from this file by the
+% \dst{} program.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{fontdef.dtx}
+\begin{document}
+ \DocInput{fontdef.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+%
+%
+% \section{The \texttt{fonttext.ltx} file}
+%
+% The identification is done earlier on with a |\ProvidesFile|
+% declaration.
+% \begin{macrocode}
+%<*text>
+\typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
+% \end{macrocode}
+%
+% \subsection{Encodings}
+%
+% This file declares the standard encodings for text and math
+% fonts. All others should be declared in packages or in the
+% documents directly.
+%
+% For every text encoding there are normally a number of encoding
+% specific commands, e.g.~accents, special characters, etc. (The
+% definition for such a command might have to change when the
+% encoding is changed, because the character is in a different
+% position, or not available at all, or the accent is produced in a
+% different way.) This is handled by a general mechanism which is
+% described in \texttt{ltoutenc.dtx}.
+%
+% By convention, text encoding specific declarations, including the
+% declaration |\DeclareFontEncoding|, are kept in separate file of
+% the form \meta{enc}\texttt{enc.def}, e.g.~\texttt{ot1enc.def}. This
+% allows other applications to make use of the declarations as
+% well.
+%
+% Similar to the default encoding, the loading of the encoding
+% files for the two major text encodings shouldn't be changed.
+% In particular, the \texttt{inputenc} package depends on this.
+% \changes{v2.2s}{1997/12/20}{Added documentation}
+%
+% \changes{v2.1d}{1994/01/05}{Removed nf prefix from file names.}
+% \changes{v2.1f}{1994/05/14}{Removed .def files.}
+% \changes{v2.1g}{1994/05/16}{Removed \cs{DeclareFontEncoding} for ot1
+% and t1 and input .def files instead}
+% \changes{v2.2c}{1994/10/25}{Added OMSenc.def}
+% \changes{v2.2d}{1994/10/31}{Added OMLenc.def ...}
+% \changes{v2.2e}{1994/10/31}{... and moved further down}
+% \changes{v2.2f}{1994/11/07}{(DPC) Updated to use \cs{ProvidesFile}}
+% \changes{v2.2h}{1994/11/16}{(DPC) Removed \cmd\{ and \cmd\}}
+% \changes{v3.0a}{2016/12/03}{(DPC) Default to TU encoding for Unicode TeX engines}
+% \begin{macrocode}
+\input {omlenc.def}
+\input {t1enc.def}
+\input {ot1enc.def} % <- should come after T1 for speed
+\input {omsenc.def}
+% \end{macrocode}
+% \changes{v3.0a}{2016/12/03}{(DPC) Default to TU encoding for Unicode TeX engines}
+% \begin{macrocode}
+\ifx\Umathchar\@undefined
+% \end{macrocode}
+%
+% We then set set the default text font encoding. This will
+% hopefully change some day to |T1|. This setting should \emph{not}
+% be changed to produce a portable format.
+% \begin{macrocode}
+\fontencoding{OT1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% Unicode.
+% \begin{macrocode}
+\input {tuenc.def}
+\fontencoding{TU}
+\DeclareFontSubstitution{TU}{lmr}{m}{n}
+\begingroup
+\nfss@catcodes
+\input {tulmr.fd}
+\input {tulmss.fd}
+\input {tulmtt.fd}
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontSubstitution{TU}{lmr}{m}{n}
+% \end{macrocode}
+% End of Unicode branch.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% If different encodings for text fonts are in use one could put
+% the common setup into |\DeclareFontEncodingDefaults|. There is
+% now a better mechanism so using this interface is discouraged!
+% \begin{macrocode}
+\DeclareFontEncodingDefaults{}{}
+% \end{macrocode}
+%
+% Then we define the default substitution for every encoding.
+% This release of \LaTeXe{} assumes that the ec fonts are
+% available. It is possible to change this to point to some other
+% font family (e.g., Times with the appropriate encoding if it is
+% available) without making documents non-portable. However, in
+% such a case documents will produce different page breaks at other
+% sites. The substitution defaults can all be changed without
+% losing portability as long as there are font shape definitions
+% for the selected substitutions.
+% \begin{macrocode}
+\DeclareFontSubstitution{T1}{cmr}{m}{n}
+\DeclareFontSubstitution{OT1}{cmr}{m}{n}
+% \end{macrocode}
+%
+% For every encoding declaration, \LaTeXe{} will try to verify that
+% the given substitution information makes sense, i.e.~that it is
+% impossible to go into an endless loop if font substitution
+% happens. This is done at the moment the |\begin{document}| is
+% encountered. \LaTeXe{} will then check that for every encoding the
+% substitution defaults form a valid font shape group, which means
+% that it will check if there is a |\DeclareFontShape| declaration
+% for this combination. We will therefore load the corresponding
+% |.fd| files now. If we don't do this they would be loaded at
+% verification time (i.e.~at |\begin{document}| which would delay
+% processing unnecessarily.
+%
+% \begin{quote}
+% \textbf{Warning:} Please note that this means that you have to
+% regenerate the format whenever you change any of these
+% \texttt{.fd} files since \LaTeXe{} will not read \texttt{.fd}
+% files if it already knows about the encoding/family
+% combination.
+% \end{quote}
+%
+% \changes{v2.2m}{1995/11/01}{add \cs{nfss@catcodes} for internal/1932}
+% The |\nfss@catcodes| ensures that white space is ignored in any
+% definitions made in the fd files.
+% \begin{macrocode}
+\begingroup
+\nfss@catcodes
+\input {t1cmr.fd}
+\input {ot1cmr.fd}
+\endgroup
+% \end{macrocode}
+%
+% We also load some other font definition files which are normally
+% needed in a document. This is only done for processing speed and
+% you can comment the next two lines out to save some memory. If
+% necessary these files are then loaded when your document is
+% processed. (Loading |.fd| files is a less drastic step compared
+% to preloading fonts because the number of fonts is limited 255 at
+% (nearly) every \TeX{} installation, while the amount of main memory
+% is not a limiting factor at most installations.)
+%
+% \begin{macrocode}
+\begingroup
+\nfss@catcodes
+\input {ot1cmss.fd}
+\input {ot1cmtt.fd}
+\endgroup
+% \end{macrocode}
+%
+% Even with all the precautions it is still possible that NFSS will
+% run into problems, for example, when a |.fd| file contains
+% corrupted data. To guard against such cases NFSS has a very
+% low-level fallback font that is installed with the following line.
+% \begin{macrocode}
+\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
+% \end{macrocode}
+% This means, ``if everything else fails use Computer Modern Roman
+% normal shape at 10pt in the old text encoding''.
+% You can change the font used but the encoding should be the same
+% as the one specified with |\fontencoding| above.
+%
+%
+% \subsection{Defaults}
+%
+% To allow the use of |\rmfamily|, |\sffamily|, etc.\ in documents
+% even if non-standard families are used we provide nine macros
+% which hold the name of the corresponding families, series, and so
+% on. This makes it easy to use other font families (like Times
+% Roman, etc.). One simply has to redefine these defaults.
+%
+% All these hooks have to be defined in this file but you can
+% change their meaning (except for |\encodingdefault|) without
+% making documents non-portable.
+%
+%
+% \begin{macro}{\encodingdefault}
+% \begin{macro}{\rmdefault}
+% \begin{macro}{\sfdefault}
+% \begin{macro}{\ttdefault}
+% The following three definitions set up the meaning for
+% |\rmfamily|, |\sffamily|, and |\ttfamily|.
+% \begin{macrocode}
+\ifx\Umathchar\@undefined
+\newcommand\encodingdefault{OT1}
+\newcommand\rmdefault{cmr}
+\newcommand\sfdefault{cmss}
+\newcommand\ttdefault{cmtt}
+\else
+\newcommand\encodingdefault{TU}
+\newcommand\rmdefault{lmr}
+\fontfamily{\rmdefault}
+\newcommand\sfdefault{lmss}
+\newcommand\ttdefault{lmtt}
+\fi
+%</text>
+%<latexrelease>\IncludeInRelease{2017/01/01}%
+%<latexrelease> {\encodingdefault}{TU encoding default}%
+%<latexrelease>\ifx\Umathchar\@undefined
+%<latexrelease>\renewcommand\encodingdefault{OT1}
+%<latexrelease>\fontencoding{\encodingdefault}
+%<latexrelease>\renewcommand\rmdefault{cmr}
+%<latexrelease>\fontfamily{\rmdefault}
+%<latexrelease>\renewcommand\sfdefault{cmss}
+%<latexrelease>\renewcommand\ttdefault{cmtt}
+%<latexrelease>\else
+%<latexrelease>\renewcommand\encodingdefault{TU}
+%<latexrelease>%done in everyjob\fontencoding{\encodingdefault}
+%<latexrelease>\renewcommand\rmdefault{lmr}
+%<latexrelease>\fontfamily{\rmdefault}
+%<latexrelease>\renewcommand\sfdefault{lmss}
+%<latexrelease>\renewcommand\ttdefault{lmtt}
+%<latexrelease>\fi
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\encodingdefault}{TU encoding default}%
+%<latexrelease>\fontencoding{OT1}
+%<latexrelease>\renewcommand\encodingdefault{OT1}
+%<latexrelease>\fontencoding{\encodingdefault}
+%<latexrelease>\renewcommand\rmdefault{cmr}
+%<latexrelease>\fontfamily{\rmdefault}
+%<latexrelease>\renewcommand\sfdefault{cmss}
+%<latexrelease>\renewcommand\ttdefault{cmtt}
+%<latexrelease>\EndIncludeInRelease
+%<*text>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bfdefault}
+% \begin{macro}{\mddefault}
+% Series changing commands are influenced by the following hooks.
+% \begin{macrocode}
+\newcommand\bfdefault{bx}
+\newcommand\mddefault{m}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\itdefault}
+% \begin{macro}{\sldefault}
+% \begin{macro}{\scdefault}
+% \begin{macro}{\updefault}
+% Shape changing commands use the following hooks.
+% \begin{macrocode}
+\newcommand\itdefault{it}
+\newcommand\sldefault{sl}
+\newcommand\scdefault{sc}
+\newcommand\updefault{n}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\familydefault}
+% \begin{macro}{\seriesdefault}
+% \begin{macro}{\shapedefault}
+% Finally we have the hooks that describe the behaviour of
+% the |\normalfont| command. To stay portable, the definition of
+% |\encodingdefault| should \emph{not} be changed and should match
+% the setting above for |\fontencoding|. All other values can be
+% set according to your taste.
+% \changes{v3.0a}{2016/12/03}{(DPC) Default to TU encoding for Unicode TeX engines}
+% \begin{macrocode}
+\newcommand\familydefault{\rmdefault}
+\newcommand\seriesdefault{\mddefault}
+\newcommand\shapedefault{\updefault}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% This finishes the low-level setup in \texttt{fonttext.ltx}.
+% \begin{macrocode}
+%</text>
+% \end{macrocode}
+%
+%
+%
+%
+% \section{The \texttt{fontmath.ltx} file}
+%
+% The identification is done earlier on with a |\ProvidesFile|
+% declaration.
+% \begin{macrocode}
+%<*math>
+\typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
+% \end{macrocode}
+%
+% \subsection{The font encodings used}
+%
+% \begin{macrocode}
+\DeclareFontEncoding{OML}{}{}
+\DeclareFontEncoding{OMS}{}{}
+\DeclareFontEncoding{OMX}{}{}
+% \end{macrocode}
+% Finally a declaration for |U| encoding which serves for all fonts
+% that do not fit standard encodings. For math this sets up
+% |\noaccents@| providing for AMS-\LaTeX{}. This macro is used
+% therein to handle accented characters if they are not supported
+% by the font. In other words, if fonts with |U| encoding are used
+% in math, all accents (like from |\breve|) are obtained from some
+% other font that has them.
+% \begin{macrocode}
+\DeclareFontEncoding{U}{}{\noaccents@}
+% \end{macrocode}
+% The encodings for math are next:
+% \begin{macrocode}
+\DeclareFontSubstitution{OML}{cmm}{m}{it}
+\DeclareFontSubstitution{OMS}{cmsy}{m}{n}
+\DeclareFontSubstitution{OMX}{cmex}{m}{n}
+\DeclareFontSubstitution{U}{cmr}{m}{n}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+\nfss@catcodes
+\input {omlcmm.fd}
+\input {omscmsy.fd}
+\input {omxcmex.fd}
+\input {ucmr.fd}
+\endgroup
+% \end{macrocode}
+%
+% \subsubsection{Symbolfont and Alphabet declarations}
+%
+% We now define the basic symbol fonts used by \LaTeX{}.
+% These four symbol fonts must be defined by this file.
+%
+% It is possible to make the symbol fonts point to other external
+% fonts without losing the ability to process documents written
+% at other sites, as long as one defines the same symbol font names
+% with the same encodings, e.g.~|operators| with |OT1| etc.
+% If other encodings are used documents become non-portable.
+% Such a change should therefore be done in a package file.
+%
+% \changes{v2.1e}{1994/01/19}{Added missing setting for symbols in
+% bold version.}
+% \begin{macrocode}
+\DeclareSymbolFont{operators} {OT1}{cmr} {m}{n}
+\DeclareSymbolFont{letters} {OML}{cmm} {m}{it}
+\DeclareSymbolFont{symbols} {OMS}{cmsy}{m}{n}
+\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\SetSymbolFont{operators}{bold}{OT1}{cmr} {bx}{n}
+\SetSymbolFont{letters} {bold}{OML}{cmm} {b}{it}
+\SetSymbolFont{symbols} {bold}{OMS}{cmsy}{b}{n}
+% \end{macrocode}
+%
+% Below are the seven math alphabets which are defined by NFSS.
+% Again they must be defined by this file.
+% However, as before you can change the fonts used without losing
+% portability, but you should be careful when changing the encoding
+% since that may make documents come out wrong.
+% \begin{macrocode}
+\DeclareSymbolFontAlphabet{\mathrm} {operators}
+\DeclareSymbolFontAlphabet{\mathnormal}{letters}
+\DeclareSymbolFontAlphabet{\mathcal} {symbols}
+\DeclareMathAlphabet {\mathbf}{OT1}{cmr}{bx}{n}
+\DeclareMathAlphabet {\mathsf}{OT1}{cmss}{m}{n}
+\DeclareMathAlphabet {\mathit}{OT1}{cmr}{m}{it}
+\DeclareMathAlphabet {\mathtt}{OT1}{cmtt}{m}{n}
+% \end{macrocode}
+% Given the currently available fonts we cannot bold-en |\mathbf|
+% and |\mathtt| but in principle one could use `ultra bold' or
+% something. The alphabets defined via |\DeclareSymbolFontAlphabet|
+% will change automatically in a new math version if the
+% corresponding symbol font changes.
+% \begin{macrocode}
+\SetMathAlphabet\mathsf{bold}{OT1}{cmss}{bx}{n}
+\SetMathAlphabet\mathit{bold}{OT1}{cmr}{bx}{it}
+% \end{macrocode}
+%
+%
+% \subsection{Math font sizes}
+% \changes{v2.2f}{1994/11/07}
+% {(DPC) Add \cs{DeclareMathSizes} declarations}
+%
+% The declarations below declare the text, script and scriptscript
+% size to be used for each text font size.
+%
+% All occurrences of sizes longer than a single character are replaced
+% with the macro name that holds them, saving a number of
+% tokens (but losing a bit of speed, so this may not stay this way).
+% \begin{macrocode}
+ \DeclareMathSizes{5}{5}{5}{5}
+ \DeclareMathSizes{6}{6}{5}{5}
+ \DeclareMathSizes{7}{7}{5}{5}
+ \DeclareMathSizes{8}{8}{6}{5}
+ \DeclareMathSizes{9}{9}{6}{5}
+ \DeclareMathSizes{\@xpt}{\@xpt}{7}{5}
+ \DeclareMathSizes{\@xipt}{\@xipt}{8}{6}
+ \DeclareMathSizes{\@xiipt}{\@xiipt}{8}{6}
+ \DeclareMathSizes{\@xivpt}{\@xivpt}{\@xpt}{7}
+ \DeclareMathSizes{\@xviipt}{\@xviipt}{\@xiipt}{\@xpt}
+ \DeclareMathSizes{\@xxpt}{\@xxpt}{\@xivpt}{\@xiipt}
+ \DeclareMathSizes{\@xxvpt}{\@xxvpt}{\@xxpt}{\@xviipt}
+% \end{macrocode}
+%
+% \subsection{The math symbol assignments}
+%
+% We start by setting up math codes for most of the characters
+% typed in directly from the keyboard. Most of them are normally
+% already setup up in the same way by Ini\TeX{}. However, we repeat
+% them here to have a complete setup which can be exchanged with
+% another if desired.
+%
+% \subsubsection{The letters}
+% \begin{macrocode}
+\DeclareMathSymbol{a}{\mathalpha}{letters}{`a}
+\DeclareMathSymbol{b}{\mathalpha}{letters}{`b}
+\DeclareMathSymbol{c}{\mathalpha}{letters}{`c}
+\DeclareMathSymbol{d}{\mathalpha}{letters}{`d}
+\DeclareMathSymbol{e}{\mathalpha}{letters}{`e}
+\DeclareMathSymbol{f}{\mathalpha}{letters}{`f}
+\DeclareMathSymbol{g}{\mathalpha}{letters}{`g}
+\DeclareMathSymbol{h}{\mathalpha}{letters}{`h}
+\DeclareMathSymbol{i}{\mathalpha}{letters}{`i}
+\DeclareMathSymbol{j}{\mathalpha}{letters}{`j}
+\DeclareMathSymbol{k}{\mathalpha}{letters}{`k}
+\DeclareMathSymbol{l}{\mathalpha}{letters}{`l}
+\DeclareMathSymbol{m}{\mathalpha}{letters}{`m}
+\DeclareMathSymbol{n}{\mathalpha}{letters}{`n}
+\DeclareMathSymbol{o}{\mathalpha}{letters}{`o}
+\DeclareMathSymbol{p}{\mathalpha}{letters}{`p}
+\DeclareMathSymbol{q}{\mathalpha}{letters}{`q}
+\DeclareMathSymbol{r}{\mathalpha}{letters}{`r}
+\DeclareMathSymbol{s}{\mathalpha}{letters}{`s}
+\DeclareMathSymbol{t}{\mathalpha}{letters}{`t}
+\DeclareMathSymbol{u}{\mathalpha}{letters}{`u}
+\DeclareMathSymbol{v}{\mathalpha}{letters}{`v}
+\DeclareMathSymbol{w}{\mathalpha}{letters}{`w}
+\DeclareMathSymbol{x}{\mathalpha}{letters}{`x}
+\DeclareMathSymbol{y}{\mathalpha}{letters}{`y}
+\DeclareMathSymbol{z}{\mathalpha}{letters}{`z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{A}{\mathalpha}{letters}{`A}
+\DeclareMathSymbol{B}{\mathalpha}{letters}{`B}
+\DeclareMathSymbol{C}{\mathalpha}{letters}{`C}
+\DeclareMathSymbol{D}{\mathalpha}{letters}{`D}
+\DeclareMathSymbol{E}{\mathalpha}{letters}{`E}
+\DeclareMathSymbol{F}{\mathalpha}{letters}{`F}
+\DeclareMathSymbol{G}{\mathalpha}{letters}{`G}
+\DeclareMathSymbol{H}{\mathalpha}{letters}{`H}
+\DeclareMathSymbol{I}{\mathalpha}{letters}{`I}
+\DeclareMathSymbol{J}{\mathalpha}{letters}{`J}
+\DeclareMathSymbol{K}{\mathalpha}{letters}{`K}
+\DeclareMathSymbol{L}{\mathalpha}{letters}{`L}
+\DeclareMathSymbol{M}{\mathalpha}{letters}{`M}
+\DeclareMathSymbol{N}{\mathalpha}{letters}{`N}
+\DeclareMathSymbol{O}{\mathalpha}{letters}{`O}
+\DeclareMathSymbol{P}{\mathalpha}{letters}{`P}
+\DeclareMathSymbol{Q}{\mathalpha}{letters}{`Q}
+\DeclareMathSymbol{R}{\mathalpha}{letters}{`R}
+\DeclareMathSymbol{S}{\mathalpha}{letters}{`S}
+\DeclareMathSymbol{T}{\mathalpha}{letters}{`T}
+\DeclareMathSymbol{U}{\mathalpha}{letters}{`U}
+\DeclareMathSymbol{V}{\mathalpha}{letters}{`V}
+\DeclareMathSymbol{W}{\mathalpha}{letters}{`W}
+\DeclareMathSymbol{X}{\mathalpha}{letters}{`X}
+\DeclareMathSymbol{Y}{\mathalpha}{letters}{`Y}
+\DeclareMathSymbol{Z}{\mathalpha}{letters}{`Z}
+% \end{macrocode}
+%
+% \subsubsection{The digits}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{0}{\mathalpha}{operators}{`0}
+\DeclareMathSymbol{1}{\mathalpha}{operators}{`1}
+\DeclareMathSymbol{2}{\mathalpha}{operators}{`2}
+\DeclareMathSymbol{3}{\mathalpha}{operators}{`3}
+\DeclareMathSymbol{4}{\mathalpha}{operators}{`4}
+\DeclareMathSymbol{5}{\mathalpha}{operators}{`5}
+\DeclareMathSymbol{6}{\mathalpha}{operators}{`6}
+\DeclareMathSymbol{7}{\mathalpha}{operators}{`7}
+\DeclareMathSymbol{8}{\mathalpha}{operators}{`8}
+\DeclareMathSymbol{9}{\mathalpha}{operators}{`9}
+% \end{macrocode}
+%
+%
+% \subsubsection{Punctuation, brace, etc. keys}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{!}{\mathclose}{operators}{"21}
+\DeclareMathSymbol{*}{\mathbin}{symbols}{"03} % \ast
+\DeclareMathSymbol{+}{\mathbin}{operators}{"2B}
+\DeclareMathSymbol{,}{\mathpunct}{letters}{"3B}
+\DeclareMathSymbol{-}{\mathbin}{symbols}{"00}
+\DeclareMathSymbol{.}{\mathord}{letters}{"3A}
+\DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
+\DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}
+\DeclareMathSymbol{=}{\mathrel}{operators}{"3D}
+\DeclareMathSymbol{?}{\mathclose}{operators}{"3F}
+% \end{macrocode}
+% The following symbols are defined as delimiters below
+% which automatically defines them as math symbols.
+% \begin{macrocode}
+%\DeclareMathSymbol{(}{\mathopen}{operators}{"28}
+%\DeclareMathSymbol{)}{\mathclose}{operators}{"29}
+%\DeclareMathSymbol{/}{\mathord}{letters}{"3D}
+%\DeclareMathSymbol{[}{\mathopen}{operators}{"5B}
+%\DeclareMathSymbol{]}{\mathclose}{operators}{"5D}
+%\DeclareMathSymbol{|}{\mathord}{symbols}{"6A}
+%\DeclareMathSymbol{<}{\mathrel}{letters}{"3C}
+%\DeclareMathSymbol{>}{\mathrel}{letters}{"3E}
+% \end{macrocode}
+%
+% Should all of the following being activated by default? Probably
+% not.
+% \begin{macrocode}
+%\DeclareMathSymbol{`\{}{\mathopen}{symbols}{"66}
+%\DeclareMathSymbol{`\}}{\mathclose}{symbols}{"67}
+%\DeclareMathSymbol{`\\}{\mathord}{symbols}{"6E} % \backslash
+\mathcode`\ ="8000 % \space
+\mathcode`\'="8000 % ^\prime
+\mathcode`\_="8000 % \_
+% \end{macrocode}
+%
+%
+% \subsubsection{Delimitercodes for characters}
+% \changes{v2.2q}{1997/01/08}
+% {Use \cs{DeclareMathDelimiter} to set delimiter codes}
+% \changes{v2.2u}{1998/04/15}
+% {Use new syntax for \cs{DeclareMathDelimiter}}
+% [to be completed]
+%
+% Finally, Ini\TeX{} sets all |\delcode| values to -1, except
+% |\delcode`.=0|
+% \begin{macrocode}
+\DeclareMathDelimiter{(}{\mathopen} {operators}{"28}{largesymbols}{"00}
+\DeclareMathDelimiter{)}{\mathclose}{operators}{"29}{largesymbols}{"01}
+\DeclareMathDelimiter{[}{\mathopen} {operators}{"5B}{largesymbols}{"02}
+\DeclareMathDelimiter{]}{\mathclose}{operators}{"5D}{largesymbols}{"03}
+% \end{macrocode}
+%
+% The next two are considered to be relations when not used in the context
+% of a delimiter! And worse, they do even represent different glyphs when
+% being used as delimiter and not as delimiter. This is a user level syntax
+% inherited from plain \TeX{}. Therefore we explicitly redefine the math
+% symbol definitions for these symbols afterwards.
+% \changes{v2.2v}{1998/04/17}
+% {Reinsert symbol defs for \texttt{<} and \texttt{\char62} chars.}
+% \begin{macrocode}
+\DeclareMathDelimiter{<}{\mathopen}{symbols}{"68}{largesymbols}{"0A}
+\DeclareMathDelimiter{>}{\mathclose}{symbols}{"69}{largesymbols}{"0B}
+\DeclareMathSymbol{<}{\mathrel}{letters}{"3C}
+\DeclareMathSymbol{>}{\mathrel}{letters}{"3E}
+% \end{macrocode}
+% And here is another case where the non-delimiter version produces a
+% glyph different from the delimiter version.
+% \changes{v2.2w}{1998/04/18}
+% {Reinsert symbol def for \texttt{/} char.}
+% \begin{macrocode}
+\DeclareMathDelimiter{/}{\mathord}{operators}{"2F}{largesymbols}{"0E}
+\DeclareMathSymbol{/}{\mathord}{letters}{"3D}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareMathDelimiter{|}{\mathord}{symbols}{"6A}{largesymbols}{"0C}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\expandafter\DeclareMathDelimiter\@backslashchar
+ {\mathord}{symbols}{"6E}{largesymbols}{"0F}
+% \end{macrocode}
+% N.B. |{| and |}| should NOT get delcodes;
+% otherwise parameter grouping fails!
+%
+%
+% \subsection{Symbols accessed via control sequences}
+%
+% \subsubsection{Greek letters}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\alpha}{\mathord}{letters}{"0B}
+\DeclareMathSymbol{\beta}{\mathord}{letters}{"0C}
+\DeclareMathSymbol{\gamma}{\mathord}{letters}{"0D}
+\DeclareMathSymbol{\delta}{\mathord}{letters}{"0E}
+\DeclareMathSymbol{\epsilon}{\mathord}{letters}{"0F}
+\DeclareMathSymbol{\zeta}{\mathord}{letters}{"10}
+\DeclareMathSymbol{\eta}{\mathord}{letters}{"11}
+\DeclareMathSymbol{\theta}{\mathord}{letters}{"12}
+\DeclareMathSymbol{\iota}{\mathord}{letters}{"13}
+\DeclareMathSymbol{\kappa}{\mathord}{letters}{"14}
+\DeclareMathSymbol{\lambda}{\mathord}{letters}{"15}
+\DeclareMathSymbol{\mu}{\mathord}{letters}{"16}
+\DeclareMathSymbol{\nu}{\mathord}{letters}{"17}
+\DeclareMathSymbol{\xi}{\mathord}{letters}{"18}
+\DeclareMathSymbol{\pi}{\mathord}{letters}{"19}
+\DeclareMathSymbol{\rho}{\mathord}{letters}{"1A}
+\DeclareMathSymbol{\sigma}{\mathord}{letters}{"1B}
+\DeclareMathSymbol{\tau}{\mathord}{letters}{"1C}
+\DeclareMathSymbol{\upsilon}{\mathord}{letters}{"1D}
+\DeclareMathSymbol{\phi}{\mathord}{letters}{"1E}
+\DeclareMathSymbol{\chi}{\mathord}{letters}{"1F}
+\DeclareMathSymbol{\psi}{\mathord}{letters}{"20}
+\DeclareMathSymbol{\omega}{\mathord}{letters}{"21}
+\DeclareMathSymbol{\varepsilon}{\mathord}{letters}{"22}
+\DeclareMathSymbol{\vartheta}{\mathord}{letters}{"23}
+\DeclareMathSymbol{\varpi}{\mathord}{letters}{"24}
+\DeclareMathSymbol{\varrho}{\mathord}{letters}{"25}
+\DeclareMathSymbol{\varsigma}{\mathord}{letters}{"26}
+\DeclareMathSymbol{\varphi}{\mathord}{letters}{"27}
+\DeclareMathSymbol{\Gamma}{\mathalpha}{operators}{"00}
+\DeclareMathSymbol{\Delta}{\mathalpha}{operators}{"01}
+\DeclareMathSymbol{\Theta}{\mathalpha}{operators}{"02}
+\DeclareMathSymbol{\Lambda}{\mathalpha}{operators}{"03}
+\DeclareMathSymbol{\Xi}{\mathalpha}{operators}{"04}
+\DeclareMathSymbol{\Pi}{\mathalpha}{operators}{"05}
+\DeclareMathSymbol{\Sigma}{\mathalpha}{operators}{"06}
+\DeclareMathSymbol{\Upsilon}{\mathalpha}{operators}{"07}
+\DeclareMathSymbol{\Phi}{\mathalpha}{operators}{"08}
+\DeclareMathSymbol{\Psi}{\mathalpha}{operators}{"09}
+\DeclareMathSymbol{\Omega}{\mathalpha}{operators}{"0A}
+% \end{macrocode}
+%
+%
+% \subsubsection{Ordinary symbols}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\aleph}{\mathord}{symbols}{"40}
+\def\hbar{{\mathchar'26\mkern-9muh}}
+\DeclareMathSymbol{\imath}{\mathord}{letters}{"7B}
+\DeclareMathSymbol{\jmath}{\mathord}{letters}{"7C}
+\DeclareMathSymbol{\ell}{\mathord}{letters}{"60}
+\DeclareMathSymbol{\wp}{\mathord}{letters}{"7D}
+\DeclareMathSymbol{\Re}{\mathord}{symbols}{"3C}
+\DeclareMathSymbol{\Im}{\mathord}{symbols}{"3D}
+\DeclareMathSymbol{\partial}{\mathord}{letters}{"40}
+\DeclareMathSymbol{\infty}{\mathord}{symbols}{"31}
+\DeclareMathSymbol{\prime}{\mathord}{symbols}{"30}
+\DeclareMathSymbol{\emptyset}{\mathord}{symbols}{"3B}
+\DeclareMathSymbol{\nabla}{\mathord}{symbols}{"72}
+\def\surd{{\mathchar"1270}}
+\DeclareMathSymbol{\top}{\mathord}{symbols}{"3E}
+\DeclareMathSymbol{\bot}{\mathord}{symbols}{"3F}
+\def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
+ \not\mathrel{\mkern14mu}\crcr
+ \noalign{\nointerlineskip}
+ \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr}}}}
+\DeclareMathSymbol{\triangle}{\mathord}{symbols}{"34}
+\DeclareMathSymbol{\forall}{\mathord}{symbols}{"38}
+\DeclareMathSymbol{\exists}{\mathord}{symbols}{"39}
+\DeclareMathSymbol{\neg}{\mathord}{symbols}{"3A}
+ \let\lnot=\neg
+\DeclareMathSymbol{\flat}{\mathord}{letters}{"5B}
+\DeclareMathSymbol{\natural}{\mathord}{letters}{"5C}
+\DeclareMathSymbol{\sharp}{\mathord}{letters}{"5D}
+\DeclareMathSymbol{\clubsuit}{\mathord}{symbols}{"7C}
+\DeclareMathSymbol{\diamondsuit}{\mathord}{symbols}{"7D}
+\DeclareMathSymbol{\heartsuit}{\mathord}{symbols}{"7E}
+\DeclareMathSymbol{\spadesuit}{\mathord}{symbols}{"7F}
+% \end{macrocode}
+%
+%
+% \subsubsection{Large Operators}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\coprod}{\mathop}{largesymbols}{"60}
+\DeclareMathSymbol{\bigvee}{\mathop}{largesymbols}{"57}
+\DeclareMathSymbol{\bigwedge}{\mathop}{largesymbols}{"56}
+\DeclareMathSymbol{\biguplus}{\mathop}{largesymbols}{"55}
+\DeclareMathSymbol{\bigcap}{\mathop}{largesymbols}{"54}
+\DeclareMathSymbol{\bigcup}{\mathop}{largesymbols}{"53}
+\DeclareMathSymbol{\intop}{\mathop}{largesymbols}{"52}
+ \def\int{\intop\nolimits}
+\DeclareMathSymbol{\prod}{\mathop}{largesymbols}{"51}
+\DeclareMathSymbol{\sum}{\mathop}{largesymbols}{"50}
+\DeclareMathSymbol{\bigotimes}{\mathop}{largesymbols}{"4E}
+\DeclareMathSymbol{\bigoplus}{\mathop}{largesymbols}{"4C}
+\DeclareMathSymbol{\bigodot}{\mathop}{largesymbols}{"4A}
+\DeclareMathSymbol{\ointop}{\mathop}{largesymbols}{"48}
+ \def\oint{\ointop\nolimits}
+\DeclareMathSymbol{\bigsqcup}{\mathop}{largesymbols}{"46}
+\DeclareMathSymbol{\smallint}{\mathop}{symbols}{"73}
+% \end{macrocode}
+%
+%
+% \subsubsection{Binary symbols}
+%
+% \changes{v2.3a}{2004/02/04}
+% {Added bigtriangle synonyms for stmaryrd}
+% \begin{macrocode}
+\DeclareMathSymbol{\triangleleft}{\mathbin}{letters}{"2F}
+\DeclareMathSymbol{\triangleright}{\mathbin}{letters}{"2E}
+\DeclareMathSymbol{\bigtriangleup}{\mathbin}{symbols}{"34}
+\DeclareMathSymbol{\bigtriangledown}{\mathbin}{symbols}{"35}
+ \let \varbigtriangledown \bigtriangledown
+ \let \varbigtriangleup \bigtriangleup
+% \end{macrocode}
+%
+% These last two synonyms are needed because the \textsf{stamryrd}
+% package redefines them as Operators.
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\wedge}{\mathbin}{symbols}{"5E}
+ \let\land=\wedge
+\DeclareMathSymbol{\vee}{\mathbin}{symbols}{"5F}
+ \let\lor=\vee
+\DeclareMathSymbol{\cap}{\mathbin}{symbols}{"5C}
+\DeclareMathSymbol{\cup}{\mathbin}{symbols}{"5B}
+\DeclareMathSymbol{\ddagger}{\mathbin}{symbols}{"7A}
+\DeclareMathSymbol{\dagger}{\mathbin}{symbols}{"79}
+\DeclareMathSymbol{\sqcap}{\mathbin}{symbols}{"75}
+\DeclareMathSymbol{\sqcup}{\mathbin}{symbols}{"74}
+\DeclareMathSymbol{\uplus}{\mathbin}{symbols}{"5D}
+\DeclareMathSymbol{\amalg}{\mathbin}{symbols}{"71}
+\DeclareMathSymbol{\diamond}{\mathbin}{symbols}{"05}
+\DeclareMathSymbol{\bullet}{\mathbin}{symbols}{"0F}
+\DeclareMathSymbol{\wr}{\mathbin}{symbols}{"6F}
+\DeclareMathSymbol{\div}{\mathbin}{symbols}{"04}
+\DeclareMathSymbol{\odot}{\mathbin}{symbols}{"0C}
+\DeclareMathSymbol{\oslash}{\mathbin}{symbols}{"0B}
+\DeclareMathSymbol{\otimes}{\mathbin}{symbols}{"0A}
+\DeclareMathSymbol{\ominus}{\mathbin}{symbols}{"09}
+\DeclareMathSymbol{\oplus}{\mathbin}{symbols}{"08}
+\DeclareMathSymbol{\mp}{\mathbin}{symbols}{"07}
+\DeclareMathSymbol{\pm}{\mathbin}{symbols}{"06}
+\DeclareMathSymbol{\circ}{\mathbin}{symbols}{"0E}
+\DeclareMathSymbol{\bigcirc}{\mathbin}{symbols}{"0D}
+\DeclareMathSymbol{\setminus}{\mathbin}{symbols}{"6E}
+\DeclareMathSymbol{\cdot}{\mathbin}{symbols}{"01}
+\DeclareMathSymbol{\ast}{\mathbin}{symbols}{"03}
+\DeclareMathSymbol{\times}{\mathbin}{symbols}{"02}
+\DeclareMathSymbol{\star}{\mathbin}{letters}{"3F}
+% \end{macrocode}
+%
+%
+% \subsubsection{Relations}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\propto}{\mathrel}{symbols}{"2F}
+\DeclareMathSymbol{\sqsubseteq}{\mathrel}{symbols}{"76}
+\DeclareMathSymbol{\sqsupseteq}{\mathrel}{symbols}{"77}
+\DeclareMathSymbol{\parallel}{\mathrel}{symbols}{"6B}
+\DeclareMathSymbol{\mid}{\mathrel}{symbols}{"6A}
+\DeclareMathSymbol{\dashv}{\mathrel}{symbols}{"61}
+\DeclareMathSymbol{\vdash}{\mathrel}{symbols}{"60}
+\DeclareMathSymbol{\nearrow}{\mathrel}{symbols}{"25}
+\DeclareMathSymbol{\searrow}{\mathrel}{symbols}{"26}
+\DeclareMathSymbol{\nwarrow}{\mathrel}{symbols}{"2D}
+\DeclareMathSymbol{\swarrow}{\mathrel}{symbols}{"2E}
+\DeclareMathSymbol{\Leftrightarrow}{\mathrel}{symbols}{"2C}
+\DeclareMathSymbol{\Leftarrow}{\mathrel}{symbols}{"28}
+\DeclareMathSymbol{\Rightarrow}{\mathrel}{symbols}{"29}
+\def\neq{\not=} \let\ne=\neq
+\DeclareMathSymbol{\leq}{\mathrel}{symbols}{"14}
+ \let\le=\leq
+\DeclareMathSymbol{\geq}{\mathrel}{symbols}{"15}
+ \let\ge=\geq
+\DeclareMathSymbol{\succ}{\mathrel}{symbols}{"1F}
+\DeclareMathSymbol{\prec}{\mathrel}{symbols}{"1E}
+\DeclareMathSymbol{\approx}{\mathrel}{symbols}{"19}
+\DeclareMathSymbol{\succeq}{\mathrel}{symbols}{"17}
+\DeclareMathSymbol{\preceq}{\mathrel}{symbols}{"16}
+\DeclareMathSymbol{\supset}{\mathrel}{symbols}{"1B}
+\DeclareMathSymbol{\subset}{\mathrel}{symbols}{"1A}
+\DeclareMathSymbol{\supseteq}{\mathrel}{symbols}{"13}
+\DeclareMathSymbol{\subseteq}{\mathrel}{symbols}{"12}
+\DeclareMathSymbol{\in}{\mathrel}{symbols}{"32}
+\DeclareMathSymbol{\ni}{\mathrel}{symbols}{"33}
+ \let\owns=\ni
+\DeclareMathSymbol{\gg}{\mathrel}{symbols}{"1D}
+\DeclareMathSymbol{\ll}{\mathrel}{symbols}{"1C}
+\DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
+\DeclareMathSymbol{\leftrightarrow}{\mathrel}{symbols}{"24}
+\DeclareMathSymbol{\leftarrow}{\mathrel}{symbols}{"20}
+ \let\gets=\leftarrow
+\DeclareMathSymbol{\rightarrow}{\mathrel}{symbols}{"21}
+ \let\to=\rightarrow
+\DeclareMathSymbol{\mapstochar}{\mathrel}{symbols}{"37}
+ \def\mapsto{\mapstochar\rightarrow}
+\DeclareMathSymbol{\sim}{\mathrel}{symbols}{"18}
+\DeclareMathSymbol{\simeq}{\mathrel}{symbols}{"27}
+\DeclareMathSymbol{\perp}{\mathrel}{symbols}{"3F}
+\DeclareMathSymbol{\equiv}{\mathrel}{symbols}{"11}
+\DeclareMathSymbol{\asymp}{\mathrel}{symbols}{"10}
+\DeclareMathSymbol{\smile}{\mathrel}{letters}{"5E}
+\DeclareMathSymbol{\frown}{\mathrel}{letters}{"5F}
+\DeclareMathSymbol{\leftharpoonup}{\mathrel}{letters}{"28}
+\DeclareMathSymbol{\leftharpoondown}{\mathrel}{letters}{"29}
+\DeclareMathSymbol{\rightharpoonup}{\mathrel}{letters}{"2A}
+\DeclareMathSymbol{\rightharpoondown}{\mathrel}{letters}{"2B}
+% \end{macrocode}
+%
+% Here cometh much profligate robustification of math constructs.
+% Warning: some of these commands may become non-robust if an
+% AMS package is loaded.
+%
+% Further potential problems: some math font packages may make
+% unfortunate assumptions about some of these definitions that are
+% not true of the robust versions we need.
+% \changes{v2.3}{2004/02/02}
+% {Many things from here on made robust}
+% \begin{macrocode}
+\DeclareRobustCommand
+ \cong{\mathrel{\mathpalette\@vereq\sim}} % congruence sign
+\def\@vereq#1#2{\lower.5\p@\vbox{\lineskiplimit\maxdimen\lineskip-.5\p@
+ \ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}
+\DeclareRobustCommand
+ \notin{\mathrel{\m@th\mathpalette\c@ncel\in}}
+\def\c@ncel#1#2{\m@th\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}}
+\DeclareRobustCommand
+ \rightleftharpoons{\mathrel{\mathpalette\rlh@{}}}
+\def\rlh@#1{\vcenter{\m@th\hbox{\ooalign{\raise2pt
+ \hbox{$#1\rightharpoonup$}\crcr
+ $#1\leftharpoondown$}}}}
+\DeclareRobustCommand
+ \doteq{\buildrel\textstyle.\over=}
+% \end{macrocode}
+%
+% \subsubsection{Arrows}
+%
+% \begin{macrocode}
+\DeclareRobustCommand
+ \joinrel{\mathrel{\mkern-3mu}}
+\DeclareRobustCommand
+ \relbar{\mathrel{\smash-}} % \smash, because -
+ % has the same height as +
+% \end{macrocode}
+% In contrast to \texttt{plain.tex} |\Relbar| got braces around the
+% equal sign to guard against it being ``math active'' expanding to
+% |\futurelet...|. This might be the case when packages are
+% implementing shorthands for math, e.g. |=>| meaning |\Rightarrow|
+% etc. It would actually be better not to use |=| in such
+% definitions but instead define something like |\mathequalsign|
+% and use this. However we can't do this now as it would break
+% other math layouts where characters are in different places
+% (since those wouldn't know about the need for a new command name).
+% \changes{v2.2z}{2001/06/04}{Guard against math active equal sign in
+% \cs{Relbar} (pr/3333)}
+% \begin{macrocode}
+\DeclareRobustCommand
+ \Relbar{\mathrel{=}}
+\DeclareMathSymbol{\lhook}{\mathrel}{letters}{"2C}
+ \def\hookrightarrow{\lhook\joinrel\rightarrow}
+\DeclareMathSymbol{\rhook}{\mathrel}{letters}{"2D}
+ \def\hookleftarrow{\leftarrow\joinrel\rhook}
+\DeclareRobustCommand
+ \bowtie{\mathrel\triangleright\joinrel\mathrel\triangleleft}
+% \end{macrocode}
+%
+% \changes{v2.2z}{2001/06/04}{Guard against math active equal and pipe
+% sign in \cs{models} (pr/3333)}
+% \begin{macrocode}
+\DeclareRobustCommand
+ \models{\mathrel{|}\joinrel\Relbar}
+\DeclareRobustCommand
+ \Longrightarrow{\Relbar\joinrel\Rightarrow}
+% \end{macrocode}
+%
+% LaTeX Change: |\longrightarrow| and |\longleftarrow| redefined to make
+% then robust.
+% \begin{macrocode}
+\DeclareRobustCommand\longrightarrow
+ {\relbar\joinrel\rightarrow}
+\DeclareRobustCommand\longleftarrow
+ {\leftarrow\joinrel\relbar}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand
+ \Longleftarrow{\Leftarrow\joinrel\Relbar}
+\DeclareRobustCommand
+ \longmapsto{\mapstochar\longrightarrow}
+\DeclareRobustCommand
+ \longleftrightarrow{\leftarrow\joinrel\rightarrow}
+\DeclareRobustCommand
+ \Longleftrightarrow{\Leftarrow\joinrel\Rightarrow}
+\DeclareRobustCommand
+ \iff{\;\Longleftrightarrow\;}
+% \end{macrocode}
+%
+%
+% \subsubsection{Punctuation symbols}
+%
+% \begin{macrocode}
+\DeclareMathSymbol{\ldotp}{\mathpunct}{letters}{"3A}
+\DeclareMathSymbol{\cdotp}{\mathpunct}{symbols}{"01}
+\DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
+% \end{macrocode}
+%
+%
+% This is commented out, since |\ldots| is now defined in ltoutenc.dtx.
+% \begin{macrocode}
+%\def\@ldots{\mathinner{\ldotp\ldotp\ldotp}}
+%\DeclareRobustCommand\ldots
+% {\relax\ifmmode\@ldots\else\mbox{$\m@th\@ldots\,$}\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand
+ \cdots{\mathinner{\cdotp\cdotp\cdotp}}
+\DeclareRobustCommand
+ \vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
+ \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
+\DeclareRobustCommand
+ \ddots{\mathinner{\mkern1mu\raise7\p@
+ \vbox{\kern7\p@\hbox{.}}\mkern2mu
+ \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu}}
+% \end{macrocode}
+%
+%
+% \subsubsection{Math accents}
+%
+% \begin{macrocode}
+\DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
+\DeclareMathAccent{\grave}{\mathalpha}{operators}{"12}
+\DeclareMathAccent{\ddot}{\mathalpha}{operators}{"7F}
+\DeclareMathAccent{\tilde}{\mathalpha}{operators}{"7E}
+\DeclareMathAccent{\bar}{\mathalpha}{operators}{"16}
+\DeclareMathAccent{\breve}{\mathalpha}{operators}{"15}
+\DeclareMathAccent{\check}{\mathalpha}{operators}{"14}
+\DeclareMathAccent{\hat}{\mathalpha}{operators}{"5E}
+\DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
+\DeclareMathAccent{\dot}{\mathalpha}{operators}{"5F}
+\DeclareMathAccent{\widetilde}{\mathord}{largesymbols}{"65}
+\DeclareMathAccent{\widehat}{\mathord}{largesymbols}{"62}
+% \end{macrocode}
+% For some reason plain \TeX{} never bothered to provide
+% a ring accent in math (although it is available in the fonts),
+% but since we got a request for it here we go:
+% \changes{v2.2t}{1998/04/11}{Added \cs{mathring} accent (pr2785)}
+% \begin{macrocode}
+\DeclareMathAccent{\mathring}{\mathalpha}{operators}{"17}
+% \end{macrocode}
+%
+%
+% \subsubsection{Radicals}
+%
+% \changes{v2.2o}{1996/05/17}{\cs{@@sqrt} removed, at last}
+% \begin{macrocode}
+\DeclareMathRadical{\sqrtsign}{symbols}{"70}{largesymbols}{"70}
+% \end{macrocode}
+%
+%
+% \subsubsection{Over and under something, etc}
+%
+% \begin{macrocode}
+\def\overrightarrow#1{\vbox{\m@th\ialign{##\crcr
+ \rightarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+\def\overleftarrow#1{\vbox{\m@th\ialign{##\crcr
+ \leftarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}%
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+\def\overbrace#1{\mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}%
+ \downbracefill\crcr\noalign{\kern3\p@\nointerlineskip}%
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
+\def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
+ $\hfil\displaystyle{#1}\hfil$\crcr
+ \noalign{\kern3\p@\nointerlineskip}%
+ \upbracefill\crcr\noalign{\kern3\p@}}}}\limits}
+% \end{macrocode}
+% (quite a waste of tokens, IMHO --- Frank)
+% \begin{macrocode}
+\def\skew#1#2#3{{\muskip\z@#1mu\divide\muskip\z@\tw@ \mkern\muskip\z@
+ #2{\mkern-\muskip\z@{#3}\mkern\muskip\z@}\mkern-\muskip\z@}{}}
+% \end{macrocode}
+%
+% \changes{v2.2n}{1995/11/21}{Incorporate changed figures,
+% as in plain.tex}
+% \begin{macrocode}
+\def\rightarrowfill{$\m@th\smash-\mkern-7mu%
+ \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
+ \mkern-7mu\mathord\rightarrow$}
+\def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
+ \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
+ \mkern-7mu\smash-$}
+\DeclareMathSymbol{\braceld}{\mathord}{largesymbols}{"7A}
+\DeclareMathSymbol{\bracerd}{\mathord}{largesymbols}{"7B}
+\DeclareMathSymbol{\bracelu}{\mathord}{largesymbols}{"7C}
+\DeclareMathSymbol{\braceru}{\mathord}{largesymbols}{"7D}
+\def\downbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
+ \braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru
+ \bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd$}
+\def\upbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
+ \bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd
+ \braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}
+% \end{macrocode}
+%
+% \subsubsection{Delimiters}
+%
+% \begin{macrocode}
+\DeclareMathDelimiter{\lmoustache} % top from (, bottom from )
+ {\mathopen}{largesymbols}{"7A}{largesymbols}{"40}
+\DeclareMathDelimiter{\rmoustache} % top from ), bottom from (
+ {\mathclose}{largesymbols}{"7B}{largesymbols}{"41}
+\DeclareMathDelimiter{\arrowvert} % arrow without arrowheads
+ {\mathord}{symbols}{"6A}{largesymbols}{"3C}
+\DeclareMathDelimiter{\Arrowvert} % double arrow without arrowheads
+ {\mathord}{symbols}{"6B}{largesymbols}{"3D}
+\DeclareMathDelimiter{\Vert}
+ {\mathord}{symbols}{"6B}{largesymbols}{"0D}
+\let\|=\Vert
+\DeclareMathDelimiter{\vert}
+ {\mathord}{symbols}{"6A}{largesymbols}{"0C}
+\DeclareMathDelimiter{\uparrow}
+ {\mathrel}{symbols}{"22}{largesymbols}{"78}
+\DeclareMathDelimiter{\downarrow}
+ {\mathrel}{symbols}{"23}{largesymbols}{"79}
+\DeclareMathDelimiter{\updownarrow}
+ {\mathrel}{symbols}{"6C}{largesymbols}{"3F}
+\DeclareMathDelimiter{\Uparrow}
+ {\mathrel}{symbols}{"2A}{largesymbols}{"7E}
+\DeclareMathDelimiter{\Downarrow}
+ {\mathrel}{symbols}{"2B}{largesymbols}{"7F}
+\DeclareMathDelimiter{\Updownarrow}
+ {\mathrel}{symbols}{"6D}{largesymbols}{"77}
+\DeclareMathDelimiter{\backslash} % for double coset G\backslash H
+ {\mathord}{symbols}{"6E}{largesymbols}{"0F}
+\DeclareMathDelimiter{\rangle}
+ {\mathclose}{symbols}{"69}{largesymbols}{"0B}
+\DeclareMathDelimiter{\langle}
+ {\mathopen}{symbols}{"68}{largesymbols}{"0A}
+\DeclareMathDelimiter{\rbrace}
+ {\mathclose}{symbols}{"67}{largesymbols}{"09}
+\DeclareMathDelimiter{\lbrace}
+ {\mathopen}{symbols}{"66}{largesymbols}{"08}
+\DeclareMathDelimiter{\rceil}
+ {\mathclose}{symbols}{"65}{largesymbols}{"07}
+\DeclareMathDelimiter{\lceil}
+ {\mathopen}{symbols}{"64}{largesymbols}{"06}
+\DeclareMathDelimiter{\rfloor}
+ {\mathclose}{symbols}{"63}{largesymbols}{"05}
+\DeclareMathDelimiter{\lfloor}
+ {\mathopen}{symbols}{"62}{largesymbols}{"04}
+% \end{macrocode}
+%
+% \begin{macro}{\lgroup}
+% \begin{macro}{\rgroup}
+% \begin{macro}{\bracevert}
+% There are three plain \TeX{} delimiters which are not fully
+% supported by NFSS, since they partly point into a bold cmr font.
+% Allocating a full symbol font, just to have three delimiters
+% seems a bit too much given the limited space available. For this
+% reason only the extensible sizes are supported. If this is not
+% desired one can use, without losing portability, define |\mathbf|
+% and |\mathtt| as font symbol alphabet (setting up
+% \texttt{cmr/bx/n} and \texttt{cmtt/m/n} as symbol fonts first)
+% and modify the delimiter declarations to point with their
+% small variant to those symbol fonts. (This is done in
+% \texttt{oldlfont.dtx} so look there for examples.)
+% \begin{macrocode}
+\DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips
+ {\mathopen}{largesymbols}{"3A}{largesymbols}{"3A}
+\DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips
+ {\mathclose}{largesymbols}{"3B}{largesymbols}{"3B}
+\DeclareMathDelimiter{\bracevert} % the vertical bar that extends braces
+ {\mathord}{largesymbols}{"3E}{largesymbols}{"3E}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Math versions of text commands}
+%
+% \changes{v2.2k}{1995/06/05}{Moved math commands from ltoutenc.dtx.}
+%
+% The |\mathunderscore| here is really a text definition, so it has
+% been put back into |ltoutenc.dtx| (by Chris, 30/04/97) and should
+% be removed from here.
+%
+% These symbols are the math versions of text commands such as |\P|,
+% |\$|, etc.
+% \begin{macro}{\mathparagraph}
+% \changes{v2.2q}{1997/01/08}
+% {Define using \cs{DeclareMathSymbol}}
+% \begin{macro}{\mathsection}
+% \begin{macro}{\mathdollar}
+% \begin{macro}{\mathsterling}
+% \begin{macro}{\mathunderscore}
+% These math symbols are not in plain \TeX.
+% \begin{macrocode}
+\DeclareMathSymbol{\mathparagraph}{\mathord}{symbols}{"7B}
+\DeclareMathSymbol{\mathsection}{\mathord}{symbols}{"78}
+\DeclareMathSymbol{\mathdollar}{\mathord}{operators}{"24}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\mathsterling{\mathit{\mathchar"7024}}
+\def\mathunderscore{\kern.06em\vbox{\hrule\@width.3em}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\mathellipsis}
+% This is plain \TeX's |\ldots|.
+% \begin{macrocode}
+\def\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Other special functions and parameters}
+%
+% \subsubsection{Biggggg}
+%
+% \changes{v3.0b}{2018/09/24}{Start LR-mode if necessary (git/49)}
+% \begin{macrocode}
+%</math>
+%<*math|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\Big}{Start LR-mode}%
+\def\big#1{\leavevmode@ifvmode
+ {\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
+\def\Big#1{\leavevmode@ifvmode
+ {\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}
+\def\bigg#1{\leavevmode@ifvmode
+ {\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
+\def\Bigg#1{\leavevmode@ifvmode
+ {\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}}
+%</math|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\Big}{Start LR-mode}%
+%<latexrelease>\def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
+%<latexrelease>\def\Big#1{{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}
+%<latexrelease>\def\bigg#1{{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
+%<latexrelease>\def\Bigg#1{{\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}}
+%<latexrelease>\EndIncludeInRelease
+%<*math>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\n@space{\nulldelimiterspace\z@ \m@th}
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{The log-like functions}
+%
+% \begin{macro}{\operator@font}
+% The |\operator@font| determines the symbol font used for log-like
+% functions.
+% \begin{macrocode}
+\def\operator@font{\mathgroup\symoperators}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Parameters}
+%
+% \begin{macrocode}
+\thinmuskip=3mu
+\medmuskip=4mu plus 2mu minus 4mu
+\thickmuskip=5mu plus 5mu
+% \end{macrocode}
+%
+%
+% This finishes the low-level setup in \texttt{fontmath.ltx}.
+% \begin{macrocode}
+%</math>
+% \end{macrocode}
+%
+%
+% \section{Default cfg files}
+%
+% We provide default \texttt{cfg} files here to ensure that
+% on installations that search large file trees we do not pick up
+% some strange customisation files from somewhere.
+% \changes{v2.2y}{2001/06/02}{Provide default cfg files (pr/3264)}
+% \begin{macrocode}
+%<*cfgtext|cfgmath|cfgprel>
+%%
+%%
+%%
+%% Load the standard setup:
+%%
+%<+cfgtext>\input{fonttext.ltx}
+%<+cfgmath>\input{fontmath.ltx}
+%<+cfgprel>\input{preload.ltx}
+%%
+%% Small changes could go here; see documentation in cfgguide.tex for
+%% allowed modifications.
+%%
+%% In particular it is not allowed to misuse this configuration file
+%% to modify internal LaTeX commands!
+%%
+%% If you use this file as the basis for configuration please change
+%% the \ProvidesFile lines to clearly identify your modification, e.g.,
+%%
+%<+cfgtext>%% \ProvidesFile{fonttext.cfg}[2001/06/01
+%<+cfgmath>%% \ProvidesFile{fonttext.cfg}[2001/06/01
+%<+cfgprel>%% \ProvidesFile{preload.cfg}[2001/06/01
+%% Customised local font setup]
+%%
+%%
+%</cfgtext|cfgmath|cfgprel>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/format.ins b/macros/latex-dev/base/format.ins
new file mode 100644
index 0000000000..3a7782a06e
--- /dev/null
+++ b/macros/latex-dev/base/format.ins
@@ -0,0 +1,267 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2018
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% 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 has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\input docstrip
+\keepsilent
+
+\declarepreamble\mainpreamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2018
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\def\MetaPrefix{--}
+\declarepreamble\luapreamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 2015
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\declarepreamble\cfgpreamble
+
+This is a generated file.
+
+Copyright 1993-2018
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+Details of how to use a configuration file to modify this part of
+the system are in the document `cfgguide.tex'.
+
+
+\endpreamble
+
+
+\usepreamble\mainpreamble
+\usedir{tex/latex/base}
+
+\generate{%
+ \file{latex.ltx}{%
+ \from{ltdirchk.dtx}{initex,2ekernel,dircheck}
+ \from{ltplain.dtx}{2ekernel}
+ \from{ltvers.dtx}{2ekernel}
+ \from{ltdefns.dtx}{2ekernel}
+ \from{ltalloc.dtx}{2ekernel}
+ \from{ltcntrl.dtx}{2ekernel}
+ \from{lterror.dtx}{2ekernel}
+ \from{ltpar.dtx}{2ekernel}
+ \from{ltspace.dtx}{2ekernel}
+ \from{ltlogos.dtx}{2ekernel}
+ \from{ltfiles.dtx}{2ekernel}
+ \from{ltoutenc.dtx}{2ekernel}
+ \from{ltcounts.dtx}{2ekernel}
+ \from{ltlength.dtx}{2ekernel}
+ \from{ltfssbas.dtx}{2ekernel}
+ \from{ltfsstrc.dtx}{2ekernel}
+% \from{ltfsscmp.dtx}{compat,2ekernel}
+ \from{ltfssdcl.dtx}{compat,2ekernel}
+ \from{ltfssini.dtx}{compat,2ekernel}
+ \from{ltfntcmd.dtx}{2ekernel}
+ \from{ltpageno.dtx}{2ekernel}
+ \from{ltxref.dtx}{2ekernel}
+ \from{ltmiscen.dtx}{2ekernel}
+ \from{ltmath.dtx}{2ekernel}
+ \from{ltlists.dtx}{2ekernel}
+ \from{ltboxes.dtx}{2ekernel}
+ \from{lttab.dtx}{2ekernel}
+ \from{ltpictur.dtx}{2ekernel}
+ \from{ltthm.dtx}{2ekernel}
+ \from{ltsect.dtx}{2ekernel}
+ \from{ltfloat.dtx}{2ekernel}
+ \from{ltidxglo.dtx}{2ekernel}
+ \from{ltbibl.dtx}{2ekernel}
+ \from{ltpage.dtx}{2ekernel}
+ \from{ltoutput.dtx}{2ekernel}
+ \from{ltclass.dtx}{2ekernel,tracerollback}
+ \from{ltluatex.dtx}{2ekernel}
+ \from{ltfinal.dtx}{2ekernel}}
+ \file{tracefnt.sty}{%
+ \from{ltfsstrc.dtx}{package,trace}}
+ \file{flafter.sty}{%
+ \from{ltoutput.dtx}{flafter,trace}}
+ \file{fltrace.sty}{%
+ \from{ltoutput.dtx}{fltrace,trace}}
+%%% generate general option files modifying the kernel behavior
+ \file{fleqn.clo}{%
+ \from{ltmath.dtx}{fleqn}}
+ \file{leqno.clo}{%
+ \from{ltmath.dtx}{leqno}}
+ }
+
+
+
+
+\generateFile{oldlfont.sty}{t}{%
+ \from{oldlfont.dtx}{package}
+}
+
+\generateFile{newlfont.sty}{t}{%
+ \from{newlfont.dtx}{package}
+}
+
+% luatex support (TeX part)
+
+\generate{\file{ltluatex.tex}{\from{ltluatex.dtx}{tex,plain}}}
+
+%%%%%%%%%%%%%%%%% CUSTOMISABLE FILES
+
+\usedir{tex/latex/base}
+
+\usepreamble\cfgpreamble
+
+\generateFile{hyphen.ltx}{t}{%
+ \from{lthyphen.dtx}{default}
+}
+
+
+\generate{
+ \file{fonttext.ltx}{
+ \from{fontdef.dtx}{text}}
+ \file{fontmath.ltx}{
+ \from{fontdef.dtx}{math}}
+ \file{fonttext.cfg}{
+ \from{fontdef.dtx}{cfgtext}}
+ \file{fontmath.cfg}{
+ \from{fontdef.dtx}{cfgmath}}
+ \file{preload.cfg}{
+ \from{fontdef.dtx}{cfgprel}}
+ }
+
+\generateFile{preload.ltx}{t}{%
+ \from{preload.dtx}{preload,cm,xpt,tex}}
+
+%%%%%%%%%%%%%%%%% Lua code
+
+% This is at the end as the prefix/postamble requirements are
+% different to everything else
+
+\def\MetaPrefix{--}
+\usepreamble\luapreamble
+\nopostamble
+\generate{\file{ltluatex.lua}{\from{ltluatex.dtx}{lua}}}
+
+\endbatchfile
+
+
+
diff --git a/macros/latex-dev/base/graphpap.dtx b/macros/latex-dev/base/graphpap.dtx
new file mode 100644
index 0000000000..5442c287cc
--- /dev/null
+++ b/macros/latex-dev/base/graphpap.dtx
@@ -0,0 +1,195 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%
+%% File `graphpap.dtx'.
+%% Copyright (C) 1994 by Leslie Lamport
+%% all rights reserved.
+%%
+%
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{graphpap}
+%<package> [1994/08/09 v1.0c Standard LaTeX graphpap package (LL)]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{graphpap}
+\GetFileInfo{graphpap.sty}
+\begin{document}
+\title{The \textsf{graphpap} package\thanks{This file
+ has version number \fileversion, last
+ revised \filedate.}}
+\author{Leslie Lamport}
+\date{\filedate}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{graphpap.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0b}{1994/04/28}{(DPC) convert to doc format}
+%
+%
+% |\graphpaper|\oarg{N}\parg{X,Y}\parg{DX,DY}
+% Makes a grid with left-hand corner at \parg{X,Y}, extending
+% \parg{DX,DY} units in the X and Y directions, where the lines are
+% \emph{N} units apart. Every fifth line is thick and is numbered.
+% The default value of \emph{N} is 10.
+% The arguments must all be integers.
+%
+% \StopEventually
+%
+% First, we define three counters. The first two are defined
+% as raw TeX counters since multiplication and division must be
+% performed in them.
+%
+% \changes{v1.0b}{1994/04/28}{(DPC) Remove allocations.}
+% \begin{macrocode}
+%<*package>
+% \newcount\@gridx% now (\@tempcnta)
+% \newcount\@gridy% now (\@tempcntb)
+% \newcounter{@grid}
+\let\c@@grid\count@
+% \end{macrocode}
+%
+% Next we define the following commands to draw vertical and horizontal
+% grids. The ``nonum'' commands just draw the grids; the other commands
+% also print numbers. All the arguments must be integers.
+%
+% VERTICAL GRIDS
+%
+% \noindent
+% |\@vgrid|\parg{xpos,ypos}\marg{xincrement}\\
+% | |\marg{number-of-lines}\marg{length-of-lines}
+%
+% \noindent
+% |\@nonumvgrid|\parg{xpos,ypos}\marg{xincrement}\\
+% | |\marg{number-of-lines} \marg{length-of-lines}
+%
+% HORIZONTAL GRIDS
+%
+% \noindent
+% |\@hgrid|\parg{xpos,ypos}\marg{yincrement}\\
+% | |\marg{number-of-lines}\marg{length-of-lines}
+%
+% \noindent
+% |\@nonumhgrid| same as |\@hgrid| but no numbers drawn
+%
+% \begin{macrocode}
+\def\@vgrid(#1,#2)#3#4#5{%
+ \setcounter{@grid}{#1}%
+ \multiput(#1,#2)(#3,0){#4}{\line(0,1){#5}}%
+ \multiput(#1,#2)(#3,0){#4}{\@vgridnumber{#3}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@vgridnumber#1{%
+ \makebox(0,0)[t]{%
+ \shortstack{\rule{0pt}{10pt}\\\arabic{@grid}}}%
+ \addtocounter{@grid}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@nonumvgrid(#1,#2)#3#4#5{%
+ \multiput(#1,#2)(#3,0){#4}{\line(0,1){#5}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@hgrid(#1,#2)#3#4#5{%
+ \setcounter{@grid}{#2}%
+ \multiput(#1,#2)(0,#3){#4}{\line(1,0){#5}}%
+ \multiput(#1,#2)(0,#3){#4}{\@hgridnumber{#3}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@hgridnumber#1{%
+ \makebox(0,0)[r]{\arabic{@grid}\hspace{10pt}}%
+ \addtocounter{@grid}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@nonumhgrid(#1,#2)#3#4#5{%
+ \multiput(#1,#2)(0,#3){#4}{\line(1,0){#5}}}
+% \end{macrocode}
+%
+% Finally, |\graphpaper| is defined in a straightforward way in terms of
+% the commands above.
+%
+% \begin{macro}{\graphpaper}
+% \changes{v1.0c}{1994/08/09}{(DPC) add \cs{leavevmode}}
+% \begin{macrocode}
+\newcommand\graphpaper[1][10]{\leavevmode\@grid{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@grid}
+%
+% \changes{v1.0b}{1994/04/28}
+% {(DPC) convert ignore spaces between arguments}
+% \begin{macrocode}
+\def\@grid#1(#2,#3)#4{\@grid@i{#1}{#2}{#3}(}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@grid@i}
+%
+% \changes{v1.0b}{1994/04/28}
+% {(DPC) macro introduced}
+% \begin{macrocode}
+\def\@grid@i#1#2#3(#4,#5){%
+ \@tempcnta=#4\relax
+ \divide\@tempcnta#1\relax
+ \advance\@tempcnta1\relax
+ {\thinlines\@nonumvgrid(#2,#3){#1}{\@tempcnta}{#5}
+ \@tempcnta#4\relax
+ \divide\@tempcnta5\relax
+ \divide\@tempcnta#1\relax
+ \advance\@tempcnta1\relax
+ \@tempcntb5\relax
+ \multiply\@tempcntb#1\relax
+ \thicklines\@vgrid(#2,#3){\@tempcntb}{\@tempcnta}{#5}
+ \@tempcnta#5\relax
+ \divide\@tempcnta #1\relax
+ \advance\@tempcnta1\relax
+ \thinlines\@nonumhgrid(#2,#3){#1}{\@tempcnta}{#4}
+ \@tempcnta#5\relax
+ \divide\@tempcnta5\relax
+ \divide\@tempcnta#1\relax
+ \advance\@tempcnta1\relax
+ \thicklines\@hgrid(#2,#3){\@tempcntb}{\@tempcnta}{#4}}%
+ \ignorespaces}
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+
diff --git a/macros/latex-dev/base/graphpap.ins b/macros/latex-dev/base/graphpap.ins
new file mode 100644
index 0000000000..253d89baf9
--- /dev/null
+++ b/macros/latex-dev/base/graphpap.ins
@@ -0,0 +1,86 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{graphpap.sty}{t}{\from{graphpap.dtx}{package}}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/graphpap.pdf b/macros/latex-dev/base/graphpap.pdf
new file mode 100644
index 0000000000..027789f06d
--- /dev/null
+++ b/macros/latex-dev/base/graphpap.pdf
Binary files differ
diff --git a/macros/latex-dev/base/idx.tex b/macros/latex-dev/base/idx.tex
new file mode 100644
index 0000000000..69b8af2c23
--- /dev/null
+++ b/macros/latex-dev/base/idx.tex
@@ -0,0 +1,94 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% IDX.TEX -- A LaTeX input file for printing .IDX files.
+% Copyright (c) 1985, 1994 by Leslie Lamport.
+% This file created on 18 February 1994.
+% Last changed see below in \typeout.
+
+\documentclass[twocolumn]{article}
+
+\nofiles
+
+\setlength{\oddsidemargin}{0pt}
+\setlength{\evensidemargin}{0pt}
+\setlength{\textwidth}{470pt} % Width of text line.
+\setlength{\columnsep}{30pt} % Space between columns
+
+\raggedright
+
+
+
+\makeatletter
+
+\def\isanitize{\@makeother\\\@makeother\$\@makeother\&%
+\@makeother\#\@makeother\^\@makeother\^^K\@makeother\_\@makeother\^^A%
+\@makeother\%\@makeother\~}
+
+\def\indexentry{\par\begingroup \isanitize \idxentry}
+
+\def\idxentry#1#2{\def\foo{#2}\ifx\foo\thispage
+ \else \gdef\thispage{#2}
+ \vskip 7pt {\large \bf Page #2\par \vskip 2pt}\fi
+ \hangindent 20pt \ttfamily #1\par\endgroup}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{0pt plus .5pt}
+
+\tolerance=10000 % prevents overfull boxes
+
+
+%% Add extra stretch and shrink to interword space for typewriter style.
+\newsavebox{\foobar}
+\savebox{\foobar}{\texttt{x}}
+\relax
+\expandafter\fontdimen\expandafter3\csname OT1/cmtt/m/n/10\endcsname=3pt
+\expandafter\fontdimen\expandafter4\csname OT1/cmtt/m/n/10\endcsname=3pt
+
+\begin{document}
+
+\typeout{}
+\typeout{IDX version of 03 May 1995}
+\typeout{}
+\typeout {**********************************}
+\typeout {* Enter idx file's first name. *}
+\typein[\filename]{**********************************}
+
+\twocolumn[\vspace*{20pt} \centering \huge \filename.idx \par
+ \vspace*{20pt}]
+
+\dimen0=\columnwidth
+\advance\dimen0 by -20pt
+
+\parshape =2 0pt \columnwidth 20pt \dimen0
+
+\input \filename.idx\relax
+
+\end{document}
+
+
diff --git a/macros/latex-dev/base/ifthen.dtx b/macros/latex-dev/base/ifthen.dtx
new file mode 100644
index 0000000000..b538f895d0
--- /dev/null
+++ b/macros/latex-dev/base/ifthen.dtx
@@ -0,0 +1,526 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%
+%% File `ifthen.dtx'.
+%% Copyright (C) 1991 by Leslie Lamport
+%% Copyright (C) 1994-2001 LaTeX3 project, David Carlisle
+%% all rights reserved.
+%%
+%
+%<*dtx>
+ \ProvidesFile{ifthen.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+%<package>\ProvidesPackage{ifthen}
+%<driver>\ProvidesFile{ifthen.drv}
+% \fi
+% \ProvidesFile{ifthen.dtx}
+ [2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{ifthen.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{ifthen.dtx}
+%
+% \title{The \textsf{ifthen} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{David Carlisle}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+%
+%
+% \begin{abstract}
+% This file implements an |\ifthenelse| command for \LaTeXe.
+% The algorithm used is compatible with that used in the \LaTeX~2.09
+% |ifthen| style option. It has been recoded, making the resulting
+% definitions somewhat more compact and efficient.
+% \end{abstract}
+%
+% \changes{v1.0a}{1993/10/15}{New implementation}
+% \changes{v1.0b}{1993/12/17}{Upgrade to LaTeX2e}
+% \changes{v1.0e}{1994/02/11}{Improve documentation}
+% \changes{v1.0f}{1994/03/02}{Remove need for dtx file}
+% \changes{v1.0g}{1994/03/14}{Modify for the new ltxdoc.cls}
+% \changes{v1.0k}{1995/04/25}{Fix `driver' docstrip guards.}
+% \changes{v1.0n}{1997/11/03}{Documentation fix.}
+% \changes{v1.0o}{1998/08/17}{Documentation fix.}
+%
+% \section{Introduction}
+%
+% \DescribeMacro{\ifthenelse}
+% |\ifthenelse{|^^A
+% \meta{test}|}{|\meta{then clause}|}{|\meta{else clause}|}|
+%
+% Evaluates \meta{test} as a boolean function, and then executes
+% either \meta{then clause} or \meta{else clause}.
+%
+% \meta{test} is a boolean expression using the infix connectives,
+% |\and|, |\or|, the unary |\not| and parentheses |\( \)|.
+%
+% As an alternative notation |\AND|, |\OR| and |\NOT| can be
+% used. This is safer since it can't be misinterpreted
+% when appearing inside a \TeX-conditional in which |\or| has a
+% different meaning.
+%
+% The atomic propositions are:\\
+% \meta{number} |<| \meta{number} \\
+% \meta{number} |=| \meta{number} \\
+% \meta{number} |>| \meta{number} \\
+% |\isodd{| \meta{number} |}|\\
+% |\isundefined{| \meta{command name} |}|\\
+% |\equal{|\meta{string}|}{|\meta{string}|}|\\
+% |\lengthtest{|\meta{dimen}|<|\meta{dimen}|}|\\
+% |\lengthtest{|\meta{dimen}|=|\meta{dimen}|}|\\
+% |\lengthtest{|\meta{dimen}|>|\meta{dimen}|}|\\
+% |\boolean{|\meta{name}|}|
+%
+% The \meta{string}s tested by |\equal| may be any sequence of commands
+% that expand to a list of tokens. If these expansions are equal, then
+% the proposition is true.
+%
+% |\isodd| is true if the \meta{number} is odd, and false otherwise
+% (even if the argument is not a number).
+%
+% |\isundefined{\cmd}| is true if |\cmd| is not defined.
+%
+% |\boolean{xyz}| returns the truth value contained in the primitive
+% \TeX\ |\if|, |\ifxyz|. This is usually used with boolean flags
+% created with |\newboolean| and |\provideboolean| described below.
+% It can also be used with the names of |\newif| created tokens, and
+% primitive \TeX\ |\if| constructs, for example |\boolean{true}|
+% (|\iftrue|), |\boolean{mmode}| (|\ifmmode|) etc.
+%
+%
+% The commands:\\
+% |\newboolean|\marg{name}\DescribeMacro{\newboolean}\ and\
+% |\provideboolean|\marg{name}\DescribeMacro{\provideboolean}\
+% are provided so the user can easily create new boolean flags.
+% As for |\newcommand|, |\newboolean| generates an error if the
+% command name is not new. |\provideboolean| silently does nothing in
+% that case.
+%
+% The boolean flags may be set with:\\
+% |\setboolean|\marg{name}\marg{value}\DescribeMacro{\setboolean}\\
+% \meta{value} may be either |true| or |false| (any CaSe).
+%
+% Note that there is no precedence between |\and| and |\or|.
+% The proposition is evaluated in a left right manner. |\not| only
+% applies to the immediately following proposition. (This is consistent
+% with Lamport's |ifthen.sty|.) In this style, though the test is
+% `lazily' evaluated, so for instance if the first proposition in an
+% |\or| is true, the second one is skipped. (On the second pass---the
+% first pass in an |\edef| expands clauses in all propositions.)
+%
+% Apart from the addition of the extra atomic propositions |\isodd|,
+% |\boolean|, |\lengthtest| and |\isundefined|,
+% the only known incompatibility is that
+% in this package the expression|\not\not|\meta{P} is equivalent to
+% \meta{P}.
+% However in the original style it was equivalent to |\not|\meta{P}.
+% This is intentional (bug fix:-).
+%
+% \DescribeMacro{\whiledo}
+% The command |\whiledo| is also defined (copied directly from
+% the \LaTeX2.09 definition).
+%
+% |\whiledo{|\meta{test}|}{|\meta{while clause}|}|
+%
+% With \meta{test} as above, repeatedly executes \meta{while clause}
+% while the test remains true.
+%
+% \StopEventually{}
+%
+% \section{The Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{macro}{\TE@throw}
+% In order to support the syntax of |ifthen.sty|, which allows access
+% to the primitive \TeX\ syntax for a numeric test, rather than a |{}|
+% delimited argument form, it is most convenient to work `within' an
+% |\ifnum|. |\ift@throw| `throws' you out of the current |\ifnum| so
+% that you can (eg) start an |\ifdim| for the length tests.
+% \begin{macrocode}
+\def\TE@throw{\@ne=\@ne\noexpand\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\boolean}
+% A non-standard extension to |ifthen|, supporting boolean was
+% previously available, this is a simpler implementation.
+% \begin{macrocode}
+\def\boolean#1#2{%
+ \TE@throw\expandafter\noexpand\csname if#1\endcsname#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@length}
+% Testing lengths. |#1| is the test. The extra argument gobbles spaces.
+% \begin{macrocode}
+\def\TE@length#1#2{\TE@throw\noexpand\ifdim#1#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@odd}
+% \begin{macro}{\TE@@odd}
+% Testing odd/even. This is true if |#1| is an odd number, and false
+% otherwise (even if |#1| is not a number at all).
+%
+% It is hard to make this completely reliable. Here I have erred on the
+% side of safety. This should not generate a \TeX\ error if given any
+% robust commands as its argument. However it returns true on any
+% argument that \emph{starts} with an odd number |11xx| which is bad,
+% and it can not deal with \TeX's count registers, although \LaTeX\
+% counters work (via |\value|).
+% \changes{v1.0b}{1993/12/17}{Improve \cs{isodd}.}
+% \changes{v1.0c}{1994/01/20}{Improve \cs{isodd} again.}
+% \begin{macrocode}
+\def\TE@odd#1#2{%
+ \TE@throw\noexpand\TE@@odd#1\noexpand\@nil\noexpand\ifodd\count@#2}
+% \end{macrocode}
+%
+% |\TE@@odd| is not expanded on the first pass.
+% \begin{macrocode}
+\def\TE@@odd#1#2\@nil{%
+ \@defaultunits
+ \count@\if-#1-0\else0\expandafter#1\fi#2\relax\@nnil}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\TE@repl}
+% |\TE@repl| replaces the single token |#1| by |#2|. (Not within |{}|
+% groups.) It is used to replace |\or| by |\TE@or| without the need to
+% redefine |\or|. Earlier versions just |\let\or\TE@or| but this has a
+% bad effect on the expansion of commands which use the primitive
+% |\or| internally, eg |\alph|, and so caused surprising results if
+% these commands were used inside |\equal|.
+% \changes{v1.0h}{1994/05/14}{macro added}
+% \begin{macrocode}
+\def\TE@repl#1#2{%
+ \long\def\@tempc##1#1##2{%
+ \def\@tempa{##2}\def\@tempb{\@tempc}%
+ \ifx\@tempa\@tempb
+ \toks@\expandafter{\the\toks@##1}%
+ \expandafter\@gobble
+ \else
+ \toks@\expandafter{\the\toks@##1#2}%
+ \expandafter\@tempc
+ \fi
+ ##2}%
+ \expandafter\toks@\expandafter{\expandafter}%
+ \expandafter\@tempc\the\toks@#1\@tempc}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ifthenelse}
+% The remaining macros in this file are derived from the ones in
+% |ifthen.sty| but recoded and simplified. The main simplification is
+% that the original style (and the |\boolean| extensions) expressed
+% logical values always in terms of |\ifnum|. As |\fi| is `untyped' this
+% is not necessary, so for example the length tests can return values
+% via |\ifdim|, the trailing |\fi| will not complain, even though it was
+% `expecting' an |\ifnum|. Also the system of passing information via
+% macros expanding to |T| or |F| has been completely replaced by a
+% simpler system using |\iftrue|, which furthermore allows lazy
+% evaluation on the second pass.
+% \begin{macrocode}
+\long\def\ifthenelse#1{%
+% \end{macrocode}
+% \changes{v1.0h}{1994/05/14}{Use \cs{TE@repl}}
+% \begin{macrocode}
+ \toks@{#1}%
+ \TE@repl\or\TE@or
+ \TE@repl\and\TE@and
+ \TE@repl\not\TE@neg
+% \end{macrocode}
+%
+% \changes{v1.1c}{2001/05/25}{Added \cs{AND}, \cs{OR} and \cs{NOT} as
+% boolean operators as alternative to the lower case versions
+% (pr/3297)}
+% Support alternate names for the boolean operators (strictly
+% speaking only |\OR| would be necessary).
+% \begin{macrocode}
+ \TE@repl\OR\TE@or
+ \TE@repl\AND\TE@and
+ \TE@repl\NOT\TE@neg
+% \end{macrocode}
+% The original |ifthen.sty| processed everything inside a box
+% assignment, to catch any extra spaces before they appeared in the
+% output. Instead I have added extra arguments to the commands so they
+% each remove any following space.
+%
+% Set up the user level names |\not| etc.
+% \changes{v1.0c}{1994/01/20}{Modify \cs{protect} and \cs{value}}
+% \changes{v1.0j}{1994/11/15}{Modify \cs{protect} add \cs{@setref}}
+% \changes{v1.0l}{1996/03/22}
+% {Use \cs{begingroup} not \cs{bgroup} for latex/2105}
+% \changes{v1.1a}{1999/01/07}{\cs{isundefined} added for /2824}
+% \begin{macrocode}
+ \begingroup
+ \let\protect\@unexpandable@protect
+ \def\@setref##1##2##3{%
+ \ifx##1\relax\z@\else\expandafter##2##1\fi}%
+ \def\value##1{\the\csname c@##1\endcsname}%
+ \let\equal\TE@equal \let\(\TE@lparen \let\)\TE@rparen
+ \let\isodd\TE@odd \let\lengthtest\TE@length
+ \let\isundefined\TE@undef
+% \end{macrocode}
+% For the first pass, in a group, make various tokens non-expandable.
+%
+% It is unfortunate that in order to remain compatible with |ifthen|
+% syntax, it is necessary to have a two pass system. The first pass
+% inside an |\edef| `exposes' the |\if|\ldots\ |\fi| tokens, so the
+% correct clauses may be skipped on the second pass. This means that the
+% whole |\ifthenelse| command does not work by expansion, and so
+% possibly has only limited usefulness for macro code writers.
+% The main problem with the |ifthen:| syntax is that (unique for \LaTeX)
+% it does not uses a brace delimited argument form, and exposes the
+% primitive \TeX\ syntax for \meta{number}. Pretty much the only way of
+% parsing |1 > 2 \or 2 < 1| is to actually evaluate the primitive
+% |\ifnum|s. A syntax such as:\\%
+% |\or{\numtest{1<2}}{\lengthtest{1pt<1in}}|\\
+% could easily be evaluated in a one pass way, operating directly via
+% expansion, and leaving no extra tokens in the token stream.
+%
+% Still, on with the code\ldots\ make |\@tempa| and |\@tempb| tokens
+% non-expandable on the first pass.
+% \changes{v1.0l}{1996/03/22}
+% {Use \cs{begingroup} not \{ for latex/2105}
+% \begin{macrocode}
+ \begingroup
+ \let\@tempa\relax\let\@tempb\relax
+ \xdef\@gtempa{\expandafter\TE@eval\the\toks@\TE@endeval}%
+ \endgroup
+% \end{macrocode}
+% Now outside the group, execute |\@gtempa| which causes all the
+% |\if|s etc., to be evaluated, the final truth value is contained in
+% the |\newif| token |\ifTE@val|. Finally this is tested and either the
+% first or second following argument is chosen accordingly.
+% \changes{v1.0d}{1994/01/24}
+% {Use \cs{@firstoftwo} not \cs{@leftmark}.}
+% \begin{macrocode}
+ \@gtempa
+ \expandafter\endgroup\ifTE@val
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@eval}
+% Initialise a term. (Expanded on the first pass).
+% \begin{macrocode}
+\def\TE@eval{\noexpand\TE@negatefalse\noexpand\iftrue\noexpand\ifnum}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifTE@val}
+% \begin{macro}{\ifTE@negate}
+% Two |\newif|s the first holds the current truth value of the
+% expression. The second is a temporary flag which is true if we need to
+% negate the current proposition.
+% \begin{macrocode}
+\newif\ifTE@val
+\newif\ifTE@negate
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\TE@endeval}
+% Finalise a term. (Expanded on the first pass).
+% \begin{macrocode}
+\def\TE@endeval{\relax
+ \noexpand\TE@setvaltrue\noexpand
+ \else
+ \noexpand\TE@setvalfalse\noexpand
+ \fi
+ \noexpand\TE@negatefalse\noexpand
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@setvaltrue}
+% \begin{macro}{\TE@setvalfalse}
+% Set the |\ifTE@val| to true or false depending on the value of the
+% current proposition, and the negate flag. (Not expanded on the first
+% pass.)
+% \begin{macrocode}
+\def\TE@setvaltrue{%
+ \ifTE@negate\TE@valfalse\else\TE@valtrue\fi}
+\def\TE@setvalfalse{\let\ifTE@val\ifTE@negate}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\TE@or}
+% The internal version of |\or|. Ends the current term.
+% If true skip the remaining terms.
+% \begin{macrocode}
+\def\TE@or{\TE@endeval\noexpand\ifTE@val\noexpand\else\noexpand\ifnum}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@and}
+% The internal version of |\and|. If false skip the remaining terms.
+% \begin{macrocode}
+\def\TE@and{\TE@endeval\noexpand\ifTE@val\noexpand\ifnum}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@neg}
+% \begin{macro}{\TE@negswitch}
+% |\not|. Throw the current context, set a negate flag, then restart
+% the |\ifnum|. |\TE@negswitch| is not expanded on the first pass.
+% \begin{macrocode}
+\def\TE@neg{\TE@throw\noexpand\TE@negswitch\noexpand\ifnum}
+\def\TE@negswitch{\ifTE@negate\TE@negatefalse\else\TE@negatetrue\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\TE@lparen}
+% |\(|. Throw the current context, then restart a term inside a group.
+% \begin{macrocode}
+\def\TE@lparen#1{\TE@throw\begingroup\TE@eval#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@rparen}
+% |\)| end the current term, and the local group started by |\(|, but
+% pass on the boolean value in |\if\@val T|. The |\noexpand| stops the
+% |\expandafter| from expanding on the first pass.
+% \begin{macrocode}
+\def\TE@rparen#1{%
+ \TE@endeval
+ \noexpand\expandafter\endgroup\noexpand\ifTE@val#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@equal}
+% |\equal| greatly simplified from the original. |\def| may be used
+% rather than |\edef| as the whole thing is expanded anyway in the
+% first pass. The boolean can be directly encoded with the |\ifx|,
+% there is no need to start an equivalent |\ifnum|.
+% \changes{v1.0h}{1994/05/14}{make long}
+% \begin{macrocode}
+\long\def\TE@equal#1#2#3{\TE@throw
+ \def\@tempa{#1}\def\@tempb{#2}%
+ \noexpand\ifx\@tempa\@tempb#3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setboolean}
+% |\setboolean| takes |true| or |false|, as |#2|, and sets |#1|
+% accordingly.
+% \changes{v1.0i}{1994/05/27}{New style error commands}
+% \begin{macrocode}
+\def\setboolean#1#2{%
+ \lowercase{\def\@tempa{#2}}%
+ \@ifundefined{@tempswa\@tempa}%
+ {\PackageError{ifthen}%
+ {You can only set a boolean to `true' or `false'}\@ehc}%
+ {\@ifundefined{#1\@tempa}%
+ {\PackageError{ifthen}{Boolean #1 undefined}\@ehc}%
+ {\csname#1\@tempa\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newboolean}
+% \changes{v1.0m}{1996/08/02}{Add \cs{@ifdefinable} test for latex/2220}
+% Define a new `boolean'.
+% \begin{macrocode}
+\def\newboolean#1{%
+ \expandafter\@ifdefinable\csname if#1\endcsname{%
+ \expandafter\newif\csname if#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\provideboolean}
+% \changes{v1.0m}{1996/08/02}{Macro added for latex/2220}
+% Define a new `boolean' if it is not already defined.
+% \begin{macrocode}
+\def\provideboolean#1{%
+ \@ifundefined{if#1}{%
+ \expandafter\newif\csname if#1\endcsname}\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\whiledo}
+% |\whiledo| copied directly from the original.\\
+% |\whiledo{|\meta{test}|}{|\meta{body}|}|\\
+% repeatedly evaluates \meta{body} until \meta{test} is true.
+% \begin{macrocode}
+\long\def\whiledo#1#2{%
+ \ifthenelse{#1}%
+ {\@whiledotrue
+ \@whilesw\if@whiledo\fi
+ {#2%
+ \ifthenelse{#1}\@whiledotrue\@whiledofalse}}%
+ {}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TE@undef}
+% \changes{v1.1a}{1999/01/07}{Macro added for /2824}
+% test if csname is defined. |\ifx| test.
+% \begin{macrocode}
+\def\TE@undef#1#2{%
+ \TE@throw\noexpand\ifx\noexpand\@undefined\noexpand#1#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@whiledo}
+% Internal switch for |\whiledo|.
+% \begin{macrocode}
+\newif\if@whiledo
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/ifthen.ins b/macros/latex-dev/base/ifthen.ins
new file mode 100644
index 0000000000..6b3008e179
--- /dev/null
+++ b/macros/latex-dev/base/ifthen.ins
@@ -0,0 +1,86 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{ifthen.sty}{t}{\from{ifthen.dtx}{package}}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/ifthen.pdf b/macros/latex-dev/base/ifthen.pdf
new file mode 100644
index 0000000000..b651c06508
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..93f64577e2
--- /dev/null
+++ b/macros/latex-dev/base/inputenc.dtx
@@ -0,0 +1,3053 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[ascii]{inputenc}
+\GetFileInfo{inputenc.sty}
+\title{\filename}
+\date{\fileversion\space\filedate}
+ \author{%
+ Alan Jeffrey\and
+ Frank Mittelbach}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \setlength\hfuzz{20pt}
+ \DocInput{inputenc.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \changes{v0.01}{1994/03/09}{Created file.}
+% \changes{v0.02}{1994/07/14}{Replaced \cs{Dh} by \cs{DH} and \cs{Th}
+% by \cs{TH}.}
+% \changes{v0.02}{1994/07/14}{Added \cs{ensuremath} to some math
+% commands.}
+% \changes{v0.02}{1994/07/14}{Added \cs{inputencoding}.}
+% \changes{v0.03}{1994/09/04}{Added \cs{DeclareInputComposite} and the
+% \cs{ProvidesCommand}s to the encoding files.}
+% \changes{v0.03}{1994/09/04}{Removed the definition of the accent slots
+% in Latin-1.}
+% \changes{v0.04}{1994/10/20}{Replaced \cs{DeclareInputCharacter} by
+% \cs{DeclareInputText} and \cs{DeclareInputMath}.}
+% \changes{v0.04}{1994/10/20}{Removed \cs{DeclareInputComposite}.}
+% \changes{v0.04}{1994/10/20}{Made many Latin-1 characters math-only.}
+% \changes{v0.05}{1994/10/27}{Updated for the new version of ltoutenc.}
+% \changes{v0.06}{1994/11/21}{Added \cs{textregistered}.}
+% \changes{v0.06}{1994/11/21}{Added slot hex A0 to Latin-1.}
+% \changes{v0.07}{1994/11/22}{Fixed typo A1 rather than A0.}
+% \changes{v0.07}{1994/11/28}{Fixed where docstrip option had moved a
+% line.}
+% \changes{v0.09}{1994/12/10}{Added `beta test' message.}
+% \changes{v0.09}{1994/12/10}{Made letters active and undefined by
+% default, rather than illegal.}
+%
+% \changes{v0.9b}{1995/05/23}{Added Mac encoding, applemac.def}
+% \changes{v0.9d}{1995/06/06}{Added cp437}
+% \changes{v0.9f}{1995/09/21}{Added Next encoding, next.def}
+% \changes{v0.9h}{1995/10/22}{Added Windows 3.1 ANSI encoding,
+% ansinew.def}
+% \changes{v0.9i}{1995/11/02}{Wrapped long lines}
+% \changes{v0.9i}{1995/11/02}{Changed internal name \cs{a} to
+% \cs{@tabacckludge} to protect against redefinition by malicious
+% users.}
+% \changes{v0.9j}{1995/11/14}{Remove \cs{endinput} so docstrip reaches
+% ansinew encoding}
+% \changes{v0.9k}{1995/11/29}{Replaced uses of \cs{textsterling} with
+% \cs{pounds}.}
+% \changes{v0.9m}{1995/12/04}{Added German version}
+% \changes{v0.9m}{1995/12/04}{Replaced \cs{textasciitilde} by
+% \cs{nobreakspace}.}
+% \changes{v0.9m}{1995/12/04}{Made bullet and periodcentered text
+% glyphs rather than math glyphs.}
+% \changes{v0.9m}{1995/12/04}{Added \cs{@tabacckludge} hacks.}
+% \changes{v0.9o}{1996/02/14}
+% {Cedilla (\cs{c}\cs{ }) rather than (\cs{c}\{\}) latex/2077,
+% finished on 1996/10/28}
+% \changes{v0.9o}{1996/02/14}
+% {0F0 corrected in cp850 latex/2080}
+% \changes{v0.9o}{1996/02/14}
+% {0B2 corrected in latin2 latex/2079}
+% \changes{v0.9r}{1996/05/10}{Added cp852.def}
+% \changes{v0.9t}{1996/10/28}{Added cp865.def}
+% \changes{v0.9t}{1996/10/28}
+% {Changed \cs{aa} and \cs{AA} to \cs{r} a and \cs{r} A}
+% \changes{v0.9u}{1996/10/29}{Added more to cp865.def}
+% \changes{v0.9y}{1997/04/30}{Added latin5.def (provided by
+% H. Turgut Uyar: uyar@cs.itu.edu.tr)}
+% \changes{v0.9z}{1997/05/10}{Added latin3.def (provided by
+% J\"org Knappen and modified by Chris Rowley)}
+% \changes{v0.91}{1997/08/19}{Put
+% \cs{makeatletter}\ldots\cs{makeatother} around all .def files.}
+% \changes{v0.92}{1997/09/08}{Added decmulti.def
+% provided by M.Y. Chartoire. pr/2599}
+% \changes{v0.93}{1997/11/23}{\cs{textperthousand} not
+% \cs{textpermill}. pr/2673}
+% \changes{v0.94}{1997/12/17}{Made degree a text glyph}
+% \changes{v0.94}{1997/12/17}{Added to and tidied documentation}
+% \changes{v0.94}{1997/12/17}{Ogonek: changed
+% \cs{k}\{\} to \cs{k}\cs{ }}
+% \changes{v0.94}{1997/12/17}{NOTE: for consistency, when available
+% the robust text-or-math internal form is always used --
+% THIS MAY CHANGE}
+% \changes{v0.95}{1997/12/20}{Updated documentation}
+% \changes{v0.97}{1998/03/05}{Spanish ords changed to text chars, pr/2579}
+% \changes{v1.1b}{2006/03/04}{Number of normalisations in the LICR
+% representation (pr/3849)}
+% \changes{v1.1c}{2006/11/18}{Added missing \cs{ProvidesFile} line for cp1257 (pr/3892)}
+%
+%
+% \section{Introduction}
+%
+% This package allows the user to specify an input encoding (for
+% example, ASCII, ISO Latin-1 or Macintosh) by saying:
+% \begin{quote}
+% |\usepackage[|\emph{encoding name}|]{inputenc}|
+% \end{quote}
+% The encoding can also be selected in the document with:
+% \begin{quote}
+% |\inputencoding{|\emph{encoding name}|}|
+% \end{quote}
+% Originally this command was only to be used in vertical mode (with
+% the idea that it should be only within a document when
+% using text from several documents to build up a composite work such
+% as a volume of journal articles. However, usages in certain
+% languages suggested that it might be preferable to allow changing
+% the input encoding at any time, which is what is possible now
+% (though that is quite computing resource intensive).
+%
+% The encodings provided by this package are:
+% \begin{itemize}
+% \item |ascii| ASCII encoding for the range 32--127 (all others are made
+% invalid, i.e., this really defines a 7-bit encoding).
+% \item |latin1| ISO Latin-1 encoding.
+% \item |latin2| ISO Latin-2 encoding.
+% \item |latin3| ISO Latin-3 encoding.
+% \item |latin4| ISO Latin-4 encoding.
+% \item |latin5| ISO Latin-5 encoding.
+% \item |latin9| ISO Latin-9 encoding.
+% \item |latin10| ISO Latin-10 encoding.
+% \item |decmulti| DEC Multinational Character Set encoding.
+% \item |cp850| IBM 850 code page.
+% \item |cp852| IBM 852 code page.
+% \item |cp858| IBM 858 code page (this is 850 with Euro symbol).
+% \item |cp437| IBM 437 code page.
+% \item |cp437de| IBM 437 code page (German version).
+% \item |cp865| IBM 865 code page.
+% \item |applemac| Macintosh encoding.
+% \item |macce| Macintosh Central European code page.
+% \item |next| Next encoding.
+% \item |cp1250| Windows 1250 (central and eastern Europe) code page.
+% \item |cp1252| Windows 1252 (Western Europe) code page.
+% \item |cp1257| Windows 1257 (Baltic) code page.
+% \item |ansinew| Windows 3.1 ANSI encoding, extension of Latin-1
+% (synonym\footnote{It is now generated using the guards
+% \texttt{cp1252,ansinew} the latter only used for the provides
+% file line.} for |cp1252|).
+% \item |utf8| Unicode UTF-8 encoding support.
+% \end{itemize}
+%
+%
+%
+% \subsection{8-bit input encoding support}
+%
+% The \texttt{inputenc} package makes the upper 8-bit characters active and
+% assigns to all of them an error message. It then waits for the
+% input encoding definitions to change this set-up. Similarly, whenever
+% |\inputencoding| is encountered in a document, first the upper
+% 8-bit characters are set back to produce an error and then the
+% definitions for the new input encoding are loaded, changing some of the
+% previous settings.
+%
+%
+%
+% Each encoding has an associated |.def| file, for example
+% |latin1.def| which defines the behaviour of each input character,
+% using the commands:
+% \begin{quote}
+% |\DeclareInputText{|\emph{slot}|}{|\emph{text}|}| \\
+% |\DeclareInputMath{|\emph{slot}|}{|\emph{math}|}|
+% \end{quote}
+% This defines the input character \emph{slot} to be the
+% \emph{text} material or \emph{math} material respectively.
+% For example, |latin1.def| defines slots |"D6| (\AE)
+% and |"B5| ($\mu$) by saying:
+%\begin{verbatim}
+% \DeclareInputText{214}{\AE}
+% \DeclareInputMath{181}{\mu}
+%\end{verbatim}
+% Note that the \emph{commands} should be robust, and should not be
+% dependent on the output encoding. The same \emph{slot} should not
+% have both a text and a math declaration for it. (This restriction
+% may be removed in future releases of inputenc).
+%
+% The |.def| file may also define
+% commands using the declarations:\\
+% |\providecommand| or |\ProvideTextCommandDefault|.
+% For example:
+%\begin{verbatim}
+% \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
+% \DeclareInputText{188}{\textonequarter}
+%\end{verbatim}
+% The use of the `provide' forms here will ensure that a
+% better definition will not be over-written; their use is
+% recommended since, in general, the best definition depends on the
+% fonts available.
+%
+% See the documentation in |fntguide.tex| and |ltoutenc.dtx| for
+% details of how to declare text commands.
+%
+%
+% \subsection{UTF-8 encoding support}
+%
+%
+% The Unicode UTF-8 support works differently. It too uses a |.def| file
+% (i.e., |utf8.def|) but this file does not contain code point declarations
+% via the commands |\DeclareInputText| or |\DeclareInputMath|.
+% Instead it defines a number of
+% parsing commands that parse UTF-8 characters and then provides the
+% corresponding \LaTeX{} definitions (if possible).
+%
+% Unfortunately the number of Unicode characters that in theory could be
+% contained in a document is enormous. Thus even with today's amount of
+% computer memory it would be unrealistic to predefine all of them. Therefore the
+% approach taken by \LaTeX{} is as follows:
+% \begin{itemize}
+% \item
+% At the start of the document (|\begin{document}|) it examines all font
+% encodings that are being used within the current document.
+% \item
+% For each such font encoding it loads all known UTF-8 mappings that generate
+% characters from this font encoding.
+% \item
+% All other UTF-8 characters remain undefined and will produce an error
+% message if they appear in the document.
+% \end{itemize}
+%
+% The rationale behind this approach is that UTF-8 characters that do not
+% correspond to any glyph within the used font encodings cannot be represented
+% by \LaTeX{} anyway (without loading a font containing the glyph, which in
+% 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).
+%
+% For some languages (such as Greek mentioned above) 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
+% 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.
+%
+% If a UTF-8 mapping is missing and it is known to what \LaTeX{} definition it
+% should map to, one can manually define it using a |\DeclareUnicodeCharacter|
+% declaration. This declaration is available after inputenc has been loaded
+% with the |utf8| option.
+%
+% The |\DeclareUnicodeCharacter| takes UTF-8 code point as its first argument
+% (in form of a a hexadecimal number) and the definition that this maps to as
+% its second argument. For example, the code point |00E4| which is
+% ``LATIN SMALL LETTER A WITH DIAERESIS'' would be set up via:
+%\begin{verbatim}
+% \DeclareUnicodeCharacter{00E4}{\"a}
+%\end{verbatim}
+% Conceptually the second argument should only contain ``encoding-specific
+% commands'' as defined by \LaTeX{} font encoding concept, i.e., commands that
+% automatically change behavior if the font encoding changes (see chapter~7 of
+% the \LaTeX{} Companion for details).
+%
+% For details of the mappings per font encoding and some more technical
+% information see the file \texttt{utf8ienc.dtx} that provides UTF-8 support
+% using the \textsf{inputenc} package interface.
+%
+%
+%
+%
+% \subsection{Error messages}
+%
+% In certain situations the inputenc package generates one of the following
+% three error messages.
+%
+% \subsubsection{\normalfont\ttfamily Keyboard character used is undefined in
+% inputencoding `\meta{name}'}
+%
+% The document contains an 8-bit character that is not defined by the
+% current input encoding in force. This means that either there is a
+% mismatch between the document encoding that the document claims it
+% is in (the option to inputenc) and the real encoding this document
+% is encoded in. These days more often you find that UTF-8 is used as
+% the encoding when saving a file in some text editor.
+%
+% Of course, it is also possible that the input encoding |.def| file is
+% defective and the offending code point is simply missing from that file.
+% Please check if the encoding file is one of the list above prior to
+% reporting an error---on the net there are many additional encoding files
+% supported by third parties.
+%
+%
+%
+% \subsubsection{\normalfont\ttfamily Cannot define Unicode char value < 00A0}
+%
+% This error message is shown if one tries to define a UTF-8 character
+% with a code point lower than |00A0|. Those cannot be defined in
+% \LaTeX{} through the |\DeclareUnicodeCharacter|.
+%
+%
+% \subsubsection{\normalfont\ttfamily Unicode char \meta{charcode} not set up
+% for use with LaTeX}
+%
+% This is the dreaded error message that one will receive if the
+% document contains an UTF-8 character that isn't known to \LaTeX{}.
+% It is quite possible that the character looks very unsuspicious and
+% is rendered perfectly in the editor.
+%
+% For example, when entering a Euro symbol from the keyboard one may receive
+% this error rather than a typeset symbol. But if this happens the reason is
+% simply that the document doesn't load a font containing the Euro symbol,
+% e.g., via the |textcomp| package. Thus \LaTeX{} does not know how to typeset
+% one and therefore responds with this error message.
+%
+% However, even if \LaTeX{} can type that character in question it may not
+% have been set up in which case you would need to do that yourself via
+% |\DeclareUnicodeCharacter|. If you provide these declarations for a full
+% font encoding then please contribute that work to this package so that
+% others can benefit too.
+%
+%
+%
+%
+
+% \subsection{Programmers interface}
+%
+% To better support packages that manage their own character mappings and
+% therefore have to react to input encoding changes, the following three
+% commands have been added in version 1.1a:
+%
+% \DescribeMacro\inputencodingname This command stores the name of the current
+% input encoding.
+%
+% \DescribeMacro\inpenc@prehook
+% \DescribeMacro\inpenc@posthook These two are token registers that are
+% executed whenever an |\inputencoding| change happens. The first is executed at
+% the very beginning, i.e., with |\inputencodingname| still pointing to the
+% encoding name currently in place while the second one is executed at the very
+% end, i.e., when |\inputencoding| has build a new mapping.
+%
+% Packages making use of this new features should consider including the
+% following line
+%\begin{verbatim}
+% \NeedsTeXFormat{LaTeX2e}[2005/12/01]
+%\end{verbatim}
+% as these commands haven't been available in \textsf{inputenc} distributed
+% with older releases of \LaTeX{}.
+%
+
+% \StopEventually{}
+%
+% \section{Announcing the files}
+%
+% We announce the files:
+% \begin{macrocode}
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+%<package>\ProvidesPackage{inputenc}
+%<ascii> \ProvidesFile{ascii.def}
+%<latin1> \ProvidesFile{latin1.def}
+%<latin2> \ProvidesFile{latin2.def}
+%<latin3> \ProvidesFile{latin3.def}
+%<latin4> \ProvidesFile{latin4.def}
+%<latin5> \ProvidesFile{latin5.def}
+%<latin9> \ProvidesFile{latin9.def}
+%<latin10> \ProvidesFile{latin10.def}
+%<decmulti> \ProvidesFile{decmulti.def}
+%<cp850> \ProvidesFile{cp850.def}
+%<cp852> \ProvidesFile{cp852.def}
+%<cp858> \ProvidesFile{cp858.def}
+%<cp437> \ProvidesFile{cp437.def}
+%<cp437de> \ProvidesFile{cp437de.def}
+%<cp865> \ProvidesFile{cp865.def}
+%<applemac> \ProvidesFile{applemac.def}
+%<applemacce> \ProvidesFile{macce.def}
+%<next> \ProvidesFile{next.def}
+%<ansinew> \ProvidesFile{ansinew.def}
+%<cp1252&!ansinew> \ProvidesFile{cp1252.def}
+%<cp1250> \ProvidesFile{cp1250.def}
+%<cp1257> \ProvidesFile{cp1257.def}
+ [2018/08/11 v1.3c Input encoding file]
+%<cp850>%%
+%<cp850>%% If you need a Euro symbol, try cp858 instead.
+%<cp850>%%
+% \end{macrocode}
+%
+% \section{The package}
+%
+% \changes{v0.99c}{2002/11/11}{Added cp858 (pr/3464)}
+%
+% \changes{v0.04}{1994/10/20}{Improved coding of \cs{DeclareInputText}
+% and changed name from \cs{DeclareInputCharacter}.}
+%
+% \changes{v0.9g}{1995/10/19}{Replaced \cs{'} \cs{`} \cs{!=} by
+% \cs{a'} \cs{a`} \cs{a!=} in order to get correct accents in
+% a tabbing environment.}
+%
+% \changes{v0.9w}{1996/11/23}{Correct documentation
+% of \cs{@tabacckludge}}
+%
+% \changes{v0.9x}{1997/03/21}{Use decimal rather than hex
+% to avoid active character problems. latex/2451.}
+%
+% Before we start with the code, an important comment is in order:
+% as you may or may not know, the |tabbing| environment changes the
+% definition of the commands |\'|, |\`|, and |\=|. Outside such an
+% environment these commands produce the corresponding accents, inside
+% they are used for special text positioning, and the accents can be
+% accessed using |\a'|, |\a`|, and |\a=|. Therefore we \emph{must} use
+% the latter instead of the former in the second argument to
+% |\DeclareInputText|, e.g. (from |latin1.def|):
+% \begin{verbatim}
+% \DeclareInputText{224}{\@tabacckludge`a}
+%\end{verbatim}
+% The command |\@tabacckludge| is defined (in |ltoutenc.dtx|) in such
+% a way that |\@tabacckludge'| will expand to the internal form of |\'|.
+% Thus it is |\'| that is carried around \emph{internally} (the
+% same applies to the other two accent commands).
+%
+% \begin{macro}{\DeclareInputText}
+% \begin{macro}{\DeclareInputMath}
+% \begin{macro}{\IeC}
+% These commands declare the expansion of an active character. The
+% math declaration is the usual trick with |\uppercase|.
+% The text declaration is sneakier, since in text space matters.
+% We look to see if the definition ends in a macro, by checking
+% whether it's |\meaning| ends in a space. If it does, then we
+% add an irrelevant |\IeC| and braces around the definition, in
+% order to avoid any space after the active char being gobbled up
+% once the text is written out to an auxiliary file.
+%
+% The definition should contain only robust commands (and, for
+% correct ligatures and kerning, they must be defined via the
+% interfaces in the fontenc package).
+%
+% \changes{v0.9b}{1995/05/23}{Added hackery with \cs{IeC} in order to
+% avoid space being gobbled.}
+%
+% \begin{macrocode}
+%<*package>
+\def\DeclareInputMath#1{%
+ \@inpenc@test
+ \bgroup
+ \uccode`\~#1%
+ \uppercase{%
+ \egroup
+ \def~%
+ }%
+}
+% \end{macrocode}
+% \changes{v1.0a}{2003/01/17}{Now coding according to suggestion by David (pr/2004)}
+% \changes{v1.0b}{2003/12/29}{but better do it properly}
+% \changes{v1.0?}{2004/01/19}{or even correctly}
+% \begin{macrocode}
+\def\DeclareInputText#1#2{%
+ \def\reserved@a##1 ${}%
+ \def\reserved@b{#2}%
+ \ifcat_\expandafter\reserved@a\meaning\reserved@b$ $_%
+ \DeclareInputMath{#1}{#2}%
+ \else
+ \DeclareInputMath{#1}{\IeC{#2}}%
+ \fi
+}
+% \end{macrocode}
+% The definition of |\IeC| was modified not to insert a |\protect|
+% unless it is needed, this means it works in |\hyphenation|
+% commands, and other such delicate places. It was then further
+% changed to never insert a |\protect| as one is never needed; this
+% makes it work in even more places.
+%
+% This still needs some attention.
+%
+% \changes{v0.9m}{1995/12/12}{Modified \cs{IeC} in order to
+% work in \cs{hyphenation} latex/2004.}
+%
+% \changes{v0.94}{1997/12/17}{Changed non-typeset case from
+% \cs{protect} to \cs{noexpand}: temporary fix.}
+%
+% \begin{macrocode}
+\def\IeC{%
+ \ifx\protect\@typeset@protect
+ \expandafter\@firstofone
+ \else
+ \noexpand\IeC
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\inputencoding}
+% \changes{v0.9q}{1996/05/09}
+% {Allow characters below 32 for latex/2071}
+% \changes{v0.9q}{1996/05/09}
+% {Check the def file was reasonable for latex/2136}
+% \changes{v0.94}{1997/12/17}{Changed to work only in outer vmode, see
+% latex/2608}
+% \changes{v0.94}{1997/12/17}{Warning message reworded and line
+% number added, also for latex/2608}
+% \changes{v0.95}{1997/12/20}{Changed to work in any vmode, for David}
+% \changes{v1.2a}{2014/04/20}{Added alternative definition for xe/lua tex (pr/4024)}%
+% \changes{v1.2b}{2014/04/30}{Allow (x-)ascii and utf8x aliases for utf8 in xetex/luatex}%
+% \changes{v1.3a}{2018/03/24}{Make \cs{inputencoding} do nothing if
+% the argument matches current encoding}%
+% This sets the encoding to be |#1|. It first sets all the
+% characters 128--255 to be active (and sets their initial
+% definition to be |\@inpenc@undefined|).
+% It now also does this for some `low' codes below 32, but
+% misses out Null, control-I, control-J, control-L and control-M.
+%
+% It then inputs |#1.def|. But it first sets up a test that
+% produces a warning message if no suitable definitions get read.
+%
+% \begin{macrocode}
+\ifx\Umathchar\@undefined
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\inputencoding#1{%
+ \edef\reserved@a{#1}%
+ \ifx\reserved@a\inputencodingname
+ \else
+% \end{macrocode}
+% We start with a hook to be executed before the encoding change
+% happens.
+% \changes{v1.1a}{2006/02/22}{Added \cs{inpenc@prehook}}
+% \begin{macrocode}
+ \the\inpenc@prehook
+ \gdef\@inpenc@test{\global\let\@inpenc@test\relax}%
+% \end{macrocode}
+% Keyboard characters which don't get a definition will be mapped to
+% the command
+% |\@inpenc@undefined| which gets a definition producing an error
+% message indicating in which input encoding the current keyboard
+% character is undefined:
+% \changes{v0.98}{1998/07/04}{Give better error message if key used
+% is undefined (pr/2845)}
+% \changes{v0.993}{2000/01/24}{Fix error message for undefined chars
+% (pr/3158)}
+% \changes{v1.2a}{2014/04/20}{add \cs{protect} so undefined characters are robust (pr/4182)}%
+% \begin{macrocode}
+ \edef\@inpenc@undefined{\noexpand\protect\noexpand\@inpenc@undefined@{#1}}%
+% \end{macrocode}
+% The |\edef| in the above definition is essential as |#1| may be
+% |\CurrentOption| in which case a later use would return incorrect
+% information (at best nothing).
+%
+% For external lookup by other packages we also store the new encoding name
+% in a user accessible macro.
+% \changes{v1.1a}{2006/02/22}{Added \cs{inputencodingname}}
+% \begin{macrocode}
+ \edef\inputencodingname{#1}%
+% \end{macrocode}
+%
+% Now we make all potential input characters active.
+% \changes{v0.994}{2000/01/27}{Allow change also in horizontal mode
+% (pr/2888)}
+% \begin{macrocode}
+ \@inpenc@loop\^^A\^^H%
+ \@inpenc@loop\^^K\^^K%
+ \@inpenc@loop\^^N\^^_%
+ \@inpenc@loop\^^?\^^ff%
+% \end{macrocode}
+%
+% To be able to process the input encoding file in horizontal mode
+% we need to ensure that we don't get any stray spaces into the
+% horizontal mode or else we end up with extra space in the
+% paragraph.
+% \changes{v0.998}{2001/05/25}{Suppress all spaces for horizontal mode
+% (pr/3273)}
+% \changes{v1.0f}{2004/05/06}{Really do (pr/3273)}
+% \changes{v1.1d}{2007/08/06}{Set \cs{endlinechar} properly (pr/3926)}
+% \changes{v1.1e}{2012/06/06}{Save and restore \cs{catcode} of @ (pr/4192)}
+% \changes{v1.2c}{2015/03/17}{Save and restore \cs{catcode} of percent (pr/4420)}
+% \begin{macrocode}
+ \xdef\saved@endlinechar@code{\the\endlinechar}%
+ \endlinechar\m@ne
+ \xdef\saved@space@catcode{\the\catcode`\ }%
+ \catcode`\ 9\relax
+ \xdef\saved@at@catcode{\the\catcode`\@}%
+ \makeatletter
+ \xdef\saved@percent@catcode{\the\catcode`\%}%
+ \catcode`\%14\relax
+ \input{#1.def}%
+ \endlinechar\saved@endlinechar@code\relax
+ \catcode`\ \saved@space@catcode\relax
+ \catcode`\@\saved@at@catcode\relax
+ \catcode`\%\saved@percent@catcode\relax
+% \end{macrocode}
+%
+% If there have been no |\DeclareInputText| or |\DeclareInputMath|
+% commands read then something is amiss.
+% \begin{macrocode}
+ \ifx\@inpenc@test\relax\else
+ \PackageWarning{inputenc}%
+ {No characters defined\MessageBreak
+ by input encoding change to `#1'\MessageBreak}%
+ \fi
+% \end{macrocode}
+% We finish with a hook to be executed after the encoding change
+% happens.
+% \changes{v1.1a}{2006/02/22}{Added \cs{inpenc@posthook}}
+% \begin{macrocode}
+ \the\inpenc@posthook
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% Unicode based TeX engines do not require this package at all, and always use UTF-8
+% input. Allow the package to be used if |[utf8]| or |[ascii]| options are used to simplify
+% switching between TeX engines.
+% \begin{macrocode}
+\def\inputencoding#1{%
+\edef\reserved@a{#1}%
+\def\reserved@b{utf8x}%
+\ifx\reserved@a\reserved@b\def\reserved@a{utf8}\fi
+\def\reserved@b{utf8}%
+\ifx\reserved@a\reserved@b
+\PackageWarningNoLine
+ {inputenc}%
+ {inputenc package ignored with utf8 based engines}%
+\else
+\def\reserved@b{x-ascii}%
+\ifx\reserved@a\reserved@b\def\reserved@a{ascii}\fi
+\def\reserved@b{ascii}%
+\ifx\reserved@a\reserved@b
+\PackageWarningNoLine
+ {inputenc}%
+ {inputenc can't be used to ensure 7bit clean source\MessageBreak
+ with a utf engine: Package ignored: utf8 assumed}%
+\else
+\PackageError
+ {inputenc}%
+ {inputenc is not designed for xetex or luatex.\MessageBreak
+ only UTF-8 supported}%
+ {For xelatex or lualatex save the document in UTF-8 encoding\MessageBreak
+ and do not use inputenc, or use the [utf8] option.}
+\fi
+\fi
+}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\inpenc@prehook}
+% \changes{v1.1a}{2006/02/22}{Hook added}
+% \begin{macro}{\inpenc@posthook}
+% \changes{v1.1a}{2006/02/22}{Hook added}
+% Two hooks to be executed before and after an encoding changes happened.
+% \begin{macrocode}
+\ifx\inpenc@prehook\@undefined\newtoks\inpenc@prehook\fi
+\ifx\inpenc@posthook\@undefined\newtoks\inpenc@posthook\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@inpenc@undefined@}
+% This command will assigned to any active character unless it
+% get a proper definition by the encoding. The argument is the
+% current encoding name.
+% \changes{v0.993}{2000/01/24}{Fix error message for undefined chars
+% (pr/3158)}
+% \begin{macrocode}
+\def\@inpenc@undefined@#1{\PackageError{inputenc}%
+ {Keyboard character used is undefined\MessageBreak
+ in inputencoding `#1'}%
+ {You need to provide a definition with
+ \noexpand\DeclareInputText\MessageBreak or
+ \noexpand\DeclareInputMath before using this key.}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@inpenc@loop}
+% \changes{v0.9q}{1996/05/09}
+% {Macro added}
+% \changes{v0.9v}{1996/11/07}
+% {Exit from the top of loop fixed for latex/2257}
+% Make characters |#1| to |#2| inclusive active and undefined.
+% \begin{macrocode}
+\def\@inpenc@loop#1#2{%
+ \@tempcnta`#1\relax
+ \loop
+ \catcode\@tempcnta\active
+ \bgroup
+ \uccode`\~\@tempcnta
+ \uppercase{%
+ \egroup
+ \let~\@inpenc@undefined
+ }%
+ \ifnum\@tempcnta<`#2\relax
+ \advance\@tempcnta\@ne
+ \repeat}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Then for each option, we input that encoding file.
+% Only exception: for utf8x (from \texttt{ucs} package) we
+% first restore the raw input encoding. That should be moved to the
+% \texttt{utf8x.def} file, eventually.
+% In case of a rollback |\UseRawInputEncoding| is not defined so we
+% only input the encoding.
+% \changes{v1.3b}{2018/04/06}{Handle utf8x encoding manually for now}
+% \begin{macrocode}
+\DeclareOption{utf8x}{\ifdefined\UseRawInputEncoding
+ \UseRawInputEncoding
+ \fi
+ \inputencoding{\CurrentOption}}
+\DeclareOption*{\inputencoding{\CurrentOption}}
+\ProcessOptions
+%</package>
+% \end{macrocode}
+%
+%
+% \section{Default definitions for characters}
+%
+% Some input characters map to internal functions which are not in
+% either the |T1| or |OT1| font encoding. For this reason default
+% definitions are provided in the encoding file: these will be
+% used unless some other output encoding is used which supports
+% those glyphs. In some cases this default definition has to be
+% simply an error message.
+%
+% Note that this works reasonably well only because the encoding
+% files for both |OT1| and |T1| are loaded in the standard LaTeX
+% format.
+%
+% \changes{v0.9a}{1995/04/23}{Default settings moved to own section}
+%
+% \changes{v0.9b}{1995/05/23}{Corrected ordmasc and ordfem which had
+% been switched by mistake.}
+%
+% \changes{v0.9k}{1995/11/29}{Moved \cs{textregistered} and
+% \cs{texttrademark} to the kernel.}
+% \changes{v0.9k}{1995/11/29}{Added default commands for Next input
+% encoding.}
+%
+% \changes{v0.9m}{1995/12/04}{Added \cs{ensuremath} to definitions of
+% the fraction glyphs.}
+%
+% \changes{v0.9t}{1996/10/28}
+% {Added \cs{textblacksquare}}
+% \changes{v0.9u}{1996/10/29}
+% {Corrected code for \cs{textblacksquare}}
+%
+% \changes{v0.9u}{1996/10/29}
+% {Added cp865 and corrected cp850, cp852 and cp437 guards}
+% \changes{v0.94}{1997/12/17}{Removed entries that were solely in
+% next.def}
+% \changes{v0.995}{2000/05/22}{Added latin2 option for textdegree
+% (pr/3207) CAR}
+%
+% \changes{v1.3c}{2018/08/11}{Use \cs{guillemetleft} and \cs{guillemetright}
+% instead of old Adobe names in all encoding files}
+%
+% The name |\textblacksquare| is derived from the AMS symbol name since
+% Adobe seem not to want this symbol. The default definition, as a
+% rule, makes no claim to being a good design.
+%
+% Some entries are repeated in case guards must all be on one line.
+% \begin{macrocode}
+%<*latin1|decmulti|latin2|latin3|latin4|latin5|latin9|applemacce|latin10>
+\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
+%</latin1|decmulti|latin2|latin3|latin4|latin5|latin9|applemacce|latin10>
+%<*cp850|cp858|cp852|cp865|cp437|cp437de|applemac|cp1252|cp1250|cp1257|next>
+\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
+%</cp850|cp858|cp852|cp865|cp437|cp437de|applemac|cp1252|cp1250|cp1257|next>
+%<*latin1|decmulti|latin3|latin5|cp850|cp858|cp852|cp1252|cp1257|next>
+\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
+%</latin1|decmulti|latin3|latin5|cp850|cp858|cp852|cp1252|cp1257|next>
+%<*latin1|decmulti|latin5|cp850|cp858|cp852|cp1252|cp1257|next>
+\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
+%</latin1|decmulti|latin5|cp850|cp858|cp852|cp1252|cp1257|next>
+%<*latin1|latin5|cp850|cp858|cp852|cp1252|cp1257|next>
+\ProvideTextCommandDefault{\textthreequarters}{\ensuremath{\frac34}}
+%</latin1|latin5|cp850|cp858|cp852|cp1252|cp1257|next>
+%<*applemac|cp850|cp858|cp865|cp437|cp437de|cp1252|next>
+\ProvideTextCommandDefault{\textflorin}{\textit{f}}
+%</applemac|cp850|cp858|cp865|cp437|cp437de|cp1252|next>
+%<*cp865|cp437|cp437de>
+\ProvideTextCommandDefault{\textpeseta}{Pt}
+%</cp865|cp437|cp437de>
+%<*cp850|cp858|cp852|cp865|cp437|cp437de>
+\ProvideTextCommandDefault{\textblacksquare}
+{\vrule \@width .3em \@height .4em \@depth -.1em\relax}
+%</cp850|cp858|cp852|cp865|cp437|cp437de>
+% \end{macrocode}
+%
+% \changes{v0.9k}{1995/11/29}{Added error messages for unavailable
+% characters.}
+%
+% Some commands can't be faked, so we have them generate an error
+% message.
+% \begin{macrocode}
+%<*latin1|decmulti|latin5|latin9|cp850|cp858|cp865|cp437|cp437de>
+\ProvideTextCommandDefault{\textcent}
+ {\TextSymbolUnavailable\textcent}
+\ProvideTextCommandDefault{\textyen}
+ {\TextSymbolUnavailable\textyen}
+%</latin1|decmulti|latin5|latin9|cp850|cp858|cp865|cp437|cp437de>
+%<*applemac|cp1252|next>
+\ProvideTextCommandDefault{\textcent}
+ {\TextSymbolUnavailable\textcent}
+\ProvideTextCommandDefault{\textyen}
+ {\TextSymbolUnavailable\textyen}
+%</applemac|cp1252|next>
+%<*cp1257>
+\ProvideTextCommandDefault{\textcent}
+ {\TextSymbolUnavailable\textcent}
+%</cp1257>
+%<*latin9|cp1252|cp1257|latin10>
+\ProvideTextCommandDefault{\texteuro}
+ {\TextSymbolUnavailable\texteuro}
+%</latin9|cp1252|cp1257|latin10>
+%<*latin1|decmulti|latin2|latin3|latin4|latin5|cp850|cp858|cp852|cp865>
+\ProvideTextCommandDefault{\textcurrency}
+ {\TextSymbolUnavailable\textcurrency}
+%</latin1|decmulti|latin2|latin3|latin4|latin5|cp850|cp858|cp852|cp865>
+%<*applemac|cp1252|cp1250|cp1257|next>
+\ProvideTextCommandDefault{\textcurrency}
+ {\TextSymbolUnavailable\textcurrency}
+%</applemac|cp1252|cp1250|cp1257|next>
+%<*latin1|latin5|cp850|cp858|cp852|cp1252|cp1250|cp1257>
+\ProvideTextCommandDefault{\textbrokenbar}
+ {\TextSymbolUnavailable\textbrokenbar}
+%</latin1|latin5|cp850|cp858|cp852|cp1252|cp1250|cp1257>
+%<*latin3>
+\ProvideTextCommandDefault{\textmalteseH}
+ {\TextSymbolUnavailable\textmalteseH}
+\ProvideTextCommandDefault{\textmalteseh}
+ {\TextSymbolUnavailable\textmalteseh}
+%</latin3>
+%<*latin4>
+\ProvideTextCommandDefault{\textkra}
+ {\TextSymbolUnavailable\textkra}
+\ProvideTextCommandDefault{\textTstroke}
+ {\TextSymbolUnavailable\textTstroke}
+\ProvideTextCommandDefault{\texttstroke}
+ {\TextSymbolUnavailable\texttstroke}
+%</latin4>
+%<*cp1250|cp1252|cp1257|applemac|next>
+\ProvideTextCommandDefault{\textperthousand}
+ {\TextSymbolUnavailable\textperthousand}
+%</cp1250|cp1252|cp1257|applemac|next>
+%<*applemacce>
+\ProvideTextCommandDefault{\textdiv}
+ {\TextSymbolUnavailable\textdiv}
+%</applemacce>
+% \end{macrocode}
+%
+% \changes{v0.9l}{1995/12/01}{Removed extraneous braces from the
+% `superior' glyphs.}
+% \changes{v0.97}{1998/03/05}{Removed ords:
+% changed to text chars, pr/2579}
+%
+% Characters that are supposed to be used only in math will be defined
+% by |\providecommand| because \LaTeXe{} assumes that the font
+% encoding for math fonts is static.
+%
+% \begin{macrocode}
+%<*latin1|decmulti|latin5|latin9|cp850|cp858|cp1252|cp1257|next>
+\providecommand{\mathonesuperior}{{^1}}
+%</latin1|decmulti|latin5|latin9|cp850|cp858|cp1252|cp1257|next>
+%<*latin1|decmulti|latin3|latin5|latin9|cp850|cp858|cp1252|cp1257|next>
+\providecommand{\maththreesuperior}{{^3}}
+%</latin1|decmulti|latin3|latin5|latin9|cp850|cp858|cp1252|cp1257|next>
+%<*latin1|decmulti|latin3|latin5|latin9|cp850|cp858|cp865|cp437|cp437de>
+\providecommand{\mathtwosuperior}{{^2}}
+%</latin1|decmulti|latin3|latin5|latin9|cp850|cp858|cp865|cp437|cp437de>
+%<*cp1252|cp1257|next>
+\providecommand{\mathtwosuperior}{{^2}}
+%</cp1252|cp1257|next>
+%<*cp865|cp437|cp437de>
+\providecommand{\mathnsuperior}{{^n}}
+%</cp865|cp437|cp437de>
+% \end{macrocode}
+%
+% \section{The ASCII encoding}
+%
+% The ASCII encoding only allows characters in the range 32--127, so
+% we only need to provide a more or less empty |.def| file.
+% But we suppress the warning that would normally appear if there are no
+% encoding definitions.
+%
+% \changes{v1.1b}{2006/03/03}{Suppress unnecessary warning (pr/3849)}
+% \begin{macrocode}
+%<ascii>\@inpenc@test
+% \end{macrocode}
+%
+% \changes{v0.94}{1997/12/17}{Merged latin1 with ansinew/cp1252}
+%
+% \section{The ISO Latin-2 encoding}
+%
+% The ISO Latin-2 encoding file defines the characters
+% in the ISO 8859-2 encoding. It was contributed by
+% Petr Sojka (\texttt{sojka@muni.cz}) with small technical
+% updates by Frank Mittelbach.
+%
+% \changes{v0.9e}{1995/08/31}{Redeclared "AD to be soft hyphen.}
+% \changes{v0.91}{1997/08/19}{Replaced \cs{dh}/\cs{DH} by
+% \cs{dj}/\cs{DJ}.}
+% \changes{v0.94}{1997/12/17}{Changed 176 to \cs{textdegree}}
+%
+% \begin{macrocode}
+%<*latin2>
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{161}{\k A}
+\DeclareInputText{177}{\k a}
+\DeclareInputText{162}{\u{}}
+\DeclareInputText{178}{\k\ }
+\DeclareInputText{163}{\L}
+\DeclareInputText{179}{\l}
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{180}{\@tabacckludge'{}}
+\DeclareInputText{165}{\v L}
+\DeclareInputText{181}{\v l}
+\DeclareInputText{166}{\@tabacckludge'S}
+\DeclareInputText{182}{\@tabacckludge's}
+\DeclareInputText{167}{\S}
+\DeclareInputText{183}{\v{}}
+\DeclareInputText{168}{\"{}}
+\DeclareInputText{184}{\c\ }
+\DeclareInputText{169}{\v S}
+\DeclareInputText{185}{\v s}
+\DeclareInputText{170}{\c S}
+\DeclareInputText{186}{\c s}
+\DeclareInputText{171}{\v T}
+\DeclareInputText{187}{\v t}
+\DeclareInputText{172}{\@tabacckludge'Z}
+\DeclareInputText{188}{\@tabacckludge'z}
+\DeclareInputText{173}{\-}
+\DeclareInputText{189}{\H{}}
+\DeclareInputText{174}{\v Z}
+\DeclareInputText{190}{\v z}
+\DeclareInputText{175}{\.Z}
+\DeclareInputText{191}{\.z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge'R}
+\DeclareInputText{208}{\DJ}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{209}{\@tabacckludge'N}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{210}{\v N}
+\DeclareInputText{195}{\u A}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{197}{\@tabacckludge'L}
+\DeclareInputText{213}{\H O}
+\DeclareInputText{198}{\@tabacckludge'C}
+\DeclareInputText{214}{\"O}
+\DeclareInputText{199}{\c C}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{200}{\v C}
+\DeclareInputText{216}{\v R}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{217}{\r U}
+\DeclareInputText{202}{\k E}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{219}{\H U}
+\DeclareInputText{204}{\v E}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{221}{\@tabacckludge'Y}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{222}{\c T}
+\DeclareInputText{207}{\v D}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge'r}
+\DeclareInputText{240}{\dj}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{241}{\@tabacckludge'n}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{242}{\v n}
+\DeclareInputText{227}{\u a}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{229}{\@tabacckludge'l}
+\DeclareInputText{245}{\H o}
+\DeclareInputText{230}{\@tabacckludge'c}
+\DeclareInputText{246}{\"o}
+\DeclareInputText{231}{\c c}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{232}{\v c}
+\DeclareInputText{248}{\v r}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{249}{\r u}
+\DeclareInputText{234}{\k e}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{251}{\H u}
+\DeclareInputText{236}{\v e}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{253}{\@tabacckludge'y}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{254}{\c t}
+\DeclareInputText{239}{\v d}
+\DeclareInputText{255}{\.{}}
+%</latin2>
+% \end{macrocode}
+%
+% \section{The ISO Latin-3 encoding}
+%
+% The ISO Latin-3 encoding file defines the characters
+% in the ISO 8859-3 encoding. It was contributed by
+% by J\"org Knappen (\texttt{joerg.knappen@uni-mainz.de}) and
+% adapted by Chris Rowley.
+%
+% It can be used for general purpose applications in
+% typical office environments in the following languages:
+% Afrikaans, Catalan, English, Esperanto, French, Galician, German,
+% Italian, Maltese, and Turkish.
+%
+% \begin{macrocode}
+%<*latin3>
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{161}{\textmalteseH}
+\DeclareInputText{177}{\textmalteseh}
+\DeclareInputText{162}{\u{}}
+\DeclareInputMath{178}{\mathtwosuperior}
+\DeclareInputText{163}{\pounds}
+\DeclareInputMath{179}{\maththreesuperior}
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{180}{\@tabacckludge'{}}
+% \DeclareInputText{165}{\notdef}
+\DeclareInputMath{181}{\mu}
+\DeclareInputText{166}{\^H}
+% NOT: \DeclareInputText{182}{h\llap{\^{}}} % \^h would be too tall
+\DeclareInputText{182}{\^h}
+\DeclareInputText{167}{\S}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{168}{\"{}}
+\DeclareInputText{184}{\c\ }
+\DeclareInputText{169}{\.I}
+\DeclareInputText{185}{\i}
+\DeclareInputText{170}{\c S}
+\DeclareInputText{186}{\c s}
+\DeclareInputText{171}{\u G}
+\DeclareInputText{187}{\u g}
+\DeclareInputText{172}{\^J}
+\DeclareInputText{188}{\^\j}
+\DeclareInputText{173}{\-}
+\DeclareInputText{189}{\textonehalf}
+% \DeclareInputText{174}{\notdef}
+% \DeclareInputText{190}{\notdef}
+\DeclareInputText{175}{\.Z}
+\DeclareInputText{191}{\.z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge`A}
+% \DeclareInputText{208}{\notdef}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{209}{\~N}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{210}{\@tabacckludge`O}
+% \DeclareInputText{195}{\notdef}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{197}{\.C}
+\DeclareInputText{213}{\.G}
+\DeclareInputText{198}{\^C}
+\DeclareInputText{214}{\"O}
+\DeclareInputText{199}{\c C}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{200}{\@tabacckludge`E}
+\DeclareInputText{216}{\^G}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{217}{\@tabacckludge`U}
+\DeclareInputText{202}{\^E}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{219}{\^U}
+\DeclareInputText{204}{\@tabacckludge`I}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{221}{\u U}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{222}{\^S}
+\DeclareInputText{207}{\"I}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge`a}
+% \DeclareInputText{240}{\notdef}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{241}{\~n}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{242}{\@tabacckludge`o}
+% \DeclareInputText{227}{\notdef}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{229}{\.c}
+\DeclareInputText{245}{\.g}
+\DeclareInputText{230}{\^c}
+\DeclareInputText{246}{\"o}
+\DeclareInputText{231}{\c c}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{232}{\@tabacckludge`e}
+\DeclareInputText{248}{\^g}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{249}{\@tabacckludge`u}
+\DeclareInputText{234}{\^e}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{251}{\^u}
+\DeclareInputText{236}{\@tabacckludge`\i}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{253}{\u u}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{254}{\^s}
+\DeclareInputText{239}{\"\i}
+\DeclareInputText{255}{\.{}}
+%</latin3>
+% \end{macrocode}
+%
+% \section{The ISO Latin-4 encoding}
+%
+% The ISO Latin-4 encoding file defines the characters in the ISO
+% 8859-4 encoding. It was contributed by Hana Skoumalov\'a
+% (\texttt{hana.skoumalova@ff.cuni.cz}).
+%
+% It was created for Estonian, Latvian, Lithuanian, Finnish, Lappish,
+% Swedish, Norwegian, Danish, Icelandic and Greenlandic Inuit. Some
+% alphabets, however, are incomplete (Greenlandic, Icelandic and Lappish).
+% Some glyphs are not available in the fonts. For example, the
+% Greenlandic character `kra' is not available at all;
+% the Latvian and Lithuanian characters not
+% contained in other encodings are constructed from components and
+% they do not look good.
+%
+% \changes{v0.999}{2001/06/04}{Added \cs{textkra}, \cs{texttstroke} and
+% \cs{textTstroke} (pr/3336)}
+% \begin{macrocode}
+%<*latin4>
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{161}{\k A}
+\DeclareInputText{162}{\textkra}%% Greenlandic Inuit
+\DeclareInputText{163}{\c R}
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{165}{\~I}
+\DeclareInputText{166}{\c L}
+\DeclareInputText{167}{\S}
+\DeclareInputText{168}{\"{}}
+\DeclareInputText{169}{\v S}
+\DeclareInputText{170}{\@tabacckludge=E}
+\DeclareInputText{171}{\c G}
+\DeclareInputText{172}{\textTstroke}%% Northern Sami
+\DeclareInputText{173}{\-}
+\DeclareInputText{174}{\v Z}
+\DeclareInputText{175}{\@tabacckludge={}}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{177}{\k a}
+\DeclareInputText{178}{\k\ }
+\DeclareInputText{179}{\c r}
+\DeclareInputText{180}{\@tabacckludge'{}}
+\DeclareInputText{181}{\~\i}
+\DeclareInputText{182}{\c l}
+\DeclareInputText{183}{\v{}}
+\DeclareInputText{184}{\c\ }
+\DeclareInputText{185}{\v s}
+\DeclareInputText{186}{\@tabacckludge=e}
+\DeclareInputText{187}{\c g}
+\DeclareInputText{188}{\texttstroke}%% Northern Sami
+\DeclareInputText{189}{\NG}
+\DeclareInputText{190}{\v z}
+\DeclareInputText{191}{\ng}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge=A}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{195}{\~A}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{197}{\r A}
+\DeclareInputText{198}{\AE}
+\DeclareInputText{199}{\k I}
+\DeclareInputText{200}{\v C}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{202}{\k E}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{204}{\.{E}}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{207}{\@tabacckludge=I}
+\DeclareInputText{208}{\DJ}
+\DeclareInputText{209}{\c N}
+\DeclareInputText{210}{\@tabacckludge=O}
+\DeclareInputText{211}{\c K}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{213}{\~O}
+\DeclareInputText{214}{\"O}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{216}{\O}
+\DeclareInputText{217}{\k U}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{219}{\^U}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{221}{\~U}
+\DeclareInputText{222}{\@tabacckludge=U}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge=a}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{227}{\~a}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{229}{\r a}
+\DeclareInputText{230}{\ae}
+\DeclareInputText{231}{\k i}
+\DeclareInputText{232}{\v c}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{234}{\k e}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{236}{\.{e}}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{239}{\@tabacckludge=\i}
+\DeclareInputText{240}{\dj}
+\DeclareInputText{241}{\c n}
+\DeclareInputText{242}{\@tabacckludge=o}
+\DeclareInputText{243}{\c k}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{245}{\~o}
+\DeclareInputText{246}{\"o}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{248}{\o}
+\DeclareInputText{249}{\k u}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{251}{\^u}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{253}{\~u}
+\DeclareInputText{254}{\@tabacckludge=u}
+\DeclareInputText{255}{\.{}}
+%</latin4>
+% \end{macrocode}
+%
+% \section{The ISO Latin-5 encoding}
+%
+% \changes{v0.991}{1999/08/23}{Corrected description for Latin-5.}
+% The ISO Latin-5 encoding file defines the characters
+% in the ISO 8859-9 encoding, which describes Latin Alphabet No. 5.
+% It was contributed by H.~Turgut Uyar (\texttt{uyar@cs.itu.edu.tr});
+% it is used for Turkish.
+%
+% \begin{macrocode}
+%<*latin5>
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{161}{\textexclamdown}
+\DeclareInputMath{177}{\pm}
+\DeclareInputText{162}{\textcent}
+\DeclareInputMath{178}{\mathtwosuperior}
+\DeclareInputText{163}{\pounds}
+\DeclareInputMath{179}{\maththreesuperior}
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{180}{\@tabacckludge'{}}
+\DeclareInputText{165}{\textyen}
+\DeclareInputMath{181}{\mu}
+\DeclareInputText{166}{\textbrokenbar}
+\DeclareInputText{182}{\P}
+\DeclareInputText{167}{\S}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{168}{\"{}}
+\DeclareInputText{184}{\c\ }
+\DeclareInputText{169}{\copyright}
+\DeclareInputMath{185}{\mathonesuperior}
+\DeclareInputText{170}{\textordfeminine}
+\DeclareInputText{186}{\textordmasculine}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputMath{172}{\lnot}
+\DeclareInputText{188}{\textonequarter}
+\DeclareInputText{173}{\-}
+\DeclareInputText{189}{\textonehalf}
+\DeclareInputText{174}{\textregistered}
+\DeclareInputText{190}{\textthreequarters}
+\DeclareInputText{175}{\@tabacckludge={}}
+\DeclareInputText{191}{\textquestiondown}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge`A}
+\DeclareInputText{208}{\u G}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{209}{\~N}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{210}{\@tabacckludge`O}
+\DeclareInputText{195}{\~A}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{197}{\r A}
+\DeclareInputText{213}{\~O}
+\DeclareInputText{198}{\AE}
+\DeclareInputText{214}{\"O}
+\DeclareInputText{199}{\c C}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{200}{\@tabacckludge`E}
+\DeclareInputText{216}{\O}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{217}{\@tabacckludge`U}
+\DeclareInputText{202}{\^E}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{219}{\^U}
+\DeclareInputText{204}{\@tabacckludge`I}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{221}{\.I}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{222}{\c S}
+\DeclareInputText{207}{\"I}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge`a}
+\DeclareInputText{240}{\u g}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{241}{\~n}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{242}{\@tabacckludge`o}
+\DeclareInputText{227}{\~a}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{229}{\r a}
+\DeclareInputText{245}{\~o}
+\DeclareInputText{230}{\ae}
+\DeclareInputText{246}{\"o}
+\DeclareInputText{231}{\c c}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{232}{\@tabacckludge`e}
+\DeclareInputText{248}{\o}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{249}{\@tabacckludge`u}
+\DeclareInputText{234}{\^e}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{251}{\^u}
+\DeclareInputText{236}{\@tabacckludge`\i}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{253}{\i}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{254}{\c s}
+\DeclareInputText{239}{\"\i}
+\DeclareInputText{255}{\"y}
+%</latin5>
+% \end{macrocode}
+%
+% \section{DEC Multinational Character Set}
+%
+% The DECMultinational character set, used by the OpenVMS operating
+% system, is slightly different from the ISO Latin 1 character set.
+%
+% Reference: Digital Equipment Corporation VT330/VT340 Programmer
+% Reference Manual, Volume 1: Text Programming, page 22.
+%
+% This encoding was provided by M.Y. Chartoire IPNL-IN2P3 \\
+% \texttt{m.chartoire@ipnl.in2p3.fr}
+%
+% \begin{macrocode}
+%<*decmulti>
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{161}{\textexclamdown}
+\DeclareInputMath{177}{\pm}
+\DeclareInputText{162}{\textcent}
+\DeclareInputMath{178}{\mathtwosuperior}
+\DeclareInputText{163}{\pounds}
+\DeclareInputMath{179}{\maththreesuperior}
+\DeclareInputText{165}{\textyen}
+\DeclareInputMath{181}{\mu}
+\DeclareInputText{182}{\P}
+\DeclareInputText{167}{\S}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{168}{\textcurrency}
+\DeclareInputText{169}{\copyright}
+\DeclareInputMath{185}{\mathonesuperior}
+\DeclareInputText{170}{\textordfeminine}
+\DeclareInputText{186}{\textordmasculine}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputText{188}{\textonequarter}
+\DeclareInputText{189}{\textonehalf}
+\DeclareInputText{191}{\textquestiondown}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge`A}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{209}{\~N}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{210}{\@tabacckludge`O}
+\DeclareInputText{195}{\~A}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{197}{\r A}
+\DeclareInputText{213}{\~O}
+\DeclareInputText{198}{\AE}
+\DeclareInputText{214}{\"O}
+\DeclareInputText{199}{\c C}
+\DeclareInputText{215}{\OE}
+\DeclareInputText{200}{\@tabacckludge`E}
+\DeclareInputText{216}{\O}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{217}{\@tabacckludge`U}
+\DeclareInputText{202}{\^E}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{219}{\^U}
+\DeclareInputText{204}{\@tabacckludge`I}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{221}{\"Y}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{207}{\"I}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge`a}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{241}{\~n}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{242}{\@tabacckludge`o}
+\DeclareInputText{227}{\~a}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{229}{\r a}
+\DeclareInputText{245}{\~o}
+\DeclareInputText{230}{\ae}
+\DeclareInputText{246}{\"o}
+\DeclareInputText{231}{\c c}
+\DeclareInputText{247}{\oe}
+\DeclareInputText{232}{\@tabacckludge`e}
+\DeclareInputText{248}{\o}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{249}{\@tabacckludge`u}
+\DeclareInputText{234}{\^e}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{251}{\^u}
+\DeclareInputText{236}{\@tabacckludge`\i}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{253}{\"y}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{239}{\"\i}
+%</decmulti>
+% \end{macrocode}
+%
+%
+% \section{The IBM code pages 850 and 858}
+%
+% This input encoding was contributed by
+% Timo Knuutila (\texttt{knuutila@\linebreak[0]cs.utu.fi}),
+% and edited by Christian Bartels
+% (\texttt{ii140ba@\linebreak[0]vm1.rz.rwth-aachen.de}).
+%
+% The DOS graphics `letters' and a few
+% other positions are ignored (left undefined).
+%
+% The 858 code page is identical to the 850 except that
+%
+% \changes{v0.9d}{1995/06/06}{Made changes to cp850 suggested by
+% Christian Bartels}
+% \changes{v0.9s}{1995/08/31}
+% {Swapped ordfeminine and masculine. /2203}
+%
+% \begin{macrocode}
+%<*cp850|cp858>
+\DeclareInputText{128}{\c C}
+\DeclareInputText{144}{\@tabacckludge'E}
+\DeclareInputText{129}{\"u}
+\DeclareInputText{145}{\ae}
+\DeclareInputText{130}{\@tabacckludge'e}
+\DeclareInputText{146}{\AE}
+\DeclareInputText{131}{\^a}
+\DeclareInputText{147}{\^o}
+\DeclareInputText{132}{\"a}
+\DeclareInputText{148}{\"o}
+\DeclareInputText{133}{\@tabacckludge`a}
+\DeclareInputText{149}{\@tabacckludge`o}
+\DeclareInputText{134}{\r a}
+\DeclareInputText{150}{\^u}
+\DeclareInputText{135}{\c c}
+\DeclareInputText{151}{\@tabacckludge`u}
+\DeclareInputText{136}{\^e}
+\DeclareInputText{152}{\"y}
+\DeclareInputText{137}{\"e}
+\DeclareInputText{153}{\"O}
+\DeclareInputText{138}{\@tabacckludge`e}
+\DeclareInputText{154}{\"U}
+\DeclareInputText{139}{\"\i}
+\DeclareInputText{155}{\o}
+\DeclareInputText{140}{\^\i}
+\DeclareInputText{156}{\pounds}
+\DeclareInputText{141}{\@tabacckludge`\i}
+\DeclareInputText{157}{\O}
+\DeclareInputText{142}{\"A}
+\DeclareInputMath{158}{\times}
+\DeclareInputText{143}{\r A}
+\DeclareInputText{159}{\textflorin}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\@tabacckludge'a}
+\DeclareInputText{161}{\@tabacckludge'\i}
+\DeclareInputText{162}{\@tabacckludge'o}
+\DeclareInputText{163}{\@tabacckludge'u}
+\DeclareInputText{164}{\~n} %% "B0-"B4: DG
+\DeclareInputText{165}{\~N}
+\DeclareInputText{181}{\@tabacckludge'A}
+\DeclareInputText{166}{\textordfeminine}
+\DeclareInputText{182}{\^A}
+\DeclareInputText{167}{\textordmasculine}
+\DeclareInputText{183}{\@tabacckludge`A}
+\DeclareInputText{168}{\textquestiondown}
+\DeclareInputText{184}{\copyright}
+\DeclareInputText{169}{\textregistered}
+\DeclareInputMath{170}{\lnot}
+\DeclareInputText{171}{\textonehalf}
+\DeclareInputText{172}{\textonequarter} %% "B9-"BC: DG
+\DeclareInputText{173}{\textexclamdown}
+\DeclareInputText{189}{\textcent}
+\DeclareInputText{174}{\guillemetleft}
+\DeclareInputText{190}{\textyen}
+\DeclareInputText{175}{\guillemetright}
+% \end{macrocode}
+%
+% \begin{macrocode}
+% "BF-"C5: DG
+\DeclareInputText{208}{\dh}
+\DeclareInputText{209}{\DH}
+\DeclareInputText{210}{\^E}
+\DeclareInputText{211}{\"E}
+\DeclareInputText{212}{\@tabacckludge`E}
+% \end{macrocode}
+% Here is the only point in which the two code pages differ!
+% \begin{macrocode}
+%<-cp858>\DeclareInputText{213}{\i}
+%<-cp850>\DeclareInputText{213}{\texteuro}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{198}{\~a}
+\DeclareInputText{214}{\@tabacckludge'I}
+\DeclareInputText{199}{\~A}
+\DeclareInputText{215}{\^I}
+\DeclareInputText{216}{\"I}
+% "C8-"CE: DG
+% "D9-"DC: DG
+\DeclareInputText{221}{\textbrokenbar}
+\DeclareInputText{222}{\@tabacckludge`I}
+\DeclareInputText{207}{\textcurrency} %% "DF: DG
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge'O}
+\DeclareInputText{240}{\-}
+\DeclareInputText{225}{\ss}
+\DeclareInputMath{241}{\pm}
+\DeclareInputText{226}{\^O}
+% "F2: DG (not double underline, or equals?)
+\DeclareInputText{227}{\@tabacckludge`O}
+\DeclareInputText{243}{\textthreequarters}
+\DeclareInputText{228}{\~o}
+\DeclareInputText{244}{\P}
+\DeclareInputText{229}{\~O}
+\DeclareInputText{245}{\S}
+\DeclareInputMath{230}{\mu}
+\DeclareInputMath{246}{\div}
+\DeclareInputText{231}{\th}
+\DeclareInputText{247}{\c\ }
+\DeclareInputText{232}{\TH}
+\DeclareInputText{248}{\textdegree}
+\DeclareInputText{233}{\@tabacckludge'U}
+\DeclareInputText{249}{\"{}}
+\DeclareInputText{234}{\^U}
+\DeclareInputText{250}{\textperiodcentered}
+\DeclareInputText{235}{\@tabacckludge`U}
+\DeclareInputMath{251}{\mathonesuperior}
+\DeclareInputText{236}{\@tabacckludge'y}
+\DeclareInputMath{252}{\maththreesuperior}
+\DeclareInputText{237}{\@tabacckludge'Y}
+\DeclareInputMath{253}{\mathtwosuperior}
+\DeclareInputText{238}{\@tabacckludge={}}
+\DeclareInputText{254}{\textblacksquare} % right name?
+\DeclareInputText{239}{\@tabacckludge'{}}
+\DeclareInputText{255}{\nobreakspace}
+%</cp850|cp858>
+% \end{macrocode}
+%
+% \section{The IBM code page 852}
+%
+% This input encoding was contributed by
+% Petr Sojka (\texttt{sojka@\linebreak[0]Muni.cz}).
+%
+% \changes{v0.9t}{1996/10/28}{Added extra \cs{nobreakspace}: OK?}
+% \changes{v0.9z}{1997/05/10}{Corrected typo in slot 213}
+% \changes{v0.91}{1997/08/19}{Replaced \cs{dh}/\cs{DH} by
+% \cs{dj}/\cs{DJ}.}
+% \changes{v0.99}{1999/04/14}{Changed 212, see pr/2992}
+%
+% \begin{macrocode}
+%<*cp852>
+\DeclareInputText{128}{\c C}
+\DeclareInputText{144}{\@tabacckludge'E}
+\DeclareInputText{129}{\"u}
+\DeclareInputText{145}{\@tabacckludge'L}
+\DeclareInputText{130}{\@tabacckludge'e}
+\DeclareInputText{146}{\@tabacckludge'l}
+\DeclareInputText{131}{\^a}
+\DeclareInputText{147}{\^o}
+\DeclareInputText{132}{\"a}
+\DeclareInputText{148}{\"o}
+\DeclareInputText{133}{\r u}
+\DeclareInputText{149}{\v L}
+\DeclareInputText{134}{\@tabacckludge'c}
+\DeclareInputText{150}{\v l}
+\DeclareInputText{135}{\c c}
+\DeclareInputText{151}{\@tabacckludge'S}
+\DeclareInputText{136}{\l}
+\DeclareInputText{152}{\@tabacckludge's}
+\DeclareInputText{137}{\"e}
+\DeclareInputText{153}{\"O}
+\DeclareInputText{138}{\H O}
+\DeclareInputText{154}{\"U}
+\DeclareInputText{139}{\H o}
+\DeclareInputText{155}{\v T}
+\DeclareInputText{140}{\^\i}
+\DeclareInputText{156}{\v t}
+\DeclareInputText{141}{\@tabacckludge'Z}
+\DeclareInputText{157}{\L}
+\DeclareInputText{142}{\"A}
+\DeclareInputMath{158}{\times}
+\DeclareInputText{143}{\@tabacckludge'C}
+\DeclareInputText{159}{\v c}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\@tabacckludge'a}
+\DeclareInputText{161}{\@tabacckludge'\i}
+\DeclareInputText{162}{\@tabacckludge'o}
+\DeclareInputText{163}{\@tabacckludge'u}
+\DeclareInputText{164}{\k A}
+\DeclareInputText{165}{\k a}
+\DeclareInputText{166}{\v Z}
+\DeclareInputText{167}{\v z}
+\DeclareInputText{168}{\k E}
+\DeclareInputText{169}{\k e}
+\DeclareInputMath{170}{\lnot}
+\DeclareInputText{171}{\@tabacckludge'z}
+\DeclareInputText{172}{\v C}
+\DeclareInputText{173}{\c s}
+\DeclareInputText{174}{\guillemetleft}
+\DeclareInputText{175}{\guillemetright}
+\DeclareInputText{181}{\@tabacckludge'A}
+\DeclareInputText{182}{\^A}
+\DeclareInputText{183}{\v E}
+\DeclareInputText{184}{\c S}
+\DeclareInputText{189}{\.Z}
+\DeclareInputText{190}{\.z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{198}{\u A}
+\DeclareInputText{199}{\u a}
+\DeclareInputText{207}{\textcurrency}
+\DeclareInputText{208}{\dj}
+\DeclareInputText{209}{\DJ}
+\DeclareInputText{210}{\v D}
+\DeclareInputText{211}{\"E}
+\DeclareInputText{212}{\v d} % d caron
+\DeclareInputText{213}{\v N}
+\DeclareInputText{214}{\@tabacckludge'I}
+\DeclareInputText{215}{\^I}
+\DeclareInputText{216}{\v e}
+\DeclareInputText{221}{\c T}
+\DeclareInputText{222}{\r U}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge'O}
+\DeclareInputText{240}{\-}
+\DeclareInputText{225}{\ss}
+\DeclareInputText{241}{\H{}}
+\DeclareInputText{226}{\^O}
+\DeclareInputText{242}{\k\ }
+\DeclareInputText{227}{\@tabacckludge'N}
+\DeclareInputText{243}{\v{}}
+\DeclareInputText{228}{\@tabacckludge'n}
+\DeclareInputText{244}{\u{}}
+\DeclareInputText{229}{\v n}
+\DeclareInputText{245}{\S}
+\DeclareInputText{230}{\v S}
+\DeclareInputMath{246}{\div}
+\DeclareInputText{231}{\v s}
+\DeclareInputText{247}{\c\ }
+\DeclareInputText{232}{\@tabacckludge'R}
+\DeclareInputText{248}{\textdegree}
+\DeclareInputText{233}{\@tabacckludge'U}
+\DeclareInputText{249}{\"{}}
+\DeclareInputText{234}{\@tabacckludge'r}
+\DeclareInputText{250}{\.{}}
+\DeclareInputText{235}{\H U}
+\DeclareInputText{251}{\H u}
+\DeclareInputText{236}{\@tabacckludge'y}
+\DeclareInputText{252}{\v R}
+\DeclareInputText{237}{\@tabacckludge'Y}
+\DeclareInputText{253}{\v r}
+\DeclareInputText{238}{\c t}
+\DeclareInputText{254}{\textblacksquare} % right name?
+\DeclareInputText{239}{\@tabacckludge'{}}
+\DeclareInputText{255}{\nobreakspace}
+%</cp852>
+% \end{macrocode}
+%
+% \section{The IBM code pages 437 and 865}
+%
+% This input encoding is based on work by\\
+% Volker Kunert
+% (\texttt{volker@\linebreak[0]numsun1.mathematik.uni-halle.de})\\
+% and \texttt{bontus@\linebreak[0]al6000.physik.uni-siegen.de}.\\
+% The changes for cp865 are based on work by S\o ren Sandmann
+% (\texttt{sandmann@\linebreak[0]daimi.aau.dk}), with thanks to
+% them all.
+%
+% The DOS graphics `letters' and a few
+% other positions are ignored (left undefined).
+%
+% Unfortunately, in cp437 there is no agreement as to whether slot E1
+% should be `$\beta$' or `\ss', so we provide two variants,
+% one (cp437) with `$\beta$' and one (cp437de) with `\ss'.
+%
+% \changes{v0.9e}{1995/08/31}{Added a 0 to all character codes}
+%
+% \changes{v0.9m}{1995/12/04}{Made uumlaut and pounds text characters}
+% \changes{v0.9t}{1996/10/28}{Added \cs{textflorin} and \cs{textpeseta}}
+% \changes{v0.9t}{1996/10/28}{Removed \cs{textbrokenbar}}
+% \changes{v0.9t}{1996/10/28}{Removed \cs{textendash}}
+% \changes{v0.9t}{1996/10/28}{Changed \cs{Theta} to \cs{Phi}}
+% \changes{v0.9t}{1996/10/28}{Changed \cs{Pi} to \cs{pi}, perhaps}
+% \changes{v0.9t}{1996/10/28}{Changed \cs{emptyset} to \cs{phi}}
+% \changes{v0.9t}{1996/10/28}{Changed \cs{maththreesuperior} to
+% \cs{mathnsuperior}}
+% \changes{v0.94}{1997/12/17}{Changed 158 to \cs{DeclareInputText}}
+%
+% \begin{macrocode}
+%<*cp437|cp437de|cp865>
+\DeclareInputText{128}{\c C}
+\DeclareInputText{129}{\"u}
+\DeclareInputText{130}{\@tabacckludge'e}
+\DeclareInputText{131}{\^a}
+\DeclareInputText{132}{\"a}
+\DeclareInputText{133}{\@tabacckludge`a}
+\DeclareInputText{134}{\r a}
+\DeclareInputText{135}{\c c}
+\DeclareInputText{136}{\^e}
+\DeclareInputText{137}{\"e}
+\DeclareInputText{138}{\@tabacckludge`e}
+\DeclareInputText{139}{\"\i}
+\DeclareInputText{140}{\^\i}
+\DeclareInputText{141}{\@tabacckludge`\i}
+\DeclareInputText{142}{\"A}
+\DeclareInputText{143}{\r A}
+\DeclareInputText{144}{\@tabacckludge'E}
+\DeclareInputText{145}{\ae}
+\DeclareInputText{146}{\AE}
+\DeclareInputText{147}{\^o}
+\DeclareInputText{148}{\"o}
+\DeclareInputText{149}{\@tabacckludge`o}
+\DeclareInputText{150}{\^u}
+\DeclareInputText{151}{\@tabacckludge`u}
+\DeclareInputText{152}{\"y}
+\DeclareInputText{153}{\"O}
+\DeclareInputText{154}{\"U}
+%</cp437|cp437de|cp865>
+%<*cp437|cp437de>
+\DeclareInputText{155}{\textcent}
+\DeclareInputText{156}{\pounds}
+\DeclareInputText{157}{\textyen}
+%</cp437|cp437de>
+%<*cp865>
+\DeclareInputText{155}{\o}
+\DeclareInputText{156}{\pounds}
+\DeclareInputText{157}{\O}
+%</cp865>
+%<*cp437|cp437de|cp865>
+\DeclareInputText{158}{\textpeseta} % Pt
+\DeclareInputText{159}{\textflorin}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\@tabacckludge'a} % 160
+\DeclareInputText{161}{\@tabacckludge'\i}
+\DeclareInputText{162}{\@tabacckludge'o}
+\DeclareInputText{163}{\@tabacckludge'u}
+\DeclareInputText{164}{\~n}
+\DeclareInputText{165}{\~N}
+\DeclareInputText{166}{\textordfeminine}
+\DeclareInputText{167}{\textordmasculine}
+\DeclareInputText{168}{\textquestiondown}
+%\DeclareInputText{169}{} % left upper corner
+\DeclareInputMath{170}{\lnot}
+\DeclareInputText{171}{\textonehalf}
+\DeclareInputText{172}{\textonequarter}
+\DeclareInputText{173}{\textexclamdown}
+\DeclareInputText{174}{\guillemetleft}
+%<cp437|cp437de>\DeclareInputText{175}{\guillemetright}
+%<cp865>\DeclareInputText{175}{\textcurrency}
+%\DeclareInputText{176}{\textlightgraybox}
+%\DeclareInputText{177}{\textgraybox}
+%\DeclareInputText{178}{\textdarkgraybox}
+%\DeclareInputMath{179}{} % vertical bar
+%\DeclareInputText{180}{} % vertical bar with branch to left
+%\DeclareInputText{181}{} % vertical bar with double branch to left
+%\DeclareInputText{182}{} % double bar with single branch to left
+%\DeclareInputText{183}{} % graphic
+%\DeclareInputText{184}{} % graphic
+%\DeclareInputMath{185}{} % vertical double bar with branch to left
+%\DeclareInputMath{186}{} % vertical double bar
+%\DeclareInputText{187}{} % double upper right corner
+%\DeclareInputMath{188}{} % double lower right corner
+%\DeclareInputText{189}{} % graphic
+%\DeclareInputText{190}{} % graphic
+%\DeclareInputMath{191}{\ensuremath{\rceil}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%\DeclareInputMath{192}{\ensuremath{\lfloor}}
+%\DeclareInputText{193}{} % dash with branch up
+%\DeclareInputText{194}{} % dash with branch down
+%\DeclareInputText{195}{} % vertical bar with branch to right
+%\DeclareInputText{196}{} % horizontal bar, not endash
+%\DeclareInputText{197}{} % vertical bar crossed with dash
+%\DeclareInputText{198}{} % graphic
+%\DeclareInputText{199}{} % graphic
+%\DeclareInputText{200}{} % double lower left corner
+%\DeclareInputText{201}{} % double upper left corner
+%\DeclareInputText{202}{} % double dash with branch up
+%\DeclareInputText{203}{} % double dash with branch down
+%\DeclareInputText{204}{} % double bar with branch right
+%\DeclareInputText{205}{=} % double dash
+%\DeclareInputText{206}{} % double bar crossing double dash
+%\DeclareInputText{207}{} % graphic
+%\DeclareInputMath{208}{}
+%\DeclareInputText{209}{}
+%\DeclareInputText{210}{}
+%\DeclareInputText{211}{}
+%\DeclareInputText{212}{}
+%\DeclareInputText{213}{}
+%\DeclareInputText{214}{}
+%\DeclareInputText{215}{}
+%\DeclareInputText{216}{}
+%\DeclareInputMath{217}{\ensuremath{\rfloor}} % lower right corner
+%\DeclareInputMath{218}{\ensuremath{\lceil}} % upper left corner
+%\DeclareInputText{219}{} % black box
+%\DeclareInputText{220}{} % lower half of black box
+%\DeclareInputText{221}{} % left bar
+%\DeclareInputText{222}{} % right bar
+%\DeclareInputText{223}{} % upper half of black box
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputMath{224}{\alpha}
+%</cp437|cp437de|cp865>
+%<cp437|cp865>\DeclareInputMath{225}{\beta}
+%<cp437de>\DeclareInputText{225}{\ss}
+%<*cp437|cp437de|cp865>
+\DeclareInputMath{226}{\Gamma}
+\DeclareInputMath{227}{\pi}
+\DeclareInputMath{228}{\Sigma}
+\DeclareInputMath{229}{\sigma}
+\DeclareInputMath{230}{\mu}
+\DeclareInputMath{231}{\gamma}
+\DeclareInputMath{232}{\Phi}
+\DeclareInputMath{233}{\theta}
+\DeclareInputMath{234}{\Omega}
+\DeclareInputMath{235}{\delta}
+\DeclareInputMath{236}{\infty}
+\DeclareInputMath{237}{\phi}
+\DeclareInputMath{238}{\varepsilon}
+\DeclareInputMath{239}{\cap}
+\DeclareInputMath{240}{\equiv}
+\DeclareInputMath{241}{\pm}
+\DeclareInputMath{242}{\geq}
+\DeclareInputMath{243}{\leq}
+%\DeclareInputMath{244}{} % upper part of integral sign
+%\DeclareInputMath{245}{} % lower part of integral sign
+\DeclareInputMath{246}{\div}
+\DeclareInputMath{247}{\approx}
+\DeclareInputText{248}{\textdegree}
+\DeclareInputText{249}{\textperiodcentered}
+\DeclareInputText{250}{\textbullet}
+\DeclareInputMath{251}{\surd}
+\DeclareInputMath{252}{\mathnsuperior}
+\DeclareInputMath{253}{\mathtwosuperior}
+\DeclareInputText{254}{\textblacksquare} % right name?
+\DeclareInputText{255}{\nobreakspace}
+%</cp437|cp437de|cp865>
+% \end{macrocode}
+%
+% \section{The Macintosh encodings}
+%
+% This input encoding was contributed by
+% Constantin Kahn (\texttt{kahn@\linebreak[0]math.toronto.edu}),
+% with minor modifications by Alan Jeffrey.
+%
+% \changes{v0.09c}{1995/05/30}{Made mac encoding `active German quote
+% safe', and added the correct docstrip magic.}
+%
+% \begin{macrocode}
+%<*applemac>
+\DeclareInputText{128}{\"A}
+\DeclareInputText{129}{\r A}
+\DeclareInputText{130}{\c C}
+\DeclareInputText{131}{\@tabacckludge'E}
+\DeclareInputText{132}{\~N}
+\DeclareInputText{133}{\"O}
+\DeclareInputText{134}{\"U}
+\DeclareInputText{135}{\@tabacckludge'a}
+\DeclareInputText{136}{\@tabacckludge`a}
+\DeclareInputText{137}{\^a}
+\DeclareInputText{138}{\"a}
+\DeclareInputText{139}{\~a}
+\DeclareInputText{140}{\r a}
+\DeclareInputText{141}{\c c}
+\DeclareInputText{142}{\@tabacckludge'e}
+\DeclareInputText{143}{\@tabacckludge`e}
+\DeclareInputText{144}{\^e}
+\DeclareInputText{145}{\"e}
+\DeclareInputText{146}{\@tabacckludge'\i}
+\DeclareInputText{147}{\@tabacckludge`\i}
+\DeclareInputText{148}{\^\i}
+\DeclareInputText{149}{\"\i}
+\DeclareInputText{150}{\~n}
+\DeclareInputText{151}{\@tabacckludge'o}
+\DeclareInputText{152}{\@tabacckludge`o}
+\DeclareInputText{153}{\^o}
+\DeclareInputText{154}{\"o}
+\DeclareInputText{155}{\~o}
+\DeclareInputText{156}{\@tabacckludge'u}
+\DeclareInputText{157}{\@tabacckludge`u}
+\DeclareInputText{158}{\^u}
+\DeclareInputText{159}{\"u}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\dag}
+\DeclareInputText{161}{\textdegree}
+\DeclareInputText{162}{\textcent}
+\DeclareInputText{163}{\pounds}
+\DeclareInputText{164}{\S}
+\DeclareInputText{165}{\textbullet}
+\DeclareInputText{166}{\P}
+\DeclareInputText{167}{\ss}
+\DeclareInputText{168}{\textregistered}
+\DeclareInputText{169}{\copyright}
+\DeclareInputText{170}{\texttrademark}
+\DeclareInputText{171}{\@tabacckludge'{}}
+\DeclareInputText{172}{\"{}}
+\DeclareInputMath{173}{\neq}
+\DeclareInputText{174}{\AE}
+\DeclareInputText{175}{\O}
+\DeclareInputMath{176}{\infty}
+\DeclareInputMath{177}{\pm}
+\DeclareInputMath{178}{\leq}
+\DeclareInputMath{179}{\geq}
+\DeclareInputText{180}{\textyen}
+\DeclareInputMath{181}{\mu}
+\DeclareInputMath{182}{\partial}
+\DeclareInputMath{183}{\Sigma}
+\DeclareInputMath{184}{\Pi}
+\DeclareInputMath{185}{\pi}
+\DeclareInputMath{186}{\int}
+\DeclareInputText{187}{\textordfeminine}
+\DeclareInputText{188}{\textordmasculine}
+\DeclareInputMath{189}{\Omega}
+\DeclareInputText{190}{\ae}
+\DeclareInputText{191}{\o}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\textquestiondown}
+\DeclareInputText{193}{\textexclamdown}
+\DeclareInputMath{194}{\lnot}
+\DeclareInputMath{195}{\surd}
+\DeclareInputText{196}{\textflorin}
+\DeclareInputMath{197}{\approx}
+\DeclareInputMath{198}{\Delta}
+\DeclareInputText{199}{\guillemetleft}
+\DeclareInputText{200}{\guillemetright}
+\DeclareInputText{201}{\dots}
+\DeclareInputText{202}{\nobreakspace}
+\DeclareInputText{203}{\@tabacckludge`A}
+\DeclareInputText{204}{\~A}
+\DeclareInputText{205}{\~O}
+\DeclareInputText{206}{\OE}
+\DeclareInputText{207}{\oe}
+\DeclareInputText{208}{\textendash}
+\DeclareInputText{209}{\textemdash}
+\DeclareInputText{210}{\textquotedblleft}
+\DeclareInputText{211}{\textquotedblright}
+\DeclareInputText{212}{\textquoteleft}
+\DeclareInputText{213}{\textquoteright}
+\DeclareInputMath{214}{\div}
+\DeclareInputMath{215}{\diamond}
+\DeclareInputText{216}{\"y}
+\DeclareInputText{217}{\"Y}
+\DeclareInputMath{218}{/}
+\DeclareInputText{219}{\textcurrency}
+\DeclareInputText{220}{\guilsinglleft}
+\DeclareInputText{221}{\guilsinglright}
+\DeclareInputText{222}{fi}
+\DeclareInputText{223}{fl}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\ddag}
+\DeclareInputText{225}{\textperiodcentered}
+\DeclareInputText{226}{\quotesinglbase}
+\DeclareInputText{227}{\quotedblbase}
+\DeclareInputText{228}{\textperthousand}
+\DeclareInputText{229}{\^A}
+\DeclareInputText{230}{\^E}
+\DeclareInputText{231}{\@tabacckludge'A}
+\DeclareInputText{232}{\"E}
+\DeclareInputText{233}{\@tabacckludge`E}
+\DeclareInputText{234}{\@tabacckludge'I}
+\DeclareInputText{235}{\^I}
+\DeclareInputText{236}{\"I}
+\DeclareInputText{237}{\@tabacckludge`I}
+\DeclareInputText{238}{\@tabacckludge'O}
+\DeclareInputText{239}{\^O}
+\DeclareInputText{240}{\textapplelogo}
+\DeclareInputText{241}{\@tabacckludge`O}
+\DeclareInputText{242}{\@tabacckludge'U}
+\DeclareInputText{243}{\^U}
+\DeclareInputText{244}{\@tabacckludge`U}
+\DeclareInputText{245}{\i}
+\DeclareInputText{246}{\^{}}
+\DeclareInputText{247}{\~{}}
+\DeclareInputText{248}{\@tabacckludge={}}
+\DeclareInputText{249}{\u{}}
+\DeclareInputText{250}{\.{}}
+\DeclareInputText{251}{\r{}}
+\DeclareInputText{252}{\c\ }
+\DeclareInputText{253}{\H{}}
+\DeclareInputText{254}{\k\ }
+\DeclareInputText{255}{\v{}}
+%</applemac>
+% \end{macrocode}
+%
+% This input encoding for the Apple Central European code page was
+% contributed by Radek Tryc and Marcin Woli\'nski
+% \verb=<wolinski@mimuw.edu.pl>=.
+%
+% \changes{v0.99b}{2002/06/16}{Added macce encoding (pr/3433)}
+% \changes{v1.0d}{2004/02/05}{Reordered code}
+% \changes{v1.0g}{2004/05/22}{Changed \cs{textellipsis} to \cs{dots}
+% for consistency.}
+% \changes{v1.0g}{2004/05/22}{Changed \cs{textdagger} to \cs{dag}
+% for consistency.}
+% \changes{v1.0g}{2004/05/22}{Changed \cs{textparagraph} to \cs{P}
+% for consistency.}
+% \changes{v1.0g}{2004/05/22}{Changed \cs{textsection} to \cs{S}
+% for consistency.}
+% \changes{v1.0g}{2004/05/22}{Changed \cs{textcopyright} to \cs{copyright}
+% for consistency.}
+% \begin{macrocode}
+%<*applemacce>
+\DeclareInputText{128}{\"A}
+\DeclareInputText{131}{\@tabacckludge'E}
+\DeclareInputText{132}{\k A}
+\DeclareInputText{133}{\"O}
+\DeclareInputText{134}{\"U}
+\DeclareInputText{136}{\k a}
+\DeclareInputText{137}{\v C}
+\DeclareInputText{138}{\"a}
+\DeclareInputText{139}{\v c}
+\DeclareInputText{140}{\@tabacckludge'C}
+\DeclareInputText{141}{\@tabacckludge'c}
+\DeclareInputText{143}{\@tabacckludge'Z}
+\DeclareInputText{144}{\@tabacckludge'z}
+\DeclareInputText{151}{\@tabacckludge'o}
+\DeclareInputText{159}{\"u}
+\DeclareInputText{154}{\"o}
+\DeclareInputText{133}{\"O}
+\DeclareInputText{134}{\"U}
+\DeclareInputText{153}{\^o}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\dag}
+\DeclareInputText{161}{\textdegree}
+\DeclareInputText{162}{\k E}
+\DeclareInputText{163}{\pounds}
+\DeclareInputText{164}{\S}
+\DeclareInputText{165}{\textbullet}
+\DeclareInputText{166}{\P}
+\DeclareInputText{167}{\ss}
+\DeclareInputText{168}{\textregistered}
+\DeclareInputText{171}{\k e}
+\DeclareInputText{193}{\@tabacckludge'N}
+\DeclareInputText{169}{\copyright}
+\DeclareInputText{184}{\l}
+\DeclareInputText{196}{\@tabacckludge'n}
+\DeclareInputText{199}{\guillemetleft}
+\DeclareInputText{200}{\guillemetright}
+\DeclareInputText{201}{\dots}
+\DeclareInputText{202}{\nobreakspace}
+\DeclareInputText{208}{\textendash}
+\DeclareInputText{209}{\textemdash}
+% \end{macrocode}
+%
+% \changes{v1.0e}{2004/05/03}{Typo in \cs{textquotedblleft} (pr/3673)}
+% \begin{macrocode}
+\DeclareInputText{210}{\textquotedblleft}
+\DeclareInputText{211}{\textquotedblright}
+\DeclareInputText{212}{\textquoteleft}
+\DeclareInputText{213}{\textquoteright}
+\DeclareInputText{214}{\textdiv}
+\DeclareInputText{220}{\guilsinglleft}
+\DeclareInputText{221}{\guilsinglright}
+\DeclareInputText{222}{\v r}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{226}{\quotesinglbase}
+\DeclareInputText{227}{\quotedblbase}
+\DeclareInputText{229}{\@tabacckludge'S}
+\DeclareInputText{230}{\@tabacckludge's}
+\DeclareInputText{238}{\@tabacckludge'O}
+\DeclareInputText{239}{\^O}
+\DeclareInputText{251}{\.Z}
+\DeclareInputText{252}{\L}
+\DeclareInputText{253}{\.z}
+%</applemacce>
+% \end{macrocode}
+%
+% \section{The Next encoding}
+%
+% This input encoding is based on work by Stefan Ried
+% (\texttt{stef@\linebreak[0]theo-phys.uni-essen.de} and Holger Uhr
+% (\texttt{huhr@\linebreak[0]uni-paderborn.de}).
+%
+% Further extended by
+% Jens Heise (\texttt{heisbeee@calvados.zrz.TU-Berlin.DE}).
+%
+% \changes{v0.9k}{1995/11/29}{Tidied up this encoding.}
+%
+% \changes{v0.9m}{1995/12/04}{Made fraction a math character.}
+% \changes{v0.9n}{1995/12/10}{Made fraction a text character.}
+%
+% \changes{v0.94}{1997/12/17}{Changed \cs{textellipsis} to \cs{dots}
+% for consistency.}
+% \changes{v0.94}{1997/12/17}{Changed \cs{textquotesinglbase} to
+% \cs{quotesinglbase}: this may be temporary.}
+% \changes{v0.94}{1997/12/17}{Changed \cs{textquotedblbase} to
+% \cs{quotedblbase}: this may be temporary.}
+% \changes{v0.96}{1998/03/02}{Fixed typo in slot 159.}
+% \changes{v0.997}{2000/12/02}{Added all missing chars. (pr/3281)}
+%
+% \begin{macrocode}
+%<*next>
+\DeclareInputText{128}{\nobreakspace}
+\DeclareInputText{129}{\@tabacckludge`A}
+\DeclareInputText{130}{\@tabacckludge'A}
+\DeclareInputText{131}{\^A}
+\DeclareInputText{132}{\~A}
+\DeclareInputText{133}{\"A}
+\DeclareInputText{134}{\r A}
+\DeclareInputText{135}{\c C}
+\DeclareInputText{136}{\@tabacckludge`E}
+\DeclareInputText{137}{\@tabacckludge'E}
+\DeclareInputText{138}{\^E}
+\DeclareInputText{139}{\"E}
+\DeclareInputText{140}{\@tabacckludge`I}
+\DeclareInputText{141}{\@tabacckludge'I}
+\DeclareInputText{142}{\^I}
+\DeclareInputText{143}{\"I}
+\DeclareInputText{144}{\DH}
+\DeclareInputText{145}{\~N}
+\DeclareInputText{146}{\@tabacckludge`O}
+\DeclareInputText{147}{\@tabacckludge'O}
+\DeclareInputText{148}{\^O}
+\DeclareInputText{149}{\~O}
+\DeclareInputText{150}{\"O}
+\DeclareInputText{151}{\@tabacckludge`U}
+\DeclareInputText{152}{\@tabacckludge'U}
+\DeclareInputText{153}{\^U}
+\DeclareInputText{154}{\"U}
+\DeclareInputText{155}{\@tabacckludge'Y}
+\DeclareInputText{156}{\TH}
+\DeclareInputMath{157}{\mu}
+\DeclareInputMath{158}{\times}
+\DeclareInputMath{159}{\div}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\copyright}
+\DeclareInputText{161}{\textexclamdown}
+\DeclareInputText{162}{\textcent}
+\DeclareInputText{163}{\pounds}
+\DeclareInputMath{164}{/}
+\DeclareInputText{165}{\textyen}
+\DeclareInputText{166}{\textflorin}
+\DeclareInputText{167}{\S}
+\DeclareInputText{168}{\textcurrency}
+\DeclareInputText{169}{\textquoteright}
+\DeclareInputText{170}{\textquotedblleft}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputText{172}{\guilsinglleft}
+\DeclareInputText{173}{\guilsinglright}
+\DeclareInputText{174}{fi}
+\DeclareInputText{175}{fl}
+\DeclareInputText{176}{\textregistered}
+\DeclareInputText{177}{\textendash}
+\DeclareInputText{178}{\dag}
+\DeclareInputText{179}{\ddag}
+\DeclareInputText{180}{\textperiodcentered}
+\DeclareInputText{181}{\textbrokenbar}
+\DeclareInputText{182}{\P}
+\DeclareInputText{183}{\textbullet}
+\DeclareInputText{184}{\quotesinglbase}
+\DeclareInputText{185}{\quotedblbase}
+\DeclareInputText{186}{\textquotedblright}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputText{188}{\dots}
+\DeclareInputText{189}{\textperthousand}
+\DeclareInputMath{190}{\lnot}
+\DeclareInputText{191}{\textquestiondown}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputMath{192}{\mathonesuperior}
+\DeclareInputText{193}{\@tabacckludge`{}}
+\DeclareInputText{194}{\@tabacckludge'{}}
+\DeclareInputText{195}{\^{}}
+\DeclareInputText{196}{\~{}}
+\DeclareInputText{197}{\@tabacckludge={}}
+\DeclareInputText{198}{\u{}}
+\DeclareInputText{199}{\.{}}
+\DeclareInputText{200}{\"{}}
+\DeclareInputMath{201}{\mathtwosuperior}
+\DeclareInputText{202}{\r{}}
+\DeclareInputText{203}{\c\ }
+\DeclareInputMath{204}{\maththreesuperior}
+\DeclareInputText{205}{\H{}}
+\DeclareInputText{206}{\k\ }
+\DeclareInputText{207}{\v{}}
+\DeclareInputText{208}{\textemdash}
+\DeclareInputMath{209}{\pm}
+\DeclareInputText{210}{\textonequarter}
+\DeclareInputText{211}{\textonehalf}
+\DeclareInputText{212}{\textthreequarters}
+\DeclareInputText{213}{\@tabacckludge`a}
+\DeclareInputText{214}{\@tabacckludge'a}
+\DeclareInputText{215}{\^a}
+\DeclareInputText{216}{\~a}
+\DeclareInputText{217}{\"a}
+\DeclareInputText{218}{\r a}
+\DeclareInputText{219}{\c c}
+\DeclareInputText{220}{\@tabacckludge`e}
+\DeclareInputText{221}{\@tabacckludge'e}
+\DeclareInputText{222}{\^e}
+\DeclareInputText{223}{\"e}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge`\i}
+\DeclareInputText{225}{\AE}
+\DeclareInputText{226}{\@tabacckludge'\i}
+\DeclareInputText{227}{\textordfeminine}
+\DeclareInputText{228}{\^\i}
+\DeclareInputText{229}{\"\i}
+\DeclareInputText{230}{\dh}
+\DeclareInputText{231}{\~n}
+\DeclareInputText{232}{\L}
+\DeclareInputText{233}{\O}
+\DeclareInputText{234}{\OE}
+\DeclareInputText{235}{\textordmasculine}
+\DeclareInputText{236}{\@tabacckludge`o}
+\DeclareInputText{237}{\@tabacckludge'o}
+\DeclareInputText{238}{\^o}
+\DeclareInputText{239}{\~o}
+\DeclareInputText{240}{\"o}
+\DeclareInputText{241}{\ae}
+\DeclareInputText{242}{\@tabacckludge`u}
+\DeclareInputText{243}{\@tabacckludge'u}
+\DeclareInputText{244}{\^u}
+\DeclareInputText{245}{\i}
+\DeclareInputText{246}{\"u}
+\DeclareInputText{247}{\@tabacckludge'y}
+\DeclareInputText{248}{\l}
+\DeclareInputText{249}{\o}
+\DeclareInputText{250}{\oe}
+\DeclareInputText{251}{\ss}
+\DeclareInputText{252}{\th}
+\DeclareInputText{253}{\"y}
+%</next>
+% \end{macrocode}
+%
+%
+%
+% \changes{v0.9a}{1995/04/23}{\cs{textonequarter} and friends should
+% be declared with \cs{DeclareInputText}}
+% \section{The MS Windows ANSI encoding cp1252,\\
+% and the ISO Latin-1 and Latin-9 encodings}
+%
+% The MS Windows ANSI, cp 1252, input encoding was contributed by
+% Berthold K.P. Horn (\texttt{bkph@\linebreak[0]ai.mit.edu}).
+%
+% It has two very different names so the same code produces two files.
+% These encoding files both define the characters in the
+% MS Windows 3.1 ANSI encoding (Western Europe), also known as code
+% page 1252, which is based on ISO Latin-1 but has important additions
+% in the 128--159 range.
+%
+% Designed for:
+% Danish, Dutch, English, Finnish, French, German, Icelandic,
+% Italian, Norwegian, Portuguese, Spanish, and Swedish.
+%
+% Note: Windows ANSI --- like Macintosh standard Roman encoding ---
+% has quotesingle at 39, and grave at 96 --- which is here
+% ignored.
+%
+% The ISO Latin-1 encoding file defines only the restricted range of
+% characters available in the ISO~8859-1 encoding.
+%
+% The ISO~Latin-9 encoding file defines the characters in the
+% ISO~8859-15 encoding. It was contributed by Karsten Tinnefeld
+% (\texttt{karsten@tinnefeld.com}).
+% It differs only a small amount from ISO~Latin-1 and is a
+% replacement for it that contains a few characters that are needed for
+% French and Finnish. Further, a slot for the Euro currency sign has
+% been added and this could be the killer argument for many 8-bit
+% texts to be written in Latin-9 in the future.
+%
+% According to a Linux man page, ISO~Latin-9 supports Albanian, Basque,
+% Breton, Catalan, Danish, Dutch,
+% English, Estonian, Faroese, Finnish, French, Frisian, Galician, German,
+% Greenlandic, Icelandic, Irish Gaelic, Italian, Latin, Luxemburgish,
+% Norwegian, Portuguese, Rhaeto-Romanic, Scottish Gaelic, Spanish and
+% Swedish.
+%
+% The characters added in |latin9.def| are (in \LaTeX{} notation):
+% \begin{verbatim}
+% \texteuro, \v S \v s \v Z \v z \OE \oe \" Y
+% \end{verbatim}
+% They displace the following characters from |latin1.def|:
+% \begin{verbatim}
+% \textcurrency \textbrokenbar \"{} \'{} \c{}
+% \textonequarter \textonehalf \textthreequarters
+% \end{verbatim}
+%
+% \changes{v0.9e}{1995/08/31}{Redeclared "AD to be soft hyphen.}
+% \changes{v0.9e}{1995/08/31}{Swapped ordfeminine and ordmasculine.}
+%
+% \changes{v0.9p}{1996/04/11}{ansinew 09f is \"Y not \"y, latex/2119}
+%
+% \changes{v0.91}{1997/08/19}{Exchanged codes for
+% \cs{textendash} and \cs{textemdash}.}
+%
+% \changes{v0.94}{1997/12/17}{Added cp1252 and merged latin1}
+% \changes{v0.94}{1997/12/17}{Changed \cs{ldots} to \cs{dots}, this
+% should be undetectable since \cs{ldots} is not robust.}
+%
+% \changes{v0.99a}{2001/07/10}{Added latin9 (from Karsten Tinnefeld)}
+% \changes{v0.99b}{2002/06/16}{Added code points 142,158 for cp1252 (pr/3441)}
+% \changes{v0.99b}{2002/07/08}{Added code 128 (texteuro) for cp1252 (pr/3423)}
+%
+% \begin{macrocode}
+%<*cp1252>
+\DeclareInputText{128}{\texteuro}
+\DeclareInputText{130}{\quotesinglbase}
+\DeclareInputText{131}{\textflorin}
+\DeclareInputText{132}{\quotedblbase}
+\DeclareInputText{133}{\dots}
+\DeclareInputText{134}{\dag}
+\DeclareInputText{135}{\ddag}
+\DeclareInputText{136}{\^{}}
+\DeclareInputText{137}{\textperthousand}
+\DeclareInputText{138}{\v S}
+\DeclareInputText{139}{\guilsinglleft}
+\DeclareInputText{140}{\OE}
+\DeclareInputText{142}{\v Z}
+\DeclareInputText{145}{\textquoteleft}
+\DeclareInputText{146}{\textquoteright}
+\DeclareInputText{147}{\textquotedblleft}
+\DeclareInputText{148}{\textquotedblright}
+\DeclareInputText{149}{\textbullet}
+\DeclareInputText{150}{\textendash}
+\DeclareInputText{151}{\textemdash}
+\DeclareInputText{152}{\~{}}
+\DeclareInputText{153}{\texttrademark}
+\DeclareInputText{154}{\v s}
+\DeclareInputText{155}{\guilsinglright}
+\DeclareInputText{156}{\oe}
+\DeclareInputText{158}{\v z}
+\DeclareInputText{159}{\"Y}
+%</cp1252>
+% \end{macrocode}
+%
+% This (somewhat confused) table is now even more disordered: first
+% we deal with those few characters that are different in latin9,
+% then with the rest.
+%
+% \begin{macrocode}
+%<*cp1252|latin1>
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{166}{\textbrokenbar}
+\DeclareInputText{168}{\"{}}
+\DeclareInputText{180}{\@tabacckludge'{}}
+\DeclareInputText{184}{\c\ }
+\DeclareInputText{188}{\textonequarter}
+\DeclareInputText{189}{\textonehalf}
+\DeclareInputText{190}{\textthreequarters}
+%</cp1252|latin1>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*latin9>
+\DeclareInputText{164}{\texteuro}
+\DeclareInputText{166}{\v S}
+\DeclareInputText{168}{\v s}
+\DeclareInputText{180}{\v Z}
+\DeclareInputText{184}{\v z}
+\DeclareInputText{188}{\OE}
+\DeclareInputText{189}{\oe}
+\DeclareInputText{190}{\"Y}
+%</latin9>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*cp1252|latin1|latin9>
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{161}{\textexclamdown}
+\DeclareInputMath{177}{\pm}
+\DeclareInputText{162}{\textcent}
+\DeclareInputMath{178}{\mathtwosuperior}
+\DeclareInputText{163}{\pounds}
+\DeclareInputMath{179}{\maththreesuperior}
+\DeclareInputText{165}{\textyen}
+\DeclareInputMath{181}{\mu}
+\DeclareInputText{182}{\P}
+\DeclareInputText{167}{\S}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{169}{\copyright}
+\DeclareInputMath{185}{\mathonesuperior}
+\DeclareInputText{170}{\textordfeminine}
+\DeclareInputText{186}{\textordmasculine}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputMath{172}{\lnot}
+\DeclareInputText{173}{\-}
+\DeclareInputText{174}{\textregistered}
+\DeclareInputText{175}{\@tabacckludge={}}
+\DeclareInputText{191}{\textquestiondown}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge`A}
+\DeclareInputText{208}{\DH}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{209}{\~N}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{210}{\@tabacckludge`O}
+\DeclareInputText{195}{\~A}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{197}{\r A}
+\DeclareInputText{213}{\~O}
+\DeclareInputText{198}{\AE}
+\DeclareInputText{214}{\"O}
+\DeclareInputText{199}{\c C}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{200}{\@tabacckludge`E}
+\DeclareInputText{216}{\O}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{217}{\@tabacckludge`U}
+\DeclareInputText{202}{\^E}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{219}{\^U}
+\DeclareInputText{204}{\@tabacckludge`I}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{221}{\@tabacckludge'Y}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{222}{\TH}
+\DeclareInputText{207}{\"I}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge`a}
+\DeclareInputText{240}{\dh}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{241}{\~n}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{242}{\@tabacckludge`o}
+\DeclareInputText{227}{\~a}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{229}{\r a}
+\DeclareInputText{245}{\~o}
+\DeclareInputText{230}{\ae}
+\DeclareInputText{246}{\"o}
+\DeclareInputText{231}{\c c}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{232}{\@tabacckludge`e}
+\DeclareInputText{248}{\o}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{249}{\@tabacckludge`u}
+\DeclareInputText{234}{\^e}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{251}{\^u}
+\DeclareInputText{236}{\@tabacckludge`\i}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{253}{\@tabacckludge'y}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{254}{\th}
+\DeclareInputText{239}{\"\i}
+\DeclareInputText{255}{\"y}
+%</cp1252|latin1|latin9>
+% \end{macrocode}
+%
+%
+%\section{The ISO 8859-16 (Latin10) encoding}
+%
+% \changes{v1.0c}{2004/02/04}{Added ISO 8859-16 Latin10 (pr/3568)}
+%
+% This set of coded graphic characters is intended for use in data and
+% text processing applications and also for information interchange. The
+% set contains graphic characters used for general purpose applications in
+% typical office environments in at least the following languages:
+% Albanian, Croatian, English, Finnish, French, German, Hungarian, Irish
+% Gaelic (new orthography), Italian, Latin, Polish, Romanian, and
+% Slovenian. This set of coded graphic characters may be regarded as a
+% version of an 8-bit code according to ISO/IEC 2022 or ISO/IEC 4873 at
+% level 1. [ISO 8859-16:2001(E), p. 1]
+%
+% ISO 8859-16 was primarily designed for single-byte encoding the Romanian
+% language. The UTF-8 charset is the preferred and in today's MIME software
+% more widely implemented encoding suitable for Romanian.
+%
+% Data for the \LaTeX{} support was mainly provided by Ionel Ciob\^{i}c\u{a}
+% with additions and corrections taken from\\
+% \texttt{https://www.unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT}.
+%
+% \changes{v1.1b}{2006/03/03}{Corrections (pr/3849)}
+%
+% \begin{macrocode}
+%<*latin10>
+% \end{macrocode}
+% The ``comma below'' accent is provided here in a crude (better
+% than nothing) version.
+% \begin{macrocode}
+\ProvideTextCommandDefault\textcommabelow[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth
+ \raise-.31ex\hbox{\check@mathfonts
+% \end{macrocode}
+% Use |\sf@size| instead of |\ssf@size| if the comma looks too small:
+% \begin{macrocode}
+ \fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProvideTextCommandDefault\textpm{\ensuremath\pm}
+% \end{macrocode}
+% But why only for this one encoding? (Answer: because it is a new encoding:
+% it contains only LICR objects --- Frank)
+% \changes{v1.0g}{2004/05/22}{Changed \cs{textpm} to \cs{pm}}
+% \changes{v1.1b}{2006/03/03}{Reverted back to \cs{textpm}
+% for consistency.}
+% \begin{macrocode}
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{161}{\k A}
+\DeclareInputText{162}{\k a}
+\DeclareInputText{163}{\L}
+\DeclareInputText{164}{\texteuro}
+\DeclareInputText{165}{\quotedblbase}
+\DeclareInputText{166}{\v S}
+\DeclareInputText{167}{\S}
+\DeclareInputText{168}{\v s}
+\DeclareInputText{169}{\textcopyright}
+\DeclareInputText{170}{\textcommabelow S}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputText{172}{\@tabacckludge'Z}
+\DeclareInputText{173}{\-}
+\DeclareInputText{174}{\@tabacckludge'z}
+\DeclareInputText{175}{\.Z}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputText{177}{\textpm}
+\DeclareInputText{178}{\v C}
+\DeclareInputText{179}{\l}
+\DeclareInputText{180}{\v Z}
+\DeclareInputText{181}{\textquotedblright}
+\DeclareInputText{182}{\P}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{184}{\v z}
+\DeclareInputText{185}{\v c}
+\DeclareInputText{186}{\textcommabelow s}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputText{188}{\OE}
+\DeclareInputText{189}{\oe}
+\DeclareInputText{190}{\"Y}
+\DeclareInputText{191}{\.z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge`A}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{195}{\u A}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{197}{\@tabacckludge'C}
+\DeclareInputText{198}{\AE}
+\DeclareInputText{199}{\c C}
+\DeclareInputText{200}{\@tabacckludge`E}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{202}{\^E}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{204}{\@tabacckludge`I}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{207}{\"I}
+\DeclareInputText{208}{\DJ}
+\DeclareInputText{209}{\@tabacckludge'N}
+\DeclareInputText{210}{\@tabacckludge`O}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{213}{\H O}
+\DeclareInputText{214}{\"O}
+\DeclareInputText{215}{\@tabacckludge'S}
+\DeclareInputText{216}{\H U}
+\DeclareInputText{217}{\@tabacckludge`U}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{219}{\^U}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{221}{\k E}
+\DeclareInputText{222}{\textcommabelow T}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{223}{\ss}
+\DeclareInputText{224}{\@tabacckludge`a}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{227}{\u a}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{229}{\@tabacckludge'c}
+\DeclareInputText{230}{\ae}
+\DeclareInputText{231}{\c c}
+\DeclareInputText{232}{\@tabacckludge`e}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{234}{\^e}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{236}{\@tabacckludge`\i}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{239}{\"\i}
+\DeclareInputText{240}{\dj}
+\DeclareInputText{241}{\@tabacckludge'n}
+\DeclareInputText{242}{\@tabacckludge`o}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{245}{\H o}
+\DeclareInputText{246}{\"o}
+\DeclareInputText{247}{\@tabacckludge's}
+\DeclareInputText{248}{\H u}
+\DeclareInputText{249}{\@tabacckludge`u}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{251}{\^u}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{253}{\k e}
+\DeclareInputText{254}{\textcommabelow t}
+\DeclareInputText{255}{\"y}
+%</latin10>
+% \end{macrocode}
+%
+%\section{The MS Windows encoding cp1250}
+%
+% This is an MS Windows encoding for Central and Eastern Europe,
+% known as Code Page 1250; it was provided by Marcin Woli\'nski
+% \texttt{wolinski@melkor.mimuw.edu.pl} and edited by Chris Rowley
+% (see v0.94 below) to make it consistent with other files.
+%
+% \changes{v0.94}{1997/12/17}{Changed \cs{textellipsis} to \cs{dots}
+% for consistency.}
+% \changes{v0.94}{1997/12/17}{Changed \cs{textdagger} to \cs{dag}
+% for consistency.}
+% \changes{v0.94}{1997/12/17}{Changed \cs{textparagraph} to \cs{P}
+% for consistency.}
+% \changes{v0.94}{1997/12/17}{Changed \cs{textsection} to \cs{S}
+% for consistency.}
+% \changes{v0.99b}{2002/07/28}{Added code 128 (texteuro) for cp1250}
+% \begin{macrocode}
+%<*cp1250>
+\DeclareInputText{128}{\texteuro}
+%\DeclareInputText{129}{} % n/u
+\DeclareInputText{130}{\quotesinglbase}
+%\DeclareInputText{131}{} % n/u
+\DeclareInputText{132}{\quotedblbase}
+\DeclareInputText{133}{\dots}
+\DeclareInputText{134}{\dag}
+\DeclareInputText{135}{\ddag}
+%\DeclareInputText{136}{} % n/u
+\DeclareInputText{137}{\textperthousand}
+\DeclareInputText{138}{\v S}
+\DeclareInputText{139}{\guilsinglleft}
+\DeclareInputText{140}{\@tabacckludge'S}
+\DeclareInputText{141}{\v T}
+\DeclareInputText{142}{\v Z}
+\DeclareInputText{143}{\@tabacckludge'Z}
+%\DeclareInputText{144}{} % n/u
+\DeclareInputText{145}{\textquoteleft}
+\DeclareInputText{146}{\textquoteright}
+\DeclareInputText{147}{\textquotedblleft}
+\DeclareInputText{148}{\textquotedblright}
+\DeclareInputText{149}{\textbullet}
+\DeclareInputText{150}{\textendash}
+\DeclareInputText{151}{\textemdash}
+%\DeclareInputText{152}{} % n/u
+\DeclareInputText{153}{\texttrademark}
+\DeclareInputText{154}{\v s}
+\DeclareInputText{155}{\guilsinglright}
+\DeclareInputText{156}{\@tabacckludge's}
+\DeclareInputText{157}{\v t} % t caron (t') ?
+\DeclareInputText{158}{\v z}
+\DeclareInputText{159}{\@tabacckludge'z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{161}{\v{}}
+\DeclareInputText{162}{\u{}}
+\DeclareInputText{163}{\L}
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{165}{\k A}
+\DeclareInputText{166}{\textbrokenbar}
+\DeclareInputText{167}{\S}
+\DeclareInputText{168}{\"{}}
+\DeclareInputText{169}{\copyright}
+\DeclareInputText{170}{\c S}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputMath{172}{\lnot}
+\DeclareInputText{173}{\-}% soft hyphen
+\DeclareInputText{174}{\textregistered}
+\DeclareInputText{175}{\.Z}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputMath{177}{\pm}% plus-minus
+\DeclareInputText{178}{\k\ }
+\DeclareInputText{179}{\l}
+\DeclareInputText{180}{\@tabacckludge'{}}
+\DeclareInputMath{181}{\mu}% micro sign
+\DeclareInputText{182}{\P}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{184}{\c\ }
+\DeclareInputText{185}{\k a}
+\DeclareInputText{186}{\c s}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputText{188}{\v L}% L caron (L') ?
+\DeclareInputText{189}{\H{}}
+\DeclareInputText{190}{\v l}% l caron (l') ?
+\DeclareInputText{191}{\.z}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\@tabacckludge'R}
+\DeclareInputText{193}{\@tabacckludge'A}
+\DeclareInputText{194}{\^A}
+\DeclareInputText{195}{\u A}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{197}{\@tabacckludge'L}
+\DeclareInputText{198}{\@tabacckludge'C}
+\DeclareInputText{199}{\c C}
+\DeclareInputText{200}{\v C}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{202}{\k E}
+\DeclareInputText{203}{\"E}
+\DeclareInputText{204}{\v E}
+\DeclareInputText{205}{\@tabacckludge'I}
+\DeclareInputText{206}{\^I}
+\DeclareInputText{207}{\v D}
+\DeclareInputText{208}{\DJ} % D stroke
+\DeclareInputText{209}{\@tabacckludge'N}
+\DeclareInputText{210}{\v N}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{212}{\^O}
+\DeclareInputText{213}{\H O}
+\DeclareInputText{214}{\"O}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{216}{\v R}
+\DeclareInputText{217}{\r U}
+\DeclareInputText{218}{\@tabacckludge'U}
+\DeclareInputText{219}{\H U}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{221}{\@tabacckludge'Y}
+\DeclareInputText{222}{\c T}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\@tabacckludge'r}
+\DeclareInputText{225}{\@tabacckludge'a}
+\DeclareInputText{226}{\^a}
+\DeclareInputText{227}{\u a}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{229}{\@tabacckludge'l}
+\DeclareInputText{230}{\@tabacckludge'c}
+\DeclareInputText{231}{\c c}
+\DeclareInputText{232}{\v c}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{234}{\k e}
+\DeclareInputText{235}{\"e}
+\DeclareInputText{236}{\v e}
+\DeclareInputText{237}{\@tabacckludge'\i}
+\DeclareInputText{238}{\^\i}
+\DeclareInputText{239}{\v d} % d caron (d') ?
+\DeclareInputText{240}{\dj} % d stroke
+\DeclareInputText{241}{\@tabacckludge'n}
+\DeclareInputText{242}{\v n}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{244}{\^o}
+\DeclareInputText{245}{\H o}
+\DeclareInputText{246}{\"o}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{248}{\v r}
+\DeclareInputText{249}{\r u}
+\DeclareInputText{250}{\@tabacckludge'u}
+\DeclareInputText{251}{\H u}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{253}{\@tabacckludge'y}
+\DeclareInputText{254}{\c t}
+\DeclareInputText{255}{\.{}}
+%</cp1250>
+% \end{macrocode}
+%
+%
+%\section{The MS Windows encoding cp1257}
+%
+% This is an MS Windows encoding for Baltic languages,
+% known as Code Page 1257; provided by Heiko Oberdiek
+% using the mappings to Unicode in\\
+% \texttt{https://www.unicode.org/\\Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT}\\
+% and\\
+% \texttt{http://www.microsoft.com/globaldev/reference/sbcs/1257.mspx}.
+%
+% \changes{v1.1b}{2006/03/03}{Large number of corrections (pr/3849)}
+% \begin{macrocode}
+%<*cp1257>
+\DeclareInputText{128}{\texteuro}
+\DeclareInputText{130}{\quotesinglbase}
+\DeclareInputText{132}{\quotedblbase}
+\DeclareInputText{133}{\dots}
+\DeclareInputText{134}{\dag}
+\DeclareInputText{135}{\ddag}
+\DeclareInputText{137}{\textperthousand}
+\DeclareInputText{139}{\guilsinglleft}
+\DeclareInputText{141}{\"{}}
+\DeclareInputText{142}{\v{}}
+\DeclareInputText{143}{\c\ }
+\DeclareInputText{145}{\textquoteleft}
+\DeclareInputText{146}{\textquoteright}
+\DeclareInputText{147}{\textquotedblleft}
+\DeclareInputText{148}{\textquotedblright}
+\DeclareInputText{149}{\textbullet}
+\DeclareInputText{150}{\textendash}
+\DeclareInputText{151}{\textemdash}
+\DeclareInputText{153}{\texttrademark}
+\DeclareInputText{155}{\guilsinglright}
+\DeclareInputText{157}{\@tabacckludge={}}
+\DeclareInputText{158}{\k\ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{160}{\nobreakspace}
+\DeclareInputText{162}{\textcent}
+\DeclareInputText{163}{\pounds}
+\DeclareInputText{164}{\textcurrency}
+\DeclareInputText{166}{\textbrokenbar}
+\DeclareInputText{167}{\S}
+\DeclareInputText{168}{\O}
+\DeclareInputText{169}{\copyright}
+\DeclareInputText{170}{\c R}
+\DeclareInputText{171}{\guillemetleft}
+\DeclareInputMath{172}{\lnot}
+\DeclareInputText{173}{\-}
+\DeclareInputText{174}{\textregistered}
+\DeclareInputText{175}{\AE}
+\DeclareInputText{176}{\textdegree}
+\DeclareInputMath{177}{\pm}
+\DeclareInputMath{178}{\mathtwosuperior}
+\DeclareInputMath{179}{\maththreesuperior}
+\DeclareInputText{180}{\@tabacckludge'{}}
+\DeclareInputMath{181}{\mu}
+\DeclareInputText{182}{\P}
+\DeclareInputText{183}{\textperiodcentered}
+\DeclareInputText{184}{\o}
+\DeclareInputMath{185}{\mathonesuperior}
+\DeclareInputText{186}{\c r}
+\DeclareInputText{187}{\guillemetright}
+\DeclareInputText{188}{\textonequarter}
+\DeclareInputText{189}{\textonehalf}
+\DeclareInputText{190}{\textthreequarters}
+\DeclareInputText{191}{\ae}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{192}{\k A}
+\DeclareInputText{193}{\k I}
+\DeclareInputText{194}{\@tabacckludge=A}
+\DeclareInputText{195}{\@tabacckludge'C}
+\DeclareInputText{196}{\"A}
+\DeclareInputText{197}{\r A}
+\DeclareInputText{198}{\k E}
+\DeclareInputText{199}{\@tabacckludge=E}
+\DeclareInputText{200}{\v C}
+\DeclareInputText{201}{\@tabacckludge'E}
+\DeclareInputText{202}{\@tabacckludge'Z}
+\DeclareInputText{203}{\.{E}}
+\DeclareInputText{204}{\c G}
+\DeclareInputText{205}{\c K}
+\DeclareInputText{206}{\@tabacckludge=I}
+\DeclareInputText{207}{\c L}
+\DeclareInputText{208}{\v S}
+\DeclareInputText{209}{\@tabacckludge'N}
+\DeclareInputText{210}{\c N}
+\DeclareInputText{211}{\@tabacckludge'O}
+\DeclareInputText{212}{\@tabacckludge=O}
+\DeclareInputText{213}{\~O}
+\DeclareInputText{214}{\"O}
+\DeclareInputMath{215}{\times}
+\DeclareInputText{216}{\k U}
+\DeclareInputText{217}{\L}
+\DeclareInputText{218}{\@tabacckludge'S}
+\DeclareInputText{219}{\@tabacckludge=U}
+\DeclareInputText{220}{\"U}
+\DeclareInputText{221}{\.Z}
+\DeclareInputText{222}{\v Z}
+\DeclareInputText{223}{\ss}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareInputText{224}{\k a}
+\DeclareInputText{225}{\k i}
+\DeclareInputText{226}{\@tabacckludge=a}
+\DeclareInputText{227}{\@tabacckludge'c}
+\DeclareInputText{228}{\"a}
+\DeclareInputText{229}{\r a}
+\DeclareInputText{230}{\k e}
+\DeclareInputText{231}{\@tabacckludge=e}
+\DeclareInputText{232}{\v c}
+\DeclareInputText{233}{\@tabacckludge'e}
+\DeclareInputText{234}{\@tabacckludge'z}
+\DeclareInputText{235}{\.{e}}
+\DeclareInputText{236}{\c g}
+\DeclareInputText{237}{\c k}
+\DeclareInputText{238}{\@tabacckludge=\i}
+\DeclareInputText{239}{\c l}
+\DeclareInputText{240}{\v s}
+\DeclareInputText{241}{\@tabacckludge'n}
+\DeclareInputText{242}{\c n}
+\DeclareInputText{243}{\@tabacckludge'o}
+\DeclareInputText{244}{\@tabacckludge=o}
+\DeclareInputText{245}{\~o}
+\DeclareInputText{246}{\"o}
+\DeclareInputMath{247}{\div}
+\DeclareInputText{248}{\k u}
+\DeclareInputText{249}{\l}
+\DeclareInputText{250}{\@tabacckludge's}
+\DeclareInputText{251}{\@tabacckludge=u}
+\DeclareInputText{252}{\"u}
+\DeclareInputText{253}{\.z}
+\DeclareInputText{254}{\v z}
+\DeclareInputText{255}{\.{}}
+%</cp1257>
+% \end{macrocode}
+%
+% \DeleteShortVerb{\|}
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/inputenc.ins b/macros/latex-dev/base/inputenc.ins
new file mode 100644
index 0000000000..80993e2819
--- /dev/null
+++ b/macros/latex-dev/base/inputenc.ins
@@ -0,0 +1,181 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2019
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\askonceonly
+
+\usedir{tex/latex/base}
+
+\Msg{*** Generating input encoding files ***}
+
+\generate{
+ \file{inputenc.sty}{
+ \from{inputenc.dtx}{package}}
+ \file{latin1.def}{
+ \from{inputenc.dtx}{latin1}}
+ \file{latin2.def}{
+ \from{inputenc.dtx}{latin2}}
+ \file{latin3.def}{
+ \from{inputenc.dtx}{latin3}}
+ \file{latin4.def}{
+ \from{inputenc.dtx}{latin4}}
+ \file{latin5.def}{
+ \from{inputenc.dtx}{latin5}}
+ \file{latin9.def}{
+ \from{inputenc.dtx}{latin9}}
+ \file{latin10.def}{
+ \from{inputenc.dtx}{latin10}}
+ }
+
+
+
+ \generate{
+ \file{cp850.def}{
+ \from{inputenc.dtx}{cp850}}
+ \file{cp852.def}{
+ \from{inputenc.dtx}{cp852}}
+ \file{cp858.def}{
+ \from{inputenc.dtx}{cp858}}
+ \file{cp865.def}{
+ \from{inputenc.dtx}{cp865}}
+ \file{cp437.def}{
+ \from{inputenc.dtx}{cp437}}
+ \file{cp437de.def}{
+ \from{inputenc.dtx}{cp437de}}
+ \file{decmulti.def}{
+ \from{inputenc.dtx}{decmulti}}
+ }
+
+ \generate{
+ \file{ascii.def}{
+ \from{inputenc.dtx}{ascii}}
+ \file{applemac.def}{
+ \from{inputenc.dtx}{applemac}}
+ \file{macce.def}{
+ \from{inputenc.dtx}{applemacce}}
+ \file{next.def}{
+ \from{inputenc.dtx}{next}}
+ \file{ansinew.def}{% synonym for cp1252
+ \from{inputenc.dtx}{cp1252,ansinew}}
+ \file{cp1250.def}{
+ \from{inputenc.dtx}{cp1250}}
+ \file{cp1252.def}{
+ \from{inputenc.dtx}{cp1252}}
+ \file{cp1257.def}{
+ \from{inputenc.dtx}{cp1257}}
+ }
+
+\Msg{*** Generating utf8 input encoding files ***}
+
+\generate{\file{utf8.def}{\from{utf8ienc.dtx}{utf8}}
+ \file{utf8-test.tex}{\from{utf8ienc.dtx}{test}}
+ \file{lcyenc.dfu}{\from{utf8ienc.dtx}{lcy}}
+ \file{ly1enc.dfu}{\from{utf8ienc.dtx}{ly1}}
+ \file{omsenc.dfu}{\from{utf8ienc.dtx}{oms}}
+ \file{ot1enc.dfu}{\from{utf8ienc.dtx}{ot1}}
+ \file{ot2enc.dfu}{\from{utf8ienc.dtx}{ot2}}
+ \file{t1enc.dfu}{\from{utf8ienc.dtx}{t1}}
+ \file{utf8-2018.def}{\from{utf8ienc.dtx}{utf8-2018}}
+}
+\generate{\file{t2aenc.dfu}{\from{utf8ienc.dtx}{t2a}}
+ \file{t2benc.dfu}{\from{utf8ienc.dtx}{t2b}}
+ \file{t2cenc.dfu}{\from{utf8ienc.dtx}{t2c}}
+ \file{ts1enc.dfu}{\from{utf8ienc.dtx}{ts1}}
+ \file{x2enc.dfu}{\from{utf8ienc.dtx}{x2}}
+ \file{utf8enc.dfu}{\from{utf8ienc.dtx}{all}}
+ \file{utf8test.tex}{\from{utf8ienc.dtx}{test}}
+ }
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space *.def *.dfu *.sty }
+\Msg{*}
+\Msg{* To produce the documentation run inputenc.dtx and }
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/inputenc.pdf b/macros/latex-dev/base/inputenc.pdf
new file mode 100644
index 0000000000..c1f4263834
--- /dev/null
+++ b/macros/latex-dev/base/inputenc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/kernel-external-commands.txt b/macros/latex-dev/base/kernel-external-commands.txt
new file mode 100644
index 0000000000..e4b7c726dc
--- /dev/null
+++ b/macros/latex-dev/base/kernel-external-commands.txt
@@ -0,0 +1,1356 @@
+%%% list of externally accessible commands defined or used by the
+%%% kernel (not totally correct) --- these aren't necessarily
+%%% interface commands as primitives also have accessible names. This
+%%% is just a reference to help and was generated with some brute
+%%% force methods
+%%%
+%%% 2019/02
+
+\A
+\AA
+\AE
+\Alph
+\Arrowvert
+\AtBeginDocument
+\AtBeginDvi
+\AtEndDocument
+\AtEndOfClass
+\AtEndOfPackage
+\Big
+\Bigg
+\Biggl
+\Biggm
+\Biggr
+\Bigl
+\Bigm
+\Bigr
+\Box
+\CheckCommand
+\ClassError
+\ClassInfo
+\ClassWarning
+\ClassWarningNoLine
+\CountZero
+\CurrentOption
+\DH
+\DJ
+\DeclareCurrentRelease
+\DeclareErrorFont
+\DeclareFixedFont
+\DeclareFontEncoding
+\DeclareFontEncodingDefaults
+\DeclareFontFamily
+\DeclareFontShape
+\DeclareFontSubstitution
+\DeclareMathAccent
+\DeclareMathAlphabet
+\DeclareMathDelimiter
+\DeclareMathRadical
+\DeclareMathSizes
+\DeclareMathSymbol
+\DeclareMathVersion
+\DeclareOldFontCommand
+\DeclareOption
+\DeclarePreloadSizes
+\DeclareRelease
+\DeclareRelease:
+\DeclareRobustCommand
+\DeclareRobustCommand*
+\DeclareSizeFunction
+\DeclareSymbolFont
+\DeclareSymbolFontAlphabet
+\DeclareTextAccent
+\DeclareTextAccentDefault
+\DeclareTextCommand
+\DeclareTextCommandDefault
+\DeclareTextComposite
+\DeclareTextCompositeCommand
+\DeclareTextFontCommand
+\DeclareTextSymbol
+\DeclareTextSymbolDefault
+\DeclareUnicodeCharacter
+\Delta
+\Diamond
+\Downarrow
+\E
+\EndIncludeInRelease
+\ExecuteOptions
+\Gamma
+\GenericError
+\GenericInfo
+\GenericWarning
+\H
+\I
+\IJ
+\IeC
+\IfFileExists
+\IfTargetDateBefore
+\Im
+\IncludeInRelease
+\InputIfFileExists
+\J
+\Join
+\L
+\LaTeX
+\LaTeX2e
+\LaTeXe
+\Lambda
+\LastDeclaredEncoding
+\Leftarrow
+\Leftrightarrow
+\LoadClass
+\LoadClassWithOptions
+\Longleftarrow
+\Longleftrightarrow
+\Longrightarrow
+\MakeLowercase
+\MakeRobust
+\MakeUppercase
+\MessageBreak
+\NG
+\NeedsTeXFormat
+\O
+\OE
+\Omega
+\OptionNotUsed
+\P
+\PackageError
+\PackageInfo
+\PackageWarning
+\PackageWarningNoLine
+\PassOptionsToClass
+\PassOptionsToPackage
+\Phi
+\Pi
+\Pr
+\ProcessOptions
+\ProcessOptions*
+\ProvideTextCommand
+\ProvideTextCommandDefault
+\ProvidesClass
+\ProvidesFile
+\ProvidesPackage
+\Psi
+\Re
+\Relbar
+\RequirePackage
+\RequirePackageWithOptions
+\Rightarrow
+\Roman
+\S
+\SS
+\SetMathAlphabet
+\SetSymbolFont
+\Sigma
+\T
+\TH
+\TeX
+\TextOrMath
+\TextSymbolUnavailable
+\Theta
+\Umathchar
+\Umathcode
+\UndeclareTextCommand
+\Uparrow
+\Updownarrow
+\Upsilon
+\UseRawInputEncoding
+\UseTextAccent
+\UseTextSymbol
+\Vert
+\XeTeXcharclass
+\XeTeXdashbreakstate
+\XeTeXmathcode
+\XeTeXrevision
+\XeTeXuseglyphmetrics
+\XeTeXversion
+\Xi
+\Z
+\_
+\`
+\a
+\aa
+\abovedisplayshortskip
+\abovedisplayskip
+\accent
+\active
+\acute
+\addcontentsline
+\addpenalty
+\addtocontents
+\addtocounter
+\addtolength
+\addvspace
+\adjdemerits
+\advance
+\ae
+\afterassignment
+\aftergroup
+\aleph
+\allocationnumber
+\allowbreak
+\alph
+\alpha
+\amalg
+\and
+\angle
+\approx
+\arabic
+\arccos
+\arcsin
+\arctan
+\arg
+\array
+\arraycolsep
+\arrayrulewidth
+\arraystretch
+\arrowvert
+\asciispace
+\ast
+\asymp
+\atopwithdelims
+\attribute
+\attributedef
+\attributezero
+\author
+\b
+\backslash
+\backslashH
+\bar
+\baselineskip
+\baselineskip4
+\baselinestretch
+\batchmode
+\begin
+\begingroup
+\belowdisplayshortskip
+\belowdisplayskip
+\beta
+\bezier
+\bfdefault
+\bfseries
+\bgroup
+\bibcite
+\bibdata
+\bibitem
+\bibliography
+\bibliographystyle
+\bibstyle
+\big
+\bigbreak
+\bigcap
+\bigcirc
+\bigcup
+\bigg
+\biggl
+\biggm
+\biggr
+\bigl
+\bigm
+\bigodot
+\bigoplus
+\bigotimes
+\bigr
+\bigskip
+\bigskipamount
+\bigsqcup
+\bigtriangledown
+\bigtriangleup
+\biguplus
+\bigvee
+\bigwedge
+\binoppenalty
+\bmod
+\boldmath
+\bordermatrix
+\bot
+\botfigrule
+\botmark
+\bottomfraction
+\bowtie
+\box
+\boxmaxdepth
+\brace
+\braceld
+\braceld$
+\bracelu
+\bracerd
+\braceru
+\bracevert
+\brack
+\break
+\breve
+\brokenpenalty
+\buildrel
+\bullet
+\c
+\cap
+\caption
+\cases
+\catcode
+\catcodetable
+\cdot
+\cdotp
+\cdots
+\center
+\centering
+\centerline
+\char
+\chardef
+\charsubdef
+\charzero
+\check
+\chi
+\choose
+\circ
+\circle
+\citation
+\cite
+\cleaders
+\cleardoublepage
+\clearpage
+\cline
+\closein
+\closeout
+\clubpenalty
+\clubsuit
+\colon
+\columnsep
+\columnseprule
+\columnwidth
+\cong
+\contentsline
+\coprod
+\copy
+\copyright
+\cos
+\cosh
+\cot
+\coth
+\count
+\countdef
+\counterwithin
+\counterwithout
+\cr
+\crcr
+\csc
+\csname
+\cup
+\d
+\dag
+\dagger
+\dashbox
+\dashv
+\date
+\day
+\dblfigrule
+\dblfloatpagefraction
+\dblfloatsep
+\dbltextfloatsep
+\dbltopfraction
+\ddag
+\ddagger
+\ddot
+\ddots
+\deadcycles
+\def
+\defaulthyphenchar
+\defaultscriptratio
+\defaultscriptscriptratio
+\defaultskewchar
+\deg
+\delcode
+\delimiter
+\delimiterfactor
+\delimitershortfall
+\delta
+\depth
+\det
+\dh
+\diamond
+\diamondsuit
+\dim
+\dimen
+\dimendef
+\dimenzero
+\directlua
+\discretionary
+\displaylines
+\displaymath
+\displaystyle
+\displaywidowpenalty
+\displaywidth
+\div
+\divide
+\dj
+\do
+\document
+\documentclass
+\documentstyle
+\dospecials
+\dot
+\doteq
+\dotfill
+\dots
+\doublehyphendemerits
+\doublerulesep
+\downarrow
+\downbracefill
+\dp
+\dump
+\edef
+\egroup
+\eject
+\ell
+\else
+\em
+\emergencystretch
+\eminnershape
+\emph
+\empty
+\emptyset
+\encodingdefault
+\end
+\endarray
+\endcenter
+\endcsname
+\enddisplaymath
+\enddocument
+\endenumerate
+\endeqnarray
+\endequation
+\endfilecontents
+\endflushleft
+\endflushright
+\endgraf
+\endgroup
+\endinput
+\enditemize
+\endline
+\endlinechar
+\endlist
+\endlrbox
+\endmath
+\endminipage
+\endpicture
+\endsloppypar
+\endtabbing
+\endtabular
+\endtrivlist
+\endverbatim
+\enlargethispage
+\enskip
+\enspace
+\ensuremath
+\enumerate
+\epsilon
+\eqnarray
+\eqno
+\equation
+\equiv
+\errhelp
+\errmessage
+\errorcontextlines
+\errorstopmode
+\escapechar
+\eta
+\evensidemargin
+\everycr
+\everydisplay
+\everyjob
+\everymath
+\everypar
+\exhyphenpenalty
+\exists
+\exp
+\expandafter
+\extracolsep
+\extrafloats
+\fam
+\familydefault
+\fbox
+\fboxrule
+\fboxsep
+\fi
+\filbreak
+\filecontents
+\fill
+\finalhyphendemerits
+\firstmark
+\flat
+\floatingpenalty
+\floatpagefraction
+\floatsep
+\flushbottom
+\flushleft
+\flushright
+\fmtname
+\fmtversion
+\fnsymbol
+\font
+\fontdimen
+\fontdimen8
+\fontencoding
+\fontfamily
+\fontname
+\fontseries
+\fontshape
+\fontsize
+\fontsize2
+\fontsubfuzz
+\footins
+\footnote
+\footnotemark
+\footnoterule
+\footnotesep
+\footnotesize
+\footnotetext
+\footskip
+\forall
+\frac
+\frame
+\framebox
+\frenchspacing
+\frown
+\fussy
+\futurelet
+\gamma
+\gcd
+\gdef
+\gdef_
+\ge
+\geq
+\gets
+\gg
+\global
+\globaldefs
+\glossary
+\glossaryentry
+\goodbreak
+\grave
+\halign
+\hangindent
+\hat
+\hbadness
+\hbar
+\hbox
+\headheight
+\headsep
+\heartsuit
+\height
+\hfil
+\hfil$
+\hfill
+\hfuzz
+\hglue
+\hideoutput
+\hideskip
+\hidewidth
+\hline
+\hom
+\hookleftarrow
+\hookrightarrow
+\hphantom
+\hrule
+\hrulefill
+\hsize
+\hskip
+\hskip2em
+\hspace
+\hss
+\ht
+\hyphenchar
+\hyphenpenalty
+\i
+\ialign
+\if
+\ifb
+\ifcase
+\ifcsname
+\ifdim
+\ifeof
+\iff
+\iffalse
+\ifhmode
+\ifinner
+\ifmmode
+\ifnum
+\ifnum0
+\ifnum7
+\ifodd
+\iftrue
+\ifvbox
+\ifvmode
+\ifvoid
+\ifx
+\ifx!
+\ignorespaces
+\ignorespacesafterend
+\ij
+\imath
+\immediate
+\in
+\include
+\includeonly
+\indent
+\index
+\indexentry
+\inf
+\infty
+\initcatcodetable
+\input
+\inputencodingname
+\inputlineno
+\insert
+\int
+\interdisplaylinepenalty
+\interfootnotelinepenalty
+\interlinepenalty
+\intextsep
+\intop
+\iota
+\itdefault
+\item
+\itemindent
+\itemize
+\itemsep
+\iterate
+\itshape
+\j
+\jmath
+\jobname
+\joinrel
+\jot
+\kappa
+\ker
+\kern
+\kern-
+\kern2
+\kern3
+\kern6
+\kern7
+\kill
+\l
+\label
+\labelsep
+\labelwidth
+\lambda
+\land
+\langle
+\language
+\lastbox
+\lastnamedcs
+\lastnodetype
+\lastpenalty
+\lastskip
+\lbrace
+\lbrack
+\lccode
+\lccode`
+\lceil
+\ldotp
+\ldots
+\le
+\leaders
+\leadsto
+\leavevmode
+\left
+\leftarrow
+\leftarrowfill
+\lefteqn
+\leftharpoondown
+\leftharpoondown$
+\leftharpoonup
+\leftline
+\leftmargin
+\leftmargini
+\leftmarginii
+\leftmarginiii
+\leftmarginiv
+\leftmarginv
+\leftmarginvi
+\leftmark
+\leftrightarrow
+\leftskip
+\leq
+\let
+\lfloor
+\lg
+\lgroup
+\lhd
+\lhook
+\lim
+\liminf
+\limits
+\limsup
+\line
+\linebreak
+\linepenalty
+\lineskip
+\lineskip-
+\lineskiplimit
+\linespread
+\linethickness
+\linewidth
+\list
+\listfiles
+\listparindent
+\ll
+\llap
+\lmoustache
+\ln
+\lnot
+\log
+\loggingall
+\loggingoutput
+\long
+\longleftarrow
+\longleftrightarrow
+\longmapsto
+\longrightarrow
+\loop
+\lor
+\lower
+\lowercase
+\lq
+\lrbox
+\luabytecode
+\luachunk
+\luafunction
+\luatexversion
+\magstep
+\magstephalf
+\makeatletter
+\makeatother
+\makebox
+\makeglossary
+\makeindex
+\makelabel
+\mapsto
+\mapstochar
+\marginpar
+\marginparpush
+\marginparsep
+\marginparwidth
+\mark
+\markboth
+\markright
+\marks
+\math
+\mathaccent
+\mathalpha
+\mathbf
+\mathbin
+\mathcal
+\mathchar
+\mathchardef
+\mathcharzero
+\mathchoice
+\mathclose
+\mathcode
+\mathdollar
+\mathellipsis
+\mathgroup
+\mathhexbox
+\mathinner
+\mathit
+\mathnormal
+\mathop
+\mathopen
+\mathord
+\mathpalette
+\mathparagraph
+\mathpunct
+\mathrel
+\mathring
+\mathrm
+\mathsection
+\mathsf
+\mathsterling
+\mathstrut
+\mathsurround
+\mathtt
+\mathunderscore
+\mathversion
+\matrix
+\max
+\maxdeadcycles
+\maxdepth
+\maxdimen
+\mbox
+\mddefault
+\mdseries
+\meaning
+\medbreak
+\medmuskip
+\medskip
+\medskipamount
+\message
+\mho
+\mid
+\min
+\minipage
+\mkern
+\models
+\month
+\moveright
+\mp
+\mskip
+\mu
+\mubyte
+\multicolumn
+\multiply
+\multiput
+\multispan
+\muskip
+\muskipdef
+\muskipzero
+\nabla
+\narrower
+\natural
+\ne
+\nearrow
+\neg
+\negthinspace
+\neq
+\newXeTeXintercharclass
+\newattribute
+\newbox
+\newcatcodetable
+\newcommand
+\newcount
+\newcounter
+\newdimen
+\newenvironment
+\newfam
+\newfont
+\newhelp
+\newif
+\newinsert
+\newlabel
+\newlanguage
+\newlength
+\newline
+\newlinechar`
+\newluabytecode
+\newluachunkname
+\newluafunction
+\newmarks
+\newmuskip
+\newpage
+\newread
+\newsavebox
+\newskip
+\newtheorem
+\newtoks
+\newwhatsit
+\newwrite
+\ng
+\ni
+\noalign
+\nobreak
+\nobreakdashes
+\nobreakspace
+\nocite
+\nocorr
+\nocorrlist
+\noexpand
+\noexpandinvalid
+\noexpandis
+\noexpandnot
+\nofiles
+\noindent
+\nointerlineskip
+\nolimits
+\nolinebreak
+\nonfrenchspacing
+\nonscript
+\nonumber
+\nopagebreak
+\noprotrusion
+\normalbaselines
+\normalbaselineskip
+\normalcolor
+\normalfont
+\normallineskip
+\normallineskiplimit
+\normalmarginpar
+\normalsfcodes
+\normalsize
+\not
+\notin
+\nu
+\null
+\nulldelimiterspace
+\nullfont
+\number
+\numberline
+\numexpr
+\nwarrow
+\o
+\oalign
+\obeycr
+\obeylines
+\obeyspaces
+\oddsidemargin
+\odot
+\oe
+\of
+\offinterlineskip
+\oint
+\ointop
+\oldstylenums
+\omega
+\ominus
+\omit
+\onecolumn
+\ooalign
+\openin
+\openout
+\openup
+\oplus
+\or
+\oslash
+\otimes
+\output
+\outputpenalty
+\oval
+\over
+\overbrace
+\overfullrule
+\overleftarrow
+\overrightarrow
+\owns
+\pagebreak
+\pagenumbering
+\pageref
+\pageshrink
+\pagestyle
+\pagetotal
+\paperheight
+\paperwidth
+\par
+\paragraphmark
+\parallel
+\parbox
+\parfillskip
+\parindent
+\parsep
+\parseunicodedataI
+\parseunicodedataII
+\parseunicodedataIII
+\parseunicodedataIV
+\parseunicodedataV
+\parshape
+\parskip
+\partial
+\partopsep
+\penalty
+\perp
+\phantom
+\phi
+\pi
+\picture
+\pm
+\pmatrix
+\pmod
+\poptabs
+\postdisplaypenalty
+\pounds
+\prec
+\preceq
+\predisplaypenalty
+\pretolerance
+\prevdepth
+\prime
+\prod
+\propto
+\protect
+\protected
+\providecommand
+\psi
+\pushtabs
+\put
+\qbezier
+\qbeziermax
+\qquad
+\quad
+\r
+\radical
+\raggedbottom
+\raggedleft
+\raggedright
+\raise
+\raisebox
+\rangle
+\rbrace
+\rbrack
+\rceil
+\read
+\ref
+\refstepcounter
+\relax
+\relaxs
+\relbar
+\relpenalty
+\removelastskip
+\renewcommand
+\renewenvironment
+\repeat
+\requestedLaTeXdate
+\requestedpatchdate
+\restorecr
+\reversemarginpar
+\rfloor
+\rgroup
+\rhd
+\rho
+\rhook
+\right
+\rightarrow
+\rightarrow$
+\rightarrowfill
+\rightharpoondown
+\rightharpoonup
+\rightharpoonup$
+\rightleftharpoons
+\rightline
+\rightmargin
+\rightmark
+\rightskip
+\rlap
+\rmdefault
+\rmfamily
+\rmoustache
+\roman
+\romannumeral
+\root
+\rootbox
+\rq
+\rule
+\samepage
+\savebox
+\savecatcodetable
+\sb
+\sbox
+\scdefault
+\scriptfont
+\scriptscriptfont
+\scriptscriptstyle
+\scriptspace
+\scriptstyle
+\scshape
+\searrow
+\sec
+\secdef
+\sectionmark
+\selectfont
+\seriesdefault
+\setattribute
+\setbox
+\setcounter
+\setlength
+\setminus
+\setrangecatcode
+\settodepth
+\settoheight
+\settowidth
+\sfcode
+\sfdefault
+\sffamily
+\shapedefault
+\sharp
+\shipout
+\shortstack
+\showboxbreadth
+\showboxdepth
+\showhyphens
+\showoutput
+\showoverfull
+\sigma
+\sim
+\simeq
+\sin
+\sinh
+\skew
+\skip
+\skipdef
+\skipzero
+\slash
+\sldefault
+\sloppy
+\sloppypar
+\slshape
+\smallbreak
+\smallint
+\smallskip
+\smallskipamount
+\smash
+\smash,because
+\smile
+\sp
+\space
+\spacefactor
+\spaceskip
+\spadesuit
+\span
+\splitfirstmark
+\splitmaxdepth
+\splittopskip
+\sqcap
+\sqcup
+\sqrt
+\sqrtsign
+\sqsubset
+\sqsubseteq
+\sqsupset
+\sqsupseteq
+\ss
+\stackrel
+\star
+\stepcounter
+\stop
+\storedpar
+\stretch
+\string
+\stringallowed
+\strut
+\strutbox
+\subparagraphmark
+\subsectionmark
+\subset
+\subseteq
+\subsubsectionmark
+\succ
+\succeq
+\sum
+\sup
+\suppressfloats
+\supset
+\supseteq
+\surd
+\swarrow
+\symbol
+\symletters
+\symoperators
+\t
+\tabbing
+\tabbingsep
+\tabcolsep
+\tabskip
+\tabular
+\tabularnewline
+\tan
+\tanh
+\tau
+\tencirc
+\tencircw
+\tenln
+\tenlnw
+\textasciicircum
+\textasciitilde
+\textasteriskcentered
+\textbackslash
+\textbar
+\textbardbl
+\textbf
+\textbraceleft
+\textbraceright
+\textbullet
+\textcircled
+\textcommaabove
+\textcommabelow
+\textcompwordmark
+\textcopyright
+\textdagger
+\textdaggerdbl
+\textdollar
+\textellipsis
+\textemdash
+\textendash
+\textexclamdown
+\textfloatsep
+\textfont
+\textfont2
+\textfraction
+\textgreater
+\textheight
+\textit
+\textless
+\textmd
+\textnormal
+\textordfeminine
+\textordmasculine
+\textparagraph
+\textperiodcentered
+\textquestiondown
+\textquotedblleft
+\textquotedblright
+\textquoteleft
+\textquoteright
+\textregistered
+\textrm
+\textsc
+\textsection
+\textsf
+\textsl
+\textsterling
+\textstyle
+\textsubscript
+\textsuperscript
+\texttrademark
+\texttt
+\textunderscore
+\textup
+\textvisiblespace
+\textwidth
+\th
+\thanks
+\the
+\theequation
+\thefootnote
+\thempfn
+\thempfootnote
+\thepage
+\theta
+\thicklines
+\thickmuskip
+\thinlines
+\thinmuskip
+\thinspace
+\thispagestyle
+\tilde
+\time
+\times
+\title
+\to
+\today
+\toks
+\toksdef
+\tokszero
+\tolerance
+\top
+\topfigrule
+\topfraction
+\topmargin
+\topmark
+\topsep
+\topskip
+\totalheight
+\tracingall
+\tracingassigns
+\tracingcommands
+\tracingfonts
+\tracinggroups
+\tracingifs
+\tracinglostchars
+\tracingmacros
+\tracingnesting
+\tracingnone
+\tracingonline
+\tracingoutput
+\tracingpages
+\tracingparagraphs
+\tracingrestores
+\tracingscantokens
+\tracingstats
+\triangle
+\triangleleft
+\triangleright
+\trivlist
+\ttdefault
+\ttfamily
+\twocolumn
+\typein
+\typeout
+\u
+\uccode
+\uchyph
+\unboldmath
+\undefinedpagestyle
+\underbar
+\underbrace
+\underline
+\unexpanded
+\unhbox
+\unhcopy
+\unicodedataline
+\unicoderead
+\unitlength
+\unkern
+\unless
+\unlhd
+\unpenalty
+\unrhd
+\unsetattribute
+\unskip
+\unvbox
+\unvcopy
+\uparrow
+\upbracefill
+\updefault
+\updownarrow
+\uplus
+\uppercase
+\upshape
+\upsilon
+\usebox
+\usecounter
+\usefont
+\usepackage
+\v
+\vadjust
+\value
+\varbigtriangledown
+\varbigtriangleup
+\varepsilon
+\varphi
+\varpi
+\varrho
+\varsigma
+\vartheta
+\vbadness
+\vbox
+\vcenter
+\vdash
+\vdots
+\vec
+\vector
+\vee
+\verb
+\verbatim
+\verbvisiblespace
+\vert
+\vfil
+\vfilneg
+\vfuzz
+\vglue
+\vline
+\vphantom
+\vrule
+\vsize
+\vskip
+\vspace
+\vsplit
+\vss
+\vtop
+\wd
+\wedge
+\whatsit
+\widehat
+\widetilde
+\widowpenalties
+\widowpenalty
+\width
+\wlog
+\wp
+\wr
+\write
+\x
+\xdef
+\xi
+\year
+\z
+\zeta
+\|
+\~
diff --git a/macros/latex-dev/base/kernel-internal-commands.txt b/macros/latex-dev/base/kernel-internal-commands.txt
new file mode 100644
index 0000000000..acf20d96c5
--- /dev/null
+++ b/macros/latex-dev/base/kernel-internal-commands.txt
@@ -0,0 +1,1268 @@
+%%% list of internal commands defined by the kernel (not totally correct)
+%%% 2019/02
+
+\@
+\@@
+\@@enc@update
+\@@end
+\@@endpbox
+\@@eqncr
+\@@fileswith@pti@ns
+\@@hyph
+\@@if@newlist
+\@@ifdefinable
+\@@input
+\@@italiccorr
+\@@line
+\@@math@bgroup
+\@@math@egroup
+\@@par
+\@@protect
+\@@startpbox
+\@@underline
+\@@unprocessedoptions
+\@@warning
+\@Alph
+\@DeclareMathDelimiter
+\@DeclareMathSizes
+\@Esphack
+\@IncludeInRele@se
+\@IncludeInRelease
+\@M
+\@MM
+\@Mi
+\@Mii
+\@Miii
+\@Miv
+\@Roman
+\@TeXversion
+\@acci
+\@accii
+\@acciii
+\@acol
+\@acolampacol
+\@activechar@info
+\@addamp
+\@addfield
+\@addmarginpar
+\@addtobot
+\@addtocurcol
+\@addtodblcol
+\@addtofilelist
+\@addtonextcol
+\@addtopreamble
+\@addtoreset
+\@addtotoporbot
+\@afterheading
+\@afterindentfalse
+\@afterindenttrue
+\@alph
+\@ampacol
+\@arabic
+\@argarraycr
+\@argdef
+\@argtabularcr
+\@array
+\@arrayacol
+\@arrayc
+\@arrayclassiv
+\@arrayclassz
+\@arraycr
+\@arrayparboxrestore
+\@arrayrule
+\@arstrut
+\@arstrutbox
+\@author
+\@auxout
+\@backslashchar
+\@badend
+\@badlinearg
+\@badmath
+\@badpoptabs
+\@badrequireerror
+\@badtab
+\@begin@tempboxa
+\@begindocumenthook
+\@begindvi
+\@begindvibox
+\@beginparpenalty
+\@begintheorem
+\@bezier
+\@bibitem
+\@biblabel
+\@bitor
+\@botlist
+\@botnum
+\@botnum>
+\@botroom
+\@boxfpsbit
+\@break@tfor
+\@bsphack
+\@caption
+\@captype
+\@car
+\@carcube
+\@cclv
+\@cclvi
+\@cdr
+\@centercr
+\@centering
+\@cflb
+\@cflt
+\@changed@cmd
+\@charlb
+\@charrb
+\@chclass
+\@check@IncludeInRelease
+\@check@c
+\@check@eq
+\@checkend
+\@chnum
+\@circ
+\@circle
+\@circlefnt
+\@cite
+\@cite@ofmt
+\@citea
+\@citeb
+\@citex
+\@classi
+\@classii
+\@classiii
+\@classiv
+\@classoptionslist
+\@classv
+\@classz
+\@cline
+\@clnht
+\@clnwd
+\@cls@pkg
+\@clsextension
+\@clubpenalty
+\@colht
+\@colnum
+\@colroom
+\@combinedblfloats
+\@combinefloats
+\@comdblflelt
+\@comflelt
+\@cons
+\@contfield
+\@ctrerr
+\@curfield
+\@curline
+\@curr@enc
+\@currbox
+\@currdir
+\@current@cmd
+\@currentlabel
+\@currenvir
+\@currenvline
+\@currext
+\@currlist
+\@currname
+\@currnamestack
+\@curroptions
+\@currsize
+\@currtype
+\@curtab
+\@curtabmar
+\@dashbox
+\@dashcnt
+\@dashdim
+\@date
+\@dbflt
+\@dblarg
+\@dbldeferlist
+\@dblfloat
+\@dblfloatplacement
+\@dblfpbot
+\@dblfpsep
+\@dblfptop
+\@dbltoplist
+\@dbltopnum
+\@dbltoproom
+\@dec@text@cmd
+\@declaredoptions
+\@declareoption
+\@defaultsubs
+\@defaultunits
+\@defdefault@ds
+\@deferlist
+\@definecounter
+\@depth
+\@dischyph
+\@doclearpage
+\@documentclasshook
+\@doendpe
+\@dofilelist
+\@donoparitem
+\@dot
+\@dotsep
+\@dottedtocline
+\@downline
+\@downvector
+\@eha
+\@ehb
+\@ehc
+\@ehd
+\@elt
+\@empty
+\@emptycol
+\@end@check@IncludeInRelease
+\@end@tempboxa
+\@enddocumenthook
+\@endfloatbox
+\@endparenv
+\@endparpenalty
+\@endpbox
+\@endpefalse
+\@endpetrue
+\@endtheorem
+\@enlargepage
+\@ensuredmath
+\@enumctr
+\@enumdepth
+\@eqcnt
+\@eqncr
+\@eqnnum
+\@eqnsel
+\@eqnswfalse
+\@eqnswtrue
+\@eqpen
+\@err@
+\@esphack
+\@evenfoot
+\@evenhead
+\@expandtwoargs
+\@expast
+\@failedlist
+\@fcolmadefalse
+\@fcolmadetrue
+\@filef@und
+\@filelist
+\@fileswfalse
+\@fileswith@pti@ns
+\@fileswith@ptions
+\@fileswithoptions
+\@fileswtrue
+\@finalstrut
+\@firstampfalse
+\@firstamptrue
+\@firstcolfirstmark
+\@firstcoltopmark
+\@firstcolumnfalse
+\@firstcolumntrue
+\@firstofone
+\@firstoftwo
+\@firsttab
+\@flcheckspace
+\@flfail
+\@float
+\@floatboxreset
+\@floatpenalty
+\@floatplacement
+\@flsetnum
+\@flsettextmin
+\@flstop
+\@flsucceed
+\@fltovf
+\@flupdates
+\@flushglue
+\@fnsymbol
+\@font@info
+\@font@warning
+\@fontswitch
+\@footnotemark
+\@footnotetext
+\@for
+\@forloop
+\@fornoop
+\@fortmp
+\@fpbot
+\@fpmin
+\@fps
+\@fpsadddefault
+\@fpsep
+\@fpstype
+\@fptop
+\@frameb@x
+\@framebox
+\@framepicbox
+\@freelist
+\@getcirc
+\@getfpsbit
+\@getlarrow
+\@getlinechar
+\@getpen
+\@getrarrow
+\@glossaryfile
+\@gnewline
+\@gobble
+\@gobble@IncludeInRelease
+\@gobblecr
+\@gobblefour
+\@gobbletwo
+\@gtempa
+\@halfwidth
+\@halignto
+\@hangfrom
+\@height
+\@highpenalty
+\@hightab
+\@hline
+\@holdpg
+\@hspace
+\@hspacer
+\@hvector
+\@icentercr
+\@iden
+\@if
+\@if@pti@ns
+\@if@ptions
+\@ifatmargin
+\@ifbothcounters
+\@ifclasslater
+\@ifclassloaded
+\@ifclasswith
+\@ifdefinable
+\@iffileonpath
+\@ifl@aded
+\@ifl@t@r
+\@ifl@ter
+\@ifnch
+\@ifnextchar
+\@iforloop
+\@ifpackagelater
+\@ifpackageloaded
+\@ifpackagewith
+\@iframebox
+\@iframeboxc
+\@iframepicbox
+\@ifstar
+\@ifundefin@d@i
+\@ifundefin@d@ii
+\@ifundefined
+\@ignorefalse
+\@ignoretrue
+\@iiiminipage
+\@iiiparbox
+\@iiminipage
+\@iinput
+\@iiparbox
+\@iirsbox
+\@imakebox
+\@imakeboxc
+\@imakepicbox
+\@iminipage
+\@include
+\@includeinreleasefalse
+\@includeinreleasetrue
+\@index
+\@indexfile
+\@inlabelfalse
+\@inlabeltrue
+\@inmatherr
+\@inmathwarn
+\@inpenc@test
+\@input
+\@input@
+\@inputcheck
+\@inputcheck0
+\@insertfalse
+\@inserttrue
+\@iparbox
+\@irsbox
+\@isavebox
+\@isavepicbox
+\@ishortstack
+\@istackcr
+\@itabcr
+\@item
+\@itemdepth
+\@itemfudge
+\@itemitem
+\@itemlabel
+\@itempenalty
+\@iwhiledim
+\@iwhilenum
+\@iwhilesw
+\@ixpt
+\@ixstackcr
+\@killglue
+\@kludgeins
+\@labels
+\@largefloatcheck
+\@lastchclass
+\@latex@error
+\@latex@info
+\@latex@info@no@line
+\@latex@warning
+\@latex@warning@no@line
+\@latexbug
+\@latexerr
+\@lbibitem
+\@leftcolumn
+\@leftmark
+\@let@token
+\@lign
+\@linechar
+\@linefnt
+\@linelen
+\@listctr
+\@listdepth
+\@listfiles
+\@loadwithoptions
+\@lowpenalty
+\@ltab
+\@m
+\@mainaux
+\@makebox
+\@makecaption
+\@makecol
+\@makefcolumn
+\@makefnmark
+\@makefntext
+\@makeother
+\@makepicbox
+\@makespecialcolbox
+\@marbox
+\@marginparreset
+\@markright
+\@maxdepth
+\@maxtab
+\@medpenalty
+\@midlist
+\@minipagefalse
+\@minipagerestore
+\@minipagetrue
+\@minus
+\@missingfileerror
+\@mkboth
+\@mklab
+\@mkpream
+\@mparbottom
+\@mpargs
+\@mparswitchfalse
+\@mpfn
+\@mpfootins
+\@mpfootnotetext
+\@mplistdepth
+\@multicnt
+\@multiplelabels
+\@multiput
+\@multispan
+\@namedef
+\@nameuse
+\@nbitem
+\@ne
+\@needsf@rmat
+\@needsformat
+\@negargfalse
+\@negargtrue
+\@newcommand
+\@newctr
+\@newenv
+\@newenva
+\@newenvb
+\@newl@bel
+\@newline
+\@newlistfalse
+\@newlisttrue
+\@next
+\@nextchar
+\@nil
+\@nmbrlistfalse
+\@nmbrlisttrue
+\@nnil
+\@no@lnbk
+\@no@pgbk
+\@nobreakfalse
+\@nobreaktrue
+\@nocnterr
+\@nocounterr
+\@nodocument
+\@noitemargfalse
+\@noitemargtrue
+\@noitemerr
+\@noligs
+\@nolnerr
+\@nomath
+\@noparitemfalse
+\@noparitemtrue
+\@noparlistfalse
+\@noparlisttrue
+\@normalcr
+\@normalsize
+\@noskipsecfalse
+\@noskipsectrue
+\@notdefinable
+\@notprerr
+\@nthm
+\@nxttabmar
+\@obsoletefile
+\@oddfoot
+\@oddhead
+\@onefilewithoptions
+\@onelevel@sanitize
+\@onlypreamble
+\@opargbegintheorem
+\@opcol
+\@options
+\@othm
+\@outerparskip
+\@outputbox
+\@outputdblcol
+\@outputpage
+\@oval
+\@ovbtrue
+\@ovdx
+\@ovdy
+\@ovhlinefalse
+\@ovhlinetrue
+\@ovhorz
+\@ovltrue
+\@ovri
+\@ovro
+\@ovrtrue
+\@ovttrue
+\@ovvert
+\@ovvert0
+\@ovvlinefalse
+\@ovvlinetrue
+\@ovxx
+\@ovyy
+\@p@pfilename
+\@pagedp
+\@pageht
+\@par
+\@parboxrestore
+\@parboxto
+\@parmoderr
+\@parse@version
+\@parse@version@
+\@parse@version@dash
+\@partaux
+\@partlist
+\@partswfalse
+\@partswtrue
+\@pass@ptions
+\@pboxswfalse
+\@pboxswtrue
+\@penup
+\@percentchar
+\@picbox
+\@picht
+\@picture
+\@picture@warn
+\@pkgextension
+\@plus
+\@pnumwidth
+\@popfilename
+\@pr@videpackage
+\@preamble
+\@preamblecmds
+\@preamerr
+\@process@pti@ns
+\@process@ptions
+\@protected@testopt
+\@providesfile
+\@ptionlist
+\@pushfilename
+\@put
+\@qend
+\@qrelax
+\@rc@ifdefinable
+\@reargdef
+\@refundefined
+\@reinserts
+\@removeelement
+\@removefromreset
+\@reqcolroom
+\@reset@ptions
+\@resetactivechars
+\@resethfps
+\@restorepar
+\@reversemarginfalse
+\@reversemargintrue
+\@rightmark
+\@rightskip
+\@rjfieldfalse
+\@rjfieldtrue
+\@roman
+\@rsbox
+\@rtab
+\@rule
+\@sanitize
+\@savebox
+\@savemarbox
+\@savepicbox
+\@savsf
+\@savsk
+\@scolelt
+\@sdblcolelt
+\@seccntformat
+\@secondoftwo
+\@secpenalty
+\@sect
+\@seqncr
+\@setckpt
+\@setfloattypecounts
+\@setfontsize
+\@setfpsbit
+\@setmarks
+\@setminipage
+\@setnobreak
+\@setpar
+\@setref
+\@setsize
+\@settab
+\@settodim
+\@settopoint
+\@setupverbvisiblespace
+\@sharp
+\@shortstack
+\@shortstackc
+\@sline
+\@slowromancap
+\@spaces
+\@specialoutput
+\@specialpagefalse
+\@specialpagetrue
+\@specialstyle
+\@sptoken
+\@sqrt
+\@ssect
+\@stackcr
+\@star@or@long
+\@startcolumn
+\@startdblcolumn
+\@startfield
+\@startline
+\@startpbox
+\@startsection
+\@starttoc
+\@stopfield
+\@stopline
+\@stpelt
+\@svector
+\@sverb
+\@svsec
+\@svsechd
+\@swaptwoargs
+\@sxverbatim
+\@tabacckludge
+\@tabacol
+\@tabarray
+\@tabclassiv
+\@tabclassz
+\@tabcr
+\@tabfbox
+\@tablab
+\@tabminus
+\@tabplus
+\@tabpush
+\@tabrj
+\@tabular
+\@tabularcr
+\@tempboxa
+\@tempcnta
+\@tempcntb
+\@tempdima
+\@tempdima&
+\@tempdimb
+\@tempdimc
+\@tempskipa
+\@tempskipb
+\@tempswafalse
+\@tempswatrue
+\@temptokena
+\@testdef
+\@testfalse
+\@testfp
+\@testopt
+\@testpach
+\@testtrue
+\@testwrongwidth
+\@text@composite
+\@text@composite@x
+\@textbottom
+\@textfloatsheight
+\@textmin
+\@textsubscript
+\@textsuperscript
+\@texttop
+\@tf@r
+\@tfor
+\@tfor:
+\@tforloop
+\@thanks
+\@thefnmark
+\@thefoot
+\@thehead
+\@themargin
+\@themark
+\@thirdofthree
+\@thm
+\@thmcounter
+\@thmcountersep
+\@title
+\@tocrmarg
+\@toodeep
+\@toplist
+\@topnewpage
+\@topnum
+\@toproom
+\@topsep
+\@topsepadd
+\@totalleftmargin
+\@trivlist
+\@tryfcolumn
+\@trylist
+\@twoclasseserror
+\@twocolumnfalse
+\@twocolumntrue
+\@twoloadclasserror
+\@twosidefalse
+\@typein
+\@typeset@protect
+\@uclclist
+\@undefined
+\@unexpandable@protect
+\@unknownoptionerror
+\@unprocessedoptions
+\@unused
+\@unusedoptionlist
+\@upline
+\@upordown
+\@upvector
+\@use@ption
+\@use@text@encoding
+\@verb
+\@verbatim
+\@verbvisiblespacebox
+\@vereq
+\@viiipt
+\@viipt
+\@vipt
+\@vline
+\@vobeyspaces
+\@vpt
+\@vspace
+\@vspacer
+\@vtryfc
+\@vvector
+\@warning
+\@wckptelt
+\@whiledim
+\@whilenum
+\@whilesw
+\@wholewidth
+\@width
+\@wrglossary
+\@wrindex
+\@writeckpt
+\@writefile
+\@wrong@font@char
+\@wtryfc
+\@x@protect
+\@x@sf
+\@xDeclareMathDelimiter
+\@xaddvskip
+\@xarg
+\@xargarraycr
+\@xargdef
+\@xarraycr
+\@xbitor
+\@xcentercr
+\@xdblarg
+\@xdblfloat
+\@xdim
+\@xeqncr
+\@xexnoop
+\@xexpast
+\@xexpast*
+\@xfloat
+\@xfootnote
+\@xfootnotemark
+\@xfootnotenext
+\@xhline
+\@xifnch
+\@xiipt
+\@xipt
+\@xivpt
+\@xmpar
+\@xnewline
+\@xnext
+\@xnthm
+\@xobeysp
+\@xprocess@ptions
+\@xpt
+\@xsect
+\@xtabcr
+\@xtabularcr
+\@xthm
+\@xtryfc
+\@xtypein
+\@xverbatim
+\@xviipt
+\@xxDeclareMathDelimiter
+\@xxpt
+\@xxvpt
+\@xxxii
+\@xympar
+\@yarg
+\@yargarraycr
+\@yargd@f
+\@yargdef
+\@ydim
+\@yeqncr
+\@ympar
+\@ynthm
+\@ythm
+\@ytryfc
+\@yyarg
+\@ztryfc
+\DeclareFontEncoding@
+\DeclareFontEncoding@saved
+\DeclareFontShape@
+\DeclareSymbolFontAlphabet@
+\G@refundefinedtrue
+\SetMathAlphabet@
+\SetSymbolFont@
+\UTFviii@four@octets
+\UTFviii@four@octets@@
+\UTFviii@invalid@err
+\UTFviii@invalid@err@@
+\UTFviii@three@octets
+\UTFviii@three@octets@@
+\UTFviii@two@octets
+\UTFviii@two@octets@@
+\UTFviii@undefined@err
+\UTFviii@undefined@err@@
+\accent@spacefactor
+\active@math@prime
+\add@accent
+\add@percent@to@temptokena
+\addto@hook
+\alloc@
+\alpha@elt
+\alpha@list
+\best@size
+\bm@b
+\bm@c
+\bm@l
+\bm@r
+\bm@s
+\bm@t
+\bx@A
+\bx@AA
+\bx@B
+\bx@BB
+\bx@C
+\bx@CC
+\bx@D
+\bx@DD
+\bx@E
+\bx@EE
+\bx@F
+\bx@FF
+\bx@G
+\bx@GG
+\bx@H
+\bx@HH
+\bx@I
+\bx@II
+\bx@J
+\bx@JJ
+\bx@K
+\bx@KK
+\bx@L
+\bx@LL
+\bx@M
+\bx@MM
+\bx@N
+\bx@NN
+\bx@O
+\bx@OO
+\bx@P
+\bx@PP
+\bx@Q
+\bx@QQ
+\bx@R
+\bx@RR
+\bx@S
+\bx@SS
+\bx@T
+\bx@TT
+\bx@U
+\bx@UU
+\bx@V
+\bx@VV
+\bx@W
+\bx@WW
+\bx@X
+\bx@XX
+\bx@Y
+\bx@YY
+\bx@Z
+\bx@ZZ
+\c@bottomnumber
+\c@dbltopnumber
+\c@equation
+\c@errorcontextlines
+\c@footnote
+\c@mpfootnote
+\c@ncel
+\c@page
+\c@secnumdepth
+\c@tocdepth
+\c@topnumber
+\c@totalnumber
+\calculate@math@sizes
+\catcodetable@atletter
+\catcodetable@initex
+\catcodetable@latex
+\catcodetable@string
+\cdp@elt
+\cdp@list
+\cf@encoding
+\ch@ck
+\chardef@text@cmd
+\check@command
+\check@icl
+\check@icr
+\check@mathfonts
+\check@nocorr@
+\check@range
+\check@single
+\cl@@ckpt
+\cl@page
+\col@number
+\color@begingroup
+\color@endbox
+\color@endgroup
+\color@hbox
+\color@setgroup
+\color@vbox
+\count@
+\counterwithin@s
+\counterwithin@x
+\counterwithout@s
+\counterwithout@x
+\curr@fontshape
+\curr@math@size
+\declare@robustcommand
+\default@M
+\default@T
+\default@ds
+\default@family
+\default@series
+\default@shape
+\define@newfont
+\dimen@
+\dimen@i
+\dimen@ii
+\displ@y
+\do@noligs
+\do@subst@correction
+\document@default@language
+\document@select@group
+\dorestore@version
+\ds@
+\dt@pfalse
+\dt@ptrue
+\e@alloc
+\e@alloc@attribute@count
+\e@alloc@bytecode@count
+\e@alloc@ccodetable@count
+\e@alloc@chardef
+\e@alloc@intercharclass@top
+\e@alloc@luachunk@count
+\e@alloc@luafunction@count
+\e@alloc@top
+\e@alloc@whatsit@count
+\e@ch@ck
+\e@insert@top
+\e@mathgroup@top
+\empty@sfcnt
+\enc@update
+\end@dblfloat
+\end@float
+\error@fontshape
+\every@math@size
+\execute@size@function
+\external@font
+\extract@alph@from@version
+\extract@font
+\extract@fontinfo
+\extract@rangefontinfo
+\extract@sizefn*
+\f@baselineskip
+\f@depth
+\f@encoding
+\f@family
+\f@linespread
+\f@series
+\f@shape
+\f@size
+\f@user@size
+\filec@ntents
+\filename@area
+\filename@base
+\filename@dot
+\filename@ext
+\filename@parse
+\filename@path
+\filename@simple
+\finph@nt
+\finsm@sh
+\fix@penalty
+\fixed@sfcnt
+\float@count
+\font@info
+\font@name
+\font@submax
+\frozen@everydisplay
+\frozen@everymath
+\g@addto@macro
+\gen@sfcnt
+\genb@sfcnt
+\genb@x
+\genb@y
+\get@cdp
+\get@external@font
+\getanddefine@fonts
+\glb@currsize
+\glb@settings
+\group@elt
+\group@list
+\h@false
+\h@true
+\hb@xt@
+\hexnumber@
+\hgl@
+\hmode@bgroup
+\hmode@start@before@group
+\if@afterindent
+\if@compatibility
+\if@endpe
+\if@eqnsw
+\if@fcolmade
+\if@filesw
+\if@firstamp
+\if@firstcolumn
+\if@ignore
+\if@includeinrelease
+\if@inlabel
+\if@insert
+\if@minipage
+\if@mparswitch
+\if@negarg
+\if@newlist
+\if@nmbrlist
+\if@nobreak
+\if@noitemarg
+\if@noparitem
+\if@noparlist
+\if@noskipsec
+\if@ovb
+\if@ovhline
+\if@ovl
+\if@ovr
+\if@ovt
+\if@ovvline
+\if@partsw
+\if@pboxsw
+\if@reversemargin
+\if@rjfield
+\if@specialpage
+\if@tempswa
+\if@test
+\if@twocolumn
+\if@twoside
+\ifdt@p
+\ifh@
+\ifin@
+\ifmath@fonts
+\ifmaybe@ic
+\ifnot@nil
+\ifv@
+\in@
+\in@@
+\in@false
+\in@true
+\init@restore@glb@settings
+\init@restore@version
+\input@path
+\input@path:
+\insc@unt
+\install@mathalphabet
+\is@range
+\kernel@ifnextchar
+\l@ngrel@x
+\l@nohyphenation
+\last@fontshape
+\leavevmode@ifvmode
+\load@onefilewithoptions
+\lower@bound
+\lower@bound0
+\ltx@sh@ft
+\m@ne
+\m@th
+\makeph@nt
+\makesm@sh
+\mandatory@arg
+\math@bgroup
+\math@egroup
+\math@fonts
+\math@fontsfalse
+\math@fontstrue
+\math@version
+\mathchar@type
+\mathph@nt
+\mathsm@sh
+\maybe@ic
+\maybe@ic@
+\maybe@icfalse
+\maybe@ictrue
+\mb@b
+\mb@l
+\mb@r
+\mb@t
+\n@space
+\new@command
+\new@environment
+\new@mathalphabet
+\new@mathgroup
+\new@mathversion
+\new@symbolfont
+\nfss@catcodes
+\nfss@text
+\no@alphabet@error
+\noaccents@
+\non@alpherr
+\not@base
+\not@math@alphabet
+\o@lign
+\on@line
+\operator@font
+\optional@arg
+\outer@nobreak
+\p@
+\p@equation
+\par@deathcycles
+\patch@level
+\ph@nt
+\pickup@font
+\pictur@
+\pkgcls@arg
+\pkgcls@candidate
+\pkgcls@debug
+\pkgcls@innerdate
+\pkgcls@mindate
+\pkgcls@name
+\pkgcls@parse@date@arg
+\pkgcls@parse@date@arg@
+\pkgcls@parse@date@arg@version
+\pkgcls@releasedate
+\pkgcls@rollbackdate@error
+\pkgcls@show@selection
+\pkgcls@targetdate
+\pkgcls@targetlabel
+\pkgcls@use@this@release
+\pr@@@s
+\pr@@@t
+\pr@m@s
+\prim@s
+\process@table
+\protected@edef
+\protected@file@percent
+\protected@write
+\protected@xdef
+\provide@command
+\ps@empty
+\ps@plain
+\r@@t
+\rem@pt
+\remove@angles
+\remove@star
+\remove@star*
+\remove@to@nnil
+\renew@command
+\renew@environment
+\reserved@a
+\reserved@b
+\reserved@c
+\reserved@d
+\reserved@e
+\reserved@f
+\reset@font
+\restglb@settings
+\restore@mathversion
+\restore@protect
+\rlh@
+\saved@space@catcode
+\scriptfont@name
+\select@group
+\set@@mathdelimiter
+\set@color
+\set@display@protect
+\set@fontsize
+\set@mathaccent
+\set@mathchar
+\set@mathdelimiter
+\set@mathsymbol
+\set@simple@size@args
+\set@size@funct@args
+\set@size@funct@args@
+\set@typeset@protect
+\sf@size
+\sh@ft
+\sixt@@n
+\size@update
+\sizefn@info
+\skip@
+\sp@n
+\split@name
+\ssf@size
+\strip@prefix
+\strip@pt
+\sub@sfcnt
+\subf@sfcnt
+\subst@correction
+\sw@slant
+\t@st@ic
+\text@command
+\textfont@name
+\tf@size
+\thr@@
+\toks@
+\try@load@fontshape
+\try@simple@size
+\try@simples
+\try@size@range
+\try@size@substitution
+\tryif@simple
+\tw@
+\two@digits
+\unrestored@protected@xdef
+\upper@bound
+\use@mathgroup
+\v@false
+\v@true
+\verb@balance@group
+\verb@egroup
+\verb@eol@error
+\verbatim@font
+\verbatim@nolig@list
+\version@elt
+\version@list
+\vgl@
+\voidb@x
+\wrong@fontshape
+\x@protect
+\xe@alloc@intercharclass
+\z@
+\z@skip
+\zap@space
diff --git a/macros/latex-dev/base/lablst.tex b/macros/latex-dev/base/lablst.tex
new file mode 100644
index 0000000000..241090e53e
--- /dev/null
+++ b/macros/latex-dev/base/lablst.tex
@@ -0,0 +1,160 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% LABLST.TEX -- A LaTeX input file for printing label definitions.
+% Copyright (c) 1985, 1994 by Leslie Lamport, Chris Rowley
+% This file created on 5 November 1994
+%
+% Modified December 1994 (DPC) to allow _ ^ etc in label keys and to
+% input packages used by the main file.
+%
+% Modified June 1995 (CAR)
+%
+% This version puts all bibilographic entries at the end of the
+% output. It inputs the .aux file twice.
+
+% Initial interactions:
+%
+\typeout{}
+\typeout{LABLST version of 10 June 1995}
+\typeout{}
+\typeout{*********************************}
+\typeout{* Enter input file name }
+\typeout{* \space\space without the .tex extension: }
+\typein[\lablstfile]{*********************************}
+
+
+\def\spaces{\space\space\space\space\space}
+\typeout{}
+\typeout{********************************************************}
+\typeout{* Enter document class used in file \lablstfile.tex }
+\typeout{* \space\space with no options or extension: }
+\typein[\lablstclass]%
+ {********************************************************}
+
+\documentclass{\lablstclass}
+
+% Now ask for packages. The answer should be a comma separated list.
+% In fact only packages that define commands that are used in
+% section titles etc need be loaded.
+% \def\spaces{\space\space\space\space\space}
+\typeout{}
+\typeout{**************************************************}
+\typeout{* Enter packages used in file \lablstfile.tex }
+\typeout{* \space\space with no options or extensions: }
+\typein[\lablstpackages]%
+ {**************************************************}
+
+\usepackage{\lablstpackages}
+
+\nofiles
+\parindent 0pt
+
+\begin{document}
+
+\mbox{}
+
+\vspace{-3cm}
+
+{\LARGE File \textbf{\lablstfile.tex} --- lablst output}
+{\Large (\today)
+\\[0.5\baselineskip]
+Using document class:\quad \lablstclass\\
+ \mbox{\phantom{Using }and packages:\quad \lablstpackages}
+ }
+
+\vspace{2\baselineskip}
+
+\makeatletter
+
+% This is always disabled:
+%
+\let \@mlabel \@gobbletwo
+
+% No protection needed:
+%
+\let \protect \relax
+
+% Better formatting?:
+%
+\let \raggedright \relax
+
+% Only write out toc entries:
+%
+\def \@writefile #1#2{%
+ \def\lablst@tempa{#1}%
+ \def\lablst@tempb{toc}%
+ \ifx \lablst@tempa\lablst@tempb
+ \par{#2}\par\nobreak
+ \vspace{3pt}%
+ \fi
+}
+
+% Allow characters like ^ _ to be printed `verbatim'.
+%
+\def\@lablstverb#1{%
+ \def\lablst@tempa{#1}%
+ {\ttfamily\expandafter\strip@prefix\meaning\lablst@tempa}}%
+
+
+% For first run:
+%
+\def \newlabel #1#2{%
+ \par
+ \hbox to \textwidth{%
+ \hfill\makebox[10em][r]{\@lablstverb{#1}}%
+ \hspace{1em}\makebox[4.5em][l]{\@firstoftwo #2}%
+ Page:
+ \makebox[2.5em][r]{\@secondoftwo #2}%
+ \hspace{4em}}\par
+}
+
+\let \bibcite \@gobbletwo
+
+{\Large \sl Logical labels within sections}
+
+\input \lablstfile.aux
+
+
+% For second run:
+%
+\def \bibcite #1#2{\par
+ \hbox to \textwidth{%
+ \hfill\makebox[2in][r]{\@lablstverb{#1}}\hspace{1em}[#2]\hspace{4em}}}
+
+\let \newlabel \@gobbletwo
+\let \@writefile \@gobbletwo
+
+\par
+\vspace{2\baselineskip}
+
+{\Large \sl Bibliography logical labels}
+
+\input \lablstfile.aux
+
+\end{document}
diff --git a/macros/latex-dev/base/latex209.dtx b/macros/latex-dev/base/latex209.dtx
new file mode 100644
index 0000000000..cc5563c632
--- /dev/null
+++ b/macros/latex-dev/base/latex209.dtx
@@ -0,0 +1,1136 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \title{Compatibility mode for \LaTeXe{} emulating \LaTeX~2.09}
+% \author{Alan Jeffrey and Frank Mittelbach}
+% \date{1995/12/27}
+%
+%
+%
+% \changes{v0.01}{1993/12/11}{Created the file, including:
+% setting the compatibility flag,
+% inputting oldlfont.sty,
+% setting the default encoding to be OT1, and
+% inputting the latex209.rc file}
+% \changes{v0.02}{1993/12/12}{Changed the package filename to
+% latex209.sty, and added the provides-package command.}
+% \changes{v0.03}{1993/12/16}{Added an empty mark, replaced
+% provides-package with provides-file, added the compatibility hook.}
+% \changes{v0.04}{1993/12/16}{Moved oldlfont.sty out of the
+% compatibility hook and back into latex209.cmp. Redefined
+% newfontswitch to ignore redefinitions. Set the LaTeX 2e commands
+% to be errors.}
+% \changes{v0.05}{1993/12/17}
+% {Removed the \cs{mark}, since it is now in the kernel.}
+% \changes{v0.06}{1993/12/18}{Replaced the redefinition of
+% \cs{@newfontswitch} to a redefinition of \cs{@renewfontswitch}.
+% Added \cs{sloppy.}}
+% \changes{v0.07}{1993/12/18}{Fixed a bug with \cs{@missingfileerror}.}
+% \changes{v0.08}{1993/12/18}{Added the obsolete .sty files.}
+% \changes{v0.09}{1993/12/20}{Removed art10.sty and friends.}
+% \changes{v0.10}{1994/01/14}{Replaced latex209.rc by latex209.cfg.}
+% \changes{v0.11}{1994/01/21}{Replaced latex209.cmp by latex209.def.
+% Moved half of oldlfont.dtx to here. Split the package dst option
+% into head and tail.}
+% \changes{v0.12}{1994/01/24}
+% {Added \cs{normalshape} and \cs{mediumseries}, and
+% declared the `oldlfont' option to stop oldlfont.sty from being
+% loaded.}
+% \changes{v0.13}{1994/01/31}{removed setting of \cs{normalsize}. FMi}
+% \changes{v0.14}{1994/02/07}{Added it back again.}
+% \changes{v0.15}{1994/02/10}{Renamed \cs{@compatibility} to
+% \cs{@documentclasshook}. Added the check for whether
+% \cs{normalsize} or \cs{@normalsize} needs defined.}
+% \changes{v0.16}{1994/02/11}{Replaced the allocation of temporary
+% dimens for \cs{footheight}, \cs{@maxsep} and \cs{@dblmaxsep}
+% by real dimen variables.}
+% \changes{v0.17}{1994/03/02}{Moved the documentation to the front, so
+% this file can be processed directly without a driver file.
+% Added \cs{@ptscale}, \cs{@halfmag}, \cs{@magscale}, and set the
+% default font to be CMR at 10pt.}
+% \changes{v0.18}{1994/03/11}{Restored the old definition of \cs{verb}.
+% Set the catcodes of the non-alphanumerics.}
+% \changes{v0.19}{1994/04/05}{Switched off more 2e features: \cs{lrbox},
+% \cs{width}, \cs{height}, \cs{depth} in box dimensions, and the new
+% optional arguments to \cs{parbox}, \cs{minipage} and
+% \cs{newcommand}. The code was provided by DPC. Fixed a misplaced
+% </head!>. Made the \cs{ProvidesPackage} and \cs{ProvidesClass}
+% warnings log messages. Removed \cs{filedate}.}
+% \changes{v0.20}{1994/04/20}
+% {Restored the 2.09 definition of \cs{@noligs}.}
+% \changes{v0.21}{1994/04/24}
+% {Restored the 2.09 definition of \cs{@lquote}.}
+% \changes{v0.22}{1994/05/02}{Added \cs{@latex@e@command}.}
+% \changes{v0.23}{1994/05/11}{Added bezier.sty.}
+% \changes{v0.24}{1994/05/14}{Removed \cs{@@@} and switched the box
+% commands back on, for use in packages.}
+% \changes{v0.24}{1994/05/14}{Changed the 2e command error help.}
+% \changes{v0.24}{1994/05/14}{Removed date from announcement of
+% 2.09 mode.}
+% \changes{v0.25}{1994/05/14}{Added the newlfont option, and rewrote the
+% oldlfont option.}
+% \changes{v0.26}{1994/05/15}{Added the margid and nomargid options.}
+% \changes{v0.27}{1994/05/16}{Fixed a bug with the margid option.}
+% \changes{v0.28}{1994/05/16}{Fixed a bug with \cs{mediumseries}.}
+% \changes{v0.29}{1994/05/17}{Fixed a bug with \cs{newlfont}.}
+% \changes{v0.29}{1994/05/17}{Removed extra spaces from the missing
+% file error.}
+% \changes{v0.29}{1994/05/17}{Made the bezier package use \cs{iffalse}
+% to comment itself out, rather than \%\%, which caused it to
+% appear in every 2.09 file.}
+% \changes{v0.30}{1994/05/18}{Added \cs{@finalstrut}.}
+% \changes{v0.31}{1994/05/20}{New definition of \cs{@finalstrut}.}
+% \changes{v0.31}{1994/05/20}{Added the t1enc package.}
+% \changes{v0.32}{1994/05/20}{Added SLiTeX.}
+% \changes{v0.33}{1994/06/01}{Fixed bug with SLiTeX.}
+% \changes{v0.34}{1994/08/22}{Replaced l2euser by usrguide.}
+% \changes{v0.34}{1994/08/22}{Added a default definition for \cs{+}.}
+% \changes{v0.35}{1994/09/23}
+% {Added spaces to the old font scale commands.}
+% \changes{v0.36}{1994/10/17}{Added an empty \cs{mark} back again.}
+% \changes{v0.37}{1994/10/20}{Corrected a typo.}
+% \changes{v0.38}{1994/11/16}{Removed \cs{LaTeXe} from this list}
+% \changes{v0.39}{1994/11/28}{Added old behaviour of floats and space.}
+% \changes{v0.40}{1995/05/05}{Make \cs{verb} use \cs{tt} font in
+% math mode.}
+% \changes{v0.49}{1995/10/26}{Added code for fleqn.sty, leqno.sty,
+% openbib.sty.}
+% \changes{v0.50}{1995/12/08}{Switched of \cs{@inmathwarn}.}
+% \changes{v0.53}{2015/02/22}{Dropped \cs{@no@font@optfalse} in various places
+% - no longer provided by ltfsscmp.dtx.}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+%
+% The file |latex209.def| is read in by \LaTeXe{} whenever it finds a
+% |\documentstyle| rather than |\documentclass| command at the
+% beginning of the file. This indicates a \LaTeX~2.09 document, which
+% should be processed in {\em compatibility mode}.
+%
+% Any document which compiled under \LaTeX~2.09 should compile under
+% compatibility mode, unless it uses low-level commands such as
+% |\tenrm|.
+%
+% \section{The docstrip modules}
+%
+% The following modules are used in the implementation to direct
+% docstrip in generating the external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% head & produce the beginning of |latex209.def| \\
+% tail & produce the end of |latex209.def| \\
+% article & produce |article.sty| \\
+% book & produce |book.sty| \\
+% report & produce |report.sty| \\
+% slides & produce |slides.sty| \\
+% letter & produce |letter.sty| \\
+% bezier & produce |bezier.sty| \\
+% fleqn & produce |fleqn.sty| \\
+% leqno & produce |leqno.sty| \\
+% openbib & produce |openbib.sty|
+% \end{tabular}
+% \end{center}
+% Between the |head| and |tail| of |latex209.def|, the code for
+% |oldlfont.sty| is included, so \LaTeX~2.09 documents will
+% automatically be run simulating the OFSS.
+% \changes{v0.09}{1993/12/20}{Removed artN.sty, bkN.sty and repN.sty.}
+% \changes{v0.11}{1994/01/21}{Split package into head and tail.}
+% \changes{v0.23}{1994/05/11}{Added bezier option.}
+%
+% \StopEventually{}
+%
+% \section{Driver}
+%
+% This section contains the driver for this documentation.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\DisableCrossrefs
+% \OnlyDescription
+\begin{document}
+ \DocInput{latex209.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \section{Beginning of latex209.def}
+%
+% \changes{v0.11}{1994/01/21}{oldlfont.dtx is now also used to generate
+% latex209.dtx.}
+%
+% This section describes the beginning of the file |latex209.def|.
+% \begin{macrocode}
+%<*head>
+% \end{macrocode}
+%
+% \subsection{Identification}
+%
+% This file needs to be run with \LaTeXe.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+% \end{macrocode}
+% Describe the file.
+% \begin{macrocode}
+\ProvidesFile{latex209.def}[2018/08/11 v0.54 Standard LaTeX file]
+% \end{macrocode}
+% \changes{v0.24}{1994/05/14}{Removed date.}
+% \changes{v0.40}{1995/03/21}
+% {(DPC) Do not execute this file twice latex/1460}
+% Announce compatibility mode to the user.
+% \changes{v0.52}{1998/05/13}{Added experimental
+% long typeout to possibly avoid prs like 2807}
+% \begin{macrocode}
+\if@compatibility
+ \expandafter\endinput
+\else
+ \typeout{^^J\space
+\@spaces\@spaces\space Entering LaTeX 2.09 COMPATIBILITY MODE^^J\space
+ *************************************************************^^J\space
+ \space\space\space!!WARNING!!\space
+ \space\space\space!!WARNING!!\space
+ \space\space\space!!WARNING!!\space
+ \space\space\space!!WARNING!!\space\space\space ^^J\space
+ ^^J\space
+ This mode attempts to provide an emulation of the LaTeX 2.09^^J\space
+ author environment so that OLD documents can be successfully^^J\space
+ processed. It should NOT be used for NEW documents!^^J\space
+ ^^J\space
+ New documents should use Standard LaTeX conventions and start^^J\space
+ with the \string\documentclass\space command.^^J\space
+ ^^J\space
+ Compatibility mode is UNLIKELY TO WORK with LaTeX 2.09 style^^J\space
+ files that change any internal macros, especially not with^^J\space
+ those that change the FONT SELECTION or OUTPUT ROUTINES.^^J\space
+^^J\space
+ Therefore such style files MUST BE UPDATED to use^^J\space
+\@spaces\@spaces\space Current Standard LaTeX: LaTeX2e.^^J\space
+ If you suspect that you may be using such a style file, which^^J\space
+ is probably very, very old by now, then you should attempt to^^J\space
+ get it updated by sending a copy of this error message to the^^J\space
+ author of that file.^^J\space
+ *************************************************************^^J}
+ \fi
+% \end{macrocode}
+%
+% \subsection{Compatibility flag}
+%
+% \begin{macro}{\@compatibilitytrue}
+% \LaTeXe{} has a flag |\if@compatibility| which can be used by
+% document classes or packages to determine whether they are running
+% in compatibility mode or not. This flag is set true by this file.
+% \begin{macrocode}
+\@compatibilitytrue
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Removing features}
+%
+% \changes{v0.22}{1994/05/02}{Added \cs{@latex@e@command}.}
+% \changes{v0.36}{1994/10/17}{Redid switching off commands.}
+% \changes{v0.38}{1994/11/16}{Removed \cs{LaTeXe} from this list}
+%
+% \begin{macro}{\usepackage}
+% \begin{macro}{\listfiles}
+% \begin{macro}{\ensuremath}
+% \begin{macro}{\lrbox}
+% \begin{macro}{\newcommand}
+% These \LaTeXe{} commands are switched off in compatibility mode.
+% This is done by saving the old definition, and redefining the
+% command to call |\@latex@e@error| before executing the old version.
+% \begin{macrocode}
+\def\@tempa#1#2{%
+ \expandafter\let\csname @@\string#1\endcsname#1%
+ \edef#1{%
+ \noexpand\@latex@e@error{\noexpand#2}%
+ \expandafter\noexpand\csname @@\string#1\endcsname
+ }%
+}
+\@tempa\usepackage\usepackage
+\@tempa\listfiles\listfiles
+\@tempa\ensuremath\ensuremath
+\@tempa\lrbox{\begin{lrbox}}%
+\@tempa\@xargdef{\newcommand{cmd}[args][def]}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v0.22}{1994/05/02}
+% {Added \cs{if@latex@e@errors} and \cs{@@@}.}
+% \changes{v0.24}
+% {1994/05/14}{Removed \cs{if@latex@e@errors} and \cs{@@@}.}
+% \changes{v0.24}{1994/05/14}{Changed the error help.}
+% \changes{v0.36}{1994/10/17}{Initialized \cs{@latex@e@error} to do
+% nothing, and switched it on at the begin document.}
+%
+% \begin{macro}{\@latex@e@error}
+% \begin{macro}{\@latex@e@error@}
+% This error is produced if a user uses a \LaTeXe{} command in
+% compatibility mode. This is to encourage users to move over to
+% using |\documentclass| as quickly as possible. During the preamble
+% the error does nothing (so that packages can use \LaTeXe{} commands)
+% but it is redefined to be an error message at |\begin{document}|.
+% \begin{macrocode}
+\let\@latex@e@error\@gobble
+\def\@latex@e@error@#1{%
+ \@latexerr{%
+ LaTeX2e command \string#1\space in LaTeX 2.09 document%
+ }{%
+ This is a LaTeX 2.09 document, but it contains
+ \string#1.^^J%
+ If you want to use the new features of LaTeX2e,
+ your document^^J%
+ should begin with \string\documentclass\space
+ rather than \string\documentstyle
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v0.36}{1994/10/17}
+% {Allow 2e commands to be redefined once with \cs{newcommand}.}
+% \changes{v0.40}{1995/03/21}{
+% (DPC) Add \cs{r} to the list of 2e commands latex/1424}
+%
+% \begin{macro}{\@ifdefinable}
+% \begin{macro}{\@old@ifdefinable}
+% \begin{macro}{\@@ifdefinable}
+% \begin{macro}{\@latex@e@commands}
+% We trap the |\@notdefinable| error message to check to see if the
+% command is a \LaTeXe{} command, in which case we allow the
+% definition to happen. We keep a list of commands which are
+% allowed to be redefined this way in |\@latex@e@commands|, and
+% remove an entry each time it is defined.
+% \begin{macrocode}
+\let\@old@ifdefinable\@ifdefinable
+\long\def\@ifdefinable#1{%
+ \def\@tempa##1#1##2#1##3#1##4\@tempa{%
+ \def\@latex@e@commands{##1##2}%
+ ##3% ##3 will either be \iftrue or \iffalse
+ \expandafter\@firstofone
+ \else
+ \expandafter\@old@ifdefinable\expandafter#1%
+ \fi
+ }%
+ \expandafter\@tempa\@latex@e@commands#1\iftrue#1\iffalse#1\@tempa%
+}
+\let\@@ifdefinable\@ifdefinable
+\def\@latex@e@commands{%
+ \usepackage\listfiles\ensuremath\LaTeXe\lrbox
+ \th\dh\ng\dj\TH\DH\NG\DJ\k\r\SS
+ \guillemetleft\guillemetright
+ \guillemotleft\guillemotright\guilsinglleft
+ \guilsinglright\quotedblbase\quotesinglbase
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@begin@tempboxa}
+% \changes{v0.22}{1994/05/02}{Commented out the redefinition of
+% \cs{@begin@tempboxa}.}
+% If we were to switch off the new |\width|, |\height| and |\depth|
+% commands, this is how to do it. This isn't done, since these
+% commands may be used in packages.
+% \begin{verbatim}
+%\long\def\@begin@tempboxa#1#2{%
+% \begingroup
+% \setbox\@tempboxa#1{{#2}}}
+% \end{verbatim}
+% \end{macro}
+%
+% \subsection{Document class hook}
+%
+% \begin{macro}{\@documentclasshook}
+% \changes{v0.15}{1994/02/10}{Renamed from \cs{@compatibility} to
+% \cs{@documentclasshook}. Added the check for \cs{@normalsize} and
+% \cs{normalsize} being defined.}
+% \changes{v0.22}{1994/05/02}{Moved switching off commands into the
+% document class hook.}
+% \changes{v0.24}{1994/05/14}{Switched the box commands back on, for use
+% in packages.}
+% \changes{v0.36}{1994/10/17}{Changed the way the 2e command error is
+% activated.}
+% \changes{v0.51}{1996/05/24}{(DPC) Reimplemented for /2153.}
+% This macro is called by each use of |\documentclass|. We define
+% it to define |\@normalsize| and |\normalsize| if necessary,
+% to input each unused option as a package, and to switch off the new
+% \LaTeXe{} commands. However, we leave on the commands
+% |\settoheight|, |\settowidth| and the new options to |\parbox| and
+% |\minipage|, since these are likely to be used in packages.
+%
+% The intention of the strange |\normalsize| tests below are that after
+% the |\documentstyle| command has completed, then
+% if neither of the commands |\normalsize|
+% nor |\@normalsize| were defined by the main style or one of its
+% `substyles' or `options', then |\@normalsize| will be undefined and
+% |\normalsize| will generate an error saying it hasn't been defined.
+%
+% If the style defined either |\normalsize| or \@|normalsize| then
+% these two commands will be |\let| equal to each other, with the
+% definition given by the style file.
+%
+% If the style defines both |\normalsize| and |\@normalsize| then
+% those two definitions are kept.
+% \begin{macrocode}
+\def\@documentclasshook{%
+ \RequirePackage\@unusedoptionlist
+ \let\@unusedoptionlist\@empty
+ \def\@tempa{\@normalsize}%
+ \ifx\normalsize\@tempa
+ \let\normalsize\@normalsize
+ \fi
+ \ifx\@normalsize\@undefined
+ \let\@normalsize\normalsize
+ \fi
+ \ifx\normalsize\@undefined
+ \let\normalsize\original@normalsize
+ \fi
+ \let\@latex@e@error\@latex@e@error@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\original@normalsize}
+% \changes{v0.51}{1996/05/24}{(DPC) Macro added /2153.}
+% Save the original definition of |\normalsize| (which generates an
+% error)
+% \begin{macrocode}
+\let\original@normalsize\normalsize
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\normalsize}
+% \changes{v0.14}{1994/02/07}{Added \cs{normalsize}.}
+% Some styles don't define |\normalsize|, just |\@normalsize|.
+% \begin{macrocode}
+\def\normalsize{\@normalsize}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Compatibility with \LaTeX~2.09 document styles}
+%
+% \begin{macro}{\@missingfileerror}
+% If a |.cls| file is missing, we look to see if there is
+% a file of the same name with a |.sty| extension.
+% \changes{v0.06}{1993/12/18}{Corrected a typo
+% \cs{@saved@missingfileerror}
+% should have been \cs{saved@missingfileerror}.}
+% \changes{v0.07}{1993/12/18}{Corrected a typo, I'd forgotten to pass
+% the arguments of \cs{@missingfileerror} on to
+% \cs{saved@missingfileerror}.}
+% \changes{v0.29}{1994/05/17}{Removed extraneous spaces.}
+% \begin{macrocode}
+\@ifundefined{saved@missingfileerror}{
+ \let\saved@missingfileerror=\@missingfileerror
+}{}
+\def\@missingfileerror#1#2{%
+ \ifx#2\@clsextension
+ \InputIfFileExists{#1.\@pkgextension}{%
+ \wlog{Compatibility mode: loading #1.\@pkgextension
+ \space rather than #1.#2.}%
+ }{%
+ \saved@missingfileerror{#1}{#2}%
+ }%
+ \else
+ \saved@missingfileerror{#1}{#2}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@obsoletefile}
+% For compatibility with the document styles which |\input| the
+% standard \LaTeX~2.09 document styles, we distribute
+% files called |article.sty|, |book.sty|, |report.sty|,
+% |slides.sty| and |letter.sty|. These use the command
+% |\@obsoletefile|, which the \LaTeXe{} kernel defines to produce a
+% warning message. We redefine it to just produce a message in the
+% log file, and to pass any options from the old filename to the
+% new filename.
+% \changes{v0.08}{1993/12/19}{Added this command.}
+% \changes{v0.10}{1994/01/14}{Added the option-passing.}
+% \begin{macrocode}
+\def\@obsoletefile#1#2{%
+ \expandafter\let\csname opt@#1\expandafter\endcsname
+ \csname opt@\@currname.\@currext\endcsname
+ \wlog{Compatibility mode: inputting `#1'
+ instead of obsolete `#2'.}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footheight}
+% \begin{macro}{\@maxsep}
+% \begin{macro}{\@dblmaxsep}
+% \LaTeX~2.09 supported these parameters, so for compatibility with
+% old document styles we allocate them.
+% \changes{v0.16}{1994/02/11}{Replaced the allocation of temporary
+% dimens for \cs{footheight}, \cs{@maxsep} and \cs{@dblmaxsep} by
+% real dimen variables.}
+% \begin{macrocode}
+\newdimen\footheight
+\newdimen\@maxsep
+\newdimen\@dblmaxsep
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v0.36}{1994/10/17}{Added an empty \cs{mark}.}
+% \changes{v0.37}
+% {1994/10/20}{Corrected a type with the empty \cs{mark}.}
+%
+% \begin{macro}{\mark}
+% \LaTeX~2.09 initialized an empty mark. Who knows, someone may have
+% relied on it:
+% \begin{macrocode}
+\mark{{}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Layout}
+%
+% \begin{macro}{\sloppy}
+% \changes{v0.06}{1993/12/18}{Added \cs{sloppy}}
+% There is a new version of |\sloppy| in \LaTeXe, so we restore the
+% old one.
+% \begin{macrocode}
+\def\sloppy{\tolerance \@M \hfuzz .5\p@ \vfuzz .5\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@finalstrut}
+% \changes{v0.30}{1994/05/18}{Added \cs{@finalstrut}.}
+% \changes{v0.31}{1994/05/20}{New definition of \cs{@finalstrut}.}
+% The strut which is used in a footnote has changed. This restores
+% the old definition.
+% \begin{macrocode}
+\def\@finalstrut#1{\unskip\strut}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@marginparreset}
+% \begin{macro}{\@floatboxreset}
+% \changes{v0.39}{1994/11/28}{Added old behaviour of floats and space.}
+% \changes{v0.45}{1995/05/25}{(CAR) Changed method of restoring
+% old behaviour of floats and space.}
+% Restore the old spacing around floats.
+% \begin{macrocode}
+\let \@marginparreset \@empty
+\let \@floatboxreset \@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\proclaim}
+% \changes{v0.41}{1995/04/24}
+% {Move here from ltplain.dtx}
+% From plain \TeX.
+% \begin{macrocode}
+\outer\def\proclaim #1. #2\par{%
+ \medbreak
+ \noindent{\bfseries#1.\enspace}{\slshape#2\par}%
+ \ifdim\lastskip<\medskipamount
+ \removelastskip\penalty55\medskip
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hang}
+% \begin{macro}{\textindent}
+% \changes{v0.42}{1995/04/27}
+% {Move here from ltplain.dtx}
+% From plain \TeX.
+% \begin{macrocode}
+\def\hang{\hangindent\parindent}
+\def\textindent#1{\indent\llap{#1\enspace}\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ttraggedright}
+% \changes{v0.41}{1995/04/24}
+% {Move here from ltplain.dtx}
+% \begin{macrocode}
+\def\ttraggedright{\reset@font\ttfamily\rightskip\z@ plus2em\relax}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@footnotemark}
+% \changes{v0.43}{1995/05/12}
+% {macro added}
+% \LaTeXe\ version has |\nobreak| to allow hyphenation.
+% \begin{macrocode}
+\def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\fi
+ \@makefnmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@textsuperscript}
+% \changes{v0.48}{1995/07/07}
+% {macro added for latex/1722}
+% Fudge this command to remove the text font command which
+% is always the first thing in the argument. This is needed
+% as in compatibility mode footnotes are processed in math mode,
+% but the standard classes call |\@textsuperscript| in the definition
+% of |\thanks|.
+% \begin{macrocode}
+\def\@textsuperscript#1{$\m@th^{\@gobble#1}$}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@makefnmark}
+% \changes{v0.44}{1995/05/20}{macro added}
+% \LaTeXe\ version uses |\textsuperscript| rather than
+% math mode.
+% \begin{macrocode}
+\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thempfootnote}
+% \changes{v0.44}{1995/05/20}{macro added}
+% \LaTeXe\ version has an additional |\itshape| which would not
+% work (and would not make sense) in math mode.
+% \begin{macrocode}
+\def\thempfootnote{\@alph\c@mpfootnote}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fnsymbol}
+% \changes{v0.46}{1995/06/30}{macro added}
+% \LaTeX\ version uses |\ensuremath| which does not work in
+% compatibility mode.
+% \begin{macrocode}
+\def\@fnsymbol#1{\ifcase#1\or *\or \dagger\or \ddagger\or
+ \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger
+ \or \ddagger\ddagger \else\@ctrerr\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@inmathwarn}
+% \changes{v0.50}{1995/12/08}{Switched off \cs{@inmathwarn}}
+% \LaTeX\ (1995/12/01) checks for text commands being used in math
+% mode. We switch this off in compatibility mode.
+% \begin{macrocode}
+\let\@inmathwarn\@gobble
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Verbatim}
+%
+% \changes{v0.18}{1994/03/11}{Added the changes to \cs{verb}}
+% \changes{v0.40}{1995/05/05}{Make \cs{verb} use \cs{tt} font in
+% math mode.}
+% \begin{macro}{\verb}
+% \begin{macro}{\@sverb}
+% We restore the old definition of |\verb|, but using
+% |\verbatim@font| rather than |\tt|. The use of |\bgroup| and
+% |\egroup| allows us to prefix it with |\hbox| in math mode.
+% \begin{macrocode}
+\def\verb{%
+ \relax\ifmmode\hbox\fi\bgroup
+ \@noligs
+ \verbatim@font
+ \let\do\@makeother \dospecials
+ \@ifstar{\@sverb}{\@verb}%
+}
+\def\@sverb#1{%
+ \def\@tempa ##1#1{\leavevmode\null##1\egroup}%
+ \@tempa
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\verbatim@nolig@list}
+% \changes{v0.20}{1994/04/20}{Added the redefinition of
+% \cs{verbatim@nolig@list}.}
+% The only ligatures which should be switched off in 2.09 mode are
+% the Spanish punctuation.
+% \begin{macrocode}
+\def\verbatim@nolig@list{\do\`}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@lquote}
+% \changes{v0.21}{1994/04/24}{Added the definition of \cs{@lquote}.}
+% We restore the old definition of |\@lquote| in case any packages
+% use it.
+% \begin{macrocode}
+\def\@lquote{\leavevmode{\kern\z@}`}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Character codes}
+%
+% \changes{v0.18}{1994/03/11}{Added the catcode changes}
+%
+% By default, \LaTeXe{} makes the input charactes 0--8, 11, 14--31 and
+% 128--255 illegal. In compatibility mode, we restore their old
+% meanings.
+% \begin{macrocode}
+\catcode0=9
+\@tempcnta=1
+\loop\ifnum\@tempcnta<32
+ \catcode\@tempcnta=12
+ \advance\@tempcnta by 1
+\repeat%
+\catcode`\^^I=10\relax%
+\catcode`\^^L=13\relax%
+\catcode`\^^M=5\relax%
+\catcode127=15
+\@tempcnta=128
+\loop\ifnum\@tempcnta<256
+ \catcode\@tempcnta=12
+ \advance\@tempcnta by 1
+\repeat
+% \end{macrocode}
+%
+% \subsection{Miscellaneous commands}
+%
+% \begin{macro}{\SLiTeX}
+% The \textsc{Sli\TeX} logo.
+% \begin{macrocode}
+\DeclareRobustCommand{\SLiTeX}{{%
+ \normalfont S\kern -.06em
+ {\scshape l\kern -.035emi}\kern -.06em
+ \TeX}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\+}
+% The |\+| command should be defined, so that it can be used in
+% |\renewcommand|.
+% \begin{macrocode}
+\let\+\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@cla}
+% \begin{macro}{\@clb}
+% \changes{v0.47}{1995/09/25}
+% {(DPC) Declare old \cs{cline} registers}
+% \begin{macro}{\mscount}
+% \LaTeX2.09 (and early versions of \LaTeXe) used these count registers
+% in the definition of |\cline| and |\multispan|.
+% Declare them here in case they were used for any other purposes.
+% \begin{macrocode}
+\newcount\@cla
+\newcount\@clb
+\newcount\mscount
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@imakepicbox}
+% \changes{v0.48}{1995/10/16}
+% {(DPC) emulate old behaviour of picture mode makebox}
+% picture mode version
+% \begin{macrocode}
+\long\def\@imakepicbox(#1,#2)[#3]#4{%
+ \vbox to#2\unitlength
+ {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
+ \let\mb@t\vss
+ \@tfor\reserved@a :=#3\do{%
+ \if s\reserved@a
+ \let\mb@l\relax\let\mb@r\relax
+ \else
+ \expandafter\let\csname mb@\reserved@a\endcsname\relax
+ \fi}%
+ \mb@t
+ \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
+ \mb@b
+% \end{macrocode}
+% This kern ensures that a |b| option aligns on the bottom of the
+% text rather than the baseline. this is the documented behaviour in
+% the \LaTeX Book. The kern is removed in compatibility mode.
+%
+% Remove kern for bug compatibility with 2.09.
+% \begin{macrocode}
+% \kern\z@
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\supereject}
+% \begin{macrocode}
+\def\supereject{\par\penalty-\@MM}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nofiles}
+% \changes{v0.51}{1996/05/24}{(DPC) Old definition, without \cs{write}
+% added to \cs{protected@write}, for latex/2146}
+% This old version might change the vertical spacing when it is used.
+% Some old document might depend on that changed spacing so\ldots
+% \begin{macrocode}
+\def\nofiles{%
+ \@fileswfalse
+ \typeout{No auxiliary output files.^^J}%
+ \long\def\protected@write##1##2##3{}%
+ \let\makeindex\relax
+ \let\makeglossary\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Packages and classes}
+%
+% \begin{macro}{\ProvidesPackage}
+% \begin{macro}{\ProvidesClass}
+% We redefine |\ProvidesPackage| and |\ProvidesClass| to produce a
+% log message rather than a warning if they find an unexpected
+% file.
+% \begin{macrocode}
+\def\ProvidesPackage#1{%
+ \xdef\@gtempa{#1}%
+ \ifx\@gtempa\@currname\else
+ \wlog{Compatibility mode: \@cls@pkg\space`\@currname' requested,
+ but `#1' provided.}%
+ \fi
+ \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%]
+\let\ProvidesClass=\ProvidesPackage
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% That ends the head of |latex209.def|.
+% \begin{macrocode}
+%</head>
+% \end{macrocode}
+%
+% \section{Middle of latex209.def}
+%
+% At this point, the code for |oldlfont.sty| is read in by the
+% installation script.
+%
+% \section{End of latex209.def}
+%
+% This section describes the end of |latex209.def|.
+% \begin{macrocode}
+%<*tail>
+% \end{macrocode}
+%
+% \subsection{Font commands}
+%
+% \changes{v0.12}{1994/01/24}{Added the oldlfont option.}
+% \changes{v0.25}{1994/05/14}{Added the newlfont option, rewrote the
+% oldlfont option to change math grouping.}
+% \changes{v0.26}{1994/05/15}{Added the margid and nomargid options.}
+% \changes{v0.27}{1994/05/16}{Replaced \# by \#\# in margid.}
+% \changes{v0.28}{1994/05/17}{Replaced \cs{input} newlfont.sty by
+% \cs{OptionNotUsed} in \cs{ds@newlfont}.}
+%
+% \begin{macro}{\ds@oldlfont}
+% \begin{macro}{\ds@newlfont}
+% \begin{macro}{\ds@margid}
+% \begin{macro}{\ds@nomargid}
+% We declare |oldlfont|, |newlfont|, |margid| and |nomargid|
+% options to mimic the \LaTeX~2.09 NFSS1 options.
+% \begin{macrocode}
+\def\ds@oldlfont{%
+%FM \@no@font@optfalse
+ \let\math@bgroup\@empty
+ \let\math@egroup\@empty
+ \let\@@math@bgroup\math@bgroup
+ \let\@@math@egroup\math@egroup
+}
+\def\ds@newlfont{%
+%FM \@no@font@optfalse
+ \OptionNotUsed
+}
+\def\ds@margid{%
+%FM \@no@font@optfalse
+ \let\math@bgroup\bgroup
+ \def\math@egroup##1{##1\egroup}%
+ \let \@@math@bgroup \math@bgroup
+ \let \@@math@egroup \math@egroup
+}
+\let\ds@nomargid\ds@oldlfont
+\@onlypreamble\ds@oldfont
+\@onlypreamble\ds@newfont
+\@onlypreamble\ds@margid
+\@onlypreamble\ds@nomargid
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\encodingdefault}
+% The default encoding for old documents is OT1 rather than T1.
+% \begin{macrocode}
+\renewcommand{\encodingdefault}{OT1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cmex/m/n/10}
+% Just in case a document style relies on |\cmex/m/n/10| to exist
+% (which may have been hard-wired to |\fam3|) we load the font.
+% \begin{macrocode}
+\expandafter\font\csname cmex/m/n/10\endcsname=cmex10
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{v0.12}{1994/01/24}
+% {Added \cs{normalshape} and \cs{mediumseries}.}
+% \changes{v0.28}{1994/05/16}{\cs{mediumseries} was using
+% \cs{fontshape} rather than \cs{fontseries}.}
+%
+% \begin{macro}{\normalshape}
+% \begin{macro}{\mediumseries}
+% These commands were used in older versions of NFSS.
+% \begin{macrocode}
+\def\normalshape{\fontshape\shapedefault\selectfont}
+\def\mediumseries{\fontseries\seriesdefault\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\DeclareOldFontCommand}
+% We redefine |\DeclareOldFontCommand| to do nothing. This means
+% that any new document classes will have their redefinitions of
+% |\rm|, |\bf| etc.~ignored.
+% \changes{v0.06}{1993/12/18}{Replaced \cs{@newfontswitch} by
+% \cs{@renewfontswitch}.}
+% \changes{v0.11}{1994/01/21}{Removed \cs{RequirePackage}{oldlfont}.}
+% \changes{v0.19}{1994/04/05}{Replaced \cs{@renewfontswitch} by
+% \cs{DeclareOldFontCommand}.}
+% \begin{macrocode}
+\def \DeclareOldFontCommand #1#2#3{%
+ \wlog{Compatibility mode: definition
+ of \string#1\space ignored.}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.17}
+% {1994/03/02}{Added \cs{@halfmag}, \cs{@magscale} and \cs{@ptscale}}
+% \changes{v0.35}
+% {1994/09/23}{Added spaces to the old font scale commands.}
+%
+% \begin{macro}{\@halfmag}
+% \begin{macro}{\@magscale}
+% \begin{macro}{\@ptscale}
+% Some font-specifying commands from \LaTeX~2.09.
+% \begin{macrocode}
+\def\@halfmag{ scaled \magstephalf}
+\def\@magscale#1{ scaled \magstep#1 }
+\def\@ptscale#1{ scaled #100 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\font}
+% The current font is set to be CMR 10pt, to match \LaTeX~2.09.
+% \begin{macrocode}
+\fontencoding{OT1} \fontfamily{cmr}
+\fontsize{10}{12} \fontseries{m} \fontshape{n}
+\selectfont
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.11}{1994/01/21}{Added the rest of this subsection, which
+% used to be in oldlfont.dtx.}
+%
+% \begin{macro}{\load}
+% The |\load| command is no longer needed, it is therefore
+% defined to do nothing.
+% \begin{macrocode}
+\let\load\@gobbletwo
+% \end{macrocode}
+% \end{macro}
+%
+% Here are three delimiters which have be partly disabled by
+% NFSS2 (the small variants) since the corresponding fonts are
+% normally not preloaded as math symbol fonts.
+% \begin{macrocode}
+\DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips
+ {\mathopen}{bold}{"28}{largesymbols}{"3A}
+\DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips
+ {\mathclose}{bold}{"29}{largesymbols}{"3B}
+\DeclareMathDelimiter{\bracevert} % the vertical bar that extends braces
+ {\mathord}{typewriter}{"7C}{largesymbols}{"3E}
+% \end{macrocode}
+%
+% In old documents we might find some usages of |\bffam| etc. Thus
+% we add the following code:
+% \begin{macrocode}
+\let\bffam\symbold
+\let\sffam\symsans
+\let\itfam\symitalic
+\let\ttfam\symtypewriter
+\let\scfam\symsmallcaps
+\let\slfam\symslanted
+\let\rmfam\symoperators
+% \end{macrocode}
+%
+% Below are the |\..pt| commands with hopefully the same
+% functionality as in the old \texttt{lfonts.tex}. Notice that the
+% |\baselineskip| parameter wasn't set by these commands so that
+% using them now shouldn't set this either. Thus we go low-level.
+% This means that the commands are now fragile but I think they
+% have been fragile before.
+% \begin{macrocode}
+\newcommand\vpt {\edef\f@size{\@vpt}\rm}
+\newcommand\vipt {\edef\f@size{\@vipt}\rm}
+\newcommand\viipt {\edef\f@size{\@viipt}\rm}
+\newcommand\viiipt{\edef\f@size{\@viiipt}\rm}
+\newcommand\ixpt {\edef\f@size{\@ixpt}\rm}
+\newcommand\xpt {\edef\f@size{\@xpt}\rm}
+\newcommand\xipt {\edef\f@size{\@xipt}\rm}
+\newcommand\xiipt {\edef\f@size{\@xiipt}\rm}
+\newcommand\xivpt {\edef\f@size{\@xivpt}\rm}
+\newcommand\xviipt{\edef\f@size{\@xviipt}\rm}
+\newcommand\xxpt {\edef\f@size{\@xxpt}\rm}
+\newcommand\xxvpt {\edef\f@size{\@xxvpt}\rm}
+% \end{macrocode}
+%
+% \subsection{User customization}
+%
+% For sites which customized their version of \LaTeX~2.09, we provide
+% a file |latex209.cfg|, which is loaded every time we enter
+% compatibility mode. If the file doesn't exist, we don't do
+% anything.
+% \begin{macrocode}
+\InputIfFileExists{latex209.cfg}{}{}
+% \end{macrocode}
+% That ends the file |latex209.def|.
+% \begin{macrocode}
+%</tail>
+% \end{macrocode}
+%
+% \section{Obsolete style files}
+%
+% \changes{v0.08}{1993/12/19}{Added this section.}
+% \changes{v0.09}{1993/12/20}{Removed artN.sty, bkN.sty and repN.sty.}
+% \changes{v0.23}{1994/05/11}{Added bezier.sty.}
+% \changes{v0.31}{1994/05/20}{Added t1enc.sty.}
+%
+% For each of the standard \LaTeX~2.09 document styles, we produce a
+% file which points to the appropriate \LaTeXe{} document class file.
+% This means that any styles which say |\input article.sty| should
+% still work.
+%
+% \begin{macrocode}
+%<*article|book|report|letter|slides>
+\NeedsTeXFormat{LaTeX2e}
+%</article|book|report|letter|slides>
+%<*article>
+\@obsoletefile{article.cls}{article.sty}
+\LoadClass{article}
+%</article>
+%<*book>
+\@obsoletefile{book.cls}{book.sty}
+\LoadClass{book}
+%</book>
+%<*report>
+\@obsoletefile{report.cls}{report.sty}
+\LoadClass{report}
+%</report>
+%<*letter>
+\@obsoletefile{letter.cls}{letter.sty}
+\LoadClass{letter}
+%</letter>
+%<*slides>
+\@obsoletefile{slides.cls}{slides.sty}
+\LoadClass{slides}
+%</slides>
+% \end{macrocode}
+% We also produce empty |fleqn.sty| and |leqno.sty| files in case
+% anyone has |\input| one of them.
+% \begin{macrocode}
+%<*fleqn>
+\@obsoletefile{fleqn.clo}{fleqn.sty}
+\input{fleqn.clo}
+%</fleqn>
+%<*leqno>
+\@obsoletefile{leqno.clo}{leqno.sty}
+\input{leqno.clo}
+%</leqno>
+% \end{macrocode}
+% We also produce an empty |openbib.sty| in case anyone has |\input|
+% |openbib.sty|. The |openbib| class option is now part of the kernel.
+% \begin{macrocode}
+%<*openbib>
+\iffalse
+
+The openbib option is now part of LaTeX thus this package is no
+longer necessary. It is only retained for upward compatibility.
+See the 2nd edition of the LaTeX book, or the file usrguide.tex
+which comes with the LaTeX distribution, for more details.
+
+\fi
+%</openbib>
+% \end{macrocode}
+% We also produce an empty |bezier.sty| in case anyone has |\input|
+% |bezier.sty|. The |\bezier| command is now part of the kernel.
+% \begin{macrocode}
+%<*bezier>
+\iffalse
+
+The \bezier command is now part of LaTeX thus this package is no
+longer necessary. It is only retained for upward compatibility.
+Also, please note that LaTeX now offers an extended bezier command
+which automatically calculates the number of points needed for the
+plot. See the 2nd edition of the LaTeX book, or the file
+usrguide.tex which comes with the LaTeX distribution, for more
+details.
+
+\fi
+%</bezier>
+% \end{macrocode}
+% We also produce a |t1enc| package, for compatibility with the
+% Companion. This has been replaced by the |fontenc| package.
+% \begin{macrocode}
+%<*t1enc>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{t1enc}[1994/06/01 Standard LaTeX package]
+\renewcommand{\encodingdefault}{T1}
+\fontencoding{T1}\selectfont
+%</t1enc>
+% \end{macrocode}
+% \DeleteShortVerb{\|}
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/latex209.ins b/macros/latex-dev/base/latex209.ins
new file mode 100644
index 0000000000..f0834e83df
--- /dev/null
+++ b/macros/latex-dev/base/latex209.ins
@@ -0,0 +1,129 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\Msg{*** Generating compatibility mode files ***}
+
+\generate{
+ \usedir{tex/latex/base}
+ \file{latex209.def}{
+ \from{latex209.dtx}{head}
+ \from{oldlfont.dtx}{latex209}
+ \from{latex209.dtx}{tail}}
+ \file{article.sty}{
+ \from{latex209.dtx}{article}}
+ \file{book.sty}{
+ \from{latex209.dtx}{book}}
+ \file{report.sty}{
+ \from{latex209.dtx}{report}}
+ \file{letter.sty}{
+ \from{latex209.dtx}{letter}}
+ \file{slides.sty}{
+ \from{latex209.dtx}{slides}}
+ \file{fleqn.sty}{
+ \from{latex209.dtx}{fleqn}}
+ \file{leqno.sty}{
+ \from{latex209.dtx}{leqno}}
+ \file{openbib.sty}{
+ \from{latex209.dtx}{openbib}}
+ \file{bezier.sty}{
+ \from{latex209.dtx}{bezier}}
+ \file{t1enc.sty}{
+ \from{latex209.dtx}{t1enc}}
+ }
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space latex209.def *.sty }
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.drv' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/latexrelease.dtx b/macros/latex-dev/base/latexrelease.dtx
new file mode 100644
index 0000000000..02194cee11
--- /dev/null
+++ b/macros/latex-dev/base/latexrelease.dtx
@@ -0,0 +1,1011 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%
+%<*dtx>
+ \def\latexreleaseversion{<date only known in .sty file>}
+ \ProvidesFile{latexrelease.dtx}
+%</dtx>
+%<driver>\ProvidesFile{latexrelease.drv}
+%<fixltx2e>\ProvidesPackage{fixltx2e}
+%<fixltx2e> [2016/12/29 v2.1a fixes to LaTeX (obsolete)]
+%<latexrelease>\ProvidesPackage{latexrelease}
+%<*!fixltx2e>
+% \fi
+% \ProvidesFile{latexrelease.dtx}
+ [2018/05/08 v1.0k LaTeX release emulation and tests
+ (including releases up to \latexreleaseversion)]
+% \iffalse
+%</!fixltx2e>
+%<*driver>
+ \documentclass{ltxdoc}
+ \newcommand\Lopt[1]{\textsf{#1}}
+ \let\Lpack\Lopt
+ \providecommand{\file}[1]{\texttt{#1}}
+ \providecommand{\MF}{\textsf{Metafont}}
+ \providecommand{\danger}{\marginpar[\hfill\protect\Huge!!]{\protect\Huge!!\hfill}}
+ \begin{document}
+ \DocInput{latexrelease.dtx}
+ \end{document}
+%</driver>
+% \fi
+%
+% \changes{v1.0i}{2017/12/17}{Add \cs{latexreleaseversion} info
+% to \cs{ProvidesPackage} output}
+%
+%
+% \let\package\textsf
+%
+%
+% \GetFileInfo{latexrelease.dtx}
+%
+% \title{The \Lpack{latexrelease} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{The \LaTeX3 Project}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+% Prior to the 2015 release of \LaTeX{}, essentially no changes had been
+% made to the \LaTeX\ format code for some years, with all
+% improvements being instead added to the package \Lpack{fixltx2e}.
+%
+% While this worked at a technical level it meant that you had to
+% explicitly opt-in to bug fixes and improvements, and the vast
+% majority of documents did not benefit.
+%
+% As described in \LaTeX\ News 22, a new policy is being implemented
+% in which improvements will now be added to the format by default,
+% and this \Lpack{latexrelease} package may be used to ensure
+% stability where needed, either by making a new format use an older
+% definition of some commands, or conversely may be used to supply the
+% new definitions for use with an old format.
+%
+% The basic use is:
+%\begin{verbatim}
+% \RequirePackage[2015/01/01]{latexrelease}
+% \documentclass{article}
+% ....
+%\end{verbatim}
+%
+% After such a declaration the document will use definitions current
+% in the January 2015 \LaTeX{}, whether the actual format being used is
+% older, or newer than that date. In the former case a copy of
+% |latexrelease.sty| would need to be made available for use with the
+% older format. This may be used, for example, to share a document
+% between co-workers using different \LaTeX\ releases, or to protect a
+% document from being affected by system updates. As well as the
+% definitions within the format itself, individual packages may use
+% the commands defined here to adjust their definitions to the
+% specified date as described below.
+%
+% Note that the \Lpack{latexrelease} package is intended for use
+% at the start of a \emph{document}. Package and class code should not
+% include this package as loading a package should not normally globally
+% reset the effective version of \LaTeX\ that is in force, so affecting all
+% other packages used in the document.
+%
+%
+% The bulk of this package, after some initial setup and option
+% handling consists of a series of |\IncludeInRelease| commands
+% which have been extracted from the main source files of the \LaTeX\
+% format. These contain the old and new versions of any commands with
+% modified definitions.
+%
+% \section{Package Options}
+% \begin{itemize}
+% \item \emph{yyyy/mm/dd} or \emph{yyyy-nn-dd}
+% The package accepts any possible \LaTeX\ format date as argument,
+% although dates in the future for which the current release of this
+% package has no information will generate a warning. Dates
+% earlier than 2015 will work but will roll back to some point in 2015
+% when the method was introduced.
+% |\IncludeInRelease| command is defined.
+% The |\requestedLaTeXdate| is set to the normalized date argument
+% so that package rollback defaults to the specified date.
+%
+% \item%
+% |current| This is the default behaviour, it does not change the
+% effective date of the format but does ensure that the
+% |\IncludeInRelease| command is defined.
+% the |\requestedLaTeXdate| is reset to 0 so that package rollback
+% does not use the implicit date.
+% |\IncludeInRelease| command is defined.
+% The |\requestedLaTeXdate| macro is reset to 0 so that package rollback
+% does not use the implicit date.
+%
+% \item
+% |latest| sets the effective date of the format to the release date
+% of this file, so in an older format applies all patches currently
+% available.
+% |\IncludeInRelease| command is defined.
+% The |\requestedLaTeXdate| macro is reset to 0 so that package rollback
+% does not use the implicit date.
+% \end{itemize}
+%
+%
+% \section{Release Specific Code}
+%
+% The |\IncludeInRelease| mechanism allows the kernel developer to
+% associate code with a specific date to choose different versions of
+% definitions depending on the date specified as an option to the
+% \Lpack{latexrelease} package. Is also available for use by package
+% authors (or even in a document if necessary).
+%
+% \medskip
+%
+% \noindent\DescribeMacro{\IncludeInRelease}
+% \marg{code-date}^^A
+% \oarg{format-date}%^^A
+% \marg{label}^^A
+% \marg{message}^^A
+% \meta{code}^^A
+% |\EndIncludeInRelease|
+%
+% \begin{description}
+%
+% \item[\marg{code-date}] This date is associated with the \marg{code}
+% argument and will be compared to the requested date in the option to
+% the \Lpack{latexrelease}.
+%
+% \item[\oarg{format-date}] This optional argument can be used to
+% specify a format date with the code in addition to the mandatory
+% \marg{code-date} argument. This can be useful for package developers
+% as described below.
+%
+% \item[\marg{label}] The \marg{label} argument is an identifier
+% (string) that within a given package must be a unique label for each
+% related set of optional definitions. Per package at most one code
+% block from all the |\IncludeInRelease| declarations with the same
+% label will be executed.
+%
+% \item[\marg{message}]
+% The \marg{message} is an informative string that is used in
+% messages. It has no other function.
+%
+% \item[\meta{code}]
+% Any \TeX\ code after the |\IncludeInRelease| arguments
+% up until the and the following |\EndIncludeInRelease|
+% is to be
+% conditionally included depending on the date of the format as
+% described below.
+%
+% \end{description}
+%
+% The |\IncludeInRelease| declarations with a given label should be in
+% reverse chronological order in the file. The one chosen will depend
+% on this order, the effective format version and the date options, as
+% described below.
+%
+% If your package \Lpack{mypackage} defines a |\widget| command but
+% has one definition using the features available in the 2015 \LaTeX\
+% release, and a different definition is required for older formats
+% then you can use:
+%\begin{verbatim}
+% \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
+% \def\widget{new version}%
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
+% \def\widget{old version}%
+% \EndIncludeInRelease
+%\end{verbatim}
+%
+% If a document using this package is used with a format with
+% effective release date of 2015/01/01 or later the new code will be
+% used, otherwise the old code will be used. Note the \emph{effective
+% release date} might be the original \LaTeX\ release date as shown at
+% the start of every \LaTeX\ job, or it may be set by the
+% \Lpack{latexrelease} package, so for example a document author who
+% wants to ensure the new version is used could use
+%\begin{verbatim}
+% \RequirePackage[2015/01/01]{latexrelease}
+% \documentclass{article}
+% \usepackage{mypackage}
+%\end{verbatim}
+%
+% If the document is used with a \LaTeX\ format from 2014 or before,
+% then \Lpack{latexrelease} will not have been part of the original
+% distribution, but it may be obtained from a later \LaTeX\ release or
+% from CTAN and distributed with the document, it will make an older
+% \LaTeX\ release act essentially like the 2015 release.
+%
+% \subsection{Intermediate Package Releases}
+%
+% The above example works well for testing against the latex format
+% but is not always ideal for controlling code by the release date of
+% the \emph{package}. Suppose \LaTeX\ is not updated but in March you
+% update the \Lpack{mypackage} package and modify the definition of
+% |\widget|. You could code the package as:
+%\begin{verbatim}
+% \IncludeInRelease{2015/03/01}{\widget}{Widget Definition}
+% \def\widget{even newer improved March version}%
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
+% \def\widget{new version}%
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
+% \def\widget{old version}%
+% \EndIncludeInRelease
+%\end{verbatim}
+%
+% This would work and allow a document author to choose a date such as
+%\begin{verbatim}
+% \RequirePackage[2015/03/01]{latexrelease}
+% \documentclass{article}
+% \usepackage{mypackage}
+%\end{verbatim}
+%
+% To use the latest version, however it would have disadvantage that
+% until the next release of \LaTeX, by default, if the document does
+% not use \Lpack{latexrelease} to specify a date, the new improved
+% code will not be selected as the effective date will be 2015/01/01
+% and so the first code block will be skipped.
+%
+% For this reason |\IncludeInRelease| has an optional argument that
+% specifies an alternative date to use if a date option has not been
+% specified to \Lpack{latexrelease}.
+%\begin{verbatim}
+% \IncludeInRelease{2015/03/01}[2015/01/01]{\widget}{Widget Definition}
+% \def\widget{even newer improved March version}%
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
+% \def\widget{new version}%
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
+% \def\widget{old version}%
+% \EndIncludeInRelease
+%\end{verbatim}
+%
+% Now, by default on a 2015/01/01 \LaTeX\ format, the first code block
+% will compare the format date to the optional argument 2015/01/01
+% and so will execute the \emph{even newer improved} version. The
+% remaining blocks using the |\widget| label argument will all then be
+% skipped.
+%
+% If on the other hand the document requests an explicit release date
+% using \Lpack{latexrelease} then this date will be used to decide what
+% code block to include.
+%
+% \subsection{Using \cs{IncludeInRelease} in Packages}
+%
+% If |\IncludeInRelease| is used within a package then all such
+% conditional code needs to be within such declarations, e.g., it is
+% not possible in the above example to have the ``current'' definition
+% of |\widget| somewhere in the main code and only the two older
+% definitions inside |\IncludeInRelease| declarations. If you would do
+% this then one of those |\IncludeInRelease| declarations would be
+% included overwriting the even newer code in the main part of the
+% package. As a result your package may get fragmented over time with
+% various |\IncludeInRelease| declarations sprinkled throughout your
+% code or you have to interrupt the reading flow by putting those
+% declarations together but not necessarily in the place where they
+% belong.
+%
+% To avoid this issue you can use the following coding
+% strategy: place the current |\widget| definition in the main code
+% where it correctly belongs.
+% \begin{verbatim}
+% ...
+% \def\widget {even newer improved March version}
+% \def\@widget{newly added helper command no defined in older releases}
+% ...
+%\end{verbatim}
+% Then, near the end of your package place
+% the following:
+% \begin{verbatim}
+% \IncludeInRelease{2015/03/01}[2015/01/01]{\widget}{Widget Definition}
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
+% \def\widget{new version}%
+% \let\@widget\@undefined % this doesn't exist in earlier releases
+% \EndIncludeInRelease
+%
+% \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
+% \def\widget{old version}%
+% \EndIncludeInRelease
+%\end{verbatim}
+% This way the empty code block hides the other |\IncludeInRelease|
+% declarations unless there is an explicit request with a date
+% 2015/01/01 or earlier.
+%
+% Now if you make a further change to |\widget| in the future you
+% simply copy the current definition into the empty block and add a new
+% empty declaration with todays date and the current format date. This
+% way your main code stays readable and the old versions accumulate at
+% the end of the package.\footnote{Of course there may be some cases
+% in which the old code has to be in a specific place within the
+% package as other code depends on it (e.g., if you
+% \texttt{\string\let} something to it). In that case you have to
+% place the code variations in the right place in your package rather
+% than accumulating them at the very end.}
+%
+% The only other ``extra effort'' necessary when using this approach
+% is that it may be advisable to undo new definitions in the code
+% block for the previous release, e.g., in the above example we
+% undefined |\@widget| as that isn't available in the 2015/01/01
+% release but was defined in the main code. If all your conditional
+% code is within |\IncludeInRelease| declarations that wouldn't been
+% necessary as the new code only gets defined if that release is
+% chosen.
+%
+% \section{fixltx2e}
+%
+% As noted above, prior to the 2015 \LaTeX\ release updates to the
+% \LaTeX\ kernel were not made in the format source files but were
+% made available in the \Lpack{fixltx2e} package. That package is no
+% longer needed but we generate a small package from this source
+% that just makes a warning message but otherwise does nothing.
+%
+%
+%
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% We require at least a somewhat sane version of \LaTeXe{}. Earlier
+% ones where really quite different from one another.
+% \begin{macrocode}
+%<*latexrelease>
+\NeedsTeXFormat{LaTeX2e}[1996/06/01]
+% \end{macrocode}
+%
+% \section{Setup}
+%
+% \begin{macro}{\IncludeInRelease}
+% \begin{macro}{\EndIncludeInRelease}
+% \begin{macrocode}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.0c}{2015/02/19}{Swap argument order}
+% \changes{v1.0k}{2018/05/08}{reset \cs{\requestedLaTeXdate} for current and latest options, gitub issue 43}
+% \begin{macrocode}
+\DeclareOption*{%
+ \def\@IncludeInRelease#1[#2]{\@IncludeInRele@se{#1}}%
+ \let\requestedpatchdate\CurrentOption}
+\DeclareOption{latest}{%
+ \let\requestedpatchdate\latexreleaseversion
+ \AtEndOfPackage{\def\requestedLaTeXdate{0}}}
+\DeclareOption{current}{%
+ \let\requestedpatchdate\fmtversion
+ \AtEndOfPackage{\def\requestedLaTeXdate{0}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\requestedpatchdate\fmtversion
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% Sanity check options, it allows some non-legal dates but always
+% ensures |requestedLaTeXdate| gets set to a number. Generate an
+% error if there are any non digit tokens remaining after removing the
+% |//|.
+% \changes{v1.0j}{2018/01/30}{Explain both date formats in error message}
+% \begin{macrocode}
+\def\reserved@a{%
+\edef\requestedLaTeXdate{\the\count@}%
+\reserved@b}
+\def\reserved@b#1\\{%
+\def\reserved@b{#1}%
+\ifx\reserved@b\@empty\else
+\PackageError{latexrelease}%
+ {Unexpected option \requestedpatchdate}%
+ {The option must be of the form yyyy/mm/dd or yyyy-mm-dd}%
+\fi}
+\afterassignment\reserved@a
+\count@\expandafter
+ \@parse@version\expandafter0\requestedpatchdate//00\@nil\\
+% \end{macrocode}
+%
+% less precautions needed for |\fmtversion|
+% \begin{macrocode}
+\edef\currentLaTeXdate{%
+ \expandafter\@parse@version\fmtversion//00\@nil}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifnum\requestedLaTeXdate=\currentLaTeXdate
+\PackageWarningNoLine{latexrelease}{%
+ Current format date selected, no patches applied}
+\expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% A newer version of latexrelease should have been distributed with
+% the later format.
+% \begin{macrocode}
+\ifnum\currentLaTeXdate
+ >\expandafter\@parse@version\latexreleaseversion//00\@nil
+\PackageWarningNoLine{latexrelease}{%
+The current package is for an older LaTeX format:\MessageBreak
+LaTeX \latexreleaseversion\space\MessageBreak
+Obtain a newer version of this package!}
+\expandafter\endinput
+\fi
+% \end{macrocode}
+% can't patch into the future, could make this an error
+% but it has some uses to control package updates
+% so allow for now.
+% \begin{macrocode}
+\ifnum\requestedLaTeXdate
+ >\expandafter\@parse@version\latexreleaseversion//00\@nil
+\PackageWarningNoLine{latexrelease}{%
+The current package is for LaTeX \latexreleaseversion:\MessageBreak
+It has no patches beyond that date\MessageBreak
+There may be an updated version\MessageBreak
+of this package available from CTAN}
+\expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% Update the format version to the requested date.
+% \begin{macrocode}
+\let\fmtversion\requestedpatchdate
+\let\currentLaTeXdate\requestedLaTeXdate
+% \end{macrocode}
+%
+%
+% \section{Individual Changes}
+%
+% The code for each change will be inserted at this point, extracted
+% from the kernel source files.
+%
+% \begin{macrocode}
+%</latexrelease>
+% \end{macrocode}
+%
+% \section{fixltx2e}
+%
+% Generate a stub \Lpack{fixltx2e} package:
+% \begin{macrocode}
+%<*fixltx2e>
+\IncludeInRelease{2015/01/01}{\fixltxe}{Old fixltx2e package}
+\NeedsTeXFormat{LaTeX2e}
+\PackageWarningNoLine{fixltx2e}{%
+fixltx2e is not required with releases after 2015\MessageBreak
+All fixes are now in the LaTeX kernel.\MessageBreak
+See the latexrelease package for details}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{\fixltxe}{Old fixltx2e package}
+\def\@outputdblcol{%
+ \if@firstcolumn
+ \global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\copy\@outputbox
+ \splitmaxdepth\maxdimen
+ \vbadness\maxdimen
+ \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
+ \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+ \toks@\expandafter{\topmark}%
+ \xdef\@firstcoltopmark{\the\toks@}%
+ \toks@\expandafter{\splitfirstmark}%
+ \xdef\@firstcolfirstmark{\the\toks@}%
+ \ifx\@firstcolfirstmark\@empty
+ \global\let\@setmarks\relax
+ \else
+ \gdef\@setmarks{%
+ \let\firstmark\@firstcolfirstmark
+ \let\topmark\@firstcoltopmark}%
+ \fi
+ \else
+ \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{%
+ \hb@xt@\textwidth{%
+ \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hfil
+ {\normalcolor\vrule \@width\columnseprule}%
+ \hfil
+ \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
+ \@combinedblfloats
+ \@setmarks
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}%
+ \endgroup
+ \fi}
+\def\end@dblfloat{%
+ \if@twocolumn
+ \@endfloatbox
+ \ifnum\@floatpenalty <\z@
+ \@largefloatcheck
+ \global\dp\@currbox1sp %
+ \@cons\@currlist\@currbox
+ \ifnum\@floatpenalty <-\@Mii
+ \penalty -\@Miv
+ \@tempdima\prevdepth
+ \vbox{}%
+ \prevdepth\@tempdima
+ \penalty\@floatpenalty
+ \else
+ \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
+ \fi
+ \fi
+ \else
+ \end@float
+ \fi
+}
+\def\@testwrongwidth #1{%
+ \ifdim\dp#1=\f@depth
+ \else
+ \global\@testtrue
+ \fi}
+\let\f@depth\z@
+\def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber
+ \global\@dbltoproom \dbltopfraction\@colht
+ \@textmin \@colht
+ \advance \@textmin -\@dbltoproom
+ \@fpmin \dblfloatpagefraction\textheight
+ \@fptop \@dblfptop
+ \@fpsep \@dblfpsep
+ \@fpbot \@dblfpbot
+ \def\f@depth{1sp}}
+\def \@doclearpage {%
+ \ifvoid\footins
+ \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
+ \setbox\@tempboxa\box\@cclv
+ \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
+ \global \let \@toplist \@empty
+ \global \let \@botlist \@empty
+ \global \@colroom \@colht
+ \ifx \@currlist\@empty
+ \else
+ \@latexerr{Float(s) lost}\@ehb
+ \global \let \@currlist \@empty
+ \fi
+ \@makefcolumn\@deferlist
+ \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
+ \if@twocolumn
+ \if@firstcolumn
+ \xdef\@deferlist{\@dbltoplist\@deferlist}%
+ \global \let \@dbltoplist \@empty
+ \global \@colht \textheight
+ \begingroup
+ \@dblfloatplacement
+ \@makefcolumn\@deferlist
+ \@whilesw\if@fcolmade \fi{\@outputpage
+ \@makefcolumn\@deferlist}%
+ \endgroup
+ \else
+ \vbox{}\clearpage
+ \fi
+ \fi
+ \ifx\@deferlist\@empty \else\clearpage \fi
+ \else
+ \setbox\@cclv\vbox{\box\@cclv\vfil}%
+ \@makecol\@opcol
+ \clearpage
+ \fi
+}
+\def \@startdblcolumn {%
+ \@tryfcolumn \@deferlist
+ \if@fcolmade
+ \else
+ \begingroup
+ \let \reserved@b \@deferlist
+ \global \let \@deferlist \@empty
+ \let \@elt \@sdblcolelt
+ \reserved@b
+ \endgroup
+ \fi
+}
+\def\@addtonextcol{%
+ \begingroup
+ \@insertfalse
+ \@setfloattypecounts
+ \ifnum \@fpstype=8
+ \else
+ \ifnum \@fpstype=24
+ \else
+ \@flsettextmin
+ \@reqcolroom \ht\@currbox
+ \advance \@reqcolroom \@textmin
+ \ifdim \@colroom>\@reqcolroom
+ \@flsetnum \@colnum
+ \ifnum\@colnum>\z@
+ \@bitor\@currtype\@deferlist
+ \@testwrongwidth\@currbox
+ \if@test
+ \else
+ \@addtotoporbot
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@cons\@deferlist\@currbox
+ \fi
+ \endgroup
+}
+\def\@addtodblcol{%
+ \begingroup
+ \@insertfalse
+ \@setfloattypecounts
+ \@getfpsbit \tw@
+ \ifodd\@tempcnta
+ \@flsetnum \@dbltopnum
+ \ifnum \@dbltopnum>\z@
+ \@tempswafalse
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+ \else
+ \ifnum \@fpstype<\sixt@@n
+ \advance \@dbltoproom \@textmin
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+ \fi
+ \advance \@dbltoproom -\@textmin
+ \fi
+ \fi
+ \if@tempswa
+ \@bitor \@currtype \@deferlist
+ \@testwrongwidth\@currbox
+ \if@test
+ \else
+ \@tempdima -\ht\@currbox
+ \advance\@tempdima
+ -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
+ \dblfloatsep \fi
+ \global \advance \@dbltoproom \@tempdima
+ \global \advance \@colht \@tempdima
+ \global \advance \@dbltopnum \m@ne
+ \@cons \@dbltoplist \@currbox
+ \@inserttrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@cons\@deferlist\@currbox
+ \fi
+ \endgroup
+}
+\def \@addtocurcol {%
+ \@insertfalse
+ \@setfloattypecounts
+ \ifnum \@fpstype=8
+ \else
+ \ifnum \@fpstype=24
+ \else
+ \@flsettextmin
+ \advance \@textmin \@textfloatsheight
+ \@reqcolroom \@pageht
+ \ifdim \@textmin>\@reqcolroom
+ \@reqcolroom \@textmin
+ \fi
+ \advance \@reqcolroom \ht\@currbox
+ \ifdim \@colroom>\@reqcolroom
+ \@flsetnum \@colnum
+ \ifnum \@colnum>\z@
+ \@bitor\@currtype\@deferlist
+ \@testwrongwidth\@currbox
+ \if@test
+ \else
+ \@bitor\@currtype\@botlist
+ \if@test
+ \@addtobot
+ \else
+ \ifodd \count\@currbox
+ \advance \@reqcolroom \intextsep
+ \ifdim \@colroom>\@reqcolroom
+ \global \advance \@colnum \m@ne
+ \global \advance \@textfloatsheight \ht\@currbox
+ \global \advance \@textfloatsheight 2\intextsep
+ \@cons \@midlist \@currbox
+ \if@nobreak
+ \nobreak
+ \@nobreakfalse
+ \everypar{}%
+ \else
+ \addpenalty \interlinepenalty
+ \fi
+ \vskip \intextsep
+ \box\@currbox
+ \penalty\interlinepenalty
+ \vskip\intextsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ \@inserttrue
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@addtotoporbot
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@resethfps
+ \@cons\@deferlist\@currbox
+ \fi
+}
+\def\@xtryfc #1{%
+ \@next\reserved@a\@trylist{}{}%
+ \@currtype \count #1%
+ \divide\@currtype\@xxxii
+ \multiply\@currtype\@xxxii
+ \@bitor \@currtype \@failedlist
+ \@testfp #1%
+ \@testwrongwidth #1%
+ \ifdim \ht #1>\@colht
+ \@testtrue
+ \fi
+ \if@test
+ \@cons\@failedlist #1%
+ \else
+ \@ytryfc #1%
+ \fi}
+\def\@ztryfc #1{%
+ \@tempcnta\count #1%
+ \divide\@tempcnta\@xxxii
+ \multiply\@tempcnta\@xxxii
+ \@bitor \@tempcnta {\@failedlist \@flfail}%
+ \@testfp #1%
+ \@testwrongwidth #1%
+ \@tempdimb\@tempdima
+ \advance\@tempdimb\ht #1%
+ \advance\@tempdimb\@fpsep
+ \ifdim \@tempdimb >\@colht
+ \@testtrue
+ \fi
+ \if@test
+ \@cons\@flfail #1%
+ \else
+ \@cons\@flsucceed #1%
+ \@tempdima\@tempdimb
+ \fi}
+\def\@{\spacefactor\@m{}}
+\def\@tempa#1#2{#1#2\relax}
+\ifx\setlength\@tempa
+ \def\setlength#1#2{#1 #2\relax}
+\fi
+\def\addpenalty#1{%
+ \ifvmode
+ \if@minipage
+ \else
+ \if@nobreak
+ \else
+ \ifdim\lastskip=\z@
+ \penalty#1\relax
+ \else
+ \@tempskipb\lastskip
+ \begingroup
+ \advance \@tempskipb
+ \ifdim\prevdepth>\maxdepth\maxdepth\else
+ \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+ \fi
+ \vskip -\@tempskipb
+ \penalty#1%
+ \vskip\@tempskipb
+ \endgroup
+ \vskip -\@tempskipb
+ \vskip \@tempskipb
+ \fi
+ \fi
+ \fi
+ \else
+ \@noitemerr
+ \fi}
+\def\@fnsymbol#1{%
+ \ifcase#1\or \TextOrMath\textasteriskcentered *\or
+ \TextOrMath \textdagger \dagger\or
+ \TextOrMath \textdaggerdbl \ddagger \or
+ \TextOrMath \textsection \mathsection\or
+ \TextOrMath \textparagraph \mathparagraph\or
+ \TextOrMath \textbardbl \|\or
+ \TextOrMath {\textasteriskcentered\textasteriskcentered}{**}\or
+ \TextOrMath {\textdagger\textdagger}{\dagger\dagger}\or
+ \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}\else
+ \@ctrerr \fi
+}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname eTeXversion\endcsname\relax
+\DeclareRobustCommand\TextOrMath{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi}
+\protected@edef\TextOrMath#1#2{\TextOrMath{#1}{#2}}
+\else
+\protected\expandafter\def\csname TextOrMath\space\endcsname{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi}
+\edef\TextOrMath#1#2{%
+ \expandafter\noexpand\csname TextOrMath\space\endcsname
+ {#1}{#2}}
+\fi
+\def\@esphack{%
+ \relax
+ \ifhmode
+ \spacefactor\@savsf
+ \ifdim\@savsk>\z@
+ \nobreak \hskip\z@skip % <------
+ \ignorespaces
+ \fi
+ \fi}
+\def\@Esphack{%
+ \relax
+ \ifhmode
+ \spacefactor\@savsf
+ \ifdim\@savsk>\z@
+ \nobreak \hskip\z@skip % <------
+ \@ignoretrue
+ \ignorespaces
+ \fi
+ \fi}
+\DeclareRobustCommand\em
+ {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
+ \eminnershape \else \itshape \fi}
+\def\eminnershape{\upshape}
+\DeclareRobustCommand*\textsubscript[1]{%
+ \@textsubscript{\selectfont#1}}
+\def\@textsubscript#1{%
+ {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
+\def\@DeclareMathSizes #1#2#3#4#5{%
+ \@defaultunits\dimen@ #2pt\relax\@nnil
+ \if $#3$%
+ \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
+ \else
+ \@defaultunits\dimen@ii #3pt\relax\@nnil
+ \@defaultunits\@tempdima #4pt\relax\@nnil
+ \@defaultunits\@tempdimb #5pt\relax\@nnil
+ \toks@{#1}%
+ \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
+ \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
+ \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
+ \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
+ \the\toks@
+ }%
+ \fi
+}
+\providecommand*\MakeRobust[1]{%
+ \@ifundefined{\expandafter\@gobble\string#1}{%
+ \@latex@error{The control sequence `\string#1' is undefined!%
+ \MessageBreak There is nothing here to make robust}%
+ \@eha
+ }%
+ {%
+ \@ifundefined{\expandafter\@gobble\string#1\space}%
+ {%
+ \expandafter\let\csname
+ \expandafter\@gobble\string#1\space\endcsname=#1%
+ \edef\reserved@a{\string#1}%
+ \def\reserved@b{#1}%
+ \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
+ \edef#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect\noexpand#1%
+ \fi
+ \noexpand\protect\expandafter\noexpand
+ \csname\expandafter\@gobble\string#1\space\endcsname}%
+ }%
+ {\@latex@info{The control sequence `\string#1' is already robust}}%
+ }%
+}
+\MakeRobust\(
+\MakeRobust\)
+\MakeRobust\[
+\MakeRobust\]
+\MakeRobust\makebox
+\MakeRobust\savebox
+\MakeRobust\framebox
+\MakeRobust\parbox
+\MakeRobust\rule
+\MakeRobust\raisebox
+\def\@xfloat #1[#2]{%
+ \@nodocument
+ \def \@captype {#1}%
+ \def \@fps {#2}%
+ \@onelevel@sanitize \@fps
+ \def \reserved@b {!}%
+ \ifx \reserved@b \@fps
+ \@fpsadddefault
+ \else
+ \ifx \@fps \@empty
+ \@fpsadddefault
+ \fi
+ \fi
+ \ifhmode
+ \@bsphack
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist
+ {%
+ \@tempcnta \sixt@@n
+ \expandafter \@tfor \expandafter \reserved@a
+ \expandafter :\expandafter =\@fps
+ \do
+ {%
+ \if \reserved@a h%
+ \ifodd \@tempcnta
+ \else
+ \advance \@tempcnta \@ne
+ \fi
+ \else\if \reserved@a t%
+ \@setfpsbit \tw@
+ \else\if \reserved@a b%
+ \@setfpsbit 4%
+ \else\if \reserved@a p%
+ \@setfpsbit 8%
+ \else\if \reserved@a !%
+ \ifnum \@tempcnta>15
+ \advance\@tempcnta -\sixt@@n\relax
+ \fi
+ \else
+ \@latex@error{Unknown float option `\reserved@a'}%
+ {Option `\reserved@a' ignored and `p' used.}%
+ \@setfpsbit 8%
+ \fi\fi\fi\fi\fi
+ }%
+ \@tempcntb \csname ftype@\@captype \endcsname
+ \multiply \@tempcntb \@xxxii
+ \advance \@tempcnta \@tempcntb
+ \global \count\@currbox \@tempcnta
+ }%
+ \@fltovf
+ \fi
+ \global \setbox\@currbox
+ \color@vbox
+ \normalcolor
+ \vbox \bgroup
+ \hsize\columnwidth
+ \@parboxrestore
+ \@floatboxreset
+}
+ \def\@stpelt#1{\global\csname c@#1\endcsname \m@ne\stepcounter{#1}}
+\EndIncludeInRelease
+%</fixltx2e>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/latexrelease.ins b/macros/latex-dev/base/latexrelease.ins
new file mode 100644
index 0000000000..1ddcfc4c29
--- /dev/null
+++ b/macros/latex-dev/base/latexrelease.ins
@@ -0,0 +1,148 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2018
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2018
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+%\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{latexrelease.sty}{t}{%
+ \from{ltclass.dtx} {latexreleasefirst,tracerollback}%
+ \from{ltvers.dtx} {latexrelease}%
+ \from{latexrelease.dtx}{latexrelease}%
+ \from{ltdirchk.dtx} {latexrelease}%
+ \from{ltdefns.dtx} {latexrelease}%
+ \from{ltalloc.dtx} {latexrelease}% empty
+ \from{ltcntrl.dtx} {latexrelease}% empty
+ \from{lterror.dtx} {latexrelease}% empty
+ \from{ltpar.dtx} {latexrelease}% empty
+ \from{ltlists.dtx} {latexrelease}% empty
+ \from{ltboxes.dtx} {latexrelease}%
+ \from{lttab.dtx} {latexrelease}% empty
+ \from{ltmath.dtx} {latexrelease}%
+ \from{ltpictur.dtx} {latexrelease}%
+ \from{ltthm.dtx} {latexrelease}% empty
+ \from{ltsect.dtx} {latexrelease}% empty
+ \from{ltfiles.dtx} {latexrelease}%
+ \from{ltoutenc.dtx} {latexrelease}%
+ \from{ltcounts.dtx} {latexrelease}%
+ \from{ltlength.dtx} {latexrelease}%
+ \from{ltfloat.dtx} {latexrelease}%
+ \from{ltidxglo.dtx} {latexrelease}% empty
+ \from{ltbibl.dtx} {latexrelease}% empty
+ \from{ltpage.dtx} {latexrelease}% empty
+ \from{ltoutput.dtx} {latexrelease}%
+ \from{ltclass.dtx} {latexrelease,tracerollback}%
+ \from{ltspace.dtx} {latexrelease}%
+ \from{ltlogos.dtx} {latexrelease}% empty
+ \from{ltplain.dtx} {latexrelease}%
+ \from{ltfssdcl.dtx} {latexrelease}%
+ \from{ltfssini.dtx} {latexrelease}%
+ \from{fontdef.dtx} {latexrelease}% (covering fontmath and fonttext)
+ \from{ltfntcmd.dtx} {latexrelease}% empty
+ \from{ltfssbas.dtx} {latexrelease}%
+ \from{ltfsstrc.dtx} {latexrelease}% empty
+ \from{ltfsscmp.dtx} {latexrelease}%
+ \from{ltpageno.dtx} {latexrelease}% empty
+ \from{ltxref.dtx} {latexrelease}% empty
+ \from{ltmiscen.dtx} {latexrelease}%
+ \from{ltluatex.dtx} {latexrelease}%
+ \from{ltfinal.dtx} {latexrelease}%
+}
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space latexrelease.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX2e.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+
+\generateFile{fixltx2e.sty}{t}{%
+ \from{latexrelease.dtx}{fixltx2e}}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/latexrelease.pdf b/macros/latex-dev/base/latexrelease.pdf
new file mode 100644
index 0000000000..44c83065ce
--- /dev/null
+++ b/macros/latex-dev/base/latexrelease.pdf
Binary files differ
diff --git a/macros/latex-dev/base/latexsym.dtx b/macros/latex-dev/base/latexsym.dtx
new file mode 100644
index 0000000000..58e88d6364
--- /dev/null
+++ b/macros/latex-dev/base/latexsym.dtx
@@ -0,0 +1,203 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+%
+% \iffalse % this is a METACOMMENT !
+%
+% File `latexsym.dtx'.
+% Copyright 1994-1998 by Frank Mittelbach. All rights reserved.
+%
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{latexsym}
+%<fd>\ProvidesFile{ulasy.fd}
+%<-driver> [1998/08/17 v2.2e
+%<package> Standard LaTeX package (lasy symbols)]
+%<fd> LaTeX symbol font definitions]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{latexsym}
+\GetFileInfo{latexsym.sty}
+\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+\title{The \LaTeX{} symbol fonts for use with
+ \LaTeXe.\thanks{This file has version
+ number \fileversion, dated \filedate.}}
+\date{\filedate}
+\author{Frank Mittelbach}
+\begin{document}
+\MaintainedByLaTeXTeam{latex}
+\maketitle
+ \DocInput{latexsym.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{v2.2e}{1998/08/17}{Documentation fixes.}
+%
+% \section{Introduction}
+%
+% This file defines the package |latexsym| which makes the few
+% additional characters available that come from the |lasy| fonts
+% (\LaTeX's symbol fonts). These fonts are not automatically
+% included in the NFSS2/\LaTeXe{} since they take up important
+% space and aren't necessary if one makes use of the packages
+% \texttt{amsfonts} or \texttt{amssymb}.
+%
+% The commands defined by the \texttt{latexsym} package are:
+% \begin{quote}\raggedright
+% |\mho|~$\mho$ \quad
+% |\Join|~$\Join$ \quad
+% |\Box|~$\Box$ \quad
+% |\Diamond|~$\Diamond$ \quad
+% |\leadsto|~$\leadsto$ \quad
+% |\sqsubset|~$\sqsubset$ \quad
+% |\sqsupset|~$\sqsupset$ \quad
+% |\lhd|~$\lhd$ \quad
+% |\unlhd|~$\unlhd$ \quad
+% |\rhd|~$\rhd$ \quad
+% |\unrhd|~$\unrhd$
+% \end{quote}
+%
+% \StopEventually{}
+%
+% \section{The \dst{} modules}
+%
+% The following modules are used in the implementation to direct
+% \dst{} in generating the external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% package & produce a package file \\
+% fd & produce a font definition file
+% \end{tabular}
+% \end{center}
+%
+%
+% \section{The Implementation}
+%
+% The individual files generated from this code are identified at the
+% very top of this file by a couple of lines looking like this:
+% \begin{verbatim}
+% %<fd>\ProvidesFile{Ulasy.fd}
+% %<-driver> [????/??/?? v2.2?
+% %<package> Standard LaTeX package (lasy symbols)]
+% %<fd> LaTeX symbol font definitions]
+%\end{verbatim}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{macro}{\symlasy}
+%
+% It is possible to detect whether or not the \LaTeX{} symbols are
+% already defined by checking for the math group number with the
+% name |\symlasy|.
+%
+% In that case we exit but write a message to the transcript file.
+% \begin{macrocode}
+\ifx\symlasy\undefined \else
+ \wlog{Package latexsym: nothing to set up^^J}%
+ \endinput \fi
+% \end{macrocode}
+% Otherwise we define the new symbol font.
+% \begin{macrocode}
+ \DeclareSymbolFont{lasy}{U}{lasy}{m}{n}
+ \SetSymbolFont{lasy}{bold}{U}{lasy}{b}{n}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Because the lasy symbols are made an error in the format we have
+% to undefine them before we can set them anew with
+% |\DeclareMathSymbol|.
+% \begin{macrocode}
+ \let\mho\undefined \let\sqsupset\undefined
+ \let\Join\undefined \let\lhd\undefined
+ \let\Box\undefined \let\unlhd\undefined
+ \let\Diamond\undefined \let\rhd\undefined
+ \let\leadsto\undefined \let\unrhd\undefined
+ \let\sqsubset\undefined
+% \end{macrocode}
+% \changes{v2.2a}{1995/03/18}{\cs{lhd} and friends should be bin ops.}
+% \begin{macrocode}
+ \DeclareMathSymbol\mho {\mathord}{lasy}{"30}
+ \DeclareMathSymbol\Join {\mathrel}{lasy}{"31}
+ \DeclareMathSymbol\Box {\mathord}{lasy}{"32}
+ \DeclareMathSymbol\Diamond {\mathord}{lasy}{"33}
+ \DeclareMathSymbol\leadsto {\mathrel}{lasy}{"3B}
+ \DeclareMathSymbol\sqsubset{\mathrel}{lasy}{"3C}
+ \DeclareMathSymbol\sqsupset{\mathrel}{lasy}{"3D}
+ \DeclareMathSymbol\lhd {\mathbin}{lasy}{"01}
+ \DeclareMathSymbol\unlhd {\mathbin}{lasy}{"02}
+ \DeclareMathSymbol\rhd {\mathbin}{lasy}{"03}
+ \DeclareMathSymbol\unrhd {\mathbin}{lasy}{"04}
+% \end{macrocode}
+% To save some space we can remove the definition of |\not@base|
+% since it isn't any longer needed. (We use |\@undefined| so that
+% gives an error and not a recursive definition
+% if it is still used somewhere.)
+% \changes{v2.2b}{1995/07/03}{Free space for \cs{not@base}}
+% \begin{macrocode}
+ \let\not@base\@undefined
+%</package>
+% \end{macrocode}
+%
+% \subsection{\LaTeX{} symbols fonts}
+%
+% \changes{v2.2d}{1996/11/20}{lowercase ulasy.fd /1044}
+% The rest of this file defines the the font shape declarations
+% that have to go into the corresponding |.fd| file.
+%
+% \begin{macrocode}
+%<*fd>
+\DeclareFontFamily{U}{lasy}{}
+\DeclareFontShape{U}{lasy}{m}{n}{ <5> <6> <7> <8> <9> gen * lasy
+ <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>lasy10 }{}
+% \end{macrocode}
+% Since there are no bold lasy symbols below 10pt we silently
+% substitute them by the medium ones to avoid terminal warnings if
+% |\boldmath| is selected.
+% \begin{macrocode}
+\DeclareFontShape{U}{lasy}{b}{n}{ <-10> ssub * lasy/m/n
+ <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>lasyb10 }{}
+%</fd>
+% \end{macrocode}
+%
+% The next line goes into all files and in addition prevents \dst{}
+% from adding any further code from the main source file (such as a
+% character table).
+% \begin{macrocode}
+\endinput
+% \end{macrocode}
+%
+% \DeleteShortVerb{\|}
+% \Finale
+%
+%
diff --git a/macros/latex-dev/base/latexsym.ins b/macros/latex-dev/base/latexsym.ins
new file mode 100644
index 0000000000..031e1d4062
--- /dev/null
+++ b/macros/latex-dev/base/latexsym.ins
@@ -0,0 +1,157 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\declarepreamble\fdpreamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{
+ \file{latexsym.sty}{%
+ \from{latexsym.dtx}{package}}
+ \usepreamble\fdpreamble
+ \file{ulasy.fd}{
+ \from{latexsym.dtx}{fd}}
+ }
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space latexsym.sty}
+\Msg{* \space\space *.fd}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
+
+
+
+
+
diff --git a/macros/latex-dev/base/latexsym.pdf b/macros/latex-dev/base/latexsym.pdf
new file mode 100644
index 0000000000..242cf1725c
--- /dev/null
+++ b/macros/latex-dev/base/latexsym.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lb2.err b/macros/latex-dev/base/lb2.err
new file mode 100644
index 0000000000..fa8694c5e2
--- /dev/null
+++ b/macros/latex-dev/base/lb2.err
@@ -0,0 +1,1622 @@
+\newcommand\erratafiledate{2014-09-30}
+
+\def\comando#1{\texttt{\string#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% To produce a printed version of this errata file run this file through
+% LaTeX. It will unpack a small class file (if not already present) and
+% a configuration file with the extension .cfg. You might want to modify
+% the setting in this configuration file to print only a partial errata
+% suitable for your printed revision of this book, see details in the
+% .cfg file.
+%
+% The current version of this file can be found at:
+%
+% https://www.latex-project.org/guides/books.html
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\begin{filecontents}{ttcterrata.cls}
+%%
+%% Copyright (C) 1997,2004,2005,2007, 2014 Frank Mittelbach
+%% This class file is licenced under LPPL latest version;
+%% see https://www.latex-project.org/lppl
+%
+%
+% It sets up a few commands used to format the errata entries for books in the
+% Addison-Wesley Series:
+%
+% Tools and Techniques for Computer Typesetting
+%
+% hence the name. However, anybody who likes to use it is free to apply it for
+% errata files of other books.
+%
+% Changes:
+%
+% v1.0a - changed name from errata.cls to ttcterrata.cls
+
+\ProvidesClass{ttcterrata}
+ [2007/11/10 v1.0a Mini class for errata files; subject to change (FMi)]
+
+\LoadClass{article}
+
+\setcounter{secnumdepth}{-1}
+\addtolength\textwidth{5cm}
+\addtolength\oddsidemargin{-3cm}
+
+\addtolength\textheight{36pt}
+
+\RequirePackage{shortvrb}
+\MakeShortVerb{\|}
+
+\RequirePackage{array,longtable}
+\RequirePackage{multicol}
+
+
+\newcommand\erratagetnumber{}
+\def\erratagetnumber#1/#2/#3\erratagetnumber{#1#2#3}
+
+
+\newcommand\gobbleerrata{%
+ \setbox\@tempboxa\vbox\bgroup
+ \let\endgobble\egroup
+ \let\hideamp\relax
+ \let\\\relax\let\par\@@par}
+
+\newcommand*\hideamp{&}
+
+\let\endgobble\relax
+
+
+\newcommand\erratastartdate{}
+\newcommand\myprinting{1}
+
+
+\newcommand\doweprint[2]{%
+ \ifnum \myprinting < \if!#2!1000 \else \ifx s#2 1000\else#2 \fi\fi
+ \ifnum \expandafter\erratagetnumber\erratastartdate\erratagetnumber <
+ \erratagetnumber#1\erratagetnumber \relax
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \else
+ \@tempswafalse
+ \fi
+}
+
+
+
+\newcommand\includedentries{entries after = \erratastartdate}
+\newcommand\printedentries{between \erratastartdate\space and}
+
+\newcommand\showallerrors{%
+ \renewcommand\includedentries{all errata entries}%
+ \renewcommand\printedentries{up to}
+ \renewcommand\doweprint[2]{\@tempswatrue}}
+
+
+\newcommand\displayrevisionfix[2]{%
+ \if!#2!\textbf{#1}\else\textit{#1}\rlap{\textsuperscript{#2}}\fi}
+
+\newcommand\norevisionnumbers{%
+ \renewcommand\displayrevisionfix[2]{\textbf{##1}}}
+
+\IfFileExists{\jobname.cfg}
+ {
+ \input{\jobname.cfg}
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* Configuration file for \jobname.err found }
+ \typeout{*}
+ \typeout{***************************************************}
+ \AtEndDocument{
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* If you wish to generate an errata listing}
+ \typeout{* containing only errors found after a certain revision}
+ \typeout{* and/or only errors found after a certain date}
+ \typeout{* modify the information stored in \jobname.cfg}
+ \typeout{*}
+ \typeout{* Current settings are:}
+ \typeout{*}
+ \typeout{* \@spaces printing of your book = \myprinting}
+ \typeout{* \@spaces include \includedentries}
+ \typeout{*}
+ \typeout{***************************************************}
+ }}
+ {}
+
+%% \erroronpage <page> <line info> <contributor> <date> <fixed in revision>
+
+\newcommand\erroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\seriouserroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\CHAPTER[1]{\endgobble
+ &\\[4pt]%
+ \multicolumn{4}{l}{\framebox[10cm][l]{\textbf{\normalsize\strut#1}}} \\}
+
+\newenvironment{erratalist}
+ {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
+ {\endgobble\end{longtable}}
+
+\newcommand\erratatitle[2]
+ {\begin{center}\LARGE\bfseries
+ Errata list for #1\\[5pt](\myprinting.\ printing)\\[10pt]
+ \small Includes all entries found \printedentries\space #2\\
+ (For other periods/print runs reprocess this document
+ with different config settings)
+ \end{center}%
+ \markright{Errata for #1 (\printedentries\space #2)}%
+ \thispagestyle{plain}%
+ \vspace{20pt}}
+
+\pagestyle{myheadings}
+
+\AtBeginDocument{\small}
+
+\setlength\parindent{0pt}
+\setlength\parskip{2pt}
+
+\newcommand\contributor[2]{\makebox[1cm][l]{\sffamily#1} #2\par}
+
+% some special shortcuts overwriting existing commands:
+
+\let\u\underline
+\renewcommand\>{$\to$}
+
+%%% some code suggested by Thorsten Hansen to count the number of
+%%% contributions by individuals (will work only if we do not get
+%%% too many :-)
+
+\def\count@contributors#1/#2/#3\@nil{
+ \@ifundefined{c@#1}{\newcounter{#1}}{}\stepcounter{#1}%
+%%% also count secondary:
+%%% \@ifundefined{c@#2}{\newcounter{#2}}{}\stepcounter{#2}%
+}
+
+\renewcommand\erroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\seriouserroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\contributor[2]{\makebox[1cm][l]{%
+ \sffamily#1} #2\@ifundefined{c@#1}{}{ (\arabic{#1})}\par}
+
+\end{filecontents}
+
+
+\begin{filecontents}{\jobname.cfg}
+%
+%
+% Configuration file for the errata listing of
+%
+% Der LaTeX-Begleiter 2 Auflage
+%
+%
+% \erratastartdate
+%
+% Specifies the date from which on errata entries should be listed.
+%
+% The format is YYYY/MM/DD.
+%
+% The default below ensures that all entries for a particular
+% printing are typeset.
+%
+
+\renewcommand\erratastartdate{2005/09/01}
+
+
+%
+% \myprinting
+%
+% Specifies which (revised) printing you own. For example, if you
+% have the second printing set this to 2 so that errors already
+% corrected in that printing will not appear in your errata
+% listing.
+%
+% The default below ensures that all entries relevant to the second
+% printing are typeset.
+%
+%
+
+\renewcommand\myprinting{2}
+
+%
+% \norevisionnumbers
+%
+% Specifies that all page numbers in the errata are shown in the same
+% format (bold face) irregardless of whether or not they are fixed
+% in some revision. The default is to print corrected errors in
+% italic and add the revision number as a superscript.
+
+%
+% \showallerrors
+%
+% With this command you tell the program that all errata entries are
+% supposed to be generated. This makes \myprinting and
+% \erratastartdate basically obsolete so this isn't turned on by
+% default.
+%
+%
+\endinput
+\end{filecontents}
+
+
+\documentclass{ttcterrata}[2005/11/10] % we want new class
+
+\usepackage[T1]{fontenc}
+\let\u\underline % shortcut for this file
+
+\newcommand\meta[1]{$\langle$\textit{#1\/}$\rangle$}
+\newcommand\BibTeX{\textsc{Bib}\TeX}
+
+
+\usepackage{textcomp}
+
+\usepackage{url}
+
+\usepackage[ngerman]{babel}
+\usepackage[utf8]{inputenc}
+
+
+\renewcommand\erratatitle[2]
+ {\begin{center}\LARGE\bfseries
+ Errataliste f\"ur #1\\[5pt](\myprinting.\ Druck)\\[10pt]
+ \small Enth\"alt alle Eintr\"age die \printedentries\space #2
+ gemeldet wurden \\
+ (F\"ur andere Zeitr\"aume/Druckausgaben \"andert man die \texttt{.cfg}
+ Datei und formatiert erneut.)
+ \end{center}%
+ \markright{Errata für #1 (\printedentries\space #2)}%
+ \thispagestyle{plain}%
+ \vspace{20pt}}
+
+\renewcommand\printedentries{zwischen \erratastartdate\space und}
+
+
+
+\begin{document}
+
+\erratatitle{Der \LaTeX{}-Begleiter, zweite Auf\/lage}{\erratafiledate}
+
+
+\vspace*{-\baselineskip}
+
+Hardcover-Ausgabe:
+\begin{verbatim}
+@book(Pearson:MG05,
+ author = {Frank Mittelbach and Michel Goossens},
+ title = {Der {\LaTeX}-Begleiter}, edition = 2,
+ note = {Unter Mitarbeit von Johannes Braams, David Carlisle, und Chris Rowley},
+ publisher = {Pearson Studium}, address = {M\"unchen}, year = 2005,
+ pagenums = {1180}, bibliography = {yes}, index = {yes},
+ isbn = {3-8273-7166-X},
+)
+\end{verbatim}
+Bafög-Ausgabe (Softcover) die inhaltlich identisch ist:
+\begin{verbatim}
+@book(Pearson:MG10,
+ author = {Frank Mittelbach and Michel Goossens},
+ title = {Der {\LaTeX}-Begleiter Baf\"og-Ausgabe}, edition = 2,
+ note = {Unter Mitarbeit von Johannes Braams, David Carlisle, und Chris Rowley},
+ publisher = {Pearson Studium}, address = {M\"unchen}, year = 2010,
+ pagenums = {1180}, bibliography = {yes}, index = {yes},
+ isbn = {3-8689-4088-X},
+)
+\end{verbatim}
+
+
+\begin{list}{}{\setlength\leftmargin{0cm}\setlength\rightmargin{3cm}}
+\item[]
+
+Diese Errata-Datei (\texttt{\jobname.err}) ist Teil der
+\LaTeX-Distribution und die neuste Version findet man auf der \LaTeX{}
+Project Webseite unter
+\url{https://www.latex-project.org/help/books/}\texttt{\jobname.err}. Dort
+findet man auch einige Abschnitte des Buches als PDF-Dateien.
+
+Die erste Spalte der Tabelle zeigt die Seitennummer des
+Errataeintrags. Hochgestellte Ziffern in der ersten Spalte verweisen
+auf den Nachdruck, in dem der beschriebene Fehler korrigiert wurde
+(ein \textit{s} zeigt, an, dass das Problem bisher nur in den
+"`S"'ourcen korrigiert wurde). Die zweite Spalte beschreibt die genaue
+Position (negative Zeilen- oder Absatznummern werden vom Fuß der Seite
+gezählt). Die dritte Spalte zeigt die Initialen der Person die den
+Fehler zuerst aufgespürt/gemeldet hat.
+
+
+Mithilfe der Konfigurationsdatei \texttt{\jobname.cfg} ist es möglich die
+Liste so anzupassen, dass nur Errataeinträge ab einem
+speziellen Nachdruck oder ab einem gewünschten Datum angezeigt werden.
+
+
+\begin{center}
+ \Large \bfseries Irren ist menschlich -- Fehlerwettbewerb
+\end{center}
+
+
+Jeder gefundene und mitgeteilte Fehler ist ein Gewinn für alle Leser
+und Käufer unseres Buches. Aus diesem Grund schreiben wir, Pearson
+Studium und die Autoren, einen Preis aus -- halbjährlich, später (mehr)jährlich -- den
+die Person erhält, die die meisten Fehler innerhalb dieser Zeit findet
+(im Falle einer Überschneidung wird das Los zwischen den "`besten"'
+Fehlersuchern entscheiden). Eine Person kann nur einmal einen Preis
+bekommen; Fehler die durch die Autoren gefunden werden, zählen nicht.
+\begin{center}
+Ihr Preis: Ein Lehrbuch Ihrer Wahl!
+\end{center}
+Auswählen können Sie dieses unter \url{http://www.pearson-studium.de}.
+(Bundles und mehrbändige Bücher sind davon ausgenommen).
+
+Wie üblich behalten sich die Autoren und der Verlag das Recht vor,
+selbst zu entscheiden ob ein Fehler tatsächlich als Fehler anzusehen
+ist oder ob ein wiederholt vorkommender Fehler als ein oder mehrere Fehler
+gezählt wird.
+
+- Viel Erfolg -
+
+\begin{center}
+\begin{tabular}{clr@{ Eingaben}}
+Ende der Wettbewerbsperiode & Gewinner \\[4pt]
+2006/04 & Jens Mandavid & 121 \\
+2006/10 & Ralf Heckmann & 61 \\
+2008/04 & --- \\
+\ldots & Termin einer weiteren Verlosung offen
+%2008/10 & \\
+\end{tabular}
+\end{center}
+\end{list}
+
+\newpage
+
+
+%<--------------------------
+
+\begin{erratalist}
+
+\CHAPTER{Allgemein}
+
+\iffalse
+\seriouserroronpage{general}{}{FMi}{2004/06/12}{}
+
+ To help you in assessing this errata document we have placed
+ exclamation marks in front of each entry that we consider essential
+ for correctly understanding the book contents.
+ \fi
+
+\erroronpage{}{}{RHe}{2006/06/10}{}
+ Einzelne Teile mehrgliedriger Abkürzungen werden im deutschsprachigen
+ Satz normalerweise durch einen kleinen Zwischenraum (Spatium) getrennt; nur in
+ englischsprachigen Texten wird zwischen den Abkürzungsteilen kein
+ Zwischenraum gesetzt.
+ Beispiele: z.\,B., u.\,a.\ anstatt z.B., u.a.
+
+ Dies wird im Buch \emph{vermutlich} nicht korrigiert werden.
+
+
+\CHAPTER{Titelei}
+
+
+\erroronpage{iii}{bottom}{MHo}{2005/10/10}{2}
+LB2 mentions the fabled city of ``San Franciso'' which of course
+should be ``Francis\u{c}o''.
+
+\CHAPTER{Kapitel 1}
+
+\erroronpage{3}{Abs.4, Z.4}{JMa}{2005/12/26}{2}
+ Ersetze: (NFSS) \> (\textsf{NFSS})
+
+\erroronpage{15}{Abs.5, Z.2}{ESt}{2006/03/11}{2}
+ \texttt{info/examples/lb2} wird nicht gefunden. Kein wirklicher Fehler im
+ Buch, sondern ein Versehen auf CTAN.
+
+
+\CHAPTER{Kapitel 2}
+
+\erroronpage{24}{Abs.1, Z.1}{MLi}{2013/07/12}{}
+ Das Kommando lautet \verb=\AskOption= (ohne ``s'')
+
+\erroronpage{26}{Abs.-3, Z.4}{JMa}{2006/01/03}{2}
+ Zur schließenden Klammer in Zeile 5 gibt es keine öffnende; es sollte wohl
+heißen: (zum Beispiel \ldots{}
+
+\erroronpage{29}{Abs. nach 2-2-3, Z.7}{JMa}{2006/01/03}{2}
+ Es muss ``mit unterschiedliche\u{n} Definitionen'' heißen.
+
+\erroronpage{31}{Abs.3, Z.3}{FMi}{2006/02/28}{2}
+Im Deutschen steht bei einer Aufzählung kein Komma vor ``oder''.
+
+\erroronpage{33}{Abs.2, Z.-2}{FMi}{2006/02/28}{2}
+Im Deutschen steht bei einer Aufzählung kein Komma vor ``oder''.
+
+\erroronpage{37}{Abs.1, Z.1}{JMa}{2006/01/03}{2}
+Im Deutschen steht bei einer Aufzählung kein Komma vor ``oder''.
+
+\erroronpage{39}{Abs.3, Z.4 und Z.7}{JMa}{2006/01/03}{2}
+Im Deutschen steht bei einer Aufzählung kein Komma vor ``oder''.
+
+\erroronpage{42}{Absatz \textit{rechts}, Z.2}{JMa}{2006/01/03}{2}
+Im Deutschen steht bei einer Aufzählung kein Komma vor ``oder''.
+
+\erroronpage{56}{Abs.3, Z.3}{JMa}{2006/01/03}{2}
+Hier fehlt ein Buchstabe: ``Das Beispiel zeigt, das\u{s} es
+wahrscheinlich''.
+
+\erroronpage{59}{2.3.6 Abs.\ 4, Z.\ 1}{RHe}{2006/06/10}{2}
+ Füge Komma ein: "`Um das \textsf{minitoc}-System zu initialisieren,
+muss ein \dots{}"'
+
+\erroronpage{60}{Tab.2.3, rechte Spalte, Z.1}{JMa}{2006/01/03}{2}
+Hier fehlt zu einer schließenden Klammer die öffnende.
+
+\erroronpage{61}{Abs.3, Z.-1}{JMa}{2006/01/03}{2}
+\LaTeX-Trennfehler: Kapitel-eintr"age statt Kapite-leintr"age.
+
+\erroronpage{64}{Abs.3, Z.-2}{JMa}{2006/01/03}{2}
+\LaTeX-Trennfehler: Abschnitts-eintrag statt Abschnitt-seintrag.
+
+\erroronpage{65}{Abs.1, Z.1-2}{JMa}{2006/01/03}{2}
+Es muss ``Ein solcher Wechsel'' statt ``Eine solcher Wechsel'' heißen.
+
+\erroronpage{65}{Abs.-2, Z.1-2}{JMa}{2006/01/03}{2}
+\LaTeX-Trennfehler: Verzeichnis-eintr"age statt Verzeichni-seintr"age.
+
+\erroronpage{70}{Abs.-1, Z.1-2}{JMa}{2006/01/03}{2}
+Hier fehlt ein Komma am Ende der ersten Zeile und ein Punkt am Ende des
+ersten Satzes.
+
+\erroronpage{73}{Abs.2, Z.4}{JMa}{2006/01/03}{2}
+Im Deutschen steht bei einer Aufzählung kein Komma vor ``oder''.
+
+\erroronpage{74}{Abs.2, Z.12}{JMa}{2006/01/03}{2}
+Hier fehlt ein Komma vor ``wenn sie durch''.
+
+\erroronpage{75}{Abs.3, Z.1}{JMa}{2006/01/03}{2}
+Es fehlen zwei Buchstaben: ``ohne daf"ur einen eigen\u{en} Abstand
+einzuf"ugen''.
+
+
+\CHAPTER{Kapitel 3}
+
+\erroronpage{94}{Abs.-3, Z.-1}{JMa}{2006/01/06}{2}
+Lösche s aus Grau\u{s}wertproblem
+
+
+\erroronpage{101}{Abs.3, Z.3}{JMa}{2006/01/14}{2}
+Kein Komma vor und bei einer Aufzählung.
+
+\erroronpage{109}{Abs.\ 2, Z.\ 5}{RHe}{2006/06/10}{2}
+ Streiche Kommata: "`Möglich\_ und absolut nicht unwahrscheinlich\_ ist
+beispielsweise, \dots{}"'
+
+\erroronpage{114}{para 3}{FMi/CBe}{2005/09/02}{2}
+Ersetze Absatz durch: "`Da es nicht empfehlenswert ist, die Einstellung von
+|\baselineskip|
+direkt zu ändern, verfügt \LaTeX{} über den Befehl |\lineskip|\,, mit
+dem sich |\baselineskip| global für alle Größen ändern lässt. Nach
+einer Anweisung wie etwa \verb!\linespread{1.5}\selectfont! tritt der neue
+Wert sofort in Kraft. [Fußnote: Die veraltete \LaTeX~2.09 Lösung
+ \verb=\renewcommand\baselinestretch=\texttt{\textbraceleft
+ 1.5\textbraceright} benötigt dagegen einen nachfolgenden
+ Schriftgrößenwechsel (wie |\small| oder |\Large|), damit der neue
+ Wert in Kraft tritt.]
+
+
+
+\erroronpage{117}{3.2.1 Abs.\ 2, Z.\ 7}{RHe}{2006/06/10}{2}
+ Trennung der Hauptsätze: "`\dots{} der Zähler \texttt{footnote} wird
+weiter hochgesetzt, und die Darstellung erfolgt \dots{}"'
+
+\erroronpage{119}{Abs.\ 2, Z.\ 3}{RHe}{2006/06/10}{2}
+ Da die Beispiele unmittelbar folgen: "`\dots{} schematisch
+dargestellt \u{und bedeuten}:"'
+
+%%Ebenfalls als Vorschlag zur Neuformulierung -- weil es um zwei
+%%unterschiedliche Aspekte geht, sollte durch Punkt oder Semikolon
+%%getrennt werden:
+%
+% -maybe differently
+\erroronpage{121}{3.2.3 Abs.\ 2, Z.\ 3}{RHe}{2006/06/10}{2}
+ "`\u{Es wird ausreichend} Abstand zwischen
+Fußnoten und Text gelassen
+und die Fußnoten werden in einem kleineren Schriftgrad
+gesetzt."'
+
+
+\erroronpage{123}{2. Abs, Z.2}{JMa}{2006/01/14}{2}
+\ldots \u{auf denen} die Auswirkung\u{en} von \textsf{perpage} deutlich zu sehen sind.
+
+\erroronpage{143}{3. Abs, Z.1}{JMa}{2006/01/14}{2}
+Am Ende der Zeile fehlt ein Komma.
+
+\erroronpage{144}{1. Abs, Z.2}{JMa}{2006/01/14}{2}
+Es muss \u{kein} statt keinen hei\ss{}en.
+
+\erroronpage{147}{Bsp.3-3-19}{JMa}{2006/01/14}{2}
+Der \LaTeX{}-Begleiter sollte stets mit Bindestrich geschrieben werden.
+
+\erroronpage{149}{Abs.\ 1, Z.\ 1}{RHe}{2006/06/10}{2}
+ Streiche Anführungszeichen bei "`theoremähnliche"'.
+
+
+\erroronpage{149}{Abs.\ 1, Z.\ 3}{RHe/FMi}{2006/06/10}{2}
+Ersetze: "`Bei vielen dieser Argumente wird der unten aufgeführte, voreingestellte
+Wert verwendet, wenn ein leeres Argument angegeben wird.
+\>
+"`Bei vielen dieser Argumente erhält man den unten aufgeführten voreingestellten
+Wert, wenn ein leeres Argument angegeben wird."'
+
+
+
+
+\erroronpage{149}{Argument \textit{kopf-nach-abstand}, Z.\
+2}{RHe}{2006/06/10}{2}
+ Streiche Anführungszeichen bei "`Interpunktion"'.
+
+\erroronpage{155}{Bsp. 3-3-25}{RHe/FMi}{2006/06/10}{2}
+ Benutze babel Paket und ersetze englische Anführungszeichen durch deutsche.
+
+\erroronpage{158}{Bsp.3-3-28}{FMi/JBez}{2005/09/02}{}
+ The vertical space above ``Return values'' is too small.
+
+ Das ist ein ziemlich versteckter \LaTeX-Fehler, mit dem man wohl
+ leben muss.
+
+\erroronpage{159}{Abs.\ -1, Z.\ 1}{RHe}{2006/06/10}{2}
+ "`\dots{} unverändert, also "`wie über die Tastatur eingegeben"'\u{,}
+darstellen."'
+
+\erroronpage{160}{Abs.\ 2, Z.\ 2}{RHe}{2006/06/10}{2}
+ Anstelle "`extensiv"': "`\dots{} in der Vergangenheit \emph{intensiv}
+genutzt wurden, \dots{}"'
+
+\erroronpage{163}{Z.-3}{JMa}{2006/01/14}{2}
+Ersetze: "`fontenc"' \> "`\textsf{fontenc}"'
+
+\erroronpage{174}{3. Abs, Z.-2}{JMa}{2006/01/14}{2}
+Ersetze: "`diesen"' \> "`diesem"'
+
+\erroronpage{175}{Z. -4}{JMa}{2006/01/14}{2}
+Streiche einmal das Wort "`sich"'.
+
+\erroronpage{182}{Abs -1, Z.3}{JMa}{2006/01/14}{2}
+Es geht um eine Untermenge \u{von} \ldots
+
+\erroronpage{184}{Z.3}{JMa}{2006/01/14}{2}
+Streiche einmal das Wort "`Beispiel"'.
+
+\erroronpage{192}{3. Abs, Z.3}{JMa}{2006/01/14}{2}
+Es soll wohl "`von dieser \u{durch} das Resultat von \ldots"' hei\ss{}en.
+
+\erroronpage{195}{4. Abs, Z.5}{JMa}{2006/01/14}{2}
+Ersetze: "`ausgeben"' \> "`aus\u{ge}geben"'
+
+\erroronpage{197}{2. Abs, Z.1}{JMa}{2006/01/14}{2}
+Streiche das zweite t aus setz\u{t}en.
+
+
+
+
+\CHAPTER{Kapitel 4}
+
+% - but also a national one, so could stay
+%
+% \erroronpage{204}{Abs.\ 2, Z.\ -2}{RHe}{2006/06/15}{}
+% Streiche "`DIN"' in "`DIN A4"', da A4 nationaler (DIN 476),
+% europ\"{a}ischer (EN 20 216) und internationaler (ISO 216) Standard ist.
+
+\erroronpage{205}{Tab.\ 4.2}{YiL}{2012/05/07}{}
+
+ Die in der Tabelle aufgelisteten Werte sind nur ann\"aherend korrekt
+ -- einige Werte h\"angen von der gew\"ahlten Papier-Option (etwa |a4paper|) ab.
+
+
+
+\erroronpage{205}{4.2, Abs.\ 1, Z.\ 5}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} nicht v\"{o}llig unm\"{o}glich ist\u, sie
+\dots{} zu \"{a}ndern, \dots{}"'.
+
+\erroronpage{208}{Z. 1}{JMa}{2006/01/27}{2}
+Fehlendes Komma: "`zwei Pakete\u, mit deren"'
+
+\erroronpage{210}{Abs.\ 5, Z.\ 5}{RHe}{2006/06/15}{2}
+ Streiche Komma vor der Klammer: "`\dots{} von Listen Verwendung
+finden\_ (\dots{})."'
+
+\erroronpage{210}{Abs.6, Z.-1}{JMa}{2006/01/27}{2}
+Fehlendes Komma: "`abliest), kann man"'
+
+\erroronpage{213}{Abs.\ 3, Z.\ -1}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} kann es angebracht sein, ihn
+einzubeziehen."'
+
+\erroronpage{213}{Abs.\ 2, Z.\-1}{FMi}{2006/09/25}{2}
+ Ersetze "`muss die ein oder andere Einstellung"' \>
+ "` müssen die Einstellungen"'
+
+\erroronpage{215}{Z.1}{ChB}{2006/06/29}{2}
+ Es sollte wohl "`die ein\u{e} oder andere Einstellung"' hei"sen.
+
+\erroronpage{218}{Abs.\ 1, Z.\ 6}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} ist es jedoch besser,
+\texttt{ignorehead} \dots{} zu verwenden."'
+
+% Über das nächste Infinitivproblem kann man sich durchaus streiten:
+\erroronpage{218}{Abs.\ 2, Z.\ -2}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} liegt es beim Anwender,
+sicherzustellen, dass \dots{}"'
+
+\erroronpage{218}{Abs.\ -1, Z.\ -3}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`Da diese Option Fonts skaliert, anstatt
+Originalfonts \dots{} einzusetzen, \dots{}"'
+
+\erroronpage{219}{Abs.\ -1, Z.\ -4ff}{RHe}{2006/06/15}{2}
+ F\"{u}ge "`werden"' ein und streiche Komma vor dem letzten Abschnitt
+der Aufz\"{a}hlung: "`Zun\"{a}chst wird das Paket geladen, alle
+R\"{a}nder \u{werden} auf einen Zoll gesetzt\_ und die Kolumnentitel \dots{}
+festgelegt; \dots{}"'
+
+\erroronpage{220}{Abs.\ 1, Z.\ 3}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma zwischen den Haupts\"{a}tzen ein: "`\dots{} des
+Paketes wieder her, und bei \verb"pass" wird das Paket deaktiviert."'
+
+\erroronpage{221}{Aufz. cam, Z.\ 1}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} welche die Ma{\ss}e der Nettoseite
+anzeigen, ohne sie zu ber\"{u}hren (\dots{})."'
+
+\erroronpage{221}{para 4, l.4}{FMi}{2006/09/09}{2}
+ Option \texttt{b3} ist zweifach gelistet.
+
+\erroronpage{221}{Abs.\ -2, Z.\ 1}{RHe}{2006/06/15}{2}
+ Entferne:
+ "`Die Beschreibungen \dots{} sollten deutlich machen, dass \u{das}
+\textsf{crop} erst \dots{} geladen werden sollte."'
+
+\erroronpage{221}{Abs.\ -1, Z.\ 3}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} normalerweise ist es n\"{u}tzlich, ihn
+beizubehalten."'
+
+\erroronpage{222}{Abs.\ 1, Z.\ 3}{RHe}{2006/06/15}{2}
+ F\"{u}ge Komma ein: "`\dots{} versucht das Paket, den Druckertreiber
+\dots{} zu bestimmen."'
+
+\erroronpage{223}{4.3, Abs.\ 1, Z.\ 2}{RHe}{2006/06/17}{2}
+ Füge Komma ein: "`\dots{} sammelt genug Material, um gut eine Seite
+\dots{}"'
+
+\erroronpage{224}{Abs.\ -1, Z.\ 2}{RHe}{2006/06/17}{2}
+ Füge Komma ein: "`\dots{} entspricht dem Inhalt von \verb"\thepage",
+wie er auf der \dots{}"'
+
+\erroronpage{225}{Abs.\ 1, Z.\ 1}{RHe}{2006/06/17}{2}
+ Füge Komma ein: "`\dots{} mithilfe von \verb"\AtEndDocument", um
+sicherzugehen, dass \dots{}"'
+
+\erroronpage{229}{Abs.\ 2, Z.\ 8,10,-1}{RHe}{2006/06/17}{2}
+ Füge Leerstellen nach der Ellipse ein: "`\dots{} geht weiter"'
+
+\erroronpage{229}{Bsp.\ 4-3-3}{FMi}{2006/06/17}{2}
+ Füge Leerstelle nach der Ellipse ein: \verb=\dots geht=
+ \> \verb=\dots{} geht=
+
+
+\erroronpage{233}{Abs.\ 2, Z.\ 5}{RHe}{2006/06/17}{2}
+ Füge Komma ein: "`\dots{} um Längenparameter, sondern um Befehle
+\dots{}"'
+
+\erroronpage{234}{Abs.\ 1, Z.\ 7}{RHe}{2006/06/17}{2}
+ Ersetze Semikolon durch Komma und füge Wort ein: "Der Seitentyp wird mit `\dots{}
+ausgewählt\u, der Bereich \u{dagegen} mit \dots{}"'
+
+
+
+\CHAPTER{Kapitel 5}
+
+
+\erroronpage{247}{Abs.\ 3, Z.\ 2}{RHe}{2006/06/17}{2}
+ Füge Komma ein: "`\dots{} dass sie fähig sein müssen, innerhalb des
+Textes \dots{}"'
+
+\erroronpage{249}{Abs.3 in 5.1.1}{JMa}{2006/01/27}{2}
+Dieser Satz steht schon am Ende des ersten Absatzes dieses
+Abschnitts.
+
+\erroronpage{251}{Abs.\ -1}{FMi/CBe}{2005/09/02}{2}
+ Ersetze Absatz: "`Dezimalwert, mit dem die voreingestellte Minimalhöhe von Tabellenzellen
+ multipliziert wird. Ein Wert von 1.5 würde z.B. normalgroße
+ Zeilen um 50\% weiter voneinander entfernen. Er wird mit
+ dem Befehl \verb=\renewcommand= eingestellt (Standardwert \texttt{1.0})."'
+
+% -check
+\erroronpage{252}{Tabelle 5.2}{RHe}{2006/06/17}{2}
+ Ersetze alle amerikanischen Auslassungszeichen \{..\} durch deutsche
+\{\dots{}\}.
+
+\erroronpage{253}{Z. -2}{JMa}{2006/01/27}{2}
+Kein Komma vor "`erzeugt wurden"'
+
+\erroronpage{267}{Abs.\ 2, Z.\ 2}{RHe}{2006/06/20}{2}
+ "`Letztere"' ist klein zu schreiben
+
+\erroronpage{267}{Abs.\ 1, Z.\ 1}{RHe}{2006/06/20}{2}
+ Füge Komma ein: "`\dots{} üblicher, Farben \dots{} einzusetzen"'
+
+\erroronpage{269}{Abs.5, Z.1}{JMa}{2006/01/27}{2}
+\LaTeX-Trennfehler: Standar-dumgebung. \> Standard-umgebung
+
+\erroronpage{277}{Abs.\ 1, Z.\ 1}{RHe}{2006/06/20}{2}
+ Ersetze Anfang durch: "`Eine der Schwierigkeiten, \LaTeX{}-Tabellen mit außergewöhnlich
+großen Einträgen zu setzen, ist eine gute Raumverteilung um diese Einträge herum zu erreichen,
+ \dots"'
+
+\erroronpage{277}{Abs.\ -2, Z.\ 2}{RHe}{2006/06/20}{2}
+ Füge Komma ein: "`\dots{} optionales Argument, ähnlich dem von
+\verb"\\"\u, erweitert."'
+
+\erroronpage{277}{Abs.\ -1, Z.\ 1}{RHe}{2006/06/20}{2}
+ Ersetze Anfang durch: "`Die vertikalen Linien in einer \texttt{tabular}-Umgebung
+ werden aus einer Reihe von Linienelementen gebildet, jeweils eines pro
+ Tabellenzelle."'
+
+\erroronpage{278}{editorial change}{FMi}{2006/06/20}{2}
+Änderung auf Seite 277 erzeugt neuen Zeilenverlauf.
+
+
+\CHAPTER{Kapitel 6}
+
+
+\erroronpage{292}{Abs.-1, Z.2}{MSch}{2006/01/04}{2}
+ Füge hinzu: "`z.B. bedeutet \u{\texttt{0.2}}, dass 20\% von Gleitobjekten
+ belegt sein darf"'
+
+\erroronpage{298}{Abs.\ 1, Z.\ 2}{RHe}{2006/08/07}{2}
+ Füge Komma ein: "Das \textsf{afterpage}-Paket ermöglicht
+stattdessen\u{,} \verb"\afterpage{\clearpage}" zu verwenden."'
+
+\erroronpage{301}{Z.1}{JMa}{2006/02/04}{2}
+Fehlendes Komma: "`Hilfsdatei, in der"'
+
+\erroronpage{301}{Abs.-2,Z.3}{JMa}{2006/02/04}{2}
+Falsche Anf"uhrungszeichen bei "`eingerahmt"'
+
+\erroronpage{302}{exa 6-3-1}{FMi/CBe}{2005/09/02}{}
+The Euler constant must be typeset in roman type according
+to the ISO rules; $e$ is the charge of the electron.
+
+\erroronpage{304}{Z.2}{JMa}{2006/02/04}{2}
+Es muss "`in den Abschnitte\u{n} 6.2.1 bzw. 6.2.2"' hei\ss{}en.
+
+\erroronpage{304}{Z.-5}{JMa}{2006/02/04}{2}
+Es muss "`{}"uber ein zus"atzliche\u{s} obligatorisches Argument"'
+hei\ss{}en.
+
+\erroronpage{306}{Abs.\ -2, Z.\ 2}{RHe}{2006/08/07}{2}
+ Füge Komma ein: "\dots{} manchmal günstiger\u{,} nur die Legende zu
+drehen."'
+
+\erroronpage{315}{Abs.-3,Z.-3}{JMa}{2006/02/04}{2}
+Streiche den letzten Buchstaben von "`Bed"urfnisse\u{n}"'.
+
+\erroronpage{315}{Abs.\ -2, Z.\ 2}{RHe}{2006/08/07}{2}
+ Füge Komma ein: "\dots{} die es ermöglichen\u{,} Gleitobjekte \dots{}
+zu untergliedern."'
+
+\erroronpage{317}{6.5.1, Abs.\ 1, Z.\ 1}{RHe}{2006/08/07}{2}
+ Füge Komma ein: "\dots{} das Paket \textsf{caption}\u{,} um Legenden
+\dots{} anzupassen."'
+
+\erroronpage{318}{Bsp.6-5-2, Abb.2}{JMa}{2006/02/04}{2}
+Fehlendes Komma: "`Eine Legende, die mehrere"'
+
+\erroronpage{319}{\texttt{font}}{RHe}{2006/06/11}{2}
+ "`Diese Option legt die Fontcharakteristika \dots{} fest, sofern sie
+nicht \dots{} überschrieben \u{werden}."'
+
+\erroronpage{319}{Bsp.6-5-3, Tab.1}{JMa}{2006/02/04}{2}
+Fehlendes Komma: "`Eine Legende, die mehrere"'
+
+\erroronpage{321}{Option \texttt{position}}{FMi/JS}{2005/09/14}{2}
+ Beschreibe, dass der Schlüssel \texttt{bottom} die Voreinstellung ist.
+
+\erroronpage{322}{Abs.-1, Z.2}{JMa}{2006/02/04}{2}
+Streiche ein "`es"'.
+
+\erroronpage{327}{Abs.-1, Z.3 und Z.5}{JMa}{2006/02/04}{2}
+Ersetze: \textsl{typ} \> \textsl{klasse}
+
+
+
+\CHAPTER{Kapitel 7}
+
+\erroronpage{337}{Abs.\ 2, Z.\ 2}{RHe}{2006/06/07}{2}
+ Füge Komma ein: "`\dots{} Erscheinung, nachdem \dots {}"'
+
+\erroronpage{338}{Abs.\ 1, Z.\ 5}{RHe}{2006/06/07}{2}
+ Füge Komma ein: "`(\dots{} sehr ähnlich, soweit es \dots {})"'
+
+\erroronpage{340}{Fußnote 2}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`verwandelt, ist dabei"'
+
+\erroronpage{344}{Abs.3, Z.4}{JMa}{2006/02/27}{2}
+Schließende Klammer nach "`Abbildung 7.3"' fehlt.
+
+\erroronpage{348}{Abs.-1, Z.3-4}{JMa}{2006/02/27}{2}
+Trennfehler: Es muss Pa-ketnamen statt Pak-etnamen hei\ss{}en.
+
+\erroronpage{349}{}{FMi}{2006/02/27}{2}
+Änderung auf Seite 348 ändert Seitenumbruch.
+
+\erroronpage{352}{Abs.-1, Z.1}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`einnimmt, ist der"'
+
+% - no, would break the example spacing
+%\erroronpage{356}{Bsp.7-3-7}{JMa}{2006/02/27}{}
+%Ersetze: NFSS \> \textsf{NFSS}
+%
+
+\erroronpage{358}{Abs.5, Z.6+7}{JS}{2006/11/08}{2}
+ Ersetze:
+ "`Die \u{Computer Modern Typewriter und} Computer Modern Sans Fonts
+ verfügen nicht über \u{breite} sondern nur über breitfette"'
+ \>
+ "`Die Computer Modern Sans Fonts
+ verfügen nicht über \u{fette} sondern nur über breitfette"'
+
+\erroronpage{361}{Tab 7.4}{AFV}{2008/08/08}{s}
+Die Tabelle zeigt |\mathtt| als Sans Serif Typewriter Font. Dies ist
+normalerweise nicht der Fall -- fast jede \LaTeX{} Installation verwendet
+Computer Modern Typewriter.
+
+\erroronpage{362}{Abs.-1, Z.4}{JMa}{2006/02/27}{2}
+Streiche das mittlere s in Symbol\u{s}fonts.
+
+\erroronpage{364}{Abs.-2, Z.-1}{JMa}{2006/02/27}{2}
+Ersetze: hinzu-f"ugt \> hinzu-\u{ge}f"ugt
+
+\erroronpage{367}{Ab.-2, Z.-1}{MSch}{2006/01/06}{2}
+ Der Abstand vor dem Punkt am Satzende ("`T1-Kodierung ."') ist zu
+ entfernen.
+
+\erroronpage{369}{Abs.-3, Z.-3}{PEb}{2006/05/12}{2}
+Ersetze "`Oktette (von Zahlen)"' \> "`Oktette (acht Bits)"'
+
+\erroronpage{371}{Abs. \texttt{cp437de}}{JMa}{2006/02/27}{2}
+Falsche Anführungszeichen beim \ss
+
+\erroronpage{371}{Abs \texttt{utf8}}{JMa}{2006/02/27}{2}
+Das Leerzeichen vor dem Punkt ist zu entfernen.
+
+\erroronpage{394}{letzte Z.}{MSch}{2006/01/06}{2}
+ Der Abstand vor der schlie\ss enden Klammer "`(in Abschnitt 7.5.4\_)"'
+ ist zu entfernen.
+
+\erroronpage{399}{Abs.-3, Z.2+3}{FMi}{2006/06/14}{2}
+ Füge Bindestrich ein: "`AMS-Font"'
+
+\erroronpage{401}{Abs.-2, Z.4}{FMi}{2006/06/14}{2}
+ Füge Bindestrich ein: "`AMS-Mathematikfont"'
+
+\erroronpage{404}{Abs.-1, Z.1}{JMa}{2006/02/27}{2}
+Streiche das n aus Name\u{n}.
+
+\erroronpage{406}{Abs.3, Z.-3}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`werden, normalerweise ohnehin"'
+
+\erroronpage{407}{Bsp. 7-7-21, 7-7-22}{TNdz}{2006/01/20}{2}
+ Fehlendes Komma: "`\ldots ist ein Blindtext, an dem sich
+ verschiedene \ldots"´
+
+\erroronpage{416}{Kapitel 7.8.6, Z.8}{RSi}{2005/12/07}{2}
+ Leerzeichen nach dem kleinen Omega (|\textscomega|) fehlt.
+
+\erroronpage{420}{Abs.3, Z.-2}{JMa}{2006/02/27}{2}
+Ersetze: L"ander \> L"ander\u{n}
+
+\erroronpage{420}{Abs.4, Z.-1}{JMa}{2006/02/27}{2}
+Streiche eines der beiden "`auf"'.
+
+\erroronpage{422}{Abs.3, Z.2}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`zur Verf"ugung, um auf die"'
+
+\erroronpage{423}{Abs.1, Z.-2}{JMa}{2006/02/27}{2}
+Ersetze: zum \> zu
+
+\erroronpage{425}{Fu\ss note}{hv}{2008/10/30}{s}
+Der Befehl hei\ss t |\pscharpath| [das s fehlt] und |pst-char| existiert zwar
+noch, l\"adt aber gleich |pst-text|, dass die Funktionen von |pst-char|
+integriert hat.
+
+\erroronpage{428}{Tabelle 7.27, Z.~1}{MSch}{2005/12/31}{2}
+ Ersetze: \dq`Cork\dq'-Kodierung durch "`Cork"'-Kodierung
+
+\erroronpage{428}{Abs1., Z.4-5}{JMa}{2006/02/27}{2}
+Trennfehler: Es muss Pro-zent statt Proz-ent hei\ss{}en.
+
+
+\erroronpage{435}{Abs.-2, Z.-1}{JMa}{2006/02/27}{2}
+Fehlendes Komma vor "`werden"'
+
+\erroronpage{445}{Abs.-3, Z.1}{JMa}{2006/02/27}{2}
+Streiche das s aus Namen\u{s}
+
+\erroronpage{445}{Abs.-3, Z.2}{RHe}{2006/06/11}{2}
+ Füge Bindestrich ein: "`AMS-Font"'
+
+\erroronpage{454}{Abs.4, Z.-2}{JMa}{2006/02/27}{2}
+Ersetze: dass \> das
+
+\erroronpage{454}{Abs.5, Z.-3}{JMa}{2006/02/27}{2}
+Ersetze: dier \> die
+
+\erroronpage{456}{Abs.2, Z.2}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`Befehle, die"'
+
+\erroronpage{458}{Abs.2, Z.2}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`Zeichen, die in"'
+
+\erroronpage{458}{Abs.2, Z.2}{JMa}{2006/02/27}{2}
+Fehlendes Komma: "`solchen, die in"'
+
+\erroronpage{458}{Abs.4, Z.3}{JMa}{2006/02/27}{2}
+Fehlendes Komma vor "`wurden"'
+
+\erroronpage{464}{Abs.1, Z.3-4}{JMa}{2006/02/27}{2}
+Trennfehler: Es muss Ak-zentzeichen statt Akz-entzeichen hei\ss{}en.
+
+\erroronpage{468}{Tab.7.33}{FMi}{2006/05/12}{2}
+Die "`Tabellen"uberschrift"' ist nicht im \textsf{sf}-Format.
+
+
+\CHAPTER{Kapitel 8}
+
+\erroronpage{478}{Abs.\ 2, Z.\ 2}{FMi/RHe}{2008/09/19}{2}
+Ersetze: "`gültigen US-Praxis"' \> "`vorherrschenden Praxis"'
+
+\erroronpage{494}{8.2.12 Abs.\ 1, Z.\ 5}{RHe}{2008/09/19}{2}
+ Füge Kommata ein: "`Die Schwierigkeit\u{,} eine abgesetzte Formel
+korrekt zu gestalten\u{,} kann \dots{}"'
+
+\erroronpage{496}{Abs.2, Z.1/2}{JMa}{2006/03/05}{2}
+Trennfehler: Mark-up sieht deutlich besser aus als Mar-kup.
+
+\erroronpage{496}{Abs.\ 3 (nach Bsp. 8-2-28), Z.\ 2}{RHe}{2008/09/19}{2}
+ Füge Komma ein: "`\dots{} allerdings \emph{nur}\u{,} wenn sie \dots{}
+verschoben wurde."'
+
+\erroronpage{503}{8.4.4 Abs.\ 1, Z.\ 3}{RHe}{2008/09/19}{2}
+ Lösche Komma (Regel §~72.2 "`gleichrangige Wortgruppen oder Wörter in
+Aufzählungen (entweder -- oder)"'): "`\dots{} können entweder \dots{}
+positioniert werden\u{ } oder \dots{} rechts der Operatoren."'
+
+\erroronpage{504}{Abs.-2,Z.3}{JMa}{2006/03/05}{2}
+Kein Komma vor "`oder"' bei einer Aufz"ahlung.
+
+
+\erroronpage{507}{Abs.-2, Z.1}{JMa}{2006/03/05}{2}
+Streiche die beiden letzten Buchstaben von Paket\u{es}.
+
+\erroronpage{510}{Abs.-1, Z.1}{JMa}{2006/03/05}{2}
+Streiche einmal das Wort "`Tabelle"'.
+
+\erroronpage{512}{Z.1}{FMi}{2006/09/19}{2}
+Füge folgenden Satz an: "`Im folgenden Beispiel wird |\sqrtsign| direkt
+verwendet:"'
+
+\erroronpage{515}{Abs.-3, Z.2}{HjG}{2006/10/19}{2}
+Ersetze: "`Bei den \u{Hauptversionen} ($D'$,~$T'$~usw.{})"' \>
+ "`Bei den \u{Versionen mit Strich} ($D'$,~$T'$~usw.{})"'
+
+\erroronpage{516}{Abs.-3, Z.2}{JMa}{2006/03/05}{2}
+Streiche ein "`die"'.
+
+\erroronpage{518}{8.7.5 Abs.\ 3 , Z.\ 3}{RHe}{2008/09/19}{2}
+ Füge Komma ein: "`\dots{} und verhält sich somit\u{,} als wären beide
+Maße gleich null."'
+
+\erroronpage{535}{Abs. 1, Z. 5}{RHe}{2008/09/19}{2}
+Ersetze: "`\ldots{} existierenden, neu belebten Mediävalschriften."'
+ \> "\ldots{} existierenden Renaissance-Antiqua-Schriften."'
+
+\erroronpage{544}{Tab. 8-10/11}{FMi}{2006/08/09}{2}
+ Fehlende Symbole aus amssymb hinzugef"ugt: |\circledR|, |\yen|,
+ |\checkmark| und |\maltese|.
+
+\erroronpage{544}{Tab. 8.11}{LHe}{2008/02/08}{s}
+ |\dag| und |\ddag| sind |\mathord|s und nicht |\mathbin| wie in Tabelle
+ 8.13 behauptet.
+
+\erroronpage{546}{Tab. 8.13}{LHe}{2008/02/08}{s}
+ |\dag| und |\ddag| sind keine |\mathbin|s. Sie geh"oren deshalb nicht in
+ diese Tabelle und sind auch nicht (wie behauptet) Synonyme f"ur |\dagger|
+ und |\ddagger|.
+
+\erroronpage{552}{8.9.6 Abs.\ 1 , Z.\ 4}{RHe}{2008/09/19}{2}
+ Füge Komma ein: "`\dots{} nicht der Symbolklasse Punctuation\u{,}
+sondern Ordinary \dots{} zugeordnet sind."'
+
+\erroronpage{554}{Tab. 8-27}{DIs/FMi}{2006/08/09}{2}
+ Fehlende Symbole aus amssymb hinzugef"ugt: |\llcorner|, |\lrcorner|,
+ |\ulcorner| und |\urcorner|. Tabbellennotiz und Absatz unter der Tabelle
+ entsprechend ge"andert.
+
+
+\CHAPTER{Kapitel 9}
+
+\erroronpage{556}{Nummer 1, Item 1}{RHe}{2008/09/20}{2}
+Ersetze: "`Unterstützung für den Satz \ldots{}"'
+ \> "`Unterstützen des Setzens in` \ldots{}"'
+
+\erroronpage{560}{2. Snippet}{MSch/FMi}{2006/01/06}{2}
+ Der vertikale Abstand vor dem Codebeispiel ist im Verh"altnis zum
+ darauffolgenden Abstand erheblich zu gro\ss.
+
+ Und zudem die Seite eine Zeile zu lang.
+
+\erroronpage{560}{Z.\ -5}{RHe/FMi}{2006/09/21}{2}
+Ersetze: "`der Übersetzungen \u{für} Texte"' \>
+ "`der Übersetzungen generierter Texte"'
+
+
+\erroronpage{563}{Abs.1, Z.4}{JMa}{2006/03/14}{2}
+Die "offnende Klammer fehlt vor "`zum Beispiel"'.
+
+\erroronpage{565}{Abs.-2, Z.1}{JMa}{2006/03/14}{2}
+Streiche den letzten Buchstaben von sprachspezifische\u{n}.
+
+
+\erroronpage{567}{tab 9.3}{FMi/CBe}{2005/09/27}{}
+ I am surprised that in Russian there is no word for ``Glossary''.
+
+ Frank: It most certainly exits :-), but right now Babel doesn't
+ know about it---so there is nothing we can do about it at the
+ moment. Actually the same problem exists with Polish, although here
+ I got a translation ``s\l ownik termin{\'o}w'' which will eventually
+ find its way into Babel.
+
+ Tja, so gehts. Auch als das deutsche Buch gesetzt wurde, waren die Begriffe
+ auch noch nicht bekannt.
+
+\erroronpage{570}{Abs. -4("`Die Tilde"' , Z. 2}{RHe}{2006/09/20}{2}
+Füge Komma ein: "`\dots{} nicht für ein geschütztes Leerzeichen\u{,}
+sondern für andere \dots{}"'
+
+\erroronpage{570}{Abs. -4("`Die Tilde"' , Item 1}{RHe}{2006/09/20}{2}
+Füge Komma ein: "`\dots{} niedriger gesetzt werden\u{,} als dies
+normalerweise \dots{}"'
+
+% "`Gemäß"' wird mit dem Dativ verwendet:
+\erroronpage{571}{Abs. 2 ("`Doppelpunkt usw."' , Z. -2}{RHe}{2006/09/20}{2}
+Ersetze: "`Gemäß der \ldots{} Konventionen \ldots{}"'
+ \> "`Gemäß den \ldots{} Konventionen \ldots{}"'
+
+\erroronpage{579}{Abs.3, Z.3}{JMa}{2006/03/14}{2}
+Streiche die beiden letzten Buchstaben von ein\u{en}.
+
+\erroronpage{579}{Abs.2, Z.3}{RHe}{2006/06/11}{2}
+ Streiche Komma: "Wie der Befehl \verb"\nombre"\_ verfügt er \dots{}"'
+
+\erroronpage{590}{Abs.1, Z.5/6}{JMa}{2006/03/14}{2}
+Wenn "`rumakeindex"' getrennt werden muss, sieht "`rumake-index"' deutlich
+besser aus.
+
+\erroronpage{599}{Abs.2, Z.2}{JMa}{2006/03/14}{2}
+Zu der schließenden Klammer gibt es keine "offnende.
+
+
+
+\CHAPTER{Kapitel 10}
+
+\erroronpage{612}{lfd. Nr. 1, Z. 1}{RHe}{2006/10/16}{2}
+Ersetze: "`ASCII-Zeichnung"'
+ \> "`ASCII-Zeichnung\u{en}"'
+
+\erroronpage{628}{Abs.-3, Z.4}{JMa}{2006/03/23}{2}
+Der Bruch $\displaystyle\frac{\pi}{2}$ ragt in die Zeile darunter.
+
+\erroronpage{633}{Tab.\ 10.1}{FMi}{2006/10/21}{2}
+Es fehlt "`vtex"' als wichtiger Treiber; andererseits sind einige der
+aufgelisteten Treiber nur von historischer Bedeutung.
+
+\erroronpage{634}{Abs. 1, Z. 1}{RHe}{2006/10/16}{2}
+Füge Komma ein: "`\dots{} reelle Werte haben)\u{,} anstatt nach
+\dots{}"'
+
+\erroronpage{637}{Abs. 1, Z. 1}{RHe}{2006/10/16}{2}
+Füge Komma ein: "`Lässt \LaTeX{} nach \dots{} suchen\u{,} anstatt nach
+\dots{}"'
+
+\erroronpage{637}{viewport}{BMo/FMi}{2007/10/20}{s}
+Füge am Anfang ein: "` Definiert den Bereich der Graphik für den \LaTeX{} Platz reservieren
+ soll. Material außerhalb wird auch gedruckt (falls nicht \texttt{clip}
+ verwendet wird) und überdruckt dann gegebenenalls anderes Material auf der Seite."'
+
+\erroronpage{638}{}{FMi}{2007/10/20}{s}
+ Setzer-Kommentar:
+Seite mu\ss{} neu gesetzt werden, da sich der Seitenumbruch ge\"andert hat.
+
+\erroronpage{638}{Abs.3, Z.-1}{JMa}{2006/03/23}{2}
+Streiche den letzten Buchstaben von ausf"uhrliche\u{n}.
+
+\erroronpage{647}{Abs.4, Z.1}{JMa}{2006/03/23}{2}
+Streiche den letzten Buchstaben von vertikale\u{r}.
+
+\erroronpage{649}{Abs.2, Z.8}{FMi/HjG}{2006/10/22}{2}
+ Ersetze: "`\u{Dieser Punkt} ist in \ldots"' \>
+ "`\u{Dies} ist in \ldots"'
+
+\seriouserroronpage{651}{Beispielmatrix}{HjG}{2006/10/21}{2}
+ The first column shows incorrect output: instead of x=0mm it uses some
+ internal default.
+
+\erroronpage{651}{Abs. -1, Z. 1}{RHe}{2006/10/16}{2}
+Ersetze: "`Die \dots{} Funktion ähnelt dem des \textsf{rotating}-Paketes
+\dots{}"'
+ \>"`Die \dots{} Funktion ähnelt der des \textsf{rotating}-Paketes
+\dots{}"'
+
+\erroronpage{652}{editorial change}{FMi}{2006/10/21}{2}
+ Fix on previous page will change page break.
+
+
+\erroronpage{661}{Abs.-3, Z.3}{JMa}{2006/03/23}{2}
+Ersetze: "`verf"ugt"' \> "`verf"ugen"'
+
+\erroronpage{661}{para -2, l.1}{FMi}{2005/11/11}{2}
+ Leider ist Th\`anhs Name falsch geschrieben. Die korrekte Schreibweise
+ ist "`H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh"'.
+
+\erroronpage{672}{letzte Zeile}{BvdW}{2014/02/19}{}
+Ersetze ``wir'' durch ``wird''.
+
+
+\CHAPTER{Kapitel 11}
+
+\erroronpage{686}{Abs.-2, Z.-2}{JMa}{2006/03/23}{2}
+Streiche das Komma vor "`und"'.
+
+\erroronpage{691}{Abs.4, Z.2}{JMa}{2006/03/23}{2}
+Ersetze: "`eigene"' \> "`eigenen"'
+
+\erroronpage{697}{Abs. \texttt{-o} \textsl{ind}}{JMa}{2006/03/23}{2}
+Streiche die letzten Buchstaben von Verwendung\u{Index}.
+
+\erroronpage{703}{Z.2}{AFe}{2006/01/13}{2}
+ Extra Buchstabe: |\mark|\texttt{\u k}|both| \>
+ |\markboth|
+
+\erroronpage{704}{Abs.1, Z.1}{JMa}{2006/03/23}{2}
+Streiche den letzten Buchstaben von Teil\u{s}.
+
+
+\CHAPTER{Kapitel 12}
+
+\erroronpage{709}{Abs.3, Z.-5}{JMa}{2006/03/31}{2}
+Entferne das Komma vor l"asst.
+
+\erroronpage{711}{Abs.2, Z.3/4}{JMa}{2006/03/31}{2}
+Trennfehler: Schreibe Layout-richtlinien statt Layou-trichtlinien.
+
+\erroronpage{717}{Abs.3, Z.2}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`definieren"' ein.
+
+\erroronpage{719}{Abs.-1, Z.2}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`mit dessen Hilfe"' ein.
+
+\erroronpage{721}{Abs.-1, Z.2}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`die nicht unterst"utzt"' ein.
+
+\erroronpage{728}{Abs.2, Z.-1}{JMa}{2006/03/31}{2}
+Es hei\ss{}t \u{der} Apostroph, nicht "`das"'.
+
+\erroronpage{734}{Abs.-3, Z.-3}{JMa}{2006/03/31}{2}
+F"uge ein "offnende Klammer vor "`zum Beispiel"' ein.
+
+\erroronpage{735}{Abs.3, Z.1}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`wo im"' ein.
+
+\erroronpage{737}{Abs.-3, Z.-2}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`die normalerweise"' ein.
+
+\erroronpage{740}{Abs.-3, Z.2}{JMa}{2006/03/31}{2}
+Streiche den letzten Buchstaben von wurde\u{n}.
+
+\erroronpage{745}{Abs.-1, Z.-2}{JMa}{2006/03/31}{2}
+Ersetze: "`ein solche"' \> "`eine solche"'
+
+\erroronpage{746}{Abs.-4, Z.1}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`wo im"' ein.
+
+\erroronpage{752}{Abs.1, Z.-2}{JMa}{2006/03/31}{2}
+Zur schlie\ss{}enden Klammer gibt es keine "offnende.
+
+\erroronpage{752}{Abs.3, Z.-2}{JMa}{2006/03/31}{2}
+Streiche die letzten drei Buchstaben von "`aufauf"'.
+
+\erroronpage{755}{Abs.-1, Z.2}{JMa}{2006/03/31}{2}
+Ersetze: "`eine vollst"andigen"' \> "`einen vollst"andigen"'
+
+\erroronpage{763}{Abs.3, Z.6}{JMa}{2006/03/31}{2}
+Streiche das Komma vor "`und"'.
+
+\erroronpage{767}{Abs.-3, Z.1}{JMa}{2006/03/31}{2}
+Ersetze: "`L"adt"' \> "`l"adt"'
+
+\erroronpage{772}{Tab.12.2}{JMa}{2006/03/31}{2}
+F"uge ein Komma vor "`die eine bestimmte Wahl"' ein.
+
+\erroronpage{777}{Abs.3, Z.-1}{JMa}{2006/03/31}{2}
+Füge einen Punkt nach "`zeigt"' ein.
+
+\erroronpage{781}{Abs.1, Z.1}{JMa}{2006/03/31}{2}
+Ersetze: "`Diese"' \> "`Dieses"'
+
+
+\CHAPTER{Kapitel 13}
+
+\erroronpage{791}{Tab.13.1, \texttt{inbook}}{JMa}{2006/04/11}{2}
+Streiche einmal das Wort "'oder"'.
+
+\erroronpage{792}{Tab13.2, \texttt{crossref}}{JMa}{2006/04/11}{2}
+F"uge ein Komma vor "`auf den"' ein.
+
+\erroronpage{795/796}{mehrere Stellen}{FMi/DAl}{2005/09/12}{2}
+ Der Name "`Miguel Lopez Fernandez"' sollte durch "`Miguel Parra Benavides"'
+ ersetzt werden, da der bisher verwendete eigentlich Akzente besitzen würde,
+ die an der Stelle im Buch noch nicht diskutiert wurden.
+
+\erroronpage{796}{Abs.-5, Z.-1}{JMa}{2006/04/11}{2}
+F"uge einen Punkt nach "`erscheinen"' ein.
+
+\erroronpage{799}{Abs.-2, Z.3}{JMa}{2006/04/11}{2}
+Streiche das Komma vor "'und"'.
+
+\erroronpage{802}{Abs.-1, Z.-2}{JMa}{2006/04/11}{2}
+Streiche das Komma vor "'und"'.
+
+\erroronpage{819}{Abs.-1, Z.2}{JMa}{2006/04/11}{2}
+Ersetze: BibTexMng \> \textsf{BibTexMng}
+
+\erroronpage{820}{Abs.2, Z.2}{JMa}{2006/04/11}{2}
+Streiche das Komma nach \texttt{size}.
+
+\erroronpage{821}{Tab.13.4, Z.-4}{JMa}{2006/04/11}{2}
+F"uge ein Leerzeichen nach "`Fachzeitschriften"' ein. Ferner ist die
+"'Tabellen"uberschrift"' nicht im \textsf{sf}-Format.
+
+\erroronpage{828}{Tab. 13.5, Z. 1-2}{MSch}{2006/01/06}{2}
+ Donald Ervin Knuths Name ist falsch geschrieben. Ersetze: "`Erwin"' \>
+ "`Ervin"'
+
+\erroronpage{830}{Tab.13.6}{JMa}{2006/04/11}{2}
+Ersetze: Italienische \> Italienisch
+
+\erroronpage{832}{Abs.1, Z.2}{JMa}{2006/04/11}{2}
+Ersetze: Abschnitte \> Abschnitten
+
+\erroronpage{839}{Tab.13.8, \texttt{substring}}{JMa}{2006/04/11}{2}
+F"uge ein Leerzeichen vor "`hat"' ein.
+
+\erroronpage{842}{Abs.1, Z.-2}{JMa}{2006/04/11}{2}
+Entweder fehlt hier eine "offnende Klammer -- oder die schlie\ss{}ende ist
+zu viel.
+
+
+\CHAPTER{Kapitel 14}
+
+\erroronpage{853}{Tab.14.1}{FMi}{2006/05/12}{2}
+Die "`Tabellen"uberschrift"' ist nicht im \textsf{sf}-Format.
+
+\erroronpage{858}{Abs.4, Z.1}{JMa}{2006/05/03}{2}
+F"uge ein "`zu"' zwischen "`Kommentare"' und "`entfernen"' ein.
+
+\erroronpage{865}{1. Snippet, Z. 2}{MSch}{2006/01/06}{2}
+ Ersetze: |text/latex/base| \> |tex/latex/base|
+
+\erroronpage{867}{Abs.5}{FMi}{2007/11/13}{s}
+ Explain that |\cmd| can't be used with conditionals, e.g., those produced
+ with |\newif| .
+
+\erroronpage{865}{l.-7}{FMi/HjG}{2005/09/02}{2}
+ Underline, as it is command line input.
+
+\erroronpage{871}{Abs.2, Z.2}{JMa}{2006/05/03}{2}
+Ersetze entg"ultig \> endg"ultig
+
+\erroronpage{870-872}{}{FMi}{2007/01/08}{}
+ Setzer-Kommentar:
+ Beispiele m"ussen neu kompiliert werden und
+ Seiten m"ussen immer dann neu gedruckt werden, wenn etwas am Kapitel ge"andert
+ wird --- genauer auf \emph{einer} der drei Seiten (da sich das CVS-Tag in
+ den Beispielen und im "`code"' auf
+ Seite 871/Mitte "andert).
+
+
+\CHAPTER{Anhang A}
+
+
+\erroronpage{880}{Abs.1, Z.6}{VVo}{2008/09/02}{s}
+Ersetze: "`so wird eine Fehlermeldung ausgegeben."'
+\> "`so wird eine Warnung ausgegeben."'
+
+
+\erroronpage{882}{Abs.1, Z.2}{FMi}{2006/05/12}{2}
+Ersetze: Abschnitte \> Abschnitten
+
+\erroronpage{888}{fig A.1, l.4}{FMi/JAn}{2005/09/09}{2}
+ ``Did\^ot'' \> ``Didot'' und entferne Komma nach "`Zoll"'
+
+\erroronpage{891}{Tab.A.3, Z.1}{JMa}{2006/05/03}{2}
+F"uge ein Komma vor "`der eine feste oder"' ein.
+
+\erroronpage{899}{A.2.3 Abs.\ 2, Z.\ 5}{RHe}{2006/06/10}{2}
+ Füge Komma ein: "`Diese Struts sind sehr nützlich, um die Höhe oder
+\dots{}"'
+
+\erroronpage{903}{Abs.-2, Z.1}{FMi}{2006/06/14}{2}
+Füge Wort ein: "`nach der \u{letzten} Klammer \verb=}= und\ldots"'
+
+\erroronpage{906}{Abs.1, Z.1}{JMa}{2006/05/03}{2}
+Ersetze \textsl{text} \> \textsl{test}
+
+\erroronpage{909}{Abs.2, Z.1}{JMa}{2006/05/03}{2}
+F"uge ein Komma vor "`ob"' ein.
+
+\erroronpage{918}{Abs.-1, Z.3}{JMa}{2006/05/03}{2}
+F"uge ein Komma vor "`wird"' ein.
+
+
+\erroronpage{918}{Abs.-1, Z.4}{FMi}{2006/09/23}{2}
+Ersetze: "`und alle Prozesse angehalten. "'
+\> "`und \u{die Verarbeitung} angehalten."'
+
+
+
+\CHAPTER{Anhang B}
+
+\erroronpage{925}{Abs.-2, Z.-3}{JMa}{2006/05/28}{2}
+F"uge ein Komma vor "`\textit{geben Sie}"' ein.
+
+\erroronpage{960}{Abs.-2, Z.-1}{JMa}{2006/05/28}{2}
+Der Punkt am Ende des Absatzes fehlt.
+
+\erroronpage{969}{Abs.-3, Z.2}{JMa}{2006/05/28}{2}
+Ersetze das \> dass
+
+\erroronpage{971}{Abs.1, Z.1}{JMa}{2006/05/28}{2}
+Ersetze einen \> ein
+
+\erroronpage{973}{Abs.1, Z.2}{JMa}{2006/05/28}{2}
+Ersetze Seite 973 \> dieser Seite
+
+\erroronpage{973}{Abs.5, Z.1}{JMa}{2006/05/28}{2}
+Ersetze \TeX{}war \> \TeX\ war
+
+\erroronpage{977}{Z.3}{JMa}{2006/05/28}{2}
+Entferne das Komma vor "`\textit{wurde}"'.
+
+\erroronpage{977}{Z.5}{JMa}{2006/05/28}{2}
+Entferne das Komma vor "`als"'.
+
+\erroronpage{980}{Abs.1, Z.2}{JMa}{2006/05/28}{2}
+F"uge ein Komma nach "`wird"' ein.
+
+\erroronpage{987}{Abs.-2, Z.5}{JMa}{2006/05/28}{2}
+F"uge ein Komma vor "`wobei"' ein.
+
+\erroronpage{988}{Abs.-1, Z.-3}{JMa}{2006/05/28}{2}
+F"uge ein Komma vor "`gilt"' ein.
+
+
+\CHAPTER{Anhang C}
+
+\erroronpage{998}{Abs.2, Z.5}{FMi}{2006/09/12}{2}
+Ersetze: Abbildung C.\u{2} \> Abbildung C.\u{1}
+
+\erroronpage{998}{Abs.-1, Z.4}{JMa}{2006/05/28}{2}
+Streiche das Komma vor "`ausgew"ahlt"'.
+
+\erroronpage{1001}{Bsp.1, Z.1}{SNe}{2009/05/10}{s}
+Ersetze "\texttt{wgetftp}"' \> "`\texttt{wget ftp}"'
+
+\erroronpage{1003}{Abs.-1, Z.5/6}{JMa}{2006/05/28}{2}
+Streiche eines der beiden Worte "`eingeblendet"'.
+
+\erroronpage{1004}{\textbf{esc:}}{JMa}{2006/05/28}{2}
+Ersetze Kalanien \> Katalonien
+
+\erroronpage{1005}{\textbf{fra:}}{JMa}{2006/05/28}{2}
+Ersetze Orleans \> Orl\'{e}ans
+
+
+\CHAPTER{Bibliographie}
+
+\erroronpage{1017}{[57]}{RHe}{2006/06/07}{2}
+Ersetzte Erl\"auterung durch: "`Die
+\u{englische} erste Ausgabe dieses Buches."'
+
+\erroronpage{1017/1018}{[58]}{FMi}{2009/08/01}{s}
+Eintrag sollte auf die zweite (aktuelle) Ausgabe verweisen.
+(Ab dem korrigierten Nachdruck von 2010 befindet sich [58] ganz auf seite 1018.)
+
+\erroronpage{1019}{[67], Z.-2}{JMa}{2006/05/28}{2}
+Schreibe "`Sprachengetrennt"' getrennt.
+
+\erroronpage{1019}{[71]}{RHe}{2006/06/07}{2}
+ streiche "`international"; ISO ist per se international
+
+\erroronpage{1020}{[74]}{FMi}{2006/09/18}{2}
+ Füge ``Lars Hellstr\"om'' als Autor hinzu. Datum ``Dezember 2004''
+
+\erroronpage{1025}{[116, Z.\ 2]}{RHe}{2006/06/07}{2}
+ Vergleich mit "`(eben)so \dots{} setzen kann, wie sonst \dots{}"'
+erfordert Komma
+
+\erroronpage{1026}{[127], Z.1}{JMa}{2006/05/28}{2}
+F"uge ein Komma vor "`welche"' ein.
+
+\erroronpage{1026}{[128]}{FMi}{2005/11/07}{2}
+ Der Titel lautet: ``E-\TeX: Guidelines for Future \TeX{} Extensions''.
+
+\erroronpage{1028}{[140], Z.2}{JMa}{2006/05/28}{2}
+F"uge ein Komma vor "`die auf"' ein.
+
+\erroronpage{1028}{[140], Z.-5}{JMa}{2006/05/28}{2}
+Ersetze Tinagh \> Tifinagh
+
+
+\erroronpage{1030}{[162]-[163]}{FMi/RKo}{2005/11/11}{2}
+
+ Leider ist Th\`anhs Name falsch geschrieben (Akzente) . Die
+ korrekte Schreibweise ist "`H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}}
+ Th\`anh"'.
+
+\erroronpage{1030}{[159]-[163]}{FMi/RKo}{2005/11/11}{}
+
+ "`Han"' ist der Familienname, müsste also korrekterweise unter H
+ einsortiert werden (letzteres lässt sich aber nur schwer korrigieren, da
+ wegen der gänderten Nummerierung dann nahezu das gesamte Buch neu gesetzt
+ werden müsste).
+
+
+\CHAPTER{Index}
+
+
+\erroronpage{1033}{2. Absatz, Z.4}{JMa}{2006/01/05}{2}
+Die Abkürzung NFSS sollte \textsf{NFSS} geschrieben werden.
+
+
+\erroronpage{1040}{rechte Spalte, Zeile 8}{BvdW}{2014/02/19}{}
+\verb=\AskOption= (ohne das ``s'' am Ende, siehe Errata Seite 2 zu Kapitel 2)
+
+
+
+\iffalse Nicht wirklich, aber auch nicht schoen so ... mal sehen
+
+\erroronpage{1068}{"`Gleichheits- und Relationszeichen"'}{MSch}{2005/12/31}{}
+ Die beiden Einträge zu Gleichheits- und Relationszeichen sind durch
+ die Verwendung unterschiedlicher Trennzeichen falsch sortiert;
+ vertausche "`negierte, mathematische Symbole"' und "`mathematische
+ Symbole"'.
+\fi
+
+
+
+
+
+\CHAPTER{Biographien}
+
+\erroronpage{1129}{Abs. 2, Z.3}{SZi}{2005/11/24}{2}
+ l"osche g aus Dok\u{g}umente
+
+\end{erratalist}
+
+
+\setcounter{collectmore}{3}
+
+\begin{multicols}{3}[Dank an alle die Fehler oder Auslassungen
+ gemeldet haben. Gelistet sind jeweils die Personen die ein Problem
+ zuerst entdeckt haben. Einige Fehler wurden im englischen Original
+ gefunden, weshalb auch ein paar Namen ohne Fehlerzahl auftauchen.]
+\contributor{AFe}{Alfonso Fernandez-Vazquez}
+\contributor{BvdW}{Berend G. van der Wall}
+\contributor{CBe}{Claudio Beccari}
+\contributor{ChB}{Christof B\"ockler}
+\contributor{DAl}{Daniel Alonso i Alemany}
+\contributor{DIs}{Daniel Isaacson}
+\contributor{ESt}{Eckhard Stein}
+\contributor{FMi}{Frank Mittelbach}
+\contributor{HjG}{Hubert G\"a\ss lein}
+\contributor{JAn}{Jacques Andr\'e}
+\contributor{JBez}{Javier Bezos}
+\contributor{JMa}{Jens Mandavid}
+\contributor{JS}{Joachim Schrod}
+\contributor{LHe}{Lars Hellstr\"om}
+\contributor{MHo}{Morten H\o gholm}
+\contributor{MLi}{Martin Liebmann}
+\contributor{MSch}{Michael Schutte}
+\contributor{PEb}{Paul Ebermann}
+\contributor{RHe}{Ralf Heckmann}
+\contributor{RKo}{Reinhard Kotucha}
+\contributor{RSi}{Roman Sigg}
+\contributor{SNe}{Stefan Neuhaus}
+\contributor{SZi}{Stefan Ziesemer}
+\contributor{TNdz}{Timo Niedenzu}
+\contributor{VVo}{Vladimir Volovich}
+\contributor{YiL}{Yiannis Lazarides}
+\end{multicols}
+
+
+Sollten Sie einen weiteren Fehler entdecken, melden Sie diesen bitte an
+\begin{quote}\ttfamily
+ frank.mittelbach@latex-project.org
+\end{quote}
+wenn möglich gleich in der für diese Datei benötigte Form, d.h.
+\begin{flushleft}
+|\erroronpage{|\textit{Seitennummr}|}{|\textit{Zeilenidentifikation}|}{|%
+ \textit{Initialen}|}{|\textit{JJJJ/MM/DD}|}{}| \\
+ \hspace*{2em}\textit{Beschreibung des Fehlers}
+\end{flushleft}
+Hier ist ein Beispiel:
+\begin{verbatim}
+\erroronpage{5}{Abs.3, Z.1}{MOs}{2005/09/01}{}
+ Ersetze: "`LaTeX"' \> "`\LaTeX{}"'
+\end{verbatim}
+Die Verwendung von Babelkommandos (etwa |"`|) ist möglich, aber Umlaute
+sollten möglichst nicht als 8-bit Zeichen eingegeben werden (also besser |"a|
+oder |\"a|) um Probleme mit der Kodierung zu verhindern.
+
+\end{document}
diff --git a/macros/latex-dev/base/lb2.pdf b/macros/latex-dev/base/lb2.pdf
new file mode 100644
index 0000000000..d6e8b8771e
--- /dev/null
+++ b/macros/latex-dev/base/lb2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/legal.txt b/macros/latex-dev/base/legal.txt
new file mode 100644
index 0000000000..a82b14877d
--- /dev/null
+++ b/macros/latex-dev/base/legal.txt
@@ -0,0 +1,48 @@
+ LaTeX Copyright, Warranty and Distribution Restrictions
+
+ 31 March 2016
+
+
+COPYRIGHT
+=========
+
+This distribution is
+Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
+ 2006 2007 2008 2009 2011 2014 2015 2016
+The LaTeX3 Project and the individual authors:
+
+ Leslie Lamport
+ Johannes Braams
+ David Carlisle
+ Morten Hoegholm
+ Alan Jeffrey
+ Frank Mittelbach
+ Chris Rowley
+ Rainer Schoepf
+
+License
+=======
+
+LaTeX is free software that can be redistributed and/or modified
+under the terms of the LaTeX Project Public License as specified
+in the file lppl.txt.
+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.
+
+The use of LaTeX is unrestricted.
+
+This Work has the LPPL maintenance status "maintained".
+
+The list of all files belonging to the LaTeX base distribution
+is given in the file `manifest.txt'.
+
+Files generated by means of unpacking the distribution (using, for
+example, the docstrip program) may be distributed at the distributor's
+discretion. However if they are distributed then a copy of the base
+system must be distributed together with them.
+
+The list of all derived (unpacked) files belonging to the distribution
+and covered by LPPL is given in the file unpacked.txt.
+
diff --git a/macros/latex-dev/base/letter.dtx b/macros/latex-dev/base/letter.dtx
new file mode 100644
index 0000000000..d3d3fa4e6a
--- /dev/null
+++ b/macros/latex-dev/base/letter.dtx
@@ -0,0 +1,1903 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+%
+% \iffalse
+% \section{Identification}
+%
+%
+% This document class can only be used with \LaTeXe, so we make
+% sure that an appropriate message is displayed when another \TeX{}
+% format is used.
+% \begin{macrocode}
+%<+letter>\NeedsTeXFormat{LaTeX2e}[1996/06/01]
+% \end{macrocode}
+%
+% Announce the Class name and its version.
+% \begin{macrocode}
+%<+letter>\ProvidesClass{letter}
+%<*driver>
+ \ProvidesFile{letter.drv}
+%</driver>
+ [2014/09/29 v1.2z
+%<+letter> Standard LaTeX document class]
+% \end{macrocode}
+%
+% \section{The documentation driver file}
+%
+% We have our own document class to format the \LaTeXe{}
+% documentation.
+% \fi
+% \changes{v1.0}{1993/12/07}{Use class ltxdoc document class}
+% \iffalse
+% \begin{macrocode}
+%<*driver>
+]
+\documentclass{ltxdoc}
+% \end{macrocode}
+%
+% We don't want everything to appear in the index.
+% \begin{macrocode}
+\DoNotIndex{\@Alph,\@alph,\@arabic,\@badmath}
+\DoNotIndex{\@centercr}
+\DoNotIndex{\@empty,\@ignoretrue}
+\DoNotIndex{\@ixpt}
+\DoNotIndex{\@M,\@minus,\@ne,\@plus}
+\DoNotIndex{\\,\addtolength}
+\DoNotIndex{\advance}
+\DoNotIndex{\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
+\DoNotIndex{\bullet}
+\DoNotIndex{\cdot,\cr,\day,\DeclareOption}
+\DoNotIndex{\def,\DocInput,\documentclass}
+\DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist}
+\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
+\DoNotIndex{\endlist,\everycr,\ExecuteOptions}
+\DoNotIndex{\filedate,\filename,\fileversion}
+\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
+\DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi}
+\DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input}
+\DoNotIndex{\kern,\leavevmode,\let,\leftmark}
+\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark}
+\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
+\DoNotIndex{\NeedsTeXFormat,\newdimen}
+\DoNotIndex{\newpage,\nobreak,\noindent,\number}
+\DoNotIndex{\p@}
+\DoNotIndex{\pagestyle,\par}
+\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
+\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
+\DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
+\DoNotIndex{\rightmargin,\rlap,\rmfamily}
+\DoNotIndex{\setbox,\setcounter,\setlength}
+\DoNotIndex{\skip,\slshape,\space}
+\DoNotIndex{\trivlist,\typeout,\tw@}
+\DoNotIndex{\vskip,\vspace,\year,\z@}
+%
+\CodelineNumbered
+\CodelineIndex
+\EnableCrossrefs
+\RecordChanges
+% \end{macrocode}
+% We use so many \file{docstrip} modules that we set the
+% \texttt{StandardModuleDepth} counter to 1.
+% \begin{macrocode}
+\setcounter{StandardModuleDepth}{1}
+% \end{macrocode}
+% The following command retrieves the date and version information
+% from the file.
+% \begin{macrocode}
+\GetFileInfo{letter.drv}
+% \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}}
+% \end{macrocode}
+% We also want the full details.
+% \begin{macrocode}
+\begin{document}
+\DocInput{letter.dtx}
+\PrintIndex
+% ^^A\PrintChanges
+\end{document}
+%</driver>
+% \end{macrocode}
+% \fi
+%
+% \changes{v1.1}{1993/12/18}{Changes to make it work with
+% compatibility mode.}
+% \changes{v1.1a}{1993/12/19}{Removed float parms}
+%
+% \changes{v1.1c}{1994/01/17}{Moved definition of \cs{@textop} to
+% initialization section, to counteract setting of \cs{@texttop} in
+% \cs{raggedbottom}.}
+%
+% \changes{v1.1d}{1994/01/20}{Corrected margins: Now computed from
+% \cs{paperwidth} and \cs{textwidth}, so that the text is
+% horizontally centered.}
+% \changes{v1.1e}{1994/02/03}{Corrected checksum}
+%
+% \changes{v1.2a}{1994/02/12}{Removed onecolumn and twocolumn options.}
+% \changes{v1.2a}{1994/02/12}{Changed label producing commands in .aux
+% file.}
+%
+% \changes{v1.2b}{1994/02/28}{Moved driver further up.}
+%
+% \changes{v1.2c}{1994/03/08}{Always write .aux file.}
+% \changes{v1.2f}{1994/04/29}{Use LaTeX instead of LaTeX2e in messages}
+% \changes{v1.2f}{1994/04/29}{Removed \cs{typeout} message}
+% \changes{v1.2g}{1994/05/01}{Removed the use of \cs{fileversion}
+% c.s.}
+% \changes{v1.2j}{1994/06/01}{Corrected driver code.}
+% \changes{v1.2k}{1994/06/17}{Various documentation enhancements}
+% \changes{v1.2p}{1994/12/11}{Use \cs{newcommand*} to define
+% user-level commands that take an argument}
+% \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}
+%
+% \iffalse
+% Copyright (C) 1994 LaTeX3 project, Frank Mittelbach
+% and Rainer Sch\"opf, all rights reserved.
+% \fi
+%
+% \author{Leslie Lamport and Frank Mittelbach and Rainer Sch\"opf}
+%
+% \title{Standard Letter Document Class for \LaTeX{} version 2e}
+%
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+% \tableofcontents
+%
+% \StopEventually
+%
+%
+% \section{Initial Code}
+%
+% In this part we define a few commands that are used later on.
+%
+% \begin{macro}{\@ptsize}
+% This control sequence is used to store the second digit of the
+% pointsize we are typesetting in. So, normally, it's value is one
+% of 0, 1 or 2.
+% \begin{macrocode}
+%<*letter>
+\newcommand\@ptsize{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Setting Paper Sizes}
+%
+% The variables |\paperwidth| and |\paperheight| should reflect the
+% physical paper size after trimming. For desk printer output this
+% is usually the real paper size since there is no post-processing.
+% \changes{v1.0a}{1993/12/14}{Corrected typo, A4 is not 279 mm high}
+% \begin{macrocode}
+\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}
+%
+% \changes{v1.2o}{1994/08/26}{Added the option \textsf{landscape}}
+% 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}}
+% \end{macrocode}
+%
+% \subsection{Choosing the type size}
+%
+% The type size options are handled by defining |\@ptsize| to
+% contain the last digit of the size in question and branching on
+% |\ifcase| statements. This is done for historical reasons to stay
+% compatible with other packages that use the |\@ptsize| variable
+% to select special actions. It makes the declarations of size
+% options less than 10pt difficult, although one can probably use
+% \texttt{9} and \texttt{8} assuming that a class wont define both
+% \Lopt{8pt} and \Lopt{18pt} options.
+%
+% \begin{macrocode}
+\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
+\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
+% \end{macrocode}
+%
+%
+% \subsection{Two-side or one-side printing}
+%
+% Two-sided printing was not supported in the \LaTeX~2.09 version
+% of this document class.
+% \changes{v1.2e}{1994/04/28}{Added oneside option and twoside option
+% in native mode}
+% \begin{macrocode}
+\if@compatibility
+ \DeclareOption{twoside}{\@latexerr{No `twoside' layout for letters}%
+ \@eha}
+\else
+ \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
+\fi
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+% \end{macrocode}
+%
+% \subsection{Draft option}
+%
+% If the user requests \Lopt{draft} we show any overfull boxes.
+% We could probably add some more interesting stuff to this option.
+% \begin{macrocode}
+\DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
+% \end{macrocode}
+%
+%
+% \subsection{Equation numbering on the left}
+%
+% The option \Lopt{leqno} can be used to get the equation numbers
+% on the left side of the equation.
+% \changes{v1.1c}{1994/01/17}{Option leqno now read from
+% \file{leqno.clo}.}
+% \begin{macrocode}
+\DeclareOption{leqno}{\input{leqno.clo}}
+% \end{macrocode}
+%
+% \subsection{Flush left displays}
+%
+% The option \Lopt{fleqn} redefines the displayed math environments
+% in such a way that they come out flush left, with an indentation
+% of |\mathindent| from the prevailing left margin.
+% \changes{v1.1}{1993/12/18}{Corrected typo in \cs{renewcommand},
+% doubled hash marks.}
+% \changes{v1.1c}{1994/01/17}{Option fleqn now read from
+% \file{fleqn.clo}.}
+% \begin{macrocode}
+\DeclareOption{fleqn}{\input{fleqn.clo}}
+% \end{macrocode}
+%
+%
+% \section{Executing Options}
+%
+% Here we execute the default options to initialize certain
+% variables.
+% \changes{v1.2e}{1994/04/28}{Added execution of `oneside' option}
+% \begin{macrocode}
+\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final}
+% \end{macrocode}
+%
+% The |\ProcessOptions| command causes the execution of the code
+% for every option \Lopt{foo} which is declared and for which the
+% user typed the \Lopt{foo} option in his |\documentclass| command.
+% For every option \Lopt{bar} he typed, which is not declared, the
+% option is assumed to be a global option. All options will be
+% passed as document options to any |\usepackage| command in the
+% document preamble.
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+% Now that all the options have been executed we can load the
+% chosen class option file that contains all size dependent code.
+% \begin{macrocode}
+\input{size1\@ptsize.clo}
+% \end{macrocode}
+%
+%
+% \section{Loading Packages}
+%
+% The standard class files do not load additional packages.
+%
+%
+% \section{Document Layout}
+% \label{sec:maincode}
+%
+% In this section we are finally dealing with the nasty typographical
+% details.
+%
+% \subsection{Paragraphing}
+%
+% \begin{macro}{\lineskip}
+% \begin{macro}{\normallineskip}
+% These parameters control \TeX's behavior when two lines tend to
+% come too close together.
+% \begin{macrocode}
+\setlength\lineskip{1\p@}
+\setlength\normallineskip{1\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\baselinestretch}
+% This is used as a multiplier for |\baselineskip|. The default is
+% to {\em not\/} stretch the baselines.
+% \begin{macrocode}
+\renewcommand\baselinestretch{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parskip}
+% \begin{macro}{\parindent}
+% |\parskip| gives extra vertical space between paragraphs and
+% |\parindent| is the width of the paragraph indentation.
+% Letters are typeset without paragraph indentation.
+% \begin{macrocode}
+\setlength\parskip{0.7em}
+\setlength\parindent{0\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@lowpenalty}
+% \begin{macro}{\@medpenalty}
+% \begin{macro}{\@highpenalty}
+% The commands |\nopagebreak| and |\nolinebreak| put in penalties
+% to discourage these breaks at the point they are put in.
+% They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
+% dependent on their argument.
+% \begin{macrocode}
+\@lowpenalty 51
+\@medpenalty 151
+\@highpenalty 301
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\clubpenalty}
+% \begin{macro}{\widowpenalty}
+% These penalties are used to discourage club and widow lines.
+% Because we use their default values we only show them here,
+% commented out.
+% \begin{macrocode}
+% \clubpenalty 150
+% \widowpenalty 150
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\displaywidowpenalty}
+% \begin{macro}{\predisplaypenalty}
+% \begin{macro}{\postdisplaypenalty}
+% Discourage (but not so much) widows in front of a math display
+% and forbid breaking directly in front of a display. Allow break
+% after a display without a penalty. Again the default values are
+% used, therefore we only show them here.
+% \begin{macrocode}
+% \displaywidowpenalty 50
+% \predisplaypenalty 10000
+% \postdisplaypenalty 0
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\interlinepenalty}
+% Allow the breaking of a page in the middle of a paragraph.
+% \begin{macrocode}
+% \interlinepenalty 0
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\brokenpenalty}
+% We allow the breaking of a page after a hyphenated line.
+% \begin{macrocode}
+% \brokenpenalty 0
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Page Layout}
+%
+% All margin dimensions are measured from a point one inch from the
+% top and lefthand side of the page.
+%
+% \subsubsection{Vertical spacing}
+%
+% \begin{macro}{\headheight}
+% \begin{macro}{\headsep}
+% The |\headheight| is the height of the box that will contain the
+% running head. The |\headsep| is the distance between the bottom
+% of the running head and the top of the text. |\topskip| is the
+% |\baselineskip| for the first line on a page, its value depends
+% on the size option that was specified. Therefore it is
+% initialized in one of the \file{size1x.clo} files.
+% \begin{macrocode}
+\setlength\headheight{12\p@}
+\setlength\headsep {45\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\footskip}
+% The distance from the baseline of the box which contains the
+% running footer to the baseline of last line of text is controlled
+% by the |\footskip|.
+% Bottom of page:
+% \begin{macrocode}
+\setlength\footskip{25\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.2n}{1994/07/13}{Setting of \cs{maxdepth} and
+% \cs{@maxdepth} already happens in the size.. files, removed
+% here}
+%
+% \subsubsection{The dimension of text}
+%
+% \begin{macro}{\textwidth}
+% When we are in compatibility mode we have to make sure that the
+% dimensions of the printed area are not different from what the
+% user was used to see.
+%
+% \changes{v1.2n}{1994/07/13}{Setting \cs{textwidth} to a fixed value
+% should only happen in compatibility mode}
+% \begin{macrocode}
+\if@compatibility
+ \setlength\textwidth{365\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textheight}
+% Now that we have computed the width of the text, we have to take
+% care of the height. The |\textheight| is the height of text
+% (including footnotes and figures, excluding running head and
+% foot).
+% \changes{v1.2n}{1994/07/13}{Setting \cs{textheight} to a fixed value
+% should only happen in compatibility mode}
+% \begin{macrocode}
+ \setlength\textheight{505\p@}
+\fi
+% \end{macrocode}
+% In native mode we use the dimensions as they were computed by one
+% of the \Lopt{xxpt} options, together with one of the
+% \Lopt{..paper} options.
+% \end{macro}
+%
+% \subsubsection{Margins}
+%
+% \begin{macro}{\oddsidemargin}
+% \begin{macro}{\evensidemargin}
+% \begin{macro}{\marginparwidth}
+% \changes{v1.1d}{1994/01/20}{Corrected margins: Now computed from
+% \cs{paperwidth} and \cs{textwidth}.} The values of
+% |\oddsidemargin| and |\evensidemargin| are computed from those of
+% |\paperwidth| and |\textwidth|.
+% \changes{v1.2n}{1994/07/13}{Added fixed values for these parameters
+% in compatibility mode}
+% \begin{macrocode}
+\if@compatibility
+ \setlength\oddsidemargin{53pt}
+ \setlength\evensidemargin{53pt}
+ \setlength\marginparwidth{90pt}
+\else
+ \setlength\@tempdima{\paperwidth}
+ \addtolength\@tempdima{-2in}
+ \addtolength\@tempdima{-\textwidth}
+ \setlength\oddsidemargin {.5\@tempdima}
+ \setlength\evensidemargin {\oddsidemargin}
+ \setlength\marginparwidth {90\p@}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\marginparsep}
+% \begin{macro}{\marginparpush}
+% The horizontal space between the main text and marginal notes is
+% determined by |\marginparsep|, the minimum vertical separation
+% between two marginal notes is controlled by |\marginparpush|.
+% \begin{macrocode}
+\setlength\marginparsep {11\p@}
+\setlength\marginparpush{5\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\topmargin}
+% The |\topmargin| is the distance between the top of `the
+% printable area' --which is 1 inch below the top of the paper--
+% and the top of the box which contains the running head.
+%
+% It can now be computed from the values set above.
+% \begin{macrocode}
+\setlength\topmargin{27pt}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Footnotes}
+%
+% \begin{macro}{\footnotesep}
+% |\footnotesep| is the height of the strut placed at the beginning
+% of every footnote. It equals the height of a normal
+% |\footnotesize| strut in this
+% class, thus no extra space occurs between footnotes.
+% \begin{macrocode}
+\setlength\footnotesep{12\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footins}
+% |\skip\footins| is the space between the last line of the main
+% text and the top of the first footnote.
+% \begin{macrocode}
+\setlength{\skip\footins}{10\p@ \@plus 2\p@ \@minus 4\p@}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Page Styles}
+%
+% The page style \pstyle{foo} is defined by defining the command
+% |\ps@foo|. This command should make only local definitions.
+% There should be no stray spaces in the definition, since they
+% could lead to mysterious extra spaces in the output (well, that's
+% something that should be always avoided).
+%
+% \begin{macro}{\@evenhead}
+% \begin{macro}{\@oddhead}
+% \begin{macro}{\@evenfoot}
+% \begin{macro}{\@oddfoot}
+% The |\ps@...| command defines the macros |\@oddhead|,
+% |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
+% heads and feet---e.g., |\@oddhead| is the macro to produce the
+% contents of the heading box for odd-numbered pages. It is called
+% inside an |\hbox| of width |\textwidth|.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Marking conventions}
+%
+% To make headings determined by the sectioning commands, the page
+% style defines the commands |\chaptermark|, |\sectionmark|,
+% \ldots, where |\chaptermark{|\meta{text}|}| is called by
+% |\chapter| to set a mark, and so on.
+%
+% The |\...mark| commands and the |\...head| macros are defined
+% with the help of the following macros. (All the |\...mark|
+% commands should be initialized to no-ops.)
+%
+% \LaTeX{} extends \TeX's |\mark| facility by producing two kinds
+% of marks, a `left' and a `right' mark, using the following
+% commands:
+% \begin{flushleft}
+% |\markboth{|\meta{left}|}{|\meta{right}|}|: Adds both marks.
+%
+% |\markright{|\meta{right}|}|: Adds a `right' mark.
+%
+% |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
+% or |\@evenfoot| macros, it gets the current `left'
+% mark. |\leftmark| works like \TeX's |\botmark|
+% command.
+%
+% |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
+% or |\@evenfoot| macros, it gets the current
+% `right' mark. |\rightmark| works like \TeX's
+% |\firstmark| command.
+% \end{flushleft}
+%
+% The marking commands work reasonably well for right marks
+% `numbered within' left marks--e.g., the left mark is changed by a
+% |\chapter| command and the right mark is changed by a |\section|
+% command. However, it does produce somewhat anomalous results if
+% two |\markboth|'s occur on the same page.
+%
+%
+% Commands like |\tableofcontents| that should set the marks in some
+% page styles use a |\@mkboth| command, which is |\let| by the
+% pagestyle command (|\ps@...|) to |\markboth| for setting the
+% heading or to |\@gobbletwo| to do nothing.
+%
+%
+% \subsubsection{Defining the page styles}
+% \label{sec:pagestyle}
+%
+% The pagestyles \pstyle{empty} and \pstyle{plain} are defined in
+% the \LaTeX{} kernel (\file{ltpage.dtx}), but these definitions
+% are changed to a simpler version for this document class.
+%
+% \begin{macro}{\ps@headings}
+% The definition of the page style \pstyle{headings} has to be
+% different for two sided printing than it is for one sided
+% printing.
+%
+% \changes{v1.2e}{1994/04/28}{Added twoside support}
+% \begin{macrocode}
+\if@twoside
+ \def\ps@headings{%
+% \end{macrocode}
+% The running feet are empty in this page style.
+% \begin{macrocode}
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+% \end{macrocode}
+% The running head contains some information about this letter. The
+% head is the same for even and odd pages.
+% \changes{v1.2i}{1994/05/12}{Made running heads the same on odd and
+% even pages}
+% \changes{v1.2k}{1994/06/17}{Added a missing brace}
+% \begin{macrocode}
+ \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
+ \hfil \@date
+ \hfil \pagename{} \thepage}%
+ \let\@evenhead\@oddhead}
+% \end{macrocode}
+% For one sided printing we don't need to define |\@evenhead| so
+% the definition is somewhat simpler.
+% \begin{macrocode}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
+ \hfil \@date
+ \hfil \pagename{} \thepage}}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ps@empty}
+% The definition of the page style \pstyle{empty} is simple:
+% No running head or foot at all.
+% \changes{v1.2e}{1994/04/28}{Also make even feet and head empty}
+% \begin{macrocode}
+\def\ps@empty{%
+ \let\@oddfoot\@empty\let\@oddhead\@empty
+ \let\@evenfoot\@empty\let\@evenhead\@empty}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ps@firstpage}
+% The page style \pstyle{firstpage} puts the telephone number
+% in the proper place for the letterhead. It should be adapted
+% to site conventions. The size of the number is determined
+% depending on the main size.
+% \begin{macrocode}
+\def\ps@firstpage{%
+ \let\@oddhead\@empty
+ \def\@oddfoot{\raisebox{-45\p@}[\z@]{%
+ \hb@xt@\textwidth{\hspace*{100\p@}%
+ \ifcase \@ptsize\relax
+ \normalsize
+ \or
+ \small
+ \or
+ \footnotesize
+ \fi
+ \fromlocation \hfill \telephonenum}}\hss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ps@plain}
+% The definition of the page style \pstyle{plain} is again simple.
+% \changes{v1.2e}{1994/04/28}{Added definition of \cs{@evenfoot}
+% because of twoside option}
+% \changes{v1.2s}{1995/05/25}{replace \cs{rmfamily} with
+% \cs{normalfont} (PR 1578)}
+% \begin{macrocode}
+\def\ps@plain{%
+ \let\@oddhead\@empty
+ \def\@oddfoot{\normalfont\hfil\thepage\hfil}%
+ \def\@evenfoot{\normalfont\hfil\thepage\hfil}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \section{Document Markup}
+%
+% \subsection{Global Declarations}
+%
+% \begin{macro}{\name}
+% \begin{macro}{\signature}
+% \begin{macro}{\address}
+% \begin{macro}{\location}
+% \begin{macro}{\telephone}
+% The following declarations, shown with examples, give information
+% about the sender:
+% \begin{itemize}
+% \item |\name{Dr. L. User}| : to be used for the return address on
+% the envelope.
+% \begin{macrocode}
+\newcommand*{\name}[1]{\def\fromname{#1}}
+% \end{macrocode}
+% \item |\signature{Larry User}| : goes after the closing.
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% \item |\location{Room 374}| : Acts as modifier to the standard
+% institutional address.
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% \end{itemize}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fromname}
+% \begin{macro}{\fromsig}
+% \begin{macro}{\fromaddress}
+% \begin{macro}{\fromlocation}
+% \begin{macro}{\telephonenum}
+% We make sure that the internal control sequences that are used to
+% store the information exist and are empty.
+% \begin{macrocode}
+\name{}
+\signature{}
+\address{}
+\location{}
+\telephone{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\makelabels}
+% The |\makelabels| declaration causes mailing labels to be made.
+% \begin{macrocode}
+\newcommand*{\makelabels}{%
+% \end{macrocode}
+% At the beginning of the document, we need to activate the
+% |\@mlabel| and |\@startlabels| commands, as well as write
+% |\@startlabels| to the |.aux| file.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \let\@startlabels\startlabels
+ \let\@mlabel\mlabel
+ \if@filesw
+ \immediate\write\@mainaux{\string\@startlabels}\fi}%
+% \end{macrocode}
+% At the end of the document we need to write |\clearpage| to the
+% |.aux| file.
+% \begin{macrocode}
+ \AtEndDocument{%
+ \if@filesw\immediate\write\@mainaux{\string\clearpage}\fi}}
+% \end{macrocode}
+% |\makelabels| is allowed only before the |\begin{document}|
+% command.
+% \begin{macrocode}
+\@onlypreamble\makelabels
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The generic letter commands}
+%
+% \begin{environment}{letter}
+% The letter environment creates a new letter, starting from page
+% $1$, with footnotes starting from $1$ as well.
+% (The first page is unnumbered.) It has a single argument, which
+% is the addressee and his address, as in
+%\begin{verbatim}
+% \begin{letter}{Sam Jones \\
+% Institute for Retarded Study\\
+% Princeton, N.J.}
+%\end{verbatim}
+% Local declarations, such as |\address|, can follow the
+% |\begin{letter}|.
+% \changes{v1.2e}{1994/04/28}{When printing twosided a new letter
+% shouldn't start on the back of the previous one. Added insertion
+% of a blank page when necessary.}
+% \changes{v1.2z}{1999/04/29}{Reset footnote counter to 0, (PR 2957).}
+% \begin{macrocode}
+\newenvironment{letter}[1]
+ {\newpage
+ \if@twoside \ifodd\c@page
+ \else\thispagestyle{empty}\null\newpage\fi
+ \fi
+ \c@page \@ne
+ \c@footnote \z@
+ \interlinepenalty=200 % smaller than the TeXbook value
+% \end{macrocode}
+% The |\leavevmode| and |\ignorespaces| commands are there for
+% protecting against an empty argument.
+% \begin{macrocode}
+ \@processto{\leavevmode\ignorespaces #1}}
+% \end{macrocode}
+% The end of the environment possibly writes the address
+% information on the \file{.aux} file.
+% \changes{v1.2p}{1994/12/11}{No longer redefine \cs{protect} but use
+% one of the available settings}
+% \begin{macrocode}
+ {\stopletter\@@par\pagebreak\@@par
+ \if@filesw
+ \begingroup
+ \let\\=\relax
+ \let\protect\@unexpandable@protect
+ \immediate\write\@auxout{%
+ \string\@mlabel{\returnaddress}{\toname\\\toaddress}}%
+ \endgroup
+ \fi}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{macro}{\@processto}
+% \begin{macro}{\@xproc}
+% \begin{macro}{\@yproc}
+% |\@processto| gets the |\toname| and |\toaddress| from the letter
+% environment's macro argument. |\@xproc| and |\@yproc| are auxiliary
+% macros.
+% \begin{macrocode}
+\long\def\@processto#1{%
+ \@xproc #1\\@@@%
+ \ifx\toaddress\@empty
+ \else
+ \@yproc #1@@@%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Page breaking control}
+%
+% \begin{macro}{\stopbreaks}
+% When the command |\stopbreaks| is issued no page breaks should
+% occur until |\startbreaks| is called.
+% \begin{macrocode}
+\newcommand*{\stopbreaks}{%
+ \interlinepenalty\@M
+ \def\par{\@@par\nobreak}%
+ \let\\\@nobreakcr
+ \let\vspace\@nobreakvspace}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nobreakvspace}
+% \changes{v1.2t}{1996/01/20}{Made robust pr/2049}
+% \begin{macro}{\@nobreakvspacex}
+% \begin{macro}{\@nobreakcr}
+% These are needed by |\stopbreaks|
+% \begin{macrocode}
+\DeclareRobustCommand\@nobreakvspace
+ {\@ifstar\@nobreakvspacex\@nobreakvspacex}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@nobreakvspacex#1{%
+ \ifvmode
+ \nobreak\vskip #1\relax
+ \else
+ \@bsphack\vadjust{\nobreak\vskip #1}\@esphack
+ \fi}
+% \end{macrocode}
+%
+% \changes{v1.2w}{1997/01/07}
+% {Simplify definition, for ltspace 1.2u. /2341}
+% \begin{macrocode}
+\def\@nobreakcr{\@ifstar{\@normalcr*}{\@normalcr*}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\startbreaks}
+% This cancels the effect of |\stopbreaks|.
+% \begin{macrocode}
+\newcommand*{\startbreaks}{%
+ \let\\\@normalcr
+ \interlinepenalty 200%
+ \def\par{\@@par\penalty 200\relax}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\longindentation}
+% The size of the indent to use before the closing of the letter.
+% \begin{macrocode}
+\newdimen\longindentation
+\longindentation=.5\textwidth
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\indentedwidth}
+% The width of the closing of the letter.
+% \begin{macrocode}
+\newdimen\indentedwidth
+\indentedwidth=\textwidth
+\advance\indentedwidth -\longindentation
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\opening}
+% Text is begun with the |\opening| command, whose argument
+% generates the salutation, as in
+%\begin{verbatim}
+% \opening{Dear Henry,}
+%\end{verbatim}
+% This should produce everything up to and including the
+% `Dear Henry,' and a |\par| command that follows.
+% Since there's a |\vfil| at the bottom of every page,
+% it can add vertical fill to position a short letter.
+% It should use the following commands:
+% \begin{itemize}
+% \item |\toname| : name part of `to' address.
+% Will be one line long.
+% \item |\toaddress| : address part of `to' address.
+% The lines separated by |\\|.
+% \item |\fromname| : name of sender.
+% \item |\fromaddress| : argument of current |\address|
+% declaration-- null if none. Should use standard institutional
+% address if null.
+% \item |\fromlocation| : argument of current |\location|
+% declaration--null if none.
+% \item |\telephonenum| : argument of current |\telephone|
+% declaration--null if none.
+% \end{itemize}
+% \begin{macrocode}
+\newcommand*{\opening}[1]{\ifx\@empty\fromaddress
+ \thispagestyle{firstpage}%
+ {\raggedleft\@date\par}%
+ \else % home address
+ \thispagestyle{empty}%
+% \end{macrocode}
+% \changes{v1.2y}{1998/05/10}{Avoid space at right of tabular
+% (pr2794)}
+% \begin{macrocode}
+ {\raggedleft\begin{tabular}{l@{}}\ignorespaces
+ \fromaddress \\*[2\parskip]%
+ \@date \end{tabular}\par}%
+ \fi
+ \vspace{2\parskip}%
+ {\raggedright \toname \\ \toaddress \par}%
+ \vspace{2\parskip}%
+ #1\par\nobreak}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\closing}
+% The body of the letter follows, ended by a |\closing| command,
+% as in
+%\begin{verbatim}
+% \closing{Yours truly,}
+%\end{verbatim}
+% This command generates the closing matter, and the signature.
+% An obvious thing to do is to use a |\parbox| for the closing
+% and the signature. Should use the following:
+% \begin{itemize}
+% \item |\fromsig| : argument of current |\signature| declaration
+% or, if null, the |\fromname|.
+% \item |\stopbreaks| : a macro that inhibits page breaking.
+% \end{itemize}
+% \begin{macrocode}
+\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
+ \stopbreaks
+ \noindent
+ \ifx\@empty\fromaddress\else
+ \hspace*{\longindentation}\fi
+ \parbox{\indentedwidth}{\raggedright
+ \ignorespaces #1\\[6\medskipamount]%
+ \ifx\@empty\fromsig
+ \fromname
+ \else \fromsig \fi\strut}%
+ \par}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\smallskipamount}
+% \begin{macro}{\medskipamount}
+% \begin{macro}{\bigskipamount}
+% Of these three, only |\medskipmount| is actually used above.
+% \begin{macrocode}
+%\smallskipamount=.5\parskip
+\medskipamount=\parskip
+%\bigskipamount=2\parskip
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cc}
+% \begin{macro}{\encl}
+% \begin{macro}{\ps}
+% After the |\closing| you can put arbitrary stuff, which is typeset
+% with zero |\parindent| and no page breaking. Commands designed
+% for use after the closing are:
+% \begin{verbatim}
+% \cc{Tinker\\Evers\\Chance}
+%\end{verbatim}
+% which produces:\\
+% \begin{tabular}{ll}
+% cc: & Tinker\\
+% & Evers\\
+% & Chance
+% \end{tabular}\\
+% Note the obvious use of |\parbox|.
+% \changes{v1.2s}{1995/05/25}{replace \cs{reset@font} with
+% \cs{normalfont}; remove \cs{rm}}
+% \begin{macrocode}
+\newcommand*{\cc}[1]{%
+ \par\noindent
+ \parbox[t]{\textwidth}{%
+ \@hangfrom{\normalfont\ccname: }%
+ \ignorespaces #1\strut}\par}
+% \end{macrocode}
+%\begin{verbatim}
+% \encl{Foo(2)\\Bar}
+%\end{verbatim}
+% which produces:\\
+% \begin{tabular}{ll}
+% encl: & Foo(2)\\
+% & Bar
+% \end{tabular}
+% \begin{macrocode}
+\newcommand*{\encl}[1]{%
+ \par\noindent
+ \parbox[t]{\textwidth}{%
+ \@hangfrom{\normalfont\enclname: }%
+ \ignorespaces #1\strut}\par}
+% \end{macrocode}
+%
+% The only thing |\ps| needs to do is call |\startbreaks|,
+% which allows page breaking again.
+% \begin{macrocode}
+\newcommand*{\ps}{\par\startbreaks}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\stopletter}
+% The |\stopletter| command is called by |\endletter| to do the
+% following:
+% \begin{itemize}
+% \item Add any desired fill or other material at the end of the
+% letter.
+% \item Define |\returnaddress| to be the return address for the
+% mailing label.
+% More precisely, it is the first argument of the |\mlabel|
+% command described below. It should be defined to null if the
+% return address doesn't appear on the labels. Any command,
+% other than |\\|, that should not be expanded until the |\mlabel|
+% command is actually executed must be preceded by |\protect|.
+% Whenever possible, |\protect| commands in the definition of
+% |\returnaddress|---it's much more efficient that way. In
+% particular, when the standard return address is used, you
+% should define |\returnaddress| to something like
+% |\protect\standardreturnaddress|.
+% \end{itemize}
+% \begin{macrocode}
+\newcommand*{\stopletter}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Customizing the labels}
+%
+% Commands for generating the labels are put on the \file{.aux} file,
+% which is read in and processed by the |\end{document}| command.
+% You have to define the following two commands:
+% \begin{itemize}
+% \item |\startlabels| : Should reset the page layout parameters if
+% necessary.
+% \item |\mlabel|\marg{return address}\marg{to address} : Command to
+% generate a single label.
+% \end{itemize}
+%
+%
+%
+% \begin{macro}{\returnaddress}
+% The return address for the mailing labels can be stored in this
+% macro.
+% \begin{macrocode}
+\newcommand*{\returnaddress}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\labelcount}
+% A register to count the labels
+% \begin{macrocode}
+\newcount\labelcount
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\startlabels}
+% The following |\startlabels| command sets things up for
+% producing labels in two columns of five 2" $\times$ 4-1/4"
+% labels each, suitable for reproducing onto Avery brand number
+% 5352 address labels.
+% \changes{v1.2q}{1995/03/14}{changed value of \cs{columnsep} by 1pt}
+% \begin{macrocode}
+\newcommand*{\startlabels}{\labelcount\z@
+ \pagestyle{empty}%
+ \let\@texttop\relax
+ \topmargin -50\p@
+ \headsep \z@
+ \oddsidemargin -35\p@
+ \evensidemargin -35\p@
+ \textheight 10in
+ \@colht\textheight \@colroom\textheight \vsize\textheight
+ \textwidth 550\p@
+ \columnsep 26\p@
+ \ifcase \@ptsize\relax
+ \normalsize
+ \or
+ \small
+ \or
+ \footnotesize
+ \fi
+ \baselineskip \z@
+ \lineskip \z@
+ \boxmaxdepth \z@
+ \parindent \z@
+ \twocolumn\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@startlabels}
+% |\@startlabels| is the command name that is written to the |.aux|
+% file. It is a no-op at first, and defined to be the same as
+% |\startlabels| in the |\begin{document}| hook.
+% \begin{macrocode}
+\let\@startlabels=\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mlabel}
+% This command prints an address label; it is used when the user
+% specified |\makelabels| in the preamble of his document. The
+% command |\mlabel| takes two arguments; the second argument is
+% supposed to be the address; the first argument can be used to
+% print a return address. In this document class we ignore the
+% first argument. Also the labels are supposed to be 2~inch high
+% and 3.6~inch wide. When your address labels have a different you
+% will have to define your own |\mlabel| command.
+% \changes{v1.2p}{1994/12/11}{Redefined \cs{mlabel} to not use the
+% \cs{setbox} primitive}
+% \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]{%
+ \parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@mlabel}
+% The macro |\@mlabel| is written to the \file{.aux} file instead
+% of |\mlabel|. This allows us to make it a no-op by default,
+% and then activate it in the |\begin{document}| hook.
+% \begin{macrocode}
+\let\@mlabel=\@gobbletwo
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Lists}
+%
+% \subsubsection{General List Parameters}
+%
+% The following commands are used to set the default values for the
+% list environment's parameters. See the \LaTeX{} manual for an
+% explanation of the meanings of the parameters. Defaults for the
+% list environment are set as follows. First, |\rightmargin|,
+% |\listparindent| and |\itemindent| are set to 0pt. Then, for a
+% \texttt{K}th level list, the command |\@listK| is called, where
+% `\texttt{K}' denotes `\texttt{i}', `\texttt{ii}', ... ,
+% `\texttt{vi}'. (I.e., |\@listiii| is called for a third-level
+% list.) By convention, |\@listK| should set |\leftmargin| to
+% |\leftmarginK|.
+%
+% \begin{macro}{\leftmargin}
+% \begin{macro}{\leftmargini}
+% \begin{macro}{\leftmarginii}
+% \begin{macro}{\leftmarginiii}
+% \begin{macro}{\leftmarginiv}
+% \begin{macro}{\leftmarginv}
+% \begin{macro}{\leftmarginvi}
+% 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}
+% \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
+% are `(m)', `vii.' and `M.').
+% \begin{macrocode}
+\setlength\leftmarginii {2.2em}
+\setlength\leftmarginiii {1.87em}
+\setlength\leftmarginiv {1.7em}
+\setlength\leftmarginv {1em}
+\setlength\leftmarginvi {1em}
+% \end{macrocode}
+% Here we set the top level leftmargin.
+% \begin{macrocode}
+\setlength\leftmargin {\leftmargini}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\labelsep}
+% \begin{macro}{\labelwidth}
+% |\labelsep| is the distance between the label and the text of an
+% item; |\labelwidth| is the width of the label.
+% \begin{macrocode}
+\setlength \labelsep {5\p@}
+\setlength \labelwidth{\leftmargini}
+\addtolength\labelwidth{-\labelsep}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\partopsep}
+% When the user leaves a blank line before the environment an extra
+% vertical space of |\partopsep| is inserted, in addition to
+% |\parskip| and |\topsep|.
+% \begin{macrocode}
+\setlength\partopsep{0\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@beginparpenalty}
+% \begin{macro}{\@endparpenalty}
+% These penalties are inserted before and after a list or paragraph
+% environment. They are set to a bonus value to encourage page
+% breaking at these points.
+% \begin{macro}{\@itempenalty}
+% This penalty is inserted between list items.
+% \begin{macrocode}
+\@beginparpenalty -\@lowpenalty
+\@endparpenalty -\@lowpenalty
+\@itempenalty -\@lowpenalty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@listI}
+% \begin{macro}{\@listi}
+% |\@listI| defines top level and |\@listi| values of
+% |\leftmargin|, |\parsep|, |\topsep|, and |\itemsep|
+%
+% \begin{macrocode}
+\def\@listI{\setlength\leftmargin{\leftmargini}%
+ \setlength\parsep {0\p@}%
+ \setlength\topsep {.4em}%
+ \setlength\itemsep{.4em}}
+\let\@listi\@listI
+% \end{macrocode}
+% We have to initialize these parameters.
+% \begin{macrocode}
+\@listi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@listii}
+% \begin{macro}{\@listiii}
+% \begin{macro}{\@listiv}
+% \begin{macro}{\@listv}
+% \begin{macro}{\@listvi}
+% Here are the same macros for the higher level lists.
+% \begin{macrocode}
+\def\@listii {\setlength \leftmargin{\leftmarginii}%
+ \setlength \labelwidth{\leftmarginii}%
+ \addtolength\labelwidth{-\labelsep}}
+\def\@listiii{\setlength \leftmargin{\leftmarginiii}%
+ \setlength \labelwidth{\leftmarginiii}%
+ \addtolength\labelwidth{-\labelsep}%
+ \setlength \topsep {.2em}%
+ \setlength \itemsep {\topsep}}
+\def\@listiv {\setlength \leftmargin{\leftmarginiv}%
+ \setlength \labelwidth{\leftmarginiv}%
+ \addtolength\labelwidth{-\labelsep}}
+\def\@listv {\setlength \leftmargin{\leftmarginv}%
+ \setlength \labelwidth{\leftmarginv}%
+ \addtolength\labelwidth{-\labelsep}}
+\def\@listvi {\setlength \leftmargin{\leftmarginvi}%
+ \setlength \labelwidth{\leftmarginvi}%
+ \addtolength\labelwidth{-\labelsep}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Enumerate}
+%
+% The enumerate environment uses four counters: \Lcount{enumi},
+% \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
+% \Lcount{enumN} controls the numbering of the Nth level
+% enumeration.
+%
+% \begin{macro}{\theenumi}
+% \begin{macro}{\theenumii}
+% \begin{macro}{\theenumiii}
+% \begin{macro}{\theenumiv}
+% The counters are already defined in the \LaTeX{} kernel
+% (\file{ltlists.dtx}), but their representation is changed here.
+%
+% \begin{macrocode}
+\renewcommand\theenumi{\@arabic\c@enumi}
+\renewcommand\theenumii{\@alph\c@enumii}
+\renewcommand\theenumiii{\@roman\c@enumiii}
+\renewcommand\theenumiv{\@Alph\c@enumiv}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\labelenumi}
+% \begin{macro}{\labelenumii}
+% \begin{macro}{\labelenumiii}
+% \begin{macro}{\labelenumiv}
+% The commands |\labelenumi| ... |\labelenumiv| generate the label
+% for each item.
+% \begin{macrocode}
+\newcommand\labelenumi{\theenumi.}
+\newcommand\labelenumii{(\theenumii)}
+\newcommand\labelenumiii{\theenumiii.}
+\newcommand\labelenumiv{\theenumiv.}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\p@enumii}
+% \begin{macro}{\p@enumiii}
+% \begin{macro}{\p@enumiv}
+% The expansion of |\p@enumN||\theenumN| defines the output of a
+% |\ref| command when referencing an item of the Nth level of an
+% enumerated list.
+% \begin{macrocode}
+\renewcommand\p@enumii{\theenumi}
+\renewcommand\p@enumiii{\theenumi(\theenumii)}
+\renewcommand\p@enumiv{\p@enumiii\theenumiii}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Itemize}
+%
+% \begin{macro}{\labelitemi}
+% \begin{macro}{\labelitemii}
+% \changes{v1.2h}{1994/05/06}{Inserted \cs{normalfont}}
+% \changes{v1.2u}{1996/08/25}{replaced -{}- with \cs{textendash}}
+% \begin{macro}{\labelitemiii}
+% \begin{macro}{\labelitemiv}
+% Itemization is controlled by |\labelitemi|,
+% |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define
+% the labels of the various itemization levels: the symbols used are
+% bullet, bold en-dash, asterisk and centered dot.
+%
+% \changes{v1.2n}{1994/07/11}{renamed \cs{labelitemiiii} to
+% \cs{labelitemiii}}
+% \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}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Description}
+%
+% \begin{environment}{description}
+% The description environment is defined here -- while the itemize
+% and enumerate environments are defined in the \LaTeX{} kernel
+% (\file{ltlists.dtx}).
+%
+% \begin{macrocode}
+\newenvironment{description}
+ {\list{}{\labelwidth\z@ \itemindent-\leftmargin
+ \let\makelabel\descriptionlabel}}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\descriptionlabel}
+% To change the formatting of the label, you must redefine
+% |\descriptionlabel|.
+%
+% \changes{v1.2q}{1995/03/14}{made command short}
+% \begin{macrocode}
+\newcommand*{\descriptionlabel}[1]{\hspace\labelsep
+ \normalfont\bfseries #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Defining new environments}
+%
+% \subsubsection{Verse}
+%
+% \begin{environment}{verse}
+% The verse environment is defined by making clever use of the
+% list environment's parameters. The user types |\\| to end a line.
+% This is implemented by |\let|'ing |\\| equal |\@centercr|.
+%
+% \begin{macrocode}
+\newenvironment{verse}
+ {\let\\=\@centercr
+ \list{}{\setlength\itemsep{\z@}%
+ \setlength\itemindent{-15\p@}%
+ \setlength\listparindent{\itemindent}%
+ \setlength\rightmargin{\leftmargin}%
+ \addtolength\leftmargin{15\p@}}%
+ \item[]}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Quotation}
+%
+% \begin{environment}{quotation}
+% The quotation environment is also defined by making clever use of
+% the list environment's parameters. The lines in the environment
+% are set smaller than |\textwidth|. The first line of a paragraph
+% inside this environment is indented.
+%
+% \begin{macrocode}
+\newenvironment{quotation}
+ {\list{}{\setlength\listparindent{1.5em}%
+ \setlength\itemindent{\listparindent}%
+ \setlength\rightmargin{\leftmargin}}%
+ \item[]}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Quote}
+%
+% \begin{environment}{quote}
+% The quote environment is like the quotation environment except
+% that paragraphs are not indented.
+%
+% \begin{macrocode}
+\newenvironment{quote}
+ {\list{}{\setlength\rightmargin{\leftmargin}}%
+ \item[]}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{Theorem}
+%
+% This document class does not define it's own theorem environments,
+% the defaults, supplied by the \LaTeX{} kernel (\file{ltthm.dtx})
+% are available.
+%
+%
+% \subsection{Setting parameters for existing environments}
+%
+% \subsubsection{Array and tabular}
+%
+% \begin{macro}{\arraycolsep}
+% The columns in an array environment are separated by
+% 2|\arraycolsep|.
+% \begin{macrocode}
+\setlength\arraycolsep{5\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabcolsep}
+% The columns in an tabular environment are separated by
+% 2|\tabcolsep|.
+% \begin{macrocode}
+\setlength\tabcolsep{6\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\arrayrulewidth}
+% The width of vertical rules in the array and tabular environments
+% is given by |\arrayrulewidth|.
+% \begin{macrocode}
+\setlength\arrayrulewidth{.4\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\doublerulesep}
+% The space between adjacent rules in the array and tabular
+% environments is given by |\doublerulesep|.
+% \begin{macrocode}
+\setlength\doublerulesep{2\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Tabbing}
+%
+% \begin{macro}{\tabbingsep}
+% This controls the space that the |\'| command puts in. (See
+% \LaTeX{} manual for an explanation.)
+% \begin{macrocode}
+\setlength\tabbingsep{\labelsep}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Minipage}
+%
+% \begin{macro}{\@minipagerestore}
+% The macro |\@minipagerestore| is called upon entry to a minipage
+% environment to set up things that are to be handled differently
+% inside a minipage environment. In the current styles, it does
+% nothing.
+% \end{macro}
+%
+% \begin{macro}{\@mpfootins}
+% Minipages have their own footnotes; |\skip||\@mpfootins| plays
+% same r\^ole for footnotes in a minipage as |\skip||\footins| does
+% for ordinary footnotes.
+%
+% \begin{macrocode}
+\skip\@mpfootins = \skip\footins
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Framed boxes}
+%
+% \begin{macro}{\fboxsep}
+% The space left by |\fbox| and |\framebox| between the box and the
+% text in it.
+% \begin{macro}{\fboxrule}
+% The width of the rules in the box made by |\fbox| and |\framebox|.
+% \begin{macrocode}
+\setlength\fboxsep{3\p@}
+\setlength\fboxrule{.4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Equation and eqnarray}
+%
+% \begin{macro}{\theequation}
+% The equation counter will be typeset using arabic numbers.
+% \begin{macrocode}
+\renewcommand\theequation{\@arabic\c@equation}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\jot}
+% |\jot| is the extra space added between lines of an eqnarray
+% environment. The default value is used.
+% \begin{macrocode}
+% \setlength\jot{3pt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@eqnnum}
+% The macro |\@eqnnum| defines how equation numbers are to appear in
+% equations. Again the default is used.
+%
+% \begin{macrocode}
+% \def\@eqnnum{(\theequation)}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Font changing}
+%
+% Here we supply the declarative font changing commands that were
+% common in \LaTeX\ version 2.09 and earlier. These commands work
+% in text mode \emph{and} in math mode. They are provided for
+% compatibility, but one should start using the |\text...| and
+% |\math...| commands instead. These commands are redefined using
+% |\@renewfontswitch|, a command with three arguments: the user
+% command to be defined; \LaTeX\ commands to execute in text mode
+% and \LaTeX\ commands to execute in math mode.
+%
+% \begin{macro}{\rm}
+% \begin{macro}{\tt}
+% \begin{macro}{\sf}
+% The commands to change the family.
+% \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
+% \changes{v1.1}{1993/12/18}{Changed \cs{@newfontswitch} to
+% \cs{@renewfontswitch}, removed switch.}
+% \changes{v1.2d}{1994/04/14}{\cs{@renewfontswitch} has become
+% \cs{DeclareOldFontCommand}}
+% \begin{macrocode}
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bf}
+% The command to change to the bold series. One should use
+% |\mdseries| to explicitly switch back to medium series.
+% \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
+% \changes{v1.1}{1993/12/18}{Changed \cs{@newfontswitch} to
+% \cs{@renewfontswitch}, removed switch.}
+% \begin{macrocode}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sl}
+% \begin{macro}{\it}
+% \begin{macro}{\sc}
+%
+% And the commands to change the shape of the font. The slanted and
+% small caps shapes are not available by default as math alphabets,
+% so those changes do nothing in math mode. One should use
+% |\upshape| to explicitly change back to the upright shape.
+% \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
+% \changes{v1.1}{1993/12/18}{Changed \cs{@newfontswitch} to
+% \cs{@renewfontswitch}, removed switch.}
+% \changes{v1.1b}{1993/12/20}{Added forgotten re.}
+% \begin{macrocode}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cal}
+% \changes{v1.0a}{1993/12/14}{Macro added}
+% \begin{macro}{\mit}
+% \changes{v1.0a}{1993/12/14}{Macro added}
+%
+% The commands |\cal| and |\mit| should only be used in math mode,
+% outside math mode they have no effect. Currently the New Font
+% Selection Scheme defines these commands to generate warning
+% messages. Therefore we have to define them `by hand'.
+% \changes{v1.2p}{1994/12/11}{Now define \cs{cal} and \cs{mit} using
+% \cs{DeclareRobustCommand*}}
+% \begin{macrocode}
+\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
+\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Footnotes}
+%
+% \begin{macro}{\footnoterule}
+% Usually, footnotes are separated from the main body of the text
+% by a small rule. This rule is drawn by the macro |\footnoterule|.
+% We have to make sure that the rule takes no vertical space (see
+% \file{plain.tex}) so we compensate for the natural height of the
+% rule of 0.4pt by adding the right amount of vertical skip.
+%
+% To prevent the rule from colliding with the footnote we first add
+% a little negative vertical skip, then we put the rule and make
+% sure we end up at the same point where we begun this operation.
+% \begin{macrocode}
+\renewcommand\footnoterule{%
+ \kern-\p@
+ \hrule \@width .4\columnwidth
+ \kern .6\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@footnote}
+% A counter for footnotes.
+% \begin{macrocode}
+% \newcounter{footnote}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefntext}
+% \changes{v1.2c}{1994/03/08}{Always call \cs{@makefnmark}.}
+% The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
+% to produce the actual footnote. The macro gets the text of the
+% footnote as its argument and should use |\@makefnmark| to produce
+% the mark of the footnote. The macro |\@makefntext| is called when
+% effectively inside a |\parbox| of width |\columnwidth| (i.e.,
+% with |\hsize| = |\columnwidth|).
+%
+% An example of what can be achieved is given by the following piece
+% of \TeX\ code.
+% \begin{verbatim}
+% \long\def\@makefntext#1{%
+% \@setpar{\@@par
+% \@tempdima = \hsize
+% \advance\@tempdima-10pt
+% \parshape \@ne 10pt \@tempdima}%
+% \par
+% \parindent 1em\noindent
+% \hb@xt@\z@{\hss\@makefnmark}#1}
+% \end{verbatim}
+% The effect of this definition is that all lines of the footnote
+% are indented by 10pt, while the first line of a new paragraph is
+% indented by 1em. To change these dimensions, just substitute the
+% desired value for `10pt' (in both places) or `1em'. The mark is
+% flush right against the footnote.
+%
+% In this document class we use a simpler macro, in which the
+% footnote text is set like an ordinary text paragraph, with no
+% indentation except on the first line of a paragraph, and the
+% first line of the footnote. Thus, all the macro must do is set
+% |\parindent| to the appropriate value for succeeding paragraphs
+% and put the proper indentation before the mark.
+%
+% \begin{macrocode}
+\long\def\@makefntext#1{%
+ \noindent
+ \hangindent 5\p@
+ \hb@xt@5\p@{\hss\@makefnmark}#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefnmark}
+% The footnote markers that are printed in the text to point to the
+% footnotes should be produced by the macro |\@makefnmark|. We use
+% the default definition for it.
+% \begin{macrocode}
+%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Words}
+%
+% \begin{macro}{\ccname}
+% \begin{macro}{\enclname}
+% \begin{macro}{\pagename}
+% \begin{macro}{\headtoname}
+% This document class is for documents prepared in the English
+% language. To prepare a version for another language, various
+% 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}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Date}
+%
+% \begin{macro}{\today}
+% 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
+ 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}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Two column mode}
+%
+% \begin{macro}{\columnsep}
+% This gives the distance between two columns in two column mode.
+% \begin{macrocode}
+\setlength\columnsep{10\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\columnseprule}
+% This gives the width of the rule between two columns in two
+% column mode. We have no visible rule.
+% \begin{macrocode}
+\setlength\columnseprule{0\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The page style}
+% We have \pstyle{plain} pages in this document class by
+% default. We use arabic page numbers.
+% \begin{macrocode}
+\pagestyle{plain}
+\pagenumbering{arabic}
+% \end{macrocode}
+%
+% \subsection{Single or double sided printing}
+%
+% We don't try to make each page as long as all the others.
+% \begin{macrocode}
+\raggedbottom
+% \end{macrocode}
+%
+% \begin{macro}{\@texttop}
+% The document class letter sets |\@texttop| to |\vskip| 0pt
+% \texttt{plus} .00006fil on the first page of a letter, which
+% centers a short letter on the page. This fil value may have to be
+% changed for other letterheads. This setting has to be done after
+% |\raggedbottom| is executed, since the latter sets |\@texttop| to
+% |\relax|.
+% \begin{macrocode}
+\def\@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% We always start in one column mode.
+% \begin{macrocode}
+\onecolumn
+%</letter>
+% \end{macrocode}
+%
+%
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/letter.ins b/macros/latex-dev/base/letter.ins
new file mode 100644
index 0000000000..28d77dd3b5
--- /dev/null
+++ b/macros/latex-dev/base/letter.ins
@@ -0,0 +1,109 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\Msg{*** Generating letter class file ***}
+
+\generateFile{letter.cls}{t}{
+ \from{letter.dtx}{letter}}
+
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space letter.cls}
+\Msg{*}
+\Msg{* To produce the documentation run the file `letter.dtx'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
+
+
+
diff --git a/macros/latex-dev/base/letter.pdf b/macros/latex-dev/base/letter.pdf
new file mode 100644
index 0000000000..72c038d77b
--- /dev/null
+++ b/macros/latex-dev/base/letter.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lgc2.err b/macros/latex-dev/base/lgc2.err
new file mode 100644
index 0000000000..043c56d752
--- /dev/null
+++ b/macros/latex-dev/base/lgc2.err
@@ -0,0 +1,697 @@
+\newcommand\erratafiledate{2008-06-13}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% To produce a printed version of this errata file run this file through
+% LaTeX. It will unpack a small class file (if not already present) and
+% a configuration file with the extension .cfg. You might want to modify
+% the setting in this configuration file to print only a partial errata
+% suitable for your printed revision of this book, see details in the
+% .cfg file.
+%
+% The current version of this file can be found at:
+%
+% https://www.latex-project.org/guides/books.html
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\begin{filecontents}{ttcterrata.cls}
+%%
+%% Copyright (C) 1997,2004,2005,2007 Frank Mittelbach
+%% This class file is licenced under LPPL latest version;
+%% see https://www.latex-project.org/lppl
+%
+%
+% It sets up a few commands used to format the errata entries for books in the
+% Addison-Wesley Series:
+%
+% Tools and Techniques for Computer Typesetting
+%
+% hence the name. However, anybody who likes to use it is free to apply it for
+% errata files of other books.
+%
+% Changes:
+%
+% v1.0a - changed name from errata.cls to ttcterrata.cls
+
+\ProvidesClass{ttcterrata}
+ [2007/11/10 v1.0a Mini class for errata files; subject to change (FMi)]
+
+\LoadClass{article}
+
+\setcounter{secnumdepth}{-1}
+\addtolength\textwidth{5cm}
+\addtolength\oddsidemargin{-3cm}
+
+\addtolength\textheight{36pt}
+
+\RequirePackage{shortvrb}
+\MakeShortVerb{\|}
+
+\RequirePackage{array,longtable}
+\RequirePackage{multicol}
+
+
+\newcommand\erratagetnumber{}
+\def\erratagetnumber#1/#2/#3\erratagetnumber{#1#2#3}
+
+
+\newcommand\gobbleerrata{%
+ \setbox\@tempboxa\vbox\bgroup
+ \let\endgobble\egroup
+ \let\hideamp\relax
+ \let\\\relax\let\par\@@par}
+
+\newcommand*\hideamp{&}
+
+\let\endgobble\relax
+
+
+\newcommand\erratastartdate{}
+\newcommand\myprinting{1}
+
+
+\newcommand\doweprint[2]{%
+ \ifnum \myprinting < \if!#2!1000 \else \ifx s#2 1000\else#2 \fi\fi
+ \ifnum \expandafter\erratagetnumber\erratastartdate\erratagetnumber <
+ \erratagetnumber#1\erratagetnumber \relax
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \else
+ \@tempswafalse
+ \fi
+}
+
+
+
+\newcommand\includedentries{entries after = \erratastartdate}
+\newcommand\printedentries{between \erratastartdate\space and}
+
+\newcommand\showallerrors{%
+ \renewcommand\includedentries{all errata entries}%
+ \renewcommand\printedentries{up to}
+ \renewcommand\doweprint[2]{\@tempswatrue}}
+
+
+\newcommand\displayrevisionfix[2]{%
+ \if!#2!\textbf{#1}\else\textit{#1}\rlap{\textsuperscript{#2}}\fi}
+
+\newcommand\norevisionnumbers{%
+ \renewcommand\displayrevisionfix[2]{\textbf{##1}}}
+
+\IfFileExists{\jobname.cfg}
+ {
+ \input{\jobname.cfg}
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* Configuration file for \jobname.err found }
+ \typeout{*}
+ \typeout{***************************************************}
+ \AtEndDocument{
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* If you wish to generate an errata listing}
+ \typeout{* containing only errors found after a certain revision}
+ \typeout{* and/or only errors found after a certain date}
+ \typeout{* modify the information stored in \jobname.cfg}
+ \typeout{*}
+ \typeout{* Current settings are:}
+ \typeout{*}
+ \typeout{* \@spaces printing of your book = \myprinting}
+ \typeout{* \@spaces include \includedentries}
+ \typeout{*}
+ \typeout{***************************************************}
+ }}
+ {}
+
+%% \erroronpage <page> <line info> <contributor> <date> <fixed in revision>
+
+\newcommand\erroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\seriouserroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\CHAPTER[1]{\endgobble
+ &\\[4pt]%
+ \multicolumn{4}{l}{\framebox[10cm][l]{\textbf{\normalsize\strut#1}}} \\}
+
+\newenvironment{erratalist}
+ {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
+ {\endgobble\end{longtable}}
+
+\newcommand\erratatitle[2]
+ {\begin{center}\LARGE\bfseries
+ Errata list for #1\\[5pt](\myprinting.\ printing)\\[10pt]
+ \small Includes all entries found \printedentries\space #2\\
+ (For other periods/print runs reprocess this document
+ with different config settings)
+ \end{center}%
+ \markright{Errata for #1 (\printedentries\space #2)}%
+ \thispagestyle{plain}%
+ \vspace{20pt}}
+
+\pagestyle{myheadings}
+
+\AtBeginDocument{\small}
+
+\setlength\parindent{0pt}
+\setlength\parskip{2pt}
+
+\newcommand\contributor[2]{\makebox[1cm][l]{\sffamily#1} #2\par}
+
+% some special shortcuts overwriting existing commands:
+
+\let\u\underline
+\renewcommand\>{$\to$}
+
+%%% some code suggested by Thorsten Hansen to count the number of
+%%% contributions by individuals (will work only if we do not get
+%%% too many :-)
+
+\def\count@contributors#1/#2/#3\@nil{
+ \@ifundefined{c@#1}{\newcounter{#1}}{}\stepcounter{#1}%
+%%% also count secondary:
+%%% \@ifundefined{c@#2}{\newcounter{#2}}{}\stepcounter{#2}%
+}
+
+\renewcommand\erroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\seriouserroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\contributor[2]{\makebox[1cm][l]{%
+ \sffamily#1} #2\@ifundefined{c@#1}{}{ (\arabic{#1})}\par}
+
+\end{filecontents}
+
+
+\begin{filecontents}{\jobname.cfg}
+%
+%
+% Configuration file for the errata listing of
+%
+% The LaTeX Graphics Companion, Second Edition
+%
+%
+% \erratastartdate
+%
+% Specifies the date from which on errata entries should be listed.
+%
+% The format is YYYY/MM/DD.
+%
+% The default below ensures that all entries for a particular
+% printing are typeset.
+%
+
+\renewcommand\erratastartdate{2007/06/30}
+
+
+%
+% \myprinting
+%
+% Specifies which (revised) printing you own. For example, if you
+% have the second printing set this to 2 so that errors already
+% corrected in that printing will not appear in your errata
+% listing.
+%
+% The default below ensures that all entries relevant to the x-th
+% printing are typeset.
+%
+%
+
+\renewcommand\myprinting{2}
+
+%
+% \norevisionnumbers
+%
+% Specifies that all page numbers in the errata are shown in the same
+% format (bold face) irregardless of whether or not they are fixed
+% in some revision. The default is to print corrected errors in
+% italic and add the revision number as a superscript.
+
+%
+% \showallerrors
+%
+% With this command you tell the program that all errata entries are
+% supposed to be generated. This makes \myprinting and
+% \erratastartdate basically obsolete so this isn't turned on by
+% default.
+%
+%
+\endinput
+\end{filecontents}
+
+
+\documentclass{ttcterrata}[2005/11/10] % we want new class
+
+\usepackage[T1]{fontenc}
+\let\u\underline % shortcut for this file
+\newcommand\meta[1]{$\langle$\textit{#1\/}$\rangle$}
+
+\usepackage{textcomp}
+
+\usepackage{url}
+
+\begin{document}
+
+\erratatitle{The \LaTeX{} Graphics Companion, Second Edition}{\erratafiledate}
+
+
+\begin{verbatim}
+@book(A-W:GMRRV07,
+ author = {Michel Goossens and Frank Mittelbach and Sebastian Rahtz
+ and Denis Roegel and Herbert Vo{\ss}},
+ title = {The {\LaTeX} Graphics Companion},
+ edition = 2,
+ series = {Tools and Techniques for Computer Typesetting},
+ publisher = {Addison-Wesley},
+ address = {Boston, Massachusetts},
+ year = 2007,
+ pagenums = {976},
+ bibliography = {yes},
+ index = {yes},
+ isbn = {978-0-321-50892-8},
+)
+\end{verbatim}
+
+
+\begin{list}{}{\setlength\leftmargin{0cm}\setlength\rightmargin{3cm}}
+\item[]
+
+This file (\texttt{\jobname.err}) can be found as part of the \LaTeX{}
+distribution and its latest version is maintained on the \LaTeX{}
+project site at \texttt{https://www.latex-project.org/help/books/\jobname.err}
+where you will also find extracts of the book.
+
+The first column in the table shows the page number of the errata
+entry. Superscript numbers in the first column refer to the printed
+revision in which this entry was corrected (\textit{s} indicates a
+correction in the sources only). The second
+column gives the precise location (negative line or paragraph numbers
+are counted from the bottom of the page). The third column shows the
+first finder of the problem.
+
+You can customize this list to only show errata related to the printing
+you own by changing the configuration in the file \texttt{\jobname.cfg}.
+
+\begin{center}
+ \Large \bfseries To Err is Human --- Bug Contest
+\end{center}
+
+Any mistake found and reported is a gain for all readers of our book.
+For this reason Addison-Wesley and the authors offer a prize (for 6
+periods) to the eligible person who finds the largest
+number of bugs during that period (in case of a draw a random choice
+will be made between all those with the largest number of findings).
+A person can receive at most one prize, ever; errors found by any of
+the authors do not count.
+
+Each prize is a free choice of any single computing book found on the
+AW Professional web site \texttt{http://www.awprofessional.com} (that
+is, no boxed sets or multiple volume offers).
+
+
+As usual, the authors and publisher reserve the right to make various
+decisions such as whether a reported feature is an error for
+competitive purposes or whether similar features count as a single or
+multiple errors. ---
+Good luck!
+
+\begin{center}
+\begin{tabular}{clr}
+Contest period ends & Winner \\[4pt]
+2008/05 & Milan Vujtek & 16 suggestions\\
+2010/05 & & \\
+\ldots
+\end{tabular}
+\end{center}
+\end{list}
+
+\newpage
+
+
+%<--------------------------
+
+\newcommand\BibTeX{\textsc{Bib}\TeX}
+
+\begin{erratalist}
+
+\CHAPTER{General }
+
+\seriouserroronpage{general}{}{FMi}{2007/07/01}{}
+
+ To help you in assessing this errata document we have placed
+ exclamation marks in front of each entry that we consider essential
+ for correctly understanding the book contents.
+
+\erroronpage{general}{}{FMi}{2007/07/01}{}
+
+ Due to the printing process there may be small alignment problems
+ between blue and black text on some pages. These can vary from book
+ to book depending on how the paper was handled between print
+ runs---such is the analog nature of printing on a press.
+
+\CHAPTER{Front matter}
+
+\erroronpage{xxix}{para 4, l.1}{FMi/hv}{2007/08/23}{2}
+Add ``In case of \textsf{PSTricks} \u{and, for example, the \textsf{beamer}
+class} the syntax \ldots''
+
+\erroronpage{xxix}{para 5, code}{FMi}{2007/08/24}{2}
+There should be a bit more space in front of the code block
+
+\CHAPTER{Chapter 1}
+
+\erroronpage{2}{para 3, l.1}{MiV}{2008/05/22}{2}
+ ``First.'' \> ``First,''
+
+\CHAPTER{Chapter 2}
+
+\CHAPTER{Chapter 3}
+
+\CHAPTER{Chapter 4}
+
+\seriouserroronpage{152}{exa 4-1-15}{HjG}{2007/08/17}{2}
+ Output of example is missing! Oops \ldots\ it was there honest
+
+\erroronpage{177}{para 2, l.1}{MiV}{2008/05/22}{2}
+Missing interword space: ``Flowcharts\u{ }are''
+
+\CHAPTER{Chapter 5}
+
+
+\erroronpage{221}{last line}{RSh}{2008/02/13}{2}
+``down'' should be ``up''.
+
+\erroronpage{223}{}{hv}{2008/02/22}{2}
+Changed explanation for example 5-4-1 slightly (since example changed).
+
+\erroronpage{224}{exa. 5-4-1}{hv}{2008/02/22}{2}
+Coding changed to:
+\begin{verbatim}
+\begin{pspicture}(-1,-1)(2,2)
+ \psaxes{->}(0,0)(-1,-1)(2,2)
+ \parabola[linewidth=1.5pt](1,2)(-0.5,-0.5)
+ \parabola[origin={0.25,-0.5},
+ linestyle=dashed](1,2)(-0.5,-0.5)
+ \psaxes[origin={0.25,-0.5},linestyle=dashed,
+ linewidth=0.2pt]{->}(0,0)(-1,-1)(2,2)
+\end{pspicture}
+\end{verbatim}
+
+\erroronpage{240}{para 4, l.8}{MiV}{2008/05/22}{2}
+Remove backslash in:
+ ``keyword setting \verb/\showpoints=true/''
+
+\erroronpage{254}{Ex 5-9-1}{MiV}{2008/05/22}{}
+The blue circle shouldn't be visible behind the black circle. This is a
+problem due to the printing process used for the book---it does not show up on
+all books.
+
+\erroronpage{290}{Ex 5-13-22}{MSh}{2008/06/11}{2}
+Inside |\pscustom| the |\psbezier| macro needs four arguments in case
+there exists no current point (always for the first macro) and three
+arguments if the bezier curve connects to an existing line
+or curve (path).
+
+\CHAPTER{Chapter 6}
+
+\erroronpage{335}{para 5, l.4}{JMi}{2008/06/23}{2}
+``\ldots{} summarized in \u{Table} 5.2 \ldots" \> ``\ldots{} summarized in
+\u{Figure} 5.2 \ldots''
+
+\erroronpage{406}{margin}{hv}{2007/08/20}{2}
+ Missing interword space:
+ ``The\u{ }plotpoints \ldots''.
+
+\erroronpage{416}{exa 6-6-34}{hv}{2007/08/20}{2}
+ The filling (crosshatch) of the example isn't quite correct.
+
+\erroronpage{458}{para 2, l.1}{HjG}{2007/08/17}{2}
+ Missing interword space:
+ ``The\u{ }\textsf{pst-pdf} package \dots''
+
+
+\CHAPTER{Chapter 7}
+
+\erroronpage{491}{2nd line}{yhj}{2008/01/06}{2}
+The name of author of xytree package should be ``Koaunghi Un''
+but not ``Koaungli Un''. Sorry for the mistake.
+
+\CHAPTER{Chapter 8}
+
+\erroronpage{514}{tab. 8.3}{FMi}{2008/012/21}{2}
+Slightly increase spacing after hline.
+
+\erroronpage{515}{tab. 8.4}{MiV}{2008/05/22}{2}
+There should be vertical spacing in the first line (superscript $10^{24}$
+touches top line)
+
+\seriouserroronpage{579}{para 2, l.3}{MiV}{2008/05/22}{2}
+ \verb=\ln= \> \verb=\nl= (this will also change the index entry)
+
+\erroronpage{583}{para 4, l.9}{MiV}{2008/05/22}{2}
+Replace: ``of the voltage $V_C$'' \> ``of the voltage $v_C$''
+
+\CHAPTER{Chapter 9}
+
+\erroronpage{598/599}{several}{FMi}{2007/08/19}{2}
+ The text and the displayed logs talk about example 7-2-6 but afterwards two
+ more chapters got added (without the logs being regenerated), i.e., this
+ should now be 9-2-6.
+
+\CHAPTER{Chapter 10}
+
+\seriouserroronpage{683}{exa. 10-1-22}{FMi}{2007/08/26}{2}
+The example unfortunately highlights a bug in the current texmate package: a
+linebreak (in contrast to a space) is not recognized as a move separator
+resulting in all moves getting scrambled in the output, e.g., you see
+\texttt{dxe5 Bxf3 Qxf5} put together under move 4.
+
+Fix: use \texttt{;} to separate moves on linebreaks or wait for the next
+release of the package.
+
+\CHAPTER{Chapter 11}
+
+\erroronpage{720}{6th item}{MiV}{2008/05/22}{2}
+Replace: ``documentwide'' \> ``\u{D}ocumentwide''
+
+\erroronpage{726}{para 2, l.2}{MiV}{2008/05/22}{2}
+Extra space after
+parenthesis: ``( in practice''
+
+\erroronpage{740}{para 2, l.1}{MiV}{2008/05/22}{2}
+Replace: ``given
+by \textit{start\u{ row}}'' \> ``given by \textit{start} row''
+
+\seriouserroronpage{741}{Ex 11-3-5}{MiV}{2008/05/22}{2}
+Usage of
+\verb=\cellcolor= might introduce extra space in the output (as one can see in
+the example).
+
+This can be argued as being a bug in the \texttt{colortbl} package. Given that the
+basic \verb=\color= command ignores spaces after it, \verb=\cellcolor= should
+behave similarly.
+
+\seriouserroronpage{744}{line after Ex 11-3-9}{MiV}{2008/05/22}{2}
+Replace: ``This does \u{not}, of course, affect'' \>
+``This does, of course, \u{also} affect''
+
+\erroronpage{758}{para 3, l.2}{MiV}{2008/05/22}{2}
+Add small space between values and units in frame dimension
+
+\erroronpage{760}{fig. 11.1}{MiV}{2008/05/22}{2}
+
+why differs section names (``Introduction to encoding'' vs. ``Introduction''
+etc.)?
+
+Frank: because the author of this section used a real live example where he had
+used an optional argument to |\section| to make the toc have special text for
+some reason (should be mentioned in the source though).
+
+\erroronpage{774}{2nd snytax box}{hv}{2009/05/8}{2}
+The |\transduration| command takes ``time in seconds'' as mandatory argument
+(and not ``key/vals'')
+
+\erroronpage{779}{para 3, l.1}{MiV}{2008/05/22}{2}
+``in not shown''\>
+``\u{is} not shown''
+
+\erroronpage{794}{exa 11--4-36}{hv}{2009/05/12}{2}
+Replace ``pic2e'' \> ``pic\u{t}2e'' in output, corresponding input not
+displayed in the book.
+
+
+\CHAPTER{Appendix A}
+
+
+\CHAPTER{Appendix B}
+
+\erroronpage{809}{para -1, l.-1}{HjG}{2007/08/17}{2}
+ Missing interword space before opening parenthesis:
+ ``\dots \texttt{faq}\u{ }(or \dots''
+
+
+Frank: actually there is nothing missing in the source. It is a deficiency of
+the fonts.
+
+\CHAPTER{Appendix C}
+
+
+\CHAPTER{Bibliography}
+
+\erroronpage{822}{entry [32]}{MiV}{2008/05/22}{2}
+Use capital C in ``Lecture Notes in computer Science''
+
+\erroronpage{823}{entry [35]}{JPFD}{2007/09/05}{2}
+ The author name ``Eitan M. Gurai'' should be ``Eitan M. Gurari''.
+
+\erroronpage{824}{entry [47]}{GTa}{2010/02/10}{}
+ An updated version of the manual can be downloaded from
+ \url{https://www.tug.org/docs/metapost/mpman.pdf}
+
+\erroronpage{825}{entry [50]}{FMi}{2008/12/21}{2}
+Use capital C in ``Lecture Notes in computer Science''
+
+\erroronpage{826}{entry [59]}{FMi}{2008/12/21}{2}
+ Add web url: \url{http://archiv.dante.de/DTK/PDF/komoedie_2002_1.pdf}
+
+\erroronpage{826}{entry [60]}{FMi}{2008/12/21}{2}
+ Add web url: \url{http://archiv.dante.de/DTK/PDF/komoedie_2002_2.pdf}
+
+ \erroronpage{828}{entry [60]}{FMi}{2008/12/21}{2}
+ Add web url: ``Sample chapter
+ at: \url{https://www.latex-project.org/help/books/}''
+
+ \erroronpage{829/830}{editorial change}{FMi}{2008/12/21}{2}
+ Page breaks changed due to other changes
+
+\erroronpage{833}{entry [128]}{FMi}{2008/12/21}{2}
+ Url changed to: \url{obsolete/graphics/pstricks/doc/code/pst-code.pdf}
+
+
+\erroronpage{833}{entry [129]}{FMi}{2008/12/21}{2}
+ Url changed to: \url{macros/generic/multido/}
+
+
+\erroronpage{833}{entry [135]}{ADo}{2008/01/02}{2}
+An ``s'' is missing in ``using'' (end of the first line of comment)
+
+
+\CHAPTER{Index}
+
+ \erroronpage{856/860/866}{editorial change}{FMi}{2008/12/21}{2}
+ changed index entries due to changes above
+
+\erroronpage{886}{col.2, l.-7}{GTa}{2010/02/10}{}
+ image(METAPOST) should also reference example on p.145
+
+ \erroronpage{891}{editorial change}{FMi}{2008/12/21}{2}
+ changed index entries due to changes above
+
+ \erroronpage{910/911}{editorial change}{FMi}{2008/12/21}{2}
+ changed index entries due to changes above
+
+ \erroronpage{925}{editorial change}{FMi}{2008/12/21}{2}
+ changed index entries due to changes above
+
+\end{erratalist}
+
+
+\setcounter{collectmore}{3}
+
+\begin{multicols}{3}[Thanks to all who have found errors or
+ omissions. Listed are the people who found an errata entry first.]
+\contributor{ADo}{Alain Dondelinger}
+\contributor{FMi}{Frank Mittelbach}
+\contributor{GTa}{Gr\'egoire Taviot}
+\contributor{HjG}{Hubert G\"a\ss lein}
+\contributor{JPFD}{Jean-Pierre Drucbert}
+\contributor{JMi}{John Middlekauff}
+\contributor{MSh}{Michael Sharpe}
+\contributor{MiV}{Milan Vujtek}
+\contributor{RSh}{Richard Shepard}
+\contributor{hv}{Herbert Vo\ss}
+\contributor{yhj}{You Hyun Jo}
+\end{multicols}
+
+
+Other people have sent us corrections for errors already found.
+Thanks to all of you!
+
+If you find
+further
+errors please report them to one of the authors, e.g.,
+\begin{quote}\ttfamily
+ frank.mittelbach@latex-project.org
+\end{quote}
+preferably in a form usable directly in this file, i.e.,
+\begin{flushleft}
+|\erroronpage{|\textit{page-number}|}{|\textit{line-identification}|}{|%
+ \textit{your-initials}|}{|\textit{date}|}{}| \\
+ \hspace*{2em}\textit{description of the the erratum}
+\end{flushleft}
+Here is an example:
+\begin{verbatim}
+\erroronpage{5}{para 3, l.1}{MOs}{2007/07/01}{}
+ ``LaTeX'' should be typeset ``\LaTeX''.
+\end{verbatim}
+
+\end{document}
+
+
+> > In addition, with regards to content of Section 8.1 it would be nice
+> > to use Roman ``d'' in integrands in examples 3-2-3, 3-5-83, 3-5-84,
+> > 5-12-21, 6-5-6 and 6-5-11.
diff --git a/macros/latex-dev/base/lgc2.pdf b/macros/latex-dev/base/lgc2.pdf
new file mode 100644
index 0000000000..e96d0d47a6
--- /dev/null
+++ b/macros/latex-dev/base/lgc2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lppl-1-0.txt b/macros/latex-dev/base/lppl-1-0.txt
new file mode 100644
index 0000000000..9425aab83c
--- /dev/null
+++ b/macros/latex-dev/base/lppl-1-0.txt
@@ -0,0 +1,211 @@
+LaTeX Project Public License
+============================
+
+LPPL Version 1.0 1999-03-01
+
+Copyright 1999 LaTeX3 Project
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but modification is not allowed.
+
+
+Preamble
+========
+
+The LaTeX Project Public License (LPPL) is the license under which the
+base LaTeX distribution is distributed. As described below you may use
+this licence for any software that you wish to distribute.
+
+It may be particularly suitable if your software is TeX related (such
+as a LaTeX package file) but it may be used for any software, even if
+it is unrelated to TeX.
+
+To use this license, the files of your distribution should have an
+explicit copyright notice giving your name and the year, together
+with a reference to this license.
+
+A typical example would be
+
+ %% pig.sty
+ %% Copyright 2001 M. Y. Name
+
+ % This program can redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or (at your option) any later version.
+
+Given such a notice in the file, the conditions of this document would
+apply, with:
+
+`The Program' referring to the software `pig.sty' and
+`The Copyright Holder' referring to the person `M. Y. Name'.
+
+To see a real example, see the file legal.txt which carries the
+copyright notice for the base latex distribution.
+
+This license gives terms under which files of The Program may be
+distributed and modified. Individual files may have specific further
+constraints on modification, but no file should have restrictions on
+distribution other than those specified below.
+This is to ensure that a distributor wishing to distribute a complete
+unmodified copy of The Program need only check the conditions in this
+file, and does not need to check every file in The Program for extra
+restrictions. If you do need to modify the distribution terms of some
+files, do not refer to this license, instead distribute The Program
+under a different license. You may use the parts of the text of LPPL as
+a model for your own license, but your license should not directly refer
+to the LPPL or otherwise give the impression that The Program is
+distributed under the LPPL.
+
+
+
+The LaTeX Project Public License
+================================
+Terms And Conditions For Copying, Distribution And Modification
+===============================================================
+
+
+WARRANTY
+========
+
+There is no warranty for The Program, to the extent permitted by
+applicable law. Except when otherwise stated in writing, The
+Copyright Holder provides The Program `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
+program is with you. Should The Program 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 of the individual authors named in
+the source for The Program, be liable to you for damages, including
+any general, special, incidental or consequential damages arising out
+of any use of The Program or out of inability to use The Program
+(including but not limited to loss of data or data being rendered
+inaccurate or losses sustained by you or by third parties as a result
+of a failure of The Program to operate with any other programs), even
+if such holder or other party has been advised of the possibility of
+such damages.
+
+
+DISTRIBUTION
+============
+
+Redistribution of unchanged files is allowed provided that all files
+that make up the distribution of The Program are distributed.
+In particular this means that The Program has to be distributed
+including its documentation if documentation was part of the original
+distribution.
+
+The distribution of The Program will contain a prominent file
+listing all the files covered by this license.
+
+If you receive only some of these files from someone, complain!
+
+The distribution of changed versions of certain files included in the
+The Program, and the reuse of code from The Program, are allowed
+under the following restrictions:
+
+ * It is allowed only if the legal notice in the file does not
+ expressly forbid it.
+ See note below, under "Conditions on individual files".
+
+ * You rename the file before you make any changes to it, unless the
+ file explicitly says that renaming is not required. Any such changed
+ files must be distributed under a license that forbids distribution
+ of those files, and any files derived from them, under the names used
+ by the original files in the distribution of The Program.
+
+ * You change any `identification string' in The Program to clearly
+ indicate that the file is not part of the standard system.
+
+ * If The Program includes an `error report address' so that errors
+ may be reported to The Copyright Holder, or other specified
+ addresses, this address must be changed in any modified versions of
+ The Program, so that reports for files not maintained by the
+ original program maintainers are directed to the maintainers of the
+ changed files.
+
+ * You acknowledge the source and authorship of the original version
+ in the modified file.
+
+ * You also distribute the unmodified version of the file or
+ alternatively provide sufficient information so that the
+ user of your modified file can be reasonably expected to be
+ able to obtain an original, unmodified copy of The Program.
+ For example, you may specify a URL to a site that you expect
+ will freely provide the user with a copy of The Program (either
+ the version on which your modification is based, or perhaps a
+ later version).
+
+ * If The Program is intended to be used with, or is based on, LaTeX,
+ then files with the following file extensions which have special
+ meaning in LaTeX Software, have special modification rules under the
+ license:
+
+ - Files with extension `.ins' (installation files): these files may
+ not be modified at all because they contain the legal notices
+ that are placed in the generated files.
+
+ - Files with extension `.fd' (LaTeX font definitions files): these
+ files are allowed to be modified without changing the name, but
+ only to enable use of all available fonts and to prevent attempts
+ to access unavailable fonts. However, modified files are not
+ allowed to be distributed in place of original files.
+
+ - Files with extension `.cfg' (configuration files): these files
+ can be created or modified to enable easy configuration of the
+ system. The documentation in cfgguide.tex in the base LaTeX
+ distribution describes when it makes sense to modify or generate
+ such files.
+
+
+The above restrictions are not intended to prohibit, and hence do
+not apply to, the updating, by any method, of a file so that it
+becomes identical to the latest version of that file in The Program.
+
+========================================================================
+
+NOTES
+=====
+
+We believe that these requirements give you the freedom you to make
+modifications that conform with whatever technical specifications you
+wish, whilst maintaining the availability, integrity and reliability of
+The Program. If you do not see how to achieve your goal whilst
+adhering to these requirements then read the document cfgguide.tex
+in the base LaTeX distribution for suggestions.
+
+Because of the portability and exchangeability aspects of systems
+like LaTeX, The LaTeX3 Project deprecates the distribution of
+non-standard versions of components of LaTeX or of generally available
+contributed code for them but such distributions are permitted under the
+above restrictions.
+
+The document modguide.tex in the base LaTeX distribution details
+the reasons for the legal requirements detailed above.
+Even if The Program is unrelated to LaTeX, the argument in
+modguide.tex may still apply, and should be read before
+a modified version of The Program is distributed.
+
+
+Conditions on individual files
+==============================
+
+The individual files may bear additional conditions which supersede
+the general conditions on distribution and modification contained in
+this file. If there are any such files, the distribution of The
+Program will contain a prominent file that lists all the exceptional
+files.
+
+Typical examples of files with more restrictive modification
+conditions would be files that contain the text of copyright notices.
+
+ * The conditions on individual files differ only in the
+ extent of *modification* that is allowed.
+
+ * The conditions on *distribution* are the same for all the files.
+ Thus a (re)distributor of a complete, unchanged copy of The Program
+ need meet only the conditions in this file; it is not necessary to
+ check the header of every file in the distribution to check that a
+ distribution meets these requirements.
diff --git a/macros/latex-dev/base/lppl-1-1.txt b/macros/latex-dev/base/lppl-1-1.txt
new file mode 100644
index 0000000000..09cfcc9dd4
--- /dev/null
+++ b/macros/latex-dev/base/lppl-1-1.txt
@@ -0,0 +1,314 @@
+
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.1 1999-07-10
+
+Copyright 1999 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the license under which the
+base LaTeX distribution is distributed.
+
+You may use this license for any program that you have written and wish
+to distribute. This license may be particularly suitable if your
+program is TeX-related (such as a LaTeX package), but you may use it
+even if your program is unrelated to TeX. The section `WHETHER AND HOW
+TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE', below, gives instructions,
+examples, and recommendations for authors who are considering
+distributing their programs under this license.
+
+In this license document, `The Program' refers to any program
+distributed under this license.
+
+This license gives conditions under which The Program may be distributed
+and conditions under which modified versions of The Program may be
+distributed. Individual files of The Program may bear supplementary
+and/or superseding conditions on modification of themselves and on the
+distribution of modified versions of themselves, but *no* file of The
+Program may bear supplementary or superseding conditions on the
+distribution of an unmodified copy of the file. A distributor wishing
+to distribute a complete, unmodified copy of The Program therefore
+needs to check the conditions only in this license and nowhere else.
+
+Activities other than distribution and/or modification of The Program
+are not covered by this license; they are outside its scope. In
+particular, the act of running The Program is not restricted.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of The Program
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+The Program. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+in the base LaTeX distribution for suggestions.
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+You may distribute a complete, unmodified copy of The Program.
+Distribution of only part of The Program is not allowed.
+
+You may not modify in any way a file of The Program that bears a legal
+notice forbidding modification of that file.
+
+You may distribute a modified file of The Program if, and only if, the
+following eight conditions are met:
+
+ 1. You must meet any additional conditions borne by the file on the
+ distribution of a modified version of the file as described below
+ in the subsection `Additional Conditions on Individual Files of
+ The Program'.
+
+ 2. If the file is a LaTeX software file, then you must meet any
+ applicable additional conditions on the distribution of a modified
+ version of the file that are described below in the subsection
+ `Additional Conditions on LaTeX Software Files'.
+
+ 3. You must not distribute the modified file with the filename of the
+ original file.
+
+ 4. In the modified file, you must acknowledge the authorship and
+ name of the original file, and the name (if any) of the program
+ which contains it.
+
+ 5. You must change any identification string in the file to indicate
+ clearly that the modified file is not part of The Program.
+
+ 6. You must change any addresses in the modified file for the
+ reporting of errors in the file or in The Program generally to
+ ensure that reports for files no longer maintained by the original
+ maintainers will be directed to the maintainers of the modified
+ files.
+
+ 7. You must distribute the modified file under a license that forbids
+ distribution both of the modified file and of any files derived
+ from the modified file with the filename of the original file.
+
+ 8. You must do either (A) or (B):
+
+ (A) distribute a copy of The Program (that is, a complete,
+ unmodified copy of The Program) together with the modified
+ file; if your distribution of the modified file is made by
+ offering access to copy the modified file from a designated
+ place, then offering equivalent access to copy The Program
+ from the same place meets this condition, even though third
+ parties are not compelled to copy The Program along with the
+ modified file;
+
+ (B) provide to those who receive the modified file information
+ that is sufficient for them to obtain a copy of The Program;
+ for example, you may provide a Uniform Resource Locator (URL)
+ for a site that you expect will provide them with a copy of
+ The Program free of charge (either the version from which
+ your modification is derived, or perhaps a later version).
+
+Note that in the above, `distribution' of a file means making the
+file available to others by any means. This includes, for instance,
+installing the file on any machine in such a way that the file is
+accessible by users other than yourself. `Modification' of a file
+means any procedure that produces a derivative file under any
+applicable law -- that is, a file containing the original file or
+a significant portion of it, either verbatim or with modifications
+and/or translated into another language.
+
+Changing the name of a file is considered to be a modification of
+the file.
+
+The distribution conditions in this license do not have to be
+applied to files that have been modified in accordance with the
+above conditions. Note, however, that Condition 7. does apply to
+any such modified file.
+
+The conditions above are not intended to prohibit, and hence do not
+apply to, the updating, by any method, of a file so that it becomes
+identical to the latest version of that file of The Program.
+
+
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a file of The Program, even for your own
+personal use, without also meeting the above eight conditions for
+distributing the modified file. While you might intend that such
+modified files will never be distributed, often this will happen by
+accident -- you may forget that you have modified the file; or it may
+not occur to you when allowing others to access the modified file
+that you are thus distributing it and violating the conditions of
+this license. It is usually in your best interest to keep your copy
+of The Program identical with the public one. Many programs provide
+ways to control the behavior of that program without altering its
+licensed files.
+
+
+Additional Conditions on Individual Files of The Program
+--------------------------------------------------------
+
+An individual file of The Program may bear additional conditions that
+supplement and/or supersede the conditions in this license if, and only
+if, such additional conditions exclusively concern modification of the
+file or distribution of a modified version of the file. The conditions
+on individual files of The Program therefore may differ only with
+respect to the kind and extent of modification of those files that
+is allowed, and with respect to the distribution of modified versions
+of those files.
+
+
+Additional Conditions on LaTeX Software Files
+---------------------------------------------
+
+If a file of The Program is intended to be used with LaTeX (that is,
+if it is a LaTeX software file), then the following additional
+conditions, which supplement and/or supersede the conditions
+above, apply to the file according to its filename extension:
+
+ - You may not modify any file with filename extension `.ins' since
+ these are installation files containing the legal notices that are
+ placed in the files they generate.
+
+ - You may distribute modified versions of files with filename
+ extension `.fd' (LaTeX font definition files) under the standard
+ conditions of the LPPL as described above. You may also distribute
+ such modified LaTeX font definition files with their original names
+ provided that:
+ (1) the only changes to the original files either enable use of
+ available fonts or prevent attempts to access unavailable fonts;
+ (2) you also distribute the original, unmodified files (TeX input
+ paths can be used to control which set of LaTeX font definition
+ files is actually used by TeX).
+
+ - You may distribute modified versions of files with filename
+ extension `.cfg' (configuration files) with their original names.
+ The Program may (and usually will) specify the range of commands
+ that are allowed in a particular configuration file.
+
+Because of portability and exchangeability issues in LaTeX software,
+The LaTeX3 Project deprecates the distribution of modified versions of
+components of LaTeX or of generally available contributed code for them,
+but such distribution can meet the conditions of this license.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for The Program. Except when otherwise stated in
+writing, The Copyright Holder provides The Program `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 Program is with you. Should The Program prove defective, you
+assume the cost of all necessary servicing, repair, or correction.
+
+In no event unless agreed to in writing will The Copyright Holder, or
+any author named in the files of The Program, or any other party who may
+distribute and/or modify The Program as permitted below, be liable to
+you for damages, including any general, special, incidental or
+consequential damages arising out of any use of The Program or out of
+inability to use The Program (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 Program 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.
+
+
+WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE
+=========================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+programs under this license. These authors are addressed as `you' in
+this section.
+
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your program you want or need to use *distribution*
+conditions that differ from those in this license, then do not refer to
+this license anywhere in your program but instead distribute your
+program 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 program is
+distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your program is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their programs under any
+license are encouraged to read it.
+
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the files of your program both
+an explicit copyright notice including your name and the year and also
+a statement that the distribution and/or modification of the file is
+constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2001 M. Y. Name
+ %
+ % This program may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.1
+ % 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.1 or later is part of all distributions of LaTeX
+ % version 1999/06/01 or later.
+ %
+ % This program consists of the files pig.dtx and pig.ins
+
+Given such a notice and statement in a file, the conditions given in
+this license document would apply, with `The Program' referring to the
+two files `pig.dtx' and `pig.ins', and `The Copyright Holder' referring
+to the person `M. Y. Name'.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes The Program
+
+ The LPPL requires that distributions of The Program contain all the
+ files of The Program. It is therefore important that you provide a
+ way for the licensee to determine which files constitute The Program.
+ This could, for example, be achieved by explicitly listing all the
+ files of The Program near the copyright notice of each file or by
+ using a line like
+
+ % This program consists of all files listed in manifest.txt.
+
+ 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 Program.
+
+ Noting Exceptional Files
+
+ If The Program contains any files bearing additional conditions on
+ modification, or on distribution of modified versions, of those
+ files (other than those listed in `Additional Conditions on LaTeX
+ Software Files'), then it is recommended that The Program contain a
+ prominent file that defines the exceptional conditions, and either
+ lists the exceptional files or defines one or more categories of
+ exceptional files.
+
+ Files containing the text of a license (such as this file) are
+ often examples of files bearing more restrictive conditions on
+ modification. LaTeX configuration files (with filename extension
+ `.cfg') are examples of files bearing less restrictive conditions
+ on the distribution of a modified version of the file. The
+ additional conditions on LaTeX software given above are examples
+ of declaring a category of files bearing exceptional additional
+ conditions.
diff --git a/macros/latex-dev/base/lppl-1-2.txt b/macros/latex-dev/base/lppl-1-2.txt
new file mode 100644
index 0000000000..afee9416af
--- /dev/null
+++ b/macros/latex-dev/base/lppl-1-2.txt
@@ -0,0 +1,318 @@
+
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.2 1999-09-03
+
+Copyright 1999 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the license under which the
+base LaTeX distribution is distributed.
+
+You may use this license for any program that you have written and wish
+to distribute. This license may be particularly suitable if your
+program is TeX-related (such as a LaTeX package), but you may use it
+even if your program is unrelated to TeX. The section `WHETHER AND HOW
+TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE', below, gives instructions,
+examples, and recommendations for authors who are considering
+distributing their programs under this license.
+
+In this license document, `The Program' refers to any program
+distributed under this license.
+
+This license gives conditions under which The Program may be distributed
+and conditions under which modified versions of The Program may be
+distributed. Individual files of The Program may bear supplementary
+and/or superseding conditions on modification of themselves and on the
+distribution of modified versions of themselves, but *no* file of The
+Program may bear supplementary or superseding conditions on the
+distribution of an unmodified copy of the file. A distributor wishing
+to distribute a complete, unmodified copy of The Program therefore
+needs to check the conditions only in this license and nowhere else.
+
+Activities other than distribution and/or modification of The Program
+are not covered by this license; they are outside its scope. In
+particular, the act of running The Program is not restricted.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of The Program
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+The Program. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+in the base LaTeX distribution for suggestions.
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+You may distribute a complete, unmodified copy of The Program.
+Distribution of only part of The Program is not allowed.
+
+You may not modify in any way a file of The Program that bears a legal
+notice forbidding modification of that file.
+
+You may distribute a modified file of The Program if, and only if, the
+following eight conditions are met:
+
+ 1. You must meet any additional conditions borne by the file on the
+ distribution of a modified version of the file as described below
+ in the subsection `Additional Conditions on Individual Files of
+ The Program'.
+
+ 2. If the file is a LaTeX software file, then you must meet any
+ applicable additional conditions on the distribution of a modified
+ version of the file that are described below in the subsection
+ `Additional Conditions on LaTeX Software Files'.
+
+ 3. You must not distribute the modified file with the filename of the
+ original file.
+
+ 4. In the modified file, you must acknowledge the authorship and
+ name of the original file, and the name (if any) of the program
+ which contains it.
+
+ 5. You must change any identification string in the file to indicate
+ clearly that the modified file is not part of The Program.
+
+ 6. You must change any addresses in the modified file for the
+ reporting of errors in the file or in The Program generally to
+ ensure that reports for files no longer maintained by the original
+ maintainers will be directed to the maintainers of the modified
+ files.
+
+ 7. You must distribute the modified file under a license that forbids
+ distribution both of the modified file and of any files derived
+ from the modified file with the filename of the original file.
+
+ 8. You must do either (A) or (B):
+
+ (A) distribute a copy of The Program (that is, a complete,
+ unmodified copy of The Program) together with the modified
+ file; if your distribution of the modified file is made by
+ offering access to copy the modified file from a designated
+ place, then offering equivalent access to copy The Program
+ from the same place meets this condition, even though third
+ parties are not compelled to copy The Program along with the
+ modified file;
+
+ (B) provide to those who receive the modified file information
+ that is sufficient for them to obtain a copy of The Program;
+ for example, you may provide a Uniform Resource Locator (URL)
+ for a site that you expect will provide them with a copy of
+ The Program free of charge (either the version from which
+ your modification is derived, or perhaps a later version).
+
+Note that in the above, `distribution' of a file means making the
+file available to others by any means. This includes, for instance,
+installing the file on any machine in such a way that the file is
+accessible by users other than yourself. `Modification' of a file
+means any procedure that produces a derivative file under any
+applicable law -- that is, a file containing the original file or
+a significant portion of it, either verbatim or with modifications
+and/or translated into another language.
+
+Changing the name of a file (other than as necessitated by the file
+conventions of the target file systems) is considered to be a
+modification of the file.
+
+The distribution conditions in this license do not have to be
+applied to files that have been modified in accordance with the
+above conditions. Note, however, that Condition 7. does apply to
+any such modified file.
+
+The conditions above are not intended to prohibit, and hence do not
+apply to, the updating, by any method, of a file so that it becomes
+identical to the latest version of that file of The Program.
+
+
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a file of The Program, even for your own
+personal use, without also meeting the above eight conditions for
+distributing the modified file. While you might intend that such
+modified files will never be distributed, often this will happen by
+accident -- you may forget that you have modified the file; or it may
+not occur to you when allowing others to access the modified file
+that you are thus distributing it and violating the conditions of
+this license. It is usually in your best interest to keep your copy
+of The Program identical with the public one. Many programs provide
+ways to control the behavior of that program without altering its
+licensed files.
+
+
+Additional Conditions on Individual Files of The Program
+--------------------------------------------------------
+
+An individual file of The Program may bear additional conditions that
+supplement and/or supersede the conditions in this license if, and only
+if, such additional conditions exclusively concern modification of the
+file or distribution of a modified version of the file. The conditions
+on individual files of The Program therefore may differ only with
+respect to the kind and extent of modification of those files that
+is allowed, and with respect to the distribution of modified versions
+of those files.
+
+
+Additional Conditions on LaTeX Software Files
+---------------------------------------------
+
+If a file of The Program is intended to be used with LaTeX (that is,
+if it is a LaTeX software file), then the following additional
+conditions, which supplement and/or supersede the conditions
+above, apply to the file according to its filename extension:
+
+ - You may not modify any file with filename extension `.ins' since
+ these are installation files containing the legal notices that are
+ placed in the files they generate.
+
+ - You may distribute modified versions of files with filename
+ extension `.fd' (LaTeX font definition files) under the standard
+ conditions of the LPPL as described above. You may also distribute
+ such modified LaTeX font definition files with their original names
+ provided that:
+ (1) the only changes to the original files either enable use of
+ available fonts or prevent attempts to access unavailable fonts;
+ (2) you also distribute the original, unmodified files (TeX input
+ paths can be used to control which set of LaTeX font definition
+ files is actually used by TeX).
+
+ - You may distribute modified versions of files with filename
+ extension `.cfg' (configuration files) with their original names.
+ The Program may (and usually will) specify the range of commands
+ that are allowed in a particular configuration file.
+
+Because of portability and exchangeability issues in LaTeX software,
+The LaTeX3 Project deprecates the distribution of modified versions of
+components of LaTeX or of generally available contributed code for them,
+but such distribution can meet the conditions of this license.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for The Program. Except when otherwise stated in
+writing, The Copyright Holder provides The Program `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 Program is with you. Should The Program prove defective, you
+assume the cost of all necessary servicing, repair, or correction.
+
+In no event unless agreed to in writing will The Copyright Holder, or
+any author named in the files of The Program, or any other party who may
+distribute and/or modify The Program as permitted above, be liable to
+you for damages, including any general, special, incidental or
+consequential damages arising out of any use of The Program or out of
+inability to use The Program (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 Program 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.
+
+
+WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE
+=========================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+programs under this license. These authors are addressed as `you' in
+this section.
+
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your program you want or need to use *distribution*
+conditions that differ from those in this license, then do not refer to
+this license anywhere in your program but instead distribute your
+program 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 program is
+distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your program is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their programs under any
+license are encouraged to read it.
+
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the files of your program both
+an explicit copyright notice including your name and the year and also
+a statement that the distribution and/or modification of the file is
+constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2001 M. Y. Name
+ %
+ % This program may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.2
+ % 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.2 or later is part of all distributions of LaTeX
+ % version 1999/12/01 or later.
+ %
+ % This program consists of the files pig.dtx and pig.ins
+
+Given such a notice and statement in a file, the conditions given in
+this license document would apply, with `The Program' referring to the
+two files `pig.dtx' and `pig.ins', and `The Copyright Holder' referring
+to the person `M. Y. Name'.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes The Program
+
+ The LPPL requires that distributions of The Program contain all the
+ files of The Program. It is therefore important that you provide a
+ way for the licensee to determine which files constitute The Program.
+ This could, for example, be achieved by explicitly listing all the
+ files of The Program near the copyright notice of each file or by
+ using a line like
+
+ % This program consists of all files listed in manifest.txt.
+
+ 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 Program.
+
+ Noting Exceptional Files
+
+ If The Program contains any files bearing additional conditions on
+ modification, or on distribution of modified versions, of those
+ files (other than those listed in `Additional Conditions on LaTeX
+ Software Files'), then it is recommended that The Program contain a
+ prominent file that defines the exceptional conditions, and either
+ lists the exceptional files or defines one or more categories of
+ exceptional files.
+
+ Files containing the text of a license (such as this file) are
+ often examples of files bearing more restrictive conditions on
+ modification. LaTeX configuration files (with filename extension
+ `.cfg') are examples of files bearing less restrictive conditions
+ on the distribution of a modified version of the file. The
+ additional conditions on LaTeX software given above are examples
+ of declaring a category of files bearing exceptional additional
+ conditions.
+
+
+
diff --git a/macros/latex-dev/base/lppl.pdf b/macros/latex-dev/base/lppl.pdf
new file mode 100644
index 0000000000..dd5905ebfb
--- /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..bf0da5c7bb
--- /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/lppl.txt b/macros/latex-dev/base/lppl.txt
new file mode 100644
index 0000000000..e8ad0953dc
--- /dev/null
+++ b/macros/latex-dev/base/lppl.txt
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+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 `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `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.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `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 FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `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.
+
+ `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.
+
+ `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'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. 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.
+
+2. 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.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+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.
+
+4. 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.
+
+5. 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.
+
+6. 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.
+
+ a. 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.
+
+ b. 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.
+
+ c. 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.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. 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;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. 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 6, above, are met with
+regard to the Derived Work.
+
+8. 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 4, above.
+
+9. 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.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. 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 6 above, concerning changes from the Work.
+
+11. 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.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO 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.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+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:
+
+ 1. 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.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. 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 comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. 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.
+
+ 4. If you make an `intention announcement' as described in 2b. 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.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+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 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+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.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *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 `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+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.
+
+How to Use This License
+-----------------------
+
+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:
+
+ %% 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.
+
+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 `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `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.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+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 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ 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:
+
+ % This work consists of all files listed in manifest.txt.
+
+ 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.
+
diff --git a/macros/latex-dev/base/ltalloc.dtx b/macros/latex-dev/base/ltalloc.dtx
new file mode 100644
index 0000000000..5da3582e55
--- /dev/null
+++ b/macros/latex-dev/base/ltalloc.dtx
@@ -0,0 +1,176 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltalloc.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltalloc.dtx}
+ [2018/08/05 v1.1c LaTeX Kernel (allocation)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltalloc.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+\MaintainedByLaTeXTeam{latex}
+\maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.1b}{1995/10/25}{General doc improvements}
+%
+% \section{Counters}
+%
+% This section deals with counter and other variable allocation.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% The following are from plain \TeX:
+% \begin{description}
+% \item[\cs{z@}] A zero dimen or number. It's more efficient to write
+% |\parindent\z@| than |\parindent 0pt|.
+% \item[\cs{@ne}] The number 1.
+% \item[\cs{m@ne}] The number $-1$.
+% \item[\cs{tw@}] The number 2.
+% \item[\cs{sixt@@n }] The number 16.
+% \item[\cs{@m}] The number 1000.
+% \item[\cs{@MM}] The number 20000.
+% \end{description}
+%
+% \begin{macro}{\@xxxii}
+% The constant $32$.
+% \begin{macrocode}
+\chardef\@xxxii=32
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@Mi}
+% \begin{macro}{\@Mii}
+% \begin{macro}{\@Miii}
+% \begin{macro}{\@Miv}
+% Constants $10001$--$10004$.
+% \begin{macrocode}
+\mathchardef\@Mi=10001
+\mathchardef\@Mii=10002
+\mathchardef\@Miii=10003
+\mathchardef\@Miv=10004
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.0d}{1994/03/28}
+% {Redefinition of `new' allocations removed.}
+%
+% \begin{macro}{\@tempcnta}
+% \begin{macro}{\@tempcntb}
+% Scratch count registers used by \LaTeX\ kernel commands.
+% \begin{macrocode}
+\newcount\@tempcnta
+\newcount\@tempcntb
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@tempswa}
+% General boolean switch used by \LaTeX\ kernel commands.
+% \begin{macrocode}
+\newif\if@tempswa
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tempdima}
+% \begin{macro}{\@tempdimb}
+% \begin{macro}{\@tempdimc}
+% Scratch dimen registers used by \LaTeX\ kernel commands.
+% \begin{macrocode}
+\newdimen\@tempdima
+\newdimen\@tempdimb
+\newdimen\@tempdimc
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@tempboxa}
+% Scratch box register used by \LaTeX\ kernel commands.
+% \begin{macrocode}
+\newbox\@tempboxa
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tempskipa}
+% \begin{macro}{\@tempskipb}
+% Scratch skip registers used by \LaTeX\ kernel commands.
+% \begin{macrocode}
+\newskip\@tempskipa
+\newskip\@tempskipb
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@temptokena}
+% Scratch token register used by \LaTeX\ kernel commands.
+% \begin{macrocode}
+\newtoks\@temptokena
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@flushglue}
+% Glue used for |\right|- \& |\leftskip| = 0pt plus 1fil
+% \begin{macrocode}
+\newskip\@flushglue \@flushglue = 0pt plus 1fil
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/ltbibl.dtx b/macros/latex-dev/base/ltbibl.dtx
new file mode 100644
index 0000000000..79505680c4
--- /dev/null
+++ b/macros/latex-dev/base/ltbibl.dtx
@@ -0,0 +1,409 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltbibl.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltbibl.dtx}
+ [2018/11/09 v1.1r LaTeX Kernel (Bibliography)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltbibl.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Bibliography Generation}
+%
+% A bibliography is created by the |thebibliography| environment, which
+% generates a title such as ``References'', and a list of entries.
+% The BIB\TeX{} program will create a file containing such an
+% environment, which will be read in by the |\bibliography| command.
+% With BIB\TeX, the following commands will be used.
+%
+% \DescribeMacro{\bibliography}
+% |\bibliography|\marg{file1,file2, \ldots ,filen} : specifies
+% the bibdata files. Writes a |\bibdata| entry on the |.aux| file
+% and tries to read in |mainfile.bbl|.
+%
+% \DescribeMacro{\bibliographystyle}
+% |\bibliographystyle|\marg{style} :
+% Writes a |\bibstyle| entry on the |.aux| file.
+%
+% \DescribeEnv{thebibliography}
+% The |thebibliography| environment is a list environment. To save the
+% use of an extra counter, it should use |enumiv| as the item
+% counter.
+% Instead of using |\item|, items in the bibliography are produced by
+% the following commands:\\
+% |\bibitem|\marg{name} : Produces a numbered entry cited as
+% \meta{name}.\\
+% |\bibitem|\oarg{label}\marg{name} : Produces an entry labeled by
+% \meta{Label} and cited by \meta{name}.
+%
+% The former is used for bibliographies with citations like [1], [2],
+% etc.;
+% the latter is used for citations like [Knuth82].
+%
+% The document class must define the thebibliography environment. This
+% environment has a single argument, which is the widest bibliography
+% label-- e.g., if the [Knuth67] is the widest entry, then this
+% argument will be Knuth67. The |\thebibliography| command must begin
+% a list environment, which the |\endthebibliography| command ends.
+%
+% \DescribeMacro{\cite}
+% Entries are cited by the command |\cite|\marg{name}.
+%
+% \DescribeMacro{\nocite}
+% |\nocite|\marg{citations}
+% puts information on the |.aux| file that causes
+% \BibTeX{} to include the \marg{citations} list in the bibliography,
+% but puts nothing in the text.
+%
+% |\nocite{*}| is special: it tells \BibTeX{} to put the whole of a
+% collection of references into the bibiography.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/31}{Initial version of ltidxbib.dtx,
+% split from ltherest.dtx}
+% \changes{v1.1a}{1994/05/19}{Initial version of ltbibl.dtx,
+% split from ltidxbib.dtx}
+% \changes{v1.1b}{1994/05/21}{Use new warning commands}
+% \changes{v1.1c}{1994/11/10}{Fix \cs{nocite}\texttt{\char`\{*\char`\}}}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{bibliography,}
+% \end{macrocode}
+%
+%
+% \begin{oldcomments}
+% PARAMETERS
+%
+% \@cite : A macro such that \@cite{LABEL1,LABEL2}{NOTE}
+% produces the output for a \cite[NOTE]{FOO1,FOO2} command,
+% where entry FOOi is defined by \bibitem[LABELi]{FOOi}.
+% The switch @tempswa is true if the optional NOTE argument
+% is present.
+% The default definition is :
+% \@cite{LABELS}{NOTE} ==
+% BEGIN [LABELS
+% IF @tempswa = T THEN , NOTE FI
+% ]
+% END
+%
+% \@biblabel : A macro to produce the label in the bibliography
+% entry. For \bibitem[LABEL]{NAME}, the label is
+% generated by \@biblabel{LABEL}. It has the default
+% definition \@biblabel{LABEL} -> [LABEL].
+% CONVENTION
+%
+% \b@FOO : The name or number of the reference created by \cite{FOO}
+% E.g., if \cite{FOO} -> [17] , then \b@FOO -> 17.
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\bibitem}
+% \changes{v1.1g}{1995/05/08}{Removed unnecessary braces}
+% \begin{macrocode}
+\def\bibitem{\@ifnextchar[\@lbibitem\@bibitem}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@lbibitem}
+% \changes{LaTeX2.09}{1992/02/26}{Added \cs{hfill} to restore
+% left-alignment of bibliography labels in alpha style}
+% \begin{macrocode}
+\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
+ {\let\protect\noexpand
+ \immediate
+ \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@bibitem}
+% \changes{LaTeX2.09}{1991/11/13}{Changed counter enumi to enumiv,
+% as it says in the comment above}
+% \changes{LaTeX2.09}{1992/01/10}{Changed \cs{c@enumiv} to \cs{value}
+% of \cs{@listctr}}
+% \begin{macrocode}
+\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
+ {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibcite}
+% \changes{v1.1f}{1995/04/24}
+% {Make \cs{@onlypreamble} /1388.}
+% \changes{v1.1h}{1995/06/19}
+% {Call \cs{@newl@bel} so repeated keys produce better warning.}
+% \changes{v1.1i}{1995/07/14}
+% {Remove \cs{@onlypreamble} so still defined in new \cs{enddocument}}
+% \begin{macrocode}
+\def\bibcite{\@newl@bel b}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\citation}
+% \begin{macrocode}
+\let\citation\@gobble
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cite}
+% \changes{v1.1j}{1995/10/16}{(DPC) Make robust}
+% \begin{macrocode}
+\DeclareRobustCommand\cite{%
+ \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@citex}
+% |\penalty\@m| added to definition of |\@citex| to allow a line
+% break after the `,' in citations like [Jones80,Smith77]
+% (Added 23 Oct 86)
+%
+% space added after the `,' (21 Nov 87)
+%
+% \changes{LaTeX2.09}{1991/10/25}
+% {added \cs{reset@font}, suggested by Bernd Raichle.}
+% \changes{LaTeX2.09}{1991/11/06}
+% {added code to remove a leading blank}
+% \changes{LaTeX2.09}{1992/08/14}
+% {added missing argument braces around \cs{hbox},
+% found by Ed Sznyter}
+% \changes{LaTeX2.09}{1992/08/17}
+% {simplified code for removing leading blanks in
+% citation key (proposed by Frank Jensen and
+% Kresten Krab Thorup)}
+% \changes{LaTeX2.09}{1993/08/06}
+% {Moved writing to .aux file in loop over citation keys
+% so that leading blanks are removed there as well.}
+% \changes{v1.0c}{1994/05/05}{Set switch for warning and end of run.}
+% \changes{v1.1e}{1995/04/24}
+% {Add \cs{mbox} to undefined case: latex/1239.}
+% \changes{v1.1g}{1995/05/08}{Use \cs{@firstofone}}
+% \changes{v1.1k}{1995/10/20}{Removed refundefined flag}
+% \changes{v1.1l}{1995/12/07}{Restored name of \cs{G@refundefinedtrue}}
+% \changes{v1.1m}{1997/04/24}{\cs{@empty} to avoid primitive
+% error on empty cite keys. latex/2432}
+% \changes{v1.1n}{2002/12/13}{Added \cs{leavevmode} in case citation
+% is at start of paragraph (pr/3486)}
+% \begin{macrocode}
+\def\@citex[#1]#2{\leavevmode
+ \let\@citea\@empty
+ \@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+% \end{macrocode}
+% Using |\hbox| instead of |\mbox| is fine because of the
+% |\leavevmode| above. In fact the use of a box around the citation
+% contents is more than questionable in my view (FMi), but within
+% 2e I have to keep that for compatibility reasons as it would
+% probably change too many existing documents. Its main reason is
+% to avoid hyphenation of labels such as [FOOB89] into [FOO- B89]
+% so in certain styles it makes sense; but, for example, in author
+% year citations it becomes more than questionable.
+%
+% So Chris added yet another hook here, as suggested by, at least,
+% Donald Arsenau. Note that this one is inside the first argument
+% of the |\@cite| hook.
+% This decouples the top-level typesetting of the citation from
+% the details of the other business conducted here. All this really
+% needs a complete rethink to get the right modularity.
+%
+% \changes{v1.1q}{2004/02/15}{Changed to use a hook with default
+% value \cs{hbox}}
+% \begin{macrocode}
+ \@ifundefined{b@\@citeb}{\hbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue
+ \@latex@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\bibdata}
+% \begin{macro}{\bibstyle}
+% \begin{macrocode}
+\let\bibdata=\@gobble
+\let\bibstyle=\@gobble
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\bibliography}
+% \changes{LaTeX2e}{1994/01/18}
+% {Use \cs{@input@} so include files are listed.}
+% \changes{LaTeX2e}{2018/11/09}
+% {Zap spaces in the argument as BibTeX doesn't support them (github/88)}
+% \begin{macrocode}
+\def\bibliography#1{%
+ \if@filesw
+ \immediate\write\@auxout{\string\bibdata{\zap@space#1 \@empty}}%
+ \fi
+ \@input@{\jobname.bbl}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bibliographystyle}
+% \changes{v1.1d}{1994/12/09}{(DPC) Allow use in preamble.}
+% \begin{macrocode}
+\def\bibliographystyle#1{%
+ \ifx\@begindocumenthook\@undefined\else
+ \expandafter\AtBeginDocument
+ \fi
+ {\if@filesw
+ \immediate\write\@auxout{\string\bibstyle{#1}}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\nocite}
+% (Added 14 Jun 85)
+% \changes{v1.1c}{1994/11/10}{Fix \cs{nocite}\texttt{\char`\{*\char`\}}}
+%
+% This puts information on the |.aux| file that causes
+% \BibTeX{} to include the citation list in the bibliography,
+% but puts nothing in the text.
+%
+% RmS 93/08/06: Made loop for |\nocite| like that for |\@citex|,
+% to get rid of leading spaces.
+% \changes{v1.0b}{1994/05/03}{Make \cs{nocite} issue a warning
+% for an undefined citation key.}
+% \changes{v1.0c}{1994/05/05}{Do not write page number in
+% \cs{nocite} warning message.}
+% \changes{v1.0c}{1994/05/05}{Set switch for warning and end of run.}
+% \changes{v1.1g}{1995/05/08}{Use \cs{@firstofone}}
+% \changes{v1.1k}{1995/10/20}{Removed refundefined flag}
+% \begin{macrocode}
+\def\nocite#1{\@bsphack
+% \end{macrocode}
+% With the implementation designed already in \LaTeX\,2.09 the
+% |\nocite| command will not work before |\begin{document}| since
+% it tries to write to the |.aux| file which is not open before
+% that point. As a result the ``reference'' will appear on the
+% terminal and nothing else will happen.
+%
+% This would be easy to fix, but then a document using the fix will
+% silently fail on an older release of \LaTeX{}, missing all
+% citations done with |\nocite|. Thus we do only generate an error
+% message and leave the fix for a \LaTeXe{} successor.
+%
+% \changes{v1.1o}{2003/05/18}{Check if we are after \cs{document}}
+% \changes{v1.1p}{2004/01/04}{Changed error message}
+% \begin{macrocode}
+ \ifx\@onlypreamble\document
+% \end{macrocode}
+% Since we are after |\begin{document}| we can do the citations:
+% \begin{macrocode}
+ \@for\@citeb:=#1\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\G@refundefinedtrue
+ \@latex@warning{Citation `\@citeb' undefined}}{}}%
+ \else
+% \end{macrocode}
+% But before |\begin{document}| we raise an error message:
+% \begin{macrocode}
+ \@latex@error{Cannot be used in preamble}\@eha
+% \end{macrocode}
+% Without the compatibility problems we could fix the problem as follows:
+% \begin{macrocode}
+ % \AtBeginDocument{\nocite{#1}}
+ \fi
+ \@esphack}
+% \end{macrocode}
+% Since |\nocite{*}| should not produce a warning about undefined
+% citation keys (seee PR 557), we need to set the control sequence
+% `|\b@*|' to something other than |\relax|. As a result |\cite{*}|
+% will not warn either (but that never worked with \BibTeX{} in the
+% first place).
+% \begin{macrocode}
+\expandafter\let\csname b@*\endcsname\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Default definitions}
+%
+% This hook determines the `relative formatting' of the two logical
+% parts of a citation with comment.
+% \begin{macro}{\@cite}
+% \begin{macrocode}
+\def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@cite@ofmt}
+% \changes{v1.1q}{2004/02/15}{Added hook with default value \cs{hbox}}
+% This is, in general, a command that appears to have one argument
+% whose value is, in the kernel, a single cs whose name is the
+% expansion of |b@\@citeb|; the expansion of this cs will
+% typically be some hmode material that produces the detailed
+% typeset form of just the citations themselves.
+% \begin{macrocode}
+\let\@cite@ofmt\hbox
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@biblabel}
+% \changes{LaTeX2.09}{1992/01/14}{removed \cs{hfill}}
+% \begin{macrocode}
+\def\@biblabel#1{[#1]}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltboxes.dtx b/macros/latex-dev/base/ltboxes.dtx
new file mode 100644
index 0000000000..6bfbc38af9
--- /dev/null
+++ b/macros/latex-dev/base/ltboxes.dtx
@@ -0,0 +1,1306 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltboxes.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltboxes.dtx}
+ [2017/03/29 v1.3a LaTeX Kernel (Box Commands)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltboxes.dtx}
+\title{\filename}
+\date{\filedate}
+\author{David Carlisle\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.1e}{1998/08/17}{(RmS) Minor Documentation fixes.}
+% \section{\LaTeX\ Box commands}
+%
+%
+% \DescribeMacro\makebox
+% |\makebox[|\meta{wid}|][|\meta{pos}|]{|\meta{obj}|}|\\
+% Puts \meta{obj} in an |\hbox| of width \meta{wid}, positioned by
+% \meta{pos}.
+%
+% The possible \meta{pos} are:\\
+% \begin{tabular}{ll}
+% |s| stretched,\\
+% |l| flushleft,\\
+% |r| flushright,\\
+% |c| (default) centred.
+% \end{tabular}
+%
+% If \meta{wid} is missing, then \meta{pos} is also missing and
+% \meta{obj} is put in an |\hbox| of its natural width.
+%
+% |\makebox(|\meta{x}|,|\meta{y}|)[|\meta{pos}|]{|\meta{obj}|}|\\
+% Puts \meta{obj} in an |\hbox| of width $x * |\unitlength|$
+% and height $y * |\unitlength|$.
+% \meta{pos} arguments are
+% |s|, |l|, |r| or |c| (default) for stretched, flushleft, flushright
+% or centred, and |t| or |b|
+% for top, bottom -- or combinations like |tr| or |rb|.
+% Default for horizontal and vertical are centered.
+% Note that in this picture mode version of |\makebox| a [b] aligns on
+% the \emph{bottom} of the text as documented. If you want to align on
+% the \emph{baseline} use
+% |\makebox( , )[b]{\raisebox{0pt}[\height][0pt]{xyz}}}|
+% or |\makebox( , )[b]{\smash{xyz}}|
+%
+% \DescribeMacro\mbox
+% |\mbox{|\meta{obj}|}| The same as |\makebox{|\meta{obj}|}|, but is
+% more efficient as no checking for optional arguments is done.
+%
+% \DescribeMacro\newsavebox
+% |\newsavebox{\cmd}| : If |\cmd| is undefined, then defines it
+% to be a \TeX\ box register.
+%
+% \DescribeMacro\savebox
+% |\savebox{\cmd}| ... : |\cmd| is defined to be a \TeX\ box register,
+% and the '...' are any |\makebox| arguments. It is
+% like |\makebox|, except it doesn't produce text but
+% saves the value in |\box| |\cmd|.
+%
+% \DescribeMacro\sbox
+% |\sbox{|\meta{cmd}|}{|\meta{obj}|}| is an efficient abbreviation for\\
+% |\savebox{|\meta{cmd}|}{|\meta{obj}|}|.
+%
+% \DescribeEnv{lrbox}
+% |\begin{lrbox}{|\meta{cmd}|}|\meta{text}|\end{lrbox}| is equivalent
+% to\\
+% |\sbox{|\meta{cmd}|}{|\meta{text}|}|\\
+% except that any white space at the beginning and end of \meta{text}
+% is ignored.
+%
+% \DescribeMacro\framebox
+% |\framebox| ... : like |\makebox|, except it puts a `frame' around
+% the box. The frame is made of lines of thickness
+% |\fboxrule|, separated by space |\fboxsep| from the
+% text -- except for |\framebox(X,Y)| ... , where the
+% thickness of the lines is as for the picture environment,
+% and there is no separation added.
+%
+% \DescribeMacro\fbox
+% |\fbox{|\meta{obj}|}| is an abbreviation for
+% |\framebox{|\meta{obj}|}|.
+%
+% \DescribeMacro\parbox
+% |\parbox[|\meta{pos}|][|\meta{height}|][|\meta{inner-pos}|]{|^^A
+% \meta{width}|}{|\meta{text}|}| :
+% Makes a box with |\hsize| \meta{width}, positioned by \meta{pos} as
+% follows:
+% c : |\vcenter| (placed in |$...$| if not in math mode)
+% b : |\vbox|
+% t : |\vtop|
+% default value is c.
+% Sets |\hsize| := \meta{width} and calls |\@parboxrestore|, which
+% does the following:
+% Restores the original definitions of:
+%
+% \begin{tabular}{l}
+% |\par|\\
+% |\\|\\
+% |\-|\\
+% |\'|\\
+% | \`|\\
+% |\=|
+% \end{tabular}
+%
+% Resets the following parameters:
+%
+% \begin{tabular}{l@{\quad=\quad}ll}
+% |\parindent| & 0pt \\
+% |\parskip| & 0pt & added 20 Jan 87\\
+% |\linewidth| & |\hsize|\\
+% |\@totalleftmargin| & 0pt\\
+% |\leftskip| & 0pt\\
+% |\rightskip| & 0pt\\
+% |\@rightskip| & 0pt\\
+% |\parfillskip| & 0pt plus 1fil\\
+% |\lineskip| & |\normallineskip|\\
+% |\baselineskip| & |\normalbaselineskip|
+% \end{tabular}
+%
+% Calls |\sloppy|
+%
+% Note: |\@arrayparboxrestore| same as |\@parboxrestore|
+% but it doesn't restore |\\|.
+%
+% \DescribeEnv{minipage}
+% |minipage| : Similar to |\parbox|, except it also
+% makes this look like a page by setting
+%
+% |\textwidth| == |\columnwidth| == box width
+%
+% changes footnotes by redefining:\\%
+% |\@mpfn| == mpfootnote \\
+% |\thempfn| == |\thempfootnote|\\
+% |\@footnotetext| == |\@mpfootnotetext|
+%
+% resets the following list environment parameters:\\
+% |\@listdepth| == |\@mplistdepth|\\
+% where |\@mplistdepth| is initialized to zero,
+%
+% and executes |\@minipagerestore| to allow the document
+% style to reset any other parameters it desires.
+% It sets |@minipage| true, and resets |\everypar| to set
+% it false. This switch keeps |\addvspace| from putting space
+% at the top of a minipage.
+%
+% Change added 24 May 89: |\minipage| sets |@minipage| globally;
+% |\endminipage| resets it false.
+%
+%
+% \DescribeMacro\rule
+% |\rule[|\meta{raised}|]{|\meta{width}|}{|\meta{height}|}| :
+% Makes a $\meta{width}*\meta{height}$ rule, raised \meta{raised}.
+%
+% \DescribeMacro\underline
+% |\underline{|\meta{text}|}| : Makes an underlined hbox with
+% \meta{text} in it.
+%
+% \DescribeMacro\raisebox
+% |\raisebox{|\meta{distance}|}[|\meta{height}|][|\meta{depth}^^A
+% |]{|\meta{box}|}| :\\
+% Raises \meta{box} up by \meta{distance} length (down if
+% \meta{distance} negative). Makes \TeX\ think that the new box extends
+% \meta{height} above the line and \meta{depth} below, for a total
+% vertical length of \meta{height}+\meta{depth}. Default values of
+% \meta{height} \& \meta{depth} = actual height and depth of box in new
+% position.
+%
+% \StopEventually{}
+%
+% \changes{v0.1e}{1994/03/02}{Remove need for drv file}
+% \changes{v0.1e}{1994/03/02}{Add 2ekernel module}
+% \changes{v1.0a}{1994/03/07}{Unify format with other Kernel files}
+% \changes{v1.0f}{1994/05/11}
+% {Superfluous braces removed from several commands}
+% \changes{v1.0j}{1994/10/18}
+% {stuff from ltpatch done}
+% \changes{v1.0p}{1994/11/09}
+% {more colour changes\ldots}
+% \changes{v1.0q}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0t}{1995/05/07}{Use \cs{hb@xt@}}
+% \changes{v1.0w}{1995/10/16}{Clarify makebox description}
+% \begin{macrocode}
+%<*2ekernel>
+\message{boxes,}
+% \end{macrocode}
+%
+% \begin{macro}{\makebox}
+% \changes{v0.1a}{1993/12/03}
+% {modified}
+% |\makebox| User level command just looks for optional |[| or |(|.
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\makebox}{Make \makebox robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\makebox{%
+ \leavevmode
+ \@ifnextchar(%)
+ \@makepicbox
+ {\@ifnextchar[\@makebox\mbox}}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\makebox}{Make \makebox robust}%
+%<latexrelease>\def\makebox{%
+%<latexrelease> \leavevmode
+%<latexrelease> \@ifnextchar(%)
+%<latexrelease> \@makepicbox
+%<latexrelease> {\@ifnextchar[\@makebox\mbox}}%
+%<latexrelease>\expandafter\let\csname makebox \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mbox}
+% \changes{v0.1a}{1993/12/03}
+% {extra group}
+% \changes{v1.0j}{1994/10/18}
+% {\cs{long} added}
+% The basic horizontal box command for \LaTeX.
+% \begin{macrocode}
+\long\def\mbox#1{\leavevmode\hbox{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makebox}
+% \changes{v0.1a}{1993/12/03}
+% {default changed from x to c}
+% Look for a possible second optional argument (defaults to |c|).
+% \begin{macrocode}
+\def\@makebox[#1]{%
+ \@ifnextchar [{\@imakebox[#1]}{\@imakebox[#1][c]}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@begin@tempboxa}
+% \changes{v0.1a}{1993/12/03}
+% {macro added}
+% \changes{v0.1b}{1993/12/08}
+% {Extra braces for color support
+% (braces removed from other macros)}
+% \changes{v1.0f}{1994/05/11}
+% {Use new \cs{color@setgroup} concept.}
+% Helper macro for supporting |\height|, |\width| etc. Grab |#1| into
+% |\@tempboxa| and measure it.
+% \begin{macrocode}
+\long\def\@begin@tempboxa#1#2{%
+ \begingroup
+ \setbox\@tempboxa#1{\color@begingroup#2\color@endgroup}%
+ \def\width{\wd\@tempboxa}%
+ \def\height{\ht\@tempboxa}%
+ \def\depth{\dp\@tempboxa}%
+ \let\totalheight\@ovri
+ \totalheight\height
+ \advance\totalheight\depth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@end@tempboxa}
+% \changes{v0.1a}{1993/12/03}
+% {macro added}
+% End the group started by |\@begin@tempboxa|, so that the scope of
+% |\height| only includes the `length' argument to the user-command.
+% \begin{macrocode}
+\let\@end@tempboxa\endgroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bm@c}
+% \begin{macro}{\bm@l}
+% \begin{macro}{\bm@r}
+% \begin{macro}{\bm@s}
+% \begin{macro}{\bm@t}
+% \begin{macro}{\bm@b}
+% \changes{v0.1a}{1993/12/03}
+% {macros added}
+% Set up spacing.
+% \begin{macrocode}
+\def\bm@c{\hss\unhbox\@tempboxa\hss}
+\def\bm@l{\unhbox\@tempboxa\hss}\let\bm@t\bm@l
+\def\bm@r{\hss\unhbox\@tempboxa}\let\bm@b\bm@r
+\def\bm@s{\unhbox\@tempboxa}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@imakebox}
+% \changes{v0.1a}{1993/12/03}
+% {macro modified}
+% Internal form of |\makebox|.
+% \begin{macrocode}
+\long\def\@imakebox[#1][#2]#3{%
+ \@begin@tempboxa\hbox{#3}%
+ \setlength\@tempdima{#1}% support calc
+ \hb@xt@\@tempdima{\csname bm@#2\endcsname}%
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makepicbox}
+% \changes{v0.1a}{1993/12/03}
+% {macro modified}
+% Picture mode form of |\makebox|.
+% \begin{macrocode}
+\def\@makepicbox(#1,#2){%
+ \@ifnextchar[{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@imakepicbox}
+% picture mode version
+% \begin{macrocode}
+\long\def\@imakepicbox(#1,#2)[#3]#4{%
+ \vbox to#2\unitlength
+ {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
+ \let\mb@t\vss
+ \@tfor\reserved@a :=#3\do{%
+ \if s\reserved@a
+ \let\mb@l\relax\let\mb@r\relax
+ \else
+ \expandafter\let\csname mb@\reserved@a\endcsname\relax
+ \fi}%
+ \mb@t
+ \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
+ \mb@b
+% \end{macrocode}
+% This kern ensures that a |b| option aligns on the bottom of the
+% text rather than the baseline. this is the documented behaviour in
+% the \LaTeX Book. The kern is removed in compatibility mode.
+% \begin{macrocode}
+ \kern\z@}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\set@color}
+% \changes{v0.1a}{1993/12/03}
+% {macro added}
+% \changes{v0.1a}{1993/12/03}
+% {color support}
+% This macro is initially a no-op, but the colour package will redefine
+% it to insert a |\special|.
+% \begin{macrocode}
+\let\set@color\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\color@begingroup}
+% \changes{v1.0b}{1994/03/14}
+% {macro added for colour support}
+% \begin{macro}{\color@endgroup}
+% \changes{v1.0b}{1994/03/14}
+% {macro added for colour support}
+% \begin{macro}{\color@setgroup}
+% \changes{v1.0f}{1994/05/11}
+% {macro added for colour support}
+% \begin{macro}{\normalcolor}
+% \changes{v1.0g}{1994/05/12}
+% {macro added for colour support}
+% \begin{macro}{\color@hbox}
+% \changes{v1.0n}{1994/11/05}
+% {macro added for colour support}
+% \begin{macro}{\color@vbox}
+% \changes{v1.0r}{1994/11/18}
+% {macro added for colour support}
+% \begin{macro}{\color@endbox}
+% \changes{v1.0n}{1994/11/05}
+% {macro added for colour support}
+% These macros are initially a no-op, but the colour package will
+% redefine them to be |\begingroup|, |\endgroup|,
+% |\begingroup\set@color|,\\ |\hbox\bgroup\color@begingroup|,
+% |\color@endgroup\egroup|.
+% and \meta{set to main document colour} respectively.
+% \begin{macrocode}
+\let\color@begingroup\relax
+\let\color@endgroup\relax
+\let\color@setgroup\relax
+\let\normalcolor\relax
+\let\color@hbox\relax
+\let\color@vbox\relax
+\let\color@endbox\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newsavebox}
+% \changes{v0.1a}{1993/12/03}
+% {Pass the whole of arg 1 to \cs{@ifdefinable}}
+% Allocate a new `savebox'.
+% \begin{macrocode}
+\def\newsavebox#1{\@ifdefinable{#1}{\newbox#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\savebox}
+% Save |#1| in a box register.
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\savebox}{Make \savebox robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\savebox[1]{%
+ \@ifnextchar(%)
+ {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\savebox}{Make \savebox robust}%
+%<latexrelease>\def\savebox#1{%
+%<latexrelease> \@ifnextchar(%)
+%<latexrelease> {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}%
+%<latexrelease>\expandafter\let\csname savebox \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sbox}
+% \changes{v0.1a}{1993/12/03}
+% {extra group}
+% \changes{v0.1a}{1993/12/03}
+% {color support}
+% \changes{v1.0b}{1994/03/14}
+% {Use \cs{color@setgroup}}
+% \changes{v1.0j}{1994/10/18}
+% {\cs{long} added}
+% Save |#1| in a box register.
+% \begin{macrocode}
+\long\def\sbox#1#2{\setbox#1\hbox{%
+ \color@setgroup#2\color@endgroup}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@savebox}
+% \changes{v0.1a}{1993/12/03}
+% {default c not x}
+% Look for second optional argument.
+% \begin{macrocode}
+\def\@savebox#1[#2]{%
+ \@ifnextchar [{\@isavebox#1[#2]}{\@isavebox#1[#2][c]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@isavebox}
+% \changes{v0.1a}{1993/12/03}
+% {extra group}
+% \changes{v0.1a}{1993/12/03}
+% {color support}
+% \changes{v1.0b}{1994/03/14}
+% {Use \cs{color@setgroup}}
+% \changes{v1.0d}{1994/04/15}
+% {Added missing procent character.}
+% \changes{v1.0v}{1995/07/20}
+% {Use \cs{sbox}}
+% \begin{macrocode}
+\long\def\@isavebox#1[#2][#3]#4{%
+ \sbox#1{\@imakebox[#2][#3]{#4}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@savepicbox}
+% Picture mode version of |\savebox|.
+% \begin{macrocode}
+\def\@savepicbox#1(#2,#3){%
+ \@ifnextchar[%]
+ {\@isavepicbox#1(#2,#3)}{\@isavepicbox#1(#2,#3)[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@isavepicbox}
+% \changes{v0.1a}{1993/12/03}
+% {extra group}
+% \changes{v1.0b}{1994/03/14}
+% {Use \cs{color@setgroup}}
+% \changes{v1.0l}{1994/10/25}
+% {missing percent (moved from ltpatch)}
+% \changes{v1.0v}{1995/07/20}
+% {Use \cs{sbox}}
+% Picture mode version of |\savebox|.
+% \begin{macrocode}
+\long\def\@isavepicbox#1(#2,#3)[#4]#5{%
+ \sbox#1{\@imakepicbox(#2,#3)[#4]{#5}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\lrbox}
+% \changes{v0.1a}{1993/12/03}
+% {macro added}
+% \changes{v0.1a}{1993/12/03}
+% {color support}
+% \changes{v0.1b}{1993/12/08}
+% {move \cs{@endpefalse} out of the inner group}
+% \changes{v1.0b}{1994/03/14}
+% {Use \cs{color@setgroup}}
+% |lrbox|: the new environment form of |\sbox|. Use |\aftergroup| tricks
+% to enable a \emph{local} assignment to be made to the box, in a way
+% that it still has an effect \emph{outside} the |lrbox| environment.
+% \begin{macrocode}
+\def\lrbox#1{%
+ \edef\reserved@a{%
+ \endgroup
+ \setbox#1\hbox{%
+ \begingroup\aftergroup}%
+ \def\noexpand\@currenvir{\@currenvir}%
+ \def\noexpand\@currenvline{\on@line}}%
+ \reserved@a
+ \@endpefalse
+ \color@setgroup
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\endlrbox}
+% \changes{v0.1a}{1993/12/03}
+% {macro added}
+% End the |lrbox| environment.
+% \begin{macrocode}
+\def\endlrbox{\unskip\color@endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\usebox}
+% unchanged
+% \begin{macrocode}
+\def\usebox#1{\leavevmode\copy #1\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\frame}
+%
+% The following definition of |\frame| was written by Pavel Curtis
+% (Extra space removed 14 Jan 88)
+% RmS 92/08/24: Replaced occurrence of |\@halfwidth| by |\@wholewidth|
+% \begin{macrocode}
+\long\def\frame#1{%
+ \leavevmode
+ \hbox{%
+ \hskip-\@wholewidth
+ \vbox{%
+ \vskip-\@wholewidth
+ \hrule \@height\@wholewidth
+ \hbox{%
+ \vrule\@width\@wholewidth
+ #1%
+ \vrule\@width\@wholewidth}%
+ \hrule\@height\@wholewidth
+ \vskip-\@wholewidth}%
+ \hskip-\@wholewidth}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fboxrule}
+% \begin{macro}{\fboxsep}
+% user level parameters,
+% \begin{macrocode}
+\newdimen\fboxrule
+\newdimen\fboxsep
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fbox}
+% Abbreviated framed box command.
+% \changes{v0.1a}{1993/12/03}
+% {extra group}
+% \changes{v1.0g}{1994/05/12}
+% {New definition, merged with \cs{framebox}}
+% \changes{v1.0i}{1994/06/01}
+% {New version, using \cs{@frameb@x}}
+% \changes{v1.0j}{1994/10/18}
+% {\cs{long} added}
+% \changes{v1.0k}{1994/10/24}
+% {Inner braces added (to fix latex/1061)}
+% \changes{v1.0s}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1512}
+% \begin{macrocode}
+\long\def\fbox#1{%
+ \leavevmode
+ \setbox\@tempboxa\hbox{%
+ \color@begingroup
+ \kern\fboxsep{#1}\kern\fboxsep
+ \color@endgroup}%
+ \@frameb@x\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\framebox}
+% Framed version of |\makebox|.
+% \changes{v1.0g}{1994/05/12}
+% {Merged \cs{fbox} and \cs{framebox}}
+% \changes{v1.0i}{1994/06/01}
+% {New version, so \cs{width} is correct in \cs{framebox}}
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\framebox}{Make \framebox robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\framebox{%
+ \@ifnextchar(%)
+ \@framepicbox{\@ifnextchar[\@framebox\fbox}}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\framebox}{Make \framebox robust}%
+%<latexrelease>\def\framebox{%
+%<latexrelease> \@ifnextchar(%)
+%<latexrelease> \@framepicbox{\@ifnextchar[\@framebox\fbox}}%
+%<latexrelease>\expandafter\let\csname framebox \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@framebox}
+% Deal with optional arguments.
+% \begin{macrocode}
+\def\@framebox[#1]{%
+ \@ifnextchar[%]
+ {\@iframebox[#1]}%
+ {\@iframebox[#1][c]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iframebox}
+% The handling the optional arguments.
+% \changes{v1.0i}{1994/06/01}
+% {New version, so \cs{width} is correct in \cs{framebox}}
+% \changes{v1.0j}{1994/10/18}
+% {\cs{leavevmode} moved to \cs{@frameb@x}}
+% \changes{v1.0s}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1512}
+% In order to set the whole box, including the frame to the
+% specified dimension, we first determine that dimension
+% from the natural size of the text, |#3|.
+% calculated width.
+% \begin{macrocode}
+\long\def\@iframebox[#1][#2]#3{%
+ \leavevmode
+ \@begin@tempboxa\hbox{#3}%
+ \setlength\@tempdima{#1}%
+ \setbox\@tempboxa\hb@xt@\@tempdima
+ {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}%
+ \@frameb@x{\kern-\fboxrule}%
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@frameb@x}
+% Common part of |\framebox| and |\fbox|. |#1| is a negative kern
+% in the |\framebox| case so that the vertical rules do not add to the
+% width of the box.
+% \changes{v1.0i}{1994/06/01}
+% {Macro added.}
+% \changes{v1.0j}{1994/10/18}
+% {\cs{leavevmode} added}
+% \changes{v1.0s}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1512}
+% \begin{macrocode}
+\def\@frameb@x#1{%
+ \@tempdima\fboxrule
+ \advance\@tempdima\fboxsep
+ \advance\@tempdima\dp\@tempboxa
+ \hbox{%
+ \lower\@tempdima\hbox{%
+ \vbox{%
+ \hrule\@height\fboxrule
+ \hbox{%
+ \vrule\@width\fboxrule
+ #1%
+ \vbox{%
+ \vskip\fboxsep
+ \box\@tempboxa
+ \vskip\fboxsep}%
+ #1%
+ \vrule\@width\fboxrule}%
+ \hrule\@height\fboxrule}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@framepicbox}
+% Picture mode version.
+% \begin{macrocode}
+\def\@framepicbox(#1,#2){%
+ \@ifnextchar[{\@iframepicbox(#1,#2)}{\@iframepicbox(#1,#2)[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iframepicbox}
+% Picture mode version.
+% \begin{macrocode}
+\long\def\@iframepicbox(#1,#2)[#3]#4{%
+ \frame{\@imakepicbox(#1,#2)[#3]{#4}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parbox}
+% \changes{v0.1a}{1993/12/03}
+% {Redefined to support extra optional arguments}
+% \changes{v0.1d}{1993/12/15}
+% {Changed default from `c' to `s'}
+% The main vertical-box command for \LaTeX.
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\parbox}{Make \parbox robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\parbox{%
+ \@ifnextchar[%]
+ \@iparbox
+ {\@iiiparbox c\relax[s]}}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\parbox}{Make \parbox robust}%
+%<latexrelease>\def\parbox{%
+%<latexrelease> \@ifnextchar[%]
+%<latexrelease> \@iparbox
+%<latexrelease> {\@iiiparbox c\relax[s]}}%
+%<latexrelease>\expandafter\let\csname parbox \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iparbox}
+% \changes{v0.1d}{1993/12/15}
+% {Changed default from `c' to `s'}
+% Optional argument handling.
+% \begin{macrocode}
+\def\@iparbox[#1]{%
+ \@ifnextchar[%]
+ {\@iiparbox{#1}}%
+ {\@iiiparbox{#1}\relax[s]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iiparbox}
+% Optional argument handling.
+% \begin{macrocode}
+\def\@iiparbox#1[#2]{%
+ \@ifnextchar[%]
+ {\@iiiparbox{#1}{#2}}%
+ {\@iiiparbox{#1}{#2}[#1]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iiiparbox}
+% \begin{macro}{\@parboxto}
+% \changes{v1.0j}{1994/10/18}
+% {Macro added to remove misuse of \cs{@empty}}
+% \changes{v0.1b}{1993/12/08}
+% {\cs{endgraf} added due to extra group in \cs{@begin@tempboxa}}
+% \changes{v1.0y}{1996/06/10}
+% {(DPC) Changed \cs{endgraf} to \cs{@@par}}
+% \changes{v1.1f}{1999/04/27}
+% {(CAR) Changed \cs{@empty} to \cs{relax} as flag for natural
+% width: pr/2975}
+% \changes{v1.1g}{2006/05/18}
+% {Ensure \cs{@parboxto} holds the value of \cs{@tempdimb} not the
+% register itself (pr/3867)}
+% The internal version of |\parbox|.
+% \begin{macrocode}
+\let\@parboxto\@empty
+\long\def\@iiiparbox#1#2[#3]#4#5{%
+ \leavevmode
+ \@pboxswfalse
+ \setlength\@tempdima{#4}%
+ \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
+ \ifx\relax#2\else
+ \setlength\@tempdimb{#2}%
+ \edef\@parboxto{to\the\@tempdimb}%
+ \fi
+ \if#1b\vbox
+ \else\if #1t\vtop
+ \else\ifmmode\vcenter
+ \else\@pboxswtrue $\vcenter
+ \fi\fi\fi
+ \@parboxto{\let\hss\vss\let\unhbox\unvbox
+ \csname bm@#3\endcsname}%
+ \if@pboxsw \m@th$\fi
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.0c}{1994/04/12}
+% {Remove \cs{@acci}, now defined in ltplain.dtx}
+% \changes{v1.0c}{1994/04/12}
+% {Remove \cs{@dischyph}, now defined in ltinit.dtx}
+%
+% \begin{macro}{\@arrayparboxrestore}
+% Restore various paragraph parameters.
+%
+% The rational for allowing two normally global flags to be set
+% locally here was stated originally by
+% Donald Arsenau and extended by Chris Rowley.
+% It is because these flags are only set globally to
+% true by section commands, and these should never appear within
+% boxes or, indeed, in any group; and they are only ever
+% set globally to false when they are definitely true.
+%
+% If anyone is unhappy with this argument then both flags should be
+% treated as in |\set@nobreak|; otherwise this command will be
+% redundant.
+% \changes{v1.1a}{1996/10/24}{Added local settings of flags: dangerous!!}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017-04-15}%
+%<latexrelease> {\normallineskiplimit}
+%<latexrelease> {reset \lineskiplimit}%
+%<*2ekernel|latexrelease>
+\def\@arrayparboxrestore{%
+ \let\if@nobreak\iffalse
+ \let\if@noskipsec\iffalse
+ \let\par\@@par
+ \let\-\@dischyph
+% \end{macrocode}
+% Redefined accents to allow changes in font encoding
+% \changes{v1.0h}{1994/05/13}
+% {New accent system, use \cs{let} not \cs{def}}
+% \begin{macrocode}
+ \let\'\@acci\let\`\@accii\let\=\@acciii
+ \parindent\z@ \parskip\z@skip
+ \everypar{}%
+ \linewidth\hsize
+ \@totalleftmargin\z@
+ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
+ \parfillskip\@flushglue
+ \lineskip\normallineskip
+% \end{macrocode}
+% \changes{v1.3a}{2017/03/29}
+% {Reset \cs{lineskiplimit}}
+% \begin{macrocode}
+ \lineskiplimit\normallineskiplimit
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \baselineskip\normalbaselineskip
+ \sloppy}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}%
+%<latexrelease> {\normallineskiplimit}
+%<latexrelease> {reset \lineskiplimit}%
+%<latexrelease>\def\@arrayparboxrestore{%
+%<latexrelease> \let\if@nobreak\iffalse
+%<latexrelease> \let\if@noskipsec\iffalse
+%<latexrelease> \let\par\@@par
+%<latexrelease> \let\-\@dischyph
+%<latexrelease> \let\'\@acci\let\`\@accii\let\=\@acciii
+%<latexrelease> \parindent\z@ \parskip\z@skip
+%<latexrelease> \everypar{}%
+%<latexrelease> \linewidth\hsize
+%<latexrelease> \@totalleftmargin\z@
+%<latexrelease> \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
+%<latexrelease> \parfillskip\@flushglue \lineskip\normallineskip
+%<latexrelease> \baselineskip\normalbaselineskip
+%<latexrelease> \sloppy}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parboxrestore}
+% Restore various paragraph parameters, and also |\\|.
+% \begin{macrocode}
+\def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@minipage}
+% Switch that is true at the start of a minipage.
+% \changes{v1.0z}{1996/07/26}{put \cs{global} into definition}
+% \begin{macrocode}
+\def\@minipagefalse{\global\let\if@minipage\iffalse}
+\def\@minipagetrue {\global\let\if@minipage\iftrue}
+\@minipagefalse
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\minipage}
+% \changes{v0.1a}{1993/12/03}
+% {Redefined to support extra optional arguments}
+% \changes{v0.1d}{1993/12/15}
+% {extra space removed.}
+% \changes{v0.1d}{1993/12/15}
+% {Changed default from `c' to `s'}
+% Essentially an environment form of |\parbox|.
+% \begin{macrocode}
+\def\minipage{%
+ \@ifnextchar[%]
+ \@iminipage
+ {\@iiiminipage c\relax[s]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iminipage}
+% \changes{v0.1d}{1993/12/15}
+% {Changed default from `c' to `s'}
+% Optional argument handling.
+% \begin{macrocode}
+\def\@iminipage[#1]{%
+ \@ifnextchar[%]
+ {\@iiminipage{#1}}%
+ {\@iiiminipage{#1}\relax[s]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iiminipage}
+% Optional argument handling.
+% \begin{macrocode}
+\def\@iiminipage#1[#2]{%
+ \@ifnextchar[%]
+ {\@iiiminipage{#1}{#2}}%
+ {\@iiiminipage{#1}{#2}[#1]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iiiminipage}
+% \changes{v1.0e}{1994/04/21}
+% {Extra \cs{bgroup} for colour}
+% \changes{v1.0f}{1994/05/11}
+% {Use new \cs{color@setgroup} concept.}
+% Internal form of |minipage|.
+% \changes{v1.1a}{1996/10/24}{Use it or lose it (@setminpage): Frank
+% will want to lose it}
+% \begin{macrocode}
+\def\@iiiminipage#1#2[#3]#4{%
+ \leavevmode
+ \@pboxswfalse
+ \setlength\@tempdima{#4}%
+ \def\@mpargs{{#1}{#2}[#3]{#4}}%
+ \setbox\@tempboxa\vbox\bgroup
+ \color@begingroup
+ \hsize\@tempdima
+ \textwidth\hsize \columnwidth\hsize
+ \@parboxrestore
+ \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
+ \let\@footnotetext\@mpfootnotetext
+ \let\@listdepth\@mplistdepth \@mplistdepth\z@
+ \@minipagerestore
+ \@setminipage}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@minipagerestore}
+% Hook so that other styles can reset other commands in a minipage.
+% \begin{macrocode}
+ \let\@minipagerestore=\relax
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\endminipage}
+% \changes{LaTeX209}{1992/08/14}
+% {(RmS) replaced \cs{vskip}-\cs{lastskip} by \cs{unskip}
+% (proposed by FMi)}
+% \changes{v1.0e}{1994/04/21}
+% {Extra \cs{egroup} for colour}
+% \changes{v1.0f}{1994/05/11}
+% {Use new \cs{color@setgroup} concept.}
+% \changes{v1.0n}{1994/11/05}
+% {Colour resetting for footnotes moved to here: as for main
+% page.}
+% \begin{macrocode}
+\def\endminipage{%
+ \par
+ \unskip
+ \ifvoid\@mpfootins\else
+ \vskip\skip\@mpfootins
+ \normalcolor
+ \footnoterule
+ \unvbox\@mpfootins
+ \fi
+ \@minipagefalse %% added 24 May 89
+ \color@endgroup
+ \egroup
+ \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@mplistdepth}
+% \begin{macro}{\@mpfootins}
+% Versions of |\@listdepth| and |\footins| local to minipage.
+% \begin{macrocode}
+\newcount\@mplistdepth
+\newinsert\@mpfootins
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@mpfootnotetext}
+% Minipage version of |\@footnotetext|.
+%
+% Final |\strut| added 27 Mar 89, on suggestion by Don Hosek
+% \changes{LaTeX2.09}{1991/09/29}{(RmS) added \cs{reset@font}}
+% \changes{LaTeX2.09}{1992/11/26}{(RmS) added protection for \cs{edef}}
+% \changes{v0.1a}{1994/03/07}{Extra group for colour}
+% \changes{v1.0e}{1994/04/21}
+% {Extra \cs{endgraf} for colour}
+% \changes{v1.0f}{1994/05/11}
+% {Use new \cs{color@setgroup} concept.}
+% \changes{v1.0f}{1994/05/11}
+% {Use new \cs{normalcolor} and \cs{@finalstrut}.}
+% \changes{v1.0m}{1994/11/04}
+% {Added \cs{protected@edef}. ASAJ.}
+% \changes{v1.0n}{1994/11/05}
+% {Colour resetting for footnotes moved to endminipage: as for main
+% page.}
+% \changes{v1.0o}{1994/11/05}
+% {Colour groups restored here.}
+% \begin{macrocode}
+\long\def\@mpfootnotetext#1{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\newif\if@pboxsw
+% \end{macrocode}
+%
+% \begin{macro}{\rule}
+% Draw a rule of the specified size.
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\rule}{Make \rule robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\rule{\@ifnextchar[\@rule{\@rule[\z@]}}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\rule}{Make \rule robust}%
+%<latexrelease>\def\rule{\@ifnextchar[\@rule{\@rule[\z@]}}%
+%<latexrelease>\expandafter\let\csname rule \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@rule}
+% Internal form of |\rule|.
+% \changes{v1.1c}{1998/06/04}{Support calc-expressions}
+% \begin{macrocode}
+ \def\@rule[#1]#2#3{%
+ \leavevmode
+ \hbox{%
+ \setlength\@tempdima{#1}%
+ \setlength\@tempdimb{#2}%
+ \setlength\@tempdimc{#3}%
+ \advance\@tempdimc\@tempdima
+ \vrule\@width\@tempdimb\@height\@tempdimc\@depth-\@tempdima}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@underline}
+% Saved primitive |\underline|.
+% \begin{macrocode}
+\let\@@underline\underline
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\underline}
+% \LaTeX\ version works outside math.
+% \task{???}{why the second `relax in `underline ?}
+% \begin{macrocode}
+\def\underline#1{%
+ \relax
+ \ifmmode\@@underline{#1}%
+ \else $\@@underline{\hbox{#1}}\m@th$\relax\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\raisebox}
+% \changes{v0.1a}{1993/12/03}
+% {redefined to support \cs{height}}
+% \changes{v1.0s}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1512}
+% Raise a box, and change its vertical dimensions.
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\raisebox}{Make \raisebox robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\raisebox[1]{%
+ \leavevmode
+ \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\raisebox}{Make \raisebox robust}%
+%<latexrelease>\def\raisebox#1{%
+%<latexrelease> \leavevmode
+%<latexrelease> \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}}
+%<latexrelease>\expandafter\let\csname raisebox \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@rsbox}
+% Optional argument handling.
+% \begin{macrocode}
+\def\@rsbox#1[#2]{%
+ \@ifnextchar[{\@iirsbox{#1}[#2]}{\@irsbox{#1}[#2]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@argrsbox}
+% \changes{v0.1a}{1993/12/03}
+% {macro removed}
+% ...
+% \end{macro}
+%
+% \begin{macro}{\@irsbox}
+% \changes{v0.1a}{1993/12/03}
+% {redefined to support \cs{height}}
+% \changes{v0.1b}{1993/12/08}
+% {fix typo}
+% \changes{v0.1c}{1993/12/09}
+% {fix another typo}
+% \changes{v0.1f}{1994/03/03}
+% {Replaced a missing \cs{else}}
+% \changes{v1.0s}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1512}
+% \changes{v1.0u}{1995/05/17}
+% {Removed surplus braces}
+% Internal version of |\raisebox| (less than two optional args).
+% \begin{macrocode}
+\long\def\@irsbox#1[#2]#3{%
+ \@begin@tempboxa\hbox{#3}%
+ \setlength\@tempdima{#1}%
+ \ifx\\#2\\\else\setlength\@tempdimb{#2}\fi
+ \setbox\@tempboxa\hbox{\raise\@tempdima\box\@tempboxa}%
+ \ifx\\#2\\\else\ht\@tempboxa\@tempdimb\fi
+ \box\@tempboxa
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iirsbox}
+% \changes{v0.1a}{1993/12/03}
+% {redefined to support \cs{height}}
+% \changes{v1.0s}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1512}
+% Internal version of |\raisebox| (two optional args).
+% \begin{macrocode}
+\long\def\@iirsbox#1[#2][#3]#4{%
+ \@begin@tempboxa\hbox{#4}%
+ \setlength\@tempdima{#1}%
+ \setlength\@tempdimb{#2}%
+ \setlength\dimen@{#3}%
+ \setbox\@tempboxa\hbox{\raise\@tempdima\box\@tempboxa}%
+ \ht\@tempboxa\@tempdimb
+ \dp\@tempboxa\dimen@
+ \box\@tempboxa
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@finalstrut}
+% This macro adds a special strut the \emph{depth} of the box given as
+% |#1|, and height and width 0pt. It is used for ensuring that the
+% last line of a paragraph has the correct depth in `p' columns of
+% tables and in footnotes. In vertical mode nothing is done, as adding
+% the strut (as done in 2.09) would start a new paragraph. It would be
+% possible to inspect |\prevdepth| to check the depth of the
+% just-completed paragraph, but we do not do that here.
+% \changes{v1.0g}{1994/05/12}
+% {macro added}
+% Actually we do even less now, skip the vmode test as it broke tabular
+% `p' columns.
+% \changes{v1.0p}{1994/11/09}
+% {Revert \cs{finalstrut} to 2.09 equivalent (from ltpatch)}.
+% \changes{v1.0x}{1995/10/31}
+% {Add \cs{nobreak} in horiz mode to allow hyphenation.
+% internal/1931}
+%
+% The |\nobreak| was added (1995/10/31) to allow hyphenation of the
+% final word of the paragraph.
+% \begin{macrocode}
+\def\@finalstrut#1{%
+ \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Some low-level constructs}
+%
+% The following commands are basically inherited from plain \TeX.
+%
+% \begin{macro}{\leftline}
+% \begin{macro}{\rightline}
+% \begin{macro}{\centerline}
+% \begin{macro}{\@@line}
+% These macros place text on a full line either centred or left or
+% right adjusted.
+% \begin{macrocode}
+\def\@@line{\hb@xt@\hsize}
+\def\leftline#1{\@@line{#1\hss}}
+\def\rightline#1{\@@line{\hss#1}}
+\def\centerline#1{\@@line{\hss#1\hss}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\rlap}
+% \begin{macro}{\llap}
+% These macros place text to the left or right of the current
+% reference point without taking up space.
+% \end{macro}
+% \begin{macrocode}
+\def\rlap#1{\hb@xt@\z@{#1\hss}}
+\def\llap#1{\hb@xt@\z@{\hss#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+\endinput
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltclass.dtx b/macros/latex-dev/base/ltclass.dtx
new file mode 100644
index 0000000000..b3a2331013
--- /dev/null
+++ b/macros/latex-dev/base/ltclass.dtx
@@ -0,0 +1,2598 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltclass.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltclass.dtx}
+ [2019/07/09 v1.3a LaTeX Kernel (Class & Package Interface)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltclass.dtx}
+\begin{document}
+\title{The main structure of documents}
+\author{Frank Mittelbach\and Chris Rowley\and Alan Jeffrey\and
+ David Carlisle}
+\date{\filedate}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+% \iffalse
+% (C) Copyright Frank Mittelbach, Chris Rowley,
+% Alan Jeffrey and David Carlisle 1993-1998.
+% All rights reserved.
+% \fi
+%
+%
+% \changes{v0.2f}{1993/11/22}
+% {\cs{@unknownversion} removed}
+% \changes{v1.0j}{1994/10/18}
+% {Move \cs{listfiles} to ltfiles.dtx}
+% \changes{v1.0f}{1994/05/22}{Use new warning and error commands}
+% \changes{v1.0l}{1994/11/17}{\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0z}{1998/03/21}{Added to documentation of filecontents}
+% \changes{v1.1c}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+%
+% \section{Introduction}
+%
+% This file implements the following declarations, which replace
+% |\documentstyle| in \LaTeXe\ documents.
+%
+% Note that old documents containing |\documentstyle| will be run using
+% a compatibility option---thus keeping everyone happy, we hope!
+%
+% The overall idea is that there are two types of `style files':
+% `class files' which define elements and provide a default formatting
+% for them; and `packages' which provide extra functionality. One
+% difference between \LaTeXe\ and \LaTeX2.09 is that \LaTeXe\ packages
+% may have options. Note that options to classes packages may be
+% implemented such that they input files, but these file names are not
+% necessarily directly related to the option name.
+%
+% \section{User interface}
+%
+% |\documentclass[|\meta{main-option-list}|]{|^^A
+% \meta{class}|}[|\meta{version}|]|
+%
+% There must be exactly one such declaration, and it must come first.
+% The \meta{main-option-list} is a list of options which can modify the
+% formatting of elements which are defined in the \meta{class} file
+% as well as in all following |\usepackage| declarations (see below).
+% The \meta{version} is a version number, beginning with a date in the
+% format |YYYY/MM/DD|. If an older version of the class is found, a
+% warning is issued.
+%
+% \bigskip
+%
+% |\documentstyle[|\meta{main-option-list}|]{|^^A
+% \meta{class}|}[|\meta{version}|]|
+%
+% The |\documentstyle| declaration is kept in order to maintain upward
+% compatibility with \LaTeX2.09 documents. It is similar to
+% |\documentclass|, but it causes all options in
+% \meta{main-option-list} that the \meta{class} does not use to be
+% passed to |\RequirePackage| after the options have been processed.
+% This maintains compatibility with the 2.09 behaviour. Also a flag is
+% set to indicate that the document is to be processed in \LaTeX2.09
+% compatibility mode. As far as most packages are concerned, this
+% only affects the warnings and errors \LaTeX\ generates. This flag
+% does affect the definition of font commands, and |\sloppy|.
+%
+% \bigskip
+%
+% |\usepackage[|\meta{package-option-list}|]{|^^A
+% \meta{package-list}|}[|\meta{version}|]|
+%
+% There can be any number of these declarations. All packages in
+% \meta{package-list} are called with the same options.
+%
+% Each \meta{package} file defines new elements (or modifies those
+% defined in the \meta{class}), and thus extends the range of documents
+% which can be processed.
+% The \meta{package-option-list} is a list of options which can modify
+% the formatting of elements defined in the \meta{package} file.
+% The \meta{version} is a version number, beginning with a date in the
+% format |YYYY/MM/DD|. If an older version of the package is found, a
+% warning is issued.
+%
+% Each package is loaded only once. If the same package is requested
+% more than once, nothing happens, unless the package has been requested
+% with options that were not given the first time it was loaded, in
+% which case an error is produced.
+%
+% As well as processing the options given in the
+% \meta{package-option-list}, each package processes the
+% \meta{main-option-list}. This means that options that affect all
+% of the packages can be given globally, rather than repeated for every
+% package.
+%
+% Note that class files have the extension |.cls|, packages have the
+% extension |.sty|.
+%
+% \DescribeEnv{filecontents}
+% The environment |filecontents| is intended for passing the contents
+% of packages, options, or other files along with a document in a
+% single file.
+% It has one argument, which is the name of the file to create. If that
+% file already exists (maybe only in the current directory if the OS
+% supports a notion of a `current directory' or `default directory')
+% then nothing happens
+% (except for an information message) and the body of the environment
+% is bypassed. Otherwise, the body of the environment is written
+% verbatim to the file name given as the first argument, together with
+% some comments about how it was produced.
+%
+% The environment is allowed only before |\documentclass| to ensure
+% that all packages or options necessary for this particular run are
+% present when needed. The begin and end tags should each be on a
+% line by itself. There is also a star-form; this does not write
+% extra comments into the file.
+%
+% \subsection{Option processing}
+%
+% When the options are processed, they are divided into two types: {\em
+% local\/} and {\em global}:
+% \begin{itemize}
+%
+% \item For a class, the options in the |\documentclass| command are
+% local.
+%
+% \item For a package, the options in the |\usepackage| command are
+% local, and the options in the |\documentclass| command are global.
+%
+% \end{itemize}
+% The options for |\documentclass| and |\usepackage|
+% are processed in the following way:
+% \begin{enumerate}
+%
+% \item The local and global options that have been declared
+% (using |\DeclareOption| as described below) are processed
+% first.
+%
+% In the case of |\ProcessOptions|, they are processed in the order
+% that they were declared in the class or package.
+%
+% In the case of |\ProcessOptions*|, they are processed in the order
+% that they appear in the option-lists. First the global options, and
+% then the local ones.
+%
+% \item Any remaining local options are dealt with using the default
+% option (declared using the |\DeclareOption*| declaration described
+% below). For document classes, this usually does nothing, but
+% records the option on a list of unused options.
+% For packages, this usually produces an error.
+%
+% \end{enumerate}
+% Finally, when |\begin{document}| is reached, if there are any global
+% options which have not been used by either the class or any package,
+% the system will produce a warning.
+%
+%
+% \section{Class and Package interface}
+%
+% \subsection{Class name and version}
+%
+% \DescribeMacro\ProvidesClass
+% A class can identify itself with the
+% |\ProvidesClass{|\meta{name}|}[|\meta{version}|]| command. The
+% \meta{version} should begin with a date in the format |YYYY/MM/DD|.
+%
+% \subsection{Package name and version}
+%
+% \DescribeMacro\ProvidesPackage
+% A package can identify itself with the
+% |\ProvidesPackage|\marg{name}\oarg{version} command. The
+% \meta{version} should begin with a date in the format |YYYY/MM/DD|.
+%
+% \subsection{Requiring other packages}
+%
+% \DescribeMacro\RequirePackage
+% Packages or classes can load other packages using\\
+% |\RequirePackage|\oarg{options}\marg{name}\oarg{version}.\\
+% If the package has already been loaded, then nothing happens unless
+% the requested options are not a subset of the options with which it
+% was loaded, in which case an error is called.
+%
+% \DescribeMacro\LoadClass
+% Similar to |\RequirePackage|, but for classes, may not be used in
+% package files.
+%
+% \DescribeMacro\PassOptionsToPackage
+% Packages can pass options to other packages using:\\
+% |\PassOptionsToPackage{|\meta{options}|}{|\meta{package}|}|.\\
+% \DescribeMacro\PassOptionsToClass
+% This adds the \meta{options} to the options list of any future
+% |\RequirePackage| or |\usepackage| command. For example:
+% \begin{verbatim}
+% \PassOptionsToPackage{foo,bar}{fred}
+% \RequirePackage[baz]{fred}\end{verbatim}
+% is the same as:
+% \begin{verbatim}
+% \RequirePackage[foo,bar,baz]{fred}\end{verbatim}
+%
+% \DescribeMacro\LoadClassWithOptions
+% |\LoadClassWithOptions|\marg{name}\oarg{version}:\\
+% This is similar to
+% |\LoadClass|, but it always calls class \meta{name} with
+% exactly the same option list that is being used by the current class,
+% rather than an option explicitly supplied or passed on by
+% |\PassOptionsToClass|.
+% \DescribeMacro\RequirePackageWithOptions
+% |\RequirePackageWithOptions| is the analogous command for packages.
+%
+% This is mainly intended to allow one class to simply build on another,
+% for example:
+%\begin{verbatim}
+% \LoadClassWithOptions{article}
+%\end{verbatim}
+%
+% This should be contrasted with the slightly different construction
+%\begin{verbatim}
+% \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+% \ProcessOptions
+% \LoadClass{article}
+%\end{verbatim}
+%
+% As used here, the effects are more or less the same, but the
+% version using |\LoadClassWithOptions| is slightly quicker
+% (and less to type).
+% If, however, the class declares options of its own then
+% the two constructions are different; compare, for example:
+%\begin{verbatim}
+% \DeclareOption{landscape}{...}
+% \ProcessOptions
+% \LoadClassWithOptions{article}
+%\end{verbatim}
+% with:
+%\begin{verbatim}
+% \DeclareOption{landscape}{...}
+% \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+% \ProcessOptions
+% \LoadClass{article}
+%\end{verbatim}
+% In the first case, the \textsf{article} class will be called with
+% option |landscape| precisely when the current class is called with
+% this option; but in the second example it will
+% not as in that case \textsf{article} is only passed options by the
+% default option handler, which is not used for |landscape| as that
+% option is explicitly declared.
+%
+% \DescribeMacro\@ifpackageloaded
+% To find out if a package has already been loaded, use\\
+% \DescribeMacro\@ifclassloaded
+% |\@ifpackageloaded{|\meta{package}|}{|\meta{true}|}{|\meta{false}|}|.
+%
+% \DescribeMacro\@ifpackagelater
+% \changes{v1.1i}{2013/07/07}{Correctly describe how the date in
+% \cs{@ifpackagelater} is used}
+% To find out if a package has already been loaded with a version
+% equal to or more
+% recent than \meta{version}, use\\
+% \DescribeMacro\@ifclasslater
+% |\@ifpackagelater{|\meta{package}|}{|\meta{version}|}{|^^A
+% \meta{true}|}{|\meta{false}|}|.
+%
+% \DescribeMacro\@ifpackagewith
+% To find out if a package has already been loaded with at least the
+% options \meta{options}, use
+% \DescribeMacro\@ifclasswith
+% |\@ifpackagewith{|\meta{package}|}{|\meta{options}|}{|^^A
+% \meta{true}|}{|\meta{false}|}|.
+%
+% There exists one package that can't be tested with the above
+% commands: the \texttt{fontenc} package pretends that it was never
+% loaded to allow for repeated reloading with different options (see
+% \texttt{ltoutenc.dtx} for details).
+%
+%
+% \subsection{Declaring new options}
+%
+% Options for classes and packages are built using the same macros.
+%
+% \DescribeMacro\DeclareOption To define a builtin option, use
+% |\DeclareOption{|\meta{name}|}{|\meta{code}|}|.
+%
+% \DescribeMacro{\DeclareOption*} To define the default action to
+% perform for local options which have not been declared, use
+% |\DeclareOption*{|\meta{code}|}|.
+%
+% {\em Note\/}: there should be no use of\\
+% |\RequirePackage|, |\DeclareOption|, |\DeclareOption*| or
+% |\ProcessOptions|\\
+% inside |\DeclareOption| or |\DeclareOption*|.
+%
+% Possible uses for |\DeclareOption*| include:
+%
+% |\DeclareOption*{}|\\
+% Do nothing. Silently accept unknown options. (This suppresses the
+% usual warnings.)
+%
+% |\DeclareOption*{\@unkownoptionerror}|\\
+% Complain about unknown local options. (The initial setting for
+% package files.)
+%
+% |\DeclareOption*{\PassOptionsToPackage{\CurrentOption}|^^A
+% |{|\meta{pkg-name}|}|\\
+% Handle the the current option by passing it on to the package
+% \meta{pkg-name}, which will presumably be loaded via
+% |\RequirePackage| later in the file. This is useful for building
+% `extension' packages, that perhaps handle a couple of new options,
+% but then pass everything else on to an existing package.
+%
+% |\DeclareOption*{\InputIfFileExists{xx-\CurrentOption.yyy}%|\\
+% | {}%|\\
+% | {\OptionNotUsed}}|\\
+% Handle the option foo by loading the file |xx-foo.yyy| if it
+% exists, otherwise do nothing, but declare that the option was not
+% used.
+% Actually the |\OptionNotUsed| declaration is only needed if this is
+% being used in class files, but does no harm in package files.
+%
+%
+% \subsection{Safe Input Macros}
+% \DescribeMacro{\InputIfFileExists}
+% |\InputIfFileExists{|\meta{file}|}{|\meta{then}|}{|\meta{else}|}|\\
+% Inputs \meta{file} if it exists. Immediately before the input,
+% \meta{then} is executed. Otherwise \meta{else} is executed.
+%
+% \DescribeMacro{\IfFileExists}
+% As above, but does not input the file.
+%
+% One thing you might like to put in the \meta{else} clause is
+%
+% \DescribeMacro{\@missingfileerror}
+% This starts an interactive request for a filename, supplying default
+% extensions. Just hitting return causes the whole input to be skipped
+% and entering |x| quits the current run,
+%
+% \DescribeMacro{\input}
+% This has been redefined from the \LaTeX2.09 definition, in terms of
+% the new commands |\InputIfFileExists| and |\@missingfileerror|.
+%
+%
+% \DescribeMacro{\listfiles} Giving this declaration in the preamble
+% causes a list of all files input via the `safe input' commands to be
+% listed at the end. Any strings specified in the optional argument to
+% |\ProvidesPackage| are listed alongside the file name. So files in
+% standard (and other non-standard) distributions can put informative
+% strings in this argument.
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+% \changes{v0.2g}{1993/11/23}
+% {Various macros now moved to latex.tex.}
+% \changes{v0.2g}{1993/11/23}
+% {Warnings and errors now directly coded.}
+% \changes{v0.2h}{1993/11/28}
+% {Primitive filenames now terminated by space not \cs{relax}.}
+% \changes{v0.2h}{1993/11/28}
+% {Directory syntax checing moved to dircheck.dtx}
+% \changes{v0.2h}{1993/11/28}
+% {Assorted commands now in the kernel removed.}
+% \changes{v0.2i}{1993/12/03}
+% {\cs{@onlypreamble}: Many commands declared.}
+% \changes{v0.2i}{1993/12/03}
+% {Removed obsolete \cs{@documentclass}}
+% \changes{v0.2o}{1993/12/13}
+% {Removed setting \cs{errorcontextlines}\ (now in latex.tex)}
+% \changes{v0.2p}{1993/12/15}
+% {Removed extra `.'s from \cs{@@warning}s}
+% \changes{v0.2s}{1994/01/17}
+% {Added many more \cs{@onlypreamble} commands}
+% \changes{v0.2s}{1994/01/17}
+% {Wrapped long lines to column 72}
+% \changes{v0.3a}{1994/03/02}
+% {Remove need for driver file}
+% \changes{v0.3b}{1994/03/08}
+% {Modify driver code into `new style'}
+% \changes{v0.3c}{1994/03/12}
+% {Change name from docclass to ltclass}
+% \changes{v0.3h}{1994/04/25}
+% {Removed spurious extra `.'s at the end of error messages}
+% \changes{v1.0a}{1994/04/29}
+% {Change version number to 1 (no other change)}
+% \changes{v1.0k}{1994/11/03}
+% {Move \cs{@missingfileerror} to ltfiles}
+%
+% \begin{macro}{\if@compatibility}
+% The flag for compatibility mode.
+% \begin{macrocode}
+\newif\if@compatibility
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@documentclasshook}
+% The hook called after the first |\documentclass| command. By
+% default this checks to see if |\@normalsize| is undefined, and if
+% so, sets it to |\normalsize|.
+% \changes{v0.2q}{1993/12/17}
+% {Macro added}
+% \changes{v0.2z}{1994/02/10}
+% {Changed the name from \cs{@compatibility} to
+% \cs{@documentclasshook}, and added the check for whether
+% \cs{@normalsize} has been defined. ASAJ.}
+% \begin{macrocode}
+\def\@documentclasshook{%
+ \ifx\@normalsize\@undefined
+ \let\@normalsize\normalsize
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@declaredoptions}
+% This list is automatically built by |\DeclareOption|.
+% It is the list of options (separated by commas) declared in
+% the class or package file and it defines the order in which the
+% the corresponding |\ds@|\meta{option} commands are executed.
+% All local \meta{option}s which are not declared will be processed
+% in the order defined by the optional argument of |\documentclass|
+% or |\usepackage|.
+% \begin{macrocode}
+\let\@declaredoptions\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@classoptionslist}
+% List of options of the main class.
+% \changes{v1.0u}{1996/07/26}{made only preamble}
+% \begin{macrocode}
+\let\@classoptionslist\relax
+\@onlypreamble\@classoptionslist
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@unusedoptionlist}
+% \changes{v1.0u}{1996/07/26}{made only preamble}
+% List of options of the main class that haven't been declared or
+% loaded as class option files.
+% \begin{macrocode}
+\let\@unusedoptionlist\@empty
+\@onlypreamble\@unusedoptionlist
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CurrentOption}
+% Name of current package or option.
+% \changes{v0.2c}{1993/11/17}
+% {Name changed from \cs{@curroption}}
+% \begin{macrocode}
+\let\CurrentOption\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@currname}
+% Name of current package or option.
+% \begin{macrocode}
+\let\@currname\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@currext}
+% The current file extension.
+% \changes{v0.2a}{1993/11/14}{Name changed from \cs{@currextension}}
+% \begin{macrocode}
+\global\let\@currext=\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@clsextension}
+% \begin{macro}{\@pkgextension}
+% The two possible values of |\@currext|.
+% \begin{macrocode}
+\def\@clsextension{cls}
+\def\@pkgextension{sty}
+\@onlypreamble\@clsextension
+\@onlypreamble\@pkgextension
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@pushfilename}
+% \begin{macro}{\@popfilename}
+% \begin{macro}{\@currnamestack}
+% Commands to push and pop the file name and extension. \\
+% |#1| current name. \\
+% |#2| current extension. \\
+% |#3| current catcode of |@|. \\
+% |#4| Rest of the stack.
+% \begin{macrocode}
+\def\@pushfilename{%
+ \xdef\@currnamestack{%
+ {\@currname}%
+ {\@currext}%
+ {\the\catcode`\@}%
+ \@currnamestack}}
+\@onlypreamble\@pushfilename
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil}
+\@onlypreamble\@popfilename
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@p@pfilename#1#2#3#4\@nil{%
+ \gdef\@currname{#1}%
+ \gdef\@currext{#2}%
+ \catcode`\@#3\relax
+ \gdef\@currnamestack{#4}}
+\@onlypreamble\@p@pfilename
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\@currnamestack{}
+\@onlypreamble\@currnamestack
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@ptionlist}
+% Returns the option list of the file.
+% \begin{macrocode}
+\def\@ptionlist#1{%
+ \@ifundefined{opt@#1}\@empty{\csname opt@#1\endcsname}}
+\@onlypreamble\@ptionlist
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifpackageloaded}
+% \begin{macro}{\@ifclassloaded}
+% |\@ifpackageloaded{|\meta{name}|}|
+% Checks to see whether a file has been loaded.
+% \changes{v0.2t}{1994/01/18}
+% {Fix typo \cs{@pkgetension}}
+% \begin{macrocode}
+\def\@ifpackageloaded{\@ifl@aded\@pkgextension}
+\def\@ifclassloaded{\@ifl@aded\@clsextension}
+\@onlypreamble\@ifpackageloaded
+\@onlypreamble\@ifclassloaded
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@ifl@aded#1#2{%
+ \expandafter\ifx\csname ver@#2.#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\@onlypreamble\@ifl@aded
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@ifpackagelater}
+% \begin{macro}{\@ifclasslater}
+% |\@ifpackagelater{|\meta{name}|}{YYYY/MM/DD}|
+% Checks that the package loaded is more recent than the given date.
+% \begin{macrocode}
+\def\@ifpackagelater{\@ifl@ter\@pkgextension}
+\def\@ifclasslater{\@ifl@ter\@clsextension}
+\@onlypreamble\@ifpackagelater
+\@onlypreamble\@ifclasslater
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@ifl@ter#1#2{%
+ \expandafter\@ifl@t@r
+ \csname ver@#2.#1\endcsname}
+\@onlypreamble\@ifl@ter
+%</2ekernel>
+% \end{macrocode}
+%
+% This internal macro is also used in |\NeedsTeXFormat|.
+% \changes{v0.2f}{1993/11/22}
+% {Added //00 so parsing never produces a runaway argument.}
+% \changes{v1.2d}{2018/02/18}
+% {Added 0 up front to make bad data come out as 0.}
+% \changes{v1.2g}{2018/04/08}
+% {Strip leading spaces from dates.}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2018/04/01}%
+%<latexrelease> {\@ifl@t@r}{Guard against bad input}%
+%<*2ekernel|latexrelease>
+\def\@ifl@t@r#1#2{%
+ \ifnum\expandafter\@parse@version@#1//00\@nil<%
+ \expandafter\@parse@version@#2//00\@nil
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\def\@parse@version@#1{\@parse@version0#1}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@ifl@t@r}{Guard against bad input}%
+%<latexrelease>\def\@ifl@t@r#1#2{%
+%<latexrelease> \ifnum\expandafter\@parse@version#1//00\@nil<%
+%<latexrelease> \expandafter\@parse@version#2//00\@nil
+%<latexrelease> \expandafter\@secondoftwo
+%<latexrelease> \else
+%<latexrelease> \expandafter\@firstoftwo
+%<latexrelease> \fi}
+%<latexrelease>\let\@parse@version@\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\@ifl@t@r
+% \end{macrocode}
+%
+% \changes{v1.1j}{2016/06/20}
+% {don't declare as \cs{@onlypreamble}}
+% \changes{v1.2c}{2017/03/08}
+% {add \cs{@parse@version@dash} to support yyyy-mm-dd as well as yyyy/mm/dd }
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexreleasefirst>
+\def\@parse@version#1/#2/#3#4#5\@nil{%
+\@parse@version@dash#1-#2-#3#4\@nil
+}
+% \end{macrocode}
+%
+% The |\if| test here ensures that an argument with no |/| or |-| produces 0 (actually 00).
+% \begin{macrocode}
+\def\@parse@version@dash#1-#2-#3#4#5\@nil{%
+ \if\relax#2\relax\else#1\fi#2#3#4 }
+%</2ekernel|latexreleasefirst>
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@ifpackagewith}
+% \begin{macro}{\@ifclasswith}
+% |\@ifpackagewith{|\meta{name}|}{|\meta{option-list}|}|
+% Checks that \meta{option-list} is a subset of the options
+% \textbf{with} which \meta{name} was loaded.
+% \begin{macrocode}
+\def\@ifpackagewith{\@if@ptions\@pkgextension}
+\def\@ifclasswith{\@if@ptions\@clsextension}
+\@onlypreamble\@ifpackagewith
+\@onlypreamble\@ifclasswith
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@if@ptions#1#2{%
+ \@expandtwoargs\@if@pti@ns{\@ptionlist{#2.#1}}}
+\@onlypreamble\@if@ptions
+% \end{macrocode}
+%
+% Probably shouldn't use |\CurrentOption| here\ldots (changed to
+% |\reserved@b|.)
+% \changes{v0.2y}{1994/02/07}
+% {Add extra ,s so `two' is not matched with `twocolumn'}
+% \changes{v1.1i}{2011/08/19}
+% {Re-jig definition after more stringent \cs{in@} test.}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/01/01}%
+%<latexrelease> {\@if@pti@ns}{Spaces in option clash check}%
+%<*2ekernel|latexrelease>
+\def\@if@pti@ns#1#2{%
+ \let\reserved@a\@firstoftwo
+% \end{macrocode}
+% \changes{v1.2a}{2016/10/02}
+% {Ignore spaces while checking for option clash}
+% \begin{macrocode}
+ \edef\reserved@b{\zap@space#2 \@empty}%
+ \@for\reserved@b:=\reserved@b\do{%
+ \ifx\reserved@b\@empty
+ \else
+ \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}%
+ \ifin@
+ \else
+ \let\reserved@a\@secondoftwo
+ \fi
+ \fi
+ }%
+ \reserved@a}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@if@pti@ns}{Spaces in option clash check}%
+%<latexrelease>\def\@if@pti@ns#1#2{%
+%<latexrelease> \let\reserved@a\@firstoftwo
+%<latexrelease> \@for\reserved@b:=#2\do{%
+%<latexrelease> \ifx\reserved@b\@empty
+%<latexrelease> \else
+%<latexrelease> \expandafter\in@\expandafter
+%<latexrelease> {\expandafter,\reserved@b,}{,#1,}%
+%<latexrelease> \ifin@
+%<latexrelease> \else
+%<latexrelease> \let\reserved@a\@secondoftwo
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> }%
+%<latexrelease> \reserved@a}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\@if@pti@ns
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ProvidesPackage}
+% Checks that the current filename is correct, and defines
+% |\ver@filename|.
+% \changes{v0.3c}{1994/03/12}
+% {Add \cs{wlog}}
+% \changes{v0.3c}{1994/03/12}
+% {use \cs{@gtempa}}
+% \begin{macrocode}
+\def\ProvidesPackage#1{%
+ \xdef\@gtempa{#1}%
+ \ifx\@gtempa\@currname\else
+ \@latex@warning@no@line{You have requested
+ \@cls@pkg\space`\@currname',\MessageBreak
+ but the \@cls@pkg\space provides `#1'}%
+ \fi
+ \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%]
+\@onlypreamble\ProvidesPackage
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@pr@videpackage[#1]{%
+ \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
+ \ifx\@currext\@clsextension
+ \typeout{Document Class: \@gtempa\space#1}%
+ \else
+ \wlog{Package: \@gtempa\space#1}%
+ \fi}
+\@onlypreamble\@pr@videpackage
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ProvidesClass}
+% Like |\ProvidesPackage|, but for classes.
+% \begin{macrocode}
+\let\ProvidesClass\ProvidesPackage
+\@onlypreamble\ProvidesClass
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ProvidesFile}
+% Like |\ProvidesPackage|, but for arbitrary files. Do not apply
+% |\@onlypreamble| to these, as we may want to label files input
+% during the document.
+% \changes{v0.2l}{1993/12/07}
+% {Macro added}
+% \changes{v0.3c}{1994/03/12}
+% {Add \cs{wlog}}
+% \changes{v0.3g}{1994/04/11}
+% {Protect against weird catcodes.}
+% \begin{macro}{\@providesfile}
+% \changes{v1.0r}{1995/10/17}
+% {Delay definition of \cs{ProvidesFile} till ltfinal}
+% \changes{v1.1a}{1998/03/21}
+% {Allow \&. Internal/2702}
+% \changes{v1.1d}{2001/05/25}{Explicitly set catcode of
+% \cs{endlinechar} to 10 (pr/3334)}
+% \changes{v1.1e}{2001/06/04}{But only if it is a char (pr/3334)}
+% \changes{v1.1f}{2001/08/26}{Readded setting of space char (pr/3353)}
+% \begin{macrocode}
+\def\ProvidesFile#1{%
+ \begingroup
+ \catcode`\ 10 %
+ \ifnum \endlinechar<256 %
+ \ifnum \endlinechar>\m@ne
+ \catcode\endlinechar 10 %
+ \fi
+ \fi
+ \@makeother\/%
+ \@makeother\&%
+% \end{macrocode}
+% \changes{v1.1g}{2004/01/28}{Use kernel version of
+% \cs{@ifnextchar} (pr/3501)}
+% \begin{macrocode}
+ \kernel@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}
+% \end{macrocode}
+%
+% During initex a special version of |\@providesfile| is used.
+% The real definition is installed right at the end, in |ltfinal.dtx|.
+%\begin{verbatim}
+%\def\@providesfile#1[#2]{%
+% \wlog{File: #1 #2}%
+% \expandafter\xdef\csname ver@#1\endcsname{#2}%
+% \endgroup}
+%\end{verbatim}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\PassOptionsToPackage}
+% \begin{macro}{\PassOptionsToClass}
+% If the package has been loaded, we check that it was first loaded with
+% the options. Otherwise we add the option list to that of the package.
+% \begin{macrocode}
+\def\@pass@ptions#1#2#3{%
+ \expandafter\xdef\csname opt@#3.#1\endcsname{%
+ \@ifundefined{opt@#3.#1}\@empty
+ {\csname opt@#3.#1\endcsname,}%
+ \zap@space#2 \@empty}}
+\@onlypreamble\@pass@ptions
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\PassOptionsToPackage{\@pass@ptions\@pkgextension}
+\def\PassOptionsToClass{\@pass@ptions\@clsextension}
+\@onlypreamble\PassOptionsToPackage
+\@onlypreamble\PassOptionsToClass
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareOption}
+% \begin{macro}{\DeclareOption*}
+% Adds an option as a |\ds@| command, or the default |\default@ds|
+% command.
+% \changes{v0.2c}{1993/11/17}
+% {Error checking added}
+% \changes{v1.0m}{1995/04/21}
+% {Made long /1498}
+% \changes{v1.0n}{1995/05/12}
+% {Use \cs{toks@} to remove need to double hash /1557}
+% \begin{macrocode}
+\def\DeclareOption{%
+ \let\@fileswith@pti@ns\@badrequireerror
+ \@ifstar\@defdefault@ds\@declareoption}
+\long\def\@declareoption#1#2{%
+ \xdef\@declaredoptions{\@declaredoptions,#1}%
+ \toks@{#2}%
+ \expandafter\edef\csname ds@#1\endcsname{\the\toks@}}
+\long\def\@defdefault@ds#1{%
+ \toks@{#1}%
+ \edef\default@ds{\the\toks@}}
+\@onlypreamble\DeclareOption
+\@onlypreamble\@declareoption
+\@onlypreamble\@defdefault@ds
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\OptionNotUsed}
+% If we are in a class file, add |\CurrentOption| to the list of
+% unused options. Otherwise, in a package file do nothing.
+% \begin{macrocode}
+\def\OptionNotUsed{%
+ \ifx\@currext\@clsextension
+ \xdef\@unusedoptionlist{%
+ \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi
+ \CurrentOption}%
+ \fi}
+\@onlypreamble\OptionNotUsed
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\default@ds}
+% The default default option code.
+% Set by |\@onefilewithoptions| to either |\OptionNotUsed| for
+% classes, or |\@unknownoptionerror| for packages. This may be reset
+% in either case with |\DeclareOption*|.
+% \begin{macrocode}
+% \let\default@ds\OptionNotUsed
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ProcessOptions}
+% \begin{macro}{\ProcessOptions*}
+% |\ProcessOptions| calls |\ds@option| for each known package option,
+% then calls |\default@ds| for each option on the local options list.
+% Finally resets all the declared options to |\relax|. The empty option
+% does nothing, this has to be reset on the off chance it's set to
+% |\relax| if an empty element gets into the |\@declaredoptions| list.
+%
+% The star form is similar but executes options given in the order
+% specified in the document, not the order they are declared in the
+% file. In the case of packages, global options are executed before
+% local ones.
+% \changes{v0.2a}{1993/11/14}
+% {Stop adding the global option list inside class files.}
+% \changes{v0.2a}{1993/11/14}
+% {Optimise `empty option' code.}
+% \changes{v0.2b}{1993/11/15}
+% {Star form added.}
+% \changes{v0.2c}{1993/11/17}
+% {restoring \cs{@fileswith@pti@ns} added.}
+% \begin{macrocode}
+\def\ProcessOptions{%
+ \let\ds@\@empty
+ \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
+ \@ifstar\@xprocess@ptions\@process@ptions}
+\@onlypreamble\ProcessOptions
+% \end{macrocode}
+%
+% \changes{v0.2y}{1994/02/07}
+% {Add extra ,s so `two' is not matched with `twocolumn'}
+% \begin{macrocode}
+\def\@process@ptions{%
+ \@for\CurrentOption:=\@declaredoptions\do{%
+ \ifx\CurrentOption\@empty\else
+ \@expandtwoargs\in@{,\CurrentOption,}{%
+ ,\ifx\@currext\@clsextension\else\@classoptionslist,\fi
+ \@curroptions,}%
+ \ifin@
+ \@use@ption
+ \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
+ \fi
+ \fi}%
+ \@process@pti@ns}
+\@onlypreamble\@process@ptions
+% \end{macrocode}
+%
+% \changes{v0.2y}{1994/02/07}
+% {Add extra ,s so `two' is not matched with `twocolumn'}
+% \begin{macrocode}
+\def\@xprocess@ptions{%
+ \ifx\@currext\@clsextension\else
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \ifx\CurrentOption\@empty\else
+ \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
+ \ifin@
+ \@use@ption
+ \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
+ \fi
+ \fi}%
+ \fi
+ \@process@pti@ns}
+\@onlypreamble\@xprocess@ptions
+% \end{macrocode}
+%
+% The common part of |\ProcessOptions| and |\ProcessOptions*|.
+% \begin{macrocode}
+\def\@process@pti@ns{%
+ \@for\CurrentOption:=\@curroptions\do{%
+ \@ifundefined{ds@\CurrentOption}%
+ {\@use@ption
+ \default@ds}%
+% \end{macrocode}
+% There should not be any non-empty definition of |\CurrentOption| at
+% this point, as all the declared options were executed earlier. This is
+% for compatibility with 2.09 styles which use |\def\ds@|\ldots\
+% directly, and so have options which do not appear in
+% |\@declaredoptions|.
+% \begin{macrocode}
+ \@use@ption}%
+% \end{macrocode}
+% Clear all the definitions for option code. First set all the declared
+% options to |\relax|, then reset the `default' and `empty' options. and
+% the lst of declared options.
+% \begin{macrocode}
+ \@for\CurrentOption:=\@declaredoptions\do{%
+ \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
+% \end{macrocode}
+% \changes{v1.0r}{1995/10/17}
+% {Reset \cs{CurrentOption} for graphics/1873}
+% \begin{macrocode}
+ \let\CurrentOption\@empty
+ \let\@fileswith@pti@ns\@@fileswith@pti@ns
+ \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+\@onlypreamble\@process@pti@ns
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@options}
+% |\@options| is a synonym for |\ProcessOptions*| for upward
+% compatibility with \LaTeX2.09 style files.
+% \begin{macrocode}
+\def\@options{\ProcessOptions*}
+\@onlypreamble\@options
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@use@ption}
+% Execute the code for the current option.
+% \changes{v0.2g}{1993/11/23}
+% {Name changed from \cs{@executeoption}}
+% \changes{v1.0e}{1994/05/17}
+% {Execute option after removing from list, not before}
+% \begin{macrocode}
+\def\@use@ption{%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ \csname ds@\CurrentOption\endcsname}
+\@onlypreamble\@use@ption
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ExecuteOptions}
+% |\ExecuteOptions{|\meta{option-list}|}| executes the code declared
+% for each option.
+% \changes{v0.2d}{1993/11/18}
+% {Use \cs{CurrentOption} not \cs{reserved@a}}
+% \changes{v0.2k}{1993/12/06}
+% {Preserve \cs{CurrentOption}.}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/01/01}%
+%<latexrelease> {\ExecuteOptions}{Spaces in \ExecuteOptions}%
+%<*2ekernel|latexrelease>
+\def\ExecuteOptions#1{%
+% \end{macrocode}
+% \changes{v1.2a}{2016/10/02}
+% {Ignore spaces in argument}
+% Use |\@fortmp| here as it is anyway cleared during |\@for| loop
+% so does not change any existing names.
+% \begin{macrocode}
+ \edef\@fortmp{\zap@space#1 \@empty}%
+ \def\reserved@a##1\@nil{%
+ \@for\CurrentOption:=\@fortmp\do
+ {\csname ds@\CurrentOption\endcsname}%
+ \edef\CurrentOption{##1}}%
+ \expandafter\reserved@a\CurrentOption\@nil}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\ExecuteOptions}{Spaces in \ExecuteOptions}%
+%<latexrelease>\def\ExecuteOptions#1{%
+%<latexrelease> \def\reserved@a##1\@nil{%
+%<latexrelease> \@for\CurrentOption:=#1\do
+%<latexrelease> {\csname ds@\CurrentOption\endcsname}%
+%<latexrelease> \edef\CurrentOption{##1}}%
+%<latexrelease> \expandafter\reserved@a\CurrentOption\@nil}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\ExecuteOptions
+% \end{macrocode}
+% \end{macro}
+%
+% The top-level commands, which just set some parameters then call
+% the internal command, |\@fileswithoptions|.
+% \begin{macro}{\documentclass}
+% \changes{v1.0q}{1995/06/19}
+% {Dont redefine \cs{usepackage} in compat mode for /1634}
+% The main new-style class declaration.
+% \begin{macrocode}
+\def\documentclass{%
+ \let\documentclass\@twoclasseserror
+ \if@compatibility\else\let\usepackage\RequirePackage\fi
+ \@fileswithoptions\@clsextension}
+\@onlypreamble\documentclass
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\documentstyle}
+% 2.09 style class `style' declaration.
+% \changes{v0.2a}{1993/11/14}
+% {Added \cs{RequirePackage} \cs{@unusedoptionlist} stuff.}
+% \changes{v0.2b}{1993/11/15}
+% {Modified to match \cs{ProcessOption*}}
+% \changes{v0.2d}{1993/11/18}
+% {Modified \cs{RequirePackage} stuff.}
+% \changes{v0.2n}{1993/12/09}
+% {input 209 compatibility file.}
+% \changes{v0.2o}{1993/12/13}
+% {compatibility file now latex209.sty.}
+% \changes{v0.2q}{1993/12/17}
+% {Match Alan's new code.}
+% \changes{v0.2u}{1994/01/21}
+% {compatibility file now latex209.def.}
+% \begin{macrocode}
+\def\documentstyle{%
+ \makeatletter\input{latex209.def}\makeatother
+ \documentclass}
+\@onlypreamble\documentstyle
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RequirePackage}
+% Load package if not already loaded.
+% \begin{macrocode}
+\def\RequirePackage{%
+ \@fileswithoptions\@pkgextension}
+\@onlypreamble\RequirePackage
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LoadClass}
+% Load class.
+% \begin{macrocode}
+\def\LoadClass{%
+ \ifx\@currext\@pkgextension
+ \@latex@error
+ {\noexpand\LoadClass in package file}%
+ {You may only use \noexpand\LoadClass in a class file.}%
+ \fi
+ \@fileswithoptions\@clsextension}
+\@onlypreamble\LoadClass
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@loadwithoptions}
+% \changes{v1.0t}{1995/11/14}{macro added}
+% Pass the current option list on to a class or package.
+% |#1| is |\@|\emph{cls-or-pkg}|extension|,
+% |#2| is |\RequirePackage| or |\LoadClass|,
+% |#3| is the class or package to be loaded.
+% \begin{macrocode}
+\def\@loadwithoptions#1#2#3{%
+ \expandafter\let\csname opt@#3.#1\expandafter\endcsname
+ \csname opt@\@currname.\@currext\endcsname
+ #2{#3}}
+\@onlypreamble\@loadwithoptions
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LoadClassWithOptions}
+% \changes{v1.0t}{1995/11/14}{macro added}
+% Load class `|#1|' with the current option list.
+% \begin{macrocode}
+\def\LoadClassWithOptions{%
+ \@loadwithoptions\@clsextension\LoadClass}
+\@onlypreamble\LoadClassWithOptions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RequirePackageWithOptions}
+% \changes{v1.0t}{1995/11/14}{macro added}
+% \changes{v1.0v}{1996/10/04}{Reset \cs{@unprocessedoptions} for /2269}
+% Load package `|#1|' with the current option list.
+% \begin{macrocode}
+\def\RequirePackageWithOptions{%
+ \AtEndOfPackage{\let\@unprocessedoptions\relax}%
+ \@loadwithoptions\@pkgextension\RequirePackage}
+\@onlypreamble\RequirePackageWithOptions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\usepackage}
+% To begin with, |\usepackage| produces an error. This is reset by
+% |\documentclass|.
+% \changes{v0.2o}{1993/12/13}
+% {Fixed error handling}
+% \changes{v1.0h}{1994/05/23}{Remove argument if possible}
+% \begin{macrocode}
+\def\usepackage#1#{%
+ \@latex@error
+ {\noexpand \usepackage before \string\documentclass}%
+ {\noexpand \usepackage may only appear in the document
+ preamble, i.e.,\MessageBreak
+ between \noexpand\documentclass and
+ \string\begin{document}.}%
+ \@gobble}
+\@onlypreamble\usepackage
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NeedsTeXFormat}
+% Check that the document is running on the correct system.
+% \changes{v0.2a}{1993/11/14}
+% {made more robust for alternative syntax for other formats.}
+% \changes{v0.2c}{1993/11/17}
+% {Name changed from \cs{NeedsFormat}}
+% \changes{v0.2d}{1993/11/18}
+% {\cs{fmtname} \cs{fmtversion} not \cs{@}\ldots}
+% \begin{macrocode}
+\def\NeedsTeXFormat#1{%
+ \def\reserved@a{#1}%
+ \ifx\reserved@a\fmtname
+ \expandafter\@needsformat
+ \else
+ \@latex@error{This file needs format `\reserved@a'%
+ \MessageBreak but this is `\fmtname'}{%
+ The current input file will not be processed
+ further,\MessageBreak
+ because it was written for some other flavor of
+ TeX.\MessageBreak\@ehd}%
+% \end{macrocode}
+% If the file is not meant to be processed by \LaTeXe{} we stop
+% inputting it, but we do not end the run. We just end inputting
+% the current file.
+% \changes{v1.0h}{1994/05/23}
+% {Don't stop completely when format is wrong}
+% \begin{macrocode}
+ \endinput \fi}
+\@onlypreamble\NeedsTeXFormat
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@needsformat{%
+ \@ifnextchar[%]
+ \@needsf@rmat
+ {}}
+\@onlypreamble\@needsformat
+% \end{macrocode}
+%
+% \changes{v1.0b}{1994/05/04}
+% {Changed wording of the warning}
+% \begin{macrocode}
+\def\@needsf@rmat[#1]{%
+ \@ifl@t@r\fmtversion{#1}{}%
+ {\@latex@warning@no@line
+ {You have requested release `#1' of LaTeX,\MessageBreak
+ but only release `\fmtversion' is available}}}
+\@onlypreamble\@needsf@rmat
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\zap@space}
+% |\zap@space foo|\meta{space}|\@empty| removes all spaces from |foo|
+% that are not protected by |{ }| groups.
+% \begin{macrocode}
+\def\zap@space#1 #2{%
+ #1%
+ \ifx#2\@empty\else\expandafter\zap@space\fi
+ #2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fileswithoptions}
+% The common part of |\documentclass| and |\usepackage|.
+% \begin{macrocode}
+\def\@fileswithoptions#1{%
+ \@ifnextchar[%]
+ {\@fileswith@ptions#1}%
+ {\@fileswith@ptions#1[]}}
+\@onlypreamble\@fileswithoptions
+% \end{macrocode}
+%
+% \changes{v0.2f}{1993/11/22}
+% {Made the default [] not [\cs{@unknownversion}]}
+% \changes{v1.1h}{2007/08/05}
+% {Prevent loss of brackets PR/3965}
+% \begin{macrocode}
+\def\@fileswith@ptions#1[#2]#3{%
+ \@ifnextchar[%]
+ {\@fileswith@pti@ns#1[{#2}]#3}%
+ {\@fileswith@pti@ns#1[{#2}]#3[]}}
+\@onlypreamble\@fileswith@ptions
+% \end{macrocode}
+% Then we do some work.
+%
+% First of all, we define the global variables.
+% Then we look to see if the file has already been loaded.
+% If it has, we check that it was first loaded with at least the current
+% options.
+% If it has not, we add the current options to the package options,
+% set the default version to be |0000/00/00|, and load the file if we
+% can find it.
+% Then we check the version number.
+%
+% Finally, we restore the old file name, reset the default option,
+% and we set the catcode of |@|.
+%
+% For classes, we can immediately process the file. For other types,
+% |#2| could be a comma separated list, so loop through, processing
+% each one separately.
+% \changes{v0.2q}{1993/12/17}
+% {Add \cs{@compatibility} hook}
+% \changes{v0.2s}{1994/01/17}
+% {Modify to reduce parameter stack usage}
+% \changes{v0.2y}{1994/02/07}
+% {Run \cs{@compatibility} on the first class to start
+% (not the first to finish) }
+% \changes{v0.2z}{1994/02/10}
+% {Renamed \cs{@compatibility} to \cs{@documentclasshook}.
+% ASAJ.}
+% \changes{v1.1h}{2007/08/05}
+% {Prevent loss of brackets PR/3965}
+% \changes{v2.1b}{2016/11/09}
+% {Improve \cs{ifx} tests PR/4497}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/01/01}%
+%<latexrelease> {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}%
+%<*2ekernel|latexrelease>
+\def\@fileswith@pti@ns#1[#2]#3[#4]{%
+ \ifx#1\@clsextension
+ \ifx\@classoptionslist\relax
+ \xdef\@classoptionslist{\zap@space#2 \@empty}%
+ \def\reserved@a{%
+ \@onefilewithoptions#3[{#2}][{#4}]#1%
+ \@documentclasshook}%
+ \else
+ \def\reserved@a{%
+ \@onefilewithoptions#3[{#2}][{#4}]#1}%
+ \fi
+ \else
+% \end{macrocode}
+% build up a list of calls to |\@onefilewithoptions|
+% (one for each package) without thrashing the parameter stack.
+% \begin{macrocode}
+ \def\reserved@b##1,{%
+% \end{macrocode}
+% If |#1| is |\@nnil| we have reached the end of the list
+% (older version used |\@nil| here but |\@nil| is undefined so |\ifx|
+% equal to all undefined commands)
+% \begin{macrocode}
+ \ifx\@nnil##1\relax\else
+% \end{macrocode}
+% If |\ifx\@nnil##1\n@nil| is true then |#1| is (presumably) empty
+% (Older code used |\relax| which is slighly easier to get into |#1|
+% by mistake, which would spoil this test.)
+% \begin{macrocode}
+ \ifx\@nnil##1\@nnil\else
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \noexpand\@onefilewithoptions##1[{#2}][{#4}]%
+ \noexpand\@pkgextension
+ \fi
+ \expandafter\reserved@b
+ \fi}%
+ \edef\reserved@a{\zap@space#3 \@empty}%
+ \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}%
+ \fi
+ \reserved@a}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}%
+%<latexrelease>\def\@fileswith@pti@ns#1[#2]#3[#4]{%
+%<latexrelease> \ifx#1\@clsextension
+%<latexrelease> \ifx\@classoptionslist\relax
+%<latexrelease> \xdef\@classoptionslist{\zap@space#2 \@empty}%
+%<latexrelease> \def\reserved@a{%
+%<latexrelease> \@onefilewithoptions#3[{#2}][{#4}]#1%
+%<latexrelease> \@documentclasshook}%
+%<latexrelease> \else
+%<latexrelease> \def\reserved@a{%
+%<latexrelease> \@onefilewithoptions#3[{#2}][{#4}]#1}%
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \def\reserved@b##1,{%
+%<latexrelease> \ifx\@nil##1\relax\else
+%<latexrelease> \ifx\relax##1\relax\else
+%<latexrelease> \noexpand\@onefilewithoptions##1[{#2}][{#4}]%
+%<latexrelease> \noexpand\@pkgextension
+%<latexrelease> \fi
+%<latexrelease> \expandafter\reserved@b
+%<latexrelease> \fi}%
+%<latexrelease> \edef\reserved@a{\zap@space#3 \@empty}%
+%<latexrelease> \edef\reserved@a{%
+%<latexrelease> \expandafter\reserved@b\reserved@a,\@nil,}%
+%<latexrelease> \fi
+%<latexrelease> \reserved@a}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\@fileswith@pti@ns
+% \end{macrocode}
+%
+% Have the main argument as |#1|, so we only need one |\expandafter|
+% above.
+% \changes{v0.2a}{1993/11/14}
+% {Moved resetting of \cs{default@ds}, \cs{ds@} and
+% \cs{@declaredoptions} here, from the end of
+% \cs{ProcessOptions}.}
+% \changes{v0.2f}{1993/11/22}
+% {Made the initial version [] not [\cs{@unknownversion}]}
+% \changes{v0.2m}{1993/12/07}
+% {Reset \cs{CurrentOption}}
+% \begin{macrocode}
+\def\@onefilewithoptions#1[#2][#3]#4{%
+ \@pushfilename
+ \xdef\@currname{#1}%
+ \global\let\@currext#4%
+ \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
+ \let\CurrentOption\@empty
+ \@reset@ptions
+ \makeatletter
+% \end{macrocode}
+% Grab everything in a macro, so the parameter stack is popped before
+% any processing begins.
+% \changes{v0.2s}{1994/01/17}
+% {Modify to reduce parameter stack usage}
+% \changes{v1.1b}{1998/05/07}
+% {Modify help message for latex/2805}
+% \begin{macrocode}
+ \def\reserved@a{%
+ \@ifl@aded\@currext{#1}%
+ {\@if@ptions\@currext{#1}{#2}{}%
+ {\@latex@error
+ {Option clash for \@cls@pkg\space #1}%
+ {The package #1 has already been loaded
+ with options:\MessageBreak
+ \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
+ There has now been an attempt to load it
+ with options\MessageBreak
+ \space\space[#2]\MessageBreak
+ Adding the global options:\MessageBreak
+ \space\space
+ \@ptionlist{#1.\@currext},#2\MessageBreak
+ to your \noexpand\documentclass declaration may fix this.%
+ \MessageBreak
+ Try typing \space <return> \space to proceed.}}}%
+ {\@pass@ptions\@currext{#2}{#1}%
+% \end{macrocode}
+% \changes{v0.3c}{1994/03/12}
+% {Do not use \cs{@pr@videpackage} to avoid typeout}
+% \begin{macrocode}
+ \global\expandafter
+ \let\csname ver@\@currname.\@currext\endcsname\@empty
+ \InputIfFileExists
+ {\@currname.\@currext}%
+ {}%
+ {\@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.
+% \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
+ \csname\@currname.\@currext-h@@k\endcsname
+ \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
+ \@undefined
+ \@unprocessedoptions}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@ifl@ter\@currext{#1}{#3}{}%
+ {\@latex@warning@no@line
+ {You have requested,\on@line,
+ version\MessageBreak
+ `#3' of \@cls@pkg\space #1,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@#1.\@currext\endcsname'\MessageBreak
+ is available}}%
+% \end{macrocode}
+% \changes{v0.2c}{1993/11/17}
+% {Added trap for two \cs{LoadClass} commands.}
+% \begin{macrocode}
+ \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
+ \@popfilename
+ \@reset@ptions}%
+ \reserved@a}
+\@onlypreamble\@onefilewithoptions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@fileswith@pti@ns}
+% Save the definition (for error checking).
+% \changes{v0.2c}{1993/11/17}
+% {Macro added}
+% \begin{macrocode}
+\let\@@fileswith@pti@ns\@fileswith@pti@ns
+\@onlypreamble\@@fileswith@pti@ns
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@reset@ptions}
+% Reset the default option, and clear lists of declared options.
+% \changes{v0.2a}{1993/11/14}{macro added}
+% \begin{macrocode}
+\def\@reset@ptions{%
+ \global\ifx\@currext\@clsextension
+ \let\default@ds\OptionNotUsed
+ \else
+ \let\default@ds\@unknownoptionerror
+ \fi
+ \global\let\ds@\@empty
+ \global\let\@declaredoptions\@empty}
+\@onlypreamble\@reset@ptions
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Hooks}
+%
+% Allow code do be saved to be executed at specific later times.
+%
+% Save things in macros, I considered using toks registers, (and
+% |\addto@hook| from the NFSS code, that would require stacking the
+% contents in the case of required packages, so just generate a new
+% macro for each package.
+% \begin{macro}{\@begindocumenthook}
+% \changes{v1.0s}{1995/10/20}
+% {Make setting conditional, for autoload version}
+% \begin{macro}{\@enddocumenthook}
+% Stuff to appear at the beginning or end of the document.
+% \begin{macrocode}
+\ifx\@begindocumenthook\@undefined
+ \let\@begindocumenthook\@empty
+\fi
+\let\@enddocumenthook\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\g@addto@macro}
+% Globally add to the end of a macro.
+% \changes{v0.2a}{1993/11/14}{Made global}
+% \changes{v0.2w}{1994/01/31}
+% {Use toks register to avoid `hash' problems}
+% \changes{v1.0o}{1995/05/17}
+% {Make long for latex/1522}
+% \changes{v1.0w}{1996/12/17}
+% {Use \cs{begingroup} to save making a mathord}
+% \changes{v1.0x}{1997/02/05}
+% {missing percent /2402}
+% \begin{macrocode}
+\long\def\g@addto@macro#1#2{%
+ \begingroup
+ \toks@\expandafter{#1#2}%
+ \xdef#1{\the\toks@}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AtEndOfPackage}
+% \begin{macro}{\AtEndOfClass}
+% \begin{macro}{\AtBeginDocument}
+% \begin{macro}{\AtEndDocument}
+% The access functions.
+% \changes{v0.2a}{1993/11/14}
+% {Included extension in the generated macro name for package
+% and class hooks.}
+% \begin{macrocode}
+\def\AtEndOfPackage{%
+ \expandafter\g@addto@macro\csname\@currname.\@currext-h@@k\endcsname}
+\let\AtEndOfClass\AtEndOfPackage
+\@onlypreamble\AtEndOfPackage
+\@onlypreamble\AtEndOfClass
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\AtBeginDocument{\g@addto@macro\@begindocumenthook}
+\def\AtEndDocument{\g@addto@macro\@enddocumenthook}
+\@onlypreamble\AtBeginDocument
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@cls@pkg}
+% The current file type.
+% \changes{v0.2i}{1993/12/03}
+% {Name changed to avoid clash with output routine.}
+% \begin{macrocode}
+\def\@cls@pkg{%
+ \ifx\@currext\@clsextension
+ document class%
+ \else
+ package%
+ \fi}
+\@onlypreamble\@cls@pkg
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@unknownoptionerror}
+% Bad option.
+% \begin{macrocode}
+\def\@unknownoptionerror{%
+ \@latex@error
+ {Unknown option `\CurrentOption' for \@cls@pkg\space`\@currname'}%
+ {The option `\CurrentOption' was not declared in
+ \@cls@pkg\space`\@currname', perhaps you\MessageBreak
+ misspelled its name.
+ Try typing \space <return>
+ \space to proceed.}}
+\@onlypreamble\@unknownoptionerror
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@unprocessedoptions}
+% Declare an error for each option, unless a |\ProcessOptions| occurred.
+% \changes{v0.2v}{1994/01/29}
+% {Macro added.}
+% \changes{v1.0t}{1995/11/14}{Allow empty option}
+% \begin{macrocode}
+\def\@@unprocessedoptions{%
+ \ifx\@currext\@pkgextension
+ \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
+ \@for\CurrentOption:=\@curroptions\do{%
+ \ifx\CurrentOption\@empty\else\@unknownoptionerror\fi}%
+ \fi}
+\@onlypreamble\@unprocessedoptions
+\@onlypreamble\@@unprocessedoptions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badrequireerror}
+% |\RequirePackage| or |\LoadClass| occurs in the options section.
+% \changes{v0.2c}{1993/11/17}
+% {Macro added}
+% \begin{macrocode}
+\def\@badrequireerror#1[#2]#3[#4]{%
+ \@latex@error
+ {\noexpand\RequirePackage or \noexpand\LoadClass
+ in Options Section}%
+ {The \@cls@pkg\space `\@currname' is defective.\MessageBreak
+ It attempts to load `#3' in the options section, i.e.,\MessageBreak
+ between \noexpand\DeclareOption and \string\ProcessOptions.}}
+\@onlypreamble\@badrequireerror
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@twoloadclasserror}
+% Two |\LoadClass| in a class.
+% \changes{v0.2c}{1993/11/17}
+% {Macro added}
+% \begin{macrocode}
+\def\@twoloadclasserror{%
+ \@latex@error
+ {Two \noexpand\LoadClass commands}%
+ {You may only use one \noexpand\LoadClass in a class file}}
+\@onlypreamble\@twoloadclasserror
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@twoclasseserror}
+% Two |\documentclass| or |\documentstyle|.
+% \changes{v0.2h}{1993/11/28}
+% {Macro added}
+% \begin{macrocode}
+\def\@twoclasseserror#1#{%
+ \@latex@error
+ {Two \noexpand\documentclass or \noexpand\documentstyle commands}%
+ {The document may only declare one class.}\@gobble}
+\@onlypreamble\@twoclasseserror
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Providing shipment}
+%
+% \begin{macro}{\two@digits}
+% Prefix a number less than 10 with `0'.
+% \begin{macrocode}
+\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filecontents}
+% \begin{macro}{\endfilecontents}
+% This environment implements inline files.
+% The star-form does not write extra comments into the file.
+%
+% \changes{v0.2h}{1993/11/28}
+% {Don't globally allocate a write stream (always use 15)}
+% \changes{v0.2r}{1993/12/19}{Different message when ignoring a file}
+% \changes{v0.3g}{1994/04/11}
+% {Add star form,
+% dont write \cs{endinput} at the end of the file.}
+% \changes{v1.0c}{1994/05/11}
+% {Add checks for form feed and tab}
+% \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}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\filec@ntents}{Spaces in file names}%
+\begingroup%
+\@tempcnta=1
+\loop
+ \catcode\@tempcnta=12 %
+ \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32 %
+\repeat %
+\catcode`\*=11 %
+\catcode`\^^M\active%
+\catcode`\^^L\active\let^^L\relax%
+\catcode`\^^I\active%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\filecontents{\@tempswatrue\filec@ntents}%
+\gdef\filecontents*{\@tempswafalse\filec@ntents}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\filec@ntents#1{%
+ \set@curr@file{#1}%
+ \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}%
+ \openin\@inputcheck\q@curr@file \space %
+ \ifeof\@inputcheck%
+ \@latex@warning@no@line%
+ {Writing file `\@currdir\@curr@file'}%
+% \end{macrocode}
+%
+% \changes{v1.0y}{1997/10/10}
+% {\cs{reserved@c} not \cs{verbatim@out} to save a csname}
+% \begin{macrocode}
+ \chardef\reserved@c15 %
+ \ch@ck7\reserved@c\write%
+ \immediate\openout\reserved@c\q@curr@file\relax%
+ \else%
+% \end{macrocode}
+%
+% \changes{v1.0y}{1997/10/10}
+% {Use \cs{@gobbletwo}}
+% \begin{macrocode}
+ \closein\@inputcheck%
+ \@latex@warning@no@line%
+ {File `\@curr@file' already exists on the system.\MessageBreak%
+ Not generating it from this source}%
+ \let\write\@gobbletwo%
+ \let\closeout\@gobble%
+ \fi%
+ \if@tempswa%
+% \end{macrocode}
+%
+% \changes{v1.0y}{1997/10/10}
+% {\cs{@currenvir} in banner}
+% \begin{macrocode}
+ \immediate\write\reserved@c{%
+ \@percentchar\@percentchar\space%
+ \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J%
+ \@percentchar\@percentchar\space generated by the %
+ `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+ \@percentchar\@percentchar\space from source `\jobname' on %
+ \number\year/\two@digits\month/\two@digits\day.^^J%
+ \@percentchar\@percentchar}%
+ \fi%
+ \let\do\@makeother\dospecials%
+% \end{macrocode}
+% If there are active characters in the upper half (e.g., from
+% \texttt{inputenc} there would be confusion so we render everything
+% harmless.
+% \changes{v1.2f}{2018/03/27}
+% {Use full file name for old release}
+% \begin{macrocode}
+ \count@ 128\relax%
+ \loop%
+ \catcode\count@ 11\relax%
+ \advance\count@ \@ne%
+ \ifnum\count@<\@cclvi%
+ \repeat%
+% \end{macrocode}
+%
+% \changes{v1.0y}{1997/10/10}
+% {Check for text before or after \cs{end} environment. latex/2636}
+% \begin{macrocode}
+ \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+ \edef\reserved@b{%
+ \def\noexpand\reserved@b%
+ ####1\E####2\E####3\relax}%
+ \reserved@b{%
+ \ifx\relax##3\relax%
+% \end{macrocode}
+% There was no |\end{filecontents}|
+% \begin{macrocode}
+ \immediate\write\reserved@c{##1}%
+ \else%
+% \end{macrocode}
+% There was a |\end{filecontents}|, so stop this time.
+% \begin{macrocode}
+ \edef^^M{\noexpand\end{\@currenvir}}%
+ \ifx\relax##1\relax%
+ \else%
+% \end{macrocode}
+% Text before the |\end|, write it with a warning.
+% \begin{macrocode}
+ \@latex@warning{Writing text `##1' before %
+ \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}%
+ \immediate\write\reserved@c{##1}%
+ \fi%
+ \ifx\relax##2\relax%
+ \else%
+% \end{macrocode}
+% Text after the |\end|, ignore it with a warning.
+% \begin{macrocode}
+ \@latex@warning{%
+ Ignoring text `##2' after \string\end{\@currenvir}}%
+ \fi%
+ \fi%
+ ^^M}%
+% \end{macrocode}
+%
+%
+% \changes{v1.2j}{2018/05/29}{use \cs{csname} not \cs{@undefined}}
+% \begin{macrocode}
+ \catcode`\^^L\active%
+ \let\L\@undefined%
+ \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}%
+ \catcode`\^^I\active%
+ \let\I\@undefined%
+ \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
+ \catcode`\^^M\active%
+ \edef^^M##1^^M{%
+ \noexpand\reserved@b##1\E\E\relax}}%
+\endgroup%
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\filec@ntents}{Spaces in file names}%
+%<latexrelease>\begingroup%
+%<latexrelease>\@tempcnta=1
+%<latexrelease>\loop
+%<latexrelease> \catcode\@tempcnta=12 %
+%<latexrelease> \advance\@tempcnta\@ne %
+%<latexrelease>\ifnum\@tempcnta<32 %
+%<latexrelease>\repeat %
+%<latexrelease>\catcode`\*=11 %
+%<latexrelease>\catcode`\^^M\active%
+%<latexrelease>\catcode`\^^L\active\let^^L\relax%
+%<latexrelease>\catcode`\^^I\active%
+%<latexrelease>
+%<latexrelease>\gdef\filec@ntents#1{%
+%<latexrelease> \openin\@inputcheck#1 %
+%<latexrelease> \ifeof\@inputcheck%
+%<latexrelease> \@latex@warning@no@line%
+%<latexrelease> {Writing file `\@currdir#1'}%
+%<latexrelease> \chardef\reserved@c15 %
+%<latexrelease> \ch@ck7\reserved@c\write%
+%<latexrelease> \immediate\openout\reserved@c#1\relax%
+%<latexrelease> \else%
+%<latexrelease> \closein\@inputcheck%
+%<latexrelease> \@latex@warning@no@line%
+%<latexrelease> {File `#1' already exists on the system.\MessageBreak%
+%<latexrelease> Not generating it from this source}%
+%<latexrelease> \let\write\@gobbletwo%
+%<latexrelease> \let\closeout\@gobble%
+%<latexrelease> \fi%
+%<latexrelease> \if@tempswa%
+%<latexrelease> \immediate\write\reserved@c{%
+%<latexrelease> \@percentchar\@percentchar\space%
+%<latexrelease> \expandafter\@gobble\string\LaTeX2e file `#1'^^J%
+%<latexrelease> \@percentchar\@percentchar\space generated by the %
+%<latexrelease> `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+%<latexrelease> \@percentchar\@percentchar\space from source `\jobname' on %
+%<latexrelease> \number\year/\two@digits\month/\two@digits\day.^^J%
+%<latexrelease> \@percentchar\@percentchar}%
+%<latexrelease> \fi%
+%<latexrelease> \let\do\@makeother\dospecials%
+%<latexrelease> \count@ 128\relax%
+%<latexrelease> \loop%
+%<latexrelease> \catcode\count@ 11\relax%
+%<latexrelease> \advance\count@ \@ne%
+%<latexrelease> \ifnum\count@<\@cclvi%
+%<latexrelease> \repeat%
+%<latexrelease> \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+%<latexrelease> \edef\reserved@b{%
+%<latexrelease> \def\noexpand\reserved@b%
+%<latexrelease> ####1\E####2\E####3\relax}%
+%<latexrelease> \reserved@b{%
+%<latexrelease> \ifx\relax##3\relax%
+%<latexrelease> \immediate\write\reserved@c{##1}%
+%<latexrelease> \else%
+%<latexrelease> \edef^^M{\noexpand\end{\@currenvir}}%
+%<latexrelease> \ifx\relax##1\relax%
+%<latexrelease> \else%
+%<latexrelease> \@latex@warning{Writing text `##1' before %
+%<latexrelease> \string\end{\@currenvir}\MessageBreak as last line of #1}%
+%<latexrelease> \immediate\write\reserved@c{##1}%
+%<latexrelease> \fi%
+%<latexrelease> \ifx\relax##2\relax%
+%<latexrelease> \else%
+%<latexrelease> \@latex@warning{%
+%<latexrelease> Ignoring text `##2' after \string\end{\@currenvir}}%
+%<latexrelease> \fi%
+%<latexrelease> \fi%
+%<latexrelease> ^^M}%
+%<latexrelease>
+%<latexrelease> \catcode`\^^L\active%
+%<latexrelease> \let\L\@undefined%
+%<latexrelease> \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}%
+%<latexrelease> \catcode`\^^I\active%
+%<latexrelease> \let\I\@undefined%
+%<latexrelease> \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
+%<latexrelease> \catcode`\^^M\active%
+%<latexrelease> \edef^^M##1^^M{%
+%<latexrelease> \noexpand\reserved@b##1\E\E\relax}}%
+%<latexrelease>\endgroup%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\begingroup
+\catcode`|=\catcode`\%
+\catcode`\%=12
+\catcode`\*=11
+\gdef\@percentchar{%}
+\gdef\endfilecontents{|
+ \immediate\closeout\reserved@c
+ \def\T##1##2##3{|
+ \ifx##1\@undefined\else
+ \@latex@warning@no@line{##2 has been converted to Blank ##3e}|
+ \fi}|
+ \T\L{Form Feed}{Lin}|
+ \T\I{Tab}{Spac}|
+ \immediate\write\@unused{}}
+\global\let\endfilecontents*\endfilecontents
+\@onlypreamble\filecontents
+\@onlypreamble\endfilecontents
+\@onlypreamble\filecontents*
+\@onlypreamble\endfilecontents*
+\endgroup
+\@onlypreamble\filec@ntents
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+%
+% \section{Package/class rollback mechanism}
+%
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexreleasefirst>
+% \end{macrocode}
+%
+% \changes{v1.2d}{2018/02/18}{Introduce rollback concept}
+%
+% \begin{macro}{\pkgcls@debug}
+% For testing we have a few extra lines of code that by default do
+% nothing but one can set |\pkgcls@debug| to |\typeout| to get
+% extra info. Sometime in the future this will be dropped.
+% \begin{macrocode}
+%<*tracerollback>
+%\let\pkgcls@debug\typeout
+\let\pkgcls@debug\@gobble
+%</tracerollback>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\requestedLaTeXdate}
+% The macro (!) |\requestedLaTeXdate| holds the globally requested
+% rollback date (via \texttt{latexrelease}) or zero if no such
+% request was made.
+% \begin{macrocode}
+\def\requestedLaTeXdate{0}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\pkgcls@targetdate}
+% \begin{macro}{\pkgcls@targetlabel}
+% \begin{macro}{\pkgcls@innerdate}
+%
+% If a rollback for a package or class is requested then
+% |\pkgcls@targetdate| holds the requested date as a number
+% YYYYMMDD (if there was one, otherwise the value of
+% |\requestedLaTeXdate|) and |\pkgcls@targetlabel| will be
+% empty. If there was a request for a named version then
+% |\pkgcls@targetlabel| holds the verion name and
+% |\pkgcls@targetdate| is set to \texttt{1}.
+%
+% |\pkgcls@targetdate=0| is used to indicate that there was no
+% rollback request.
+% While loading an old release |\pkgcls@targetdate| is also reset to
+% zero so that |\DeclareRelease| declarations are bypassed.
+%
+% In contrast |\pkgcls@innerdate| will always hold the requested
+% date (in a macro not a counter) if there was one, otherwise,
+% e.g., if there was no request or a request to a version name it
+% will contain \TeX{} largest legal number. While loading a file
+% this can be used to provide conditionals that select code based
+% on the request.
+%
+%
+% \begin{macrocode}
+\ifx\pkgcls@targetdate\@undefined
+ \newcount\pkgcls@targetdate
+\fi
+\let\pkgcls@targetlabel\@empty
+\def\pkgcls@innerdate{\maxdimen}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\pkgcls@candidate}
+% \begin{macro}{\pkgcls@releasedate}
+% When looping through the |\DeclareRelease| declarations we
+% record if the release is the best candidate we have seen so far.
+% This is recorded in |\pkgcls@candidate| and we update it whenever
+% we see a better one.
+%
+% In |\pkgcls@releasedate| we keep track of the release date of
+% that candidate.
+% \begin{macrocode}
+\let\pkgcls@candidate\@empty
+\let\pkgcls@releasedate\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\load@onefilewithoptions}
+% \begin{macro}{\@onefilewithoptions}
+% the best place to add the rollback code is at the point where
+% |\@onefilewithoptions| is called to load a single class or
+% package.
+%
+% To make things easy we save the old definition as
+% |\load@onefilewithoptions| and then provide a new interface.
+%
+% Important: as this code is also unconditionally placed into
+% latexrelease we can only do this name change once otherwise both
+% macros will contain the same code.
+% \begin{macrocode}
+\ifx\load@onefilewithoptions\@undefined
+ \let\load@onefilewithoptions\@onefilewithoptions
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\@onefilewithoptions#1[#2][#3]#4{%
+% \end{macrocode}
+% First a bit of tracing normally disabled.
+% \begin{macrocode}
+%<*tracerollback>
+ \pkgcls@debug{--- File loaded request (\noexpand\usepackage or ...)}%
+ \pkgcls@debug{\@spaces 1: #1}%
+ \pkgcls@debug{\@spaces 2: #2}%
+ \pkgcls@debug{\@spaces 3: #3}%
+ \pkgcls@debug{\@spaces 4: #4}%
+%</tracerollback>
+% \end{macrocode}
+% Two of the arguments are needed later on in error/warning
+% messages so we save them.
+% \begin{macrocode}
+ \def\pkgcls@name{#1}% % for info message
+ \def\pkgcls@arg {#3}% % for info message
+% \end{macrocode}
+% then we parse the final optional argument to determine if there
+% is a specific rollback request for the current file. This will
+% set |\pkgcls@targetdate|, |\pkgcls@targetlabel| and
+% |\pkgcls@mindate|.
+% \begin{macrocode}
+ \pkgcls@parse@date@arg{#3}%
+% \end{macrocode}
+% When determining the correct release to load we keep track of
+% candiates in |\pkgcls@candidate| and initially we don't have any:
+% \begin{macrocode}
+ \let\pkgcls@candidate\@empty
+% \end{macrocode}
+% If we had a rollback request then |#3| may contain data but not
+% necessarily a ``minimal date'' so instead of passing it on we
+% pass on the content of |\pkgcls@mindate|. We need to pass the
+% value not the command, otherwise nested packages may pick up the
+% wrong information.
+% \changes{v1.2h}{2018-04-08}{Pass expanded date}
+% \begin{macrocode}
+ \begingroup
+ \edef\reserved@a{%
+ \endgroup
+ \unexpanded{\load@onefilewithoptions#1[#2]}%
+ [\pkgcls@mindate]%
+ \unexpanded{#4}}%
+ \reserved@a
+ }
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\pkgcls@parse@date@arg}
+% The |\pkgcls@parse@date@arg| command parses the second optional
+% argument of |\usepackage|, |\RequirePackage| or |\documentclass|
+% for a rollback request setting the values of |\pkgcls@targetdate|
+% and |\pkgcls@targetlabel|.
+%
+% This optional argument has a dual purpose: If it just contains a
+% date string then this means that the package should have at least
+% that date (to ensure that a certain feature is actually available,
+% or a certain bug has been fixed). When the package gets loaded the
+% information in |\Provides...| will then be checked against this
+% request.
+%
+% But if it starts with an equal sign followed by a date string or
+% followed by a version name then this means that we should roll
+% back to the state of the package at tht date or to the version
+% with the requested name.
+%
+% If there was no optional argument or the optional argument
+% does not start with ``\texttt{=}'' then the |\pkgcls@targetdate|
+% is set to the date of the overall rollback request (via
+% \texttt{latexrelease}) or if that was not given it is set to
+% \texttt{0}.
+% In either case |\pkgcls@targetlabel| will be made empty.
+%
+% If the argument doesn't start with ``\texttt{=}'' then it is
+% supposed to be a ``minimal date'' and we therefore save the value
+% in |\pkgcls@mindate|, otherwise this macro is made empty.
+%
+% So in summary we have:
+% \begin{flushleft}
+% \hspace*{-1in}\begin{tabular}{ccccc@{}}
+% Input & & \cs{pkgcls@targetdate}
+% & \cs{pkgcls@targetlabel}
+% & \cs{pkgcls@mindate}\\[3pt]
+% \meta{empty} & $\to$ & \meta{global-rollbackdate-as-number}
+% & \meta{empty} & \meta{empty}
+% \\
+% \meta{date} & $\to$ & \meta{global-rollbackdate-as-number}
+% & \meta{empty} & \meta{date}
+% \\
+% \texttt{=}\meta{date} & $\to$ & \meta{date-as-number}
+% & \meta{empty} & \meta{empty}
+% \\
+% \texttt{=}\meta{version}& $\to$ & \texttt{1}
+% & \meta{version} & \meta{empty}
+% \\
+% \meta{other} & $\to$ & \meta{global-rollbackdate-as-number}
+% & \meta{empty} & \meta{other}
+% \\
+% \end{tabular}
+% \end{flushleft}
+% where \meta{global-rollbackdate-as-number} is a date request given
+% via \texttt{latexrelease} or if there wasn't one \texttt{0}.
+%
+% \begin{macrocode}
+\def\pkgcls@parse@date@arg #1{%
+% \end{macrocode}
+% If the argument is empty we use the rollback date from
+% \texttt{latexrelease} which has the value of zero if there was no
+% rollback request. The label and the minimal date is made empty in that case.
+% \begin{macrocode}
+ \ifx\@nil#1\@nil
+ \pkgcls@targetdate\requestedLaTeXdate\relax
+ \let\pkgcls@targetlabel\@empty
+ \let\pkgcls@mindate\@empty
+% \end{macrocode}
+% Otherwise we parse the argument further, checking for a \texttt{=}
+% as the first character. We append a \texttt{=} at the end so that
+% there is at least one such character in the argument.
+% \begin{macrocode}
+ \else
+ \pkgcls@parse@date@arg@#1=\@nil\relax
+ \fi
+ }
+% \end{macrocode}
+% The actual parsing work then happens in |\pkgcls@parse@date@arg@|:
+% \begin{macrocode}
+\def\pkgcls@parse@date@arg@#1=#2\@nil{%
+% \end{macrocode}
+% We set |\pkgcls@targetdate| depending on the parsing result; the
+% code is expandable so we can do the parsing as part of the assignment.
+% \begin{macrocode}
+ \pkgcls@targetdate
+% \end{macrocode}
+% If a \texttt{=} was in first position then |#1| will be empty. In
+% that case |#2| will be the original argument with a \texttt{=}
+% appended.
+%
+% This can be parsed with |\@parse@version|, the trailing character
+% is simply ignored. This macro returns the parsed date as a number
+% (or zero if it wasn't a date) and accepts both YYYY/MM/DD and YYYY-MM-DD
+% formats.
+% \begin{macrocode}
+ \ifx\@nil#1\@nil
+ \@parse@version0#2//00\@nil\relax
+% \end{macrocode}
+% Whatever is returned is thus assigned to |\pkgcls@targetdate|
+% and therefore we can now test its value. If the value is zero we
+% assume that the remaining argument string represents a version
+% and change |\pkgcls@targetdate| and set |\pkgcls@targetlabel| to
+% the version name (after stripping off the trailing \texttt{=}.
+% \begin{macrocode}
+ \ifnum \pkgcls@targetdate=\z@
+ \pkgcls@targetdate\@ne
+ \def\pkgcls@innerdate{\maxdimen}%
+ \pkgcls@parse@date@arg@version#2%
+ \else
+ \edef\pkgcls@innerdate{\the\pkgcls@targetdate}%
+ \fi
+ \let\pkgcls@mindate\@empty
+ \else
+% \end{macrocode}
+% If |#1| was not empty then there wasn't a \texttt{=} character in
+% first position so we we are dealing either with a ``minimum
+% date'' or with some incorrect data. We assume the former and make
+% the following assignments (the first one finishing the assignment
+% of |\pkgcls@targetdate|):
+% \begin{macrocode}
+ \requestedLaTeXdate\relax
+ \let\pkgcls@targetlabel\@empty
+ \def\pkgcls@innerdate{\maxdimen}%
+ \def\pkgcls@mindate{#1}%
+% \end{macrocode}
+% If the min-date is after the requested rollback date (if there is
+% any, i.e., if it is not zero) then we have a conflict and
+% therefore issue a warning.
+% \changes{v1.2i}{2018/05/08}
+% {Make suspicious rollback a warning not error: github issue 43}
+% \begin{macrocode}
+ \ifnum \pkgcls@targetdate > \z@
+ \ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate
+ \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak
+ A minimal date of #1 has been specified for
+ \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak
+ But this is in conflict
+ with a rollback request to \requestedpatchdate}
+ \fi
+ \fi
+ \fi
+}
+% \end{macrocode}
+% Strip off te trailing \texttt{=} and assign the version name to
+% |\pkgcls@targetlabel|.
+% \begin{macrocode}
+\def\pkgcls@parse@date@arg@version#1={%
+ \def\pkgcls@targetlabel{#1}}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\DeclareRelease}
+% First argument is the ``name'' of the release and it can be left empty
+% if one doesn't like to give a name to the release.
+% The second argument is that from which on this release was
+% available (or should be used in case of minor updates).
+% The final argument is the external file name of this release, by
+% convention this should be
+% \meta{pkg/cls-name}\texttt{-}\meta{date}\texttt{.}\meta{extension}
+% but this is not enforced and through this argument one can
+% overwrite it.
+% \begin{macrocode}
+\def\DeclareRelease#1#2#3{%
+ \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request
+%<*tracerollback>
+ \pkgcls@debug{---\string\DeclareRelease:}%
+ \pkgcls@debug{\@spaces 1: #1}%
+ \pkgcls@debug{\@spaces 2: #2}%
+ \pkgcls@debug{\@spaces 3: #3}%
+%</tracerollback>
+% \end{macrocode}
+% If the date argument |#2| is empty we are dealing with a special
+% release that should be only accessible via its name; a typical
+% use case would be a ``beta'' release. So if we are
+% currently processing a date request we ignore it and otherwise we
+% check if we can match the name and if so load the corresponding
+% release file.
+% \begin{macrocode}
+ \ifx\@nil#2\@nil
+ \ifnum\pkgcls@targetdate=\@ne % named request
+ \def\reserved@a{#1}%
+ \ifx\pkgcls@targetlabel\reserved@a
+ \pkgcls@use@this@release{#3}{}%
+%<*tracerollback>
+ \else
+ \pkgcls@debug{Label doesn't match}%
+%</tracerollback>
+ \fi
+%<*tracerollback>
+ \else
+ \pkgcls@debug{Date request: ignored}%
+%</tracerollback>
+ \fi
+ \else
+% \end{macrocode}
+% If the value of |\pkgcls@targetdate| is greater than 1 (or in
+% reality greater than something like 19930101) we are dealing with a
+% rollback request to a specific date.
+% \begin{macrocode}
+ \ifnum\pkgcls@targetdate>\@ne % a real request
+% \end{macrocode}
+% So we parse the date of this release to check if it is before or
+% after the request date.
+% \begin{macrocode}
+ \ifnum\@parse@version#2//00\@nil
+ >\pkgcls@targetdate
+% \end{macrocode}
+% If it is after we have to distinguish between two cases: If there
+% was an earlier candidate we use that one because the other is too
+% late, but if there wasn't one (i.e., if current release is the
+% oldest that exists) we use it as the best choice. However in
+% that case something is wrong (as there shouldn't be a rollback to
+% a date where a package used doesn't yet exists. So we make a
+% complained to the user.
+% \begin{macrocode}
+ \ifx\pkgcls@candidate\@empty
+ \pkgcls@rollbackdate@error{#2}%
+ \pkgcls@use@this@release{#3}{#2}%
+ \else
+ \pkgcls@use@this@release\pkgcls@candidate
+ \pkgcls@releasedate
+ \fi
+ \else
+% \end{macrocode}
+% Otherwise, if the release date of this version is before the
+% target rollback and we record it as a candidate. But we don't use
+% it yet as there may be another release which is still before the
+% target rollback.
+% \begin{macrocode}
+ \def\pkgcls@candidate{#3}%
+ \def\pkgcls@releasedate{#2}%
+%<*tracerollback>
+ \pkgcls@debug{New candidate: #3}%
+%</tracerollback>
+ \fi
+ \else
+% \end{macrocode}
+% If we end up in this branch we have a named version request. So
+% we check if |\pkgcls@targetlabel| matches the current name and if
+% yes we use this release immediately, otherwise we do nothing as a
+% later declaration may match it.
+% \begin{macrocode}
+ \def\reserved@a{#1}%
+ \ifx\pkgcls@targetlabel\reserved@a
+ \pkgcls@use@this@release{#3}{#2}%
+%<*tracerollback>
+ \else
+ \pkgcls@debug{Label doesn't match}%
+%</tracerollback>
+ \fi
+ \fi
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\pkgcls@use@this@release}
+% If a certain release has been selected (stored in the external
+% file given in \verb=#1=) we need to input it and afterwards stop
+% reading the current file.
+% \begin{macrocode}
+\def\pkgcls@use@this@release#1#2{%
+% \end{macrocode}
+% Before that we record the selection made inside the transcript.
+% \begin{macrocode}
+ \pkgcls@show@selection{#1}{#2}%
+% \end{macrocode}
+% We then set the |\pkgcls@targetdate| to zero so that any
+% |\DeclareRelease| or |\DeclareCurrentRelease| in the file we
+% now load are bypassed\footnote{The older release may also have
+% such declarations inside if it was a simply copy of the
+% \texttt{.sty} or \texttt{.cls} file current at that
+% date. Removing these declarations would make the file load a tiny
+% bit faster, but this way it works in any case.} and then we
+% finally load the correct release.
+%
+% After loading that file we need to stop reading the current file
+% so we issue |\endinput|. Note that the |\relax| before that is
+% essential to ensure that the |\endinput| is only happening after
+% the file has been fully processed, otherwise it would act after the
+% first line of the |\@@input|!
+% \changes{v1.2e}{2018/03/24}
+% {Use full file name for old release}
+% \begin{macrocode}
+ \pkgcls@targetdate\z@
+ \@@input #1\relax
+ \endinput
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\pkgcls@show@selection}
+% This command records what selection was made. As that is needed
+% in two places (and it is rather lengthly) it was placed in a
+% separate command. The first argument is the name of the external
+% file that is being loaded and is only needed for debugging. The
+% second argument is the date that corresponds to this file and it
+% is used as part of the message.
+% \begin{macrocode}
+\def\pkgcls@show@selection#1#2{%
+%<*tracerollback>
+ \pkgcls@debug{Result: use #1}%
+%</tracerollback>
+ \GenericInfo
+ {\@spaces\@spaces\space}{Rollback for
+ \@cls@pkg\space'\@currname' requested ->
+ \ifnum\pkgcls@targetdate>\@ne
+ date
+ \ifnum\requestedLaTeXdate=\pkgcls@targetdate
+ \requestedpatchdate
+ \else
+ \expandafter\@gobble\pkgcls@arg
+ \fi.\MessageBreak
+% \end{macrocode}
+% Instead of ``best approximation'' we could say that we have been
+% able to exactly match the date (if it is exact), but that would
+% mean extra tests without much gain, so not done.
+% \begin{macrocode}
+ Best approximation is
+ \else
+ version '\pkgcls@targetlabel'.\MessageBreak
+ This corresponds to
+ \fi
+ \ifx\@nil#2\@nil
+ a special release%
+ \else
+ the release introduced on #2%
+ \fi
+ \@gobble}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\pkgcls@rollbackdate@error}
+% This is called if the requested rollback date is earlier than the
+% earliest known release of a package or class.
+%
+% A similar error is given if global rollback date and min-date on
+% a specific package conflict with each other, but that case is
+% happens only once so it is is inlined.
+% \begin{macrocode}
+\def\pkgcls@rollbackdate@error#1{%
+ \@latex@error{Suspicious rollback date given}%
+ {The \@cls@pkg\space'\@currname' claims that it
+ came into existence on #1 which\MessageBreak
+ is after your requested rollback date --- so
+ something is wrong here.\MessageBreak
+ Continue and we use the earliest known release.}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\DeclareCurrentRelease}
+% This declares the date (and possible name) of the current version
+% of a package or class.
+% \begin{macrocode}
+\def\DeclareCurrentRelease#1#2{%
+% \end{macrocode}
+% First we test if |\pkgcls@targetdate| is greater than zero,
+% otherwise this code is bypassed (as there is no rollback
+% request).
+% \begin{macrocode}
+ \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request
+%<*tracerollback>
+ \pkgcls@debug{---DeclareCurrentRelease}%
+ \pkgcls@debug{ 1: #1}%
+ \pkgcls@debug{ 2: #2}%
+%</tracerollback>
+% \end{macrocode}
+% If the value is greater than 1 we have to deal with a date
+% request, so we parse |#2| as a date and compare it with
+% |\pkgcls@targetdate|.
+% \begin{macrocode}
+ \ifnum\pkgcls@targetdate>\@ne % a date request
+ \ifnum\@parse@version#2//00\@nil
+ >\pkgcls@targetdate
+% \end{macrocode}
+% If it is greater that means the release date if this file is
+% later than the requested rollback date. Again we have two cases:
+% If there was a previous candidate release we use that one as the
+% current release is too young, but if there wasn't we have to use
+% this release nevertheless as there isn't any alternative.
+%
+% However this case can only happen if there is a
+% |\DeclareCurrentRelease| but no declared older releases (so
+% basically the use of the declaration is a bit dubious).
+% \begin{macrocode}
+
+ \ifx\pkgcls@candidate\@empty
+ \pkgcls@rollbackdate@error{#2}%
+ \else
+ \pkgcls@use@this@release\pkgcls@candidate
+ \pkgcls@releasedate
+ \fi
+% \end{macrocode}
+% Otherwise the curent file is the right release, so we record that
+% in the transcript and then carry on.
+% \begin{macrocode}
+ \else
+ \pkgcls@show@selection{current version}{#2}%
+ \fi
+ \else % a label request
+% \end{macrocode}
+% Otherwise we have a rollback request to a named version so we
+% check if that fits the current name and if not give an error as
+% this was the last possible opportunity.
+% \begin{macrocode}
+ \def\reserved@a{#1}%
+ \ifx\pkgcls@targetlabel\reserved@a
+ \pkgcls@show@selection{current version}{#2}%
+ \else
+ \@latex@error{Requested version '\pkgcls@targetlabel' for
+ \@cls@pkg\space'\@currname' is unknown}\@ehc
+ \fi
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+% \begin{macro}{\IfTargetDateBefore}
+% This enables a simple form of conditional code inside a class or
+% package file. If there is a date request and the request date is
+% earlier than the first argument the code in the second argument
+% is processed otherwise the code in the third argument is
+% processed. If there was no date request then we also execute the
+% third argument, i.e., we will get the ``latest'' version of the
+% file.
+%
+% Most often the second argument (before-date-code) will be empty.
+% \begin{macrocode}
+\long\def\IfTargetDateBefore#1{%
+ \ifnum\pkgcls@innerdate <%
+ \expandafter\@parse@version\expandafter0#1//00\@nil
+ \typeout{Exclude code introduced on #1}%
+ \expandafter\@firstoftwo
+ \else
+ \typeout{Include code introduced on #1}%
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexreleasefirst>
+% \end{macrocode}
+%
+%
+% \section{After Preamble}
+% Finally we declare a package that allows all the commands declared
+% above to be |\@onlypreamble| to be used after |\begin{document}|.
+% \changes{v0.3f}{1994/03/16}
+% {Add pkgindoc package}
+% \changes{v1.1a}{1998/03/21}
+% {Correct to new onlypreamble command list}
+% \begin{macrocode}
+%<*afterpreamble>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pkgindoc}
+ [1994/10/20 v1.1 Package Interface in Document (DPC)]
+\def\reserved@a#1\do\@classoptionslist#2\do\filec@ntents#3\relax{%
+ \gdef\@preamblecmds{#1#3}}
+\expandafter\reserved@a\@preamblecmds\relax
+%</afterpreamble>
+% \end{macrocode}
+%
+% \Finale
diff --git a/macros/latex-dev/base/ltcntrl.dtx b/macros/latex-dev/base/ltcntrl.dtx
new file mode 100644
index 0000000000..c4e755eca7
--- /dev/null
+++ b/macros/latex-dev/base/ltcntrl.dtx
@@ -0,0 +1,326 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltcntrl.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltcntrl.dtx}
+ [2014/04/21 v1.0h LaTeX Kernel (program control)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltcntrl.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.0b}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0c}{1994/11/28}
+% {Documentation improvements}
+%
+% \section{Program control structure}
+%
+% This section defines a number of control structure macros, such as
+% while-loops and for-loops.
+%
+% \StopEventually{}
+%
+% \begin{oldcomments}
+% \begin{macrocode}
+%<*2ekernel>
+\message{control,}
+% \end{macrocode}
+%
+% \@whilenum TEST \do {BODY}
+% \@whiledim TEST \do {BODY} : These implement the loop
+% while TEST do BODY od
+% where TEST is a TeX \ifnum or \ifdim test, respectively.
+% They are optimized for the normal case of TEST initially false.
+%
+% \@whilesw SWITCH \fi {BODY} : Implements the loop
+% while SWITCH do BODY od
+% Optimized for normal case of SWITCH initially false.
+%
+% \@for NAME := LIST \do {BODY} : Assumes that LIST expands to A1,A2,
+% ... ,An .
+% Executes BODY n times, with NAME = Ai on the i-th iteration.
+% Optimized for the normal case of n = 1. Works for n=0.
+%
+% \@tfor NAME := LIST \do {BODY}
+% if, before expansion, LIST = T1 ... Tn where each Ti is a
+% token or {...}, then executes BODY n times, with NAME = Ti
+% on the i-th iteration. Works for n=0.
+%
+% NOTES: 1. These macros use no \@temp sequences.
+% 2. These macros do not work if the body contains anything that
+% looks syntactically to TeX like an improperly balanced \if
+% \else \fi.
+%
+% \@whilenum TEST \do {BODY} ==
+% BEGIN
+% if TEST
+% then BODY
+% \@iwhilenum{TEST \relax BODY}
+% END
+%
+% \@iwhilenum {TEST BODY} ==
+% BEGIN
+% if TEST
+% then BODY
+% \@nextwhile = def(\@iwhilenum)
+% else \@nextwhile = def(\@whilenoop)
+% fi
+% \@nextwhile {TEST BODY}
+% END
+%
+% \@whilesw SWITCH \fi {BODY} ==
+% BEGIN
+% if SWITCH
+% then BODY
+% \@iwhilesw {SWITCH BODY}\fi
+% fi
+% END
+%
+% \@iwhilesw {SWITCH BODY} \fi ==
+% BEGIN
+% if SWITCH
+% then BODY
+% \@nextwhile = def(\@iwhilesw)
+% else \@nextwhile = def(\@whileswnoop)
+% fi
+% \@nextwhile {SWITCH BODY} \fi
+% END
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\@whilenoop}
+% \begin{macro}{\@whilenum}
+% \begin{macro}{\@iwhilenum}
+% \changes{v1.0f}{1995/07/09}{Reimplemented using Kabelschacht method}
+% \changes{v1.0g}{1995/08/16}{Removed \cs{@whilenoop}}
+% \changes{v1.0g}{1995/08/16}{Made defs long}
+% \begin{macrocode}
+\long\def\@whilenum#1\do #2{\ifnum #1\relax #2\relax\@iwhilenum{#1\relax
+ #2\relax}\fi}
+\long\def\@iwhilenum#1{\ifnum #1\expandafter\@iwhilenum
+ \else\expandafter\@gobble\fi{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@whiledim}
+% \begin{macro}{\@iwhiledim}
+% \changes{v1.0f}{1995/07/09}{Reimplemented using Kabelschacht method}
+% \changes{v1.0g}{1995/08/16}{Removed \cs{@whilenoop}}
+% \changes{v1.0g}{1995/08/16}{Made defs long}
+% \begin{macrocode}
+\long\def\@whiledim#1\do #2{\ifdim #1\relax#2\@iwhiledim{#1\relax#2}\fi}
+\long\def\@iwhiledim#1{\ifdim #1\expandafter\@iwhiledim
+ \else\expandafter\@gobble\fi{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@whileswnoop}
+% \begin{macro}{\@whilesw}
+% \begin{macro}{\@iwhilesw}
+% \changes{v1.0f}{1995/07/09}{Reimplemented using Kabelschacht method}
+% \changes{v1.0g}{1995/08/16}{Removed \cs{@whileswnoop}}
+% \begin{macrocode}
+\long\def\@whilesw#1\fi#2{#1#2\@iwhilesw{#1#2}\fi\fi}
+\long\def\@iwhilesw#1\fi{#1\expandafter\@iwhilesw
+ \else\@gobbletwo\fi{#1}\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{oldcomments}
+%
+% \@for NAME := LIST \do {BODY} ==
+% BEGIN \@forloop expand(LIST),\@nil,\@nil \@@ NAME {BODY} END
+%
+% \@forloop CAR, CARCDR, CDRCDR \@@ NAME {BODY} ==
+% BEGIN
+% NAME = CAR
+% if def(NAME) = def(\@nnil)
+% else BODY;
+% NAME = CARCDR
+% if def(NAME) = def(\@nnil)
+% else BODY
+% \@iforloop CDRCDR \@@ NAME \do {BODY}
+% fi
+% fi
+% END
+%
+% \@iforloop CAR, CDR \@@ NAME {BODY} =
+% NAME = CAR
+% if def(NAME) = def(\@nnil)
+% then \@nextwhile = def(\@fornoop)
+% else BODY ;
+% \@nextwhile = def(\@iforloop)
+% fi
+% \@nextwhile name cdr {body}
+%
+% \@tfor NAME := LIST \do {BODY}
+% = \@tforloop LIST \@nil \@@ NAME {BODY}
+%
+% \@tforloop car cdr \@@ name {body} =
+% name = car
+% if def(name) = def(\@nnil)
+% then \@nextwhile == \@fornoop
+% else body ;
+% \@nextwhile == \@forloop
+% fi
+% \@nextwhile name cdr {body}
+% \end{oldcomments}
+%
+% \begin{macro}{\@nnil}
+% \begin{macrocode}
+\def\@nnil{\@nil}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@empty}
+% \begin{macrocode}
+\def\@empty{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fornoop}
+% \changes{v1.0g}{1995/08/16}{Made defs long}
+% \changes{v1.0h}{2007/08/06}{Really make defs long}
+% \begin{macrocode}
+\long\def\@fornoop#1\@@#2#3{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@for}
+% \changes{v1.0d}{1995/04/24}
+% {Dont expand second argument with \cs{edef}: /1317 (DPC)}
+% \begin{macrocode}
+\long\def\@for#1:=#2\do#3{%
+ \expandafter\def\expandafter\@fortmp\expandafter{#2}%
+ \ifx\@fortmp\@empty \else
+ \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@forloop}
+% \changes{v1.0g}{1995/08/16}{Made defs long}
+% \begin{macrocode}
+\long\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
+ #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iforloop}
+% \changes{v1.0f}{1995/07/09}{Reimplemented using Kabelschacht method}
+% \changes{v1.0g}{1995/08/16}{Made defs long}
+% \begin{macrocode}
+\long\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
+ \expandafter\@fornoop \else
+ #4\relax\expandafter\@iforloop\fi#2\@@#3{#4}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tfor}
+% \changes{LaTeX209}{1991/10/17}
+% {(Rms) \cs{xdef} replaced by \cs{def}
+% (See FMi's array.doc)}
+% \changes{v1.0c}{1994/03/13}
+% {(DPC) Add \cs{@tf@r} so a single group is
+% correctly treated.}
+% \changes{v1.0f}{1995/07/09}{Reimplemented using Kabelschacht method}
+% \changes{v1.0g}{1995/08/16}{Made defs long}
+% \begin{macrocode}
+\def\@tfor#1:={\@tf@r#1 }
+\long\def\@tf@r#1#2\do#3{\def\@fortmp{#2}\ifx\@fortmp\space\else
+ \@tforloop#2\@nil\@nil\@@#1{#3}\fi}
+\long\def\@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
+ \expandafter\@fornoop \else
+ #4\relax\expandafter\@tforloop\fi#2\@@#3{#4}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@break@tfor}
+% Break out of a |\@tfor| loop. This should be called \emph{inside}
+% the scope of an |\if|. See |\@iffileonpath| for an example.
+% \changes{v1.0l}{1994/05/02}{Macro added (from ltfiles.dtx)}
+% \changes{v1.0g}{1995/08/16}{Made long}
+% \begin{macrocode}
+\long\def\@break@tfor#1\@@#2#3{\fi\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@removeelement}
+% Removes an element from a comma-separated list and puts it into
+% a control sequence, called as
+% |\@removeelement{|\meta{element}|}{|\meta{list}|}{|\meta{cs}|}|.
+% Due to the implementation method the \meta{element} is not allowed
+% to contain braces.
+% \begin{macrocode}
+\def\@removeelement#1#2#3{%
+ \def\reserved@a##1,#1,##2\reserved@a{##1,##2\reserved@b}%
+ \def\reserved@b##1,\reserved@b##2\reserved@b{%
+ \ifx,##1\@empty\else##1\fi}%
+ \edef#3{%
+ \expandafter\reserved@b\reserved@a,#2,\reserved@b,#1,\reserved@a}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{v1.0e}{1995/04/29}{Removed unused defs for
+% \cs{@setprotect} and \cs{@resetprotect}}
+% \changes{v1.0e}{1995/04/29}{Moved init of \cs{protect}
+% to ltdefns.dtx}
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%\Finale
+\endinput
diff --git a/macros/latex-dev/base/ltcounts.dtx b/macros/latex-dev/base/ltcounts.dtx
new file mode 100644
index 0000000000..8158ef7c61
--- /dev/null
+++ b/macros/latex-dev/base/ltcounts.dtx
@@ -0,0 +1,682 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltcounts.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltcounts.dtx}
+ [2018/04/22 v1.1l LaTeX Kernel (Counters)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltcounts.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0c}{1994/03/29}
+% {Create file from parts of ltmiscen and ltherest.}
+% \changes{v1.1a}{1994/05/19}{Extracted file from ltcntlen.}
+% \changes{v1.1d}{1996/04/23}{Documentation improvements}
+%
+% \section{Counters and Lengths}
+% Commands for defining and using counters. This file defines:
+%
+% \DescribeMacro{\newcounter}
+% To define a new counter.
+%
+% \DescribeMacro{\setcounter}
+% To set the value of counters.
+%
+% \DescribeMacro{\addtocounter}
+% Increase the counter |#1| by the number |#2|.
+%
+% \DescribeMacro{\stepcounter}
+% Increase a counter by one.
+%
+% \DescribeMacro{\refstepcounter}
+% Increase a counter by one, also setting the value used by |\label|.
+%
+%
+% \DescribeMacro{\value}
+% For accessing the value of the counter as a \TeX\ number (as opposed
+% to |\the|\meta{counter} which expands to the \emph{printed}
+% representation of \meta{counter})
+%
+% \DescribeMacro\arabic
+% |\arabic|\marg{counter}: 1, 2, 3, \ldots
+%
+% \DescribeMacro\roman
+% |\roman|\marg{counter}: i, ii, iii, \ldots
+%
+% \DescribeMacro\Roman
+% |\Roman|\marg{counter}: I, II, III, \ldots
+%
+% \DescribeMacro\alph
+% |\alph|\marg{counter}: a, b, c, \ldots
+%
+% \DescribeMacro\Alph
+% |\Alph|\marg{counter}: A, B, C, \ldots
+%
+% \DescribeMacro\fnsymbol
+% |\fnsymbol|\marg{counter}: $*$, $\dagger$, $\ddagger$, \ldots
+%
+%
+% \DescribeMacro\counterwithin
+% |\counterwithin|\marg{counter}\marg{within-counter}:
+% Resets \meta{counter} whenever
+% \meta{within-counter} is stepped. Also
+% redefines |\the|\meta{counter} command to produce
+% |\the|\meta{within-counter}|.\arabic|\marg{counter}.
+% Star form omits redefining the print representation.
+
+%
+% \DescribeMacro\counterwithout
+% |\counterwithout|\marg{counter}\marg{within-counter}:
+% Removes \meta{counter} from the reset list of \meta{within-counter}.
+% Also
+% redefines |\the|\meta{counter} command to produce
+% |\arabic|\marg{counter}.
+% Star form omits redefining the print representation.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \subsection{Environment Counter Macros}
+%
+% An environment foo has an associated counter defined by the
+% following control sequences:
+%
+% \begin{tabular}{lp{.75\textwidth}}
+% |\c@foo| & Contains the counter's numerical value.
+% It is defined by |\newcount\foocounter|.\\
+% |\thefoo| & Macro that expands to the printed value of |\foocounter|.
+% For example, if sections are numbered within chapters,
+% and section headings look like
+%
+% Section II-3. The Nature of Counters
+%
+% then |\thesection| might be defined by:\newline
+% |\def\thesection|\newline\hspace*{2em}
+% |{\@Roman{\c@chapter}-\@arabic{\c@section}}|\\
+%
+% |\p@foo| & Macro that expands to a printed `reference prefix' of
+% counter foo. Any |\ref| to a value created by counter
+% foo will produce the expansion of |\p@foo\thefoo| when
+% the |\label| command is executed. See file \texttt{ltxref.dtx}
+% for an extension of this mechanism.\\
+% |\cl@foo| & List of counters to be reset when foo stepped.
+% Has format
+% |\@elt{countera}\@elt{counterb}\@elt{counterc}|.
+% \end{tabular}
+%
+% \textbf{NOTE:}\\
+% |\thefoo| and |\p@foo| \emph{must} be defined in such a way that
+% |\edef\bar{\thefoo}| or |\edef\bar{\p@foo}|
+% defines |\bar| so that it will evaluate to the counter value at the
+% time of the |\edef|, even after |\foocounter| and any other counters
+% have been changed. This will happen if you use the standard commands
+% |\@arabic|, |\@Roman|, etc.
+%
+%
+% The following commands are used to define and modify counters.
+%
+% |\refstepcounter|\marg{foo}\\
+% Same as |\stepcounter|, but it also defines
+% |\@currentreference| so that a subsequent
+% |\label|\marg{bar} command causes |\ref|\marg{bar} to
+% generate the current value of counter \meta{foo}.
+%
+% |\@definecounter|\marg{foo}\\
+% Initializes counter \marg{foo} (with empty reset list), defines
+% |\p@foo| and |\thefoo| to be null. Also adds \meta{foo}
+% to |\cl@@ckpt| --
+% the reset list of a dummy counter |@ckpt| used for taking
+% checkpoints for the |\include| system.
+%
+% |\@addtoreset|\marg{foo}\marg{bar} :
+% Adds counter \meta{foo} to the list of counters
+% |\cl@bar| to be reset when counter \meta{bar} is stepped.
+%
+% |\@removefromreset|\marg{foo}\marg{bar} :
+% Removes counter \meta{foo} to the list of counters
+% |\cl@bar| to be reset when counter \meta{bar} is stepped.
+%
+%
+% \begin{macro}{\setcounter}
+% \changes{v1.0d}{1994/04/09}
+% {\cs{@nocnterr} now has counter name argument}
+% \changes{v1.0e}{1994/04/17}
+% {Use \cs{@nocounterr} instead of \cs{@nocnterr}}
+% |\setcounter|\marg{foo}\marg{val} :
+% Globally sets |\foocounter| equal to \meta{val}.
+% \begin{macrocode}
+\def\setcounter#1#2{%
+ \@ifundefined{c@#1}%
+ {\@nocounterr{#1}}%
+ {\global\csname c@#1\endcsname#2\relax}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\addtocounter}
+% \changes{v1.0d}{1994/04/09}
+% {\cs{@nocnterr} now has counter name argument}
+% \changes{v1.0e}{1994/04/17}
+% {Use \cs{@nocounterr} instead of \cs{@nocnterr}}
+% |\addtocounter|\marg{foo}\marg{val}
+% Globally increments |\foocounter| by \meta{val}.
+% \begin{macrocode}
+\def\addtocounter#1#2{%
+ \@ifundefined{c@#1}%
+ {\@nocounterr{#1}}%
+ {\global\advance\csname c@#1\endcsname #2\relax}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newcounter}
+% |\newcounter|\marg{newctr}\oarg{oldctr}
+% Defines \meta{newctr} to be a counter, which is reset when counter
+% \meta{oldctr} is stepped. If \meta{newctr} already defined
+% produces
+% `|c@newctr already defined|' error.
+% \begin{macrocode}
+\def\newcounter#1{%
+ \expandafter\@ifdefinable \csname c@#1\endcsname
+ {\@definecounter{#1}}%
+ \@ifnextchar[{\@newctr{#1}}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\value}
+% |\value|\marg{ctr}
+% produces the value of counter \meta{ctr}, for use with
+% a |\setcounter| or |\addtocounter| command.
+% \begin{macrocode}
+\def\value#1{\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@newctr}
+% \changes{v1.0d}{1994/04/09}
+% {\cs{@nocnterr} now has counter name argument}
+% \changes{v1.0e}{1994/04/17}
+% {Use \cs{@nocounterr} instead of \cs{@nocnterr}}
+% \begin{macrocode}
+\def\@newctr#1[#2]{%
+ \@ifundefined{c@#2}{\@nocounterr{#2}}{\@addtoreset{#1}{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\stepcounter}
+% \changes{LaTeX209}{1992/11/23}{Replaced \{\} in \cs{stepcounter} by
+% \cs{begingroup} \cs{endgroup} to avoid adding an empty ord in
+% math mode}
+% \changes{v1.0d}{1994/04/09}
+% {Use \cs{addtocounter} to have name checked}
+% |\stepcounter|{foo}
+% Globally increments counter |\c@FOO|
+% and resets all subsidiary counters.
+% \begin{macrocode}
+\def\stepcounter#1{%
+ \addtocounter{#1}\@ne
+ \begingroup
+ \let\@elt\@stpelt
+ \csname cl@#1\endcsname
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@stpelt}
+% \changes{v1.1h}{2015/01/10}{Reset all within counters in one go (latexrelease)}
+%
+% Rather than resetting the ``within'' counter to zero we set it to
+% $-1$ and then run |\stepcounter| that moves it to $0$ and also
+% initiates resetting the next level down.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@stpelt}
+%<latexrelease> {Reset nested counters}%
+%<*2ekernel|latexrelease>
+\def\@stpelt#1{\global\csname c@#1\endcsname \m@ne\stepcounter{#1}}%
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@stpelt}
+%<latexrelease> {Reset nested counters}%%
+%<latexrelease>\def\@stpelt#1{\global\csname c@#1\endcsname \z@}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cl@@ckpt}
+% \begin{macrocode}
+\def\cl@@ckpt{\@elt{page}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@definecounter}
+% \changes{v1.1b}{1995/05/20}{Streamlined code}
+% \changes{v1.1c}{1995/05/20}{And do it right}
+%
+% \begin{macrocode}
+\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
+ \setcounter{#1}\z@
+ \global\expandafter\let\csname cl@#1\endcsname\@empty
+ \@addtoreset{#1}{@ckpt}%
+ \global\expandafter\let\csname p@#1\endcsname\@empty
+ \expandafter
+ \gdef\csname the#1\expandafter\endcsname\expandafter
+ {\expandafter\@arabic\csname c@#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addtoreset}
+% \begin{macrocode}
+\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% \begin{macro}{\@removefromreset}
+% \changes{v1.1k}{2018/03/08}{Interface added}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2018-04-01}
+%<latexrelease> {\@removefromreset}{Add interfaces}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@removefromreset#1#2{%
+% \end{macrocode}
+% Even through this is internal and the programmer should know what
+% he/she is doing we test here if counter |#2| is defined. If not,
+% the execution would run into a tight loop.
+% \begin{macrocode}
+ \@ifundefined{c@#2}\relax
+ {\begingroup
+ \expandafter\let\csname c@#1\endcsname\@removefromreset
+ \def\@elt##1{%
+ \expandafter\ifx\csname c@##1\endcsname\@removefromreset
+ \else
+ \noexpand\@elt{##1}%
+ \fi}%
+ \expandafter\xdef\csname cl@#2\endcsname
+ {\csname cl@#2\endcsname}%
+ \endgroup}}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\@ifbothcounters}
+% \changes{v1.1k}{2018/03/08}{Interface added}
+% Test if arg |#1| and |#2| are counters and if so execute |#3|.
+% \begin{macrocode}
+\def\@ifbothcounters#1#2#3{%
+ \@ifundefined{c@#1}{\@nocounterr{#1}}%
+ {% else counter is defined
+ \@ifundefined{c@#2}{\@nocounterr{#2}}%
+ {% else both counter and within are defined
+ #3}}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\counterwithout}
+%
+% \changes{v1.1k}{2018/03/08}{Interface added}
+% \begin{macrocode}
+\def\counterwithout {\@ifstar\counterwithout@s\counterwithout@x}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\counterwithout@s#1#2{%
+ \@ifbothcounters{#1}{#2}{\@removefromreset{#1}{#2}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\counterwithout@x#1#2{%
+ \@ifbothcounters{#1}{#2}%
+ {\@removefromreset{#1}{#2}%
+ \expandafter
+ \gdef\csname the#1\expandafter\endcsname\expandafter
+ {\expandafter
+ \@arabic\csname c@#1\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\counterwithin}
+%
+% \changes{v1.1k}{2018/03/08}{Interface added}
+% \begin{macrocode}
+\def\counterwithin{\@ifstar\counterwithin@s\counterwithin@x}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\counterwithin@s#1#2{%
+ \@ifbothcounters{#1}{#2}{\@addtoreset{#1}{#2}}}
+% \end{macrocode}
+%
+% \changes{v1.1l}{2018/04/11}{Correct default (issue/38)}
+% \begin{macrocode}
+\def\counterwithin@x#1#2{%
+ \@ifbothcounters{#1}{#2}%
+ {\@addtoreset{#1}{#2}%
+ \expandafter
+ \gdef\csname the#1\expandafter\endcsname\expandafter
+ {\csname the#2\expandafter\endcsname\expandafter
+ .\expandafter
+ \@arabic\csname c@#1\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+
+
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}
+%<latexrelease> {\@removefromreset}{Add interfaces}%
+%<latexrelease>\let \@removefromreset \undefined
+%<latexrelease>\let \@ifbothcounters \undefined
+%<latexrelease>\let \counterwithout \undefined
+%<latexrelease>\let \counterwithout@s \undefined
+%<latexrelease>\let \counterwithout@x \undefined
+%<latexrelease>\let \counterwithin \undefined
+%<latexrelease>\let \counterwithin@s \undefined
+%<latexrelease>\let \counterwithin@x \undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+% Numbering commands for definitions of |\theCOUNTER| and |\list|
+% arguments.
+%
+% All commands can now be used in text and math mode.
+%
+% \begin{macro}{\arabic}
+% Representation of\meta{counter} as arabic numerals.
+% Changed 29 Apr 86 to make it print the obvious thing
+% it COUNTER not positive.
+% \begin{macrocode}
+\def\arabic#1{\expandafter\@arabic\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\roman}
+% Representation of \meta{counter} as lower-case
+% Roman numerals.
+% \begin{macrocode}
+\def\roman#1{\expandafter\@roman\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Roman}
+% Representation of \meta{counter} as upper-case
+% Roman numerals.
+% \begin{macrocode}
+\def\Roman#1{\expandafter\@Roman\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\alph}
+% Representation of \meta{counter} as a lower-case
+% letter: 1 = a, 2 = b, etc.
+% \begin{macrocode}
+\def\alph#1{\expandafter\@alph\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Alph}
+% Representation of \meta{counter} as an upper-case
+% letter: 1 = A, 2 = B, etc.
+% \begin{macrocode}
+\def\Alph#1{\expandafter\@Alph\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fnsymbol}
+% \changes{v1.1b}{1995/05/20}{Streamlined code}
+% \changes{v1.1e}{1997/03/21}
+% {Use \cs{mathsection} and \cs{mathparagraph}. latex/2445}
+%
+% Representation of \meta{COUNTER} as a footnote
+% symbol: 1 = $*$, 2 = $\dagger$, etc.
+% \begin{macrocode}
+\def\fnsymbol#1{\expandafter\@fnsymbol\csname c@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0f}{1994/05/13}{Removed \cs{@ialph}}
+% \changes{v1.0f}{1994/05/13}{Removed \cs{@Ialph}}
+%
+% \begin{macro}{\@arabic}
+% |\@arabic\FOOcounter|
+% Representation of |\FOOcounter| as arabic numerals.
+% \begin{macrocode}
+\def\@arabic#1{\number #1} %% changed 29 Apr 86
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@roman}
+% |\@roman\FOOcounter|
+% Representation of |\FOOcounter| as lower-case
+% Roman numerals.
+% \begin{macrocode}
+\def\@roman#1{\romannumeral #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@Roman}
+% |\@Roman\FOOcounter|
+% Representation of |\FOOcounter| as upper-case
+% Roman numerals.
+
+% \changes{v1.1f}{1997/10/06}{Change \cs{@Roman} to be fully
+% expandable, so that the result is written properly to files.}
+% \begin{macrocode}
+\def\@Roman#1{\expandafter\@slowromancap\romannumeral #1@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@slowromancap}
+% \changes{v1.1f}{1997/10/06}{Macro added.}
+% Fully expandable macro to change a roman number to uppercase.
+% \begin{macrocode}
+\def\@slowromancap#1{\ifx @#1% then terminate
+ \else
+ \if i#1I\else\if v#1V\else\if x#1X\else\if l#1L\else\if
+ c#1C\else\if d#1D\else \if m#1M\else#1\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\@slowromancap
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@alph}
+% |\@alph\FOOcounter|
+% Representation of |\FOOcounter| as a lower-case
+% letter: 1 = a, 2 = b, etc.
+% \begin{macrocode}
+\def\@alph#1{%
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or
+ k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
+ y\or z\else\@ctrerr\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@Alph}
+% |\@Alph\FOOcounter|
+% Representation of |\FOOcounter| as an upper-case
+% letter: 1 = A, 2 = B, etc.
+% \begin{macrocode}
+\def\@Alph#1{%
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or
+ K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or
+ Y\or Z\else\@ctrerr\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fnsymbol}
+% \changes{v1.1b}{1995/05/20}{Allowing both text and math}
+% Typesetting old fashioned footnote symbols.
+% This can be done both in text or math mode now.
+%
+% \changes{v1.1h}{2015/01/10}{Unse \cs{TextOrMath} (latexrelease)}
+% This macro is another example of an ever recurring problem in
+% \TeX: Determining if something is text-mode or math-mode. It is
+% imperative for the decision between text and math to be delayed
+% until the actual typesetting is done as the code in question may
+% go through an |\edef| or |\write| where an |\ifmmode| test would
+% be executed prematurely. Hence in the implementation below,
+% |\@fnsymbol| is not robust in itself but the parts doing the
+% actual typesetting are.
+%
+% In the case of |\@fnsymbol| we make use of the robust command
+% |\TextOrMath| which takes two arguments and typesets the first if
+% in text-mode and the second if in math-mode. Note that in order
+% for this command to make the correct decision, it must insert a
+% |\relax| token if run under regular \TeX, which ruins any kerning
+% between the preceding characters and whatever awaits
+% typesetting. If you use e\TeX\ as engine for \LaTeX\ (as
+% recommended) this unfortunate side effect is not present.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@fnsymbol}{Use \TexOrMath}%
+%<*2ekernel|latexrelease>
+\def\@fnsymbol#1{%
+ \ifcase#1\or \TextOrMath\textasteriskcentered *\or
+ \TextOrMath \textdagger \dagger\or
+ \TextOrMath \textdaggerdbl \ddagger \or
+ \TextOrMath \textsection \mathsection\or
+ \TextOrMath \textparagraph \mathparagraph\or
+ \TextOrMath \textbardbl \|\or
+ \TextOrMath {\textasteriskcentered\textasteriskcentered}{**}\or
+ \TextOrMath {\textdagger\textdagger}{\dagger\dagger}\or
+ \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}\else
+ \@ctrerr \fi
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@fnsymbol}{Use \TexOrMath}%
+%<latexrelease>\def\@fnsymbol#1{\ensuremath{%
+%<latexrelease> \ifcase#1\or *\or \dagger\or \ddagger\or \mathsection\or
+%<latexrelease> \mathparagraph\or \|\or **\or \dagger\dagger
+%<latexrelease> \or \ddagger\ddagger \else\@ctrerr\fi}}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TextOrMath}
+% \changes{v1.1h}{2015/01/11}{Add command to solve robustness
+% issues (pr/3752) (latexrelease)}
+% \changes{v1.1j}{2016/10/19}{Test directly for \cs{protected}}
+% When using regular \TeX, we make this command robust so that it
+% always selects the correct branch in an |\ifmmode| switch with
+% the usual disadvantage of ruining kerning. For the application we
+% use it for here that shouldn't matter. The alternative would be
+% to mimic |\IeC| from \textsf{inputenc} but then it wil have the
+% disadvantage of choosing the wrong branch if appearing at the
+% beginning of an alignment cell. However, users of e\TeX\ will be
+% pleasantly surprised to get the best of both worlds and no bad
+% side effects.
+%
+% First some code for checking if we are running e\TeX\ but making
+% sure not to permanently turn |\protected| into |\relax|.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\TextOrMath}{\TextOrMath}%
+%<*2ekernel|latexrelease>
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+% \end{macrocode}
+% In case of ordinary \TeX\ we define |\TextOrMath| as a robust
+% command but make sure it always grabs its arguments. If we didn't do
+% this it might very well gobble spaces in the input stream.
+% \begin{macrocode}
+\DeclareRobustCommand\TextOrMath{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi}
+\protected@edef\TextOrMath#1#2{\TextOrMath{#1}{#2}}
+\else
+% \end{macrocode}
+% For e\TeX\ the situation is similar. The robust macro is a hidden
+% one so that we again avoid problems of gobbling spaces in the input.
+% \begin{macrocode}
+\protected\expandafter\def\csname TextOrMath\space\endcsname{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi}
+\edef\TextOrMath#1#2{%
+ \expandafter\noexpand\csname TextOrMath\space\endcsname
+ {#1}{#2}}
+\fi
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\TextOrMath}{\TextOrMath}%
+%<latexrelease>\let\TextOrMath\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltdefns.dtx b/macros/latex-dev/base/ltdefns.dtx
new file mode 100644
index 0000000000..3a7d6f06ea
--- /dev/null
+++ b/macros/latex-dev/base/ltdefns.dtx
@@ -0,0 +1,1544 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltdefns.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltdefns.dtx}
+ [2018/09/26 v1.5e LaTeX Kernel (definition commands)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltdefns.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0n}{1994/05/10}{(ASAJ) Added
+% \cs{DeclareProtectedCommand}.}
+% \changes{v1.0p}{1994/05/12}{(ASAJ) Fixed a bug with \cs{relax}
+% which was
+% using \cs{@gobble} before defining it.}
+% \changes{v1.0q}{1994/05/13}{(ASAJ) Renamed
+% \cs{DeclareProtectedCommand} to
+% \cs{DeclareRobustCommand}. Removed \cs{@if@short@command}.}
+% \changes{v1.0q}{1994/05/13}{(ASAJ) Replaces \cs{space} by `~' in
+% \cs{csname}.}
+% \changes{v1.0r}{1994/05/13}{(ASAJ) Added logging message to
+% \cs{DeclareProtectedCommand}.}
+% \changes{v1.0s}{1994/05/13}{(ASAJ) Added \cs{@backslashchar}.}
+% \changes{v1.0s}{1994/05/13}{(ASAJ) Coded \cs{@ifdefinable} more
+% efficiently.}
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.1b}{1994/05/17}{(ASAJ) Removed warnings and logging to
+% lterror.dtx.}
+% \changes{v1.1b}{1994/05/17}{(ASAJ) Added definitions for protect.}
+% \changes{v1.1c}{1994/05/17}{(ASAJ) Redid definitions for protect.}
+% \changes{v1.1d}{1994/05/19}{(RmS) Added definitions for
+% \cs{@namedef} and \cs{@nameuse} again.}
+% \changes{v1.1e}{1994/05/20}{Changed command name from
+% \cs{@checkcommand} to \cs{CheckCommand}.}
+% \changes{v1.1f}{1994/05/22}{Use new warning and error cmds}
+% \changes{v1.2a}{1994/10/18}{Add star-forms for all commands}
+% \changes{v1.2a}{1994/10/18}{Add extra test for \cs{endgraf}}
+% \changes{v1.2b}{1994/10/25}{Documentation improvements}
+% \changes{v1.2c}{1994/10/30}{(CAR)\cs{@onelevel@sanitize} added}
+% \changes{v1.2f}{1994/10/30}{(DPC)\cs{newwrite}'s moved to ltfiles}
+% \changes{v1.0g}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0p}{1995/07/13}{Updates to documentation}
+% \changes{v1.4b}{2015/02/21}
+% {Removed autoload support}
+%
+% \section{Definitions}
+%
+% This section contains commands used in defining other macros.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \subsection{Initex initialisations}
+%
+% \task{???}{This section needs extension}
+%
+% \begin{macro}{\two@digits}
+% \changes{LaTeX2e}{1993/11/23}{Macro added}
+% Prefix a number less than 10 with `0'.
+% \begin{macrocode}
+\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.2e}{1994/11/04}{Added \cs{set@display@protect} to
+% \cs{typeout}. ASAJ.}
+%
+% \begin{macro}{\typeout}
+% Display something on the terminal.
+% \begin{macrocode}
+\def\typeout#1{\begingroup\set@display@protect
+ \immediate\write\@unused{#1}\endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newlinechar}
+% A char to be used as new-line in output to files.
+% \begin{macrocode}
+\newlinechar`\^^J
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Saved versions of \TeX{} primitives}
+%
+% The TeX primitive |\foo| is saved as |\@@foo|.
+% The following primitives are handled in this way:
+% \begin{macro}{\@@par}
+% \begin{macrocode}
+\let\@@par=\par
+%\let\@@input=\input %%% moved earlier
+%\let\@@end=\end %%%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@hyph}
+% Save original primitive definition.
+% \begin{macrocode}
+\let\@@hyph=\-
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@italiccorr}
+% Save the original italic correction.
+% \changes{v1.0a}{1994/03/07}{Macro added}
+% \begin{macrocode}
+\let\@@italiccorr=\/
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@height}
+% \begin{macro}{\@depth}
+% \begin{macro}{\@width}
+% \begin{macro}{\@minus}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \begin{macro}{\@plus}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+%
+% The following definitions save token space. E.g., using
+% |\@height| instead of height saves 5 tokens at the cost in time
+% of one macro expansion.
+% \begin{macrocode}
+\def\@height{height} \def\@depth{depth} \def\@width{width}
+\def\@minus{minus}
+\def\@plus{plus}
+% \end{macrocode}
+% \begin{macro}{\hb@xt@}
+% \changes{v1.2k}{1995/05/07}{Macro added}
+% The next one is another 100 tokens worth.
+% \begin{macrocode}
+\def\hb@xt@{\hbox to}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\message{hacks,}
+% \end{macrocode}
+%
+% \subsection{Command definitions}
+%
+% This section defines the following commands:
+%
+% \DescribeMacro
+% {\@namedef}\marg{NAME}\\ Expands to |\def\|\marg{NAME},
+% except name can contain any characters.
+%
+% \DescribeMacro
+% {\@nameuse}\marg{NAME}\\
+% Expands to |\|\marg{NAME}.
+%
+% \DescribeMacro
+% {\@ifnextchar} X\marg{YES}\marg{NO}\\
+% Expands to \meta{YES} if next character is an `X',
+% and to \meta{NO} otherwise.
+% (Uses |\reserved@a|--|\reserved@c|.)
+% NOTE: GOBBLES ANY SPACE FOLLOWING IT.
+%
+% \DescribeMacro
+% {\@ifstar}\marg{YES}\marg{NO}\\
+% Gobbles following spaces and then tests if next the
+% character is a '*'. If it is, then it gobbles the
+% `*' and expands to \meta{YES}, otherwise it expands to \meta{NO}.
+%
+% \DescribeMacro
+% {\@dblarg}\marg{CMD}\marg{ARG}\\
+% Expands to |\|\marg{CMD}\oarg{ARG}\marg{ARG}. Use
+% |\@dblarg\CS| when |\CS| takes arguments |[ARG1]{ARG2}|,
+% where default is| ARG1| = |ARG2|.
+%
+% \DescribeMacro
+% {\@ifundefined}\marg{NAME}\marg{YES}\marg{NO}\\
+% : If \cs{NAME} is undefined then it executes \meta{YES},
+% otherwise it executes \meta{NO}. More precisely,
+% true if \cs{NAME} either undefined or = |\relax|.
+%
+% \DescribeMacro
+% {\@ifdefinable}|\NAME|\marg{YES}
+% Executes \meta{YES} if the user is allowed to define |\NAME|,
+% otherwise it gives an error. The user can define |\NAME|
+% if |\@ifundefined{NAME}| is true, '|NAME|' $\neq$ '|relax|'
+% and the first three letters of '|NAME|' are not
+% '|end|', and if |\endNAME| is not defined.
+%
+% \DescribeMacro
+% \newcommand|*|\marg{\cs{FOO}}\oarg{i}\marg{TEXT}\\
+% User command to define |\FOO| to be a macro with
+% i arguments (i = 0 if missing) having the definition
+% \meta{TEXT}. Produces an error if |\FOO| already
+% defined.
+%
+% Normally the command is defined to be |\long| (ie it may
+% take multiple paragraphs in its argument). In the
+% star-form, the command is not defined as |\long| and a
+% blank line in any argument to the command would generate
+% an error.
+%
+% \DescribeMacro
+% \renewcommand|*|\marg{\cs{FOO}}\oarg{i}\marg{TEXT}\\
+% Same as |\newcommand|, except it checks if |\FOO| already defined.
+%
+% \DescribeMacro
+% \newenvironment|*|\marg{FOO}\oarg{i}\marg{DEF1}\marg{DEF2}\\
+% equivalent to:\\
+% |\newcommand{\FOO}[i]{DEF1}| |\def{\endFOO}{DEF2}|\\
+% (or the appropriate star forms).
+%
+% \DescribeMacro
+% \renewenvironment\\ Obvious companion to |\newenvironment|.
+%
+% \DescribeMacro
+% \@cons : See description of |\output| routine.
+%
+% \DescribeMacro{\@car}
+% |\@car T1 T2 ... Tn\@nil| == |T1| (unexpanded)
+%
+% \DescribeMacro{\@cdr}
+% |\@cdr T1 T2 ... Tn\@ni|l == |T2 ... Tn| (unexpanded)
+%
+% \DescribeMacro
+% \typeout\marg{message}\\ Produces a warning message on the terminal.
+%
+% \DescribeMacro
+% \typein\marg{message}\\
+% Types message, asks the user to type in a command, then
+% executes it
+%
+% \DescribeMacro
+% \typein\oarg{\cs{CS}}\marg{MSG}\\
+% Same as above, except defines |\CS| to be the input
+% instead of executing it.
+%
+% \changes{LaTeX209}{1992/03/18}
+% {(RMS) changed input channel from 0 to \cs{@inputcheck} to avoid
+% conflicts with other channels allocated by \cs{newread}}
+%
+% \begin{macro}{\typein}
+%
+% \changes{v1.2k}{1995/05/08}{Use \cs{@firstofone}}
+% \changes{v1.2l}{1995/05/08}{Remove unnecessary braces}
+% \changes{v1.2l}{1995/05/08}{Replace \cs{def} by \cs{let}}
+% \changes{v1.2m}{1995/05/24}{(DPC) New implementation}
+% \changes{v1.2u}{1995/10/16}{(DPC) Use \cs{@testopt} /1911}
+% \begin{macrocode}
+\def\typein{%
+ \let\@typein\relax
+ \@testopt\@xtypein\@typein}
+% \end{macrocode}
+%
+% \changes{v1.2r}{1995/10/03}
+% {Add missing \cs{@typein} for /1710 (from patch file)}
+% \changes{v1.4a}{2015/01/03}{use modified definition in luatex}
+% \begin{macrocode}
+\ifx\directlua\@undefined
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@xtypein[#1]#2{%
+ \typeout{#2}%
+ \advance\endlinechar\@M
+ \read\@inputcheck to#1%
+ \advance\endlinechar-\@M
+ \@typein}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@xtypein[#1]#2{%
+ \typeout{#2}%
+ \begingroup \endlinechar\m@ne
+ \read\@inputcheck to#1%
+ \expandafter\endgroup
+ \expandafter\def\expandafter#1\expandafter{#1}%
+ \@typein}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@namedef}
+% \begin{macrocode}
+\def\@namedef#1{\expandafter\def\csname #1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nameuse}
+% \begin{macrocode}
+\def\@nameuse#1{\csname #1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@cons}
+% \begin{macrocode}
+\def\@cons#1#2{\begingroup\let\@elt\relax\xdef#1{#1\@elt #2}\endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@car}
+% \begin{macro}{\@cdr}
+% \begin{macrocode}
+\def\@car#1#2\@nil{#1}
+\def\@cdr#1#2\@nil{#2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@carcube}
+% |\@carcube T1 ... Tn\@nil| = |T1| |T2| |T3| , $n > 3$
+% \begin{macrocode}
+\def\@carcube#1#2#3#4\@nil{#1#2#3}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@onlypreamble}
+% \begin{macro}{\@preamblecmds}
+% This macro adds its argument to the list of commands stored in
+% |\@preamblecmds| to be
+% disabled after |\begin{document}|. These commands are redefined
+% to generate |\@notprerr| at this point.
+% \begin{macrocode}
+\def\@preamblecmds{}
+\def\@onlypreamble#1{%
+ \expandafter\gdef\expandafter\@preamblecmds\expandafter{%
+ \@preamblecmds\do#1}}
+\@onlypreamble\@onlypreamble
+\@onlypreamble\@preamblecmds
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@star@or@long}
+% \changes{v1.2a}{1994/10/18}{macro added}
+% Look ahead for a |*|. If present reset |\l@ngrel@x| so that
+% the next definition, |#1|, will be non-long.
+% \begin{macrocode}
+\def\@star@or@long#1{%
+ \@ifstar
+ {\let\l@ngrel@x\relax#1}%
+ {\let\l@ngrel@x\long#1}}
+% \end{macrocode}
+% \end{macro}
+%
+
+% \begin{macro}{\l@ngrel@x}
+% This is either |\relax| or |\long| depending on whether the |*|-form
+% of a definition command is being executed.
+% \begin{macrocode}
+\let\l@ngrel@x\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newcommand}
+% \changes{LaTeX2e}{1993/11/23}{Macro reimplemented and extended}
+% User level |\newcommand|.%
+% \begin{macrocode}
+\def\newcommand{\@star@or@long\new@command}
+% \end{macrocode}
+%
+% \begin{macro}{\new@command}
+% \changes{v1.2u}{1995/10/16}{(DPC) Use \cs{@testopt} /1911}
+% \begin{macrocode}
+\def\new@command#1{%
+ \@testopt{\@newcommand#1}0}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@newcommand}
+% \changes{LaTeX2e}{1993/11/23}{Macro added}
+% \begin{macro}{\@argdef}
+% \changes{LaTeX2e}{1993/11/23}{Macro added}
+% \begin{macro}{\@xargdef}
+% \changes{LaTeX2e}{1993/11/23}{Macro interface changed}
+% \changes{v1.1g}{2004/01/23}{Use kernel version of
+% \cs{@ifnextchar} (pr/3501)}
+% Handling arguments for |\newcommand|.
+% \begin{macrocode}
+\def\@newcommand#1[#2]{%
+ \kernel@ifnextchar [{\@xargdef#1[#2]}%
+ {\@argdef#1[#2]}}
+% \end{macrocode}
+% Define |#1| if it is definable.
+%
+% Both here and in |\@xargdef| the replacement text is absorbed as
+% an argument because if we are not allowed to make the definition
+% we have to get rid of it completely.
+% \begin{macrocode}
+\long\def\@argdef#1[#2]#3{%
+ \@ifdefinable #1{\@yargdef#1\@ne{#2}{#3}}}
+% \end{macrocode}
+%
+% \changes{v1.2q}{1995/10/02}
+% {New implementation, using \cs{@test@opt}}
+% Handle the second optional argument.
+% \begin{macrocode}
+\long\def\@xargdef#1[#2][#3]#4{%
+ \@ifdefinable#1{%
+% \end{macrocode}
+% Define the actual command to be:\\
+% |\def\foo{\@protected@testopt\foo\\foo{default}}|\\
+% where |\\foo| is a csname generated from applying |\csname| and
+% |\string| to |\foo|, ie the actual name contains a backslash and
+% therefore can't clash easily with existing command names.
+% ``Default'' is the contents of the second optional argument of
+% |(re)newcommand|.
+%
+% \changes{v1.2z2}{1998/03/04}
+% {Unnecessary \cs{expandafter} removed: pr/2758}
+% \begin{macrocode}
+ \expandafter\def\expandafter#1\expandafter{%
+ \expandafter
+ \@protected@testopt
+ \expandafter
+ #1%
+ \csname\string#1\endcsname
+ {#3}}%
+% \end{macrocode}
+% Now we define the internal macro ie |\\foo| which is supposed to
+% pick up all arguments (optional and mandatory).
+% \begin{macrocode}
+ \expandafter\@yargdef
+ \csname\string#1\endcsname
+ \tw@
+ {#2}%
+ {#4}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@testopt}
+% \changes{v1.2q}{1995/10/02}
+% {Macro added}
+% \changes{v1.3a}{1999/01/07}
+% {made long and brace optional arg. latex/2896}
+% This macro encapsulates the most common call to |\@ifnextchar|, saving
+% several tokens each time it is used in the definition of a command
+% with an optional argument.
+% |#1| The code to execute in the case that there is a |[| need not be
+% a single token but can be any sequence of commands that `expects' to
+% be followed by |[|. If this command were only used in |\newcommand|
+% definitions then |#1| would be a single token and the braces could
+% be omitted from |{#1}| in the definition below, saving a bit of
+% memory.
+% \changes{v1.1g}{2004/01/23}{Use kernel version of
+% \cs{@ifnextchar} (pr/3501)}
+% \begin{macrocode}
+\long\def\@testopt#1#2{%
+ \kernel@ifnextchar[{#1}{#1[{#2}]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@protected@testopt}
+% \changes{v1.2q}{1995/10/02}
+% {Macro added}
+% Robust version of |\@testopt|. The extra argument (|#1|) must be a
+% single token. If protection is needed the call expands to |\protect|
+% applied to this token, and the 2nd and 3rd arguments are
+% discarded (by |\@x@protect|). Otherwise |\@testopt| is called on
+% the 2nd and 3rd arguments.
+%
+% This method of making commands robust avoids the need for using up
+% two csnames per command, the price is the extra expansion time
+% for the |\ifx| test.
+% \begin{macrocode}
+\def\@protected@testopt#1{%
+ \ifx\protect\@typeset@protect
+ \expandafter\@testopt
+ \else
+ \@x@protect#1%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@yargdef}
+% \begin{macro}{\@yargd@f}
+% \changes{v1.3f}{1999/04/29}{New macro added}
+%
+% \changes{LaTeX2e}{1993/11/23}{Macro interface changed}
+% \changes{LaTeX2e}{1993/11/23}{Avoid \cs{@?@?} token}
+% \changes{v1.0b}{1994/03/12}{Name changed from \cs{XXX@argdef}}
+% \changes{v1.3c}{1999/01/18}{New implementation DPC /2942}
+% \changes{v1.3d}{1999/02/09}{catch bad argument forms by re-inserting \#3}
+% \changes{v1.3f}{1999/04/29}{Full expansion and conversion needed
+% for digit in new version, see pr/3013}
+%
+% These generate a primitive argument specification, from a
+% \LaTeX\ |[|\meta{digit}|]| form; in fact \meta{digit} can be
+% anything such that |\number|~\meta{digit} is single digit.
+%
+% Reorganised slightly so that |\renewcommand{\reserved@a}[1]{foo}|
+% works. I am not sure this is worth it, as a following
+% |\newcommand| would over-write the definition of |\reserved@a|.
+%
+% Recall that \LaTeX2.09 goes into an infinite loop with\\
+% |\renewcommand[1]{\@tempa}{foo}|\\
+% (DPC 6 October 93).
+%
+% Reorganised again (DPC 1999). Rather than make a loop to
+% construct the argument spec by counting, just extract the
+% required argument spec by using a delimited argument (delimited
+% by the digit). This is faster and uses less tokens. The coding
+% is slightly odd to preserve the old interface (using |#2| =
+% |\tw@| as the flag to surround the first argument with |[]|. But
+% the new method did not allow for the number of arguments |#3| not
+% being given as an explicit digit; hence (further expansion of
+% this argument and use of) |\number| was added later in 1999.
+%
+% It is not clear why these are still |\long|.
+%
+% \begin{macrocode}
+\long \def \@yargdef #1#2#3{%
+ \ifx#2\tw@
+ \def\reserved@b##11{[####1]}%
+ \else
+ \let\reserved@b\@gobble
+ \fi
+ \expandafter
+ \@yargd@f \expandafter{\number #3}#1%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long \def \@yargd@f#1#2{%
+ \def \reserved@a ##1#1##2##{%
+ \expandafter\def\expandafter#2\reserved@b ##1#1%
+ }%
+ \l@ngrel@x \reserved@a 0##1##2##3##4##5##6##7##8##9###1%
+}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@reargdef}
+% \changes{LaTeX2e}{1993/12/20}
+% {Kept old version of \cs{@reargdef}, for array.sty}
+% \changes{v1.0b}{1994/03/12}{New defn, in terms of \cs{@yargdef}}
+% \changes{v1.2y}{1996/07/26}{third arg picked up by \cs{@yargdef}}
+% \begin{macrocode}
+\long\def\@reargdef#1[#2]{%
+ \@yargdef#1\@ne{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\renewcommand}
+% Check the command name is already used. If not give an error
+% message. Then temporarily
+% disable |\@ifdefinable| then call |\newcommand|. (Previous
+% version |\let#1=\relax| but this does not work too well if |#1|
+% is |\@temp|\emph{a--e}.)
+% \changes{LaTeX2e}{1993/11/23}{Macro reimplemented and extended}
+% \changes{v1.1f}{1994/05/02}{Removed surplus \cs{space} in error}
+% \begin{macrocode}
+\def\renewcommand{\@star@or@long\renew@command}
+% \end{macrocode}
+%
+% \begin{macro}{\renew@command}
+% \changes{v1.2y}{1996/07/26}{use \cs{relax} in place of empty arg}
+% \changes{v1.2y}{1996/07/26}{use \cs{noexpand} instead of \cs{string}}
+% \changes{v1.2z1}{1997/10/21}{Use \cs{begingroup}/\cs{endgroup} rather
+% than braces for grouping, to avoid generating empty math atom.}
+% \changes{v1.5e}{2018/09/26}{Always explicitly generate a space after the csname and
+% not rely on \cs{noexpand} to save tokens (git/41)}
+% \begin{macrocode}
+\def\renew@command#1{%
+ \begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup
+ \expandafter\@ifundefined\@gtempa
+ {\@latex@error{Command \string#1 undefined}\@ehc}%
+ \relax
+ \let\@ifdefinable\@rc@ifdefinable
+ \new@command#1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.0n}{1994/05/10}{Removed braces around \cs{@ifundefined}
+% argument. ASAJ.}
+% \changes{v1.0s}{1994/05/13}{Coded more efficiently, thanks to FMi.}
+%
+% \begin{macro}{\@ifdefinable}
+% \begin{macro}{\@@ifdefinable}
+% \begin{macro}{\@rc@ifdefinable}
+% Test is user is allowed to define a command.
+% \begin{macrocode}
+\long\def\@ifdefinable #1#2{%
+ \edef\reserved@a{\expandafter\@gobble\string #1}%
+ \@ifundefined\reserved@a
+ {\edef\reserved@b{\expandafter\@carcube \reserved@a xxx\@nil}%
+ \ifx \reserved@b\@qend \@notdefinable\else
+ \ifx \reserved@a\@qrelax \@notdefinable\else
+ #2%
+ \fi
+ \fi}%
+ \@notdefinable}
+% \end{macrocode}
+% Saved definition of |\@ifdefinable|.
+% \begin{macrocode}
+\let\@@ifdefinable\@ifdefinable
+% \end{macrocode}
+% Version of |\@ifdefinable| for use with |\renewcommand|. Does
+% not do the check this time, but restores the normal definition.
+% \begin{macrocode}
+\long\def\@rc@ifdefinable#1#2{%
+ \let\@ifdefinable\@@ifdefinable
+ #2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newenvironment}
+% Define a new user environment.
+% |#1| is the environment name. |#2#| Grabs all the tokens up to
+% the first |{|. These will be any optional arguments. They are not
+% parsed at this point, but are just passed to |\@newenv| which
+% will eventually call |\newcommand|. Any optional arguments will
+% then be parsed by |\newcommand| as it defines the command that
+% executes the `begin code' of the environment.
+%
+% This |#2#| trick removed with version 1.2i as it fails if a |{|
+% occurs in the optional argument. Now use |\@ifnextchar| directly.
+% \begin{macrocode}
+\def\newenvironment{\@star@or@long\new@environment}
+% \end{macrocode}
+%
+% \begin{macro}{\new@environment}
+% \changes{v1.2i}{1995/04/25}{Parse arguments slowly but safely /1507}
+% \changes{v1.2u}{1995/10/16}{(DPC) Use \cs{@testopt} /1911}
+% \begin{macrocode}
+\def\new@environment#1{%
+ \@testopt{\@newenva#1}0}
+% \end{macrocode}
+%
+% \begin{macro}{\@newenva}
+% \changes{v1.1g}{2004/01/23}{Use kernel version of
+% \cs{@ifnextchar} (pr/3501)}
+% \begin{macrocode}
+\def\@newenva#1[#2]{%
+ \kernel@ifnextchar [{\@newenvb#1[#2]}{\@newenv{#1}{[#2]}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@newenvb}
+% \changes{v1.3a}{1999/01/07}
+% {made long and brace optional arg. latex/2896}
+% \begin{macrocode}
+\def\@newenvb#1[#2][#3]{\@newenv{#1}{[#2][{#3}]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\renewenvironment}
+% Redefine an environment.
+% For |\renewenvironment| disable |\@ifdefinable| and then call
+% |\newenvironment|. It is OK to |\let| the argument to |\relax|
+% here as there should not be a |@temp|\ldots\ environment.
+% \changes{LaTeX2e}{1993/11/23}{Macro reimplemented and extended}
+% \changes{v1.1f}{1994/05/02}{Removed surplus \cs{space} in error}
+% \begin{macrocode}
+\def\renewenvironment{\@star@or@long\renew@environment}
+% \end{macrocode}
+%
+% \begin{macro}{\renew@environment}
+% \changes{v1.2a}{1994/10/18}{reset end command}
+% \changes{v1.2y}{1996/07/26}{use \cs{relax} in place of empty arg}
+% \begin{macrocode}
+\def\renew@environment#1{%
+ \@ifundefined{#1}%
+ {\@latex@error{Environment #1 undefined}\@ehc
+ }\relax
+ \expandafter\let\csname#1\endcsname\relax
+ \expandafter\let\csname end#1\endcsname\relax
+ \new@environment{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@newenv}
+% \changes{LaTeX2e}{1993/11/23}{Macro interface changed}
+% \changes{v1.2h}{1994/11/24}{Added test for \cs{endgraf}}
+% The internal version of |\newenvironment|.
+%
+% Call |\newcommand| to define the \meta{begin-code} for the
+% environment. |\def| is used for the \meta{end-code} as it does
+% not take arguments. (but may contain |\par|s)
+%
+% Make sure that an attempt to define a `graf' or `group' environment
+% fails.
+% \begin{macrocode}
+\long\def\@newenv#1#2#3#4{%
+ \@ifundefined{#1}%
+ {\expandafter\let\csname#1\expandafter\endcsname
+ \csname end#1\endcsname}%
+ \relax
+ \expandafter\new@command
+ \csname #1\endcsname#2{#3}%
+ \l@ngrel@x\expandafter\def\csname end#1\endcsname{#4}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newif}
+% \changes{v1.1l}{1995/05/24}{(DPC) New implementation}
+% And here's a different sort of allocation:
+% For example,
+% |\newif\iffoo| creates |\footrue|, |\foofalse| to go with |\iffoo|.
+% \begin{macrocode}
+\def\newif#1{%
+ \count@\escapechar \escapechar\m@ne
+ \let#1\iffalse
+ \@if#1\iftrue
+ \@if#1\iffalse
+ \escapechar\count@}
+% \end{macrocode}
+%
+% \begin{macro}{\@if}
+% \begin{macrocode}
+\def\@if#1#2{%
+ \expandafter\def\csname\expandafter\@gobbletwo\string#1%
+ \expandafter\@gobbletwo\string#2\endcsname
+ {\let#1#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\providecommand}
+% |\providecommand| takes the same arguments as |\newcommand|, but
+% discards them if |#1| is already defined, Otherwise it just acts like
+% |\newcommand|. This implementation currently leaves any discarded
+% definition in |\reserved@a| (and possibly |\\reserved@a|) this
+% wastes a bit of space, but it will be reclaimed as soon as these
+% scratch macros are redefined.
+%
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \begin{macrocode}
+\def\providecommand{\@star@or@long\provide@command}
+% \end{macrocode}
+%
+% \begin{macro}{\provide@command}
+% \changes{v1.2z}{1997/09/09}{Use \cs{begingroup} to avoid generating
+% math ords if used in math mode. pr/2573}
+% \begin{macrocode}
+\def\provide@command#1{%
+ \begingroup
+ \escapechar\m@ne\xdef\@gtempa{{\string#1}}%
+ \endgroup
+ \expandafter\@ifundefined\@gtempa
+ {\def\reserved@a{\new@command#1}}%
+ {\def\reserved@a{\renew@command\reserved@a}}%
+ \reserved@a}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\CheckCommand}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \changes{v1.1e}{1994/05/20}{Changed name from \cs{@checkcommand} to
+% \cs{CheckCommand}.}
+% |\CheckCommand| takes the same arguments as |\newcommand|. If
+% the command already exists, with the same definition, then
+% nothing happens, otherwise a warning is issued. Useful for
+% checking the current state befor a macro package starts
+% redefining things. Currently two macros are considered to have
+% the same definition if they are the same except for different
+% default arguments. That is, if the old definition was:
+% |\newcommand\xxx[2][a]{(#1)(#2)}| then
+% |\CheckCommand\xxx[2][b]{(#1)(#2)}| would \emph{not} generate a
+% warning, but, for instance |\CheckCommand\xxx[2]{(#1)(#2)}|
+% would.
+% \begin{macrocode}
+\def\CheckCommand{\@star@or@long\check@command}
+% \end{macrocode}
+% |\CheckCommand| is only available in the preamble part of the
+% document.
+% \begin{macrocode}
+\@onlypreamble\CheckCommand
+% \end{macrocode}
+%
+% \begin{macro}{\check@command}
+% \begin{macrocode}
+\def\check@command#1#2#{\@check@c#1{#2}}
+\@onlypreamble\check@command
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@check@c}
+% \changes{v1.2i}{1995/04/25}{Make \cs{long} for latex/1346}
+% |\CheckCommand| itself just grabs all the arguments we need,
+% without actually looking for |[| optional argument forms. Now
+% define |\reserved@a|. If |\\reserved@a| is then defined, compare it
+% with the ``|\#1|' otherwise compare |\reserved@a| with |#1|.
+% \begin{macrocode}
+\long\def\@check@c#1#2#3{%
+ \expandafter\let\csname\string\reserved@a\endcsname\relax
+ \renew@command\reserved@a#2{#3}%
+ \@ifundefined{\string\reserved@a}%
+ {\@check@eq#1\reserved@a}%
+ {\expandafter\@check@eq
+ \csname\string#1\expandafter\endcsname
+ \csname\string\reserved@a\endcsname}}
+\@onlypreamble\@check@c
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@check@eq}
+% Complain if |#1| and |#2| are not |\ifx| equal.
+% \begin{macrocode}
+\def\@check@eq#1#2{%
+ \ifx#1#2\else
+ \@latex@warning@no@line
+ {Command \noexpand#1 has
+ changed.\MessageBreak
+ Check if current package is valid}%
+ \fi}
+\@onlypreamble\@check@eq
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@gobble}
+% \begin{macro}{\@gobbletwo}
+% \begin{macro}{\@gobblefour}
+% \changes{v1.2n}{1995/05/26}{(CAR) Added \cs{long}s}
+% The |\@gobble| macro is used to get rid of its argument.
+% \begin{macrocode}
+\long\def \@gobble #1{}
+\long\def \@gobbletwo #1#2{}
+\long\def \@gobblefour #1#2#3#4{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@firstofone}
+% \begin{macro}{\@firstoftwo}
+% \begin{macro}{\@secondoftwo}
+% Some argument-grabbers.
+% \begin{macrocode}
+\long\def\@firstofone#1{#1}
+\long\def\@firstoftwo#1#2{#1}
+\long\def\@secondoftwo#1#2{#2}
+% \end{macrocode}
+% \begin{macro}{\@iden}
+% |\@iden| is another name for |\@firstofone| for
+% compatibility reasons.
+% \begin{macrocode}
+\let\@iden\@firstofone
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@thirdofthree}
+% Another grabber now used in the encoding specific
+% section.
+% \changes{v1.2z3}{1998/03/20}{Macro added}
+% \begin{macrocode}
+\long\def\@thirdofthree#1#2#3{#3}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@expandtwoargs}
+% A macro to totally expand two arguments to another macro
+% \begin{macrocode}
+\def\@expandtwoargs#1#2#3{%
+\edef\reserved@a{\noexpand#1{#2}{#3}}\reserved@a}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@backslashchar}
+% A category code 12 backslash.
+% \begin{macrocode}
+\edef\@backslashchar{\expandafter\@gobble\string\\}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0n}{1994/05/10}{Added \cs{DeclareProtectedCommand}}
+% \changes{v1.0p}{1994/05/12}{Fixed a bug with \cs{relax } which was
+% using \cs{@gobble} before defining it.}
+% \changes{v1.0q}{1994/05/13}{Renamed \cs{DeclareProtectedCommand} to
+% \cs{DeclareRobustCommand}. Removed \cs{@if@short@command}.
+% Moved to after the definition of \cs{@gobble}.}
+% \changes{v1.0r}{1994/05/13}{Added logging message to
+% \cs{DeclareProtectedCommand}.}
+%
+% \subsection{Robust commands and protect}
+%
+% \changes{v1.1b}{1994/05/17}{Added the discussion of protected
+% commands, defined the values that \cs{protect} should have.}
+% \changes{v1.1c}{1994/05/18}{Redid the discussion and definitions, in
+% line with the proposed new setting of \cs{protect} in the output
+% routine.}
+%
+% Fragile and robust commands are one of the thornier issues in
+% \LaTeX's commands. Whilst typesetting documents, \LaTeX{} makes use
+% of many of \TeX's features, such as arithmetic, defining macros, and
+% setting variables. However, there are (at least) three different
+% occasions when these commands are not safe. These are called
+% `moving arguments' by \LaTeX, and consist of:
+% \begin{itemize}
+% \item writing information to a file, such as indexes or tables of
+% contents.
+% \item writing information to the screen.
+% \item inside an |\edef|, |\message|, |\mark|, or other command which
+% evaluates its argument fully.
+% \end{itemize}
+% The method \LaTeX{} uses for making fragile commands robust is to
+% precede them with |\protect|. This can have one of five possible
+% values:
+% \begin{itemize}
+% \item |\relax|, for normal typesetting. So |\protect\foo| will
+% execute |\foo|.
+% \item |\string|, for writing to the screen. So |\protect\foo| will
+% write |\foo|.
+% \item |\noexpand|, for writing to a file. So |\protect\foo| will
+% write |\foo| followed by a space.
+% \item |\@unexpandable@protect|, for writing a moving argument to a
+% file. So |\protect\foo| will write |\protect\foo| followed by a
+% space. This value is also used inside |\edef|s, |\mark|s and
+% other commands which evaluate their arguments fully.
+% More precisely, whenever the content of an |\edef| or |\xdef| etc.\
+% can contain arbitrary user input not under the direct control of the
+% programmer, one should use |\proetected@edef| instead of |\edef|, etc.,
+% so that |\protect| has a suitable definition and the user input will
+% not break if it contains fragile commands.
+% \end{itemize}
+%
+% \changes{1.1b}{1994/05/17}
+% {(ASAJ) Added the \cs{@protect@...} commands.}
+% \changes{1.1c}{1994/05/18}
+% {(ASAJ) Renamed the commands, and removed
+% one which is no longer needed.}
+%
+% \begin{macro}{\@unexpandable@protect}
+% \changes{1.2w}{1995/12/05}{Removed \cs{unexpandable@noexpand} as never used. internal/1733}
+% \begin{macrocode}
+\def\@unexpandable@protect{\noexpand\protect\noexpand}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.2e}{1994/11/04}{Rewrote protected short commands
+% using \cs{x@protect}. ASAJ.}
+%
+% \begin{macro}{\DeclareRobustCommand}
+% \begin{macro}{\declare@robustcommand}
+% This is a package-writers command, which has the same syntax as
+% |\newcommand|, but which declares a protected command. It does
+% this by having\\
+% |\DeclareRobustCommand\foo|\\
+% define |\foo| to be
+% |\protect\foo<space>|,\\
+% and then use |\newcommand\foo<space>|.\\
+% Since the internal command is |\foo<space>|, when it is written
+% to an auxiliary file, it will appear as |\foo|.
+%
+% We have to be a
+% bit cleverer if we're defining a short command, such as |\_|, in
+% order to make sure that the auxiliary file does not include a
+% space after the command, since |\_ a| and |\_a| aren't the same.
+% In this case we define |\_| to be:
+%\begin{verbatim}
+% \x@protect\_\protect\_<space>
+%\end{verbatim}
+% which expands to:
+%\begin{verbatim}
+% \ifx\protect\@typeset@protect\else
+% \@x@protect@\_
+% \fi
+% \protect\_<space>
+%\end{verbatim}
+% Then if |\protect| is |\@typeset@protect| (normally |\relax|)
+% then we just perform |\_<space>|, and otherwise
+% |\@x@protect@| gobbles everything up and expands to
+% |\protect\_|.
+%
+% \emph{Note}: setting |\protect| to any value other than |\relax|
+% whilst in `typesetting' mode will cause commands to go into an
+% infinite loop! In particular, setting |\relax| to |\@empty| will
+% cause |\_| to loop forever. It will also break lots of other
+% things, such as protected |\ifmmode|s inside |\halign|s. If you
+% really really have to do such a thing, then please set
+% |\@typeset@protect| to be |\@empty| as well. (This is what the
+% code for |\patterns| does, for example.)
+%
+% More fun with |\expandafter| and |\csname|.
+% \begin{macrocode}
+\def\DeclareRobustCommand{\@star@or@long\declare@robustcommand}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\declare@robustcommand#1{%
+ \ifx#1\@undefined\else\ifx#1\relax\else
+ \@latex@info{Redefining \string#1}%
+ \fi\fi
+ \edef\reserved@a{\string#1}%
+ \def\reserved@b{#1}%
+ \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
+ \edef#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname
+ \expandafter\@gobble\string#1 \endcsname
+ }%
+ \let\@ifdefinable\@rc@ifdefinable
+ \expandafter\new@command\csname
+ \expandafter\@gobble\string#1 \endcsname
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@x@protect}
+% \begin{macro}{\x@protect}
+%
+% \begin{macrocode}
+\def\x@protect#1{%
+ \ifx\protect\@typeset@protect\else
+ \@x@protect#1%
+ \fi
+}
+\def\@x@protect#1\fi#2#3{%
+ \fi\protect#1%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@typeset@protect}
+%
+% \begin{macrocode}
+\let\@typeset@protect\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.2e}{1994/11/04}{Added commands for setting and restoring
+% \cs{protect}. ASAJ.}
+%
+% \begin{macro}{\set@display@protect}
+% \begin{macro}{\set@typeset@protect}
+% These macros set |\protect| appropriately for typesetting or
+% displaying.
+% \changes{v1.2o}{1995/07/03}{Use \cs{@typeset@protect} for init}
+% \begin{macrocode}
+\def\set@display@protect{\let\protect\string}
+\def\set@typeset@protect{\let\protect\@typeset@protect}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\protected@edef}
+% \begin{macro}{\protected@xdef}
+% \begin{macro}{\unrestored@protected@xdef}
+% \begin{macro}{\restore@protect}
+% The commands |\protected@edef| and |\protected@xdef| perform
+% `safe' |\edef|s and |\xdef|s, saving and restoring |\protect|
+% appropriately. For cases where restoring |\protect| doesn't
+% matter, there's an `unsafe' |\unrestored@protected@xdef|, useful
+% if you know what you're doing!
+% \begin{macrocode}
+\def\protected@edef{%
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \afterassignment\restore@protect
+ \edef
+}
+\def\protected@xdef{%
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \afterassignment\restore@protect
+ \xdef
+}
+\def\unrestored@protected@xdef{%
+ \let\protect\@unexpandable@protect
+ \xdef
+}
+\def\restore@protect{\let\protect\@@protect}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\protect}
+% The normal meaning of |\protect|
+% \changes{v1.2j}{1995/04/29}{Init \cs{protect} here}
+% \begin{macrocode}
+\set@typeset@protect
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MakeRobust}
+% \changes{v1.4a}{2015/01/08}{Added macro}
+%
+% The macro firstly checks if the controls sequence in question exists
+% at all.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\MakeRobust}{\MakeRobust}%
+%<*2ekernel|latexrelease>
+\def\MakeRobust#1{%
+ \@ifundefined{\expandafter\@gobble\string#1}{%
+ \@latex@error{The control sequence `\string#1' is undefined!%
+ \MessageBreak There is nothing here to make robust}%
+ \@eha
+ }%
+% \end{macrocode}
+% Then we check if the macro is already robust. We do this by testing
+% if the internal name for a robust macro is defined, namely
+% \verb*=\foo =. If it is already defined do nothing, otherwise set
+% \verb*=\foo = equal to \verb*=\foo= and redefine \verb*=\foo= so
+% that it acts like a macro defined with \verb=\DeclareRobustCommand=.
+% \begin{macrocode}
+ {%
+ \@ifundefined{\expandafter\@gobble\string#1\space}%
+ {%
+ \expandafter\let\csname
+ \expandafter\@gobble\string#1\space\endcsname=#1%
+ \edef\reserved@a{\string#1}%
+ \def\reserved@b{#1}%
+ \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
+ \edef#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect\noexpand#1%
+ \fi
+ \noexpand\protect\expandafter\noexpand
+ \csname\expandafter\@gobble\string#1\space\endcsname}%
+ }%
+ {\@latex@info{The control sequence `\string#1' is already robust}}%
+ }%
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\MakeRobust}{\MakeRobust}%
+%<latexrelease>\let\MakeRobust\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Internal defining commands}
+%
+% These commands are used internally to define other \LaTeX{}
+% commands.
+% \begin{macro}{\@ifundefined}
+% \changes{LaTeX2e}{1993/11/23}{Redefined to remove a trailing \cs{fi}}
+% Check if first arg is undefined or \cs{relax} and execute second or
+% third arg depending,
+% \changes{1.5c}{2018/01/06}{Avoid defining undefined commands to \cs{relax}}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2018-04-01}{\@ifundefined}
+%<latexrelease>{Leave commands undefined in \@ifundefined}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+% Version using |\ifcsname| to avoid defining undefined tokens to |\relax|.
+% Defined here to simplify using unmatched |\fi|.
+% \begin{macrocode}
+\def\@ifundefined#1{%
+ \ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\@ifundefin@d@i#1\fi#2{\fi
+ \expandafter\ifx\csname #2\endcsname\relax
+ \@ifundefin@d@ii
+ \fi
+ \@secondoftwo}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\@ifundefin@d@ii\fi#1#2#3{\fi #2}
+% \end{macrocode}
+% Now test of engine.
+% \begin{macrocode}
+\ifx\numexpr\@undefined
+% \end{macrocode}
+% Classic version (should not be needed as etex is assumed).
+% \begin{macrocode}
+\def\@ifundefined#1{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\else\ifx\directlua\@undefined
+% \end{macrocode}
+% Use the |\ifcsname| defined above.
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% Optimised version for Lua\TeX, using |\lastnamedcs|
+% \begin{macrocode}
+\def\@ifundefined#1{%
+ \ifcsname#1\endcsname
+ \expandafter\ifx\lastnamedcs\relax\else\@ifundefin@d@i\fi
+ \fi
+ \@firstoftwo}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\@ifundefin@d@i#1#2#3#4#5{#1#2#5}
+% \end{macrocode}
+% \begin{macrocode}
+\fi
+\fi
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\@ifundefined}
+%<latexrelease>{Leave commands undefined in \@ifundefined}%
+%<latexrelease>\def\@ifundefined#1{%
+%<latexrelease> \expandafter\ifx\csname#1\endcsname\relax
+%<latexrelease> \expandafter\@firstoftwo
+%<latexrelease> \else
+%<latexrelease> \expandafter\@secondoftwo
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@qend}
+% \begin{macro}{\@qrelax}
+% The following define |\@qend| and |\@qrelax| to be the strings
+% `|end|' and `|relax|' with the characters |\catcode|d 12.
+% \begin{macrocode}
+\edef\@qend{\expandafter\@cdr\string\end\@nil}
+\edef\@qrelax{\expandafter\@cdr\string\relax\@nil}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ifnextchar}
+% \changes{LaTeX209}{1992/08/24}
+% {(Rms) \cs{@ifnextchar} didn't work if its
+% first argument was an equal sign.}
+% \changes{v1.2q}{1995/10/02}
+% {Use \cs{@let@token} }
+% \changes{v1.3a}{1999/01/07}
+% {made long}
+% \changes{v1.3b}{1999/01/07}
+% {extra \cs{long}. latex/2902}
+% \changes{v1.3e}{1999/03/01}
+% {remove extra \cs{long}. internal/2967}
+% |\@ifnextchar| peeks at the following character and compares it
+% with its first argument. If both are the same it executes its
+% second argument, otherwise its third.
+% \begin{macrocode}
+\long\def\@ifnextchar#1#2#3{%
+ \let\reserved@d=#1%
+ \def\reserved@a{#2}%
+ \def\reserved@b{#3}%
+ \futurelet\@let@token\@ifnch}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\kernel@ifnextchar}
+% \changes{v1.3g}{2004/01/23}{Added macro (pr/3501)}
+% This macro is the kernel version of |\@ifnextchar| which is used
+% in a couple of places to prevent the AMS variant from being used
+% since in some places this produced chaos (for example
+% if an \texttt{fd} file
+% is loaded in a random place then the optional argument to
+% |\ProvidesFile| could get printed there instead of being written
+% only in the log file. This happened
+% when there was a space or a newline between the mandatory and
+% optional arguments! It should really be fixed in the
+% \texttt{amsmath} package one day, but\ldots
+%
+% Note that there may be other places in the kernel where this version
+% should be used rather than the original, but variable, version.
+%
+% \begin{macrocode}
+\let\kernel@ifnextchar\@ifnextchar
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ifnch}
+% |\@ifnch| is a tricky macro to skip any space tokens that may
+% appear before the character in question. If it encounters a space
+% token, it calls \@xifnch.
+% \changes{v1.2q}{1995/10/02}
+% {Use \cs{@let@token} for internal/924, save \cs{reserved@e}}
+% \begin{macrocode}
+\def\@ifnch{%
+ \ifx\@let@token\@sptoken
+ \let\reserved@c\@xifnch
+ \else
+ \ifx\@let@token\reserved@d
+ \let\reserved@c\reserved@a
+ \else
+ \let\reserved@c\reserved@b
+ \fi
+ \fi
+ \reserved@c}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@sptoken}
+% The following code makes |\@sptoken| a space token. It is
+% important here that the control sequence |\:| consists of
+% a non-letter only, so that the following whitespace is
+% significant. Together with the fact that the equal sign
+% in a |\let| may be followed by only one optional space
+% the desired effect is achieved.
+% NOTE: the following hacking must precede the definition of |\:|
+% as math medium space.
+% \begin{macrocode}
+\def\:{\let\@sptoken= } \: % this makes \@sptoken a space token
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xifnch}
+% In the following definition of |\@xifnch|, |\:| is again used
+% to get a space token as delimiter into the definition.
+% \begin{macrocode}
+\def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch}
+% \end{macrocode}
+% \end{macro}
+
+% \changes{v1.0n}{1994/05/10}{Added \cs{makeatletter} and
+% \cs{makeatother} ASAJ.}
+%
+% \begin{macro}{\makeatletter}
+% \begin{macro}{\makeatother}
+% Make internal control sequences accessible or inaccessible.
+% \begin{macrocode}
+\def\makeatletter{\catcode`\@11\relax}
+\def\makeatother{\catcode`\@12\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ifstar}
+% \changes{v1.2u}{1995/10/16}{(DPC) New implementation, for /1910}
+% The new implementation below avoids passing the \meta{true code}
+% Through one more |\def| than the \meta{false code}, which previously
+% meant that |#| had to be written as |####| in one argument, but |##|
+% in the other. The |*| is gobbled by |\@firstoftwo|.
+% \begin{macrocode}
+\def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@dblarg}
+% \begin{macro}{\@xdblarg}
+% \changes{v1.1g}{2004/01/23}{Use kernel version of
+% \cs{@ifnextchar} (pr/3501)}
+% \begin{macrocode}
+\long\def\@dblarg#1{\kernel@ifnextchar[{#1}{\@xdblarg{#1}}}
+\long\def\@xdblarg#1#2{#1[{#2}]{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@sanitize}
+% The command |\@sanitize| changes the catcode of all special characters
+% except for braces to `other'. It can be used for commands like
+% |\index| that want to write their arguments verbatim. Needless to
+% say, this command should only be executed within a group, or chaos
+% will ensue.
+%
+% \begin{macrocode}
+\def\@sanitize{\@makeother\ \@makeother\\\@makeother\$\@makeother\&%
+\@makeother\#\@makeother\^\@makeother\_\@makeother\%\@makeother\~}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@onelevel@sanitize}
+% \changes{v1.2c}{1994/10/30}{Macro added}
+%
+% This makes the whole ``meaning'' of |#1| (its one-level
+% expansion) into catcode 12 tokens: it could be used in
+% |\DeclareRobustCommand|.
+%
+% If it is to be used on default float specifiers, this should be
+% done when they are defined.
+% \begin{macrocode}
+\def \@onelevel@sanitize #1{%
+ \edef #1{\expandafter\strip@prefix
+ \meaning #1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Discretionary Hyphenation}
+% \begin{macro}{\-}
+% \changes{1.2x}{1995/12/13}{Documentation changed.}
+% \changes{v1.5a}{2017/03/13}{Define \cs{-} in terms of \cs{hyphenchar}}
+% \begin{macro}{\@dischyph}
+% \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{-}}
+% \end{macro}
+% Moved here to be after the definition of |\DeclareRobustCommand|.
+%
+% The primitive |\-| command adds a discretionary hyphen using the
+% current font's |\hyphenchar|. Monospace fonts are usually declared
+% with |\hyphenchar| set to $-1$ to suppress hyhenation.
+%
+% \LaTeX, from \LaTeX2.09 in 1986 defined |\-| by
+% \begin{verbatim}
+% \def\-{\discretionary{-}{}{}}
+% \end{verbatim}
+% The following comment was added when these commands were first set
+% up, 19 April 1986:
+% \begin{quote}
+% the |\-| command is redefined to allow it to work in the |\ttfamily|
+% type style, where automatic hyphenation is suppressed by setting
+% |\hyphenchar| to~$-1$. The original primitive \TeX{} definition is
+% saved as |\@@hyph| just in case anyone needs it.
+% \end{quote}
+%
+% \LaTeXe, between 1993 and 2017, had a comment at this point
+% saying that the definition ``would probably change'' because
+% the definition always uses |-|. The definition used below
+% was given in comments at this point during time.
+%
+% In 2017 we finally enabled this definition by default, with the
+% older \LaTeX\ definition accessible via \textsf{latexrelease}
+% as usual.
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}%
+% \end{macrocode}
+% Temporary definition of |\@latex@info|, final definition is later.
+% \begin{macrocode}
+%<*2ekernel>
+\def\@latex@info#1{}
+%</2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand{\-}{%
+ \discretionary{%
+ \char \ifnum\hyphenchar\font<\z@
+ \defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}%
+}
+\let\@dischyph=\-
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\-}{Use \hyphenchar in \-}%
+%<latexrelease>\def\-{\discretionary{-}{}{}}
+%<latexrelease>\let\@dischyph=\-
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% Delayed from |ltvers.dtx|
+% \begin{macrocode}
+\newif\if@includeinrelease
+\@includeinreleasefalse
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltdirchk.dtx b/macros/latex-dev/base/ltdirchk.dtx
new file mode 100644
index 0000000000..75f9e1d532
--- /dev/null
+++ b/macros/latex-dev/base/ltdirchk.dtx
@@ -0,0 +1,993 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+%
+% \iffalse
+%%% From File: ltdirchk.dtx
+%
+%<*unstripped>
+\ifx\documentclass\undefined\let\next\relax\else\def\next{%
+%</unstripped>
+%<*driver>
+% \fi
+\ProvidesFile{ltdirchk.dtx}
+ [2016/10/15 v1.2b LaTeX Kernel (System Dependent Parts)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltdirchk.dtx}
+\title{\filename\thanks{%
+ this document also includes the source for
+ texsys.cfg and ltxcheck.tex}}
+\author{David Carlisle}
+\date{\filedate}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+%<*unstripped>
+}\fi\next
+%</unstripped>
+% \fi
+%
+% \changes{v0.2j}{1994/02/25}
+% {Remove need for drv file}
+% \changes{v0.2k}{1994/03/01}
+% {Add unstripped module,
+% so that dircheck.dtx may be used with initex}
+% \changes{v1.0a}{1994/03/08}
+% {Reorganise driver module into `new style'}
+% \changes{v1.0b}{1994/03/12}
+% {Change name from dircheck.dtx}
+% \changes{v1.0b}{1994/03/12}
+% {Minor edits to the typeouts in ltxcheck}
+% \changes{v1.0d}{1994/03/28}
+% {Improve documentation}
+% \changes{v1.0i}{1994/11/03}
+% {Generate an error if latex.ltx not used with clean initex}
+% \changes{v1.0j}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0r}{1996/06/13}
+% {documentation improvements mainly from internal/2174}
+% \changes{v1.0v}{1997/06/16}
+% {documentation improvements mainly from internal/2520}
+% \changes{v1.0w}{1998/08/17}{(RmS) Documentation improvements.}
+%
+%
+% \section{\LaTeX\ System Dependent Initialisations}
+%
+% \changes{v0.2g}{1994/01/21}
+% {Improve documentation, reorganise docstrip module}
+%
+% This file implements the semi-automatic determination of various
+% system dependent parts of the initialisation. The actual definitions
+% may be placed in a file |texsys.cfg|. Thus for operating systems for
+% which the tests here do not result in acceptable settings, a `hand
+% written' |texsys.cfg| may be produced.
+%
+% The macros that must be defined are:
+%
+% \DescribeMacro{\@currdir}
+% |\@currdir|\meta{filename}\meta{space} should expand to a form of the
+% filename that uniquely refers to the `current directory' if this is
+% possible. (The expansion should also end with a space.) on UNIX,
+% this is |\def\@currdir{./}|. For more exotic operating systems you may
+% want to make |\@currdir| a macro with arguments delimited by |.|
+% and/or \meta{space}. If the operating system has no concept of
+% directory structure, this macro should be defined to be empty.
+%
+%
+% \DescribeMacro{\input@path}
+% If the primitive |\openin| searches the same directories as the
+% primitive |\input|, then it is possible to tell (using |\ifeof|)
+% whether a file exists before trying to input it. For systems like
+% this, |\input@path| should be left undefined.
+%
+% If |\openin| does not `follow' |\input| then |\input@path| must be
+% defined to be a list of directories to search for input files. The
+% format for each directory is as for |\@currdir|, normally just a
+% prefix is required, but it may be a macro with space-delimited
+% argument. That is, if \meta{dir} is an entry in the input path,
+% \TeX\ will try to load the expansion of
+% \meta{dir}\meta{filename}\meta{space}
+%
+% So either \meta{dir} should be defined as a macro with argument
+% delimited by space, or it should just expand to a directory name,
+% including the final directory separator, so that it may be
+% concatenated with the \meta{filename}. This means that for UNIX-like
+% syntax, each \meta{dir} should end with a slash, |/|.
+%
+% |\input@path| should expand to a list of such directories, each in a
+% |{}| group.
+%
+% \DescribeMacro{\filename@parse}
+% After a call of the form: |\filename@parse{|\meta{filename}|}|, the
+% three macros |\filename@area|,|\filename@base|,|\filename@ext| should
+% be defined to be the `area' (or directory), basename and
+% extension respectively. If there was no extension specified in
+% \meta{filename}, |\filename@ext| should be |\let| to |\relax| (so this
+% case may be tested with |\@ifundefined{filename@ext}| and, perhaps a
+% default extension substituted).
+%
+% Normally one would not need to define this macro in |texsys.cfg| as
+% the automatic tests can supply parsers that work with UNIX and VMS and
+% Macintosh syntax, as well as a basic parser that will cover many other
+% cases. However some operating systems may need a `hand produced'
+% parser in which case it should be defined in this file.
+%
+% The UNIX parser also works for most MSDOS \TeX\ versions.
+% Currently if the UNIX, VMS or Macintosh parser is not used,
+% |\filename@parse| is defined to always return an empty area, and to
+% split the argument into basename and extension at the first `|.|'
+% that occurs in the name.
+% Parsers for other formats may be defined in |texsys.cfg|,
+% in which case they will be used in preference to the default
+% definitions.
+%
+% \DescribeMacro{\@TeXversion}
+% \changes{v1.0f}{1994/05/23}{Document \cs{@TeXversion}}
+% |\@TeXversion| is now set automatically by the initialisation tests
+% in this file. You should not need to set it in |texsys.cfg|, however
+% the following documentation is left for information. \LaTeX\ does
+% not set this variable exactly, the automatic tests set it to:\\
+% |2| for any version, $v$, $v < 3.0$\\
+% |3| for any version, $v$, $3.0 \leq v \leq 3.14$\\
+% \meta{undefined} otherwise.\\
+% However these values are accurate enough for \LaTeX\ to take
+% appropriate action for these old \TeX{}s.
+%
+% If your \TeX\ is older than version 3.141, then you should define
+% |\@TeXversion| (using |\def|) to be the version number. If you do not
+% do this\footnote
+% {Actually if your \TeX\ is really old, version~2, \LaTeX\ can
+% detect this, and sets \cs{@TeXversion} to~2 if it is not set in
+% the \texttt{cfg} file.}
+%, \LaTeX\ will not work around a bug in old \TeX\ versions, and
+% so error messages will appear in a very strange format, with |^^J|
+% appearing instead of line breaks:
+% \begingroup\catcode`\==\active \def=#1#2{}\hfuzz\maxdimen
+%\begin{verbatim}
+%! LaTeX Error: \rubbish undefined.^^J^^JSee the LaTeX manual or LaTeX=
+% Companion
+% for explanation.^^JType H <return> for immediate help.
+% ...
+%
+%l.3 \renewcommand{\rubbish}
+% {}
+%?
+%\end{verbatim}
+% \endgroup\noindent
+% However if you put |\def\@TeXversion{3.14}| in \texttt{texsys.cfg}
+% the following format will be used:
+%\begin{verbatim}
+%! LaTeX Error: \rubbish undefined.
+%
+%See the LaTeX manual or LaTeX Companion for explanation.
+%Type H <return> for immediate help.
+%! .
+% ...
+%
+%l.3 \renewcommand{\rubbish}
+% {}
+%?
+%\end{verbatim}
+% Note that this has an extra line |! .| which does not appear in
+% error messages that use the default settings with a current version of
+% \TeX, but this should not cause any confusion we hope.
+%
+% \StopEventually{}
+%
+% \section{Initialisation}
+% As this file is read at a very early stage, some definitions that
+% are normally considered to be part of the format must be made here.
+%
+% \subsection{INITEX}
+% \changes{v0.2i}{1994/01/25}
+% {Protect against looping on \cs{@@input} and \cs{@@end}.}
+% \begin{macrocode}
+%<*dircheck>
+%<*initex>
+%<initex>\ifnum\catcode`\{=1
+%<initex> \errmessage
+%<initex> {LaTeX must be made using an initex with no format preloaded}
+%<initex>\fi
+\catcode`\{=1
+\catcode`\}=2
+% \end{macrocode}
+% \changes{v1.1}{2015/01/03}{Enable extra primitives when Lua\TeX{} is used}
+% \changes{v1.2}{2015/08/23}{Do not use luatex prefix}
+% \changes{v1.2a}{2015/10/02}{Allow backing out of unprefixed names}
+% If Lua\TeX{} is in use the extensions and other new primitives
+% have to be activated: this is done as early as possible. Older
+% versions of Lua\TeX{} do not hide the primitives: a version check is
+% not needed as the version itself will be missing in the case where
+% action is needed!
+% \begin{macrocode}
+\ifx\directlua\undefined
+\else
+ \ifx\luatexversion\undefined
+% \end{macrocode}
+% Enable e-TeX/pdfTeX/Umath primitives with their natural names
+% \begin{macrocode}
+ \directlua{tex.enableprimitives("",%
+ tex.extraprimitives('etex', 'pdftex', 'umath'))}
+% \end{macrocode}
+%
+% In current formats enable primitives with unprefixed names.
+% the \textsf{latexrelease} guards allow the primitives to be
+% defined with a |\luatex| prefix if older formats are specified.
+% \begin{macrocode}
+%</initex>
+%</dircheck>
+%<*initex,latexrelease>
+%<latexrelease>\ifx\directlua\undefined\else
+%<latexrelease>\IncludeInRelease{2015/10/01}{\luatexluafunction}
+%<latexrelease> {LuaTeX (prefixed names)}%
+ \directlua{tex.enableprimitives("",%
+ tex.extraprimitives("omega", "aleph", "luatex"))}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\luatexluafunction}
+%<latexrelease> {LuaTeX (prefixed names)}%
+%<latexrelease>\directlua{
+%<latexrelease> tex.enableprimitives(
+%<latexrelease> "luatex",
+%<latexrelease> tex.extraprimitives("core","omega", "aleph", "luatex")
+%<latexrelease> )
+%<latexrelease> local i
+%<latexrelease> local t = { }
+%<latexrelease> for _,i in pairs(tex.extraprimitives("luatex")) do
+%<latexrelease> if not string.match(i,"^U") then
+%<latexrelease> if not string.match(i, "^luatex") then
+%<latexrelease> table.insert(t,i)
+%<latexrelease> end
+%<latexrelease> else
+%<latexrelease> if string.match(i,"^Uchar$") then
+%<latexrelease> table.insert(t,i)
+%<latexrelease> end
+%<latexrelease> end
+%<latexrelease> end
+%<latexrelease> for _,i in pairs(t) do
+%<latexrelease> tex.print(
+%<latexrelease> "\noexpand\\let\noexpand\\" .. i
+%<latexrelease> .. "\noexpand\\undefined"
+%<latexrelease> )
+%<latexrelease> end
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\fi
+%</initex,latexrelease>
+%<*dircheck>
+%<*initex>
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \fi
+\fi
+% \end{macrocode}
+%
+% \changes{v1.2b}{2016/10/15}{Require e\TeX{}}
+% A test can now be made for e\TeX{}.
+% \begin{macrocode}
+%<initex>\ifx\eTeXversion\undefined
+%<initex> \errmessage
+%<initex> {LaTeX requires e-TeX}
+%<initex> \expandafter\endinput
+%<initex>\fi
+% \end{macrocode}
+%
+% That distraction over, back to the basics of a format.
+% \begin{macrocode}
+\catcode`\#=6
+\catcode`\^=7
+\chardef\active=13
+\catcode`\@=11
+\countdef\count@=255
+\let\bgroup={ \let\egroup=}
+\ifx\@@input\@undefined\let\@@input\input\fi
+\ifx\@@end\@undefined\let\@@end\end\fi
+\chardef\@inputcheck0
+\chardef\sixt@@n=16
+\newlinechar`\^^J
+\def\typeout{\immediate\write17}
+\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\_\do\%\do\~}
+\def\@makeother#1{\catcode`#1=12\relax}
+\def\space{ }
+\def\@tempswafalse{\let\if@tempswa\iffalse}
+\def\@tempswatrue{\let\if@tempswa\iftrue}
+\let\if@tempswa\iffalse
+\def\loop#1\repeat{\def\iterate{#1\relax\expandafter\iterate\fi}%
+ \iterate \let\iterate\relax}
+\let\repeat\fi
+%</initex>
+% \end{macrocode}
+%
+% \subsection{Some bits of 2e}
+% \begin{macrocode}
+%<*2ekernel>
+\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
+\long\def\@firstoftwo#1#2{#1}
+\long\def\@secondoftwo#1#2{#2}
+% \end{macrocode}
+% \changes{v1.0e}{1994/05/11}
+% {Add \cs{ProvidesFile} as used in fd files.}
+% \changes{v1.0l}{1995/10/17}
+% {Modify initex version of \cs{ProvidesFile}}
+% \changes{v1.0n}{1995/11/01}
+% {Initialise \cs{@addtofilelist} to \cs{@gobble}}
+% This is a special version of |\ProvidesFile| for initex use.
+% \changes{v1.0x}{2001/05/25}{Explicitly set catcode of
+% \cs{endlinechar} to 10 (pr/3334)}
+% \changes{v1.0y}{2001/06/04}{But only if it is a char (pr/3334)}
+% \begin{macrocode}
+\def\ProvidesFile#1{%
+ \begingroup
+ \catcode`\ 10 %
+ \ifnum \endlinechar<256 %
+ \ifnum \endlinechar>\m@ne
+ \catcode\endlinechar 10 %
+ \fi
+ \fi
+ \@makeother\/%
+ \@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}
+\def\@providesfile#1[#2]{%
+ \wlog{File: #1 #2}%
+ \@addtofilelist{ #2}%
+ \endgroup}
+\long\def\@addtofilelist#1{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@empty{}
+\catcode`\%=12
+\def\@percentchar{%}
+\catcode`\%=14
+\let\@currdir\@undefined
+\let\input@path\@undefined
+\let\filename@parse\@undefined
+% \end{macrocode}
+% \begin{macro}{\strip@prefix}
+% \changes{v0.2a}{1993/12/13}
+% {modified, name changed from \cs{stripmeaning}.}
+% \changes{v0.2e}{1994/01/19}
+% {name changed from \cs{strip@meaning}, to match NFSS.}
+% \begin{macrocode}
+\def\strip@prefix#1>{}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \section{texsys.cfg}
+% As mentioned above, any site specific definitions required to describe
+% the filename handling must be entered into a file |texsys.cfg|. If
+% |texsys.cfg| can not be located by |\openin|, we write a default
+% version out. The default version only contains comments, so we do not
+% actually input the file in that case. The automatic tests later will,
+% hopefully, correctly define the required macros.
+%
+% The tricky code below checks to see if |texsys.cfg| exists. If it does
+% not, all the text in this file between START and END is copied
+% verbatim to a new file |texsys,cfg|. If |texsys.cfg| is found, then it
+% is simply input. This is only done when this file is being used
+% unstripped.
+% \begin{macrocode}
+%<*docstrip>
+\openin15=texsys.cfg
+\ifeof15
+\typeout{** Writing a default texsys.cfg}
+\immediate\openout15=texsys.cfg
+\begingroup
+\catcode`\^^M\active%
+\let^^M\par%
+\def\reserved@a#1^^M{%
+ \def\reserved@b{#1}%
+ \ifx\reserved@b\reserved@c\endgroup\else%
+ \immediate\write15{#1}%
+ \expandafter\reserved@a\fi}%
+\def\reserved@d#1START^^M{\let\do\@makeother\dospecials\reserved@a}%
+\catcode`\%=12
+\def\reserved@c{%END}
+\reserved@d
+% \end{macrocode}
+%START
+% \subsection{texsys.cfg}
+%
+% This file contains the site specific definitions of the four macros\\
+% |\@currdir|, |\input@path|, |\filename@parse| and |\@TeXversion|.
+%
+% As distributed it only contains comments, however this `empty'
+% file will work on many systems because of the automatic tests built
+% into |ltdirchk.dtx|. You \emph{are} allowed to edit this file to add
+% definitions of these macros appropriate to your system.
+%
+%
+% The macros that must be defined are:
+%
+% \DescribeMacro{\@currdir}
+% |\@currdir|\meta{filename}\meta{space} should expand to a form of the
+% filename that uniquely refers to the `current directory' if this is
+% possible. (The expansion should also end with a space.) on UNIX,
+% this is |\def\@currdir{./}|. For more exotic operating systems you may
+% want to make |\@currdir| a macro with arguments delimited by |.|
+% and/or \meta{space}. If the operating system has no concept of
+% directory structure, this macro should be defined to be empty.
+%
+%
+% \DescribeMacro{\input@path}
+% If the primitive |\openin| searches the same directories as the
+% primitive |\input|, then it is possible to tell (using |\ifeof|)
+% whether a file exists before trying to input it. For systems like
+% this, |\input@path| should be left undefined.
+%
+% If |\openin| does not `follow' |\input| then |\input@path| must be
+% defined to be a list of directories to search for input files. The
+% format for each directory is as for |\@currdir|, normally just a
+% prefix is required, but it may be a macro with space-delimited
+% argument. That is, if \meta{dir} is an entry in the input path,
+% \TeX will try to load the expansion of
+%
+% \meta{dir}\meta{filename}\meta{space}
+%
+% So either \meta{dir} should be defined as a macro with argument
+% delimited by space, or it should just expand to a directory name,
+% including the final directory separator, so that it may be
+% concatenated with the \meta{filename}. This means that for UNIX-like
+% syntax, each \meta{dir} should end with a slash, |/|. One exception to
+% this rule is that the input path should \emph{always} contain the
+% empty directory |{}| as this will allow `full pathnames' to be used,
+% and the `current directory' to be searched.
+%
+% |\input@path| should expand to a list of such directories, each in a
+% |{}| group.
+%
+%
+% \DescribeMacro{\filename@parse}
+% After a call of the form: |\filename@parse{|\meta{filename}|}|, the
+% three macros |\filename@area|,|\filename@base|,|\filename@ext| should
+% be defined to be the `area' (or directory), basename and
+% extension respectively. If there was no extension specified in
+% \meta{filename}, |\filename@ext| should be |\let| to |\relax| (so this
+% case may be tested with |\@ifundefined{filename@ext}| and, perhaps a
+% default extension substituted).
+%
+% Normally one would not need to define this macro in |texsys.cfg| as
+% the automatic tests can supply parsers that work with UNIX and VMS
+% syntax, as well as a basic parser that willcover many other cases.
+% However some operating systems may need a `hand produced' parser
+% in which case it should be defined in this file.
+%
+% The UNIX parser also works for most MSDOS \TeX\ versions.
+% Currently if the UNIX or VMS parser is not used, |\filename@parse| is
+% defined to always return an empty area, and to split the argument into
+% basename and extension at the first `|.|' that occurs in the name.
+% Parsers for other formats may be defined in |texsys.cfg|,
+% in which case they will be used in preference to the default
+% definitions.
+%
+%
+% \DescribeMacro{\@TeXversion}
+% You should not need to set this macro in |texsys.cfg|. \LaTeX\
+% tests to set this automatically. See the comments in the opening
+% section of \texttt{ltdirchk.dtx}.
+%
+%
+% The following sections give examples of definitions which might
+% work on various systems. These are currently mainly untested as I only
+% have access to a few systems, all of which do not need this file as
+% the automatic tests work. All the code is commented out.
+%
+% \subsection{UNIX (web2c)}
+% This implementation does make |\openin| and |\input| look in the same
+% places. Acceptable settings are made by |ltdirchk.dtx|, and so this
+% file may be empty. The definitions below are therefore just for
+% information.
+% \begin{macrocode}
+%\def\@currdir{./}
+%\let\input@path\@undefined
+% \end{macrocode}
+%
+% \subsection{UNIX (other)}
+% Apparently some commercial UNIX implementations have different paths
+% for |\openin| and |\input|. For these one could use definitions like
+% the following (with whatever directories are used at your site):
+% note that the directory names should end with |/|.
+% \begin{macrocode}
+% \def\@currdir{./}
+% \def\input@path{%
+% {/usr/local/lib/tex/inputs/distrib/}%
+% {/usr/local/lib/tex/inputs/contrib/}%
+% {/usr/local/lib/tex/inputs/local/}%
+% }
+% \end{macrocode}
+%
+% \subsection{MSDOS (emtex)}
+% This implementation does make |\openin| and |\input| look in the same
+% places. Acceptable settings are made by |ltdirchk.dtx|, and so this
+% file may be empty. The definitions below are therefore just for
+% information.
+% \begin{macrocode}
+% \def\@currdir{./}
+% \let\input@path\@undefined
+% \end{macrocode}
+%
+% \subsection{MSDOS (other)}
+% Some PC implementations have different paths
+% for |\openin| and |\input|. For these one could use definitions like
+% the following (with whatever directories are used at your site):
+% note that the directory names should end with |/|.
+% This assumes the implementation uses UNIX style |/| as the directory
+% separator.
+% \begin{macrocode}
+% \def\@currdir{./}
+% \def\input@path{%
+% {c:/tex/inputs/distrib/}%
+% {c:/tex/inputs/contrib/}%
+% {c:/tex/inputs/local/}%
+% }
+% \end{macrocode}
+%
+% \subsection{VMS (DECUS \TeX, PD VMS 3.6)}
+% This implementation does make |\openin| and |\input| look in the same
+% places. Acceptable settings are made by |ltdirchk.dtx|, and so this
+% file may be empty. The definitions below are therefore just for
+% information.
+% \begin{macrocode}
+% \def\@currdir{[]}
+% \let\input@path\@undefined
+% \end{macrocode}
+%
+% \subsection{VMS (???)}
+% Some VMS implementations have different paths
+% for |\openin| and |\input|. For these one could use definitions like
+% the following:
+% \begin{macrocode}
+% \def\@currdir{[]}
+% \def\input@path{%
+% {tex_inputs:}%
+% {SOMEDISK:[SOME.TEX.DIRECTORY]}%
+% }
+% \end{macrocode}
+%
+% \subsection{MACINTOSH (OzTeX 1.6)}
+% This implementation does make |\openin| and |\input| look in the same
+% places. Acceptable settings are made by |ltdirchk.dtx|, and so this
+% file may be empty. The definitions below are therefore just for
+% information.
+% \begin{macrocode}
+% \def\@currdir{:}
+% \let\input@path\@undefined
+% \end{macrocode}
+%
+% \subsection{MACINTOSH (other)}
+% Some Macintosh implementations have different paths
+% for |\openin| and |\input|. For these one could use definitions like
+% the following (with whatever folders are used on your machine):
+% note that the directory names should end with |:|, and they should
+% contain {\em no\/} spaces.
+% \begin{macrocode}
+% \def\@currdir{:}
+% \def\input@path{%
+% {Hard-Disk:Applications:TeX:TeX-inputs:}%
+% {Hard-Disk:Applications:TeX:My-inputs:}%
+% }
+% \end{macrocode}
+%
+% \subsection{FAKE EXAMPLE}
+% This example is for an operating system that has filenames of the
+% form |<area>name| For maximum compatibility with macro sets,
+% you want |name.ext| to be mapped to |<ext>name|.
+% and |<area>name.ext| to be mapped to |<area.ext>name|.
+% |\input| does this mapping automatically, but |\openin| does not, and
+% does not look in the same places as |\input|.
+% |<>name| is the desired `current directory' syntax.
+%
+% the following code would possibly work:
+% \begin{macrocode}
+% \def\@dir#1#2 {%
+% \@d@r{#1}#2..\@nil}
+% \def\@d@r#1#2.#3.#4\@nil{%
+% <\ifx\@dir#1\@dir\else#1\ifx\@dir#3\@dir\else.\fi\fi#3>#2 }
+%
+% \def\@currdir{\@dir{}}
+% \def\input@path{%
+% {\@dir{area.one}}%
+% {\@dir{area.two}}%
+% }
+% \end{macrocode}
+%END
+% \begin{macrocode}
+\immediate\closeout15
+% \end{macrocode}
+% If |texsys.cfg| did exist, then input it.
+% \begin{macrocode}
+\else
+\typeout{** Using the existing texsys.cfg}
+\closein15
+\input texsys.cfg
+\fi
+%</docstrip>
+% \end{macrocode}
+%
+% If the stripped version of this file is being used (in latex2e.ltx)
+% then texsys.cfg should be there, so just input it.
+% \begin{macrocode}
+%<dircheck>\input texsys.cfg
+% \end{macrocode}
+%
+% \changes{v0.2f}{1994/01/20}
+% {\cs{@copytexsys} and the texsys.new file removed}
+%
+% \section{Setting \texttt{\cs{@currdir}}}
+%
+% \begin{macro}{\@currdir}
+% \begin{macro}{\IfFileExists}
+% \changes{v0.2e}{1994/01/19}
+% {name changed from \cs{test}}
+% This is a local definition of |\IfFileExists|. It tries to relocate
+% |texsxys.aux|. If it succeeds, then the |\@currdir| syntax has been
+% determined. If all the tests fail then |\@currdir| will be set to
+% |\@empty|, and |ltxcheck| will warn of this when it checks the format.
+% \begin{macrocode}
+\begingroup
+\count@\time
+\divide\count@ 60
+\count2=-\count@
+\multiply\count2 60
+\advance\count2 \time
+% \end{macrocode}
+%
+% \begin{macro}{\today}
+% The current date and time stamp.
+% \changes{v0.2g}{1994/01/21}
+% {Name changed from \cs{stamp}, to save memory}
+% \begin{macrocode}
+\edef\today{%
+ \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
+ \two@digits{\the\count@}:\two@digits{\the\count2}}
+% \end{macrocode}
+% \end{macro}
+%
+% Create a file |texsys.aux| (hopefully in the current directory),
+% then try to locate it again.
+% \begin{macrocode}
+\immediate\openout15=texsys.aux
+\immediate\write15{\today^^J}
+\immediate\closeout15 %
+% \end{macrocode}
+%
+% |#1| is the file to try, |#2| is what to do on success, |#3| on
+% failure. Note that this definition is overwritten later on again!
+% \begin{macrocode}
+\def\IfFileExists#1#2#3{%
+ \openin\@inputcheck#1 %
+ \ifeof\@inputcheck
+ #3\relax
+ \else
+ \read\@inputcheck to \reserved@a
+ \ifx\reserved@a\today
+ \typeout{#1 found}#2\relax
+ \else
+ \typeout{BAD: old file \reserved@a (should be \today)}%
+ #3\relax
+ \fi
+ \fi
+ \closein\@inputcheck}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\endlinechar=-1
+% \end{macrocode}
+%
+% If |\@currdir| has not been pre-defined in |texsys.cfg| then test for
+% UNIX, VMS and Oz-\TeX-Mac. syntax.
+% \changes{v0.2h}{1994/01/24}
+% {Stop testing once texsys.aux has been found}
+% \begin{macrocode}
+\ifx\@currdir\@undefined
+ \IfFileExists{./texsys.aux}{\gdef\@currdir{./}}%
+ {\IfFileExists{[]texsys.aux}{\gdef\@currdir{[]}}%
+ {\IfFileExists{:texsys.aux}{\gdef\@currdir{:}}{}}}
+% \end{macrocode}
+% If it is still undefined at this point, all the above tests failed.
+% Earlier versions interactively prompted for a definition at this
+% point, but it seems impossible to reliably obtain information from
+% users at this point in the installation. This version of the file
+% produces a format with no user-interaction. Later if the format is not
+% suitable for the system, |texsys.cfg| may be edited and the format
+% re-made.
+% \changes{v0.2a}{1993/12/13}
+% {Removed interactive prompting for current directory syntax}
+% \changes{v0.2f}{1994/01/20}
+% {\cs{@copytexsys} removed}
+% \changes{v1.0u}{1996/12/06}
+% {*** removed from various messages for GNU Make.
+% internal/2338}
+% \begin{macrocode}
+ \ifx\@currdir\@undefined
+ \global\let\@currdir\@empty
+ \typeout{^^J^^J%
+ !! No syntax for the current directory could be found^^J%
+ }%
+ \fi
+% \end{macrocode}
+% Otherwise |\@currdir| was defined in |texsys.cfg|. In this case check
+% that the syntax specified works on this system. (In case a complete
+% \LaTeX\ system has been copied from one system to another.) If the
+% test fails, give up. The installer should remove or correct the
+% offending |texsys.cfg| and try again.
+% \begin{macrocode}
+\else
+ \IfFileExists{\@currdir texsys.aux}{}{%
+ \edef\reserved@a{\errhelp{%
+ texsys.cfg specifies the current directory syntax to be^^J%
+ \meaning\@currdir^^J%
+ but this does not work on this system.^^J%
+ Remove texsys.cfg and restart.}}\reserved@a
+ \errmessage{Bad texsys.cfg file: \noexpand\@currdir}\@@end}
+% \end{macrocode}
+% The version of |\@currdir| in |texsys.cfg| looks OK.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+% \changes{v0.2d}{1994/01/14}
+% {Close the texsys.aux output stream}
+% \begin{macrocode}
+\immediate\closeout15 %
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^J^^J%
+ \noexpand\@currdir set to:
+ \expandafter\strip@prefix\meaning\@currdir.^^J%
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \changes{v0.2a}{1993/12/13}
+% {on the `docstrip' pass, do not check openin path}
+%
+% Stop here if the file is being used unstripped.
+% \begin{macrocode}
+%<*docstrip>
+\relax\endinput
+%</docstrip>
+% \end{macrocode}
+%
+% \section{Setting \texttt{\cs{input@path}}}
+%
+% Earlier versions of this file attempted to automatically test whether
+% |\input@path| was required, and interactively prompt for a path if
+% necessary. This was not found to be very reliable The first-time
+% installer of \LaTeXe\ can not be expected to have enough information
+% to supply the correct information to the prompts. Now the interaction
+% is omitted. After the format is made the installer can attempt to run
+% the test document |ltxcheck.tex| through \LaTeXe. This will check,
+% amongst other things, whether |texsys.cfg| will need to be edited and
+% the format remade.
+%
+% \begin{macro}{\input@path}
+% Now set up the |\input@path|.
+%
+% |\input@path| should either be undefined, or a list of directories as
+% described in the introduction.
+% \changes{v0.2e}{1994/01/19}
+% {No longer check that an empty group is in the path}
+% \begin{macrocode}
+ \typeout{^^J%
+ Assuming \noexpand\openin and \noexpand\input^^J%
+ \ifx\input@path\@undefined
+% \end{macrocode}
+% |\input@path| has not been pre-defined.
+% \begin{macrocode}
+ have the same search path.^^J%
+ \else
+% \end{macrocode}
+% |\input@path| has been defined in |texsys.cfg|.
+% \begin{macrocode}
+ have different search paths.^^J%
+ LaTeX will use the path specified by \noexpand\input@path:^^J%
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Filename Parsing}
+%
+% \begin{macro}{\filename@parse}
+% Split a filename into its components.
+% \changes{v0.2g}{1994/01/21}
+% {Minor changes, and add Mac version (:)}
+% \begin{macrocode}
+\ifx\filename@parse\@undefined
+ \def\reserved@a{./}\ifx\@currdir\reserved@a
+% \end{macrocode}
+% |\filename@parse| was not specified in |texsys.cfg|, but |\@currdir|
+% looks like UNIX\ldots
+% \begin{macrocode}
+ \typeout{^^JDefining UNIX/DOS style filename parser.^^J}
+ \def\filename@parse#1{%
+ \let\filename@area\@empty
+ \expandafter\filename@path#1/\\}
+% \end{macrocode}
+%
+% Search for the last |/|.
+% \begin{macrocode}
+ \def\filename@path#1/#2\\{%
+ \ifx\\#2\\%
+ \def\reserved@a{\filename@simple#1.\\}%
+ \else
+ \edef\filename@area{\filename@area#1/}%
+ \def\reserved@a{\filename@path#2\\}%
+ \fi
+ \reserved@a}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \else\def\reserved@a{[]}\ifx\@currdir\reserved@a
+% \end{macrocode}
+% |\filename@parse| was not specified in |texsys.cfg|, but |\@currdir|
+% looks like VMS\ldots
+% \begin{macrocode}
+ \typeout{^^JDefining VMS style filename parser.^^J}
+ \def\filename@parse#1{%
+ \let\filename@area\@empty
+ \expandafter\filename@path#1]\\}
+% \end{macrocode}
+%
+% Search for the last |]|.
+% \begin{macrocode}
+ \def\filename@path#1]#2\\{%
+ \ifx\\#2\\%
+ \def\reserved@a{\filename@simple#1.\\}%
+ \else
+ \edef\filename@area{\filename@area#1]}%
+ \def\reserved@a{\filename@path#2\\}%
+ \fi
+ \reserved@a}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \else\def\reserved@a{:}\ifx\@currdir\reserved@a
+% \end{macrocode}
+% |\filename@parse| was not specified in |texsys.cfg|, but |\@currdir|
+% looks like Macintosh\ldots
+% \begin{macrocode}
+ \typeout{^^JDefining Mac style filename parser.^^J}
+ \def\filename@parse#1{%
+ \let\filename@area\@empty
+ \expandafter\filename@path#1:\\}
+% \end{macrocode}
+%
+% Search for the last |:|.
+% \changes{v1.0g}{1994/05/25}
+% {Mac parser had " typo for :}
+% \begin{macrocode}
+ \def\filename@path#1:#2\\{%
+ \ifx\\#2\\%
+ \def\reserved@a{\filename@simple#1.\\}%
+ \else
+ \edef\filename@area{\filename@area#1:}%
+ \def\reserved@a{\filename@path#2\\}%
+ \fi
+ \reserved@a}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+% |\filename@parse| was not specified in |texsys.cfg|.
+% So just make a simple parser that always sets |\filename@area| to
+% empty.
+% \begin{macrocode}
+ \typeout{^^JDefining generic filename parser.^^J}
+ \def\filename@parse#1{%
+ \let\filename@area\@empty
+ \expandafter\filename@simple#1.\\}
+ \fi\fi\fi
+% \end{macrocode}
+%
+% |\filename@simple| is used by all three versions.
+% Finally we can split off the extension.
+% \begin{macrocode}
+ \def\filename@simple#1.#2\\{%
+ \ifx\\#2\\%
+ \let\filename@ext\relax
+ \else
+ \edef\filename@ext{\filename@dot#2\\}%
+ \fi
+ \edef\filename@base{#1}}
+% \end{macrocode}
+%
+% Remove a final dot, added earlier.
+% \begin{macrocode}
+ \def\filename@dot#1.\\{#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% Otherwise, |\filename@parse| was specified in |texsys.cfg|.
+% \begin{macrocode}
+ \typeout{^^J^^J%
+ \noexpand\filename@parse was defined in texsys.cfg:^^J%
+ \expandafter\strip@prefix\meaning\filename@parse.^^J%
+ }
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \section{\TeX\ Versions}
+%
+% \begin{macro}{\@TeXversion}
+% \TeX\ versions older than than 3.141 require |\@TeXversion| to be
+% set. This can be determined automatically due to a trick suggested
+% by Bernd Raichle. (Actually this will not always get the correct
+% version number, eg \TeX3.14 would be detected as \TeX3, but \LaTeX\
+% only needs to take account of \TeX's older than 3, or between 3 and
+% 3.14.
+% \changes{v1.0h}{1994/10/11}
+% {Check for TeX3.14}
+% \begin{macrocode}
+\ifx\@TeXversion\@undefined
+ \ifx\@undefined\inputlineno
+ \def\@TeXversion{2}
+ \else
+ {\catcode`\^^J=\active
+ \def\reserved@a#1#2\@@{\if#1\string^3\fi}
+ \edef\reserved@a{\expandafter\reserved@a\string^^J\@@}
+ \ifx\reserved@a\@empty\else\gdef\@TeXversion{3}\fi}
+ \fi
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</dircheck>
+% \end{macrocode}
+%
+% \section{ltxcheck.tex}
+% After the format has been made, and article.cls moved with the
+% other files to the `standard input directory' as specified in
+% |install.txt|, the format may be checked by running the file
+% |ltxcheck.tex|.
+% \changes{v0.2f}{1994/01/20}
+% {Modify all of ltxcheck}
+% \changes{v1.0h}{1994/10/11}
+% {Modify all of ltxcheck again}
+% \changes{v1.0t}{1996/09/25}
+% {Move ltxcheck to separate file}
+%
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/lterror.dtx b/macros/latex-dev/base/lterror.dtx
new file mode 100644
index 0000000000..daf645b8b8
--- /dev/null
+++ b/macros/latex-dev/base/lterror.dtx
@@ -0,0 +1,763 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: lterror.dtx
+%<*driver>
+% \fi
+\ProvidesFile{lterror.dtx}
+ [2018/08/05 v1.2p LaTeX Kernel (errors)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{lterror.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Completely new error interface.}
+% \changes{v1.1b}{1994/05/17}{(ASAJ) Moved error stuff from
+% ltdefns.dtx.}
+% \changes{v1.1c}{1994/05/20}{(ASAJ) Added \cs{@latex@info@no@line}.}
+% \changes{v1.1c}{1994/05/20}{(ASAJ) Added missing full stops.}
+% \changes{v1.1c}{1994/05/20}{(ASAJ) Fixed a bug with
+% \cs{@inmatherr}.}
+% \changes{v1.1d}{1994/05/21}{(ASAJ) Made the error commands robust.}
+% \changes{v1.1e}{1994/05/22}{(ASAJ) Replaced bgroup by begingroup in
+% error messages, to stop extra mathords creeping into math mode.}
+% \changes{v1.2a}{1994/05/22}{(ASAJ) Replaced \cs{@generic@message} and
+% \cs{@generic@error} by \cs{GenericError}, \cs{GenericWarning} and
+% \cs{GenericInfo}.}
+% \changes{v1.2a}{1994/05/22}{(ASAJ) Made \cs{GenericError},
+% \cs{GenericWarning} and \cs{GenericInfo} robust.}
+% \changes{v1.2a}{1994/05/22}{(ASAJ) Replaced \cmd\\ and tilde by
+% \cs{MessageBreak} and \cs{space}.}
+% \changes{v1.2a}{1994/05/22}{(ASAJ) Replaces \cs{string} by
+% \cs{protect} in some messages.}
+% \changes{v1.2f}{1994/05/24}{(DPC) wrap long lines}
+% \changes{v1.2h}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.2i}{1995/09/01}
+% {Add autoload support}
+% \changes{v1.2j}{1995/10/09}
+% {Modify autoload support}
+% \changes{v1.2o}{2015/02/21}
+% {Removed autoload support}
+% \changes{v1.2p}{2016/10/15}
+% {Require e\TeX{}}
+%
+% \section{Error handling}
+%
+% This section defines \LaTeX's error commands.
+%
+% \StopEventually{}
+%
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% The `2ekernel' code ensures that a |\usepackage{autoerr}| is
+% essentially ignored if a `full' format is being used that has
+% the error messages already in the format.
+%
+% These days we don't support autoloading approach any longer, but
+% this part bit is kept in case it is used in old documents.
+% \begin{macrocode}
+\expandafter\let\csname ver@autoerr.sty\endcsname\fmtversion
+% \end{macrocode}
+%
+%
+% \subsection{General commands}
+%
+% \begin{macro}{\MessageBreak}
+% This command prints a new-line inside a message, followed by a
+% continuation line begun with |\@msg@continuation|. Normally it is
+% defined to be |\relax|, but inside messages, it is let to
+% |\@message@break|.
+% \begin{macrocode}
+\let\MessageBreak\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.2g}{1994/11/04}{Added \cs{set@display@protect} to
+% \cs{Generic*} commands. ASAJ.}
+%
+% \begin{macro}{\GenericInfo}
+% This takes two arguments: a continuation and a message, and sends
+% the result to the log file.
+% \begin{macrocode}
+\DeclareRobustCommand{\GenericInfo}[2]{%
+ \begingroup
+ \def\MessageBreak{^^J#1}%
+ \set@display@protect
+ \immediate\write\m@ne{#2\on@line.}%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\GenericWarning}
+% This takes two arguments: a continuation and a message, and sends
+% the result to the screen.
+% \begin{macrocode}
+\DeclareRobustCommand{\GenericWarning}[2]{%
+ \begingroup
+ \def\MessageBreak{^^J#1}%
+ \set@display@protect
+ \immediate\write\@unused{^^J#2\on@line.^^J}%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\GenericError}
+% This macro takes four arguments: a continuation,
+% an error message, where to go for further information, and the help
+% information. It displays the error message, and sets the error help
+% (the result of typing |h| to the prompt), and does a horrible hack
+% to turn the last context line (which by default is the only context
+% line) into just three dots. This could be made more efficient.
+% \changes{v1.2d}{1994/05/22}
+% {(DPC) New version using long command name.}
+% \changes{v1.2d}{1994/05/22}
+% {(DPC) Alternative version added for old TeXs}
+% \begin{macrocode}
+\bgroup
+\lccode`\@=`\ %
+\lccode`\~=`\ %
+\lccode`\}=`\ %
+\lccode`\{=`\ %
+\lccode`\T=`\T%
+\lccode`\H=`\H%
+\catcode`\ =11\relax%
+\lowercase{%
+\egroup%
+% \end{macrocode}
+%
+% Unfortunately \TeX\ versions older than 3.141 have a bug which means
+% that |^^J| does not force a linebreak in |\message| and |\errmessage|
+% commands. So for these old \TeX's we use |\typeout| to produce the
+% message, and then have an empty |\errmessage| command. This causes an
+% extra line of the form
+%\begin{verbatim}
+%! .
+%\end{verbatim}
+% To appear on the terminal, but if you do not like it, you can always
+% upgrade your \TeX! In order for your format to use this version, you
+% must define the macro |\@TeXversion| to be the version number, e.g.,
+% 3.14 of the underlying \TeX. See the comments in
+% \texttt{ltdircheck.dtx}.
+% \begin{macrocode}
+\dimen@\ifx\@TeXversion\@undefined4\else\@TeXversion\fi\p@%
+\ifdim\dimen@>3.14\p@%
+% \end{macrocode}
+%
+% First the `standard case'.
+% \begin{macrocode}
+\DeclareRobustCommand{\GenericError}[4]{%
+\begingroup%
+\immediate\write\@unused{}%
+\def\MessageBreak{^^J}%
+\set@display@protect%
+\edef%
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+{{#4}}%
+\errhelp
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+\let
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+\@empty
+\def\MessageBreak{^^J#1}%
+\def~{\errmessage{%
+#2.^^J^^J%
+#3^^J%
+Type H <return> for immediate help%
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+}}%
+~%
+\endgroup}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else%
+% \end{macrocode}
+%
+% Secondly the version for old \TeX's.
+% \begin{macrocode}
+\DeclareRobustCommand{\GenericError}[4]{%
+\begingroup%
+\immediate\write\@unused{}%
+\def\MessageBreak{^^J}%
+\set@display@protect%
+\edef%
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+{{#4}}%
+\errhelp
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+\let
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+\errmessage
+\def\MessageBreak{^^J#1}%
+\def~{\typeout{! %
+#2.^^J^^J%
+#3^^J%
+Type H <return> for immediate help.}%
+% %<-------------------do not delete this space!------------------->%
+\@err@ %
+{}}%
+~%
+\endgroup}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\PackageError}
+% \begin{macro}{\PackageWarning}
+% \begin{macro}{\PackageWarningNoLine}
+% \begin{macro}{\PackageInfo}
+% \begin{macro}{\ClassError}
+% \begin{macro}{\ClassWarning}
+% \begin{macro}{\ClassWarningNoLine}
+% \begin{macro}{\ClassInfo}
+% These commands are intended for use by package and class writers, to
+% give information to authors. The syntax is:
+% \begin{quote}
+% |\PackageError{|\meta{package}|}{|^^A
+% \meta{error}|}{|\meta{help}|}| \\
+% |\PackageWarning{|\meta{package}|}{|\meta{warning}|}| \\
+% |\PackageWarningNoLine{|\meta{package}|}{|\meta{warning}|}| \\
+% |\PackageInfo{|\meta{package}|}{|\meta{info}|}|
+% \end{quote}
+% and similarly for classes. The |Error| commands print the
+% \meta{error} message, and present the interactive prompt; if the
+% author types |h|, then the \meta{help} information is displayed.
+% The |Warning| commands produce a warning but do not present the
+% interactive prompt. The |WarningNoLine| commands do the same,
+% but don't print the input line number. The |Info| commands write
+% the message to the
+% |log| file. Within the messages, the command
+% |\MessageBreak| can be used to
+% break a line, |\protect| can be used to protect command names,
+% and |\space| is a space, for example:
+% \begin{verbatim}
+% \newcommand{\foo}{FOO}
+% \PackageWarning{ethel}{%
+% Your hovercraft is full of eels,\MessageBreak
+% and \protect\foo\space is \foo}
+% \end{verbatim}
+% produces:
+% \begin{verbatim}
+% Package ethel warning: Your hovercraft is full of eels,
+% (ethel) and \foo is FOO on input line 54.
+% \end{verbatim}
+%
+% \begin{macrocode}
+\gdef\PackageError#1#2#3{%
+ \GenericError{%
+ (#1)\@spaces\@spaces\@spaces\@spaces
+ }{%
+ Package #1 Error: #2%
+ }{%
+ See the #1 package documentation for explanation.%
+ }{#3}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\PackageWarning#1#2{%
+ \GenericWarning{%
+ (#1)\@spaces\@spaces\@spaces\@spaces
+ }{%
+ Package #1 Warning: #2%
+ }%
+}
+\def\PackageWarningNoLine#1#2{%
+ \PackageWarning{#1}{#2\@gobble}%
+}
+\def\PackageInfo#1#2{%
+ \GenericInfo{%
+ (#1) \@spaces\@spaces\@spaces
+ }{%
+ Package #1 Info: #2%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\ClassError#1#2#3{%
+ \GenericError{%
+ (#1) \space\@spaces\@spaces\@spaces
+ }{%
+ Class #1 Error: #2%
+ }{%
+ See the #1 class documentation for explanation.%
+ }{#3}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\ClassWarning#1#2{%
+ \GenericWarning{%
+ (#1) \space\@spaces\@spaces\@spaces
+ }{%
+ Class #1 Warning: #2%
+ }%
+}
+\def\ClassWarningNoLine#1#2{%
+ \ClassWarning{#1}{#2\@gobble}%
+}
+\def\ClassInfo#1#2{%
+ \GenericInfo{%
+ (#1) \space\space\@spaces\@spaces
+ }{%
+ Class #1 Info: #2%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@latex@error}
+% \begin{macro}{\@latex@warning}
+% \begin{macro}{\@latex@warning@no@line}
+% \begin{macro}{\@latex@info}
+% \begin{macro}{\@latex@info@no@line}
+% \changes{v1.2e}{1994/05/24}{Macro added}
+% Errors and other info, for use in the \LaTeX{} core.
+% \begin{macrocode}
+\gdef\@latex@error#1#2{%
+ \GenericError{%
+ \space\space\space\@spaces\@spaces\@spaces
+ }{%
+ LaTeX Error: #1%
+ }{%
+ See the LaTeX manual or LaTeX Companion for explanation.%
+ }{#2}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@latex@warning#1{%
+ \GenericWarning{%
+ \space\space\space\@spaces\@spaces\@spaces
+ }{%
+ LaTeX Warning: #1%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@latex@warning@no@line#1{%
+ \@latex@warning{#1\@gobble}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@latex@info#1{%
+ \GenericInfo{%
+ \@spaces\@spaces\@spaces
+ }{%
+ LaTeX Info: #1%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@latex@info@no@line#1{%
+ \@latex@info{#1\@gobble}}
+% \end{macrocode}
+%
+% |\@font@warning| and |\@font@info| are defined later since they
+% have to be redefined by the \texttt{tracefnt} package.
+%\begin{verbatim}
+%\def\@font@warning#1{%
+% \GenericWarning{%
+% {(font)\@spaces\@spaces}%
+% {Font Warning: #1}%
+% }
+%\def\@font@info#1{%
+% \GenericInfo{%
+% (font)\space\@spaces
+% }{%
+% Font Info: #1%
+% }%
+% }
+%\end{verbatim}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\c@errorcontextlines}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% |\errorcontextlines| as a \LaTeX\ counter, so that it may be be
+% manipulated with |\setcounter| (once it is defined :-)
+% \begin{macrocode}
+\let\c@errorcontextlines\errorcontextlines
+\c@errorcontextlines=-1
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0d}{1994/03/28}
+% {Remove test for \cs{inputlineno} undefined.}
+% \begin{macro}{\on@line}
+% The message ` on input line~$n$'.
+% \begin{macrocode}
+\def\on@line{ on input line \the\inputlineno}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@warning}
+% \begin{macro}{\@@warning}
+% \begin{macro}{\@latexerr}
+% Older \LaTeX{} messages. For the moment, these
+% |\let| to the new message commands. They may be changed later,
+% once only obsolete packages and classes contain them.
+% \changes{v1.0b}{1993/12/03}{Set \cs{c@errorcontextlines} to -1}
+% \changes{v1.0e}{1993/04/09}{Mention The Companion}
+% \changes{v1.0f}{1993/04/11}{Remove setting of errorcontextlines}
+% \changes{v1.0k}{1994/05/01}{(CAR) Added draft \cs{@latexinfo}.}
+% \changes{v1.0n}{1994/05/10}{(ASAJ) Added extra blank lines to
+% \cs{@latexerr}.}
+% \changes{v1.0o}{1994/05/11}
+% {(ASAJ) Removed one of the extra blank lines to \cs{@latexerr}.}
+% \begin{macrocode}
+\let\@warning\@latex@warning
+\let\@@warning\@latex@warning@no@line
+\global\let\@latexerr\@latex@error
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@spaces}
+% Four spaces.
+% \begin{macrocode}
+\def\@spaces{\space\space\space\space}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Specific errors}
+%
+% \begin{macro}{\@eha}
+% \begin{macro}{\@ehb}
+% \begin{macro}{\@ehc}
+% \begin{macro}{\@ehd}
+% The more common error help messages.
+% \begin{macrocode}
+\gdef\@eha{%
+ Your command was ignored.\MessageBreak
+ Type \space I <command> <return> \space to replace it %
+ with another command,\MessageBreak
+ or \space <return> \space to continue without it.}
+\gdef\@ehb{%
+ You've lost some text. \space \@ehc}
+\gdef\@ehc{%
+ Try typing \space <return> %
+ \space to proceed.\MessageBreak
+ If that doesn't work, type \space X <return> \space to quit.}
+\gdef\@ehd{%
+ You're in trouble here. \space\@ehc}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@notdefinable}
+% Error message generated in |\@ifdefinable| from calls
+% to one of the commands |\newcommand|, |\newlength| or |\newtheorem|
+% specifying an already-defined command name or one that begins
+% |\end...|.
+% \changes{v1.2n}{1998/05/28}{Added message re `end...' pr/1555}
+% \begin{macrocode}
+\gdef\@notdefinable{%
+ \@latex@error{%
+ Command \@backslashchar\reserved@a\space
+ already defined.\MessageBreak
+ Or name \@backslashchar\@qend... illegal,
+ see p.192 of the manual}\@eha}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nolnerr}
+% Generated by |\newline| and |\\| when called in vertical mode.
+% \begin{macrocode}
+\gdef\@nolnerr{%
+ \@latex@error{There's no line here to end}\@eha}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nocounterr}
+% \changes{v1.0h}{1994/04/17}{New name for error message,
+% old error message (without arg) kept}
+% Generated by |\setcounter|, |\addtocounter| or
+% |\newcounter| if applied to an undefined counter \meta{cnt}.
+%
+% \begin{macro}{\@nocnterr}
+% Obsolete error message generated in \LaTeX2.09 by
+% |\setcounter|, |\addtocounter| or |\newcounter|
+% for undefined counter.
+% DO NOT use for \LaTeXe\ it MIGHT vanish!
+% Use |\@nocounterr|\marg{cnt} instead.
+% \begin{macrocode}
+\gdef\@nocounterr#1{%
+ \@latex@error{No counter '#1' defined}\@eha}
+\gdef\@nocnterr{\@nocounterr?}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@ctrerr}
+% Called when trying to print the value of a counter
+% numbered by letters that's greater than 26.
+% \begin{macrocode}
+\gdef\@ctrerr{%
+ \@latex@error{Counter too large}\@ehb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nodocument}
+% Error produced if paragraphs are typeset in the preamble.
+% \changes{v1.2m}{1996/11/04}{Always define \cs{@nodocument}
+% in kernel, so that it can be cleared by \cs{document}.}
+% \begin{macrocode}
+\gdef\@nodocument{%
+ \@latex@error{Missing \protect\begin{document}}\@ehd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badend}
+% Called by |\end| that doesn't match its |\begin|.
+% RmS 1992/08/24: added code to |\@badend| to display position of
+% non-matching |\begin|.
+% FMi 1993/01/14: missing space added.
+% \begin{macrocode}
+\gdef\@badend#1{%
+ \@latex@error{\protect\begin{\@currenvir}\@currenvline
+ \space ended by \protect\end{#1}}\@eha}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badmath}
+% Called by |\[|, |\]|, |\(| or |\)| when used in wrong mode.
+% \begin{macrocode}
+\gdef\@badmath{%
+ \@latex@error{Bad math environment delimiter}\@eha}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@toodeep}
+% Called by a list environment nested more than six levels
+% deep, or an enumerate or itemize nested more than four levels.
+% \begin{macrocode}
+\gdef\@toodeep{%
+ \@latex@error{Too deeply nested}\@ehd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badpoptabs}
+% Called by |\endtabbing| when not enough |\poptabs| have
+% occurred, or by |\poptabs| when too many have occurred.
+% \begin{macrocode}
+\gdef\@badpoptabs{%
+ \@latex@error{\protect\pushtabs\space and \protect\poptabs
+ \space don't match}\@ehd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badtab}
+% Called by |\>|, |\+| , |\-| or |\<| when stepping to an undefined tab.
+% \begin{macrocode}
+\gdef\@badtab{%
+ \@latex@error{Undefined tab position}\@ehd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@preamerr}
+% This error is special: it appears in places where we normally have
+% to |\protect| expansions. However, to prevent a protection of
+% the error message itself (which would result in the message
+% getting printed not issued on the terminal) we need to locally
+% reset |\protect| to |\relax|.
+% \begin{macrocode}
+\gdef\@preamerr#1{%
+ \begingroup
+ \let\protect\relax
+ \@latex@error{\ifcase #1 Illegal character\or
+ Missing @-exp\or Missing p-arg\fi\space
+ in array arg}\@ehd
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badlinearg}
+% Occurs in |\line| and |\vector| command when a bad slope
+% argument is encountered.
+% \begin{macrocode}
+\gdef\@badlinearg{%
+ \@latex@error{%
+ Bad \protect\line\space or \protect\vector
+ \space argument}\@ehb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@parmoderr}
+% Occurs in a float environment or a |\marginpar| when
+% encountered in inner vertical mode.
+% \begin{macrocode}
+\gdef\@parmoderr{%
+ \@latex@error{Not in outer par mode}\@ehb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fltovf}
+% Occurs in float environment or |\marginpar| when there
+% are no more free boxes for storing floats.
+% \begin{macrocode}
+\gdef\@fltovf{%
+ \@latex@error{Too many unprocessed floats}\@ehb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@latexbug}
+% Occurs in output routine. This is bad news.
+% \begin{macrocode}
+\gdef\@latexbug{%
+ \@latex@error{This may be a LaTeX bug}{Call for help}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@badcrerr}
+% This error was removed and replaced by |\@nolnerr|.
+% \changes{v1.0m}{1994/05/04}{Error message removed}
+% \begin{macrocode}
+%\def\@badcrerr {\@latex@error{Bad use of \protect\\}\@ehc}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@noitemerr}
+% |\addvspace| or |\addpenalty| was called when not in
+% vmode. Probably caused by a missing |\item|.
+% \begin{macrocode}
+\gdef\@noitemerr{%
+ \@latex@error{Something's wrong--perhaps a missing %
+ \protect\item}\@ehc}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@notprerr}
+% A command that can be used only in the preamble
+% appears after the command |\begin{document}|.
+% \begin{macrocode}
+\gdef\@notprerr{%
+ \@latex@error{Can be used only in preamble}\@eha}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@inmatherr}
+% \changes{v1.0j}{1994/04/28}{Macro added}
+% \changes{v1.1c}{1994/04/28}{Replaced \cs{noexpand} with \cs{protect}.}
+% Issued by commands that don't work correctly within math (like
+% |\item|). There is no real error recovery happening, e.g., the
+% user might get additional errors afterwards.
+% \begin{macrocode}
+\gdef\@inmatherr#1{%
+ \relax
+ \ifmmode
+ \@latex@error{Command \protect#1 invalid in math mode}\@ehc
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@invalidchar}
+% \changes{LaTeX2.09}{1993/09/19}
+% {(RmS) Error message for invalid input characters.}
+% \changes{v1.0d}{1994/03/28}
+% {(DPC) Comment out (use catcode15 instead)}
+% An error for use with invalid characters. This is commented
+% out, since we decided to use catcode 15 instead.
+% \begin{macrocode}
+%\def\@invalidchar{\@latex@error{Invalid character in input}\@ehc}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% As well as the above error commands some error messages are directly
+% coded to save space. The messages already present in \LaTeX2.09
+% include:
+%
+% |Environment --- undefined|\\
+% Issued by |\begin| for undefined environment.
+%
+% |Tab overflow|\\
+% Occurs in |\=| when maximum number of tabs exceeded.
+%
+% |\< in mid line|\\
+% Occurs in |\<| when it appears in middle of line.
+%
+% |Float(s) lost|\\
+% In output routine, caused by a float environment or
+% |\marginpar| occurring in inner vertical mode.
+%
+%\Finale
+\endinput
diff --git a/macros/latex-dev/base/ltfiles.dtx b/macros/latex-dev/base/ltfiles.dtx
new file mode 100644
index 0000000000..7d628f52e1
--- /dev/null
+++ b/macros/latex-dev/base/ltfiles.dtx
@@ -0,0 +1,1129 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltfiles.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltfiles.dtx}
+ [2019/07/01 v1.2a LaTeX Kernel (File Handling)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltfiles.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0h}{1994/05/21}{Use new error commands}
+% \changes{v1.0n}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0u}{1995/07/13}{Updates to docu}
+% \changes{v1.1m}{2015/02/21}
+% {Removed autoload support}
+%
+% \section{File Handling}
+%
+% The following user commands are defined in this part:
+%
+% \DescribeMacro{\document} (ie |\begin{document}|)\\
+% Reads in the .AUX files and |\catcode|'s |@| to 12.
+%
+% \DescribeMacro{\nofiles}\\
+% Suppresses all file output by setting |\@filesw| false.
+%
+% \DescribeMacro{\includeonly}\marg{NAME1, ... ,NAMEn}\\
+% Causes only parts NAME1, ... ,NAMEn to be read by
+% their |\include| commands. Works by setting \@partsw true
+% and setting |\@partlist| to NAME1, ... ,NAMEn.
+%
+% \DescribeMacro{\include}\marg{NAME}\\
+% Does an |\input| NAME unless |\@partsw| is true and
+% NAME is not in |\@partlist|. If |\@filesw| is true, then
+% it directs .AUX output to NAME.AUX, including a
+% checkpoint at the end.
+%
+% \DescribeMacro{\input}\marg{NAME}\\
+% The same as TeX's |\input|, except it allows optional
+% braces around the file name. In \LaTeXe, it also avoids
+% the primitive `missing file' error, if the file can not be
+% found.
+%
+% \DescribeMacro{\IfFileExists}\marg{NAME}\marg{then}\marg{else}\\
+% If the file exists on the system, execute \emph{then} otherwise
+% execute \emph{else}.
+%
+% \DescribeMacro{\InputIfFileExists}\marg{NAME}\marg{then}\marg{else}\\
+% If the file exists on the system, execute \emph{then} and input
+% \emph{NAME} otherwise execute \emph{else}.
+%
+% \StopEventually{}
+%
+% \changes{v1.0a}{1994/03/07}{Initial version, split from latex.dtx}
+% \changes{v1.0a}{1994/03/07}{Long lines wrapped to 72 columns}
+%
+% \begin{oldcomments}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{files,}
+% \end{macrocode}
+%
+% VARIABLES, SWITCHES AND INTERNAL COMMANDS:
+% \@mainaux : Output file number for main .AUX file.
+% \@partaux : Output file number for current part's .AUX file.
+% \@auxout : Either \@mainout or \@partout, depending on
+% which .AUX file output goes to.
+% \@input{foo} : If file foo exists, then \input's it,
+% otherwise types a warning message.
+% @filesw : Switch -- set false if no .AUX, .TOC, .IDX etc
+% files are to be written
+% @partsw : Set true by a \includeonly command.
+% \@partlist : Set to the argument of the \includeonly command.
+%
+% \cp@FOO : The checkpoint for \include'd file FOO.TEX, written
+% by \@writeckpt at the end of file FOO.AUX
+%
+%
+% \includeonly{FILELIST} ==
+% BEGIN
+% \@partsw := T
+% \@partlist := FILELIST
+% END
+%
+% \include{FILE} ==
+% BEGIN
+% \clearpage
+% if \@filesw = T
+% then \immediate\write\@mainaux{\string\@input{FILE.AUX}}
+% fi
+% if \@partsw = T
+% then \@tempswa := F
+% \reserved@b == FILE
+% for \reserved@a := \@partlist
+% do if eval(\reserved@a) = eval(\reserved@b)
+% then \@tempswa := T fi
+% od
+% fi
+%
+% if \@tempswa = T
+% then \@auxout := \@partaux
+% if \@filesw = T
+% then \immediate\openout\@partaux{FILE.AUX}
+% \immediate\write\@partaux{\relax}
+% fi
+% \@input{FILE.TEX}
+% \clearpage
+% \@writeckpt{FILE}
+% if @filesw then \closeout \@partaux fi
+% \@auxout := \@mainaux
+% else \cp@FILE
+% fi
+% END
+%
+% \@writeckpt{FILE} ==
+% BEGIN
+% if \@filesw = T
+% \immediate\write on file \@partaux:
+% \@setckpt{FILE}{ %% }
+% for \reserved@a := \cl@@ckpt
+% do \immediate\write on file \@partaux:
+% \global\string\setcounter
+% {eval(\reserved@a)}{eval(\c@eval(\reserved@a))}
+% od %% {
+% \immediate\write on file \@partaux: }
+% fi
+% END
+%
+% \@setckpt{FILE}{LIST} ==
+% BEGIN
+% G \cp@FILE := LIST
+% END
+%
+% INITIALIZATION
+% \@tempswa := T
+%
+% \end{oldcomments}
+%
+%
+% \task{???}{Do we use @unused or mainaux?}
+% \begin{macro}{\@inputcheck}
+% \begin{macro}{\@unused}
+% Allocate read stream for testing and output stream.
+% \changes{v1.0l}{1994/11/07}
+% {move here from ltdefns, remove duplicate \cs{@mainaux}}
+% \begin{macrocode}
+\newread\@inputcheck
+\newwrite\@unused
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@mainaux}
+% \begin{macro}{\@partaux}
+% \begin{macrocode}
+\newwrite\@mainaux
+\newwrite\@partaux
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@filesw}
+% \begin{macro}{\if@partsw}
+% \begin{macrocode}
+\newif\if@filesw \@fileswtrue
+\newif\if@partsw \@partswfalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@clubpenalty}
+% This stores the current normal (non-infinite) value of
+% \cs{clubpenalty}; it should therefore be reset whenever the
+% normal value is changed (as in the bibliography in the standard
+% styles).
+% \changes{v1.1h}{1996/10/05}{Added setting its value}
+% \begin{macrocode}
+\newcount\@clubpenalty
+\@clubpenalty \clubpenalty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\document}
+% \changes{v0.9e}{1993/12/09}{Hook added}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/04/15}%
+%<latexrelease> {\document}{Save language for hyphenation}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+% Cancel the |\begingroup| from |\begin|.
+% \begin{macrocode}
+\def\document{\endgroup
+% \end{macrocode}
+% If some options on |\documentclass| haven't been used by any
+% package we will now give a warning since this is most certainly a
+% misspelling.
+% \begin{macrocode}
+ \ifx\@unusedoptionlist\@empty\else
+ \@latex@warning@no@line{Unused global option(s):^^J%
+ \@spaces[\@unusedoptionlist]}%
+ \fi
+ \@colht\textheight
+ \@colroom\textheight \vsize\textheight
+ \columnwidth\textwidth
+ \@clubpenalty\clubpenalty
+ \if@twocolumn
+ \advance\columnwidth -\columnsep
+ \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
+ \fi
+ \hsize\columnwidth \linewidth\hsize
+ \begingroup\@floatplacement\@dblfloatplacement
+ \makeatletter\let\@writefile\@gobbletwo
+% \end{macrocode}
+% \changes{v1.1a}{1995/10/24}
+% {Removed multiplelabels switch}
+% \begin{macrocode}
+ \global \let \@multiplelabels \relax
+ \@input{\jobname.aux}%
+ \endgroup
+ \if@filesw
+ \immediate\openout\@mainaux\jobname.aux
+ \immediate\write\@mainaux{\relax}%
+ \fi
+% \end{macrocode}
+%
+% Dateline 1991/03/26: FMi added |\process@table| to support NFSS;
+% This will also work with old lfonts if no other style defines
+% |\process@table|. The following line forces the initialization of
+% the math fonts.
+% \begin{macrocode}
+ \process@table
+ \let\glb@currsize\@empty % Force math initialization.
+% \end{macrocode}
+% \changes{v0.9t}{1994/01/31}
+% {set \cs{@normalsize} or \cs{normalsize} if necessary}
+% \changes{v1.0d}{1994/03/28}
+% {(DPC) remove \cs{@normalsize check}}
+% \changes{v1.0d}{1994/03/28}
+% {(DPC) Use \cs{normalsize} not \cs{@normalsize}}
+% \changes{v1.0g}{1994/05/13}{Added execution of \cs{every@size}}
+% \changes{v1.0m}{1994/11/07}{Renamed \cs{every@size} to
+% \cs{every@math@size}.}
+% \changes{v1.0q}{1995/04/25}
+% {Removed execution of \cs{every@size} latex/1407}
+% \begin{macrocode}
+ \normalsize
+ \everypar{}%
+% \end{macrocode}
+%
+% So that punctuation in headings is not disturbed by verbatim
+% or other local changes to the space factor codes, save the document
+% default here. This will be locally reset by the output routine.
+% For special cases a class may want to define |\normalsfcodes|
+% directly, in case that definition will be used.
+% (This is an old bug, problem existed in \LaTeX2.0x and plain \TeX.)
+% \changes{v1.1k}{1997/04/14}
+% {Set the document space factor defaults. latex/2404}
+% \begin{macrocode}
+ \ifx\normalsfcodes\@empty
+ \ifnum\sfcode`\.=\@m
+ \let\normalsfcodes\frenchspacing
+ \else
+ \let\normalsfcodes\nonfrenchspacing
+ \fi
+ \fi
+% \end{macrocode}
+% For similar reasons also save the default language, this will be reset
+% locally in the output routine. In particular it allows hyphenation
+% in the page head even if the page break happens in verbatim.
+% If this has already been set by a package, set to the value of |\language|
+% at this spoint.
+% \changes{v1.1n}{2017/03/10}{Save language default}
+% \begin{macrocode}
+ \ifx\document@default@language\m@ne
+ \chardef\document@default@language\language
+ \fi
+% \end{macrocode}
+%
+% Way back in 1991 (08/26) FMi \& RmS set the |\@noskipsec| switch
+% to true in the preamble and to false here.
+% This was done to trap lists and related text in the preamble but it
+% does not catch everything; hence Change 1.1g was introduced.
+% \begin{macrocode}
+ \@noskipsecfalse
+% \end{macrocode}
+% \changes{v1.1a}{1995/10/24}
+% {Removed refundefined switch}
+% \begin{macrocode}
+ \let \@refundefined \relax
+% \end{macrocode}
+% Just before disabling the preamble commands we execute the begin
+% document hook which contains any code contributed by
+% |\AtBeginDocument|. Also disable the gathering of the file list,
+% if no |\listfiles| has been issued. |\AtBeginDocument| is redefined
+% at this point so that and such commands that get into the hook do
+% not chase their tail\ldots
+% \changes{v1.1e}{1996/04/24}
+% {(DPC) Reset \cs{AtBeginDocument} eg for latex/1297}
+% \begin{macrocode}
+ \let\AtBeginDocument\@firstofone
+ \@begindocumenthook
+% \end{macrocode}
+% Most of the following assignments will be done globally in case
+% the user adds something like |\begin{multicols}| to the document
+% hook, i.e. starts are group in |\begin{document}|.
+% \changes{v1.0r}{1995/04/27}
+% {Added \cs{global} to support groups in hook}
+% \changes{v1.0c}{1994/03/16}
+% {(DPC) directly add file list settings}
+% \changes{v1.0v}{1995/08/16}{set \cs{topskip} globally}
+% \changes{v1.0v}{1995/08/16}{set \cs{@maxdepth}}
+%
+% \changes{v1.0s}{1995/05/25}
+% {Added check for \cs{topskip} zero}
+% \changes{v1.0t}{1995/05/25}
+% {Corrected typo}
+% Since a value of exactly 0pt for \cs{topskip} causes
+% \cs{twocolumn[]} to misbehave, we add this check, hoping
+% that it will not cause any problems elsewhere.
+% \begin{macrocode}
+ \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
+ \global\@maxdepth\maxdepth
+ \global\let\@begindocumenthook\@undefined
+ \ifx\@listfiles\@undefined
+ \global\let\@filelist\relax
+ \global\let\@addtofilelist\@gobble
+ \fi
+% \end{macrocode}
+% At the very end we disable all preamble commands. This has to
+% happen after the begin document hooks was executed so that this
+% hook can still use such commands.
+% \changes{v0.9o}{1994/01/15}
+% {move \cs{@preamblecmds} after document hook}
+% \changes{v1.0v}{1995/08/16}{set \cs{do} globally}
+% \begin{macrocode}
+ \gdef\do##1{\global\let ##1\@notprerr}%
+ \@preamblecmds
+% \end{macrocode}
+% The next line saves tokens and also allows |\@nodocument| to be
+% used directly to trap preamble errors.
+% \changes{v1.1g}{1996/09/29}{Added disabling of \cs{@nodocument}}
+% \begin{macrocode}
+ \global\let \@nodocument \relax
+% \end{macrocode}
+% The next line is a pure safety measure in case a do list is ever
+% expanded at the wrong place. In addition it will save a few
+% tokens to get rid of the above definition.
+% \begin{macrocode}
+ \global\let\do\noexpand
+% \end{macrocode}
+% \changes{v1.1c}{1995/12/05}{\cs{ignorespaces} added for latex/1933}
+% Use of |\AtBeginDocument| hook might mean that we are already in
+% horizontal mode, so ignore the space after |\begin{document}|.
+% \begin{macrocode}
+ \ignorespaces}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\document}{Save language for hyphenation}
+%<latexrelease>\def\document{\endgroup
+%<latexrelease> \ifx\@unusedoptionlist\@empty\else
+%<latexrelease> \@latex@warning@no@line{Unused global option(s):^^J%
+%<latexrelease> \@spaces[\@unusedoptionlist]}%
+%<latexrelease> \fi
+%<latexrelease> \@colht\textheight
+%<latexrelease> \@colroom\textheight \vsize\textheight
+%<latexrelease> \columnwidth\textwidth
+%<latexrelease> \@clubpenalty\clubpenalty
+%<latexrelease> \if@twocolumn
+%<latexrelease> \advance\columnwidth -\columnsep
+%<latexrelease> \divide\columnwidth\tw@ \hsize\columnwidth
+%<latexrelease> \@firstcolumntrue
+%<latexrelease> \fi
+%<latexrelease> \hsize\columnwidth \linewidth\hsize
+%<latexrelease> \begingroup\@floatplacement\@dblfloatplacement
+%<latexrelease> \makeatletter\let\@writefile\@gobbletwo
+%<latexrelease> \global \let \@multiplelabels \relax
+%<latexrelease> \@input{\jobname.aux}%
+%<latexrelease> \endgroup
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\openout\@mainaux\jobname.aux
+%<latexrelease> \immediate\write\@mainaux{\relax}%
+%<latexrelease> \fi
+%<latexrelease> \process@table
+%<latexrelease> \let\glb@currsize\@empty
+%<latexrelease> \normalsize
+%<latexrelease> \everypar{}%
+%<latexrelease> \ifx\normalsfcodes\@empty
+%<latexrelease> \ifnum\sfcode`\.=\@m
+%<latexrelease> \let\normalsfcodes\frenchspacing
+%<latexrelease> \else
+%<latexrelease> \let\normalsfcodes\nonfrenchspacing
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \@noskipsecfalse
+%<latexrelease> \let \@refundefined \relax
+%<latexrelease> \let\AtBeginDocument\@firstofone
+%<latexrelease> \@begindocumenthook
+%<latexrelease> \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
+%<latexrelease> \global\@maxdepth\maxdepth
+%<latexrelease> \global\let\@begindocumenthook\@undefined
+%<latexrelease> \ifx\@listfiles\@undefined
+%<latexrelease> \global\let\@filelist\relax
+%<latexrelease> \global\let\@addtofilelist\@gobble
+%<latexrelease> \fi
+%<latexrelease> \gdef\do##1{\global\let ##1\@notprerr}%
+%<latexrelease> \@preamblecmds
+%<latexrelease> \global\let \@nodocument \relax
+%<latexrelease> \global\let\do\noexpand
+%<latexrelease> \ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\document
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\normalsfcodes}
+% \changes{v1.1k}{1997/04/14}
+% {Macro added (from patch file) latex/2404}
+% The setting of |\@empty| is just a flag. This command may be defined
+% in a class or package file. If it is still |\@empty| at
+% |\begin{document}| it will be defined to be |\frenchspacing| or
+% |\nonfrenchspacing|, depending on which of those appears to be in
+% effect at that point.
+% \begin{macrocode}
+\let\normalsfcodes\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nofiles}
+% \changes{v1.0k}{1994/11/04}
+% {Added setting of \cs{protected@write},
+% \cs{makeindex} and \cs{makeglossary} to \cs{nofiles}. ASAJ.}
+% \changes{v1.0o}{1994/11/30}
+% {There is no \cs{@gobblethree}\ldots}
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+% \changes{v1.1f}{1996/05/17}
+% {added \cs{write} to \cs{protected@write} for latex/2146}
+% Set |\@fileswfalse| which suppresses the places where \LaTeX\ makes
+% |\immediate| writes. The |\makeindex| and |\makeglossary| are
+% disabled. |\protected@write| is redefined not to write to the file
+% specified, but rather to write a blank line to the log file. This
+% ensures that a \meta{whatsit} node is still created, and so spacing
+% is not affected by the |\nofiles| command; to ensure this more
+% generally, the |\if@nobreak| test is needed.
+% \changes{v1.1i}{1996/11/05}
+% {Standard \cs{if@nobreak} test added}
+% \begin{macrocode}
+\def\nofiles{%
+ \@fileswfalse
+ \typeout{No auxiliary output files.^^J}%
+ \long\def\protected@write##1##2##3%
+ {\write\m@ne{}\if@nobreak\ifvmode\nobreak\fi\fi}%
+ \let\makeindex\relax
+ \let\makeglossary\relax}
+\@onlypreamble\nofiles
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\protected@write}
+% This takes three arguments: an output stream, some initialization
+% code, and some text to write. It then writes this, with
+% appropriate handling of |\protect| and |\thepage|.
+% \changes{v1.0k}{1994/11/04}{Macro added ASAJ.}
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+% \begin{macrocode}
+\long\def \protected@write#1#2#3{%
+ \begingroup
+ \let\thepage\relax
+ #2%
+ \let\protect\@unexpandable@protect
+ \edef\reserved@a{\write#1{#3}}%
+ \reserved@a
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\let\@auxout=\@mainaux
+% \end{macrocode}
+%
+%
+% \begin{macro}{\includeonly}
+% \changes{v1.0p}{1995/04/22}{Allow blanks in argument}
+% \changes{v1.2a}{2019/07/01}{Support UTF-8}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\includeonly}{Spaces in file names}%
+\def\includeonly#1{%
+ \@partswtrue
+ \set@curr@file{\zap@space#1 \@empty}%
+ \let\@partlist\@curr@file
+ }
+\@onlypreamble\includeonly
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\include}
+% \changes{v0.9p}{1994/01/18}
+% {Use \cs{@input@} so include files are listed.}
+% In the definition of |\include|, |\def\reserved@b| changed to
+% |\edef\reserved@b| to be consistent with the |\edef| in
+% |\includeonly|.
+% (Suggested by Rainer Sch\"opf \& Frank Mittelbach.
+% Change made 20 Jul 88.)
+%
+% Changed definition of |\include| to allow space at end of file name
+% --- otherwise, typing |\include{foo }| would cause \LaTeX\ to
+% overwrite |foo.tex|. Change made 24 May 89, suggested by Rainer
+% Sch\"opf and Frank Mittelbach
+%
+% Made |\include| check for being used inside an |\include|'d file, as
+% this will not work and cause surprising results.
+% \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
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\includeonly}{Spaces in file names}%
+%<latexrelease>\def\includeonly#1{%
+%<latexrelease> \@partswtrue
+%<latexrelease> \edef\@partlist{\zap@space#1 \@empty}}
+%<latexrelease>
+%<latexrelease>\def\include#1{\relax
+%<latexrelease> \ifnum\@auxout=\@partaux
+%<latexrelease> \@latex@error{\string\include\space cannot be nested}\@eha
+%<latexrelease> \else \@include#1 \fi}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+
+%
+% \begin{macro}{\@include}
+% \begin{macrocode}
+\def\@include#1 {%
+ \clearpage
+ \if@filesw
+ \immediate\write\@mainaux{\string\@input{#1.aux}}%
+ \fi
+ \@tempswatrue
+ \if@partsw
+ \@tempswafalse
+ \edef\reserved@b{#1}%
+ \@for\reserved@a:=\@partlist\do
+ {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
+ \fi
+ \if@tempswa
+ \let\@auxout\@partaux
+ \if@filesw
+ \immediate\openout\@partaux #1.aux
+ \immediate\write\@partaux{\relax}%
+ \fi
+ \@input@{#1.tex}%
+ \clearpage
+ \@writeckpt{#1}%
+ \if@filesw
+ \immediate\closeout\@partaux
+ \fi
+ \else
+% \end{macrocode}
+% If the file is not included, reset |\deadcycles|, so that a long
+% list of non-included files does not generate an `Output loop'
+% error.
+% \changes{v1.1j}{1997/01/08}{reset \cs{deadcycles} latex/2365}
+% \begin{macrocode}
+ \deadcycles\z@
+ \@nameuse{cp@#1}%
+ \fi
+ \let\@auxout\@mainaux}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@writeckpt}
+% \begin{macrocode}
+\def\@writeckpt#1{%
+ \if@filesw
+ \immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
+ {\let\@elt\@wckptelt \cl@@ckpt}%
+ \immediate\write\@partaux{\@charrb}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@wckptelt}
+% \begin{macrocode}
+\def\@wckptelt#1{%
+ \immediate\write\@partaux{%
+ \string\setcounter{#1}{\the\@nameuse{c@#1}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@setckpt}
+% RmS 93/08/31: introduced |\@setckpt|
+% \begin{macrocode}
+\def\@setckpt#1{\global\@namedef{cp@#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@charlb}
+% \begin{macro}{\@charrb}
+% The following defines |\@charlb| and |\@charrb| to be |{| and |}|,
+% respectively with |\catcode| 11.
+% \begin{macrocode}
+{\catcode`[=1 \catcode`]=2
+\catcode`{=11 \catcode`}=11
+\gdef\@charlb[{]
+\gdef\@charrb[}]
+]% }brace matching
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Safe Input Macros}
+%
+%
+%
+
+% \begin{macro}{\@curr@file}
+% \begin{macro}{\set@curr@file}
+%
+% File name handling is done by generating a csname from the
+% provided file name (which means that UTF-8 octets gets turned into
+% strings as this is what happens if they appear in a csname due to
+% 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
+% quotes if they have been supplied by the user. There is clearly
+% some room for improvement.
+%
+% A side effect of the new code is that we will see quotes around
+% file name displays where there haven't been any before.
+%
+% \changes{v1.2a}{2019/07/01}{Support UTF-8}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\set@curr@file}{Quote file names}%
+\def\set@curr@file#1{%
+ \begingroup
+ \escapechar\m@ne
+ \xdef\@curr@file{\expandafter\string\csname #1\endcsname}%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\quote@name}
+% \begin{macro}{\quote@@name}
+% \begin{macro}{\unquote@name}
+% Quoting spaces
+%\begin{verbatim}
+% a b c -> "a b c"
+% "a b c" -> "a b c"
+% a" "b" "c -> "a b c"
+% -> ""
+%\end{verbatim}
+% \begin{macrocode}
+\def\quote@name#1{"\quote@@name#1\@gobble""}
+\def\quote@@name#1"{#1\quote@@name}
+% \end{macrocode}
+% and removing quotes \ldots
+% \begin{macrocode}
+\def\unquote@name#1{\quote@@name#1\@gobble"}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\IfFileExists}
+%
+% \changes{v1.2a}{2019/07/01}{Support UTF-8}
+% \begin{macrocode}
+\def\IfFileExists#1{%
+ \set@curr@file{#1}%
+ \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}%
+ \expandafter\IfFileExists@\expandafter{\q@curr@file}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IfFileExists@}
+% \changes{v0.9b}{1993/12/04}{Macro added}
+% \changes{v0.9p}{1994/01/18}{New Definition}
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+%
+% \begin{macrocode}
+\long\def \IfFileExists@#1#2#3{%
+ \openin\@inputcheck#1 %
+ \ifeof\@inputcheck
+ \ifx\input@path\@undefined
+ \def\reserved@a{#3}%
+ \else
+ \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}%
+ \fi
+ \else
+ \closein\@inputcheck
+ \edef\@filef@und{#1 }%
+ \def\reserved@a{#2}%
+ \fi
+ \reserved@a}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\set@curr@file}{Quote file names}%
+%<latexrelease>
+%<latexrelease>\let\quote@name\@undefined
+%<latexrelease>\let\quote@@name\@undefined
+%<latexrelease>\let\unquote@name\@undefined
+%<latexrelease>\let\set@curr@file\@undefined
+%<latexrelease>
+%<latexrelease>\let\IfFileExists@\@undefined
+%<latexrelease>
+%<latexrelease>\long\def \IfFileExists#1#2#3{%
+%<latexrelease> \openin\@inputcheck#1 %
+%<latexrelease> \ifeof\@inputcheck
+%<latexrelease> \ifx\input@path\@undefined
+%<latexrelease> \def\reserved@a{#3}%
+%<latexrelease> \else
+%<latexrelease> \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}%
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \closein\@inputcheck
+%<latexrelease> \edef\@filef@und{#1 }%
+%<latexrelease> \def\reserved@a{#2}%
+%<latexrelease> \fi
+%<latexrelease> \reserved@a}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\@iffileonpath}
+% If the file is not found by |\openin|, and |\input@path| is defined,
+% look in all the directories specified in |\input@path|.
+% \changes{v0.9p}{1994/01/18}{Macro added}
+% \changes{v1.0f}{1994/05/02}
+% {\cs{@break@loop} renamed to \cs{@break@tfor}}
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+% \changes{v1.1d}{1996/01/10}
+% {Change argument handling to not require doubled hash. latex/2024}
+% \begin{macrocode}
+\long\def\@iffileonpath#1{%
+ \let\reserved@a\@secondoftwo
+ \expandafter\@tfor\expandafter\reserved@b\expandafter
+ :\expandafter=\input@path\do{%
+ \openin\@inputcheck\reserved@b#1 %
+ \ifeof\@inputcheck\else
+ \edef\@filef@und{\reserved@b#1 }%
+ \let\reserved@a\@firstoftwo%
+ \closein\@inputcheck
+ \@break@tfor
+ \fi}%
+ \reserved@a}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\InputIfFileExists}
+% \changes{v0.9b}
+% {1993/12/04}{Macro added}
+% \changes{v0.9p}
+% {1994/01/18}{New Definition}
+% \changes{v0.3b}{1994/03/13}
+% {Use new cmd \cs{@addtofilelist}}
+% Now define |\InputIfFileExists| to input |#1| if it seems to exist.
+% Immediately prior to the input, |#2| is executed.
+% If the file |#1| does not exist, execute `|#3|'.
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+% \changes{v1.1o}{2019/02/07}{Expand \cs{@filef@und} before executing
+% second argument (github/109)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\InputIfFileExists}{Don't lose the file name}%
+%<*2ekernel|latexrelease>
+% \begin{macrocode}
+\long\def \InputIfFileExists#1#2{%
+ \IfFileExists{#1}%
+ {%
+ \expandafter\@swaptwoargs\expandafter
+ {\@filef@und}{#2\@addtofilelist{#1}\@@input}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@swaptwoargs}
+%
+% \changes{v1.1o}{2019/02/07}{Helper macro added}
+% Swap two arguments and return them unbraced (like
+% \cs{@firstoftwo} etc).
+% \begin{macrocode}
+\long\def\@swaptwoargs#1#2{#2#1}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\InputIfFileExists}{Don't lose the file name}%
+%<latexrelease>\long\def \InputIfFileExists#1#2{%
+%<latexrelease> \IfFileExists{#1}%
+%<latexrelease> {#2\@addtofilelist{#1}\@@input \@filef@und}}
+%<latexrelease>
+%<latexrelease>\let\@swaptwoargs\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\input}
+% Input a file: if the argument is given in braces use safe input
+% macros, otherwise use \TeX's primitive |\input| command (which is
+% called |\@@input| in \LaTeX).
+% \changes{v0.9b}{1993/12/04}{Macro reimplemented}
+% \begin{macrocode}
+\def\input{\@ifnextchar\bgroup\@iinput\@@input}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@iinput}
+% Define |\@iinput| (i.e., |\input|) in terms of
+% |\InputIfIfileExists|.
+% \changes{v0.9b}{1993/12/04}{Macro reimplemented}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\@iinput}{Quote file names}%
+\def\@iinput#1{%
+ \InputIfFileExists{#1}{}%
+ {\filename@parse\@curr@file
+ \edef\reserved@a{\noexpand\@missingfileerror
+ {\filename@area\filename@base}%
+ {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+ \reserved@a}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@iinput}{Quote file names}%
+%<latexrelease>\def\@iinput#1{%
+%<latexrelease> \InputIfFileExists{#1}{}%
+%<latexrelease> {\filename@parse{#1}%
+%<latexrelease> \edef\reserved@a{\noexpand\@missingfileerror
+%<latexrelease> {\filename@area\filename@base}%
+%<latexrelease> {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+%<latexrelease> \reserved@a}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+%
+% \begin{macro}{\@input}
+% \changes{v0.9b}{1993/12/04}{Macro reimplemented}
+% \changes{v0.9p}{1994/01/18}%
+% {do not use a different definition for \cs{input@path}}
+% Define |\@input| in terms of |\IfIfileExists|.
+% So this is a `safe input' command, but the files input are not
+% listed by |\listfiles|.
+%
+% We don't want |.aux|, |.toc| files etc be listed by |\listfiles|.
+% However, something like |.bbl| probably should be listed and thus
+% should be implemented not by |\@input|.
+% \begin{macrocode}
+\def\@input#1{%
+ \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@input@}
+% \changes{v0.9p}{1994/01/18}{Macro added}
+% \task{???}{share code with `@input ?}
+% Version of |\@input| that does add the file to |\@filelist|.
+% \begin{macrocode}
+\def\@input@#1{\InputIfFileExists{#1}{}{\typeout{No file #1.}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@missingfileerror}
+% This `error' command avoids \TeX's primitive missing file loop.
+%
+% Missing file error. Prompt for a new filename, offering a default
+% extension.
+% \changes{LaTeX2e}{1993/11/21}
+% {Stop infinite looping on \cs{@er@ext}}
+% \changes{LaTeX2e}{1993/11/28}
+% {Use filename parser from dircheck}
+% \changes{LaTeX2e}{1994/03/15}
+% {Quit on x or X just like a real error}
+% \changes{LaTeX2e}{1994/05/26}
+% {Modify message format}
+% \changes{v1.0j}{1994/11/03}
+% {Move here from ltclass}
+% \changes{v1.0w}{1995/10/06}
+% {Autoload error}
+% \begin{macrocode}
+\gdef\@missingfileerror#1#2{%
+ \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
+ Type X to quit or <RETURN> to proceed,^^J%
+ or enter new name. (Default extension: #2)^^J}%
+ \message{Enter file name: }%
+ {\endlinechar\m@ne
+ \global\read\m@ne to\@gtempa}%
+ \ifx\@gtempa\@empty
+ \else
+ \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+ \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+ \filename@parse\@gtempa
+ \edef\filename@ext{%
+ \ifx\filename@ext\relax#2\else\filename@ext\fi}%
+ \edef\reserved@a{%
+ \noexpand\InputIfFileExists
+ {\filename@area\filename@base.\filename@ext}%
+ {}%
+ {\noexpand\@missingfileerror
+ {\filename@area\filename@base}{\filename@ext}}}%
+ \reserved@a
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@obsoletefile}
+% For compatibility with \LaTeX~2.09 document styles, we distribute
+% files called |article.sty|, |book.sty|, |report.sty|,
+% |slides.sty| and |letter.sty|. These use the command
+% |\@obsoletefile|, which produces a warning message.
+% \changes{v0.9m}{1993/12/20}{Added this command, removed
+% @oldfilewarning}
+% \changes{v1.0f}{1994/05/02}{Make \cs{@onlypreamble}}
+% \begin{macrocode}
+\def\@obsoletefile#1#2{%
+ \@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}}
+\@onlypreamble\@obsoletefile
+% \end{macrocode}
+%
+% \subsection{Listing files}
+%
+% \begin{macro}{\@filelist}
+% A list of files input so far. The initial value of |\@gobble| eats
+% the comma before the first file name.
+% \begin{macrocode}
+\let\@filelist\@gobble
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addtofilelist}
+% Add to the list of files input so far.
+% \changes{LaTeX2e}{1994/03/13}
+% {Macro added}
+% \changes{LaTeX2e}{1995/10/01}
+% {Macro added}
+% This `real' definition is only used for `cfg' files during initex.
+% An initial definition of |\@gobble| has already been set.
+% \begin{macrocode}
+%\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\listfiles}
+% A preamble command to cause |\end{document}| to list files input
+% from the main file.
+% \changes{LaTeX2e}{1993/11/22}
+% {Removed checking for \cs{@unknownversion}}
+% \changes{LaTeX2e}{1994/01/17}
+% {New Version, adds `.tex' if needed, and lines up columns}
+% \changes{LaTeX2e}{1994/05/13}
+% {Stop \cs{listfiles} being run twice}
+% \changes{v1.0i}{1994/10/18}
+% {code moved here from ltclass}
+% \begin{macrocode}
+\def\listfiles{%
+ \let\listfiles\relax
+ \def\@listfiles##1##2##3##4##5##6##7##8##9\@@{%
+ \def\reserved@d{\\}%
+ \@tfor\reserved@c:=##1##2##3##4##5##6##7##8\do{%
+ \ifx\reserved@c\reserved@d
+ \edef\filename@area{ \filename@area}%
+ \fi}}%
+% \end{macrocode}
+%
+% \changes{v1.0o}{1994/11/30}
+% {Use \cs{@dofilelist}}
+% \begin{macrocode}
+ \def\@dofilelist{%
+ \typeout{^^J *File List*}%
+ \@for\@currname:=\@filelist\do{%
+ \filename@parse\@currname
+ \edef\reserved@a{%
+ \filename@base.%
+ \ifx\filename@ext\relax tex\else\filename@ext\fi}%
+ \expandafter\let\expandafter\reserved@b
+ \csname ver@\reserved@a\endcsname
+ \expandafter\expandafter\expandafter\@listfiles\expandafter
+ \filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
+ \typeout{%
+ \filename@area\reserved@a
+ \ifx\reserved@b\relax\else\@spaces\reserved@b\fi}}%
+ \typeout{ ***********^^J}}}
+% \end{macrocode}
+%
+% \changes{LaTeX2e}{1994/03/13}
+% {Reset \cs{@addtofilelist} at begin document}
+% \changes{LaTeX2e}{1994/03/16}
+% {Move this code directly into \cs{document}}
+% The |\@filelist| will be de-activated if |\listfiles| does not
+% appear in the preamble. |\begin{document}| contains code equivalent
+% to the following:
+%\begin{verbatim}
+% \AtBeginDocument{%
+% \ifx\@listfiles\@undefined
+% \let\@filelist\relax
+% \let\@addtofilelist\@gobble
+% \fi}
+%\end{verbatim}
+% \begin{macrocode}
+\@onlypreamble\listfiles
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@dofilelist}
+% \changes{v1.0o}{1994/11/30}
+% {Macro added}
+% \begin{macrocode}
+\let\@dofilelist\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfinal.dtx b/macros/latex-dev/base/ltfinal.dtx
new file mode 100644
index 0000000000..db98a9cb8f
--- /dev/null
+++ b/macros/latex-dev/base/ltfinal.dtx
@@ -0,0 +1,1119 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltfinal.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltfinal.dtx}
+ [2019/04/09 v2.1g LaTeX Kernel (Final Settings)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltfinal.dtx}
+\title{\filename}
+\date{\filedate}
+\author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{ltfinal.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Final settings}
+% This section contains the final settings for \LaTeX. It initialises
+% some debugging and typesetting parameters, sets the default
+% |\catcode|s and uc/lc codes, and inputs the hyphenation file.
+%
+% \StopEventually{}
+%
+% \changes{v0.1a}{1994/03/07}{Initial version, split from latex.dtx}
+% \changes{v0.1a}{1994/03/07}{Remove oldcomments environment}
+% \changes{v0.1c}{1994/04/21}{Added comments, set the catcodes of
+% 128--255.}
+% \changes{v0.1d}{1994/04/23}{Check that \cs{font@submax} is still zero}
+% \changes{v0.1e}{1994/05/02}{Set all the catcodes}
+% \changes{v0.1f}{1994/05/03}{Set the catcode of control-J to be
+% `other', for use in messages.}
+% \changes{v0.1g}{1994/05/05}{Added empty errhelp.}
+% \changes{v0.1h}{1994/05/13}{Added package ot1enc, and defined
+% \cs{@acci}, \cs{@accii} and \cs{@acciii}.}
+% \changes{v0.1j}{1994/05/18}{Corrected the lccode for d-bar.}
+% \changes{v0.1k}{1994/05/19}{Removed \cs{makeat...}}
+% \changes{v1.0n}{1994/05/31}{Renamed lthyphen.* to lthyphen.*.}
+% \changes{v1.0o}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0p}{1994/12/01}
+% {Renamed lthyphen.* to hyphen.*.}
+% \changes{v1.0r}{1995/06/05}
+% {Added \cs{MakeUppercase} and \cs{MakeLowercase}.}
+% \changes{v1.0s}{1995/06/06}
+% {Made \cs{MakeUppercase} and \cs{MakeLowercase} brace their
+% argument.}
+% \changes{v2.0r}{2016/10/15}{Require e\TeX{}}
+% \changes{v2.0s}{2016/10/15}{Tidy up status of char 127}
+%
+% \subsection{Debugging}
+%
+% By default, \LaTeX{} shows statistics:
+% \begin{macrocode}
+%<*2ekernel>
+\tracingstats1
+% \end{macrocode}
+%
+% \subsection{Typesetting parameters}
+%
+% \begin{macro}{\@lowpenalty}
+% \begin{macro}{\@medpenalty}
+% \begin{macro}{\@highpenalty}
+% These are penalties used internally.
+% \begin{macrocode}
+\newcount\@lowpenalty
+\newcount\@medpenalty
+\newcount\@highpenalty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%\begin{macro}{\newmarks}
+% \changes{v2.0a}{2014/12/30}{macro added}
+% \changes{v2.0b}{2015/01/23}{use reserved count 256}
+% \changes{v2.0g}{2015/06/19}{Use $-1$ for first range to get contiguous allocation}
+% Allocate extended marks types if etex is active.
+% Placed here at the end of the format
+% to increase compatibility with count allocations
+% in earlier releases.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\newmarks}{Extended Allocation}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\marks\@undefined\else
+\def\newmarks{%
+ \e@alloc\marks \e@alloc@chardef{\count256}\m@ne\e@alloc@top}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\newmarks}{Extended Allocation}%
+%<latexrelease>\let\newmarks\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\newXeTeXintercharclass}
+% \changes{v2.0a}{2014/12/30}{macro added}
+% \changes{v2.0b}{2015/01/23}{use reserved count 257}
+% \changes{v2.0f}{2015/04/28}{define \cs{xe@alloc@intercharclass} for compatibility with older xelatex initilisation}
+%\begin{macro}{\xe@alloc@intercharclass}
+%\begin{macro}{\e@alloc@intercharclass@top}
+% \changes{v2.0j}{2016/01/04}{Start allocation at one not three}
+% \changes{v2.0k}{2016/01/05}{Remove duplicated code}
+% Allocate |\XeTeXintercharclass| types if xetex is active.
+% previously defined in |xetex.ini|.
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\newXeTeXintercharclass}{Extended Allocation}%
+% \end{macrocode}
+%
+% Classes allocated 1 to 4094 (or 254 on older xetex)
+% (In earlier XeLaTeX versions 1, 2 and 3 were pre-set for CJK).
+% \changes{v2.0g}{2015/06/19}{Use $-1$ for first range to get contiguous allocation}
+% \changes{v2.0q}{2016/04/22}{XeTeX 0.99996 has 4096 char classes not 256}
+% \begin{macrocode}
+\ifx\XeTeXcharclass\@undefined
+\else
+% \end{macrocode}
+% \begin{macrocode}
+\ifdim\the\XeTeXversion\XeTeXrevision\p@>0.99993\p@
+ \chardef\e@alloc@intercharclass@top=4095
+\else
+ \chardef\e@alloc@intercharclass@top=255
+\fi
+% \end{macrocode}
+% \begin{macrocode}
+\def\newXeTeXintercharclass{%
+ \e@alloc\XeTeXcharclass
+ \chardef\xe@alloc@intercharclass\m@ne\e@alloc@intercharclass@top}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\newXeTeXintercharclass}{Extended Allocation}%
+%<latexrelease> \ifx\XeTeXcharclass\@undefined
+%<latexrelease> \else
+%<latexrelease> \def\xe@alloc@#1#2#3#4#5{\global\advance#1\@ne
+%<latexrelease> \xe@ch@ck#1#4#2%
+%<latexrelease> \allocationnumber#1%
+%<latexrelease> \global#3#5\allocationnumber
+%<latexrelease> \wlog{\string#5=\string#2\the\allocationnumber}}
+%<latexrelease> \def\xe@ch@ck#1#2#3{%
+%<latexrelease> \ifnum#1<#2\else
+%<latexrelease> \errmessage{No room for a new #3}%
+%<latexrelease> \fi}
+%<latexrelease> \def\newXeTeXintercharclass{%
+%<latexrelease> \xe@alloc@\xe@alloc@intercharclass
+%<latexrelease> \XeTeXcharclass\chardef\@cclv}
+%<latexrelease> \fi
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2016/02/01}%
+%<latexrelease> {\xe@alloc@intercharclass}{Start of XeTeX class allocator}%
+\ifx\XeTeXcharclass\@undefined
+\else
+ \countdef\xe@alloc@intercharclass=257
+ \xe@alloc@intercharclass=\z@
+\fi
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\xe@alloc@intercharclass}{Start of XeTeX class allocator}%
+%<latexrelease> \ifx\XeTeXcharclass\@undefined
+%<latexrelease> \else
+%<latexrelease> \xe@alloc@intercharclass=\thr@@
+%<latexrelease> \fi
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\xe@alloc@intercharclass}{Start of XeTeX class allocator}%
+%<latexrelease> \ifx\XeTeXcharclass\@undefined
+%<latexrelease> \else
+%<latexrelease> \newcount\xe@alloc@intercharclass
+%<latexrelease> \xe@alloc@intercharclass=\thr@@
+%<latexrelease> \fi
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% The default values of the picture and |\fbox| parameters:
+% \begin{macrocode}
+\unitlength = 1pt
+\fboxsep = 3pt
+\fboxrule = .4pt
+% \end{macrocode}
+% The saved value of \TeX's |\maxdepth|:
+% \begin{macrocode}
+\@maxdepth = \maxdepth
+% \end{macrocode}
+% |\vsize| initialized because a |\clearpage| with |\vsize < \topskip|
+% causes trouble.
+% |\@colroom| and |\@colht| also initialized because |\vsize| may be
+% set to them if a |\clearpage| is done before the |\begin{document}|
+%
+% \begin{macrocode}
+\vsize = 1000pt
+\@colroom = \vsize
+\@colht = \vsize
+% \end{macrocode}
+% Initialise |\textheight| |\textwidth| and page style, to avoid
+% internal errors if they are not set by the class.
+% \changes{v0.1b}{1994/04/18}
+% {Initialise \cs{textheight}, \cs{textwidth} and page style}
+% \begin{macrocode}
+\textheight=.5\maxdimen
+\textwidth=\textheight
+\ps@empty
+% \end{macrocode}
+%
+% \subsection{Lccodes for hyphenation}
+%
+% \changes{v2.0a}{2015/01/03}{Unicode data loading added}
+% \changes{v2.0c}{2015/01/24}{Skip T1-code entirely with Unicode engines}
+% \changes{v2.0d}{2015/03/26}{Use renamed
+% \texttt{unicode-letters.def}}
+% \changes{v2.0i}{2015/12/10}{Use new common Unicode data loaders}
+% \changes{v2.0j}{2016/01/04}{Do not set up inter character classes for
+% XeTeX}
+% \changes{v2.0l}{2016/01/05}{Correct \textsf{latexrelease} guards}
+% \changes{v2.0l}{2016/01/05}{Ensure old definitions for inter-character
+% class toks are available using \textsf{latexrelease}}
+% \changes{v2.0m}{2016/01/05}{Undefine XeTeX classes when using patching
+% an older kernel}
+% \changes{v2.0l}{2016/01/05}{Missing brace}
+% \changes{v2.0p}{2016/01/05}{Only apply XeTeX change if XeTeX is in use}
+% For $7$- and $8$-bit engines the assumption of T1 encodings is the
+% basis for the hyphenation patterns. That's not the case for the Unicode
+% engines, where the assumption is engine-native working. The common
+% loader system provides access to data from the Unicode Consortium
+% covering not only |\lccode| but also other related data. The
+% |\lccode| part of that at least needs to be loaded before hyphenation is
+% tackled: Xe\TeX{} follows the standard \TeX{} route of building patterns
+% into the format. Lua\TeX{} doesn't require this data be loaded \emph{here}
+% but it does need to be loaded somewhere. Rather than test for the Unicode
+% engines by name, the approach here is to look for the extended math mode
+% handling both provide: any other engine developed in this area will
+% presumably also provide |\Umathcode|.
+% \begin{macrocode}
+\ifnum 0%
+ \ifx\Umathcode\@undefined\else 1\fi
+ \ifx\XeTeXmathcode\@undefined\else 1\fi
+ >\z@
+ \message{ Unicode character data,}
+ \input{load-unicode-data}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2016/02/01}%
+%<latexrelease> {\XeTeXintercharclasses}{XeTeX character classes}%
+%<latexrelease> \ifx\XeTeXinterchartoks\undefined
+%<latexrelease> \else
+%<latexrelease> \begingroup
+%<latexrelease> \chardef\XeTeXcharclassID = 0 %
+%<latexrelease> \chardef\XeTeXcharclassOP = 0 %
+%<latexrelease> \chardef\XeTeXcharclassCL = 0 %
+%<latexrelease> \chardef\XeTeXcharclassEX = 0 %
+%<latexrelease> \chardef\XeTeXcharclassIS = 0 %
+%<latexrelease> \chardef\XeTeXcharclassNS = 0 %
+%<latexrelease> \chardef\XeTeXcharclassCM = 0 %
+%<latexrelease> \input{load-unicode-xetex-classes}
+%<latexrelease> \endgroup
+%<latexrelease> \global\let\xtxHanGlue\undefined
+%<latexrelease> \global\let\xtxHanSpace\undefined
+%<latexrelease> \global\XeTeXinterchartoks 0 1 = {}
+%<latexrelease> \global\XeTeXinterchartoks 0 2 = {}
+%<latexrelease> \global\XeTeXinterchartoks 0 3 = {}
+%<latexrelease> \global\XeTeXinterchartoks 1 0 = {}
+%<latexrelease> \global\XeTeXinterchartoks 2 0 = {}
+%<latexrelease> \global\XeTeXinterchartoks 3 0 = {}
+%<latexrelease> \global\XeTeXinterchartoks 1 1 = {}
+%<latexrelease> \global\XeTeXinterchartoks 1 2 = {}
+%<latexrelease> \global\XeTeXinterchartoks 1 3 = {}
+%<latexrelease> \global\XeTeXinterchartoks 2 1 = {}
+%<latexrelease> \global\XeTeXinterchartoks 2 2 = {}
+%<latexrelease> \global\XeTeXinterchartoks 2 3 = {}
+%<latexrelease> \global\XeTeXinterchartoks 3 1 = {}
+%<latexrelease> \global\XeTeXinterchartoks 3 2 = {}
+%<latexrelease> \global\XeTeXinterchartoks 3 3 = {}
+%<latexrelease> \fi
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\XeTeXintercharclasses}{XeTeX character classes}%
+%<latexrelease> \ifx\XeTeXinterchartoks\undefined
+%<latexrelease> \else
+%<latexrelease> \input{load-unicode-xetex-classes}
+%<latexrelease> \gdef\xtxHanGlue{\hskip0pt plus 0.1em\relax}
+%<latexrelease> \gdef\xtxHanSpace{\hskip0.2em plus 0.2em minus 0.1em\relax}
+%<latexrelease> \global\XeTeXinterchartoks 0 1 = {\xtxHanSpace}
+%<latexrelease> \global\XeTeXinterchartoks 0 2 = {\xtxHanSpace}
+%<latexrelease> \global\XeTeXinterchartoks 0 3 = {\nobreak\xtxHanSpace}
+%<latexrelease> \global\XeTeXinterchartoks 1 0 = {\xtxHanSpace}
+%<latexrelease> \global\XeTeXinterchartoks 2 0 = {\nobreak\xtxHanSpace}
+%<latexrelease> \global\XeTeXinterchartoks 3 0 = {\xtxHanSpace}
+%<latexrelease> \global\XeTeXinterchartoks 1 1 = {\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 1 2 = {\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 1 3 = {\nobreak\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 2 1 = {\nobreak\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 2 2 = {\nobreak\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 2 3 = {\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 3 1 = {\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 3 2 = {\xtxHanGlue}
+%<latexrelease> \global\XeTeXinterchartoks 3 3 = {\nobreak\xtxHanGlue}
+%<latexrelease> \fi
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \changes{v2.0d}{2015/02/03}{Set \cs{lccode} for \texttt{-} with Unicode
+% engines}
+% There is one over-ride that makes sense here (see below for the same for
+% $8$-bit engines): setting the lccode for |-| to itself.
+% \begin{macrocode}
+ \lccode`\- =`\- % default hyphen char
+% \end{macrocode}
+% The alternative is that a ``traditional'' engine is in use.
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% \changes{v1.1b}{1998/05/20}{Set up lccodes before loading
+% hyphenation files: pr/2639}
+% We set things up so that hyphenation files can assume that the
+% default (T1) lccodes are in use (at present this also sets up the
+% uccodes).
+% We temporarily define |\reserved@a| to apply |\reserved@c| to
+% all the numbers in the range of its arguments.
+% \begin{macrocode}
+\def\reserved@a#1#2{%
+ \@tempcnta#1\relax
+ \@tempcntb#2\relax
+ \reserved@b
+}
+\def\reserved@b{%
+ \ifnum\@tempcnta>\@tempcntb\else
+ \reserved@c\@tempcnta
+ \advance\@tempcnta\@ne
+ \expandafter\reserved@b
+ \fi
+}
+% \end{macrocode}
+% Depending on the \TeX{} version, we might not be allowed to do
+% this for non-ASCII characters.
+% \changes{v1.0n}{1994/06/09}{For \TeX2, do not set codes for higher
+% half of character table.}
+% \begin{macrocode}
+\def\reserved@c#1{%
+ \count@=#1\advance\count@ by -"20
+ \uccode#1=\count@
+ \lccode#1=#1
+}
+\reserved@a{`\a}{`\z}
+\reserved@a{"A0}{"BC}
+\reserved@a{"E0}{"FF}
+% \end{macrocode}
+% The upper case characters need their |\uccode| and |\lccode| values
+% set, and their |\sfcode| set to 999.
+% \begin{macrocode}
+\def\reserved@c#1{%
+ \count@=#1\advance\count@ by "20
+ \uccode#1=#1
+ \lccode#1=\count@
+ \sfcode#1=999
+}
+\reserved@a{`\A}{`\Z}
+\reserved@a{"80}{"9C}
+\reserved@a{"C0}{"DF}
+% \end{macrocode}
+% Well, it would be nice if that were correct, but unfortunately, the
+% Cork encoding contains some odd slots whose uccode or lccode isn't
+% quite what you'd expect.
+% \begin{macrocode}
+\uccode`\^^Y=`\I % dotless i
+\lccode`\^^Y=`\^^Y % dotless i
+\uccode`\^^Z=`\J % dotless j, ae in OT1
+\lccode`\^^Z=`\^^Z % dotless j, ae in OT1
+\lccode`\^^9d=`\i % dotted I
+\uccode`\^^9d=`\^^9d % dotted I
+\lccode`\^^9e=`\^^9e % d-bar
+\uccode`\^^9e=`\^^d0 % d-bar
+% \end{macrocode}
+% Finally here is one that helps hyphenation in the OT1 encoding.
+% \changes{v1.0z}{1996/10/31}
+% {Added extra \cs{lcode}, hoping it does no harm in T1 (pr/1969)}
+% \begin{macrocode}
+\lccode`\^^[=`\^^[ % oe in OT1
+% \end{macrocode}
+%
+% And we also set the |\lccode| of |\-| and |\textcompwordmark| so
+% that they do not prevent hyphenation in the remainder of the word
+% (as suggested by Lars Helstr\"om).
+% \changes{v1.1e}{2003/10/13}
+% {Added extra \cs{lccode} for \cs{-} and \cs{textcompwordmark}}
+% \begin{macrocode}
+\lccode`\- =`\- % default hyphen char
+\lccode 127=127 % alternate hyphen char
+\lccode 23 =23 % textcompwordmark in T1
+% \end{macrocode}
+%
+% End of the conditional to select either Unicode or T1 encoding defaults.
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% This is as good a place as any to active a few Xe\TeX{}-specific
+% settings
+% \begin{macrocode}
+\ifx\XeTeXuseglyphmetrics\@undefined
+\else
+ \XeTeXuseglyphmetrics=1 %
+ \XeTeXdashbreakstate=1 %
+\fi
+% \end{macrocode}
+%
+% \subsection{Hyphenation}
+%
+% \changes{v0.1a}{1994/03/07}{move code here from lhyphen.dtx}
+% \changes{v0.1a}{1994/03/07}
+% {use \cs{InputIfFileExists} not \cs{IfFileExists}}
+% \changes{v1.0x}{1995/11/01}
+% {(DPC) Switch meaning of \cs{@addtofilelist} for cfg files}%
+% The following code will be compiled into the format file. It checks
+% for the existence of \texttt{hyphen.cfg} in inputs that file if
+% found. Otherwise it inputs \texttt{hyphen.ltx}. Note that these
+% are loaded in \emph{before} the |\catcode|s are set, so local
+% hyphenation files can use 8-bit input.
+%
+% We try to load the customized hyphenation description file.
+% \begin{macrocode}
+\InputIfFileExists{hyphen.cfg}
+ {\typeout{===========================================^^J%
+ Local configuration file hyphen.cfg used^^J%
+ ===========================================}%
+ \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%
+ }
+ {\input{hyphen.ltx}}
+\let\@addtofilelist\@gobble
+% \end{macrocode}
+%
+% \begin{macro}{\l@nohyphenation}
+% \changes{v2.0t}{2017/03/09}{ensure \cs{l@nohyphenation} is defined.}
+% \begin{macrocode}
+\ifx\l@nohyphenation \@undefined
+ \newlanguage\l@nohyphenation
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\document@default@language}
+% Default document language. -1 acts as language 0, but used as a flag in |\document|
+% to see if it has been set in the preamble.
+% \changes{v2.1f}{2018/08/24}{Add to latexrelease (github/68)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2017/04/15}%
+%<latexrelease> {\document@default@language}{Save language for hyphenation}%
+\let\document@default@language\m@ne
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\document@default@language}{Save language for hyphenation}%
+%<latexrelease>\let\document@default@language\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Font loading}
+% Fonts loaded during the formatting process might already have
+% changed the |\font@submax| from |0pt| to something higher.
+% If so, we put out a bold warning.
+% \changes{v0.1l}{1994/05/20}{Use new font warning commands}
+% \changes{v1.1c}{2000/08/23}{Fix typo in warning}
+% \begin{macrocode}
+\ifdim \font@submax >\z@
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\MessageBreak
+ \MessageBreak
+ Please check the transcript file
+ carefully\MessageBreak
+ and redo the format generation if necessary!
+ \@gobbletwo}%
+ \errhelp{Only stopped, to give you time to
+ read the above message.}
+ \errmessage{}
+% \end{macrocode}
+% We reset the macro. Otherwise every user will get a warning on
+% every job.
+% \begin{macrocode}
+\def\font@submax{0pt}
+\fi
+% \end{macrocode}
+%
+% \subsection{Input encoding}
+%
+% \changes{v2.1a}{2018/03/25}{default to UTF-8}
+% Starting with the 2018 \LaTeX\ release default the inputencoding
+% to UTF-8. Unless the format is being used with luatex, xetex, enctex or mltex.
+%
+% This is done in a way largely compatible with older releases: |utf8.def| is input just as if\\
+% |\usepackage[utf8]{inputenc}|\\
+% had been used, however rather than input the whole package a minimal core part just enough to support
+% loading the UTF-8 encoding files is defined here.
+%
+% If a document re-specifies UTF-8 this is silently ignored.
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% Check that a classic 8-bit tex engine is being used (LaTeX or PDFLaTeX).
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2018/04/01}%
+%<latexrelease> {\UTFviii@invalid}{UTF-8 default}%
+% \end{macrocode}
+%
+%
+% Skip this section in Unicode TeX, or if MLTeX and EncTeX are enabled.
+% \begin{macrocode}
+\ifnum0%
+ \ifx\Umathchar\@undefined\else 1\fi
+ \ifx\mubyte\@undefined\else 1\fi
+ \ifx\charsubdef\@undefined\else 1\fi
+ =\z@
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\saved@space@catcode{10}
+\let\@inpenc@test\relax
+\def\IeC{%
+ \ifx\protect\@typeset@protect
+ \expandafter\@firstofone
+ \else
+ \noexpand\IeC
+ \fi
+}
+% \end{macrocode}
+%
+% Make characters active for UTF-8 input formats
+% \begin{macrocode}
+\@tempcnta=1
+\loop
+ \catcode\@tempcnta=13 %
+ \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32 %
+\repeat %
+\catcode0=15 % null
+\catcode9=10 % tab
+\catcode10=12 % ctrl J
+\catcode12=13 % ctrl L
+\catcode13=5 % newline
+\@tempcnta=128
+\loop
+ \catcode\@tempcnta=13
+ \advance\@tempcnta\@ne
+\ifnum\@tempcnta<256
+\repeat
+% \end{macrocode}
+%
+% \begin{macro}{\UseRawInputEncoding}
+% \changes{v2.1a}{2018/03/25}{Macro added}
+% Reset 8 bit characters to catcode 12 so the input endcoing matches the ``Raw''
+% font encoding.
+% Useful for special behaviours, or for compatibility with older \LaTeX\ formats.
+% \changes{v2.1b}{2018/04/06}{Undo changes to \cs{DeclareFontEncoding@} and
+% definition of \cs{DeclareUnicodeCharacter}}
+% \changes{v2.1c}{2018/04/07}{Undefine \cs{inputencodingname}}
+% \begin{macrocode}
+\def\UseRawInputEncoding{%
+\let\inputencodingname\@undefined % revert
+\let\DeclareFontEncoding@\DeclareFontEncoding@saved % revert
+\let\DeclareUnicodeCharacter\@undefined % revert
+\@tempcnta=1
+\loop
+ \catcode\@tempcnta=15 %
+ \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32 %
+\repeat %
+\catcode0=15 % null
+\catcode9=10 % tab
+\catcode10=12 % ctrl J
+\catcode12=13 % ctrl L
+\catcode13=5 % newline
+\@tempcnta=128
+\loop
+ \catcode\@tempcnta=12
+ \advance\@tempcnta\@ne
+\ifnum\@tempcnta<256
+\repeat
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFontEncoding@saved}
+% Saved version of |\DeclareFontEncoding@| before \texttt{utf8.def}
+% modifies it for use in |\UseRawInputEncoding| above.
+% \begin{macrocode}
+\let\DeclareFontEncoding@saved\DeclareFontEncoding@
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.1d}{2018/04/08}{Delay full UTF-8 handling to \cs{everyjob}}
+% \changes{v2.18}{2018/05/11}{Make invalid UTF-8 also safe, for legacy filesystem encodings}
+% \begin{macrocode}
+\edef\inputencodingname{utf8}%
+\input{utf8.def}
+\let\UTFviii@undefined@err@@\UTFviii@undefined@err
+\let\UTFviii@invalid@err@@\UTFviii@invalid@err
+\let\UTFviii@two@octets@@\UTFviii@two@octets
+\let\UTFviii@three@octets@@\UTFviii@three@octets
+\let\UTFviii@four@octets@@\UTFviii@four@octets
+%<2ekernel>\def\UTFviii@undefined@err#1{\@gobble#1}%
+%<2ekernel>\let\UTFviii@invalid@err\string
+%<2ekernel>\let\UTFviii@two@octets\string
+%<2ekernel>\let\UTFviii@three@octets\string
+%<2ekernel>\let\UTFviii@four@octets\string
+%<2ekernel>\everyjob\expandafter{\the\everyjob
+%<2ekernel>\let\UTFviii@undefined@err\UTFviii@undefined@err@@
+%<2ekernel>\let\UTFviii@invalid@err\UTFviii@invalid@err@@
+%<2ekernel>\let\UTFviii@two@octets\UTFviii@two@octets@@
+%<2ekernel>\let\UTFviii@three@octets\UTFviii@three@octets@@
+%<2ekernel>\let\UTFviii@four@octets\UTFviii@four@octets@@
+%<2ekernel>}
+\let\@inpenc@test\@undefined
+\let\saved@space@catcode\@undefined
+% \end{macrocode}
+%
+% For formats not set up for UTF-8 default, set the C0 controls to catcode 15.
+% \begin{macrocode}
+\else
+\@tempcnta=0
+\loop
+ \catcode\@tempcnta=15 %
+ \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32 %
+\repeat %
+\catcode0=15 % null
+\catcode9=10 % tab
+\catcode10=12 % ctrl J
+\catcode12=13 % ctrl L
+\catcode13=5 % newline
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\UseRawInputEncoding\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\UTFviii@invalid}{UTF-8 default}%
+% \end{macrocode}
+%
+% The first block of commands got only introduced in 2019 but we
+% revert all of Unicode support in one go not jump to the
+% intermediate version.
+% \begin{macrocode}
+%<latexrelease> \let\UTFviii@two@octets@combine\@undefined
+%<latexrelease> \let\UTFviii@three@octets@combine\@undefined
+%<latexrelease> \let\UTFviii@four@octets@combine\@undefined
+%<latexrelease> \let\UTFviii@two@octets@string\@undefined
+%<latexrelease> \let\UTFviii@three@octets@string\@undefined
+%<latexrelease> \let\UTFviii@four@octets@string\@undefined
+%<latexrelease> \let\UTFviii@two@octets@noexpand\@undefined
+%<latexrelease> \let\UTFviii@three@octets@noexpand\@undefined
+%<latexrelease> \let\UTFviii@four@octets@noexpand\@undefined
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\@tempcnta=0
+%<latexrelease>\loop
+%<latexrelease> \catcode\@tempcnta=15
+%<latexrelease> \advance\@tempcnta\@ne
+%<latexrelease>\ifnum\@tempcnta<32
+%<latexrelease>\repeat %
+%<latexrelease>\catcode9=10 % tab
+%<latexrelease>\catcode10=12 % ctrl J
+%<latexrelease>\catcode12=13 % ctrl L
+%<latexrelease>\catcode13=5 % newline
+%<latexrelease>\@tempcnta=128
+%<latexrelease>\loop
+%<latexrelease>\catcode\@tempcnta=12
+%<latexrelease>\advance\@tempcnta\@ne
+%<latexrelease>\ifnum\@tempcnta<256
+%<latexrelease>\repeat
+%<latexrelease>\let\IeC\@undefined
+%<latexrelease>\def\DeclareFontEncoding@#1#2#3{%
+%<latexrelease> \expandafter
+%<latexrelease> \ifx\csname T@#1\endcsname\relax
+%<latexrelease> \def\cdp@elt{\noexpand\cdp@elt}%
+%<latexrelease> \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
+%<latexrelease> {\default@family}{\default@series}%
+%<latexrelease> {\default@shape}}%
+%<latexrelease> \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
+%<latexrelease> \else
+%<latexrelease> \@font@info{Redeclaring font encoding #1}%
+%<latexrelease> \fi
+%<latexrelease> \global\@namedef{T@#1}{#2}%
+%<latexrelease> \global\@namedef{M@#1}{\default@M#3}%
+%<latexrelease> \xdef\LastDeclaredEncoding{#1}%
+%<latexrelease> }
+%<latexrelease> \let\UseRawInputEncoding\@undefined
+%<latexrelease> \let\DeclareFontEncoding@saved\@undefined
+%<latexrelease> \let\inputencodingname\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \begin{macrocode}
+%
+% We temporarily define |\reserved@a| to apply |\reserved@c| to all the
+% numbers in the range of its arguments.
+% \begin{macrocode}
+\def\reserved@a#1#2{%
+ \@tempcnta#1\relax
+ \@tempcntb#2\relax
+ \reserved@b
+}
+\def\reserved@b{%
+ \ifnum\@tempcnta>\@tempcntb\else
+ \reserved@c\@tempcnta
+ \advance\@tempcnta\@ne
+ \expandafter\reserved@b
+ \fi
+}
+% \end{macrocode}
+% \changes{v0.1e}{1994/05/02}{Added setting the special catcodes.}
+% \changes{v0.1f}{1994/05/02}{Set the catcode of control-J.}
+% Set the special catcodes (although some of these are useless, since an
+% error will have occurred if the catcodes have changed). Note that
+% |^^J| has catcode `other' for use in warning messages.
+% \begin{macrocode}
+\catcode`\ =10
+\catcode`\#=6
+\catcode`\$=3
+\catcode`\%=14
+\catcode`\&=4
+\catcode`\\=0
+\catcode`\^=7
+\catcode`\_=8
+\catcode`\{=1
+\catcode`\}=2
+\catcode`\~=13
+\catcode`\@=11
+\catcode`\^^I=10
+\catcode`\^^J=12
+\catcode`\^^L=13
+\catcode`\^^M=5
+% \end{macrocode}
+% \changes{v0.1e}{1994/05/02}{Added setting the `other' catcodes.}
+% Set the `other' catcodes.
+% \begin{macrocode}
+\def\reserved@c#1{\catcode#1=12\relax}
+\reserved@c{`\!}
+\reserved@c{`\"}
+\reserved@a{`\'}{`\?}
+\reserved@c{`\[}
+\reserved@c{`\]}
+\reserved@c{`\`}
+\reserved@c{`\|}
+% \end{macrocode}
+% \changes{v0.1e}{1994/05/02}{Added setting the `letter' catcodes.}
+% Set the `letter' catcodes.
+% \begin{macrocode}
+\def\reserved@c#1{\catcode#1=11\relax}
+\reserved@a{`\A}{`\Z}
+\reserved@a{`\a}{`\z}
+% \end{macrocode}
+% \changes{v0.1e}{1994/05/02}{Made slot 127 illegal}
+% \changes{v1.0n}{1994/11/18}
+% {re-allow slots 127--255}
+% All the characters in the range 0--31 and 127--255 are illegal,
+% \emph{except} tab (|^^I|), nl (|^^J|), ff (|^^L|) and cr (|^^M|).
+%
+%
+% \subsection{Lccodes and uccodes}
+%
+% \changes{v1.1b}{1998/05/20}{Set up uc/lccodes after loading
+% hyphenation files: pr/2639}
+% We now again set up the default (T1) uc/lccodes.
+% The lower case characters need their |\uccode| and |\lccode| values
+% set. Some of this is a repeat of the set-up before loading
+% hyphenation files.
+% Depending on the \TeX{} version, we might not be allowed to do
+% this for non-ASCII characters.
+% \changes{v1.0n}{1994/06/09}{For \TeX2, do not set codes for higher
+% half of character table.}
+% \changes{v2.0a}{2015/01/03}{Skip resetting codes with Unicode engines}
+% For the Unicode engines (Xe\TeX{} and Lua\TeX{}) there is no need to
+% do any of this: they use hyphenation data which does not alter any
+% of the set up and so this entire block is skipped.
+% \begin{macrocode}
+\ifnum 0%
+ \ifx\Umathcode\@undefined\else 1\fi
+ \ifx\XeTeXmathcode\@undefined\else 1\fi
+ >\z@
+\else
+\def\reserved@c#1{%
+ \count@=#1\advance\count@ by -"20
+ \uccode#1=\count@
+ \lccode#1=#1
+}
+\reserved@a{`\a}{`\z}
+\reserved@a{"A0}{"BC}
+\reserved@a{"E0}{"FF}
+% \end{macrocode}
+% The upper case characters need their |\uccode| and |\lccode| values
+% set, and their |\sfcode| set to 999.
+% \begin{macrocode}
+\def\reserved@c#1{%
+ \count@=#1\advance\count@ by "20
+ \uccode#1=#1
+ \lccode#1=\count@
+ \sfcode#1=999
+}
+\reserved@a{`\A}{`\Z}
+\reserved@a{"80}{"9C}
+\reserved@a{"C0}{"DF}
+% \end{macrocode}
+% Well, it would be nice if that were correct, but unfortunately, the
+% Cork encoding contains some odd slots whose uccode or lccode isn't
+% quite what you'd expect.
+% \begin{macrocode}
+\uccode`\^^Y=`\I % dotless i
+\lccode`\^^Y=`\^^Y % dotless i
+\uccode`\^^Z=`\J % dotless j, ae in OT1
+\lccode`\^^Z=`\^^Z % dotless j, ae in OT1
+\lccode`\^^9d=`\i % dotted I
+\uccode`\^^9d=`\^^9d % dotted I
+\lccode`\^^9e=`\^^9e % d-bar
+\uccode`\^^9e=`\^^d0 % d-bar
+% \end{macrocode}
+% Finally here is one that helps hyphenation in the OT1 encoding.
+% \changes{v1.0z}{1996/10/31}
+% {Added extra \cs{lcode}, hoping it does no harm in T1 (pr/1969)}
+% \begin{macrocode}
+\lccode`\^^[=`\^^[ % oe in OT1
+\fi % End of reset block for 8-bit engines
+% \end{macrocode}
+%
+% \begin{macro}{\MakeUppercase}
+% \begin{macro}{\MakeUppercase}
+% \begin{macro}{\@uclclist}
+%
+% \changes{v1.1a}{1997/10/20}{Removed \cs{aa} and \cs{AA} from
+% \cs{@uclclist} as these are macros.}
+%
+% And whilst we're doing things with uc/lc tables, here are two
+% commands to upper- and lower-case a string.
+%
+% \emph{Note} that this implementation is subject to change! At
+% the moment we're not providing any way to extend the list of
+% uc/lc commands, since finding a good interface is difficult.
+% These commands have some nasty features, such as uppercasing
+% mathematics, environment names, labels, etc. A much better
+% long-term solution is to use all-caps fonts, but these aren't
+% generally available.
+% \begin{macrocode}
+\DeclareRobustCommand{\MakeUppercase}[1]{{%
+ \def\i{I}\def\j{J}%
+ \def\reserved@a##1##2{\let##1##2\reserved@a}%
+ \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
+ \protected@edef\reserved@a{\uppercase{#1}}%
+ \reserved@a
+ }}
+\DeclareRobustCommand{\MakeLowercase}[1]{{%
+ \def\reserved@a##1##2{\let##2##1\reserved@a}%
+ \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
+ \protected@edef\reserved@a{\lowercase{#1}}%
+ \reserved@a
+ }}
+\def\@uclclist{\oe\OE\o\O\ae\AE
+ \dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH}
+% \end{macrocode}
+% The above code works, but has the nasty side-effect that if you
+% say something like:
+%\begin{verbatim}
+% \markboth{\MakeUppercase\contentsname}
+% {\MakeUppercase\contentsname}
+%\end{verbatim}
+% then the uppercasing is only done to the first letter of the
+% contents name, since the mark expands out to:
+%\begin{verbatim}
+% \mark{\protect\MakeUppercase Table of Contents}
+% {\protect\MakeUppercase Table of Contents}
+%\end{verbatim}
+% In order to get round this, we redefine |\MakeUppercase| and
+% |\MakeLowercase| to grab their argument and brace it. This is a
+% very low-level hack, and is \emph{not} recommended practice!
+% This is an instance of a general problem that makes it unsafe to
+% grab arguments unbraced, and probably needs a more general
+% solution. For the moment though, this hack will do:
+% \begin{macrocode}
+\protected@edef\MakeUppercase#1{\MakeUppercase{#1}}
+\protected@edef\MakeLowercase#1{\MakeLowercase{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.0h}{1994/05/13}{Added output enc stuff}
+% \changes{v1.0i}{1994/05/16}{moved output enc stuff to lfonts}
+%
+% \changes{v0.1a}{1994/03/07}{Add code from the old dump.dtx}
+%
+% \subsection{Applying Patch files}
+% Between major releases, small patches will be distributed in
+% files |ltpatch.ltx| which must be added at this point.
+% \changes{v1.0m}{1994/06/08}{Add patch file system}
+% \changes{v2.0h}{2015/06/23}
+% {set \cs{patch@level} in ltvers rather than in ltfinal/ltpatch}
+%
+% Patch file code removed.
+% \begin{macrocode}
+%\IfFileExists{ltpatch.ltx}
+% {\typeout{=================================^^J%
+% Applying patch file ltpatch.ltx^^J%
+% =================================}
+% \def\fmtversion@topatch{unknown}
+% \input{ltpatch.ltx}
+% \ifx\fmtversion\fmtversion@topatch
+% \ifx\patch@level\@undefined
+% \typeout{^^J^^J^^J%
+% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
+% !! Patch file `ltpatch.ltx' not suitable for this^^J%
+% !! version of LaTeX.^^J^^J%
+% !! Please check if initex found an old patch file:^^J%
+% !! --- if so, rename it or delete it, and redo the^^J%
+% !! initex run.^^J%
+% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
+% \batchmode \@@end
+% \else
+% \end{macrocode}
+% \changes{v1.0q}{1995/04/21}
+% {Allow initial patch level 0}
+% \changes{v1.0t}{1995/06/13}
+% {Add patch level string more carefully}
+% The code below adds the `patch level' string to the first |\typeout|
+% in the startup banner.
+% \begin{macrocode}
+% \def\fmtversion@topatch{0}%
+% \ifx\fmtversion@topatch\patch@level\else
+% \def\reserved@a\typeout##1##2\reserved@a{%
+% \typeout{##1 patch level \patch@level}##2}
+% \everyjob\expandafter\expandafter\expandafter{%
+% \expandafter\reserved@a\the\everyjob\reserved@a}
+% \let\reserved@a\relax
+% \the\everyjob
+% \fi
+% \fi
+% \else
+% \typeout{^^J^^J^^J%
+% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
+% !! Patch file `ltpatch.ltx' (for version <\fmtversion@topatch>)^^J%
+% !! is not suitable for version <\fmtversion> of LaTeX.^^J^^J%
+% !! Please check if initex found an old patch file:^^J%
+% !! --- if so, rename it or delete it, and redo the^^J%
+% !! initex run.^^J%
+% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
+% \batchmode \@@end
+% \fi
+% \let\fmtversion@topatch\relax
+% }{}
+% \end{macrocode}
+%
+% \subsection{Freeing Memory}
+%
+% \begin{macro}{\reserved@a}
+% \begin{macro}{\reserved@b}
+% \changes{v1.0v}{1995/10/17}{reset here after the \cs{input} above}
+% And just to make sure nobody relies on those definitions of
+% |\reserved@b| and friends.
+% These macros are reserved for use in the kernel. \emph{Do not use
+% them as general scratch macros}.
+% \begin{macrocode}
+\let\reserved@a\@filelist
+\let\reserved@b=\@undefined
+\let\reserved@c=\@undefined
+\let\reserved@d=\@undefined
+\let\reserved@e=\@undefined
+\let\reserved@f=\@undefined
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\toks}
+% \changes{v1.0y}{1996/07/10}
+% {Free up memory from scratch registers /2213}
+% \begin{macrocode}
+\toks0{}
+\toks2{}
+\toks4{}
+\toks6{}
+\toks8{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\errhelp}
+% \changes{v0.1g}{1994/05/05}{Set error help empty.}
+% \changes{v1.1d}{2000/09/01}{Set error help empty at very end
+% (pr/449 done correctly).}
+% Empty the error help message, which may have some rubbish:
+% \begin{macrocode}
+\errhelp{}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Initialise file list}
+%
+% \begin{macro}{\@providesfile}
+% \changes{v1.0v}{1995/10/17}{reset macro}
+% Initialise for use in the document. During initex a modified version
+% has been used which leaves debugging information for |latexbug.tex|.
+% \begin{macrocode}
+\def\@providesfile#1[#2]{%
+ \wlog{File: #1 #2}%
+ \expandafter\xdef\csname ver@#1\endcsname{#2}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@filelist}
+% \changes{v1.0w}{1995/10/19}{Move after \cs{reserved@a} setting:-)}
+% \begin{macro}{\@addtofilelist}
+% Reset |\@filelist| so files input while making the format are not
+% listed. The list built up so far may take up a lot of memory and so
+% it is moved to |\reserved@a| where it will be overwritten as soon
+% as almost any \LaTeX\ command is issued in a class file.
+% However the |latexbug.tex| program will be able to access this
+% information and insert it into a bug report.
+% \begin{macrocode}
+\let\@filelist\@gobble
+\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Dumping the format}
+% Finally we make |@| into a letter, ensure the format will
+% be in the `normal' error mode, and dump everything into the
+% format file.
+% \changes{v1.0t}{1995/06/13}
+% {Call \cs{errorstopmode}}
+% \begin{macrocode}
+\makeatother
+\errorstopmode
+\dump
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfloat.dtx b/macros/latex-dev/base/ltfloat.dtx
new file mode 100644
index 0000000000..ac1e37688e
--- /dev/null
+++ b/macros/latex-dev/base/ltfloat.dtx
@@ -0,0 +1,1517 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltfloat.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltfloat.dtx}[2015/02/21 v1.2c LaTeX Kernel (Floats)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltfloat.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Floats}
+%
+% The different types of floats are identified by a \meta{type} name,
+% which is the name of the counter for that kind of float. For
+% example, figures are of type `figure' and tables are of type `table'.
+% Each \meta{type} has associated a positive \meta{type number}, which
+% is a power of two. E.g.,\\
+% figures might be have type number~1, tables type number~2, programs
+% type number~4, etc.
+%
+% The locations where a float can go are specified by a
+% \meta{placement specifier}, which is a list of the possible
+% locations, each denoted by a letter as follows:
+% \begin{center}
+% \begin{tabular}{l@{ : }l@{ --- }l}
+% h & here & at the current location in the text.\\
+% t & top & at the top of a text page.\\
+% b & bottom & at the bottom of a text page.\\
+% p & page & on a separate float page
+% \end{tabular}
+% \end{center}
+% In addition, in conjunction with these, you can use `!' which means
+% that the current values of the float positioning parameters are
+% ignored for this float. (Has no effect on `p', float page
+% positioning.)
+% For example, `pht' specifies that the float can appear in any of
+% three locations: page, here or top.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/04}{Initial version, split from latex.dtx}
+% \changes{v1.0b}{1994/03/28}{Split further from ltherest.dtx}
+% \changes{v1.0e}{1994/04/25}{Changed warning messages}
+% \changes{v1.0e}{1994/04/25}{Removed obsolete tracing code}
+% \changes{v1.0f}{1994/05/03}
+% {(CAR) Added \cs{@largefloatcheck}}
+% \changes{v1.0f}{1994/05/03}{Removed unnecessary braces from
+% arguments of \cs{@ifnextchar}}
+% \changes{v1.0i}{1994/05/22}{Use new warning commands}
+% \changes{v1.1e}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.1g}{1994/12/10}{Some temps reinserted temporarily}
+% \changes{v1.1n}{1995/11/28}{documentation fixes}
+% \changes{v1.1s}{1997/06/16}{documentation fixes}
+%
+% \subsection{Floating Environments}
+% \begin{macrocode}
+%<*2ekernel>
+\message{floats,}
+% \end{macrocode}
+% \begin{oldcomments}
+%
+% Where floats may appear on a page, and how many may appear there
+% are specified by the following float placement parameters. The
+% numbers are named like counters so the user can set them with
+% the ordinary counter-setting commands.
+%
+% \c@topnumber : Number of floats allowed at the top of a column.
+% \topfraction : Fraction of column that can be devoted to floats.
+% \c@dbltopnumber, \dbltopfraction
+% : Same as above, but for double-column floats.
+% \c@bottomnumber, \bottomfraction
+% : Same as above for bottom of page.
+% \c@totalnumber : Number of floats allowed in a single column,
+% including in-text floats.
+% \textfraction :Minimum fraction of column that must contain text.
+% \floatpagefraction: Minimum fraction of page that must be taken
+% up by float page.
+% \dblfloatpagefraction
+% : Same as above, for double-column floats.
+%
+% The document style must define the following.
+%
+% \fps@TYPE : The default placement specifier for floats of type
+% TYPE.
+%
+% \ftype@TYPE : The type number for floats of type TYPE.
+%
+% \ext@TYPE : The file extension indicating the file on which the
+% contents list for float type TYPE is stored.
+% For example, \ext@figure = 'lof'.
+%
+% \fnum@TYPE : A macro to generate the figure number for a caption.
+% For example, \fnum@TYPE == Figure \thefigure.
+%
+% \@makecaption{NUM}{TEXT} :
+% A macro to make a caption, with NUM the value
+% produced by \fnum@... and TEXT the text of the caption.
+% It can assume it's in a \parbox of the appropriate width.
+%
+% \@float{TYPE}[PLACEMENT] : This macro begins a float environment for a
+% single-column float of type TYPE with PLACEMENT as the placement
+% specifier. The default value of PLACEMENT is defined by
+% \fps@TYPE. The environment is ended by \end@float.
+% E.g., \figure == \@float{figure}, \endfigure == \end@float.
+%
+% \@float{TYPE}[PLACEMENT] ==
+% BEGIN
+% if hmode then \@bsphack
+% \@floatpenalty := -10002
+% else \@floatpenalty := -10003
+% fi
+% \@captype ==L TYPE
+% \@dblflset
+% \@fps ==L PLACEMENT
+% \@onelevel@sanitize \@fps
+% add default PLACEMENT if at most ! in PLACEMENT == \@fpsadddefault
+% if inner
+% then LaTeX Error: 'Not in outer paragraph mode.'
+% \@floatpenalty := 0
+% else if \@freelist nonempty
+% then \@currbox :=L head of \@freelist
+% \@freelist :=G tail of \@freelist
+% \count\@currbox :=G 32*\ftype@TYPE +
+% bits determined by PLACEMENT
+% else \@floatpenalty := 0
+% LaTeX Error: 'Too many unprocessed floats'
+% fi
+% fi
+% \@currbox :=G \color@vbox
+% \normalcolor
+% \vbox{
+% %% 15 Dec 87 --
+% %% removed \boxmaxdepth :=L 0pt
+% %% that made box 0 depth because it screwed
+% %% things up. Instead, added \vskip0pt at end
+% \hsize = \columnwidth
+% \@parboxrestore
+% \@floatboxreset
+% END
+%
+% \caption ==
+% BEGIN
+% \refstepcounter{\@captype}
+% \@dblarg{\@caption{\@captype}}
+% END
+%
+% In following definition, \par moved from after \addcontentsline to
+% before \addcontentsline because the \write could cause
+% an extra blank line to be added to the paragraph above the
+% caption. (Change made 12 Jun 87)
+%
+% \@caption{TYPE}[STEXT]{TEXT} ==
+% BEGIN
+% \par
+% \addcontentsline{\ext@TYPE}{TYPE}{\numberline{\theTYPE}{STEXT}}
+% \begingroup
+% \@parboxrestore
+% \@normalsize
+% \@makecaption{\fnum@TYPE}{TEXT}
+% \par
+% \endgroup
+% END
+%
+%
+% \@dblfloat{TYPE}[PLACEMENT] : Macro to begin a float environment for
+% a double-column float of type TYPE with PLACEMENT as the placement
+% specifier. The default value of PLACEMENT is 'tp'
+% The environment is ended by \end@dblfloat.
+% E.g., \figure* == \@dblfloat{figure},
+% \endfigure* == \end@dblfloat.
+%
+% \@dblfloat{TYPE}[PLACEMENT] ==
+% Identical to \@float{TYPE}[PLACEMENT] except \hsize and \linewidth
+% are set to \textwidth.
+% \end{oldcomments}
+%
+% \begin{macro}{\@floatpenalty}
+% \begin{macrocode}
+\newcount\@floatpenalty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption}
+%
+% This is set to be an error message outside a float since no
+% captype is defined there; this may need to be changed by some
+% classes.
+% \changes{v1.1u}{1999/04/19}
+% {Made caption an error outside a float: latex/2815}
+% \begin{macrocode}
+\def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@caption}
+% \changes{v1.0b}{1994/03/28}
+% {Use \cs{normalsize} not \cs{@normalsize}}
+% \changes{v1.1r}{1996/12/06}
+% {Call \cs{@setminpage} if needed. latex/2318}
+% \begin{macrocode}
+\long\def\@caption#1[#2]#3{%
+ \par
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup
+% \end{macrocode}
+%
+% The paragraph setting parameters are normalised at this point, however
+% |\@parboxrestore| resets |\everypar| which is not correct in this
+% context so |\@setminipage| is called if needed.
+%
+% The float mechanism, like minipage, sets the flag |@minipage| true
+% before executing the user-supplied text. Many \LaTeX\ constructs
+% test for this flag and do not add vertical space when it is true.
+% The intention is that this emulates \TeX's `top of page' behaviour.
+% The flag must be set false at the start of the first paragraph. This
+% is achieved by a redefinition of |\everypar|, but the call to
+% |\@parboxrestore| removes that redefinition, so it is re-inserted
+% if needed. If the flag is already false then the |\caption| was not
+% the first entry in the float, and so some other paragraph has already
+% activated the special |\everypar|. In this case no further action is
+% needed.
+% \begin{macrocode}
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \normalsize
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@float}
+% \begin{macro}{\@dblflset}
+% \changes{v1.1a}{1994/10/31}{Macro added}
+% \changes{v1.1g}{1994/12/10}{Macro removed temporarily}
+% \changes{v1.1a}{1994/10/31}
+% {Major changes to parameter parsing, setting of local variables,
+% etc; two-column and one-column cases merged; space hacks moved}
+% \changes{v1.1c}{1994/11/05}
+% {Add compatibility with old version of \cs{@xfloat}.}
+% \changes{v1.1g}{1994/12/10}{Old version reinstated temporarily}
+%
+% \begin{macrocode}
+\def\@float#1{%
+ \@ifnextchar[%
+ {\@xfloat{#1}}%
+ {\edef\reserved@a{\noexpand\@xfloat{#1}[\csname fps@#1\endcsname]}%
+ \reserved@a}}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@dblfloat}
+% \changes{v1.1a}{1994/10/31}
+% {Major changes since two-column and one-column cases merged}
+% \changes{v1.1g}{1994/12/10}{Old version reinstated temporarily}
+%
+% \begin{macrocode}
+\def\@dblfloat{%
+ \if@twocolumn\let\reserved@a\@dbflt\else\let\reserved@a\@float\fi
+ \reserved@a}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fps@dbl}
+% \changes{v1.1a}{1994/10/31}{Macro added}
+% \changes{v1.1g}{1994/12/10}{Macro removed temporarily}
+% Note that all double floats have default fps `tp'.
+% \end{macro}
+%
+% \begin{macro}{\@setfps}
+% \changes{v1.1a}{1994/10/31}{Macro added}
+% \changes{v1.1c}{1994/11/05}
+% {Add compatibility with old version of \cs{@xfloat}.}
+% \changes{v1.1g}{1994/12/10}{Macro removed temporarily}
+% This sets the fps, dealing with error conditions by adding
+% the default.
+%
+% \end{macro}
+%
+% \begin{macro}{\@xfloat}
+% \changes{LaTeX2e}{1993/12/05}{Command changed}
+% \changes{LaTeX2e}{1994/01/21}{Added missing percent characters.}
+% \changes{v1.1a}{1994/10/31}
+% {Major changes, removing setting of local variables, space hacks
+% etc; two-column and one-column cases merged}
+% \changes{v1.1c}{1994/11/05}
+% {Add compatibility with old version of \cs{@xfloat}: but the
+% arguments, provided at exorbitant cost, are now completely
+% ignored}
+% \changes{v1.1f}{1994/11/21}
+% {Missing percents reinserted after 4, 8: these are not numbers.}
+% \changes{v1.1g}{1994/12/10}{Old version reinstated temporarily}
+% \changes{v1.1g}{1994/12/10}{Sanitisation added temporarily}
+% The first part of this sets the count register that stores all
+% the information about the type and fps of the float.
+%
+% We assume here that the default specifiers already contain no
+% active characters.
+%
+% It may be better to store the defaults as numbers, rather than
+% symbol strings.
+%
+% \changes{v1.1p}{1996/10/24}{Added \cs{@nodocument} to trap
+% floats in the preamble}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@xfloat}{Check float options}%
+%<*2ekernel|latexrelease>
+\def\@xfloat #1[#2]{%
+ \@nodocument
+ \def \@captype {#1}%
+ \def \@fps {#2}%
+ \@onelevel@sanitize \@fps
+ \def \reserved@b {!}%
+ \ifx \reserved@b \@fps
+ \@fpsadddefault
+ \else
+ \ifx \@fps \@empty
+ \@fpsadddefault
+ \fi
+ \fi
+ \ifhmode
+ \@bsphack
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist
+ {%
+ \@tempcnta \sixt@@n
+ \expandafter \@tfor \expandafter \reserved@a
+ \expandafter :\expandafter =\@fps
+ \do
+% \end{macrocode}
+% \changes{v1.2b}{2015/01/11}{Check for valid option (latexrelease)}
+% Start of changes, use a nested if structure, ending in an error.
+% \begin{macrocode}
+ {%
+ \if \reserved@a h%
+ \ifodd \@tempcnta
+ \else
+ \advance \@tempcnta \@ne
+ \fi
+ \else\if \reserved@a t%
+ \@setfpsbit \tw@
+ \else\if \reserved@a b%
+ \@setfpsbit 4%
+ \else\if \reserved@a p%
+ \@setfpsbit 8%
+ \else\if \reserved@a !%
+ \ifnum \@tempcnta>15
+ \advance\@tempcnta -\sixt@@n\relax
+ \fi
+ \else
+ \@latex@error{Unknown float option `\reserved@a'}%
+ {Option `\reserved@a' ignored and `p' used.}%
+ \@setfpsbit 8%
+ \fi\fi\fi\fi\fi
+ }%
+% \end{macrocode}
+% End of changes
+% \begin{macrocode}
+ \@tempcntb \csname ftype@\@captype \endcsname
+ \multiply \@tempcntb \@xxxii
+ \advance \@tempcnta \@tempcntb
+ \global \count\@currbox \@tempcnta
+ }%
+ \@fltovf
+ \fi
+% \end{macrocode}
+% The remainder sets up the box in which the float is typeset, and
+% the typesetting environment to be used. It is essential to have
+% the extra box to avoid the unwanted space that would otherwise
+% often be put at the top of the float.
+%
+% It ends with a hook; not sure how useful this is but it is needed
+% at present to deal with double-column floats.
+% \task{CAR?}{Sort out hooks}
+% \changes{v1.0a}{1994/03/07}
+% {(DPC) Extra group for colour}
+% \changes{v1.0c}{1994/03/14}
+% {(DPC) Use \cs{color@begingroup}}
+% \changes{v1.0g}{1994/05/13}
+% {(DPC) Use \cs{normalcolor}}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Extra box added to remove colour resetting from vmode}
+% \changes{v1.1a}{1994/10/31}{Reset hook added}
+% \changes{v1.1c}{1994/11/05}
+% {Use new \cs{color@hbox} concept.}
+% \changes{v1.1f}{1994/11/21}
+% {Changed to \cs{color@vbox} so that large floats overflow
+% at the bottom}
+% \changes{v1.1f}{1994/11/21}{Use \cs{@setnobreak}}
+% \changes{v1.1f}{1994/11/21}{Added \cs{@setminipage}}
+% \changes{v1.1f}{1994/11/21}{Added resetting of size and font}
+% \changes{v1.1m}{1995/05/25}{(CAR) Resettings moved to hook}
+% \begin{macrocode}
+ \global \setbox\@currbox
+ \color@vbox
+ \normalcolor
+ \vbox \bgroup
+ \hsize\columnwidth
+ \@parboxrestore
+ \@floatboxreset
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@xfloat}{Check float options}%
+%<latexrelease>\def\@xfloat #1[#2]{%
+%<latexrelease> \@nodocument
+%<latexrelease> \def \@captype {#1}%
+%<latexrelease> \def \@fps {#2}%
+%<latexrelease> \@onelevel@sanitize \@fps
+%<latexrelease> \def \reserved@b {!}%
+%<latexrelease> \ifx \reserved@b \@fps
+%<latexrelease> \@fpsadddefault
+%<latexrelease> \else
+%<latexrelease> \ifx \@fps \@empty
+%<latexrelease> \@fpsadddefault
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \ifhmode
+%<latexrelease> \@bsphack
+%<latexrelease> \@floatpenalty -\@Mii
+%<latexrelease> \else
+%<latexrelease> \@floatpenalty-\@Miii
+%<latexrelease> \fi
+%<latexrelease> \ifinner
+%<latexrelease> \@parmoderr\@floatpenalty\z@
+%<latexrelease> \else
+%<latexrelease> \@next\@currbox\@freelist
+%<latexrelease> {%
+%<latexrelease> \@tempcnta \sixt@@n
+%<latexrelease> \expandafter \@tfor \expandafter \reserved@a
+%<latexrelease> \expandafter :\expandafter =\@fps
+%<latexrelease> \do
+%<latexrelease> {%
+%<latexrelease> \if \reserved@a h%
+%<latexrelease> \ifodd \@tempcnta
+%<latexrelease> \else
+%<latexrelease> \advance \@tempcnta \@ne
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \if \reserved@a t%
+%<latexrelease> \@setfpsbit \tw@
+%<latexrelease> \fi
+%<latexrelease> \if \reserved@a b%
+%<latexrelease> \@setfpsbit 4%
+%<latexrelease> \fi
+%<latexrelease> \if \reserved@a p%
+%<latexrelease> \@setfpsbit 8%
+%<latexrelease> \fi
+%<latexrelease> \if \reserved@a !%
+%<latexrelease> \ifnum \@tempcnta>15
+%<latexrelease> \advance\@tempcnta -\sixt@@n\relax
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> }%
+%<latexrelease> \@tempcntb \csname ftype@\@captype \endcsname
+%<latexrelease> \multiply \@tempcntb \@xxxii
+%<latexrelease> \advance \@tempcnta \@tempcntb
+%<latexrelease> \global \count\@currbox \@tempcnta
+%<latexrelease> }%
+%<latexrelease> \@fltovf
+%<latexrelease> \fi
+%<latexrelease> \global \setbox\@currbox
+%<latexrelease> \color@vbox
+%<latexrelease> \normalcolor
+%<latexrelease> \vbox \bgroup
+%<latexrelease> \hsize\columnwidth
+%<latexrelease> \@parboxrestore
+%<latexrelease> \@floatboxreset
+%<latexrelease>}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@floatboxreset}
+% \changes{v1.1a}{1994/10/31}{Macro added}
+%
+% The rational for allowing these normally global flags to be set
+% locally here, via |\@parboxrestore|, was stated originally by
+% Donald Arseneau and extended by Chris Rowley.
+% It is because these flags are only set globally to
+% true by section commands, and these should never appear within
+% marginals or floats or, indeed, in any group; and they are only ever
+% set globally to false when they are definitely true.
+%
+% If anyone is unhappy with this argument then both flags should be
+% treated as in |\set@nobreak|; otherwise this command will be
+% redundant.
+% \changes{v1.1p}{1996/10/24}
+% {Added local settings of flags: dangerous!!}
+% \begin{macrocode}
+\def \@floatboxreset {%
+ \reset@font
+ \normalsize
+ \@setminipage
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@setnobreak}
+% \changes{v1.1f}{1994/11/21}{Macro added}
+% \changes{v1.1n}{1996/07/26}{remove unecessary \cs{global} before
+% \cs{@nobreak...}}
+% \begin{macrocode}
+\def \@setnobreak{%
+ \if@nobreak
+ \let\outer@nobreak\@nobreaktrue
+ \@nobreakfalse
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@setminipage}
+% \changes{v1.1f}{1994/11/21}{Macro added}
+% \changes{v1.1n}{1996/07/26}{remove unecessary \cs{global} before
+% \cs{@minipage...}}
+% \begin{macrocode}
+\def \@setminipage{%
+ \@minipagetrue
+ \everypar{\@minipagefalse\everypar{}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\end@float}
+% \changes{v1.0f}{1994/05/03}
+% {(CAR) Added \cs{@largefloatcheck}}
+% \changes{v1.1n}{1995/10/25}{(CAR) unify code for double and
+% single versions}
+% \begin{macrocode}
+\def\end@float{%
+ \@endfloatbox
+ \ifnum\@floatpenalty <\z@
+% \end{macrocode}
+% We make sure that we never exceed |\textheight|, otherwise float
+% will never get typeset (91/03/15 FMi).
+% \begin{macrocode}
+ \@largefloatcheck
+ \@cons\@currlist\@currbox
+ \ifnum\@floatpenalty <-\@Mii
+ \penalty -\@Miv
+% \end{macrocode}
+% Saving and restoring |\prevdepth| added 26 May 87 to prevent extra
+% vertical space when used in vertical mode.
+% \begin{macrocode}
+ \@tempdima\prevdepth
+ \vbox{}%
+ \prevdepth\@tempdima
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \penalty\@floatpenalty
+% \end{macrocode}
+% \changes{LaTeX2.09}{1992/03/18}
+% {(RmS) changed \cs{@esphack} to \cs{@Esphack}}
+% \begin{macrocode}
+ \else
+ \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\end@dblfloat}
+% \changes{v1.0f}{1994/05/03}{\cs{@largefloatcheck} added}
+% \changes{v1.1n}{1995/10/25}{(CAR) unify code for double and
+% single versions}
+% \changes{v1.2b}{2015/01/11}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\end@dblfloat}{float order in 2-column}%
+%<*2ekernel|latexrelease>
+\def\end@dblfloat{%
+ \if@twocolumn
+ \@endfloatbox
+ \ifnum\@floatpenalty <\z@
+ \@largefloatcheck
+% \end{macrocode}
+%
+% Force the depth of two column float boxes.
+% \begin{macrocode}
+ \global\dp\@currbox1sp %
+% \end{macrocode}
+% What follows is essentially |\end@float| without a starting
+% |\@endfloatbox|.
+% \changes{v1.2b}{2000/09/24}{FMi: use output routine to
+% defer float}
+% \changes{v1.2b}{2014/04/27}{Inline the code to allow some
+% coexistence with packages that hook into \cs{end@float} and do not
+% know about the algorithm change}
+% \begin{macrocode}
+ \@cons\@currlist\@currbox
+ \ifnum\@floatpenalty <-\@Mii
+ \penalty -\@Miv
+ \@tempdima\prevdepth
+ \vbox{}%
+ \prevdepth\@tempdima
+ \penalty\@floatpenalty
+ \else
+ \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
+ \fi
+% \end{macrocode}
+% \changes{v1.2b}{2014/06/10}{missing \cs{fi} added}
+% \begin{macrocode}
+ \fi
+ \else
+ \end@float
+ \fi
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\end@dblfloat}{float order in 2-column}%
+%<latexrelease>\def\end@dblfloat{%
+%<latexrelease>\if@twocolumn
+%<latexrelease> \@endfloatbox
+%<latexrelease> \ifnum\@floatpenalty <\z@
+% \end{macrocode}
+% We make sure that we never exceed |\textheight|, otherwise float
+% will never get typeset (91/03/15 FMi).
+% \begin{macrocode}
+%<latexrelease> \@largefloatcheck
+%<latexrelease> \@cons\@dbldeferlist\@currbox
+%<latexrelease> \fi
+% \end{macrocode}
+% RmS 92/03/18 changed |\@esphack| to |\@Esphack|.
+% \begin{macrocode}
+%<latexrelease> \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
+%<latexrelease>\else
+%<latexrelease> \end@float
+%<latexrelease>\fi
+%<latexrelease>}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@endfloatbox}
+% \changes{v1.1n}{1995/10/25}{(CAR) macro added: to unify code for
+% double and single versions}
+% This macro is not intended to be a hook; it is designed to help
+% maintain the integrity of this code, which is used twice and, as
+% can be seen, is subject to frequent changes.
+% \begin{macrocode}
+\def \@endfloatbox{%
+ \par\vskip\z@skip %% \par\vskip\z@ added 15 Dec 87
+% \end{macrocode}
+% \changes{v1.0a}
+% {1994/03/07}{(DPC) Extra group for colour}
+% \changes{v1.0c}{1994/03/14}
+% {(DPC) Use \cs{color@endgroup}}
+% \changes{v1.0h}{1994/05/20}{Restore outer value of @nobreak switch.}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Extra box added to remove colour resetting from vmode}
+% \changes{v1.1c}{1994/11/05}
+% {Use new \cs{color@hbox} concept.}
+% \changes{v1.1f}{1994/11/21}{Corrected position of \cs{outer@nobreak}}
+% \changes{v1.1f}{1994/11/21}{Added reset of minipage flag}
+% \changes{v1.1n}{1996/07/26}{remove unecessary \cs{global} before
+% \cs{@minipage...}}
+% \begin{macrocode}
+ \@minipagefalse
+ \outer@nobreak
+ \egroup %% end of vbox
+ \color@endbox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\outer@nobreak}
+% \changes{v1.0h}{1994/05/20}{Macro added: default is to do nothing.}
+% \begin{macrocode}
+\let\outer@nobreak\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@largefloatcheck}
+% \changes{v1.0e}{1994/04/25}{Command added}
+%
+% This calculates by how much a float is oversize for the page and
+% prints this in a warning message.
+%
+% \begin{macrocode}
+\def \@largefloatcheck{%
+ \ifdim \ht\@currbox>\textheight
+ \@tempdima -\textheight
+ \advance \@tempdima \ht\@currbox
+% \end{macrocode}
+% \changes{v1.0e}{1994/04/25}{Changed warning message to give more
+% info}
+% \begin{macrocode}
+ \@latex@warning {Float too large for page by \the\@tempdima}%
+ \ht\@currbox \textheight
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@dbflt}
+% \begin{macro}{\@xdblfloat}
+% \changes{v1.1a}{1994/10/31}
+% {Macros removed: \cs{@dbflt}, \cs{@xdblfloat}}
+% \changes{v1.1g}{1994/12/10}{Macros reinserted temporarily}
+%
+%
+% \begin{macrocode}
+\def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tp]}}
+\def\@xdblfloat#1[#2]{%
+ \@xfloat{#1}[#2]\hsize\textwidth\linewidth\textwidth}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% Moved to ltoutput 93/12/16
+% \begin{macrocode}
+%\newcount\c@topnumber
+%\newcount\c@dbltopnumber
+%\newcount\c@bottomnumber
+%\newcount\c@totalnumber
+% \end{macrocode}
+%
+% \begin{macro}{\@floatplacement}
+% An analysis of |\@floatplacement|:
+%
+% This should be called whenever |\@colht| has been set.
+% \begin{macrocode}
+\def\@floatplacement{\global\@topnum\c@topnumber
+ % Textpage bit, global:
+ \global\@toproom \topfraction\@colht
+ \global\@botnum \c@bottomnumber
+ \global\@botroom \bottomfraction\@colht
+ \global\@colnum \c@totalnumber
+ % Floatpage bit, local:
+ \@fpmin \floatpagefraction\@colht}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@dblfloatplacement}
+% \changes{LaTeX2e}{1993/12/05}{Command changed}
+%
+% This should be called only within a group. Now changed to
+% provide extra checks in |\@addtodblcol|, needed when processing a
+% BANG float.
+%
+% \changes{v1.2b}{2015/01/11}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@dblfloatplacement}{float order in 2-column}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+% When making two column float area, look for floats with 1sp
+% depth.
+% \begin{macrocode}
+\def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber
+ \global\@dbltoproom \dbltopfraction\@colht
+ \@textmin \@colht
+ \advance \@textmin -\@dbltoproom
+ \@fpmin \dblfloatpagefraction\textheight
+ \@fptop \@dblfptop
+ \@fpsep \@dblfpsep
+ \@fpbot \@dblfpbot
+% \end{macrocode}
+% |\f@depth| is used in |\@testwrongwidth| to look for either
+% column or dbl-column floats. A value of |1sp| signals the
+% latter. Because of this setting here, |\@dblfloatplacment| needs to
+% be called inside a group which is a questionable design.
+% \begin{macrocode}
+ \def\f@depth{1sp}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@dblfloatplacement}{float order in 2-column}%
+%<latexrelease>\def \@dblfloatplacement {%
+% \end{macrocode}
+% Textpage bit: global, but need not be.
+% \begin{macrocode}
+%<latexrelease> \global \@dbltopnum \c@dbltopnumber
+%<latexrelease> \global \@dbltoproom \dbltopfraction\@colht
+% \end{macrocode}
+% This new bit uses |\@textmin| to locally store the amount of extra
+% room in the column.
+% \begin{macrocode}
+%<latexrelease> \@textmin \@colht
+%<latexrelease> \advance \@textmin -\@dbltoproom
+% \end{macrocode}
+% Floatpage bit: must be local.
+% \begin{macrocode}
+%<latexrelease> \@fpmin \dblfloatpagefraction\textheight
+%<latexrelease> \@fptop \@dblfptop
+%<latexrelease> \@fpsep \@dblfpsep
+%<latexrelease> \@fpbot \@dblfpbot
+%<latexrelease>}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{oldcomments}
+% MARGINAL NOTES:
+%
+% Marginal notes use the same mechanism as floats to communicate
+% with the \output routine. Marginal notes are distinguished from
+% floats by having a negative placement specification. The command
+% \marginpar [LTEXT]{RTEXT} generates a marginal note in a parbox,
+% using LTEXT if it's on the left and RTEXT if it's on the right.
+% (Default is RTEXT = LTEXT.) It uses the following parameters.
+%
+% \marginparwidth : Width of marginal notes.
+% \marginparsep : Distance between marginal note and text.
+% the page layout to determine how to move the marginal
+% note into the margin. E.g., \@leftmarginskip ==
+% \hskip -\marginparwidth \hskip -\marginparsep .
+% \marginparpush : Minimum vertical separation between \marginpar's
+%
+% Marginal notes are normally put on the outside of the page
+% if @mparswitch = true, and on the right if @mparswitch = false.
+% The command \reversemarginpar reverses the side where they
+% are put. \normalmarginpar undoes \reversemarginpar.
+% These commands have no effect for two-column output.
+%
+% SURPRISE: if two marginal notes appear on the same line of
+% text, then the second one could appear on the next page, in
+% a funny position.
+%
+%
+% \marginpar [LTEXT]{RTEXT} ==
+% BEGIN
+% if hmode then \@bsphack
+% \@floatpenalty := -10002
+% else \@floatpenalty := -10003
+% fi
+% if inner
+% then LaTeX Error: 'Not in outer paragraph mode.'
+% \@floatpenalty := 0
+% else if \@freelist has two elements:
+% then get \@marbox, \@currbox from \@freelist
+% \count\@marbox :=G -1
+% else \@floatpenalty := 0
+% LaTeX Error: 'Too many unprocessed floats'
+% \@currbox, \@marbox := \@tempboxa %%use \def
+% fi
+% fi
+% if optional argument
+% then %% \@xmpar ==
+% \@savemarbox\@marbox{LTEXT}
+% \@savemarbox\@currbox{RTEXT}
+% else %% \@ympar ==
+% \@savemarbox\@marbox{RTEXT}
+% \box\@currbox :=G \box\@marbox
+% fi
+% \@xympar
+% END
+%
+% \reversemarginpar == BEGIN \@mparbottom :=G 0
+% @reversemargin :=G true
+% END
+%
+% \normalmarginpar == BEGIN \@mparbottom :=G 0
+% @reversemargin :=G false
+% END
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\marginpar}
+% \begin{macrocode}
+\def\marginpar{%
+ \ifhmode
+ \@bsphack
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr
+ \@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist{}{}%
+ \@next\@marbox\@freelist{\global\count\@marbox\m@ne}%
+ {\@floatpenalty\z@
+ \@fltovf\def\@currbox{\@tempboxa}\def\@marbox{\@tempboxa}}%
+ \fi
+ \@ifnextchar [\@xmpar\@ympar}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xmpar}
+% \begin{macrocode}
+\long\def\@xmpar[#1]#2{%
+ \@savemarbox\@marbox{#1}%
+ \@savemarbox\@currbox{#2}%
+ \@xympar}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ympar}
+% \begin{macrocode}
+\long\def\@ympar#1{%
+ \@savemarbox\@marbox{#1}%
+ \global\setbox\@currbox\copy\@marbox
+ \@xympar}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@savemarbox}
+% \changes{v1.0b}{1994/03/12}
+% {(DPC) Extra group for colour}
+% \changes{v1.0c}{1994/03/14}
+% {(DPC) Use \cs{color@begingroup}}
+% \changes{v1.0d}{1994/04/18}
+% {(DPC) Remove Colour support}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Extra box added for colour}
+% \changes{v1.1c}{1994/11/05}
+% {Use new \cs{color@hbox} concept.}
+% \changes{v1.1f}{1994/11/21}{Changed to \cs{color@vbox} }
+% \changes{v1.1f}{1994/11/21}{Use \cs{@setnobreak} etc}
+% \changes{v1.1f}{1994/11/21}{Added \cs{@setminipage} etc}
+% \changes{v1.1f}{1994/11/21}{Added resetting of size and font}
+% \changes{v1.1m}{1995/05/25}{(CAR) Resettings moved to hook}
+% \changes{v1.1n}{1996/07/26}{remove unecessary \cs{global} before
+% \cs{@minipage...}}
+% \begin{macrocode}
+\long\def \@savemarbox #1#2{%
+ \global\setbox #1%
+ \color@vbox
+ \vtop{%
+ \hsize\marginparwidth
+ \@parboxrestore
+ \@marginparreset
+ #2%
+ \@minipagefalse
+ \outer@nobreak
+ }%
+ \color@endbox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@marginparreset}
+% \changes{v1.1f}{1994/11/21}{Macro added}
+%
+% The rational for allowing these normally global flags to be set
+% locally here, via |\@parboxrestore| was stated originally by
+% Donald Arsenau and extended by Chris Rowley.
+% It is because these flags are only set globally to
+% true by section commands, and these should never appear within
+% marginals or floats or, indeed, in any group; and they are only ever
+% set globally to false when they are definitely true.
+%
+% If anyone is unhappy with this argument then both flags should be
+% treated as in |\set@nobreak|; otherwise this command will be
+% redundant.
+% \changes{v1.1p}{1996/10/24}
+% {Added local settings of flags: dangerous!!}
+% \begin{macrocode}
+\def \@marginparreset {%
+ \reset@font
+ \normalsize
+% \let\if@nobreak\iffalse
+% \let\if@noskipsec\iffalse
+% \@setnobreak
+ \@setminipage
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xympar}
+% \begin{macrocode}
+% \end{macrocode}
+% \changes{LaTeX2.09}{1992/03/18}
+% {(RmS) added \cs{global}\cs{@ignorefalse}}
+% \changes{v1.0b}{1994/03/12}
+% {(DPC) Extra bgroup for colour}
+% \changes{1.0c}{1994/03/14}
+% {(DPC) Use \cs{color@begingroup}}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Extra box added since needed for floats}
+% \changes{v1.1c}{1994/11/05}
+% {Use new \cs{color@hbox} concept.}
+% \changes{v1.1f}{1994/11/21}{Changed to \cs{color@vbox} }
+% Setting the box here is done only because the code
+% uses \cs{end@float}; it will be empty and gets discarded.
+% \changes{v1.1o}{1996/08/02}{Remove \cs{global} before \cs{@ignore...}}
+% \begin{macrocode}
+\def \@xympar{%
+ \ifnum\@floatpenalty <\z@\@cons\@currlist\@marbox\fi
+ \setbox\@tempboxa
+ \color@vbox
+ \vbox \bgroup
+ \end@float
+ \@ignorefalse
+ \@esphack
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\reversemarginpar}
+% \begin{macro}{\normalmarginpar}
+% \begin{macrocode}
+\def\reversemarginpar{\global\@mparbottom\z@ \@reversemargintrue}
+\def\normalmarginpar{\global\@mparbottom\z@ \@reversemarginfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\message{footnotes,}
+% \end{macrocode}
+%
+% \subsection{Footnotes}
+%
+% \begin{oldcomments}
+%
+% \footnote{NOTE} : User command to insert a footnote.
+%
+% \footnote[NUM]{NOTE}: User command to insert a footnote numbered
+% NUM, where NUM is a number -- 1, 2,
+% etc. For example, if footnotes are numbered
+% *, **, etc. within pages, then \footnote[2]{...}
+% produces footnote '**'. This command does not
+% step the footnote counter.
+%
+% \footnotemark[NUM] : Command to produce just the footnote mark in
+% the text, but no footnote. With no argument,
+% it steps the footnote counter before generating
+% the mark.
+%
+% \footnotetext[NUM]{TEXT} : Command to produce the footnote but
+% no mark. \footnote is equivalent to
+% \footnotemark \footnotetext .
+%
+% As in PLAIN, footnotes use \insert\footins, and the following
+% parameters:
+%
+% \footnotesize : Size-changing command for footnotes.
+%
+% \footnotesep : The height of a strut placed at the beginning of
+% every footnote.
+% \skip\footins : Space between main text and footnotes. The rule
+% separating footnotes from text occurs in this
+% space. This space lies above the strut of height
+% \footnotesep which is at the beginning of the
+% first footnote.
+% \footnoterule : Macro to draw the rule separating footnotes from
+% text. It is executed right after a \vspace of
+% \skip\footins. It should take zero vertical
+% space--i.e., it should to a negative skip to
+% compensate for any positive space it occupies.
+% (See PLAIN.TEX.)
+%
+% \interfootnotelinepenalty : Interline penalty for footnotes.
+%
+% \thefootnote : In usual LaTeX style, produces the footnote number.
+% If footnotes are to be numbered within pages, then
+% the document style file must include an \@addtoreset
+% command to cause the footnote counter to be reset
+% when the page counter is stepped. This is not a good
+% idea, though, because the counter will not always be
+% reset in time to ensure that the first footnote on a
+% page is footnote number one.
+%
+% \@thefnmark : Holds the current footnote's mark--e.g., \dag or '1'
+% or 'a'.
+%
+% \@mpfnnumber : A macro that generates the numbers for \footnote
+% and \footnotemark commands. It == \thefootnote
+% outside a minipage environment, but can be
+% changed inside to generate numbers for
+% \footnote's.
+%
+% \@makefnmark : A macro to generate the footnote marker from
+% \@thefnmark The default definition was
+% \hbox{$^\@thefnmark$}.
+%
+% This is now replaced by
+% \textsuperscript{\@thefnmark}
+%
+% \@makefntext{NOTE} :
+% Must produce the actual footnote, using \@thefnmark as the mark
+% of the footnote and NOTE as the text. It is called when
+% effectively inside a \parbox, with \hsize = \columnwidth.
+% For example, it might be as simple as
+% $^{\@thefnmark}$ NOTE
+%
+% In a minipage environment, \footnote and \footnotetext are redefined
+% so that
+% (a) they use the counter mpfootnote
+% (b) the footnotes they produce go at the bottom of the minipage.
+% The switch is accomplished by letting \@mpfn == footnote or mpfootnote
+% and \thempfn == \thefootnote or \thempfootnote, and by redefining
+% \@footnotetext to be \@mpfootnotetext in the minipage.
+%
+% \footnote{NOTE} ==
+% BEGIN
+% \stepcounter{\@mpfn}
+% begingroup
+% \protect == \noexpand
+% \@thefnmark :=G eval (\thempfn)
+% endgroup
+% \@footnotemark
+% \@footnotetext{NOTE}
+% END
+%
+% \footnote[NUM]{NOTE} ==
+% BEGIN
+% begingroup
+% \protect == \noexpand
+% counter \@mpfn :=L NUM
+% \@thefnmark :=G eval (\thempfn)
+% endgroup
+% \@footnotemark
+% \@footnotetext{NOTE}
+% END
+%
+% \footnotemark ==
+% BEGIN \stepcounter{footnote}
+% begingroup
+% \protect == \noexpand
+% \@thefnmark :=G eval(\thefootnote)
+% endgroup
+% \@footnotemark
+% END
+%
+% \footnotemark[NUM] ==
+% BEGIN
+% begingroup
+% footnote counter :=L NUM
+% \protect == \noexpand
+% \@thefnmark :=G eval(\thefootnote)
+% endgroup
+% \@footnotemark
+% END
+%
+% \@footnotemark ==
+% BEGIN
+% \leavevmode
+% IF hmode THEN \@x@sf := \the\spacefactor FI
+% \@makefnmark % put number in main text
+% IF hmode THEN \spacefactor := \@x@sf FI
+% END
+%
+% \footnotetext ==
+% BEGIN begingroup \protect == \noexpand
+% \@thefnmark :=G eval (\thempfn)
+% endgroup
+% \@footnotetext
+% END
+%
+% \footnotetext[NUM] ==
+% BEGIN begingroup counter \@mpfn :=L NUM
+% \protect == \noexpand
+% \@thefnmark :=G eval (\thempfn)
+% endgroup
+% \@footnotetext
+% END
+%
+% \end{oldcomments}
+%
+%
+% \changes{v1.1l}{1995/05/24}{Moved definition of \cs{footins}
+% and \cs{footnoterule} from ltplain.}
+%
+% \begin{macro}{\footins}
+% \LaTeX\ does use the same insert for footnotes as PLAIN.
+% \begin{macrocode}
+\newinsert\footins
+% \end{macrocode}
+%
+% \LaTeX\ leaves these initializations for the |\footins| insert.
+%
+% \begin{macrocode}
+\skip\footins=\bigskipamount % space added when footnote is present
+\count\footins=1000 % footnote magnification factor (1 to 1)
+\dimen\footins=8in % maximum footnotes per page
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\footnoterule}
+% \LaTeX\ keeps PLAIN \TeX's |\footnoterule| as the default.
+%
+% \begin{macrocode}
+\def\footnoterule{\kern-3\p@
+ \hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thefootnote}
+% \changes{v1.1i}{1995/05/16}{Streamlined parts of code.}
+% \begin{macrocode}
+\@definecounter{footnote}
+\def\thefootnote{\@arabic\c@footnote}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thempfootnote}
+% \changes{v1.1j}{1995/05/18}{Added \cs{itshape}.}
+% \changes{v1.1v}{2002/10/01}{Use braces around \cs{itshape}
+% to keep font change local (pr/3460).}
+% The default display for the footnote counter in minipages is to
+% use italic letters. We use |\itshape| not |\textit| as the latter
+% would add an italic correction.
+% \begin{macrocode}
+\@definecounter{mpfootnote}
+\def\thempfootnote{{\itshape\@alph\c@mpfootnote}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefnmark}
+% \changes{v1.1i}{1995/05/16}{Now use \cs{textsuperscript}.}
+% \changes{v1.1j}{1995/05/18}{Added \cs{normalfont}.}
+% \changes{v1.1k}{1995/05/20}{Moved \cs{normalfont} to
+% \cs{textsuperscript}}
+% \changes{v1.1k}{1995/05/20}{Moved \cs{normalfont} back
+% and use \cs{@textsuperscript}}
+% Default definition.
+% \begin{macrocode}
+%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textsuperscript}
+% \changes{v1.1i}{1995/05/16}{Command added./pr1503}
+% \changes{v1.1k}{1995/05/20}{Use \cs{normalfont}.}
+% \changes{v1.1l}{1995/05/24}{Use \cs{@textsuperscript}}
+% This command provides superscript characters in the current text
+% font. It's implementation might change!!!
+% \begin{macrocode}
+\DeclareRobustCommand*\textsuperscript[1]{%
+ \@textsuperscript{\selectfont#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@textsuperscript}
+% \changes{v1.1l}{1995/05/24}{Command added.}
+% \changes{v1.1n}{1995/12/05}{Use \cs{ensuremath} for latex/1984.}
+% \changes{v1.1m}{1995/12/07}
+% {Move \cs{m@th} out of the \cs{ensuremath} for latex/1984.}
+% This command should not be used directly, but may be used to define
+% other commands |\textsuperscript|, |\@makefnmark|. |#1| should
+% always start with a font selection command, to activate the font
+% size switch.
+% \begin{macrocode}
+\def\@textsuperscript#1{%
+ {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textsubscript}
+% \changes{v1.2a}{2014/12/30}{Command added (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\textsubscript}{\textsubscript}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand*\textsubscript[1]{%
+ \@textsubscript{\selectfont#1}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@textsubscript}
+% \changes{v1.2a}{2014/12/30}{Command added (latexrelease)}
+%
+% \begin{macrocode}
+\def\@textsubscript#1{%
+ {\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>\let\@textsubscript\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macro}{\footnotesep}
+% \begin{macrocode}
+\newdimen\footnotesep
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\footnote}
+% \changes{LaTeX2.09}{1991/11/01}
+% {(RmS) Added \cs{let}\cs{protect}\cs{noexpand} in
+% \cs{footnote}, \cs{footnotemark},
+% and \cs{footnotetext}, since \cs{xdef} is used}
+% \changes{LaTeX2.09}{1991/11/22}
+% {(RmS) Added \cs{let}\cs{protect}\cs{noexpand} in
+% \cs{@xfootnote}, \cs{@xfootnotemark},
+% and \cs{@xfootnotetext}}
+% \changes{LaTeX2.09}{1992/11/26}
+% {(RmS) Changed all to
+% `def`protect\string{`noexpand`protect`noexpand\string}}
+% \changes{v1.1b}{1994/11/26}
+% {(ASAJ) Added \cs{protected@xdef}.}
+%
+% \begin{macrocode}
+\def\footnote{\@ifnextchar[\@xfootnote{\stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark\@footnotetext}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xfootnote}
+% \begin{macrocode}
+\def\@xfootnote[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\@footnotetext}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@footnotetext}
+% \changes{LaTeX2.09}{1991/09/29}
+% {(RmS) added \cs{reset@font}}
+% \changes{LaTeX2.09}{1992/11/26}
+% {(RmS) added protection for \cs{edef}}
+% \changes{v1.0a}{1994/03/07}
+% {(DPC) Extra group for colour}
+% \changes{v1.0c}{1994/03/14}
+% {(DPC) Use \cs{color@begingroup}, add \cs{endgraf}}
+% \changes{v1.0d}{1994/04/18}
+% {(DPC) Remove Colour support}
+% \changes{v1.0g}{1994/05/13}
+% {(DPC) Add new style colour support: \cs{normalcolor}}
+% \changes{v1.0g}{1994/05/13}
+% {(DPC) Use \cs{@finalstrut}}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Move colour setting to output routine}
+% \changes{v1.1b}{1994/11/04}
+% {(ASAJ) Added \cs{protected@edef}.}
+% \changes{v1.1c}{1994/11/05}
+% {Removed \cs{normalcolor} (again)}
+% \changes{v1.1t}{1997/11/19}
+% {Missing percent, again}
+% \begin{macrocode}
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footnotemark}
+% \changes{v1.1b}{1994/11/04}{Added \cs{protected@xdef} to
+% \cs{footnotemark}.}
+% \begin{macrocode}
+\def\footnotemark{%
+ \@ifnextchar[\@xfootnotemark
+ {\stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \@footnotemark}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xfootnotemark}
+% \begin{macrocode}
+\def\@xfootnotemark[#1]{%
+ \begingroup
+ \c@footnote #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thefootnote}%
+ \endgroup
+ \@footnotemark}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@footnotemark}
+% \changes{v1.1h}{1995/05/12}
+% {Add \cs{nobreak} to allow hyphenation. latex/1605}
+% \begin{macrocode}
+\def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \@makefnmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footnotetext}
+% \begin{macrocode}
+\def\footnotetext{%
+ \@ifnextchar [\@xfootnotenext
+ {\protected@xdef\@thefnmark{\thempfn}%
+ \@footnotetext}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xfootnotenext}
+% \begin{macrocode}
+\def\@xfootnotenext[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotetext}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thempfn}
+% \begin{macro}{\@mpfn}
+% \begin{macrocode}
+\def\@mpfn{footnote}
+\def\thempfn{\thefootnote}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfntcmd.dtx b/macros/latex-dev/base/ltfntcmd.dtx
new file mode 100644
index 0000000000..e500ed871a
--- /dev/null
+++ b/macros/latex-dev/base/ltfntcmd.dtx
@@ -0,0 +1,776 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltfntcmd.dtx
+%%
+%<*driver>
+% \fi
+\ProvidesFile{ltfntcmd.dtx}
+ [2019/01/27 v3.4b LaTeX Kernel (Font commands)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltfntcmd.dtx}
+\title{\filename}
+\date{\filedate}
+\author{Frank Mittelbach, Chris Rowley}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \iffalse
+% Copyright (C) 1994-1995 Frank Mittelbach and Chris Rowley
+% all rights reserved.
+% \fi
+%
+% \changes{v2.0b}{1993/05/05}{Removed all LaTeX related cmds}
+% \changes{v3.0a}{1993/12/11}{Complete reworking of all text commands,
+% using just one creator function}
+% \changes{v3.0a}{1993/12/11}{newfontswitch command corrected and
+% changed}
+% \changes{v3.0a}{1993/12/11}{newcommands replaced by defs}
+% \changes{v3.0a}{1993/12/11}{italic correction now put in front of
+% penalty before glue}
+% \changes{v3.0b}{1993/12/19}{\cs{@pdef} command added}
+% \changes{v3.0b}{1993/12/19}{Other tidying}
+% \changes{v3.0b}{1993/12/19}{Made \cs{@newfontswitch} produce an
+% error if command already exists, and added \cs{@renewfontswitch},
+% ASAJ}
+% \changes{v3.0b}{1993/12/19}{Untidying added, so this is now a
+% TEMPORARY version.}
+% \changes{v3.0b}{1993/12/19}{Some more tidying done}
+% \changes{v3.1b}{1994/01/31}{\cs{@normalsize} no longer defined}
+% \changes{v3.2a}{1994/03/15}{Adapted to mass formatting}
+% \changes{v3.2a}{1994/03/15}{Removed defs of short-forms and all
+% sizes except \cs{normalize}}
+% \changes{v3.2a}{1994/03/15}{Removed \cs{@renewfontswitch}}
+% \changes{v3.2a}{1994/03/15}{Changed \cs{/} to \cs{@@italiccorr}}
+% \changes{v3.2b}{1994/04/14}{Macros renamed to non-private forms, JB}
+% \changes{v3.3a}{1994/04/20}{New implementation of \cs{nocorr}}
+% \changes{v3.3a}{1994/04/20}{Documentation up-dated}
+% \changes{v3.3b}{1994/04/30}{Documentation up-dated and tidied}
+% \changes{v3.3b}{1994/04/30}{Title changed}
+% \changes{v3.3b}{1994/04/30}{Prefix frag@ changed to frag in
+% \cs{@protecteddef}}
+% \changes{v3.3b}{1994/04/30}{Warning changed to info message in
+% \cs{@protecteddef}}
+% \changes{v3.3c}{1994/05/05}{Corrected \cs{@fontswitch}}
+% \changes{v3.3d}{1994/05/08}{Removed \cs{@undefinedfonterror}}
+% \changes{v3.3f}{1994/05/09}{Replaced all \cs{next} by
+% \cs{@let@token} and undo change 3.3e,
+% whatever that was.}
+% \changes{v3.3g}{1994/05/13}{Replaced \cs{@protecteddef} by
+% \cs{DeclareRobustCommand}}
+% \changes{v3.3h}{1994/05/20}{Use new error commands}
+% \changes{v3.3i}{1994/05/24}{Tidying and typos fixed}
+% \changes{v3.3j}{1994/05/25}{Insertion of \cs{aftergroup}s to
+% implement \cs{nocorr} moved to the end of the group}
+% \changes{v3.3k}{1994/06/09}{Tidying and typos fixed in documentation}
+% \changes{v3.3l}{1994/06/18}{Added check for empty text}
+% \changes{v3.3m}{1994/06/22}{Removed space from \cs{nfss@text}}
+% \changes{v3.3m}{1994/06/22}{Renamed \cs{check@nocorr}}
+% \changes{v3.3p}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v3.3v}{1997/06/16}{Fix typo in documentation.}
+% \changes{v3.3x}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+% \def \ie {i.e.~}
+% \def \eg {e.g.~}
+%
+% \def \dst {{\normalfont\scshape docstrip}}
+% \def \NFSS {\textsf{NFSS}}
+%
+%
+% \begin{abstract}
+% The commands defined in this file \texttt{ltfntcmd} are
+% part of the kernel code for \LaTeXe/NFSS2.
+%
+% It is also meant to serve as documentation for package writers since
+% it demonstrates how to define high-level font changing commands
+% using a small number of creator functions.
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% Font changes such as |\bfseries|, |\sffamily|, etc.\ are
+% declarations; this means that their scope is delimited by the
+% grouping structure, either by the next |\end| of some environment or
+% by explicitly using a group, e.g., writing something like
+% |{\bfseries...}| in the source. If you make the mistake of writing
+% |\bfseries{...}| (thinking of |\bfseries| as a command with one
+% argument) then the result is rather striking.
+%
+% Font declarations are an artifact of the \TeX{} system and for
+% several reasons it is better to avoid them on the user level
+% whenever possible. In \LaTeX3 they will probably all be
+% replaced by environments and by font commands taking one argument.
+%
+% This file defines a creator function for such declarative font
+% switches. This function creates commands which can be used in
+% both math and text.
+%
+% This file also defines a number of high-level commands (all
+% starting with |\text..|) that have one argument and typeset this
+% argument in the requested way. Thus these commands are for
+% typesetting short pieces of text in a specific family, series or
+% shape. These are all produced as examples of the use of a creator
+% function which is itself also defined in this file.
+%
+% Table~\ref{tab:fontcmds} shows all these high-level commands in
+% action. A further advantage of using these commands is that they
+% automatically take care of any necessary italic correction on either
+% side of their argument.
+% \begin{table}[t]
+% \begin{center}
+% \begin{tabular}{lll}
+% \textit{Command} & \textit{Corresponds to }& \textit{Action} \\[4pt]
+% |\textnormal{..}| & |\normalfont| &
+% Typeset argument in normal family \\
+% |\textrm{..}| & |\rmfamily| &
+% Typeset argument in roman family \\
+% |\textsf{..}| & |\sffamily| &
+% Typeset argument in \textsf{sans serif} family \\
+% |\texttt{..}| & |\ttfamily| &
+% Typeset argument in \texttt{typewriter} family
+% \\[2pt]
+% |\textmd{..}| & |\mdseries| &
+% Typeset argument in medium series \\
+% |\textbf{..}| & |\bfseries| &
+% Typeset argument in \textbf{bold} series \\[2pt]
+% |\textup{..}| & |\upshape| &
+% Typeset argument in normal shape \\
+% |\textit{..}| & |\itshape| &
+% Typeset argument in \textit{italic} shape \\
+% |\textsl{..}| & |\slshape| &
+% Typeset argument in \textsl{slanted} shape \\
+% |\textsc{..}| & |\scshape| &
+% Typeset argument in \textsc{small caps} shape
+% \\[2pt]
+% |\emph{..}| & |\em| &
+% Typeset argument \emph{emphasized}
+% \end{tabular}
+% \end{center}
+% \caption{Font-change commands with arguments}
+% \label{tab:fontcmds}
+% \begin{quote}
+% The font change commands provided here
+% all start with |\text..| to emphasize that they
+% are for use in normal text and to be easily memorable. They
+% automatically take care of any necessary italic correction on either
+% side of the argument.
+% \end{quote}
+% \end{table}
+%
+% Thus, when using such commands, one does not have to worry about
+% forgetting the italic correction when changing fonts. Only in very
+% few situations is this additional space wrong but, for example, most
+% typographers recommend omitting the italic correction if a small
+% punctuation character, like a comma, directly follows the font
+% change. Since the amount of correction required is partly a matter
+% of taste, you can define in what situations the italic correction
+% should be suppressed. This is done by putting the characters that
+% should cancel a preceding italic correction in the list
+% |\nocorrlist|.\footnote{Any package that changes the
+% \texttt{\string\catcode} of a character inside
+% \texttt{\string\nocorrlist} must then explicitly reset the list.
+% Otherwise the changed character will no longer be recognized
+% by the suppression algorithm.}
+% The default definition for this list is produced by the following.
+% \begin{verbatim}
+% \newcommand \nocorrlist {,.}
+% \end{verbatim}
+% It is best to declare the most often used characters first, because
+% this will make the processing slightly faster. For example,
+% \begin{verbatim}
+% \emph{When using the \NFSS{} high-level commands,
+% the \emph{proper} use of italic corrections is
+% automatically taken care of}. Only
+% \emph{sometimes} one has to help \LaTeX{} by
+% adding a \verb=\nocorr= command.
+% \end{verbatim}
+% which results in:
+% \begin{quote}
+% \emph{When using the \NFSS{} high-level commands,
+% the \emph{proper} use of italic corrections is
+% automatically taken care of}. Only
+% \emph{sometimes} one has to help \LaTeX{} by
+% adding a \verb=\nocorr= command.
+% \end{quote}
+%
+% In contrast, the use of the declaration forms is often more
+% appropriate when you define your own commands or environments.
+% \begin{verbatim}
+% \newenvironment{bfitemize}{\begin{itemize}\normalfont\bfseries}
+% {\end{itemize}}
+% \begin{bfitemize}
+% \item This environment produces boldface items.
+% \item It is defined in terms of \LaTeX's
+% \texttt{itemize} environment and NFSS
+% declarations.
+% \end{bfitemize}
+% \end{verbatim}
+% This gives:
+% \begin{quote}
+% \newenvironment{bfitemize}
+% {\begin{itemize}\normalfont\bfseries}
+% {\end{itemize}}
+% \begin{bfitemize}
+% \item This environment produces boldface items.
+% \item It is defined in terms of \LaTeX's
+% \texttt{itemize} environment and NFSS
+% declarations.
+% \end{bfitemize}
+% \end{quote}
+%
+% In addition to global customization of when to insert the italic
+% correction, it is of course sometimes necessary to explicitly insert
+% one with |\/|.
+%
+% It is also possible to suppress the italic correction
+% in individual instances. For this, the command |\nocorr| is provided.
+%
+% The |\nocorr| must appear as the first or last token inside the
+% braces of the argument of the |\text...| commands, at that end of
+% the text where you wish to suppress the italic correction.
+%
+%
+% It is worth pointing out here that inserting a |\/| in places where
+% it can have no function (\ie anywhere except immediately after a
+% slanted letter) is not an error---it will just be silently ignored.
+% Unfortunately this is not true if the redefinition of |\/| in {\tt
+% amstex.sty} is used as this version can cause space to be removed
+% immediately before the |\/|.
+%
+% \StopEventually{}
+%
+%
+% \section{The implementation}
+%
+% \changes{v3.3z}{2003/01/01}{Code checked and documentation extended
+% by Chris}
+%
+% \begin{macro}{\DeclareTextFontCommand}
+% \changes{v3.0a}{1993/12/11}{Macro changed}
+% \changes{v3.0a}{1993/12/11}{Macro changed}
+% This is the creator function for |\text..| commands.
+% It gives a warning if |\foo| or |\fragfoo| is already defined.
+% \changes{v3.0b}{1993/12/19}{Corrected and tidied}
+%
+% In math mode it simply puts the font declaration and text into a
+% box (possibly an automagically sized one).
+%
+% Otherwise it first scans the text to see where |\nocorr| occurs
+% within it. This sets the |\check@ic| commands to do what is
+% necessary concerning the italic correction at both ends.
+%
+% The algorithm for deciding whether to put in an italic correction
+% is not very subtle: one is added whenever the newly current font
+% is not itself positively sloped, unless the next token is a
+% character in the `nocorr' list. At the end of the text this
+% is done after closing the group so as to check the `outer font'.
+% Note that this
+% will often result in adding an italic correction token after a
+% character in an unsloped font; we believe (in early 2003) that
+% this is perhaps inefficient but not dangerous.
+%
+% It also now checks for empty contents of the text command and optimises
+% this case. Some care is also taken to check that doing dangerous
+% things in vertical mode is avoided.
+%
+% The italic correction token is added to the horizontal list
+% before (in the list) an immediately preceding non-zero glob of
+% glue (skip) and any non-zero penalty preceding that since, in
+% the typical case, this puts it immediately
+% after the last character in the preceding word.
+%
+%
+% \changes{v3.3j}{1994/05/25}{Insertion of \cs{aftergroup}s moved}
+% \changes{v3.3j}{1994/05/25}{\cs{expandafter} inserted}
+% \changes{v3.3m}{1994/06/22}{Removed space from \cs{nfss@text}}
+% \changes{v3.3u}{1996/10/08}{Removed \cs{check@icr} when in vmode
+% since it causes various errors (see pr/2157)}
+% \changes{v3.3w}{1997/10/17}{Reinstalled \cs{check@icr} as check is
+% now done in \cs{check@nocorr@} (see PR/2646).}
+% \changes{v3.3y}{2000/01/30}{Use \cs{hmode@bgroup} now (pr/3160)}
+%
+% Note that it is necessary to put in the |\aftergroup\maybe@ic| at
+% the end of the group so that it comes after any other aftergroup
+% tokens and immediately before the following tokens.
+% It is also necessary to remove the |\fi| from the token list before
+% the group ends; this is done by adding an |\expandafter| just
+% before the closing brace.
+%
+% \begin{macrocode}
+%<*2ekernel>
+\def \DeclareTextFontCommand #1#2{%
+ \DeclareRobustCommand#1[1]{%
+ \ifmmode
+ \nfss@text{#2##1}%
+ \else
+ \hmode@bgroup
+ \text@command{##1}%
+ #2\check@icl ##1\check@icr
+ \expandafter
+ \egroup
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textrm}
+% \begin{macro}{\textsf}
+% \begin{macro}{\texttt}
+% \begin{macro}{\textnormal}
+% Now we define the |\text|\meta{family} commands in terms of the
+% above; |\texttt| does not look very nice!
+% \begin{macrocode}
+\DeclareTextFontCommand{\textrm}{\rmfamily}
+\DeclareTextFontCommand{\textsf}{\sffamily}
+\DeclareTextFontCommand{\texttt}{\ttfamily}
+\DeclareTextFontCommand{\textnormal}{\normalfont}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\textbf}
+% \begin{macro}{\textmd}
+% For the series attribute:
+% \begin{macrocode}
+\DeclareTextFontCommand{\textbf}{\bfseries}
+\DeclareTextFontCommand{\textmd}{\mdseries}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\textit}
+% \begin{macro}{\textsl}
+% \begin{macro}{\textsc}
+% \begin{macro}{\textup}
+% \changes{v3.0a}{1993/12/11}{Macros changed}
+% And for the shapes:
+% \begin{macrocode}
+\DeclareTextFontCommand{\textit}{\itshape}
+\DeclareTextFontCommand{\textsl}{\slshape}
+\DeclareTextFontCommand{\textsc}{\scshape}
+\DeclareTextFontCommand{\textup}{\upshape}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\emph}
+% \changes{v3.0a}{1993/12/11}{Macro changed}
+% Finally we have the |\em| font change declaration of \LaTeX. The
+% corresponding definition with argument is
+% \begin{macrocode}
+\DeclareTextFontCommand{\emph}{\em}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nocorr}
+% This is just a label, so it does nothing; it should also be
+% unexpandable.
+% \begin{macrocode}
+\let \nocorr \relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\check@icl}
+% \begin{macro}{\check@icr}
+% \changes{v3.3j}{1994/05/25}{Macros added}
+% \changes{v3.3t}{1996/05/09}{Default definitions added}
+% We define these defaults in case some error causes them to be
+% expanded at the wrong time.
+% \begin{macrocode}
+\let \check@icl \@empty
+\let \check@icr \@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\text@command}
+% \begin{macro}{\check@nocorr@}
+% \changes{v3.3a}{1994/04/20}{Macros added}
+% \changes{v3.3m}{1994/06/22}{Renamed \cs{check@nocorr} to
+% \cs{text@command} to improve \cs{long} error message}
+% \changes{v3.3j}{1994/05/25}{Insertion of \cs{aftergroup}s moved
+% and defaults set up for efficiency}
+% This checks for a |\nocorr| as the first token in its argument
+% and also for one in any other position not protected within
+% braces (the latter is treated as if it were at the end of the
+% argument).
+%
+% Is this the correct action in the `empty' case? It is efficient but
+% typographically it is, strictly, incorrect!
+% \changes{v3.3l}{1994/06/18}{Added check for empty text}
+% \begin{macrocode}
+\def \text@command #1{%
+ \def \reserved@a {#1}%
+ \ifx \reserved@a \@empty
+ \let \check@icl \@empty
+ \let \check@icr \@empty
+ \else
+% \end{macrocode}
+% |\space| is a reserved word in \LaTeX{} or actually already in
+% plain \TeX. If somebody really redefines it so many things will
+% break that I don't see any reason to make this routine here
+% slower than necessary.
+% \changes{v3.3q}{1994/12/10}{Use \cs{space} command for comparison}
+% \begin{macrocode}
+% \def \reserved@b { }%
+% \ifx \reserved@a \reserved@b
+ \ifx \reserved@a \space
+ \let \check@icl \@empty
+ \let \check@icr \@empty
+ \else
+ \check@nocorr@ #1\nocorr\@nil
+ \fi
+ \fi
+}
+\def \check@nocorr@ #1#2\nocorr#3\@nil {%
+% \end{macrocode}
+% The two checks are initialised here to their values in
+% the normal case.
+% \changes{v3.3w}{1997/10/17}{Check for vertical mode moved here, from
+% \cs{DeclareTextFontCommand} (see PR/2646).}
+% \begin{macrocode}
+ \let \check@icl \maybe@ic
+ \def \check@icr {\ifvmode \else \aftergroup \maybe@ic \fi}%
+ \def \reserved@a {\nocorr}%
+ \def \reserved@b {#1}%
+ \def \reserved@c {#3}%
+ \ifx \reserved@a \reserved@b
+ \ifx \reserved@c \@empty
+% \end{macrocode}
+% In this case there is a |\nocorr| at the start but not at the
+% end, so |\check@icl| should be empty.
+% \begin{macrocode}
+ \let \check@icl \@empty
+ \else
+% \end{macrocode}
+% Otherwise there is a |\nocorr| both at the start and
+% elsewhere, so no italic corrections should be added.
+% \begin{macrocode}
+ \let \check@icl \@empty
+ \let \check@icr \@empty
+ \fi
+ \else
+ \ifx \reserved@c \@empty
+% \end{macrocode}
+% In this case there is no |\nocorr| anywhere, so we need to check
+% for an italic correction at both the beginning and the end. This
+% has been set up as the default so no code is needed here.
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+% In this case there is no |\nocorr| at the start but there is one
+% elsewhere, so no |\aftergroup| is needed.
+% \begin{macrocode}
+ \let \check@icr \@empty
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ifmaybe@ic}
+% \changes{v3.4a}{2009/12/14}{Macro added}
+% Switch used soley within |\maybe@ic| not interfering with other
+% switches.
+% \begin{macrocode}
+\newif\ifmaybe@ic
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\maybe@ic}
+% \changes{v3.0a}{1993/12/11}{Macro name changed}
+% \begin{macro}{\maybe@ic@}
+% \changes{v3.0a}{1993/12/11}{Macro and name changed}
+% \changes{v3.4a}{2009/12/14}{Use switch \cs{ifmaybe@ic} instead of
+% \cs{if@tempswa}}
+% \task{CAR}{Make this more efficient by checking for non-characters
+% first and using \cs{if} test?}
+% These macros implement the italic correction.
+% \begin{macrocode}
+\def \maybe@ic {\futurelet\@let@token\maybe@ic@}
+\def \maybe@ic@ {%
+% \end{macrocode}
+% We first check to see if the current font is positively sloped.
+% (But do not forget the message Rainer sent about an upright font
+% with non-zero slope! Or is this an urban myth?) It has been
+% suggested that this should test against a small positive value,
+% but what?
+% \begin{macrocode}
+ \ifdim \fontdimen\@ne\font>\z@
+ \else
+ \maybe@ictrue
+% \end{macrocode}
+% It would be possible, but probably not worthwhile, to continue the
+% forward scan beyond any closing braces.
+%
+% \changes{v3.3a}{1994/04/20}{\cs{nocorr} etc removed from list of
+% tokens to check, leaving only punctuation characters}
+% \begin{macrocode}
+ \expandafter\@tfor\expandafter\reserved@a\expandafter:\expandafter=%
+ \nocorrlist
+% \end{macrocode}
+% We have to hide the |\@let@token| in the macro |\t@st@ic| rather
+% than testing it directly in the loop since it might be |\let|
+% to a |\fi| or |\else|, which would result in chaos.
+% \changes{v2.1a}{1993/11/24}{Use \cs{t@st@ic}}
+% \begin{macrocode}
+ \do \t@st@ic
+% \end{macrocode}
+% Frank thinks that the next bit it is inefficient if done after
+% the second change. Chris thinks that most all of this is
+% inefficient for the commonest cases: but that is the price of a
+% cleverer algorithm. It is certainly needed to deal with the use
+% of |\nolinebreak|.
+%
+% \begin{macrocode}
+ \ifmaybe@ic \sw@slant \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\t@st@ic}
+% \changes{v2.1a}{1993/11/24}{Macro added}
+% \changes{v3.3s}{1995/07/05}{Renamed from \cs{test@next}}
+% The next token in the input stream is stored in |\@let@token| via a
+% |\let|, the current token from |\nocorrlist| is stored via |\def|
+% in |\reserved@a|. To compare them we have to fiddle around a bit.
+%
+% If the only things to check were characters then this could be
+% done via an |\if| thus their catcodes would not matter; but this
+% will not work whilst |\futurelet| is used above.
+% \changes{v3.4a}{2009/12/14}{Use switch \cs{ifmaybe@ic} instead of
+% \cs{if@tempswa}}
+% \begin{macrocode}
+\def \t@st@ic {%
+ \expandafter\let\expandafter\reserved@b\expandafter=\reserved@a\relax
+ \ifx\reserved@b\@let@token
+% \end{macrocode}
+% If they are the same we record the fact and jump out of the loop.
+% \changes{v3.3s}{1995/07/03}{Use clean interface for jump}
+% \begin{macrocode}
+ \maybe@icfalse
+ \@break@tfor
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sw@slant}
+% \changes{v3.0a}{1993/12/11}{Macro changed}
+% \begin{macro}{\fix@penalty}
+% \changes{v3.0a}{1993/12/11}{Macro added}
+% The definition of the mysterious |\sw@slant| command is as follows.
+% \begin{macrocode}
+\def \sw@slant {%
+% \end{macrocode}
+% It is surely correct to put in an italic correction when there
+% is no skip. If the last thing on the list is actually a zero
+% skip (including things whose dimension part is zero, such as
+% |\hfill|), or anything other than a character, then the
+% italic correction will have no effect.
+%
+% In order to work correctly with unbreakable spaces from |~|
+% (and other common forms of line-breaking control) we also move
+% back across a penalty before the glue.
+% \begin{macrocode}
+ \ifdim \lastskip=\z@
+ \fix@penalty
+ \else
+ \skip@ \lastskip
+ \unskip
+ \fix@penalty
+ \hskip \skip@
+ \fi
+}
+% \end{macrocode}
+% The above code means: ``If there is a non-zero space just before
+% the current position (|\ifdim...|) save the amount of that space
+% (|\skip@\lastskip|), remove it (|\unskip|), then do a similar
+% thing if there is a penalty just before the skip,
+% and finally put the space back in.''
+%
+% Since zero glue cannot be distinguished in this context from no
+% glue, we dare not put in an |\hskip| in this case as this may
+% produce an unwanted breakpoint. This is not satisfactory.
+%
+% The penalty before the glue is handled similarly, with the same
+% caveats concerning the zero case. Is this the first recorded
+% use of |\unpenalty| in standard \LaTeX{} code?
+% \begin{macrocode}
+\def \fix@penalty {%
+ \ifnum \lastpenalty=\z@
+ \@@italiccorr
+ \else
+ \count@ \lastpenalty
+ \unpenalty
+ \@@italiccorr
+ \penalty \count@
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\nocorrlist}
+% This holds the list of characters that should prevent italic
+% correction. They should be ordered by decreasing frequency of
+% use. If any such character is made active later on one needs
+% to redefine the list so that the active character becomes part
+% of it.
+% \changes{v3.1a}{1994/01/27}{Only ., used as default for cm fonts}
+% \begin{macrocode}
+\def \nocorrlist {,.}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\nfss@text}
+% This command will by default behave like a \LaTeX{} |\mbox| but
+% may be redefined by packages such as |amstext.sty| to be a bit
+% cleverer.
+% \begin{macrocode}
+\ifx \nfss@text\@undefined
+ \def \nfss@text {\leavevmode\hbox}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclareOldFontCommand}
+% \changes{v3.2b}{1994/04/14}{Renamed from \cs{@newfontswitch}}
+% This is the function used to create declarative font-changing
+% commands that can also be used to change alphabets in math-mode.
+%
+% Usage: |\DeclareOldFontCommand \fn{|\meta{font-change decls}|}|
+% \meta{math-alphabet}
+%
+% Here |\fn| is the font-declaration command being defined,
+% \meta{font-change decls} is the declaration it will expand to in
+% text-mode, and \meta{math-alphabet} is the (single) math alphabet
+% specifier which is to be used in math-mode.
+%
+% It does not care whether the command being defined already
+% exists but it does give a warning if it redefines anything.
+%
+% Here are some typical examples of its use in conjunction with
+% more basic NFSS2 font commands.
+% \begin{verbatim}
+% \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+% \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+% \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+% \end{verbatim}
+%
+% \changes{v3.0b}{1993/12/19}{Corrected and tidied}
+% \begin{macrocode}
+\def \DeclareOldFontCommand #1#2#3{%
+ \DeclareRobustCommand #1{\@fontswitch {#2}{#3}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@fontswitch}
+% \begin{macro}{\@@math@egroup}
+% \begin{macro}{\@@math@egroup}
+% These two commands actually do the necessary tests and
+% declarative \mbox{font-} or alphabet-changing.
+%
+% \changes{v3.3c}{1994/05/05}{Corrected \cs{@fontswitch} and added
+% saved versions}
+% \changes{v3.3q}{1994/12/10}{Don't read arguments}
+% \changes{v3.3r}{1995/04/02}{Read them again to be able to add \cs{relax}.}
+% \begin{macrocode}
+\def \@fontswitch #1#2{%
+ \ifmmode
+ \let \math@bgroup \relax
+ \def \math@egroup {\let \math@bgroup \@@math@bgroup
+ \let \math@egroup \@@math@egroup}%
+% \end{macrocode}
+% We need to have a |\relax| in the following line in case the |#2|
+% is something like |\mathsf| grabbing the next token as an
+% argument. For this reason the code also uses explicit arguments
+% again (see pr/1275).
+% \begin{macrocode}
+ #2\relax
+ \else
+ #1%
+ \fi
+}
+\let \@@math@bgroup \math@bgroup
+\let \@@math@egroup \math@egroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v2.1b}{1993/12/08}{Macros \cs{rm}, \cs{bf} and \cs{sf}
+% moved to classes.dtx}
+%
+% These commands are available only in the preamble.
+% \begin{macrocode}
+\@onlypreamble \DeclareTextFontCommand
+\@onlypreamble \DeclareOldFontCommand
+% \end{macrocode}
+%
+% \section{Initialization}
+% \changes{v3.0b}{1993/12/19}{Added by ASAJ.}
+% \changes{v3.0b}{1993/12/19}{Wording changes by CAR.}
+%
+% \begin{macro}{\normalsize}
+% \changes{v3.3d}{1994/05/08}{Removed \cs{@undefinedfonterror}}
+% \changes{v3.3o}{1994/11/12}{Added \cs{MessageBreak}}
+% This is defined to produce an error.
+% \begin{macrocode}
+\def\normalsize{%
+ \@latex@error {The font size command \protect\normalsize\space
+ is not defined:\MessageBreak
+ there is probably something wrong with
+ the class file}\@eha
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/ltfssbas.dtx b/macros/latex-dev/base/ltfssbas.dtx
new file mode 100644
index 0000000000..11abbae112
--- /dev/null
+++ b/macros/latex-dev/base/ltfssbas.dtx
@@ -0,0 +1,2031 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltfssbas.dtx
+%% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf
+%
+%<*driver>
+% \fi
+%
+%
+\ProvidesFile{ltfssbas.dtx}
+ [2019/07/09 v3.2c LaTeX Kernel (NFSS Basic Macros)]
+% \iffalse
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{ltfssbas.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \iffalse
+%<+checkmem>\def\CHECKMEM{\tracingstats=2
+%<+checkmem> \newlinechar=`\^^J
+%<+checkmem> \message{^^JMemory usage: \filename}\shipout\hbox{}}
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+%
+% \GetFileInfo{ltfssbas.dtx}
+% \title{A new font selection scheme for \TeX{} macro packages\\
+% (Basic Macros)\thanks
+% {This file has version number
+% \fileversion\ dated \filedate}}
+%
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This file contains the main implementation of the `low level' font
+% selection commands. See other parts of the \LaTeX\
+% distribution, or \emph{The \LaTeX\ Companion} for higher level
+% documentation of the \LaTeX\ `New' Font Selection Scheme.
+%
+% \begin{quote}
+% \textbf{Warning:}
+% The macro documentation is still basically the documentation from the
+% first NFSS release and therefore in some cases probably not
+% completely accurate.
+% \end{quote}
+%
+% \StopEventually{}
+%
+% \changes{v3.0v}{1998/08/17}{(RmS) Documentation fixes.}
+% \changes{v3.0j}{1995/10/22}{(RmS) New size function macro
+% \cs{genb@sfcnt} needs to be disabled at \cs{document}.}
+% \changes{v3.0i}{1995/10/20}
+% {(DPC) Modify autoload code, change \cs{undefined}}
+% \changes{v3.0g}{1995/10/04}{Modify autoload code}
+% \changes{v3.0f}{1995/08/24}{Added autoload code}
+% \changes{v3.0d}{1995/07/13}
+% {minor documentation changes}
+% \changes{v3.0c}{1995/06/15}
+% {(DPC) minor documentation changes}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Make file from previous file, fam.dtx 1995/05/20 v2.2d}
+%
+%
+% \changes{v2.1x}{1994/11/18}{(DPC) use \cs{reserved@f} not \cs{next}}
+% \changes{v2.1q}{1994/05/20}{Use new error commands}
+% \changes{v2.1o}{1994/05/15}{encoding cmds changed to {enc}-cmd}
+% \changes{v2.1k}{1994/05/13}{Remove File identification `typeout'}
+% \changes{v2.1j}{1994/05/12}{New baselinestretch concept}
+% \changes{v2.1j}{1994/05/12}{Replaced hand-protected commands by
+% \cs{DeclareRobustCommand} defs}
+% \changes{v2.1h}{1994/04/11}{Added \cs{defaultscriptratio} and
+% \cs{defaultscriptscriptratio}. ASAJ.}
+% \changes{v2.1g}{1994/03/13}{add 2ekernel module to omit repeated code}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% \changes{v2.0c}{1993/03/18}{Changed all \cs{@tempdima} in
+% \cs{@tempdimb} to avoid killing \cs{numberline}}
+% \changes{v1.91a}{1992/09/22}{Introduced \cs{tf@size} for math size.}
+% \changes{v1.3a}{1991/11/27}{All \cs{family}, \cs{shape} etc.
+% renamed to \cs{fontfamily} etc.}
+% \changes{v1.2i}{1990/04/01}{Code added from tracefnt.dtx.}
+% \changes{v1.2i}{1990/04/01}{Support for TeX3.}
+% \changes{v1.2g}{1990/02/16}{Support for changes of \cs{baselineskip}
+% without changing the size.}
+%
+% \changes{v1.2c}{1990/01/23}{\cs{no@version@warning} renamed to
+% \cs{no@alphabet@error}.}
+% \changes{v1.0s}{1989/11/25}{All \cs{edef}\cs{font@name} changed to
+% \cs{xdef}\cs{font@name}.
+% Necessary after introduction of
+% \cs{begingroup}/\cs{endgroup} in v1.0q.}
+% \changes{v1.0s}{1989/11/25}{extra// $\to$ + in \cs{extra@def}.}
+% \changes{v1.0o}{1989/11/08}{First parameter of
+% \cs{define@mathalphabet}
+% and \cs{define@mathgroup} changed
+% from string to control sequence.}
+% \changes{v1.0m}{1989/09/14}
+% {Global replacement: \cs{group} to \cs{mathgroup}}
+% \changes{v1.0k}{1989/05/22}{Lines longer than 72 characters folded.}
+% \changes{v1.0j}{1989/05/01}{Default for \cs{baselinestretch} added.}
+% \changes{v1.0i}{1989/04/29}
+% {Removed the \cs{halign} \cs{noalign} correction
+% (wasn't bugfree)}
+% \changes{v1.0h}{1989/04/29}{Documented problem with \cs{halign}, and
+% \cs{noalign}}
+% \changes{v1.0g}{1989/04/27}{Documentation revised.}
+% \changes{v1.0f}{1989/04/23}{\% in \cs{getanddefinefonts} added.}
+% \changes{v1.0e}{1989/04/21}{Documentation is fun!!
+% Parameters of \cs{define@mathalphabet} changed.}
+% \changes{v1.0d}{1989/04/19}{Even more doc.}
+% \changes{v1.0c}{1989/04/14}{More documentation added.}
+% \changes{v1.0b}{1989/04/10}{\cs{preload@sizes} added.}
+% \changes{v1.0b}{1989/04/10}{\cs{wrong@fontshape} changed to define
+% substitution font/shape macro.}
+% \changes{v1.0a}{1989/04/10}{Starting with version numbers!!
+% \cs{ifmmode} added in \cs{math@group}}
+% \changes{v2.1w}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v3.0z}{2015/02/21}
+% {Removed autoload code}
+%
+%
+% The `2ekernel' code ensures that a |\usepackage{autofss1}| is
+% essentially ignored if a `full' format is being used that has
+% picture mode already in the format.
+%
+% Note the |autofss2| loading is currently disabled.
+%
+% \begin{macrocode}
+%<2ekernel>\expandafter\let\csname ver@autofss1.sty\endcsname\fmtversion
+% \end{macrocode}
+%
+%
+% \section{Preliminary macros}
+%
+% We define a number
+% of macros that will be used later.
+%
+%
+% \begin{macro}{\@nomath}
+% |\@nomath| is used by most macros that will have no effect
+% in math mode. It issues a warning message.
+% \begin{macrocode}
+%<*2ekernel>
+\def\@nomath#1{\relax\ifmmode
+ \@font@warning{Command \noexpand#1invalid in math mode}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.2c}{1990/01/23}{Macro \cs{no@alphabet@help} added}
+% \changes{v2.1i}{1994/04/18}{Macro \cs{no@alphabet@help}
+% removed again}
+%
+% \begin{macro}{\no@alphabet@error}
+% \changes{v1.2c}{1990/01/23}{Changed to error call}
+% \changes{v2.1i}{1994/04/18}{Use std LaTeX error macro}
+% The macro |\no@alphabet@error| is called whenever
+% the user requests a math \emph{alphabet} that is not
+% available in the current \emph{version}.
+% In math mode an error message is produced otherwise the command
+% keeps silent.
+% The argument is the name of the control sequence that identifies
+% the math \emph{alphabet}.
+% The |\relax| at the beginning is necessary to prevent
+% \TeX{} from scanning too far in certain situations.
+% \begin{macrocode}
+\gdef\no@alphabet@error#1{\relax \ifmmode
+ \@latex@error{Math\space alphabet\space identifier\space
+ \noexpand#1is\space undefined\space in\space math\space
+ version\space `\math@version'}%
+ {Your\space requested\space math\space alphabet\space
+ is\space undefined\space in\space the\space current\space
+ math\space version.^^JCheck\space the\space spelling\space
+ or\space use\space the\space \noexpand\SetMathAlphabet\space
+ command.}
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\new@mathgroup}
+% \begin{macro}{\mathgroup}
+% We also give a new name to |\newfam| and |\fam|
+% to avoid verbal confusion
+% (see the introduction).\footnote{For the same reason
+% it seems advisable to
+% {\ttfamily\bslash let\bslash fam} and
+% {\ttfamily\bslash newfam}
+% equal to {\ttfamily\bslash relax},
+% but this is commented out to retain
+% compatibility to existing style files.}
+% \changes{v1.2e}{1990/01/28}{\cs{newfam} let to \cs{new@mathgroup}.}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) No need to redefine \cs{newfam} as not outer}
+% \changes{v3.0b}{1995/05/27}
+% {(FMi) But a need to define \cs{new@mathgroup}}
+% \changes{v3.0y}{2014/12/30}
+% {move allocation to ltplain.}
+% \begin{macrocode}
+%\def\new@mathgroup{\alloc@8\mathgroup\chardef\sixt@@n}
+\let\mathgroup\fam
+%\let\newfam\new@mathgroup
+\@onlypreamble\new@mathgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \section{Macros for setting up the tables}
+%
+% \begin{macro}{\DeclareFontShape}
+%
+% \changes{v1.9a}{1992/07/26}{Introduced \cs{DeclareFontShape}}
+% The macro |\DeclareFontShape| takes $6$ arguments:
+% \begin{macrocode}
+\def\DeclareFontShape{\begingroup
+% \end{macrocode}
+% First we restore the catcodes of all characters used in the syntax.
+% \changes{v2.1e}{1994/02/24}
+% {Separate restoration of catcodes for fd cmds}
+% \begin{macrocode}
+ \nfss@catcodes
+% \end{macrocode}
+% We use |\expandafter| |\endgroup| to restore catcode in case
+% something goes wrong with the argument parsing (suggested by Tim
+% Van Zandt)
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\DeclareFontShape}
+% \changes{v2.1c}{1994/02/07}{revert catcode settings earlier}
+% \changes{v3.0m}{1995/11/01}
+% {(DPC) Test for \cs{relax} not \cs{undefined}, internal/1933}
+% \begin{macrocode}
+ \expandafter\endgroup
+ \DeclareFontShape@}
+\def\DeclareFontShape@#1#2#3#4#5#6{%
+ \expandafter\ifx\csname #1+#2\endcsname\relax
+ \@latex@error{Font family `#1+#2' unknown}\@eha
+ \else
+ \expandafter
+ \xdef\csname#1/#2/#3/#4\endcsname{\expandafter\noexpand
+ \csname #5\endcsname}%
+ \def\reserved@a{#6}%
+ \global
+ \expandafter\let\csname#5\expandafter\endcsname
+ \ifx\reserved@a\@empty
+ \@empty
+ \else
+ \reserved@a
+ \fi
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclareFixedFont}
+% Define a direct font switch that avoids all overhead.
+% \changes{v2.1u}{1994/11/06}{Renamed
+% \cs{every@size} to \cs{every@math@size}.}
+% \begin{macrocode}
+\def\DeclareFixedFont#1#2#3#4#5#6{%
+ \begingroup
+ \math@fontsfalse
+ \every@math@size{}%
+ \fontsize{#6}\z@
+ \usefont{#2}{#3}{#4}{#5}%
+ \global\expandafter\let\expandafter#1\the\font
+ \endgroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\do@subst@correction}
+%
+% \begin{macrocode}
+\def\do@subst@correction{%
+ \xdef\subst@correction{%
+ \font@name
+ \global\expandafter\font
+ \csname \curr@fontshape/\f@size\endcsname
+ \noexpand\fontname\font
+ \relax}%
+% \end{macrocode}
+% Calling |\subst@correction| after the current group means calling
+% it after we have loaded the substitution font which is done
+% inside a group.
+% \begin{macrocode}
+ \aftergroup\subst@correction
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFontFamily}
+% \begin{macrocode}
+\def\DeclareFontFamily#1#2#3{%
+% \end{macrocode}
+% If we want fast checking for the encoding scheme we can just
+% check for |\T@..| being defined.
+% \begin{macrocode}
+% \@tempswafalse
+% \def\reserved@b{#1}%
+% \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
+% \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
+% \cdp@list
+% \if@tempswa
+ \@ifundefined{T@#1}%
+ {%
+ \@latex@error{Encoding scheme `#1' unknown}\@eha
+ }%
+ {%
+% \end{macrocode}
+% Now we have to define the macro |\|\meta{\#1}|+|\meta{\#2}
+% to contain |#3|. But since most of the time |#3| will be empty
+% we use |\let| in a tricky way rather than a simple |\def| since
+% this will save internal memory.
+% We store the argument |#3| in a temporary macro
+% |\reserved@a|.
+% \begin{macrocode}
+ \def\reserved@a{#3}%
+% \end{macrocode}
+% We compare |\reserved@a| with |\@empty|
+% If these two are the same we |\let| the `extra'
+% macro equal to |\@empty| which is not the same a doing a |\let|
+% to |\reserved@a| --- the latter would blow one extra memory
+% location rather then reusing the one from |\@empty|.
+% \begin{macrocode}
+ \global
+ \expandafter\let\csname #1+#2\expandafter\endcsname
+ \ifx \reserved@a\@empty
+ \@empty
+ \else \reserved@a
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\cdp@list}
+% We initialize the code page list to be empty.
+% \begin{macrocode}
+\let\cdp@list\@empty
+\@onlypreamble\cdp@list
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cdp@elt}
+% \begin{macrocode}
+\let\cdp@elt\relax
+\@onlypreamble\cdp@elt
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\DeclareFontEncoding}
+% \begin{macrocode}
+\def\DeclareFontEncoding{%
+% \end{macrocode}
+% First we start with ignoring all blanks and newlines since every
+% surplus space in the second or third argument will come out in
+% a weird place in the document.
+% \changes{v2.1c}{1994/02/07}{revert catcode settings earlier}
+% \changes{v2.1t}{1994/10/19}{Add missing \cs{relax}.}
+% \changes{v2.1z}{1994/12/06}{use \cs{nfss@catcodes}}
+% \begin{macrocode}
+ \begingroup
+ \nfss@catcodes
+ \expandafter\endgroup
+ \DeclareFontEncoding@}
+\@onlypreamble\DeclareFontEncoding
+% \end{macrocode}
+% \changes{v2.0g}{1993/09/15}
+% {Corrected: \cs{default@T} to \cs{default@M}.}
+% \begin{macrocode}
+\def\DeclareFontEncoding@#1#2#3{%
+ \expandafter
+ \ifx\csname T@#1\endcsname\relax
+ \def\cdp@elt{\noexpand\cdp@elt}%
+ \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
+ {\default@family}{\default@series}%
+ {\default@shape}}%
+% \end{macrocode}
+% To support encoding dependent commands (like accents) we
+% initialise the command
+% |\|\meta{encoding}|-cmd| to be |\@changed@cmd|.
+% (See \texttt{ltoutenc.dtx} for details.)
+% \changes{v2.1l}{1994/05/13}{Init encoding change command}
+% \changes{v2.1n}{1994/05/14}{Only init enc change cmd when
+% new encoding}
+% \changes{v2.1n}{1994/05/14}{Log if encoding is redeclared}
+% \begin{macrocode}
+ \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
+ \else
+ \@font@info{Redeclaring font encoding #1}%
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \global\@namedef{T@#1}{#2}%
+ \global\@namedef{M@#1}{\default@M#3}%
+% \end{macrocode}
+% Keep a record of the last encoding being declared:
+% \changes{v3.0w}{1999/01/06}{Added \cs{LastDeclaredEncoding} to
+% support cyrillic integration (pr/2988)}
+% \begin{macrocode}
+ \xdef\LastDeclaredEncoding{#1}%
+ }
+\@onlypreamble\DeclareFontEncoding@
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LastDeclaredEncoding}
+% \changes{v3.0w}{1999/01/06}{Added \cs{LastDeclaredEncoding} to
+% support cyrillic integration (pr/2988)}
+% The last encoding being declared by |\DeclareFontEncoding|.
+% \begin{macrocode}
+\def\LastDeclaredEncoding{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFontSubstitution}
+% \begin{macrocode}
+\def\DeclareFontSubstitution#1#2#3#4{%
+ \expandafter
+ \ifx\csname T@#1\endcsname\relax
+ \@latex@error{Encoding scheme `#1' unknown}\@eha
+ \else
+ \begingroup
+% \end{macrocode}
+% \changes{v3.0x}{2002/10/02}{Adding \cs{LastDeclaredEncoding}
+% introduced a bug as on some occasions that macro name was stored
+% in the internal lists instead of the actual encoding. (pr/3459)}
+% We loop through the |\cdp@list| and rebuild it anew in |\toks@|
+% thereby replacing the defaults for the encoding in question with
+% the new defaults. It is important to store the encoding to test
+% against expanded in |\reserved@a| since it might just be
+% |\LastDeclaredEncoding| that is passed as |#1|.
+% \begin{macrocode}
+ \edef\reserved@a{#1}%
+ \toks@{}%
+ \def\cdp@elt##1##2##3##4{%
+ \def\reserved@b{##1}%
+ \ifx\reserved@a\reserved@b
+% \end{macrocode}
+% Here we use the new defaults but we use |##1| (i.e., the encoding
+% name already stored previously) since we know that it is expanded.
+% \begin{macrocode}
+ \addto@hook\toks@{\cdp@elt{##1}{#2}{#3}{#4}}%
+ \else
+% \end{macrocode}
+% If |\reserved@a| and |\reserved@b| differ then we simply copy
+% from the old list to the new.
+% \begin{macrocode}
+ \addto@hook\toks@{\cdp@elt{##1}{##2}{##3}{##4}}%
+ \fi}%
+ \cdp@list
+ \xdef\cdp@list{\the\toks@}%
+ \endgroup
+ \global
+ \@namedef{D@#1}{%
+ \def\default@family{#2}%
+ \def\default@series{#3}%
+ \def\default@shape{#4}%
+ }%
+ \fi
+ }
+\@onlypreamble\DeclareFontSubstitution
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclareFontEncodingDefaults}
+% \begin{macrocode}
+\def\DeclareFontEncodingDefaults#1#2{%
+ \ifx\relax#1\else
+ \ifx\default@T\@empty\else
+ \@font@info{Overwriting encoding scheme text defaults}%
+ \fi
+ \gdef\default@T{#1}%
+ \fi
+ \ifx\relax#2\else
+ \ifx\default@M\@empty\else
+ \@font@info{Overwriting encoding scheme math defaults}%
+ \fi
+ \gdef\default@M{#2}%
+ \fi
+}
+\@onlypreamble\DeclareFontEncodingDefaults
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\default@T}
+% \begin{macro}{\default@M}
+% \begin{macrocode}
+\let\default@T\@empty
+\let\default@M\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclarePreloadSizes}
+% \begin{macrocode}
+\def\DeclarePreloadSizes#1#2#3#4#5{%
+ \@ifundefined{T@#1}%
+ {\@latex@error{Encoding scheme `#1' unknown}\@eha}%
+ {%
+% \end{macrocode}
+% Don't know at the moment what this group here does!
+% \begin{macrocode}
+ \begingroup
+% \end{macrocode}
+% We define a macro |\reserved@f|\footnote{We cannot use
+% {\ttfamily\bslash @tempa}
+% since it is needed in
+% {\ttfamily\bslash pickup@font}.}
+% that grabs the next \emph{size} and loads the corresponding
+% font.
+% This is done by delimiting |\reserved@f|'s only argument by the
+% \textsf{token} |,| (comma).
+% \begin{macrocode}
+ \def\reserved@f##1,{%
+% \end{macrocode}
+% The end of the list will be detected when there are no more
+% elements, i.e.\ when |\reserved@f|'s argument is empty.
+% The trick used here is explained in Appendix~D of the
+% \TeX{}book: if the argument is empty the |\if|
+% will select the first clause and |\let| |\reserved@f|
+% equal to |\relax|.
+% (We use the |>| character here since it cannot appear
+% in font file names.)
+% \changes{v1.2j}{1990/06/24}{Missing percent added.}
+% \begin{macrocode}
+ \if>##1>%
+ \let\reserved@f\relax
+ \else
+% \end{macrocode}
+% Otherwise, we define |\font@name| appropriately and
+% call |\pickup@font| to do the work.
+% Note that the requested |\curr@fontshape|
+% combination must have been defined, or you will get an error.
+% The definition of |\font@name| is carried out globally
+% to be consistent with the rest of the code in this file.
+% \begin{macrocode}
+ \xdef\font@name{\csname#1/#2/#3/#4/##1\endcsname}%
+ \pickup@font
+% \end{macrocode}
+% Now we forget the name of the font just loaded.
+% More precisely, we set the corresponding control sequence
+% to |\relax|. This means that later on, when the font
+% is first used, the macro |\define@newfont| is called
+% again to execute the `extra' macro for this font.
+% \changes{v1.2d}{1990/01/27}{Font identifier set to \cs{relax}.}
+% \begin{macrocode}
+ \global\expandafter\let\font@name\relax
+ \fi
+% \end{macrocode}
+% Finally we call |\reserved@f| again to process the next
+% \emph{size}. If |\reserved@f| was |\let| equal to |\relax|
+% this will end the macro.
+% \begin{macrocode}
+ \reserved@f}%
+% \end{macrocode}
+% We finish with reinserting the list of sizes after the
+% |\reserved@f|
+% macro and appending an empty element so that the end of the list
+% is recognized properly.
+% \begin{macrocode}
+ \reserved@f#5,,%
+ \endgroup
+ }%
+}
+\@onlypreamble\DeclarePreloadSizes
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\ifmath@fonts}
+% We need a switch to decide if we have to switch math fonts.
+% For this purpose we provide |\ifmath@fonts|
+% that can be set to true or false by the |\S@...| macros
+% depending on if math fonts
+% are provided for this size or not.
+% The default is of course to switch all fonts.
+% \begin{macrocode}
+\newif\ifmath@fonts \math@fontstrue
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\DeclareMathSizes}
+% \begin{macro}{\DeclareMathSizes*}
+% |\DeclareMathSizes| takes the text size, math text size, math
+% script size, and math scriptscript size as arguments and defines
+% the right |\S@|\dots{} macro.
+%
+% \begin{macrocode}
+\def\DeclareMathSizes{%
+ \@ifstar{\@DeclareMathSizes\math@fontsfalse}%
+ {\@DeclareMathSizes{}}}
+\@onlypreamble\DeclareMathSizes
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@DeclareMathSizes}
+% \changes{v3.0p}{1996/07/26}{use faster \cs{if} test}
+% This modification by Michael J. Downes on comp.text.tex on 2002/10/17
+% allows the user to have settings such as\\
+% |\DeclareMathSizes{9.5dd}{9.5dd}{7.4dd}{6.6dd}|.
+% \changes{v3.0y}{2015/01/11}{Allow arbitrary units (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@DeclareMathSizes}%
+%<latexrelease> {Arbitrary units in \DeclareMathSizes}%
+%<*2ekernel|latexrelease>
+\def\@DeclareMathSizes #1#2#3#4#5{%
+ \@defaultunits\dimen@ #2pt\relax\@nnil
+ \if $#3$%
+ \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
+ \else
+ \@defaultunits\dimen@ii #3pt\relax\@nnil
+ \@defaultunits\@tempdima #4pt\relax\@nnil
+ \@defaultunits\@tempdimb #5pt\relax\@nnil
+ \toks@{#1}%
+ \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
+ \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
+ \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
+ \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
+ \the\toks@
+ }%
+ \fi
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@DeclareMathSizes}%
+%<latexrelease> {Arbitrary units in \DeclareMathSizes}%
+%<latexrelease>\def\@DeclareMathSizes#1#2#3#4#5{%
+%<latexrelease> \@defaultunits\dimen@#2pt\relax\@nnil
+%<latexrelease> \if$#3$%
+%<latexrelease> \expandafter \let
+%<latexrelease> \csname S@\strip@pt\dimen@\endcsname
+%<latexrelease> \math@fontsfalse
+%<latexrelease> \else
+%<latexrelease> \expandafter \gdef
+%<latexrelease> \csname S@\strip@pt\dimen@\endcsname
+%<latexrelease> {\gdef\tf@size{#3}\gdef\sf@size{#4}%
+%<latexrelease> \gdef\ssf@size{#5}%
+%<latexrelease> #1%
+%<latexrelease> }%
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\@DeclareMathSizes
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \section{Selecting a new font}
+%
+% \subsection{Macros for the user}
+%
+%
+% \begin{macro}{\fontencoding}
+% \changes{v2.1j}{1994/05/12}{Use \cs{DeclareRobustCommand}.}
+% \begin{macro}{\f@encoding}
+% As we said in the introduction a font is described by four parameters.
+% We first define macros to specify the wanted \emph{family},
+% \emph{series}, or \emph{shape}.
+% These are simply recorded in internal macros
+% |\f@family|, |\f@series|, and |\f@shape|, resp.
+% We use |\edef|'s so that the arguments can also be macros.
+% \begin{macrocode}
+\DeclareRobustCommand\fontencoding[1]{%
+ \expandafter\ifx\csname T@#1\endcsname\relax
+ \@latex@error{Encoding scheme `#1' unknown}\@eha
+ \else
+ \edef\f@encoding{#1}%
+ \ifx\cf@encoding\f@encoding
+% \end{macrocode}
+% If the new encoding is the same as the old
+% encoding we have nothing to do.
+% However, in case we had a sequence of several encoding changes
+% without a |\selectfont| in-between we can save processing by
+% making sure that |\enc@update| is |\relax|.
+% \begin{macrocode}
+ \let\enc@update\relax
+ \else
+% \end{macrocode}
+% If current and new encoding differ we define the macro
+% |\enc@update|
+% to contain all updates necessary at |\selectfont| time.
+% \begin{macrocode}
+ \let\enc@update\@@enc@update
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@enc@update}
+% \begin{macrocode}
+\def\@@enc@update{%
+% \end{macrocode}
+% When |\@@enc@update| is executed |\f@encoding| holds the encoding
+% name
+% for the new encoding and |\cf@encoding| the name of the last active
+% encoding.
+%
+% We start by setting the init command for encoding dependent
+% macros to |\@changed@cmd|.
+% \begin{macrocode}
+ \expandafter
+ \let
+ \csname\cf@encoding -cmd\endcsname
+ \@changed@cmd
+% \end{macrocode}
+% Then we turn the one for the new encoding to |\@current@cmd| (see
+% \texttt{ltoutenc.dtx} for further explanations).
+% \begin{macrocode}
+ \expandafter
+ \let
+ \csname\f@encoding-cmd\endcsname
+ \@current@cmd
+% \end{macrocode}
+% We execute the default settings |\default@T|, followed by the one
+% for the new encoding.
+% \begin{macrocode}
+ \default@T
+ \csname T@\f@encoding\endcsname
+% \end{macrocode}
+% Finally we change the default substitution values, disable
+% |\enc@update| and make |\f@encoding| officially the current
+% encoding.
+% \begin{macrocode}
+ \csname D@\f@encoding\endcsname
+ \let\enc@update\relax
+ \let\cf@encoding\f@encoding
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\enc@update}
+% \changes{v2.1m}{1994/05/14}{Macro added}
+% The default action in |\selectfont| is to do nothing.
+% \begin{macrocode}
+\let\enc@update\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontfamily}
+% \changes{v2.1j}{1994/05/12}{Use \cs{DeclareRobustCommand}.}
+% \begin{macro}{\f@family}
+% \begin{macro}{\fontseries}
+% \changes{v2.1j}{1994/05/12}{Use \cs{DeclareRobustCommand}.}
+% \begin{macro}{\f@series}
+% \begin{macro}{\fontshape}
+% \changes{v2.1j}{1994/05/12}{Use \cs{DeclareRobustCommand}.}
+% \changes{v2.1y}{1994/11/30}{Use \cs{@current@cmd} in
+% \cs{@@enc@update}. ASAJ.}
+% \begin{macro}{\f@shape}
+% \begin{macrocode}
+\DeclareRobustCommand\fontfamily[1]{\edef\f@family{#1}}
+\DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}}
+\DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}}
+% \end{macrocode}
+% Some handy abbreviation if you want to get some particular font
+% in the current size. If also the size should change one has to
+% issue a |\fontsize| command first.
+% \begin{macrocode}
+\def\usefont#1#2#3#4{\fontencoding{#1}\fontfamily{#2}%
+ \fontseries{#3}\fontshape{#4}\selectfont
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\linespread}
+% \changes{v2.1j}{1994/05/12}{New macro}
+% \changes{v2.1p}{1994/05/16}{Remove surplus braces}
+% The command |\linespread| changes the current |\baselinestretch|
+% by calling |\set@fontsize|. The values for |\f@size| and
+% |\f@baselineskip| will be left unchanged.
+% \begin{macrocode}
+\DeclareRobustCommand\linespread[1]
+ {\set@fontsize{#1}\f@size\f@baselineskip}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fontsize}
+% \changes{v2.1j}{1994/05/12}{Redefined to use \cs{set@fontsize}}
+% \changes{v2.1p}{1994/05/16}{Pass \cs{baselinstretch} not
+% \cs{f@linespread}}
+% We also define a macro that allows to specify a size. In this
+% case, however, we also need the value of |\baselineskip|. As the
+% first argument to |\set@fontsize| we pass the current value of
+% |\baselinestretch|. This will either match the internal value (in
+% which case nothing changes, or it will be an updated value due to
+% a user change of that macro using |\renewcommand|. If we would
+% pass the internal |\f@linespread| such a change would be
+% effectively overwritten by a size change.
+% \begin{macrocode}
+\DeclareRobustCommand\fontsize[2]
+ {\set@fontsize\baselinestretch{#1}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{v2.1n}{1994/05/14}{Set defaults for all \cs{f@...}}
+%
+% \begin{macro}{\f@linespread}
+% \changes{v2.1j}{1994/05/12}{New macro}
+% This macro holds the current internal value for
+% |\baselinestretch|.
+% \begin{macrocode}
+\let\f@family\@empty
+\let\f@series\@empty
+\let\f@shape\@empty
+\let\f@size\@empty
+\let\f@baselineskip\@empty
+\let\f@linespread\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cf@encoding}
+% \changes{v2.1u}{1994/11/06}{New macro}
+% \begin{macrocode}
+\let\f@encoding\@empty
+\let\cf@encoding\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@defaultunits}
+%
+% The function |\@defaultunits| when wrapped around a dimen or skip
+% assignment supplies default units. Usage:
+%
+% |\@defaultunits\dimen@=#1pt\relax\@nnil|
+%
+% Note: the |\relax| is *important*. Other units can be substituted
+% for the `pt' if desired.
+%
+% We use |\remove@to@nnil| as an auxiliary macros for
+% |\@defaultunits|. It just has to gobble the supplied default unit
+% `pt' or whatever, if it wasn't used in the assignment.
+% \begin{macrocode}
+\def\@defaultunits{\afterassignment\remove@to@nnil}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\strip@pt}
+% \begin{macro}{\rem@pt}
+% This macro strips the characters |pt| produced by using |\the|
+% on a dimen register.
+% \begin{macrocode}
+\begingroup
+ \catcode`P=12
+ \catcode`T=12
+ \lowercase{
+ \def\x{\def\rem@pt##1.##2PT{##1\ifnum##2>\z@.##2\fi}}}
+ \expandafter\endgroup\x
+\def\strip@pt{\expandafter\rem@pt\the}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\mathversion}
+% \changes{v1.0h}{1989/04/29}{Test if version defined added.}
+% \changes{v1.0m}{1989/09/14}
+% {Corrected typo: \cs{endscname} to \cs{endcsname}.}
+% \changes{v2.1j}{1994/05/12}{Use \cs{DeclareRobustCommand}.}
+% \begin{macro}{\math@version}
+% |\mathversion| takes the math \emph{version} name as
+% argument, defines |\math@version| appropriately and switches
+% to the font selected
+% forcing a call to |\glb@settings| if the \emph{version} is
+% known to the system.
+% \changes{v1.0p}{1989/11/14}{Math version prefix `mv@' added.}
+% \changes{v1.0r}{1989/11/22}
+% {\cs{def} $\to$ \cs{edef} for \cs{math@version}.}
+% \changes{v1.2g}{1990/02/16}{\cs{@nomath} added.}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% \begin{macrocode}
+\DeclareRobustCommand\mathversion[1]
+ {\@nomath\mathversion
+ \expandafter\ifx\csname mv@#1\endcsname\relax
+ \@latex@error{Math version `#1' is not defined}\@eha\else
+ \edef\math@version{#1}%
+% \end{macrocode}
+% We need to force a math font setup both now and at the point
+% where we return to the previous math version.
+% Forcing a math font setup can simply be done by setting
+% |\glb@currsize| to an invalid value since this will trigger the
+% setup when the formula starts.
+% \begin{macrocode}
+ \gdef\glb@currsize{}%
+% \end{macrocode}
+% When the scope of the current |\mathversion| ends we need to
+% restore the old setup. However this time we need to force it
+% directly at least if we are inside math, otherwise we could wait.
+% Another way to enhance this code here is todo the setting only if
+% the version really has changed after all. This might be
+% interesting in case of \texttt{amstext} and \texttt{boldsymbol}.
+% \changes{v2.1b}{1994/01/25}{Corrections for math setup}
+% \begin{macrocode}
+ \aftergroup\glb@settings
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% If \TeX{} would support a hook just before the end of a formula
+% (opposite of |\everymath| so to speak) the implementation of the
+% algorithm would be much simpler because in that case we would set up
+% the correct math fonts at this point without having to worry about
+% incorrect settings due to nesting. The same would be true if in
+% \LaTeX{} the use of |$| (as the primitive \TeX{} command) would be
+% impossible and instead only a higher-level interface would be
+% available. Note that this does not mean that a |$| couldn't be the
+% short-hand for starting and stopping that higher-level interface, it
+% only means that the direct \TeX{} function must be hidden.
+%
+% Anyway, since we don't have this and won't have it in \LaTeXe{} we
+% need to implement it in a somewhat slower way.
+%
+%
+% We test for the current math font setup on entry of a formula,
+% i.e., on the
+% hooks |\everymath| and |\everydisplay|. But since these hooks may
+% contain user data we provide ourselves with an internal version of
+% these hooks which stays frozen.
+%
+%
+% \begin{macro}{\frozen@everymath}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% \begin{macro}{\frozen@everydisplay}
+% New internal names for |\everymath| and |\everydisplay|.
+% \begin{macrocode}
+\let\frozen@everymath\everymath
+\let\frozen@everydisplay\everydisplay
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\everymath}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% \begin{macro}{\everydisplay}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% Now we provide now user hooks that will be called in the
+% frozen internals.
+% \begin{macrocode}
+\newtoks\everymath
+\newtoks\everydisplay
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\frozen@everymath}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% Now we define the behaviour of the frozen hooks: first
+% check the math setup then call the user hook.
+% \begin{macrocode}
+\frozen@everymath = {\check@mathfonts
+ \the\everymath}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\frozen@everydisplay}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% Ditto for the display hook.
+% \begin{macrocode}
+\frozen@everydisplay = {\check@mathfonts
+ \the\everydisplay}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v3.0q}{1996/07/27}{\cs{if@inmath} switch removed}
+%
+% \begin{macro}{\curr@math@size}
+% \changes{v2.1a}{1994/01/17}{New math font setup}
+% This holds locally the current math size.
+% \begin{macrocode}
+\let\curr@math@size\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Macros for loading fonts}
+%
+% \begin{macro}{\pickup@font}
+% The macro |\pickup@font| which is used in
+% |\selectfont| is very simple:
+% if the font name is undefined (i.e.\ not known yet) it calls
+% |\define@newfont| to load it.
+% \begin{macrocode}
+\def\pickup@font{%
+ \expandafter \ifx \font@name \relax
+ \define@newfont
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\split@name}
+% |\pickup@font| assumes that |\font@name| is set
+% but it is sometimes called when |\f@family|, |\f@series|,
+% |\f@shape|, or |\f@size| may have the wrong settings
+% (see, e.g., the definition of |\getanddefine@fonts|).
+% Therefore we need a macro to extract font \emph{family},
+% \emph{series}, \emph{shape}, and \emph{size} from the font name.
+% To this end we define |\split@name| which takes the font
+% name as a list of characters of |\catcode| 12 (without the
+% backslash at the beginning) delimited by the
+% special control sequence |\@nil|.
+% This is not very complicated: we first ensure that |/| has
+% the right |\catcode|
+% \begin{macrocode}
+{\catcode`\/=12
+% \end{macrocode}
+% and define |\split@name| so that it will define our
+% private |\f@encoding|, |\f@family|, |\f@series|, |\f@shape|,
+% and |\f@size| macros.
+% \changes{v1.9a}{1992/07/26}{Added splitting into \cs{f@encoding}.}
+% \begin{macrocode}
+\gdef\split@name#1/#2/#3/#4/#5\@nil{\def\f@encoding{#1}%
+ \def\f@family{#2}%
+ \def\f@series{#3}%
+ \def\f@shape{#4}%
+ \def\f@size{#5}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\curr@fontshape}
+% Abbreviation which may get removed again for speed.
+% \changes{v1.9a}{1992/07/26}{}
+% \begin{macrocode}
+\def\curr@fontshape{\f@encoding/\f@family/\f@series/\f@shape}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\define@newfont}
+% Now we can tackle the problem of defining a new font.
+% \changes{v1.9a}{1992/07/26}{}
+% \begin{macrocode}
+\def\define@newfont{%
+% \end{macrocode}
+% We have already mentioned that the \textsf{token} list that
+% |\split@name| will get as argument must not start with
+% a backslash.
+% To reach this goal we will set the |\escapechar| to $-1$ so
+% that the |\string| primitive will not generate an
+% escape character.
+% To keep this change local we open a group. We use
+% |\begingroup| for this purpose since |\define@newfont|
+% might be called in math mode, and an empty
+% |\bgroup|\ldots|\egroup| would add an empty Ord atom
+% to the math list and thus affect the spacing.
+%
+% Also locally redefine |\typeout| so that `No file ...fd'
+% Warnings become Font Info message just sent to the log file.
+% \changes{v1.0q}{1989/11/19}{Group added.}
+% \changes{v3.0m}{1995/11/17}{Redefine \cs{typeout} latex/1676}
+% \begin{macrocode}
+ \begingroup
+ \let\typeout\@font@info
+ \escapechar\m@ne
+% \end{macrocode}
+% Then we extract \emph{encoding scheme}, \emph{family},
+% \emph{series}, \emph{shape},
+% and \emph{size} from the font name.
+% Note the four |\expandafter|'s so that |\font@name| is
+% expanded first, then |\string|, and finally
+% |\split@name|.
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter
+ \split@name\expandafter\string\font@name\@nil
+% \end{macrocode}
+% If the |\curr@fontshape| combination is not available,
+% (i.e.\ undefined) we call the macro |\wrong@fontshape| to take
+% care of this case. Otherwise |\extract@font|
+% will load the external font for us.
+% \changes{v1.2f}{1990/01/28}{Added call to \cs{curr@fontshape} macro
+% to allow substitution.}
+% \begin{macrocode}
+% \expandafter\ifx
+% \csname\curr@fontshape\endcsname \relax
+ \try@load@fontshape % try always
+% \fi
+ \expandafter\ifx
+ \csname\curr@fontshape\endcsname \relax
+ \wrong@fontshape\else
+% \end{macrocode}
+% To allow substitution we call the |curr@fontshape| macro
+% which usually will expand to |\relax| but may hold code for
+% substitution (see |\subst@fontshape| definition).
+% \begin{macrocode}
+% \csname\curr@fontshape\endcsname
+ \extract@font\fi
+% \end{macrocode}
+% We are nearly finished and must only restore the
+% |\escapechar| by closing the group.
+% \begin{macrocode}
+ \endgroup}
+% \end{macrocode}
+%
+%
+% \changes{v3.2b}{2019/02/07}{Changed wording of warning (github/107)}
+% \begin{macrocode}
+\def\try@load@fontshape{%
+ \expandafter
+ \ifx\csname \f@encoding+\f@family\endcsname\relax
+ \@font@info{Trying to load font information for
+ \f@encoding+\f@family}%
+% \end{macrocode}
+% We predefine this combination to be |\@empty| which means that
+% next time we don't try again unnecessary in case we don't find a
+% |.fd| file. If the file contains a |\DeclareFontFamily| command
+% than this setting will be overwritten.
+% \changes{v2.1e}{1994/02/24}
+% {Separate restoration of catcodes for fd cmds}
+% \changes{v2.1l}{1994/05/13}{Use \cs{@input@} for fd files}
+% \begin{macrocode}
+ \global\expandafter\let
+ \csname\f@encoding+\f@family\endcsname\@empty
+% \end{macrocode}
+% Set the catcodes used in the syntax, but do it only once (this
+% will be restored at the end of the font loading group).
+% \changes{v3.0t}{1997/10/21}{Move \cs{makeatletter} to
+% \cs{nfss@catcodes}.}
+% \begin{macrocode}
+ \nfss@catcodes
+ \let\nfss@catcodes\relax
+% \end{macrocode}
+%
+% \changes{v3.0s}{1996/11/18}
+% {(DPC) lowercase fd file names. internal/1044}
+% For increased portability make the external filename
+% monocase, but look for the (old style) mixed case
+% filename if the first attempt fails.
+%
+% On any monocase system this means that the file is looked for twice
+% which takes up time and string space, but at least for this release
+% Check for both names to give people time to re-install their private
+% fd files with lowercase names.
+% \begin{macrocode}
+ \edef\reserved@a{%
+ \lowercase{%
+ \noexpand\InputIfFileExists{\f@encoding\f@family.fd}}}%
+ \reserved@a\relax
+ {\@input@{\f@encoding\f@family.fd}}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\nfss@catcodes}
+% \changes{v2.1e}{1994/02/24}
+% {Separate restoration of catcodes for fd cmds}
+% This macro should contain the standard |\catcode| assignments to
+% all characters which are used in the commands found in an
+% \texttt{.fd} file and which might have special |\catcode|s in the
+% middle of a document. If necessary, this list can be extended in
+% a package file using a suitable number of |\expandafter|, i.e.,
+%\begin{verbatim}
+% \expandafter\def\expandafter\nfss@catcodes
+% \expandafter{\nfss@catcodes <additional settings>}
+%\end{verbatim}
+% Note, that this macro might get executed several times since it
+% is also called by |\DeclareFontShape|, thus it probably should
+% not be misused as a general purpose hook.
+% \begin{macrocode}
+\def\nfss@catcodes{%
+% \end{macrocode}
+% We start by making |@| a letter and ignoring all blanks and newlines.
+% \changes{v2.1z}{1994/12/06}{Added tab char as well}
+% \changes{v3.0p}{1996/07/26}{omit \cs{relax} as not needed}
+% \changes{v3.0t}{1997/10/21}{Moved \cs{makeatletter} from
+% \cs{try@load@font@shape}.}
+% \begin{macrocode}
+ \makeatletter
+ \catcode`\ 9%
+ \catcode`\^^I9%
+ \catcode`\^^M9%
+% \end{macrocode}
+% Then we set up |\|, |{|, |}|, |#| and |%| in case an \texttt{.fd}
+% file is loaded during a verbatim environment.
+% \changes{v3.0n}{1995/11/27}{Reset hash, for definitions in fd files}
+% \changes{v3.00}{1995/12/06}{Reset hat, for typeouts etc in fd files}
+% \begin{macrocode}
+ \catcode`\\\z@
+ \catcode`\{\@ne
+ \catcode`\}\tw@
+ \catcode`\#6%
+ \catcode`\^7%
+ \catcode`\%14%
+% \end{macrocode}
+% The we make sure that the important syntax parts have the right
+% |\catcode|.
+% \changes{v2.1s}{1994/09/16}{Reset [ and ] as well, just in case}
+% \changes{v3.0r}{1996/08/25}{Reset the acute, grave and double quote
+% chars as well}
+% \begin{macrocode}
+ \@makeother\<%
+ \@makeother\>%
+ \@makeother\*%
+ \@makeother\.%
+ \@makeother\-%
+ \@makeother\/%
+ \@makeother\[%
+ \@makeother\]%
+ \@makeother\`%
+ \@makeother\'%
+ \@makeother\"%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclareErrorFont}
+% Declare the last resort shape! We assume that in this fontshape
+% there is a 10pt font but it doesn't really matter. We only loose
+% one macro name if the assumption is false. But at least the font
+% should be there!
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\DeclareErrorFont}{No side effects please}%
+\def\DeclareErrorFont#1#2#3#4#5{%
+ \xdef\error@fontshape{%
+ \noexpand\expandafter\noexpand\split@name\noexpand\string
+ \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname
+ \noexpand\@nil}%
+% \end{macrocode}
+% Initialize all those internal variables which may or may not have
+% values in the first seconds of NFSS' bootstraping process. Later
+% on such values will be updated when an encoding is selected, etc.
+%
+% We definitely don't want to set |\f@encoding|; we can set all the
+% others since if they are left ``blank'' any selection would grap
+% ``error default values'' as well. However, this probably should
+% go also---and now it did.
+% \changes{v2.1n}{1994/05/14}{Don't set \cs{f@encoding}}
+% \changes{v3.2c}{2019/07/09}{Don't set any \cs{f@...} macros}
+% \begin{macrocode}
+% \gdef\f@encoding{#1}%
+ \gdef\default@family{#2}%
+ \gdef\default@series{#3}%
+ \gdef\default@shape{#4}%
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\DeclareErrorFont}{No side effects please}%
+%<latexrelease>
+%<latexrelease>\def\DeclareErrorFont#1#2#3#4#5{%
+%<latexrelease> \xdef\error@fontshape{%
+%<latexrelease> \noexpand\expandafter\noexpand\split@name\noexpand\string
+%<latexrelease> \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname
+%<latexrelease> \noexpand\@nil}%
+%<latexrelease> \gdef\default@family{#2}%
+%<latexrelease> \gdef\default@series{#3}%
+%<latexrelease> \gdef\default@shape{#4}%
+%<latexrelease> \global\let\f@family\default@family
+%<latexrelease> \global\let\f@series\default@series
+%<latexrelease> \global\let\f@shape\default@shape
+%<latexrelease> \gdef\f@size{#5}%
+%<latexrelease> \gdef\f@baselineskip{#5pt}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareErrorFont
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\wrong@fontshape}
+% Before we come to the macro |\extract@font| we have to take
+% care of unknown |\curr@fontshape| combinations.
+% The general strategy is to issue a warning and to try a default
+% \emph{shape}, then a default \emph{series},
+% and finally a default \emph{family}.
+% If this last one also fails \TeX{} will go into an infinite loop.
+% But if the defaults are set incorrectly one deserves nothing else!
+% \changes{v1.9a}{1992/07/26}{}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\wrong@fontshape}%
+%<latexrelease> {Font substituation in preamble}%
+%<*2ekernel|latexrelease>
+\def\wrong@fontshape{%
+ \csname D@\f@encoding\endcsname % install defaults if in math
+% \end{macrocode}
+% We remember the wanted |\curr@fontshape| combination
+% which we will need in a moment.
+% \begin{macrocode}
+ \edef\reserved@a{\csname\curr@fontshape\endcsname}%
+ \ifx\last@fontshape\reserved@a
+ \errmessage{Corrupted NFSS tables}%
+ \error@fontshape
+ \else
+% \end{macrocode}
+% Then we warn the user about the mess and set the shape to its
+% default.
+% \changes{v1.0q}{1989/11/19}
+% {Instead of calling \cs{family}\cs{default@family},
+% etc. we directly set \cs{f@family}, etc.}
+% \changes{v1.2f}{1990/01/28}{Warning message slightly changed.}
+% \begin{macrocode}
+ \let\f@shape\default@shape
+% \end{macrocode}
+% If the combination is not known, try the default \emph{series}.
+% \begin{macrocode}
+ \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+ \let\f@series\default@series
+% \end{macrocode}
+% If this is still undefined, try the default \emph{family}.
+% Otherwise give up. We never try to change the encoding scheme!
+% \changes{v1.9a}{1992/07/26}{}
+% \changes{v3.1a}{2015/04/07}{Try loading fd file if family has changed}
+% \begin{macrocode}
+ \expandafter
+ \ifx\csname\curr@fontshape\endcsname\relax
+ \let\f@family\default@family
+% \end{macrocode}
+% If we change the font family and we are in the preamble then the
+% corresponding \texttt{.fd} file may not been loaded
+% yet. Therefore we try this now. Otherwise equating the requested
+% font shape with the finally selected fontshape below will fail
+% and can result in ``NFSS tables corruped''. After begin document
+% that will not happen as all \texttt{.fd} files involved in
+% substituation are loaded at |\begin{document}|.
+% \begin{macrocode}
+ \begingroup
+ \try@load@fontshape
+ \endgroup
+ \fi \fi
+ \fi
+% \end{macrocode}
+% At this point a valid |\curr@fontshape| combination must
+% have been found.
+% We inform the user about this fact.
+%\changes{v3.0n}{1995/11/02}
+% {(DPC) Remove extra space with \cs{string} for latex/1676}
+% \changes{v3.0m}{1995/11/17}
+% {Support \cs{@wrong@font@char} latex/1676}
+%
+% The |\expandafter\string| here stops \TeX\ adding the space
+% that it usually puts after command names in messages. The similar
+% construction with |\@undefined| just produces `undefined', but saves
+% a few tokens.
+%
+% |\@wrong@font@char| is locally redefined in |\UseTextSymbol| from
+% its normal (empty) definition, to report the symbol generating the
+% font switch.
+% \begin{macrocode}
+ \@font@warning{Font shape `\expandafter\string\reserved@a'
+ \expandafter\@gobble\string\@undefined\MessageBreak
+ using `\curr@fontshape' instead\@wrong@font@char}%
+ \global\let\last@fontshape\reserved@a
+% \end{macrocode}
+% We change |\@defaultsubs| to produce a warning at the end of
+% the document.
+% \changes{v3.0d}{1995/07/13}{Change a macro not a switch to flag
+% default font substitutions}
+% \changes{v3.0k}{1995/10/24}{Make this code inline since it
+% happens only here}
+% The macro |\@defaultsubs| is initially |\relax| but gets changed
+% here if some default font substitution happens.
+% It is then executed in |\enddocument|.
+% \begin{macrocode}
+ \gdef\@defaultsubs{%
+ \@font@warning{Some font shapes were not available, defaults
+ substituted.\@gobbletwo}}%
+% \end{macrocode}
+% If we substitute a |\curr@fontshape| combination
+% by the default one we don't want the warning to be printed out
+% whenever this (unknown) combination is used.
+% Therefore we globally |\let| the macro corresponding to
+% the wanted combination equal to its substitution.
+% This requires the use of four |\expandafter|'s
+% since |\csname|\dots|\endcsname| has to be
+% expanded before |\reserved@a| (i.e.\ the requested
+% combination),
+% and this must happen before the |\let| is executed.
+% \begin{macrocode}
+ \global\expandafter\expandafter\expandafter\let
+ \expandafter\reserved@a
+ \csname\curr@fontshape\endcsname
+% \end{macrocode}
+% Now we can redefine |\font@name| accordingly.
+% This \emph{must} be done globally since it might occur in the
+% group opened by |\define@newfont|. If we would this
+% definition were local the closing |\endgroup| there
+% would restore the old meaning of |\font@name| and then
+% switch to the wrong font at the end of |\selectfont|
+% although the correct font was loaded.
+% \begin{macrocode}
+ \xdef\font@name{%
+ \csname\curr@fontshape/\f@size\endcsname}%
+% \end{macrocode}
+% The last thing this macro does is to call |\pickup@font|
+% again to load the font if it is not defined yet.
+% At this point this code will loop endlessly if
+% the defaults are not well defined.
+% \begin{macrocode}
+ \pickup@font}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\wrong@fontshape}%
+%<latexrelease> {Font substituation in preamble}%
+%<latexrelease>\def\wrong@fontshape{%
+%<latexrelease> \csname D@\f@encoding\endcsname
+%<latexrelease> \edef\reserved@a{\csname\curr@fontshape\endcsname}%
+%<latexrelease> \ifx\last@fontshape\reserved@a
+%<latexrelease> \errmessage{Corrupted NFSS tables}%
+%<latexrelease> \error@fontshape
+%<latexrelease> \else
+%<latexrelease> \let\f@shape\default@shape
+%<latexrelease> \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+%<latexrelease> \let\f@series\default@series
+%<latexrelease> \expandafter
+%<latexrelease> \ifx\csname\curr@fontshape\endcsname\relax
+%<latexrelease> \let\f@family\default@family
+%<latexrelease> \fi \fi
+%<latexrelease> \fi
+%<latexrelease> \@font@warning{Font shape
+%<latexrelease> `\expandafter\string\reserved@a'
+%<latexrelease> \expandafter\@gobble\string\@undefined
+%<latexrelease> \MessageBreak
+%<latexrelease> using `\curr@fontshape' instead\@wrong@font@char}%
+%<latexrelease> \global\let\last@fontshape\reserved@a
+%<latexrelease> \gdef\@defaultsubs{%
+%<latexrelease> \@font@warning{Some font shapes were not available,
+%<latexrelease> defaults substituted.\@gobbletwo}}%
+%<latexrelease> \global\expandafter\expandafter\expandafter\let
+%<latexrelease> \expandafter\reserved@a
+%<latexrelease> \csname\curr@fontshape\endcsname
+%<latexrelease> \xdef\font@name{%
+%<latexrelease> \csname\curr@fontshape/\f@size\endcsname}%
+%<latexrelease> \pickup@font}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@wrong@font@char}
+% \changes{v3.0m}{1995/11/17}{(DPC) Macro added. latex/1676}
+% Normally empty but redefined in |\UseTextSymbol| so that the
+% Font shape undefined message can refer to the symbol causing the
+% problem.
+% \begin{macrocode}
+\let\@wrong@font@char\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@defaultsubs}
+% \changes{v3.0d}{1995/07/13}{macro added}
+% \changes{v3.0k}{1995/10/24}{macro removed}
+% \begin{macro}{\@defaultsubs}
+% \changes{v3.0d}{1995/07/13}{macro added}
+% See above.
+% \begin{macrocode}
+\let\@defaultsubs\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\strip@prefix}
+% In |\extract@font| we will need a way to recover the
+% replacement text of a macro.
+% This is done by the primitive |\meaning| together
+% with the macro |\strip@prefix| (for the details
+% see appendix~D of the \TeX{}book, p.\ 382).
+% \begin{macrocode}
+\def\strip@prefix#1>{}
+% \end{macrocode}
+% \end{macro}
+%
+% ^^A \extract@font
+%
+%
+%
+% \section{Assigning math fonts to \emph{versions}}
+%
+%
+% \begin{macro}{\install@mathalphabet}
+% This is just another name for |\gdef| but we can redefine it if
+% necessary later on.
+% \begin{macrocode}
+\let\install@mathalphabet\gdef
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\math@fonts}
+%
+% \changes{v1.9a}{1992/07/26}{}
+% \begin{macrocode}
+\let\math@fonts\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\select@group}
+% \changes{v1.0t}{1989/11/26}{\cs{bgroup}/\cs{egroup} changed to
+% \cs{begingroup}/\cs{endgroup} to avoid empty Ord atom on math list.}
+% |\select@group| has four arguments: the new
+% \meta{math alphabet identifier} (a control sequence), the
+% \meta{math group number}, the extra macro for math mode
+% and the |\curr@fontshape| definition macro name.
+% We first check if we are in math mode.
+% \changes{v1.1a}{1989/12/16}{\cs{relax} in front added.}
+% \changes{v1.1a}{1989/12/16}{Now four arguments.}
+% \begin{macrocode}
+%\def\select@group#1#2#3{\relax\ifmmode
+% \end{macrocode}
+% We do these things locally using |\begingroup| instead
+% of |\bgroup| to avoid the appearance of an empty Ord
+% atom on the math list.
+% \begin{macrocode}
+% \begingroup
+% \end{macrocode}
+% We set the math fonts for the \emph{family} in question by calling
+% |\getanddefine@fonts| in the correct environment.
+% \changes{v1.9a}{1992/07/26}{}
+% \begin{macrocode}
+% \escapechar\m@ne
+% \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
+% \end{macrocode}
+% We globally select the math fonts\dots
+% \begin{macrocode}
+% \globaldefs\@ne \math@fonts
+% \end{macrocode}
+% \dots{} and close the group to
+% restore |\globaldefs| and |\escapechar|.
+% \begin{macrocode}
+% \endgroup
+% \end{macrocode}
+% As long as no \emph{size} or \emph{version} change occurs
+% the \meta{math alphabet identifier} should simply switch to the
+% installed \emph{math group} instead of calling
+% |\select@group|
+% unnecessarily. So we globally redefine the first argument
+% (the new \meta{math alphabet identifier})
+% to expand into a |\mathgroup| switch
+% and then select this \emph{alphabet}. Note that this redefinition
+% will be overwritten by the next call to a \emph{version} macro.
+% \changes{v1.1a}{1989/12/16}{Usage of `\quotechar=' macro added.}
+% \changes{v1.1a}{1989/12/16}{Redefinition of alphabet now simpler.}
+% \changes{v1.2a}{1990/01/20}{Def for alph id changed.}
+% The original code for the end of |\select@group| was
+% \begin{verbatim}
+% \gdef#1{#3\mathgroup #2}#1\fi}
+%\end{verbatim}
+% i.e.\ first redefining the \meta{math alphabet identifier} and
+% then calling the new definition to switch to the wanted
+% \meta{math group}. Now we define the \meta{math alphabet
+% identifier} as a call to the |\use@mathgroup| command.
+% \changes{v1.2b}{1990/01/21}{Code moved to \cs{use@mathgroup}.}
+% \begin{macrocode}
+% \xdef#1{\noexpand\use@mathgroup\noexpand#2%
+% {\number\csname c@mv@\math@version\endcsname}}%
+% \end{macrocode}
+% \changes{v1.3c}{1992/05/12}{Added call to
+% \cs{extract@alph@from@version}.}
+% But this is not sufficient, as we learned the hard way.
+% The problem here is that the loading of the fonts that comprise
+% the alphabet identifier |#1|, as well as the necessary math font
+% assignments is deferred until it is used. This is OK so far, but
+% if the fonts are switched within the current formula (which may
+% happen if a sub-formula is a box that contains a math version
+% switch) the font assignments for |#1| are not restored unless
+% |#1| is used again. This is disastrous since TeX sees the wrong
+% fonts at the end of the math formula, when it converts the math
+% list into a horizontal list.
+%
+% This is taken into account as follows: When a math alphabet
+% identifier is used for the first time in a certain version
+% it modifies the corresponding macro |\mv@|\meta{version}
+% so that it calls |\getanddefine@fonts| directly in future as well.
+% We use the macro |\extract@alph@from@version| to do this.
+% It takes the math alphabet identifer |#1| and the math version
+% macro as arguments.
+% \changes{v1.9a}{1992/07/26}{}
+% \begin{macrocode}
+% \expandafter\extract@alph@from@version
+% \csname mv@\math@version\expandafter\endcsname
+% \expandafter{\number\csname c@mv@\math@version\endcsname}%
+% #1%
+% \stepcounter{mv@\math@version}%
+% \end{macrocode}
+% 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
+% margid} option is in force)
+% which would swallow our closing |\fi|. So
+% we use the |\expandafter| technique to remove the |\fi|
+% before the |\use@mathgroup| is expanded.
+% \begin{macrocode}
+%\expandafter #1\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\extract@alph@from@version}
+% \changes{v1.3c}{1992/05/12}{Macro added.}
+% We proceed to the definition of the
+% macro |\extract@alph@from@version|. As stated above, it takes
+% a math alphabet identifier and a math version macro
+% (e.g.\ |\mv@normal|) as its arguments.
+% \begin{macrocode}
+\def\extract@alph@from@version#1#2#3{%
+% \end{macrocode}
+% To extract and replace the definition of math alphabet identifier
+% |#3| in macro |#1| we have to recall how this definition looks
+% like: Somewhere in the replacement text of |#1| there is
+% the sequence\\[2pt]
+% |\install@mathalphabet|\meta{math alphabet identifier} |#3||{%| \\
+% \hspace*{\MacroIndent}\hspace*{5mm}
+% \meta{Definitions for }|#3}| \\[2pt]
+% Hence, the first thing we do is to extract the tokens preceding
+% this definitions, the definition itself, and the tokens following
+% it. To this end we define one auxiliary macro |\reserved@a|.
+% \begin{macrocode}
+ \def\reserved@a##1\install@mathalphabet#3##2##3\@nil{%
+% \end{macrocode}
+% When |\reserved@a| is expanded, it will have the tokens preceding
+% the definition in question in its first argument (|##1|), the
+% following tokens in its third argument (|##3|), and the replacement
+% text for the math alphabet identifier |#3| in its second argument.
+% (|##2|). This is then recorded for later use in a temporary macro
+% |\reserved@b|.
+% \begin{macrocode}
+ \def\reserved@b{##2}%
+% \end{macrocode}
+% Additionally, we define a macro |\reserved@c| to reconstruct the
+% definitions for the math version in question from the tokens that
+% will remain unchanged (|##1| and |##3|) and the yet to build new
+% definitions for the math alphabet identifier |#3|.
+% \begin{macrocode}
+ \def\reserved@c####1{\gdef#1{##1####1##3}}}%
+% \end{macrocode}
+% Then we execute our auxiliary macro.
+% \begin{macrocode}
+ \expandafter\reserved@a#1\@nil
+% \end{macrocode}
+% OK, so now we have to build the new definition for |#3|. To do so,
+% we first extract the interesting parts out of the old one.
+% The old definition looks like:\\[2pt]
+% |\select@group|\meta{math alphabet identifier} \\
+% \hspace*{\MacroIndent}\hspace*{5mm}
+% \meta{math group number}\meta{math extra part}\\
+% \meta{|curr@fontshape| definition} \\[2pt]
+% So we define a new temporary macro |\reserved@a| that
+% extracts these parts.
+% \begin{macrocode}
+ \def\reserved@a\select@group#3##1##2\@nil{%
+% \end{macrocode}
+% This macro can now directly rebuild the math version definition
+% by calling |\reserved@c|:
+% \begin{macrocode}
+ \reserved@c{%
+ \getanddefine@fonts{#2}##2%
+ \install@mathalphabet#3{%
+ \relax\ifmmode \else \non@alpherr#3\fi
+ \use@mathgroup##1{#2}}}%
+% \end{macrocode}
+% \changes{v2.1t}{1994/10/15}{Warn if math alpha is used outside math}
+% In addtion it defines the alphabet the way it should be used from
+% now on.
+% \begin{macrocode}
+ \gdef#3{\relax\ifmmode \else \non@alpherr#3\fi
+ \use@mathgroup##1{#2}}}%
+% \end{macrocode}
+% Finally, we only have to call this macro |\reserved@a| on the old
+% definitions recorded in |\reserved@b|:
+% \begin{macrocode}
+ \expandafter\reserved@a\reserved@b\@nil
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\math@bgroup}
+% \changes{v1.2a}{1990/01/20}{Def. placed in this file.}
+% \begin{macro}{\math@egroup}
+% \changes{v1.2a}{1990/01/20}{Def. placed in this file.}
+% \changes{v1.2h}{1990/03/30}{Changed to have one arg.}
+% \changes{v2.2f}{1994/03/10}{Changed \cs{begingroup}/\cs{endgroup} to
+% \cs{bgroup}/\cs{egroup}.}
+% Here are the default definitions for |\math@bgroup| and
+% |\math@egroup|. We use |\bgroup| instead of |\begingroup|
+% to avoid `leaking out' of style changes. This has the side
+% effect of always producing mathord atoms.
+% \begin{macrocode}
+\let\math@bgroup\bgroup
+\def\math@egroup#1{#1\egroup}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\calculate@math@sizes}
+% \changes{v2.1i}{1994/04/18}{Changed message to log only}
+% Here is the default definition for |\calculate@math@sizes|
+% a more elaborate interface
+% is under testing in mthscale.sty.
+% \begin{macrocode}
+\gdef\calculate@math@sizes{%
+ \@font@info{Calculating\space math\space sizes\space for\space
+ size\space <\f@size>}%
+ \dimen@\f@size \p@
+ \@tempdimb \defaultscriptratio \dimen@
+ \dimen@ \defaultscriptscriptratio \dimen@
+ \expandafter\xdef\csname S@\f@size\endcsname{%
+ \gdef\noexpand\tf@size{\f@size}%
+ \gdef\noexpand\sf@size{\strip@pt\@tempdimb}%
+ \gdef\noexpand\ssf@size{\strip@pt\dimen@}%
+ \noexpand\math@fontstrue}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\defaultscriptratio}
+% \changes{v2.1h}{1994/04/11}{Macro added}
+% \begin{macro}{\defaultscriptscriptratio}
+% \changes{v2.1h}{1994/04/11}{Macro added}
+% The default ratio for math
+% sizes is:\\
+% 1 to |\defaultscriptratio| to |\defaultscriptscriptratio|.\\
+% By default this is 1 to .7 to .5.
+% \begin{macrocode}
+\def\defaultscriptratio{.7}
+\def\defaultscriptscriptratio{.5}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\noaccents@}
+% If we don't have a definition for |\noaccents@| we provide a
+% dummy.
+% \begin{macrocode}
+\ifx\noaccents@\@undefined
+ \let\noaccents@\@empty
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\showhyphens}
+% \changes{v1.2l}{1990/06/30}{Macro added.}
+% \changes{v2.0e}{1993/05/16}{Use \cs{reset@font}}
+% \changes{v3.0h}{1995/10/10}
+% {Use \cs{normalfont} and make colour safe, and autoloadable}
+% \changes{v3.0u}{1998/03/25}
+% {Suppress unnecessary error when used in preamble}
+% \changes{v3.2a}{2017/01/10}
+% {Add version of \cs{showhyphens} that works with Xe\TeX.}
+% The |\showhyphens| command must be redefined since the version in
+% \texttt{plain.tex} uses |\tenrm|. We have also made some further
+% adjustments for its use in \LaTeX.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/01/01}{\showhyphens}%
+%<latexrelease> {XeTeX support for \showhyphens}%
+%<*2ekernel|latexrelease>
+\ifx\XeTeXcharclass\@undefined
+% \end{macrocode}
+% Version for engines other than Xe\TeX.
+% \begin{macrocode}
+\gdef\showhyphens#1{%
+ \setbox0\vbox{%
+ \color@begingroup
+ \everypar{}%
+ \parfillskip\z@skip\hsize\maxdimen
+ \normalfont
+ \pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1%
+ \color@endgroup}}
+% \end{macrocode}
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% Xe\TeX\ version. When using system fonts Xe\TeX\ reports consecutive
+% runs of characters as a single item in box logging, which means the
+% standard |\showhyphens| does not work. This version typesets the
+% text into a narrow box to force hyphenation and then reconstructs a
+% horizontal list with explicit hyphens to generate the display. Note
+% that the |lmr| OpenType font is forced, this works even if the
+% characters are not in the font as hyphenation is attempted due to
+% the width of the space and hyphen character. It may generate
+% spurious Missing Character warnings in the log, these are however
+% suppressed from the terminal output by ensuring that
+% |\tracingonline| is locally zero.
+% \begin{macrocode}
+\long\def\showhyphens#1{%
+ \setbox0\vbox{%
+ \usefont{TU}{lmr}{m}{n}%
+ \hsize 1sp %
+ \hbadness\@M
+ \hfuzz\maxdimen
+ \tracingonline\z@
+ \everypar={}%
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \parfillskip\z@skip
+ \hyphenpenalty=-\@M
+ \pretolerance\m@ne
+ \interlinepenalty\z@
+ \clubpenalty\z@
+ \widowpenalty\z@
+ \brokenpenalty1127 %
+ \setbox\z@\hbox{}%
+ \noindent
+ \hskip\z@skip
+ #1%
+ \par
+% \end{macrocode}
+% Note here we stop the loop if made no progress, non-removable items
+% may mean that we can not process the whole list (which would be
+% testable as |\lastnodetype=-1|).
+% \begin{macrocode}
+ \loop
+ \@tempswafalse
+ \ifnum\lastnodetype=11\unskip\@tempswatrue\fi
+ \ifnum\lastnodetype=12\unkern\@tempswatrue\fi
+ \ifnum\lastnodetype=13 %
+ \count@\lastpenalty
+ \unpenalty\@tempswatrue
+ \fi
+ \ifnum\lastnodetype=\@ne
+ \setbox\tw@\lastbox\@tempswatrue
+ \setbox0\hbox{\unhbox\tw@\unskip\unskip\unpenalty
+ \ifnum\count@=1127 \else\ \fi
+ \unhbox0}%
+ \count@\z@
+ \fi
+ \if@tempswa
+ \repeat
+ \hbadness\z@
+ \hsize\maxdimen
+ \showboxdepth\z@
+ \tolerance\m@ne
+ \hyphenpenalty\z@
+ \noindent\unhbox\z@
+}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\showhyphens}%
+%<latexrelease> {XeTeX support for \showhyphens}%
+%<latexrelease>\gdef\showhyphens#1{%
+%<latexrelease> \setbox0\vbox{%
+%<latexrelease> \color@begingroup
+%<latexrelease> \everypar{}%
+%<latexrelease> \parfillskip\z@skip\hsize\maxdimen
+%<latexrelease> \normalfont
+%<latexrelease> \pretolerance\m@ne\tolerance\m@ne
+%<latexrelease> \hbadness\z@\showboxdepth\z@\ #1%
+%<latexrelease> \color@endgroup}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\addto@hook}
+% \changes{v1.0u}{1989/12/05}{\cs{addto@hook} added.}
+% \changes{v2.1d}{1994/02/10}{Made \cs{addto@hook} long.}
+% We need a macro to add tokens to a hook.
+% \begin{macrocode}
+\long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@vpt}
+% \changes{v2.1v}{1994/11/09}{(DPC) macros added, from setsize.dtx}
+% \changes{v2.1v}{1994/11/09}{(DPC) reduce save stack usage latex/1742}
+% \begin{macrocode}
+ \def\@vpt{5}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@vipt}
+% \begin{macrocode}
+ \def\@vipt{6}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@viipt}
+% \begin{macrocode}
+ \def\@viipt{7}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@viiipt}
+% \begin{macrocode}
+ \def\@viiipt{8}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ixpt}
+% \begin{macrocode}
+ \def\@ixpt{9}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xpt}
+% \begin{macrocode}
+ \def\@xpt{10}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xipt}
+% \begin{macrocode}
+ \def\@xipt{10.95}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xiipt}
+% \begin{macrocode}
+ \def\@xiipt{12}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xivpt}
+% \begin{macrocode}
+ \def\@xivpt{14.4}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xviipt}
+% \begin{macrocode}
+ \def\@xviipt{17.28}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xxpt}
+% \begin{macrocode}
+ \def\@xxpt{20.74}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xxvpt}
+% \begin{macrocode}
+ \def\@xxvpt{24.88}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfsscmp.dtx b/macros/latex-dev/base/ltfsscmp.dtx
new file mode 100644
index 0000000000..8157428fde
--- /dev/null
+++ b/macros/latex-dev/base/ltfsscmp.dtx
@@ -0,0 +1,378 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltfsscmp.dtx
+%% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
+%% all rights reserved.
+%
+%<*driver>
+% \fi
+%
+%
+\ProvidesFile{ltfsscmp.dtx}
+ [2015/06/23 v3.0f LaTeX Kernel (NFSS1 Compatibility)]
+% \iffalse
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{ltfsscmp.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \iffalse
+%<+checkmem>\def\CHECKMEM{\tracingstats=2
+%<+checkmem> \newlinechar=`\^^J
+%<+checkmem> \message{^^JMemory usage: \filename}\shipout\hbox{}}
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+%
+% \GetFileInfo{ltfsscmp.dtx}
+% \title{A new font selection scheme for \TeX{} macro packages\\
+% (Compatibility with NFSS1)\thanks
+% {This file has version number
+% \fileversion\ dated \filedate}}
+%
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This file contains the implementation of commands giving
+% compatibility with the original `NFSS1' release of the Font Selection
+% Scheme.
+%
+% \begin{quote}
+% \textbf{Warning:}
+% The macro documentation is still basically the documentation from the
+% first NFSS release and therefore in some cases probably not
+% completely accurate.
+% \end{quote}
+%
+% Version 1 of NFSS is obsolete now for about 20 years (and was
+% ``current'' only for a short intermediate time) so with the 2015
+% release these internal interface commands are removed from the
+% kernel and made available via \textsf{latexrelease} package so that
+% backward compatibility remains ensured for very old documents.
+%
+% \StopEventually{}
+%
+%
+% \changes{v3.0b}{1995/06/15}
+% {(DPC) minor documentation edits}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Make file from previous file, fam.dtx 1995/05/20 v2.2d}
+% \changes{v3.0d}{2015/02/21}
+% {Removed autoload code}
+% \changes{v3.0e}{2015/02/22}
+% {Moved all code into latexrelease - obsolete commands are no
+% longer automatically part of the kernel}
+%
+%
+% \begin{macrocode}
+%<*latexrelease>
+\IncludeInRelease{2015/01/01}{\new@fontshape}%
+ {NFSS version1 commands}%
+\let\new@fontshape\@undefined
+\let\warn@rel@i\@undefined
+\let\scan@fontshape\@undefined
+\let\scan@@fontshape\@undefined
+\let\subst@fontshape\@undefined
+\let\extra@def\@undefined
+\let\default@mextra\@undefined
+\let\preload@sizes\@undefined
+\let\err@rel@i\@undefined
+\let\newmathalphabet\@undefined
+\let\newmathalphabet@\@undefined
+\let\newmathalphabet@@@\@undefined
+\let\if@no@font@opt\@undefined
+\let\@no@font@optfalse\@undefined
+\let\define@mathalphabet\@undefined
+\let\define@mathgroup\@undefined
+\let\addtoversion\@undefined
+\EndIncludeInRelease
+% \end{macrocode}
+%
+% In older releases we provide the original definitions.
+%
+% \begin{macrocode}
+\IncludeInRelease{0000/00/00}{\new@fontshape}%
+ {NFSS version1 commands}%
+% \end{macrocode}
+%
+% \begin{macro}{\new@fontshape}
+% The interface is now |\DeclareFontShape|.
+% \begin{macrocode}
+\gdef\new@fontshape#1#2#3#4{%
+ \warn@rel@i\new@fontshape\DeclareFontShape
+ \expandafter\scan@fontshape\@gobble#4<\@nil><<%
+ \DeclareFontShape U{#1}{#2}{#3}\reserved@f}%
+\@onlypreamble\new@fontshape
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\warn@rel@i}
+% The warning message used above.
+% \begin{macrocode}
+\gdef\warn@rel@i#1#2{%
+ \@font@warning{*** NFSS release 1 command
+ \noexpand#1found\MessageBreak
+ *** Update by using release 2 command
+ \string#2.\MessageBreak
+ *** Recovery is probably possible}%
+}%
+\@onlypreamble\warn@rel@i
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\scan@fontshape}
+% This will scan the old font shape definition syntax.
+% \begin{macrocode}
+\gdef\scan@fontshape{%
+ \let\reserved@f\@empty
+ \let\reserved@e\@empty % holds last info
+ \scan@@fontshape
+}%
+\@onlypreamble\scan@fontshape
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\scan@@fontshape}
+% \begin{macrocode}
+\gdef\scan@@fontshape#1>#2#3<{%
+ \ifx\@nil#1%
+ \edef\reserved@f{\reserved@f\reserved@e}%
+ \else
+ \def\reserved@b{#1}% nick names
+ \def\reserved@c{#3}%
+ \in@{ at}{#3}%
+ \ifin@
+ \in@{pt}{#3}% not a proof but a good chance
+ \ifin@
+% \end{macrocode}
+% We grap also everything after pt and discard it if people have
+% forgotten to place a percent sign there.
+% \changes{v2.1d}{1994/02/10}{scan away stuff after pt}
+% \begin{macrocode}
+ \def\reserved@a##1 at##2pt##3\@nil{%
+ \def\reserved@b{##2}%
+ \def\reserved@c{##1}%
+ }%
+ \reserved@a#3\@nil
+ \fi
+ \fi
+ \ifnum 0<0#2
+ \edef\reserved@d{subf*\reserved@c}%
+ \ifcase #2\or
+ \or
+ \else
+ \errmessage{*** What's this? NFSS release 0? ***}%
+ \fi
+ \else
+ \edef\reserved@d{#2\reserved@c}%
+ \fi
+ \ifx\reserved@d\reserved@e
+ \edef\reserved@f{\reserved@f<\reserved@b>}%
+ \else
+ \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info
+ \let\reserved@e\reserved@d
+ \fi
+ \expandafter\scan@@fontshape
+ \fi
+}%
+\@onlypreamble\scan@@fontshape
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\subst@fontshape}
+% This is now also handled by the extend syntax of
+% |\DeclareFontShape|.
+% \begin{macrocode}
+\gdef\subst@fontshape#1#2#3#4#5#6{%
+ \warn@rel@i\subst@fontshape\DeclareFontShape
+ \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}%
+\@onlypreamble\subst@fontshape
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\extra@def}
+% This was replaced by |\DeclareFontFamily|.
+% \begin{macrocode}
+\gdef\extra@def#1#2#3{%
+ \warn@rel@i\extra@def\DeclareFontFamily
+ \DeclareFontFamily{U}{#1}{}%
+}%
+\@onlypreamble\extra@def
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\default@mextra}
+% The new name is |\DeclareFontEncodingDefaults| but in this case
+% we don't feel comfortable with this either.
+% \begin{macrocode}
+\gdef\default@mextra{%
+ \warn@rel@i\default@mextra\DeclareFontEncodingDefaults
+% \end{macrocode}
+% We pick up the argument to |\default@mextra| implicitly as
+% the second argument of |\DeclareFontEncodingDefaults|.
+% \begin{macrocode}
+ \DeclareFontEncodingDefaults\relax
+}%
+\@onlypreamble\default@mextra
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\preload@sizes}
+% The new interface is |\DeclarePreloadSizes|.
+% \begin{macrocode}
+\gdef\preload@sizes{%
+ \warn@rel@i\preload@sizes\DeclarePreloadSizes
+ \DeclarePreloadSizes U%
+}%
+\@onlypreamble\preload@sizes
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\err@rel@i}
+% This macro is used in cases where emulation with NFSS2 features
+% is not really possible.
+% \begin{macrocode}
+\gdef\err@rel@i#1#2{%
+ \@latex@error{*** NFSS release 1 command \noexpand#1found%
+ ^^J*** Recovery not possible. Use \string#2}%
+ {The new release of NFSS doesn't support the
+ \noexpand#1command^^Jany longer.
+ Please upgrade your file to the syntax of NFSS
+ release 2^^Jusing the \noexpand#2command.}%
+% \end{macrocode}
+% Let's die.
+% \begin{macrocode}
+ \batchmode\input.\relax
+}%
+\@onlypreamble\err@rel@i
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\newmathalphabet}
+% \begin{macro}{\newmathalphabet@@}
+% \begin{macro}{\newmathalphabet@@@}
+% |\newmathalphabet| is the old form.
+% \begin{macrocode}
+\gdef\newmathalphabet{%
+ \if@no@font@opt
+ \@latex@error{*** NFSS release 1 command
+ \noexpand\newmathalphabet found%
+ ^^J \space*** Automatic recovery not possible.%
+ ^^J \space*** TYPE H for Help%
+ }%
+ {Please look at the file usrguide.tex for hints on
+ how to resolve this problem.}%
+ \else
+ \warn@rel@i\newmathalphabet\DeclareMathAlphabet
+ \fi
+ \@ifstar\newmathalphabet@@@
+ \newmathalphabet@@}%
+\gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}%
+\gdef\newmathalphabet@@@#1#2#3#4{%
+ \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}%
+\@onlypreamble\newmathalphabet
+\@onlypreamble\newmathalphabet@@
+\@onlypreamble\newmathalphabet@@@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@no@font@opt}
+% \begin{macro}{\@no@font@optfalse}
+% \begin{macrocode}
+\global\let\if@no@font@opt\iftrue
+\gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\define@mathalphabet}
+% This is a case where dying is best.
+% \begin{macrocode}
+\gdef\define@mathalphabet{%
+ \err@rel@i\define@mathalphabet\DeclareMathAlphabet
+}%
+\@onlypreamble\define@mathalphabet
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\define@mathgroup}
+% And here is another one
+% \begin{macrocode}
+\gdef\define@mathgroup{%
+ \err@rel@i\define@mathgroup\DeclareSymbolFont
+}%
+\@onlypreamble\define@mathgroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\addtoversion}
+% |\addtoversion| is the old form.
+% \begin{macrocode}
+\def\addtoversion#1#2{%
+ \warn@rel@i\addtoversion\SetMathAlphabet
+ \SetMathAlphabet#2{#1}{U}}%
+\@onlypreamble\addtoversion
+% \end{macrocode}
+% \end{macro}
+%
+% Finishing off this huge |\IncludeInRelease| argument:
+% \begin{macrocode}
+\EndIncludeInRelease
+%</latexrelease>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfssdcl.dtx b/macros/latex-dev/base/ltfssdcl.dtx
new file mode 100644
index 0000000000..cca3df4693
--- /dev/null
+++ b/macros/latex-dev/base/ltfssdcl.dtx
@@ -0,0 +1,1639 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltfssdcl.dtx
+%% Copyright (C) 1989-1998 Frank Mittelbach and Rainer Sch\"opf,
+%% all rights reserved.
+%
+%<*driver>
+% \fi
+%
+%
+\ProvidesFile{ltfssdcl.dtx}
+ [2016/02/18 v3.0r LaTeX Kernel (NFSS Declarative Interface)]
+% \iffalse
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{ltfssdcl.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \iffalse
+%<+checkmem>\def\CHECKMEM{\tracingstats=2
+%<+checkmem> \newlinechar=`\^^J
+%<+checkmem> \message{^^JMemory usage: \filename}\shipout\hbox{}}
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+%
+% \GetFileInfo{ltfssdcl.dtx}
+% \title{A new font selection scheme for \TeX{} macro packages\\
+% (Declarative Interface)\thanks
+% {This file has version number
+% \fileversion\ dated \filedate}}
+%
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This file contains the main implementation of the font selection
+% scheme commands. See other parts of the \LaTeX\ distribution, or
+% \emph{The \LaTeX\ Companion} for higher level documentation of these
+% commands.
+%
+% \begin{quote}
+% \textbf{Warning:}
+% The macro documentation is still basically the documentation from the
+% first NFSS release and therefore in some cases probably not
+% completely accurate.
+% \end{quote}
+%
+% \StopEventually{}
+%
+% \section{Interface Commands}
+%
+% \changes{v3.0i}{1998/08/17}
+% {(RmS) Corrected minor glitches in changes entries.}
+% \changes{v3.0b}{1995/06/15}
+% {(DPC) minor documentation changes}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Make file from previous file, latint.dtx 1995/05/21 v2.1t}
+% \changes{v3.0p}{2015/02/21}
+% {Removed autoload code}
+%
+%
+% \changes{v2.1o}{1994/11/22}
+% {wrap long lines}
+% \changes{v2.1m}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v2.1j}{1994/05/29}{Use new error commands}
+% \changes{v2.1h}{1994/05/13}{Removed file identification typeout}
+% \changes{v2.1g}{1994/05/12}{Allow \cs{relax}'ed cmds to be declared}
+% \changes{v2.1g}{1994/05/12}{Allow \cs{relax} as undefined command}
+% \changes{v2.1e}{1994/04/28}{Removed all \cs{uppercase} in hex num
+% parsing macros}
+% \changes{v2.1d}{1994/04/18}{Removed surplus \cs{no@alphabet@error}
+% (see fam.dtx)}
+%
+%
+%
+% \changes{v2.1f}{1994/05/03}{Renamed \cs{@@DeclareMathDelimiter} to
+% \cs{@DeclareMathDelimiter}}
+% \changes{v2.1c}{1994/03/13}{add 2ekernel module to omit repeated code}
+%
+%
+% \begin{macro}{\in@}
+% \changes{v3.0m}{2009/10/20}{More robust thanks to Heiko.}
+% \changes{v3.0n}{2011/05/08}{Simplified thanks to Bruno.}
+% \begin{macro}{\ifin@}
+% |\@in| is a utility macro with two arguments. It determines
+% whether its first argument occurs in its second and sets the
+% switch |\ifin@| accordingly. The first argument may not
+% contain braces nor |#| (more precisely, tokens of category
+% code 1,~2, or~6).
+% \begin{macrocode}
+%<*2ekernel>
+\def\in@#1#2%
+ {%
+ \begingroup
+ \def\in@@##1#1{}%
+ \toks@\expandafter{\in@@#2{}{}#1}%
+ \edef\in@@{\the\toks@}%
+ \expandafter\endgroup
+ \ifx\in@@\@empty
+ \in@false
+ \else
+ \in@true
+ \fi
+ }
+\newif\ifin@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Before the |\begin{document}| command several
+% \meta{math versions} and \meta{math alphabet identifiers} may
+% be declared.
+% In principle, there should be exactly one family/series/shape
+% combination be declared for each version/alphabet pair.
+% But we want to allow for defaults as well for automagical
+% filling of holes.
+%
+% While building the tables for math alphabet identifiers and math
+% versions we keep several lists:
+% \begin{itemize}
+% \item the list of all math versions, |\version@list|,
+% each entry prefixed by the control sequence |\version@elt|,
+% i.e.\ this list has the following form
+% \begin{quote}
+% |\version@elt|\meta{version$_1$}^^A
+% |\version@elt|\meta{version$_2$}\ldots\\\hspace*{\fill}^^A
+% |\version@elt|\meta{version$_n$}
+% \end{quote}
+% \item the list of all math alphabet identifiers. Here every
+% entry has the form:\\[2pt]
+% \hspace*{\MacroIndent}
+% |\group@elt|\meta{math group number}\\
+% \hspace*{\MacroIndent}
+% |{{|\meta{default family}^^A
+% |}{|\meta{default series}^^A
+% |}{|\meta{default shape}|}}|.
+% \item Each defined math alphabet identifier holds a list containing
+% Information about the {\em versions\/} for which it is
+% defined. This list has a more complicated structure: it
+% looks as follows:
+% \begin{quote}
+% |\set@alpha|\meta{the alphabet identifier itself}\\
+% \hspace*{\MacroIndent}
+% |\reserved@c|\meta{math version}\meta{font info}\\
+% \hspace*{\MacroIndent}\ldots\\
+% |\@nil|
+% \end{quote}
+% where \meta{font info} is either |\reserved@e|
+% (if the combination is not defined yet) or
+% \begin{quote}
+% |{{|\meta{family}|}{|\meta{series}^^A
+% |}{|\meta{shape}|}}|
+% \end{quote}
+% \end{itemize}
+%
+% \begin{macro}{\version@list}
+% We initialize the version list to be empty.
+% \begin{macrocode}
+\let\version@list=\@empty
+\@onlypreamble\version@list
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\version@elt}
+% \begin{macrocode}
+\let\version@elt\relax
+\@onlypreamble\version@elt
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\new@mathversion}
+% The macro |\new@mathversion| is called with the version control
+% sequence as its argument.
+% \begin{macrocode}
+%\def\new@mathversion#1{%
+% \end{macrocode}
+% The first thing this macro does is to check if the version
+% identifier is already present in |\version@list|.
+% We enclose |\version@list| in braces since it might be empty
+% (if no {\em version\/} is defined yet). But this means that
+% we need a suitable number of |\expandafter| primitives.
+% \begin{macrocode}
+% \expandafter\in@\expandafter#1\expandafter{\version@list}%
+% \ifin@
+% \end{macrocode}
+% If so it prints an error message.
+% The |\next| macro is used to get rid of the four characters
+% |\mv@| that would otherwise appear at the begin of the
+% version name in the error message.
+% \begin{macrocode}
+% \@latex@error{Math version
+% `\expandafter\@gobblefour\string#1'
+% already defined}\@eha
+% \end{macrocode}
+% Otherwise we have a new version, and we can proceed with
+% entering it into the tables.
+% We add it to |\version@list|. This is very easy:
+% we define |\version@elt| (which is the delimiter in
+% |\version@list|) to protect itself and the following token
+% from being expanded and simply redefine |\version@list|.
+% \begin{macrocode}
+% \else
+% \global\expandafter\newcount\csname c@\expandafter
+% \@gobble\string#1\endcsname
+% \global\csname c@\expandafter
+% \@gobble\string#1\endcsname\@ne
+% \def\version@elt{\noexpand\version@elt\noexpand}%
+% \edef\version@list{\version@list\version@elt#1}%
+% \end{macrocode}
+% Then we prepare to enter the new version into all math
+% alphabet identifier lists. Remember that these lists
+% use |\reserved@c| as delimiter, and that there appears the
+% control sequence |\reserved@e| that must not be expanded.
+% Therefore we take suitable precautions.
+% \begin{macrocode}
+% \def\reserved@c{\noexpand\reserved@c\noexpand}%
+% \let\reserved@e\relax
+% \end{macrocode}
+% We will now go through the |\alpha@list| to process every
+% \meta{math alphabet identifier} in turn.
+% Since this list has |\group@elt| as a delimiter we define
+% this control sequence. It has three arguments as every
+% entry consists of three items (as explained above).
+% \begin{macrocode}
+% \def\group@elt##1##2##3{%
+% \end{macrocode}
+% The first of these arguments is the \meta{math alphabet
+% identifier}. We redefine it by appending the information
+% about the new version at the end of the list contained in
+% it. However, there is one subtlety: the definitions for
+% |\reserved@c| and |\reserved@e| made above prevent the
+% main part of the list from being expanded. But we still have
+% to take care of the header and the trailer. To do this we
+% remove the trailer by means of the macro |\remove@nil|
+% which also protect the header from being expanded. Its
+% definition is given below. Now we can prepare to add the
+% new version.
+% \begin{macrocode}
+% \edef##1{\expandafter\remove@nil##1%
+% \reserved@c
+% #1%
+% \reserved@e
+% \noexpand\@nil}}%
+% \end{macrocode}
+% Finally we call |\alpha@list| which will now execute
+% the macro |\group@elt| once for every defined \meta{math
+% alphabet identifier}. And that's all for now.
+% \begin{macrocode}
+% \alpha@list
+% \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\alpha@list}
+% As we explained above every entry in |\alpha@list| has
+% the form\\[2pt]
+% |\alpha@elt|\\\meta{alphabet identifier}\meta{internal
+% group number}\meta{default font assignments}\ldots\\[2pt]
+% We initialize it to |\@empty|.
+% \begin{macrocode}
+\let\alpha@list\@empty
+\@onlypreamble\alpha@list
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\alpha@elt}
+% \begin{macrocode}
+\let\alpha@elt\relax
+\@onlypreamble\alpha@elt
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\newgroup}
+% Start the group (fam) allocation at 0. (Doesn't belong here.)
+% \begin{macrocode}
+\count18=-1
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\stepcounter}
+% \changes{v3.0f}{1997/11/13}
+% {(DPC) Remove as never used. (Re)defined in ltcounts}
+% \end{macro}
+%
+% \begin{macro}{\select@group}
+% We surround |\select@group| with braces so that functions using it
+% can be used directly after |_| or |^|.
+% \changes{v2.1p}{1994/12/10}{Surround with braces (add fourth arg)}
+% However, if we use oldstyle syntax where the math alphabet
+% doesn't have arguments (ie if |\math@bgroup| is not |\bgroup|) we
+% need to get rid of the extra group.
+% \changes{v2.1q}{1995/04/02}{fix problem for pr/1275}
+% \changes{v3.0g}{1997/11/20}
+% {(DPC) inline use of \cs{stepcounter} (faster, and saves a csname
+% per math version as no reset list)}
+% \changes{v3.0q}{2015/03/18}{Introduce \cs{e@mathgroup@top}}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease> {\select@group}{\select@group}%
+%<*2ekernel|latexrelease>
+\def\select@group#1#2#3#4{%
+ \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
+ {%
+ \ifmmode
+ \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top
+ \begingroup
+ \escapechar\m@ne
+ \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
+ \globaldefs\@ne \math@fonts
+ \endgroup
+ \init@restore@version
+ \xdef#1{\noexpand\use@mathgroup\noexpand#2%
+ {\number\csname c@mv@\math@version\endcsname}}%
+ \global\advance\csname c@mv@\math@version\endcsname\@ne
+ \else
+ \let#1\relax
+ \@latex@error{Too many math alphabets used in
+ version \math@version}%
+ \@eha
+ \fi
+ \else \expandafter\non@alpherr\fi
+ #1{#4}%
+ }%
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}
+%<latexrelease> {\select@group}{\select@group}%
+%<latexrelease>\def\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<\sixt@@n
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m@ne
+%<latexrelease> \getanddefine@fonts
+%<latexrelease> {\csname c@mv@\math@version\endcsname}#3%
+%<latexrelease> \globaldefs\@ne \math@fonts
+%<latexrelease> \endgroup
+%<latexrelease> \init@restore@version
+%<latexrelease> \xdef#1{\noexpand\use@mathgroup\noexpand#2%
+%<latexrelease> {\number\csname c@mv@\math@version\endcsname}}%
+%<latexrelease> \global\advance\csname c@mv@\math@version\endcsname\@ne
+%<latexrelease> \else
+%<latexrelease> \let#1\relax
+%<latexrelease> \@latex@error{Too many math alphabets used in
+%<latexrelease> version \math@version}%
+%<latexrelease> \@eha
+%<latexrelease> \fi
+%<latexrelease> \else \expandafter\non@alpherr\fi
+%<latexrelease> #1{#4}%
+%<latexrelease> }%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\restore@mathversion
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\init@restore@version}
+% \changes{v3.0e}{1996/07/26}{Removed \cs{ifrestore@version} switch
+% and replaced by \cs{init@restore@version}}
+% \begin{macrocode}
+\def\init@restore@version{%
+ \global\let\init@restore@version\relax
+ \xdef\restore@mathversion
+ {\expandafter\noexpand\csname mv@\math@version\endcsname
+ \global\csname c@mv@\math@version\endcsname
+ \number\csname c@mv@\math@version\endcsname\relax}%
+ \aftergroup\dorestore@version
+}
+\@onlypreamble\init@restore@version
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\non@alpherr}
+% \changes{v3.0c}{1995/10/10}
+% {(DPC) autoload error message}
+% \changes{v3.0j}{2005/07/27}
+% {(MH) Change because command is now properly robust}
+% \begin{macrocode}
+\gdef\non@alpherr#1{\@latex@error{%
+% \end{macrocode}
+% The command here will have a space at the end of its name, so we make
+% sure not to insert an extra one.
+% \begin{macrocode}
+ \string#1allowed only in math mode}\@ehd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dorestore@version}
+% \begin{macrocode}
+\def\dorestore@version
+ {\ifmmode
+ \aftergroup\dorestore@version
+ \else
+ \gdef\init@restore@version{%
+ \global\let\init@restore@version\relax
+ \xdef\restore@mathversion
+ {\expandafter\noexpand\csname mv@\math@version\endcsname
+ \global\csname c@mv@\math@version\endcsname
+ \number\csname c@mv@\math@version\endcsname\relax}%
+ \aftergroup\dorestore@version
+ }%
+ \begingroup
+ \let\getanddefine@fonts\@gobbletwo
+ \restore@mathversion
+ \endgroup
+ \fi}%
+\@onlypreamble\dorestore@version
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\document@select@group}
+% We surround |\select@group| with braces so that functions using it
+% can be used directly after |_| or |^|.
+% \changes{v2.1p}{1994/12/10}{Surround with braces (add fourth arg)}
+% \changes{v2.1q}{1995/04/02}{fix problem for pr/1275}
+% \changes{v3.0g}{1997/11/20}
+% {(DPC) inline use of \cs{stepcounter} (faster, and saves a csname
+% per math version as no reset list)}
+% \changes{v3.0q}{2015/03/18}{Introduce \cs{e@mathgroup@top}}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease> {\document@select@group}{\document@select@group}%
+%<*2ekernel|latexrelease>
+\def\document@select@group#1#2#3#4{%
+ \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
+ {%
+ \ifmmode
+ \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top
+ \begingroup
+ \escapechar\m@ne
+ \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
+ \globaldefs\@ne \math@fonts
+ \endgroup
+ \expandafter\extract@alph@from@version
+ \csname mv@\math@version\expandafter\endcsname
+ \expandafter{\number\csname
+ c@mv@\math@version\endcsname}%
+ #1%
+ \global\advance\csname c@mv@\math@version\endcsname\@ne
+ \else
+ \let#1\relax
+ \@latex@error{Too many math alphabets used
+ in version \math@version}%
+ \@eha
+ \fi
+ \else \expandafter\non@alpherr\fi
+ #1{#4}%
+ }%
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}
+%<latexrelease> {\document@select@group}{\document@select@group}%
+%<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<\sixt@@n
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m@ne
+%<latexrelease> \getanddefine@fonts
+%<latexrelease> {\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
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\process@table}
+% \begin{macrocode}
+\def\process@table{%
+ \def\cdp@elt##1##2##3##4{%
+ \@font@info{Checking defaults for
+ ##1/##2/##3/##4}%
+ \expandafter
+ \ifx\csname##1/##2/##3/##4\endcsname\relax
+% \end{macrocode}
+% Grouping is important for two reasons, first |\cdp@elt| will get
+% redefined if |\Declare...| functions are executed within the
+% external |.fd| file and secondly |\try@load@fontshape| changes a
+% lot of catcodes without surrounding itself with a group.
+% \begin{macrocode}
+ \begingroup
+ \def\f@encoding{##1}\def\f@family{##2}%
+ \try@load@fontshape
+ \endgroup
+ \fi
+ \expandafter
+ \ifx\csname##1/##2/##3/##4\endcsname\relax
+ \@latex@error{This NFSS system isn't set up properly}%
+ {For encoding scheme ##1 the defaults
+ ##2/##3/##4 do not form a valid font shape}%
+ \else
+ \@font@info{... okay}%
+ \fi}%
+ \cdp@list
+% \end{macrocode}
+% Now we make sure that |\error@fontshape| is okay.
+% \begin{macrocode}
+ \begingroup
+ \escapechar\m@ne
+ \error@fontshape
+ \expandafter\ifx\csname \curr@fontshape\endcsname\relax
+ \begingroup
+ \try@load@fontshape
+ \endgroup
+ \fi
+ \expandafter\ifx\csname \curr@fontshape\endcsname\relax
+ \@latex@error{This NFSS system isn't set up properly}%
+ {The system maintainer forgot to specify a suitable
+ substitution
+ font shape using the \noexpand\DeclareErrorFont
+ command}%
+ \fi
+ \endgroup
+% \end{macrocode}
+% Set |\select@group| to its meaning used within the document body.
+% \begin{macrocode}
+ \let\select@group\document@select@group
+% \end{macrocode}
+% Install the default font attributes they are currently pointing
+% to error font shape.
+% Don't use |\reset@font| since that would trigger |\selectfont|.
+% \begin{macrocode}
+ \fontencoding{\encodingdefault}%
+ \fontfamily{\familydefault}%
+ \fontseries{\seriesdefault}%
+ \fontshape{\shapedefault}%
+% \end{macrocode}
+% kill all macros not longer needed.
+% we need to add many more!!!!!!
+% \begin{macrocode}
+ \everyjob{}%
+}
+\@onlypreamble\process@table
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\@onlypreamble\set@mathradical
+% \end{macrocode}
+%
+% \begin{macro}{\DeclareMathVersion}
+% \begin{macrocode}
+\def\DeclareMathVersion#1{%
+ \expandafter\new@mathversion\csname mv@#1\endcsname}
+\@onlypreamble\DeclareMathVersion
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\new@mathversion}
+% \changes{v3.0o}{2011/09/03}
+% {(Will) Remove \cs{global} before \cs{newcount} (unnecessary and caused etex bug).}
+% \begin{macrocode}
+\def\new@mathversion#1{%
+ \expandafter\in@\expandafter#1\expandafter{\version@list}%
+ \ifin@
+ \@font@info{Redeclaring math version
+ `\expandafter\@gobblefour\string#1'}%
+ \else
+ \expandafter\newcount\csname c@\expandafter
+ \@gobble\string#1\endcsname
+ \def\version@elt{\noexpand\version@elt\noexpand}%
+ \edef\version@list{\version@list\version@elt#1}%
+ \fi
+% \end{macrocode}
+% |\toks@| is used to gather all tokens for the math version.
+% |\count@| will be used to count the math groups we add to this
+% version.
+% \begin{macrocode}
+ \toks@{}%
+ \count@\z@
+% \end{macrocode}
+% Now we loop over |\group@list| to add all math groups defined so
+% far to the version and at the same time to count them.
+% \begin{macrocode}
+ \def\group@elt##1##2{%
+ \advance\count@\@ne
+ \addto@hook\toks@{\getanddefine@fonts##1##2}%
+ }%
+ \group@list
+% \end{macrocode}
+% We set the counter for this math version to the number of math
+% groups found in |\group@list|.
+% \begin{macrocode}
+ \global\csname c@\expandafter\@gobble\string#1\endcsname\count@
+% \end{macrocode}
+% Now we loop over |\alpha@list| to add all math alphabets known so
+% far. We have to distinguish the case that an alphabet by default
+% should produce an error in new versions.
+% \begin{macrocode}
+ \def\alpha@elt##1##2##3{%
+ \ifx##2\no@alphabet@error
+ \toks@\expandafter{\the\toks@\install@mathalphabet##1%
+ {\no@alphabet@error##1}}%
+ \else
+ \toks@\expandafter{\the\toks@\install@mathalphabet##1%
+ {\select@group##1##2##3}}%
+ \fi
+ }%
+ \alpha@list
+% \end{macrocode}
+% Finally we define the math version to expand to the contents of
+% |\toks@|.
+% \changes{v2.0e}{1993/08/18}{Exchanged names of encodings in warning
+% message of \cs{SetSymbolFont}.}
+% \begin{macrocode}
+ \xdef#1{\the\toks@}%
+}
+\@onlypreamble\new@mathversion
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareSymbolFont}
+% \begin{macrocode}
+\def\DeclareSymbolFont#1#2#3#4#5{%
+ \@tempswafalse
+ \edef\reserved@b{#2}%
+ \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
+ \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
+ \cdp@list
+ \if@tempswa
+ \@ifundefined{sym#1}{%
+% \end{macrocode}
+%
+% \changes{v3.0q}{2015/03/18}{Restrict Symbol fonts to 0-15}
+% \begin{macrocode}
+ \ifnum\count18<15 %
+ \expandafter\new@mathgroup\csname sym#1\endcsname
+ \expandafter\new@symbolfont\csname sym#1\endcsname
+ {#2}{#3}{#4}{#5}%
+ \else
+ \@latex@error{Too many symbol fonts declared}\@eha
+ \fi
+ }%
+ {%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@font@info{Redeclaring symbol font `#1'}%
+% \end{macrocode}
+% \changes{v3.0f}{1997/11/13}
+% {(DPC) Really update \cs{group@list} dont
+% leave new version in \cs{toks@}. latex/2661}
+% Update the group list.
+% \begin{macrocode}
+ \def\group@elt##1##2{%
+ \noexpand\group@elt\noexpand##1%
+ \expandafter\ifx\csname sym#1\endcsname##1%
+ \expandafter\noexpand\csname#2/#3/#4/#5\endcsname
+ \else
+ \noexpand##2%
+ \fi}%
+ \xdef\group@list{\group@list}%
+% \end{macrocode}
+% Update the version list.
+% \begin{macrocode}
+ \def\version@elt##1{%
+ \expandafter
+ \SetSymbolFont@\expandafter##1\csname#2/#3/#4/#5\expandafter
+ \endcsname \csname sym#1\endcsname
+ }%
+ \version@list
+ }%
+ \else
+ \@latex@error{Encoding scheme `#2' unknown}\@eha
+ \fi
+ }
+\@onlypreamble\DeclareSymbolFont
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\group@list}
+% \begin{macrocode}
+\let\group@list\@empty
+\@onlypreamble\group@list
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\group@elt}
+% \begin{macrocode}
+\let\group@elt\relax
+\@onlypreamble\group@elt
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\new@symbolfont}
+% \begin{macrocode}
+\def\new@symbolfont#1#2#3#4#5{%
+ \toks@\expandafter{\group@list}%
+ \edef\group@list{\the\toks@\noexpand\group@elt\noexpand#1%
+ \expandafter\noexpand\csname#2/#3/#4/#5\endcsname}%
+ \def\version@elt##1{\toks@\expandafter{##1}%
+ \edef##1{\the\toks@\noexpand\getanddefine@fonts
+ #1\expandafter\noexpand\csname#2/#3/#4/#5\endcsname}%
+ \global\advance\csname c@\expandafter
+ \@gobble\string##1\endcsname\@ne
+ }%
+ \version@list
+}
+\@onlypreamble\new@symbolfont
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SetSymbolFont}
+% \begin{macrocode}
+\def\SetSymbolFont#1#2#3#4#5#6{%
+ \@tempswafalse
+ \edef\reserved@b{#3}%
+ \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
+ \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
+ \cdp@list
+ \if@tempswa
+ \expandafter\SetSymbolFont@
+ \csname mv@#2\expandafter\endcsname\csname#3/#4/#5/#6\expandafter
+ \endcsname \csname sym#1\endcsname
+ \else
+ \@latex@error{Encoding scheme `#3' unknown}\@eha
+ \fi
+}
+\@onlypreamble\SetSymbolFont
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SetSymbolFont@}
+% \changes{v3.0l}{2007/08/31}{Font warning changed to info
+% for encoding change (pr/3975)}
+% \begin{macrocode}
+\def\SetSymbolFont@#1#2#3{%
+ \expandafter\in@\expandafter#1\expandafter{\version@list}%
+ \ifin@
+ \expandafter\in@\expandafter#3\expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \expandafter\get@cdp\string#2\@nil\reserved@a
+ \toks@{}%
+ \def\install@mathalphabet##1##2{%
+ \addto@hook\toks@{\install@mathalphabet##1{##2}}%
+ }%
+ \def\getanddefine@fonts##1##2{%
+ \ifnum##1=#3%
+ \addto@hook\toks@{\getanddefine@fonts#3#2}%
+ \expandafter\get@cdp\string##2\@nil\reserved@b
+ \ifx\reserved@a\reserved@b\else
+ \@font@info{Encoding `\reserved@b' has changed
+ to `\reserved@a' for symbol font\MessageBreak
+ `\expandafter\@gobblefour\string#3' in the
+ math version `\expandafter
+ \@gobblefour\string#1'}%
+ \fi
+ \@font@info{%
+ Overwriting symbol font
+ `\expandafter\@gobblefour\string#3' in
+ version `\expandafter
+ \@gobblefour\string#1'\MessageBreak
+ \@spaces \expandafter\@gobble\string##2 -->
+ \expandafter\@gobble\string#2}%
+ \else
+ \addto@hook\toks@{\getanddefine@fonts##1##2}%
+ \fi}%
+ #1%
+ \xdef#1{\the\toks@}%
+ \endgroup
+ \else
+ \@latex@error{Symbol font `\expandafter\@gobblefour\string#3'
+ not defined}\@eha
+ \fi
+ \else
+ \@latex@error{Math version `\expandafter\@gobblefour\string#1'
+ is not
+ defined}{You probably misspelled the name of the math
+ version.^^JOr you have to specify an additional package.}%
+ \fi
+}
+\@onlypreamble\SetSymbolFont@
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\get@cdp}
+% \begin{macrocode}
+\def\get@cdp#1#2/#3\@nil#4{\def#4{#2}}
+\@onlypreamble\get@cdp
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareMathAlphabet}
+% \changes{v3.0j}{2005/07/27}
+% {(MH) Make document commands robust}
+% \begin{macrocode}
+\def\DeclareMathAlphabet#1#2#3#4#5{%
+ \@tempswafalse
+ \edef\reserved@b{#2}%
+ \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
+ \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
+ \cdp@list
+ \if@tempswa
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\endcsname
+ \relax
+ \new@mathalphabet#1{#2}{#3}{#4}{#5}%
+ \else
+% \end{macrocode}
+% Check if it is already a math alphabet.
+% \begin{macrocode}
+ \edef\reserved@a{\noexpand\in@{\string\select@group}%
+ {\expandafter\meaning\csname \expandafter
+ \@gobble\string#1\space\endcsname}}%
+ \reserved@a
+ \ifin@
+ \@font@info{Redeclaring math alphabet \string#1}%
+ \def\version@elt##1{%
+ \expandafter\SetMathAlphabet@\expandafter
+ ##1\csname#2/#3/#4/#5\expandafter\endcsname
+% \end{macrocode}
+% \changes{???}{1994/04/18}{Pass correct arg (2 not 3)}
+% \begin{macrocode}
+ \csname M@#2\expandafter\endcsname
+ \csname \expandafter\@gobble\string#1\space\endcsname#1}%
+ \version@list
+ \else
+% \end{macrocode}
+% Check if it is a math alphabet defined via
+% |\DeclareSymbolFontAlphabet|.
+% \begin{macrocode}
+ \edef\reserved@a{\noexpand\in@{\string\use@mathgroup}%
+ {\expandafter\meaning\csname \expandafter
+ \@gobble\string#1\space\endcsname}}%
+ \reserved@a
+ \ifin@
+% \end{macrocode}
+% In that case overwriting is simple since there is nothing
+% inserted in the math version macros.
+% \begin{macrocode}
+ \@font@info{Redeclaring math alphabet \string#1}%
+ \new@mathalphabet#1{#2}{#3}{#4}{#5}%
+% \end{macrocode}
+% Otherwise panic.
+% \begin{macrocode}
+ \else
+ \@latex@error{Command `\string#1' already defined}\@eha
+ \fi
+ \fi
+ \fi
+ \else
+ \@latex@error{Encoding scheme `#2' unknown}\@eha
+ \fi
+ }
+\@onlypreamble\DeclareMathAlphabet
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\new@mathalphabet}
+% \changes{v3.0j}{2005/07/27}
+% {(MH) Make document commands robust}
+% \begin{macrocode}
+\def\new@mathalphabet#1#2#3#4#5{%
+ \toks@\expandafter{\alpha@list}%
+ \edef#1{\expandafter\noexpand\csname \expandafter
+ \@gobble\string#1\space\endcsname
+ \if/#5/%
+ \noexpand\no@alphabet@error
+ \noexpand\no@alphabet@error
+ \else
+ \expandafter\noexpand\csname M@#2\endcsname
+ \expandafter\noexpand\csname#2/#3/#4/#5\endcsname
+ \fi
+ }%
+ \toks2\expandafter{#1}%
+ \edef\alpha@list{\the\toks@\noexpand\alpha@elt\the\toks2}%
+ \def\version@elt##1{\toks@\expandafter{##1}%
+ \edef##1{\the\toks@\install@mathalphabet
+ \expandafter\noexpand
+ \csname \expandafter\@gobble
+ \string#1\space\endcsname
+ {\if/#5/%
+ \noexpand\no@alphabet@error
+ \noexpand#1%
+ \else
+ \noexpand\select@group\the\toks2
+ \fi}}%
+ }%
+ \version@list
+ \expandafter\edef\csname \expandafter\@gobble
+ \string#1\space\endcsname{\if/#5/%
+ \noexpand\no@alphabet@error
+ \noexpand#1%
+ \else
+ \noexpand\select@group\the\toks2
+ \fi}%
+ \edef#1{\noexpand\protect
+ \expandafter\noexpand\csname \expandafter
+ \@gobble\string#1\space\endcsname}%
+}
+\@onlypreamble\new@mathalphabet
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SetMathAlphabet}
+% \changes{v3.0j}{2005/07/27}
+% {(MH) Make document commands robust}
+% \begin{macrocode}
+\def\SetMathAlphabet#1#2#3#4#5#6{%
+ \@tempswafalse
+ \edef\reserved@b{#3}%
+ \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}%
+ \ifx\reserved@b\reserved@c \@tempswatrue\fi}%
+ \cdp@list
+ \if@tempswa
+ \expandafter\SetMathAlphabet@
+ \csname mv@#2\expandafter\endcsname\csname#3/#4/#5/#6\expandafter
+ \endcsname \csname M@#3\expandafter\endcsname
+ \csname \expandafter\@gobble\string#1\space\endcsname#1%
+ \else
+ \@latex@error{Encoding scheme `#3' unknown}\@eha
+ \fi
+}
+\@onlypreamble\SetMathAlphabet
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SetMathAlphabet@}
+% \begin{macrocode}
+\def\SetMathAlphabet@#1#2#3#4#5{%
+ \expandafter\in@\expandafter#1\expandafter{\version@list}%
+ \ifin@
+ \expandafter\in@\expandafter#4\expandafter{\alpha@list}%
+ \ifin@
+ \begingroup
+ \toks@{}%
+ \def\getanddefine@fonts##1##2{%
+ \addto@hook\toks@{\getanddefine@fonts##1##2}%
+ }%
+ \def\reserved@c##1##2##3##4{% % for message below
+ \expandafter\@gobble\string##4}%
+ \def\install@mathalphabet##1##2{%
+ \ifx##1#4%
+ \addto@hook\toks@
+ {\install@mathalphabet#4{\select@group#4#3#2}}%
+ \@font@info{Overwriting math alphabet
+ `\string#5' in version `\expandafter
+ \@gobblefour\string#1'\MessageBreak
+ \@spaces \reserved@c##2 -->
+ \expandafter\@gobble\string#2}%
+ \else
+ \addto@hook\toks@{\install@mathalphabet##1{##2}}%
+ \fi
+ }%
+ #1%
+ \xdef#1{\the\toks@}%
+ \endgroup
+ \else
+% \end{macrocode}
+% If the math alphabet was defined via |\DeclareSymbolFontAlphabet|
+% we have remove its external definition and add it as a normal
+% math alphabet to every version before trying to change it in one
+% version.
+% \changes{v2.1b}{1994/03/11}{Changed parameter template in temporary
+% macro to catch check add below.}
+% \begin{macrocode}
+ \edef\reserved@a{%
+ \noexpand\in@{\string\use@mathgroup}{\meaning#4}}%
+ \reserved@a
+ \ifin@
+ \def\reserved@b##1\use@mathgroup##2##3{%
+ \def\reserved@b{##3}\def\reserved@c{##2}}%
+ \expandafter\reserved@b#4%
+ \begingroup
+ \def\install@mathalphabet##1##2{%
+ \addto@hook\toks@{\install@mathalphabet##1{##2}}%
+ }%
+ \def\getanddefine@fonts##1##2{%
+ \addto@hook\toks@{\getanddefine@fonts##1##2}%
+ \ifnum##1=\reserved@b
+ \expandafter
+ \addto@hook\expandafter\toks@
+ \expandafter{\expandafter\install@mathalphabet
+ \expandafter#4\expandafter
+ {\expandafter\select@group\expandafter
+ #4\reserved@c##2}}%
+ \fi
+ }%
+ \def\version@elt##1{%
+ \toks@{}%
+ ##1%
+ \xdef##1{\the\toks@}%
+ }%
+ \version@list
+ \endgroup
+% \end{macrocode}
+% Put it into the |\alpha@list| with default `error'
+% \begin{macrocode}
+ \expandafter\gdef\expandafter\alpha@list\expandafter
+ {\alpha@list
+ \alpha@elt #4\no@alphabet@error \no@alphabet@error}%
+ \gdef#4{\no@alphabet@error #5}% fake things :-)
+% \end{macrocode}
+% Then call the internal setting routine again:
+% \begin{macrocode}
+ \SetMathAlphabet@{#1}{#2}{#3}#4#5%
+ \else
+ \@latex@error{Command `\string#5' not defined as a
+ math alphabet}%
+ {Use \noexpand\DeclareMathAlphabet to define it.}%
+ \fi
+ \fi
+ \else
+ \@latex@error{Math version `\expandafter\@gobblefour\string#1'
+ is not
+ defined}{You probably misspelled the name of the math
+ version.^^JOr you have to specify an additional package.}%
+ \fi
+}
+\@onlypreamble\SetMathAlphabet@
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareMathAlphabet}
+% could do with more checks like allowing single number in |#4|
+% lowercase in |#4| etc
+% \changes{v3.0r}{2016/02/18}
+% {Check for mathaccent not \cs{mathaccemt}}
+% \begin{macrocode}
+\def\DeclareMathAccent#1#2#3#4{%
+ \expandafter\in@\csname sym#3\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \count\z@=#4\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \if\relax\noexpand#1% is command?
+ \edef\reserved@a{\noexpand\in@
+ {\expandafter\@gobble\string\mathaccent}{\meaning#1}}%
+ \reserved@a
+ \ifin@
+ \expandafter\set@mathaccent
+ \csname sym#3\endcsname#1#2%
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \@font@info{Redeclaring math accent \string#1}%
+ \else
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\endcsname
+ \relax
+ \expandafter\set@mathaccent
+ \csname sym#3\endcsname#1#2%
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \else
+ \@latex@error{Command `\string#1' already defined}\@eha
+ \fi
+ \fi
+ \else
+ \@latex@error{Not a command name: `\noexpand#1'}\@eha
+ \fi
+ \endgroup
+ \else
+ \@latex@error{Symbol font `#3' is not defined}\@eha
+ \fi
+}
+\@onlypreamble\DeclareMathAccent
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@mathaccent}
+% \begin{macrocode}
+\def\set@mathaccent#1#2#3#4{%
+ \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}}
+\@onlypreamble\set@mathaccent
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareMathSymbol}
+% \changes{v3.0r}{2016/02/18}
+% {Check for mathchar not \cs{mathchar}}
+% \begin{macrocode}
+\def\DeclareMathSymbol#1#2#3#4{%
+ \expandafter\in@\csname sym#3\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \count\z@=#4\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \if\relax\noexpand#1% is command?
+ \edef\reserved@a
+ {\noexpand\in@{\expandafter\@gobble\string\mathchar}%
+ {\meaning#1}}%
+ \reserved@a
+ \ifin@
+ \expandafter\set@mathsymbol
+ \csname sym#3\endcsname#1#2%
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \@font@info{Redeclaring math symbol \string#1}%
+ \else
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\endcsname
+ \relax
+ \expandafter\set@mathsymbol
+ \csname sym#3\endcsname#1#2%
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \else
+ \@latex@error{Command `\string#1' already defined}\@eha
+ \fi
+ \fi
+ \else
+ \expandafter\set@mathchar
+ \csname sym#3\endcsname#1#2
+ {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \fi
+ \endgroup
+ \else
+ \@latex@error{Symbol font `#3' is not defined}\@eha
+ \fi
+}
+\@onlypreamble\DeclareMathSymbol
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@mathchar}
+% \begin{macrocode}
+\def\set@mathchar#1#2#3#4{%
+ \global\mathcode`#2="\mathchar@type#3\hexnumber@#1#4\relax}
+\@onlypreamble\set@mathchar
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@mathsymbol}
+% \begin{macrocode}
+\def\set@mathsymbol#1#2#3#4{%
+ \global\mathchardef#2"\mathchar@type#3\hexnumber@#1#4\relax}
+\@onlypreamble\set@mathsymbol
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\def\mathsymbol#1#2#3{%
+% \@tempcnta=#3\relax
+% \@tempcntb\@tempcnta
+% \divide\@tempcnta\sixt@@n
+% \count@\@tempcnta
+% \multiply\count@\sixt@@n
+% \advance\@tempcntb-\count@
+% \mathchar"\mathchar@type#1\hexnumber@#2%
+% \hexnumber@\@tempcnta\hexnumber@\@tempcntb\relax}
+%
+%\def\DeclareMathAlphabetCharacter#1#2#3{%
+% \DeclareMathSymbol{#1}7{#2}{#3}}
+% \end{macrocode}
+%
+% \begin{macro}{\DeclareMathDelimiter}
+% \changes{v2.1m}{1994/11/18}
+% {(DPC) \cs{expandafter} instead of \cs{next}}
+% \begin{macrocode}
+\def\DeclareMathDelimiter#1{%
+ \if\relax\noexpand#1%
+ \expandafter\@DeclareMathDelimiter
+ \else
+ \expandafter\@xxDeclareMathDelimiter
+ \fi
+ #1}
+\@onlypreamble\DeclareMathDelimiter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xxDeclareMathDelimiter}
+% \changes{v3.0h}{1998/04/15}{Macro added (pr/2662)}
+% This macro checks if the second arg is a ``math type'' such
+% as |\mathopen|. The undocumented original code didn't use math
+% types when the delimiter was a single letter.
+% For this reason the coding is a bit strange as it tries to
+% support the undocumented syntax for compatibility reasons.
+% \begin{macrocode}
+\def\@xxDeclareMathDelimiter#1#2#3#4{%
+% \end{macrocode}
+% 7 is the default value returned in the case that |\mathchar@type|
+% is passed something unexpected, like a math symbol font name.
+% We locally move |\mathalpha| out of the way so if you use that
+% the right branch is taken. This will still fail if an explicit
+% number |7| is used!
+% \begin{macrocode}
+ \begingroup
+ \let\mathalpha\mathord
+ \ifnum7=\mathchar@type{#2}%
+ \endgroup
+% \end{macrocode}
+% If this branch is taken we have old syntax (5 arguments).
+% \begin{macrocode}
+ \expandafter\@firstofone
+ \else
+% \end{macrocode}
+% If this branch is taken |\mathchar@type| is different from 7 so
+% we assume new syntax. In this case we also use the arguments to
+% set up the letter as a math symbol for the case where it is not
+% used as a delimiter.
+% \begin{macrocode}
+ \endgroup
+ \DeclareMathSymbol#1{#2}{#3}{#4}%
+% \end{macrocode}
+% Then we arrange that |\@xDeclareMathDelimiter| only gets |#1|,
+% |#3|, |#4| \ldots\ as it does not expect a math type as argument.
+% \begin{macrocode}
+ \expandafter\@firstoftwo
+ \fi
+ {\@xDeclareMathDelimiter#1}{#2}{#3}{#4}}
+\@onlypreamble\@xxDeclareMathDelimiter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@DeclareMathDelimiter}
+% \changes{v3.0r}{2016/02/18}
+% {Check for delimiter not \cs{delimiter}}
+% \begin{macrocode}
+\def\@DeclareMathDelimiter#1#2#3#4#5#6{%
+ \expandafter\in@\csname sym#3\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \expandafter\in@\csname sym#5\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \count\z@=#4\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \edef\reserved@c{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ %
+ \count\z@=#6\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ %
+ \edef\reserved@a{\noexpand\in@
+ {\expandafter\@gobble\string\delimiter}{\meaning#1}}%
+ \reserved@a
+ \ifin@
+ \expandafter\set@mathdelimiter
+ \csname sym#3\expandafter\endcsname
+ \csname sym#5\endcsname#1#2%
+ \reserved@c\reserved@d
+ \@font@info{Redeclaring math delimiter \string#1}%
+ \else
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\endcsname
+ \relax
+ \expandafter\set@mathdelimiter
+ \csname sym#3\expandafter\endcsname
+ \csname sym#5\endcsname#1#2%
+ \reserved@c\reserved@d
+ \else
+ \@latex@error{Command `\string#1' already defined}\@eha
+ \fi
+ \fi
+ \endgroup
+ \else
+ \@latex@error{Symbol font `#5' is not defined}\@eha
+ \fi
+ \else
+ \@latex@error{Symbol font `#3' is not defined}\@eha
+ \fi
+}
+\@onlypreamble\@DeclareMathDelimiter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xDeclareMathDelimiter}
+% \begin{macrocode}
+\def\@xDeclareMathDelimiter#1#2#3#4#5{%
+ \expandafter\in@\csname sym#2\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \expandafter\in@\csname sym#4\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \count\z@=#3\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \edef\reserved@c{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ %
+ \count\z@=#5\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \expandafter\set@@mathdelimiter
+ \csname sym#2\expandafter\endcsname\csname sym#4\endcsname#1%
+ \reserved@c\reserved@d
+ \endgroup
+ \else
+ \@latex@error{Symbol font `#4' is not defined}\@eha
+ \fi
+ \else
+ \@latex@error{Symbol font `#2' is not defined}\@eha
+ \fi
+}
+\@onlypreamble\@xDeclareMathDelimiter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@mathdelimiter}
+% We have to end the definition of a math delimiter like |\lfloor|
+% with a space and not with |\relax| as we did before, because
+% otherwise constructs involving |\abovewithdelims| will prematurely
+% end (pr/1329)
+%
+% \changes{v2.1q}{1995/04/02}{fix pr/1329}
+% \begin{macrocode}
+\def\set@mathdelimiter#1#2#3#4#5#6{%
+ \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5%
+ \hexnumber@#2#6 }}
+\@onlypreamble\set@mathdelimiter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@@mathdelimiter}
+% \begin{macrocode}
+\def\set@@mathdelimiter#1#2#3#4#5{%
+ \global\delcode`#3="\hexnumber@#1#4\hexnumber@#2#5\relax}
+\@onlypreamble\set@@mathdelimiter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareMathRadical}
+% \begin{macrocode}
+\def\DeclareMathRadical#1#2#3#4#5{%
+% \end{macrocode}
+% Below is a crude fix to make this macro work if |#1| is undefined
+% or |\relax|. Should be improved!
+% \changes{v2.1t}{1995/05/21}{Allow for undefined cs names}
+% \changes{v3.0r}{2016/02/18}
+% {Check for radical not \cs{radical}}
+% \begin{macrocode}
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\endcsname
+ \relax
+ \let#1\radical
+ \fi
+ \edef\reserved@a{\noexpand\in@
+ {\expandafter\@gobble\string\radical}{\meaning#1}}%
+ \reserved@a
+ \ifin@
+ \expandafter\in@\csname sym#2\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \expandafter\in@\csname sym#4\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+ \begingroup
+ \count\z@=#3\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \edef\reserved@c{%
+ \hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+ \count\z@=#5\relax
+ \count\tw@\count\z@
+ \divide\count\z@\sixt@@n
+ \count@\count\z@
+ \multiply\count@\sixt@@n
+ \advance\count\tw@-\count@
+ \edef\reserved@d{%
+ \hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+% \end{macrocode}
+% Coded inline instead of using |\set@mathradical|
+% \begin{macrocode}
+% \expandafter\set@mathradical
+% \csname sym#2\expandafter\endcsname
+% \csname sym#4\endcsname#1%
+% \reserved@c\reserved@d
+ \xdef#1{\radical"\expandafter\hexnumber@
+ \csname sym#2\endcsname\reserved@c
+ \expandafter\hexnumber@
+ \csname sym#4\endcsname\reserved@d
+ \relax}%
+ \endgroup
+ \else
+ \@latex@error{Symbol font `#4' is not defined}\@eha
+ \fi
+ \else
+ \@latex@error{Symbol font `#2' is not defined}\@eha
+ \fi
+ \else
+ \@latex@error{Command `\string#1' already defined}\@eha
+ \fi
+}
+\@onlypreamble\DeclareMathRadical
+% \end{macrocode}
+% \end{macro}
+%
+% Definition below was wrong it contained |\delimiter| !
+%
+%\begin{verbatim}
+%\def\set@mathradical#1#2#3#4#5{%
+% \xdef#3{\radical"\hexnumber@#1#4\hexnumber@#2#5\relax}}
+%\end{verbatim}
+%
+% \begin{macro}{\mathalpha}
+% just a dummy currently
+% \begin{macrocode}
+\let\mathalpha\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mathchar@type}
+% \begin{macrocode}
+\def\mathchar@type#1{%
+ \ifodd 2#11 #1\else % is this non-negative number?
+ \ifx#1\mathord 0\else
+ \ifx#1\mathop 1\else
+ \ifx#1\mathbin 2\else
+ \ifx#1\mathrel 3\else
+ \ifx#1\mathopen 4\else
+ \ifx#1\mathclose 5\else
+ \ifx#1\mathpunct 6\else
+ 7% % anything else is variable ord
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+\@onlypreamble\mathchar@type
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareSymbolFontAlphabet}
+% \changes{v3.0j}{2005/07/27}
+% {(MH) Make document commands robust}
+% \begin{macrocode}
+\def\DeclareSymbolFontAlphabet#1#2{%
+ \expandafter\DeclareSymbolFontAlphabet@
+ \csname \expandafter\@gobble\string#1\space\endcsname{#2}#1}
+\@onlypreamble\DeclareSymbolFontAlphabet
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareSymbolFontAlphabet@}
+% \begin{macrocode}
+\def\DeclareSymbolFontAlphabet@#1#2#3{%
+% \end{macrocode}
+% We use the switch |\if@tempswa| to decide if we can declare this
+% symbol font alphabet.
+% \begin{macrocode}
+ \@tempswatrue
+% \end{macrocode}
+% First check if |#2| is known to be a symbol font
+% \begin{macrocode}
+ \expandafter\in@\csname sym#2\expandafter\endcsname
+ \expandafter{\group@list}%
+ \ifin@
+% \end{macrocode}
+% Check if |#1| is defined as a math alphabet defined via
+% |\DeclareMathAlphabet|:
+% \begin{macrocode}
+ \expandafter\in@\expandafter#1\expandafter{\alpha@list}%
+ \ifin@
+% \end{macrocode}
+% If so remove it from the |\alpha@list| and from all math version
+% macros.
+% \begin{macrocode}
+ \@font@info{Redeclaring math alphabet \string#3}%
+ \toks@{}%
+ \def\alpha@elt##1##2##3{%
+ \ifx##1#1\else\addto@hook\toks@{\alpha@elt##1##2##3}\fi}%
+ \alpha@list
+ \xdef\alpha@list{\the\toks@}%
+% \end{macrocode}
+% Now we loop over all versions and remove the math alphabet:
+% \begin{macrocode}
+ \def\version@elt##1{%
+ \begingroup
+ \toks@{}%
+ \def\getanddefine@fonts####1####2{%
+ \addto@hook\toks@{\getanddefine@fonts####1####2}}%
+ \def\install@mathalphabet####1####2{%
+ \ifx####1#1\else
+ \addto@hook\toks@{\install@mathalphabet
+ ####1{####2}}\fi}%
+ ##1%
+ \xdef##1{\the\toks@}%
+ \endgroup
+ }%
+ \version@list
+ \else
+% \end{macrocode}
+% If |#3| is not defined as a math alphabet check if it is defined
+% at all:
+% \begin{macrocode}
+ \expandafter\ifx
+ \csname\expandafter\@gobble\string#1\space\endcsname
+ \relax
+% \end{macrocode}
+% If it is undefined, fine otherwise check if it is a math alphabet
+% defined via |\DeclareSymbolFontAlphabet|:
+% \begin{macrocode}
+ \else
+ \edef\reserved@a{%
+ \noexpand\in@{\string\use@mathgroup}{\meaning#1}}%
+ \reserved@a
+ \ifin@
+ \@font@info{Redeclaring math alphabet \string#3}%
+ \else
+% \end{macrocode}
+% Since the command |#3| is defined to be something which is not a
+% math alphabet we have to skip redefining it.
+% \begin{macrocode}
+ \@tempswafalse
+ \@latex@error{Command `\string#3' already defined}\@eha
+ \fi
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% Since the symbol font is not known we better skip defining this
+% alphabet.
+% \begin{macrocode}
+ \@tempswafalse
+ \@latex@error{Unknown symbol font `#2'}\@eha
+ \fi
+ \if@tempswa
+% \end{macrocode}
+% When we reach this point we are allowed to define |#1| to be a
+% symbol font math alphabet. This means that we have to set it to
+% \begin{quote}
+% |\use@mathgroup| \meta{math-settings} |\sym|\meta{name}
+% \end{quote}
+% The \meta{math-settings} are the one for the encoding that is
+% used in the font shape where |\sym|\meta{name} is pointing to.
+% This means that we have to get it from the information stored in
+% |\group@list|. Thus we loop through that list after defining
+% |\group@elt| in a suitable way.
+% \changes{v2.1b}{1994/03/11}{Added check against use of alphabet
+% switch outside of math mode.}
+% \begin{macrocode}
+ \def\group@elt##1##2{%
+ \expandafter\ifx\csname sym#2\endcsname##1%
+ \expandafter\reserved@a\string##2\@nil
+ \fi}%
+ \def\reserved@a##1##2/##3\@nil{%
+ \def\reserved@a{##2}}%
+ \group@list
+ \toks@{\relax\ifmmode \else \non@alpherr#1\fi}%
+ \edef#1{\the\toks@
+ \noexpand\use@mathgroup
+ \expandafter\noexpand\csname M@\reserved@a\endcsname
+ \csname sym#2\endcsname}%
+ \def#3{\protect#1}%
+ \fi
+}
+\@onlypreamble\DeclareSymbolFontAlphabet@
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfssini.dtx b/macros/latex-dev/base/ltfssini.dtx
new file mode 100644
index 0000000000..4d545f2240
--- /dev/null
+++ b/macros/latex-dev/base/ltfssini.dtx
@@ -0,0 +1,595 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltfssini.dtx
+%% Copyright (C) 1989-2001 Frank Mittelbach and Rainer Sch\"opf,
+%% all rights reserved.
+%
+%<*driver>
+% \fi
+%
+%
+\ProvidesFile{ltfssini.dtx}
+ [2019/07/09 v3.1c LaTeX Kernel (NFSS Initialisation)]
+% \iffalse
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{ltfssini.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \iffalse
+%<+checkmem>\def\CHECKMEM{\tracingstats=2
+%<+checkmem> \newlinechar=`\^^J
+%<+checkmem> \message{^^JMemory usage: \filename}\shipout\hbox{}}
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+%
+% \GetFileInfo{ltfssini.dtx}
+% \title{A new font selection scheme for \TeX{} macro packages\\
+% (Initialisation)\thanks
+% {This file has version number
+% \fileversion\ dated \filedate}}
+%
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This file contains the top level \LaTeX\ interface to the font
+% selection scheme commands. See other parts of the \LaTeX\
+% distribution, or \emph{The \LaTeX\ Companion} for higher level
+% documentation of these commands.
+%
+% \StopEventually{}
+%
+%
+% \changes{v3.0i}{1998/08/17}{(RmS) Minor documentation fixes.}
+% \changes{v3.0b}{1995/06/28}
+% {(DPC) Fix documentation typos}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Make file from previous file, lfonts.dtx 1995/05/23 v2.2e}
+% \changes{v3.1b}{2016/10/15}
+% {Require e\TeX{}}
+%
+%
+% \section{NFSS Initialisation}
+%
+% \iffalse
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+% \changes{v2.2a}{1994/10/14}{New coding for cfg files}
+% \changes{v2.1a}{1993/12/03}{update for LaTeX2e}
+% \changes{v1.2c}{1992/01/06}{added slitex code}
+% \changes{v1.2d}{1992/03/21}{Renamed \cs{text} to \cs{nfss@text}
+% to make it internal.}
+% \changes{v1.2a}{1991/11/27}{All \cs{family}, \cs{shape} etc. renamed
+% to \cs{fontfamily} etc.}
+% \changes{v1.1i}{1990/04/02}{\cs{input} of files now handled
+% by docstrip.}
+% \changes{v1.1g}{1990/02/08}{Protected the commands
+% \cs{family}, \cs{series},
+% \cs{shape}, \cs{size}, \cs{selectfont}, and \cs{mathversion}.}
+% \changes{v1.1c}{1989/12/03}{Some internal macros renamed to make them
+% inaccessible.}
+% \changes{v1.1b}{1989/12/02}{\cs{rmmath} renamed to \cs{mathrm}}
+%
+% \changes{v1.0i}{1989/11/07}{All family, series, and shape names
+% abbreviated.}
+% \changes{v1.0g}{1989/05/22}{Lines shortened to 72 characters}
+% \changes{v1.0f}{1989/04/29}{Corrections to \LaTeX\ tabular env.
+% added.}
+% \changes{v1.0e}{1989/04/27}{Definitions of \LaTeX\ symbols corrected.}
+% \changes{v1.0d}{1989/04/26}{\cs{xpt} added.}
+% \changes{v1.0c}{1989/04/21}{Changed to conform to fam.tex.}
+% \changes{v1.0b}{1989/04/15}{\cs{mathfontset} renamed to
+% \cs{mathversion.}}
+% \changes{v1.0a}{1989/04/10}{Starting with version numbers!
+% \cs{newif} for \cs{@tempswa} added since this switch is
+% unknown at the time when this file is read in.
+% (latex.tex is loaded later.)
+% \cs{math@famname} changed to \cs{math@version.}}
+%
+%
+% \changes{v2.1j}{1994/05/13}{Removed file identification typeout}
+%
+% Finally, there are six commands that are to be used in \LaTeX{}
+% and that we will therefore protect against expansion at the
+% wrong point:
+% |\fontfamily|, |\fontseries|, |\fontshape|, |\fontsize|,
+% |\selectfont|, and |\mathversion|.
+%
+% \changes{v2.1i}{1994/05/12}{Moved \cs{fontfamily} to fam.dtx}
+% \changes{v2.1i}{1994/05/12}{Moved \cs{fontencoding} to fam.dtx}
+% \changes{v2.1i}{1994/05/12}{Moved \cs{fontseries} to fam.dtx}
+% \changes{v2.1i}{1994/05/12}{Moved \cs{fontshape} to fam.dtx}
+% \changes{v2.1i}{1994/05/12}{Moved \cs{fontsize} to fam.dtx}
+% \changes{v2.1i}{1994/05/12}{Moved \cs{mathversion} to fam.dtx}
+% \changes{v2.1i}{1994/05/12}{Moved \cs{selectfont} to tracefnt.dtx}
+%
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \subsection{Providing math \emph{versions}}
+%
+% \LaTeX{} provides two \emph{versions}. We call them
+% \textsf{normal} and \textsf{bold}, respectively.
+% \begin{macrocode}
+\DeclareMathVersion{normal}
+\DeclareMathVersion{bold}
+% \end{macrocode}
+%
+%
+% Now we define the standard font change commands.
+% We don't allow the use of |\rmfamily| etc.\ in math mode.
+%
+% First the changes to another \emph{family}:
+% \begin{macrocode}
+\DeclareRobustCommand\rmfamily
+ {\not@math@alphabet\rmfamily\mathrm
+ \fontfamily\rmdefault\selectfont}
+\DeclareRobustCommand\sffamily
+ {\not@math@alphabet\sffamily\mathsf
+ \fontfamily\sfdefault\selectfont}
+\DeclareRobustCommand\ttfamily
+ {\not@math@alphabet\ttfamily\mathtt
+ \fontfamily\ttdefault\selectfont}
+% \end{macrocode}
+% Then the commands changing the \emph{series}:
+% \begin{macrocode}
+\DeclareRobustCommand\bfseries
+ {\not@math@alphabet\bfseries\mathbf
+ \fontseries\bfdefault\selectfont}
+\DeclareRobustCommand\mdseries
+ {\not@math@alphabet\mdseries\relax
+ \fontseries\mddefault\selectfont}
+\DeclareRobustCommand\upshape
+ {\not@math@alphabet\upshape\relax
+ \fontshape\updefault\selectfont}
+% \end{macrocode}
+% Then the commands changing the \emph{shape}:
+% \begin{macrocode}
+\DeclareRobustCommand\slshape
+ {\not@math@alphabet\slshape\relax
+ \fontshape\sldefault\selectfont}
+\DeclareRobustCommand\scshape
+ {\not@math@alphabet\scshape\relax
+ \fontshape\scdefault\selectfont}
+\DeclareRobustCommand\itshape
+ {\not@math@alphabet\itshape\mathit
+ \fontshape\itdefault\selectfont}
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\em}
+% \changes{v1.2b}{1990/01/28}{Call to \cs{@nomath} added.}
+% \changes{v3.1a}{2015/01/09}{Allow \cs{emph} to produce small caps (latexrelease)}
+% \begin{macro}{\eminnershape}
+% \changes{v3.1a}{2015/01/09}{macro added (latexrelease)}
+% We also have to define the {\em emphasize\/} font change command
+% (i.e.\ |\em|). This command will look is the current font is
+% sloped (i.e.\ has a positive |\fontdimen1|) and will then
+% select either |\upshape| or |\itshape|.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\eminnershape}{\eminnershape}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\em
+ {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
+ \eminnershape \else \itshape \fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\eminnershape{\upshape}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\eminnershape}{\eminnershape}%
+%<latexrelease>\DeclareRobustCommand\em
+%<latexrelease> {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
+%<latexrelease> \upshape \else \itshape \fi}%
+%<latexrelease>\let\eminnershape\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\not@math@alphabet}
+% This function generates an error message when it is called in
+% math mode. The same function should be defined in
+% \texttt{newlfont.sty}.
+% \changes{v1.4d}{1992/09/21}{Macro defined.}
+% \changes{v2.1e}{1994/01/17}{Message changed}
+% \changes{v2.1f}{1994/01/18}{Message corrected}
+% \changes{v2.1g}{1994/04/22}{Message changed again}
+% \changes{v2.2d}{1995/04/02}{add \cs{noexpand} to second part of message}
+% \begin{macrocode}
+\def\not@math@alphabet#1#2{%
+ \relax
+ \ifmmode
+ \@latex@error{Command \noexpand#1invalid in math mode}%
+ {%
+ Please
+ \ifx#2\relax
+ define a new math alphabet^^J%
+ if you want to use a special font in math mode%
+ \else
+% \end{macrocode}
+% We have to a |\noexpand| below to prevent expansion of |#2|. In
+% case of |#1| we can omit this (due to the current definition of
+% robust commands since they do come out right there :-).
+% \begin{macrocode}
+ use the math alphabet \noexpand#2instead of
+ the #1command%
+ \fi
+ .
+ }%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% Finally we provide two abbreviations to switch to the \LaTeX{}
+% \emph{versions}.
+% \begin{macrocode}
+\def\boldmath{\@nomath\boldmath
+ \mathversion{bold}}
+\def\unboldmath{\@nomath\unboldmath
+ \mathversion{normal}}
+% \end{macrocode}
+% Here we switch to the default math version by defining the internal
+% macro |\math@version|. We dare not to call |\mathversion|
+% at this place because this would call |\glb@settings|.
+% \begin{macrocode}
+\def\math@version{normal}
+% \end{macrocode}
+%
+% \subsection{Miscellaneous}
+%
+% \begin{macro}{\newfont}
+% \changes{v1.2g}{1991/03/30}{Definition added.}
+% \changes{v2.2e}{1995/05/23}{Font assignment made local again.}
+% \begin{macro}{\symbol}
+% \changes{v1.2g}{1991/03/30}{Definition added.}
+% We start by defining a few macros that are part of
+% standard \LaTeX's user interface. The use of these functions is
+% not encouraged, but they will allow to process older documents
+% without changes to the source.
+% \begin{macrocode}
+\def\newfont#1#2{\@ifdefinable#1{\font#1=#2\relax}}
+\def\symbol#1{\char #1\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@setfontsize}
+% \begin{macro}{\@setsize}
+% This abbreviation is used by \LaTeX's user level size changing
+% commands, such as |\large|.
+% \begin{macrocode}
+\def\@setfontsize#1#2#3{\@nomath#1%
+% \end{macrocode}
+% For the benefit of people relying on keeping the name of the
+% current font command saved in |\@currsize| we define it. To ensure
+% that |\@setfontsize| keeps being robust we omit this assignment
+% during times where |\protect| differs from |\@typeset@protect|.
+% \changes{v1.4b}{1992/08/20}{Added \cs{@currsize}.}
+% \changes{v2.2b}{1994/11/06}{Use \cs{@typeset@protect}}
+% \begin{macrocode}
+ \ifx\protect\@typeset@protect
+ \let\@currsize#1%
+ \fi
+ \fontsize{#2}{#3}\selectfont}
+% \end{macrocode}
+% For compatibility we also define |\@setsize| the 209 command
+% \begin{macrocode}
+%<*compat>
+\def\@setsize#1#2#3#4{\@setfontsize#1{#4}{#2}}
+%</compat>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\oldstylenums}
+% This macro implements old style numerals but only works if we
+% assume that the standard math fonts are used. Thus it needs
+% changing in case other math encodings are used.
+% \begin{macrocode}
+\def\oldstylenums#1{%
+ \begingroup
+% \end{macrocode}
+% Provide spacing using the interword space of the current font.
+% \begin{macrocode}
+ \spaceskip\fontdimen\tw@\font
+% \end{macrocode}
+% Then switch to the math italic font. We don't change the current
+% value of |\f@series| which means that you can use bold numerals
+% if |\bfseries| is in force. As family we use |\rmdefault| which
+% means that this only works if there exist an |OML| encoded
+% version of that font or rather a corresponding |.fd| file (which
+% is the case for standard \LaTeX{} fonts even though they only
+% contain substitutions).
+% \changes{v3.0j}{1999/02/12}{Use \cs{rmdefault} instead of \texttt{cmm}
+% (pr/2954)}
+% \begin{macrocode}
+ \usefont{OML}{\rmdefault}{\f@series}{it}%
+ \mathgroup\symletters #1%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hexnumber@}
+% To set up \LaTeX's special math character
+% definitions we first provide a macro to generate hexadecimal
+% numbers. It is a rather simple |\ifcase|.
+% \changes{v?}{1992/11/13}{Made expandable.}
+% \changes{v?}{1992/12/03}{Make it accept counters.}
+% \begin{macrocode}
+\def\hexnumber@#1{\ifcase\number#1
+ 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or
+ 9\or A\or B\or C\or D\or E\or F\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\nfss@text}
+% \changes{v1.1e}{1990/01/25}{Macro added.}
+% In it simplest form |\nfss@text| is an |\mbox|. This will
+% produce unbreakable text outside math and inside math you will
+% get text with the same fonts as outside. The only drawback is
+% that such item won't change sizes in subscripts. But this
+% behavior can be easily changed. With the \texttt{amstex} style
+% option one will get a sub style called \texttt{amstext} which will
+% redefine the |\nfss@text| macro to produce correct text in all
+% sizes.
+%
+% We have to use |\def| instead of the shorter |\let| since
+% |\mbox| is undefined when we reach this point.
+% \changes{v1.1k}{1990/06/23}{Changed to \cs{mbox}.}
+% \changes{v2.1n}{1994/05/17}{Added braces to allow use in subscripts}
+% \begin{macrocode}
+\def\nfss@text#1{{\mbox{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\copyright}
+% The definition of |\copyright| was changed so
+% that it works in other type styles,
+% and to make it robust. We leave the family untouched so that
+% the copyright notice will come out differently if a different
+% font family is in use.
+% This command is commented out, since it is now defined in
+% ltoutenc.dtx.
+% \changes{v1.1m}{1991/03/28}{Extra braces added.}
+% \changes{v2.1n}{1994/05/17}{Really add extra braces}
+% \changes{v2.2c}{1994/12/02}{\cs{copyright} is now in ltoutenc.
+% ASAJ}
+% \begin{macrocode}
+%\DeclareRobustCommand\copyright
+% {{\ooalign{\hfil
+% \raise.07ex\hbox{\mdseries\upshape c}\hfil\crcr
+% \mathhexbox20D}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.1a}{1993/11/24}{Removed \cs{xpt} stuff}
+%
+%
+% \begin{macro}{\normalfont}
+% \changes{v2.1a}{1993/11/11}{Macro added}
+% \begin{macro}{\reset@font}
+% \begin{macro}{\p@reset@font}
+% \changes{v1.1n}{1991/08/26}{Macro introduced}
+% The macro |\reset@font| is used in \LaTeX{} to switch to a standard
+% font, in order to initialize the current font in situations where
+% typesetting is done in a new visual context (e.g.\ in a
+% footnote). We define it here to allow the test for the new
+% \LaTeX{} version above but nevertheless are able to run all kind
+% of mixtures.
+% \changes{v1.1o}{1991/11/21}{Changed to protected version of macro.}
+% \changes{v1.1o}{1991/11/21}{Added extra braces for robustness.}
+%
+% The user interface name for |\reset@font| is |\normalfont|:
+% \changes{v2.1k}{1994/05/14}{Remove surplus braces}
+% \changes{v3.0f}{1995/10/16}{Added \cs{relax} after \cs{usefont},
+% as the latter eats up spaces.}
+% \begin{macrocode}
+\DeclareRobustCommand\normalfont
+ {\usefont\encodingdefault
+ \familydefault
+ \seriesdefault
+ \shapedefault
+ \relax}
+\let\reset@font\normalfont
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% We left out the special \LaTeX{} fonts which are not automatically
+% included in the base version of the font selection since these fonts
+% contain only a few characters which are also included in the AMS
+% fonts so anybody who is using these fonts doesn't need them.
+% But for compatibility reasons we will define these symbols.
+%
+% \changes{v2.1g}{1994/02/22}{Correct error message}
+% \begin{macrocode}
+\def\not@base#1{\@latex@error
+ {Command \noexpand#1not provided in base LaTeX2e}%
+ {Load the latexsym or the amsfonts package to
+ define this symbol}}
+\def\mho{\not@base\mho}
+\def\Join{\not@base\Join}
+\def\Box{\not@base\Box}
+\def\Diamond{\not@base\Diamond}
+\def\leadsto{\not@base\leadsto}
+\def\sqsubset{\not@base\sqsubset}
+\def\sqsupset{\not@base\sqsupset}
+\def\lhd{\not@base\lhd}
+\def\unlhd{\not@base\unlhd}
+\def\rhd{\not@base\rhd}
+\def\unrhd{\not@base\unrhd}
+% \end{macrocode}
+%
+%
+%
+% We now initialize all variables set by |\DeclareErrorFont|. These
+% values are not really important since they will be overwritten
+% later on by the definition in |fontdef.ltx|.
+%
+% However, if \texttt{fontdef.cfg} is corrupted then at least a
+% hopefully suitable error font is present.
+%
+% \changes{v2.1k}{1994/05/14}{Init error font just before checking for
+% fontdef.cfg}
+% \begin{macrocode}
+\DeclareErrorFont{OT1}{cmr}{m}{n}{10} %% don't modify this setting
+ %% overwrite it in fontdef.cfg
+ %% if necessary
+% \end{macrocode}
+% We also set some default values for |\f@family| etc. Note that we
+% don't yet have any encodings that comes later. In the past this
+% was implicitly done by |\DeclareErrorFont|.
+% \changes{v3.1c}{2019/07/09}{Explicitly set some defaults}
+% \begin{macrocode}
+\fontfamily{cmr}
+\fontseries{m}
+\fontshape{n}
+\fontsize{10}{10}
+% \end{macrocode}
+%
+%
+%
+%
+% We now load the customizable parts of NFSS.
+% \changes{v3.0d}{1995/07/19}
+% {(DPC) TeX2 support}
+% \changes{v3.0e}{1995/09/15}
+% {(DPC) Modify TeX2 message}
+% \changes{v3.0g}{1995/11/01}
+% {(DPC) Switch meaning of \cs{@addtofilelist} for cfg files}
+% \changes{v3.0h}{1996/12/06}
+% {(DPC) Remove *** from messages internal/2338}
+% \begin{macrocode}
+\InputIfFileExists{fonttext.cfg}
+ {\typeout{====================================^^J%
+ ^^J%
+ Local config file fonttext.cfg used^^J%
+ ^^J%
+ ====================================}%
+ \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%
+ }
+ {\input{fonttext.ltx}}
+\let\@addtofilelist\@gobble
+% \end{macrocode}
+%
+% Ditto for math although I don't think that we will get a lot of
+% customisation :-)
+% \begin{macrocode}
+\InputIfFileExists{fontmath.cfg}
+ {\typeout{====================================^^J%
+ ^^J%
+ Local config file fontmath.cfg used^^J%
+ ^^J%
+ ====================================}%
+ \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%
+ }
+ {\input{fontmath.ltx}}
+\let\@addtofilelist\@gobble
+% \end{macrocode}
+%
+% Then we preload several fonts. This file might be customized
+% \emph{without} changing the behavior of the format (i.e.\ necessary
+% font definitions will be loaded at runtime if they are not
+% preloaded). This is done in the file \texttt{preload.ltx}.
+% \begin{macrocode}
+\InputIfFileExists{preload.cfg}
+ {\typeout{====================================^^J%
+ ^^J%
+ Local config file preload.cfg used^^J%
+ ^^J%
+ =====================================}%
+ \def\@addtofilelist##1{\xdef\@filelist{\@filelist,##1}}%
+ }
+ {\input{preload.ltx}}
+\let\@addtofilelist\@gobble
+% \end{macrocode}
+%
+%
+% \begin{macro}{\@acci}
+% \begin{macro}{\@accii}
+% \begin{macro}{\@acciii}
+% \changes{v2.1m}{1994/05/16}{Define saved versions of accents}
+% We also save the values of some accents in |\@acci|, |\@accii|
+% and |\@acciii| so they can be restored by a |minipage| inside a
+% |tabbing| environment.
+% \begin{macrocode}
+\let\@acci\' \let\@accii\` \let\@acciii\=
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\cal}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Remove definition}
+% \begin{macro}{\mit}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Remove definition}
+% Here were the two old \meta{alphabet identifiers}.
+% \end{macro}
+% \end{macro}
+%
+%
+% \iffalse
+%<+checkmem>\CHECKMEM
+% \fi
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltfsstrc.dtx b/macros/latex-dev/base/ltfsstrc.dtx
new file mode 100644
index 0000000000..0270fcb066
--- /dev/null
+++ b/macros/latex-dev/base/ltfsstrc.dtx
@@ -0,0 +1,1845 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltfsstrc.dtx
+%% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf.
+%% Copyright (C) 1994-97 by LaTeX3 project. All rights reserved.
+%
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/05/16]
+%<package>\ProvidesPackage{tracefnt}
+%<package> [2015/02/21 v3.0k Standard LaTeX package (font tracing)]
+% \fi
+% \ProvidesFile{ltfsstrc.dtx}
+% [2015/02/21 v3.0k LaTeX Kernel (NFSS tracing)]
+%
+% \iffalse
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+%
+%
+% \changes{v3.0g}{1995/11/28}
+% {documentation fixes}
+% \changes{v3.0f}{1995/10/22}{Added `genb' and `sgenb' size functions
+% to support new DC font naming scheme.}
+% \changes{v3.0e}{1995/10/20}
+% {(DPC) Modify autoload code}
+% \changes{v3.0d}{1995/10/04}
+% {(DPC) Modify autoload code}
+% \changes{v3.0b}{1995/05/24}
+% {(DPC) Fix \cs{ProvidesFile} usage}
+% \changes{v3.0a}{1995/05/24}
+% {(DPC) Make file from previous file, tracefnt 1995/05/16 v2.3o}
+% \changes{v3.0k}{2015/02/21}
+% {Removed autoload code}
+%
+% \changes{v2.3m}{1994/11/18}
+% {\cs{next} to \cs{reserved@f}}
+% \changes{v2.3l}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v2.3i}{1994/05/20}{Use new error command names}
+% \changes{v2.3g}{1994/05/13}{Removed typeouts as
+% \cs{ProvidesPackage} writes to log.}
+% \changes{v2.3e}{1994/04/27}{Corrected item that was forgotten
+% in last change.}
+% \changes{v2.3d}{1994/04/18}{Changed to new error/warning scheme}
+% \changes{v2.3a}{1994/01/17}{New math font setup}
+% \changes{v2.2a}{1993/11/11}{Option concept added for LaTeX2e}
+% \changes{v2.1j}{1993/09/15}{Corrected spelling of \cs{noxpand}.}
+% \changes{v2.1i}{1993/09/02}{Corrected name of sgen size function.}
+% \changes{v2.1h}{1993/07/16}{Changed layout of info messages}
+% \changes{v2.1b}{1993/03/18}
+% {Changed all \cs{@tempdimb} in \cs{@tempdimx}
+% to avoid killing \cs{numberline}}
+% \changes{v2.1b}{1993/03/18}
+% {Changed all \cs{@tempdima} in \cs{@tempdimb}
+% to avoid killing \cs{numberline}}
+% \changes{v1.0l}{1990/04/01}{Part of code moved to fam.dtx.}
+% \changes{v1.0k}{1990/03/14}{Added code for TeX3.}
+% \changes{v1.0h}{1990/01/18}{\cs{tracingfonts} meaning changed.}
+%
+% \newcommand\module[1]{\texttt{#1}}
+% \providecommand{\dst}{\textsc{DocStrip}}
+% \newcommand\Loption[1]{\texttt{#1}}
+%
+% \GetFileInfo{ltfsstrc.dtx}
+% \title{The \texttt{tracefnt} package\thanks
+% {This file has version number \fileversion, dated
+% \filedate.} \\
+% for use with the new font selection scheme}
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+%
+% This package contains the code for tracing font loading and font
+% changes. It basically overlays some of the low-level functions of
+% NFSS with additional code used for tracing.
+%
+% The package accepts the following options:
+% \begin{description}
+% \item[errorshow] Write all information about font changes etc.\
+% only to the transcript file unless an error happens. This means
+% that information about font substitution will not be shown on the
+% terminal.
+%
+% \item[warningshow] Show all NFSS warnings on the terminal. This
+% setting corresponds to the default behaviour of NFSS if the
+% \texttt{tracefnt} package is \emph{not} loaded!
+%
+% \item[infoshow] Show all NFSS warning and all NFSS info
+% messages (that are normally only written to the transcript file)
+% also on the terminal. This is the default if the \texttt{tracefnt}
+% package is loaded.
+%
+% \item[debugshow] In addition to \texttt{infoshow} show also
+% changing of math fonts as far as possible (this option can produce a
+% large amount of output.
+%
+% \item[loading] Show the name of external fonts when they are
+% loaded. This option shows only ``newly'' loaded fonts not those
+% already preloaded in the format or the class file before the
+% \texttt{tracefnt} package became active.
+%
+% \item[pausing]
+% Turn all font warnings into errors so that \LaTeX{} will stop.
+%
+% \end{description}
+%
+%
+% \StopEventually{}
+%
+% \section{A driver for this document}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you
+% are currently reading. It will be extracted from this file by the
+% \dst{} program.
+%
+% When this file is processed directly by \LaTeX{} this will
+% produce the documentation as well.
+%
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+
+
+%\OnlyDescription % comment out for implementation details
+
+\begin{document}
+ \DocInput{ltfsstrc.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+%
+% \section{The Implementation}
+%
+% \begin{quote}
+% \textbf{Warning:} Read the macro documentation with a grain of
+% salt. It is still basically the documentation from the first NFSS
+% release and therefore in some cases probably not completely
+% accurate.
+% \end{quote}
+%
+% If we are making a package file it is a good idea to test whether
+% we are running under 2e.
+% This code is actually placed at the very beginning of this file
+% for easier maintenance, thus commented out here.
+% \begin{macrocode}
+%<*package>
+%\NeedsTeXFormat{LaTeX2e}
+%\ProvidesPackage{tracefnt}[??/??/?? v?.??
+% Standard LaTeX package (font tracing)]
+%</package>
+% \end{macrocode}
+%
+%
+% The \texttt{debug} module makes use of commands contained in a
+% special package file named \texttt{trace.sty}.\footnote{This package
+% is not in distribution at the moment (and probably doesn't any
+% longer work). Think of this part of the code as being historical
+% artefacts.}
+% \begin{macrocode}
+%<+debug> \input trace.sty
+% \end{macrocode}
+%
+%
+% \section{Handling Options}
+%
+% \begin{macro}{\tracingfonts}
+% Here is the definition of the integer register for the font
+% trace. As a default in a package file we use $1$ to give error
+% messages if fonts are substituted. If this code is used for
+% debugging or tracing reasons in the format file (i.e.\ in
+% \texttt{fam.dtx}) we use $0$ as the default. But if no font
+% trace is used we build a definition that will produce a warning
+% message.
+% \changes{v1.0l}{1990/04/01}
+% {Check if \cs{tracingfonts} already defined.}
+% \changes{v1.0o}{1990/04/01}
+% {Check if \cs{tracingfonts} defined removed again.}
+% \begin{macrocode}
+%<*2ekernel>
+\def\tracingfonts{%
+ \@font@warning{Command \noexpand\tracingfonts
+ not provided.\MessageBreak
+ Use the `tracefnt' package.\MessageBreak Command found:}%
+ \count@}
+%</2ekernel>
+% \end{macrocode}
+% The |\count@| in the line above will remove the number after
+% |\tracingfonts|. Note that this definition will be overwritten be
+% the next line if one of these modules are included.
+% \begin{macrocode}
+%<*package,trace,debug>
+\newcount\tracingfonts
+\tracingfonts=0
+%</package,trace,debug>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% The option \Loption{errorshow} turns off all warnings so that only
+% real errors are shown. \Loption{warningshow} corresponds to the
+% NFSS default (when \texttt{tracefnt} is not loaded).
+% \Loption{infoshow} is the default for this package here; and
+% \Loption{debugshow}, \Loption{loading}, and
+% \Loption{pausing} extend the amount of information even further.
+% \changes{v2.3o}{1995/05/13}
+% {Use single hash mark in \cs{DeclareOption}}
+% \begin{macrocode}
+%<*package>
+\DeclareOption{errorshow}{%
+ \def\@font@info#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Info: \space\space\space#1}}%
+ \def\@font@warning#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}}%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{warningshow}{%
+ \def\@font@info#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Info: \space\space\space#1}}%
+ \def\@font@warning#1{%
+ \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}}%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{infoshow}{%
+ \def\@font@info#1{%
+ \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Info: \space\space\space#1}}%
+ \def\@font@warning#1{%
+ \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}}%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{loading}{%
+ \tracingfonts\tw@
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{debugshow}{%
+ \ExecuteOptions{infoshow}%
+ \tracingfonts\thr@@
+ }
+% \end{macrocode}
+%
+% \changes{v3.0j}{1997/05/29}{Replaced \texttt{\symbol{92}\symbol{92}}
+% by \cs{MessageBreak}, as suggested by Donald Arseneau.}
+% \begin{macrocode}
+\DeclareOption{pausing}{%
+ \def\@font@warning#1{%
+ \GenericError
+ {(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}%
+ {See the LaTeX Companion for details.}%
+ {I'll stop for every LaTeX Font Warning because
+ you requested\MessageBreak the `pausing' option
+ to the tracefnt package.}}%
+ }
+% \end{macrocode}
+% We make |infoshow| the default, which in turn defines
+% |\font@warning| and |\font@info|.
+% \begin{macrocode}
+\ExecuteOptions{infoshow}
+\ProcessOptions
+%</package>
+% \end{macrocode}
+%
+% We also need a default definition inside the kernel:
+% \begin{macrocode}
+%<*2ekernel>
+\def\@font@info#1{%
+ \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Info: \space\space\space#1}}%
+\def\@font@warning#1{%
+ \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
+ {LaTeX Font Warning: #1}}%
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% \section{Macros common to \texttt{fam.tex} and \texttt{tracefnt.sty}}
+%
+% In the first versions of \texttt{tracefnt.dtx} some macros of
+% \texttt{fam.dtx}\footnote{This file is currently not distributed in
+% documented form. Its code is part of \texttt{ltfss.dtx}.}
+% were redefined to included the extra tracing
+% information. Now these macros are all defined in this file (i.e.\
+% removed from \texttt{fam.dtx}) and different production versions can
+% be obtained simply by specifying a different set of modules to
+% include when generating \texttt{ltfss.dtx}.
+%
+%
+%
+% \subsection{General font loading}
+%
+%
+% \begin{macro}{\extract@font}
+%
+% This macro organizes the font loading.
+% It first calls |\get@external@font|
+% which will return in |\external@font| the name of the external
+% font file (the \texttt{.tfm}) as it was determined by the NFSS
+% tables.
+% \begin{macrocode}
+%<*2ekernel|package>
+\def\extract@font{%
+ \get@external@font
+% \end{macrocode}
+% Then the external font is loaded and assigned to the font
+% identifier stored inside |\font@name|
+% (for this reason we need |\expandafter|).
+% \begin{macrocode}
+ \global\expandafter\font\font@name\external@font\relax
+% \end{macrocode}
+% When tracing we typeout the internal and external font name.
+% \changes{v1.0k}{1990/03/14}{Added code for TeX3.}
+% \begin{macrocode}
+%<*trace>
+ \ifnum \tracingfonts >\@ne
+ \@font@info{External font `\external@font'
+ loaded as\MessageBreak \font@name}\fi
+%</trace>
+% \end{macrocode}
+% Finally we call the corresponding ``loading action'' macros to
+% finish things. First the font is locally selected to allow the
+% use of |\font| inside the loading action macros.
+% \begin{macrocode}
+ \font@name \relax
+% \end{macrocode}
+% The next two lines execute the ``loading actions'' for the
+% family and then for the individual font shape.
+% \begin{macrocode}
+ \csname \f@encoding+\f@family\endcsname
+ \csname\curr@fontshape\endcsname
+ \relax
+ }
+%</2ekernel|package>
+% \end{macrocode}
+% The |\relax| at the end needs to be explained.
+% This is inserted to prevent \TeX{} from scanning too far
+% when it is executing the replacement text of the loading
+% code macros.
+% \end{macro}
+%
+%
+% \begin{macro}{\get@external@font}
+% This function tries to find an external font name. It will place
+% the name into the macro
+% |\external@font|. If no font is found it will return the one
+% that was defined via |\DeclareErrorFont|.
+% \begin{macrocode}
+%<*2ekernel>
+\def\get@external@font{%
+% \end{macrocode}
+% We don't know the external font name at the beginning.
+% \begin{macrocode}
+ \let\external@font\@empty
+ \edef\font@info{\expandafter\expandafter\expandafter\string
+ \csname \curr@fontshape \endcsname}%
+ \try@size@range
+% \end{macrocode}
+% If this failed, we'll try to substitute another size of the same
+% font. This is done by the |\try@size@substitution| macro. It
+% ``knows about'' |\do@extract@font|, |\font@name|, |\f@size|, and
+% so on.
+% \begin{macrocode}
+ \ifx\external@font\@empty
+ \try@size@substitution
+ \ifx\external@font\@empty
+ \@latex@error{Font \expandafter \string\font@name\space
+ not found}\@eha
+ \error@fontshape
+ \get@external@font
+ \fi\fi
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{v1.0j}{1990/02/18}
+% {Redefine unprotected version \cs{p@selectfont}
+% instead of \cs{selectfont}.}
+%
+%
+% \begin{macro}{\selectfont}
+% \changes{v1.1a}{1989/12/16}{Changed order of calls.}
+% \changes{v2.3f}{1994/05/12}{Use \cs{DeclareRobustCommand}}
+% The macro |\selectfont| is called whenever a font change must
+% take place.
+% \begin{macrocode}
+%<*2ekernel|package>
+\DeclareRobustCommand\selectfont
+ {%
+% \end{macrocode}
+% When \module{debug} is specified we actually want something like
+% `undebug'. The font selection is now stable so that using
+% |\tracingall| on some other macros will show us a lot of unwanted
+% information about font loading. Therefore we disable tracing during
+% font loading as long as |\tracingfonts| is less than $4$.
+% \changes{v1.0m}{1990/04/05}
+% {Call \cs{tracingon} only if \cs{tracingfonts} greater than 3.}
+% \changes{v1.0n}{1990/05/05}{\cs{tracingon} with new syntax.}
+% \begin{macrocode}
+%<+debug> \pushtracing
+%<+debug> \ifnum\tracingfonts<4 \tracingoff
+%<+debug> \else \tracingon\p@selectfont \fi
+% \end{macrocode}
+% If |\baselinestretch| was redefined by the user it will not
+% longer match its internal counterpart |\f@linespread|. If so we
+% call |\set@fontsize| to prepare |\size@update|.
+% \begin{macrocode}
+ \ifx\f@linespread\baselinestretch \else
+ \set@fontsize\baselinestretch\f@size\f@baselineskip \fi
+% \end{macrocode}
+% Then we generate the internal name of the font
+% by concatenating {\em family}, {\em series},
+% {\em shape}, and current {\em size},
+% with slashes as delimiters between them.
+% This is much more readable than standard
+% \LaTeX's |\twfbf|, etc.
+% We define |\font@name| globally, as always.
+% The reason for this is explained later on.
+% \changes{v2.0b}{1992/07/26}{}
+% \begin{macrocode}
+ \xdef\font@name{%
+ \csname\curr@fontshape/\f@size\endcsname}%
+% \end{macrocode}
+% We call the macro |\pickup@font| which will load the font if
+% necessary.
+% \begin{macrocode}
+ \pickup@font
+% \end{macrocode}
+% Then we select the font.
+% \begin{macrocode}
+ \font@name
+% \end{macrocode}
+% If |\tracingfonts| is
+% greater than 2 we also show the font switch.
+% We do this before |\glb@settings| is called since this
+% macro might redefine |\font@name|.
+% \changes{v1.0k}{1990/03/14}{Added code for TeX3.}
+% \changes{v1.0i}{1990/02/16}{Changed \cs{f@size} to \cs{lcl@currsize}
+% (see fam file).}
+% \begin{macrocode}
+%<*trace>
+ \ifnum \tracingfonts>\tw@
+ \@font@info{Switching to \font@name}\fi
+%</trace>
+% \end{macrocode}
+% Finally we call |\size@update|. This macro is normally empty but
+% will contain actions (like setting the |\baselineskip|) that have
+% to be carried out when the font size, the base |\baselineskip| or
+% the |\baselinestretch| have changed.
+% \begin{macrocode}
+ \size@update
+% \end{macrocode}
+% A similar function is called to handle anything related to
+% encoding updates. This one is changed from |\relax| by
+% |\fontencoding|.
+% \changes{v2.3h}{1994/05/14}{Added \cs{enc@update}}
+% \begin{macrocode}
+ \enc@update
+% \end{macrocode}
+% Just before ending this macro we have to pop the tracing stack
+% if it was pushed before.
+% \begin{macrocode}
+%<+debug> \poptracing
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\set@fontsize}
+% The macro |\set@fontsize| does the actual work. First it assigns
+% new values to |\f@size|, |\f@baselineskip| and |\f@linespread|.
+% \begin{macrocode}
+\def\set@fontsize#1#2#3{%
+ \@defaultunits\@tempdimb#2pt\relax\@nnil
+ \edef\f@size{\strip@pt\@tempdimb}%
+ \@defaultunits\@tempskipa#3pt\relax\@nnil
+ \edef\f@baselineskip{\the\@tempskipa}%
+ \edef\f@linespread{#1}%
+% \end{macrocode}
+% For backward compatibility and for later testing within
+% |\selectfont| the internal value of |\f@linespread| is passed
+% back to |\baselinestretch|.
+% \begin{macrocode}
+ \let\baselinestretch\f@linespread
+% \end{macrocode}
+% Additional processing will happen within |\selectfont|. For this
+% reason the macro |\size@update| (which will be called in
+% |\selectfont|) will be defined to be:
+% \begin{macrocode}
+ \def\size@update{%
+% \end{macrocode}
+% First calculate the new |\baselineskip| and also store it in
+% |normalbaselineskip|
+% \begin{macrocode}
+ \baselineskip\f@baselineskip\relax
+ \baselineskip\f@linespread\baselineskip
+ \normalbaselineskip\baselineskip
+% \end{macrocode}
+% then to set up a new |\strutbox|
+% \begin{macrocode}
+ \setbox\strutbox\hbox{%
+ \vrule\@height.7\baselineskip
+ \@depth.3\baselineskip
+ \@width\z@}%
+% \end{macrocode}
+% We end with a bit of tracing information.
+% \begin{macrocode}
+%<*trace>
+ \ifnum \tracingfonts>\tw@
+ \ifx\f@linespread\@empty
+ \let\reserved@a\@empty
+ \else
+ \def\reserved@a{\f@linespread x}%
+ \fi
+ \@font@info{Changing size to \f@size/\reserved@a
+ \f@baselineskip}%
+ \aftergroup\type@restoreinfo \fi
+%</trace>
+% \end{macrocode}
+% When all this is processed |\size@update| redefines itself to
+% |\relax| so that in later calls of |\selectfont| no extra code
+% will be executed.
+% \begin{macrocode}
+ \let\size@update\relax}%
+ }
+% \end{macrocode}
+% Instead of defining this macro internally we might speed things
+% up by placing the code into a separate macro and use |\let|!
+% \end{macro}
+%
+%
+% \begin{macro}{\size@update}
+% Normally this macro does nothing; it will be redefined by
+% |\set@fontsize| to initiate an update.
+% \begin{macrocode}
+\let\size@update\relax
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\type@restoreinfo}
+% This macro produces some info when a font size and/or baseline
+% change will get restored.
+% \changes{1.0r}{1990/08/27}{Some extra tracing info.}
+% \begin{macrocode}
+%<*trace>
+ \def\type@restoreinfo{%
+ \ifx\f@linespread\@empty
+ \let\reserved@a\@empty
+ \else
+ \def\reserved@a{\f@linespread x}%
+ \fi
+ \@font@info{Restoring size to
+ \f@size/\reserved@a\f@baselineskip}}
+%</trace>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\glb@settings}
+% \begin{macro}{\glb@currsize}
+% \changes{v2.3a}{1994/01/17}{New math font setup}
+% \changes{v2.3k}{1994/11/06}{New implementation}
+% The macro |\glb@settings| globally selects
+% all math fonts for the current size if necessary.
+% \begin{macrocode}
+\def\glb@settings{%
+% \end{macrocode}
+% When |\glb@settings| gains control a size
+% change was requested and all previous font assignments need to
+% be replaced.
+% Therefore the old values of the fonts are no longer needed.
+% For every {\em math group\/} the new assignments are appended to
+% |\math@fonts|.
+% But this happens only if the |math@fonts| switch
+% is set to true.
+% However, we always set up the correct math sizes for script and
+% scriptscript fonts since they may be needed even if we don't set
+% up the whole math machinery.
+%
+% Here we set the math size, script size and scriptscript size.
+% If the |S@|\ldots{} macro is not defined we have to first
+% calculate the three sizes.
+% \begin{macrocode}
+ \expandafter\ifx\csname S@\f@size\endcsname\relax
+ \calculate@math@sizes
+ \fi
+% \end{macrocode}
+% The effect of this is that |\calculate@math@sizes|
+% may or may not define the |S@|\ldots{} macro. In the
+% first case the next time the same size is requested
+% this macro is used, otherwise |\calculate@math@sizes| is
+% called again.
+% This also sets the |math@fonts| switch.
+% If it is true we must switch the math fonts.
+% \begin{macrocode}
+ \csname S@\f@size\endcsname
+ \ifmath@fonts
+%<*trace>
+ \ifnum \tracingfonts>\tw@
+ \@font@info{Setting up math fonts for
+ \f@size/\f@baselineskip}\fi
+%</trace>
+% \end{macrocode}
+% Inside a group we execute the macro for the current math {\em
+% version}. This sets |\math@fonts| to a list of
+% |\textfont|\dots{} assignments. |\getanddefine@fonts| (which may
+% be called at this point) needs the |\escapechar| parameter to be
+% set to $-1$.
+% \begin{macrocode}
+ \begingroup
+ \escapechar\m@ne
+ \csname mv@\math@version \endcsname
+% \end{macrocode}
+% Then we set |\globaldefs| to 1 so that all following changes are
+% done globally. The math font assignments recorded in
+% |\math@fonts| are executed and |\glb@currsize| is set equal to
+% |\f@size|. This signals that the fonts for math in this size are
+% set up.
+% \begin{macrocode}
+ \globaldefs\@ne
+ \math@fonts
+ \let \glb@currsize \f@size
+ \endgroup
+% \end{macrocode}
+% Finally we execute any code that is supposed to happen
+% whenever the math font setup changes. This register will
+% be executed in local mode which means that everything that is
+% supposed to have any effect should be done globally inside.
+% We can't execute it within |\globaldefs\@ne| as we don't know
+% what ends up inside this register, e.g., it might contain
+% calculations which use some local registers to calculate the
+% final (global) value.
+% \begin{macrocode}
+ \the\every@math@size
+% \end{macrocode}
+% Otherwise we announce that the math fonts are not set up for this
+% size.
+% \begin{macrocode}
+%<*trace>
+ \else
+ \ifnum \tracingfonts>\tw@
+ \@font@info{No math setup for
+ \f@size/\f@baselineskip}\fi
+%</trace>
+ \fi
+}
+%</2ekernel|package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\baselinestretch}
+% \changes{v1.0o}{1990/06/24}{Moved to tracefnt.dtx.}
+% In |\selectfont| we used |\baselinestretch| as
+% a factor when assigning a value to |\baselineskip|.
+% We use 1 as a default (i.e.\ no stretch).
+% \begin{macrocode}
+%<*2ekernel>
+\def\baselinestretch{1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\every@math@size}
+% \changes{v1.0u fam.dtx}{1989/12/05}{Hook \cs{every@size} added.}
+% \changes{v23.k}{1994/10/23}{Renamed to \cs{every@math@size}}
+% We must still define the hook |\every@math@size| we used in
+% |\glb@settings|. We initialize it to nothing. It is important to
+% remember that everything that goes into this hook should to global
+% updates, local changes will have weird effects.
+% \begin{macrocode}
+\newtoks\every@math@size
+\every@math@size={}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Math fonts setup}
+%
+%
+% \subsubsection{Outline of algorithm for math font sizes}
+%
+% \TeX{} uses the the math fonts that are current when the end of a
+% formula is reached. If we don't want to keep font setups local to
+% every formula (which would result in an enormous overhead, we have
+% to be careful not to end up with the wrong setup in case formulas
+% are nested, e.g., we need to be able to handle
+% \begin{verbatim}
+% $ a=b+c \mbox{ \small for all $b$ and $c\in Z$}$
+%\end{verbatim}
+% Here the inner formulae |b| and |c\in Z| are typeset in |\small| but
+% we have to return to |\normalsize| before we reach the closing |$|
+% of the outer formula.
+%
+% This is handled in the following way:
+% \begin{enumerate}
+% \item At any point in the document the global variable
+% |\gbl@currsize| contains the point size for which the math fonts
+% currently are set up.
+%
+% \item \label{it:everymath} Whenever we start a formula we compare
+% its value with the local variable |\f@size| that describes the
+% current text font size.
+%
+% \item If both are the same we assume that we can use the current
+% math font setup without adjustment.
+%
+% \item \label{it:everymathend} If they differ we call |\gbl@settings|
+% which changes the math font setup and updates |\gbl@currsize|.
+% \begin{enumerate}
+% \item If we are recursively inside another formula (|\if@inmath|) we
+% ensure that |\gbl@settings| is executed again in the outer
+% formula, so that the old setup is automatically restored.
+% \item Otherwise, we set the switch |@inmath| locally to |true| so
+% that all nested formulae will be able to detect that they are
+% nested in some outer formula.
+% \end{enumerate}
+% \end{enumerate}
+%
+%
+% The above algorithm has the following features:
+% \begin{itemize}
+% \item For sizes which are not containing any formula no math setup
+% is done. Compared to the original algorithm of NFSS this results
+% in the following savings:
+% \begin{itemize}
+% \item No unnecessary loading of math fonts for sizes that are not
+% used to typeset any math formulae (explicit or implicit ones).
+% \item No time overhead due to unnecessary changes of the math font
+% setup on entrance and exit of the text font size.
+% \end{itemize}
+%
+% \item Math font setup changes for top-level formulae will survive
+% (there is no restoration after the formula) thus any following
+% formula in the same size will be directly typesetable. Compared to
+% original implementation in NFSS2
+% the new algorithm has the overhead of one test per formula
+% to see if the current math setup is valid (in the original
+% algorithm the setup was always valid, thus no test was necessary).
+%
+% \item In nested formulae the math font setup is restored in the
+% outer formula by a series of |\aftergroup| commands and checks.
+% Compared to the original algorithm this involves additional checks
+% ($2 \times \langle\mbox{non-math levels}\rangle$ per inner
+% formula).
+% \end{itemize}
+%
+% \subsubsection{Code for math font size setting}
+%
+% \begin{macro}{\check@mathfonts}
+% \changes{v2.3a}{1994/01/17}{New math font setup}
+% \changes{v2.3c}{1994/01/26}{Correct trace info placement}
+% In the |\check@mathfonts| macros we implement the steps
+% \ref{it:everymath} to \ref{it:everymathend} except that instead
+% of a switch the macro |\init@restore@glb@settings| is used.
+% \begin{macrocode}
+%<*2ekernel|package>
+\def\check@mathfonts{%
+ \ifx \glb@currsize \f@size
+%<*trace>
+ \ifnum \tracingfonts>\thr@@
+ \@font@info{*** MATH: no change \f@size\space
+ curr/global (\curr@math@size/\glb@currsize)}\fi
+%</trace>
+ \else
+%<*trace>
+ \ifnum \tracingfonts>\thr@@
+ \@font@info{*** MATH: setting up \f@size\space
+ curr/global (\curr@math@size/\glb@currsize)}\fi
+%</trace>
+ \glb@settings
+ \init@restore@glb@settings
+ \fi
+ \let\curr@math@size\f@size
+ \def\init@restore@glb@settings{\aftergroup\restglb@settings}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\init@restore@glb@settings}
+% \changes{v3.0i}{1996/07/26}{macro added replacing \cs{if@inmath} switch}
+% This macros does by default nothing but get redefined inside
+% |\check@mathfonts| to initiate fontsize restoring in nested
+% formulas.
+% \begin{macrocode}
+%<-trace>\let\init@restore@glb@settings\relax
+%<*trace>
+\def\init@restore@glb@settings{%
+ \ifnum \tracingfonts>\thr@@
+ \@font@info{*** MATH: no resetting (not in
+ nested math)}\fi
+}
+%</trace>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\restglb@settings}
+% \changes{v2.3a}{1994/01/17}{New math font setup}
+% \changes{v2.3c}{1994/01/26}{Correct trace info placement}
+% This macro will be executed the first time after the current
+% formula.
+% \begin{macrocode}
+\def\restglb@settings{%
+%<*trace>
+ \ifnum \tracingfonts>\thr@@
+ \@font@info{*** MATH: restoring}\fi
+%</trace>
+ \begingroup
+ \let\f@size\curr@math@size
+ \ifx\glb@currsize \f@size
+%<*trace>
+ \ifnum \tracingfonts>\thr@@
+ \@font@info{*** MATH: ... already okay (\f@size)}\fi
+%</trace>
+ \else
+%<*trace>
+ \ifnum \tracingfonts>\thr@@
+ \@font@info{*** MATH: ... to \f@size}\fi
+%</trace>
+ \glb@settings
+ \fi
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Other code for math}
+%
+%
+% \begin{macro}{\use@mathgroup}
+% \changes{v1.2b}{1990/01/21}{Macro added to allow cleaner interface.}
+% \changes{v1.2h}{1990/03/30}{Third argument removed (see
+% \cs{math@egroup}).}
+% The |\use@mathgroup| macro should be used in user
+% macros to select a math group. Depending on whether or not the
+% \texttt{margid} option is in force it has two or three arguments.
+% For this reason it should be called as the last macro.
+%
+% First we test if we are inside math mode since we don't want to
+% apply a useless definition.
+% \changes{v1.1a}{1989/12/16}{Usage of `\quotechar=' macro added.}
+% \changes{v1.1a}{1989/12/16}{Redefinition of alphabet now simpler.}
+% \begin{macrocode}
+\def\use@mathgroup#1#2{\relax\ifmmode
+% \end{macrocode}
+% \changes{v1.0o}{1990/06/24}{Tracing code added.}
+% \changes{v1.0q}{1990/07/07}{Group number added to tracing.}
+% \begin{macrocode}
+%<*trace>
+ \ifnum \tracingfonts>\tw@
+ \count@#2\relax
+ \@font@info{Using \noexpand\mathgroup
+ (\the\count@) #2}\fi
+%</trace>
+% \end{macrocode}
+% If so we first call the `=' macro (i.e.\ argument three) to set
+% up special things for the selected math group. Then we call
+% |\mathgroup| to select the group given by argument two and
+% finally we place |#1| (i.e.\ the argument of the \meta{math
+% alphabet identifier} at the end. This part of the code is
+% surrounded by two commands which behave like |\begingroup|
+% and |\endgroup| if we want \meta{math alphabet identifier}s
+% but will expand into |\@empty| if we want simply switches to
+% a new math group.
+% \changes{v1.0p}{1990/06/30}{Added \cs{relax} after math group number.}
+% Since argument number $2$ may be a digit instead of a control
+% sequence we add a |\relax|.
+% Otherwise something like |\mit{1}| would switch to math group
+% $11$ (and back) instead of printing an oldstyle $\mit {1}$.
+% \changes{v2.0b}{1992/07/26}{}
+% \begin{macrocode}
+ \math@bgroup
+ \expandafter\ifx\csname M@\f@encoding\endcsname#1\else
+ #1\fi
+ \mathgroup#2\relax
+% \end{macrocode}
+% Before we reinsert the swallowed token (arg.\ three) into the
+% input stream, in the case that the \meta{math alphabet
+% identifier} isn't called in math mode, we remove the |\fi|
+% with the |\expandafter| trick. This is necessary if the
+% token is actually an macro with arguments. In such a case the
+% |\fi| will be misinterpreted as the first argument which
+% would be disastrous.
+% \changes{v1.0f}{1989/12/13}
+% {\cs{expandafter} added before final \cs{fi}.}
+% \begin{macrocode}
+ \expandafter\math@egroup\fi}%
+% \end{macrocode}
+% The surrounding macros equal |\begingroup| and |\endgroup|. But
+% using internal names makes it possible to overwrite their meaning
+% in certain cases. This is for example used in \AmSTeX{} macros
+% for placing accents.
+% \end{macro}
+%
+% \begin{macro}{\math@egroup}
+% \changes{v1.0q}{1990/07/07}{Tracing code added.} If the
+% \texttt{margid} option is in force (which can be tested by
+% looking at the definition of |\math@bgroup| we change the
+% |\math@egroup| command a bit to display the current \meta{math
+% group number} after it closes the scope of \meta{math alphabet}
+% with |\endgroup|.
+% \changes{v3.0h}{1996/05/08}{Use \cs{bgroup} instead of \cs{begingroup}
+% to match a kernel change made in 1994!!!!}
+% \begin{macrocode}
+%<*trace>
+ \ifx\math@bgroup\bgroup
+ \def\math@egroup#1{#1\egroup
+ \ifnum \tracingfonts>\tw@
+ \@font@info{Restoring \noexpand\mathgroup
+ (\ifnum\mathgroup=\m@ne default\else \the\mathgroup \fi)%
+ }\fi}
+ \fi
+%</trace>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\getanddefine@fonts}
+% \changes{v1.0o}{1990/06/24}{\cs{Macro} moved from fam.dtx.}
+% |\getanddefine@fonts| has two arguments: the \meta{math
+% group number} and the {\em family/series/shape\/} name as a
+% control sequence.
+% \begin{macrocode}
+\def\getanddefine@fonts#1#2{%
+% \end{macrocode}
+% First we turn of tracing when |\tracingfonts| is less than $4$.
+% \changes{v1.0o}{1990/06/24}{Adding debug code.}
+% \changes{v1.0r}{1990/08/27}
+% {Correcting missing name after \cs{tracingon}.}
+% \begin{macrocode}
+%<+debug> \pushtracing
+%<+debug> \ifnum\tracingfonts<4 \tracingoff
+%<+debug> \else \tracingon\getanddefine@fonts \fi
+% \end{macrocode}
+% \changes{v1.0o}{1990/06/24}{\cs{Adding} tracing code.}
+% \changes{v1.0q}{1990/07/07}{Group number added to tracing.}
+% \changes{v2.1a}{1992/09/22}{Introduced \cs{tf@size} for math size.}
+% \begin{macrocode}
+%<*trace>
+ \ifnum \tracingfonts>\tw@
+ \count@#1\relax
+ \@font@info{\noexpand\mathgroup (\the\count@) #1 :=\MessageBreak
+ \string#2 \tf@size/\sf@size/\ssf@size}\fi
+%</trace>
+% \end{macrocode}
+% We append the current |\tf@size| to |#2| to obtain the font
+% name.\footnote{One might ask why this expansion does not generate
+% a macro name that starts with an additional \texttt{\bslash}
+% character. The solution is that \texttt{\bslash escapechar} is
+% set to $-1$ before \texttt{\bslash getanddefine@fonts} is
+% called.} Again, |font@name| is defined globally, for the reasons
+% explained in the description of |\wrong@fontshape|.
+% \begin{macrocode}
+ \xdef\font@name{\csname \string#2/\tf@size\endcsname}%
+% \end{macrocode}
+% Then we call |\pickup@font| to load it if necessary.
+% We remember the internal name as |\textfont@name|.
+% \begin{macrocode}
+ \pickup@font \let\textfont@name\font@name
+% \end{macrocode}
+% Same game for |\scriptfont| and |\scriptscriptfont|:
+% \begin{macrocode}
+ \xdef\font@name{\csname \string#2/\sf@size\endcsname}%
+ \pickup@font \let\scriptfont@name\font@name
+ \xdef\font@name{\csname \string#2/\ssf@size\endcsname}%
+ \pickup@font
+% \end{macrocode}
+% Then we append the new |\textfont|\ldots{} assignments to
+% the |\math@fonts|.
+% \begin{macrocode}
+ \edef\math@fonts{\math@fonts
+ \textfont#1\textfont@name
+ \scriptfont#1\scriptfont@name
+ \scriptscriptfont#1\font@name}%
+% \end{macrocode}
+% Just before ending this macro we have to pop the tracing stack
+% if it was pushed before.
+% \begin{macrocode}
+%<+debug> \poptracing
+ }
+%</2ekernel|package>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section{Scaled font extraction}
+%
+% \begin{macro}{\ifnot@nil}
+% We begin with a simple auxiliary macro. It checks
+% whether its argument is the token |\@nil|. If so,
+% it expands to |\@gobble| which discards the following
+% argument, otherwise it expands to |\@firstofone| which
+% reproduces it argument.
+% \changes{v2.3n}{1995/05/08}{Use \cs{@firstofone}}
+% \begin{macrocode}
+%<*2ekernel>
+\def\ifnot@nil#1{\def\reserved@a{#1}%
+ \ifx\reserved@a\@nnil \expandafter\@gobble
+ \else \expandafter\@firstofone\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\remove@to@nnil}
+% \begin{macro}{\remove@angles}
+% \begin{macro}{\remove@star}
+% Three other auxiliary macros will be needed in the following:
+% |\remove@to@nnil| gobbles up everything up to, and including,
+% the next |\@nnil| token, and |\remove@angles| and |\remove@star|
+% do the same
+% for the character |>| and |*|, respectively, instead of |\@nnil|.
+% \begin{macrocode}
+\def\remove@to@nnil#1\@nnil{}
+\def\remove@angles#1>{\set@simple@size@args}
+\def\remove@star#1*{#1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \changes{v3.0c}{1995/08/24}{Macro \cs{gobble@font@spec} removed}
+%
+% \begin{macro}{\extract@sizefn}
+% This macro takes a size specification and parses it into size
+% function and the optional and mandatory arguments.
+% \begin{macrocode}
+\def\extract@sizefn#1*#2\@nil{%
+ \if>#2>\set@size@funct@args#1\@nil
+ \let\sizefn@info\@empty
+ \else\expandafter\set@size@funct@args\remove@star#2\@nil
+ \def\sizefn@info{#1}\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\try@simple@size}
+% This function tries to extract the given size (specified by
+% |\f@size|) for the requested font shape. The font information
+% must already be present in |\font@info|.
+% The central macro that does the real work is |\extract@fontinfo|.
+% We will first give a simple example how this macro works, and
+% describe it in full generality later.
+%
+% Assume that the requested parameters are: {\em encoding scheme\/}
+% `OT1', {\em family\/} `cm', {\em series\/} `sansserif',
+% {\em shape\/} `normal', and {\em size\/} `$12$'.
+% The corresponding font definitions have already been
+% extracted from the macro |\OT1/cm/sansserif/normal| and
+% stored in |font@info|.
+% (Otherwise |\extract@fontinfo| doesn't get called.)
+% This information consists of a token list made of characters
+% of category code $12$ of the form
+% \begin{verbatim}
+% <10*>cmss10<12*>cmss12<17*>cmss17
+%\end{verbatim}
+% For reasonable packages one usually needs more sizes but this is
+% sufficient to get the flavour.
+% We will define a macro |\extract@fontinfo| to find
+% the external font name (`cmss12') for us:
+% \begin{verbatim}
+% \def\extract@fontinfo#1<12*#2>#3<#4\@nnil{%
+% \set@simple@size@args#3<#4\@nnil
+% \execute@size@function{#2}}
+%\end{verbatim}
+% so that when it gets called via
+% \begin{verbatim}
+% \extract@fontinfo<10*>cmss10<12*>cmss12<17*>cmss17\@nnil
+%\end{verbatim}
+% |#1| will contain all characters before |<12*>|,
+% |#2| will be empty, |#3| will be exactly |cmss12|,
+% and |#3| will be |17>cmss17|.
+% The expansion is therefore
+% \begin{verbatim}
+% \set@simple@size@args cmss12<17*>cmss17\@nnil
+% \execute@size@function{}
+%\end{verbatim}
+% This means: the default (empty) size function will be executed,
+% with its optional argument argument set to empty and its mandatory
+% argument set to |cmss12| by |\set@simple@size@args|.
+% As we discussed earlier, the effect of the default size function
+% is to load the given external font (cmss12) at the specified size
+% (12)---which is exactly what was intended.
+%
+% But this is only part of the whole story.
+% It may be that the size requested does not occur
+% in the token list |\font@info|.
+% And the simple definition of |\extract@fontinfo| we gave
+% above does not allow to specify give more than one
+% size specification in front of the external font name.
+%
+% Let's address these two problems separately. The first one
+% is solved with the following trick:
+% We define |\extract@fontinfo| as follows:
+% \begin{verbatim}
+% \def\extract@fontinfo#1<12*#2>#3<#4\@nnil{%
+% \ifnot@nil{#3}%
+% {\set@simple@size@args#3<#4\@nnil
+% \execute@size@function{#2}%
+% }}%
+%\end{verbatim}
+% How does this work?
+% We call |\extract@fontinfo| via
+% \begin{verbatim}
+% \expandafter\extract@fontinfo\font@info<12*>\@nil<\@nnil
+%\end{verbatim}
+% i.e. by appending |<12*>\@nil<\@nnil|.
+% If the size (`12' in this case) appears in |\font@info|
+% everything works as explained above, the only difference being
+% that argument |#4| of |\extract@fontinfo|
+% additionally gets the tokens |<12*>\@nil<\@nnil|.
+% However, if the size is not found everything up to the final
+% |<12*>| is in argument |#1|,
+% |#3| gets |\@nil|,
+% and |#2| and |#4| are empty.
+% The macro |\ifnot@nil| will discard the calls to
+% |\set@simple@size@args| and |execute@size@function|, and
+% hence |\font@info| will continue to be equal to |\@empty|.
+% This means that no simple size specification matching the
+% requested size could be found.
+%
+% The second problem (more than one simple size specification
+% for one external font name) will be addressed in
+% |\set@simple@size@args| below.
+%
+% The macros are hidden inside other control sequences
+% so that we have to build |\extract@fontinfo| in
+% several steps.
+%
+% So here's the actual definition of |\extract@font| in
+% |\try@simple@size|.
+% \begin{macrocode}
+% % this could be replaced by \try@size@range making the subst slower!
+\def\try@simple@size{%
+% \end{macrocode}
+% |\reserved@a| is made an abbreviation for the head of the
+% definition of the macro |\extract@fontinfo|.
+% \begin{macrocode}
+ \def\reserved@a{\def\extract@fontinfo####1}%
+% \end{macrocode}
+% Now we can define |\extract@fontinfo|. Here we handle a small
+% but convenient variation: in case of the default (empty) size
+% function it is allowed to omit the |*| character.
+% \changes{v2.0b}{1992/07/26}{}
+% \changes{v2.0c}{1992/09/19}{}
+% \begin{macrocode}
+ \expandafter\reserved@a\expandafter<\f@size>##2<##3\@nnil{%
+ \ifnot@nil{##2}%
+ {\set@simple@size@args##2<##3\@nnil
+ \execute@size@function\sizefn@info
+ }}%
+% \end{macrocode}
+% \changes{v2.0b}{1992/07/26}{}
+% Now we call |\extract@fontinfo|. Note the |<\@nil| \textsf{tokens}
+% at the end.
+% \begin{macrocode}
+ \expandafter\expandafter
+ \expandafter\extract@fontinfo\expandafter\font@info
+ \expandafter<\f@size>\@nil<\@nnil
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@simple@size@args}
+% As promised above, the macro |\set@simple@size@args| will handle
+% the case of several size specifications in a row.
+% If another size specification follows, the very first token of
+% its argument list is the character |<|.
+% By starting the definition as follows,
+% \begin{macrocode}
+\def\set@simple@size@args#1<{%
+% \end{macrocode}
+% parameter |#1| is empty in this case, and contains the size
+% function's arguments otherwise. We distinguish these two cases
+% (Note that the character |<| cannot appear in |#1|) by calling
+% |\remove@angles| for empty |#1| and |\extract@sizefn|
+% otherwise. In the latter case we have to take care of the
+% remaining character tokens and discard them. This is done by
+% |\remove@to@nnil|. Note also the use of Kabelschacht's method.
+% \begin{macrocode}
+ \if<#1<%
+ \expandafter\remove@angles
+ \else
+ \extract@sizefn#1*\@nil
+ \expandafter\remove@to@nnil
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Now, we are through with the case of a simple size, except for
+% calling the size function. This will be handled later, as it is
+% the same mechanism for all types of size specification. We will
+% now proceed to macors for extraction of size range specification.
+%
+%
+%
+% \begin{macro}{\extract@rangefontinfo}
+% |\extract@rangefontinfo| goes through a font shape definition
+% in the input until it recognizes the tokens |<\@nil->|.
+% It looks for font ranges with font size functions. It's operation
+% is rather simple: it discards everything up to the next size
+% specification and passes this on to |\is@range| for inspection.
+% The specification (parameter |#2| is inserted again, in case
+% it is needed later.
+% \begin{macrocode}
+\def\extract@rangefontinfo#1<#2>{%
+ \is@range#2->\@nil#2>}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\is@range}
+% |\is@range| is again a sort of dispatcher macro: if the size
+% specification it is looking at is not a range specification
+% it discards it and calls |\extract@rangefontinfo| to continue
+% the search. Otherwise it calls |\check@range| to check the
+% requested size against the specified range.
+%
+% From the way |\is@range| is called inside |\extract@rangefontinfo|
+% we see that |#2| is the character |>| if the size specification
+% found is a simple one (as it does not contain a |-| character.
+% This is checked easily enough and |\extract@rangefontinfo|
+% called again. Note that the extra tokens inserted after the
+% |\@nil| in the call to |\is@range| appear at the beginning of
+% the first argument to |\extract@rangefontinfo| and are hence
+% ignored.
+% \begin{macrocode}
+\def\is@range#1-#2\@nil{%
+ \if>#2\expandafter\check@single\else
+ \expandafter\check@range\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\check@range}
+% |\check@range| takes lower bound as parameter |#1|, upper bound
+% as |#2|, size function as |#3| and the size function's arguments
+% as |#4|. If |#3| is the special token |\@nil| |\font@info| is
+% exhausted and we can stop searching.
+% \begin{macrocode}
+\def\check@range#1-#2>#3<#4\@nnil{%
+ \ifnot@nil{#3}{%
+% \end{macrocode}
+% If |#3| wasn't |\@nil| we have a range. We start by assuming that
+% we have to recurse. Note that we have to reinsert an |<| as it
+% was already removed by scanning.
+% \begin{macrocode}
+ \def\reserved@f{\extract@rangefontinfo<#4\@nnil}%
+% \end{macrocode}
+% We have to make sure that both boundaries are present, if not we
+% have to set them. Here we check the upper bound. If |\upper@bound|
+% is zero after the assignment we set it to |\maxdimen| (upper open
+% range). We need to use a \meta{dimen} register for the scan since
+% we may have a decimal number as the boundary.
+% \begin{macrocode}
+ \upper@bound0#2\p@
+ \ifdim\upper@bound=\z@ \upper@bound\maxdimen\fi
+% \end{macrocode}
+% Now we check the upper boundary against |\f@size|.
+% If it is larger or equal than |\f@size| this
+% range is no good and we have to recurse.
+% \begin{macrocode}
+ \ifdim \f@size \p@<\upper@bound
+% \end{macrocode}
+% Otherwise we have to check the lower bound. This time it is not
+% necessary to scan the boundary value into a register because if
+% it is empty we get zero as desired. We could even omit the |0|
+% which would result in |1pt| as default lower boundary. If
+% |\f@size| is smaller than the boundary we have to recurse.
+% \begin{macrocode}
+ \lower@bound0#1\p@
+ \ifdim \f@size \p@<\lower@bound
+ \else
+% \end{macrocode}
+% If both tests are passed we can try executing the size function.
+% \begin{macrocode}
+ \set@simple@size@args#3<#4\@nnil
+ \execute@size@function\sizefn@info
+% \end{macrocode}
+% If the function was successful it should have left an external
+% font name in |\external@font|. We use this to see if we can stop
+% scanning. Otherwise we recurse.
+% \begin{macrocode}
+ \ifx\external@font\@empty
+ \else
+ \let\reserved@f\@empty
+ \fi
+ \fi
+ \fi
+ \reserved@f}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\lower@bound}
+% \begin{macro}{\upper@bound}
+% We use two dimen registers |\lower@bound| and |\upper@bound|
+% to store the lower and upper endpoints of the range we found.
+% \begin{macrocode}
+\newdimen\lower@bound
+\newdimen\upper@bound
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\check@single}
+% |\check@single| takes the size as parameter |#1|, size function
+% as |#2| and the size function's arguments as |#3|. We can assume
+% that there is always something in the pipeline since the very
+% last entry is a faked range (see above).
+% \begin{macrocode}
+\def\check@single#1>#2<#3\@nnil{%
+% \end{macrocode}
+% We start by assuming that
+% we have to recurse. Note that we have to reinsert an |<| as it
+% was already removed by scanning.
+% \begin{macrocode}
+ \def\reserved@f{\extract@rangefontinfo<#3\@nnil}%
+% \end{macrocode}
+% Now we check the the size against |\f@size|. If it is not equal
+% |\f@size| it is no good and we have to recurse.
+% \begin{macrocode}
+ \ifdim \f@size \p@=#1\p@
+% \end{macrocode}
+% Otherwise if this test is passed we can try executing the size
+% function.
+% \begin{macrocode}
+ \set@simple@size@args#2<#3\@nnil
+ \execute@size@function\sizefn@info
+% \end{macrocode}
+% If the function was successful it should have left an external
+% font name in |\external@font|. We use this to see if we can stop
+% scanning. Otherwise we recurse.
+% \begin{macrocode}
+ \ifx\external@font\@empty
+ \else
+ \let\reserved@f\@empty
+ \fi
+ \fi
+ \reserved@f}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\set@size@funct@args}
+% \begin{macro}{\set@size@funct@args@}
+% This macro sets the optional and mandatory arguments for a size
+% function. If the optional argument is not present it is set to
+% the empty token list. The mandatory argument is delimited by the
+% token |\@nil|.
+% \begin{macrocode}
+\def\set@size@funct@args{\@ifnextchar[%
+ \set@size@funct@args@{\set@size@funct@args@[]}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\set@size@funct@args@[#1]#2\@nil{%
+ \def\mandatory@arg{#2}%
+ \def\optional@arg{#1}}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclareSizeFunction}
+% This function defines a new size function hiding the internal
+% from the designer. The body of the size function may use
+% |\optional@arg| and |\mandatory@arg| denoting the optional and
+% mandatory argument that may follow the size specification |<...>|.
+% \changes{v2.1c}{1993/03/18}{Added all args to avoid blanks problems}
+% \begin{macrocode}
+%<*2ekernel>
+\def\DeclareSizeFunction#1#2{\@namedef{s@fct@#1}{#2}}
+\@onlypreamble\DeclareSizeFunction
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\execute@size@function}
+% This macro is very simple. The only point worth noting
+% is that calling an undefined size function will do nothing
+% (actually execute a |\relax|).
+% \begin{macrocode}
+%<*2ekernel|package>
+\def\execute@size@function#1{%
+%<*trace>
+ \@ifundefined{s@fct@#1}%
+ {\errmessage{Undefined font size function #1}%
+ \s@fct@}%
+ {\csname s@fct@#1\endcsname}%
+%</trace>
+%<-trace> \csname s@fct@#1\endcsname
+}
+%</2ekernel|package>
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.3j}{1994/05/23}{Removed def of \cs{f@warn@break}}
+%
+%
+% \begin{macro}{\try@size@range}
+% This macro tries to find a suitable range for requested size
+% (specified by |\f@size|) in |\font@info|. All the relevant
+% action is done in |\extract@rangefontinfo|. All that needs
+% to be done is to stuff in the token list in |\font@info| so
+% that |\extract@rangefontinfo| can inspect it.
+% Note the |<-*\@nil><| token at the end to stop scanning.
+% \changes{v2.0b}{1992/07/26}{}
+% \begin{macrocode}
+%<*2ekernel>
+\def\try@size@range{%
+ \expandafter\extract@rangefontinfo\font@info <-*>\@nil<\@nnil
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\try@size@substitution}
+% \changes{v2.3k}{1994/11/06}{New implementation}
+% This is the last thing that can be tried. If the desired |\f@size|
+% is found neither among the simple size specifications nor in one
+% of the ranges the whole list of size specifications is searched for
+% a nearby simple size.
+% \begin{macrocode}
+\gdef\try@size@substitution{%
+% \end{macrocode}
+% First we do some initializations. |\@tempdimb|
+% will hold the difference between the wanted size and the best
+% solution found so far, so we initialise it with |\maxdimen|.
+% The macro |\best@size| will hold the best size found, nothing
+% found is indicated by the empty value.
+% \begin{macrocode}
+ \@tempdimb \maxdimen
+ \let \best@size \@empty
+% \end{macrocode}
+% Now we loop over the specification
+% \begin{macrocode}
+ \expandafter \try@simples \font@info <\number\@M>\@nil<\@nnil
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\font@submax}
+% \changes{v2.3d}{1994/04/18}{Changed dimen to macro}
+% \begin{macro}{\fontsubfuzz}
+% \changes{v2.3d}{1994/04/18}{Changed dimen to macro}
+% The macro |\font@submax| records the maximal deviation from the
+% desired size encountered so far. Its value is used in a warning
+% message at |\end{document}|. The macro
+% |\fontsubfuzz| contains the amount that will not cause terminal
+% warnings (warnings still go into the transcript file).
+% \begin{macrocode}
+\def\font@submax{0pt}
+\def\fontsubfuzz{.4pt}
+%</2ekernel>
+%<+package>\def\fontsubfuzz{0pt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\try@simples}
+% \changes{v2.3k}{1994/11/06}{New implementation}
+% |\try@simples| goes through a font shape definition
+% in the input until it recognizes the tokens |<*\@nil><|.
+% It looks for simple sizes to determine the two closest sizes.
+% It is assumed that simple sizes are in increasing order.
+% \begin{macrocode}
+%<*2ekernel>
+\gdef\try@simples#1<#2>{%
+ \tryif@simple#2->\tryif@simple}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tryis@simple}
+% \changes{v2.3k}{1994/11/06}{New implementation}
+% |\tryis@simple| is similar to |\is@range|. If it sees a simple size,
+% it checks it against the value of |\f@size| and sets
+% |\lower@font@size| or |\higher@font@size|. In the latter case, it
+% stops the iteration. By adding |<\number\@M>| at the end of the
+% line we always have an end point. This is a hack which probably
+% should be corrected.
+%
+% First it checks whether it is finished already, then whether the
+% size specification in question is a simple one.
+% \begin{macrocode}
+\gdef\tryif@simple#1-#2\tryif@simple{%
+% \end{macrocode}
+% Most common case for |\reserved@f| first:
+% \begin{macrocode}
+ \let \reserved@f \try@simples
+ \if>#2%
+% \end{macrocode}
+% If so, it compares it to the value of |\f@size|. This is done using
+% a dimen register since there may be fractional numbers.
+% \begin{macrocode}
+ \dimen@ #1\p@
+ \ifdim \dimen@<\@M\p@
+% \end{macrocode}
+% If |\dimen@| is |\@M\p@| we have reached the end of the fontspec
+% (hopefully) otherwise we compare the value with |\f@size| and
+% compute in |\@tempdimc| the absolute value of the difference
+% between the two values.
+% \begin{macrocode}
+ \ifdim \f@size\p@<\dimen@
+ \@tempdimc \dimen@
+ \advance\@tempdimc -\f@size\p@
+ \else
+ \@tempdimc \f@size\p@
+ \advance\@tempdimc -\dimen@
+ \fi
+% \end{macrocode}
+% The result is then compared with the smallest difference we have
+% encountered, if the new value (in |\@tempdimc| is smaller) we
+% have found a size which is a better approximation so we make it
+% the |\best@size| and adjust |\@tempdimb|.
+% \begin{macrocode}
+ \ifdim \@tempdimc<\@tempdimb
+ \@tempdimb \@tempdimc
+ \def \best@size{#1}%
+ \fi
+% \end{macrocode}
+% When we have reached the end of the fontspec we substitute the
+% best size found (if any). We code this inline to save macro
+% space; in the past this was done by a macro called |\subst@size|.
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+%
+%
+% \begin{macro}{\subst@size}
+% This macro substitutes the size recorded in |\best@size| for
+% the unavailable size |\f@size|. |\font@submax| records the maximum
+% difference between desired size and selected size in the
+% whole run.
+% \changes{v2.3d}{1994/04/18}{\cs{font@submax} and \cs{fontsubfuzz}
+% now macros}
+% \begin{macrocode}
+% %\subst@size %% coded inline
+% %\def\subst@size{%
+ \ifx \external@font\@empty
+ \ifx \best@size\@empty
+ \else
+ \ifdim \@tempdimb>\font@submax \relax
+ \xdef \font@submax {\the\@tempdimb}%
+ \fi
+ \let \f@user@size \f@size
+ \let \f@size \best@size
+ \ifdim \@tempdimb>\fontsubfuzz\relax
+ \@font@warning{Font\space shape\space
+ `\curr@fontshape'\space in\space size\space
+ <\f@user@size>\space not\space available\MessageBreak
+ size\space <\f@size>\space substituted}%
+ \fi
+ \try@simple@size
+ \do@subst@correction
+ \fi
+ \fi
+% %}
+% \end{macrocode}
+% \end{macro}
+%
+% This brings us back into the main part of |\tryif@simple|.
+% Finally we get rid of any rubbish left over on the input stack.
+%
+% \changes{v3.0c}{1995/08/24}{}
+% \begin{macrocode}
+ \let \reserved@f \remove@to@nnil
+ \fi
+ \fi
+% \end{macrocode}
+% If it's a range iterate also.
+% \begin{macrocode}
+ \reserved@f}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Sizefunctions}
+%
+% In the following we define some useful size functions.
+%
+%
+% \begin{macro}{\s@fct@}
+% This is the default size function. Mandatory argument is an
+% external font name, optional argument a scale factor.
+% The font is scaled
+% to |\f@size| if no optional argument is present, and to
+% |\f@size| multiplied by the optional argument otherwise.
+% \changes{v2.0b}{1992/07/26}{}
+% \begin{macrocode}
+\DeclareSizeFunction{}{\empty@sfcnt\@font@warning}
+\DeclareSizeFunction{s}{\empty@sfcnt\@font@info}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\empty@sfcnt#1{%
+ \@tempdimb \f@size\p@
+ \ifx\optional@arg\@empty
+ \else
+ \@tempdimb \optional@arg\@tempdimb
+ #1{Font\space shape\space `\curr@fontshape'\space
+ will\space be\MessageBreak
+ scaled\space to\space size\space \the\@tempdimb}%
+ \fi
+ \edef\external@font{\mandatory@arg\space at\the\@tempdimb}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\s@fct@gen}
+% \begin{macro}{\s@fct@sgen}
+% This size function generates the external name from the mandatory
+% argument and the requested user size, and thus can be used for
+% external names where the size is encoded in the font name. The
+% optional argument a scale factor. The font is scaled to |\f@size|
+% if no optional argument is present, and to |\f@size| multiplied
+% by the optional argument otherwise.
+% \begin{macrocode}
+\DeclareSizeFunction{gen}{\gen@sfcnt\@font@warning}
+\DeclareSizeFunction{sgen}{\gen@sfcnt\@font@info}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\gen@sfcnt{%
+ \edef\mandatory@arg{\mandatory@arg\f@size}%
+ \empty@sfcnt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\s@fct@genb}
+% \begin{macro}{\s@fct@sgenb}
+% This size function is similar to |gen|, but for fonts where the
+% size is encoded in the font name in centipoints, as in the DC
+% fonts version 1.2. The font is scaled to |\f@size|
+% if no optional argument is present, and to |\f@size| multiplied
+% by the optional argument otherwise.
+% \begin{macrocode}
+\DeclareSizeFunction{genb}{\genb@sfcnt\@font@warning}
+\DeclareSizeFunction{sgenb}{\genb@sfcnt\@font@info}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\genb@sfcnt{%
+ \edef\mandatory@arg{\mandatory@arg\expandafter\genb@x\f@size..\@@}%
+ \empty@sfcnt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\genb@x}
+% \begin{macro}{\genb@y}
+% The auxiliary macros |\genb@x| and |\genb@y| are used to convert
+% the |\f@size| into centipoints.
+% \begin{macrocode}
+\def\genb@x#1.#2.#3\@@{\two@digits{#1}\genb@y#200\@@}
+\def\genb@y#1#2#3\@@{#1#2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\s@fct@sub}
+% This size function handles font substitution.
+% The mandatory argument is a family/series/shape combination,
+% the optional argument (if present) is ignored. The font encoding
+% scheme cannot be changed. Therefore, the first thing we do is to
+% prepend the encoding scheme.
+% \changes{v2.0b}{1992/07/26}{}
+% \begin{macrocode}
+\DeclareSizeFunction{sub}{\sub@sfcnt\@font@warning}
+\DeclareSizeFunction{ssub}{\sub@sfcnt\@font@info}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\sub@sfcnt#1{%
+ \edef\mandatory@arg{\f@encoding/\mandatory@arg}%
+% \end{macrocode}
+% Next action is split the arg into its individual components and
+% allow for a late font shape load.
+% \begin{macrocode}
+ \begingroup
+ \expandafter\split@name\mandatory@arg/\@nil
+ \try@load@fontshape
+ \endgroup
+% \end{macrocode}
+% Then we record the current |\f@size| since it may get clobbered.
+% \begin{macrocode}
+ \let\f@user@size\f@size
+% \end{macrocode}
+% Then we check whether this new combination is defined and
+% give an error message if not. In this case we also switch to
+% |\error@fontshape|.
+% \begin{macrocode}
+ \expandafter
+ \ifx\csname\mandatory@arg\endcsname\relax
+ \errmessage{No\space declaration\space for\space
+ shape\space \mandatory@arg}%
+ \error@fontshape
+ \else
+% \end{macrocode}
+% Otherwise we warn the user about the substitution taking place.
+% \begin{macrocode}
+ #1{Font\space shape\space `\curr@fontshape'\space in\space
+ size\space <\f@size>\space not\space available\MessageBreak
+ Font\space shape\space `\mandatory@arg'\space tried\space
+ instead}%
+ \expandafter\split@name\mandatory@arg/\@nil
+ \fi
+% \end{macrocode}
+% Then we restart the font specification scan by calling
+% |\get@external@font|.
+% \begin{macrocode}
+ \edef\f@size{\f@user@size}%
+ \get@external@font
+% \end{macrocode}
+% Finally |\do@subst@correction| is called to get the font name
+% right.
+% \begin{macrocode}
+ \do@subst@correction
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\s@fct@subf}
+% The |subf| size function allows substitution of another font. The
+% mandatory argument is the external name of the font to be
+% substituted, the optional argument a size scaling factor like
+% in the default size function.
+% The main difference to the default size function is the warning
+% message.
+% \begin{macrocode}
+\DeclareSizeFunction{subf}{\subf@sfcnt\@font@warning}
+\DeclareSizeFunction{ssubf}{\subf@sfcnt\@font@info}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\subf@sfcnt#1{%
+ #1{Font\space shape\space `\curr@fontshape'\space in\space
+ size\space \f@size\space not\space available\MessageBreak
+ external\space font\space `\mandatory@arg'\space used}%
+ \empty@sfcnt#1%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\s@fct@fixed}
+% The |fixed| size function is for using a font at a different size
+% than requested. A warning message is printed, and the external
+% font to be used is taken from the mandatory argument.
+% If an optional argument is present it is used as the `at'
+% size for the font. Otherwise the font is loaded at its design size.
+% \begin{macrocode}
+\DeclareSizeFunction{fixed}{\fixed@sfcnt\@font@warning}
+\DeclareSizeFunction{sfixed}{\fixed@sfcnt\@font@info}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\fixed@sfcnt#1{%
+ \ifx\optional@arg\@empty
+ \let\external@font\mandatory@arg
+ \else
+ \edef\external@font{\mandatory@arg\space at\optional@arg pt}%
+ \fi
+ #1{External\space font\space `\external@font'\space loaded\space
+ for\space size\MessageBreak
+ <\f@size>}%
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%<+checkmem>\CHECKMEM
+% \fi
+%
+%
+% \Finale
diff --git a/macros/latex-dev/base/lthyphen.dtx b/macros/latex-dev/base/lthyphen.dtx
new file mode 100644
index 0000000000..32b73bf892
--- /dev/null
+++ b/macros/latex-dev/base/lthyphen.dtx
@@ -0,0 +1,143 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%<*driver>
+\ProvidesFile{lthyphen.dtx}
+%</driver>
+%<default>\ProvidesFile{hyphen.ltx}
+% \fi
+% \ProvidesFile{lthyphen.dtx}
+ [1994/12/04 v1.0h LaTeX Kernel (hyphenation interface)]
+%
+%
+%
+%\iffalse This is a META comment
+%
+% File `lthyphen.dtx'.
+% Copyright (C) 1994-94 LaTeX3 project, Frank Mittelbach and
+% Rainer Sch\"opf, all rights reserved.
+%
+%\fi
+% \GetFileInfo{lthyphen.dtx}
+% \title{The \texttt{lthyphen.dtx} file\thanks
+% {This file has version number \fileversion, dated \filedate.}\\
+% for use with \LaTeXe}
+% \author{Frank Mittelbach, Chris Rowley \and Rainer Sch\"opf}
+%
+% \def\dst{{\normalfont\scshape docstrip}}
+% \setcounter{StandardModuleDepth}{1}
+%
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This file contains the code for loading hyphenation patterns into
+% \LaTeX. Most of this will end up in a file called
+% \texttt{hyphen.ltx}. If you wish to customize your \LaTeX{} system
+% in respect of hyphenation patterns, write a file
+% \texttt{hyphen.cfg}. If this file exists, it will be loaded instead
+% of \texttt{hyphen.ltx}. See the comments below for additional
+% information.
+%
+% \StopEventually{}
+%
+% To produce the printed version of this file the following code
+% is used. It can be extracted with the \dst{} program, or one can run
+% this file directly through \LaTeXe{}.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{lthyphen.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \changes{v0.1c}{1994/03/07}{move the 2ekernel code to ltfinal.dtx}
+% \changes{v1.0g}{1994/12/01}{Rename lthyphen.ltx/cfg to hyphen.ltx/cfg}
+% \changes{v1.0h}{1994/12/04}{Documentation edits for /1989}
+%
+% The default file |hyphen.ltx| loads hyphenation patterns for US
+% english. If you want to load additional or other hyphenation
+% patterns, you should create a file |hyphen.cfg|. This is best done
+% by starting from |hyphen.ltx|.
+%
+% For backward compatibility, the default file, |hyphen.ltx|,
+% first tries to load
+% the file |hyphen.tex|. If this file exists, an information
+% message is issued and the appropriate defaults for \TeX's internal
+% parameters are set: |\language| is initialized to $0$, and
+% |\lefthyphenmin| and |\righthyphenmin| to $2$ and $3$, respectively,
+% to disallow x- or -xx breaks.
+% \begin{macrocode}
+%<*default>
+\InputIfFileExists{hyphen.tex}%
+ {\message{Loading hyphenation patterns for US english.}%
+ \language=0
+ \lefthyphenmin=2 \righthyphenmin=3 }%
+% \end{macrocode}
+% Otherwise, since we cannot do anything without any hyphenation
+% patterns, an error message is printed and the Ini\TeX{} run
+% is terminated by invoking |\@@end| (which is the \LaTeXe{} name
+% for \TeX's |\end| primitive).
+% \begin{macrocode}
+ {\errhelp{The configuration for hyphenation is incorrectly
+ installed.^^J%
+ If you don't understand this error message you need
+ to seek^^Jexpert advice.}%
+ \errmessage{OOPS! I can't find any hyphenation patterns for
+ US english.^^J \space Think of getting some or the
+ latex2e setup will never succeed}\@@end}
+%</default>
+% \end{macrocode}
+% The following example describes the possible contents of a file
+% |hyphen.cfg| that will load both US English and German hyphenation
+% patterns, making the former the default.
+% It sets |\language| to $0$ for the US patterns and to $1$ for the
+% German patterns.
+% Then |\language| is set to $0$ to make this the default and the
+% default values of |\lefthyphenmin| and |\righthyphenmin| are set.
+% \begin{verbatim}
+%\language=0
+%\input hyphen % (or \input ushyphen1 if the file has been renamed)
+%\language=1
+%\input ghyph31
+%\language=0
+%\lefthyphenmin=2
+%\righthyphenmin=3
+%\endinput
+%\end{verbatim}
+%
+% Another possibility is to use the package |babel|, by Johannes Braams.
+% That package is distributed with a suitable |hyphen.cfg| file.
+%
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/ltidxglo.dtx b/macros/latex-dev/base/ltidxglo.dtx
new file mode 100644
index 0000000000..cb46fde90a
--- /dev/null
+++ b/macros/latex-dev/base/ltidxglo.dtx
@@ -0,0 +1,217 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltidxglo.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltidxglo.dtx}
+ [1996/01/20 v1.1e LaTeX Kernel (Index and Glossary)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltidxglo.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Index and Glossary Generation}
+% Index and Glossary commands.
+%
+% \DescribeMacro{\makeindex} A preamble command to turn on indexing.
+%
+% \DescribeMacro{\makeglossary} A preamble command to turn on making
+% glossary entries.
+%
+% \DescribeMacro{\index} Make an index entry for |#1|.
+%
+% \DescribeMacro{\glossary} Make a glossary entry for |#1|.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/31}{Initial version of ltidxbib.dtx,
+% split from ltherest.dtx}
+% \changes{v1.1a}{1994/05/19}{Initial version of ltidxglo.dtx,
+% split from ltidxbib.dtx}
+% \changes{v1.1d}{1995/10/25}{Doc cleanup}
+%
+%
+% \begin{oldcomments}
+% \makeindex ==
+% BEGIN
+% \index == BEGIN \@bsphack
+% \begingroup
+% \protect{X} == \string X\space
+% %% added 3 Feb 87 for \index commands
+% %% in \footnotes
+% re-\catcode special characters
+% to 'other'
+% \@wrindex
+% END
+%
+% \@wrindex{ITEM} ==
+% BEGIN
+% write of {\indexentry{ITEM}{page number}}
+% \endgroup
+% \@esphack
+% END
+%
+% INITIALIZATION:
+%
+% \index == BEGIN \@bsphack
+% \begingroup
+% re-\catcode special characters (in case '%' there)
+% \@index
+% END
+%
+% \@index{ITEM} == BEGIN \endgroup \@esphack END
+%
+% Changes made 14 Apr 89 to write \glossaryentry's instead of
+% \indexentry's on the .glo file.
+% \end{oldcomments}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{index,}
+% \end{macrocode}
+%
+% \changes{v1.1b}{1994/11/04}{Removed \cs{if@filesw} from
+% \cs{makeindex}.}
+%
+% \begin{macro}{\makeindex}
+% \begin{macrocode}
+\def\makeindex{%
+ \newwrite\@indexfile
+ \immediate\openout\@indexfile=\jobname.idx
+ \def\index{\@bsphack\begingroup
+ \@sanitize
+ \@wrindex}\typeout
+ {Writing index file \jobname.idx}%
+% \end{macrocode}
+% \changes{v1.1e}{1996/01/20}{Make no-op after use pr/2048}
+% Opening the write channel should be done only once
+% since on some OS multiple opens are forbidden and in
+% any case it is useless. So we turn this into a no-op after
+% use.
+% \begin{macrocode}
+ \let\makeindex\@empty
+}
+\@onlypreamble\makeindex
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@wrindex}
+% \changes{v1.1b}{1994/11/04}{Added \cs{protected@write} to
+% \cs{@wrindex}.}
+% \begin{macrocode}
+\def\@wrindex#1{%
+ \protected@write\@indexfile{}%
+ {\string\indexentry{#1}{\thepage}}%
+ \endgroup
+ \@esphack}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\index}
+% \begin{macrocode}
+\def\index{\@bsphack\begingroup \@sanitize\@index}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@index}
+% \begin{macrocode}
+\def\@index#1{\endgroup\@esphack}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makeglossary}
+% \changes{v1.1b}{1994/11/04}{Removed \cs{if@filesw} from
+% \cs{makeglossary}.}
+% \begin{macrocode}
+\def\makeglossary{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo
+ \def\glossary{\@bsphack\begingroup
+ \@sanitize
+ \@wrglossary}\typeout
+ {Writing glossary file \jobname.glo }%
+% \end{macrocode}
+% \changes{v1.1e}{1996/01/20}{Make no-op after use pr/2048}
+% Opening the write channel should be done only once
+% since on some OS multiple opens are forbidden and in
+% any case it is useless. So we turn this into a no-op after
+% use.
+% \begin{macrocode}
+ \let\makeglossary\@empty
+}
+\@onlypreamble\makeglossary
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@wrglossary}
+% \changes{v1.1b}{1994/11/04}{Added \cs{protected@write} to
+% \cs{@wrglossary}.}
+% \begin{macrocode}
+\def\@wrglossary#1{%
+ \protected@write\@glossaryfile{}%
+ {\string\glossaryentry{#1}{\thepage}}%
+ \endgroup
+ \@esphack}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\glossary}
+% \begin{macrocode}
+\def\glossary{\@bsphack\begingroup\@sanitize\@index}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltlength.dtx b/macros/latex-dev/base/ltlength.dtx
new file mode 100644
index 0000000000..fab7c6fdd2
--- /dev/null
+++ b/macros/latex-dev/base/ltlength.dtx
@@ -0,0 +1,167 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltlength.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltlength.dtx}
+ [2015/01/08 v1.1c LaTeX Kernel (Lengths)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltlength.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0c}{1994/03/29}
+% {Create file ltcntlen from parts of ltmiscen and ltherest.}
+% \changes{v1.1a}{1994/05/19}
+% {Extract file ltlength from ltcntlen.}
+% \changes{v1.1b}{1995/08/11}
+% {Doc typos fixed for latex/753}
+%
+% \section{Lengths}
+%
+% \DescribeMacro{\newlength}
+% Declare |#1| to be a new length command.
+%
+% \DescribeMacro{\setlength}
+% Set the length command, |#1|, to the value |#2|.
+%
+% \DescribeMacro{\addtolength}
+% Increase the value of the length command, |#1|, by the value |#2|.
+%
+% \DescribeMacro{\settowidth}
+% Set the length, |#1| to the width of a box containing |#2|.
+%
+% \DescribeMacro{\settoheight}
+% Set the length, |#1| to the height of a box containing |#2|.
+%
+% \DescribeMacro{\settodepth}
+% Set the length, |#1| to the depth of a box containing |#2|.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{lengths,}
+% \end{macrocode}
+%
+% \begin{macro}{\newlength}
+% \begin{macrocode}
+\def\newlength#1{\@ifdefinable#1{\newskip#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setlength}
+% \changes{v1.1c}{2015/01/08}{add = to ensure first length argument is terminated.
+% (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\setlength}{Using \setlength with \dimen0}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+% \begin{macrocode}
+\def\setlength#1#2{#1 #2\relax}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\setlength}{Using \setlength with \dimen0}%
+%<latexrelease>\def\setlength#1#2{#1#2\relax}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\addtolength}
+% |\relax| added 24 Mar 86
+% \begin{macrocode}
+\def\addtolength#1#2{\advance#1 #2\relax}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\settoheight}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \begin{macro}{\settodepth}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \begin{macro}{\settowidth}
+% \begin{macro}{\@settodim}
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \changes{v1.0a}{1994/03/07}{(DPC) Extra group for colour}
+% The obvious analogs of |\settowidth|.
+% \begin{macrocode}
+\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+% \end{macrocode}
+% Clear the memory afterwards (which might be a lot).
+% \begin{macrocode}
+ \setbox\@tempboxa\box\voidb@x}
+\def\settoheight{\@settodim\ht}
+\def\settodepth {\@settodim\dp}
+\def\settowidth {\@settodim\wd}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@settopoint}
+% This macro takes the contents of the skip register that is
+% supplied as its argument and removes the fractional part to make
+% it a whole number of points. This can be used in class files to
+% avoid values like |345.4666666pt| when calulating a dimension.
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \begin{macrocode}
+\def\@settopoint#1{\divide#1\p@\multiply#1\p@}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltlists.dtx b/macros/latex-dev/base/ltlists.dtx
new file mode 100644
index 0000000000..d59b7ac4f4
--- /dev/null
+++ b/macros/latex-dev/base/ltlists.dtx
@@ -0,0 +1,1097 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltlists.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltlists.dtx}
+ [2015/05/10 v1.0t LaTeX Kernel (List Environments)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltlists.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Tobias Oetiker\thanks{Tobi has converted the documentation to
+ doc.sty standard}\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0b}{1994/03/28}{Improve documentation}
+% \changes{v1.0f}{1994/05/21}{Use new error commands}
+% \changes{v1.0f}{1995/05/21}{Moved to doc.sty standard}
+%
+% \section{List, and related environments}
+%
+% The generic commands for creating an indented environment --
+% |enumerate|, |itemize|, |quote|, etc -- are:
+% \begin{quote}
+% |\list|\marg{LABEL}\marg{COMMANDS} ... |\endlist|
+% \end{quote}
+%
+% which can be invoked by the user as the list environment. The LABEL
+% argument specifies item labeling. COMMANDS contains commands for
+% changing the horizontal and vertical spacing parameters.
+%
+% Each item of the environment is begun by the command
+% |\item[|ITEMLABEL|]|
+% which produces an item labeled by ITEMLABEL. If the argument is
+% missing, then the LABEL argument of the |\list| command is used as the
+% item label.
+%
+% The label is formed by putting |\makelabel|\marg{ITEMLABEL} in an hbox
+% whose width is either its natural width or else |\labelwidth|,
+% whichever is larger. The |\list| command defines |\makelabel| to have
+% the default definition:
+% \begin{quote}
+% |\makelabel|\marg{ARG} == BEGIN |\hfil| ARG END
+% \end{quote}
+% which, for a label of width less than |\labelwidth|, puts the label
+% flushright, |\labelsep| to the left of the item's text. However,
+% |\makelabel| can be |\let| to another command by the |\list|'s
+% COMMANDS argument.
+%
+% A |\usecounter|\marg{foo} command in the second argument causes the
+% counter \emph{foo} to be initialized to zero, and stepped by every
+% |\item| command without an argument. (|\label| commands within the
+% list refer to this counter.)
+%
+% When you leave a list environment, returning either to an enclosing
+% list or normal text mode, LaTeX begins a new paragraph if and only if
+% you leave a blank line after the |\end| command. This is accomplished
+% by the |\@endparenv| command.
+%
+% Blank lines are ignored every other reasonable place--i.e.:
+% \begin{itemize}
+% \item Between the |\begin{list}| and the first |\item|,
+% \item Between the |\item| and the text of that item.
+% \item Between the end of the last item and the |\end{list}|.
+% \end{itemize}
+%
+% For an environment like quotation, in which items are not labeled,
+% the entire environment is a single item. It is defined by
+% letting |\quotation| == |\list{}{...}\item\relax|. (Note the
+% |\relax|, there in case the first character in the environment is a
+% '['.) The spacing parameters provide a great deal of flexability in
+% designing the format, including the ability to let the indentation of
+% the first paragraph be different from that of the subsequent ones.
+%
+% The trivlist environment is equivalent to a list environment
+% whose second argument sets the following parameter values:
+% \begin{description}
+% \item[\cs{leftmargin} = 0:] causes no indentation of left margin
+% \item[\cs{labelwidth} = 0:] see below for precise effect this has.
+% \item[\cs{itemindent} = 0:] with a null label, makes first paragraph
+% have no indentation. Succeeding paragraphs have |\parindent|
+% indentation. To give first paragraph same indentation, set
+% |\itemindent| = |\parindent| before the |\item[]|.
+% \end{description}
+%
+% Every |\item| in a trivlist environment must have an argument---in
+% many cases, this will be the null argument (|\item[]|). The trivlist
+% environment is mainly used for paragraphing environments, like
+% verbatim, in which there is no margin change. It provides the same
+% vertical spacing as the list environment, and works reasonably well
+% when it occurs immediately after an |\item| command in an enclosing
+% list.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/07}{Initial version, split from latex.dtx}
+% \changes{v1.0a}{1994/03/07}{Long lines wrapped to 72 columns}
+%
+%
+% \subsection{List and Trivlist}
+%
+%
+% The following variables are used inside a list environment:
+% \begin{description}
+% \item[\cs{@totalleftmargin}] The distance that the prevailing left
+% margin is indented from the outermost left margin,
+% \item[\cs{linewidth}] The width of the current line. Must be
+% initialized to |\hsize|.
+% \item[\cs{@listdepth}] A count for holding current list nesting depth.
+% \item[\cs{makelabel}] A macro with a single argument, used to
+% generate the label from the argument (given or implied)
+% of the |\item| command. Initialized to |\@mklab| by the |\list|
+% command. This command must produce some stretch---i.e., an
+% |\hfil|.
+% \item[\cs{@inlabel}] A switch that is false except between the time
+% an |\item| is encountered and the time that \TeX{}
+% actually enters horizontal mode. Should be tested by commands
+% that can be messed up by the list environment's use of |\everypar|.
+% \item[\cs{box}\cs{@labels}] When |@inlabel = true|, it holds the labels
+% to be put out by |\everypar|.
+% \item[\texttt{@noparitem}] A switch set by |\list| when
+% |@inlabel = true|.
+% Handles the case of a |\list| being the first thing in an item.
+% \item[\texttt{@noparlist}] A switch set true for a list that begins an
+% item. No |\topsep| space is added before or after |\item|'s such a
+% list.
+% \item[\texttt{@newlist}] Set true by |\list|, set false by the first
+% text (by |\everypar|).
+% \item[\texttt{@noitemarg}] Set true when executing an |\item| with no
+% explicit argument. Used to save space. To save time, make two
+% separate |\@item| commands.
+% \item[\texttt{@nmbrlist}] Set true by |\usecounter| command, causes
+% list to be numbered.
+% \item[\cs{@listctr}] |\def|'ed by |\usecounter| to name of counter.
+% \item[\cs{@noskipsec}] A switch set true by a sectioning command when
+% it is creating an in-text heading with |\everypar|.
+% \end{description}
+%
+% Throughout a list environment, |\hsize| is the width of the current
+% line, measured from the outermost left margin to the outermost right
+% margin. Environments like tabbing should use |\linewidth| instead of
+% |\hsize|.
+%
+% Here are the parameters of a list that can be set by commands in
+% the |\list|'s COMMANDS argument. These parameters are all TeX
+% skips or dimensions (defined by |\newskip| or |\newdimen|), so the
+% usual \TeX\ or \LaTeX\ commands can be used to set them. The
+% commands will be executed in vmode if and only if the |\list| was
+% preceded by a |\par| (or something like an |\end{list}|), so the
+% spacing parameters can be set according to whether the list is
+% inside a paragraph or is its own paragraph.
+%
+%
+% \subsection{Vertical Spacing (skips)}
+% \begin{description}
+% \item[\cs{topsep}:] Space between first item and preceding paragraph.
+% \item[\cs{partopsep}:] Extra space added to \cs{topsep} when
+% environment starts a new paragraph (is called in vmode).
+% \item[\cs{itemsep}:] Space between successive items.
+% \item[\cs{parsep}:] Space between paragraphs within an item -- the
+% \cs{parskip} for this environment.
+% \end{description}
+%
+% \subsection{Penalties}
+% \begin{description}
+%
+% \item[\cs{@beginparpenalty}:] put at the beginning of a list
+% \item[\cs{@endparpenalty}:] put at end of list
+% \item[\cs{@itempenalty}:] put between items.
+% \end{description}
+%
+% \subsection{Horizontal Spacing (dimens)}
+% \begin{description}
+% \item[\cs{leftmargin}:] space between left margin of enclosing
+% environment (or of page if top level list) and left margin of
+% this list. Must be nonnegative.
+% \item[\cs{rightmargin}:] analogous.
+% \item[\cs{listparindent}:] extra indentation at beginning of every
+% paragraph of a list except the one started by the \cs{item}
+% command. May be negative! Usually, labeled
+% lists have \cs{listparindent} equal to zero.
+% \item[\cs{itemindent}:] extra indentation added right BEFORE an item
+% label.
+% \item[\cs{labelwidth}:] nominal width of box that contains the label.
+% If the natural width of the
+% label $< =$ \cs{labelwidth},
+% then the label is flushed right inside a box
+% of width \cs{labelwidth} (with an \cs{hfil}).
+% Otherwise,
+% a box of the natural width is employed, which
+% causes an indentation of the text on that line.
+% \item[\cs{labelsep}:] space between end of label box and text of
+% first item.
+% \end{description}
+% \subsection{Default Values}
+% Defaults for the list environment are set as follows.
+% First, \cs{rightmargin}, \cs{listparindent} and \cs{itemindent}
+% are set
+% to 0pt. Then, one of the commands
+% \cs{@listi}, \cs{@listii}, ... , \cs{@listvi}
+% is called, depending upon the current level of the list.
+% The \cs{@list} \ldots commands should be defined by the document
+% style. A convention that the document style should follow is
+% to set \cs{leftmargin} to
+% \cs{leftmargini},\ldots, \cs{leftmarginvi} for
+% the appropriate level. Items that aren't changed may be left
+% alone, but everything that could possibly be changed must be
+% reset.
+% \begin{oldcomments}
+% \list{LABEL}{COMMANDS} ==
+% BEGIN
+% if \@listdepth > 5
+% then LaTeX error: 'Too deeply nested'
+% else \@listdepth :=G \@listdepth + 1
+% fi
+% \rightmargin := 0pt
+% \listparindent := 0pt
+% \itemindent := 0pt
+% \eval(@list \romannumeral\the\@listdepth) %% Set default values:
+% \@itemlabel :=L LABEL
+% \makelabel == \@mklab
+% @nmbrlist :=L false
+% COMMANDS
+%
+% \@trivlist % commands common to \list and \trivlist
+%
+% \parskip :=L \parsep
+% \parindent :=L \listparindent
+% \linewidth :=L \linewidth - \rightmargin -\leftmargin
+% \@totalleftmargin :=L \@totalleftmargin + \leftmargin
+% \parshape 1 \@totalleftmargin \linewidth
+% \ignorespaces % gobble space up to \item
+% END
+%
+% \endlist == BEGIN \@listdepth :=G \@listdepth -1
+% \endtrivlist
+% END
+%
+% \@trivlist ==
+% BEGIN
+% if @newlist = T then \@noitemerr fi
+% %% This command removed for some forgotten reason.
+% \@topsepadd :=L \topsep
+% if @noskipsec then leave vertical mode fi %% Added 11 Jun 85
+% if vertical mode
+% then \@topsepadd :=L \@topsepadd + \partopsep
+% else \unskip \par % remove glue from end of last line
+% fi
+% if @inlabel = true
+% then @noparitem :=L true
+% @noparlist :=L true
+% else @noparlist :=L false
+% \@topsep :=L \@topsepadd
+% fi
+% \@topsep :=L \@topsep + \parskip %% Change 4 Sep 85
+% \leftskip :=L 0pt % Restore paragraphing parameters
+% \rightskip :=L \@rightskip
+% \parfillskip :=L 0pt + 1fil
+%
+% NOTE: \@setpar called on every \list in case \par has been
+% temporarily munged before the \list command.
+% \@setpar{if @newlist = false then {\@@par} fi}
+% \@newlist :=G T
+% \@outerparskip :=L \parskip
+% END
+%
+% \trivlist ==
+% BEGIN
+% \parsep := \parskip
+% @nmbrlist := F
+% \@trivlist
+% \labelwidth := 0
+% \leftmargin := 0
+% \itemindent := \parindent
+% \@itemlabel :=L "empty" %% added 93/12/13
+% \makelabel{LABEL} == LABEL
+% END
+%
+% \endtrivlist ==
+% BEGIN
+% if @inlabel = T then \indent fi
+% if horizontal mode then \unskip \par fi
+% if @noparlist = true
+% else if \lastskip > 0
+% then \@tempskipa := \lastskip
+% \vskip - \lastskip
+% \vskip \@tempskipa -\@outerparskip + \parskip
+% fi
+% \@endparenv
+% fi
+% END
+%
+% \@endparenv ==
+% BEGIN
+% \addpenalty{@endparpenalty}
+% \addvspace{\@topsepadd}
+% \endgroup %% ends the \begin command's \begingroup
+% \par == BEGIN
+% \@restorepar
+% \everypar{}
+% \par
+% END
+% \everypar == BEGIN remove \lastbox \everypar{} END
+% \begingroup %% to match the \end commands \endgroup
+% END
+%
+% \item == BEGIN if math mode then WARNING fi
+% if next char = [
+% then \@item
+% else @noitemarg := true
+% \@item[@itemlabel]
+% END
+%
+% \@item[LAB] ==
+% BEGIN
+% if @noparitem = true
+% then @noparitem := false
+% % NOTE: then clause hardly every taken,
+% % so made a macro \@donoparitem
+% \box\@labels :=G \hbox{\hskip -\leftmargin
+% \box\@labels
+% \hskip \leftmargin }
+% if @minipage = false then
+% \@tempskipa := \lastskip
+% \vskip -\lastskip
+% \vskip \@tempskipa + \@outerparskip - \parskip
+% fi
+% else if @inlabel = true
+% then \indent \par % previous item empty.
+% fi
+% if hmode then 2 \unskip's
+% % To remove any space at end of prev.
+% % paragraph that could cause a blank line.
+% \par
+% fi
+% if @newlist = T
+% then if @nobreak = T % Kludge if list follows \section
+% then \addvspace{\@outerparskip - \parskip}
+% else \addpenalty{\@beginparpenalty}
+% \addvspace{\@topsep}
+% \addvspace{-\parskip} %% added 4 Sep 85
+% fi
+% else \addpenalty{\@itempenalty}
+% \addvspace{\itemsep}
+% fi
+% @inlabel :=G true
+% fi
+%
+% \everypar{ @minipage :=G F
+% @newlist :=G F
+% if @inlabel = true
+% then @inlabel :=G false
+% \hskip -\parindent
+% \box\@labels
+% \penalty 0
+% %% 3 Oct 85 -- allow line break here
+% \box\@labels :=G null
+% fi
+% \everypar{} }
+% @nobreak :=G false
+% if @noitemarg = true
+% then @noitemarg := false
+% if @nmbrlist
+% then \refstepcounter{\@listctr}
+% fi fi
+% \@tempboxa :=L \hbox{\makelabel{LAB}}
+% \box\@labels :=G \@labels \hskip \itemindent
+% \hskip - (\labelwidth + \labelsep)
+% if \wd \@tempboxa > \labelwidth
+% then \box\@tempboxa
+% else \hbox to \labelwidth {\unhbox\@tempboxa}
+% fi
+% \hskip\labelsep
+% \ignorespaces %gobble space up to text
+% END
+%
+% \makelabel{LABEL} == ERROR %% default to catch lonely \item
+%
+%
+% \usecounter{CTR} == BEGIN @nmbrlist :=L true
+% \@listctr == CTR
+% \setcounter{CTR}{0}
+% END
+%
+% DEFINE \dimen's and \count
+% \end{oldcomments}
+% \begin{macro}{\topskip}
+% \begin{macro}{\partopsep}
+% \begin{macro}{\itemsep}
+% \begin{macro}{\parsep}
+% \begin{macro}{\@topsep}
+% \begin{macro}{\@topsepadd}
+% \begin{macro}{\outerparskip}
+% \begin{macrocode}
+%<*2ekernel>
+\newskip\topsep
+\newskip\partopsep
+\newskip\itemsep
+\newskip\parsep
+\newskip\@topsep
+\newskip\@topsepadd
+\newskip\@outerparskip
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+% \end{macro}
+% \begin{macro}{\leftmargin}\begin{macro}{\rightmargin}
+% \begin{macro}{\listparindent}\begin{macro}{\itemindent}
+% \begin{macro}{\labelwidth}\begin{macro}{\labelsep}
+% \begin{macro}{\@totalleftmargin}
+% \begin{macrocode}
+\newdimen\leftmargin
+\newdimen\rightmargin
+\newdimen\listparindent
+\newdimen\itemindent
+\newdimen\labelwidth
+\newdimen\labelsep
+\newdimen\linewidth
+\newdimen\@totalleftmargin \@totalleftmargin=\z@
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\leftmargini}
+% \begin{macro}{\leftmarginii}
+% \begin{macro}{\leftmarginiii}
+% \begin{macro}{\leftmarginiv}
+% \begin{macro}{\leftmarginv}
+% \begin{macro}{\leftmarginvi}
+% \begin{macrocode}
+\newdimen\leftmargini
+\newdimen\leftmarginii
+\newdimen\leftmarginiii
+\newdimen\leftmarginiv
+\newdimen\leftmarginv
+\newdimen\leftmarginvi
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\@listdepth}\begin{macro}{\@itempenalty}
+% \begin{macro}{\@beginparpenalty}\begin{macro}{\@endparpenalty}
+% \begin{macrocode}
+\newcount\@listdepth \@listdepth=0
+\newcount\@itempenalty
+\newcount\@beginparpenalty
+\newcount\@endparpenalty
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\@labels}
+% \begin{macrocode}
+\newbox\@labels
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@inlabel}
+% \begin{macro}{\@inlabelfalse}
+% \begin{macro}{\@inlabeltrue}
+% \begin{macrocode}
+\newif\if@inlabel \@inlabelfalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\if@newlist}
+% \begin{macro}{\@newlistfalse}
+% \begin{macro}{\@newlisttrue}
+% \begin{macrocode}
+\newif\if@newlist \@newlistfalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\if@noparitem}
+% \begin{macro}{\@noparitemfalse}
+% \begin{macro}{\@noparitemtrue}
+% \begin{macrocode}
+\newif\if@noparitem \@noparitemfalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\if@noparlist}
+% \begin{macro}{\@noparlistfalse}
+% \begin{macro}{\@noparlisttrue}
+% \begin{macrocode}
+\newif\if@noparlist \@noparlistfalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\if@noitemarg}
+% \begin{macro}{\@noitemargfalse}
+% \begin{macro}{\@noitemargtrue}
+% \begin{macrocode}
+\newif\if@noitemarg \@noitemargfalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\if@newlist}
+% \begin{macro}{\@newlistfalse}
+% \begin{macro}{\@newlisttrue}
+% \begin{macrocode}
+\newif\if@nmbrlist \@nmbrlistfalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\list}
+% \begin{macrocode}
+\def\list#1#2{%
+ \ifnum \@listdepth >5\relax
+ \@toodeep
+ \else
+ \global\advance\@listdepth\@ne
+ \fi
+ \rightmargin\z@
+ \listparindent\z@
+ \itemindent\z@
+ \csname @list\romannumeral\the\@listdepth\endcsname
+ \def\@itemlabel{#1}%
+ \let\makelabel\@mklab
+ \@nmbrlistfalse
+ #2\relax
+ \@trivlist
+ \parskip\parsep
+ \parindent\listparindent
+ \advance\linewidth -\rightmargin
+ \advance\linewidth -\leftmargin
+ \advance\@totalleftmargin \leftmargin
+ \parshape \@ne \@totalleftmargin \linewidth
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\par@deathcycles}
+% \begin{macrocode}
+\newcount\par@deathcycles
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@trivlist}
+% \changes{v1.0e}{1994/12/02}{RmS: Added check for looping}
+% \changes{v1.0p}{1996/10/31}{Added check for missing item in outer
+% list}
+% \changes{v1.0q}{1996/11/04}{Moved check for missing item: only checked
+% when not inlabel flag is false}
+% Because |\par| is sometimes made a no-op it is possible for a missing
+% |\item| to produce a loop that does not fill memory and so never gets
+% trapped by \TeX. We thus need to trap this here by seting |\par| to
+% count the number of times a paragraph ii is called with no progress
+% being made started.
+% \begin{macrocode}
+\def\@trivlist{%
+ \if@noskipsec \leavevmode \fi
+ \@topsepadd \topsep
+ \ifvmode
+ \advance\@topsepadd \partopsep
+ \else
+ \unskip \par
+ \fi
+ \if@inlabel
+ \@noparitemtrue
+ \@noparlisttrue
+ \else
+ \if@newlist \@noitemerr \fi
+ \@noparlistfalse
+ \@topsep \@topsepadd
+ \fi
+ \advance\@topsep \parskip
+ \leftskip \z@skip
+ \rightskip \@rightskip
+ \parfillskip \@flushglue
+ \par@deathcycles \z@
+ \@setpar{\if@newlist
+ \advance\par@deathcycles \@ne
+ \ifnum \par@deathcycles >\@m
+ \@noitemerr
+ {\@@par}%
+ \fi
+ \else
+ {\@@par}%
+ \fi}%
+ \global \@newlisttrue
+ \@outerparskip \parskip}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{0.0}{1992/03/18}{RmS: added \cs{@nmbrlistfalse}}
+% \begin{macro}{\trivlist}
+% \begin{macrocode}
+\def\trivlist{%
+ \parsep\parskip
+ \@nmbrlistfalse
+ \@trivlist
+ \labelwidth\z@
+ \leftmargin\z@
+ \itemindent\z@
+% \end{macrocode}
+%
+% We initialise |\@itemlabel| so that a \texttt{trivlist} with
+% an |\item| not having an optional argument doesn't produce an
+% error message.
+% \changes{latex2e}{1993/12/13}{Initialised \cs{@itemlabel}}
+% \begin{macrocode}
+ \let\@itemlabel\@empty
+ \def\makelabel##1{##1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\endlist}
+% \begin{macrocode}
+\def\endlist{%
+ \global\advance\@listdepth\m@ne
+ \endtrivlist}
+% \end{macrocode}
+% \end{macro}
+%
+% The definition of \cs{trivlist} used to be in ltspace.dtx
+% so that other commands could be `let to it'.
+% They now use \cs{def}.
+% \begin{macro}{\endtrivlist}
+% \changes{v1.2b ltspace}{1994/11/12}{Changed order of tests to make
+% \cs{@noitemerror} correct: end of an era.}
+% \changes{v1.0i}{1995/05/25}{Macros moved from ltspace.dtx}
+% \changes{v1.0n}{1996/10/25}{Change \cs{indent} to \cs{leavevmode}}
+% \changes{v1.0n}{1996/10/25}{Reset flags explicitly}
+% \changes{v1.0o}{1996/10/26}{Correct typo}
+% \begin{macrocode}
+\def\endtrivlist{%
+ \if@inlabel
+ \leavevmode
+ \global \@inlabelfalse
+ \fi
+ \if@newlist
+ \@noitemerr
+ \global \@newlistfalse
+ \fi
+ \ifhmode\unskip \par
+% \end{macrocode}
+% We also check if we are in math mode and issue an error message
+% if so (hoping that |\@currenvir| resolves suitably). Otherwise
+% the usual ``perhaps a missing item'' error will get triggered
+% later which is confusing.
+% \changes{v1.0s}{2002/10/28}{Check for math mode (pr/3437)}
+% \begin{macrocode}
+ \else
+ \@inmatherr{\end{\@currenvir}}%
+ \fi
+ \if@noparlist \else
+ \ifdim\lastskip >\z@
+ \@tempskipa\lastskip \vskip -\lastskip
+ \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip
+ \vskip\@tempskipa
+ \fi
+ \@endparenv
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@endparenv}
+% \begin{macro}{\@doendpe}
+% To suppress the paragraph indentation in text immediately following
+% a paragraph-making environment, \cs{everypar} is changed to remove the
+% space, and \cs{par} is redefined to restore \cs{everypar}. Instead of
+% redefining \cs{par} and \cs{everypar}, \cs{@endparenv} was changed to
+% set the @endpe switch, letting \cs{end} redefine \cs{par} and
+% \cs{everypar}.
+%
+% This allows paragraph-making environments to work right when called
+% by other environments. (Changed 27 Oct 86)
+% \begin{macrocode}
+\def\@endparenv{%
+ \addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@doendpe}{clubpenalty fix}%
+\def\@doendpe{\@endpetrue
+ \def\par{\@restorepar
+% \end{macrocode}
+% If a section heading changes |\clubpenalty| to keep lines
+% after it together then this modification is restored via the
+% |\everypar| mechanism at the start of the next paragraph. As we
+% destroy the contents of this token here we explicity set
+% |\clubpenalty| back to its default.
+% \changes{v1.0t}{2015/05/10}{Explicitly reset \cs{clubpenalty} before
+% clearing \cs{everypar}; see also pr/0462 and pr/4065}
+% \begin{macrocode}
+ \clubpenalty\@clubpenalty
+ \everypar{}\par\@endpefalse}\everypar
+% \end{macrocode}
+%
+% Use |\setbox0=\lastbox| instead of |\hskip -\parindent|
+% so that a \cs{noindent} becomes a no-op when used before
+% a line immediately following a list environment(23 Oct 86).
+% \changes{v1.0k}{1995/11/07}{Enclosed \cs{setbox0} assignment by a
+% group so that it leaves the contents of box $0$ intact.}
+% \begin{macrocode}
+ {{\setbox\z@\lastbox}%
+ \everypar{}\@endpefalse}}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@doendpe}{clubpenalty fix}%
+%<latexrelease>\def\@doendpe{\@endpetrue
+%<latexrelease> \def\par{\@restorepar\everypar{}\par\@endpefalse}\everypar
+%<latexrelease> {{\setbox\z@\lastbox}\everypar{}\@endpefalse}}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\if@endpe}
+% \begin{macro}{\@endpefalse}
+% \begin{macro}{\@endpeltrue}
+% \begin{macrocode}
+\newif\if@endpe
+\@endpefalse
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
+%
+%
+% \begin{macro}{\@mklab}
+% \begin{macrocode}
+\def\@mklab#1{\hfil #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{LaTeX2.09}{1992/09/18}
+% {(RmS) Added warning if \cs{item} is used in math mode}
+% \changes{v1.0c}{1994/04/28}
+% {Replaced \cs{@ltxnomath} by \cs{@inmatherr}}
+% \changes{v1.0d}{1994/05/03}
+% {Removed superfluous braces}
+% \begin{macro}{\item}
+% \begin{macrocode}
+\def\item{%
+ \@inmatherr\item
+ \@ifnextchar [\@item{\@noitemargtrue \@item[\@itemlabel]}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@donoparitem}
+% \begin{macrocode}
+\def\@donoparitem{%
+ \@noparitemfalse
+ \global\setbox\@labels\hbox{\hskip -\leftmargin
+ \unhbox\@labels
+ \hskip \leftmargin}%
+ \if@minipage\else
+ \@tempskipa\lastskip
+ \vskip -\lastskip
+ \advance\@tempskipa\@outerparskip
+ \advance\@tempskipa -\parskip
+ \vskip\@tempskipa
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@item}
+% \changes{v1.0l}{1996/07/26}{Remove unecessary \cs{global} before
+% \cs{@minipage...}}
+% \begin{macrocode}
+\def\@item[#1]{%
+ \if@noparitem
+ \@donoparitem
+ \else
+ \if@inlabel
+ \indent \par
+ \fi
+ \ifhmode
+ \unskip\unskip \par
+ \fi
+ \if@newlist
+ \if@nobreak
+ \@nbitem
+ \else
+ \addpenalty\@beginparpenalty
+ \addvspace\@topsep
+ \addvspace{-\parskip}%
+ \fi
+ \else
+ \addpenalty\@itempenalty
+ \addvspace\itemsep
+ \fi
+ \global\@inlabeltrue
+ \fi
+ \everypar{%
+ \@minipagefalse
+ \global\@newlistfalse
+% \end{macrocode}
+% This |\if@inlabel| check is needed in case an item starts of
+% inside a group so that |\everypar| does not become empty
+% outside that group.
+% \@nobreakfalse, etc etc.
+% \begin{macrocode}
+ \if@inlabel
+ \global\@inlabelfalse
+% \end{macrocode}
+% The paragraph indent is now removed by using |\setbox...| since
+% this makes |\noindent| a no-op here, as it should be. Thus the
+% following comment is redundant but is left here for the sake of
+% future historians:
+% this next command was changed from an hskip to a kern to avoid
+% a break point after the parindent box: the skip could cause a
+% line-break if a very long label occurs in raggedright setting.
+% \changes{v1.0d}{1994/05/03}{\cs{hskip} changed to \cs{kern}}
+% \changes{v1.0m}{1996/10/23}{\cs{kern...} changed to \cs{setbox...}}
+% \changes{v1.0r}{1997/02/21}
+% {\cs{ifvoid} check added for \cs{noindent}. latex/2414}
+% If |\noindent| was used after |\item| want to cancel the |\itemindent|
+% skip. This case can be detected as the indentation box will be void.
+% \begin{macrocode}
+ {\setbox\z@\lastbox
+ \ifvoid\z@
+ \kern-\itemindent
+ \fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \box\@labels
+ \penalty\z@
+ \fi
+% \end{macrocode}
+% This code is intended to prevent a page break after the first
+% line of an item that comes immediately after a section title. It
+% may be sensible to always forbid a page break after one line of
+% an item? As with all such settings of |\clubpenalty| it is local
+% so will have no effect if the item starts in a group.
+%
+% Only resetting |\@nobreak| when it is true is now
+% essential since now it is sometimes set locally.
+% \changes{v1.0m}{1996/10/23}{Added setting of \cs{clubpenalty} and
+% set \cs{@nobreakfalse} only when necessary}
+% \begin{macrocode}
+ \if@nobreak
+ \@nobreakfalse
+ \clubpenalty \@M
+ \else
+ \clubpenalty \@clubpenalty
+ \everypar{}%
+ \fi}%
+% \end{macrocode}
+% \changes{v1.0l}{1996/07/26}{Remove unecessary \cs{global} before
+% \cs{@nobreak...}}
+% \changes{v1.0m}{1996/10/23}{\cs{@nobreak...} moved into the
+% \cs{everypar} and not executed unconditionally, see above}
+% \begin{macrocode}
+ \if@noitemarg
+ \@noitemargfalse
+ \if@nmbrlist
+% \end{macrocode}
+% \changes{v1.0g}{1995/05/17}{Removed surplus braces}
+% \begin{macrocode}
+ \refstepcounter\@listctr
+ \fi
+ \fi
+% \end{macrocode}
+% We use |\sbox| to support colour commands.
+% \changes{LaTeX2e}{1993/12/08}{use \cs{sbox} to support colour}
+% \begin{macrocode}
+ \sbox\@tempboxa{\makelabel{#1}}%
+ \global\setbox\@labels\hbox{%
+ \unhbox\@labels
+ \hskip \itemindent
+ \hskip -\labelwidth
+ \hskip -\labelsep
+ \ifdim \wd\@tempboxa >\labelwidth
+ \box\@tempboxa
+% \end{macrocode}
+% \changes{LaTeX2.09}{1991/11/22}
+% {(RmS) Changed second call to \cs{makelabel} to
+% \cs{unhbox}\cs{@tempboxa}.
+% Avoids problems with side effects in \cs{makelabel} and is
+% more efficient.}
+% \begin{macrocode}
+ \else
+ \hbox to\labelwidth {\unhbox\@tempboxa}%
+ \fi
+ \hskip \labelsep}%
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makelabel}
+% \changes{LaTeX2.09}{1991/11/04}
+% {(RmS) added default definition for \cs{makelabel},
+% to produce an error message.}
+% \begin{macrocode}
+\def\makelabel#1{%
+ \@latex@error{Lonely \string\item--perhaps a missing
+ list environment}\@ehc}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nbitem}
+% \changes{v1.0g}{1995/05/17}{Removed surplus braces}
+% \begin{macrocode}
+\def\@nbitem{%
+ \@tempskipa\@outerparskip
+ \advance\@tempskipa -\parskip
+ \addvspace\@tempskipa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\usecounter}
+% \begin{macrocode}
+\def\usecounter#1{\@nmbrlisttrue\def\@listctr{#1}\setcounter{#1}\z@}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Itemize and Enumerate}
+%
+% Enumeration is done with four counters: |enumi|, |enumii|, |enumiii|
+% and |enumiv|, where |enum|N controls the numbering of the Nth level
+% enumeration. The label is generated by the commands
+% \cs{labelenumi} \ldots{} \cs{labelenumiv}, which should be defined
+% by the document style.
+% Note that \cs{p@enum}N\cs{theenum}N defines the output
+% of a \cs{ref} command. A typical definition might be:
+% \begin{verbatim}
+% \def\theenumii{\alph{enumii}}
+% \def\p@enumii{\theenumi}
+% \def\labelenumii{(\theenumii)}
+% \end{verbatim}
+% which will print the labels as `(a)', `(b)', \ldots
+% and print a \cs{ref} as `3a'.
+%
+% The item numbers are moved to the right of the label box, so they are
+% always a distance of \cs{labelsep} from the item.
+%
+% \cs{@enumdepth} holds the current enumeration nesting depth.
+%
+% Itemization is controlled by four commands: \cs{labelitemi},
+% \cs{labelitemii},
+% \cs{labelitemiii}, and \cs{labelitemiv}.
+% To cause the second-level list to be
+% bulleted, you just define \cs{labelitemii}
+% to be $\bullet$. \cs{@itemspacing}
+% and \cs{@itemdepth} are the analogs of \cs{@enumspacing} and
+% \cs{@enumdepth}.
+%
+% \begin{oldcomments}
+% \enumerate ==
+% BEGIN
+% if \@enumdepth > 3
+% then errormessage: ``Too deeply nested''.
+% else \@enumdepth :=L \@enumdepth + 1
+% \@enumctr :=L eval(enum@\romannumeral\the\@enumdepth)
+% \list{\label(\@enumctr)}
+% {\usecounter{\@enumctr}
+% \makelabel{LABEL} == \hss \llap{LABEL}}
+% fi
+% END
+%
+% \endenumerate == \endlist
+% \end{oldcomments}
+%
+% \begin{macro}{\@enumdepth}
+% \begin{macrocode}
+\newcount\@enumdepth \@enumdepth = 0
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@enumi}
+% \begin{macro}{\c@enumii}
+% \begin{macro}{\c@enumii}
+% \begin{macro}{\c@enumiv}
+% \begin{macrocode}
+\@definecounter{enumi}
+\@definecounter{enumii}
+\@definecounter{enumiii}
+\@definecounter{enumiv}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{enumerate}
+% \changes{v1.0g}{1995/05/17}{Use \cs{thr@@} and remove surplus braces}
+% \begin{macrocode}
+\def\enumerate{%
+ \ifnum \@enumdepth >\thr@@\@toodeep\else
+ \advance\@enumdepth\@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+% \end{macrocode}
+%
+% \changes{v1.0j}{1995/07/09}{Use \cs{expandafter}}
+% \begin{macrocode}
+ \expandafter
+ \list
+ \csname label\@enumctr\endcsname
+ {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\endenumerate =\endlist
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{oldcomments}
+% \itemize ==
+% BEGIN
+% if \@itemdepth > 3
+% then errormessage: 'Too deeply nested'.
+% else \@itemdepth :=L \@itemdepth + 1
+% \@itemitem == eval(labelitem\romannumeral\the\@itemdepth)
+% \list{\@nameuse{\@itemitem}}
+% {\makelabel{LABEL} == \hss \llap{LABEL}}
+% fi
+% END
+%
+% \enditemize == \endlist
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\@itemdepth}
+% \begin{macrocode}
+\newcount\@itemdepth \@itemdepth = 0
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{itemize}
+% \changes{v1.0g}{1995/05/17}{Use \cs{thr@@}}
+% \begin{macrocode}
+\def\itemize{%
+ \ifnum \@itemdepth >\thr@@\@toodeep\else
+ \advance\@itemdepth\@ne
+ \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+% \end{macrocode}
+%
+% \changes{v1.0j}{1995/07/09}{Use \cs{expandafter}}
+% \begin{macrocode}
+ \expandafter
+ \list
+ \csname\@itemitem\endcsname
+ {\def\makelabel##1{\hss\llap{##1}}}%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\enditemize =\endlist
+%</2ekernel>
+% \end{macrocode}
+% \end{environment}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltlogos.dtx b/macros/latex-dev/base/ltlogos.dtx
new file mode 100644
index 0000000000..1754d06630
--- /dev/null
+++ b/macros/latex-dev/base/ltlogos.dtx
@@ -0,0 +1,123 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltlogos.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltlogos.dtx}
+ [1998/08/17 v1.1i LaTeX Kernel (Logos)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltlogos.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.1b}{1994/05/18}{(ASAJ) Added the \TeX{} logo.}
+% \changes{v1.1b}{1994/05/18}{(ASAJ) Made the \LaTeXe{} logo use the
+% text font `2' rather than the math font `2'.}
+% \changes{v1.1i}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+% \section{Logos}
+%
+% Various logos are defined here.
+%
+% \StopEventually{}
+%
+% \begin{macro}{\TeX}
+% The \TeX{} logo, adjusted so that a full stop after the logo
+% counts as ending a sentence.
+% \begin{macrocode}
+%<*2ekernel>
+\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LaTeX}
+% The \LaTeX{} logo.
+% \changes{LaTeX2e}{1993/11/24}{Macro changed}
+% \changes{v1.0o}{1994/05/11}{Use \cs{DeclareProtectedCommand}. ASAJ.}
+% \changes{v1.1d}{1994/06/01}
+% {Add \cs{m@th} to force math size calculations}
+% \changes{v1.1e}{1994/07/20}{Save a few tokens}
+%
+% \changes{v1.1h}{1997/10/08}{Simplify macro (force loading of
+% suitable math fonts once).}
+% \begin{macrocode}
+\DeclareRobustCommand{\LaTeX}{L\kern-.36em%
+ {\sbox\z@ T%
+ \vbox to\ht\z@{\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.15em%
+ \TeX}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.1c}{1994/05/26}{Remove \cs{SLiTeX} logo}
+%
+% \begin{macro}{\LaTeXe}
+% The \LaTeXe\ logo as proposed by A-W designers.
+% \changes{LaTeX2e}{1993/11/22}{Macro added}
+% \changes{LaTeX2e}{1993/12/16}{Extended logo by DPC}
+% \changes{v1.0o}{1994/05/11}{Use \cs{DeclareProtectedCommand}. ASAJ.}
+% \changes{v1.1e}{1994/07/20}{Save a few tokens}
+% \changes{v1.1f}{1997/05/29}{Added \cs{m@th} so that the \LaTeXe{}
+% logo works with non-zero values of \cs{mathsurround}.}
+% \begin{macrocode}
+\DeclareRobustCommand{\LaTeXe}{\mbox{\m@th
+ \if b\expandafter\@car\f@series\@nil\boldmath\fi
+ \LaTeX\kern.15em2$_{\textstyle\varepsilon}$}}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/ltluatex.dtx b/macros/latex-dev/base/ltluatex.dtx
new file mode 100644
index 0000000000..5c2f30624d
--- /dev/null
+++ b/macros/latex-dev/base/ltluatex.dtx
@@ -0,0 +1,1788 @@
+% \iffalse meta-comment
+%
+% Copyright 2015 2017 2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% It may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License (LPPL), either version 1.3c of
+% this license or (at your option) any later version. The latest
+% version of this license is in the file:
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+%
+%<2ekernel>%%% From File: ltluatex.dtx
+%<plain>\ifx\newluafunction\undefined\else\expandafter\endinput\fi
+%<tex>\ifx
+%<tex> \ProvidesFile\undefined\begingroup\def\ProvidesFile
+%<tex> #1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}}
+%<tex>\fi
+%<plain>\ProvidesFile{ltluatex.tex}
+%<*driver>
+\ProvidesFile{ltluatex.dtx}
+%</driver>
+%<*tex>
+[2018/10/21 v1.1i
+%</tex>
+%<plain> LuaTeX support for plain TeX (core)
+%<*tex>
+]
+\edef\etatcatcode{\the\catcode`\@}
+\catcode`\@=11
+%</tex>
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{ltluatex.dtx}
+\begin{document}
+\title{\filename\\(Lua\TeX{}-specific support)}
+\author{David Carlisle and Joseph Wright\footnote{Significant portions
+ of the code here are adapted/simplified from the packages \textsf{luatex} and
+ \textsf{luatexbase} written by Heiko Oberdiek, \'{E}lie Roux,
+ Manuel P\'{e}gouri\'{e}-Gonnar and Philipp Gesang.}}
+\date{\filedate}
+\maketitle
+\setcounter{tocdepth}{2}
+\tableofcontents
+\DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Overview}
+%
+% Lua\TeX{} adds a number of engine-specific functions to \TeX{}. Several of
+% these require set up that is best done in the kernel or need related support
+% functions. This file provides \emph{basic} support for Lua\TeX{} at the
+% \LaTeXe{} kernel level plus as a loadable file which can be used with
+% plain \TeX{} and \LaTeX{}.
+%
+% This file contains code for both \TeX{} (to be stored as part of the format)
+% and Lua (to be loaded at the start of each job). In the Lua code, the kernel
+% uses the namespace |luatexbase|.
+%
+% The following |\count| registers are used here for register allocation:
+% \begin{itemize}
+% \item[\texttt{\string\e@alloc@attribute@count}] Attributes (default~258)
+% \item[\texttt{\string\e@alloc@ccodetable@count}] Category code tables
+% (default~259)
+% \item[\texttt{\string\e@alloc@luafunction@count}] Lua functions
+% (default~260)
+% \item[\texttt{\string\e@alloc@whatsit@count}] User whatsits (default~261)
+% \item[\texttt{\string\e@alloc@bytecode@count}] Lua bytecodes (default~262)
+% \item[\texttt{\string\e@alloc@luachunk@count}] Lua chunks (default~263)
+% \end{itemize}
+% (|\count 256| is used for |\newmarks| allocation and |\count 257|
+% is used for\linebreak
+% |\newXeTeXintercharclass| with Xe\TeX{}, with code defined in
+% \texttt{ltfinal.dtx}).
+% With any \LaTeXe{} kernel from 2015 onward these registers are part of
+% the block in the extended area reserved by the kernel (prior to 2015 the
+% \LaTeXe{} kernel did not provide any functionality for the extended
+% allocation area).
+%
+% \section{Core \TeX{} functionality}
+%
+% The commands defined here are defined for
+% possible inclusion in a future \LaTeX{} format, however also extracted
+% to the file |ltluatex.tex| which may be used with older \LaTeX\
+% formats, and with plain \TeX.
+%
+% \noindent
+% \DescribeMacro{\newattribute}
+% |\newattribute{|\meta{attribute}|}|\\
+% Defines a named \cs{attribute}, indexed from~$1$
+% (\emph{i.e.}~|\attribute0| is never defined). Attributes initially
+% have the marker value |-"7FFFFFFF| (`unset') set by the engine.
+%
+% \noindent
+% \DescribeMacro{\newcatcodetable}
+% |\newcatcodetable{|\meta{catcodetable}|}|\\
+% Defines a named \cs{catcodetable}, indexed from~$1$
+% (|\catcodetable0| is never assigned). A new catcode table will be
+% populated with exactly those values assigned by Ini\TeX{} (as described
+% in the Lua\TeX{} manual).
+%
+% \noindent
+% \DescribeMacro{\newluafunction}
+% |\newluafunction{|\meta{function}|}|\\
+% Defines a named \cs{luafunction}, indexed from~$1$. (Lua indexes
+% tables from $1$ so |\luafunction0| is not available).
+%
+% \noindent
+% \DescribeMacro{\newwhatsit}
+% |\newwhatsit{|\meta{whatsit}|}|\\
+% Defines a custom \cs{whatsit}, indexed from~$1$.
+%
+% \noindent
+% \DescribeMacro{\newluabytecode}
+% |\newluabytecode{|\meta{bytecode}|}|\\
+% Allocates a number for Lua bytecode register, indexed from~$1$.
+%
+% \noindent
+% \DescribeMacro{\newluachunkname}
+% |newluachunkname{|\meta{chunkname}|}|\\
+% Allocates a number for Lua chunk register, indexed from~$1$.
+% Also enters the name of the regiser (without backslash) into the
+% \verb|lua.name| table to be used in stack traces.
+%
+% \noindent
+% \DescribeMacro{\catcodetable@initex}
+% \DescribeMacro{\catcodetable@string}
+% \DescribeMacro{\catcodetable@latex}
+% \DescribeMacro{\catcodetable@atletter}
+% Predefined category code tables with the obvious assignments. Note
+% that the |latex| and |atletter| tables set the full Unicode range
+% to the codes predefined by the kernel.
+%
+% \noindent
+% \DescribeMacro{\setattribute}
+% \DescribeMacro{\unsetattribute}
+% |\setattribute{|\meta{attribute}|}{|\meta{value}|}|\\
+% |\unsetattribute{|\meta{attribute}|}|\\
+% Set and unset attributes in a manner analogous to |\setlength|. Note that
+% attributes take a marker value when unset so this operation is distinct
+% from setting the value to zero.
+%
+% \section{Plain \TeX\ interface}
+%
+% The \textsf{ltluatex} interface may be used with plain \TeX\ using
+% |\input{ltluatex}|. This inputs |ltluatex.tex| which inputs
+% |etex.src| (or |etex.sty| if used with \LaTeX)
+% if it is not already input, and then defines some internal commands to
+% allow the \textsf{ltluatex} interface to be defined.
+%
+% The \textsf{luatexbase} package interface may also be used in plain \TeX,
+% as before, by inputting the package |\input luatexbase.sty|. The new
+% version of \textsf{luatexbase} is based on this \textsf{ltluatex}
+% code but implements a compatibility layer providing the interface
+% of the original package.
+%
+% \section{Lua functionality}
+%
+% \begingroup
+%
+% \begingroup\lccode`~=`_
+% \lowercase{\endgroup\let~}_
+% \catcode`_=12
+%
+% \subsection{Allocators in Lua}
+%
+% \DescribeMacro{new_attribute}
+% |luatexbase.new_attribute(|\meta{attribute}|)|\\
+% Returns an allocation number for the \meta{attribute}, indexed from~$1$.
+% The attribute will be initialised with the marker value |-"7FFFFFFF|
+% (`unset'). The attribute allocation sequence is shared with the \TeX{}
+% code but this function does \emph{not} define a token using
+% |\attributedef|.
+% The attribute name is recorded in the |attributes| table. A
+% metatable is provided so that the table syntax can be used
+% consistently for attributes declared in \TeX\ or Lua.
+%
+% \noindent
+% \DescribeMacro{new_whatsit}
+% |luatexbase.new_whatsit(|\meta{whatsit}|)|\\
+% Returns an allocation number for the custom \meta{whatsit}, indexed from~$1$.
+%
+% \noindent
+% \DescribeMacro{new_bytecode}
+% |luatexbase.new_bytecode(|\meta{bytecode}|)|\\
+% Returns an allocation number for a bytecode register, indexed from~$1$.
+% The optional \meta{name} argument is just used for logging.
+%
+% \noindent
+% \DescribeMacro{new_chunkname}
+% |luatexbase.new_chunkname(|\meta{chunkname}|)|\\
+% Returns an allocation number for a Lua chunk name for use with
+% |\directlua| and |\latelua|, indexed from~$1$.
+% The number is returned and also \meta{name} argument is added to the
+% |lua.name| array at that index.
+%
+% \noindent
+% \DescribeMacro{new_luafunction}
+% |luatexbase.new_luafunction(|\meta{functionname}|)|\\
+% Returns an allocation number for a lua function for use
+% with |\luafunction|, |\lateluafunction|, and |\luadef|,
+% indexed from~$1$. The optional \meta{functionname} argument
+% is just used for logging.
+%
+% These functions all require access to a named \TeX{} count register
+% to manage their allocations. The standard names are those defined
+% above for access from \TeX{}, \emph{e.g.}~\string\e@alloc@attribute@count,
+% but these can be adjusted by defining the variable
+% \texttt{\meta{type}\_count\_name} before loading |ltluatex.lua|, for example
+% \begin{verbatim}
+% local attribute_count_name = "attributetracker"
+% require("ltluatex")
+% \end{verbatim}
+% would use a \TeX{} |\count| (|\countdef|'d token) called |attributetracker|
+% in place of \string\e@alloc@attribute@count.
+%
+% \subsection{Lua access to \TeX{} register numbers}
+%
+% \DescribeMacro{registernumber}
+% |luatexbase.registernumer(|\meta{name}|)|\\
+% Sometimes (notably in the case of Lua attributes) it is necessary to
+% access a register \emph{by number} that has been allocated by \TeX{}.
+% This package provides a function to look up the relevant number
+% using Lua\TeX{}'s internal tables. After for example
+% |\newattribute\myattrib|, |\myattrib| would be defined by (say)
+% |\myattrib=\attribute15|. |luatexbase.registernumer("myattrib")|
+% would then return the register number, $15$ in this case. If the string passed
+% as argument does not correspond to a token defined by |\attributedef|,
+% |\countdef| or similar commands, the Lua value |false| is returned.
+%
+% As an example, consider the input:
+%\begin{verbatim}
+% \newcommand\test[1]{%
+% \typeout{#1: \expandafter\meaning\csname#1\endcsname^^J
+% \space\space\space\space
+% \directlua{tex.write(luatexbase.registernumber("#1") or "bad input")}%
+% }}
+%
+% \test{undefinedrubbish}
+%
+% \test{space}
+%
+% \test{hbox}
+%
+% \test{@MM}
+%
+% \test{@tempdima}
+% \test{@tempdimb}
+%
+% \test{strutbox}
+%
+% \test{sixt@@n}
+%
+% \attrbutedef\myattr=12
+% \myattr=200
+% \test{myattr}
+%
+%\end{verbatim}
+%
+% If the demonstration code is processed with Lua\LaTeX{} then the following
+% would be produced in the log and terminal output.
+%\begin{verbatim}
+% undefinedrubbish: \relax
+% bad input
+% space: macro:->
+% bad input
+% hbox: \hbox
+% bad input
+% @MM: \mathchar"4E20
+% 20000
+% @tempdima: \dimen14
+% 14
+% @tempdimb: \dimen15
+% 15
+% strutbox: \char"B
+% 11
+% sixt@@n: \char"10
+% 16
+% myattr: \attribute12
+% 12
+%\end{verbatim}
+%
+% Notice how undefined commands, or commands unrelated to registers
+% do not produce an error, just return |false| and so print
+% |bad input| here. Note also that commands defined by |\newbox| work and
+% return the number of the box register even though the actual command
+% holding this number is a |\chardef| defined token (there is no
+% |\boxdef|).
+%
+% \subsection{Module utilities}
+%
+% \DescribeMacro{provides_module}
+% |luatexbase.provides_module(|\meta{info}|)|\\
+% This function is used by modules to identify themselves; the |info| should be
+% a table containing information about the module. The required field
+% |name| must contain the name of the module. It is recommended to provide a
+% field |date| in the usual \LaTeX{} format |yyyy/mm/dd|. Optional fields
+% |version| (a string) and |description| may be used if present. This
+% information will be recorded in the log. Other fields are ignored.
+%
+% \noindent
+% \DescribeMacro{module_info}
+% \DescribeMacro{module_warning}
+% \DescribeMacro{module_error}
+% |luatexbase.module_info(|\meta{module}, \meta{text}|)|\\
+% |luatexbase.module_warning(|\meta{module}, \meta{text}|)|\\
+% |luatexbase.module_error(|\meta{module}, \meta{text}|)|\\
+% These functions are similar to \LaTeX{}'s |\PackageError|, |\PackageWarning|
+% and |\PackageInfo| in the way they format the output. No automatic line
+% breaking is done, you may still use |\n| as usual for that, and the name of
+% the package will be prepended to each output line.
+%
+% Note that |luatexbase.module_error| raises an actual Lua error with |error()|,
+% which currently means a call stack will be dumped. While this may not
+% look pretty, at least it provides useful information for tracking the
+% error down.
+%
+% \subsection{Callback management}
+%
+% \noindent
+% \DescribeMacro{add_to_callback}
+% |luatexbase.add_to_callback(|^^A
+% \meta{callback}, \meta{function}, \meta{description}|)|
+% Registers the \meta{function} into the \meta{callback} with a textual
+% \meta{description} of the function. Functions are inserted into the callback
+% in the order loaded.
+%
+% \noindent
+% \DescribeMacro{remove_from_callback}
+% |luatexbase.remove_from_callback(|\meta{callback}, \meta{description}|)|
+% Removes the callback function with \meta{description} from the \meta{callback}.
+% The removed function and its description
+% are returned as the results of this function.
+%
+% \noindent
+% \DescribeMacro{in_callback}
+% |luatexbase.in_callback(|\meta{callback}, \meta{description}|)|
+% Checks if the \meta{description} matches one of the functions added
+% to the list for the \meta{callback}, returning a boolean value.
+%
+% \noindent
+% \DescribeMacro{disable_callback}
+% |luatexbase.disable_callback(|\meta{callback}|)|
+% Sets the \meta{callback} to \texttt{false} as described in the Lua\TeX{}
+% manual for the underlying \texttt{callback.register} built-in. Callbacks
+% will only be set to false (and thus be skipped entirely) if there are
+% no functions registered using the callback.
+%
+% \noindent
+% \DescribeMacro{callback_descriptions}
+% A list of the descriptions of functions registered to the specified
+% callback is returned. |{}| is returned if there are no functions registered.
+%
+% \noindent
+% \DescribeMacro{create_callback}
+% |luatexbase.create_callback(|\meta{name},meta{type},\meta{default}|)|
+% Defines a user defined callback. The last argument is a default
+% function or |false|.
+%
+% \noindent
+% \DescribeMacro{call_callback}
+% |luatexbase.call_callback(|\meta{name},\ldots|)|
+% Calls a user defined callback with the supplied arguments.
+%
+% \endgroup
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*2ekernel|tex|latexrelease>
+%<2ekernel|latexrelease>\ifx\directlua\@undefined\else
+% \end{macrocode}
+%
+%
+% \changes{v1.0j}{2015/12/02}{Remove nonlocal iteration variables (PHG)}
+% \changes{v1.0j}{2015/12/02}{Assorted typos fixed (PHG)}
+% \changes{v1.0j}{2015/12/02}{Remove unreachable code after calls to error() (PHG)}
+% \subsection{Minimum Lua\TeX{} version}
+%
+% Lua\TeX{} has changed a lot over time. In the kernel support for ancient
+% versions is not provided: trying to build a format with a very old binary
+% therefore gives some information in the log and loading stops. The cut-off
+% selected here relates to the tree-searching behaviour of |require()|:
+% from version~0.60, Lua\TeX{} will correctly find Lua files in the |texmf|
+% tree without `help'.
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/10/01}
+%<latexrelease> {\newluafunction}{LuaTeX}%
+\ifnum\luatexversion<60 %
+ \wlog{***************************************************}
+ \wlog{* LuaTeX version too old for ltluatex support *}
+ \wlog{***************************************************}
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% \subsection{Older \LaTeX{}/Plain \TeX\ setup}
+%
+% \begin{macrocode}
+%<*tex>
+% \end{macrocode}
+%
+% Older \LaTeX{} formats don't have the primitives with `native' names:
+% sort that out. If they already exist this will still be safe.
+% \begin{macrocode}
+\directlua{tex.enableprimitives("",tex.extraprimitives("luatex"))}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\e@alloc\@undefined
+% \end{macrocode}
+%
+% In pre-2014 \LaTeX{}, or plain \TeX{}, load |etex.{sty,src}|.
+% \begin{macrocode}
+ \ifx\documentclass\@undefined
+ \ifx\loccount\@undefined
+ \input{etex.src}%
+ \fi
+ \catcode`\@=11 %
+ \outer\expandafter\def\csname newfam\endcsname
+ {\alloc@8\fam\chardef\et@xmaxfam}
+ \else
+ \RequirePackage{etex}
+ \expandafter\def\csname newfam\endcsname
+ {\alloc@8\fam\chardef\et@xmaxfam}
+ \expandafter\let\expandafter\new@mathgroup\csname newfam\endcsname
+ \fi
+% \end{macrocode}
+%
+% \subsubsection{Fixes to \texttt{etex.src}/\texttt{etex.sty}}
+%
+% These could and probably should be made directly in an
+% update to |etex.src| which already has some Lua\TeX-specific
+% code, but does not define the correct range for Lua\TeX.
+%
+% 2015-07-13 higher range in luatex.
+% \begin{macrocode}
+\edef \et@xmaxregs {\ifx\directlua\@undefined 32768\else 65536\fi}
+% \end{macrocode}
+% luatex/xetex also allow more math fam.
+% \begin{macrocode}
+\edef \et@xmaxfam {\ifx\Umathchar\@undefined\sixt@@n\else\@cclvi\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\count 270=\et@xmaxregs % locally allocates \count registers
+\count 271=\et@xmaxregs % ditto for \dimen registers
+\count 272=\et@xmaxregs % ditto for \skip registers
+\count 273=\et@xmaxregs % ditto for \muskip registers
+\count 274=\et@xmaxregs % ditto for \box registers
+\count 275=\et@xmaxregs % ditto for \toks registers
+\count 276=\et@xmaxregs % ditto for \marks classes
+% \end{macrocode}
+%
+% and 256 or 16 fam. (Done above due to plain/\LaTeX\ differences in
+% \textsf{ltluatex}.)
+% \begin{macrocode}
+% \outer\def\newfam{\alloc@8\fam\chardef\et@xmaxfam}
+% \end{macrocode}
+%
+% End of proposed changes to \texttt{etex.src}
+%
+% \subsubsection{luatex specific settings}
+%
+% Switch to global cf |luatex.sty| to leave room for inserts
+% not really needed for luatex but possibly most compatible
+% with existing use.
+% \begin{macrocode}
+\expandafter\let\csname newcount\expandafter\expandafter\endcsname
+ \csname globcount\endcsname
+\expandafter\let\csname newdimen\expandafter\expandafter\endcsname
+ \csname globdimen\endcsname
+\expandafter\let\csname newskip\expandafter\expandafter\endcsname
+ \csname globskip\endcsname
+\expandafter\let\csname newbox\expandafter\expandafter\endcsname
+ \csname globbox\endcsname
+% \end{macrocode}
+%
+% Define|\e@alloc| as in latex (the existing macros in |etex.src|
+% hard to extend to further register types as they assume specific
+% 26x and 27x count range. For compatibility the existing register
+% allocation is not changed.
+%
+% \begin{macrocode}
+\chardef\e@alloc@top=65535
+\let\e@alloc@chardef\chardef
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\e@alloc#1#2#3#4#5#6{%
+ \global\advance#3\@ne
+ \e@ch@ck{#3}{#4}{#5}#1%
+ \allocationnumber#3\relax
+ \global#2#6\allocationnumber
+ \wlog{\string#6=\string#1\the\allocationnumber}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\e@ch@ck#1#2#3#4{%
+ \ifnum#1<#2\else
+ \ifnum#1=#2\relax
+ #1\@cclvi
+ \ifx\count#4\advance#1 10 \fi
+ \fi
+ \ifnum#1<#3\relax
+ \else
+ \errmessage{No room for a new \string#4}%
+ \fi
+ \fi}%
+% \end{macrocode}
+%
+% Two simple \LaTeX\ macros used in |ltlatex.sty|.
+% \begin{macrocode}
+\long\def\@gobble#1{}
+\long\def\@firstofone#1{#1}
+% \end{macrocode}
+%
+% Fix up allocations not to clash with |etex.src|.
+%
+% \begin{macrocode}
+\expandafter\csname newcount\endcsname\e@alloc@attribute@count
+\expandafter\csname newcount\endcsname\e@alloc@ccodetable@count
+\expandafter\csname newcount\endcsname\e@alloc@luafunction@count
+\expandafter\csname newcount\endcsname\e@alloc@whatsit@count
+\expandafter\csname newcount\endcsname\e@alloc@bytecode@count
+\expandafter\csname newcount\endcsname\e@alloc@luachunk@count
+% \end{macrocode}
+%
+% End of conditional setup for plain \TeX\ / old \LaTeX.
+% \begin{macrocode}
+\fi
+%</tex>
+% \end{macrocode}
+%
+%
+% \subsection{Attributes}
+%
+% \begin{macro}{\newattribute}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% As is generally the case for the Lua\TeX{} registers we start here
+% from~$1$. Notably, some code assumes that |\attribute0| is never used so
+% this is important in this case.
+% \begin{macrocode}
+\ifx\e@alloc@attribute@count\@undefined
+ \countdef\e@alloc@attribute@count=258
+\fi
+\def\newattribute#1{%
+ \e@alloc\attribute\attributedef
+ \e@alloc@attribute@count\m@ne\e@alloc@top#1%
+}
+\e@alloc@attribute@count=\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setattribute}
+% \begin{macro}{\unsetattribute}
+% Handy utilities.
+% \begin{macrocode}
+\def\setattribute#1#2{#1=\numexpr#2\relax}
+\def\unsetattribute#1{#1=-"7FFFFFFF\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Category code tables}
+%
+% \begin{macro}{\newcatcodetable}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% Category code tables are allocated with a limit half of that used by Lua\TeX{}
+% for everything else. At the end of allocation there needs to be an
+% initialisation step. Table~$0$ is already taken (it's the global one for
+% current use) so the allocation starts at~$1$.
+% \begin{macrocode}
+\ifx\e@alloc@ccodetable@count\@undefined
+ \countdef\e@alloc@ccodetable@count=259
+\fi
+\def\newcatcodetable#1{%
+ \e@alloc\catcodetable\chardef
+ \e@alloc@ccodetable@count\m@ne{"8000}#1%
+ \initcatcodetable\allocationnumber
+}
+\e@alloc@ccodetable@count=\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0l}{2015/12/18}{Load Unicode data from source}
+% \begin{macro}{\catcodetable@initex}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% \begin{macro}{\catcodetable@string}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% \begin{macro}{\catcodetable@latex}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% \begin{macro}{\catcodetable@atletter}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% Save a small set of standard tables. The Unicode data is read
+% here in using a parser simplified from that in |load-unicode-data|:
+% only the nature of letters needs to be detected.
+% \begin{macrocode}
+\newcatcodetable\catcodetable@initex
+\newcatcodetable\catcodetable@string
+\begingroup
+ \def\setrangecatcode#1#2#3{%
+ \ifnum#1>#2 %
+ \expandafter\@gobble
+ \else
+ \expandafter\@firstofone
+ \fi
+ {%
+ \catcode#1=#3 %
+ \expandafter\setrangecatcode\expandafter
+ {\number\numexpr#1 + 1\relax}{#2}{#3}
+ }%
+ }
+ \@firstofone{%
+ \catcodetable\catcodetable@initex
+ \catcode0=12 %
+ \catcode13=12 %
+ \catcode37=12 %
+ \setrangecatcode{65}{90}{12}%
+ \setrangecatcode{97}{122}{12}%
+ \catcode92=12 %
+ \catcode127=12 %
+ \savecatcodetable\catcodetable@string
+ \endgroup
+ }%
+\newcatcodetable\catcodetable@latex
+\newcatcodetable\catcodetable@atletter
+\begingroup
+ \def\parseunicodedataI#1;#2;#3;#4\relax{%
+ \parseunicodedataII#1;#3;#2 First>\relax
+ }%
+ \def\parseunicodedataII#1;#2;#3 First>#4\relax{%
+ \ifx\relax#4\relax
+ \expandafter\parseunicodedataIII
+ \else
+ \expandafter\parseunicodedataIV
+ \fi
+ {#1}#2\relax%
+ }%
+ \def\parseunicodedataIII#1#2#3\relax{%
+ \ifnum 0%
+ \if L#21\fi
+ \if M#21\fi
+ >0 %
+ \catcode"#1=11 %
+ \fi
+ }%
+ \def\parseunicodedataIV#1#2#3\relax{%
+ \read\unicoderead to \unicodedataline
+ \if L#2%
+ \count0="#1 %
+ \expandafter\parseunicodedataV\unicodedataline\relax
+ \fi
+ }%
+ \def\parseunicodedataV#1;#2\relax{%
+ \loop
+ \unless\ifnum\count0>"#1 %
+ \catcode\count0=11 %
+ \advance\count0 by 1 %
+ \repeat
+ }%
+ \def\storedpar{\par}%
+ \chardef\unicoderead=\numexpr\count16 + 1\relax
+ \openin\unicoderead=UnicodeData.txt %
+ \loop\unless\ifeof\unicoderead %
+ \read\unicoderead to \unicodedataline
+ \unless\ifx\unicodedataline\storedpar
+ \expandafter\parseunicodedataI\unicodedataline\relax
+ \fi
+ \repeat
+ \closein\unicoderead
+ \@firstofone{%
+ \catcode64=12 %
+ \savecatcodetable\catcodetable@latex
+ \catcode64=11 %
+ \savecatcodetable\catcodetable@atletter
+ }
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Named Lua functions}
+%
+% \begin{macro}{\newluafunction}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% Much the same story for allocating Lua\TeX{} functions except here they are
+% just numbers so they are allocated in the same way as boxes.
+% Lua indexes from~$1$ so once again slot~$0$ is skipped.
+% \begin{macrocode}
+\ifx\e@alloc@luafunction@count\@undefined
+ \countdef\e@alloc@luafunction@count=260
+\fi
+\def\newluafunction{%
+ \e@alloc\luafunction\e@alloc@chardef
+ \e@alloc@luafunction@count\m@ne\e@alloc@top
+}
+\e@alloc@luafunction@count=\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Custom whatsits}
+%
+% \begin{macro}{\newwhatsit}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% These are only settable from Lua but for consistency are definable
+% here.
+% \begin{macrocode}
+\ifx\e@alloc@whatsit@count\@undefined
+ \countdef\e@alloc@whatsit@count=261
+\fi
+\def\newwhatsit#1{%
+ \e@alloc\whatsit\e@alloc@chardef
+ \e@alloc@whatsit@count\m@ne\e@alloc@top#1%
+}
+\e@alloc@whatsit@count=\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lua bytecode registers}
+%
+% \begin{macro}{\newluabytecode}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% These are only settable from Lua but for consistency are definable
+% here.
+% \begin{macrocode}
+\ifx\e@alloc@bytecode@count\@undefined
+ \countdef\e@alloc@bytecode@count=262
+\fi
+\def\newluabytecode#1{%
+ \e@alloc\luabytecode\e@alloc@chardef
+ \e@alloc@bytecode@count\m@ne\e@alloc@top#1%
+}
+\e@alloc@bytecode@count=\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lua chunk registers}
+
+% \begin{macro}{\newluachunkname}
+% \changes{v1.0a}{2015/09/24}{Macro added}
+% As for bytecode registers, but in addition we need to add a string
+% to the \verb|lua.name| table to use in stack tracing. We use the
+% name of the command passed to the allocator, with no backslash.
+% \begin{macrocode}
+\ifx\e@alloc@luachunk@count\@undefined
+ \countdef\e@alloc@luachunk@count=263
+\fi
+\def\newluachunkname#1{%
+ \e@alloc\luachunk\e@alloc@chardef
+ \e@alloc@luachunk@count\m@ne\e@alloc@top#1%
+ {\escapechar\m@ne
+ \directlua{lua.name[\the\allocationnumber]="\string#1"}}%
+}
+\e@alloc@luachunk@count=\z@
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lua loader}
+%
+% Load the Lua code at the start of every job.
+% For the conversion of \TeX{} into numbers at the Lua side we need some
+% known registers: for convenience we use a set of systematic names, which
+% means using a group around the Lua loader.
+% \begin{macrocode}
+%<2ekernel>\everyjob\expandafter{%
+%<2ekernel> \the\everyjob
+ \begingroup
+ \attributedef\attributezero=0 %
+ \chardef \charzero =0 %
+% \end{macrocode}
+% Note name change required on older luatex, for hash table access.
+% \begin{macrocode}
+ \countdef \CountZero =0 %
+ \dimendef \dimenzero =0 %
+ \mathchardef \mathcharzero =0 %
+ \muskipdef \muskipzero =0 %
+ \skipdef \skipzero =0 %
+ \toksdef \tokszero =0 %
+ \directlua{require("ltluatex")}
+ \endgroup
+%<2ekernel>}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \changes{v1.0b}{2015/10/02}{Fix backing out of \TeX{} code}
+% \changes{v1.0c}{2015/10/02}{Allow backing out of Lua code}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}
+%<latexrelease> {\newluafunction}{LuaTeX}%
+%<latexrelease>\let\e@alloc@attribute@count\@undefined
+%<latexrelease>\let\newattribute\@undefined
+%<latexrelease>\let\setattribute\@undefined
+%<latexrelease>\let\unsetattribute\@undefined
+%<latexrelease>\let\e@alloc@ccodetable@count\@undefined
+%<latexrelease>\let\newcatcodetable\@undefined
+%<latexrelease>\let\catcodetable@initex\@undefined
+%<latexrelease>\let\catcodetable@string\@undefined
+%<latexrelease>\let\catcodetable@latex\@undefined
+%<latexrelease>\let\catcodetable@atletter\@undefined
+%<latexrelease>\let\e@alloc@luafunction@count\@undefined
+%<latexrelease>\let\newluafunction\@undefined
+%<latexrelease>\let\e@alloc@luafunction@count\@undefined
+%<latexrelease>\let\newwhatsit\@undefined
+%<latexrelease>\let\e@alloc@whatsit@count\@undefined
+%<latexrelease>\let\newluabytecode\@undefined
+%<latexrelease>\let\e@alloc@bytecode@count\@undefined
+%<latexrelease>\let\newluachunkname\@undefined
+%<latexrelease>\let\e@alloc@luachunk@count\@undefined
+%<latexrelease>\directlua{luatexbase.uninstall()}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% In \verb|\everyjob|, if luaotfload is available, load it and switch to TU.
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2017/01/01}%
+%<latexrelease> {\fontencoding}{TU in everyjob}%
+%<latexrelease>\fontencoding{TU}\let\encodingdefault\f@encoding
+%<latexrelease>\ifx\directlua\@undefined\else
+%<2ekernel>\everyjob\expandafter{%
+%<2ekernel> \the\everyjob
+%<*2ekernel,latexrelease>
+ \directlua{%
+ if xpcall(function ()%
+ require('luaotfload-main')%
+ end,texio.write_nl) then %
+ local _void = luaotfload.main ()%
+ else %
+ texio.write_nl('Error in luaotfload: reverting to OT1')%
+ tex.print('\string\\def\string\\encodingdefault{OT1}')%
+ end %
+ }%
+ \let\f@encoding\encodingdefault
+ \expandafter\let\csname ver@luaotfload.sty\endcsname\fmtversion
+%</2ekernel,latexrelease>
+%<latexrelease>\fi
+%<2ekernel> }
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\fontencoding}{TU in everyjob}%
+%<latexrelease>\fontencoding{OT1}\let\encodingdefault\f@encoding
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<2ekernel|latexrelease>\fi
+%</2ekernel|tex|latexrelease>
+% \end{macrocode}
+%
+% \subsection{Lua module preliminaries}
+%
+% \begingroup
+%
+% \begingroup\lccode`~=`_
+% \lowercase{\endgroup\let~}_
+% \catcode`_=12
+%
+% \begin{macrocode}
+%<*lua>
+% \end{macrocode}
+%
+% Some set up for the Lua module which is needed for all of the Lua
+% functionality added here.
+%
+% \begin{macro}{luatexbase}
+% \changes{v1.0a}{2015/09/24}{Table added}
+% Set up the table for the returned functions. This is used to expose
+% all of the public functions.
+% \begin{macrocode}
+luatexbase = luatexbase or { }
+local luatexbase = luatexbase
+% \end{macrocode}
+% \end{macro}
+%
+% Some Lua best practice: use local versions of functions where possible.
+% \begin{macrocode}
+local string_gsub = string.gsub
+local tex_count = tex.count
+local tex_setattribute = tex.setattribute
+local tex_setcount = tex.setcount
+local texio_write_nl = texio.write_nl
+% \end{macrocode}
+% \changes{v1.0i}{2015/11/29}{Declare this as local before used in the module error definitions (PHG)}
+% \begin{macrocode}
+local luatexbase_warning
+local luatexbase_error
+% \end{macrocode}
+%
+% \subsection{Lua module utilities}
+%
+% \subsubsection{Module tracking}
+%
+% \begin{macro}{modules}
+% \changes{v1.0a}{2015/09/24}{Function modified}
+% To allow tracking of module usage, a structure is provided to store
+% information and to return it.
+% \begin{macrocode}
+local modules = modules or { }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{provides_module}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.0f}{2015/10/03}{use luatexbase\_log}
+% Local function to write to the log.
+% \begin{macrocode}
+local function luatexbase_log(text)
+ texio_write_nl("log", text)
+end
+% \end{macrocode}
+%
+% Modelled on |\ProvidesPackage|, we store much the same information but
+% with a little more structure.
+% \begin{macrocode}
+local function provides_module(info)
+ if not (info and info.name) then
+ luatexbase_error("Missing module name for provides_module")
+ end
+ local function spaced(text)
+ return text and (" " .. text) or ""
+ end
+ luatexbase_log(
+ "Lua module: " .. info.name
+ .. spaced(info.date)
+ .. spaced(info.version)
+ .. spaced(info.description)
+ )
+ modules[info.name] = info
+end
+luatexbase.provides_module = provides_module
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Module messages}
+%
+% There are various warnings and errors that need to be given. For warnings
+% we can get exactly the same formatting as from \TeX{}. For errors we have to
+% make some changes. Here we give the text of the error in the \LaTeX{} format
+% then force an error from Lua to halt the run. Splitting the message text is
+% done using |\n| which takes the place of |\MessageBreak|.
+%
+% First an auxiliary for the formatting: this measures up the message
+% leader so we always get the correct indent.
+% \changes{v1.0j}{2015/12/02}{Declaration/use of first\_head fixed (PHG)}
+% \begin{macrocode}
+local function msg_format(mod, msg_type, text)
+ local leader = ""
+ local cont
+ local first_head
+ if mod == "LaTeX" then
+ cont = string_gsub(leader, ".", " ")
+ first_head = leader .. "LaTeX: "
+ else
+ first_head = leader .. "Module " .. msg_type
+ cont = "(" .. mod .. ")"
+ .. string_gsub(first_head, ".", " ")
+ first_head = leader .. "Module " .. mod .. " " .. msg_type .. ":"
+ end
+ if msg_type == "Error" then
+ first_head = "\n" .. first_head
+ end
+ if string.sub(text,-1) ~= "\n" then
+ text = text .. " "
+ end
+ return first_head .. " "
+ .. string_gsub(
+ text
+ .. "on input line "
+ .. tex.inputlineno, "\n", "\n" .. cont .. " "
+ )
+ .. "\n"
+end
+% \end{macrocode}
+%
+% \begin{macro}{module_info}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \begin{macro}{module_warning}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \begin{macro}{module_error}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% Write messages.
+% \begin{macrocode}
+local function module_info(mod, text)
+ texio_write_nl("log", msg_format(mod, "Info", text))
+end
+luatexbase.module_info = module_info
+local function module_warning(mod, text)
+ texio_write_nl("term and log",msg_format(mod, "Warning", text))
+end
+luatexbase.module_warning = module_warning
+local function module_error(mod, text)
+ error(msg_format(mod, "Error", text))
+end
+luatexbase.module_error = module_error
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Dedicated versions for the rest of the code here.
+% \begin{macrocode}
+function luatexbase_warning(text)
+ module_warning("luatexbase", text)
+end
+function luatexbase_error(text)
+ module_error("luatexbase", text)
+end
+% \end{macrocode}
+%
+%
+% \subsection{Accessing register numbers from Lua}
+%
+% \changes{v1.0g}{2015/11/14}{Track Lua\TeX{} changes for
+% \texttt{(new)token.create}}
+% Collect up the data from the \TeX{} level into a Lua table: from
+% version~0.80, Lua\TeX{} makes that easy.
+% \changes{v1.0j}{2015/12/02}{Adjust hashtokens to store the result of tex.hashtokens()), not the function (PHG)}
+% \begin{macrocode}
+local luaregisterbasetable = { }
+local registermap = {
+ attributezero = "assign_attr" ,
+ charzero = "char_given" ,
+ CountZero = "assign_int" ,
+ dimenzero = "assign_dimen" ,
+ mathcharzero = "math_given" ,
+ muskipzero = "assign_mu_skip" ,
+ skipzero = "assign_skip" ,
+ tokszero = "assign_toks" ,
+}
+local createtoken
+if tex.luatexversion > 81 then
+ createtoken = token.create
+elseif tex.luatexversion > 79 then
+ createtoken = newtoken.create
+end
+local hashtokens = tex.hashtokens()
+local luatexversion = tex.luatexversion
+for i,j in pairs (registermap) do
+ if luatexversion < 80 then
+ luaregisterbasetable[hashtokens[i][1]] =
+ hashtokens[i][2]
+ else
+ luaregisterbasetable[j] = createtoken(i).mode
+ end
+end
+% \end{macrocode}
+%
+% \begin{macro}{registernumber}
+% Working out the correct return value can be done in two ways. For older
+% Lua\TeX{} releases it has to be extracted from the |hashtokens|. On the
+% other hand, newer Lua\TeX{}'s have |newtoken|, and whilst |.mode| isn't
+% currently documented, Hans Hagen pointed to this approach so we should be
+% OK.
+% \begin{macrocode}
+local registernumber
+if luatexversion < 80 then
+ function registernumber(name)
+ local nt = hashtokens[name]
+ if(nt and luaregisterbasetable[nt[1]]) then
+ return nt[2] - luaregisterbasetable[nt[1]]
+ else
+ return false
+ end
+ end
+else
+ function registernumber(name)
+ local nt = createtoken(name)
+ if(luaregisterbasetable[nt.cmdname]) then
+ return nt.mode - luaregisterbasetable[nt.cmdname]
+ else
+ return false
+ end
+ end
+end
+luatexbase.registernumber = registernumber
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Attribute allocation}
+%
+% \begin{macro}{new_attribute}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking}
+% As attributes are used for Lua manipulations its useful to be able
+% to assign from this end.
+% \begin{macrocode}
+local attributes=setmetatable(
+{},
+{
+__index = function(t,key)
+return registernumber(key) or nil
+end}
+)
+luatexbase.attributes = attributes
+% \end{macrocode}
+%
+% \begin{macrocode}
+local attribute_count_name =
+ attribute_count_name or "e@alloc@attribute@count"
+local function new_attribute(name)
+ tex_setcount("global", attribute_count_name,
+ tex_count[attribute_count_name] + 1)
+ if tex_count[attribute_count_name] > 65534 then
+ luatexbase_error("No room for a new \\attribute")
+ end
+ attributes[name]= tex_count[attribute_count_name]
+ luatexbase_log("Lua-only attribute " .. name .. " = " ..
+ tex_count[attribute_count_name])
+ return tex_count[attribute_count_name]
+end
+luatexbase.new_attribute = new_attribute
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Custom whatsit allocation}
+%
+% \begin{macro}{new_whatsit}
+% \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking}
+% Much the same as for attribute allocation in Lua.
+% \begin{macrocode}
+local whatsit_count_name = whatsit_count_name or "e@alloc@whatsit@count"
+local function new_whatsit(name)
+ tex_setcount("global", whatsit_count_name,
+ tex_count[whatsit_count_name] + 1)
+ if tex_count[whatsit_count_name] > 65534 then
+ luatexbase_error("No room for a new custom whatsit")
+ end
+ luatexbase_log("Custom whatsit " .. (name or "") .. " = " ..
+ tex_count[whatsit_count_name])
+ return tex_count[whatsit_count_name]
+end
+luatexbase.new_whatsit = new_whatsit
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Bytecode register allocation}
+%
+% \begin{macro}{new_bytecode}
+% \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking}
+% Much the same as for attribute allocation in Lua.
+% The optional \meta{name} argument is used in the log if given.
+% \begin{macrocode}
+local bytecode_count_name =
+ bytecode_count_name or "e@alloc@bytecode@count"
+local function new_bytecode(name)
+ tex_setcount("global", bytecode_count_name,
+ tex_count[bytecode_count_name] + 1)
+ if tex_count[bytecode_count_name] > 65534 then
+ luatexbase_error("No room for a new bytecode register")
+ end
+ luatexbase_log("Lua bytecode " .. (name or "") .. " = " ..
+ tex_count[bytecode_count_name])
+ return tex_count[bytecode_count_name]
+end
+luatexbase.new_bytecode = new_bytecode
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lua chunk name allocation}
+%
+% \begin{macro}{new_chunkname}
+% \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking}
+% As for bytecode registers but also store the name in the
+% |lua.name| table.
+% \begin{macrocode}
+local chunkname_count_name =
+ chunkname_count_name or "e@alloc@luachunk@count"
+local function new_chunkname(name)
+ tex_setcount("global", chunkname_count_name,
+ tex_count[chunkname_count_name] + 1)
+ local chunkname_count = tex_count[chunkname_count_name]
+ chunkname_count = chunkname_count + 1
+ if chunkname_count > 65534 then
+ luatexbase_error("No room for a new chunkname")
+ end
+ lua.name[chunkname_count]=name
+ luatexbase_log("Lua chunkname " .. (name or "") .. " = " ..
+ chunkname_count .. "\n")
+ return chunkname_count
+end
+luatexbase.new_chunkname = new_chunkname
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lua function allocation}
+%
+% \begin{macro}{new_luafunction}
+% \changes{v1.1i}{2018/10/21}{Function added}
+% Much the same as for attribute allocation in Lua.
+% The optional \meta{name} argument is used in the log if given.
+% \begin{macrocode}
+local luafunction_count_name =
+ luafunction_count_name or "e@alloc@luafunction@count"
+local function new_luafunction(name)
+ tex_setcount("global", luafunction_count_name,
+ tex_count[luafunction_count_name] + 1)
+ if tex_count[luafunction_count_name] > 65534 then
+ luatexbase_error("No room for a new luafunction register")
+ end
+ luatexbase_log("Lua function " .. (name or "") .. " = " ..
+ tex_count[luafunction_count_name])
+ return tex_count[luafunction_count_name]
+end
+luatexbase.new_luafunction = new_luafunction
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Lua callback management}
+%
+% The native mechanism for callbacks in Lua\TeX\ allows only one per function.
+% That is extremely restrictive and so a mechanism is needed to add and
+% remove callbacks from the appropriate hooks.
+%
+% \subsubsection{Housekeeping}
+%
+% The main table: keys are callback names, and values are the associated lists
+% of functions. More precisely, the entries in the list are tables holding the
+% actual function as |func| and the identifying description as |description|.
+% Only callbacks with a non-empty list of functions have an entry in this
+% list.
+% \begin{macrocode}
+local callbacklist = callbacklist or { }
+% \end{macrocode}
+%
+% Numerical codes for callback types, and name-to-value association (the
+% table keys are strings, the values are numbers).
+% \begin{macrocode}
+local list, data, exclusive, simple = 1, 2, 3, 4
+local types = {
+ list = list,
+ data = data,
+ exclusive = exclusive,
+ simple = simple,
+}
+% \end{macrocode}
+%
+% Now, list all predefined callbacks with their current type, based on the
+% Lua\TeX{} manual version~1.01. A full list of the currently-available
+% callbacks can be obtained using
+% \begin{verbatim}
+% \directlua{
+% for i,_ in pairs(callback.list()) do
+% texio.write_nl("- " .. i)
+% end
+% }
+% \bye
+% \end{verbatim}
+% in plain Lua\TeX{}. (Some undocumented callbacks are omitted as they are
+% to be removed.)
+% \begin{macrocode}
+local callbacktypes = callbacktypes or {
+% \end{macrocode}
+% Section 8.2: file discovery callbacks.
+% \changes{v1.1g}{2018/05/02}{find\_sfd\_file removed}
+% \begin{macrocode}
+ find_read_file = exclusive,
+ find_write_file = exclusive,
+ find_font_file = data,
+ find_output_file = data,
+ find_format_file = data,
+ find_vf_file = data,
+ find_map_file = data,
+ find_enc_file = data,
+ find_pk_file = data,
+ find_data_file = data,
+ find_opentype_file = data,
+ find_truetype_file = data,
+ find_type1_file = data,
+ find_image_file = data,
+% \end{macrocode}
+% \changes{v1.1g}{2018/05/02}{read\_sfd\_file removed}
+% \begin{macrocode}
+ open_read_file = exclusive,
+ read_font_file = exclusive,
+ read_vf_file = exclusive,
+ read_map_file = exclusive,
+ read_enc_file = exclusive,
+ read_pk_file = exclusive,
+ read_data_file = exclusive,
+ read_truetype_file = exclusive,
+ read_type1_file = exclusive,
+ read_opentype_file = exclusive,
+% \end{macrocode}
+% \changes{v1.0m}{2016/02/11}{read\_cidmap\_file added}
+% Not currently used by luatex but included for completeness.
+% may be used by a font handler.
+% \begin{macrocode}
+ find_cidmap_file = data,
+ read_cidmap_file = exclusive,
+% \end{macrocode}
+% Section 8.3: data processing callbacks.
+% \changes{v1.0m}{2016/02/11}{token\_filter removed}
+% \begin{macrocode}
+ process_input_buffer = data,
+ process_output_buffer = data,
+ process_jobname = data,
+% \end{macrocode}
+% Section 8.4: node list processing callbacks.
+% \changes{v1.0m}{2016/02/11}
+% {process\_rule, [hv]pack\_quality append\_to\_vlist\_filter added}
+% \changes{v1.0n}{2016/03/13}{insert\_local\_par added}
+% \changes{v1.0n}{2016/03/13}{contribute\_filter added}
+% \changes{v1.1h}{2018/08/18}{append\_to\_vlist\_filter is \texttt{exclusive}}
+% \changes{v1.1j}{2019/06/18}{new\_graf added}
+% \begin{macrocode}
+ contribute_filter = simple,
+ buildpage_filter = simple,
+ build_page_insert = exclusive,
+ pre_linebreak_filter = list,
+ linebreak_filter = list,
+ append_to_vlist_filter = exclusive,
+ post_linebreak_filter = list,
+ hpack_filter = list,
+ vpack_filter = list,
+ hpack_quality = list,
+ vpack_quality = list,
+ pre_output_filter = list,
+ process_rule = list,
+ hyphenate = simple,
+ ligaturing = simple,
+ kerning = simple,
+ insert_local_par = simple,
+ mlist_to_hlist = list,
+ new_graf = simple,
+% \end{macrocode}
+% Section 8.5: information reporting callbacks.
+% \changes{v1.0m}{2016/02/11}{show\_warning\_message added}
+% \changes{v1.0p}{2016/11/17}{call\_edit added}
+% \changes{v1.1g}{2018/05/02}{finish\_synctex\_callback added}
+% \changes{v1.1j}{2019/06/18}{finish\_synctex\_callback renamed finish\_synctex}
+% \changes{v1.1j}{2019/06/18}{wrapup\_run added}
+% \begin{macrocode}
+ pre_dump = simple,
+ start_run = simple,
+ stop_run = simple,
+ start_page_number = simple,
+ stop_page_number = simple,
+ show_error_hook = simple,
+ show_warning_message = simple,
+ show_error_message = simple,
+ show_lua_error_hook = simple,
+ start_file = simple,
+ stop_file = simple,
+ call_edit = simple,
+ finish_synctex = simple,
+ wrapup_run = simple,
+% \end{macrocode}
+% Section 8.6: PDF-related callbacks.
+% \changes{v1.1j}{2019/06/18}{page\_objnum\_provider added}
+% \changes{v1.1j}{2019/06/18}{process\_pdf\_image\_content added}
+% \begin{macrocode}
+ finish_pdffile = data,
+ finish_pdfpage = data,
+ page_objnum_provider = simple,
+ process_pdf_image_content = simple,
+% \end{macrocode}
+% Section 8.7: font-related callbacks.
+% \changes{v1.1e}{2017/03/28}{glyph\_stream\_provider added}
+% \changes{v1.1g}{2018/05/02}{glyph\_not\_found added}
+% \changes{v1.1j}{2019/06/18}{make\_extensible added}
+% \changes{v1.1j}{2019/06/18}{font\_descriptor\_objnum\_provider added}
+% \begin{macrocode}
+ define_font = exclusive,
+ glyph_not_found = exclusive,
+ glyph_stream_provider = exclusive,
+ make_extensible = exclusive,
+ font_descriptor_objnum_provider = exclusive,
+% \end{macrocode}
+% \changes{v1.0m}{2016/02/11}{pdf\_stream\_filter\_callback removed}
+% \begin{macrocode}
+}
+luatexbase.callbacktypes=callbacktypes
+% \end{macrocode}
+%
+% \begin{macro}{callback.register}
+% \changes{v1.0a}{2015/09/24}{Function modified}
+% Save the original function for registering callbacks and prevent the
+% original being used. The original is saved in a place that remains
+% available so other more sophisticated code can override the approach
+% taken by the kernel if desired.
+% \begin{macrocode}
+local callback_register = callback_register or callback.register
+function callback.register()
+ luatexbase_error("Attempt to use callback.register() directly\n")
+end
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Handlers}
+%
+% The handler function is registered into the callback when the
+% first function is added to this callback's list. Then, when the callback
+% is called, the handler takes care of running all functions in the list.
+% When the last function is removed from the callback's list, the handler
+% is unregistered.
+%
+% More precisely, the functions below are used to generate a specialized
+% function (closure) for a given callback, which is the actual handler.
+%
+%
+% The way the functions are combined together depends on
+% the type of the callback. There are currently 4 types of callback, depending
+% on the calling convention of the functions the callback can hold:
+% \begin{description}
+% \item[simple] is for functions that don't return anything: they are called
+% in order, all with the same argument;
+% \item[data] is for functions receiving a piece of data of any type
+% except node list head (and possibly other arguments) and returning it
+% (possibly modified): the functions are called in order, and each is
+% passed the return value of the previous (and the other arguments
+% untouched, if any). The return value is that of the last function;
+% \item[list] is a specialized variant of \emph{data} for functions
+% filtering node lists. Such functions may return either the head of a
+% modified node list, or the boolean values |true| or |false|. The
+% functions are chained the same way as for \emph{data} except that for
+% the following. If
+% one function returns |false|, then |false| is immediately returned and
+% the following functions are \emph{not} called. If one function returns
+% |true|, then the same head is passed to the next function. If all
+% functions return |true|, then |true| is returned, otherwise the return
+% value of the last function not returning |true| is used.
+% \item[exclusive] is for functions with more complex signatures; functions in
+% this type of callback are \emph{not} combined: An error is raised if
+% a second callback is registered..
+% \end{description}
+%
+% Handler for |data| callbacks.
+% \begin{macrocode}
+local function data_handler(name)
+ return function(data, ...)
+ for _,i in ipairs(callbacklist[name]) do
+ data = i.func(data,...)
+ end
+ return data
+ end
+end
+% \end{macrocode}
+% Handler for |exclusive| callbacks. We can assume |callbacklist[name]| is not
+% empty: otherwise, the function wouldn't be registered in the callback any
+% more.
+% \begin{macrocode}
+local function exclusive_handler(name)
+ return function(...)
+ return callbacklist[name][1].func(...)
+ end
+end
+% \end{macrocode}
+% Handler for |list| callbacks.
+% \changes{v1.0k}{2015/12/02}{resolve name and i.description (PHG)}
+% \begin{macrocode}
+local function list_handler(name)
+ return function(head, ...)
+ local ret
+ local alltrue = true
+ for _,i in ipairs(callbacklist[name]) do
+ ret = i.func(head, ...)
+ if ret == false then
+ luatexbase_warning(
+ "Function `" .. i.description .. "' returned false\n"
+ .. "in callback `" .. name .."'"
+ )
+ break
+ end
+ if ret ~= true then
+ alltrue = false
+ head = ret
+ end
+ end
+ return alltrue and true or head
+ end
+end
+% \end{macrocode}
+% Handler for |simple| callbacks.
+% \begin{macrocode}
+local function simple_handler(name)
+ return function(...)
+ for _,i in ipairs(callbacklist[name]) do
+ i.func(...)
+ end
+ end
+end
+% \end{macrocode}
+%
+% Keep a handlers table for indexed access.
+% \begin{macrocode}
+local handlers = {
+ [data] = data_handler,
+ [exclusive] = exclusive_handler,
+ [list] = list_handler,
+ [simple] = simple_handler,
+}
+% \end{macrocode}
+%
+% \subsubsection{Public functions for callback management}
+%
+% Defining user callbacks perhaps should be in package code,
+% but impacts on |add_to_callback|.
+% If a default function is not required, it may be declared as |false|.
+% First we need a list of user callbacks.
+% \begin{macrocode}
+local user_callbacks_defaults = { }
+% \end{macrocode}
+%
+% \begin{macro}{create_callback}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.0i}{2015/11/29}{Check name is not nil in error message (PHG)}
+% \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)}
+% The allocator itself.
+% \begin{macrocode}
+local function create_callback(name, ctype, default)
+ if not name or name == ""
+ or not ctype or ctype == ""
+ then
+ luatexbase_error("Unable to create callback:\n" ..
+ "valid callback name and type required")
+ end
+ if callbacktypes[name] then
+ luatexbase_error("Unable to create callback `" .. name ..
+ "':\ncallback is already defined")
+ end
+ if default ~= false and type (default) ~= "function" then
+ luatexbase_error("Unable to create callback `" .. name ..
+ ":\ndefault is not a function")
+ end
+ user_callbacks_defaults[name] = default
+ callbacktypes[name] = types[ctype]
+end
+luatexbase.create_callback = create_callback
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{call_callback}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.0i}{2015/11/29}{Check name is not nil in error message (PHG)}
+% \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)}
+% Call a user defined callback. First check arguments.
+% \begin{macrocode}
+local function call_callback(name,...)
+ if not name or name == "" then
+ luatexbase_error("Unable to create callback:\n" ..
+ "valid callback name required")
+ end
+ if user_callbacks_defaults[name] == nil then
+ luatexbase_error("Unable to call callback `" .. name
+ .. "':\nunknown or empty")
+ end
+ local l = callbacklist[name]
+ local f
+ if not l then
+ f = user_callbacks_defaults[name]
+ if l == false then
+ return nil
+ end
+ else
+ f = handlers[callbacktypes[name]](name)
+ end
+ return f(...)
+end
+luatexbase.call_callback=call_callback
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{add_to_callback}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% Add a function to a callback. First check arguments.
+% \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)}
+% \begin{macrocode}
+local function add_to_callback(name, func, description)
+ if not name or name == "" then
+ luatexbase_error("Unable to register callback:\n" ..
+ "valid callback name required")
+ end
+ if not callbacktypes[name] or
+ type(func) ~= "function" or
+ not description or
+ description == "" then
+ luatexbase_error(
+ "Unable to register callback.\n\n"
+ .. "Correct usage:\n"
+ .. "add_to_callback(<callback>, <function>, <description>)"
+ )
+ end
+% \end{macrocode}
+% Then test if this callback is already in use. If not, initialise its list
+% and register the proper handler.
+% \begin{macrocode}
+ local l = callbacklist[name]
+ if l == nil then
+ l = { }
+ callbacklist[name] = l
+% \end{macrocode}
+% If it is not a user defined callback use the primitive callback register.
+% \begin{macrocode}
+ if user_callbacks_defaults[name] == nil then
+ callback_register(name, handlers[callbacktypes[name]](name))
+ end
+ end
+% \end{macrocode}
+% Actually register the function and give an error if more than one
+% |exclusive| one is registered.
+% \begin{macrocode}
+ local f = {
+ func = func,
+ description = description,
+ }
+ local priority = #l + 1
+ if callbacktypes[name] == exclusive then
+ if #l == 1 then
+ luatexbase_error(
+ "Cannot add second callback to exclusive function\n`" ..
+ name .. "'")
+ end
+ end
+ table.insert(l, priority, f)
+% \end{macrocode}
+% Keep user informed.
+% \begin{macrocode}
+ luatexbase_log(
+ "Inserting `" .. description .. "' at position "
+ .. priority .. " in `" .. name .. "'."
+ )
+end
+luatexbase.add_to_callback = add_to_callback
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{remove_from_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)}
+% Remove a function from a callback. First check arguments.
+% \begin{macrocode}
+local function remove_from_callback(name, description)
+ if not name or name == "" then
+ luatexbase_error("Unable to remove function from callback:\n" ..
+ "valid callback name required")
+ end
+ if not callbacktypes[name] or
+ not description or
+ description == "" then
+ luatexbase_error(
+ "Unable to remove function from callback.\n\n"
+ .. "Correct usage:\n"
+ .. "remove_from_callback(<callback>, <description>)"
+ )
+ end
+ local l = callbacklist[name]
+ if not l then
+ luatexbase_error(
+ "No callback list for `" .. name .. "'\n")
+ end
+% \end{macrocode}
+% Loop over the callback's function list until we find a matching entry.
+% Remove it and check if the list is empty: if so, unregister the
+% callback handler.
+% \begin{macrocode}
+ local index = false
+ for i,j in ipairs(l) do
+ if j.description == description then
+ index = i
+ break
+ end
+ end
+ if not index then
+ luatexbase_error(
+ "No callback `" .. description .. "' registered for `" ..
+ name .. "'\n")
+ end
+ local cb = l[index]
+ table.remove(l, index)
+ luatexbase_log(
+ "Removing `" .. description .. "' from `" .. name .. "'."
+ )
+ if #l == 0 then
+ callbacklist[name] = nil
+ callback_register(name, nil)
+ end
+ return cb.func,cb.description
+end
+luatexbase.remove_from_callback = remove_from_callback
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{in_callback}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.0h}{2015/11/27}{Guard against undefined list latex/4445}
+% Look for a function description in a callback.
+% \begin{macrocode}
+local function in_callback(name, description)
+ if not name
+ or name == ""
+ or not callbacklist[name]
+ or not callbacktypes[name]
+ or not description then
+ return false
+ end
+ for _, i in pairs(callbacklist[name]) do
+ if i.description == description then
+ return true
+ end
+ end
+ return false
+end
+luatexbase.in_callback = in_callback
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{disable_callback}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% As we subvert the engine interface we need to provide a way to access
+% this functionality.
+% \begin{macrocode}
+local function disable_callback(name)
+ if(callbacklist[name] == nil) then
+ callback_register(name, false)
+ else
+ luatexbase_error("Callback list for " .. name .. " not empty")
+ end
+end
+luatexbase.disable_callback = disable_callback
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{callback_descriptions}
+% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.0h}{2015/11/27}{Match test in in-callback latex/4445}
+% List the descriptions of functions registered for the given callback.
+% \begin{macrocode}
+local function callback_descriptions (name)
+ local d = {}
+ if not name
+ or name == ""
+ or not callbacklist[name]
+ or not callbacktypes[name]
+ then
+ return d
+ else
+ for k, i in pairs(callbacklist[name]) do
+ d[k]= i.description
+ end
+ end
+ return d
+end
+luatexbase.callback_descriptions =callback_descriptions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{uninstall}
+% \changes{v1.0e}{2015/10/02}{Function added}
+% Unlike at the \TeX{} level, we have to provide a back-out mechanism here
+% at the same time as the rest of the code. This is not meant for use by
+% anything other than \textsf{latexrelease}: as such this is
+% \emph{deliberately} not documented for users!
+% \begin{macrocode}
+local function uninstall()
+ module_info(
+ "luatexbase",
+ "Uninstalling kernel luatexbase code"
+ )
+ callback.register = callback_register
+ luatexbase = nil
+end
+luatexbase.uninstall = uninstall
+% \end{macrocode}
+% \end{macro}
+% \endgroup
+%
+% \begin{macrocode}
+%</lua>
+% \end{macrocode}
+%
+% Reset the catcode of |@|.
+% \begin{macrocode}
+%<tex>\catcode`\@=\etatcatcode\relax
+% \end{macrocode}
+%
+%
+% \Finale
diff --git a/macros/latex-dev/base/ltluatex.pdf b/macros/latex-dev/base/ltluatex.pdf
new file mode 100644
index 0000000000..85bb4aec90
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..d7c283f9ef
--- /dev/null
+++ b/macros/latex-dev/base/ltmath.dtx
@@ -0,0 +1,1104 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltmath.dtx
+%
+%<leqno>\ProvidesFile{leqno.clo}
+%<fleqn>\ProvidesFile{fleqn.clo}
+%<leqno,fleqn> [2016/12/29 v1.2b Standard LaTeX option
+%<leqno> (left equation numbers)]
+%<fleqn> (flush left equations)]
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltmath.dtx}
+ [2018/09/24 v1.2b LaTeX Kernel (Math Setup)]
+% \iffalse
+%</driver>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{ltmath.dtx}
+\title{\filename}
+\date{\filedate}
+\author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.1b}{1996/07/26}{Removed \cs{global} before
+% \cs{@ignoretrue} in various places.}
+% \changes{v1.1c}{1998/08/17}{(RmS) Minor documentation fixes.}
+% \changes{v1.1g}{2005/11/10}{(MH) Minor documentation fixes.}
+%
+% \section{Math setup}
+%
+% This file contains a lot of the original plain \TeX{} code, as well
+% as the \LaTeX{} environments for math. It still needs sorting out.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{math definitions,}
+% \end{macrocode}
+%
+%
+%
+% \subsection{Math commands based on plain \TeX}
+%
+% \subsubsection{The log-like functions}
+%
+% \changes{1.0m}{1994/10/29}{ASAJ: Added \cs{DeclareMathOperator}.}
+% \changes{v1.0o}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{1.0q}{1994/11/30}{ASAJ: \cs{DeclareMathOperator} moved to
+% AMS\LaTeX.}
+% \changes{v1.0r}{1995/05/07}{Use \cs{hb@xt@}}
+% \changes{v1.0r}{1995/05/21}{Update some plain macros}
+% \changes{v1.0t}{1995/06/28}{minor doc edits}
+%
+% \begin{macro}{\log}
+% The standard operators:
+% \begin{macrocode}
+\def\log{\mathop{\operator@font log}\nolimits}
+\def\lg{\mathop{\operator@font lg}\nolimits}
+\def\ln{\mathop{\operator@font ln}\nolimits}
+\def\lim{\mathop{\operator@font lim}}
+\def\limsup{\mathop{\operator@font lim\,sup}}
+\def\liminf{\mathop{\operator@font lim\,inf}}
+\def\sin{\mathop{\operator@font sin}\nolimits}
+\def\arcsin{\mathop{\operator@font arcsin}\nolimits}
+\def\sinh{\mathop{\operator@font sinh}\nolimits}
+\def\cos{\mathop{\operator@font cos}\nolimits}
+\def\arccos{\mathop{\operator@font arccos}\nolimits}
+\def\cosh{\mathop{\operator@font cosh}\nolimits}
+\def\tan{\mathop{\operator@font tan}\nolimits}
+\def\arctan{\mathop{\operator@font arctan}\nolimits}
+\def\tanh{\mathop{\operator@font tanh}\nolimits}
+\def\cot{\mathop{\operator@font cot}\nolimits}
+\def\coth{\mathop{\operator@font coth}\nolimits}
+\def\sec{\mathop{\operator@font sec}\nolimits}
+\def\csc{\mathop{\operator@font csc}\nolimits}
+\def\max{\mathop{\operator@font max}}
+\def\min{\mathop{\operator@font min}}
+\def\sup{\mathop{\operator@font sup}}
+\def\inf{\mathop{\operator@font inf}}
+\def\arg{\mathop{\operator@font arg}\nolimits}
+\def\ker{\mathop{\operator@font ker}\nolimits}
+\def\dim{\mathop{\operator@font dim}\nolimits}
+\def\hom{\mathop{\operator@font hom}\nolimits}
+\def\det{\mathop{\operator@font det}}
+\def\exp{\mathop{\operator@font exp}\nolimits}
+\def\Pr{\mathop{\operator@font Pr}}
+\def\gcd{\mathop{\operator@font gcd}}
+\def\deg{\mathop{\operator@font deg}\nolimits}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bmod}
+% And some operators have to be done by hand:
+% \begin{macrocode}
+\def\bmod{%
+ \nonscript\mskip-\medmuskip\mkern5mu%
+ \mathbin{\operator@font mod}\penalty900\mkern5mu%
+ \nonscript\mskip-\medmuskip}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmod}
+% \begin{macrocode}
+\def\pmod#1{%
+ \allowbreak\mkern18mu({\operator@font mod}\,\,#1)}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Biggggg}
+%
+% \begin{macro}{\big}
+% Variants on |\big| and friends for use with delimiters:
+% \begin{macrocode}
+\def\bigl{\mathopen\big}
+\def\bigm{\mathrel\big}
+\def\bigr{\mathclose\big}
+\def\Bigl{\mathopen\Big}
+\def\Bigm{\mathrel\Big}
+\def\Bigr{\mathclose\Big}
+\def\biggl{\mathopen\bigg}
+\def\biggm{\mathrel\bigg}
+\def\biggr{\mathclose\bigg}
+\def\Biggl{\mathopen\Bigg}
+\def\Biggm{\mathrel\Bigg}
+\def\Biggr{\mathclose\Bigg}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{The UNSORTED Rest}
+%
+% The other math commands are lifted from plain \TeX.
+%
+% \begin{macro}{\jot}
+% \begin{macrocode}
+\newdimen\jot
+\jot=3pt
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\interdisplaylinepenalty}
+% \begin{macrocode}
+\newcount\interdisplaylinepenalty
+\interdisplaylinepenalty=100
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\choose}
+% \begin{macrocode}
+\def\choose{\atopwithdelims()}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\brack}
+% \begin{macrocode}
+\def\brack{\atopwithdelims[]}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\brace}
+% \begin{macrocode}
+\def\brace{\atopwithdelims\{\}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mathpalette}
+% \begin{macrocode}
+\def\mathpalette#1#2{%
+ \mathchoice
+ {#1\displaystyle{#2}}%
+ {#1\textstyle{#2}}%
+ {#1\scriptstyle{#2}}%
+ {#1\scriptscriptstyle{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\root}
+% \changes{v1.1d}{1997/01/08}
+% {(DPC) Remove spurious space tokens from
+% plain \TeX\ definition /2359}
+% \begin{macro}{\rootbox}
+% \begin{macro}{\r@@t}
+% \changes{v1.0r}{1995/05/21}{Use \cs{sqrtsign} instead of
+% \cs{sqrt}}
+% \begin{macrocode}
+\newbox\rootbox
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\root#1\of{%
+ \setbox\rootbox\hbox{$\m@th\scriptscriptstyle{#1}$}%
+ \mathpalette\r@@t}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\r@@t#1#2{%
+ \setbox\z@\hbox{$\m@th#1\sqrtsign{#2}$}%
+ \dimen@\ht\z@ \advance\dimen@-\dp\z@
+ \mkern5mu\raise.6\dimen@\copy\rootbox
+ \mkern-10mu\box\z@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\phantom}
+% \changes{v1.0p}{1994/11/18}
+% {(DPC) use \cs{expandafter} instead of \cs{next}}
+% \changes{v1.0p}{1994/11/18}
+% {(DPC) colour support}
+% \begin{macro}{\hphantom}
+% \begin{macro}{\vphantom}
+% \begin{macrocode}
+\newif\ifv@
+\newif\ifh@
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\vphantom{\v@true\h@false\ph@nt}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\hphantom{\v@false\h@true\ph@nt}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\phantom{\v@true\h@true\ph@nt}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\ph@nt{%
+ \ifmmode
+ \expandafter\mathpalette\expandafter\mathph@nt
+ \else
+ \expandafter\makeph@nt
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\makeph@nt#1{%
+ \setbox\z@\hbox{\color@begingroup#1\color@endgroup}\finph@nt}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\mathph@nt#1#2{%
+ \setbox\z@\hbox{$\m@th#1{#2}$}\finph@nt}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\finph@nt}{Start LR-mode}%
+\def\finph@nt{%
+ \setbox\tw@\null
+ \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi
+ \ifh@ \wd\tw@\wd\z@\fi
+% \end{macrocode}
+% \changes{v1.2b}{2018/09/24}{Start LR-mode if necessary (git/49)}
+% \begin{macrocode}
+ \leavevmode@ifvmode\box\tw@}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\finph@nt}{Start LR-mode}%
+%<latexrelease>\def\finph@nt{%
+%<latexrelease> \setbox\tw@\null
+%<latexrelease> \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi
+%<latexrelease> \ifh@ \wd\tw@\wd\z@\fi \box\tw@}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\mathstrut}
+% \begin{macrocode}
+\def\mathstrut{\vphantom(}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\smash}
+% \changes{v1.0p}{1994/11/18}
+% {(DPC) use \cs{expandafter} instead of \cs{next}}
+% \changes{v1.0p}{1994/11/18}
+% {(DPC) colour support}
+% \begin{macrocode}
+\def\smash{%
+ \relax % \relax, in case this comes first in \halign
+ \ifmmode
+ \expandafter\mathpalette\expandafter\mathsm@sh
+ \else
+ \expandafter\makesm@sh
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\makesm@sh#1{%
+ \setbox\z@\hbox{\color@begingroup#1\color@endgroup}\finsm@sh}
+\def\mathsm@sh#1#2{%
+ \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh}
+% \end{macrocode}
+% \changes{v1.2b}{2018/09/24}{Start LR-mode if necessary (git/49)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\finsm@sh}{Start LR-mode}%
+\def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \leavevmode@ifvmode\box\z@}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\finsm@sh}{Start LR-mode}%
+%<latexrelease>\def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \box\z@}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\buildrel}
+% \begin{macrocode}
+\def\buildrel#1\over#2{\mathrel{\mathop{\kern\z@#2}\limits^{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\cases}
+% \changes{LaTeX2.09}{1991/08/14}
+% {(RmS) inserted extra braces around entry for NFSS}
+% \begin{macrocode}
+\def\cases#1{\left\{\,\vcenter{\normalbaselines\m@th
+ \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\matrix}
+% \begin{macrocode}
+\def\matrix#1{\null\,\vcenter{\normalbaselines\m@th
+ \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
+ \mathstrut\crcr\noalign{\kern-\baselineskip}
+ #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmatrix}
+% \begin{macrocode}
+\def\pmatrix#1{\left(\matrix{#1}\right)}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\bordermatrix}
+% \changes{LaTeX2e}{1994/01/25}{Removed \cs{p@renwd}.}
+% \begin{macrocode}
+\def\bordermatrix#1{\begingroup \m@th
+ \@tempdima 8.75\p@
+ \setbox\z@\vbox{%
+ \def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}%
+ \ialign{$##$\hfil\kern2\p@\kern\@tempdima&\thinspace\hfil$##$\hfil
+ &&\quad\hfil$##$\hfil\crcr
+ \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}%
+ #1\crcr\omit\strut\cr}}%
+ \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}%
+ \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}%
+ \setbox\tw@\hbox{$\kern\wd\@ne\kern-\@tempdima\left(\kern-\wd\@ne
+ \global\setbox\@ne\vbox{\box\@ne\kern2\p@}%
+ \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right)$}%
+ \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\openup}
+% \begin{macrocode}
+\def\openup{\afterassignment\@penup\dimen@}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@penup{\advance\lineskip\dimen@
+ \advance\baselineskip\dimen@
+ \advance\lineskiplimit\dimen@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\displaylines}
+% \begin{macrocode}
+\newif\ifdt@p
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\displ@y{\global\dt@ptrue\openup\jot\m@th
+ \everycr{\noalign{\ifdt@p \global\dt@pfalse \ifdim\prevdepth>-1000\p@
+ \vskip-\lineskiplimit \vskip\normallineskiplimit \fi
+ \else \penalty\interdisplaylinepenalty \fi}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@lign{\tabskip\z@skip\everycr{}} % restore inside \displ@y
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\displaylines#1{\displ@y \tabskip\z@skip
+ \halign{\hb@xt@\displaywidth{$\@lign\hfil\displaystyle##\hfil$}\crcr
+ #1\crcr}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0r}{1995/05/21}{Remove \cs{mathhexbox} from this file}
+%
+% \begin{macro}{\sp}
+% \begin{macro}{\sb}
+% \begin{macrocode}
+\let\sp=^
+\let\sb=_
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\>}
+% \begin{macro}{\;}
+% \begin{macro}{\!}
+% \begin{macrocode}
+%\def\,{\mskip\thinmuskip} % already defined in ltspace
+\def\>{\mskip\medmuskip}
+\def\;{\mskip\thickmuskip}
+\def\!{\mskip-\thinmuskip}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\*}
+% \begin{macrocode}
+\def\*{\discretionary{\thinspace\the\textfont2\char2}{}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\:}
+% Nickname for the medium space since |\>| is not available inside
+% \texttt{tabbing}.
+% \begin{macrocode}
+\let\:=\>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\active@math@prime}
+% \changes{v1.1e}{1999/10/09}{Macro added, see PR 3104.}
+% This is the definition of the active math prime.
+% \begin{macrocode}
+\def\active@math@prime{^\bgroup\prim@s}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\prime@s}
+% \changes{v1.0p}{1994/11/18}
+% {(DPC) use \cs{@let@token} instead of \cs{next}
+% and \cs{expandafter} instead of \cs{nxt}}
+% \changes{v1.1e}{1999/10/09}{Introduce \cs{active@math@prime}.}
+% \begin{macrocode}
+{\catcode`\'=\active \global\let'\active@math@prime}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\prim@s{%
+ \prime\futurelet\@let@token\pr@m@s}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\pr@m@s{%
+ \ifx'\@let@token
+ \expandafter\pr@@@s
+ \else
+ \ifx^\@let@token
+ \expandafter\expandafter\expandafter\pr@@@t
+ \else
+ \egroup
+ \fi
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\pr@@@s#1{\prim@s}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\pr@@@t#1#2{#2\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0i}{1994/05/17}{Replaced \cs{let} by \cs{gdef}, for
+% indirect definition.}
+% \begin{macrocode}
+{\catcode`\_=\active \gdef_{\_}} % _ in math is
+ % either subscript or \_
+% \end{macrocode}
+%
+%
+% \changes{v1.0m}{1994/10/29}{ASAJ: Removed \cs{dag}, \cs{ddag}.}
+% \changes{v1.0m}{1994/10/29}{ASAJ: Renamed \cs{S} and \cs{P} to
+% \cs{mathsection} and \cs{mathparagraph} and made them
+% \cs{mathchardef}s.}
+% \changes{v1.0m}{1994/10/29}{ASAJ: Added \cs{mathellipsis},
+% \cs{mathdollar} and \cs{mathsterling}.}
+% \changes{v1.0n}{1994/10/30}{ASAJ: Moved the new commands to ltoutenc.}
+%
+% \subsection{Math Environments}
+%
+% \changes{1.0m}{1994/10/29}{ASAJ: Tidied up documentation.}
+%
+% \begin{macro}{\(}
+% \begin{macro}{\)}
+% Produces |$...$| with checks that |\(| isn't used in math mode, and
+% that |\)| is only used in math mode begun with |\(|.
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\(}{Make \( robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\({%
+ \relax\ifmmode\@badmath\else$\fi}%
+\DeclareRobustCommand\){%
+ \relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\(}{Make \( robust}%
+%<latexrelease>\def\({%
+%<latexrelease> \relax\ifmmode\@badmath\else$\fi}%
+%<latexrelease>\expandafter\let\csname\string( \endcsname\@undefined
+%<latexrelease>\def\){%
+%<latexrelease> \relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}%
+%<latexrelease>\expandafter\let\csname\string) \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\[}
+% \changes{v1.1g}{2005/11/10}
+% {(MH) Fixed potential problem in \cs{[} (pr/3399).}
+% \begin{macro}{\]}
+% Produces |$$...$$| with checks that |\[| isn't used in math mode,
+% and that |\]| is only used in display math mode (though there is no
+% real test that this display math started with |\[| and not with |$$|).
+% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\[}{Make \[ robust}%
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand\[{%
+ \relax\ifmmode
+ \@badmath
+ \else
+ \ifvmode
+ \nointerlineskip
+ \makebox[.6\linewidth]{}%
+ \fi
+ $$%%$$ BRACE MATCH HACK
+ \fi
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\]{%
+ \relax\ifmmode
+ \ifinner
+ \@badmath
+ \else
+ $$%%$$ BRACE MATCH HACK
+ \fi
+ \else
+ \@badmath
+ \fi
+ \ignorespaces
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\[}{Make \[ robust}%
+%<latexrelease>\def\[{%
+%<latexrelease> \relax\ifmmode
+%<latexrelease> \@badmath
+%<latexrelease> \else
+%<latexrelease> \ifvmode
+%<latexrelease> \nointerlineskip
+%<latexrelease> \makebox[.6\linewidth]{}%
+%<latexrelease> \fi
+%<latexrelease> $$%%$$ BRACE MATCH HACK
+%<latexrelease> \fi
+%<latexrelease>}%
+%<latexrelease>\expandafter\let\csname\string[ \endcsname\@undefined
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\def\]{%
+%<latexrelease> \relax\ifmmode
+%<latexrelease> \ifinner
+%<latexrelease> \@badmath
+%<latexrelease> \else
+%<latexrelease> $$%%$$ BRACE MATCH HACK
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@badmath
+%<latexrelease> \fi
+%<latexrelease> \ignorespaces
+%<latexrelease>}%
+%<latexrelease>\expandafter\let\csname\string] \endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{math}
+% \begin{environment}{displaymath}
+% Disguises for |\(...\)| and |\[...\]|.
+% \begin{macrocode}
+\let\math=\(
+\let\endmath=\)
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\displaymath{\[}
+\def\enddisplaymath{\]\@ignoretrue}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+%
+% \begin{environment}{equation}
+% \changes{LaTeX2.09}{1992/01/10}{RmS: put \cs{hbox} around \cs{@eqnnum}
+% to typeset the equation number in text mode
+% (as in the eqnarray env.)}
+% \begin{macro}{\c@equation}
+% Numbered equations, using the counter |\c@equation|.
+% \emph{Note}: The document style must define |\theequation| etc., and
+% do the appropriate |\@addtoreset|. It should also redefine |\@eqnnum|
+% if another format for the equation number is desired other than the
+% standard (...), or to move the equation numbers to the flushleft.
+% (See comment on the |\def| of |\@eqnnum|.)
+% \begin{macrocode}
+\@definecounter{equation}
+\def\equation{$$\refstepcounter{equation}}
+\def\endequation{\eqno \hbox{\@eqnnum}$$\@ignoretrue}
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+% \begin{macro}{\@eqnnum}
+% \changes{LaTeX2.09}{1991/09/29}{RmS: \cs{reset@font} added.}
+% \changes{v1.0l}{1994/10/23}{Added \cs{normalcolor} since \cs{eqno}
+% introduces a subgroup of the displayed math group}
+%
+% Produces the equation number for equation and
+% eqnarray environments. The following definition is for
+% flushright numbers; for flushleft numbers, see leqno.clo.
+% The equation number is set in black roman type even
+% if an eqnarray environment appears in an italic environment.
+% \changes{v1.0s}{1995/05/26}{Removed \cs{rmfamily} (PR 1578),
+% replaced \cs{reset@font} with \cs{normalfont}}
+% \begin{macrocode}
+\def\@eqnnum{{\normalfont \normalcolor (\theequation)}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\stackrel}
+% A disguise for plain \TeX's buildrel.
+% \begin{macrocode}
+\def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.9g}{1993/12/11}{Added a group around the first argument
+% of \cs{frac} to prevent
+% changes (for example font changes) from modifying the contents of
+% the second argument.}
+%
+% \begin{macro}{\frac}
+% A disguise for plain \TeX's |\over|.
+% \begin{macrocode}
+\def\frac#1#2{{\begingroup#1\endgroup\over#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sqrt}
+% \changes{v1.0y}{1995/10/16}{(DPC) Make robust /1808}
+% \begin{macro}{\@sqrt}
+% Add an optional argument to plain's |\sqrt| to give the $n$th root
+% of an expression $\sqrt[n]{e}$.
+% \changes{v1.0r}{1995/05/21}{Use \cs{sqrtsign}}
+% \begin{macrocode}
+\DeclareRobustCommand\sqrt{\@ifnextchar[\@sqrt\sqrtsign}
+\def\@sqrt[#1]{\root #1\of}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{LaTeX2.09}{1985/11/04}{produce warning message if line
+% extends into margin. Doesn't warn about formula
+% overprinting equation number.}
+% \changes{LaTeX2.09}{1993/11/02}{RmS:
+% Corrected description of \cs{@eqnsel}, moved \cs{@eqnsel}
+% accordingly and removed extra \cs{tabskip} assignment.}
+% \changes{LaTeX2e}{1993/11/03}{RmS: Initialized \cs{everycr} to empty}
+% \changes{v0.9i}{1993/12/16}
+% {use \cs{refstepcounter} instead of shortcut}
+% \changes{v0.9o}{1994/01/13}{correcting 0.9i}
+%
+% \begin{environment}{eqnarray}
+% \begin{macro}{\@eqcnt}
+% \begin{macro}{\@eqpen}
+% \begin{macro}{\if@eqnsw}
+% \begin{macro}{\@eqnsel}
+% Here's the eqnarray environment:
+% Default is for left-hand side of equations to be flushright.
+% To make them flushleft, |\let\@eqnsel = \hfil|.
+% \begin{macrocode}
+\newcount\@eqcnt
+\newcount\@eqpen
+\newif\if@eqnsw\@eqnswtrue
+\newskip\@centering
+\@centering = 0pt plus 1000pt
+% \end{macrocode}
+% To get a proper \cs{@currentlabel} we have to redefine it for the
+% whole display. Note that we can't use \cs{refstepcounter} as this
+% results in |\@currentlabel| getting restored at the wrong and
+% thus always writing the first label to the \texttt{.aux} file.
+% \begin{macrocode}
+\def\eqnarray{%
+ \stepcounter{equation}%
+ \def\@currentlabel{\p@equation\theequation}%
+ \global\@eqnswtrue
+ \m@th
+ \global\@eqcnt\z@
+ \tabskip\@centering
+ \let\\\@eqncr
+ $$\everycr{}\halign to\displaywidth\bgroup
+ \hskip\@centering$\displaystyle\tabskip\z@skip{##}$\@eqnsel
+ &\global\@eqcnt\@ne\hskip \tw@\arraycolsep \hfil${##}$\hfil
+ &\global\@eqcnt\tw@ \hskip \tw@\arraycolsep
+ $\displaystyle{##}$\hfil\tabskip\@centering
+ &\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup
+ \tabskip\z@skip
+ \cr
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\endeqnarray{%
+ \@@eqncr
+ \egroup
+ \global\advance\c@equation\m@ne
+ $$\@ignoretrue
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\@eqnsel=\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{environment}
+%
+% \begin{macro}{\nonumber}
+% Switches off equation numbering.
+% \begin{macrocode}
+\def\nonumber{\global\@eqnswfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@eqncr}
+% \begin{macro}{\@xeqncr}
+% \begin{macro}{\@yeqncr}
+% \changes{v1.0y}{1995/10/16}{(DPC) Use \cs{@testopt} /1911}
+% \begin{macrocode}
+\def\@eqncr{%
+ {\ifnum0=`}\fi
+ \@ifstar{%
+ \global\@eqpen\@M\@yeqncr
+ }{%
+ \global\@eqpen\interdisplaylinepenalty \@yeqncr
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@yeqncr{\@testopt\@xeqncr\z@skip}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@xeqncr[#1]{%
+ \ifnum0=`{\fi}%
+ \@@eqncr
+ \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}%
+}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@eqncr}
+% \changes{v0.9i}{1993/12/16}{use \cs{refstepcounter} instead of shortcut}
+% \changes{v0.9o}{1994/01/13}{correcting 0.9i}
+%
+% \begin{macrocode}
+\def\@@eqncr{\let\reserved@a\relax
+ \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
+ \or \def\reserved@a{&}\else
+ \let\reserved@a\@empty
+ \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
+ \reserved@a \if@eqnsw\@eqnnum\stepcounter{equation}\fi
+ \global\@eqnswtrue\global\@eqcnt\z@\cr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{eqnarray*}
+% \begin{macro}{\@seqncr}
+% Here's the eqnarray* environment:
+% \begin{macrocode}
+\let\@seqncr=\@eqncr
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{eqnarray*}{\def\@eqncr{\nonumber\@seqncr}\eqnarray}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{endeqnarray*}{\nonumber\endeqnarray}
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
+% \begin{macro}{\lefteqn}
+% |\lefteqn{FORMULA}| typesets |FORMULA| in display math style
+% flushleft in a box of width zero.
+% \changes{v1.0r}{1995/05/21}{Use \cs{rlap}}
+% \begin{macrocode}
+\def\lefteqn#1{\rlap{$\displaystyle #1$}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ensuremath}
+% In math mode, |\ensuremath{text}| is equivalent to text; in LR or
+% paragraph mode, it is equivalent to |$|text|$|.
+% |\relax| is not needed
+% in front of the |\ifmmode| as |\protect| will be |\let| to |\relax|.
+% This version (due to Donald Arseneau) avoids duplicating its
+% argument in the `then' and `else' part of the |\ifmath| which is
+% necessary in nested `tabular' like environments. See amslatex/2104.
+% \changes{v1.0k}{1994/05/16}
+% {Use \cs{DeclareRobustCommand} and add extra braces in math mode}
+% \changes{v1.0l}{1994/10/23}{Remove extra braces: but see p 168 of
+% Leslie's book}
+% \changes{v1.1a}{1996/03/25}{Reimplement for amslatex/2104}
+% \begin{macrocode}
+\DeclareRobustCommand{\ensuremath}{%
+ \ifmmode
+ \expandafter\@firstofone
+ \else
+ \expandafter\@ensuredmath
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ensuredmath}
+% \changes{v1.1a}{1996/03/25}{Macro added for amslatex/2104}
+% \changes{v1.1c}{1996/11/09}{Made long, as it was before. /2104}
+% The |\relax| stops |\ensuremath{}| starting display math.
+% \begin{macrocode}
+\long\def\@ensuredmath#1{$\relax#1$}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \subsection{External options to the standard document classes}
+%
+% \changes{v1.0u}{1995/08/09}
+% {Added code for class options leqno and fleqn}
+%
+% \subsubsection{Left equation numbering}
+%
+% \begin{macro}{\@eqnnum}
+% To put the equation number on the left side of an equation we
+% have to use a little trick. The number is shifted |\displaywidth|
+% to the left inside a box of (approximately) zero width. This
+% fails when the quation is too wide, the equation number than may
+% overprint the equation itself.
+% \changes{v1.2y classes}{1995/01/12}{Added \cs{normalcolor}}
+% \changes{v1.3c classes}{1995/05/25}
+% {replace \cs{reset@font}\cs{rmfamily} with \cs{normalfont}
+% (PR 1578)}
+% \begin{macrocode}
+%<*leqno>
+\renewcommand\@eqnnum{\hb@xt@.01\p@{}%
+ \rlap{\normalfont\normalcolor
+ \hskip -\displaywidth(\theequation)}}
+%</leqno>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Flush left equations}
+%
+% To get the displayed math environments to print the contents
+% flush left (with an indentation) we have to redefine all of
+% \LaTeXe's displayed math environments.
+%
+% \begin{macro}{\mathindent}
+% The amount of indentation of the equations is stored in a register.
+% \begin{macrocode}
+%<*fleqn>
+\newdimen\mathindent
+% \end{macrocode}
+% The setting of |\mathindent| has to be deferred until the class
+% file has been processed, because |\leftmargini| is still 0pt
+% wide at the moment \texttt{fleqn.clo} is read in.
+% \changes{v1.0n classes}
+% {1994/01/19}{Deferred setting of \cs{mathindent}}
+% \changes{v1.2t classes}
+% {1994/06/22}{Set \cs{mathindent} at the end of the
+% class instead of at begin document}
+% \begin{macrocode}
+\AtEndOfClass{\mathindent\leftmargini}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\[}
+% Begin display math;
+% \begin{macrocode}
+\IncludeInRelease{2015/01/01}{\[}{Make \[ robust}%
+\DeclareRobustCommand\[{\relax
+ \ifmmode\@badmath
+ \else
+ \begin{trivlist}%
+ \@beginparpenalty\predisplaypenalty
+ \@endparpenalty\postdisplaypenalty
+ \item[]\leavevmode
+ \hb@xt@\linewidth\bgroup $\m@th\displaystyle %$
+ \hskip\mathindent\bgroup
+ \fi}
+\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+\IncludeInRelease{0000/00/00}{\[}{Make \[ robust}%
+\renewcommand\[{\relax
+ \ifmmode\@badmath
+ \else
+ \begin{trivlist}%
+ \@beginparpenalty\predisplaypenalty
+ \@endparpenalty\postdisplaypenalty
+ \item[]\leavevmode
+ \hb@xt@\linewidth\bgroup $\m@th\displaystyle %$
+ \hskip\mathindent\bgroup
+ \fi}
+\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\]}
+% end display math;
+% \begin{macrocode}
+\IncludeInRelease{2015/01/01}{\]}{Make \] robust}%
+\DeclareRobustCommand\]{\relax
+ \ifmmode
+ \egroup $\hfil% $
+ \egroup
+ \end{trivlist}%
+ \else \@badmath
+ \fi}
+\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+\IncludeInRelease{0000/00/00}{\]}{Make \] robust}%
+\renewcommand\]{\relax
+ \ifmmode
+ \egroup $\hfil% $
+ \egroup
+ \end{trivlist}%
+ \else \@badmath
+ \fi}
+\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{equation}
+% The \textsf{equation} environment
+% \begin{macrocode}
+\renewenvironment{equation}%
+ {\@beginparpenalty\predisplaypenalty
+ \@endparpenalty\postdisplaypenalty
+ \refstepcounter{equation}%
+ \trivlist \item[]\leavevmode
+ \hb@xt@\linewidth\bgroup $\m@th% $
+ \displaystyle
+ \hskip\mathindent}%
+ {$\hfil % $
+ \displaywidth\linewidth\hbox{\@eqnnum}%
+ \egroup
+ \endtrivlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{eqnarray}
+% The \textsf{eqnarray} environment
+% \begin{macrocode}
+\renewenvironment{eqnarray}{%
+ \stepcounter{equation}%
+ \def\@currentlabel{\p@equation\theequation}%
+ \global\@eqnswtrue\m@th
+ \global\@eqcnt\z@
+ \tabskip\mathindent
+ \let\\=\@eqncr
+ \setlength\abovedisplayskip{\topsep}%
+ \ifvmode
+ \addtolength\abovedisplayskip{\partopsep}%
+ \fi
+% \end{macrocode}
+% When the documentclass uses a non-zero |\parskip| setting the
+% |\topsep| might have a negative value to compensate for
+% that. Therefore we add |\parskip| to |\abovedisplayskip|.
+% \changes{v1.2v classes}{1994/11/10}{Added value of \cs{parskip} to
+% \cs{abovedisplayskip} to compensate for negative \cs{topsep}}
+% \begin{macrocode}
+ \addtolength\abovedisplayskip{\parskip}%
+ \setlength\belowdisplayskip{\abovedisplayskip}%
+ \setlength\belowdisplayshortskip{\abovedisplayskip}%
+ \setlength\abovedisplayshortskip{\abovedisplayskip}%
+ $$\everycr{}\halign to\linewidth% $$
+ \bgroup
+ \hskip\@centering
+ $\displaystyle\tabskip\z@skip{##}$\@eqnsel&%
+ \global\@eqcnt\@ne \hskip \tw@\arraycolsep \hfil${##}$\hfil&%
+ \global\@eqcnt\tw@ \hskip \tw@\arraycolsep
+ $\displaystyle{##}$\hfil \tabskip\@centering&%
+ \global\@eqcnt\thr@@
+ \hb@xt@\z@\bgroup\hss##\egroup\tabskip\z@skip\cr}%
+ {\@@eqncr
+ \egroup
+ \global\advance\c@equation\m@ne$$% $$
+ \@ignoretrue
+ }
+%</fleqn>
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltmiscen.dtx b/macros/latex-dev/base/ltmiscen.dtx
new file mode 100644
index 0000000000..122ef3b39b
--- /dev/null
+++ b/macros/latex-dev/base/ltmiscen.dtx
@@ -0,0 +1,1119 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltmiscen.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltmiscen.dtx}
+ [2018/10/11 v1.1o LaTeX Kernel (Misc. Environments)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltmiscen.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0c}{1994/03/28}{Improve Documentation}
+% \changes{v1.0d}{1994/03/29}{Remove counter macros to ltcntlen}
+% \changes{v1.0g}{1994/05/02}{Changed 91 to 1991 and moved some bits}
+% \changes{v1.0i}{1994/05/05}{Removed braces from ifnextchar and
+% ifstar arguments}
+% \changes{v1.0m}{1994/05/20}{Use new warning commands}
+% \changes{v1.0n}{1994/05/21}{Use new error commands}
+% \changes{v1.0s}{1994/10/14}{Move math to other file}
+% \changes{v1.0v}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0x}{1995/04/22}{Removed extra def of \cs{@gobble}}
+% \changes{v1.0z}{1995/07/13}{Improve Documentation}
+% \changes{v1.1c}{1996/04/22}{Improve Documentation}
+% \changes{v1.1d}{1996/06/03}{Move setting of verbatim font and
+% \cs{@noligs}.}
+% \changes{v1.1g}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+% \section{Miscellaneous Environments}
+% This section implements the basic environment mechanism, and also
+% a few specific environments including |document|, The math
+% environments and related commands, the `flushing' environments,
+% (|center|, |flushleft|, |flushright|), and |verbatim|.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{environments,}
+% \end{macrocode}
+%
+% \subsection{Environments}
+%
+% |\begin{foo}| and |\end{foo}| are used to delimit environment |foo|.
+%
+% |\begin{foo}| starts a group and calls |\foo| if it is defined,
+% otherwise it does nothing.
+%
+% |\end{foo}| checks to see that it matches the
+% corresponding |\begin| and if so, it calls |\endfoo| and does an
+% |\endgroup|. Otherwise, |\end{foo}| does nothing.
+%
+% If |\end{foo}| needs to ignore blanks after it, then |\endfoo| should
+% globally set the |@ignore| switch true with |\@ignoretrue|
+% (this will automatically be global).
+%
+%
+% NOTE: |\@@end| is defined to be the |\end| command of \TeX82.
+%
+% |\enddocument| is the user's command for ending the manuscript file.
+%
+% |\stop| is a panic button --- to end \TeX\ in the middle.
+%
+% \begin{oldcomments}
+% \enddocument ==
+% BEGIN
+% \@checkend{document} %% checks for unmatched \begin
+% \clearpage
+% \begingroup
+% if @filesw = true
+% then close file @mainaux
+% if G@refundefined = true
+% then LaTeX Warning: 'There are undefined references.' fi
+% if @multiplelabels = true
+% then LaTeX Warning:
+% 'One or more label(s) multiply defined.'
+% else
+% \@setckpt {ARG1}{ARG2} == null
+% \newlabel{LABEL}{VAL} ==
+% BEGIN
+% \reserved@a == VAL
+% if def(\reserved@a) = def(\r@LABEL)
+% else @tempswa := true fi
+% END
+% \bibcite{LABEL}{VAL} == null
+% BEGIN
+% \reserved@a == VAL
+% if def(\reserved@a) = def(\g@LABEL)
+% else @tempswa := true fi
+% END
+% @tempswa := false
+% make @ a letter
+% \input \jobname.AUX
+% if @tempswa = true
+% then LaTeX Warning: 'Label may have changed.
+% Rerun to get cross-references right.'
+% fi fi fi
+% \endgroup
+% finish up
+% END
+%
+% \@writefile{EXT}{ENTRY} ==
+% if tf@EXT undefined
+% else \write\tf@EXT{ENTRY}
+% fi
+% \end{oldcomments}
+%
+% \begin{macro}{\@currenvir}
+% The name of the current environment. Initialized to
+% \texttt{document} to so that |\end{document}| works correctly.
+% \begin{macrocode}
+\def\@currenvir{document}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@ignore}
+% \begin{macro}{\@ignoretrue}
+% \begin{macro}{\@ignorefalse}
+% \changes{v1.1e}{1996/07/26}{put \cs{global} into definition}
+% \begin{macrocode}
+\def\@ignorefalse{\global\let\if@ignore\iffalse}
+\def\@ignoretrue {\global\let\if@ignore\iftrue}
+\@ignorefalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\ignorespacesafterend}
+% \changes{v1.1e}{1996/07/26}{user level macro added}
+% \begin{macrocode}
+\let\ignorespacesafterend\@ignoretrue
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\enddocument}
+% \changes{LaTeX2.09}{1993/08/03}
+% {Changed redefinition of \cs{global} to redefinition
+% of \cs{@setckpt}.}
+% \changes{LaTeX2.09}{1993/09/08}
+% {Added warning in case of undefined references.}%
+% \changes{v0.9e}{1993/12/09}{Hook added}
+% \begin{macrocode}
+\def\enddocument{%
+% \end{macrocode}
+% The |\end{document}| hook is executed first. If necessary it can
+% contain a |\clearpage| to output dangling floats first. In this
+% position it can also contain something like |\end{foo}| so that
+% the whole document effectively starts and ends with some special
+% environment. However, this must be used with care, eg if two
+% applications would use this without knowledge of each other the
+% order of the environments will be wrong after all.
+% |\AtEndDocument| is redefined
+% at this point so that and such commands that get into the hook do
+% not chase their tail\ldots
+% \changes{v1.0y}{1995/04/27}{\cs{@checkend} moved after hook}
+% \changes{v1.0z}{1995/07/13}{Set \cs{@setckpt} to \cs{@gobbletwo}
+% instead of defining it by hand}
+% \changes{v1.1i}{2000/05/19}
+% {Reset \cs{AtEndDocument} for latex/3060}
+% \begin{macrocode}
+ \let\AtEndDocument\@firstofone
+ \@enddocumenthook
+ \@checkend{document}%
+ \clearpage
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+% \end{macrocode}
+% \changes{v1.0z}{1995/07/13}{Shorten redefinition of \cs{bibcite} and
+% \cs{newlabel}}
+% The previous line is equiv to setting
+%\begin{verbatim}
+% \def\newlabel{\@testdef r}%
+% \def\bibcite{\@testdef b}%
+%\end{verbatim}
+% \changes{v1.1k}{2010/08/17}{Use braces around \cs{input} arg (pr/4124)}
+% \changes{v1.1l}{2010/08/17}{Change of plan: use \cs{@@input} instead
+% (pr/4124)}
+% We use |\@@input| to load the \texttt{.aux} file, so that it doesn't
+% show up in the list of files produced by |\listfiles|.
+% \begin{macrocode}
+ \@tempswafalse
+ \makeatletter \@@input\jobname.aux
+ \fi
+% \end{macrocode}
+% \changes{v1.0w}{1994/11/30}
+% {(DPC) Use \cs{@dofilelist}}
+% \begin{macrocode}
+ \@dofilelist
+% \end{macrocode}
+% First we check for font size substitution bigger than
+% |\fontsubfuzz|. The |\relax| is necessary because this is a macro
+% not a register.
+% \changes{v1.0w}{1994/11/30}
+% {(DPC) Do warnings even for \cs{nofiles}}
+% \begin{macrocode}
+ \ifdim \font@submax >\fontsubfuzz\relax
+% \end{macrocode}
+% In case you wonder about the |\@gobbletwo| inside the message
+% below, this is a horrible hack to remove the tokens |\on@line.|
+% that are added by |\@font@warning| at the end.
+% \changes{v1.1j}{2000/07/11}{Fix typo in warning}
+% \begin{macrocode}
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
+% \end{macrocode}
+% The macro |\@defaultsubs| is initially |\relax| but gets redefined
+% to produce
+% a warning if there have been some default font substitutions.
+% \changes{v1.0z}{1995/07/13}{Use \cs{@defaultsubs} instead of switch}
+% \begin{macrocode}
+ \@defaultsubs
+% \end{macrocode}
+% The macro |\@refundefined| is initially |\relax| but gets redefined
+% to produce a warning if there are undefined refs.
+% \changes{v1.1b}{1995/10/24}{Use \cs{@refundefined} instead of switch}
+% \begin{macrocode}
+ \@refundefined
+% \end{macrocode}
+% If a label is defined more than once, |\@tempswa| will always be
+% true and thus produce a ``Label(s) may \ldots'' warning. But
+% since a rerun will not solve that problem (unless one uses a
+% package like \texttt{varioref} that generates labels on the fly),
+% we suppress this message.
+% \changes{v1.0e}{1994/04/20}{Changed logic for producing
+% warning messages}
+% \changes{v1.1b}{1995/10/24}{Changed logic for producing
+% warning messages and removed switch}
+% \begin{macrocode}
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
+ \fi
+ \else
+ \@multiplelabels
+ \fi
+ \fi
+ \endgroup
+ \deadcycles\z@\@@end}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@testdef}
+% \begin{macrocode}
+\def\@testdef #1#2#3{%
+ \def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname
+ \reserved@a \else \@tempswatrue \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Reading data from auxiliary files (like \texttt{.toc} normally
+% happens in vertical mode and it therefore doesn't matter if line
+% endings are converted to spaces by \TeX{} during that process.
+%
+% However, especially the \texttt{.toc} file might be read in L-R mode
+% (in cases the \cs{tableofcontents} attempts to put, say a list of
+% sub-sections as a paragraph. In that case the newlines after a line
+% like
+% \begin{verbatim}
+% \contentsline {subsubsection}{\numberline {1.1.1}A C-head}{2}
+% \end{verbatim}
+% might result in spurious spaces (e.g., when that level is not
+% included).
+%
+% That could be fixed by reading in the file using
+% \cs{endlinechar}\texttt{=-1} but that has the danger that it drops
+% some valid endlines that should be converted to spaces (for example
+% when the user edited the TOC and then used \cs{nofiles} to preserve
+% it.
+%
+% So the approach taken instead is this:
+% \begin{itemize}
+% \item \cs{addcontentsline} adds the command
+% \cs{protected@file@percent} to the end of the second argument of
+% \cs{@writefile} that is written to the \texttt{.aux}. As the name
+% indicates this is a protected macro so it doesn't change if it is
+% written out.
+%
+% \item When the \texttt{.aux} is read back in at the end of the run,
+% \cs{@writefile} is executed and writes its second argument
+% unmodified to the file with the extension given by its first
+% argument. Or rather that was how it was in the past.
+%
+% \item Instead we change \cs{@writefile} slightly: basically it looks
+% at the second argument and if the last token in there is
+% \cs{protected@file@percent} then it is replaced by a percent
+% character and that is then written out. If not (for example, if
+% the data came from a user issued \cs{addtocontents}, or from some
+% package that uses \cs{@writefile} for writing its own files) then
+% the command behaves exactly as before.
+% \end{itemize}
+%
+%
+% \begin{macro}{\protected@file@percent}
+% Dummy cs to be replaced by a percent sign inside
+% \cs{@writefile}. If it survives (when used incorrectly) it will
+% expand to nothing in a typsetting context.
+% \changes{v1.1n}{2018/09/26}{Sometimes mask the endline char when
+% writing to files (github/73)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\protected@file@percent}{Mask line endings}%
+\protected\def\protected@file@percent{}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\add@percent@to@temptokena}
+% Helper function which is used to inspect a sequence of tokens
+% (the second argument of \cs{@writefile} and it the last token is
+% \cs{protected@file@percent} it will replace it by a harmless
+% percent. The result is saved in \cs{@temptokena} for later use.
+% \changes{v1.1n}{2018/09/26}{Sometimes mask the endline char when
+% writing to files (github/73)}
+% \begin{macrocode}
+\begingroup
+\catcode`\%=12
+% \end{macrocode}
+% \texttt{latexrelease} will read this code in high-speed
+% mode in certain situations. During that it will only look for
+% \cs{if} tests but not actually execute the \cs{catcode} change
+% above. As a result it will drop anything after the |%| character
+% in the definition. Therefore the |\fi| needs to be on the next
+% line and we need locally another comment character to avoid
+% getting spaces into the definition---a weird problem :-)
+% \begin{macrocode}
+\catcode`\^^A=9
+\long\gdef\add@percent@to@temptokena
+ #1\protected@file@percent#2\add@percent@to@temptokena
+% \end{macrocode}
+% When we call this macro in |\@writefile| we stick in |\@empty| at
+% the beginning, so that in case the tokenlist consists of a single brace
+% group the braces aren't stripped. The |\expandafter| then expands
+% this extra token away again.
+% \begin{macrocode}
+ {\ifx!#2!\@temptokena\expandafter{#1}\else
+ \@temptokena\expandafter{#1%^^A
+% \end{macrocode}
+% Can't be on the same line as the |%| --- see above.
+% \begin{macrocode}
+ }\fi}
+\endgroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@writefile}
+% \changes{v1.0l}{1994/05/20}{Added correct setting of \cs{protect}.}
+% \changes{v1.0t}{1994/11/04}{Removed setting of \cs{protect}. ASAJ.}
+% \changes{v1.0z}{1995/07/13}{Added missing percent and use \cs{relax}
+% in the THEN case}
+% \changes{v1.1n}{2018/09/26}{Sometimes mask the endline char when
+% writing to files (github/73)}
+% \begin{macrocode}
+\long\def\@writefile#1#2{%
+ \@ifundefined{tf@#1}\relax
+ {%
+% \end{macrocode}
+% If we write to the file we first prepare |#2| using
+% \cs{add@percent@to@temptokena} and then write the token register
+% out.
+% \begin{macrocode}
+ \add@percent@to@temptokena
+ \@empty#2\protected@file@percent
+ \add@percent@to@temptokena
+ \immediate\write\csname tf@#1\endcsname{\the\@temptokena}%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\protected@file@percent}{Mask line endings}%
+%<latexrelease>\let\protected@file@percent\@undefined
+%<latexrelease>\let\add@percent@to@temptokena\@undefined
+%<latexrelease>\long\def\@writefile#1#2{%
+%<latexrelease> \@ifundefined{tf@#1}\relax
+%<latexrelease> {\@temptokena{#2}%
+%<latexrelease> \immediate\write\csname tf@#1\endcsname{\the\@temptokena}%
+%<latexrelease> }%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\stop}
+% \begin{macrocode}
+\def\stop{\clearpage\deadcycles\z@\let\par\@@par\@@end}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{oldcomments}
+%
+% \begin{macrocode}
+\everypar{\@nodocument} %% To get an error if text appears before the
+\nullfont %% \begin{document}
+% \end{macrocode}
+%
+% \begin, \end, and \@checkend changed so \end{document} will catch
+% an unmatched \begin. Changed 24 May 89 as suggested by
+% Frank Mittelbach and Rainer Sch\"opf.
+%
+% \begin{NAME} ==
+% BEGIN
+% IF \NAME undefined THEN \reserved@a == BEGIN report error END
+% ELSE \reserved@a ==
+% (\@currenvir :=L NAME) \NAME
+% FI
+% @ignore :=G F %% Added 30 Nov 88
+% \begingroup
+% \@endpe := F
+% \@currenvir :=L NAME
+% \NAME
+% END
+%
+% \end{NAME} ==
+% BEGIN
+% \endNAME
+% \@checkend{NAME}
+% \endgroup
+% IF @endpe = T %% @endpe set True by \@endparenv
+% THEN \@doendpe %% \@doendpe redefines \par and \everypar
+% %% to suppress paragraph indentation in
+% FI %% immediately following text
+% IF @ignore = T
+% THEN @ignore :=G F
+% \ignorespaces
+% FI
+% END
+%
+% \@checkend{NAME} ==
+% BEGIN
+% IF \@currenvir = NAME
+% ELSE \@badend{NAME}
+% FI
+% END
+%
+% \end{oldcomments}
+%
+%
+% \begin{macro}{\begin}
+% \changes{LaTeX2.09}{1992/03/18}{Changed \cs{@ignoretrue} to
+% \cs{@ignorefalse} (as documented)}
+% \changes{LaTeX2.09}{1992/08/24}{Added code to \cs{begin} to
+% remember line number. Used by \cs{@badend} to display
+% position of non-matching \cs{begin}.}
+% \changes{v1.1e}{1996/07/26}{remove \cs{global} before \cs{@ignore...}}
+% \begin{macrocode}
+\def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse\reserved@a}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\end}
+% \changes{v1.1e}{1996/07/26}{remove \cs{global} before \cs{@ignore...}}
+% \begin{macrocode}
+\def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \if@ignore\@ignorefalse\ignorespaces\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@checkend}
+% \begin{macrocode}
+\def\@checkend#1{\def\reserved@a{#1}\ifx
+ \reserved@a\@currenvir \else\@badend{#1}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@currenvline}
+% We do need a default value for |\@currenvline| on top-level since
+% the document environment cancels the brace group. This means that
+% a mismatch with |\begin|\allowbreak|{document}| will not produce
+% a line number. Thus the outer default must be |\@empty| or we
+% will end up with two spaces.
+% \changes{v1.0q}{1994/05/24}{Use \cs{@empty} as outer default}
+% \begin{macrocode}
+\let\@currenvline\@empty
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Center, Flushright, Flushleft}
+%
+% \begin{macrocode}
+\message{center,}
+% \end{macrocode}
+%
+% \begin{oldcomments}
+%
+% \center, \flushright and \flushleft set
+% \rightskip = 0pt or \@flushglue (as appropriate)
+% \leftskip = 0pt or \@flushglue (as appropriate)
+% \parindent = 0pt
+% \parfillskip = 0pt. (except \flushleft)
+% \\ == \par \vskip -\parskip
+% \\[LENGTH] == \\ \vskip LENGTH
+% \\* == \par \penalty 10000 \vskip -\parskip
+% \\*[LEN] == \\* \vskip LENGTH
+%
+% They invoke the trivlist environment to handle vertical spacing before
+% and after them.
+%
+% \centering, \raggedright and \raggedleft are the declaration analogs
+% of the above.
+%
+% \raggedright has a more universal effect, however. It sets
+% \@rightskip := flushglue. Every environment, like the list
+% environments,
+% that set \rightskip to its 'normal' value set it to \@rightskip
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\@centercr}
+% \changes{v1.0h}{1994/05/03}{\cs{@badcrerr} replaced by \cs{@nolnerr}}
+% \changes{v1.0z}{1995/07/13}{Use \cs{nobreak}}
+% \begin{macrocode}
+\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi
+ \par\@ifstar{\nobreak\@xcentercr}\@xcentercr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xcentercr}
+% \begin{macrocode}
+\def\@xcentercr{\addvspace{-\parskip}\@ifnextchar
+ [\@icentercr\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@icentercr}
+% \begin{macrocode}
+\def\@icentercr[#1]{\vskip #1\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{environment}{center}
+% \changes{v0.9h}{1993/12/13}{Removed optional argument of \cs{item}}
+% \changes{v1.0u}{1994/11/12}{Changed end macro to \cs{def}: safer and
+% consistent}
+% We use |\relax| to prevent |\item| scanning too far.
+% \begin{macrocode}
+\def\center{\trivlist \centering\item\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\endcenter{\endtrivlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\centering}
+% \begin{macrocode}
+\def\centering{%
+ \let\\\@centercr
+ \rightskip\@flushglue\leftskip\@flushglue
+ \parindent\z@\parfillskip\z@skip}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@rightskip}
+% \begin{macrocode}
+\newskip\@rightskip \@rightskip \z@skip
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{flushleft}
+% \changes{v0.9h}{1993/12/13}{Removed optional argument of \cs{item}}
+% \changes{v1.0u}{1994/11/12}{Changed end macro to \cs{def}: safer and
+% consistent}
+% We use |\relax| to prevent |\item| scanning too far.
+% \begin{macrocode}
+\def\flushleft{\trivlist \raggedright\item\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\endflushleft{\endtrivlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\raggedright}
+% \begin{macrocode}
+\def\raggedright{%
+ \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip
+ \leftskip\z@skip
+ \parindent\z@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{flushright}
+% \changes{v0.9h}{1993/12/13}{Removed optional argument of \cs{item}}
+% \changes{v1.0u}{1994/11/12}{Changed end macro to \cs{def}: safer and
+% consistent}
+% We use |\relax| to prevent |\item| scanning too far.
+% \begin{macrocode}
+\def\flushright{\trivlist \raggedleft\item\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\endflushright{\endtrivlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\raggedleft}
+% \begin{macrocode}
+\def\raggedleft{%
+ \let\\\@centercr
+ \rightskip\z@skip\leftskip\@flushglue
+ \parindent\z@\parfillskip\z@skip}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Verbatim}
+%
+% \begin{macrocode}
+\message{verbatim,}
+% \end{macrocode}
+%
+% The verbatim environment uses the fixed-width |\ttfamily| font, turns
+% blanks into spaces, starts a new line for each carriage return (or
+% sequence of consecutive carriage returns), and interprets
+% \emph{every} character literally.
+% I.e., all special characters |\, {, $|, etc.
+% are |\catcode|'d to 'other'.
+%
+% The command |\verb| produces in-line verbatim text, where the argument
+% is delimited by any pair of characters. E.g., |\verb #...#| takes
+% `|...|' as its argument, and sets it verbatim in |\ttfamily| font.
+%
+% The *-variants of these commands are the same, except that spaces
+% print as the \TeX{}book's space character instead of as blank spaces.
+%
+% \begin{macro}{\@vobeyspaces}
+% \begin{macrocode}
+{\catcode`\ =\active%
+\gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xobeysp}
+% \changes{v1.0z}{1995/07/13}{Use \cs{nobreak}}
+% \changes{v1.1f}{1996/09/28}{Moved to ltspace.dtx}
+% \end{macro}
+%
+%
+% \begin{macro}{\@xverbatim}
+% \begin{macro}{\@sxverbatim}
+% \begin{macrocode}
+\begingroup \catcode `|=0 \catcode `[= 1
+\catcode`]=2 \catcode `\{=12 \catcode `\}=12
+\catcode`\\=12 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
+|gdef|@sxverbatim#1\end{verbatim*}[#1|end[verbatim*]]
+|endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@verbatim}
+% \changes{LaTeX2.09}{1991/07/24}{Added \cs{penalty}\cs{interlinepenalty}
+% to definition of \cs{par} so that \cs{samepage} works}
+% \changes{v0.9h}{1993/12/13}{Removed optional argument of \cs{item}}
+% Real start of verbatim environment
+% We use |\relax| to prevent |\item| scanning too far.
+% \changes{v0.9p}{1994/01/18}
+% {Add \cs{global}\cs{@inlabelfalse}}
+% \changes{v1.0b}{1994/03/16}
+% {Remove \cs{global}\cs{@inlabelfalse} again.}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2017-04-15}{\@verbatim}%
+%<latexrelease> {Disable hyphenation in verbatim}%
+\def\@verbatim{\trivlist \item\relax
+ \if@minipage\else\vskip\parskip\fi
+ \leftskip\@totalleftmargin\rightskip\z@skip
+ \parindent\z@\parfillskip\@flushglue\parskip\z@skip
+% \end{macrocode}
+% \changes{LaTeX2.09}{1991/08/26}{\cs{@@par} added}
+% Added |\@@par| to clear possible |\parshape| definition
+% from a surrounding list (the verbatim guru says).
+% \changes{v0.9p}{1994/01/18}
+% {Only add \cs{penalty} if in hmode}
+% Switch language when in vertical mode.
+% \begin{macrocode}
+ \@@par
+% \end{macrocode}
+% Set |\language| here to suppress hyphenation. Done this way rather
+% than setting |\hyphenchar| as that is a global setting.
+% \begin{macrocode}
+ \language\l@nohyphenation
+ \@tempswafalse
+ \def\par{%
+ \if@tempswa
+% \end{macrocode}
+% A |\leavevmode| added: needed if, for example, a blank verbatim
+% line is the first thing in a list item (wow!).
+% \changes{v1.0f}{1994/04/29}{\cs{leavevmode} added}
+% \begin{macrocode}
+ \leavevmode \null \@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}%
+% \end{macrocode}
+% To allow customization we hide the font used in a separate macro.
+% \changes{v0.9a}{1993/11/21}{use \cs{verbatim@font} instead of \cs{tt}}
+% \changes{v0.9h}{1993/12/13}{Readded \cs{@noligs}}
+% \changes{v1.1d}{1996/06/03}{Exchanged the following two code lines
+% so that \cs{dospecials} cannot reset the category code
+% of characters handled by \cs{@noligs}.}
+% \changes{v1.1h}{2000/01/07}{Disable hyphenation even if the font allows it.}
+% \changes{v1.1m}{2017-03-09}{Use \cs{language} not \cs{hyphenchar}}
+% \begin{macrocode}
+ \let\do\@makeother \dospecials
+ \obeylines \verbatim@font \@noligs
+% \end{macrocode}
+% To avoid a breakpoint after the labels box, we remove the penalty
+% put there by the list macros: another use of |\unpenalty|!
+% \changes{v1.0f}{1994/04/29}{Change to \cs{everypar} added}
+% \begin{macrocode}
+ \everypar \expandafter{\the\everypar \unpenalty}%
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\@verbatim}%
+%<latexrelease> {Disable hyphenation in verbatim}%
+%<latexrelease>\def\@verbatim{\trivlist \item\relax
+%<latexrelease> \if@minipage\else\vskip\parskip\fi
+%<latexrelease> \leftskip\@totalleftmargin\rightskip\z@skip
+%<latexrelease> \parindent\z@\parfillskip\@flushglue\parskip\z@skip
+%<latexrelease> \@@par
+%<latexrelease> \@tempswafalse
+%<latexrelease> \def\par{%
+%<latexrelease> \if@tempswa
+%<latexrelease> \leavevmode \null \@@par\penalty\interlinepenalty
+%<latexrelease> \else
+%<latexrelease> \@tempswatrue
+%<latexrelease> \ifhmode\@@par\penalty\interlinepenalty\fi
+%<latexrelease> \fi}%
+%<latexrelease> \let\do\@makeother \dospecials
+%<latexrelease> \obeylines \verbatim@font \@noligs
+%<latexrelease> \hyphenchar\font\m@ne
+%<latexrelease> \everypar \expandafter{\the\everypar \unpenalty}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verbatim}
+% \begin{macro}{\endverbatim}
+% (RmS 93/09/19) Protected against `missing item' error message
+% triggered by empty verbatim environment.
+% \begin{macrocode}
+\def\verbatim{\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}
+\def\endverbatim{\if@newlist \leavevmode\fi\endtrivlist}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\verbatim@font}
+% \changes{v0.9a}{1993/11/21}{Macro added}
+% Macro to select the font used for verbatim typesetting.
+% It also does other work if necessary for the font used.
+% \changes{v0.9s}{1994/01/21}{Removed unnecessary category code
+% hackery.}
+% \begin{macrocode}
+\def\verbatim@font{\normalfont\ttfamily}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\verbvisiblespace}{Setup visible space for verb}%
+% \end{macrocode}
+%
+%
+% \begin{macro}{\asciispace}
+% The character in slot 32, in typewriter fonts (historically) a
+% visible space but in other fonts a real space or something else
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \begin{macrocode}
+\DeclareRobustCommand\asciispace{\char 32 }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verbvisiblespace}
+% This defines how to get a visible space in
+% |\verb*| and friends. In classic \TeX{} this is just the
+% slot 32, but in TU encoded fonts we switch fonts and take the
+% character from cmtt.
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \changes{v1.1o}{2018/10/11}
+% {Provide \cs{verbvisiblespace} such that it is usable in normal text (github/70)}
+% \begin{macrocode}
+\ifx\Umathcode\@undefined
+ \let\verbvisiblespace\asciispace % Pdftex version
+\else
+ \DeclareRobustCommand\verbvisiblespace
+ {\leavevmode{\usefont{OT1}{cmtt}{m}{n}\asciispace}} % xetex/luatex version
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+% \begin{macro}{\@setupverbvisiblespace}
+%
+% In pdf\TeX{} a catcode 12 space will produce the character in
+% slot 32 which is assumed to be a visible space character (in a
+% typewriter font in OT1 or T1 encoding). In Xe\TeX{} or Lua\TeX{} a
+% font in TU encoding is normally used and that has a real space in
+% this slot. So what we do in this case is this: we check the
+% definition of
+% |\verbvisiblespace| and if it is |\asciispace| we assume that the
+% char32 can be used (e.g., in pdf\TeX{}). We then redefine
+% |\@xobeysp| so that after running |\@vobeyspaces| we get
+% characters from slot 32 for each active space.
+%
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \begin{macrocode}
+\def\@setupverbvisiblespace{%
+ \ifx\verbvisiblespace\asciispace
+ \let\@xobeysp\asciispace
+ \else
+% \end{macrocode} Otherwise we measure the width of a character in
+% the mon-spaced current font and place a
+% |\verbvisiblespace| into a box of the right width which we are then
+% using as the character for a space. By default this will be the space
+% character from OT1 cmtt but by changing
+% |\verbvisiblespace| one could use, for example, the |\textvisiblespace|
+% of the current typewriter font.
+% \begin{macrocode}
+ \setbox\z@\hbox{x}%
+ \setbox\@verbvisiblespacebox\hbox to\wd\z@{\hss\verbvisiblespace\hss}%
+ \def\@xobeysp{\leavevmode\copy\@verbvisiblespacebox}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+% \begin{macro}{\@verbvisiblespacebox}
+% The box to hold the visible space character if it isn't in slot
+% 32 in the current typewriter font.
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \begin{macrocode}
+\newbox\@verbvisiblespacebox
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \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{%
+ \catcode`#1\active
+ \lccode`\~`#1%
+ \gdef\verb@balance@group{\verb@egroup
+ \@latex@error{\noexpand\verb illegal in command argument}\@ehc}%
+ \aftergroup\verb@balance@group
+ \lowercase{\let~\verb@egroup}%
+% \end{macrocode}
+% If |\@sverb| is called from |\@verb| then space is already active
+% and supposed to produce a real space. In this case we do
+% nothing. Otherwise we run |\@setupverbvisiblespace| to setup the
+% right visible space char and afterwards |\@vobeyspaces| to make
+% it the definition for the active space character.
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \begin{macrocode}
+ \ifnum\catcode`\ =\active
+ \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>
+%<latexrelease>\let\asciispace \@undefined
+%<latexrelease>\let\verbvisiblespace \@undefined
+%<latexrelease>\let\@setupverbvisiblespace\@undefined
+%<latexrelease>\let\@verbvisiblespacebox \@undefined
+%<latexrelease>
+%<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>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+%
+% \begin{macro}{\@makeother}
+% \begin{macrocode}
+\def\@makeother#1{\catcode`#112\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb@balance@group}
+% \changes{LaTeX2.09}{1993/09/07}
+% {(RmS) Changed definition of \cs{verb} so that it detects a
+% missing second delimiter.}
+% \begin{macrocode}
+\let\verb@balance@group\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb@egroup}
+% \begin{macrocode}
+\def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb@eol@error}
+% \begin{macrocode}
+\begingroup
+ \obeylines%
+ \gdef\verb@eol@error{\obeylines%
+ \def^^M{\verb@egroup\@latex@error{%
+ \noexpand\verb ended by end of line}\@ehc}}%
+\endgroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb}
+% \changes{LaTeX2.09}{1992/08/24}
+% {Changed \cs{verb} and \cs{@sverb} to work correctly
+% in math mode}
+% \changes{v0.9a}{1993/11/21}{Use \cs{verbatim@font} instead of
+% \cs{tt}.}
+% \changes{v1.1a}{1995/09/19}{Put \cs{@noligs} after
+% \cs{verbatim@font} where it belongs.}
+% Typesetting a small piece verbatim.
+% \changes{v1.1d}{1996/06/03}{Put setting of verbatim font after
+% \cs{dospecials}
+% so that \cs{dospecials} cannot reset the category code
+% of characters handled by \cs{@noligs}.}
+% \changes{v1.1m}{2017/03/09}
+% {Use \cs{language} to stop hyphenation}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2017-04-15}{\verb}%
+%<latexrelease> {Disable hyphenation in verb}%
+\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb@eol@error \let\do\@makeother \dospecials
+ \verbatim@font\@noligs
+% \end{macrocode}
+% Set |\language| here to suppress hyphenation. Done this way rather
+% than setting |\hyphenchar| as that is a global setting.
+% \begin{macrocode}
+ \language\l@nohyphenation
+ \@ifstar\@sverb\@verb}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\verb}%
+%<latexrelease> {Disable hyphenation in verb}%
+%<latexrelease>\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+%<latexrelease> \bgroup
+%<latexrelease> \verb@eol@error \let\do\@makeother \dospecials
+%<latexrelease> \verbatim@font\@noligs
+%<latexrelease> \@ifstar\@sverb\@verb}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@verb}
+% \begin{macrocode}
+\def\@verb{\@vobeyspaces \frenchspacing \@sverb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verbatim@nolig@list}
+% \changes{LaTeX2.09}{1993/09/03}
+% {Replaced \cs{@noligs} by extensible list}
+% \begin{macrocode}
+\def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\do@noligs}
+% \begin{macrocode}
+\def\do@noligs#1{%
+ \catcode`#1\active
+ \begingroup
+ \lccode`\~`#1\relax
+ \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@noligs}
+% To stay compatible with packages that use |\@noligs| we keep it.
+% \changes{v0.9h}{1993/12/13}{Readded \cs{@noligs}}
+% \begin{macrocode}
+\def\@noligs{\let\do\do@noligs \verbatim@nolig@list}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.9i}{1993/12/16}{\cs{literal} added}
+% \changes{v1.0r}{1994/05/26/16}{\cs{literal} removed}
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltnews.cls b/macros/latex-dev/base/ltnews.cls
new file mode 100644
index 0000000000..9aa72c53da
--- /dev/null
+++ b/macros/latex-dev/base/ltnews.cls
@@ -0,0 +1,684 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews.cls
+% Author: Alan Jeffrey et al
+
+% This is the LaTeX2e document class for the `LaTeX News' information
+% sheet which comes with every LaTeX release. It may be useful for
+% newsletters, or as an example of how simple newsletters can be set
+% with LaTeX. The changes log is at the end of the file.
+
+% Copyright 1994-2004
+% Alan Jeffrey and the LaTeX3 project.
+
+% This is a LaTeX2e document class.
+
+\NeedsTeXFormat{LaTeX2e}
+
+\ProvidesClass{ltnews}[2017/12/13 v1.06 Standard LaTeX class]
+
+% The configuration file, used for passing options.
+
+\InputIfFileExists{ltnews.cfg}{%
+ \ClassInfo{ltnews}{Using local configuration file}%
+}{%
+ \ClassInfo{ltnews}{No local configuration file}%
+}
+
+% The lw35fonts option uses the fonts:
+%
+% Adobe Palatino (main text)
+% Adobe Helvetica Bold (headings)
+% Courier (program listings)
+% Mathptm math italic (2e logo)
+% Mathptm symbol font (AMS logo)
+%
+% The type1fonts option uses the fonts:
+%
+% Adobe Utopia (main text)
+% URW Grotesk-T Bold (headings)
+% Lucida Sans typewriter (program listings)
+% Mathptm math italic (2e logo)
+% Mathptm symbol font (AMS logo)
+
+% The Adobe Palatino fonts:
+
+\DeclareFontFamily{OT1}{ppl}{}
+\DeclareFontShape{OT1}{ppl}{m}{n}{<-> pplr7t}{}
+\DeclareFontShape{OT1}{ppl}{bx}{n}{<-> pplb7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{sc}{<-> pplrc7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{it}{<-> pplri7t}{}
+\DeclareFontShape{OT1}{ppl}{m}{sl}{<-> pplro7t}{}
+
+\DeclareFontFamily{T1}{ppl}{}
+\DeclareFontShape{T1}{ppl}{m}{n}{<-> pplr8t}{}
+\DeclareFontShape{T1}{ppl}{bx}{n}{<-> pplb8t}{}
+\DeclareFontShape{T1}{ppl}{m}{sc}{<-> pplrc8t}{}
+\DeclareFontShape{T1}{ppl}{m}{it}{<-> pplri8t}{}
+\DeclareFontShape{T1}{ppl}{m}{sl}{<-> pplro8t}{}
+
+% The Adobe Helvetica fonts:
+
+\DeclareFontFamily{OT1}{phv}{}
+\DeclareFontShape{OT1}{phv}{m}{n}{<-> s*[0.86] phvr7t}{}
+\DeclareFontShape{OT1}{phv}{b}{n}{<-> phvb7t}{}
+
+\DeclareFontFamily{T1}{phv}{}
+\DeclareFontShape{T1}{phv}{m}{n}{<-> s*[0.86] phvr8t}{}
+\DeclareFontShape{T1}{phv}{b}{n}{<-> phvb8t}{}
+
+% The Adobe Courier fonts:
+
+\DeclareFontFamily{OT1}{pcr}{\hyphenchar\font=-1}
+\DeclareFontShape{OT1}{pcr}{m}{n}{<-> s*[0.89] pcrr7t}{}
+
+\DeclareFontFamily{T1}{pcr}{\hyphenchar\font=-1}
+\DeclareFontShape{T1}{pcr}{m}{n}{<-> s*[0.89] pcrr8t}{}
+
+% The Utopia fonts:
+
+\DeclareFontFamily{OT1}{put}{}
+\DeclareFontShape{OT1}{put}{m}{n}{<-> putr7t}{}
+\DeclareFontShape{OT1}{put}{m}{sc}{<-> putrc7t}{}
+\DeclareFontShape{OT1}{put}{m}{it}{<-> putri7t}{}
+
+% The URW Grotesk fonts:
+
+\DeclareFontFamily{OT1}{ugq}{}
+\DeclareFontShape{OT1}{ugq}{b}{n}{<-> ugqb7t}{}
+
+% The Lucida Sans Typewriter fonts:
+
+\DeclareFontFamily{OT1}{hlct}{\hyphenchar\font=-1}
+\DeclareFontShape{OT1}{hlct}{m}{n}{<-> hlct7t}{}
+
+% The mathptm math italic:
+
+\DeclareFontFamily{OML}{ptmcm}{\skewchar\font=127}
+\DeclareFontShape{OML}{ptmcm}{m}{it}{<-> zptmcmrm}{}
+
+% The mathptm symbol font:
+
+\DeclareFontFamily{OMS}{pzccm}{}
+\DeclareFontShape{OMS}{pzccm}{m}{n}{<-> zpzccmry}{}
+
+% The TeX logo for use with Palatino.
+
+\def\pplTeX{T\kern-.15em\lower.4ex\hbox{E}\kern-.1emX\@}
+
+% The LaTeX logo for use with Palatino.
+
+\DeclareRobustCommand{\pplLaTeX}{L\kern-.3em
+ {\setbox0\hbox{T}%
+ \vbox to\ht0{\hbox{%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.07em
+ \TeX}
+
+% The TeX logo for use with Utopia.
+
+\def\putTeX{T\kern-.1667em\lower.4ex\hbox{E}\kern-.075emX\@}
+
+% The LaTeX logo for use with Utopia.
+
+\DeclareRobustCommand{\putLaTeX}{L\kern-.2em
+ {\setbox0\hbox{T}%
+ \vbox to\ht0{\hbox{%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.05em
+ \TeX}
+
+% The TeX logo for use with Helvetica.
+
+\def\phvTeX{T\kern-.1em\lower.4ex\hbox{E}\kern-.05emX\@}
+
+% The LaTeX logo for use with Helvetica.
+
+\DeclareRobustCommand{\phvLaTeX}{L\kern-.3em
+ {\calculate@math@sizes
+ \setbox0\hbox{T}%
+ \vbox to\ht0{\hbox{%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.05em
+ \TeX}
+
+% The TeX logo for use with Grotesk.
+
+\def\ugqTeX{T\kern-.1em\lower.4ex\hbox{E}\kern-.05emX\@}
+
+% The LaTeX logo for use with Grotesk.
+
+\DeclareRobustCommand{\ugqLaTeX}{L\kern-.15em
+ {\calculate@math@sizes
+ \setbox0\hbox{T}%
+ \vbox to\ht0{\hbox{%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.01em
+ \TeX}
+
+% The TeX logo for use with CMSS.
+
+\def\cmssTeX{T\kern-.2em\lower.4ex\hbox{E}\kern-.05emX\@}
+
+% The LaTeX logo for use with CMSS.
+
+\DeclareRobustCommand{\cmssLaTeX}{L\kern-.22em
+ {\setbox0\hbox{T}%
+ \vbox to\ht0{\hbox{%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-.17em
+ \TeX}
+
+% The eTeX logo.
+
+\DeclareRobustCommand\eTeX{\ensuremath{\varepsilon}-\kern-.125em\TeX}
+
+% Switch off some of the article options.
+
+\DeclareOption{a4paper}{\OptionNotUsed}
+\DeclareOption{a5paper}{\OptionNotUsed}
+\DeclareOption{b5paper}{\OptionNotUsed}
+\DeclareOption{letterpaper}{\OptionNotUsed}
+\DeclareOption{legalpaper}{\OptionNotUsed}
+\DeclareOption{executivepaper}{\OptionNotUsed}
+\DeclareOption{landscape}{\OptionNotUsed}
+\DeclareOption{twoside}{\OptionNotUsed}
+\DeclareOption{titlepage}{\OptionNotUsed}
+\DeclareOption{onecolumn}{\OptionNotUsed}
+
+% The CM fonts
+
+\newcommand{\@titlefont}{\normalfont\Huge}
+\newcommand{\@indiciafont}{\normalfont\footnotesize}
+\newcommand{\@headingfont}{%
+ \large\sffamily\slshape
+ \let\LaTeX\cmssLaTeX\let\TeX\cmssTeX
+}
+\newcommand{\@subheadingfont}{%
+ \normalsize\sffamily\slshape
+ \let\LaTeX\cmssLaTeX\let\TeX\cmssTeX
+}
+
+% The LW 35 fonts option
+
+%% The size of the haeding font was reduced (from 14pt) here to
+%% try and ensure that the pagination does not change whilst the
+%% line count remains the same.
+\DeclareOption{lw35fonts}{%
+ \renewcommand{\rmdefault}{ppl}%
+ \renewcommand{\ttdefault}{pcr}%
+ \renewcommand{\sfdefault}{phv}%
+ \renewcommand{\@titlefont}{%
+ \fontsize{50}{60}\fontfamily{phv}\fontseries{b}\selectfont
+ \let\LaTeX\phvLaTeX\let\TeX\phvTeX
+ }%
+ \renewcommand{\@indiciafont}{%
+ \fontsize{8}{10}\fontfamily{ppl}\fontshape{it}\selectfont
+ }%
+ \renewcommand{\@headingfont}{%
+ \fontsize{12}{13.5}\fontfamily{phv}\fontseries{b}\selectfont
+ \let\LaTeX\phvLaTeX\let\TeX\phvTeX
+ }%
+ \renewcommand{\@subheadingfont}{%
+ \fontsize{10}{12}\fontfamily{phv}\fontseries{b}\selectfont
+ \let\LaTeX\phvLaTeX\let\TeX\phvTeX
+ }%
+ \DeclareSymbolFont{letters}{OML}{ptmcm}{m}{it}%
+ \DeclareSymbolFont{symbols}{OMS}{pzccm}{m}{n}%
+ \let\LaTeX\pplLaTeX
+ \let\TeX\pplTeX
+ \AtEndOfClass{\addtolength\textheight\baselineskip}%
+ }
+
+% The type 1 fonts option
+
+\DeclareOption{type1fonts}{%
+ \renewcommand{\rmdefault}{put}%
+ \renewcommand{\ttdefault}{hlct}%
+ \renewcommand{\sfdefault}{ugq}%
+ \renewcommand{\@titlefont}{%
+ \fontsize{50}{60}\fontfamily{ugq}\fontseries{b}\selectfont
+ \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
+ }%
+ \renewcommand{\@indiciafont}{%
+ \fontsize{8}{10}\fontfamily{put}\fontshape{it}\selectfont
+ }%
+ \renewcommand{\@headingfont}{%
+ \fontsize{12}{14}\fontfamily{ugq}\fontseries{b}\selectfont
+ \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
+ }%
+ \renewcommand{\@subheadingfont}{%
+ \fontsize{10}{12}\fontfamily{ugq}\fontseries{b}\selectfont
+ \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
+ }%
+ \renewcommand{\verbatim@font}{%
+ \fontsize{9}{12}\fontfamily{hlct}\selectfont
+ }%
+ \DeclareSymbolFont{letters}{OML}{ptmcm}{m}{it}%
+ \DeclareSymbolFont{symbols}{OMS}{pzccm}{m}{n}%
+ \let\LaTeX\putLaTeX
+ \let\TeX\putTeX
+}
+
+% The default action for any option is to pass it to the article
+% class.
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+
+% Execute the options.
+
+\ProcessOptions
+
+% Load the article class.
+
+\LoadClass[twocolumn,oneside]{article}
+
+%
+% The package url.sty takes care of breaking url's that are too long
+% to fit in a two-column design
+% but it might not be available on all installations.
+% Therefore we need to check if the file url.sty can be found.
+%
+% Also, it uses a verbatim input mode so Chris does not use it for
+% urls as he wants to control layout and use macros within it. Also
+% he usuually wants to hand-craft the line-breaks in such text.
+%
+\IfFileExists{url.sty}{%
+ \RequirePackage{url}
+ \newcommand\email{\begingroup \Url}}{%
+ \newcommand*{\url}[1]{\texttt{##1}}
+ \newcommand*{\email}[1]{\texttt{##1}}
+ }
+%
+% The package html.sty defines a number of things needed for the LaTeX
+% to HTML conversion; noticeable the latexonly and htmlonly
+% environments.
+% Again, let's check if it exists and if not provide necessary stubs
+%
+\IfFileExists{html.sty}{%
+ \RequirePackage{html}}{%
+ % When it couldn't be found, provide some necessary stuff...
+ \newenvironment{latexonly}{}{}
+ \newcommand{\latex}[1]{##1}
+%
+% Code for excludecomment from html.sty
+% by Robin Fairbairns, 22 September 1997
+%
+ \newcommand\@gobbleenv{\let\reserved@a\@currenvir\@gobble@nv}
+ \long\def\@gobble@nv##1\end##2{%
+ \def\reserved@b{##2}%
+ \ifx\reserved@a\reserved@b
+ \edef\reserved@a{\noexpand\end{\reserved@a}}%
+ \expandafter\reserved@a
+ \else
+ \expandafter\@gobble@nv
+ \fi
+ }
+ \newcommand{\excludecomment}[1]{%
+ \csname newenvironment\endcsname{##1}{\@gobbleenv}{}}
+ \excludecomment{htmlonly}
+ }
+
+%
+% If pdf is being produced add some info to the pdf file and use hyperref.
+% But move this after other packages are, possibly, loaded.
+% LuaTeX support.
+\ifx\pdfoutput\@undefined
+ \let\pdfoutput\outputmode
+ \protected\def\pdfinfo{\pdfextension info }
+\fi
+\ifx\pdfoutput\@undefined\else
+ \ifx\pdfoutput\relax\else
+ \ifcase\pdfoutput\else
+ \pdfinfo{%
+ /Title (LaTeX News)
+ /Author (The LaTeX Project)
+ }
+\IfFileExists{hyperref.sty}{%
+ \RequirePackage[hidelinks]{hyperref}}{}
+ \fi
+ \fi
+\fi
+% This should be further enhanced so that links other than those
+% naively generated by \url can be produced in the pdf file.
+
+%% Please DO NOT load any packages after this point.
+%%
+
+
+% The page style.
+
+\pagestyle{empty}
+\setlength{\parindent}{1em}
+% Why \textwidth?
+\setlength{\rightskip}{0pt plus \textwidth}
+\setlength{\@rightskip}{\rightskip}
+\setlength{\parfillskip}{0pt plus 2\textwidth}
+\setlength{\columnsep}{2em}
+
+% The text size, which tries to work with both A4 and letter paper
+% sizes.
+
+\setlength{\textheight}{230mm}
+\setlength{\topmargin}{-10mm}
+
+\setlength{\textwidth}{180mm}
+\setlength{\oddsidemargin}{-10mm}
+
+% \maketitle parameters.
+
+\newcommand{\publicationmonth}{\renewcommand{\@month}}
+\newcommand{\@month}{\ClassError{ltnews}
+ {No \protect\publicationmonth~given}\@eha}
+
+\newcommand{\publicationyear}{\renewcommand{\@year}}
+\newcommand{\@year}{\ClassError{ltnews}
+ {No \protect\publicationyear~given}\@eha}
+
+\newcommand{\publicationissue}{\renewcommand{\@issue}}
+\newcommand{\@issue}{\ClassError{ltnews}
+ {No \protect\publicationissue~given}\@eha}
+\newcommand{\issuename}{Issue}
+
+\newcommand{\indicia}{\renewcommand{\@indicia}}
+\newcommand{\@indicia}{%
+ \LaTeXNews, and the \LaTeX{} software,
+ are brought to you by the \LaTeX3 Project Team;
+ Copyright \@year, all rights reserved.
+}
+
+\title{\LaTeXNews}
+
+% The \maketitle for the LaTeX News.
+
+\renewcommand{\maketitle}{%
+ \twocolumn[{%
+ \parbox[t][7\baselineskip]{\textwidth}{%
+ \@titlefont\@title\\[\medskipamount]
+ \normalfont\normalsize\issuename~\@issue, \@month~\@year
+ }%
+ }]%
+ \thispagestyle{titlepage}
+}
+
+\newcommand{\ps@titlepage}{%
+ \renewcommand{\@oddhead}{\hfill}%
+ \renewcommand{\@evenhead}{\hfill}%
+ \renewcommand{\@oddfoot}{\@indiciafont\@indicia\hfill}%
+ \renewcommand{\@evenfoot}{\@indiciafont\@indicia\hfill}%
+}
+%
+% When PostScript fonts are use we want the first section heading
+% to come out a little bit higher on the page.
+
+\newcommand{\raisefirstsection}{%
+ \ifx\TeX\pplTeX
+ \vspace*{-30pt} % typesetting with lw35fonts
+ \setlength{\topskip}{18pt}
+ \else
+ \vspace*{-36pt}
+ \fi
+}
+% Sectioning commands.
+
+\renewcommand{\section}{%
+ \@startsection
+ {section}{1}{\z@}{-1.5ex \@plus -1ex \@minus -.2ex}%
+ {1ex \@plus.2ex}{\@headingfont}%
+}
+
+\renewcommand{\subsection}{%
+ \@startsection
+ {subsection}{1}{\z@}{-1.5ex \@plus -1ex \@minus -.2ex}%
+ {1sp}{\@subheadingfont}%
+}
+
+% maybe not the greatest design but normally we wouldn't have subsubsections
+\renewcommand{\subsubsection}{%
+ \@startsection
+ {subsubsection}{2}{\leftmargini}{-1.5ex \@plus -1ex \@minus -.2ex}%
+ {1sp}{\@subheadingfont}%
+}
+
+% No section numbers.
+
+\setcounter{secnumdepth}{0}
+
+% Set lists tighter, but brought in by 1em (otherwise the first line
+% always looks very wide). Should this be done with \rightskip?
+% It actually does nothing since after this \rightskip is set to
+% \@rightskip: I think \rightmargin was intended but should we change
+% it now?
+% FMi 1999/12/11: in fact it needs to go as it would affect the
+% paragraph before the list making it flush right and indented while
+% the rest of the document is set ragged.
+
+\renewcommand{\@listI}{%
+ \setlength{\leftmargin}{\leftmargini}%
+ \setlength{\topsep}{\medskipamount}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\listparindent}{1em}%
+% \setlength{\rightskip}{1em}%
+}
+\let \@listi \@listI
+
+% set defaults so that trivlist eg verbatim use tighter spacing
+\@listi
+\setlength\topsep{4pt plus 1pt minus 2pt}
+
+% But have a list type with no indentation on either side:
+%
+\renewenvironment{description}
+ {\list{}{\labelwidth\z@
+ \leftmargin \z@
+ \rightmargin \z@
+ \itemindent-\leftmargin
+ \let\makelabel\descriptionlabel}}
+ {\endlist}
+
+\newenvironment{citations}{%
+ \list{}{%
+ \renewcommand{\makelabel}[1]{\itshape{##1},}%
+ }%
+}{%
+ \endlist
+}
+
+% Some logos:
+
+\newcommand{\NFSS}{NFSS}
+\newcommand{\LaTeXNews}{\LaTeX~News}
+\newcommand{\AW}{Addison Wesley}
+\newcommand{\SLiTeX}{\textsc{Sli}\TeX}
+\newcommand{\AmS}{$${\protect\the\textfont2 A}\kern-.1667em\lower
+ .5ex\hbox{\protect\the\textfont2 M}\kern
+ -.125em{\protect\the\textfont2 S}}
+\newcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}
+\newcommand{\ctan}{\textsc{CTAN}}
+\newcommand{\PSNFSS}{\textsc{PSNFSS}}
+\newcommand{\babel}{\textsf{babel}}
+
+% Abbreviations:
+
+\newcommand{\ctanhttp}{http://mirror.ctan.org/}
+
+% Needed for 09:
+
+\newcommand\cs[1]{\texttt{\textbackslash#1}}
+
+% Some logical markup:
+
+\newcommand*\class[1]{\texttt{#1}}
+\newcommand*\package[1]{\textsf{#1}}
+\let \pkg \package % backward compatibility
+\newcommand*\file[1]{\texttt{#1}}
+
+
+% Hacking to make <...> produce italics in verbatim. NB: this can be
+% done more cleanly using the verbatim package. But the ltnews class
+% has to run on any LaTeX installation, even those without the
+% verbatim package.
+
+% Here we extend the font-setting command to include making <> active
+% (ie adjusting the input encoding).
+\renewcommand \verbatim@font {%
+ \normalfont \ttfamily
+ \catcode`\<=\active
+ \catcode`\>=\active
+}
+
+% Make active <...> produce italics surrounded by angle brackets
+% (used in verbatim and \verb);
+% << produces a less-than, and >> produces a greater-than.
+
+\begingroup
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \gdef<{\@ifnextchar<\@lt\@meta}
+ \gdef>{\@ifnextchar>\@gt\@gtr@err}
+ \gdef\@meta#1>{{\reset@font\normalsize\itshape#1\/}}
+ \gdef\@lt<{\char`\<}
+ \gdef\@gt>{\char`\>}
+\endgroup
+\def\@gtr@err{%
+ \ClassError{ltxguide}{%
+ Isolated \protect>%
+ }{%
+ In this document class, \protect<...\protect>
+ is used to indicate a parameter.\MessageBreak
+ I've just found a \protect> on its own.
+ Perhaps you meant to type \protect>\protect>?
+ }%
+}
+\def\verbatim@nolig@list{\do\`\do\,\do\'\do\-}
+
+% That's it!
+
+\endinput
+
+% CHANGELOG
+%
+% 20 May 1994, v0.01: Created file.
+%
+% 21 May 1994, v0.02: Made <...> produce italics inside verbatim.
+% Added the indicia, \publicationyear, \publicationmonth and
+% \publicationissue. Added the citations environment. Switched off
+% some of the article class options.
+%
+% 21 May 1994, v0.03: Fixed a bug with ragged right. Fixed a bug
+% which was causing underfull hbox messages.
+%
+% 27 May 1994, v0.04: Added SliTeX logo, and proper AMS LaTeX logo.
+% Added angle brackets to <...>.
+%
+% 31 May 1994, v0.05: Added downloaded PS fonts options. Removed
+% angle brackets from <...> since these were the last remaining
+% bitmaps! Added variants of the LaTeX logo. Added the ltnews.cfg
+% file. Added the lw35fonts option.
+%
+% 27 Jul 1994, v0.06: Corrected a typo `\PassOptionToClass' should
+% have been `\PassOptionsToClass'. Manas Mandal pointed that one
+% out.
+%
+% 29 Nov 1994, v0.07: Made <...> only active in verbatim.
+%
+% 09 Dec 1995, v0.08: Upper case for Project Team.
+%
+% 20 Dec 1995, v0.09: Tidied up the list stuff.
+%
+% 03 Jun 1996, v0.10: Changed fonts for lw35 option, for logical and
+% aesthetic reasons.
+%
+% 06 Jun 1996, v0.11: Corrected grammar in footer.
+%
+% 10 June 1996 v0.12: Add extra line in lw35fonts option,
+% so 04 and 05 do not run over the page.
+% Make font scaling messages go to log only.
+%
+% 22 Nov 1997, v0.13: Added new form of description.
+% Found all sorts of strange things involving \rightskip
+%
+% 23 Feb 1999, v0.14: Added some logos etc.
+%
+% 02 Jul 1999, v0.15: Added some logical markup
+%
+% 03 Jul 1999, v0.16: Amended \pkg and added \email
+%
+% 21 Dec 1999, v0.17: Added PDF info, load package url.sty
+%
+% 23 Dec 1999, v0.18: Don't depend on url.sty being present
+%
+% 21 Jul 2000, v0.19: Extra short-cuts, added to doc re v0.17;
+% and more fonts
+%
+% 31 Aug 2000, v0.20: Fixed typo in URL (JLB)
+%
+% 06 Jun 2001, v0.21: Corrected undocumented stubs for html.sty
+%
+% 12 Jul 2001, v0.22: Added eTeX logo (from ltugboat.cls)
+%
+% 26 Feb 2004, v1.00: If pdf is being produced, use hyperref.
+% But move this after other packages are, possibly, loaded.
+%
+% 28 Feb 2004 v1.01 Heading font in lw35, size change.
+%
+% 21 Oct 2004 v1.02 Improve check for PDF generation (taken from ifpdf.sty)
+%
+% 01 May 2014 v1.03 hidelinks option for hyperref
+%
+% BUGS
+%
+% Switching between logos like this is a mess.
+%
+% The last column should be set flush bottom.
diff --git a/macros/latex-dev/base/ltoutenc.dtx b/macros/latex-dev/base/ltoutenc.dtx
new file mode 100644
index 0000000000..86135e96c8
--- /dev/null
+++ b/macros/latex-dev/base/ltoutenc.dtx
@@ -0,0 +1,4239 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltoutenc.dtx
+%\NeedsTeXFormat{LaTeX2e}[2000/06/01]
+%<OT1>\ProvidesFile{ot1enc.def}
+%<T1>\ProvidesFile{t1enc.def}
+%<OMS>\ProvidesFile{omsenc.def}
+%<OML>\ProvidesFile{omlenc.def}
+%<OT4>\ProvidesFile{ot4enc.def}
+%<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
+%<TU>\ProvidesFile{tuenc.def}
+%<package>\ProvidesPackage{fontenc}
+%<TS1sty>\ProvidesPackage{textcomp}
+%<OT1|T1|OMS|OML|OT4|TU|package|TS1sty> [2018/08/11 v2.0j
+%<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file]
+%<package|TS1sty> Standard LaTeX package]
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltoutenc.dtx}
+ [2018/11/18 v2.0k LaTeX Kernel (font encodings)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltoutenc.dtx}
+\title{\filename}
+\date{\filedate}
+\author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\usepackage{textcomp}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \changes{v1.99e}{2004/02/13}{Documentation fixes: typos}
+% \changes{v1.9k}{1998/01/12}{Added \cs{ProvidesPackage}
+% for textcomp.sty}
+% \changes{v1.9i}{1997/12/19}{Documentation corrections.}
+% \changes{v1.9h}{1997/12/17}{Documentation changes and additions.}
+% \changes{v1.9h}{1997/12/17}{Added textcomp.sty.}
+% \changes{v1.9f}{1997/08/29}{Added OT4 encoding,
+% provided by Marcin Woli\'nski.}
+% \changes{v1.7r}{1995/11/28}{doc fixes}
+% \changes{v1.7h}{1995/04/21}{Added \cs{null} \cs{k} latex/1274}
+% \changes{v1.7f}{1994/12/14}{Added braces to \cs{copyright} so it
+% works unbraced in subscripts.}
+% \changes{v1.7f}{1994/12/14}{Added check for math mode in
+% \cs{@changed@cmd}.}
+% \changes{v1.7f}{1994/12/14}{Commented out \cs{textasciicircum},
+% \cs{textasciitilde}, \cs{textbackslash}, \cs{textbar},
+% \cs{textgreater}, \cs{texthyphenchar}, \cs{texthyphen} and
+% \cs{textless} to save memory.}
+% \changes{v1.7e}{1994/12/10}{Added documentation for the OML encoding.}
+% \changes{v1.7e}{1994/12/10}{Replaced width with \cs{@width} and
+% ditto height in vrules.}
+% \changes{v1.7d}{1994/12/08}{Added \cs{null} and \cs{sh@ft} to \cs{b}
+% and \cs{d}.}
+% \changes{v1.7c}{1994/12/05}{Added braces to \cs{textcircled}.}
+% \changes{v1.7b}{1994/12/02}{Fixed a bug with \cs{a}.}
+% \changes{v1.7a}{1994/11/30}{Added new code for encoding-specific
+% commands. These now expand in the mouth, which means that
+% ligaturing and kerning can happen.}
+% \changes{v1.6i}{1994/11/22}{Fixed empty accents. Again.}
+% \changes{v1.6i}{1994/11/22}{Corrected \cs{dots} so that there's no
+% kerning in monowidth fonts.}
+% \changes{v1.6i}{1994/11/22}{Corrected typo with
+% \cs{mathunderscore}.}
+% \changes{v1.6h}{1994/11/17}{(DPC) \cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.6d}{1994/11/02}{Wrapped lines longer than 70 characters.}
+% \changes{v1.6d}{1994/10/30}{Added math commands.}
+% \changes{v1.6d}{1994/10/30}{Added OML encoding.}
+% \changes{v1.6d}{1994/10/30}{Added \cs{textcircled}.}
+% \changes{v1.6d}{1994/10/30}{Added \cs{DeclareTextCompositeCommand}.}
+% \changes{v1.6c}{1994/10/29}{Renamed \cs{P}, \cs{S}, \cs{dag} and
+% \cs{ddag} to \cs{textparagraph}, \cs{textsection},
+% \cs{textdagger} and \cs{textdaggerdbl}.}
+% \changes{v1.6b}{1994/10/27}{Removed the enc.def files}
+% \changes{v1.6a}{1994/10/25}{Added \cs{ProvideTextCommand},
+% \cs{UseTextSymbol},
+% \cs{UseTextAccent},
+% \cs{DeclareTextSymbolDefault},
+% \cs{DeclareTextAccentDefault},
+% \cs{DeclareTextCommandDefault}, and
+% \cs{ProvideTextCommandDefault}.}
+% \changes{v1.5m}{1994/10/18}{Added new definitions of \cs{patterns}
+% and \cs{hyphenation}.}
+% \changes{v1.5l}{1994/10/07}{Moved the ogonek accent.}
+% \changes{v1.5k}{1994/05/18}{Removed braces from \cs{pounds} and
+% \cs{dollar}.}
+% \changes{v1.5k}{1994/05/18}{Replaced \cs{defaultencoding} with
+% \cs{encodingdefault}.}
+% \changes{v1.5k}{1994/05/18}{Made dotted-i produce `i'.}
+% \changes{v1.5j}{1994/05/17}{Added braces to \cs{pounds} so it works
+% as a subscript.}
+% \changes{v1.5i}{1994/05/16}{Fixed a bug with \cs{d}.}
+% \changes{v1.5h}{1994/05/16}{Added \cs{NG}, \cs{ng}, \cs{TH},
+% \cs{th}, \cs{DH}, \cs{dh}, \cs{DJ} and \cs{dj}.}
+% \changes{v1.5h}{1994/05/16}{Added \cs{r} (ring accent) and \cs{k}
+% (ogonek) accents.}
+% \changes{v1.5h}{1994/05/16}{Removed \cs{P} from the OT1 definitions
+% file.}
+% \changes{v1.5h}{1994/05/16}{Fixed a bug with \cs{pounds}.}
+% \changes{v1.5g}{1994/05/16}{Made fontenc.sty use the new mixed-case
+% encoding files.}
+% \changes{v1.5f}{1994/05/16}{Revert code so that the encoding
+% given is used in \cs{DeclareTextCommand} (FMi)}
+% \changes{v1.5f}{1994/05/16}{enc files now have uc encoding name
+% parts (FMi)}
+% \changes{v1.5e}{1994/05/14}{Replaced \cs{ENC@cmd} by \cs{ENC-cmd}.}
+% \changes{v1.5d}{1994/05/14}{Rewrote \cs{DeclareTextCommand} to define
+% its argument to use the current encoding by default, rather than
+% the encoding provided to \cs{DeclareTextCommand}.}
+% \changes{v1.5d}{1994/05/14}{Tidied up the documentation.}
+% \changes{v1.5c}{1994/05/14}{Added the fontenc package.}
+% \changes{v1.5c}{1994/05/14}{Fixed a bug which caused an infinite loop
+% if \cs{f@encoding} was incorrectly set.}
+% \changes{v1.5c}{1994/05/14}{Moved fontsmpl to its own dtx file.}
+% \changes{v1.5b}{1994/05/13}{Added \cmd\{, \cmd\} and \cmd\$.}
+% \changes{v1.5b}{1994/05/13}
+% {Replaces \cs{space} by `~' in \cs{csname}.}
+% \changes{v1.5b}{1994/05/13}{Renamed \cs{DeclareProtectedCommand} to
+% \cs{DeclareRobustCommand}.}
+% \changes{v1.5a}{1994/05/11}{Renamed the commands again. Made the
+% encoding part of the command syntax. Added the
+% \cs{DeclareTextCommand} interface. Used
+% \cs{DeclareProtectedCommand}.}
+% \changes{v1.4a}{1994/05/01}{Renamed the commands, removed the
+% \cs{EncodingSpecific} command. Turned all slots into decimal.
+% Added \cs{a}.}
+% \changes{v1.4a}{1994/05/01}{Removed Rokicki's encoding.}
+% \changes{v1.3d}{1993/12/18}{Some T1 stuff had drifted into the OT1
+% file.}
+% \changes{v1.3c}{1993/12/18}{A new syntax, separating
+% accent-definitions from encoding-specific definitions, and
+% allowing encoding-specific \cs{chardef}, \cs{let}, etc.}
+% \changes{v1.3c}{1993/12/18}{Rewrote for the new syntax of
+% \cs{EncodingSpecific}.}
+% \changes{v1.3b}{1993/12/18}{Corrected typos.}
+% \changes{v1.3b}{1993/12/18}{Replaced the missing last argument to
+% \cs{DeclareFontEncoding}.}
+% \changes{v1.3a}{1993/12/18}{Replaced OT3 by XXX}
+% \changes{v1.3}{1993/12/17}{Added \cs{EncodingSpecificAccent},
+% \cs{EncodingSpecificAccentedLetter} and
+% \cs{EncodingSpecificCommand}.}
+% \changes{v1.3}{1993/12/17}{Made Rokicki's encoding a proper encoding
+% scheme rather than a variant of OT1.}
+% \changes{v1.2b}{1993/12/13}{Corrected file name in driver code.}
+% \changes{v1.2a}{1993/12/11}{Corrected for t1enc, math.}
+% \changes{v1.2}{1993/12/10}{Added source code for t1enc.sty.}
+% \changes{v1.1}{1993/12/07}{Made all character numbers decimal.}
+% \changes{v1.1}{1993/12/07}{Removed a lot of equal signs and the
+% like.}
+% \changes{v1.99m}{2015/02/21}
+% {Removed autoload code}
+%
+%
+% \section{Font encodings}
+%
+% This section of the kernel contains commands for declaring
+% encoding-specific
+% commands, such as accents. It also contains the code for some of
+% the encoding files, including |omlenc.def|,
+% |omsenc.def|, |t1enc.def| and |ot1enc.def| files, which define
+% the |OLM|,
+% |OMS|, |T1| and |OT1| encodings, and the |fontenc| package
+% for selecting encodings.
+%
+% The |fontenc| package has options for encodings, of which the
+% last option is the default encoding. For example, to use the
+% |OT2|, |OT3| and |T1| encodings, with |T1| as the default, you
+% say:
+%\begin{verbatim}
+% \usepackage[OT2,OT3,T1]{fontenc}
+%\end{verbatim}
+% The standard kernel set-up loads font encoding files and selects
+% an encoding as follows.
+%\begin{verbatim}
+% \input {omlenc.def}
+% \input {t1enc.def}
+% \input {ot1enc.def}
+% \input {omsenc.def}
+% \fontencoding{OT1}
+%\end{verbatim}
+% Note that the files in the standard |inputenc| package depend on
+% this behaviour of the kernel.
+%
+% The syntax for declaring encoding-specific commands is:
+% \begin{quote}
+% |\DeclareTextCommand{|^^A
+% \meta{command}|}{|^^A
+% \meta{encoding}|}|\\\hspace*{\fill}|[|^^A
+% \meta{number}|][|^^A
+% \meta{default}|]{|^^A
+% \meta{commands}|}|
+% \end{quote}
+% This command is like |\newcommand|, except that it defines a
+% command which is specific to one encoding. The resulting command
+% is always robust, even if its definition is fragile. For example,
+% the definition of |\l| in the |OT1| encoding is:
+%\begin{verbatim}
+% \DeclareTextCommand{\l}{OT1}{{\@xxxii l}}
+%\end{verbatim}
+% |\DeclareTextCommand| takes the same optional arguments as
+% |\newcommand|.
+% \begin{quote}
+% |\ProvideTextCommand{|^^A
+% \meta{command}|}{|^^A
+% \meta{encoding}|}|\\\hspace*{\fill}|[|^^A
+% \meta{number}|][|^^A
+% \meta{default}|]{|^^A
+% \meta{commands}|}|
+% \end{quote}
+% This acts like |\DeclareTextCommand|, but does nothing if the
+% command is already defined.
+% \begin{quote}
+% |\DeclareTextSymbol{|^^A
+% \meta{command}|}{|^^A
+% \meta{encoding}|}{|^^A
+% \meta{slot}|}|
+% \end{quote}
+% This command defines a text symbol, with a particular slot in that
+% encoding. The commands:
+% \changes{v1.9h}{1997/12/17}{Example corrected, braces removed.}
+%\begin{verbatim}
+% \DeclareTextSymbol{\ss}{OT1}{25}
+% \DeclareTextCommand{\ss}{OT1}{\char25 }
+%\end{verbatim}
+% have the same effect, but the |\DeclareTextSymbol| is faster.
+% \begin{quote}
+% |\DeclareTextAccent{|^^A
+% \meta{command}|}{|^^A
+% \meta{encoding}|}{|^^A
+% \meta{slot}|}|
+% \end{quote}
+% \changes{v1.8e}{1996/11/23}{Corrected description}
+% \changes{v1.9k}{1997/12/31}{Further correction}
+% This command declares a text accent. The commands:
+%\begin{verbatim}
+% \DeclareTextAccent{\"}{OT1}{127}
+% \DeclareTextCommand{\"}{OT1}{\add@accent {127}}
+%\end{verbatim}
+% have the same effect.
+% \changes{v1.8c}{1996/10/27}
+% {Corrected syntax descriptions}
+% \begin{quote}
+% |\DeclareTextComposite{|^^A
+% \meta{command}|}|\\\hspace*{\fill}|{|^^A
+% \meta{encoding}|}{|^^A
+% \meta{argument}|}{|^^A
+% \meta{slot}|}|
+% \end{quote}
+% This command declares a composite letter, for example in the |T1|
+% encoding |\'{a}| is slot 225, which is declared by:
+%\begin{verbatim}
+% \DeclareTextComposite{\'}{T1}{a}{225}
+%\end{verbatim}
+% \changes{v1.8e}{1996/11/23}
+% {Corrected description}
+% The \emph{command} will normally have been declared with
+% |\DeclareTextAccent|, or as a one-argument |\DeclareTextCommand|.
+%
+% |\DeclareTextComposite| is the most common example of using
+% the more general declaration
+% |\DeclareTextCompositeCommand|, which can define a composite
+% to be an arbitrary piece of text.
+% \begin{quote}
+% |\DeclareTextCompositeCommand{|^^A
+% \meta{command}|}|\\\hspace*{\fill}|{|^^A
+% \meta{encoding}|}{|^^A
+% \meta{argument}|}{|^^A
+% \meta{text}|}|
+% \end{quote}
+% For example, in the OT1 encoding \r A has a hand-crafted
+% definition this is declared as follows
+%\begin{verbatim}
+% \DeclareTextCompositeCommand{\r}{OT1}{A}
+% {\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen@-1ex%
+% \rlap{\raise.67\dimen@\hbox{\char23}}A}
+%\end{verbatim}
+% \changes{v1.8e}{1996/11/23}
+% {Corrected description}
+% The \emph{command} will normally have been declared with
+% |\DeclareTextAccent|, or as a one-argument |\DeclareTextCommand|.
+%
+% The commands defined using the above declarations can be used in
+% two ways.
+% Normally they are used by just calling the command in the
+% appropriate encoding, for example |\ss|. However, sometimes you
+% may wish to use a command in an encoding where it is not defined.
+% If the command has no arguments, then you can use it in another
+% encoding by calling |\UseTextSymbol|:
+% \begin{quote}
+% |\UseTextSymbol{|^^A
+% \meta{encoding}|}{|^^A
+% \meta{command}|}|
+% \end{quote}
+%
+% \task{?}{Document the problems of these commands, see pr/3160}
+% \changes{v1.9e}{1997/08/05}{Corrected order of arguments in
+% \cs{UseTextSymbol} example.}
+% For example, |\UseTextSymbol{OT1}{\ss}| has the same effect as:
+%\begin{verbatim}
+% {\fontencoding{OT1}\selectfont\ss}
+%\end{verbatim}
+% If the command has one argument then you can use it in another
+% encoding by calling
+% |\UseTextAccent|:
+% \begin{quote}
+% |\UseTextAccent{|^^A
+% \meta{encoding}|}{|^^A
+% \meta{command}|}{|^^A
+% \meta{text}|}|
+% \end{quote}
+% For example, if the current encoding is |OT2| then
+% |\UseTextAccent{OT1}{\'}{a}| has the same effect as:
+%\begin{verbatim}
+% {\fontencoding{OT1}\selectfont\'{\fontencoding{OT2}\selectfont a}}
+%\end{verbatim}
+% \changes{v1.8e}{1996/11/23}
+% {Extended description}
+% You can also declare a default definition for a text command, which
+% will be used if the current encoding has no appropriate definition.
+% Such use will also set the definition for this command in the
+% current encoding to equal this default definition; this makes
+% subsequent uses of the command much faster.
+% \begin{quote}
+% |\DeclareTextCommandDefault{|^^A
+% \meta{command}|}{|^^A
+% \meta{definition}|}|
+% \end{quote}
+% For example, the default definition of the command
+% |\textonequarter| (which produces the fraction $\frac14$) could be
+% built using math mode:
+%\begin{verbatim}
+% \DeclareTextCommandDefault{\textonequarter}{\ensuremath {\frac14}}
+%\end{verbatim}
+% There is a matching |\Provide| command which will not override an
+% existing default definition:
+% \begin{quote}
+% |\ProvideTextCommandDefault{|^^A
+% \meta{command}|}{|^^A
+% \meta{definition}|}|
+% \end{quote}
+% The most common use for these commands is to use symbols from
+% other encodings, so there are some optimizations provided:
+% \begin{quote}
+% |\DeclareTextSymbolDefault{|^^A
+% \meta{command}|}|^^A
+% \meta{encoding}|}|\\
+% |\DeclareTextAccentDefault{|^^A
+% \meta{command}|}|^^A
+% \meta{encoding}|}|
+% \end{quote}
+% are short for:
+% \begin{quote}
+% |\DeclareTextCommandDefault{|^^A
+% \meta{command}|}|\\\hspace*{\fill}^^A
+% |{\UseTextSymbol{|^^A
+% \meta{encoding}|}{|\meta{command}|}}| \\
+% |\DeclareTextCommandDefault[1]{|^^A
+% \meta{command}|}|\\\hspace*{\fill}^^A
+% |{\UseTextAccent{|^^A
+% \meta{encoding}|}{|\meta{command}|}{#1}}|
+% \end{quote}
+% For example, to make |OT1| the default encoding for |\ss| and
+% |\'| you say:
+%\begin{verbatim}
+% \DeclareTextSymbolDefault{\ss}{OT1}
+% \DeclareTextAccentDefault{\'}{OT1}
+%\end{verbatim}
+% Note that you can use these commands on any zero- or one-argument
+% commands declared with |\DeclareText*| or |\ProvideText*|, not
+% just those defined using |\DeclareTextSymbol| or
+% |\DeclareTextAccent|.
+%
+% \subsection{Removing encoding-specific commands}
+% \label{sec:removeencspec}
+%
+% \changes{v1.9o}{1998/03/20}{Documentation added for pr/2783}
+%
+% In some cases encoding definitions are given to provide some limited
+% support since nothing better is available, for example, the definition
+% for |\textdollar| in \texttt{OT1} is a hack since \$ and \pounds{}
+% actually share the same slot in this encoding. Thus if such a glyph
+% becomes available in a different encoding (e.g., \texttt{TS1}) one
+% would like to get rid of the flacky one and make the default
+% definition point to the new encoding. In such a case defining
+%\begin{verbatim}
+% \DeclareTextSymbol{\textdollar}{TS1}{36}
+% \DeclareTextSymbolDefault{\textdollar}{TS1}
+%\end{verbatim}
+% is not enough since if typesetting in \texttt{OT1} \LaTeX{} will
+% still find the encoding specific-definition for \texttt{OT1} and
+% therefore ignore the new default.
+% Therefore to ensure that in this case the \texttt{TS1} version is
+% used we have to remove the \texttt{OT1} declaration:
+%\begin{verbatim}
+% \UndeclareTextCommand{\textdollar}{OT1}
+%\end{verbatim}
+%
+% Since the \$ sign is a proper glyph in the \texttt{T1} encoding there
+% is no point removing its definition and forcing \LaTeX{} to pick up
+% the \texttt{TS1} version if typesetting in this encoding.
+% However, assume you want to use the variant dollar sign,
+% i.e., \textdollaroldstyle{}
+% for your dollars. In that case you have to get rid of the \texttt{T1}
+% declaration as well, e.g., the following would do that for you:
+%\begin{verbatim}
+% \UndeclareTextCommand{\textdollar}{OT1}
+% \UndeclareTextCommand{\textdollar} {T1}
+% \DeclareTextCommandDefault{\textdollar}
+% {\UseTextSymbol{TS1}\textdollaroldstyle}
+%\end{verbatim}
+%
+% \subsection{The order of declarations}\label{sec:orderofdecls}
+%
+% \changes{v1.9o}{1998/03/20}{Documentation added about order of decls}
+%
+% If an encoding-specific command is defined for more than one encoding,
+% then it will execute fastest in the encoding in which it was defined
+% last since its top-level definition will be set up to execute in that
+% encoding without any overhead.
+%
+% For this reason the file \texttt{fonttext.ltx} currently first loads
+% the definitions for the \texttt{T1} encoding and then those for the
+% \texttt{OT1} encoding so that typesetting in \texttt{OT1} is optimized
+% since that is (still) the default. However, when \texttt{T1} is
+% explicitly requested (via |\usepackage[T1]{fontenc}|) the
+% top-level definitions are automatically changed to favour
+% \texttt{T1} since its declarations are reloaded in the process.
+%
+% For the same reason default declarations should never come last since
+% they are implemented as a special encoding themselves (with the
+% name |?|).
+% Specifying them last would simply mean to make those encoding-specific
+% commands equally inefficient in all encodings. Therefore the
+% \texttt{textcomp} package, for example, first sets up all defaults
+% to point to \texttt{TS1} and then declares the commands in the
+% \texttt{TS1} encoding.
+%
+%
+% \StopEventually{}
+%
+% \subsection{Docstrip modules}
+%
+% This |.dtx| file is be used to generate several related files
+% containing font encoding definitions. The mutually exclusive
+% docstrip options are listed here.
+% \begin{center}
+% \begin{tabular}{lp{10cm}}
+% |T1| & generates |t1enc.def| for the Cork encoding. \\
+% |TS1| & generates |ts1enc.def| for the Text Companion
+% encoding. \\
+% |TS1sty| & generates |textcomp.sty|, package that sets up use
+% of the Text Companion encoding. \\
+% |OT1| & generates |ot1enc.def| for Knuth's CM encoding. \\
+% |OMS| & generates |omsenc.def| for Knuth's
+% math symbol encoding. \\
+% |OML| & generates |omlenc.def| for Knuth's
+% math letters encoding. \\
+% |OT4| & generates |ot4enc.def| for the Polish extension to
+% the OT1 encoding, created by B.~Jackowski and
+% M.~Ry\'cko for use with the Polish version of
+% Computer Modern and Computer Concrete.\\
+% |TU| & generates |tuenc.def| for Unicode font
+% encoding. \\
+% |package| & generates |fontenc.sty| for
+% selecting encodings. \\
+% |2ekernel| & for the kernel commands.\\
+% \end{tabular}
+% \end{center}
+% \changes{1.0d}{1993/07/17}{changed \cs{catcoding} @}
+% \changes{1.0f}{1993/08/13}{Protected against active @ sign.}
+% \changes{1.0g}{1993/08/16}{Needs space after \cs{string}}
+% \changes{1.1}{1993/12/07}{Protected all special characters with
+% \cs{string}.}
+% \changes{1.3}{1993/12/17}{Removed the catcode hackery, since the file
+% is only read as a package in the preamble, and removed all the
+% messages on the screen, which just confuse users. Replaced them
+% by the appropriate \cs{ProvidesPackage} commands. Added XXXenc.}
+% \changes{1.3b}{1993/12/18}
+% {Fixed typos with \cs{ProvidesPackage} lines.
+% Added the \cs{NeedsTeXFormat} line. Added the last argument to
+% \cs{DeclareEncoding}. Moved the use of the encodings to after their
+% declaration. }
+% \changes{1.4a}{1994/04/29}{Removed Rokicki's OT1 variant encoding.
+% Moved the driver to the top.}
+% \changes{1.5a}{1994/05/11}{Made T1 and OT1 generate packages rather
+% than def files. Renamed the `package' module to `teststy'.}
+% \changes{1.5d}{1994/05/14}{Moved the driver to the top.}
+%
+% \subsection{Definitions for the kernel}
+%
+% \subsubsection{Declaration commands}
+%
+% \changes{1.3}{1993/12/17}{Added this section}
+% \changes{1.3c}{1993/12/18}{Split \cs{EncodingSpecificAccent} up into
+% \cs{EncodingSpecific} and \cs{DeclareAccent}.}
+% \changes{1.4a}{1994/04/29}{Removed \cs{EncodingSpecific}. Renamed
+% all the commands. Added \cs{DeclareTextGlyph} and
+% \cs{UndeclareTextCommand}.}
+% \changes{v1.5a}{1994/05/11}{Reimplemented \cs{DeclareTextCommand}
+% using \cs{@changed@cmd} and \cs{DeclareProtectedCommand}.}
+% \changes{v1.5c}{1994/05/14}{Fixed a bug which caused an infinite loop
+% if \cs{f@encoding} was incorrectly set.}
+% \changes{v1.5d}{1994/05/14}{Rewrote \cs{DeclareTextCommand} to define
+% its argument to use the current encoding by default, rather than
+% the encoding provided to \cs{DeclareTextCommand}.}
+% \changes{v1.6a}{1994/10/25}{Added the \cs{Provide} commands,
+% and the default definitions.}
+%
+% This section contains definitions for commands such as accents which
+% depend on the current encoding. These commands will usually be kept
+% in |.def| files, for example |ot1enc.def| contains the definitions
+% for the |OT1| encoding.
+% \begin{macrocode}
+%<*2ekernel>
+\message{font encodings,}
+% \end{macrocode}
+%
+% \changes{v1.5d}{1994/10/27}{Rewrote \cs{DeclareTextSymbol} to define
+% its argument to use the current encoding by default, to fit with
+% \cs{DeclareTextCommand}.}
+%
+% \changes{v1.7a}{1994/11/30}{Redefined \cs{@changed@cmd} to expand in
+% the mouth.}
+% \changes{v1.7a}{1994/11/30}{Removed \cs{@changed@x@mouth} since
+% \cs{@changed@x} now expands in the mouth.}
+%
+% \changes{v1.7r}{1995/11/28}{Renamed \cs{@changed@x@err} to
+% \cs{TextSymbolUnavailable}.}
+% \changes{v1.7r}{1995/11/28}{Added math mode checks to text commands.}
+% Far too many macros in one block here!
+% \begin{macro}{\DeclareTextCommand}
+% \begin{macro}{\ProvideTextCommand}
+% \begin{macro}{\DeclareTextSymbol}
+% \begin{macro}{\@dec@text@cmd}
+% \begin{macro}{\chardef@text@cmd}
+% \begin{macro}{\@changed@cmd}
+% \begin{macro}{\@changed@x}
+% \begin{macro}{\TextSymbolUnavailable}
+% \begin{macro}{\@inmathwarn}
+% If you say:
+%\begin{verbatim}
+% \DeclareTextCommand{\foo}{T1}...
+%\end{verbatim}
+% then |\foo| is defined to be |\T1-cmd \foo \T1\foo|,
+% where |\T1\foo| is \emph{one} control sequence, not two!
+% We then call |\newcommand| to define |\T1\foo|.
+% \begin{macrocode}
+\def\DeclareTextCommand{%
+ \@dec@text@cmd\newcommand}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\ProvideTextCommand{%
+ \@dec@text@cmd\providecommand}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@dec@text@cmd#1#2#3{%
+ \expandafter\def\expandafter#2%
+ \expandafter{%
+ \csname#3-cmd\expandafter\endcsname
+ \expandafter#2%
+ \csname#3\string#2\endcsname
+ }%
+ \let\@ifdefinable\@rc@ifdefinable
+ \expandafter#1\csname#3\string#2\endcsname}
+% \end{macrocode}
+% \changes{v1.99d}{2004/02/06}{New command added to fix
+% severe bug: pr/3563}
+% This command was introduced to fix a major bug
+% in |\@dec@text@cmd| without changing that command itself.
+% This was thought to be necessary because it is defined
+% in more than one package. (Perhaps the more serious bug is to put
+% complex low-level commands like this in packages?)
+%
+% The problem it solves is that whereas both |\newcommand| and
+% |\providecommand| (used just above) both handle the
+% resetting of |\@ifdefinable| (following its disabling in
+% |\@dec@text@cmd|), the primitive |\chardef| neither needs the
+% disabling, nor does the resetting.
+%
+% \begin{macrocode}
+\def\chardef@text@cmd{%
+ \let\@ifdefinable\@@ifdefinable
+ \chardef
+ }
+\def\DeclareTextSymbol#1#2#3{%
+ \@dec@text@cmd\chardef@text@cmd#1{#2}#3\relax
+ }
+% \end{macrocode}
+%
+% The declarations are only available before |\begin{document}|.
+% \changes{v1.7h}{1995/05/21}{Added several \cs{@onlypreamble}}
+% \changes{v1.7k}{1995/06/05}{Removed \cs{protected@cmd} and replaced
+% with explicit \cs{noexpand}.}
+% \begin{macrocode}
+\@onlypreamble\DeclareTextCommand
+\@onlypreamble\DeclareTextSymbol
+% \end{macrocode}
+% The sneaky bit in all this is what |\T1-cmd \foo \T1\foo| does.
+% There are five possibilities, depending on the current values of
+% |\protect|, |\cf@encoding| and |\ifmmode|:
+% \begin{itemize}
+% \item If |\protect| is |\@typeset@protect| and |\cf@encoding| is
+% |T1|, then we execute |\T1\foo|. This should be the normal
+% behaviour, and is optimized for speed.
+% \item If |\protect| is |\@typeset@protect|, |\cf@encoding| is
+% (say) |OT1|, and |\OT1\foo| is defined, then we execute
+% |\OT1\foo|.
+% \item If |\protect| is |\@typeset@protect|, |\cf@encoding| is
+% (say) |OT1|, we're in text mode,
+% and |\OT1\foo| is undefined, then we define
+% |\OT1\foo| to be the default value of |\foo|, and execute
+% |\OT1\foo|.
+% \item If |\protect| is |\@typeset@protect|, |\cf@encoding| is
+% (say) |OT1|, we're in math mode,
+% and |\OT1\foo| is undefined, then we execute the default value
+% of |\foo|. (This is necessary so that things like
+% |$X_\copyright$| work properly.)
+% \item If |\protect| is not |\@typeset@protect| then we execute
+% |\noexpand\foo|. For example, if we are writing to a file,
+% then this results in |\foo| being written. If we are in a
+% |\mark|, then |\foo| will be put in the mark---since |\foo| is
+% robust, it will then survive all the things which may happen
+% to it whilst it's a |\mark|.
+% \end{itemize}
+% So after all that, we will either execute the appropriate
+% definition of |\foo| for the current encoding, or we will execute
+% |\noexpand\foo|.
+%
+% The default value of |\foo| is |\?\foo| if it is defined, and an
+% error message otherwise.
+%
+% When the encoding is changed from |T1| to |OT1|, |\T1-cmd| is
+% defined to be |\@changed@cmd| and |\OT1-cmd| is defined to be
+% |\@current@cmd|. This means that the test for what the current
+% encoding is can be performed quickly.
+% \begin{macrocode}
+\def\@current@cmd#1{%
+ \ifx\protect\@typeset@protect
+ \@inmathwarn#1%
+ \else
+ \noexpand#1\expandafter\@gobble
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@changed@cmd#1#2{%
+ \ifx\protect\@typeset@protect
+ \@inmathwarn#1%
+ \expandafter\ifx\csname\cf@encoding\string#1\endcsname\relax
+ \expandafter\ifx\csname ?\string#1\endcsname\relax
+ \expandafter\def\csname ?\string#1\endcsname{%
+ \TextSymbolUnavailable#1%
+ }%
+ \fi
+ \global\expandafter\let
+ \csname\cf@encoding \string#1\expandafter\endcsname
+ \csname ?\string#1\endcsname
+ \fi
+ \csname\cf@encoding\string#1%
+ \expandafter\endcsname
+ \else
+ \noexpand#1%
+ \fi}
+% \end{macrocode}
+% \changes{v1.7m}{1995/10/09}{Autoload error}
+% \changes{v1.7v}{1995/12/05}{Changed \cs{TextSymbolUnavailable} text}
+% \begin{macrocode}
+\gdef\TextSymbolUnavailable#1{%
+ \@latex@error{%
+ Command \protect#1 unavailable in encoding \cf@encoding%
+ }\@eha}
+% \end{macrocode}
+% The command |\@inmathwarn| produces a warning message if we are
+% currently in math mode. Note that since this command is used
+% inside text commands, it can't call |\relax| before the
+% |\ifmmode|. This means that it is possible for the warning to
+% fail to be issued at the beginning of a row of an halign whose
+% template enters math mode. This is probably a bad feature, but
+% there's not much that can be done about it, since adding a |\relax|
+% would break ligatures and kerning between text symbols.
+%
+% A more efficient solution would be to make |\@inmathwarn| and
+% |\@inmatherr| equal to |\@empty| and |\relax| by default, and
+% to have
+% |\everymath| reset them to their usual definitions. This is left
+% for future investigation (for example it may break some third
+% party code).
+% \begin{macrocode}
+\def\@inmathwarn#1{%
+ \ifmmode
+ \@latex@warning{Command \protect#1 invalid in math mode}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.7k}{1995/06/05}{Allowed \cs{ProvideTextCommandDefault}
+% after the preamble.}
+%
+% \begin{macro}{\DeclareTextCommandDefault}
+% \begin{macro}{\ProvideTextCommandDefault}
+% These define commands with encoding |?|.
+%
+% Note that |\DeclareTextCommandDefault| can only be used in the
+% preamble, but that the |\Provide| version is allowed in inputenc
+% |.def| files, so is allowed anywhere.
+% \begin{macrocode}
+\def\DeclareTextCommandDefault#1{%
+ \DeclareTextCommand#1?}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\ProvideTextCommandDefault#1{%
+ \ProvideTextCommand#1?}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareTextCommandDefault
+%\@onlypreamble\ProvideTextCommandDefault
+% \end{macrocode}
+% They require |\?-cmd| to be initialized as |\@changed@cmd|.
+% \begin{macrocode}
+\expandafter\let\csname?-cmd\endcsname\@changed@cmd
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareTextAccent}
+% \changes{v1.5a}{1994/05/11}
+% {Reimplemented using \cs{DeclareTextCommand}.}
+% \changes{v1.7z}{1996/05/23}
+% {Reimplemented using \cs{add@accent} to save space latex/2133}
+% This is just a disguise for defining a \TeX~|\accent| command.
+% \begin{macrocode}
+\def\DeclareTextAccent#1#2#3{%
+ \DeclareTextCommand#1{#2}{\add@accent{#3}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareTextAccent
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.7a}{1994/11/30}{Rewrote \cs{@text@composite} so it
+% allows an empty argument, or an argument containing lots of
+% commands.}
+%
+% \begin{macro}{\add@accent}
+% \changes{v1.7z}{1996/05/23}{macro added. latex/2133}
+% \changes{v1.91}{2000/08/30}{Rearranged but no change to final code,
+% CAR (pr/3160)}
+% To save space this code is shared between all text accents that are
+% set using the |\accent| primitive.
+% The argument is pre-set in a box so that any
+% font loading that is needed is already done within the box.
+% This is needed because font-loading involves grouping and that would
+% prevent the accent mechanism from working so that the accent would
+% not be positioned over the argument.
+% Declarations that change the font should be allowed (only low-level
+% ones are at present) inside the argument of an accent command,
+% but not size changes, as they involve |\setbox| operations which
+% also inhibit the mechanism of the |\accent| primitive.
+%
+% Note that the whole process is within a group.
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% For a detailed discussion of this reimplementation and its
+% deficiencies, see pr/3160.
+% \task{?}{Improve this and document its problems, see pr/3160}
+% \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
+% \begin{macrocode}
+\def\add@accent#1#2{\hmode@bgroup
+% \end{macrocode}
+% Turn off the group in |\UseTextSymbol| in case this is used
+% inside the argument of |\add@accent|.
+% \begin{macrocode}
+ \let\hmode@start@before@group\@firstofone
+ \setbox\@tempboxa\hbox{#2%
+% \end{macrocode}
+% When presetting the argument in a box we record its |\spacefactor|
+% for later use after the accent got typeset. This way something like
+% |\`A| gets the spacefactor of |A| (i.e., 999) rather than the
+% default value of 1000.
+% \changes{v1.9q}{1998/06/12}
+% {Explicitly set \cs{spacefactor} after \cs{accent} (pr/2877)}
+% \begin{macrocode}
+ \global\mathchardef\accent@spacefactor\spacefactor}%
+ \accent#1 #2\egroup\spacefactor\accent@spacefactor}
+% \end{macrocode}
+% Default definition for |\accent@spacefactor| prevents a horrible
+% death of the above macro inside an unprotected |\edef|.
+% \changes{v1.9w}{1999/10/28}{Give \cs{accent@spacefactor} a default
+% definition (pr/3084)}
+% \begin{macrocode}
+\let\accent@spacefactor\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hmode@bgroup}
+% \changes{v1.9y}{2000/01/30}{Macro added}
+% \begin{macrocode}
+\def\hmode@bgroup{\leavevmode\bgroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DeclareTextCompositeCommand}
+% \changes{v1.7z}{1996/05/23}
+% {Modified to cope with new \cs{add@accent} command: required
+% removal of check for one argument-command}
+% \changes{v2.0h}{2017/02/24}{%
+% add check whether the accent command is defined for this encoding}
+% \changes{v2.0i}{2017/04/05}{%
+% Declare accent command if not already declared when declaring a composite.}
+% \begin{macro}{\DeclareTextComposite}
+% \changes{v1.7l}{1995/06/09}{Rewrote \cs{DeclareTextComposite} to
+% define the composite as a no-argument command rather than a
+% two-argument command.}
+% \begin{macro}{\@text@composite}
+% \begin{macro}{\@text@composite@x}
+% \begin{macro}{\@strip@args}
+% \changes{v1.8c}{1996/10/27}
+% {Removed macro}
+% Another amusing game to play with |\expandafter|, |\csname|, and
+% |\string|. When you say
+% |\DeclareTextCompositeCommand{\foo}{T1}{a}{bar}|, we look to see
+% if the expansion of |\T1\foo| begins with |\@text@composite|, and
+% if it doesn't, we redefine |\T1\foo| to be:
+%\begin{verbatim}
+% #1 -> \@text@composite \T1\foo #1\@empty \@text@composite {...}
+%\end{verbatim}
+% where |...| is the
+% previous definition of |\T1\foo|. Finally, we define |\\T1\foo-a|
+% to expand to |bar|.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/04/15}{\DeclareTextCompositeCommand}
+%<latexrelease> {test for undeclared accent}%
+%<*2ekernel|latexrelease>
+\def\DeclareTextCompositeCommand#1#2#3#4{%
+ \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname
+ \ifx\reserved@a\relax
+ \DeclareTextCommand#1{#2}{%
+ \@latex@error{\string#1 undeclared in encoding #2}\@eha}%
+ \@latex@info{Composite with undeclared \string#1 in encoding #2}%
+ \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname
+ \fi
+ \expandafter\expandafter\expandafter\ifx
+ \expandafter\@car\reserved@a\relax\relax\@nil \@text@composite \else
+ \edef\reserved@b##1{%
+ \def\expandafter\noexpand
+ \csname#2\string#1\endcsname####1{%
+ \noexpand\@text@composite
+ \expandafter\noexpand\csname#2\string#1\endcsname
+ ####1\noexpand\@empty\noexpand\@text@composite
+ {##1}}}%
+ \expandafter\reserved@b\expandafter{\reserved@a{##1}}%
+ \fi
+ \expandafter\def\csname\expandafter\string\csname
+ #2\endcsname\string#1-\string#3\@empty\endcsname{#4}%
+ }
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\DeclareTextCompositeCommand}
+%<latexrelease> {test for undeclared accent}%
+%<latexrelease>\def\DeclareTextCompositeCommand#1#2#3#4{%
+%<latexrelease> \expandafter\let\expandafter\reserved@a
+%<latexrelease> \csname#2\string#1\endcsname
+%<latexrelease> \expandafter\expandafter\expandafter\ifx
+%<latexrelease> \expandafter\@car\reserved@a\relax\relax\@nil
+%<latexrelease> \@text@composite \else
+%<latexrelease> \edef\reserved@b##1{%
+%<latexrelease> \def\expandafter\noexpand
+%<latexrelease> \csname#2\string#1\endcsname####1{%
+%<latexrelease> \noexpand\@text@composite
+%<latexrelease> \expandafter\noexpand\csname#2\string#1\endcsname
+%<latexrelease> ####1\noexpand\@empty\noexpand\@text@composite
+%<latexrelease> {##1}}}%
+%<latexrelease> \expandafter\reserved@b\expandafter{\reserved@a{##1}}%
+%<latexrelease> \fi
+%<latexrelease> \expandafter\def\csname\expandafter\string\csname
+%<latexrelease> #2\endcsname\string#1-\string#3\@empty\endcsname{#4}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareTextCompositeCommand
+% \end{macrocode}
+% This all works because:
+%\begin{verbatim}
+% \@text@composite \T1\foo A\@empty \@text@composite {...}
+%\end{verbatim}
+% expands to
+% |\\T1\foo-A| if |\\T1\foo-A| has been defined, and |{...}|
+% otherwise.
+%
+% Note that |\@text@composite| grabs the first token of the
+% argument and puts just that in the
+% csname. This is so that |\'{\textit{e}}| will work---it checks
+% whether |\\T1\'-\textit| is defined (which presumably it isn't)
+% and so expands to |{\accent 1 \textit{e}}|.
+%
+% This trick won't always work, for example |\'{{\itshape e}}| will
+% expand to (with spaces added for clarity):
+%\begin{verbatim}
+% \csname \string \T1\' - \string {\itshape e} \@empty \endcsname
+%\end{verbatim}
+% which will die pretty horribly. Unfortunately there's not much
+% can be done about this if we're going to use |\csname| lookups as a
+% fast way of accessing composites.
+%
+% This has an unfortunate `misfeature' though, which is that in
+% the T1 encoding, |\'{aa}| produces \'a. This is not the expected
+% behaviour, and should perhaps be fixed if the fix doesn't affect
+% performance too badly.
+%
+% Finally, it's worth noting that the |\@empty| is used in
+% |\@text@composite| so that accents will work even when the
+% argument is empty. If you say |\'{}| then this looks up
+% |\\T1\'-\@empty|, which ought to be |\relax|, and so all is well.
+% If we didn't include the |\@empty|, then |\'{}| would expand to:
+%\begin{verbatim}
+% \csname \string \T1\' - \string \endcsname
+%\end{verbatim}
+% so the |\endcsname| would be |\string|'ed and the whole of the
+% rest of the document would be put inside the |\csname|. This
+% would not be good.
+% \begin{macrocode}
+\def\@text@composite#1#2#3\@text@composite{%
+ \expandafter\@text@composite@x
+ \csname\string#1-\string#2\endcsname}
+% \end{macrocode}
+%
+% \changes{v1.7z}{1996/05/23}
+% {\cs{expandafter} added to match other changes for latex/2133}
+% \changes{v1.9r}{1999/01/06}{New impl for latex/2930}
+% \changes{v1.9s}{1999/01/13}{Simplified solution for latex/2930}
+% Originally the |\@text@composite@x| macro had two arguments and if
+% |#1| was not |\relax| it was executed, otherwise |#2| was executed.
+% All this happened within the |\ifx| code so that neither |#1|
+% nor |#2| could have picked up any additional arguments form
+% the input stream.
+% This has now being changed using the typical |\@firstoftwo| /
+% |\@secondoftwo| coding. This way the
+% final expansion will happen without any |\else| or |\fi|
+% intervening in the case that we need to get a further token
+% from the input stream.
+% \begin{macrocode}
+\def\@text@composite@x#1{%
+ \ifx#1\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+ #1}
+% \end{macrocode}
+% The command |\DeclareTextComposite| uses
+% |\DeclareTextCompositeCommand| to declare a command which
+% expands out to a single glyph.
+% \changes{v1.8a}{1996/07/19}
+% {Use char 0 not @ as carrier for \cs{lowercase} /2197}
+% \begin{macrocode}
+\catcode\z@=11\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\DeclareTextComposite#1#2#3#4{%
+ \def\reserved@a{\DeclareTextCompositeCommand#1{#2}{#3}}%
+ \bgroup
+ \lccode\z@#4%
+ \lowercase{%
+ \egroup
+ \reserved@a ^^@}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\catcode\z@=15\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareTextComposite
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\UseTextAccent}
+% \begin{macro}{\UseTextSymbol}
+% \changes{v1.7p}{1995/11/17}{Support \cs{@wrong@font@char} latex/1676}
+% \changes{v1.7q}{1995/11/18}{Modify message slightly}
+% \begin{macro}{\@use@text@encoding}
+% \changes{v1.91}{2000/08/30}{Rearranged but no change to final code,
+% CAR (pr/3160)}
+% These fragile commands access glyphs from different encodings.
+% They use grotty low-level calls to the font selection scheme for
+% speed, and in order to make sure that |\UseTextSymbol| doesn't
+% do anything which you're not allowed to do between an |\accent|
+% and its glyph.
+%
+% For a detailed discussion of this reimplementation and its
+% deficiencies, see pr/3160.
+% \task{?}{Improve this and document its problems, see pr/3160}
+% \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
+% \begin{macrocode}
+\def\UseTextAccent#1#2#3{%
+ \hmode@start@before@group
+ {%
+% \end{macrocode}
+% Turn off the group in |\UseTextSymbol| in case this is used
+% inside the arguments of |\UseTextAccent|.
+% \begin{macrocode}
+ \let\hmode@start@before@group\@firstofone
+ \let\@curr@enc\cf@encoding
+ \@use@text@encoding{#1}%
+ #2{\@use@text@encoding\@curr@enc#3}%
+ }}
+% \end{macrocode}
+%
+% \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
+% \begin{macrocode}
+\def\UseTextSymbol#1#2{%
+ \hmode@start@before@group
+ {%
+ \def\@wrong@font@char{\MessageBreak
+ for \noexpand\symbol`\string#2'}%
+ \@use@text@encoding{#1}%
+ #2%
+ }%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@use@text@encoding#1{%
+ \edef\f@encoding{#1}%
+ \xdef\font@name{%
+ \csname\curr@fontshape/\f@size\endcsname}%
+ \pickup@font
+ \font@name
+ \@@enc@update}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hmode@start@before@group}
+% The |\hmode@start@before@group| starts hmode and should be
+% immediately followed by an explicit |{...}|. Its purpose is to
+% ensure that hmode is started before this group is opened. Inside
+% |\add@accent| and |\UseTextAccent| it is redefined to remove this
+% group so that it doesn't conflict with the |\accent| primitive.
+%
+% For a detailed discussion see pr/3160.
+% \changes{v1.9z}{2000/01/30}{Macro added (pr/3160)}
+% \begin{macrocode}
+\let\hmode@start@before@group\leavevmode
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareTextSymbolDefault}
+% \begin{macro}{\DeclareTextAccentDefault}
+% Some syntactic sugar. Again, these should probably be optimized
+% for speed.
+% \begin{macrocode}
+\def\DeclareTextSymbolDefault#1#2{%
+ \DeclareTextCommandDefault#1{\UseTextSymbol{#2}#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\DeclareTextAccentDefault#1#2{%
+ \DeclareTextCommandDefault#1{\UseTextAccent{#2}#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareTextSymbolDefault
+\@onlypreamble\DeclareTextAccentDefault
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\UndeclareTextCommand}
+% This command safely removes an encoding specific declaration
+% for a given encoding. It is helpful if one intends to use the
+% default definition always and therefore wants to get rid of
+% a declaration for some specific encoding.
+% \changes{v1.9o}{1998/03/20}{Macro added for pr/2783}
+% \begin{macrocode}
+\def\UndeclareTextCommand#1#2{%
+% \end{macrocode}
+% If there is no declaration for the current encoding do nothing.
+% (This makes a hash table entry but without e\TeX{} we can't do
+% anything about that).
+% \begin{macrocode}
+ \expandafter\ifx\csname#2\string#1\endcsname\relax
+ \else
+% \end{macrocode}
+% Else: throw away that declaration.
+% \begin{macrocode}
+ \global\expandafter\let\csname#2\string#1\endcsname
+ \@undefined
+% \end{macrocode}
+% But this is unfortunately not enough, we have to take a look
+% at the top-level definition of the encoding specific command
+% which for a command |\foo| would look similar to
+% |\T1-cmd \foo \T1\foo| (three tokens).
+%
+% Of course, instead of |T1| one could see a different encoding name;
+% which one depends the encoding for which |\foo| was declared
+% last.
+%
+% Now assume we have just removed the declaration for |\foo| in |T1|
+% and the top-level of |\foo| expands to the above. Then we better
+% change that pretty fast otherwise we do get an ``undefined csname
+% error'' when we try to typeset |\foo| within |T1| instead of
+% getting the default definition for |\foo|.
+% And what is the best way to change that top-level definition? Well,
+% the only ``encoding'' we know for sure will still be around is
+% the default encoding denoted by |?|.
+%
+% Thus in case the last token of the top-level expansion
+% is now undefined we change the declaration to look like
+% |\?-cmd \foo \?\foo| which is done by the following
+% (readable?) code:
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter
+ \ifx\expandafter\@thirdofthree#1\@undefined
+ \expandafter\gdef\expandafter#1\expandafter
+ {\csname ?-cmd\expandafter\endcsname\expandafter
+ #1\csname?\string#1\endcsname}%
+ \fi
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\UndeclareTextCommand
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Hyphenation}
+%
+% \changes{v1.5l}{1994/10/18}{Added new definitions of \cs{patterns}
+% and \cs{hyphenation}.}
+% \changes{v1.6g}{1994/11/05}{Added setting of \cs{@typeset@protect}
+% to \cs{patterns} and \cs{hyphenation}.}
+% \changes{v1.6g}{1994/11/30}{Removed new definitions of \cs{patterns}
+% and \cs{hyphenation}, since encoding-specific commands now expand
+% in the mouth.}
+%
+% \begin{macro}{\patterns}
+% \begin{macro}{\@@patterns}
+% \begin{macro}{\hyphenation}
+% \begin{macro}{\@@hyphenation}
+% We redefine |\patterns| and |\hyphenation| to allow the use of
+% commands declared with |\DeclareText*| to be used inside them.
+% \begin{macrocode}
+%\let\@@patterns\patterns
+%\let\@@hyphenation\hyphenation
+%\def\patterns{%
+% \bgroup
+% \let\protect\@empty
+% \let\@typeset@protect\@empty
+% \let\@changed@x\@changed@x@mouth
+% \afterassignment\egroup
+% \@@patterns
+%}
+%\def\hyphenation{%
+% \bgroup
+% \let\protect\@empty
+% \let\@typeset@protect\@empty
+% \let\@changed@x\@changed@x@mouth
+% \afterassignment\egroup
+% \@@hyphenation
+%}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Miscellania}
+%
+% \changes{1.4a}{1994/05/01}{Added the \cs{a} command.}
+% \changes{1.7a}{1994/11/30}{Redefined \cs{a} for the new scheme.}
+% \changes{1.7b}{1994/12/02}{Redefined \cs{a} properly.}
+% \changes{1.7g}{1995/03/03}{Corrected an error in documentation
+% referring to the tabular rather than the tabbing
+% environment.}
+% \changes{v1.7n}{1995/11/02}{Changed internal name \cs{a} to
+% \cs{@tabacckludge} to protect against redefinition by malicious
+% users.}
+%
+% \begin{macro}{\a}
+% The |\a| command is used to access the accent commands even when
+% they have been redefined (for example by the |tabbing|
+% environment). Its internal name is |\@tabacckludge|.
+%
+% The |\string| within the |\csname| guards against something
+% like |'| being active at the point of use.
+% \changes{v1.9r}{1998/09/19}{Added \cs{string} (pr/2878)}
+% \begin{macrocode}
+\def\@tabacckludge#1{\expandafter\@changed@cmd
+ \csname\string#1\endcsname\relax}
+\let\a=\@tabacckludge
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.6a}{1994/10/25}{Added the files OT1enc.def, T1enc.def and
+% OMSenc.def.}
+% \changes{v1.6b}{1994/10/27}{Removed the files OT1enc.def, T1enc.def
+% and OMSenc.def.}
+%
+% \subsubsection{Default encodings}
+%
+% We define the default encodings for most commands to be either OT1,
+% OML or OMS. These defaults are in the kernel and therefore
+% fonts with these encodings must be available unless these
+% defaults are redefined elsewhere. Recall that the standard kernel
+% loads the encoding files for these encodings, and also that for
+% the T1 encoding.
+%
+% The naming conventions in the kernel are not what we would use if we
+% were starting from scratch\dots\
+% Those defined by DEK (like |\ae| and |\ss|) or by the \TeX{} Users
+% Group Technical Working Group on multi-lingual typesetting (like
+% |\th| and |\ng|) have short names. Those which were added to the
+% kernel in 1993 and early 1994 are named after their Adobe glyph
+% names (like |\guillemotleft| and |\quotedblbase|). Unfortunately,
+% this naming scheme won't work for all glyphs, since some names (like
+% |\space|) are already used, and some (like |\endash|) are very
+% likely to be defined by users. So we're now using the naming scheme
+% of |\text| followed by the Adobe name, (like |\textendash| and
+% |\textsterling|). Except that some glyphs don't have Adobe names,
+% so we're using the names used by fontinst for those (like
+% |\textcompwordmark|). Sigh.
+%
+% \changes{v1.6a}{1994/10/25}{Added the defaults.}
+% \changes{v1.6b}{1994/10/27}{Added more defaults for OT1.}
+% \changes{v1.6c}{1994/10/29}{Added commands like \cs{dots} for use in
+% text and math.}
+%
+% Some accents from OT1:
+% \begin{macrocode}
+\DeclareTextAccentDefault{\"}{OT1}
+\DeclareTextAccentDefault{\'}{OT1}
+\DeclareTextAccentDefault{\.}{OT1}
+\DeclareTextAccentDefault{\=}{OT1}
+\DeclareTextAccentDefault{\H}{OT1}
+\DeclareTextAccentDefault{\^}{OT1}
+\DeclareTextAccentDefault{\`}{OT1}
+\DeclareTextAccentDefault{\b}{OT1}
+\DeclareTextAccentDefault{\c}{OT1}
+\DeclareTextAccentDefault{\d}{OT1}
+\DeclareTextAccentDefault{\r}{OT1}
+\DeclareTextAccentDefault{\u}{OT1}
+\DeclareTextAccentDefault{\v}{OT1}
+\DeclareTextAccentDefault{\~}{OT1}
+% \end{macrocode}
+% Some symbols from OT1:
+% \changes{v1.8c}{1996/10/27}
+% {Removed \cs{aa} and \cs{AA}}
+% \begin{macrocode}
+%\DeclareTextSymbolDefault{\AA}{OT1}
+\DeclareTextSymbolDefault{\AE}{OT1}
+\DeclareTextSymbolDefault{\L}{OT1}
+\DeclareTextSymbolDefault{\OE}{OT1}
+\DeclareTextSymbolDefault{\O}{OT1}
+%\DeclareTextSymbolDefault{\aa}{OT1}
+\DeclareTextSymbolDefault{\ae}{OT1}
+\DeclareTextSymbolDefault{\i}{OT1}
+\DeclareTextSymbolDefault{\j}{OT1}
+% \end{macrocode}
+% \changes{v1.99h}{2005/11/08}
+% {Added \cs{ij} and \cs{IJ} from babel. (pr/3771)}
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\ij}{OT1}
+\DeclareTextSymbolDefault{\IJ}{OT1}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\l}{OT1}
+\DeclareTextSymbolDefault{\oe}{OT1}
+\DeclareTextSymbolDefault{\o}{OT1}
+\DeclareTextSymbolDefault{\ss}{OT1}
+\DeclareTextSymbolDefault{\textdollar}{OT1}
+\DeclareTextSymbolDefault{\textemdash}{OT1}
+\DeclareTextSymbolDefault{\textendash}{OT1}
+\DeclareTextSymbolDefault{\textexclamdown}{OT1}
+%\DeclareTextSymbolDefault{\texthyphenchar}{OT1}
+%\DeclareTextSymbolDefault{\texthyphen}{OT1}
+\DeclareTextSymbolDefault{\textquestiondown}{OT1}
+\DeclareTextSymbolDefault{\textquotedblleft}{OT1}
+\DeclareTextSymbolDefault{\textquotedblright}{OT1}
+\DeclareTextSymbolDefault{\textquoteleft}{OT1}
+\DeclareTextSymbolDefault{\textquoteright}{OT1}
+\DeclareTextSymbolDefault{\textsterling}{OT1}
+% \end{macrocode}
+% Some symbols from OMS:
+% \changes{v1.7t}{1995/11/29}{Added \cs{textbackslash} and
+% \cs{textbar}.}
+% \changes{v1.8c}{1996/10/27}
+% {Added \cs{textasteriskcentered}}
+% \changes{v1.95}{2002/06/16}{Added default for \cs{textbardbl} (pr/3400)}
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\textasteriskcentered}{OMS}
+\DeclareTextSymbolDefault{\textbackslash}{OMS}
+\DeclareTextSymbolDefault{\textbar}{OMS}
+\DeclareTextSymbolDefault{\textbardbl}{OMS}
+\DeclareTextSymbolDefault{\textbraceleft}{OMS}
+\DeclareTextSymbolDefault{\textbraceright}{OMS}
+\DeclareTextSymbolDefault{\textbullet}{OMS}
+\DeclareTextSymbolDefault{\textdaggerdbl}{OMS}
+\DeclareTextSymbolDefault{\textdagger}{OMS}
+\DeclareTextSymbolDefault{\textparagraph}{OMS}
+\DeclareTextSymbolDefault{\textperiodcentered}{OMS}
+\DeclareTextSymbolDefault{\textsection}{OMS}
+\DeclareTextAccentDefault{\textcircled}{OMS}
+% \end{macrocode}
+%
+% \changes{v1.6d}{1994/10/30}{Added OML encoding.}
+% \changes{v1.6d}{1994/10/30}{Made \cs{textless} and \cs{textgreater}
+% come from OML.}
+% \changes{v1.6d}{1994/10/30}{Added \cs{t}.}
+% \changes{v1.7k}{1995/06/05}{Commented out \cs{textless} and
+% \cs{textgreater}.}
+%
+% Some symbols from OML:
+% \changes{v1.7t}{1995/11/29}{Added \cs{textless} and
+% \cs{textgreater}.}
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\textless}{OML}
+\DeclareTextSymbolDefault{\textgreater}{OML}
+\DeclareTextAccentDefault{\t}{OML}
+% \end{macrocode}
+%
+% \changes{v1.6d}{1994/10/30}{Added \cs{textcircled}.}
+% \changes{v1.6d}{1994/10/30}{Rewrote \cs{copyright} to use
+% \cs{textcircled}.}
+% \changes{v1.6d}{1994/10/30}{Removed \cs{textregistered}.}
+% \changes{v1.7k}{1995/06/05}{Save some tokens in
+% \cs{textvisiblespace} and \cs{textunderscore}.}
+% \changes{v1.7t}{1995/11/29}{Added \cs{textasciicircum},
+% \cs{textasciitilde}, \cs{textregistered} and \cs{texttrademark}.}
+% \changes{v1.7u}{1995/12/01}{Made \cs{SS} a Default, rather than
+% having the default point to the OT1 definition.}
+% \changes{v1.7w}{1995/12/11}{Modified \cs{copyright}}
+% \changes{v1.9a}{1997/04/30}{Introduced \cs{textcopyright} and modified
+% \cs{copyright}}
+%
+% Some defaults we can fake.
+%
+% The interface for defining |\copyright| changed, it used to
+% use |\expandafter| to add braces at the appropriate points.
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textcopyright}{\textcircled{c}}
+% \expandafter\def\expandafter
+% \copyright\expandafter{\expandafter{\copyright}}
+% \end{macrocode}
+%
+% \changes{v1.9a}{1997/04/30}{Modified \cs{textunderscore}, removing
+% \cs{mathunderscore}}
+% \changes{v1.9b}{1997/04/30}{Added \cs{leavevmode} to
+% \cs{textunderscore}}
+% \changes{v1.9d}{1997/05/07}{Added \cs{leavevmode} to
+% \cs{textcompwordmark}}
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textasciicircum}{\^{}}
+\DeclareTextCommandDefault{\textasciitilde}{\~{}}
+\DeclareTextCommandDefault{\textcompwordmark}{\leavevmode\kern\z@}
+\DeclareTextCommandDefault{\textunderscore}{%
+ \leavevmode \kern.06em\vbox{\hrule\@width.3em}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textvisiblespace}{%
+ \mbox{\kern.06em\vrule \@height.3ex}%
+ \vbox{\hrule \@width.3em}%
+ \hbox{\vrule \@height.3ex}}
+% \end{macrocode}
+%
+% Using |\fontdimen3| in the next definition is some sort of a
+% kludge (since it is the interword stretch) but it makes the
+% ellipsis come out right in mono-spaced fonts too (since there it
+% is zero).
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textellipsis}{%
+ .\kern\fontdimen3\font
+ .\kern\fontdimen3\font
+ .\kern\fontdimen3\font}
+% \end{macrocode}
+%
+% \changes{v1.9a}{1997/04/30}{Changed \cs{textsc} to \cs{scshape}}
+% \changes{v1.95}{2002/06/18}{Changed def for \cs{textregistered} to
+% avoid small caps (pr/3420)}
+% \begin{macrocode}
+%\DeclareTextCommandDefault{\textregistered}{\textcircled{\scshape r}}
+\DeclareTextCommandDefault{\textregistered}{\textcircled{%
+ \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}
+\DeclareTextCommandDefault{\texttrademark}{\textsuperscript{TM}}
+\DeclareTextCommandDefault{\SS}{SS}
+% \end{macrocode}
+%
+% \changes{v1.9n}{1998/03/05}{Added masc/fem ords as in pr/2579}
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textordfeminine}{\textsuperscript{a}}
+\DeclareTextCommandDefault{\textordmasculine}{\textsuperscript{o}}
+% \end{macrocode}
+%
+% \subsubsection{Math material}
+%
+% Some commands can be used in both text and math mode:
+% \begin{macrocode}
+\DeclareRobustCommand{\$}{\ifmmode\mathdollar\else\textdollar\fi}
+\DeclareRobustCommand{\{}{\ifmmode\lbrace\else\textbraceleft\fi}
+\DeclareRobustCommand{\}}{\ifmmode\rbrace\else\textbraceright\fi}
+\DeclareRobustCommand{\P}{\ifmmode\mathparagraph\else\textparagraph\fi}
+\DeclareRobustCommand{\S}{\ifmmode\mathsection\else\textsection\fi}
+\DeclareRobustCommand{\dag}{\ifmmode{\dagger}\else\textdagger\fi}
+\DeclareRobustCommand{\ddag}{\ifmmode{\ddagger}\else\textdaggerdbl\fi}
+% \end{macrocode}
+%
+% For historical reasons |\copyright|
+% needs |{}| around the definition in maths.
+%
+% \changes{v1.6f}{1994/11/04}{Added \cmd\_.}
+%
+% \changes{v1.9a}{1997/04/30}{Modified \cs{underscore}, removing
+% \cs{mathunderscore}}
+% \changes{v1.9a}{1997/04/30}{Introduced \cs{textcopyright} and modify
+% \cs{copyright}}
+% \begin{macrocode}
+\DeclareRobustCommand{\_}{%
+ \ifmmode\nfss@text{\textunderscore}\else\textunderscore\fi}
+\DeclareRobustCommand{\copyright}{%
+ \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
+\DeclareRobustCommand{\pounds}{%
+ \ifmmode\mathsterling\else\textsterling\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand{\dots}{%
+ \ifmmode\mathellipsis\else\textellipsis\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\ldots\dots
+% \end{macrocode}
+% \changes{v1.99m}{2015/02/16}{Added \cs{textcommabelow} latex/4414}
+% Default definition of the commabelow accent.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/10/01}{\textcommabelow}{comma accent}%
+%<*2ekernel|latexrelease>
+\DeclareTextCommandDefault\textcommabelow[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
+ \hbox{\check@mathfonts\fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\textcommabelow}{comma accent}%
+%<latexrelease>\let\textcommabelow\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-G\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-K\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-k\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-L\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-l\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-N\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-n\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-R\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-r\endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \changes{v1.99n}{2015/02/16}{Added \cs{textcommaabove}}
+% Default definition of the commaabove accent(E.G.).
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2016/02/01}{\textcommaabove}{comma above}%
+%<*2ekernel|latexrelease>
+\DeclareTextCommandDefault\textcommaabove[1]{%
+ \hmode@bgroup
+ \ooalign{%
+ \hidewidth
+ \raise.7ex\hbox{%
+ \check@mathfonts\fontsize\ssf@size\z@\math@fontsfalse\selectfont`%
+ }%
+ \hidewidth\crcr
+ \null#1\crcr
+ }%
+ \egroup
+}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\textcommaabove}{comma above}%
+%<latexrelease>\let\textcommaabove\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\OT1\string\c-g\endcsname\@undefined
+%<latexrelease>\expandafter
+%<latexrelease> \let\csname\string\T1\string\c-g\endcsname\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \changes{v1.6d}{1994/10/30}{Moved math commands here from ltmath.}
+% \changes{v1.6f}{1994/11/04}{Added \cs{mathunderscore}.}
+% \changes{v1.7k}{1995/06/05}{Moved math commands to fontdef.dtx.}
+%
+%
+% \changes{1.4a}{1994/05/01}{Added the \cs{SaveAtCatcode} and
+% \cs{RestoreAtCatcode} commands.}
+%
+% \changes{1.5a}{1994/05/12}{Removed the \cs{SaveAtCatcode} and
+% \cs{RestoreAtCatcode} commands.}
+%
+%
+% \subsection{Definitions for the OT1 encoding}
+%
+% \changes{1.3}{1993/12/17}{Removed all the hackery for use in
+% \cs{DeclareFontEncoding}, and redid everything using
+% \cs{DeclareTextFoo}.}
+% \changes{1.3b}{1993/12/18}{Replaced the missing last argument to
+% \cs{DeclareFontEncoding}.}
+% \changes{1.3c}{1993/12/18}{Rewrote for the new syntax of
+% \cs{EncodingSpecific}.}
+% \changes{1.4a}{1994/05/01}{Rewrote for the new syntax.}
+% \changes{1.5a}{1994/05/12}{Rewrote for the new syntax.}
+% \changes{1.5h}{1994/05/16}{\cs{pounds} was still using u rather than
+% ui shape.}
+% \changes{1.6b}{1994/10/27}{Added:
+% \cs{textemdash}
+% \cs{textendash}
+% \cs{textexclamdown}
+% \cs{texthyphenchar}
+% \cs{texthyphen}
+% \cs{textquestiondown}
+% \cs{textquotedblleft}
+% \cs{textquotedblright}
+% \cs{textquoteleft}
+% \cs{textquoteright}
+% }
+%
+% The definitions for the `\TeX{} text' (OT1) encoding.
+%
+% Declare the encoding.
+% \begin{macrocode}
+%<*OT1>
+\DeclareFontEncoding{OT1}{}{}
+% \end{macrocode}
+% Declare the accents.
+% \begin{macrocode}
+\DeclareTextAccent{\"}{OT1}{127}
+\DeclareTextAccent{\'}{OT1}{19}
+\DeclareTextAccent{\.}{OT1}{95}
+\DeclareTextAccent{\=}{OT1}{22}
+\DeclareTextAccent{\^}{OT1}{94}
+\DeclareTextAccent{\`}{OT1}{18}
+\DeclareTextAccent{\~}{OT1}{126}
+\DeclareTextAccent{\H}{OT1}{125}
+\DeclareTextAccent{\u}{OT1}{21}
+\DeclareTextAccent{\v}{OT1}{20}
+\DeclareTextAccent{\r}{OT1}{23}
+% \end{macrocode}
+% Some accents have to be built by hand:
+% Note that |\ooalign| and |\o@lign| must be inside a group.
+% \changes{v1.7j}{1995/05/21}{Updated some plain macros}
+% \changes{v1.7o}{1995/11/07}{Added \cs{leavevmode} at start of
+% \cs{c}, otherwise the output routine might be invoked within the
+% macro.}
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \changes{v1.99g}{2005/09/27}{Replace \cs{sh@ft} by \cs{ltx@sh@ft}}
+% In these definitions we no longer use the helper function |\sh@ft|
+% from plain.tex since that now has two incompatible definitions.
+% \begin{macrocode}
+\DeclareTextCommand{\b}{OT1}[1]
+ {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}\egroup}
+\DeclareTextCommand{\c}{OT1}[1]
+ {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
+ \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
+\DeclareTextCommand{\d}{OT1}[1]
+ {\hmode@bgroup
+ \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
+% \end{macrocode}
+%
+% Declare the text symbols.
+% \begin{macrocode}
+\DeclareTextSymbol{\AE}{OT1}{29}
+\DeclareTextSymbol{\OE}{OT1}{30}
+\DeclareTextSymbol{\O}{OT1}{31}
+\DeclareTextSymbol{\ae}{OT1}{26}
+\DeclareTextSymbol{\i}{OT1}{16}
+\DeclareTextSymbol{\j}{OT1}{17}
+\DeclareTextSymbol{\oe}{OT1}{27}
+\DeclareTextSymbol{\o}{OT1}{28}
+\DeclareTextSymbol{\ss}{OT1}{25}
+\DeclareTextSymbol{\textemdash}{OT1}{124}
+\DeclareTextSymbol{\textendash}{OT1}{123}
+% \end{macrocode}
+% Using the ligatures helps with OT1 fonts that have
+% |\textexclamdown| and |\textquestiondown| in unusual positions.
+% \changes{v1.95}{2002/06/17}{Definition of \cs{textexclamdown} changed (pr/3368)}
+% \changes{v1.95}{2002/06/17}{Definition of \cs{textquestiondown} changed (pr/3368)}
+% \begin{macrocode}
+%\DeclareTextSymbol{\textexclamdown}{OT1}{60}
+%\DeclareTextSymbol{\textquestiondown}{OT1}{62}
+\DeclareTextCommand{\textexclamdown}{OT1}{!`}
+\DeclareTextCommand{\textquestiondown}{OT1}{?`}
+%\DeclareTextSymbol{\texthyphenchar}{OT1}{`\-}
+%\DeclareTextSymbol{\texthyphen}{OT1}{`\-}
+\DeclareTextSymbol{\textquotedblleft}{OT1}{92}
+\DeclareTextSymbol{\textquotedblright}{OT1}{`\"}
+\DeclareTextSymbol{\textquoteleft}{OT1}{`\`}
+\DeclareTextSymbol{\textquoteright}{OT1}{`\'}
+% \end{macrocode}
+% Some symbols which are faked from others:
+% \changes{v1.7o}{1995/11/07}{Changed \cs{char}32 to \cs{@xxxii} (two
+% tokens less).}
+% \changes{v1.7o}{1995/11/07}{Replaced octal number 27 by decimal
+% number 23 to protect against the quote character being active.}
+% \changes{v1.7o}{1995/11/07}{Replaced some 0's by \cs{z@} (faster).}
+% \changes{v1.8c}{1996/10/27}
+% {Removed \cs{aa} and \cs{AA}}
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \begin{macrocode}
+% \DeclareTextCommand{\aa}{OT1}
+% {{\accent23a}}
+\DeclareTextCommand{\L}{OT1}
+ {\leavevmode\setbox\z@\hbox{L}\hb@xt@\wd\z@{\hss\@xxxii L}}
+\DeclareTextCommand{\l}{OT1}
+ {\hmode@bgroup\@xxxii l\egroup}
+% \DeclareTextCommand{\AA}{OT1}
+% {\leavevmode\setbox\z@\hbox{h}\dimen@\ht\z@\advance\dimen@-1ex%
+% \rlap{\raise.67\dimen@\hbox{\char23}}A}
+% \end{macrocode}
+% In the OT1 encoding \r A has a hand-crafted definition, so we
+% have here the first recorded explicit use of
+% |\DeclareTextCompositeCommand|.
+% \changes{v1.8c}{1996/10/27}
+% {Added \cs{r} A}
+% \changes{v1.96}{2002/10/28}{%
+% coding change, to follow bug fix by DEK in plain.tex (pr/3469)}
+% \changes{v2.0f}{2017/02/19}{%
+% add \cs{@empty} to guard against 3rd argument being empty}
+% \begin{macrocode}
+\DeclareTextCompositeCommand{\r}{OT1}{A}
+ {\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen@-1ex%
+ \rlap{\raise.67\dimen@\hbox{\char23}}A}
+% \end{macrocode}
+% \changes{v1.99h}{2005/11/08}
+% {Added \cs{ij} and \cs{IJ} from babel. (pr/3771)}
+% The dutch language uses the letter `ij'. It is available in
+% \texttt{T1} encoded fonts, but not in the \texttt{OT1} encoded
+% fonts. Therefor we fake it for the \texttt{OT1} encoding.
+% \begin{macrocode}
+\DeclareTextCommand{\ij}{OT1}{%
+ \nobreak\hskip\z@skip i\kern-0.02em j\nobreak\hskip\z@skip}
+\DeclareTextCommand{\IJ}{OT1}{%
+ \nobreak\hskip\z@skip I\kern-0.02em J\nobreak\hskip\z@skip}
+% \end{macrocode}
+% In the OT1 encoding, \pounds~and \$ share a slot.
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \begin{macrocode}
+\DeclareTextCommand{\textdollar}{OT1}{\hmode@bgroup
+ \ifdim \fontdimen\@ne\font >\z@
+ \slshape
+ \else
+ \upshape
+ \fi
+ \char`\$\egroup}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextCommand{\textsterling}{OT1}{\hmode@bgroup
+ \ifdim \fontdimen\@ne\font >\z@
+ \itshape
+ \else
+ \fontshape{ui}\selectfont
+ \fi
+ \char`\$\egroup}
+% \end{macrocode}
+%
+% Here we are adding some more composite commands to the |OT1|
+% encoding. This makes the use of certain accents with |i|
+% compatible with their use with the |T1| encoding; this
+% enables them to become true \LaTeX{} internal representations.
+% However, it will make these accents work a little less fast since
+% a check will always be made for the existence of a composite.
+%
+% \changes{v1.93}{2001/05/28}{Added composites for compatibility with
+% T1, pr/3295}
+% \changes{v1.94}{2001/06/05}{Text composite Commands need kludges for
+% `,' -- see tlb1903.lvt}
+% \begin{macrocode}
+\DeclareTextComposite{\.}{OT1}{i}{`\i}
+\DeclareTextComposite{\.}{OT1}{\i}{`\i}
+\DeclareTextCompositeCommand{\`}{OT1}{i}{\@tabacckludge`\i}
+\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'\i}
+\DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
+\DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}
+% \end{macrocode}
+%
+% T1 encoding is given more extensive set of overloads for \verb|\c|
+% But here we just adjust \verb|\c{g}|.
+% \changes{v1.99n}{2015/02/16}{Added composites for \cs{c}}
+% \changes{v1.99m}{2016/06/19}{OT1 definition (was duplicate T1 definition)}
+% \begin{macrocode}
+\ifx\textcommaabove\@undefined\else
+\DeclareTextCompositeCommand{\c}{OT1}{g}{\textcommaabove{g}}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</OT1>
+% \end{macrocode}
+%
+% \subsection{Definitions for the T1 encoding}
+%
+% \changes{1.3}{1993/12/17}{Removed all the hackery for use in
+% \cs{DeclareFontEncoding}, and redid everything using
+% \cs{DeclareTextFoo}.}
+% \changes{1.3b}{1993/12/18}{Replaced the missing last argument to
+% \cs{DeclareFontEncoding}.}
+% \changes{1.3c}{1993/12/18}{Rewrote for the new syntax of
+% \cs{EncodingSpecific}.}
+% \changes{1.4a}{1994/05/01}{Rewrote for the new syntax.}
+% \changes{1.5a}{1994/05/12}{Rewrote for the new syntax.}
+% \changes{1.6a}{1994/10/25}{Added \cs{textdollar},
+% \cs{textlbrace}, \cs{textrbrace}, \cs{textsterling},
+% \cs{textunderline}.}
+% \changes{1.6a}{1994/10/25}{Removed
+% \cs{textlbrace}, \cs{textrbrace}, \cs{textunderline} to give them
+% their proper names.}
+% \changes{1.6b}{1994/10/27}{Added
+% \cs{textasciicircum}
+% \cs{textasciitilde}
+% \cs{textbackslash}
+% \cs{textbar}
+% \cs{textbraceleft}
+% \cs{textbraceright}
+% \cs{textcompwordmark}
+% \cs{textemdash}
+% \cs{textendash}
+% \cs{textexclamdown}
+% \cs{textgreater}
+% \cs{texthyphenchar}
+% \cs{texthyphen}
+% \cs{textless}
+% \cs{textquestiondown}
+% \cs{textquotedblleft}
+% \cs{textquotedblright}
+% \cs{textquotedbl}
+% \cs{textquoteleft}
+% \cs{textquoteright}
+% \cs{textunderscore}
+% \cs{textvisiblespace}
+% }
+% \changes{v1.9h}{1997/12/17}
+% {Added \cs{textperthousand} and \cs{textpertenthousand}}
+%
+% The definitions for the `Extended \TeX{} text' (T1) encoding.
+%
+% Declare the encoding.
+% \begin{macrocode}
+%<*T1>
+\DeclareFontEncoding{T1}{}{}
+% \end{macrocode}
+% Declare the accents.
+% \begin{macrocode}
+\DeclareTextAccent{\`}{T1}{0}
+\DeclareTextAccent{\'}{T1}{1}
+\DeclareTextAccent{\^}{T1}{2}
+\DeclareTextAccent{\~}{T1}{3}
+\DeclareTextAccent{\"}{T1}{4}
+\DeclareTextAccent{\H}{T1}{5}
+\DeclareTextAccent{\r}{T1}{6}
+\DeclareTextAccent{\v}{T1}{7}
+\DeclareTextAccent{\u}{T1}{8}
+\DeclareTextAccent{\=}{T1}{9}
+\DeclareTextAccent{\.}{T1}{10}
+% \end{macrocode}
+% Some accents have to be built by hand.
+% Note that |\ooalign| and |\o@lign| must be inside a group.
+% \changes{v1.9h}{1997/12/17}{As in OT1, Added \cs{leavevmode} at
+% start of \cs{c}, otherwise the output routine might be invoked
+% within the macro.}
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \changes{v1.95}{2002/06/17}{Corrected \cs{c} for T1 (pr/3442)}
+% \changes{v1.99b}{2004/01/03}{Use \cs{ooalign} for \cs{k} (pr/3532)}
+% \changes{v1.99b}{2004/01/03}{Added \cs{textogonekcentered} (pr/3532)}
+% \changes{v1.99c}{2004/01/04}{More adjustments for ogonek (pr/3532)}
+% \changes{v1.99g}{2005/09/27}{Replace \cs{sh@ft} by \cs{ltx@sh@ft}}
+% In these definitions we no longer use the helper function |\sh@ft|
+% from plain.tex since that now has two incompatible definitions.
+% \begin{macrocode}
+\DeclareTextCommand{\b}{T1}[1]
+ {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
+ \vbox to.2ex{\hbox{\char9}\vss}\hidewidth}\egroup}
+\DeclareTextCommand{\c}{T1}[1]
+ {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent11 #1%
+ \else{\ooalign{\unhbox\z@\crcr
+ \hidewidth\char11\hidewidth}}\fi}
+\DeclareTextCommand{\d}{T1}[1]
+ {\hmode@bgroup
+ \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
+\DeclareTextCommand{\k}{T1}[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\char12}\egroup}
+\DeclareTextCommand{\textogonekcentered}{T1}[1]
+ {\hmode@bgroup\ooalign{%
+ \null#1\crcr\hidewidth\char12\hidewidth}\egroup}
+% \end{macrocode}
+%
+% Some symbols are constructed.
+%
+% \changes{v1.9h}{1997/12/17}
+% {Added \cs{textperthousand} and \cs{textpertenthousand}}
+% Slot 24 contains a small circle intended for construction of
+% these two glyphs.
+%
+% \begin{macrocode}
+\DeclareTextCommand{\textperthousand}{T1}
+ {\%\char 24 } % space or `relax as delimiter?
+\DeclareTextCommand{\textpertenthousand}{T1}
+ {\%\char 24\char 24 } % space or `relax as delimiter?
+% \end{macrocode}
+%
+% For Maltese, \cs{Hwithstroke} and \cs{hwithstroke} are needed.
+%
+% \changes{v2.0k}{2018/11/19}
+% {Added \cs{Hwithstroke} and \cs{hwithstroke}}
+%
+% \begin{macrocode}
+\DeclareTextCommand{\Hwithstroke}{T1}
+ {%
+ \hmode@bgroup
+ \vphantom{H}%
+ \sbox\z@{H}%
+ \ooalign{%
+ H\cr
+ \hidewidth
+ \vrule
+ height \dimexpr 0.7\ht\z@+0.1ex\relax
+ depth -0.7\ht\z@
+ width 0.8\wd\z@
+ \hidewidth\cr
+ }%
+ \egroup
+ }
+\DeclareTextCommand{\hwithstroke}{T1}
+ {%
+ \hmode@bgroup
+ \vphantom{h}%
+ \sbox\z@{h}%
+ \ooalign{%
+ h\cr
+ \kern0.075\wd\z@
+ \vrule
+ height \dimexpr 0.7\ht\z@+0.1ex\relax
+ depth -0.7\ht\z@
+ width 0.4\wd\z@
+ \hidewidth\cr
+ }%
+ \egroup
+ }
+% \end{macrocode}
+%
+% Declare the text symbols.
+% \changes{v1.7t}{1995/11/29}{Added \cs{textasciicircum},
+% \cs{textasciitilde}, \cs{textbackslash}, \cs{textbar},
+% \cs{textgreater} and \cs{textless}.}
+% \changes{v1.8c}{1996/10/27}
+% {Removed \cs{aa} and \cs{AA}}
+% \changes{v1.99h}{2005/11/08}
+% {Added \cs{ij} and \cs{IJ} from babel. (pr/3771)}
+%
+% \begin{macrocode}
+%\DeclareTextSymbol{\AA}{T1}{197}
+\DeclareTextSymbol{\AE}{T1}{198}
+\DeclareTextSymbol{\DH}{T1}{208}
+\DeclareTextSymbol{\DJ}{T1}{208}
+\DeclareTextSymbol{\L}{T1}{138}
+\DeclareTextSymbol{\NG}{T1}{141}
+\DeclareTextSymbol{\OE}{T1}{215}
+\DeclareTextSymbol{\O}{T1}{216}
+\DeclareTextSymbol{\SS}{T1}{223}
+\DeclareTextSymbol{\TH}{T1}{222}
+%\DeclareTextSymbol{\aa}{T1}{229}
+\DeclareTextSymbol{\ae}{T1}{230}
+\DeclareTextSymbol{\dh}{T1}{240}
+\DeclareTextSymbol{\dj}{T1}{158}
+% \end{macrocode}
+% \changes{v2.0j}{2018/08/11}{Provide \cs{guillemetleft} and \cs{guillemetright}}
+% \begin{macrocode}
+\DeclareTextSymbol{\guillemetleft}{T1}{19}
+\DeclareTextSymbol{\guillemetright}{T1}{20}
+% old Adobe names
+\DeclareTextSymbol{\guillemotleft}{T1}{19}
+\DeclareTextSymbol{\guillemotright}{T1}{20}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\guilsinglleft}{T1}{14}
+\DeclareTextSymbol{\guilsinglright}{T1}{15}
+\DeclareTextSymbol{\i}{T1}{25}
+\DeclareTextSymbol{\j}{T1}{26}
+\DeclareTextSymbol{\ij}{T1}{188}
+\DeclareTextSymbol{\IJ}{T1}{156}
+\DeclareTextSymbol{\l}{T1}{170}
+\DeclareTextSymbol{\ng}{T1}{173}
+\DeclareTextSymbol{\oe}{T1}{247}
+\DeclareTextSymbol{\o}{T1}{248}
+\DeclareTextSymbol{\quotedblbase}{T1}{18}
+\DeclareTextSymbol{\quotesinglbase}{T1}{13}
+\DeclareTextSymbol{\ss}{T1}{255}
+\DeclareTextSymbol{\textasciicircum}{T1}{`\^}
+\DeclareTextSymbol{\textasciitilde}{T1}{`\~}
+\DeclareTextSymbol{\textbackslash}{T1}{`\\}
+\DeclareTextSymbol{\textbar}{T1}{`\|}
+\DeclareTextSymbol{\textbraceleft}{T1}{`\{}
+\DeclareTextSymbol{\textbraceright}{T1}{`\}}
+\DeclareTextSymbol{\textcompwordmark}{T1}{23}
+\DeclareTextSymbol{\textdollar}{T1}{`\$}
+\DeclareTextSymbol{\textemdash}{T1}{22}
+\DeclareTextSymbol{\textendash}{T1}{21}
+\DeclareTextSymbol{\textexclamdown}{T1}{189}
+\DeclareTextSymbol{\textgreater}{T1}{`\>}
+%\DeclareTextSymbol{\texthyphenchar}{T1}{127}
+%\DeclareTextSymbol{\texthyphen}{T1}{`\-}
+\DeclareTextSymbol{\textless}{T1}{`\<}
+\DeclareTextSymbol{\textquestiondown}{T1}{190}
+\DeclareTextSymbol{\textquotedblleft}{T1}{16}
+\DeclareTextSymbol{\textquotedblright}{T1}{17}
+\DeclareTextSymbol{\textquotedbl}{T1}{`\"}
+\DeclareTextSymbol{\textquoteleft}{T1}{`\`}
+\DeclareTextSymbol{\textquoteright}{T1}{`\'}
+\DeclareTextSymbol{\textsection}{T1}{159}
+\DeclareTextSymbol{\textsterling}{T1}{191}
+\DeclareTextSymbol{\textunderscore}{T1}{95}
+\DeclareTextSymbol{\textvisiblespace}{T1}{32}
+\DeclareTextSymbol{\th}{T1}{254}
+% \end{macrocode}
+% Declare the composites.
+% \changes{v1.93}{2001/05/28}{Changed the effect of
+% \cs{.}\cs{i}, pr/3295}
+% \begin{macrocode}
+\DeclareTextComposite{\.}{T1}{i}{`\i}
+\DeclareTextComposite{\.}{T1}{\i}{`\i}
+% \end{macrocode}
+% \changes{v1.9c}{1997/05/04}{Added `hex index tabs'}
+% "80 = 128
+% \begin{macrocode}
+\DeclareTextComposite{\u}{T1}{A}{128}
+\DeclareTextComposite{\k}{T1}{A}{129}
+\DeclareTextComposite{\'}{T1}{C}{130}
+\DeclareTextComposite{\v}{T1}{C}{131}
+\DeclareTextComposite{\v}{T1}{D}{132}
+\DeclareTextComposite{\v}{T1}{E}{133}
+\DeclareTextComposite{\k}{T1}{E}{134}
+\DeclareTextComposite{\u}{T1}{G}{135}
+% \end{macrocode}
+% "88 = 136
+% \begin{macrocode}
+\DeclareTextComposite{\'}{T1}{L}{136}
+\DeclareTextComposite{\v}{T1}{L}{137}
+\DeclareTextComposite{\'}{T1}{N}{139}
+\DeclareTextComposite{\v}{T1}{N}{140}
+\DeclareTextComposite{\H}{T1}{O}{142}
+\DeclareTextComposite{\'}{T1}{R}{143}
+% \end{macrocode}
+% "90 = 144
+% \begin{macrocode}
+\DeclareTextComposite{\v}{T1}{R}{144}
+\DeclareTextComposite{\'}{T1}{S}{145}
+\DeclareTextComposite{\v}{T1}{S}{146}
+\DeclareTextComposite{\c}{T1}{S}{147}
+\DeclareTextComposite{\v}{T1}{T}{148}
+\DeclareTextComposite{\c}{T1}{T}{149}
+\DeclareTextComposite{\H}{T1}{U}{150}
+\DeclareTextComposite{\r}{T1}{U}{151}
+% \end{macrocode}
+% "98 = 152
+% \begin{macrocode}
+\DeclareTextComposite{\"}{T1}{Y}{152}
+\DeclareTextComposite{\'}{T1}{Z}{153}
+\DeclareTextComposite{\v}{T1}{Z}{154}
+\DeclareTextComposite{\.}{T1}{Z}{155}
+\DeclareTextComposite{\.}{T1}{I}{157}
+% \end{macrocode}
+% "A0 = 160
+% \begin{macrocode}
+\DeclareTextComposite{\u}{T1}{a}{160}
+\DeclareTextComposite{\k}{T1}{a}{161}
+\DeclareTextComposite{\'}{T1}{c}{162}
+\DeclareTextComposite{\v}{T1}{c}{163}
+\DeclareTextComposite{\v}{T1}{d}{164}
+\DeclareTextComposite{\v}{T1}{e}{165}
+\DeclareTextComposite{\k}{T1}{e}{166}
+\DeclareTextComposite{\u}{T1}{g}{167}
+% \end{macrocode}
+% "A8 = 168
+% \begin{macrocode}
+\DeclareTextComposite{\'}{T1}{l}{168}
+\DeclareTextComposite{\v}{T1}{l}{169}
+\DeclareTextComposite{\'}{T1}{n}{171}
+\DeclareTextComposite{\v}{T1}{n}{172}
+\DeclareTextComposite{\H}{T1}{o}{174}
+\DeclareTextComposite{\'}{T1}{r}{175}
+% \end{macrocode}
+% "B0 = 176
+% \begin{macrocode}
+\DeclareTextComposite{\v}{T1}{r}{176}
+\DeclareTextComposite{\'}{T1}{s}{177}
+\DeclareTextComposite{\v}{T1}{s}{178}
+\DeclareTextComposite{\c}{T1}{s}{179}
+\DeclareTextComposite{\v}{T1}{t}{180}
+\DeclareTextComposite{\c}{T1}{t}{181}
+\DeclareTextComposite{\H}{T1}{u}{182}
+\DeclareTextComposite{\r}{T1}{u}{183}
+% \end{macrocode}
+% "B8 = 184
+% \begin{macrocode}
+\DeclareTextComposite{\"}{T1}{y}{184}
+\DeclareTextComposite{\'}{T1}{z}{185}
+\DeclareTextComposite{\v}{T1}{z}{186}
+\DeclareTextComposite{\.}{T1}{z}{187}
+% \end{macrocode}
+% "C0 = 192
+% \begin{macrocode}
+\DeclareTextComposite{\`}{T1}{A}{192}
+\DeclareTextComposite{\'}{T1}{A}{193}
+\DeclareTextComposite{\^}{T1}{A}{194}
+\DeclareTextComposite{\~}{T1}{A}{195}
+\DeclareTextComposite{\"}{T1}{A}{196}
+\DeclareTextComposite{\r}{T1}{A}{197}
+\DeclareTextComposite{\c}{T1}{C}{199}
+% \end{macrocode}
+% "C8 = 200
+% \begin{macrocode}
+\DeclareTextComposite{\`}{T1}{E}{200}
+\DeclareTextComposite{\'}{T1}{E}{201}
+\DeclareTextComposite{\^}{T1}{E}{202}
+\DeclareTextComposite{\"}{T1}{E}{203}
+\DeclareTextComposite{\`}{T1}{I}{204}
+\DeclareTextComposite{\'}{T1}{I}{205}
+\DeclareTextComposite{\^}{T1}{I}{206}
+\DeclareTextComposite{\"}{T1}{I}{207}
+% \end{macrocode}
+% "D0 = 208
+% \begin{macrocode}
+\DeclareTextComposite{\~}{T1}{N}{209}
+\DeclareTextComposite{\`}{T1}{O}{210}
+\DeclareTextComposite{\'}{T1}{O}{211}
+\DeclareTextComposite{\^}{T1}{O}{212}
+\DeclareTextComposite{\~}{T1}{O}{213}
+\DeclareTextComposite{\"}{T1}{O}{214}
+% \end{macrocode}
+% "D8 = 216
+% \begin{macrocode}
+\DeclareTextComposite{\`}{T1}{U}{217}
+\DeclareTextComposite{\'}{T1}{U}{218}
+\DeclareTextComposite{\^}{T1}{U}{219}
+\DeclareTextComposite{\"}{T1}{U}{220}
+\DeclareTextComposite{\'}{T1}{Y}{221}
+% \end{macrocode}
+% "E0 = 224
+% \begin{macrocode}
+\DeclareTextComposite{\`}{T1}{a}{224}
+\DeclareTextComposite{\'}{T1}{a}{225}
+\DeclareTextComposite{\^}{T1}{a}{226}
+\DeclareTextComposite{\~}{T1}{a}{227}
+\DeclareTextComposite{\"}{T1}{a}{228}
+\DeclareTextComposite{\r}{T1}{a}{229}
+\DeclareTextComposite{\c}{T1}{c}{231}
+% \end{macrocode}
+% "E8 = 232
+% \begin{macrocode}
+\DeclareTextComposite{\`}{T1}{e}{232}
+\DeclareTextComposite{\'}{T1}{e}{233}
+\DeclareTextComposite{\^}{T1}{e}{234}
+\DeclareTextComposite{\"}{T1}{e}{235}
+\DeclareTextComposite{\`}{T1}{i}{236}
+\DeclareTextComposite{\`}{T1}{\i}{236}
+\DeclareTextComposite{\'}{T1}{i}{237}
+\DeclareTextComposite{\'}{T1}{\i}{237}
+\DeclareTextComposite{\^}{T1}{i}{238}
+\DeclareTextComposite{\^}{T1}{\i}{238}
+\DeclareTextComposite{\"}{T1}{i}{239}
+\DeclareTextComposite{\"}{T1}{\i}{239}
+% \end{macrocode}
+% "F0 = 240
+% \begin{macrocode}
+\DeclareTextComposite{\~}{T1}{n}{241}
+\DeclareTextComposite{\`}{T1}{o}{242}
+\DeclareTextComposite{\'}{T1}{o}{243}
+\DeclareTextComposite{\^}{T1}{o}{244}
+\DeclareTextComposite{\~}{T1}{o}{245}
+\DeclareTextComposite{\"}{T1}{o}{246}
+% \end{macrocode}
+% "F8 = 248
+% \begin{macrocode}
+\DeclareTextComposite{\`}{T1}{u}{249}
+\DeclareTextComposite{\'}{T1}{u}{250}
+\DeclareTextComposite{\^}{T1}{u}{251}
+\DeclareTextComposite{\"}{T1}{u}{252}
+\DeclareTextComposite{\'}{T1}{y}{253}
+% \end{macrocode}
+% \changes{v1.99b}{2004/01/03}{Added composites for \cs{k} (pr/3532)}
+% \begin{macrocode}
+\DeclareTextCompositeCommand{\k}{T1}{o}{\textogonekcentered{o}}
+\DeclareTextCompositeCommand{\k}{T1}{O}{\textogonekcentered{O}}
+% \end{macrocode}
+% \changes{v1.99n}{2015/02/16}{Added composites for \c{c}}
+% \begin{macrocode}
+\ifx\textcommaabove\@undefined\else
+\DeclareTextCompositeCommand{\c}{T1}{g}{\textcommaabove{g}}
+\fi
+\ifx\textcommabelow\@undefined\else
+\DeclareTextCompositeCommand{\c}{T1}{G}{\textcommabelow{G}}
+\DeclareTextCompositeCommand{\c}{T1}{K}{\textcommabelow{K}}
+\DeclareTextCompositeCommand{\c}{T1}{k}{\textcommabelow{k}}
+\DeclareTextCompositeCommand{\c}{T1}{L}{\textcommabelow{L}}
+\DeclareTextCompositeCommand{\c}{T1}{l}{\textcommabelow{l}}
+\DeclareTextCompositeCommand{\c}{T1}{N}{\textcommabelow{N}}
+\DeclareTextCompositeCommand{\c}{T1}{n}{\textcommabelow{n}}
+\DeclareTextCompositeCommand{\c}{T1}{R}{\textcommabelow{R}}
+\DeclareTextCompositeCommand{\c}{T1}{r}{\textcommabelow{r}}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</T1>
+% \end{macrocode}
+%
+% \changes{1.4a}{1994/05/01}{Removed the uc/lc table settings, since
+% the T1 uc/lc table is now the default.}
+%
+% \subsection{Definitions for the OMS encoding}
+%
+% \changes{v1.6a}{1994/10/25}{Added the OMS encoding.}
+% \changes{v1.6b}{1994/10/27}{Renamed \cs{textlbrace} to
+% \cs{textbraceleft} and \cs{textrbrace} to \cs{textbraceright}.}
+% \changes{v1.6b}{1994/10/27}{Added \cs{textbackslash}.}
+% \changes{v1.6d}{1994/10/30}{Added \cs{textcircled}.}
+%
+% The definitions for the `\TeX{} math symbol' (OMS) encoding. Even
+% though this is meant to be a math font, it includes some of the
+% standard \LaTeX{} text symbols.
+%
+% Declare the encoding.
+% \begin{macrocode}
+%<*OMS>
+\DeclareFontEncoding{OMS}{}{}
+% \end{macrocode}
+% Declare the symbols.
+% \changes{v1.7t}{1995/11/29}{Added \cs{textbackslash} and
+% \cs{textbar}.}
+% \changes{v1.8c}{1996/10/27}
+% {Added \cs{textasteriskcentered}}
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \changes{v1.95}{2002/06/16}{Added \cs{textbardbl} (pr/3400)}
+% \changes{v1.99}{2004/02/02}{Added \cs{textbigcircle}}
+% Note that slot 13 has in places been named |\Orb|: please root
+% out and destroy this impolity wherever you find it!
+% \begin{macrocode}
+\DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03
+\DeclareTextSymbol{\textbackslash}{OMS}{110} % "6E
+\DeclareTextSymbol{\textbar}{OMS}{106} % "6A
+\DeclareTextSymbol{\textbardbl}{OMS}{107} % "6B
+\DeclareTextSymbol{\textbraceleft}{OMS}{102} % "66
+\DeclareTextSymbol{\textbraceright}{OMS}{103} % "67
+\DeclareTextSymbol{\textbullet}{OMS}{15} % "0F
+\DeclareTextSymbol{\textdaggerdbl}{OMS}{122} % "7A
+\DeclareTextSymbol{\textdagger}{OMS}{121} % "79
+\DeclareTextSymbol{\textparagraph}{OMS}{123} % "7B
+\DeclareTextSymbol{\textperiodcentered}{OMS}{1} % "01
+\DeclareTextSymbol{\textsection}{OMS}{120} % "78
+\DeclareTextSymbol{\textbigcircle}{OMS}{13} % "0D
+\DeclareTextCommand{\textcircled}{OMS}[1]{\hmode@bgroup
+ \ooalign{%
+ \hfil \raise .07ex\hbox {\upshape#1}\hfil \crcr
+ \char 13 % "0D
+ }%
+ \egroup}
+%</OMS>
+% \end{macrocode}
+%
+% \subsection{Definitions for the OML encoding}
+%
+% \changes{v1.6d}{1994/10/30}{Added the OML encoding.}
+%
+% The definitions for the `\TeX{} math italic' (OML) encoding. Even
+% though this is meant to be a math font, it includes some of the
+% standard \LaTeX{} text symbols.
+%
+% Declare the encoding.
+% \begin{macrocode}
+%<*OML>
+\DeclareFontEncoding{OML}{}{}
+% \end{macrocode}
+% Declare the symbols.
+% \changes{v1.7t}{1995/11/29}{Added \cs{textless} and
+% \cs{textgreater}.}
+% \changes{v1.9h}{1997/12/17}{Changed to decimal codes.}
+% \changes{v1.9m}{1998/01/16}{fixed decimal codes. latex/2734}
+% \begin{macrocode}
+\DeclareTextSymbol{\textless}{OML}{`\<}
+\DeclareTextSymbol{\textgreater}{OML}{`\>}
+\DeclareTextAccent{\t}{OML}{127} % "7F
+%</OML>
+% \end{macrocode}
+%
+% \subsection{Definitions for the OT4 encoding}
+%
+% These definitions are for the Polish extension to the
+% `\TeX\ text' (OT1) encoding.
+% This encoding was created by B.~Jackowski and M.~Ry\'cko
+% for use with the Polish version of Computer Modern and Computer
+% Concrete. In positions 0--127 it is identical to OT1 but it
+% contains some additional characters in the upper half. The \LaTeX{}
+% support was developed by Mariusz Olko.
+%
+% The PL fonts that use it are available as follows:\\
+% Metafont sources
+% \texttt{ftp://ftp.gust.org.pl/TeX/language/polish/pl-mf.zip};
+%
+% Font files
+% \texttt{ftp://ftp.gust.org.pl/TeX/language/polish/pl-tfm.zip}.
+%
+% Declare the encoding.
+% \begin{macrocode}
+%<*OT4>
+\DeclareFontEncoding{OT4}{}{}
+\DeclareFontSubstitution{OT4}{cmr}{m}{n}
+% \end{macrocode}
+% Declare the accents.
+% \begin{macrocode}
+\DeclareTextAccent{\"}{OT4}{127}
+\DeclareTextAccent{\'}{OT4}{19}
+\DeclareTextAccent{\.}{OT4}{95}
+\DeclareTextAccent{\=}{OT4}{22}
+\DeclareTextAccent{\^}{OT4}{94}
+\DeclareTextAccent{\`}{OT4}{18}
+\DeclareTextAccent{\~}{OT4}{126}
+\DeclareTextAccent{\H}{OT4}{125}
+\DeclareTextAccent{\u}{OT4}{21}
+\DeclareTextAccent{\v}{OT4}{20}
+\DeclareTextAccent{\r}{OT4}{23}
+% \end{macrocode}
+% The ogonek accent is available only under a e A \& E. But we
+% have to provide some definition for \cs{k}. Some other accents
+% have to be built by hand as in OT1:
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \begin{macrocode}
+\DeclareTextCommand{\k}{OT4}[1]{%
+ \TextSymbolUnavailable{\k{#1}}#1}
+% \end{macrocode}
+% In these definitions we no longer use the helper function |\sh@ft|
+% from plain.tex since that now has two incompatible definitions.
+% \changes{v1.99g}{2005/09/27}{Replace \cs{sh@ft} by \cs{ltx@sh@ft}}
+% \begin{macrocode}
+\DeclareTextCommand{\b}{OT4}[1]
+ {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}\egroup}
+\DeclareTextCommand{\c}{OT4}[1]
+ {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
+ \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
+\DeclareTextCommand{\d}{OT4}[1]
+ {\hmode@bgroup
+ \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
+% \end{macrocode}
+% Declare the text symbols.
+% \begin{macrocode}
+\DeclareTextSymbol{\AE}{OT4}{29}
+\DeclareTextSymbol{\OE}{OT4}{30}
+\DeclareTextSymbol{\O}{OT4}{31}
+\DeclareTextSymbol{\L}{OT4}{138}
+\DeclareTextSymbol{\ae}{OT4}{26}
+% \end{macrocode}
+% \changes{v2.0j}{2018/08/11}{Provide \cs{guillemetleft} and \cs{guillemetright}}
+% \begin{macrocode}
+\DeclareTextSymbol{\guillemetleft}{OT4}{174}
+\DeclareTextSymbol{\guillemetright}{OT4}{175}
+% old Adobe names
+\DeclareTextSymbol{\guillemotleft}{OT4}{174}
+\DeclareTextSymbol{\guillemotright}{OT4}{175}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\i}{OT4}{16}
+\DeclareTextSymbol{\j}{OT4}{17}
+\DeclareTextSymbol{\l}{OT4}{170}
+\DeclareTextSymbol{\o}{OT4}{28}
+\DeclareTextSymbol{\oe}{OT4}{27}
+\DeclareTextSymbol{\quotedblbase}{OT4}{255}
+\DeclareTextSymbol{\ss}{OT4}{25}
+\DeclareTextSymbol{\textemdash}{OT4}{124}
+\DeclareTextSymbol{\textendash}{OT4}{123}
+\DeclareTextSymbol{\textexclamdown}{OT4}{60}
+%\DeclareTextSymbol{\texthyphenchar}{OT4}{`\-}
+%\DeclareTextSymbol{\texthyphen}{OT4}{`\-}
+\DeclareTextSymbol{\textquestiondown}{OT4}{62}
+\DeclareTextSymbol{\textquotedblleft}{OT4}{92}
+\DeclareTextSymbol{\textquotedblright}{OT4}{`\"}
+\DeclareTextSymbol{\textquoteleft}{OT4}{`\`}
+\DeclareTextSymbol{\textquoteright}{OT4}{`\'}
+% \end{macrocode}
+% Definition for \r A as in OT1:
+% \changes{v1.96}{2002/10/28}{%
+% coding change, to follow bug fix by DEK in plain.tex (pr/3469)}
+% \begin{macrocode}
+\DeclareTextCompositeCommand{\r}{OT4}{A}
+ {\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen@-1ex%
+ \rlap{\raise.67\dimen@\hbox{\char23}}A}
+% \end{macrocode}
+% In the OT4 encoding, \pounds~and \$ share a slot.
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \begin{macrocode}
+\DeclareTextCommand{\textdollar}{OT4}{\hmode@bgroup
+ \ifdim \fontdimen\@ne\font >\z@
+ \slshape
+ \else
+ \upshape
+ \fi
+ \char`\$\egroup}
+\DeclareTextCommand{\textsterling}{OT4}{\hmode@bgroup
+ \ifdim \fontdimen\@ne\font >\z@
+ \itshape
+ \else
+ \fontshape{ui}\selectfont
+ \fi
+ \char`\$\egroup}
+% \end{macrocode}
+% Declare the composites.
+% \begin{macrocode}
+\DeclareTextComposite{\k}{OT4}{A}{129}
+\DeclareTextComposite{\'}{OT4}{C}{130}
+\DeclareTextComposite{\k}{OT4}{E}{134}
+\DeclareTextComposite{\'}{OT4}{N}{139}
+\DeclareTextComposite{\'}{OT4}{S}{145}
+\DeclareTextComposite{\'}{OT4}{Z}{153}
+\DeclareTextComposite{\.}{OT4}{Z}{155}
+\DeclareTextComposite{\k}{OT4}{a}{161}
+\DeclareTextComposite{\'}{OT4}{c}{162}
+\DeclareTextComposite{\k}{OT4}{e}{166}
+\DeclareTextComposite{\'}{OT4}{n}{171}
+\DeclareTextComposite{\'}{OT4}{s}{177}
+\DeclareTextComposite{\'}{OT4}{z}{185}
+\DeclareTextComposite{\.}{OT4}{z}{187}
+\DeclareTextComposite{\'}{OT4}{O}{211}
+\DeclareTextComposite{\'}{OT4}{o}{243}
+%</OT4>
+% \end{macrocode}
+%
+%
+% \subsection{Definitions for the TS1 encoding}
+%
+% \changes{v1.9c}{1997/05/04}{Added TS1 encoding v2.2.beta}
+% \changes{v1.9g}{1997/11/23}
+% {Use \cs{textperthousand}, \cs{textpertenthousand} and
+% \cs{textfractionsolidus} not
+% \cs{textpermill}, \cs{textpertenmill} and \cs{textfraction}.
+% /2673 }
+% \changes{v1.9h}{1997/12/17}
+% {Removed default settings, see next section.}
+%
+% \begin{macrocode}
+%<*TS1>
+\DeclareFontEncoding{TS1}{}{}
+\DeclareFontSubstitution{TS1}{cmr}{m}{n}
+% \end{macrocode}
+% Some accents have to be built by hand.
+% Note that |\ooalign| and |\o@lign| must be inside a group.
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \begin{macrocode}
+\DeclareTextCommand{\capitalcedilla}{TS1}[1]
+ {\hmode@bgroup
+ \ooalign{\null#1\crcr\hidewidth\char11\hidewidth}\egroup}
+\DeclareTextCommand{\capitalogonek}{TS1}[1]
+ {\hmode@bgroup
+ \ooalign{\null#1\crcr\hidewidth\char12\hidewidth}\egroup}
+% \end{macrocode}
+%
+% Accents for capital letters.
+%
+% These commands can be used by the end user either directly or through
+% definitions of the type
+% \begin{verbatim}
+% \DeclareTextCompositeCommand{\'}{T1}{X}{\capitalacute X}
+% \end{verbatim}
+% None of the latter definitions are provided by default, since they
+% are probably rarely used.
+%
+% "00 = 0
+% \begin{macrocode}
+\DeclareTextAccent{\capitalgrave}{TS1}{0}
+\DeclareTextAccent{\capitalacute}{TS1}{1}
+\DeclareTextAccent{\capitalcircumflex}{TS1}{2}
+\DeclareTextAccent{\capitaltilde}{TS1}{3}
+\DeclareTextAccent{\capitaldieresis}{TS1}{4}
+\DeclareTextAccent{\capitalhungarumlaut}{TS1}{5}
+\DeclareTextAccent{\capitalring}{TS1}{6}
+\DeclareTextAccent{\capitalcaron}{TS1}{7}
+% \end{macrocode}
+% "08 = 8
+% \begin{macrocode}
+\DeclareTextAccent{\capitalbreve}{TS1}{8}
+\DeclareTextAccent{\capitalmacron}{TS1}{9}
+\DeclareTextAccent{\capitaldotaccent}{TS1}{10}
+% \end{macrocode}
+% Tie accents.
+%
+% The tie accent was borrowed from the |cmmi| font. The tc fonts
+% now provide four tie accents, the first two are done in the
+% classical way with assymetric glyphs hanging out of their boxes;
+% the new ties are centered in their boxes like all other accents.
+% They need a name: please tell us if you know what to call them.
+%
+% " =
+% \begin{macrocode}
+\DeclareTextAccent{\t}{TS1}{26}
+\DeclareTextAccent{\capitaltie}{TS1}{27}
+\DeclareTextAccent{\newtie}{TS1}{28}
+\DeclareTextAccent{\capitalnewtie}{TS1}{29}
+% \end{macrocode}
+%
+% Compund word marks.
+%
+% The text companion fonts contain two compound word marks of
+% different heights, one has |cap_height|, the other |asc_height|.
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textcapitalcompwordmark}{TS1}{23}
+\DeclareTextSymbol{\textascendercompwordmark}{TS1}{31}
+% \end{macrocode}
+%
+% The text companion symbols.
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textquotestraightbase}{TS1}{13}
+% \end{macrocode}
+% "10 = 16
+% \begin{macrocode}
+\DeclareTextSymbol{\textquotestraightdblbase}{TS1}{18}
+\DeclareTextSymbol{\texttwelveudash}{TS1}{21}
+\DeclareTextSymbol{\textthreequartersemdash}{TS1}{22}
+% \end{macrocode}
+% "18 = 24
+% \begin{macrocode}
+\DeclareTextSymbol{\textleftarrow}{TS1}{24}
+\DeclareTextSymbol{\textrightarrow}{TS1}{25}
+% \end{macrocode}
+% "20 = 32
+% \begin{macrocode}
+\DeclareTextSymbol{\textblank}{TS1}{32}
+\DeclareTextSymbol{\textdollar}{TS1}{36}
+\DeclareTextSymbol{\textquotesingle}{TS1}{39}
+% \end{macrocode}
+% "28 = 40
+% \begin{macrocode}
+\DeclareTextSymbol{\textasteriskcentered}{TS1}{42}
+% \end{macrocode}
+% Note that '054 is a comma and '056 is a full stop: these make
+% numbers using oldstyle digits easier to input.
+% \begin{macrocode}
+\DeclareTextSymbol{\textdblhyphen}{TS1}{45}
+\DeclareTextSymbol{\textfractionsolidus}{TS1}{47}
+% \end{macrocode}
+%
+% Oldstyle digits.
+%
+% "30 = 48
+% \begin{macrocode}
+\DeclareTextSymbol{\textzerooldstyle}{TS1}{48}
+\DeclareTextSymbol{\textoneoldstyle}{TS1}{49}
+\DeclareTextSymbol{\texttwooldstyle}{TS1}{50}
+\DeclareTextSymbol{\textthreeoldstyle}{TS1}{51}
+\DeclareTextSymbol{\textfouroldstyle}{TS1}{52}
+\DeclareTextSymbol{\textfiveoldstyle}{TS1}{53}
+\DeclareTextSymbol{\textsixoldstyle}{TS1}{54}
+\DeclareTextSymbol{\textsevenoldstyle}{TS1}{55}
+% \end{macrocode}
+% "38 = 56
+% \begin{macrocode}
+\DeclareTextSymbol{\texteightoldstyle}{TS1}{56}
+\DeclareTextSymbol{\textnineoldstyle}{TS1}{57}
+% \end{macrocode}
+%
+% More text companion symbols.
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textlangle}{TS1}{60}
+\DeclareTextSymbol{\textminus}{TS1}{61}
+\DeclareTextSymbol{\textrangle}{TS1}{62}
+% \end{macrocode}
+% "48 = 72
+% \begin{macrocode}
+\DeclareTextSymbol{\textmho}{TS1}{77}
+% \end{macrocode}
+%
+% \changes{v1.9r}{1999/01/06}{Minor documentation fix.}
+% The big circle is here to define the command \cs{textcircled}.
+% Formerly it was taken from the |cmsy| font.
+% \changes{v1.9h}{1997/12/17}{Changed to decimal codes in \cs{ooalign}.}
+% \changes{v1.9k}{1998/01/12}{Adding missing braces and \cs{ushape}.}
+% \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
+% (pr/3160)}
+% \begin{macrocode}
+\DeclareTextSymbol{\textbigcircle}{TS1}{79}
+\DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
+ \ooalign{%
+ \hfil \raise .07ex\hbox {\upshape#1}\hfil \crcr
+ \char 79 % '117 = "4F
+ }%
+ \egroup}
+% \end{macrocode}
+%
+% More text companion symbols.
+%
+% "50 = 80
+% \begin{macrocode}
+\DeclareTextSymbol{\textohm}{TS1}{87}
+% \end{macrocode}
+% "58 = 88
+% \begin{macrocode}
+\DeclareTextSymbol{\textlbrackdbl}{TS1}{91}
+\DeclareTextSymbol{\textrbrackdbl}{TS1}{93}
+\DeclareTextSymbol{\textuparrow}{TS1}{94}
+\DeclareTextSymbol{\textdownarrow}{TS1}{95}
+% \end{macrocode}
+% "60 = 96
+% \begin{macrocode}
+\DeclareTextSymbol{\textasciigrave}{TS1}{96}
+\DeclareTextSymbol{\textborn}{TS1}{98}
+\DeclareTextSymbol{\textdivorced}{TS1}{99}
+\DeclareTextSymbol{\textdied}{TS1}{100}
+% \end{macrocode}
+% "68 = 104
+% \begin{macrocode}
+\DeclareTextSymbol{\textleaf}{TS1}{108}
+\DeclareTextSymbol{\textmarried}{TS1}{109}
+\DeclareTextSymbol{\textmusicalnote}{TS1}{110}
+% \end{macrocode}
+% "78 = 120
+% \begin{macrocode}
+\DeclareTextSymbol{\texttildelow}{TS1}{126}
+% \end{macrocode}
+%
+% This glyph, |\textdblhyphenchar| is hanging, like the hyphenchar of
+% the ec fonts.
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textdblhyphenchar}{TS1}{127}
+% \end{macrocode}
+% "80 = 128
+% \begin{macrocode}
+\DeclareTextSymbol{\textasciibreve}{TS1}{128}
+\DeclareTextSymbol{\textasciicaron}{TS1}{129}
+% \end{macrocode}
+%
+% This next glyph is \emph{not} the same as |\textquotedbl|.
+%
+% \changes{v1.9p}{1998/06/12}{Corrected 130 and 131, see pr/2834}
+% \begin{macrocode}
+\DeclareTextSymbol{\textacutedbl}{TS1}{130}
+\DeclareTextSymbol{\textgravedbl}{TS1}{131}
+\DeclareTextSymbol{\textdagger}{TS1}{132}
+\DeclareTextSymbol{\textdaggerdbl}{TS1}{133}
+\DeclareTextSymbol{\textbardbl}{TS1}{134}
+\DeclareTextSymbol{\textperthousand}{TS1}{135}
+% \end{macrocode}
+% "88 = 136
+% \begin{macrocode}
+\DeclareTextSymbol{\textbullet}{TS1}{136}
+\DeclareTextSymbol{\textcelsius}{TS1}{137}
+\DeclareTextSymbol{\textdollaroldstyle}{TS1}{138}
+\DeclareTextSymbol{\textcentoldstyle}{TS1}{139}
+\DeclareTextSymbol{\textflorin}{TS1}{140}
+\DeclareTextSymbol{\textcolonmonetary}{TS1}{141}
+\DeclareTextSymbol{\textwon}{TS1}{142}
+\DeclareTextSymbol{\textnaira}{TS1}{143}
+% \end{macrocode}
+% "90 = 144
+% \begin{macrocode}
+\DeclareTextSymbol{\textguarani}{TS1}{144}
+\DeclareTextSymbol{\textpeso}{TS1}{145}
+\DeclareTextSymbol{\textlira}{TS1}{146}
+\DeclareTextSymbol{\textrecipe}{TS1}{147}
+\DeclareTextSymbol{\textinterrobang}{TS1}{148}
+\DeclareTextSymbol{\textinterrobangdown}{TS1}{149}
+\DeclareTextSymbol{\textdong}{TS1}{150}
+\DeclareTextSymbol{\texttrademark}{TS1}{151}
+% \end{macrocode}
+% "98 = 152
+% \begin{macrocode}
+\DeclareTextSymbol{\textpertenthousand}{TS1}{152}
+\DeclareTextSymbol{\textpilcrow}{TS1}{153}
+\DeclareTextSymbol{\textbaht}{TS1}{154}
+\DeclareTextSymbol{\textnumero}{TS1}{155}
+% \end{macrocode}
+% This next name may change.
+% For the following sign we know only a german name, which is
+% abz\"uglich. The meaning is something like ``commercial minus''.
+% An ASCII ersatz is ./. (dot slash dot).
+% The temporary English name is |\textdiscount|.
+% \begin{macrocode}
+\DeclareTextSymbol{\textdiscount}{TS1}{156}
+\DeclareTextSymbol{\textestimated}{TS1}{157}
+\DeclareTextSymbol{\textopenbullet}{TS1}{158}
+\DeclareTextSymbol{\textservicemark}{TS1}{159}
+% \end{macrocode}
+% "A0 = 160
+% \begin{macrocode}
+\DeclareTextSymbol{\textlquill}{TS1}{160}
+\DeclareTextSymbol{\textrquill}{TS1}{161}
+\DeclareTextSymbol{\textcent}{TS1}{162}
+\DeclareTextSymbol{\textsterling}{TS1}{163}
+\DeclareTextSymbol{\textcurrency}{TS1}{164}
+\DeclareTextSymbol{\textyen}{TS1}{165}
+\DeclareTextSymbol{\textbrokenbar}{TS1}{166}
+\DeclareTextSymbol{\textsection}{TS1}{167}
+% \end{macrocode}
+% "A8 = 168
+% \begin{macrocode}
+\DeclareTextSymbol{\textasciidieresis}{TS1}{168}
+\DeclareTextSymbol{\textcopyright}{TS1}{169}
+\DeclareTextSymbol{\textordfeminine}{TS1}{170}
+\DeclareTextSymbol{\textcopyleft}{TS1}{171}
+\DeclareTextSymbol{\textlnot}{TS1}{172}
+% \end{macrocode}
+%
+% The meaning of the circled-P is ``sound recording copyright''.
+%
+% \changes{v1.9p}{1998/06/12}{Renamed \cs{textmacron} pr/2840}
+% \begin{macrocode}
+\DeclareTextSymbol{\textcircledP}{TS1}{173}
+\DeclareTextSymbol{\textregistered}{TS1}{174}
+\DeclareTextSymbol{\textasciimacron}{TS1}{175}
+% \end{macrocode}
+% "B0 = 176
+% \begin{macrocode}
+\DeclareTextSymbol{\textdegree}{TS1}{176}
+\DeclareTextSymbol{\textpm}{TS1}{177}
+\DeclareTextSymbol{\texttwosuperior}{TS1}{178}
+\DeclareTextSymbol{\textthreesuperior}{TS1}{179}
+\DeclareTextSymbol{\textasciiacute}{TS1}{180}
+\DeclareTextSymbol{\textmu}{TS1}{181} % micro sign
+\DeclareTextSymbol{\textparagraph}{TS1}{182}
+\DeclareTextSymbol{\textperiodcentered}{TS1}{183}
+% \end{macrocode}
+% "B8 = 184
+% \begin{macrocode}
+\DeclareTextSymbol{\textreferencemark}{TS1}{184}
+\DeclareTextSymbol{\textonesuperior}{TS1}{185}
+\DeclareTextSymbol{\textordmasculine}{TS1}{186}
+\DeclareTextSymbol{\textsurd}{TS1}{187}
+\DeclareTextSymbol{\textonequarter}{TS1}{188}
+\DeclareTextSymbol{\textonehalf}{TS1}{189}
+\DeclareTextSymbol{\textthreequarters}{TS1}{190}
+\DeclareTextSymbol{\texteuro}{TS1}{191}
+% \end{macrocode}
+% "E0 = 208
+% \begin{macrocode}
+\DeclareTextSymbol{\texttimes}{TS1}{214}
+% \end{macrocode}
+% "F0 = 240
+% \begin{macrocode}
+\DeclareTextSymbol{\textdiv}{TS1}{246}
+%</TS1>
+% \end{macrocode}
+%
+% \subsection{Definitions for the TU encoding}
+%
+% \changes{v2.0a}{2016/12/04}{Added TU encoding}
+% \changes{v2.0b}{2017/01/23}{Added TU specific commands in ASCII range pr/4500}
+% \changes{v2.0c}{2017/01/24}{TeX ligature syntax for xetex and luatex reversed}
+% \changes{v2.0c}{2017/01/24}{Make \cs{textasteriskcentered} U+2217 not U+204E}
+% \changes{v2.0c}{2017/01/24}{Declare TU composites for i and j}
+% \changes{v2.0d}{2017/01/24}{Declare macron composites for YyGg}
+% \changes{v2.0e}{2017/02/12}{Declare fallback code for \cs{textasteriskcentered}}
+% \changes{v2.0f}{2017/02/19}{%
+% declare composites with empty base for hat and tilde,
+% use same slots for \cs{textasciicircum} ans \cs{textasciitilde}}
+% \changes{v2.0f}{2017/02/19}{%
+% declare straight quotes using new \cs{remove@tlig} command}
+% \changes{v2.0g}{2017/02/22}{Fix typo introduced at 2.0f}
+% \changes{v2.0h}{2017/02/24}{introduce \cs{DeclareUnicodeAccent}}%
+% The TU encoding was originally introduced in the contributed
+% package \texttt{fontspec} as a Unicode encoding for XeTeX and
+% LuaTeX.
+%
+% Normally for these engines, the input consists of Unicode characters
+% encoded in UTF-8. There is therefore little need to use the
+% traditional (ASCII) encoding-specific commands
+%
+% However, sometimes (e.g. for backwards compatibility) it can be
+% useful to access these Unicode characters via such ASCII-based
+% markup. The commands provided here
+% Cover the characters in the T1 and TS1 encodings, but specified in
+% Unicode position. Almost all the command names have been
+% mechanically extracted form the \texttt{inputenc} UTF-8 support,
+% which is essentially doing a reverse mapping from UTF-8 data to
+% \LaTeX\ LICR commands.
+%
+% A few additional names for character which were supported in the
+% original \texttt{fontspec} version of this file have also been
+% added, even though they are not currently in the default
+% \texttt{inputenc} UTF-8 declarations.
+%
+% \begin{macrocode}
+%<*TU>
+% \end{macrocode}
+% In the base interface the Unicode encoding is always known as TU
+% But we parameterise the encoding name to allow for modelling
+% differences in Unicode support by different fonts.
+% \begin{macrocode}
+\providecommand\UnicodeEncodingName{TU}
+% \end{macrocode}
+% As the Unicode encoding, TU, is only currently available with XeTeX
+% or LuaTeX, we detect these engines first, and make adjustments for the
+% differing font loading syntax. For other engines, we issue a warning
+% then abort this file, switching back to T1 encoding.
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname XeTeXrevision\endcsname\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname directlua\endcsname\relax
+% \end{macrocode}
+%
+% Not LuaTeX or XeTeX, abort with a warning.
+% \begin{macrocode}
+ \PackageWarningNoLine{fontenc}
+ {\UnicodeEncodingName\space
+ encoding is only available with XeTeX and LuaTeX.\MessageBreak
+ Defaulting to T1 encoding}
+ \def\encodingdefault{T1}
+ \expandafter\expandafter\expandafter\endinput
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+%
+% LuaTeX.
+% \begin{macrocode}
+ \def\UnicodeFontTeXLigatures{+tlig;}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\reserved@a#1{%
+ \def\@remove@tlig##1{\@remove@tlig@##1\@nil#1\@nil\relax}
+ \def\@remove@tlig@##1#1{\@remove@tlig@@##1}}
+ \edef\reserved@b{\detokenize{+tlig;}}
+ \expandafter\reserved@a\expandafter{\reserved@b}
+ \def\@remove@tlig@@#1\@nil#2\relax{#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\remove@tlig#1{%
+ \begingroup
+ \font\remove@tlig
+ \expandafter\@remove@tlig\expandafter{\fontname\font}%
+ \remove@tlig
+ \char#1\relax
+ \endgroup
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \fi
+\else
+% \end{macrocode}
+%
+% XeTeX
+% \begin{macrocode}
+ \def\UnicodeFontTeXLigatures{mapping=tex-text;}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\remove@tlig#1{\XeTeXglyph\numexpr\XeTeXcharglyph#1\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\UnicodeFontFile#1#2{"[#1]:#2"}
+\def\UnicodeFontName#1#2{"#1:#2"}
+% \end{macrocode}
+%
+% Declare the encoding
+% \begin{macrocode}
+\DeclareFontEncoding\UnicodeEncodingName{}{}
+% \end{macrocode}
+%
+% Declare accent command to use a postpended combining character
+% rather than the TeX |\accent| primitive
+% \begin{macrocode}
+\def\add@unicode@accent#1#2{%
+ \if\relax\detokenize{#2}\relax^^a0\else#2\fi
+ \char#1\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\DeclareUnicodeAccent#1#2#3{%
+ \DeclareTextCommand{#1}{#2}{\add@unicode@accent{#3}}%
+}
+% \end{macrocode}
+%
+% Wrapper around |\DeclareTextCompositeCommand| that uses the declared
+% composite if it exists in the current font or falls back to the default
+% definition for the TU accent if not.
+% \begin{macrocode}
+{
+\catcode\z@=11\relax
+\gdef\DeclareUnicodeComposite#1#2#3{%
+ \def\reserved@a##1##2{%
+ \DeclareTextCompositeCommand#1\UnicodeEncodingName{#2}{%
+ \iffontchar\font#3 ##2%
+ \else ##1\fi}}%
+ \expandafter\expandafter\expandafter\extract@default@composite
+ \csname\UnicodeEncodingName\string#1\endcsname{#2}\@nil
+ \bgroup
+ \lccode\z@#3 %
+ \lowercase{\egroup
+ \expandafter\reserved@a\expandafter{\reserved@b}{^^@}}}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\extract@default@composite#1{%
+ \ifx\@text@composite#1%
+ \expandafter\extract@default@composite@a
+ \else
+ \expandafter\extract@default@composite@b\expandafter#1%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\extract@default@composite@a#1\@text@composite#2\@nil{%
+ \def\reserved@b{#2}}
+\def\extract@default@composite@b#1#2\@nil{%
+ \def\reserved@b{#1#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextCommand\textquotesingle \UnicodeEncodingName{%
+ \remove@tlig{"0027}}
+\DeclareTextCommand\textasciigrave \UnicodeEncodingName{%
+ \remove@tlig{"0060}}
+\DeclareTextCommand\textquotedbl \UnicodeEncodingName{%
+ \remove@tlig{"0022}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textdollar} \UnicodeEncodingName{"0024}
+\DeclareTextSymbol{\textless} \UnicodeEncodingName{"003C}
+\DeclareTextSymbol{\textgreater} \UnicodeEncodingName{"003E}
+\DeclareTextSymbol{\textbackslash} \UnicodeEncodingName{"005C}
+\DeclareTextSymbol{\textasciicircum} \UnicodeEncodingName{"005E}
+\DeclareTextSymbol{\textunderscore} \UnicodeEncodingName{"005F}
+\DeclareTextSymbol{\textbraceleft} \UnicodeEncodingName{"007B}
+\DeclareTextSymbol{\textbar} \UnicodeEncodingName{"007C}
+\DeclareTextSymbol{\textbraceright} \UnicodeEncodingName{"007D}
+\DeclareTextSymbol{\textasciitilde} \UnicodeEncodingName{"007E}
+\DeclareTextSymbol{\textexclamdown} \UnicodeEncodingName{"00A1}
+\DeclareTextSymbol{\textcent} \UnicodeEncodingName{"00A2}
+\DeclareTextSymbol{\textsterling} \UnicodeEncodingName{"00A3}
+\DeclareTextSymbol{\textcurrency} \UnicodeEncodingName{"00A4}
+\DeclareTextSymbol{\textyen} \UnicodeEncodingName{"00A5}
+\DeclareTextSymbol{\textbrokenbar} \UnicodeEncodingName{"00A6}
+\DeclareTextSymbol{\textsection} \UnicodeEncodingName{"00A7}
+\DeclareTextSymbol{\textasciidieresis} \UnicodeEncodingName{"00A8}
+\DeclareTextSymbol{\textcopyright} \UnicodeEncodingName{"00A9}
+\DeclareTextSymbol{\textordfeminine} \UnicodeEncodingName{"00AA}
+% \end{macrocode}
+% \changes{v2.0j}{2018/08/11}{Provide \cs{guillemetleft} and \cs{guillemetright}}
+% \begin{macrocode}
+\DeclareTextSymbol{\guillemetleft} \UnicodeEncodingName{"00AB}
+% old Adobe name
+\DeclareTextSymbol{\guillemotleft} \UnicodeEncodingName{"00AB}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textlnot} \UnicodeEncodingName{"00AC}
+\DeclareTextSymbol{\textregistered} \UnicodeEncodingName{"00AE}
+\DeclareTextSymbol{\textasciimacron} \UnicodeEncodingName{"00AF}
+\DeclareTextSymbol{\textdegree} \UnicodeEncodingName{"00B0}
+\DeclareTextSymbol{\textpm} \UnicodeEncodingName{"00B1}
+\DeclareTextSymbol{\texttwosuperior} \UnicodeEncodingName{"00B2}
+\DeclareTextSymbol{\textthreesuperior} \UnicodeEncodingName{"00B3}
+\DeclareTextSymbol{\textasciiacute} \UnicodeEncodingName{"00B4}
+\DeclareTextSymbol{\textmu} \UnicodeEncodingName{"00B5}
+\DeclareTextSymbol{\textparagraph} \UnicodeEncodingName{"00B6}
+\DeclareTextSymbol{\textperiodcentered} \UnicodeEncodingName{"00B7}
+\DeclareTextSymbol{\textonesuperior} \UnicodeEncodingName{"00B9}
+\DeclareTextSymbol{\textordmasculine} \UnicodeEncodingName{"00BA}
+% \end{macrocode}
+% \changes{v2.0j}{2018/08/11}{Provide \cs{guillemetleft} and \cs{guillemetright}}
+% \begin{macrocode}
+\DeclareTextSymbol{\guillemetright} \UnicodeEncodingName{"00BB}
+% old Adobe name
+\DeclareTextSymbol{\guillemotright} \UnicodeEncodingName{"00BB}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareTextSymbol{\textonequarter} \UnicodeEncodingName{"00BC}
+\DeclareTextSymbol{\textonehalf} \UnicodeEncodingName{"00BD}
+\DeclareTextSymbol{\textthreequarters} \UnicodeEncodingName{"00BE}
+\DeclareTextSymbol{\textquestiondown} \UnicodeEncodingName{"00BF}
+\DeclareTextSymbol{\AE} \UnicodeEncodingName{"00C6}
+\DeclareTextSymbol{\DH} \UnicodeEncodingName{"00D0}
+\DeclareTextSymbol{\texttimes} \UnicodeEncodingName{"00D7}
+\DeclareTextSymbol{\O} \UnicodeEncodingName{"00D8}
+\DeclareTextSymbol{\TH} \UnicodeEncodingName{"00DE}
+\DeclareTextSymbol{\ss} \UnicodeEncodingName{"00DF}
+\DeclareTextSymbol{\ae} \UnicodeEncodingName{"00E6}
+\DeclareTextSymbol{\dh} \UnicodeEncodingName{"00F0}
+\DeclareTextSymbol{\textdiv} \UnicodeEncodingName{"00F7}
+\DeclareTextSymbol{\o} \UnicodeEncodingName{"00F8}
+\DeclareTextSymbol{\th} \UnicodeEncodingName{"00FE}
+\DeclareTextSymbol{\DJ} \UnicodeEncodingName{"0110}
+\DeclareTextSymbol{\dj} \UnicodeEncodingName{"0111}
+\DeclareTextSymbol{\i} \UnicodeEncodingName{"0131}
+\DeclareTextSymbol{\IJ} \UnicodeEncodingName{"0132}
+\DeclareTextSymbol{\ij} \UnicodeEncodingName{"0133}
+\DeclareTextSymbol{\L} \UnicodeEncodingName{"0141}
+\DeclareTextSymbol{\l} \UnicodeEncodingName{"0142}
+\DeclareTextSymbol{\NG} \UnicodeEncodingName{"014A}
+\DeclareTextSymbol{\ng} \UnicodeEncodingName{"014B}
+\DeclareTextSymbol{\OE} \UnicodeEncodingName{"0152}
+\DeclareTextSymbol{\oe} \UnicodeEncodingName{"0153}
+\DeclareTextSymbol{\textflorin} \UnicodeEncodingName{"0192}
+\DeclareTextSymbol{\j} \UnicodeEncodingName{"0237}
+\DeclareTextSymbol{\textasciicaron} \UnicodeEncodingName{"02C7}
+\DeclareTextSymbol{\textasciibreve} \UnicodeEncodingName{"02D8}
+\DeclareTextSymbol{\textacutedbl} \UnicodeEncodingName{"02DD}
+\DeclareTextSymbol{\textgravedbl} \UnicodeEncodingName{"02F5}
+\DeclareTextSymbol{\texttildelow} \UnicodeEncodingName{"02F7}
+\DeclareTextSymbol{\textbaht} \UnicodeEncodingName{"0E3F}
+\DeclareTextSymbol{\SS} \UnicodeEncodingName{"1E9E}
+\DeclareTextSymbol{\textcompwordmark} \UnicodeEncodingName{"200C}
+\DeclareTextSymbol{\textendash} \UnicodeEncodingName{"2013}
+\DeclareTextSymbol{\textemdash} \UnicodeEncodingName{"2014}
+\DeclareTextSymbol{\textbardbl} \UnicodeEncodingName{"2016}
+\DeclareTextSymbol{\textquoteleft} \UnicodeEncodingName{"2018}
+\DeclareTextSymbol{\textquoteright} \UnicodeEncodingName{"2019}
+\DeclareTextSymbol{\quotesinglbase} \UnicodeEncodingName{"201A}
+\DeclareTextSymbol{\textquotedblleft} \UnicodeEncodingName{"201C}
+\DeclareTextSymbol{\textquotedblright} \UnicodeEncodingName{"201D}
+\DeclareTextSymbol{\quotedblbase} \UnicodeEncodingName{"201E}
+\DeclareTextSymbol{\textdagger} \UnicodeEncodingName{"2020}
+\DeclareTextSymbol{\textdaggerdbl} \UnicodeEncodingName{"2021}
+\DeclareTextSymbol{\textbullet} \UnicodeEncodingName{"2022}
+\DeclareTextSymbol{\textellipsis} \UnicodeEncodingName{"2026}
+\DeclareTextSymbol{\textperthousand} \UnicodeEncodingName{"2030}
+\DeclareTextSymbol{\textpertenthousand} \UnicodeEncodingName{"2031}
+\DeclareTextSymbol{\guilsinglleft} \UnicodeEncodingName{"2039}
+\DeclareTextSymbol{\guilsinglright} \UnicodeEncodingName{"203A}
+\DeclareTextSymbol{\textreferencemark} \UnicodeEncodingName{"203B}
+\DeclareTextSymbol{\textinterrobang} \UnicodeEncodingName{"203D}
+\DeclareTextSymbol{\textfractionsolidus} \UnicodeEncodingName{"2044}
+\DeclareTextSymbol{\textlquill} \UnicodeEncodingName{"2045}
+\DeclareTextSymbol{\textrquill} \UnicodeEncodingName{"2046}
+\DeclareTextSymbol{\textdiscount} \UnicodeEncodingName{"2052}
+\DeclareTextSymbol{\textcolonmonetary} \UnicodeEncodingName{"20A1}
+\DeclareTextSymbol{\textlira} \UnicodeEncodingName{"20A4}
+\DeclareTextSymbol{\textnaira} \UnicodeEncodingName{"20A6}
+\DeclareTextSymbol{\textwon} \UnicodeEncodingName{"20A9}
+\DeclareTextSymbol{\textdong} \UnicodeEncodingName{"20AB}
+\DeclareTextSymbol{\texteuro} \UnicodeEncodingName{"20AC}
+\DeclareTextSymbol{\textpeso} \UnicodeEncodingName{"20B1}
+\DeclareTextSymbol{\textcelsius} \UnicodeEncodingName{"2103}
+\DeclareTextSymbol{\textnumero} \UnicodeEncodingName{"2116}
+\DeclareTextSymbol{\textcircledP} \UnicodeEncodingName{"2117}
+\DeclareTextSymbol{\textrecipe} \UnicodeEncodingName{"211E}
+\DeclareTextSymbol{\textservicemark} \UnicodeEncodingName{"2120}
+\DeclareTextSymbol{\texttrademark} \UnicodeEncodingName{"2122}
+\DeclareTextSymbol{\textohm} \UnicodeEncodingName{"2126}
+\DeclareTextSymbol{\textmho} \UnicodeEncodingName{"2127}
+\DeclareTextSymbol{\textestimated} \UnicodeEncodingName{"212E}
+\DeclareTextSymbol{\textleftarrow} \UnicodeEncodingName{"2190}
+\DeclareTextSymbol{\textuparrow} \UnicodeEncodingName{"2191}
+\DeclareTextSymbol{\textrightarrow} \UnicodeEncodingName{"2192}
+\DeclareTextSymbol{\textdownarrow} \UnicodeEncodingName{"2193}
+\DeclareTextSymbol{\textminus} \UnicodeEncodingName{"2212}
+
+% \end{macrocode}
+% \changes{v2.0k}{2018/11/18}{Provide \cs{Hwithstroke} and \cs{hwithstroke}}
+% \begin{macrocode}
+\DeclareTextSymbol{\Hwithstroke} \UnicodeEncodingName{"0126}
+\DeclareTextSymbol{\hwithstroke} \UnicodeEncodingName{"0127}
+% \end{macrocode}
+%
+% Not all fonts have U+2217 but using U+002A requires some adjustment.
+% \begin{macrocode}
+\DeclareTextCommand{\textasteriskcentered}\UnicodeEncodingName{%
+ \iffontchar\font"2217 \char"2217 \else
+ \begingroup
+ \fontsize
+ {\the\dimexpr1.2\dimexpr\f@size pt\relax}%
+ {\f@baselineskip}%
+ \selectfont
+ \raisebox{-0.6ex}[\dimexpr\height-0.6ex][0pt]{*}%
+ \endgroup
+ \fi
+}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareTextSymbol{\textsurd} \UnicodeEncodingName{"221A}
+\DeclareTextSymbol{\textlangle} \UnicodeEncodingName{"2329}
+\DeclareTextSymbol{\textrangle} \UnicodeEncodingName{"232A}
+\DeclareTextSymbol{\textblank} \UnicodeEncodingName{"2422}
+\DeclareTextSymbol{\textvisiblespace} \UnicodeEncodingName{"2423}
+\DeclareTextSymbol{\textopenbullet} \UnicodeEncodingName{"25E6}
+\DeclareTextSymbol{\textbigcircle} \UnicodeEncodingName{"25EF}
+\DeclareTextSymbol{\textmusicalnote} \UnicodeEncodingName{"266A}
+\DeclareTextSymbol{\textmarried} \UnicodeEncodingName{"26AD}
+\DeclareTextSymbol{\textdivorced} \UnicodeEncodingName{"26AE}
+\DeclareTextSymbol{\textinterrobangdown} \UnicodeEncodingName{"2E18}
+% \end{macrocode}
+% Accents must be declared before the composites that use them.
+% \begin{macrocode}
+\DeclareUnicodeAccent{\`} \UnicodeEncodingName{"0300}
+\DeclareUnicodeAccent{\'} \UnicodeEncodingName{"0301}
+\DeclareUnicodeAccent{\^} \UnicodeEncodingName{"0302}
+\DeclareUnicodeAccent{\~} \UnicodeEncodingName{"0303}
+\DeclareUnicodeAccent{\=} \UnicodeEncodingName{"0304}
+\DeclareUnicodeAccent{\u} \UnicodeEncodingName{"0306}
+\DeclareUnicodeAccent{\.} \UnicodeEncodingName{"0307}
+\DeclareUnicodeAccent{\"} \UnicodeEncodingName{"0308}
+\DeclareUnicodeAccent{\r} \UnicodeEncodingName{"030A}
+\DeclareUnicodeAccent{\H} \UnicodeEncodingName{"030B}
+\DeclareUnicodeAccent{\v} \UnicodeEncodingName{"030C}
+\DeclareUnicodeAccent{\b} \UnicodeEncodingName{"0332}
+\DeclareUnicodeAccent{\d} \UnicodeEncodingName{"0323}
+\DeclareUnicodeAccent{\c} \UnicodeEncodingName{"0327}
+\DeclareUnicodeAccent{\k} \UnicodeEncodingName{"0328}
+\DeclareTextCommand\textcommabelow \UnicodeEncodingName[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
+ \hbox{\check@mathfonts\fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareUnicodeComposite{\^} {}{"005E}
+\DeclareUnicodeComposite{\~} {}{"007E}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareUnicodeComposite{\`} {A}{"00C0}
+\DeclareUnicodeComposite{\'} {A}{"00C1}
+\DeclareUnicodeComposite{\^} {A}{"00C2}
+\DeclareUnicodeComposite{\~} {A}{"00C3}
+\DeclareUnicodeComposite{\"} {A}{"00C4}
+\DeclareUnicodeComposite{\r} {A}{"00C5}
+\DeclareUnicodeComposite{\c} {C}{"00C7}
+\DeclareUnicodeComposite{\`} {E}{"00C8}
+\DeclareUnicodeComposite{\'} {E}{"00C9}
+\DeclareUnicodeComposite{\^} {E}{"00CA}
+\DeclareUnicodeComposite{\"} {E}{"00CB}
+\DeclareUnicodeComposite{\`} {I}{"00CC}
+\DeclareUnicodeComposite{\'} {I}{"00CD}
+\DeclareUnicodeComposite{\^} {I}{"00CE}
+\DeclareUnicodeComposite{\"} {I}{"00CF}
+\DeclareUnicodeComposite{\~} {N}{"00D1}
+\DeclareUnicodeComposite{\`} {O}{"00D2}
+\DeclareUnicodeComposite{\'} {O}{"00D3}
+\DeclareUnicodeComposite{\^} {O}{"00D4}
+\DeclareUnicodeComposite{\~} {O}{"00D5}
+\DeclareUnicodeComposite{\"} {O}{"00D6}
+\DeclareUnicodeComposite{\`} {U}{"00D9}
+\DeclareUnicodeComposite{\'} {U}{"00DA}
+\DeclareUnicodeComposite{\^} {U}{"00DB}
+\DeclareUnicodeComposite{\"} {U}{"00DC}
+\DeclareUnicodeComposite{\'} {Y}{"00DD}
+\DeclareUnicodeComposite{\`} {a}{"00E0}
+\DeclareUnicodeComposite{\'} {a}{"00E1}
+\DeclareUnicodeComposite{\^} {a}{"00E2}
+\DeclareUnicodeComposite{\~} {a}{"00E3}
+\DeclareUnicodeComposite{\"} {a}{"00E4}
+\DeclareUnicodeComposite{\r} {a}{"00E5}
+\DeclareUnicodeComposite{\c} {c}{"00E7}
+\DeclareUnicodeComposite{\`} {e}{"00E8}
+\DeclareUnicodeComposite{\'} {e}{"00E9}
+\DeclareUnicodeComposite{\^} {e}{"00EA}
+\DeclareUnicodeComposite{\"} {e}{"00EB}
+\DeclareUnicodeComposite{\`} \i {"00EC}
+\DeclareUnicodeComposite{\`} {i}{"00EC}
+\DeclareUnicodeComposite{\'} \i {"00ED}
+\DeclareUnicodeComposite{\'} {i}{"00ED}
+\DeclareUnicodeComposite{\^} \i {"00EE}
+\DeclareUnicodeComposite{\^} {i}{"00EE}
+\DeclareUnicodeComposite{\"} \i {"00EF}
+\DeclareUnicodeComposite{\"} {i}{"00EF}
+\DeclareUnicodeComposite{\~} {n}{"00F1}
+\DeclareUnicodeComposite{\`} {o}{"00F2}
+\DeclareUnicodeComposite{\'} {o}{"00F3}
+\DeclareUnicodeComposite{\^} {o}{"00F4}
+\DeclareUnicodeComposite{\~} {o}{"00F5}
+\DeclareUnicodeComposite{\"} {o}{"00F6}
+\DeclareUnicodeComposite{\`} {u}{"00F9}
+\DeclareUnicodeComposite{\'} {u}{"00FA}
+\DeclareUnicodeComposite{\^} {u}{"00FB}
+\DeclareUnicodeComposite{\"} {u}{"00FC}
+\DeclareUnicodeComposite{\'} {y}{"00FD}
+\DeclareUnicodeComposite{\"} {y}{"00FF}
+\DeclareUnicodeComposite{\=} {A}{"0100}
+\DeclareUnicodeComposite{\=} {a}{"0101}
+\DeclareUnicodeComposite{\u} {A}{"0102}
+\DeclareUnicodeComposite{\u} {a}{"0103}
+\DeclareUnicodeComposite{\k} {A}{"0104}
+\DeclareUnicodeComposite{\k} {a}{"0105}
+\DeclareUnicodeComposite{\'} {C}{"0106}
+\DeclareUnicodeComposite{\'} {c}{"0107}
+\DeclareUnicodeComposite{\^} {C}{"0108}
+\DeclareUnicodeComposite{\^} {c}{"0109}
+\DeclareUnicodeComposite{\.} {C}{"010A}
+\DeclareUnicodeComposite{\.} {c}{"010B}
+\DeclareUnicodeComposite{\v} {C}{"010C}
+\DeclareUnicodeComposite{\v} {c}{"010D}
+\DeclareUnicodeComposite{\v} {D}{"010E}
+\DeclareUnicodeComposite{\v} {d}{"010F}
+\DeclareUnicodeComposite{\=} {E}{"0112}
+\DeclareUnicodeComposite{\=} {e}{"0113}
+\DeclareUnicodeComposite{\u} {E}{"0114}
+\DeclareUnicodeComposite{\u} {e}{"0115}
+\DeclareUnicodeComposite{\.} {E}{"0116}
+\DeclareUnicodeComposite{\.} {e}{"0117}
+\DeclareUnicodeComposite{\k} {E}{"0118}
+\DeclareUnicodeComposite{\k} {e}{"0119}
+\DeclareUnicodeComposite{\v} {E}{"011A}
+\DeclareUnicodeComposite{\v} {e}{"011B}
+\DeclareUnicodeComposite{\^} {G}{"011C}
+\DeclareUnicodeComposite{\^} {g}{"011D}
+\DeclareUnicodeComposite{\u} {G}{"011E}
+\DeclareUnicodeComposite{\u} {g}{"011F}
+\DeclareUnicodeComposite{\.} {G}{"0120}
+\DeclareUnicodeComposite{\.} {g}{"0121}
+\DeclareUnicodeComposite{\c} {G}{"0122}
+\DeclareUnicodeComposite{\c} {g}{"0123}
+\DeclareUnicodeComposite{\^} {H}{"0124}
+\DeclareUnicodeComposite{\^} {h}{"0125}
+\DeclareUnicodeComposite{\~} {I}{"0128}
+\DeclareUnicodeComposite{\~} \i {"0129}
+\DeclareUnicodeComposite{\~} {i}{"0129}
+\DeclareUnicodeComposite{\=} {I}{"012A}
+\DeclareUnicodeComposite{\=} \i {"012B}
+\DeclareUnicodeComposite{\=} {i}{"012B}
+\DeclareUnicodeComposite{\u} {I}{"012C}
+\DeclareUnicodeComposite{\u} \i {"012D}
+\DeclareUnicodeComposite{\u} {i}{"012D}
+\DeclareUnicodeComposite{\k} {I}{"012E}
+\DeclareUnicodeComposite{\k} \i {"012F}
+\DeclareUnicodeComposite{\k} {i}{"012F}
+\DeclareUnicodeComposite{\.} {I}{"0130}
+\DeclareUnicodeComposite{\^} {J}{"0134}
+\DeclareUnicodeComposite{\^} \j {"0135}
+\DeclareUnicodeComposite{\^} {j}{"0135}
+\DeclareUnicodeComposite{\c} {K}{"0136}
+\DeclareUnicodeComposite{\c} {k}{"0137}
+\DeclareUnicodeComposite{\'} {L}{"0139}
+\DeclareUnicodeComposite{\'} {l}{"013A}
+\DeclareUnicodeComposite{\c} {L}{"013B}
+\DeclareUnicodeComposite{\c} {l}{"013C}
+\DeclareUnicodeComposite{\v} {L}{"013D}
+\DeclareUnicodeComposite{\v} {l}{"013E}
+\DeclareUnicodeComposite{\'} {N}{"0143}
+\DeclareUnicodeComposite{\'} {n}{"0144}
+\DeclareUnicodeComposite{\c} {N}{"0145}
+\DeclareUnicodeComposite{\c} {n}{"0146}
+\DeclareUnicodeComposite{\v} {N}{"0147}
+\DeclareUnicodeComposite{\v} {n}{"0148}
+\DeclareUnicodeComposite{\=} {O}{"014C}
+\DeclareUnicodeComposite{\=} {o}{"014D}
+\DeclareUnicodeComposite{\u} {O}{"014E}
+\DeclareUnicodeComposite{\u} {o}{"014F}
+\DeclareUnicodeComposite{\H} {O}{"0150}
+\DeclareUnicodeComposite{\H} {o}{"0151}
+\DeclareUnicodeComposite{\'} {R}{"0154}
+\DeclareUnicodeComposite{\'} {r}{"0155}
+\DeclareUnicodeComposite{\c} {R}{"0156}
+\DeclareUnicodeComposite{\c} {r}{"0157}
+\DeclareUnicodeComposite{\v} {R}{"0158}
+\DeclareUnicodeComposite{\v} {r}{"0159}
+\DeclareUnicodeComposite{\'} {S}{"015A}
+\DeclareUnicodeComposite{\'} {s}{"015B}
+\DeclareUnicodeComposite{\^} {S}{"015C}
+\DeclareUnicodeComposite{\^} {s}{"015D}
+\DeclareUnicodeComposite{\c} {S}{"015E}
+\DeclareUnicodeComposite{\c} {s}{"015F}
+\DeclareUnicodeComposite{\v} {S}{"0160}
+\DeclareUnicodeComposite{\v} {s}{"0161}
+\DeclareUnicodeComposite{\c} {T}{"0162}
+\DeclareUnicodeComposite{\c} {t}{"0163}
+\DeclareUnicodeComposite{\v} {T}{"0164}
+\DeclareUnicodeComposite{\v} {t}{"0165}
+\DeclareUnicodeComposite{\~} {U}{"0168}
+\DeclareUnicodeComposite{\~} {u}{"0169}
+\DeclareUnicodeComposite{\=} {U}{"016A}
+\DeclareUnicodeComposite{\=} {u}{"016B}
+\DeclareUnicodeComposite{\u} {U}{"016C}
+\DeclareUnicodeComposite{\u} {u}{"016D}
+\DeclareUnicodeComposite{\r} {U}{"016E}
+\DeclareUnicodeComposite{\r} {u}{"016F}
+\DeclareUnicodeComposite{\H} {U}{"0170}
+\DeclareUnicodeComposite{\H} {u}{"0171}
+\DeclareUnicodeComposite{\k} {U}{"0172}
+\DeclareUnicodeComposite{\k} {u}{"0173}
+\DeclareUnicodeComposite{\^} {W}{"0174}
+\DeclareUnicodeComposite{\^} {w}{"0175}
+\DeclareUnicodeComposite{\^} {Y}{"0176}
+\DeclareUnicodeComposite{\^} {y}{"0177}
+\DeclareUnicodeComposite{\"} {Y}{"0178}
+\DeclareUnicodeComposite{\'} {Z}{"0179}
+\DeclareUnicodeComposite{\'} {z}{"017A}
+\DeclareUnicodeComposite{\.} {Z}{"017B}
+\DeclareUnicodeComposite{\.} {z}{"017C}
+\DeclareUnicodeComposite{\v} {Z}{"017D}
+\DeclareUnicodeComposite{\v} {z}{"017E}
+\DeclareUnicodeComposite{\v} {A}{"01CD}
+\DeclareUnicodeComposite{\v} {a}{"01CE}
+\DeclareUnicodeComposite{\v} {I}{"01CF}
+\DeclareUnicodeComposite{\v} \i {"01D0}
+\DeclareUnicodeComposite{\v} {i}{"01D0}
+\DeclareUnicodeComposite{\v} {O}{"01D1}
+\DeclareUnicodeComposite{\v} {o}{"01D2}
+\DeclareUnicodeComposite{\v} {U}{"01D3}
+\DeclareUnicodeComposite{\v} {u}{"01D4}
+\DeclareUnicodeComposite{\=} \AE{"01E2}
+\DeclareUnicodeComposite{\=} \ae{"01E3}
+\DeclareUnicodeComposite{\v} {G}{"01E6}
+\DeclareUnicodeComposite{\v} {g}{"01E7}
+\DeclareUnicodeComposite{\v} {K}{"01E8}
+\DeclareUnicodeComposite{\v} {k}{"01E9}
+\DeclareUnicodeComposite{\k} {O}{"01EA}
+\DeclareUnicodeComposite{\k} {o}{"01EB}
+\DeclareUnicodeComposite{\v} \j {"01F0}
+\DeclareUnicodeComposite{\v} {j}{"01F0}
+\DeclareUnicodeComposite{\'} {G}{"01F4}
+\DeclareUnicodeComposite{\'} {g}{"01F5}
+\DeclareUnicodeComposite{\textcommabelow}{S}{"0218}
+\DeclareUnicodeComposite{\textcommabelow}{s}{"0219}
+\DeclareUnicodeComposite{\textcommabelow}{T}{"021A}
+\DeclareUnicodeComposite{\textcommabelow}{t}{"021B}
+\DeclareUnicodeComposite{\=} {Y}{"0232}
+\DeclareUnicodeComposite{\=} {y}{"0232}
+\DeclareUnicodeComposite{\.} {B}{"1E02}
+\DeclareUnicodeComposite{\.} {b}{"1E03}
+\DeclareUnicodeComposite{\d} {B}{"1E04}
+\DeclareUnicodeComposite{\d} {b}{"1E05}
+\DeclareUnicodeComposite{\d} {D}{"1E0C}
+\DeclareUnicodeComposite{\d} {d}{"1E0D}
+\DeclareUnicodeComposite{\=} {G}{"1E20}
+\DeclareUnicodeComposite{\=} {g}{"1E21}
+\DeclareUnicodeComposite{\d} {H}{"1E24}
+\DeclareUnicodeComposite{\d} {h}{"1E25}
+\DeclareUnicodeComposite{\d} {K}{"1E32}
+\DeclareUnicodeComposite{\d} {k}{"1E33}
+\DeclareUnicodeComposite{\d} {L}{"1E36}
+\DeclareUnicodeComposite{\d} {l}{"1E37}
+\DeclareUnicodeComposite{\d} {M}{"1E42}
+\DeclareUnicodeComposite{\d} {m}{"1E43}
+\DeclareUnicodeComposite{\d} {N}{"1E46}
+\DeclareUnicodeComposite{\d} {n}{"1E47}
+\DeclareUnicodeComposite{\d} {R}{"1E5A}
+\DeclareUnicodeComposite{\d} {r}{"1E5B}
+\DeclareUnicodeComposite{\d} {S}{"1E62}
+\DeclareUnicodeComposite{\d} {s}{"1E63}
+\DeclareUnicodeComposite{\d} {T}{"1E6C}
+\DeclareUnicodeComposite{\d} {t}{"1E6D}
+\DeclareUnicodeComposite{\d} {V}{"1E7E}
+\DeclareUnicodeComposite{\d} {v}{"1E7F}
+\DeclareUnicodeComposite{\d} {W}{"1E88}
+\DeclareUnicodeComposite{\d} {w}{"1E89}
+\DeclareUnicodeComposite{\d} {Z}{"1E92}
+\DeclareUnicodeComposite{\d} {z}{"1E93}
+\DeclareUnicodeComposite{\d} {A}{"1EA0}
+\DeclareUnicodeComposite{\d} {a}{"1EA1}
+\DeclareUnicodeComposite{\d} {E}{"1EB8}
+\DeclareUnicodeComposite{\d} {e}{"1EB9}
+\DeclareUnicodeComposite{\d} {I}{"1ECA}
+\DeclareUnicodeComposite{\d} {i}{"1ECB}
+\DeclareUnicodeComposite{\d} {O}{"1ECC}
+\DeclareUnicodeComposite{\d} {o}{"1ECD}
+\DeclareUnicodeComposite{\d} {U}{"1EE4}
+\DeclareUnicodeComposite{\d} {u}{"1EE5}
+\DeclareUnicodeComposite{\d} {Y}{"1EF4}
+\DeclareUnicodeComposite{\d} {y}{"1EF5}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</TU>
+% \end{macrocode}
+%
+% \section{Package files}
+%
+% \changes{v1.9h}{1997/12/17}{Added section.}
+% \changes{v1.9h}{1997/12/17}{Added code for textcomp.sty.}
+% This file now also contains some packages that provide access to
+% the more specialised encodings.
+%
+% \subsection{The fontenc package}
+%
+% \changes{v1.5c}{1994/05/14}{Added the fontenc package}
+% \changes{v1.5g}{1994/05/16}{Removed the lowercasing of the filename.}
+% \changes{v1.7a}{1994/11/30}{Always load the enc.def file, so that
+% the default encoding for the commands will change.}
+% \changes{v1.7x}{1996/05/18}{Produce error if encoding not found.
+% pr/2054}
+% \changes{v1.7y}{1996/05/21}{Corrected error message (CAR)}
+% \changes{v1.8d}{1996/11/18}
+% {(DPC) lowercase external file names. internal/1044}%
+% This package allows authors to specify which encodings they will use.
+% For each encoding |FOO|, the package looks to see if the encoding
+% |FOO| has already been declared. If it has not, the file |fooenc.def|
+% is loaded. The default encoding is set to be |FOO|.
+%
+% In addition the package at the moment contains extra code to extend
+% the |\@uclclist| (list of upper/lower case pairs) for encodings that
+% involve cyrillic characters. THIS IS A TEMPORARY SOLUTION and will not
+% stay this way forever (or so we hope) but right now we are missing a
+% proper interface for this and didn't wanted to rush it.
+% \changes{v1.9r}{1999/01/07}{Hackery to temp support cyrillic uc/lc}
+% \changes{v1.9t}{1999/02/24}{Corrected hackery cyrillic uc/lc list}
+% \changes{v1.9x}{1999/12/08}{Changed \cs{CYRRHOOK} and \cs{cyrrhook}
+% to\cs{CYRRHK} and \cs{cyrrhk} as name changed in the cyrillic
+% bundle for naming consistency with other ``hook'' glyphs.}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% Here we define a macro that extends the |\@uclclist| if needed and
+% afterwards turns itself in a noop.
+% \begin{macrocode}
+\def\update@uclc@with@cyrillic{%
+ \expandafter\def\expandafter\@uclclist\expandafter
+ {\@uclclist
+ \cyra\CYRA\cyrabhch\CYRABHCH\cyrabhchdsc\CYRABHCHDSC\cyrabhdze
+ \CYRABHDZE\cyrabhha\CYRABHHA\cyrae\CYRAE\cyrb\CYRB\cyrbyus
+ \CYRBYUS\cyrc\CYRC\cyrch\CYRCH\cyrchldsc\CYRCHLDSC\cyrchrdsc
+ \CYRCHRDSC\cyrchvcrs\CYRCHVCRS\cyrd\CYRD\cyrdelta\CYRDELTA
+ \cyrdje\CYRDJE\cyrdze\CYRDZE\cyrdzhe\CYRDZHE\cyre\CYRE\cyreps
+ \CYREPS\cyrerev\CYREREV\cyrery\CYRERY\cyrf\CYRF\cyrfita
+ \CYRFITA\cyrg\CYRG\cyrgdsc\CYRGDSC\cyrgdschcrs\CYRGDSCHCRS
+ \cyrghcrs\CYRGHCRS\cyrghk\CYRGHK\cyrgup\CYRGUP\cyrh\CYRH
+ \cyrhdsc\CYRHDSC\cyrhhcrs\CYRHHCRS\cyrhhk\CYRHHK\cyrhrdsn
+ \CYRHRDSN\cyri\CYRI\cyrie\CYRIE\cyrii\CYRII\cyrishrt\CYRISHRT
+ \cyrishrtdsc\CYRISHRTDSC\cyrizh\CYRIZH\cyrje\CYRJE\cyrk\CYRK
+ \cyrkbeak\CYRKBEAK\cyrkdsc\CYRKDSC\cyrkhcrs\CYRKHCRS\cyrkhk
+ \CYRKHK\cyrkvcrs\CYRKVCRS\cyrl\CYRL\cyrldsc\CYRLDSC\cyrlhk
+ \CYRLHK\cyrlje\CYRLJE\cyrm\CYRM\cyrmdsc\CYRMDSC\cyrmhk\CYRMHK
+ \cyrn\CYRN\cyrndsc\CYRNDSC\cyrng\CYRNG\cyrnhk\CYRNHK\cyrnje
+ \CYRNJE\cyrnlhk\CYRNLHK\cyro\CYRO\cyrotld\CYROTLD\cyrp\CYRP
+ \cyrphk\CYRPHK\cyrq\CYRQ\cyrr\CYRR\cyrrdsc\CYRRDSC\cyrrhk
+ \CYRRHK\cyrrtick\CYRRTICK\cyrs\CYRS\cyrsacrs\CYRSACRS
+ \cyrschwa\CYRSCHWA\cyrsdsc\CYRSDSC\cyrsemisftsn\CYRSEMISFTSN
+ \cyrsftsn\CYRSFTSN\cyrsh\CYRSH\cyrshch\CYRSHCH\cyrshha\CYRSHHA
+ \cyrt\CYRT\cyrtdsc\CYRTDSC\cyrtetse\CYRTETSE\cyrtshe\CYRTSHE
+ \cyru\CYRU\cyrushrt\CYRUSHRT\cyrv\CYRV\cyrw\CYRW\cyry\CYRY
+ \cyrya\CYRYA\cyryat\CYRYAT\cyryhcrs\CYRYHCRS\cyryi\CYRYI\cyryo
+ \CYRYO\cyryu\CYRYU\cyrz\CYRZ\cyrzdsc\CYRZDSC\cyrzh\CYRZH
+ \cyrzhdsc\CYRZHDSC}%
+ \let\update@uclc@with@cyrillic\relax
+}
+% \end{macrocode}
+%
+% Here we process each option:
+% \begin{macrocode}
+\DeclareOption*{%
+ \let\encodingdefault\CurrentOption
+ \edef\reserved@f{%
+ \lowercase{\def\noexpand\reserved@f{\CurrentOption enc.def}}}%
+ \reserved@f
+ \InputIfFileExists\reserved@f
+ {}{\PackageError{fontenc}%
+ {Encoding file `\reserved@f' not found.%
+ \MessageBreak
+ You might have misspelt the name of the encoding}%
+ {Necessary code for this encoding was not
+ loaded.\MessageBreak
+ Thus calling the encoding later on will
+ produce further error messages.}}%
+ \let\reserved@f\relax
+% \end{macrocode}
+%
+% In case the current encoding is one of a list of known
+% cyrillic ones we extend the |\@uclclist|:
+% \begin{macrocode}
+ \expandafter\in@\expandafter{\CurrentOption}%
+ {T2A,T2B,T2C,X2,LCY,OT2}%
+ \ifin@
+% \end{macrocode}
+%
+% But only if it hasn't already been extended. This might happen if
+% there are several calls to fontenc loading one of the above
+% encodings. If we don't do this check the |\@uclclist| gets
+% unnecessarily big, slowing down the processing at runtime.
+% \changes{v1.9v}{1999/06/12}{Extend \cs{@uclclist} only once}
+% \begin{macrocode}
+ \expandafter\in@\expandafter\cyra\expandafter
+ {\@uclclist}%
+ \ifin@
+ \else
+ \update@uclc@with@cyrillic
+ \fi
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProcessOptions*
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fontencoding\encodingdefault\selectfont
+% \end{macrocode}
+%
+% To save some space we get rid of the macro extending the
+% |\@uclclist| (might have happened already).
+% \begin{macrocode}
+\let\update@uclc@with@cyrillic\relax
+% \end{macrocode}
+%
+% Finally we pretend that the fontenc package wasn't read in. This
+% allows for using it several times, e.g., in a class file and in the
+% preamble (at the cost of not getting any version info).
+% That kind of hackery shows that using a general purpose
+% package just for loading an encoding is not the right kind
+% of interface for setting up encodings --- it will get replaced at
+% some point in the future.
+% \changes{v1.9r}{1999/01/07}{Hackery to allow using fontenc several
+% times}
+% \changes{v1.9u}{1999/06/10}{Ensure that we also forget old options
+% (pr/2888)}
+% \begin{macrocode}
+\global\expandafter\let\csname ver@fontenc.sty\endcsname\relax
+\global\expandafter\let\csname opt@fontenc.sty\endcsname\relax
+\global\let\@ifl@ter@@\@ifl@ter
+\def\@ifl@ter#1#2#3#4#5{\global\let\@ifl@ter\@ifl@ter@@}
+%</package>
+% \end{macrocode}
+%
+%
+% \subsection{The textcomp package}
+%
+% This one is for the |TS1| encoding which contains text symbols
+% for use with the |T1|-encoded text fonts. It therefore first
+% inputs the file |TS1enc.def| and then sets (or resets) the
+% defaults for the symbols it contains. The result of this is that
+% when one of these symbols is accessed and the current encoding
+% does not provide it, the symbol will be supplied by a silent,
+% local change to this encoding.
+%
+% \begin{macrocode}
+%<*TS1sty>
+% \end{macrocode}
+% Since many PostScript fonts only implement a subset of |TS1| many
+% commands only produce black blobs of ink. To resolve the
+% resulting problems a number of options have been introduced and
+% some code has been developed to distinguish sub-encodings.
+%
+% The sub-encodings have a numerical id and are defined as follows
+% for \texttt{TS1}:
+% \begin{description}
+%
+% \item[\#5] those \texttt{TS1} symbols that are also in the ISO-Adobe
+% character set; without \verb=textcurrency=, which is often
+% misused for the Euro. Older Type1 fonts from the non-\TeX{}
+% world provide only this subset.
+%
+% \item[\#4] = \#5 + \verb=\texteuro=. Most newer fonts provide this.
+%
+% \item[\#3] = \#4 + \verb=\textomega=. Can also be described as
+% $\texttt{TS1} \cap (\texttt{ISO-Adobe} \cup
+% \texttt{MacRoman})$. (Except for the missing "currency".)
+
+%
+% \item[\#2] = \#3 + \verb=\textestimated= + \verb=\textcurrency=. Can
+% also be described as $\texttt{TS1} \cap
+% \texttt{Adobe-Western-2}$. This may be relevant for OpenType
+% fonts, which usually show the Adobe-Western-2 character set.
+%
+% \item[\#1] = \texttt{TS1} without \verb=\textcircled= and \verb=\t=.
+% These two glyphs are often not implemented and if their kernel
+% defaults are changed commands like \verb=\copyright=
+% unnecessarily fail.
+%
+% \item[\#0] = full \texttt{TS1}
+% \end{description}
+%
+% And here a summary to go in the transcript file:
+% \begin{macrocode}
+\PackageInfo{textcomp}{Sub-encoding information:\MessageBreak
+ \space\space 5 = only ISO-Adobe without
+ \string\textcurrency\MessageBreak
+ \space\space 4 = 5 + \string\texteuro\MessageBreak
+ \space\space 3 = 4 + \string\textohm\MessageBreak
+ \space\space 2 = 3 + \noexpand\textestimated+
+ \string\textcurrency\MessageBreak
+ \space\space 1 = TS1 - \noexpand\textcircled-
+ \string\t\MessageBreak
+ \space\space 0 = TS1 (full)\MessageBreak
+ Font families with sub-encoding setting implement\MessageBreak
+ only a restricted character set as indicated.\MessageBreak
+ Family '?' is the default used for unknown fonts.\MessageBreak
+ See the documentation for details\@gobble}
+% \end{macrocode}
+%
+% \begin{macro}{\DeclareEncodingSubset}
+% An encoding subset to which a font family belongs is declared by
+% the command |\DeclareEncodingSubset| that takes the major encoding as the
+% first argument (e.g., |TS1|), the family name as the second
+% argument (e.g., |cmr|), and the subset encoding id as a third,
+% (e.g., |0| for |cmr|).
+%
+% The default encoding subset to use when nothing is known about
+% the current font family is named |?|.
+% \begin{macrocode}
+\def\DeclareEncodingSubset#1#2#3{%
+ \@ifundefined{#1:#2}%
+ {\PackageInfo{textcomp}{Setting #2 sub-encoding to #1/#3}}%
+ {\PackageInfo{textcomp}{Changing #2 sub-encoding to #1/#3}}%
+ \@namedef{#1:#2}{#3}}
+\@onlypreamble\DeclareEncodingSubset
+% \end{macrocode}
+% \end{macro}
+%
+%
+% The options for the package are the following:
+% \begin{description}
+% \item[safe]
+% for unknown font families enables only symbols that are also
+% in the ISO-Adobe character set; without "currency", which is
+% often misused for the Euro. Older Type1 fonts from the
+% non-TeX world provide only this subset.
+%
+% \item[euro]
+% enables the ``safe'' symbols plus the |\texteuro|
+% command. Most newer fonts provide this.
+%
+% \item[full] enables all |TS1| commands; useful only with fonts
+% like EC or CM bright.
+%
+% \item[almostfull]
+% same as ``full'', except that |\textcircled|
+% and |\t| are \emph{not} redefined from their defaults to avoid
+% that commands like |\copyright| suddenly no longer work.
+%
+% \item[force]
+% ignore all subset encoding definitions stored in the package
+% itself or in the configuration file and always use the default
+% subset as specified by one of the other options (seldom useful,
+% only dangerous).
+% \end{description}
+
+% \begin{macro}{\iftc@forced}
+% Switch used to implement the \texttt{force} option
+% \begin{macrocode}
+\newif\iftc@forced \tc@forcedfalse
+% \end{macrocode}
+% \end{macro}
+
+% This is implemented by defining the default subset:
+% \begin{macrocode}
+\DeclareOption{full}{\DeclareEncodingSubset{TS1}{?}{0}}
+\DeclareOption{almostfull}{\DeclareEncodingSubset{TS1}{?}{1}}
+\DeclareOption{euro}{\DeclareEncodingSubset{TS1}{?}{4}}
+\DeclareOption{safe}{\DeclareEncodingSubset{TS1}{?}{5}}
+% \end{macrocode}
+% The default is ``almostfull'' which means that old documents will
+% work except that |\textcircled| and |\t| will use the kernel
+% defaults (with the advantage that this also works if the current
+% font (as often the case) doesn't implement these glyphs.
+%
+% The ``force'' option simply sets the switch to true.
+% \begin{macrocode}
+\DeclareOption{force}{\tc@forcedtrue}
+% \end{macrocode}
+%
+% The suggestions to user is to use the ``safe'' option always
+% unless that balks in which case they could switch to
+% ``almostfull'' but then better check their output manually.
+%
+% \begin{macrocode}
+\def\tc@errorwarn{\PackageError}
+\DeclareOption{warn}{\gdef\tc@errorwarn#1#2#3{\PackageWarning{#1}{#2}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExecuteOptions{almostfull}
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \begin{macro}{\CheckEncodingSubset}
+% The command |\CheckEncodingSubset| will check if the current font
+% family has the right encoding subset to typeset a certain
+% command. It takes five arguments as follows:
+% first argument is either |\UseTextSymbol|, |\UseTextAccent|
+% depending on whether or not the symbol is a text symbol or a text
+% accent.
+
+% The second argument is the encoding from which this symbol should
+% be fetched.
+%
+% The third argument is either a fake accessor command or an error
+% message. the code in that argument (if ever executed) receives
+% two arguments: |#2| and |#5| of |\CheckEncodingSubset|.
+%
+% Argument four is the subset encoding id to test against: if this
+% value is higher than the subset id of the current font family
+% then we typeset the symbol, i.e., execute |#1{#2}#5| otherwise
+% it runs |#3#5|, e.g., to produce an error message or fake the
+% glyph somehow.
+%
+% Argument five is the symbol or accent command that is being
+% checked.
+%
+% For usage examples see definitions below.
+% \begin{macrocode}
+\iftc@forced
+% \end{macrocode}
+% If the ``force'' option was given we always use the default for
+% testing against.
+% \begin{macrocode}
+\def\CheckEncodingSubset#1#2#3#4#5{%
+ \ifnum #4>%
+ 0\csname #2:?\endcsname
+ \relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {#1{#2}}{#3}%
+ #5%
+}
+% \end{macrocode}
+% In normal circumstances the test is a bit more complicated: first
+% check if there exists a macro
+% |\|\meta{arg2}|:|\meta{current-family} and if so use that value
+% to test against, otherwise use the default to test against.
+% \begin{macrocode}
+\else
+\def\CheckEncodingSubset#1#2#3#4#5{%
+ \ifnum #4>%
+ \expandafter\ifx\csname #2:\f@family\endcsname\relax
+ 0\csname #2:?\endcsname
+ \else
+ \csname #2:\f@family\endcsname
+ \fi
+ \relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {#1{#2}}{#3}%
+ #5%
+}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tc@subst}
+% \begin{macrocode}
+\def\tc@subst#1{%
+ \tc@errorwarn{textcomp}% % should be latex error if general
+ {Symbol \string#1 not provided by\MessageBreak
+ font family \f@family\space
+ in TS1 encoding.\MessageBreak Default family used instead}\@eha
+ \bgroup\fontfamily\textcompsubstdefault\selectfont#1\egroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textcompsubstdefault}
+% \begin{macrocode}
+\def\textcompsubstdefault{cmr}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\tc@error}
+% |\tc@error| is going to be used in arg |#3| of
+% |\CheckEncodingSubset| when a symbol is not available in a
+% certain font family. It gets pass the encoding it normally lives
+% in (arg one) and the name of the symbol or accent that has a
+% problem.
+%
+% \begin{macrocode}
+% error commands take argument:
+% #1 symbol to be used
+\def\tc@error#1{%
+ \PackageError{textcomp}% % should be latex error if general
+ {Accent \string#1 not provided by\MessageBreak
+ font family \f@family\space
+ in TS1 encoding}\@eha
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\tc@fake@euro}
+% |\tc@fake@euro| is an example of a ``fake'' definition to use in arg |#3| of
+% |\CheckEncodingSubset| when a symbol is not available in a
+% certain font family. Here we produce an Euro symbol by combining
+% a ``C'' with a ``=''.
+% \begin{macrocode}
+\def\tc@fake@euro#1{%
+ \leavevmode
+ \PackageInfo{textcomp}{Faking \noexpand#1for font family
+ \f@family\MessageBreak in TS1 encoding}%
+ \valign{##\cr
+ \vfil\hbox to 0.07em{\dimen@\f@size\p@
+ \math@fontsfalse
+ \fontsize{.7\dimen@}\z@\selectfont=\hss}%
+ \vfil\cr%
+ \hbox{C}\crcr
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tc@check@symbol}
+% \begin{macro}{\tc@check@accent}
+% These are two abbreviations that we use below to check symbols
+% and accents in TS1. Only there to save some space, e.g., we can
+% then write
+%\begin{verbatim}
+%\DeclareTextCommandDefault{\textcurrency}{\tc@check@symbol3\textcurrency}
+%\end{verbatim}
+% to ensure that |\textcurrency| is only typeset if the current
+% font has a \texttt{TS1} subset id of less than 3. Otherwise
+% |\tc@error| is called telling the user that for this font family
+% |\textcurreny| is not available.
+% \begin{macrocode}
+\def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst}
+\def\tc@check@accent{\CheckEncodingSubset\UseTextAccent{TS1}\tc@error}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% We start with the commands that are ``safe'' and which can be
+% unconditionally set up, first the accents\ldots
+% \begin{macrocode}
+\DeclareTextAccentDefault{\capitalcedilla}{TS1}
+\DeclareTextAccentDefault{\capitalogonek}{TS1}
+\DeclareTextAccentDefault{\capitalgrave}{TS1}
+\DeclareTextAccentDefault{\capitalacute}{TS1}
+\DeclareTextAccentDefault{\capitalcircumflex}{TS1}
+\DeclareTextAccentDefault{\capitaltilde}{TS1}
+\DeclareTextAccentDefault{\capitaldieresis}{TS1}
+\DeclareTextAccentDefault{\capitalhungarumlaut}{TS1}
+\DeclareTextAccentDefault{\capitalring}{TS1}
+\DeclareTextAccentDefault{\capitalcaron}{TS1}
+\DeclareTextAccentDefault{\capitalbreve}{TS1}
+\DeclareTextAccentDefault{\capitalmacron}{TS1}
+\DeclareTextAccentDefault{\capitaldotaccent}{TS1}
+% \end{macrocode}
+% \ldots and then the other glyphs.
+% \changes{v1.9p}{1998/06/12}{Renamed \cs{textmacron} pr/2840}
+% \begin{macrocode}
+\DeclareTextSymbolDefault{\textcapitalcompwordmark}{TS1}
+\DeclareTextSymbolDefault{\textascendercompwordmark}{TS1}
+\DeclareTextSymbolDefault{\textquotestraightbase}{TS1}
+\DeclareTextSymbolDefault{\textquotestraightdblbase}{TS1}
+\DeclareTextSymbolDefault{\texttwelveudash}{TS1}
+\DeclareTextSymbolDefault{\textthreequartersemdash}{TS1}
+\DeclareTextSymbolDefault{\textdollar}{TS1}
+\DeclareTextSymbolDefault{\textquotesingle}{TS1}
+\DeclareTextSymbolDefault{\textasteriskcentered}{TS1}
+\DeclareTextSymbolDefault{\textfractionsolidus}{TS1}
+\DeclareTextSymbolDefault{\textminus}{TS1}
+\DeclareTextSymbolDefault{\textlbrackdbl}{TS1}
+\DeclareTextSymbolDefault{\textrbrackdbl}{TS1}
+\DeclareTextSymbolDefault{\textasciigrave}{TS1}
+\DeclareTextSymbolDefault{\texttildelow}{TS1}
+\DeclareTextSymbolDefault{\textasciibreve}{TS1}
+\DeclareTextSymbolDefault{\textasciicaron}{TS1}
+\DeclareTextSymbolDefault{\textgravedbl}{TS1}
+\DeclareTextSymbolDefault{\textacutedbl}{TS1}
+\DeclareTextSymbolDefault{\textdagger}{TS1}
+\DeclareTextSymbolDefault{\textdaggerdbl}{TS1}
+\DeclareTextSymbolDefault{\textbardbl}{TS1}
+\DeclareTextSymbolDefault{\textperthousand}{TS1}
+\DeclareTextSymbolDefault{\textbullet}{TS1}
+\DeclareTextSymbolDefault{\textcelsius}{TS1}
+\DeclareTextSymbolDefault{\textflorin}{TS1}
+\DeclareTextSymbolDefault{\texttrademark}{TS1}
+\DeclareTextSymbolDefault{\textcent}{TS1}
+\DeclareTextSymbolDefault{\textsterling}{TS1}
+\DeclareTextSymbolDefault{\textyen}{TS1}
+\DeclareTextSymbolDefault{\textbrokenbar}{TS1}
+\DeclareTextSymbolDefault{\textsection}{TS1}
+\DeclareTextSymbolDefault{\textasciidieresis}{TS1}
+\DeclareTextSymbolDefault{\textcopyright}{TS1}
+\DeclareTextSymbolDefault{\textordfeminine}{TS1}
+\DeclareTextSymbolDefault{\textlnot}{TS1}
+\DeclareTextSymbolDefault{\textregistered}{TS1}
+\DeclareTextSymbolDefault{\textasciimacron}{TS1}
+\DeclareTextSymbolDefault{\textdegree}{TS1}
+\DeclareTextSymbolDefault{\textpm}{TS1}
+\DeclareTextSymbolDefault{\texttwosuperior}{TS1}
+\DeclareTextSymbolDefault{\textthreesuperior}{TS1}
+\DeclareTextSymbolDefault{\textasciiacute}{TS1}
+\DeclareTextSymbolDefault{\textmu}{TS1}
+\DeclareTextSymbolDefault{\textparagraph}{TS1}
+\DeclareTextSymbolDefault{\textperiodcentered}{TS1}
+\DeclareTextSymbolDefault{\textonesuperior}{TS1}
+\DeclareTextSymbolDefault{\textordmasculine}{TS1}
+\DeclareTextSymbolDefault{\textonequarter}{TS1}
+\DeclareTextSymbolDefault{\textonehalf}{TS1}
+\DeclareTextSymbolDefault{\textthreequarters}{TS1}
+\DeclareTextSymbolDefault{\texttimes}{TS1}
+\DeclareTextSymbolDefault{\textdiv}{TS1}
+% \end{macrocode}
+%
+% The |\texteuro| is only available for subsets with id 4 or
+% less. Otherwise we fake the glyph using |\tc@fake@euro|
+% \begin{macrocode}
+\DeclareTextCommandDefault{\texteuro}
+ {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro5\texteuro}
+% \end{macrocode}
+%
+% The |\textohm| is only available for subsets with id 3 or
+% less. Otherwise we produce an error.
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textohm}{\tc@check@symbol4\textohm}
+% \end{macrocode}
+% The |\textestimated| and |\textcurrency| are only provided for
+% fonts with subset encoding with id 2 or less.
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textestimated}%
+ {\tc@check@symbol3\textestimated}
+\DeclareTextCommandDefault{\textcurrency}%
+ {\tc@check@symbol3\textcurrency}
+% \end{macrocode}
+% Nearly all of the remaining glyphs are provided only with fonts
+% with id 1 or 0, i.e., are essentially complete.
+% \begin{macrocode}
+\DeclareTextCommandDefault{\capitaltie}%
+ {\tc@check@accent2\capitaltie}
+\DeclareTextCommandDefault{\newtie}%
+ {\tc@check@accent2\newtie}
+\DeclareTextCommandDefault{\capitalnewtie}%
+ {\tc@check@accent2\capitalnewtie}
+\DeclareTextCommandDefault{\textleftarrow}%
+ {\tc@check@symbol2\textleftarrow}
+\DeclareTextCommandDefault{\textrightarrow}%
+ {\tc@check@symbol2\textrightarrow}
+\DeclareTextCommandDefault{\textblank}%
+ {\tc@check@symbol2\textblank}
+\DeclareTextCommandDefault{\textdblhyphen}%
+ {\tc@check@symbol2\textdblhyphen}
+\DeclareTextCommandDefault{\textzerooldstyle}%
+ {\tc@check@symbol2\textzerooldstyle}
+\DeclareTextCommandDefault{\textoneoldstyle}%
+ {\tc@check@symbol2\textoneoldstyle}
+\DeclareTextCommandDefault{\texttwooldstyle}%
+ {\tc@check@symbol2\texttwooldstyle}
+\DeclareTextCommandDefault{\textthreeoldstyle}%
+ {\tc@check@symbol2\textthreeoldstyle}
+\DeclareTextCommandDefault{\textfouroldstyle}%
+ {\tc@check@symbol2\textfouroldstyle}
+\DeclareTextCommandDefault{\textfiveoldstyle}%
+ {\tc@check@symbol2\textfiveoldstyle}
+\DeclareTextCommandDefault{\textsixoldstyle}%
+ {\tc@check@symbol2\textsixoldstyle}
+\DeclareTextCommandDefault{\textsevenoldstyle}%
+ {\tc@check@symbol2\textsevenoldstyle}
+\DeclareTextCommandDefault{\texteightoldstyle}%
+ {\tc@check@symbol2\texteightoldstyle}
+\DeclareTextCommandDefault{\textnineoldstyle}%
+ {\tc@check@symbol2\textnineoldstyle}
+\DeclareTextCommandDefault{\textlangle}%
+ {\tc@check@symbol2\textlangle}
+\DeclareTextCommandDefault{\textrangle}%
+ {\tc@check@symbol2\textrangle}
+\DeclareTextCommandDefault{\textmho}%
+ {\tc@check@symbol2\textmho}
+\DeclareTextCommandDefault{\textbigcircle}%
+ {\tc@check@symbol2\textbigcircle}
+\DeclareTextCommandDefault{\textuparrow}%
+ {\tc@check@symbol2\textuparrow}
+\DeclareTextCommandDefault{\textdownarrow}%
+ {\tc@check@symbol2\textdownarrow}
+\DeclareTextCommandDefault{\textborn}%
+ {\tc@check@symbol2\textborn}
+\DeclareTextCommandDefault{\textdivorced}%
+ {\tc@check@symbol2\textdivorced}
+\DeclareTextCommandDefault{\textdied}%
+ {\tc@check@symbol2\textdied}
+\DeclareTextCommandDefault{\textleaf}%
+ {\tc@check@symbol2\textleaf}
+\DeclareTextCommandDefault{\textmarried}%
+ {\tc@check@symbol2\textmarried}
+\DeclareTextCommandDefault{\textmusicalnote}%
+ {\tc@check@symbol2\textmusicalnote}
+\DeclareTextCommandDefault{\textdblhyphenchar}%
+ {\tc@check@symbol2\textdblhyphenchar}
+\DeclareTextCommandDefault{\textdollaroldstyle}%
+ {\tc@check@symbol2\textdollaroldstyle}
+\DeclareTextCommandDefault{\textcentoldstyle}%
+ {\tc@check@symbol2\textcentoldstyle}
+\DeclareTextCommandDefault{\textcolonmonetary}%
+ {\tc@check@symbol2\textcolonmonetary}
+\DeclareTextCommandDefault{\textwon}%
+ {\tc@check@symbol2\textwon}
+\DeclareTextCommandDefault{\textnaira}%
+ {\tc@check@symbol2\textnaira}
+\DeclareTextCommandDefault{\textguarani}%
+ {\tc@check@symbol2\textguarani}
+\DeclareTextCommandDefault{\textpeso}%
+ {\tc@check@symbol2\textpeso}
+\DeclareTextCommandDefault{\textlira}%
+ {\tc@check@symbol2\textlira}
+\DeclareTextCommandDefault{\textrecipe}%
+ {\tc@check@symbol2\textrecipe}
+\DeclareTextCommandDefault{\textinterrobang}%
+ {\tc@check@symbol2\textinterrobang}
+\DeclareTextCommandDefault{\textinterrobangdown}%
+ {\tc@check@symbol2\textinterrobangdown}
+\DeclareTextCommandDefault{\textdong}%
+ {\tc@check@symbol2\textdong}
+\DeclareTextCommandDefault{\textpertenthousand}%
+ {\tc@check@symbol2\textpertenthousand}
+\DeclareTextCommandDefault{\textpilcrow}%
+ {\tc@check@symbol2\textpilcrow}
+\DeclareTextCommandDefault{\textbaht}%
+ {\tc@check@symbol2\textbaht}
+\DeclareTextCommandDefault{\textnumero}%
+ {\tc@check@symbol2\textnumero}
+\DeclareTextCommandDefault{\textdiscount}%
+ {\tc@check@symbol2\textdiscount}
+\DeclareTextCommandDefault{\textopenbullet}%
+ {\tc@check@symbol2\textopenbullet}
+\DeclareTextCommandDefault{\textservicemark}%
+ {\tc@check@symbol2\textservicemark}
+\DeclareTextCommandDefault{\textlquill}%
+ {\tc@check@symbol2\textlquill}
+\DeclareTextCommandDefault{\textrquill}%
+ {\tc@check@symbol2\textrquill}
+\DeclareTextCommandDefault{\textcopyleft}%
+ {\tc@check@symbol2\textcopyleft}
+\DeclareTextCommandDefault{\textcircledP}%
+ {\tc@check@symbol2\textcircledP}
+\DeclareTextCommandDefault{\textreferencemark}%
+ {\tc@check@symbol2\textreferencemark}
+\DeclareTextCommandDefault{\textsurd}%
+ {\tc@check@symbol2\textsurd}
+% \end{macrocode}
+% The |\textcircled| and |\t| are handled specially, unless the
+% current font has a subset id of 0 (i.e. full \texttt{TS1}) we
+% pick the symbols up from the the math font encodings, i.e., the
+% third argument to |\CheckEncodingSubset| uses |\UseTextAccent| to
+% get them from there.
+% \begin{macrocode}
+\DeclareTextCommandDefault{\textcircled}
+ {\CheckEncodingSubset\UseTextAccent{TS1}%
+ {\UseTextAccent{OMS}}1\textcircled}
+\DeclareTextCommandDefault{\t}
+ {\CheckEncodingSubset\UseTextAccent{TS1}%
+ {\UseTextAccent{OML}}1\t}
+% \end{macrocode}
+
+
+%
+% Finally input the encoding-specific definitions for
+% \texttt{TS1} thus making the top-level definitions
+% optimised for this encoding (and not for the default
+% encoding, see section~\ref{sec:orderofdecls}).
+% \changes{v1.9o}{1998/03/20}{Load decls after defaults for speed.}
+% \begin{macrocode}
+\input{ts1enc.def}
+% \end{macrocode}
+% Now having the new glyphs available we also want to make sure
+% that they are used. For most cases this will automatically happen
+% but for some glyphs there are inferior definitions already known
+% to \LaTeX{} which will prevent the usage of the \texttt{TS1}
+% versions (see section~\ref{sec:removeencspec} above). So we better
+% get rid of them:
+% \changes{v1.9o}{1998/03/20}{Added various \cs{UndeclareTextCommand}
+% declarations for pr/2783}
+% \begin{macrocode}
+\UndeclareTextCommand{\textsterling}{OT1}
+\UndeclareTextCommand{\textdollar} {OT1}
+% \end{macrocode}
+% Similar declarations should probably be made for other encodings
+% like \texttt{OT4} if they are in use.
+% \begin{macrocode}
+%\UndeclareTextCommand{\textsterling}{OT4}
+%\UndeclareTextCommand{\textdollar} {OT4}
+% \end{macrocode}
+% From the \texttt{T1} encoding there are two candidates for removal:
+% \textperthousand{} and \textpertenthousand{} since these are both
+% constructed from \% followed by a tiny
+% `{\fontencoding{T1}\selectfont \char 24}'
+% rather than being a single glyph. The problem with this
+% approach is that in PostScript fonts this small zero is usually not
+% available resulting in \%\rule{3pt}{3pt} rather than
+% \textperthousand{} while the real glyph (at least for
+% |\textperthousand|) is available in the PostScript version of
+% \texttt{TS1}. So for the moment we compromise by removing the
+% \texttt{T1} declaration for |\textperthousand| but keeping the one
+% for |\textpertenthousand|. This will have the effect that with
+% Computer Modern fonts everything will come out (although
+% \textperthousand{} and \textpertenthousand{} are not taken from the
+% same physical font) and with PostScript fonts \textperthousand{}
+% will come out correctly while \textpertenthousand{} will most
+% likely look like \%\rule{6pt}{3pt} --- which is probably an
+% improvement over just getting a single `\rule{3pt}{3pt}' to
+% indicate a completely missing glyph, which would happen if we
+% also `undeclared' |\textpertenthousand|.
+% \begin{macrocode}
+\UndeclareTextCommand{\textperthousand}{T1}
+%\UndeclareTextCommand{\textpertenthousand}{T1}
+% \end{macrocode}
+%
+%
+% \subsubsection{Supporting oldstyle digits}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\oldstylenums[1]{%
+ \begingroup
+ \ifmmode
+ \mathgroup\symletters #1%
+ \else
+ \CheckEncodingSubset\@use@text@encoding{TS1}%
+ {\PackageWarning{textcomp}%
+ {Oldstyle digits unavailable for
+ family \f@family.\MessageBreak
+ Lining digits used instead}}%
+ \tw@{#1}%
+ \fi
+ \endgroup
+}
+% \end{macrocode}
+%
+% \subsubsection{Subset encoding defaults}
+%
+% For many font families commonly used in the \TeX{} world we
+% provide the subset encoding data here. Users can add additional
+% font families in the file \texttt{textcomp.cfg} if they own other
+% fonts.
+%
+% However, if the option ``forced'' was given then all subset
+% encoding specifications are ignored, so there is no point in
+% setting any of them up:
+% \begin{macrocode}
+\iftc@forced \else
+% \end{macrocode}
+%
+% Computer modern based fonts (e.g., CM, CM-Bright, Concrete):
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{cmr} {0}
+\DeclareEncodingSubset{TS1}{cmss} {0}
+\DeclareEncodingSubset{TS1}{cmtt} {0}
+\DeclareEncodingSubset{TS1}{cmvtt} {0}
+\DeclareEncodingSubset{TS1}{cmbr} {0}
+\DeclareEncodingSubset{TS1}{cmtl} {0}
+\DeclareEncodingSubset{TS1}{ccr} {0}
+% \end{macrocode}
+%
+% PSNFSS fonts:
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{ptm} {4}
+\DeclareEncodingSubset{TS1}{pcr} {4}
+\DeclareEncodingSubset{TS1}{phv} {4}
+\DeclareEncodingSubset{TS1}{ppl} {3}
+\DeclareEncodingSubset{TS1}{pag} {4}
+\DeclareEncodingSubset{TS1}{pbk} {4}
+\DeclareEncodingSubset{TS1}{pnc} {4}
+\DeclareEncodingSubset{TS1}{pzc} {4}
+\DeclareEncodingSubset{TS1}{bch} {4}
+\DeclareEncodingSubset{TS1}{put} {5}
+% \end{macrocode}
+%
+% Other CTAN fonts (probably not complete):
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{uag} {5}
+\DeclareEncodingSubset{TS1}{ugq} {5}
+\DeclareEncodingSubset{TS1}{ul8} {4}
+\DeclareEncodingSubset{TS1}{ul9} {4} % (LuxiSans, one day)
+\DeclareEncodingSubset{TS1}{augie} {5}
+\DeclareEncodingSubset{TS1}{dayrom} {3}
+\DeclareEncodingSubset{TS1}{dayroms} {3}
+\DeclareEncodingSubset{TS1}{pxr} {0}
+\DeclareEncodingSubset{TS1}{pxss} {0}
+\DeclareEncodingSubset{TS1}{pxtt} {0}
+\DeclareEncodingSubset{TS1}{txr} {0}
+\DeclareEncodingSubset{TS1}{txss} {0}
+\DeclareEncodingSubset{TS1}{txtt} {0}
+% \end{macrocode}
+%
+% Latin Modern and TeX Gyre:
+% \changes{v1.99k}{2009/10/28}{Added Latin Modern and TeX Gyre subsets}
+% \changes{v1.99l}{2009/11/04}{Added more Latin Modern and TeX Gyre subsets}
+% \changes{v1.99m}{2015/02/16}{Added lmtt (Heiko Oberdiek) latex/4415}
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{lmr} {0}
+\DeclareEncodingSubset{TS1}{lmdh} {0}
+\DeclareEncodingSubset{TS1}{lmss} {0}
+\DeclareEncodingSubset{TS1}{lmssq} {0}
+\DeclareEncodingSubset{TS1}{lmvtt} {0}
+\DeclareEncodingSubset{TS1}{lmtt} {0}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{qhv} {0}
+\DeclareEncodingSubset{TS1}{qag} {0}
+\DeclareEncodingSubset{TS1}{qbk} {0}
+\DeclareEncodingSubset{TS1}{qcr} {0}
+\DeclareEncodingSubset{TS1}{qcs} {0}
+\DeclareEncodingSubset{TS1}{qpl} {0}
+\DeclareEncodingSubset{TS1}{qtm} {0}
+\DeclareEncodingSubset{TS1}{qzc} {0}
+\DeclareEncodingSubset{TS1}{qhvc} {0}
+% \end{macrocode}
+%
+% Fourier-GUTenberg:
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{futs} {4}
+\DeclareEncodingSubset{TS1}{futx} {4}
+\DeclareEncodingSubset{TS1}{futj} {4}
+% \end{macrocode}
+%
+% Y\&Y's Lucida Bright
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{hlh} {3}
+\DeclareEncodingSubset{TS1}{hls} {3}
+\DeclareEncodingSubset{TS1}{hlst} {3}
+% \end{macrocode}
+% The remaining settings for Lucida are conservative: the following
+% fonts contain the |\textohm| character but not the |\texteuro|,
+% i.e., belong to neither subset~4 nor subset~3. If you want to
+% use the |\textohm| with these fonts copy these definition to
+% \texttt{textcomp.cfg} and change the subset to~3. However in that
+% case make sure that you do not use the |\texteuro|.
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{hlct} {5}
+\DeclareEncodingSubset{TS1}{hlx} {5}
+\DeclareEncodingSubset{TS1}{hlce} {5}
+\DeclareEncodingSubset{TS1}{hlcn} {5}
+\DeclareEncodingSubset{TS1}{hlcw} {5}
+\DeclareEncodingSubset{TS1}{hlcf} {5}
+% \end{macrocode}
+%
+% Other commercial families\ldots
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{pplx} {3}
+\DeclareEncodingSubset{TS1}{pplj} {3}
+\DeclareEncodingSubset{TS1}{ptmx} {4}
+\DeclareEncodingSubset{TS1}{ptmj} {4}
+% \end{macrocode}
+%
+% If the file \texttt{textcomp.cfg} exists it will be loaded at
+% this point. This allows to define further subset encodings for
+% font families not covered by default.
+%
+% \begin{macrocode}
+\InputIfFileExists{textcomp.cfg}
+ {\PackageInfo{textcomp}{Local configuration file used}}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+%</TS1sty>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/ltoutenc.ins b/macros/latex-dev/base/ltoutenc.ins
new file mode 100644
index 0000000000..62e35e7707
--- /dev/null
+++ b/macros/latex-dev/base/ltoutenc.ins
@@ -0,0 +1,107 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{
+ \file{ot1enc.def}{
+ \from{ltoutenc.dtx}{OT1}}
+ \file{omsenc.def}{
+ \from{ltoutenc.dtx}{OMS}}
+ \file{omlenc.def}{
+ \from{ltoutenc.dtx}{OML}}
+ \file{t1enc.def}{
+ \from{ltoutenc.dtx}{T1}}
+ \file{ot4enc.def}{
+ \from{ltoutenc.dtx}{OT4}}
+ \file{ts1enc.def}{
+ \from{ltoutenc.dtx}{TS1}}
+ \file{tuenc.def}{
+ \from{ltoutenc.dtx}{TU}}
+ \file{textcomp.sty}{
+ \from{ltoutenc.dtx}{TS1sty}}
+ \file{fontenc.sty}{
+ \from{ltoutenc.dtx}{package}}
+}
+
+\endbatchfile
+
+
diff --git a/macros/latex-dev/base/ltoutput.dtx b/macros/latex-dev/base/ltoutput.dtx
new file mode 100644
index 0000000000..d1fe26b90a
--- /dev/null
+++ b/macros/latex-dev/base/ltoutput.dtx
@@ -0,0 +1,5035 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltoutput.dtx
+%<flafter>\ProvidesPackage{flafter}
+%<fltrace>\ProvidesPackage{fltrace}
+%<flafter,fltrace> [2018/11/28 v1.4d
+%<flafter> Standard LaTeX floats after reference (FMi)]
+%<fltrace> Tracing LaTeX floats algorithm (FMi)]
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltoutput.dtx}
+ [2018/11/28 v1.4d LaTeX Kernel (Output Routine)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltoutput.dtx}
+\title{\filename}
+\date{\filedate}
+\author{Leslie Lamport, Frank Mittelbach, Chris Rowley}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \iffalse
+% LATEX VERSION 2e
+% Copyright (C) 1992 by Leslie Lamport
+% Copyright (C) 1994-2000 by Leslie Lamport, LaTeX3 project
+%
+% LaTeX 2e kernel file for the output routine.
+%
+% Part of this file is the latest (not greatest, it still
+% deserves its name) version of kludge.sty.
+%
+% It also contains a few enhancements and many changes (corrections
+% and tidyings) to the float mechanism and other parts of the output
+% routine.
+%
+% The tracing in the file at present is mainly to help in testing the
+% code but it may well be developed into a full float tracing
+% package one day.
+%
+% ============================
+% \fi
+%
+% \changes{v1.1p}{1995/08/25}{Support autoloading feature (FMi).}
+% \task{CAR}{Update documentation.}
+% \changes{v1.0k}{1994/02/08}{Documentation and tasks tidied.}
+% \changes{v1.0l}{1994/03/15}{Driver added and further tidying.}
+% \changes{v1.0l}{1994/03/15}{Some boxmaxdepth settings removed.}
+% \changes{v1.0l}{1994/03/15}{Added some warnings when page gets full of
+% top floats.}
+% \changes{v1.0l}{1994/03/15}{Removed duplicated code and corrected
+% docstrip options.}
+% \changes{v1.0m}{1994/04/24}{Removed some long lines and other
+% aesthetic changes.}
+% \changes{v1.0m}{1994/04/24}{Corrected unverbed commands in
+% documentation.}
+% \changes{v1.0m}{1994/04/24}{Changed \cs{@normalsize} to
+% \cs{normalsize}.}
+% \changes{v1.0m}{1994/04/24}{Warning messages changed/corrected.}
+% \changes{v1.0n}{1994/04/30}{Added \cs{col@number}.}
+% \changes{v1.0n}{1994/04/30}{Fixed bug from \cs{dblfigrule} with
+% \cs{@topnewpage}.}
+% \changes{v1.0n}{1994/04/30}{Documentation tidied.}
+% \changes{v1.0n}{1994/04/30}{\cs{@activechar@warning} changed to an
+% info message.}
+% \changes{v1.0n}{1994/04/30}{Full of floats action improved.}
+% \changes{v1.0n}{1994/04/30}{Empty column action added.}
+% \changes{v1.0o}{1994/05/02}{Code of \cs{@resethfps} shortened.}
+% \changes{v1.0p}{1994/05/12}{\cs{normalcolor}added in various
+% places (DPC).}
+% \changes{v1.0q}{1994/05/16}{Changed setting of accents (FMi).}
+% \changes{v1.0s}{1994/05/20}{Added setting of \cs{protect}
+% during \cs{shipout}.}
+% \changes{v1.0t}{1994/05/22}{Changed warnings and infos to
+% new commands.}
+% \changes{v1.0u}{1994/05/23}{Added \cs{MessageBreak}.}
+% \changes{v1.0u}{1994/05/23}{Changed resetting of \cs{protect} after
+% shipout.}
+% \changes{v1.0v}{1994/05/25}{Extra documentation.}
+% \changes{v1.0w}{1994/06/01}{Tidied up typesetting.}
+%
+% \changes{v1.1f}{1994/11/14}{Removed old definition of \cs{@testfp}.}
+% \changes{v1.1h}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}.}
+% \changes{v1.1m}{1995/05/07}{Use \cs{hb@xt@}.}
+% \changes{v1.2n}{2015/02/21}
+% {Removed autoload code}
+%
+% \StopEventually{}
+%
+% \def \ie {i.e.~}
+% \def \eg {e.g.~}
+%
+% \section{Output Routine}
+%
+% \subsection{Floats}
+%
+% The `2ekernel' code ensures that a |\usepackage{autoout1}| is
+% essentially ignored if a `full' format is being used that has
+% the autoload file mode already in the format.
+% \begin{macrocode}
+%<defx>\begingroup
+%<defx>\makeatletter
+%<defx>\nfss@catcodes
+%<2ekernel>\expandafter\let\csname ver@autoout1.sty\endcsname\fmtversion
+% \end{macrocode}
+%
+%
+% \begin{oldcomments}
+% \begin{macrocode}
+%<*2ekernel>
+\message{output,}
+% \end{macrocode}
+% ****************************************
+% * OUTPUT *
+% ****************************************
+%
+%
+% PAGE LAYOUT PARAMETERS
+%
+% \topmargin : Extra space added to top of page.
+% @twoside : boolean. T if two-sided printing
+% \oddsidemargin : IF @twoside = T
+% THEN extra space added to left of odd-numbered
+% pages.
+% ELSE extra space added to left of all pages.
+% \evensidemargin : IF @twoside = T
+% THEN extra space added to left of even-numbered
+% pages.
+% \headheight : height of head
+% \headsep : separation between head and text
+% \footskip : distance separation between baseline of last
+% line of text and baseline of foot.
+% Note difference between \footSKIP and \headSEP.
+% \textheight : height of text on page, excluding head and foot
+% \textwidth : width of printing on page
+% \columnsep : IF @twocolumn = T
+% THEN width of space between columns
+% \columnseprule : IF @twocolumn = T
+% THEN width of rule between columns (0 if none).
+% \columnwidth : IF @twocolumn = T
+% THEN (\textwidth - \columnsep)/2
+% ELSE \textwidth
+% It is set by the \twocolumn and
+% \onecolumn commands.
+% \@textbottom : Command executed at bottom of vbox holding text of
+% page (including figures). The \raggedbottom
+% command almost \let's this to \vfil (actually sets
+% it to \vskip \z@ plus.0001fil).
+% Should have depth 0pt.
+%
+% \@texttop : Command executed at top of vbox holding text of
+% page (including figures). Used by letter style;
+% can also be used to produce centered pages.
+% Let to \relax by \raggedbottom and \flushbottom.
+%
+% Page layout must initialize \@colht and \@colroom to \textheight.
+%
+% PAGE STYLE PARAMETERS:
+%
+% \floatsep : Space left between floats.
+% \textfloatsep : Space between last top float or first bottom float
+% and the text.
+% \topfigrule : Command to place rule (or whatever) between floats
+% at top of page and text. Executed in inner
+% vertical mode right before the \textfloatsep skip
+% separating the floats from the text. Must occupy
+% zero vertical space. (See \footnoterule.)
+% \botfigrule : Same as \topfigrule, but put after the
+% \textfloatsep skip separating text from the
+% floats at bottom of page.
+% \intextsep : Space left on top and bottom of an in-text float.
+% \dblfloatsep : Space between double-column floats.
+% \dbltextfloatsep : Space between top double-column floats
+% and text.
+% \dblfigrule : Similar to \topfigrule, but for double-column
+% floats.
+% \@fptop : Glue to go at top of float column -- must be 0pt +
+% stretch
+% \@fpsep : Glue to go between floats in a float column.
+% \@fpbot : Glue to go at bottom of float column
+% -- must be 0pt +
+% stretch
+% \@dblfptop, \@dblfpsep, \@dblfpbot
+% : Analogous for double-column float page in
+% two-column format.
+%
+% FOOTNOTES: As in PLAIN, footnotes use \insert\footins.
+%
+% PAGE LAYOUT SWITCHES AND MACROS
+%
+% @twocolumn : Boolean. T if two columns per page globally.
+%
+% PAGE STYLE MACROS AND SWITCHES
+%
+% \@oddhead : IF @twoside = T
+% THEN macro to generate head of odd-numbered
+% pages.
+% ELSE macro to generate head of all pages.
+% \@evenhead : IF @twoside = T
+% THEN macro to generate head of even-numbered
+% pages.
+% \@oddfoot : IF @twoside = T
+% THEN macro to generate foot of odd-numbered
+% pages.
+% ELSE macro to generate foot of all pages.
+% \@evenfoot : IF @twoside = T
+% THEN macro to generate foot of even-numbered
+% pages.
+% @specialpage : boolean. T if current page is to have a special
+% format.
+% \@specialstyle : If its value is foo then
+% IF @specialpage = T
+% THEN the command \ps@foo is executed to
+% temporarily reset the page style parameters
+% before composing the current page.
+% This command should execute only \def's and
+% \edef's, making only local definitions.
+%
+% FLOAT PLACEMENT PARAMETERS
+%
+% The following parameters are set by the macro \@floatplacement.
+% When \@floatplacement is called,
+% \@colht is the height of the page or column being built. I.e.:
+% * For single-column page it equals \textheight.
+% * For double-column page it equals \textheight - height
+% of double-column floats on page.
+% Note that some are set globally and some locally:
+% \@topnum :=G Maximum number of floats allowed on the top of a
+% column.
+% \@toproom :=G Maximum amount of top of column devoted to floats--
+% excluding \textfloatsep separation below the floats
+% and \floatsep separation between them. For
+% two-column output, should be computed as a function
+% of \@colht.
+% \@botnum, \@botroom
+% : Analogous to above.
+% \@colnum :=G Maximum number of floats allowed in a column,
+% including in-text floats.
+% \@textmin :=L Minimum amount of text (excluding footnotes) that
+% must appear on a text page.
+% %% 27 Sep 85 : made local to
+% %% \@addtocurcol and \@addtonextcol
+% It is now also used locally in processing double
+% floats.
+% \@fpmin :=L Minimum height of floats in a float column.
+%
+% The macro \@dblfloatplacement sets the following parameters.
+% \@dbltopnum :=G Maximum number of double-column floats allowed at
+% the top of a two-column page.
+% \@dbltoproom :=G Maximum height of double-column floats allowed at
+% top of two-column page.
+% \@fpmin :=L Minimum height of floats in a float column.
+% It should also perform the following local assignments where necessary
+% -- i.e., where the new value differs from the old one:
+% \@fptop :=L \@dblfptop
+% \@fpsep :=L \@dblfpsep
+% \@fpbot :=L \@dblfpbot
+%
+% OUTPUT ROUTINE VARIABLES
+%
+% \@colht : The total height of the current column. In single column
+% style, it equals \textheight. In two-column style, it is
+% \textheight minus the height of the double-column floats
+% on the current page. MUST BE INITIALIZED TO \textheight.
+%
+% \@colroom : The height available in the current column for text and
+% footnotes. It equals \@colht minus the height of all
+% floats committed to the top and bottom of the current
+% column.
+%
+% \@textfloatsheight : The total height of in-text floats on the
+% current page.
+%
+% \footins : Footnote insertion number.
+%
+% \@maxdepth : Saved value of TeX's \maxdepth. Must be set
+% when any routine sets \maxdepth.
+%
+% CALLING THE OUTPUT ROUTINE
+% --------------------------
+%
+% The output routine is called either by TeX's normal page-breaking
+% mechanism, or by a macro putting a penalty < or = -10000 in the output
+% list. In the latter case, the penalty indicates why the output
+% routine was called, using the following code.
+%
+% penalty reason
+% ------- ------
+% -10000 \pagebreak
+% \newpage
+% -10001 \clearpage (\penalty -10000 \vbox{} \penalty -10001)
+% -10002 float insertion, called from horizontal mode
+% -10003 float insertion, called from vertical mode.
+% -10004 float insertion.
+%
+% Note: A float or marginpar puts the following sequence in the output
+% list: (i) a penalty of -10004,
+% (ii) a null \vbox
+% (iii) a penalty of -10002 or -10003.
+% This solves two special problems:
+% 1. If the float comes right after a \newpage or \clearpage,
+% then the first penalty is ignored, but the second one
+% invokes the output routine.
+% 2. If there is a split footnote on the page, the second 'page'
+% puts out the rest of the footnote.
+%
+% THE OUTPUT ROUTINE
+% ------------------
+%
+% FUNCTIONS USED IN THE OUTPUT ROUTINE:
+%
+% \@outputpage : Produces an output page with the contents of box
+% \@outputbox as the text part.
+% Also sets \@colht :=G \textheight.
+% The page style is determined as follows.
+% IF @thispagestyle = true
+% THEN use \thispagestyle style
+% ELSE use ordinary page style.
+%
+% \@tryfcolumn\FLIST : Tries to form a float column composed of floats
+% from \FLIST (if nonempty) with the following parameters:
+% \@colht : height of box
+% \@fpmin : minimum height of floats in the box
+% \@fpsep : interfloat space
+% \@fptop : glue at top of box
+% \@fpbot : glue at bottom of box.
+% If it succeeds, then it does the following:
+% * \@outputbox :=L the composed float box.
+% * @fcolmade :=G true
+% * \FLIST :=G \FLIST - floats put in box
+% * \@freelist :=G \@freelist + floats put in box
+% If it fails, then:
+% * @fcolmade :=G false
+% NOTE: BIT MUST BE A SINGLE TOKEN!
+%
+% \@makefcolumn \FLIST : Same as \@tryfcolumn except that it
+% fails to make a float column only if \FLIST is empty.
+% Otherwise, it makes a float column containing at least
+% the first box in \FLIST, disregarding \@fpmin.
+%
+% \@startcolumn :
+% Calls \@tryfcolumn\@deferlist. If \@tryfcolumn returns with
+% (globally set) @fcolmade = false, then:
+% * Globally sets \@toplist and \@botlist to floats
+% from \@deferlist to go at top and bottom of column,
+% deleting them from \@deferlist. It does
+% this using \@colht as the total height, the page
+% style parameters \@floatsep and \@textfloatsep, and
+% the float placement parameters \@topnum, \@toproom,
+% \@botnum, \@botroom, \@colnum and \textfraction.
+% * Globally sets \@colroom to \@colht minus the height
+% of the added floats.
+%
+% \@startdblcolumn :
+% Calls \@tryfcolumn\@dbldeferlist{8}. If \@tryfcolumn returns
+% with (globally set) @fcolmade = false, then:
+% * Globally sets \@dbltoplist to floats from
+% \@dbldeferlist to go at top and bottom of column,
+% deleting them from \@dbldeferlist.
+% It does this using \textheight as the
+% total height, and the parameters \@dblfloatsep, etc.
+% * Globally sets \@colht to \textheight minus the height
+% of the added floats.
+%
+% \@combinefloats : Combines the text from box
+% \@outputbox with the floats from \@toplist and \@botlist,
+% putting the new box in \@outputbox. It uses \floatsep
+% and \textfloatsep for the appropriate separations.
+% It puts the elements of \TOPLIST and \BOTLIST onto
+% \@freelist, and makes those lists null.
+%
+% \@makecol : Makes the contents of \box255 plus the accumulated
+% footnotes, plus the floats in \@toplist and \@botlist,
+% into a single column of height \@colht (unless the page
+% height has been locally changed), which it puts
+% into box \@outputbox. It puts boxes in \@midlist back
+% onto \@freelist and restores \maxdepth.
+%
+% \@opcol : Outputs a column whose text is in box \@outputbox
+% If @twocolumn = false, then it calls \@outputpage,
+% sets \@colht :=G \textheight, and calls \@floatplacement.
+%
+% If @twocolumn = true, then:
+% If @firstcolumn = true, then it puts box \@outputbox
+% into \@leftcolumn and sets @firstcolumn :=G false.
+%
+% If @firstcolumn = false, then it puts out the current
+% two-column page, any possible two-column float pages,
+% and determines \@dbltoplist for the next page.
+%
+%
+%
+% USER COMMANDS THAT CALL OR AFFECT THE OUTPUT ROUTINE
+% ----------------------------------------------------
+%
+% \newpage == BEGIN \par\vfil\penalty -10000 END
+%
+% \clearpage == BEGIN \newpage
+% \write -1{} % Part of hack to make sure no
+% \vbox{} % \write's get lost.
+% \penalty -10001
+% END
+%
+% \cleardoublepage == BEGIN \clearpage
+% if @twoside = true and c@page is even
+% then \hbox{} \newpage fi
+% END
+%
+%
+% \twocolumn[BOX] : starts a new page, changing to twocolumn setting
+% and puts BOX in a parbox of width \textwidth across the top.
+% Useful for full-width titles for double-column pages.
+% SURPRISE: The stretch from \@dbltextfloatsep will be inserted
+% between the BOX and the top of the two columns.
+%
+%
+% FLOAT-HANDLING MECHANISMS
+% -------------------------
+%
+% The float environment obtains an insertion number B from the
+% \@freelist (see below for a description of list manipulation), puts
+% the float into box B and sets \count B to a FLOAT SPECIFIER. For
+% a normal (not double-column) float, it then causes a page break
+% in one of the following two ways:
+% - In outer hmode: \vadjust{\penalty -10002}
+% - In vmode : \penalty -10003.
+% For a double-column float, it puts B onto the \@dbldeferlist.
+% The float specifier has two components:
+% * A PLACEMENT SPECIFICATION, describing where the float may
+% be placed.
+% * A TYPE, which is a power of two--e.g., figures might be
+% type 1 floats, tables type 2 floats, programs type 4 floats, etc.
+% The float specifier is encoded as follows, where bit 0 is the least
+% significant bit.
+%
+% Bit Meaning
+% --- -------
+% 0 1 iff the float may go where it appears in the text.
+% 1 1 iff the float may go on the top of a page.
+% 2 1 iff the float may go on the bottom of a page.
+% 3 1 iff the float may go on a float page.
+% 4 1 unless the PLACEMENT includes a !
+% 5 1 iff a type 1 float
+% 6 1 iff a type 2 float
+% etc.
+%
+% A negative float specifier is used to indicate a marginal note.
+%
+% MACROS AND DATA STRUCTURES FOR PROCESSING FLOATS
+% ------------------------------------------------
+%
+% A FLOAT LIST consisting of the floats in boxes \boxa ... \boxN has
+% the form:
+% \@elt \boxa ... \@elt \boxN
+% where \boxI is defined by
+% \newinsert\boxI
+% Normally, \@elt is \let to \relax. A test can be performed on the
+% entire float list by locally \def'ing \@elt appropriately and
+% executing the list.
+% This is a lot more efficient than looping through the list.
+%
+% The following macros are used for manipulating float lists.
+%
+% \@next \CS \LIST {NONEMPTY}{EMPTY} == %% NOTE: ASSUME \@elt = \relax
+% BEGIN assume that \LIST == \@elt \B1 ... \@elt \Bn
+% if n = 0
+% then EMPTY
+% else \CS :=L \B1
+% \LIST :=G \@elt \B2 ... \@elt \Bn
+% NONEMPTY
+% fi
+% END
+%
+%
+% \@bitor\NUM\LIST : Globally sets switch @test to the disjunction for
+% all I of bit log2 \NUM of the float specifiers of all the
+% floats in \LIST.
+% I.e., @test is set to true iff there is at least one
+% float in \LIST having bit log2 \NUM of its float specifier
+% equal to 1.
+%
+% Note: log2 [(\count I)/32] is the bit number corresponding to the
+% type of float I. To see if there is any float in \LIST having
+% the same type as float I, you run \@bitor with
+% \NUM = [(\count I)/32] * 32.
+%
+% \@bitor\NUM\LIST ==
+% BEGIN
+% @test :=G false
+% { \@elt \CTR == if \NUM <> 0 then
+% if \count\CTR / \NUM is odd
+% then @test := true fi fi
+% \LIST
+% }
+% END
+%
+%
+% \@cons\LIST\NUM : Globally sets \LIST := \LIST * \@elt \NUM
+%
+% \@cons\LIST\NUM ==
+% BEGIN { \@elt == \relax
+% \LIST :=G \LIST \@elt \NUM
+% }
+%
+% BOX LISTS FOR FLOAT-PLACEMENT ALGORITHMS
+%
+% \@freelist : List of empty boxes for placing new floats.
+% \@toplist : List of floats to go at top of current column.
+% \@midlist : List of floats in middle of current column.
+% \@botlist : List of floats to go at bottom of current column.
+% \@deferlist : List of floats to go after current column.
+% \@dbltoplist : List of double-col. floats to go at top of current
+% page.
+% \@dbldeferlist : List of double-column floats to go on subsequent
+% pages.
+%
+% FLOAT-PLACEMENT ALGORITHMS
+%
+%
+% \@addtobot : Tries to put insert \@currbox on \@botlist.
+% Called only when:
+% * \ht BOX < \@colroom
+% * type of \@currbox not on \@deferlist
+% * \@colnum > 0
+% * @insert = false
+% If it succeeds, then:
+% * sets @insert true
+% * decrements \@botroom by \ht BOX
+% * decrements \@botnum and \@colnum by 1
+% * decrements \@colroom by \ht BOX + either \floatsep
+% or \textfloatsep, as appropriate.
+% * sets \maxdepth to 0pt
+%
+% \@addtotoporbot : Tries to put insert \@currbox on \@toplist or
+% \@botlist.
+% Called only under same conditions as \@addtobot.
+% If it succeeds, then:
+% * sets @insert true
+% * decrements \@toproom or \@botroom by \ht BOX
+% * decrements \@colnum and either \@topnum or
+% \@botnum by 1
+% * decrements \@colroom by \ht BOX + \floatsep
+% or \textfloatsep, as appropriate.
+%
+% \@addtocurcol : Tries to add \@currbox to current column, setting
+% @insert true if it succeeds, false otherwise.
+% It will add \@currbox to top only if bit 0 of
+% \count \@currbox is 0, and to the bottom only if
+% bit 0 = 0 or an earlier float of the same type is
+% put on the bottom.
+% If the float is put in the text, then
+% \penalty\interlinepenalty is put
+% right after the float, before the following \vskip,
+% and \outputpenalty :=L 0.
+%
+% \@addtonextcol : Tries to add \@currbox to the next column, setting
+% @insert true if it succeeds, false otherwise.
+%
+% \@addtodblcol : Tries to add \@currbox to the next double-column page,
+% adding it to \@dbltoplist if it succeeds and
+% \@dbldeferlist if it fails.
+%
+%
+% \@addmarginpar ==
+% BEGIN
+% if \@currlist nonempty
+% then remove \@marbox from \@currlist
+% add \@marbox and \@currbox to \@freelist
+% %% NOTE: \@currbox = left box
+% else LaTeX error: ? %% shouldn't happen
+% fi
+% \@tempcnta := 1 %% 1 = right, -1 = left
+% if @twocolumn = true
+% then if @firstcolumn = true
+% then \@tempcnta := -1
+% fi
+% else if @mparswitch = true
+% then if count0 odd
+% else \@tempcnta := -1
+% fi
+% fi
+% if @reversemargin = true
+% then \@tempcnta := -\@tempcnta
+% fi
+% fi
+% if \@tempcnta < 0 then \box\@marbox :=G \box\@currbox
+% fi
+% \@tempdima :=L maximum(\@mparbottom - \@pageht
+% + ht of \@marbox, 0)
+% if \@tempdima > 0 then LaTeX warning: 'marginpar moved' fi
+% \@mparbottom :=G \@pageht + \@tempdima + depth of \@marbox
+% + \marginparpush
+% \@tempdima :=L \@tempdima - ht of \@marbox
+% \box\@marbox :=G \box\@currbox
+% \vbox { \vskip \@tempdima
+% \box\@marbox
+% }
+% height of \@marbox :=G depth of \@marbox :=G 0
+% \kern -\@pagedp
+% \nointerlineskip
+% \hbox{ if @tempcnta > 0 then \hskip \columnwidth
+% \hskip \marginparsep
+% else \hskip -\marginparsep
+% \hskip -\marginparwidth
+% fi
+% \box\@marbox \hss
+% }
+% \nobreak
+% \nointerlineskip
+% \hbox{\vrule height 0 width 0 depth \@pagedp}
+% END
+%
+% Floats and marginpars add a lot of dead cycles.
+% \end{oldcomments}
+% \begin{macrocode}
+\maxdeadcycles = 100
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\@elt\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@next#1#2#3#4{\ifx#2\@empty #4\else
+ \expandafter\@xnext #2\@@#1#2#3\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@xnext \@elt #1#2\@@#3#4{\def#3{#1}\gdef#4{#2}}
+% \end{macrocode}
+%
+% \changes{v1.1v}{1996/07/26}{put \cs{global} into definition}
+% \begin{macrocode}
+\def\@testfalse{\global\let\if@test\iffalse}
+\def\@testtrue {\global\let\if@test\iftrue}
+\@testfalse
+% \end{macrocode}
+%
+% \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \begin{macrocode}
+\def\@bitor#1#2{\@testfalse {\let\@elt\@xbitor
+ \@tempcnta #1\relax #2}}
+% \end{macrocode}
+% RmS 91/11/22: Added test for |\count#1 = 0|.
+% Suggested by Chris Rowley.
+%
+%
+% \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \begin{macrocode}
+\def\@xbitor #1{\@tempcntb \count#1
+ \ifnum \@tempcnta =\z@
+ \else
+ \divide\@tempcntb\@tempcnta
+ \ifodd\@tempcntb \@testtrue\fi
+ \fi}
+% \end{macrocode}
+%
+% DEFINITION OF FLOAT BOXES:
+% \changes{v1.3a}{2015/09/205}
+% {extended \cs{@freelist}}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/10/01}%
+%<latexrelease> {\bx@ZZ}{Extended float list}%
+%<*2ekernel|latexrelease>
+\let\@elt\newinsert
+%<*2ekernel>
+\def\@freelist{%
+ \@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E
+ \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J
+ \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N
+ \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R}
+\@freelist
+%</2ekernel>
+\ifx\numexpr\@undefined\else
+\def\reserved@a{%
+ \@elt\bx@S\@elt\bx@T\@elt\bx@U\@elt\bx@V
+ \@elt\bx@W\@elt\bx@X\@elt\bx@Y\@elt\bx@Z
+ \@elt\bx@AA\@elt\bx@BB\@elt\bx@CC\@elt\bx@DD\@elt\bx@EE
+ \@elt\bx@FF\@elt\bx@GG\@elt\bx@HH\@elt\bx@II\@elt\bx@JJ
+ \@elt\bx@KK\@elt\bx@LL\@elt\bx@MM\@elt\bx@NN
+ \@elt\bx@OO\@elt\bx@PP\@elt\bx@QQ\@elt\bx@RR
+ \@elt\bx@SS\@elt\bx@TT\@elt\bx@UU\@elt\bx@VV
+ \@elt\bx@WW\@elt\bx@XX\@elt\bx@YY\@elt\bx@ZZ}
+\reserved@a
+\def\@elt{\noexpand\@elt\noexpand}
+\edef\@freelist{\@freelist\reserved@a}
+\fi
+\let\reserved@a\relax
+\let\@elt\relax
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\bx@ZZ}{Extended float list}%
+%<latexrelease>\def\@freelist{%
+%<latexrelease> \@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E
+%<latexrelease> \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J
+%<latexrelease> \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N
+%<latexrelease> \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R}
+%<latexrelease> \insc@unt=234
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\@toplist{}
+\gdef\@botlist{}
+\gdef\@midlist{}
+\gdef\@currlist{}
+\gdef\@deferlist{}
+\gdef\@dbltoplist{}
+% \end{macrocode}
+% \changes{v1.2m}{2015/03/12}
+% {initialise \cs{@dbldeferlist} again}
+% The new algorithm stores page wide floats together with column floats
+% in a single |\@deferlist| list. We keep |\@dbldeferlist|
+% initialised as empty so that packages that are testing for
+% deferred floats can use the same code for old or new float
+% handling.
+% \begin{macrocode}
+\gdef\@dbldeferlist{}
+% \end{macrocode}
+%
+% PAGE LAYOUT PARAMETERS
+% \begin{macrocode}
+\newdimen\topmargin
+\newdimen\oddsidemargin
+\newdimen\evensidemargin
+\let\@themargin=\oddsidemargin
+\newdimen\headheight
+\newdimen\headsep
+\newdimen\footskip
+\newdimen\textheight
+\newdimen\textwidth
+\newdimen\columnwidth
+\newdimen\columnsep
+\newdimen\columnseprule
+\newdimen\marginparwidth
+\newdimen\marginparsep
+\newdimen\marginparpush
+% \end{macrocode}
+%
+% \begin{macro}{\AtBeginDvi}
+% \changes{v1.1c}{1994/11/05}
+% {Added macro}
+% \begin{macro}{\@begindvibox}
+% \changes{v1.1c}{1994/11/05}
+% {Added macro}
+% \changes{v1.1f}{1994/11/14}{Use normal box register: why a box?}
+% \changes{v1.1l}{1995/04/24}{Add \cs{vbox} latex/1392}
+%
+% We use a box register in which to put
+% stuff that must appear before anything else in the
+% |.dvi| file.
+%
+% The stuff in the box should not add any typeset material to the
+% page when it is unboxed.
+% \begin{macrocode}
+\newbox\@begindvibox
+\def \AtBeginDvi #1{%
+ \global \setbox \@begindvibox
+ \vbox{\unvbox \@begindvibox #1}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@maxdepth}
+% This is not the right place to set this; it needs to be set in a
+% class/style file when |\maxdepth| is set.
+%
+% Also, many settings to |\maxdepth| should be to |\@maxdepth|,
+% probably?
+% \task{All}{Sort out maxdepth: both should be set in the class files.}
+% \begin{macrocode}
+\newdimen\@maxdepth
+\@maxdepth = \maxdepth
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\paperheight}
+% \changes{v0.1a}{1993/11/23}{Register added}
+% \begin{macro}{\paperwidth}
+% \changes{v0.1a}{1993/11/23}{Register added}
+% New |\paper|\ldots\ registers.
+% \begin{macrocode}
+\newdimen\paperheight
+\newdimen\paperwidth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@insert}
+% \begin{macro}{\if@fcolmade}
+% \begin{macro}{\if@specialpage}
+% \begin{macro}{\if@firstcolumn}
+% \begin{macro}{\if@twocolumn}
+% \begin{macro}{\if@twoside}
+% \begin{macro}{\if@reversemarginpar}
+% \begin{macro}{\if@mparswitch}
+% \begin{macro}{\col@number}
+% \changes{v1.0n}{1994/04/30}{Added \cs{col@number}}
+% Local switches first:
+% \begin{macrocode}
+\newif \if@insert
+% \end{macrocode}
+% These should definitely be global:
+% \begin{macrocode}
+\newif \if@fcolmade
+\newif \if@specialpage \@specialpagefalse
+% \end{macrocode}
+% These should be global but are not always set globally in other
+% files.
+% \begin{macrocode}
+\newif \if@firstcolumn \@firstcolumntrue
+\newif \if@twocolumn \@twocolumnfalse
+% \end{macrocode}
+% Not sure about these: two questions.
+% Should things which must apply to a whole document be local or
+% global (they probably should be `preamble only' commands)?
+% Are these three such things?
+% \begin{macrocode}
+\newif \if@twoside \@twosidefalse
+\newif \if@reversemargin \@reversemarginfalse
+\newif \if@mparswitch \@mparswitchfalse
+% \end{macrocode}
+% This counter has been imported from `multicol'.
+% \begin{macrocode}
+\newcount \col@number
+\col@number \@ne
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{oldcomments}
+% INTERNAL REGISTERS
+%
+% \begin{macrocode}
+\newcount\@topnum
+\newdimen\@toproom
+\newcount\@dbltopnum
+\newdimen\@dbltoproom
+\newcount\@botnum
+\newdimen\@botroom
+\newcount\@colnum
+\newdimen\@textmin
+\newdimen\@fpmin
+\newdimen\@colht
+\newdimen\@colroom
+\newdimen\@pageht
+\newdimen\@pagedp
+\newdimen\@mparbottom \@mparbottom\z@
+\newcount\@currtype
+\newbox\@outputbox
+\newbox\@leftcolumn
+\newbox\@holdpg
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@thehead{\@oddhead} % initialization
+\def\@thefoot{\@oddfoot}
+% \end{macrocode}
+% \end{oldcomments}
+%
+% \begin{macro}{\clearpage}
+% \changes{v1.1r}{1995/10/11}{Added a check so that it does not lose
+% the argument of \cs{twocolumn[...]}}
+%
+% The tests at the beginning are an experimental attempt to avoid a
+% completely empty page after a |\twocolumn[...]|. This prevents the
+% text from the argument vanishing into a float box, never to be seen
+% again. We hope that it does not produce wrong formatting in other
+% cases.
+% \changes{v1.1v}{1996/07/26}{add number of missing percents}
+% \begin{macrocode}
+\def\clearpage{%
+ \ifvmode
+ \ifnum \@dbltopnum =\m@ne
+ \ifdim \pagetotal <\topskip
+ \hbox{}%
+ \fi
+ \fi
+ \fi
+ \newpage
+ \write\m@ne{}%
+ \vbox{}%
+ \penalty -\@Mi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cleardoublepage}
+%
+% \begin{macrocode}
+\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
+ \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\onecolumn}
+% \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\def\onecolumn{%
+ \clearpage
+ \global\columnwidth\textwidth
+ \global\hsize\columnwidth
+ \global\linewidth\columnwidth
+ \global\@twocolumnfalse
+ \col@number \@ne
+ \@floatplacement}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newpage}
+% \changes{v1.1x}{1996/09/29}{Checks for noskipsec and inlabel added}
+% \changes{v1.1x}{1996/09/29}{Checks for noskipsec and inlabel added}
+% \changes{v1.1y}{1996/09/30}{Checks for noskipsec and inlabel removed
+% pending further tests}
+% \changes{v1.1z}{1996/10/24}{Better checks for noskipsec and
+% inlabel added, plus nobreak}
+% \changes{v1.2a}{1996/10/25}{Reset all flags explicitly}
+% \changes{v2.4a}{2017/04/11}{account for the depth of the last row of the page}
+% The two checks at the beginning ensure that an item label or
+% run-in section title immediately before a |\newpage| get printed
+% on the correct page, the one before the page break.
+%
+% All three tests are largely to make error processing more robust;
+% that is why they all reset the flags explicitly, even when it
+% would appear that this would be done by a |\leavevmode|.
+% \begin{macrocode}
+%</2ekernel|fltrace>
+%<latexrelease>\IncludeInRelease{2017/04/15}%
+%<latexrelease> {\newpage}{Check depth of page}%
+%<*2ekernel|latexrelease|fltrace>
+\def \newpage {%
+ \if@noskipsec
+ \ifx \@nodocument\relax
+ \leavevmode
+ \global \@noskipsecfalse
+ \fi
+ \fi
+ \if@inlabel
+ \leavevmode
+ \global \@inlabelfalse
+ \fi
+ \if@nobreak \@nobreakfalse \everypar{}\fi
+ \par
+% \end{macrocode}
+% The |\vfil| at the end of the macro before the break penalty will
+% normally result in the page being run short, even with |\flushbottom|
+% in effect (in contrast to the behavior
+% of |\pagebreak|). However, if there
+% is some explicit stretch on the page, say, a |\vfill|, it has the undesired
+% side-effect, that the last line will not align at its baseline if it
+% contains characters going below the baseline, as the value of |\prevdepth|
+% is no longer taken into account by \TeX{}. So we back up by that amount
+% (or by |\maxdepth| if it is really huge), to mimic the normal behavior
+% without the |\newpage|.
+% \begin{macrocode}
+ \ifdim\prevdepth>\z@
+ \vskip -%
+ \ifdim\prevdepth>\maxdepth
+ \maxdepth
+ \else
+ \prevdepth
+ \fi
+ \fi
+ \vfil
+ \penalty -\@M}
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\newpage}{Check depth of page}%
+%<latexrelease>\def \newpage {%
+%<latexrelease> \if@noskipsec
+%<latexrelease> \ifx \@nodocument\relax
+%<latexrelease> \leavevmode
+%<latexrelease> \global \@noskipsecfalse
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \if@inlabel
+%<latexrelease> \leavevmode
+%<latexrelease> \global \@inlabelfalse
+%<latexrelease> \fi
+%<latexrelease> \if@nobreak \@nobreakfalse \everypar{}\fi
+%<latexrelease> \par
+%<latexrelease> \vfil
+%<latexrelease> \penalty -\@M}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@emptycol}
+% \changes{v1.0n}{1994/04/30}{Empty column action added:
+% \cs{@emptycol}}
+% It may be better to use an invisible rule rather than an empty
+% box here.
+% \begin{macrocode}
+\def \@emptycol {\vbox{}\penalty -\@M}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\twocolumn}
+% \begin{macro}{\@topnewpage}
+% \changes{v1.0f}{1993/12/05}{Commands changed}
+% \changes{v1.0g}{1993/12/06}{\cs{@floatplacement} placement bug
+% fixed}
+% \changes{v1.0j}{1993/12/17}{check for vsize too small added}
+% \changes{v1.2c}{1997/11/09}{Documentation of vsize check enhanced}
+% There are several bug fixes to the two-column stuff here.
+%
+% \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
+% \begin{macrocode}
+\def \twocolumn {%
+ \clearpage
+ \global\columnwidth\textwidth
+ \global\advance\columnwidth-\columnsep
+ \global\divide\columnwidth\tw@
+ \global\hsize\columnwidth
+ \global\linewidth\columnwidth
+ \global\@twocolumntrue
+ \global\@firstcolumntrue
+ \col@number \tw@
+% \end{macrocode}
+% There is no reason to put a |\@dblfloatplacement| here since
+% |\@topnewpage| ignores these settings.
+% The |\@floatplacement| is needed in case this comes after some
+% changes.
+% \changes{v1.0h}{1993/12/12}{braces removed}
+% \begin{macrocode}
+ \@ifnextchar [\@topnewpage\@floatplacement
+}
+% \end{macrocode}
+%
+% Note that here, getting a box from the freelist can assume
+% success since this comes just after a |\clearpage|.
+% \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Use \cs{color@begingroup} for colour}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Use \cs{normalcolor}}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Extra box added to remove colour resetting from vmode}
+% \changes{v1.1b}{1994/11/05}
+% {Use new \cs{color@hbox} concept.}
+% \changes{v1.1i}{1994/11/21}{Changed to \cs{color@vbox}}
+% \changes{v1.1z}{1996/10/24}{Added \cs{@nodocument} to trap
+% \cs{twocolumn} in the preamble}
+% \begin{macrocode}
+\long\def \@topnewpage [#1]{%
+ \@nodocument
+ \@next\@currbox\@freelist{}{}%
+ \global \setbox\@currbox
+ \color@vbox
+ \normalcolor
+ \vbox {%
+ \hsize\textwidth
+ \@parboxrestore
+ \col@number \@ne
+ #1%
+ \vskip -\dbltextfloatsep
+ }%
+ \color@endbox
+% \end{macrocode}
+% Added size test and warning message; perhaps we should use
+% an error message.
+% \changes{v1.0l}{1994/03/15}{Corrected and amended warning message}
+% \changes{v1.0m}{1994/04/24}{Warning message removed as it will be
+% generated later}
+% \begin{macrocode}
+ \ifdim \ht\@currbox>\textheight
+ \ht\@currbox \textheight
+ \fi
+% \end{macrocode}
+% This next line is not essential but it is more robust to make this
+% value non-zero, in case of weird errors.
+%
+% This next bit is what is needed from |\@addtodblcol|, plus some
+% extra checks for error trapping.
+% \begin{macrocode}
+ \global \count\@currbox \tw@
+ \@tempdima -\ht\@currbox
+ \advance \@tempdima -\dbltextfloatsep
+ \global \advance \@colht \@tempdima
+ \ifx \@dbltoplist \@empty
+ \else
+ \@latexerr{Float(s) lost}\@ehb
+ \let \@dbltoplist \@empty
+ \fi
+ \@cons \@dbltoplist \@currbox
+% \end{macrocode}
+% This setting of |\@dbltopnum| is used only to change the
+% typesetting in\\ |\@combinedblfloats|.
+% \begin{macrocode}
+ \global \@dbltopnum \m@ne
+%<*trace>
+ \fl@trace{dbltopnum set to -1 (= \the \@dbltopnum) (topnewpage)}%
+%</trace>
+% \end{macrocode}
+% At points such as this we need to check that there is still a
+% minimal amount of room left on the page; this uses an arbitrary
+% small value at present; but note that this value is larger than
+% that used when checking that page is too full of normal floats.
+%
+% If there is little room left we just force a page-break, OK?
+% This involves producing two empty columns. The second empty
+% column may be produced by |\output|, in which case an extra,
+% misleading, warning will be generated, OK? (This happens only
+% when there is too little room left on the page for any float.)
+% Otherwise (\ie if the size is such that it is allowed as a normal
+% float) the extra |\@emptycol| will be invoked in the second
+% column by the conditional code guarded by the |\if@firstcolumn|
+% test.
+%
+% I now think that the cut-off point here should be |3\baselineskip|,
+% but we make it a bit less so that 3 lines of text will be
+% allowed, OK?
+%
+% Since this happens only when there is nothing on the page but the
+% `top-box', the empty box should not cause any problem other than
+% some overfull box messages, which is not entirely misleading.
+%
+% Here we need two page-ends since both columns need to be empty.
+% \task{???}{Make it less arbitrary?}
+% \changes{v1.0j}{1993/12/17}{Page room test added}
+% \changes{v1.0l}{1994/03/15}{Warning added: it should be improved}
+% \changes{v1.0m}{1994/04/24}{Message changed to give more info}
+% \changes{v1.0n}{1994/04/30}{Message changed for Frank}
+% \changes{v1.0n}{1994/04/30}{Empty column action added:
+% \cs{@emptycol}}
+% \changes{v1.0n}{1994/04/30}{Cut-off point changed to
+% 3\cs{baselineskip}}
+% \changes{v1.1t}{1996/05/24}{Cut-off point changed to
+% 2.5\cs{baselineskip}}
+% \begin{macrocode}
+ \ifdim \@colht<2.5\baselineskip
+ \@latex@warning@no@line {Optional argument of \noexpand\twocolumn
+ too tall on page \thepage}%
+ \@emptycol
+ \if@firstcolumn
+ \else
+ \@emptycol
+ \fi
+ \else
+ \global \vsize \@colht
+ \global \@colroom \@colht
+ \@floatplacement
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\output}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% \begin{macro}{\@specialoutput}
+% \changes{v0.1c}{1993/11/23}{Command changed}
+% \changes{v1.0f}{1993/12/06}{Unboxing of 255 added to rescue writes}
+% This needs some small adjustments. We cannot
+% guarantee that the float mechanism will interact correctly with
+% this stuff, but that mechanism does not always work properly
+% with footnotes already.
+%
+% RmS 91/09/29:
+%
+% added reset of |\par| to the output routine.
+% This avoids problems when the output routine is
+% called within a list where |\par| may be a no-op.
+%
+% \begin{macrocode}
+\output {%
+ \let \par \@@par
+ \ifnum \outputpenalty<-\@M
+ \@specialoutput
+ \else
+ \@makecol
+ \@opcol
+% \end{macrocode}
+% Moved to |\@opcol|: |\@floatplacement|.
+% \begin{macrocode}
+ \@startcolumn
+% \end{macrocode}
+% This loop could be replaced by an |\expandafter| tail
+% recursion in |\@startcolumn|.
+% \begin{macrocode}
+ \@whilesw \if@fcolmade \fi
+ {%
+%<*trace>
+ \fl@trace{PAGE: float \if@twocolumn column \else page \fi
+ completed}%
+%</trace>
+ \@opcol\@startcolumn}%
+ \fi
+ \ifnum \outputpenalty>-\@Miv
+% \end{macrocode}
+% At points such as this we need to check that there is still a
+% minimal amount of room left on the page; this uses an arbitrary
+% small value at present. If there is little room left we just
+% force a page-break, OK?
+%
+% This bit is essential only if a float has just been processed so
+% maybe it should be moved; but this is the natural place at which
+% to set the vsize and a test would need to be done anyway. A
+% check has been added to ensure that there really has been a
+% change in the value of |\@colroom|.
+%
+% Since this happens only when there is nothing on the page but
+% floats, the empty box should not cause any problem other than
+% some overfull box messages, which is not entirely misleading.
+%
+% The twocolumn case does not need any extra code here since this
+% is the |\output| itself; in the second column there will still
+% not be enough room left so |\@emptycol| will be executed again
+% when the OR is called by the-page builder when it gets to the
+% penalty inserted by the first execution. (The page-builder is
+% never invoked whilst the OR is being executed since it builds a
+% inner vlist; thus any conditional code for the two-column case
+% within |\output| may not get executed with the correct value of
+% |\if@firstcolumn|.
+%
+% \task{???}{Make it less arbitrary?}
+% \changes{v1.0j}{1993/12/17}{Page room test added}
+% \changes{v1.0m}{1994/04/24}{Message changed to give more info and
+% `top' removed}
+% \changes{v1.0n}{1994/04/30}{Extra empty column added for
+% twocolumn case (wrong, see below)}
+% \changes{v1.0n}{1994/04/30}{Extra empty column added for
+% twocolumn case}
+% \changes{v1.0n}{1994/04/30}{Empty column action added:
+% \cs{@emptycol}}
+% \changes{v1.0n}{1994/04/30}{Cut-off point changed to
+% 2\cs{baselineskip}}
+% \changes{v1.1t}{1996/05/24}{Cut-off point changed to
+% 1.5\cs{baselineskip}}
+% \changes{v1.1t}{1996/05/24}{Check that \cs{@colroom} is less
+% than \cs{vsize}, indicating that a float has been added}
+% \changes{v1.1u}{1996/05/25}{Correct the above check}
+% \changes{v1.2c}{1997/11/09}{Remove incorrect code: only one
+% \cs{@emptycol} is needed here}
+% \begin{macrocode}
+ \ifdim \@colroom<1.5\baselineskip
+ \ifdim \@colroom<\textheight
+ \@latex@warning@no@line {Text page \thepage\space
+ contains only floats}%
+ \@emptycol
+% \if@twocolumn
+% \if@firstcolumn
+% \else
+% \@emptycol
+% \fi
+% \fi
+ \else
+ \global \vsize \@colroom
+ \fi
+ \else
+ \global \vsize \@colroom
+ \fi
+ \else
+ \global \vsize \maxdimen
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{oldcomments}
+% CHANGES TO \@specialoutput:
+% * \penalty\z@ changed to \penalty\interlinepenalty so \samepage
+% works properly with figure and table environments.
+% (Changed 23 Oct 86)
+%
+% * Definition of \@specialoutput changed 26 Feb 88 so \@pageht and
+% \@pagedp aren't changed for a marginal note.
+% (Change suggested by Chris Rowley.)
+% \end{oldcomments}
+%
+% \begin{macrocode}
+\gdef\@specialoutput{%
+ \ifnum \outputpenalty>-\@Mii
+ \@doclearpage
+ \else
+ \ifnum \outputpenalty<-\@Miii
+ \ifnum \outputpenalty<-\@MM \deadcycles \z@ \fi
+ \global \setbox\@holdpg \vbox {\unvbox\@cclv}%
+ \else
+% \end{macrocode}
+% Note that |\boxmaxdepth| should not be set here since we wish to
+% record the natural depth of the holdpg box.
+%
+% This is changed so as to not lose anything, such as writes
+% and marks, which may get into box 255 and should be returned to
+% the list. This should only happen when the first penalty in the
+% mechanism is discarded and therefore |\@holdpg| should always be
+% void in this case. This can happen because a penalty is
+% discarded whenever there is no box on the list.
+%
+% It was just: |\setbox\@tempboxa \box \@cclv|.
+%
+% The last box which is removed is the box put there by the
+% double-penalty mechanism. The |\unskip| then removes the
+% |\topskip| which is put there since the box is the first on the
+% page.
+% \task{CAR/FMi}{Is it more efficient to check whether the holdpg box
+% is void and then act accordingly?}
+% \begin{macrocode}
+ \global \setbox\@holdpg \vbox{%
+ \unvbox\@holdpg
+ \unvbox\@cclv
+% \end{macrocode}
+% We must now remove the box added by the float mechanism and the
+% |\topskip| glue therefore added above it by \TeX.
+% \begin{macrocode}
+ \setbox\@tempboxa \lastbox
+ \unskip
+ }%
+% \end{macrocode}
+% These two are needed as separate dimensions only by
+% |\@addmarginpar|; for other purposes we put the whole size into
+% |\@pageht| (see below).
+% \begin{macrocode}
+ \@pagedp \dp\@holdpg
+ \@pageht \ht\@holdpg
+ \unvbox \@holdpg
+ \@next\@currbox\@currlist{%
+ \ifnum \count\@currbox>\z@
+% \end{macrocode}
+% Putting the whole size into |\@pageht| (see above).
+% \begin{macrocode}
+ \advance \@pageht \@pagedp
+ \ifvoid\footins \else
+ \advance \@pageht \ht\footins
+ \advance \@pageht \skip\footins
+ \advance \@pageht \dp\footins
+ \fi
+ \ifvbox \@kludgeins
+% \end{macrocode}
+% We want to make the adjustment due to this insert only if the
+% non-star form is used. The *-form will probably not work with
+% floats, but maybe it still could make some adjustment here even
+% so?
+% \begin{macrocode}
+ \ifdim \wd\@kludgeins=\z@
+ \advance \@pageht \ht\@kludgeins
+%<*trace>
+ \fl@trace {Extra size added: \the \ht\@kludgeins}%
+%</trace>
+ \fi
+ \fi
+% \end{macrocode}
+% This version puts the inserts back just before the additional
+% material; it could be moved earlier, before unboxing the
+% page-so-far. Neither is guaranteed not to put things on the wrong
+% page. This version is similar to the original version.
+% \begin{macrocode}
+ \@reinserts
+ \@addtocurcol
+ \else
+ \@reinserts
+ \@addmarginpar
+ \fi
+ }\@latexbug
+% \end{macrocode}
+% A 2e change: use |\addpenalty| instead of |\penalty| here. Some
+% penalty is needed to create a potential break-point immediately
+% after the reinserts (or the marginal). Otherwise there can be no
+% possibility to break here and this can cause the reinserts or the
+% marginal to appear on the next page (which is often incorrect).
+% However, if the nobreak flag is true, a |\nobreak| must be
+% correct.
+% \changes{v1.1i}{1994/11/21}{Added \cs{if@nobreak} test}
+% \changes{v1.1z}{1996/10/24}{Added \cs{nobreak} as appropriate}
+% \begin{macrocode}
+ \ifnum \outputpenalty<\z@
+ \if@nobreak
+ \nobreak
+ \else
+ \addpenalty \interlinepenalty
+ \fi
+ \fi
+ \fi
+ \fi
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@testwrongwidth}
+% \begin{macro}{\f@depth}
+% \changes{v1.2n}{2015/02/21}{macro added(latexrelease)}
+%
+% Test if the float box has the wrong width when trying to place it
+% into some area. (Actually
+% the test is for a conventional depth setting rather than for the
+% width of the float. For that reason the box depth was explicitly
+% tailored when the float was created).
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@testwrongwidth}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@testwrongwidth #1{%
+ \ifdim\dp#1=\f@depth
+%<*trace>
+ \fl@trace{\string#1
+ \ifdim\f@depth=\z@ single \else double \fi
+ column float -- ok}%
+%</trace>
+ \else
+ \global\@testtrue
+%<*trace>
+ \fl@trace{\string#1
+ \ifdim\f@depth=\z@ double \else single \fi
+ column float -- wrong}%
+%</trace>
+ \fi}%
+% \end{macrocode}
+%
+% Normally looking for single column floats, which have zero depth.
+% \begin{macrocode}
+\let\f@depth\z@
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@testwrongwidth}{float order in 2-column}%
+%<latexrelease>\let\@testwrongwidth\@undefined
+%<latexrelease>\let\f@depth\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@doclearpage}
+% \task{CAR/FMi}{Investigate better float clearance}
+% \task{CAR/FMi}{Put non-boxes back in the `right place', or nowhere?}
+% This is a very much an emergency action, just dumping everything:
+% footnotes first then floats. A more sophisticated version is
+% needed; but even more urgent is a bug-free version (see, for
+% example, pr/3528).
+%
+% Also, it puts any left-over non-boxes (writes, specials, etc.) back
+% after any float pages created: this is a very bad bug since,
+% for example, a kludge insert will be in quite the wrong place
+% and, worse, be irremovable and uncancelable.
+%
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% All the remaining changes are replacing the double column defer list
+% or inserting the extra test |\@testwrongwidth|\marg{box} at suitable
+% places. That is at places where a box is taken off the deferlist.
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@doclearpage}%
+%<latexrelease> {float order in 2-column}%
+%<*2ekernel|latexrelease>
+\def \@doclearpage {%
+ \ifvoid\footins
+% \end{macrocode}
+% \changes{v1.2n}{2015/01/14}{Empty kludgeins box if necessary, pr/3528}
+% \begin{macrocode}
+ \ifvbox\@kludgeins
+ {\setbox \@tempboxa \box \@kludgeins}%
+%<*trace>
+ \fl@trace {kludgeins box made void}%
+%</trace>
+ \fi
+ \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
+ \setbox\@tempboxa\box\@cclv
+ \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
+ \global \let \@toplist \@empty
+ \global \let \@botlist \@empty
+ \global \@colroom \@colht
+ \ifx \@currlist\@empty
+ \else
+ \@latexerr{Float(s) lost}\@ehb
+ \global \let \@currlist \@empty
+ \fi
+ \@makefcolumn\@deferlist
+ \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
+ \if@twocolumn
+ \if@firstcolumn
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \xdef\@deferlist{\@dbltoplist\@deferlist}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \global \let \@dbltoplist \@empty
+ \global \@colht \textheight
+ \begingroup
+ \@dblfloatplacement
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@makefcolumn\@deferlist
+ \@whilesw\if@fcolmade \fi{\@outputpage
+ \@makefcolumn\@deferlist}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \endgroup
+ \else
+ \vbox{}\clearpage
+ \fi
+ \fi
+% \end{macrocode}
+% the next line is needed to avoid losing floats in certain
+% circumstances a single call to the original |\doclearpage|
+% will now no longer output all floats.
+% \changes{v1.2b}{2000/09/24}{FMi: ensure \cs{doclearpage}
+% is called again until all floats are output.}
+% \begin{macrocode}
+ \ifx\@deferlist\@empty \else\clearpage \fi
+ \else
+ \setbox\@cclv\vbox{\box\@cclv\vfil}%
+ \@makecol\@opcol
+ \clearpage
+ \fi
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@doclearpage}%
+%<latexrelease> {float order in 2-column}%
+%<latexrelease>\def \@doclearpage {%
+%<latexrelease> \ifvoid\footins
+% \end{macrocode}
+% \changes{v1.2l}{2004/02/07}{Empty kludgeins box if necessary, pr/3528}
+% We empty any left over kludge insert box here; this is a temporary fix.
+% It should perhaps be applied to one page of cleared floats, but
+% who cares? The whole of this stuff needs completely redoing for
+% many such reasons.
+% \begin{macrocode}
+%<latexrelease> \ifvbox\@kludgeins
+%<latexrelease> {\setbox \@tempboxa \box \@kludgeins}%
+%<*trace>
+%<latexrelease> \fl@trace {kludgeins box made void}%
+%</trace>
+%<latexrelease> \fi
+%<latexrelease> \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
+%<latexrelease> \setbox\@tempboxa\box\@cclv
+%<latexrelease> \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+%<latexrelease> \global \let \@toplist \@empty
+%<latexrelease> \global \let \@botlist \@empty
+%<latexrelease> \global \@colroom \@colht
+%<latexrelease> \ifx \@currlist\@empty
+%<latexrelease> \else
+%<latexrelease> \@latexerr{Float(s) lost}\@ehb
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+%<latexrelease> \global \let \@currlist \@empty
+%<latexrelease> \fi
+%<latexrelease> \@makefcolumn\@deferlist
+%<latexrelease> \@whilesw\if@fcolmade \fi
+%<latexrelease> {\@opcol\@makefcolumn\@deferlist}%
+%<latexrelease> \if@twocolumn
+%<latexrelease> \if@firstcolumn
+%<latexrelease> \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+%<latexrelease> \global \let \@dbltoplist \@empty
+%<latexrelease> \global \@colht \textheight
+%<latexrelease> \begingroup
+%<latexrelease> \@dblfloatplacement
+%<latexrelease> \@makefcolumn\@dbldeferlist
+%<latexrelease> \@whilesw\if@fcolmade \fi
+%<latexrelease> {\@outputpage\@makefcolumn\@dbldeferlist}%
+%<latexrelease> \endgroup
+%<latexrelease> \else
+%<latexrelease> \vbox{}\clearpage
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \setbox\@cclv\vbox{\box\@cclv\vfil}%
+%<latexrelease> \@makecol\@opcol
+%<latexrelease> \clearpage
+%<latexrelease> \fi
+%<latexrelease> }%
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@opcol}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% \changes{v1.0f}{1993/12/05}{Hook added}
+% \changes{v1.0j}{1993/12/17}{Hook removed}
+% Several changes in detail here.
+%
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\def \@opcol {%
+ \if@twocolumn
+ \@outputdblcol
+ \else
+ \@outputpage
+%<*trace>
+ \fl@trace{PAGE: one column (float? see above) page completed}%
+%</trace>
+% \end{macrocode}
+% Not needed since it comes after |\@outputpage|:
+% \begin{macrocode}
+% \global\@colht\textheight
+ \fi
+% \end{macrocode}
+% These do not need to be done every time |\@opcol| is used: they
+% should be grouped together since they all need to be done at the
+% end of the non-special output routine, or at the end of a clearpage
+% one.
+% \begin{macrocode}
+ \global \@mparbottom \z@ \global \@textfloatsheight \z@
+ \@floatplacement
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@makecol}
+% \changes{v0.1c}{1993/11/23}{Command changed}
+% \changes{v1.0b}{1993/11/29}{\cs{@makespecialcolbox} added}
+% We must rewrite this macro to alllow for variations in page-makeup
+% required by changes in page-length.
+%
+% This uses a different macro if a special-length column is being
+% produced.
+%
+% \begin{macrocode}
+%<*2ekernel>
+\gdef \@makecol {%
+ \ifvoid\footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox {%
+% \end{macrocode}
+% This |\boxmaxdepth| setting is to ensure that deep footnotes
+% do not overwrite the footer (on account of the negative skip
+% added later): it should use |\@maxdepth| otherwise the change is
+% pointless when there are footnotes.
+% \task{CAR}{Investigate providing an option to put the footnotes
+% below the bottom floats.}
+%
+% But see also its use when combining floats.
+% \changes{v1.0l}{1994/03/15}{\cs{maxdepth} changed to \cs{@maxdepth}}
+% \begin{macrocode}
+ \boxmaxdepth \@maxdepth
+% \end{macrocode}
+%
+% \changes{v1.2e}{1999/01/06}{Added negative vskip, as when processing
+% outputbox below: suggested by Fred Bartlett pr/2892}
+% \changes{1.2i}{2000/07/12}{Removed negative vskip, as it gives
+% unacceptable results when the depth is large: pr/3189}
+% \changes{v1.2m}{2004/10/20}{Removed dead code}
+% \task{CAR}{As can be seen from the above two changes, getting a good
+% layout here is difficult: fix!}
+% \begin{macrocode}
+% \@tempdima\dp\@cclv
+ \unvbox \@cclv
+% \vskip-\@tempdima
+ \vskip \skip\footins
+% \end{macrocode}
+% \changes{v1.1a}{1994/10/31}
+% {(DPC/CAR) Colour resetting moved to here}
+% \begin{macrocode}
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \fi
+% \end{macrocode}
+% The h floats have now been finally committed to this page so we
+% can reset their list. The top and bottom floats are then added
+% to the page.
+% \changes{v1.2k}{2003/12/16}{Ensure that \cs{@elt} has a defined
+% state (pr/3586)}
+% \begin{macrocode}
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+ \global \let \@midlist \@empty
+ \@combinefloats
+% \end{macrocode}
+% The variations start here in case |\enlargethispage| has
+% been used.
+% \begin{macrocode}
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+% \end{macrocode}
+% This extra reboxing is only needed to add the
+% |\@texttop| and |\@textbotttom| but this could be done earlier,
+% when the floats are added.
+%
+% The |\boxmaxdepth| resetting here will have no effect unless
+% |\@textbottom| ends with a box or rule. So is this (or possibly
+% |\@maxdepth|) the correct value?
+%
+% The |\vskip -\dimen@|
+% ensures that the visible depth of the box does not
+% affect the placement of anything on the page.
+% Thus very deep pages will overprint the footer; but these should
+% have been prevented by suitable settings of the maxdepths at
+% appropriate times.
+%
+% If |\@textbottom| ends with a box or rule of non-zero depth
+% then this skip adjustment should be done again after it.
+%
+% I think that the final boxing of the main text page could have a
+% common ending which may make it simpler to see what is going on.
+%
+% This needs further investigation, especially in the `special
+% case'.
+% \task{CAR}{Further investigation of makecol}
+%
+% Also, the |\boxmaxdepth| setting here affects what happens within
+% |\@texttop| and |\@textbottom|, should it? Is it needed at all?
+% \changes{v1.0l}{1994/03/15}{Removed boxmaxdepth setting.}
+%
+% RmS 91/10/22: Replaced |\dimen128| by |\dimen@|.
+%
+% \begin{macrocode}
+ \setbox\@outputbox \vbox to\@colht {%
+% \boxmaxdepth \maxdepth %??
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global \maxdepth \@maxdepth
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@reinserts}
+% \changes{v1.0e}{1993/12/01}{Command added}
+% This is the code which reinserts the inserts. It puts them all
+% in one place; this can make some of them come out on the wrong
+% page.
+% It has been put into a separate macro to expedite experimentation.
+% \begin{macrocode}
+\gdef \@reinserts{%
+ \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
+ \ifvbox\@kludgeins\insert\@kludgeins
+ {\unvbox\@kludgeins}\fi
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@makespecialcolbox}
+% \changes{v1.0b}{1993/11/29}{Command added}
+% This implements certain variations in page-makeup.
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\gdef \@makespecialcolbox {%
+%<*trace>
+ \fl@trace{Kludgeins ht \the\ht\@kludgeins\space
+ dp \the\dp\@kludgeins\space
+ wd \the\wd\@kludgeins}%
+%</trace>
+% \end{macrocode}
+% First we find the natural height of the column.
+%
+% See above for discussion of what is happening here.
+%
+% This needs further investigation, especially in this `special
+% case'.
+% \changes{v1.0k}{1994/02/08}{boxmaxdepth setting removed}
+% \begin{macrocode}
+ \setbox\@outputbox \vbox {%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox\@outputbox
+ \vskip-\dimen@
+ }%
+ \@tempdima \@colht
+ \ifdim \wd\@kludgeins>\z@
+% \end{macrocode}
+% Note that in this case (the *-version), the height of the
+% |\@kludgeins| box is not used since its value is somewhat
+% arbitrary: it need only be big enough to ensure that the
+% page-break is not taken prematurely.
+%
+% Here we calculate how much vertical space needs to be added in
+% order to enable the column to fit into a box of size |\@colht|
+% using the best information we have about the amount of shrink
+% available (another thing which is known internally about a box,
+% but cannot be accessed at the \TeX{} level!).
+%
+% This needs \TeX3 otherwise |\pageshrink| is zero anyway; it may
+% not be exactly the figure we wish as it is the total available
+% from the all the material collected before the page-break
+% decision is made. It will, we think, always be an overestimate
+% of the actual shrink in the box; therefore this should always
+% force the shortest possible column with the possibility of an
+% overfull box.
+%
+% This should work for bothe flush- and ragged-bottom setting since
+% it makes the contents no smaller than the size (|\@colht|) of the
+% box into which they are put.
+%
+% Their should perhaps be an upper limit, of 0pt?, on the extra
+% space added to force shrinking.
+% \task{CAR}{Further investigation of kludge-* space}
+%
+% See above for a discussion of the |\boxmaxdepth| setting here.
+%
+% \changes{v1.0k}{1994/02/08}{boxmaxdepth setting added}
+% \changes{v1.0l}{1994/03/15}{Removed boxmaxdepth setting.}
+% \begin{macrocode}
+ \advance \@tempdima -\ht\@outputbox
+ \advance \@tempdima \pageshrink
+%<*trace>
+ \fl@trace {Natural ht of col: \the \ht\@outputbox}%
+ \fl@trace {\string \@colht: \the \@colht}%
+ \fl@trace {Pageshrink added: \the \pageshrink}%
+ \fl@trace {Hence, space added: \the \@tempdima}%
+%</trace>
+ \setbox\@outputbox \vbox to \@colht {%
+% \boxmaxdepth \maxdepth
+ \unvbox\@outputbox
+ \vskip \@tempdima
+ \@textbottom
+ }%
+% \end{macrocode}
+% For the unstarred version, the final size of the page is
+% precisely specified. Therefore, at least for the flush-bottom
+% case, we need to ensure that, visually, it has this size exactly.
+%
+% Thus we calculate this size and set the material in a box of this
+% size, which is then put into a box of size |\@colht| with |\vss|
+% at the bottom.
+% \begin{macrocode}
+ \else
+ \advance \@tempdima -\ht\@kludgeins
+%<*trace>
+ \fl@trace {Natural ht of col: \the \ht\@outputbox}%
+ \fl@trace {\string \@colht: \the \@colht}%
+ \fl@trace {Extra size added: -\the \ht \@kludgeins}%
+ \fl@trace {Hence, height of inner box: \the \@tempdima}%
+ \fl@trace {Max? pageshrink available: \the \pageshrink}%
+%</trace>
+% \end{macrocode}
+% This type of final packaging could be done always; this may
+% simplify all of this page-makeup.
+%
+% It is not necessary to set |\boxmaxdepth| here since the
+% |\@outputbox| ends with glue.
+% \changes{v1.0k}{1994/02/03}{correct mistakes in the documentation}
+% \begin{macrocode}
+ \setbox \@outputbox \vbox to \@colht {%
+ \vbox to \@tempdima {%
+ \unvbox\@outputbox
+ \@textbottom}%
+ \vss}%
+ \fi
+% \end{macrocode}
+% Finally we need to explicitly make the insert box void.
+% \begin{macrocode}
+ {\setbox \@tempboxa \box \@kludgeins}%
+%<*trace>
+ \fl@trace {kludgeins box made void}%
+%</trace>
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@texttop}
+% \begin{macro}{\@textbottom}
+% These do nothing as a default.
+% \begin{macrocode}
+%<*2ekernel>
+\let \@texttop \relax
+\let \@textbottom \relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@resetactivechars}
+% \begin{macro}{\@activechar@info}
+%
+% \changes{v1.0n}{1994/04/30}{\cs{@activechar@warning} changed to
+% \cs{@activechar@info}}
+% RmS 93/09/06:
+% added hook to protect against certain active characters in the
+% output routine. Default checks are for active space and end-of-line.
+% \changes{v1.0u}{1994/05/23}{Added \cs{MessageBreak}}
+% \begin{macrocode}
+\def\@activechar@info #1{%
+ \@latex@info@no@line {Active #1 character found while
+ output routine is active
+ \MessageBreak
+ This may be a bug in a package file
+ you are using}%
+}
+% \end{macrocode}
+%
+% Do not put any spaces in this next bit!
+% \changes{1.2f}{1999/10/09}{Reset definition of active prime
+% character (used in math mode)}
+% \begin{macrocode}
+\begingroup
+\obeylines\obeyspaces%
+\catcode`\'\active%
+\gdef\@resetactivechars{%
+\def^^M{\@activechar@info{EOL}\space}%
+\def {\@activechar@info{space}\space}%
+\let'\active@math@prime}%
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@outputpage}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% \begin{macro}{\@shipoutsetup}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% \changes{v1.1s}{1995/11/10}{Command removed}
+% \begin{macro}{\@writesetup}
+% \changes{v1.1s}{1995/11/10}{Command removed}
+% \changes{v1.1o}{1995/07/21}{Command added}
+% \changes{v1.0f}{1993/12/05}{\cs{@startpagehook} added}
+% \changes{v1.0j}{1993/12/17}{---and then removed}
+% \changes{v1.0p}{1994/05/12}{\cs{normalcolor}added}
+% \changes{v1.0s}{1994/05/20}{Added setting of \cs{protect}
+% during \cs{shipout}.}
+% \changes{v1.0u}{1994/05/23}{Changed resetting of \cs{protect} after
+% shipout to use \cs{aftergroup}}
+% \changes{v1.1b}{1994/11/05}
+% {Use new \cs{color@hbox} concept.}
+% \changes{v1.1b}{1994/11/05}
+% {Change protect settings for new-style, protect-free
+% aux-files.}
+% \changes{v1.1c}{1994/11/05}
+% {Add new \cs{AtBeginDvi} concept}
+% \changes{v1.1e}{1994/11/10}
+% {Modify \cs{protect} setting}
+% \changes{v1.1f}{1994/11/14}
+% {Modify new \cs{AtBeginDvi} concept}
+% \changes{v1.1o}{1995/07/21}
+% {New, experimental, versions: need in-lining}
+% \changes{v1.1s}{1995/11/10}{In-lined}
+% \changes{v1.1w}{1996/09/21}{Added \cs{@parboxrestore} and made
+% consequent deletions: wait for the howls of protest}
+%
+% The |\color@hbox| hooks here are used to avoid putting just a
+% colour special into an otherwise empty box (in a header or
+% footer). These boxes are often set to be completely empty and so
+% adding a special produces a very underfull box message.
+%
+% There has been extensive tidying up of the old code here;
+% including the removal of a level of grouping.
+%
+% The setting of |\protect| immediately before the |\shipout|
+% is needed so that protected commands within |\write|s are
+% handled correctly.
+%
+% Within shipout's vbox it is reset to its default value, |\relax|.
+%
+% Resetting it to its default value after the shipout has been
+% completed (and the contents of the writes have been expanded)
+% must be done by use of |\aftergroup|.
+% This is because it must have the value |\relax|
+% before macros coming from other uses of |\aftergroup| within
+% this box are expanded.
+%
+% Putting this into the |\aftergroup| token list does not affect
+% the definition used in expanding the |\write|s because the
+% aftergroup token list is only constructed when popping the
+% save-stack, it is not expanded until after the shipout is
+% completed.
+%
+% Question: should things from an |\aftergroup| within the shipped
+% out box be executed in the environment set up for the writes, or
+% after it finishes?
+%
+% A lot of this code has been in-lined to prevent mis-use of
+% internal commands as hooks.
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/04/15}%
+%<latexrelease> {\@outputpage}{Reset language for hyphenation}%
+%<*2ekernel|latexrelease>
+\def\@outputpage{%
+% \end{macrocode}
+% The |\endgroup| is put in by |\aftergroup|.
+% \begin{macrocode}
+\begingroup
+% \end{macrocode}
+% Now all the set-up stuff has been in-lined for Frank.
+%
+% First the stuff for the writes.
+%
+% From here \ldots\ was in the command |\@writesetup|.
+% \begin{macrocode}
+ \let \protect \noexpand
+% \end{macrocode}
+%
+% RmS 93/08/19: Redefined accents to allow changes in font encoding;
+% but exactly why was this needed?
+%
+% \changes{v1.3c}{2017/03/10}{Reset \cs{language}}
+% Reset |\language| to the value current at |\begin{document}|.
+% In particular this ensures that a pagebreak in |verbatim| does not
+% prevent hyphenation in the page head.
+% \begin{macrocode}
+ \language\document@default@language
+% \end{macrocode}
+%
+% The |\catcode`\ = 10| was removed as it was considered useless
+% (presumably because nothing gets tokenised during shipout).
+%
+% This was put in as some error produced active spaces in a mark, I
+% think.
+%
+% Why was the hyphen reset?
+%
+% \begin{macrocode}
+ \@resetactivechars
+% \end{macrocode}
+% If a page break happens between the start of a list and its first
+% item the |@newlist| will be true and this will mess up any list
+% that is used in the header or footer of the page. So we have to
+% reset that flag.
+% \changes{v1.2h}{2000/07/19}
+% {Reset and restore \cs{@if@newlist} for internal/3231}
+% \changes{v1.2j}{2001/01/07}
+% {And do it in the right macro! (pr/3286)}
+% \begin{macrocode}
+ \global\let\@@if@newlist\if@newlist
+ \global\@newlistfalse
+% \end{macrocode}
+%
+% \changes{v1.0q}{1994/05/16}{Changed setting of accents (FMi):
+% with the new encoding setup they can use \cs{let}.
+% It could also use the new internal commands?}
+% \changes{v1.1l}{1995/04/24}{Reset \cmd\\ latex/1451 (DPC)}
+% This next hook replaces the following:
+% \begin{verbatim}
+% \let\-\@dischyph
+% \let\'\@acci\let\`\@accii\let\=\@acciii
+% \let\\\@normalcr
+% \let\par\@@par %% 15 Sep 87 (this was once inside the box)
+% \end{verbatim}
+% and it does more than they did; in particular it sets:
+% \begin{verbatim}
+% \parindent\z@
+% \parskip\z@skip
+% \everypar{}%
+% \leftskip\z@skip
+% \rightskip\z@skip
+% \parfillskip\@flushglue
+% \lineskip\normallineskip
+% \baselineskip\normalbaselineskip
+% \sloppy
+% \end{verbatim}
+%
+% \begin{macrocode}
+ \@parboxrestore
+% \end{macrocode}
+% \ldots\ to here was in the command |\@writesetup|.
+% \begin{macrocode}
+ \shipout \vbox{%
+ \set@typeset@protect
+ \aftergroup \endgroup
+% \end{macrocode}
+% Correct? or just restore by ending the group?
+% \begin{macrocode}
+ \aftergroup \set@typeset@protect
+% \end{macrocode}
+% This first bit has been moved inside the shipped out box.
+%
+% Now the setup inside the shipped out box; this should contain all
+% the stuff that could only affect typesetting; other stuff may need
+% to be reset for the writes also.
+%
+% From here \ldots\ was in the command |\@shipoutsetup|.
+% \begin{macrocode}
+ \if@specialpage
+ \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
+ \fi
+ \if@twoside
+ \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
+ \let\@themargin\oddsidemargin
+ \else \let\@thehead\@evenhead
+ \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
+ \fi
+ \fi
+% \end{macrocode}
+%
+% The rest was always inside the box.
+%
+% RmS 91/08/15: aded this line:
+% \begin{macrocode}
+ \reset@font
+% \end{macrocode}
+% RmS 93/08/06 Added |\lineskiplimit=0pt| to guard against it being
+% nonzero: e.g. by |\offinterlineskip| being in effect.
+%
+% There are probably lots of other things that may need resetting.
+%
+% \begin{macrocode}
+ \normalsize
+% \end{macrocode}
+% Reset the space factors.
+% \changes{v1.2b}{1997/04/14}
+% {Call \cs{normalsfcodes} (from patch file) latex/2404}
+% \begin{macrocode}
+ \normalsfcodes
+% \end{macrocode}
+%
+% Reset these here (previously reset separately for head and foot)
+% \changes{v1.2b}{1997/04/14}
+% {Move \cs{label} and \cs{index} (from patch file)}
+% \begin{macrocode}
+ \let\label\@gobble
+ \let\index\@gobble
+ \let\glossary\@gobble
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
+% \end{macrocode}
+% \ldots\ to here was in the command |\@shipoutsetup|.
+% \begin{macrocode}
+ \@begindvi
+ \vskip \topmargin
+ \moveright\@themargin \vbox {%
+ \setbox\@tempboxa \vbox to\headheight{%
+ \vfil
+ \color@hbox
+ \normalcolor
+ \hb@xt@\textwidth{\@thehead}%
+ \color@endbox
+% \end{macrocode}
+% 22 Feb 87
+% \begin{macrocode}
+ }%
+ \dp\@tempboxa \z@
+ \box\@tempboxa
+ \vskip \headsep
+ \box\@outputbox
+ \baselineskip \footskip
+ \color@hbox
+ \normalcolor
+ \hb@xt@\textwidth{\@thefoot}%
+ \color@endbox
+ }%
+ }%
+% \end{macrocode}
+% |\endgroup| now inserted by |\aftergroup|
+%
+% Restore |\if@newlist|
+% \begin{macrocode}
+ \global\let\if@newlist\@@if@newlist
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \global \@colht \textheight
+ \stepcounter{page}%
+% \end{macrocode}
+% It is now clear that this does something useful, thanks to Piet
+% van Oostrum. It is needed because a float page is made without
+% using TeX's page-builder; thus the output routine is never called
+% so the marks are not updated.
+% \begin{macrocode}
+ \let\firstmark\botmark
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@outputpage}{Reset language for hyphenation}%
+%<latexrelease>\def\@outputpage{%
+%<latexrelease>\begingroup
+%<latexrelease> \let \protect \noexpand
+%<latexrelease> \@resetactivechars
+%<latexrelease> \global\let\@@if@newlist\if@newlist
+%<latexrelease> \global\@newlistfalse
+%<latexrelease> \@parboxrestore
+%<latexrelease> \shipout \vbox{%
+%<latexrelease> \set@typeset@protect
+%<latexrelease> \aftergroup \endgroup
+%<latexrelease> \aftergroup \set@typeset@protect
+%<latexrelease> \if@specialpage
+%<latexrelease> \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
+%<latexrelease> \fi
+%<latexrelease> \if@twoside
+%<latexrelease> \ifodd\count\z@
+%<latexrelease> \let\@thehead\@oddhead \let\@thefoot\@oddfoot
+%<latexrelease> \let\@themargin\oddsidemargin
+%<latexrelease> \else \let\@thehead\@evenhead
+%<latexrelease> \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \reset@font
+%<latexrelease> \normalsize
+%<latexrelease> \normalsfcodes
+%<latexrelease> \let\label\@gobble
+%<latexrelease> \let\index\@gobble
+%<latexrelease> \let\glossary\@gobble
+%<latexrelease> \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
+%<latexrelease> \@begindvi
+%<latexrelease> \vskip \topmargin
+%<latexrelease> \moveright\@themargin \vbox {%
+%<latexrelease> \setbox\@tempboxa \vbox to\headheight{%
+%<latexrelease> \vfil
+%<latexrelease> \color@hbox
+%<latexrelease> \normalcolor
+%<latexrelease> \hb@xt@\textwidth{\@thehead}%
+%<latexrelease> \color@endbox
+%<latexrelease> }%
+%<latexrelease> \dp\@tempboxa \z@
+%<latexrelease> \box\@tempboxa
+%<latexrelease> \vskip \headsep
+%<latexrelease> \box\@outputbox
+%<latexrelease> \baselineskip \footskip
+%<latexrelease> \color@hbox
+%<latexrelease> \normalcolor
+%<latexrelease> \hb@xt@\textwidth{\@thefoot}%
+%<latexrelease> \color@endbox
+%<latexrelease> }%
+%<latexrelease> }%
+%<latexrelease> \global\let\if@newlist\@@if@newlist
+%<latexrelease> \global \@colht \textheight
+%<latexrelease> \stepcounter{page}%
+%<latexrelease> \let\firstmark\botmark
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@begindvi}
+% \changes{v1.1c}{1994/11/05}
+% {Added macro}
+% \changes{v1.1f}{1994/11/14}{Use normal box register: why a box?}
+%
+% This unboxes stuff that must appear before anything else in the
+% |.dvi| file, then returns that box register to the free list and
+% cancels itself.
+%
+% The stuff in the box should not add any typeset material to the
+% page.
+% \begin{macrocode}
+\def \@begindvi{%
+ \unvbox \@begindvibox
+ \global\let \@begindvi \@empty
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@combinefloats}
+% \begin{macro}{\@cflt}
+% \changes{v1.0h}{1993/12/12}{name changed}
+% \begin{macro}{\@cflb}
+% The |\boxmaxdepth| setting here was not made local to
+% a box so was dangerous. It is needed only within the box made
+% by |\@cflt| (and not normally even there), so it has been
+% moved there; this also agrees with the original pseudocode.
+%
+% \changes{v1.0h}{1993/12/12}{boxmaxdepth setting moved}
+% \begin{macrocode}
+\def \@combinefloats {%
+% \boxmaxdepth \maxdepth
+ \ifx \@toplist\@empty \else \@cflt \fi
+ \ifx \@botlist\@empty \else \@cflb \fi
+}
+% \end{macrocode}
+%
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+\def \@cflt{%
+ \let \@elt \@comflelt
+ \setbox\@tempboxa \vbox{}%
+ \@toplist
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth \maxdepth
+ \unvbox\@tempboxa
+ \vskip -\floatsep
+ \topfigrule
+ \vskip \textfloatsep
+ \unvbox\@outputbox
+ }%
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@toplist}%
+ \global\let\@toplist\@empty
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def \@cflb {%
+ \let\@elt\@comflelt
+ \setbox\@tempboxa \vbox{}%
+ \@botlist
+ \setbox\@outputbox \vbox{%
+ \unvbox\@outputbox
+ \vskip \textfloatsep
+ \botfigrule
+ \unvbox\@tempboxa
+ \vskip -\floatsep
+ }%
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@botlist}%
+ \global \let \@botlist\@empty
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@comflelt}
+% \begin{macro}{\@comdblflelt}
+% \begin{macro}{\@combinedblfloats}
+%
+% \begin{macrocode}
+\def\@comflelt#1{\setbox\@tempboxa
+ \vbox{\unvbox\@tempboxa\box #1\vskip\floatsep}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@comdblflelt#1{\setbox\@tempboxa
+ \vbox{\unvbox\@tempboxa\box #1\vskip\dblfloatsep}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def \@combinedblfloats{%
+ \ifx \@dbltoplist \@empty
+ \else
+ \setbox\@tempboxa \vbox{}%
+ \let \@elt \@comdblflelt
+ \@dbltoplist
+ \let \@elt \relax
+ \xdef \@freelist {\@freelist\@dbltoplist}%
+ \global\let \@dbltoplist \@empty
+ \setbox\@outputbox \vbox to\textheight
+% \end{macrocode}
+%
+% The setting of |\boxmaxdepth| here has no effect since the
+% |\@outputbox| should already have depth zero. Even so, it would
+% have no effect on the layout of the page.
+% \changes{v1.0l}{1994/03/15}{Removed boxmaxdepth setting.}
+% \begin{macrocode}
+ {%\boxmaxdepth\maxdepth %% probably not needed, CAR
+ \unvbox\@tempboxa\vskip-\dblfloatsep
+% \end{macrocode}
+% Here we need different typesetting if the top float comes from
+% |\@topnewpage|.
+% \changes{v1.0n}{1994/04/30}{Removed rule in topnewpage case}
+% \begin{macrocode}
+ \ifnum \@dbltopnum>\m@ne
+ \dblfigrule
+ \fi
+ \vskip \dbltextfloatsep
+% \end{macrocode}
+% If pdf links are present in the galley and those links get broken
+% across pages they have to end up being on the same level of boxing
+% (even if not actually in the same structure) due to some engine
+% restrictions in pdf\TeX\ and Lua\TeX. We therefore unbox
+% |\@outputbox| here (which only contains a single |\hbox|) so that
+% this case has the same boxing level as a normal twocolumn page
+% without top floats.
+% \changes{v1.4d}{2018/11/28}{Unbox \cs{@outputbox} to preserve boxing
+% level (github/94)}
+% \begin{macrocode}
+ \unvbox\@outputbox
+ }%
+ \fi
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@startcolumn}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% \begin{macro}{\@startdblcolumn}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+%
+% We could combine (most of) these two into |\@startcol <list>|.
+% Note that |\@xstartcol| was only used once (\ie in
+% |\@startcolumn|); it has therefore been removed. This is not quite
+% as efficient but it now has the same structure as
+% |\@startdblcolumn|.
+%
+% The empty-list test has been moved to |\@tryfcolumn|.
+%
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\def \@startcolumn {%
+ \global \@colroom \@colht
+ \@tryfcolumn \@deferlist
+ \if@fcolmade
+%<*trace>
+ \fl@trace{PAGE: float \if@twocolumn column \else page \fi
+ completed}%
+%</trace>
+ \else
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+ \begingroup
+ \let \reserved@b \@deferlist
+ \global \let \@deferlist \@empty
+ \let \@elt \@scolelt
+ \reserved@b
+ \endgroup
+ \fi
+}
+% \end{macrocode}
+%
+% This one does not need to set |\@colht|.
+%
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%</2ekernel|fltrace>
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace> {\@startdblcolumn}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
+\def \@startdblcolumn {%
+ \@tryfcolumn \@deferlist
+ \if@fcolmade
+%<fltrace> \fl@trace{PAGE: double float page completed}%
+ \else
+ \begingroup
+ \let \reserved@b \@deferlist
+ \global \let \@deferlist \@empty
+ \let \@elt \@sdblcolelt
+ \reserved@b
+ \endgroup
+ \fi
+}%
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace> {\@startdblcolumn}{float order in 2-column}%
+%<latexrelease|fltrace>\def \@startdblcolumn {%
+% \end{macrocode}
+% Not needed since this always comes after |\@outputpage|:
+% \begin{macrocode}
+%<latexrelease|fltrace>% \global \@colht \textheight
+%<latexrelease|fltrace> \@tryfcolumn \@dbldeferlist
+%<latexrelease|fltrace> \if@fcolmade
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{PAGE: double float page completed}%
+%</trace>
+%<latexrelease|fltrace> \else
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+%<latexrelease|fltrace> \begingroup
+%<latexrelease|fltrace> \let \reserved@b \@dbldeferlist
+%<latexrelease|fltrace> \global \let \@dbldeferlist \@empty
+%<latexrelease|fltrace> \let \@elt \@sdblcolelt
+%<latexrelease|fltrace> \reserved@b
+%<latexrelease|fltrace> \endgroup
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<*2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@tryfcolumn}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% Now tests if its list is empty before any further exertion.
+%
+% \begin{macrocode}
+\def \@tryfcolumn #1{%
+ \global \@fcolmadefalse
+ \ifx #1\@empty
+ \else
+%<*trace>
+ \fl@trace{PAGE: try float \if@twocolumn column/page\else page\fi
+ ---\string #1}%
+ \fl@trace{----- \string #1: #1}%
+%</trace>
+% \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+% \begin{macrocode}
+ \xdef\@trylist{#1}%
+ \global \let \@failedlist \@empty
+ \begingroup
+ \let \@elt \@xtryfc \@trylist
+ \endgroup
+ \if@fcolmade
+ \@vtryfc #1%
+ \fi
+ \fi
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macro}{\@scolelt}
+% \begin{macrocode}
+\def\@scolelt#1{\def\@currbox{#1}\@addtonextcol}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@sdblcolelt}
+% \begin{macrocode}
+\def\@sdblcolelt#1{\def\@currbox{#1}\@addtodblcol}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@vtryfc}
+% \changes{v1.2d}{1997/11/19}{Reindent code, to be understandable(DPC).}
+% \begin{macrocode}
+\def\@vtryfc #1{%
+ \global\setbox\@outputbox\vbox{}%
+ \let\@elt\@wtryfc
+ \@flsucceed
+ \global\setbox\@outputbox \vbox to\@colht{%
+ \vskip \@fptop
+ \vskip -\@fpsep
+ \unvbox \@outputbox
+ \vskip \@fpbot}%
+ \let\@elt\relax
+ \xdef #1{\@failedlist\@flfail}%
+ \xdef\@freelist{\@freelist\@flsucceed}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@wtryfc}
+% \begin{macrocode}
+\def\@wtryfc #1{%
+ \global\setbox\@outputbox\vbox{%
+ \unvbox\@outputbox
+ \vskip\@fpsep
+ \box #1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xtryfc}
+% \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@xtryfc}%
+%<latexrelease> {float order in 2-column}%
+%<*2ekernel|latexrelease>
+\def\@xtryfc #1{%
+ \@next\reserved@a\@trylist{}{}%
+ \@currtype \count #1%
+ \divide\@currtype\@xxxii
+ \multiply\@currtype\@xxxii
+ \@bitor \@currtype \@failedlist
+ \@testfp #1%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@testwrongwidth #1%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifdim \ht #1>\@colht
+ \@testtrue
+ \fi
+ \if@test
+ \@cons\@failedlist #1%
+ \else
+ \@ytryfc #1%
+ \fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@xtryfc}%
+%<latexrelease> {float order in 2-column}%
+%<latexrelease>\def\@xtryfc #1{%
+%<latexrelease> \@next\reserved@a\@trylist{}{}%
+%<latexrelease> \@currtype \count #1%
+%<latexrelease> \divide\@currtype\@xxxii
+%<latexrelease> \multiply\@currtype\@xxxii
+%<latexrelease> \@bitor \@currtype \@failedlist
+%<latexrelease> \@testfp #1%
+%<latexrelease> \ifdim \ht #1>\@colht
+%<latexrelease> \@testtrue
+%<latexrelease> \fi
+%<latexrelease> \if@test
+%<latexrelease> \@cons\@failedlist #1%
+%<latexrelease> \else
+%<latexrelease> \@ytryfc #1%
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ytryfc}
+% \begin{macrocode}
+\def\@ytryfc #1{%
+ \begingroup
+ \gdef\@flsucceed{\@elt #1}%
+ \global\let\@flfail\@empty
+ \@tempdima\ht #1%
+ \let\@elt\@ztryfc
+ \@trylist
+ \ifdim \@tempdima >\@fpmin
+ \global\@fcolmadetrue
+ \else
+ \@cons\@failedlist #1%
+ \fi
+ \endgroup
+ \if@fcolmade
+ \let\@elt\@gobble
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ztryfc}
+% \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{@ztryfc}%
+%<latexrelease> {float order in 2-column}%
+%<*2ekernel|latexrelease>
+\def\@ztryfc #1{%
+ \@tempcnta\count #1%
+ \divide\@tempcnta\@xxxii
+ \multiply\@tempcnta\@xxxii
+ \@bitor \@tempcnta {\@failedlist \@flfail}%
+ \@testfp #1%
+% \end{macrocode}
+%
+% not in fixfloats?
+% \begin{macrocode}
+ \@testwrongwidth #1%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@tempdimb\@tempdima
+ \advance\@tempdimb\ht #1%
+ \advance\@tempdimb\@fpsep
+ \ifdim \@tempdimb >\@colht
+ \@testtrue
+ \fi
+ \if@test
+ \@cons\@flfail #1%
+ \else
+ \@cons\@flsucceed #1%
+ \@tempdima\@tempdimb
+ \fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{@ztryfc}%
+%<latexrelease> {float order in 2-column}%
+%<latexrelease>\def\@ztryfc #1{%
+%<latexrelease> \@tempcnta \count#1%
+%<latexrelease> \divide\@tempcnta\@xxxii
+%<latexrelease> \multiply\@tempcnta\@xxxii
+%<latexrelease> \@bitor \@tempcnta {\@failedlist \@flfail}%
+%<latexrelease> \@testfp #1%
+%<latexrelease> \@tempdimb\@tempdima
+%<latexrelease> \advance\@tempdimb \ht#1%
+%<latexrelease> \advance\@tempdimb\@fpsep
+%<latexrelease> \ifdim \@tempdimb >\@colht
+%<latexrelease> \@testtrue
+%<latexrelease> \fi
+%<latexrelease> \if@test
+%<latexrelease> \@cons\@flfail #1%
+%<latexrelease> \else
+%<latexrelease> \@cons\@flsucceed #1%
+%<latexrelease> \@tempdima\@tempdimb
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+%
+% The major changes for float suppression and the changes to the float
+% mechanism to make it conform to the documentation are in these next
+% macros.
+%
+% \begin{macro}{\@addtobot}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% Lots of changes.
+%
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\def \@addtobot {%
+%<*trace>
+ \fl@trace{***Start addtobot}%
+%</trace>
+ \@getfpsbit 4\relax
+%<*trace>
+ \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi bot:
+ \the \@fpstype}%
+%</trace>
+ \ifodd \@tempcnta
+ \@flsetnum \@botnum
+ \ifnum \@botnum>\z@
+ \@tempswafalse
+ \@flcheckspace \@botroom \@botlist
+ \if@tempswa
+% \end{macrocode}
+% This next line means that this page is produced with box 255
+% having depth zero, rather than the normal maxdepth: is this
+% needed, useful?
+% \task{CAR/FMi}{Investigate resetting of maxdepth: I do not think it is
+% necessary here; Frank does.}
+% \begin{macrocode}
+ \global \maxdepth \z@
+ \@flupdates \@botnum \@botroom \@botlist
+%<*trace>
+ \fl@trace{colroom (after-bot) = \the \@colroom}%
+ \fl@trace{colnum (after-bot) = \the \@colnum}%
+ \fl@trace{botnum (after-bot) = \the \@botnum}%
+ \fl@trace{***Success: bot}%
+%</trace>
+ \@inserttrue
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail: botnum = \the \@botnum:
+ fpstype \the \@fpstype=ORD?}%
+ \ifnum \@fpstype<\sixt@@n
+ \fl@trace{ERROR: !b float not successful (addtobot)}%
+ \fi
+%</trace>
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addtotoporbot}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% Lots of changes.
+%
+% \begin{macrocode}
+\def \@addtotoporbot {%
+%<*trace>
+ \fl@trace{***Start addtotoporbot}%
+%</trace>
+ \@getfpsbit \tw@
+%<*trace>
+ \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi top:
+ \the \@fpstype}%
+%</trace>
+ \ifodd \@tempcnta
+ \@flsetnum \@topnum
+ \ifnum \@topnum>\z@
+ \@tempswafalse
+ \@flcheckspace \@toproom \@toplist
+ \if@tempswa
+ \@bitor\@currtype{\@midlist\@botlist}%
+%<*trace>
+ \fl@trace{(mid+bot)list: \@midlist, \@botlist:
+ (addtotoporbot-before)}%
+%</trace>
+ \if@test
+%<*trace>
+ \fl@trace{type already on list: mid or bot---sent to addtobot}%
+%</trace>
+ \else
+ \@flupdates \@topnum \@toproom \@toplist
+%<*trace>
+ \fl@trace{colroom (after-top) = \the \@colroom}%
+ \fl@trace{colnum (after-top) = \the \@colnum}%
+ \fl@trace{topnum (after-top) = \the \@topnum}%
+ \fl@trace{***Success: top}%
+%</trace>
+ \@inserttrue
+ \fi
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail: topnum = \the \@topnum: fpstype
+ \the \@fpstype=ORD?}%
+ \ifnum \@fpstype<\sixt@@n
+ \fl@trace{ERROR: !t float not successful (addtotoporbot)}%
+ \fi
+%</trace>
+ \fi
+ \fi
+ \if@insert
+ \else
+%<*trace>
+ \fl@trace{sent to addtobot (addtotoporbot)}%
+%</trace>
+ \@addtobot
+ \fi
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addtocurcol}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% \task{CAR}{Add rules around h floats for FMi}
+% \task{CAR}{Investigate pagebreak option possibilities}
+% Lots of changes.
+%
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%<latexrelease|fltrace|flafter>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace|flafter> {\@addtocurcol}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace|flafter>
+\def \@addtocurcol {%
+%<*trace>
+ \fl@trace{***Start addtocurcol}%
+%</trace>
+ \@insertfalse
+ \@setfloattypecounts
+ \ifnum \@fpstype=8
+%<*trace>
+ \fl@trace{fpstype !p only (addtocurcol): \the \@fpstype = 8?}%
+%</trace>
+ \else
+ \ifnum \@fpstype=24
+%<*trace>
+ \fl@trace{fpstype p only (addtocurcol): \the \@fpstype = 24?}%
+%</trace>
+ \else
+ \@flsettextmin
+% \end{macrocode}
+% This is a new adjustment which is quite a major change in
+% functionality; but it implements the documentation.
+% Note that |\@reqcolroom| will include the whole of the
+% page-so-far, and hence includes |\@textfloatsheight| of floats,
+% so before comparing it with |\@textmin|, we add this to
+% |\@textmin| also.
+% \begin{macrocode}
+%<*trace>
+ \fl@trace{textfloatsheight (before) = \the \@textfloatsheight}%
+%</trace>
+ \advance \@textmin \@textfloatsheight
+ \@reqcolroom \@pageht
+% \end{macrocode}
+% This line must be removed since |\@specialoutput| changed.
+% \begin{macrocode}
+% \advance \@reqcolroom \@pagedp
+%<*trace>
+ \fl@trace{textmin + textfloatsheight: \the \@textmin}%
+ \fl@trace{page-so-far: \the \@reqcolroom}%
+%</trace>
+ \ifdim \@textmin>\@reqcolroom
+ \@reqcolroom \@textmin
+%<*trace>
+ \fl@trace{ORD? textmin being used}%
+%</trace>
+ \fi
+ \advance \@reqcolroom \ht\@currbox
+%<*trace>
+ \fl@trace{float size = \the \ht \@currbox (addtocurcol)}%
+ \fl@trace{colroom = \the \@colroom (addtocurcol)}%
+ \fl@trace{reqcolroom = \the \@reqcolroom (addtocurcol)}%
+%</trace>
+ \ifdim \@colroom>\@reqcolroom
+ \@flsetnum \@colnum
+ \ifnum \@colnum>\z@
+ \@bitor\@currtype\@deferlist
+% \end{macrocode}
+% We need to defer the float also if its width
+% doesn't fit.
+% \changes{v1.2n}{2000/09/24}{FMi: test for wide float was
+% in wrong place}
+% \begin{macrocode}
+ \@testwrongwidth\@currbox
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*trace>
+ \fl@trace{deferlist: \@deferlist: (addtocurcol-before)}%
+%</trace>
+ \if@test
+%<*trace>
+ \fl@trace{type already on list: defer (addtocurcol)}%
+%</trace>
+ \else
+ \@bitor\@currtype\@botlist
+%<*trace>
+ \fl@trace{botlist: \@botlist: (addtocurcol-before)}%
+%</trace>
+ \if@test
+%<*trace>
+ \fl@trace{type already on list: bot---sent to addtobot}%
+%</trace>
+ \@addtobot
+ \else
+%<*trace>
+ \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi
+ here: \the \@fpstype}%
+%</trace>
+ \ifodd \count\@currbox
+ \advance \@reqcolroom \intextsep
+ \ifdim \@colroom>\@reqcolroom
+ \global \advance \@colnum \m@ne
+ \global \advance \@textfloatsheight \ht\@currbox
+% \end{macrocode}
+% This may sometimes give an overestimate.
+% \begin{macrocode}
+ \global \advance \@textfloatsheight 2\intextsep
+ \@cons \@midlist \@currbox
+%<*trace>
+ \fl@trace{***Success: here}%
+ \fl@trace{textfloatsheight (after-here) =
+ \the \@textfloatsheight}%
+ \fl@trace{colnum (after-here) = \the \@colnum}%
+%</trace>
+% \end{macrocode}
+%
+% CHANGE TO |\@addtocurcol|:
+%
+% |\penalty\z@| changed to |\penalty\interlinepenalty| so |\samepage|
+% works properly with figure and table environments.
+% (Changed 23 Oct 86)
+%
+% There is also an |\addpenalty\interlinepenalty| above.
+%
+% Since in 2e |\samepage| is no longer supported, these could be
+% removed.
+%
+% Although it is best to use |\addvspace| in case two h floats come
+% together, this makes other spacing more difficult to adjust; whereas
+% if a user specifies two h floats together then they can more easily
+% get the spacing correct by ad hoc commands.
+%
+% It is necessary to adjust for the addition of |\parskip| here in
+% case the float is added between paragraphs (\ie when in vertical
+% mode).
+%
+% If the nobreak switch is true we need to reset it and clear
+% |\everypar| since the float may not reset the flag and cannot reset
+% the |\everypar| globally.
+% \changes{v1.0l}{1994/03/15}{Changed \cs{addvspace} to \cs{vskip}}
+% \changes{v1.1i}{1994/11/21}
+% {Added \cs{if@nobreak} test before float box}
+% \changes{v1.1z}{1996/10/24}{Added \cs{nobreak}, etc as appropriate}
+%
+% Typesetting starts here (we are in vertical mode).
+% \begin{macrocode}
+ \if@nobreak
+ \nobreak
+ \@nobreakfalse
+ \everypar{}%
+ \else
+ \addpenalty \interlinepenalty
+ \fi
+ \vskip \intextsep
+ \box\@currbox
+ \penalty\interlinepenalty
+ \vskip\intextsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+% \end{macrocode}
+% Typesetting ends here.
+% \begin{macrocode}
+ \outputpenalty \z@
+ \@inserttrue
+%<*trace>
+ \else
+ \fl@trace{Fail---no room at 2nd test of colroom
+ (addtocorcol \string\intextsep)}%
+%</trace>
+ \fi
+ \fi
+ \if@insert
+ \else
+% \end{macrocode}
+% Next set of docstrip guards are a bit weird, essentially
+% |\@addtotoporbot| ends up inside the kernel and the
+% \texttt{fltrace} package and |\@addtobot| shows up in the
+% \texttt{flafter} package. Guess that could have been done a bit
+% more obvious :-)
+% \begin{macrocode}
+%<*2ekernel|fltrace|latexrelease>
+%<*trace>
+ \fl@trace{not here: sent to addtotoporbot}%
+%</trace>
+ \@addtotoporbot
+%</2ekernel|fltrace|latexrelease>
+%<*!2ekernel&!fltrace&!latexrelease>
+%<*trace>
+ \fl@trace{not here: sent to addtobot}%
+%</trace>
+ \@addtobot
+%</!2ekernel&!fltrace&!latexrelease>
+ \fi
+ \fi
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail: colnum = \the \@colnum:
+ fpstype \the \@fpstype=ORD?}%
+ \ifnum \@fpstype<\sixt@@n
+ \fl@trace{ERROR: BANG float not successful (addtocurcol)}%
+ \fi
+%</trace>
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail---no room: fl box ht: \the \ht \@currbox
+ (addtocurcol)}%
+%</trace>
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@resethfps
+%<*trace>
+ \fl@trace{put on deferlist (addtocurcol)}%
+%</trace>
+ \@cons\@deferlist\@currbox
+%<*trace>
+ \fl@trace{deferlist: \@deferlist: (addtocurcol-after)}%
+%</trace>
+ \fi
+}%
+%</2ekernel|latexrelease|fltrace|flafter>
+%<latexrelease|fltrace|flafter>\EndIncludeInRelease
+%<latexrelease|fltrace|flafter>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace|flafter> {\@addtocurcol}{float order in 2-column}%
+%<latexrelease|fltrace|flafter>\def \@addtocurcol {%
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{***Start addtocurcol}%
+%</trace>
+%<latexrelease|fltrace|flafter> \@insertfalse
+%<latexrelease|fltrace|flafter> \@setfloattypecounts
+%<latexrelease|fltrace|flafter> \ifnum \@fpstype=8
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{fpstype !p only (addtocurcol):
+%<latexrelease|fltrace|flafter> \the \@fpstype = 8?}%
+%</trace>
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \ifnum \@fpstype=24
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{fpstype p only (addtocurcol):
+%<latexrelease|fltrace|flafter> \the \@fpstype = 24?}%
+%</trace>
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \@flsettextmin
+% \end{macrocode}
+% This is a new adjustment which is quite a major change in
+% functionality; but it implements the documentation.
+% Note that |\@reqcolroom| will include the whole of the
+% page-so-far, and hence includes |\@textfloatsheight| of floats,
+% so before comparing it with |\@textmin|, we add this to
+% |\@textmin| also.
+% \begin{macrocode}
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{textfloatsheight (before) =
+%<latexrelease|fltrace|flafter> \the \@textfloatsheight}%
+%</trace>
+%<latexrelease|fltrace|flafter> \advance \@textmin \@textfloatsheight
+%<latexrelease|fltrace|flafter> \@reqcolroom \@pageht
+% \end{macrocode}
+% This line must be removed since |\@specialoutput| changed.
+% \begin{macrocode}
+% \advance \@reqcolroom \@pagedp
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{textmin + textfloatsheight:
+%<latexrelease|fltrace|flafter> \the \@textmin}%
+%<latexrelease|fltrace|flafter> \fl@trace{page-so-far: \the \@reqcolroom}%
+%<latexrelease|fltrace|flafter>
+%</trace>
+%<latexrelease|fltrace|flafter> \ifdim \@textmin>\@reqcolroom
+%<latexrelease|fltrace|flafter> \@reqcolroom \@textmin
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{ORD? textmin being used}%
+%</trace>
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \advance \@reqcolroom \ht\@currbox
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{float size =
+%<latexrelease|fltrace|flafter> \the \ht \@currbox (addtocurcol)}%
+%<latexrelease|fltrace|flafter> \fl@trace{colroom =
+%<latexrelease|fltrace|flafter> \the \@colroom (addtocurcol)}%
+%<latexrelease|fltrace|flafter> \fl@trace{reqcolroom =
+%<latexrelease|fltrace|flafter> \the \@reqcolroom (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \ifdim \@colroom>\@reqcolroom
+%<latexrelease|fltrace|flafter> \@flsetnum \@colnum
+%<latexrelease|fltrace|flafter> \ifnum \@colnum>\z@
+%<latexrelease|fltrace|flafter> \@bitor\@currtype\@deferlist
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{deferlist:
+%<latexrelease|fltrace|flafter> \@deferlist: (addtocurcol-before)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \if@test
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{type already on list:
+%<latexrelease|fltrace|flafter> defer (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \@bitor\@currtype\@botlist
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{botlist: \@botlist:
+%<latexrelease|fltrace|flafter> (addtocurcol-before)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \if@test
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{type already on list:
+%<latexrelease|fltrace|flafter> bot---sent to addtobot}%
+%</trace>
+%<latexrelease|fltrace|flafter> \@addtobot
+%<latexrelease|fltrace|flafter> \else
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{fpstype
+%<latexrelease|fltrace|flafter> \ifodd \@tempcnta OK \else not \fi
+%<latexrelease|fltrace|flafter> here: \the \@fpstype}%
+%</trace>
+%<latexrelease|fltrace|flafter> \ifodd \count\@currbox
+%<latexrelease|fltrace|flafter> \advance \@reqcolroom \intextsep
+%<latexrelease|fltrace|flafter> \ifdim \@colroom>\@reqcolroom
+%<latexrelease|fltrace|flafter> \global \advance \@colnum \m@ne
+%<latexrelease|fltrace|flafter> \global \advance
+%<latexrelease|fltrace|flafter> \@textfloatsheight\ht\@currbox
+% \end{macrocode}
+% This may sometimes give an overestimate.
+% \begin{macrocode}
+%<latexrelease|fltrace|flafter> \global \advance
+%<latexrelease|fltrace|flafter> \@textfloatsheight 2\intextsep
+%<latexrelease|fltrace|flafter> \@cons \@midlist \@currbox
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{***Success: here}%
+%<latexrelease|fltrace|flafter> \fl@trace{textfloatsheight
+%<latexrelease|fltrace|flafter> (after-here) =
+%<latexrelease|fltrace|flafter> \the \@textfloatsheight}%
+%<latexrelease|fltrace|flafter> \fl@trace{colnum (after-here) =
+%<latexrelease|fltrace|flafter> \the \@colnum}%
+%</trace>
+% \end{macrocode}
+%
+% CHANGE TO |\@addtocurcol|:
+%
+% |\penalty\z@| changed to |\penalty\interlinepenalty| so |\samepage|
+% works properly with figure and table environments.
+% (Changed 23 Oct 86)
+%
+% There is also an |\addpenalty\interlinepenalty| above.
+%
+% Since in 2e |\samepage| is no longer supported, these could be
+% removed.
+%
+% Although it is best to use |\addvspace| in case two h floats come
+% together, this makes other spacing more difficult to adjust; whereas
+% if a user specifies two h floats together then they can more easily
+% get the spacing correct by ad hoc commands.
+%
+% It is necessary to adjust for the addition of |\parskip| here in
+% case the float is added between paragraphs (\ie when in vertical
+% mode).
+%
+% If the nobreak switch is true we need to reset it and clear
+% |\everypar| since the float may not reset the flag and cannot reset
+% the |\everypar| globally.
+% \changes{v1.0l}{1994/03/15}{Changed \cs{addvspace} to \cs{vskip}}
+% \changes{v1.1i}{1994/11/21}
+% {Added \cs{if@nobreak} test before float box}
+% \changes{v1.1z}{1996/10/24}{Added \cs{nobreak}, etc as appropriate}
+%
+% Typesetting starts here (we are in vertical mode).
+% \begin{macrocode}
+%<latexrelease|fltrace|flafter> \if@nobreak
+%<latexrelease|fltrace|flafter> \nobreak
+%<latexrelease|fltrace|flafter> \@nobreakfalse
+%<latexrelease|fltrace|flafter> \everypar{}%
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \addpenalty\interlinepenalty
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \vskip \intextsep
+%<latexrelease|fltrace|flafter> \box\@currbox
+%<latexrelease|fltrace|flafter> \penalty\interlinepenalty
+%<latexrelease|fltrace|flafter> \vskip\intextsep
+%<latexrelease|fltrace|flafter> \ifnum\outputpenalty
+%<latexrelease|fltrace|flafter> <-\@Mii \vskip
+%<latexrelease|fltrace|flafter> -\parskip\fi
+% \end{macrocode}
+% Typesetting ends here.
+% \begin{macrocode}
+%<latexrelease|fltrace|flafter> \outputpenalty \z@
+%<latexrelease|fltrace|flafter> \@inserttrue
+%<*trace>
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \fl@trace{Fail---no room at 2nd test of colroom
+%<latexrelease|fltrace|flafter> (addtocorcol \string\intextsep)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \if@insert
+%<latexrelease|fltrace|flafter> \else
+% \end{macrocode}
+% Next set of docstrip guards are a bit weird, essentially
+% |\@addtotoporbot| ends up inside the kernel and the
+% \texttt{fltrace} package and |\@addtotoporbot| shows up in the
+% \texttt{flafter} package. Guess that could have been done a bit
+% more obvious :-)
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{not here: sent to addtotoporbot}%
+%</trace>
+%<latexrelease|fltrace|flafter> \@addtotoporbot
+%</2ekernel|fltrace>
+%<*!2ekernel&!autoload&!fltrace>
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{not here: sent to addtobot}%
+%</trace>
+%<latexrelease|fltrace|flafter> \@addtobot
+%</!2ekernel&!autoload&!fltrace>
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \fi
+%<*trace>
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \fl@trace{Fail: colnum = \the \@colnum:
+%<latexrelease|fltrace|flafter> fpstype \the \@fpstype=ORD?}%
+%<latexrelease|fltrace|flafter> \ifnum \@fpstype<\sixt@@n
+%<latexrelease|fltrace|flafter> \fl@trace{ERROR: BANG float not successful
+%<latexrelease|fltrace|flafter> (addtocurcol)}%
+%<latexrelease|fltrace|flafter> \fi
+%</trace>
+%<latexrelease|fltrace|flafter> \fi
+%<*trace>
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \fl@trace{Fail---no room: fl box ht:
+%<latexrelease|fltrace|flafter> \the \ht \@currbox (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> \if@insert
+%<latexrelease|fltrace|flafter> \else
+%<latexrelease|fltrace|flafter> \@resethfps
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{put on deferlist (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \@cons\@deferlist\@currbox
+%<*trace>
+%<latexrelease|fltrace|flafter> \fl@trace{deferlist: \@deferlist:
+%<latexrelease|fltrace|flafter> (addtocurcol-after)}%
+%</trace>
+%<latexrelease|fltrace|flafter> \fi
+%<latexrelease|fltrace|flafter> }%
+%<latexrelease|fltrace|flafter>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addtonextcol}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% Lots of changes.
+%
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% \changes{v1.4b}{2017/12/17}{fix doc guards}
+% \begin{macrocode}
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}
+%<latexrelease|fltrace> {\@addtonextcol}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
+\def\@addtonextcol{%
+ \begingroup
+%<*trace>
+ \fl@trace{***Start addtonextcol}%
+%</trace>
+ \@insertfalse
+ \@setfloattypecounts
+ \ifnum \@fpstype=8
+%<*trace>
+ \fl@trace{fpstype not curcol: \the \@fpstype = 8?}%
+%</trace>
+ \else
+ \ifnum \@fpstype=24
+%<*trace>
+ \fl@trace{fpstype not curcol: \the \@fpstype = 24?}%
+%</trace>
+ \else
+ \@flsettextmin
+%<*trace>
+ \fl@trace{text-so-far: 0pt (top of col)}%
+%</trace>
+ \@reqcolroom \ht\@currbox
+%<*trace>
+ \fl@trace{float size: \the \@reqcolroom (addtonextcol)}%
+%</trace>
+ \advance \@reqcolroom \@textmin
+%<*trace>
+ \fl@trace{colroom = \the \@colroom (addtonextcol)}%
+ \fl@trace{reqcolroom = \the \@reqcolroom (addtonextcol)}%
+%</trace>
+ \ifdim \@colroom>\@reqcolroom
+ \@flsetnum \@colnum
+ \ifnum\@colnum>\z@
+ \@bitor\@currtype\@deferlist
+%<*trace>
+ \fl@trace{deferlist: \@deferlist: (addtonextcol-before)}%
+%</trace>
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@testwrongwidth\@currbox
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \if@test
+%<*trace>
+ \fl@trace{type already on list: defer (addtonextcol)}%
+%</trace>
+ \else
+%<*trace>
+ \fl@trace{sent to addtotoporbot (addtonextcol)}%
+%</trace>
+ \@addtotoporbot
+ \fi
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail---no room: fl box ht: \the \ht \@currbox
+ (addtonextcol)}%
+%</trace>
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+%<*trace>
+ \fl@trace{put back on deferlist (addtonextcol)}%
+%</trace>
+ \@cons\@deferlist\@currbox
+%<*trace>
+ \fl@trace{deferlist: \@deferlist: (addtonextcol-after)}%
+%</trace>
+ \fi
+%<*trace>
+ \fl@trace{End of addtonextcol -- locally counts:}%
+ \fl@trace{col: \the\@colnum. top: \the \@topnum. bot: \the \@botnum.}%
+%</trace>
+ \endgroup
+%<*trace>
+ \fl@trace{End of addtonextcol -- globally counts:}%
+ \fl@trace{col: \the\@colnum. top: \the \@topnum. bot: \the \@botnum.}%
+%</trace>
+}%
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace> {\@addtonextcol}{float order in 2-column}%
+%<latexrelease|fltrace>\def\@addtonextcol{%
+%<latexrelease|fltrace> \begingroup
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{***Start addtonextcol}%
+%</trace>
+%<latexrelease|fltrace> \@insertfalse
+%<latexrelease|fltrace> \@setfloattypecounts
+%<latexrelease|fltrace> \ifnum \@fpstype=8
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{fpstype not curcol:
+%<latexrelease|fltrace> \the \@fpstype = 8?}%
+%</trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \ifnum \@fpstype=24
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{fpstype not curcol:
+%<latexrelease|fltrace> \the \@fpstype = 24?}%
+%</trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \@flsettextmin
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{text-so-far: 0pt (top of col)}%
+%</trace>
+%<latexrelease|fltrace> \@reqcolroom \ht\@currbox
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{float size:
+%<latexrelease|fltrace> \the \@reqcolroom (addtonextcol)}%
+%<latexrelease|fltrace>
+%</trace>
+%<latexrelease|fltrace> \advance \@reqcolroom \@textmin
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{colroom =
+%<latexrelease|fltrace> \the \@colroom (addtonextcol)}%
+%<latexrelease|fltrace> \fl@trace{reqcolroom =
+%<latexrelease|fltrace> \the \@reqcolroom (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace> \ifdim \@colroom>\@reqcolroom
+%<latexrelease|fltrace> \@flsetnum \@colnum
+%<latexrelease|fltrace> \ifnum\@colnum>\z@
+%<latexrelease|fltrace> \@bitor\@currtype\@deferlist
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{deferlist: \@deferlist:
+%<latexrelease|fltrace> (addtonextcol-before)}%
+%</trace>
+%<latexrelease|fltrace> \if@test
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{type already on list:
+%<latexrelease|fltrace> defer (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace> \else
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{sent to addtotoporbot
+%<latexrelease|fltrace> (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace> \@addtotoporbot
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \fi
+%<*trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \fl@trace{Fail---no room: fl box ht:
+%<latexrelease|fltrace> \the \ht \@currbox (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \if@insert
+%<latexrelease|fltrace> \else
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{put back on deferlist
+%<latexrelease|fltrace> (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace> \@cons\@deferlist\@currbox
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{deferlist: \@deferlist:
+%<latexrelease|fltrace> (addtonextcol-after)}%
+%</trace>
+%<latexrelease|fltrace> \fi
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{End of addtonextcol --
+%<latexrelease|fltrace> locally counts:}%
+%<latexrelease|fltrace> \fl@trace{col: \the \@colnum.
+%<latexrelease|fltrace> top: \the \@topnum. bot: \the \@botnum.}%
+%</trace>
+%<latexrelease|fltrace> \endgroup
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{End of addtonextcol --
+%<latexrelease|fltrace> globally counts:}%
+%<latexrelease|fltrace> \fl@trace{col: \the \@colnum.
+%<latexrelease|fltrace> top: \the \@topnum. bot: \the \@botnum.}%
+%</trace>
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\@addtodblcol}
+% \changes{v1.0f}{1993/12/05}{Command changed}
+% Lots of changes.
+%
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% \begin{macrocode}
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace> {\@addtodblcol}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
+\def\@addtodblcol{%
+ \begingroup
+%<*trace>
+ \fl@trace{***Start addtodblcol}%
+%</trace>
+ \@insertfalse
+ \@setfloattypecounts
+ \@getfpsbit \tw@
+%<*trace>
+ \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi dbltop:
+ \the \@fpstype}%
+%</trace>
+ \ifodd\@tempcnta
+ \@flsetnum \@dbltopnum
+ \ifnum \@dbltopnum>\z@
+ \@tempswafalse
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+%<*trace>
+ \fl@trace{Space OK: \@dbltoproom =
+ \the \@dbltoproom > \the \ht \@currbox
+ (dbltoproom)}%
+%</trace>
+ \else
+%<*trace>
+ \fl@trace{fpstype: \the \@fpstype (addtodblcol)}%
+%</trace>
+ \ifnum \@fpstype<\sixt@@n
+%<*trace>
+ \fl@trace{BANG float ignoring \@dbltoproom}%
+ \fl@trace{\@spaces \@dbltoproom = \the \@dbltoproom.
+ Ht float: \the \ht \@currbox-BANG}%
+%</trace>
+% \end{macrocode}
+% Need to check that there is room on the page, using the local value
+% of |\@textmin| to make the necessary adjustment to |\@dbltoproom|.
+% \begin{macrocode}
+ \advance \@dbltoproom \@textmin
+%<*trace>
+ \fl@trace{Local value of texmin: \the\@textmin}%
+ \fl@trace{\@spaces space on page = \the \@dbltoproom.
+ Ht float: \the \ht \@currbox-BANG}%
+%</trace>
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+%<*trace>
+ \fl@trace{Space OK BANG: space on page =
+ \the \@dbltoproom > \the \ht \@currbox}%
+ \else
+ \fl@trace{fpstype: \the \@fpstype}%
+ \fl@trace{Fail---no room dbltoproom-BANG?:}%
+ \fl@trace{\@spaces space on page = \the \@dbltoproom.
+ Ht float: \the \ht \@currbox}%
+%</trace>
+ \fi
+ \advance \@dbltoproom -\@textmin
+%<*trace>
+ \else
+ \fl@trace{fpstype: \the \@fpstype}%
+ \fl@trace{Fail---no room dbltoproom-ORD?:}%
+ \fl@trace{\@spaces \@dbltoproom = \the \@dbltoproom.
+ Ht float: \the \ht \@currbox}%
+%</trace>
+ \fi
+ \fi
+ \if@tempswa
+ \@bitor \@currtype \@deferlist
+%<*trace>
+ \fl@trace{(dbl)deferlist: \@deferlist: (before)}%
+%</trace>
+% \end{macrocode}
+%
+% not in fixfloats?
+% \begin{macrocode}
+ \@testwrongwidth\@currbox
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \if@test
+%<*trace>
+ \fl@trace{type already on list: (dbl)defer}%
+%</trace>
+ \else
+ \@tempdima -\ht\@currbox
+ \advance\@tempdima
+ -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
+ \dblfloatsep \fi
+ \global \advance \@dbltoproom \@tempdima
+ \global \advance \@colht \@tempdima
+ \global \advance \@dbltopnum \m@ne
+ \@cons \@dbltoplist \@currbox
+%<*trace>
+ \fl@trace{dbltopnum (after) = \the \@dbltopnum}%
+ \fl@trace{***Success: dbltop}%
+%</trace>
+ \@inserttrue
+ \fi
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail: dbltopnum = \the \@dbltopnum: fpstype
+ \the \@fpstype=ORD?}%
+ \ifnum \@fpstype<\sixt@@n
+ \fl@trace{ERROR: !t float not successful (addtodblcol)}%
+ \fi
+%</trace>
+ \fi
+ \fi
+ \if@insert
+ \else
+%<*trace>
+ \fl@trace{put on deferlist}%
+%</trace>
+ \@cons\@deferlist\@currbox
+%<*trace>
+ \fl@trace{(dbl)deferlist: \@deferlist: (after)}%
+%</trace>
+ \fi
+%<*trace>
+ \fl@trace{End of addtodblcol -- locally count:}%
+ \fl@trace{ dbltop: \the \@dbltopnum.}%
+%</trace>
+ \endgroup
+%<*trace>
+ \fl@trace{End of addtodblcol -- globally count:}%
+ \fl@trace{dbltop: \the \@dbltopnum.}%
+%</trace>
+}%
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace> {\@addtodblcol}{float order in 2-column}%
+%<latexrelease|fltrace>\def\@addtodblcol{%
+%<latexrelease|fltrace> \begingroup
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{***Start addtodblcol}%
+%</trace>
+%<latexrelease|fltrace> \@insertfalse
+%<latexrelease|fltrace> \@setfloattypecounts
+%<latexrelease|fltrace> \@getfpsbit \tw@
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{fpstype \ifodd \@tempcnta OK
+%<latexrelease|fltrace> \else not \fi dbltop: \the \@fpstype}%
+%</trace>
+%<latexrelease|fltrace> \ifodd\@tempcnta
+%<latexrelease|fltrace> \@flsetnum \@dbltopnum
+%<latexrelease|fltrace> \ifnum \@dbltopnum>\z@
+%<latexrelease|fltrace> \@tempswafalse
+%<latexrelease|fltrace> \ifdim \@dbltoproom>\ht\@currbox
+%<latexrelease|fltrace> \@tempswatrue
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{Space OK: \@dbltoproom =
+%<latexrelease|fltrace> \the \@dbltoproom > \the \ht \@currbox
+%<latexrelease|fltrace> (dbltoproom)}%
+%</trace>
+%<latexrelease|fltrace> \else
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{fpstype: \the \@fpstype (addtodblcol)}%
+%</trace>
+%<latexrelease|fltrace> \ifnum \@fpstype<\sixt@@n
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{BANG float ignoring \@dbltoproom}%
+%<latexrelease|fltrace> \fl@trace{\@spaces \@dbltoproom =
+%<latexrelease|fltrace> \the \@dbltoproom.
+%<latexrelease|fltrace> Ht float: \the \ht \@currbox-BANG}%
+%</trace>
+% \end{macrocode}
+% Need to check that there is room on the page, using the local value
+% of |\@textmin| to make the necessary adjustment to |\@dbltoproom|.
+% \begin{macrocode}
+%<latexrelease|fltrace> \advance \@dbltoproom \@textmin
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{Local value of texmin: \the\@textmin}%
+%<latexrelease|fltrace> \fl@trace{\@spaces space on page =
+%<latexrelease|fltrace> \the \@dbltoproom.
+%<latexrelease|fltrace> Ht float: \the \ht \@currbox-BANG}%
+%</trace>
+%<latexrelease|fltrace> \ifdim \@dbltoproom>\ht\@currbox
+%<latexrelease|fltrace> \@tempswatrue
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{Space OK BANG: space on page =
+%<latexrelease|fltrace> \the\@dbltoproom > \the\ht\@currbox}%
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \fl@trace{fpstype: \the \@fpstype}%
+%<latexrelease|fltrace> \fl@trace{Fail---no room dbltoproom-BANG?:}%
+%<latexrelease|fltrace> \fl@trace{\@spaces space on page =
+%<latexrelease|fltrace> \the \@dbltoproom.
+%<latexrelease|fltrace> Ht float: \the \ht \@currbox}%
+%</trace>
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \advance \@dbltoproom -\@textmin
+%<*trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \fl@trace{fpstype: \the \@fpstype}%
+%<latexrelease|fltrace> \fl@trace{Fail---no room dbltoproom-ORD?:}%
+%<latexrelease|fltrace> \fl@trace{\@spaces \@dbltoproom =
+%<latexrelease|fltrace> \the \@dbltoproom.
+%<latexrelease|fltrace> Ht float: \the \ht \@currbox}%
+%</trace>
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \if@tempswa
+%<latexrelease|fltrace> \@bitor \@currtype \@dbldeferlist
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{dbldeferlist:
+%<latexrelease|fltrace> \@dbldeferlist: (before)}%
+%</trace>
+%<latexrelease|fltrace> \if@test
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{type already on list: dbldefer}%
+%</trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \@tempdima -\ht\@currbox
+%<latexrelease|fltrace> \advance\@tempdima
+%<latexrelease|fltrace> -\ifx \@dbltoplist\@empty
+%<latexrelease|fltrace> \dbltextfloatsep
+%<latexrelease|fltrace> \else \dblfloatsep \fi
+%<latexrelease|fltrace> \global \advance \@dbltoproom \@tempdima
+%<latexrelease|fltrace> \global \advance \@colht \@tempdima
+%<latexrelease|fltrace> \global \advance \@dbltopnum \m@ne
+%<latexrelease|fltrace> \@cons \@dbltoplist \@currbox
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{dbltopnum (after) =
+%<latexrelease|fltrace> \the \@dbltopnum}%
+%<latexrelease|fltrace> \fl@trace{***Success: dbltop}%
+%</trace>
+%<latexrelease|fltrace> \@inserttrue
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \fi
+%<*trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \fl@trace{Fail: dbltopnum = \the \@dbltopnum:
+%<latexrelease|fltrace> fpstype \the \@fpstype=ORD?}%
+%<latexrelease|fltrace> \ifnum \@fpstype<\sixt@@n
+%<latexrelease|fltrace> \fl@trace{ERROR: !t float not successful
+%<latexrelease|fltrace> (addtodblcol)}%
+%<latexrelease|fltrace> \fi
+%</trace>
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \if@insert
+%<latexrelease|fltrace> \else
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{put on dbldeferlist}%
+%</trace>
+%<latexrelease|fltrace> \@cons\@dbldeferlist\@currbox
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{dbldeferlist: \@dbldeferlist: (after)}%
+%</trace>
+%<latexrelease|fltrace> \fi
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{End of addtodblcol -- locally count:}%
+%<latexrelease|fltrace> \fl@trace{ dbltop: \the \@dbltopnum.}%
+%</trace>
+%<latexrelease|fltrace> \endgroup
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{End of addtodblcol -- globally count:}%
+%<latexrelease|fltrace> \fl@trace{dbltop: \the \@dbltopnum.}%
+%</trace>
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@addmarginpar}
+% \begin{macrocode}
+%<*2ekernel>
+\def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox
+ \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne
+ \if@twocolumn
+ \if@firstcolumn \@tempcnta\m@ne \fi
+ \else
+ \if@mparswitch
+ \ifodd\c@page \else\@tempcnta\m@ne \fi
+ \fi
+ \if@reversemargin \@tempcnta -\@tempcnta \fi
+ \fi
+ \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi
+ \@tempdima\@mparbottom
+ \advance\@tempdima -\@pageht
+ \advance\@tempdima\ht\@marbox
+ \ifdim\@tempdima >\z@
+ \@latex@warning@no@line {Marginpar on page \thepage\space moved}%
+ \else
+ \@tempdima\z@
+ \fi
+ \global\@mparbottom\@pageht
+ \global\advance\@mparbottom\@tempdima
+ \global\advance\@mparbottom\dp\@marbox
+ \global\advance\@mparbottom\marginparpush
+ \advance\@tempdima -\ht\@marbox
+% \end{macrocode}
+% Putting box movement inside the `marbox':
+% \begin{macrocode}
+ \global\setbox \@marbox
+ \vbox {\vskip \@tempdima
+ \box \@marbox}%
+ \global \ht\@marbox \z@
+ \global \dp\@marbox \z@
+% \end{macrocode}
+% Sticking (rather than gluing:-) the `marbox' to the line above,
+% changed vskip to kern:
+% \begin{macrocode}
+ \kern -\@pagedp
+ \nointerlineskip
+ \hb@xt@\columnwidth
+ {\ifnum \@tempcnta >\z@
+ \hskip\columnwidth \hskip\marginparsep
+ \else
+ \hskip -\marginparsep \hskip -\marginparwidth
+ \fi
+ \box\@marbox \hss}%
+% \end{macrocode}
+% For this reason the following code can vanish:
+%\begin{verbatim}
+% \nobreak %% No longer needed. CAR92/12
+% \vskip -\@tempdima %% No longer needed. CAR92/12
+%\end{verbatim}
+% \begin{macrocode}
+ \nointerlineskip
+ \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Kludgeins}
+%
+% This part of the file is part of the implementation of the following
+% two new commands for \LaTeX2e{}.
+%
+%
+% \begin{verbatim}
+% \enlargethispage{<dim>}
+% \end{verbatim}
+%
+% Adds |<dim>| to the height of the current column only. On the printed
+% page the bottom of this column is extended downwards by exactly
+% |<dim>| without having any effect on the placement of the footer; this
+% may result in an overprinting.
+%
+% \begin{verbatim}
+% \enlargethispage*{<dim>}
+% \end{verbatim}
+%
+% Similar to |\enlargethispage| but it tries to squeeze the column to
+% be printed in as small a space as possible, ie it uses any
+% shrinkability in the column. If the column was not explicitly broken
+% (\eg with |\pagebreak|) this may result in an overfull box message but
+% execpt for this it will come out as expected (if you know what to
+% expect).
+%
+% The star form of this command is dedicated to Leslie Lamport, the
+% other we need for ourselves (FMi, CAR).
+%
+% These commands may well have unwanted effects if used soon
+% before a |\clearpage|: please give keep them clear of such places.
+%
+% \begin{macro}{\@kludgeins}
+% \changes{v0.1c}{1993/11/23}{Insert added}
+% The insert which makes \TeX{} do a lot of the necessary work.
+% All we need to put into it is the amount by which the pagegoal
+% should be changed.
+% \begin{macrocode}
+\newinsert \@kludgeins
+\global\dimen\@kludgeins \maxdimen
+\global\count\@kludgeins 1000
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\enlargethispage}
+% \begin{macro}{\enlargethispage*}
+% \changes{v0.1c}{1993/11/23}{Commands added}
+% The user command.
+% \begin{macrocode}
+\gdef \enlargethispage {%
+ \@ifstar
+ {%
+%<*trace>
+ \fl@trace{Enlarging page height * }%
+%</trace>
+ \@enlargepage{\hbox{\kern\p@}}}%
+ {%
+%<*trace>
+ \fl@trace{Enlarging page height exactly---}%
+%</trace>
+ \@enlargepage\@empty}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@enlargepage}
+% \changes{v0.1c}{1993/11/23}{Command added}
+% This actually inserts the insert, after checking for extreme
+% values of the change.
+% \begin{macrocode}
+\gdef\@enlargepage#1#2{%
+%<*trace>
+ \fl@trace{\@spaces\@spaces by #2}%
+%</trace>
+ \@tempskipa#2\relax
+ \ifdim \@tempskipa>.5\maxdimen
+ \@latexerr{Suggested\space extra\space height\space
+ (\the\@tempskipa)\space dangerously\space
+ large}\@eha
+ \else
+ \ifdim \vsize<.5\maxdimen
+%<*trace>
+ \fl@trace {Kludgeins added--pagegoal before: \the\pagegoal}%
+%</trace>
+ \@bsphack
+ \insert\@kludgeins{#1\vskip-\@tempskipa}%
+ \@esphack
+% \end{macrocode}
+% This next bit is for tracing only:
+% \begin{macrocode}
+%<*trace>
+ \ifvmode \par
+ \fl@trace {Kludgeins added--pagegoal after: \the \pagegoal}%
+ \fi
+%</trace>
+ \else
+ \@latexerr{Page\space height\space already\space
+ too\space large}\@eha
+ \fi
+ \fi
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Float control}
+%
+% This part implements controllable floats and other changes
+% to the float mechanism.
+%
+% It provides, at the document level, the following command for
+% inclusion in \LaTeX2e{}.
+%
+% \begin{verbatim}
+% \suppressfloats
+% \end{verbatim}
+%
+% This suppresses all further floats on the current page.
+%
+% With an optional argument it suppresses only floats only in certain
+% positions on the current page.
+% \begin{quote}
+% |[t]|\quad suppresses only floats at the top of the page
+% |[b]|\quad suppresses only floats at the bottom of the page
+% \end{quote}
+%
+% It also enables the use of an extra specifier, {\tt !}, in the
+% location optional argument of a float. If this is present then,
+% just for this particular float, whenever it is processed by the float
+% mechanism the followinhg are ignored:
+%
+% \begin{itemize}
+% \item all restrictions on the number of floats which can appear;
+% \item all explicit restrictions on the amount of space which should
+% (not) be occupied by floats and/or text.
+% \end{itemize}
+%
+% The mechanism will still attempt to ensure that pages are not
+% overfull.
+%
+% These specifiers override, for the single float, the suppression
+% commands described above.
+%
+%
+% In its current form, it also supplies a reasonably exhaustive, and
+% somewhat baroque, means of tracing some aspects of the float
+% mechanism.
+%
+% More tracing.
+% \begin{macro}{\fl@trace}
+% \begin{macro}{\tracefloatsoff}
+% \begin{macro}{\tracefloats}
+% \begin{macro}{\fl@traceval}
+% \begin{macro}{\tracefloatvals}
+% \begin{macro}{\fl@tracemessage}
+% \changes{v1.0c}{1993/11/30}{Commands added}
+% \changes{v1.0h}{1993/12/12}{Commands changed}
+% \changes{v1.0j}{1993/12/17}{tracefloatvals made a document command}
+% Set-up tracing for floats independent of other tracing as it
+% produces mega-output. Default is no tracing.
+% \changes{v1.1j}{1995/04/24}
+% {Do not add to kernel unless `trace' specified}
+% \changes{v1.2n}{2014/04/24}
+% {Renamed internal trace commands; provide as package}
+%
+% \begin{macrocode}
+%<*fltrace>
+\def \fl@tracemessage #1{{\let\@elt\@empty\typeout{LaTeX2e: #1}}}
+\def \tracefloats{\let \fl@trace \fl@tracemessage}
+\def \tracefloatsoff {\let \fl@trace \@gobble}
+\tracefloatsoff
+\def \fl@traceval #1{\fl@trace{\string #1 = \the #1}}
+\IncludeInRelease{2015/01/01}{\tracefloatvals}%
+ {trace float vals}%
+\def \tracefloatvals{%
+% \end{macrocode}
+% As |\@dblfloatplacement| sets |\f@depth| it needs to be run
+% inside a group, otherwise the float placement will test for the
+% wrong value.\footnote{This is a somewhat questionable design.}
+% \begin{macrocode}
+ \begingroup
+ \@dblfloatplacement
+ \@floatplacement
+ \fl@trace{***Float placement parameters:}%
+ \fl@traceval\@colnum
+ \fl@traceval\@colroom
+ \fl@traceval\@topnum
+ \fl@traceval\@toproom
+ \fl@traceval\@botnum
+ \fl@traceval\@botroom
+ \fl@traceval\@fpmin
+ \fl@trace{\string\textfraction = \textfraction}%
+ \fl@traceval\@dbltopnum
+ \fl@traceval\@dbltoproom
+ \fl@trace{\string\textfraction = \textfraction}%
+ \fl@trace{toplist: \@toplist}%
+ \fl@trace{botlist: \@botlist}%
+ \fl@trace{midlist: \@midlist}%
+ \fl@trace{deferlist: \@deferlist}%
+ \fl@trace{dbltoplist: \@dbltoplist}%
+%FMi \fl@trace{dbldeferlist: \@dbldeferlist}%
+ \endgroup
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{\tracefloatvals}%
+ {trace float vals}%
+\def \tracefloatvals{%
+ \begingroup
+ \@dblfloatplacement
+ \@floatplacement
+ \fl@trace{***Float placement parameters:}%
+ \fl@traceval\@colnum
+ \fl@traceval\@colroom
+ \fl@traceval\@topnum
+ \fl@traceval\@toproom
+ \fl@traceval\@botnum
+ \fl@traceval\@botroom
+ \fl@traceval\@fpmin
+ \fl@trace{\string\textfraction = \textfraction}%
+ \fl@traceval\@dbltopnum
+ \fl@traceval\@dbltoproom
+ \fl@trace{\string\textfraction = \textfraction}%
+ \fl@trace{toplist: \@toplist}%
+ \fl@trace{botlist: \@botlist}%
+ \fl@trace{midlist: \@midlist}%
+ \fl@trace{deferlist: \@deferlist}%
+ \fl@trace{dbltoplist: \@dbltoplist}%
+% next line only in old releases
+ \fl@trace{dbldeferlist: \@dbldeferlist}%
+ \endgroup
+}
+\EndIncludeInRelease
+% \end{macrocode}
+% We need to make sure that \texttt{fltrace} comes before
+% \texttt{flafter} to make the tracing work.
+% \begin{macrocode}
+\@ifpackageloaded{flafter}
+ {\PackageWarningNoLine
+ {fltrace}{Load 'fltrace' before 'flafter'\MessageBreak
+ Attempting to recover by reloading 'flafter'}%
+% \end{macrocode}
+% Hide the fact that \texttt{flafter} was already loaded and then
+% request it anew.
+% \changes{v1.2m}{2015/01/20}{Reset \cs{IncludeInRelease} flags}
+% \begin{macrocode}
+ \expandafter\let\csname ver@flafter.sty\endcsname\relax
+ \def\reserved@a#1{%
+ \expandafter\let\csname\string#1+flafter+IIR\endcsname\relax}%
+ \reserved@a\@addtocurcol
+ \reserved@a\@addtonextcol
+ \RequirePackage{flafter}}{}
+%</fltrace>
+% \end{macrocode}
+% As the code for \texttt{flafter} will contain tracing calls so
+% that it works in conjunction with \texttt{fltrace} we need to
+% provide a dummy definition for |\fl@trace| in that package.
+% \begin{macrocode}
+%<*flafter>
+\providecommand\fl@trace[1]{}
+%</flafter>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\suppressfloats}
+% \begin{macro}{\@flstop}
+% \changes{v1.0f}{1993/12/05}{Commands added}
+% Float suppression commands: these set the relevant counter
+% globally to zero. Thus they are overridden for a particular float
+% by an ! specifier.
+%
+% \begin{macrocode}
+%<*2ekernel>
+\def \suppressfloats {%
+ \@ifnextchar [%
+ \@flstop
+ {\global \@colnum \z@}%
+}
+% \end{macrocode}
+% Maybe this should be a loop over |#1|?
+% \begin{macrocode}
+\def \@flstop [#1]{%
+ \if t#1%
+ \global \@topnum \z@
+ \fi
+ \if b#1%
+ \global \@botnum \z@
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% Manipulation of float placement and type; both their strings and the
+% corresponding count registers.
+%
+% \begin{macro}{\@fpstype}
+% \begin{macro}{\@reqcolroom}
+% \begin{macro}{\@textfloatsheight}
+% \changes{v1.0f}{1993/12/05}{Commands added}
+% First a new count register to go with |\@currtype|.
+%
+% Then a new skip register, for information needed to remove the
+% |\@maxsep| conservatism: it is possible that this could use a
+% temporary register.
+%
+% Finally a dimension register to hold the total height of in-text
+% floats on the current page. This is needed to implement a
+% major change in the functionality of |\@addtocurcol| which is,
+% nevertheless, a bug fix.
+% It is not local and therefore cannot be a temporary register.
+%
+% \begin{macrocode}
+\newcount \@fpstype
+\newdimen \@reqcolroom
+\newdimen \@textfloatsheight
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@fpsadddefault}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% Adds the default placement to what is already there.
+%
+% Should not need to change this, but could do it as follows:
+% \begin{verbatim}
+%\def \@fpsadddefault {%
+% \@temptokena \expandafter\expandafter\expandafter
+% {\csname fps@\@captype \endcsname}%
+% \edef \reserved@a {\the\@temptokena}%
+% \@onelevel@sanitize \reserved@a
+% \edef \@fps {\@fps\reserved@a}%
+%}
+% \end{verbatim}
+%
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\def \@fpsadddefault {%
+%<*trace>
+ \fl@trace{fps changed from: \@fps}%
+%</trace>
+ \edef \@fps {\@fps\csname fps@\@captype \endcsname}%
+ \@latex@warning {%
+ No positions in optional float specifier.\MessageBreak
+ Default added (so using `\@fps')}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@setfloattypecounts}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% Sets counters |\@fpstype| and |\@currtype|.
+%
+% BANG $==$ bit4 of $|\count\@currbox| = 0$.
+%
+% \begin{macrocode}
+\def \@setfloattypecounts {%
+ \@currtype \count\@currbox
+ \@fpstype \count\@currbox
+ \divide\@currtype\@xxxii \multiply\@currtype\@xxxii
+ \advance \@fpstype -\@currtype
+%<*trace>
+ \fl@trace{(mod 32) fpstype: \the \@fpstype}%
+ \fl@trace{(mult of 32) currtype: \the \@currtype}%
+% Tracing only: but some should be changed into real errors/warnings?
+ \ifnum \@fpstype<\sixt@@n
+ \ifnum \@fpstype=\z@
+ \fl@trace{ERROR: no PLACEMENT, fpstype = \the \@fpstype = 0?}%
+ \fi
+ \ifnum \@fpstype=\@ne
+ \fl@trace{WARNING: only h, fpstype = \the \@fpstype = 1?}%
+ \fi
+ \fl@trace{BANG float}%
+ \else
+ \ifnum \@fpstype=\sixt@@n
+ \fl@trace{ERROR: no PLACEMENT, fpstype = \the \@fpstype = 16?}%
+ \fi
+ \ifnum \@fpstype=17
+ \fl@trace{WARNING: only h, fpstype = \the \@fpstype = 17?}%
+ \fi
+ \fl@trace{ORD float}%
+ \fi
+%</trace>
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+%
+% Macros for getting, testing and setting bits of the fps.
+%
+%
+% \begin{macro}{\@getfpsbit}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% Sets |\@tempcnta| to required bit of |\count\@currbox|.
+%
+% \begin{macrocode}
+%<*2ekernel>
+\def \@getfpsbit {%
+ \@boxfpsbit \@currbox
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@boxfpsbit}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% Used above.
+% \begin{macrocode}
+\def \@boxfpsbit #1#2{%
+ \@tempcnta \count#1%
+ \divide \@tempcnta #2\relax
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@testfp}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% New definition of the float page test.
+%
+% \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \begin{macrocode}
+\def \@testfp #1{%
+ \@boxfpsbit #18\relax % Really `#1 8' for human readers!
+ \ifodd \@tempcnta
+ \else
+ \@testtrue
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setfpsbit}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% Sets required bit of |\@tempcnta| (to 1).
+%
+% \begin{macrocode}
+\def \@setfpsbit #1{%
+ \@tempcntb \@tempcnta
+ \divide \@tempcntb #1\relax
+ \ifodd \@tempcntb
+ \else
+ \advance \@tempcnta #1\relax
+ \fi
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@resethfps}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% \changes{v1.0h}{1993/12/12}{Warnings added: minimal}
+% \changes{v1.0m}{1994/04/24}{Warning changed}
+% \changes{v1.0m}{1994/04/24}{Number 2 changed to \cs{tw@}}
+% \changes{v1.0o}{1994/05/02}{Code shortened}
+% Globally adds t as a possible location for an h or !h only placement:
+% this must be done using the count.
+%
+% Although it will leave |\@fpstype| set to 17 even if it was
+% originally 1, this does not matter since it is the last thing in
+% |\@addtocurcol|.
+% \begin{macrocode}
+%<*2ekernel|fltrace>
+\def \@resethfps {%
+ \let\reserved@a\@empty
+ \ifnum \@fpstype=\@ne
+ \def \reserved@a {!}%
+ \@fpstype 17
+ \fi
+ \ifnum \@fpstype=17
+ \global \advance \count\@currbox \tw@
+ \@latex@warning@no@line {%
+ `\reserved@a h' float specifier changed to `\reserved@a ht'}%
+%<*trace>
+ \fl@trace{%
+ `t' added to `\reserved@a h'- new Count: \the \count\@currbox}%
+%</trace>
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Special stuff for BANG floats.
+%
+% \begin{macro}{\@flsetnum}
+% \changes{v1.0f}{1993/12/05}{Command added}
+%
+% Ignores any zero float counter value in case BANG.
+%
+% It uses a local assignment to the normally global counter: a bit
+% naughty, perhaps?
+%
+% These assignments are safe so long as the counter involved is only
+% consulted once (\ie only for the `bang float') with the changed value.
+% This is the case within |\@addtocurcol| because it is used only
+% once within a call of the output routine (which forms a group).
+%
+% For |\@addtonextcol| this is achieved by putting a group around its
+% code; this is needed because it is called (by |\@startcolumn|) for
+% each float which was on the deferlist. Almost identical
+% considerations pertain to |\@addtodblcol|. There may be more
+% efficient ways to handle this, but the group seems to be the simplest.
+%
+% \changes{v1.0n}{1994/04/30}{Rogue space removed}
+% \begin{macrocode}
+\def \@flsetnum #1{%
+%<*trace>
+ \fl@trace{fpstype: \the \@fpstype (flsetnum \string#1)}%
+%</trace>
+ \ifnum \@fpstype<\sixt@@n
+ \ifnum #1=\z@
+%<*trace>
+ \fl@trace{BANG float resetting \string#1 to 1}%
+%</trace>
+ #1\@ne
+ \fi
+ \fi
+%<*trace>
+ \fl@trace{#1 (before) = \the #1}%
+%</trace>
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@flsettextmin}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% This ignores |\textfraction| space restriction in case BANG.
+%
+% \begin{macrocode}
+\def \@flsettextmin {%
+%<*trace>
+ \fl@trace{fpstype: \the \@fpstype (flsettextmin)}%
+%</trace>
+ \ifnum \@fpstype<\sixt@@n
+%<*trace>
+ \fl@trace{BANG ignoring textmin}%
+%</trace>
+ \@textmin \z@
+ \else
+ \@textmin \textfraction\@colht
+%<*trace>
+ \fl@trace{ORD textmin = \the \@textmin}%
+%</trace>
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@flcheckspace}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% This ignores space restriction in case BANG; this is still slightly
+% conservative since it does not allow for the fact that, if there is
+% no text in the column then |\textfloatsep| is not needed.
+% Sets |@tempswa| true if there is room for |\@currbox|.
+%
+% \begin{macrocode}
+\def \@flcheckspace #1#2{%
+ \advance \@reqcolroom
+ \ifx #2\@empty \textfloatsep \else \floatsep \fi
+%<*trace>
+ \fl@trace{colroom = \the \@colroom
+ (flcheckspace \string#1 \string#2)}%
+ \fl@trace{reqcolroom = \the \@reqcolroom
+ (flcheckspace \string#1 \string#2)}%
+%</trace>
+ \ifdim \@colroom>\@reqcolroom
+ \ifdim #1>\ht\@currbox
+ \@tempswatrue
+%<*trace>
+ \fl@trace{Space OK: #1 = \the #1 > \the \ht \@currbox
+ (flcheckspace \string#1 \string#2)}%
+%</trace>
+ \else
+%<*trace>
+ \fl@trace{fpstype: \the \@fpstype
+ (flcheckspace \string#1 \string#2)}%
+%</trace>
+ \ifnum \@fpstype<\sixt@@n
+%<*trace>
+ \fl@trace{BANG float ignoring #1
+ (flcheckspace \string#1 \string#2):}%
+ \fl@trace{\@spaces #1 = \the #1. Ht float: \the \ht \@currbox
+ BANG}%
+%</trace>
+ \@tempswatrue
+%<*trace>
+ \else
+ \fl@trace{Fail---no room (flcheckspace \string#1 \string#2)
+ (fpstype \the \@fpstype=ORD?):}%
+ \fl@trace{\@spaces #1 = \the #1. Ht float: \the \ht \@currbox
+ ORD?}%
+%</trace>
+ \fi
+ \fi
+%<*trace>
+ \else
+ \fl@trace{Fail---no room at 2nd test of colroom
+ (flcheckspace \string#1 \string#2)}%
+%</trace>
+ \fi
+}
+%</2ekernel|fltrace>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@flupdates}
+% \changes{v1.0f}{1993/12/05}{Command added}
+% This updates everything when a float is placed.
+%
+% \begin{macrocode}
+%<*2ekernel>
+\def \@flupdates #1#2#3{%
+ \global \advance #1\m@ne
+ \global \advance \@colnum \m@ne
+ \@tempdima -\ht\@currbox
+ \advance \@tempdima
+ -\ifx #3\@empty \textfloatsep \else \floatsep \fi
+ \global \advance #2\@tempdima
+ \global \advance \@colroom \@tempdima
+ \@cons #3\@currbox
+}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Interesting facts about float mechanisms past and present, together
+% with a summary of various features, some unresolved:
+%
+% \begin{enumerate}
+% \item The value |\textfraction| does not affect the processing
+% of doublecol floats: this seems sensible, but should be
+% documented.
+% \item |\twocolumn| floatplacement was wrong: dbl not needed, ord
+% needed.
+% \item |\@floatplacement| was not called after |\@startdblcol|
+% or |\@topnewpage|. This has been changed; it is clearly a bug
+% fix.
+% \item The use |\@topnewpage| when |\dblfigrule| is non-trivial
+% produced a rule in the wrong place. This has been fixed by not
+% using |\dblfigrule| when processing the `float' from
+% |\@topnewpage|.
+% \item If the specifier was just h and the float could not be put
+% here, it went on the deferlist and stayed there until a clearpage.
+% It now gets changed to a `th': this is only an error-recovery
+% action, putting just h or !h should be deprecated.
+% \item |\@dblmaxsep| was `the maximum of |\dblfloatsep| and
+% |\dbltexfloatsep|'. But it was never used! Now gone completely,
+% like |\@maxsep|.
+% \item After an h float is put on a page, it was counted as text when
+% applying the |\textfraction| test; this is possibly too big a
+% change although it is a bug fix?
+% \item Two consecutive h floats are separated by twice |\intextsep|:
+% this could be changed to one by use of |\addvspace|, OK?
+% Note that it would also mean that less space is put in if an h
+% float immediately follows other spaces. This is also possibly
+% too big a change, at least for compatibility mode?
+% Or it may be simply wrong! It has not been changed.
+% \item Now |\@addtocurcol| checks first for just p fps. I think
+% that this is an increase in efficiency, but maybe the coding
+% should be made even more efficient.
+% \item |\@tryfcolumn| now tests if the list is empty first, otherwise
+% lots of wasted time! Thus this test has been removed from
+% |\@startcolumn|.
+% As Frank pointed out, this makes |\@startcolumn| less
+% efficient. But it is now the same as |\@startdblcolumn|: I can
+% see no reason why they should be different, but which is best?
+% \item Why is |\@colroom| set in |\@doclearpage|?
+% \item Footnotes. Check what |\clearpage| does when footnotes are
+% left over. Footnotes are not put on float pages and, also,
+% |\@addtonextcol| ignores the existence of held-over footnotes
+% in deciding what floats can go on the page. Not changed.
+% \item |\clearpage| can still lose non-boxes, at least when floats
+% are involved. It also moves some to the `wrong page', but this
+% may be a coding problem.
+% \item The ! option makes it necessary to check in |\output| that
+% there is enough room left on the page after adding a float. (This
+% would have been necessary anyway if anyone set |\@textmin| too
+% close to zero! A similar danger existed also if the text in a
+% |\twocolumn[text]| entity gets too large.)
+% The current implementation of this also makes the normal case a
+% little less efficient, OK?
+% Not enough room means, at present, less than |\baselineskip|,
+% with a warning: is this OK? Should it be made generic (another
+% parameter)?
+% \item There are four possibilities for supporting this:
+%
+% |\twocolumn[\maketitle more text]|
+%
+% One is to change
+% |\maketitle| slightly to allow this. Another is to change
+% |\@topnewpage| so that more than one |\twocolumn[]| command is
+% allowed; in this case |\maketitle\twocolumn[more text]| will work.
+% The former is more robust from the user's viewpoint, but makes the
+% code for |\maketitle| rather ad hoc (maybe it is already?).
+% Another is to misuse the global twocolumn flag locally within
+% |\@topnewpage|.
+% Yet another is to move the column count register from the multicol
+% package into the kernel. This has been done.
+% \item Where should the reinserts be put to maximise the
+% probability that footmotes come out on the correct page?
+% Or should we go for as much compatibility as possible (but see
+% next item)?
+% \item Should we continue to support (as much as possible)
+% |\samepage|? Some of its intended functionality is now advertised
+% as being provided by |\enlargethispage|. Use of either is likely
+% to result in wrongly placed footnotes, marginals, etc.
+% Which should have priority: obeying the pagination instructions,
+% or correct placement of notes/marginalia?
+% \item Is the adjustment of space to cause shrinking in the
+% kludge-* case correct? Should it be limited to 0pt?
+% \item Is the setting of |\boxmaxdepth| in makecol and friends
+% needed? It only has any effect if |\@textbottom| ends with a box
+% or rule, in which case the vskip to allow for its depth should
+% also be added. If it is kept, it should probably be the last
+% thing in the box. It has now been removed.
+%
+% It would perhaps be better to document that |\@textbottom|
+% and |\@texttop| must have natural height 0pt.
+% \item I cannot see why the vskip adjustment for the depth
+% is needed if boxmaxdepth is used to ensure that there is never
+% a too deep box.
+% \item The value of |\boxmaxdepth| should be explicitly set
+% whenever necessary: it is too risky to assume that it has any
+% particular value. Care is needed in deciding what to set it to.
+%
+% It is interesting to note that the value of |\boxmaxdepth| is
+% unique in being read before the local settings for the box group
+% are reset; all other parameter settings which affect the box
+% construction use their values outside the box group.
+% \item Should |\@maxdepth| store the setting of |\maxdepth| from
+% lplain? Or should we provide a proper interface to class files
+% for setting these?
+% \end{enumerate}
+%
+% An analysis of various other macros.
+%
+% |\@opcol| should do |\@floatplacement|, but where? Right at the
+% end, since it always occurs at the start of a column.
+% \begin{verbatim}
+% \def\@opcol{%
+% % Why is this done first?
+% \global \@mparbottom \z@
+% \if@twocolumn
+% \@outputdblcol
+% \else
+% \@outputpage
+% % This is not needed since it is done at the end of
+% % |\@outputpage|:
+% \global \@colht \textheight
+% \fi}
+% \end{verbatim}
+%
+% Only tracing has been added to these.
+%
+% \begin{macrocode}
+%<latexrelease|fltrace>\IncludeInRelease{2017/01/01}%
+%<latexrelease|fltrace> {\@makefcolumn}{negative height floats}%
+%<*2ekernel|fltrace|latexrelease>
+\def\@makefcolumn #1{%
+ \begingroup
+% \end{macrocode}
+% \changes{v1.3b}{2017/01/01}{make fpmin negative so ignored even if float height is negative}
+% \begin{macrocode}
+ \@fpmin -\maxdimen
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \let \@testfp \@gobble
+ \@tryfcolumn #1%
+ \endgroup
+%<*trace>
+ \if@fcolmade
+ \fl@trace{PAGE: in \string\clearpage
+ \if@twocolumn ---twocolumn\fi---}%
+ \fl@trace{----- float column/page completed from \string#1}%
+ \fi
+%</trace>
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace> {\@makefcolumn}{negative height floats}%
+%<latexrelease|fltrace>\def\@makefcolumn #1{%
+%<latexrelease|fltrace> \begingroup
+%<latexrelease|fltrace> \@fpmin \z@
+%<latexrelease|fltrace> \let \@testfp \@gobble
+%<latexrelease|fltrace> \@tryfcolumn #1%
+%<latexrelease|fltrace> \endgroup
+%<*trace>
+%<latexrelease|fltrace> \if@fcolmade
+%<latexrelease|fltrace> \fl@trace{PAGE: in \string\clearpage
+%<latexrelease|fltrace> \if@twocolumn ---twocolumn\fi---}%
+%<latexrelease|fltrace> \fl@trace{----- float column/page completed
+%<latexrelease|fltrace> from \string#1}%
+%<latexrelease|fltrace> \fi
+%</trace>
+%<latexrelease|fltrace>}
+%<latexrelease|fltrace>\EndIncludeInRelease
+%</2ekernel|fltrace|latexrelease>
+% \end{macrocode}
+% This will line up the last baselines in the two
+% columns provided they are constructed in the normal way: \ie ending
+% in a skip of minus the original depth, with |\@textbottom| adding
+% nothing.
+%
+% Thus again it is essential for |\@textbottom| to have depth 0pt.
+% \changes{1.2g}{2000/07/12}{Ensure that rule is in \cs{normalcolor}}
+% \changes{v1.2m}{2014/12/30}{Command updated (latexrelease)}
+% \begin{macrocode}
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
+%<*2ekernel|fltrace|latexrelease>
+% \end{macrocode}
+%
+%
+% This is just a change to the single command |\@outputdblcol|
+% so that it saves mark information for the first column and restores
+% it in the second column.
+% \begin{macrocode}
+\def\@outputdblcol{%
+ \if@firstcolumn
+ \global\@firstcolumnfalse
+% \end{macrocode}
+% Save the left column
+% \begin{macrocode}
+ \global\setbox\@leftcolumn\copy\@outputbox
+%<fltrace> \fl@trace{PAGE: first column boxed}%
+% \end{macrocode}
+%
+% Remember the marks from the first column
+% \begin{macrocode}
+ \splitmaxdepth\maxdimen
+ \vbadness\maxdimen
+% \end{macrocode}
+% In case of |\enlargethispage| we will have infinite negative glue
+% at the bottom of the page (coming from |\vss|) and that will earn
+% us an error message if we |\vsplit| to get at the marks. So we
+% need to remove the last glue (if any) at the end of |\@outputbox|
+% as we are only interested in marks that change doesn't matter.
+% \changes{v1.1o}{2014/04/18}{Handle infinite glue from
+% \cs{enlargethispage} (pr/4023)}
+% \begin{macrocode}
+ \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
+ \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+% \end{macrocode}
+%
+% One minor difference from the current |fixmarks| package, pass the
+% marks through a token register to stop any |#| tokens causing an
+% error in a |\def|.
+% \begin{macrocode}
+ \toks@\expandafter{\topmark}%
+ \xdef\@firstcoltopmark{\the\toks@}%
+ \toks@\expandafter{\splitfirstmark}%
+ \xdef\@firstcolfirstmark{\the\toks@}%
+% \end{macrocode}
+%
+% This test does not work if truly empty marks have been inserted, but
+% \LaTeX\ marks should always have (at least) two brace groups.
+% (Except before the first mark is used, when the marks are empty,
+% but that is OK here.)
+% \begin{macrocode}
+ \ifx\@firstcolfirstmark\@empty
+ \global\let\@setmarks\relax
+ \else
+ \gdef\@setmarks{%
+ \let\firstmark\@firstcolfirstmark
+ \let\topmark\@firstcoltopmark}%
+ \fi
+% \end{macrocode}
+%
+% End of change
+% \begin{macrocode}
+ \else
+ \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{%
+ \hb@xt@\textwidth{%
+ \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hfil
+% \end{macrocode}
+% \changes{v1.1m}{2006/09/13}{Ensure that rule is in \cs{normalcolor}}
+% The color of the \cs{vrule} should be \cs{normalcolor} as to not
+% inherit the color from the column.
+% \begin{macrocode}
+ {\normalcolor\vrule \@width\columnseprule}%
+ \hfil
+ \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
+%<fltrace> \fl@trace{PAGE: second column also boxed}%
+ \@combinedblfloats
+% \end{macrocode}
+% Override current first and top with those of first column if necessary
+% \begin{macrocode}
+ \@setmarks
+% \end{macrocode}
+% End of change
+% \begin{macrocode}
+ \@outputpage
+%<fltrace> \fl@trace{PAGE: two column page completed}%
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi{\@outputpage
+%<fltrace> \fl@trace{PAGE: double float page completed}%
+ \@startdblcolumn}%
+ \endgroup
+ \fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
+%<latexrelease|fltrace>\def\@outputdblcol{%
+%<latexrelease|fltrace> \if@firstcolumn
+%<latexrelease|fltrace> \global \@firstcolumnfalse
+%<latexrelease|fltrace> \global \setbox\@leftcolumn \box\@outputbox
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{PAGE: first column boxed}%
+%</trace>
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \global \@firstcolumntrue
+%<latexrelease|fltrace> \setbox\@outputbox \vbox {%
+%<latexrelease|fltrace> \hb@xt@\textwidth {%
+%<latexrelease|fltrace> \hb@xt@\columnwidth {%
+%<latexrelease|fltrace> \box\@leftcolumn \hss}%
+%<latexrelease|fltrace> \hfil
+%<latexrelease|fltrace> {\normalcolor\vrule
+%<latexrelease|fltrace> \@width\columnseprule}%
+%<latexrelease|fltrace> \hfil
+%<latexrelease|fltrace> \hb@xt@\columnwidth {%
+%<latexrelease|fltrace> \box\@outputbox \hss}%
+%<latexrelease|fltrace> }%
+%<latexrelease|fltrace> }%
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{PAGE: second column also boxed}%
+%</trace>
+%<latexrelease|fltrace> \@combinedblfloats
+%<latexrelease|fltrace> \@outputpage
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{PAGE: two column page completed}%
+%</trace>
+%<latexrelease|fltrace> \begingroup
+%<latexrelease|fltrace> \@dblfloatplacement
+%<latexrelease|fltrace> \@startdblcolumn
+% \end{macrocode}
+% This loop could be replaced by an |\expandafter| tail
+% recursion in\\ |\@startdblcolumn|.
+% \begin{macrocode}
+%<latexrelease|fltrace> \@whilesw\if@fcolmade \fi
+%<latexrelease|fltrace> {\@outputpage
+%<*trace>
+%<latexrelease|fltrace> \fl@trace{PAGE: double float page completed}%
+%</trace>
+%<latexrelease|fltrace> \@startdblcolumn}%
+%<latexrelease|fltrace> \endgroup
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
+%</2ekernel|fltrace|latexrelease>
+% \end{macrocode}
+%
+% \subsubsection{Float placement parameters}
+% \changes{v1.0i}{1993/12/14}{Section added to declare all parameters}
+%
+% The main purpose of this section is to ensure that all the
+% float-placement parameters which need to be set in a class file or
+% package have been declared. It also describes their use and sets
+% values for them which are reasonable for typical documents using
+% US letter or A4 sized paper.
+%
+% \paragraph{Limits for the placement of floating objects}
+%
+% \begin{macro}{\c@topnumber}
+% This counter holds the maximum number of
+% floats that can appear at the top of a text page or column.
+% \begin{macrocode}
+%<*2ekernel>
+\newcount\c@topnumber
+\setcounter{topnumber}{2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\topfraction}
+% This macro holds the maximum proportion (as a decimal number) of
+% a text page or column that can be occupied by floats at the top.
+% \begin{macrocode}
+\newcommand\topfraction{.7}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@bottomnumber}
+% This counter holds the maximum number of
+% floats that can appear at the bottom of a text page or column.
+% \begin{macrocode}
+\newcount\c@bottomnumber
+\setcounter{bottomnumber}{1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bottomfraction}
+% This macro holds the maximum proportion (as a decimal number) of
+% a text page or column that can be occupied by floats at the bottom.
+% \begin{macrocode}
+\newcommand\bottomfraction{.3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@totalnumber}
+% This counter holds the maximum number of floats that can appear on
+% any text page or column.
+% \begin{macrocode}
+\newcount\c@totalnumber
+\setcounter{totalnumber}{3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textfraction}
+% This macro holds the minimum proportion (as a decimal number) of
+% a text page or column that must be occupied by text.
+% \begin{macrocode}
+\newcommand\textfraction{.2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\floatpagefraction}
+% This macro holds the minimum proportion (as a decimal number) of
+% a page or column that must be occupied by floating objects before a
+% `float page' is produced.
+% \begin{macrocode}
+\newcommand\floatpagefraction{.5}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@dbltopnumber}
+% This counter holds the maximum number of double-column floats that
+% can appear on the top of a two-column text page.
+% \begin{macrocode}
+\newcount\c@dbltopnumber
+\setcounter{dbltopnumber}{2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dbltopfraction}
+% This macro holds the maximum proportion (as a decimal number) of
+% a two-column text page that can be occupied by double-column floats
+% at the top.
+% \begin{macrocode}
+\newcommand\dbltopfraction{.7}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dblfloatpagefraction}
+% This macro holds the minimum proportion (as a decimal number) of
+% a page that must be occupied by double-column floating objects
+% before a `double-column float page' is produced.
+% \begin{macrocode}
+\newcommand\dblfloatpagefraction{.5}
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Floats on a text page}
+%
+% \begin{macro}{\floatsep}
+% \begin{macro}{\textfloatsep}
+% \begin{macro}{\intextsep}
+% When a floating object is placed on a page with text, these
+% parameters control the separation between the float and the other
+% objects on the page. These parameters are used for both
+% one-column mode and single-column floats in two-column mode.
+% They are all rubber lengths.
+%
+% |\floatsep| is the space between adjacent floats that are placed
+% at the top or bottom of the text page or column.
+%
+% |\textfloatsep| is the space between the main text and floats
+% at the top or bottom of the page or column.
+%
+% |\intextsep| is the space between in-text floats and the text.
+% \begin{macrocode}
+\newskip\floatsep
+\newskip\textfloatsep
+\newskip\intextsep
+\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\dblfloatsep}
+% \begin{macro}{\dbltextfloatsep}
+% When double-column floats (floating objects that span the whole
+% |\textwidth|) are placed at the top of a text page in two-column
+% mode, the separation between the float and the text is controlled
+% by |\dblfloatsep| and |\dbltextfloatsep|. They are rubber lengths.
+%
+% |\dblfloatsep| is the space between adjacent double-column floats
+% placed at the top of the text page.
+%
+% |\dbltextfloatsep| is the space between the main text and
+% double-column floats at the top of the page.
+% \begin{macrocode}
+\newskip\dblfloatsep
+\newskip\dbltextfloatsep
+\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \paragraph{Floats on their own page or column}
+%
+% \begin{macro}{\@fptop}
+% \begin{macro}{\@fpsep}
+% \begin{macro}{\@fpbot}
+% When floating objects are placed on a separate page or column,
+% called a `float page', the layout of the page is controlled by
+% these parameters, which are rubber lengths.
+%
+% At the top of the page |\@fptop| is inserted;
+% typically this supplies some stretchable whitespace.
+% At the bottom of the page |\@fpbot| ais inserted.
+% Between adjacent floats |\@fpsep| is inserted.
+%
+% These parameters are used for all floating objects on a
+% `float page' in one-column mode, and for single-column
+% floats in two-column mode.
+%
+% Note that at least one of the two parameters |\@fptop| and
+% |\@fpbot| should contain a |plus ...fil| so as to fill the
+% remaining empty space.
+% \begin{macrocode}
+\newskip\@fptop
+\newskip\@fpsep
+\newskip\@fpbot
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@dblfptop}
+% \begin{macro}{\@dblfpsep}
+% \begin{macro}{\@dblfpbot}
+% Double-column `float pages' in two-column mode use similar
+% parameters.
+% \begin{macrocode}
+\newskip\@dblfptop
+\newskip\@dblfpsep
+\newskip\@dblfpbot
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\topfigrule}
+% \begin{macro}{\botfigrule}
+% \begin{macro}{\dblfigrule}
+% The macros can be used to put in rules between floats and text;
+% whatever they insert should be vertical mode material which takes
+% up zero space.
+% \task{CAR}{Add more rules (for Frank in addtocurcol)}
+% \begin{macrocode}
+\let\topfigrule=\relax
+\let\botfigrule=\relax
+\let\dblfigrule=\relax
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/ltpage.dtx b/macros/latex-dev/base/ltpage.dtx
new file mode 100644
index 0000000000..4d5601556d
--- /dev/null
+++ b/macros/latex-dev/base/ltpage.dtx
@@ -0,0 +1,334 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltpage.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltpage.dtx}
+ [2000/06/02 v1.0k LaTeX Kernel (page style setup)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltpage.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Page styles and related commands}
+%
+%
+% \changes{v1.0a}{1994/03/07}{Initial version, split from ltherest.dtx}
+% \changes{v1.0b}{1994/04/19}{Improve documentation}
+% \changes{v1.0i}{1996/04/18}{Improve documentation}
+%
+%
+% \subsection{Page Style Commands}
+%
+% |\pagestyle|\marg{style} : sets the page style of the
+% current and succeeding pages to \emph{style}
+%
+% |\thispagestyle|\marg{style} : sets the page style of the
+% current page only to \emph{style}.
+%
+% To define a page style \emph{style}, you must define
+% |\ps@|\emph{style} to set the page style parameters.
+%
+% \subsection{How a page style makes running heads and feet}
+%
+% The |\ps@|\ldots command defines the macros |\@oddhead|, |\@oddfoot|,
+% |\@evenhead|, and |\@evenfoot| to define the running heads and feet.
+% (See output routine.) To make headings determined by the sectioning
+% commands, the page style defines the commands |\chaptermark|,
+% |\sectionmark|, etc., where |\chaptermark|\marg{text} is called by
+% |\chapter| to set a mark. The |\...mark| commands and the |\...head|
+% macros are defined with the help of the following macros.
+%
+% (All the |\...mark| commands should be initialized to no-ops.)
+%
+% \subsection{marking conventions}
+%
+% \LaTeX\ extends \TeX's |\mark| facility by producing two kinds of marks
+% a `left' and a `right' mark, using the following commands:\\
+% |\markboth|\marg{left}\marg{right} : Adds both marks.\\
+% |\markright|\marg{right} : Adds a 'right' mark.\\
+% |\leftmark| :
+% Used in the output routine, gets the current `left' mark.
+% Works like \TeX's |\botmark.|\\
+% |\rightmark| :
+% Used in the output routine, gets the current `right' mark.
+% Works like \TeX's |\firstmark|.
+% The marking commands work reasonably well for right marks `numbered
+% within' left marks---e.g., the left mark is changed by a |\chapter|
+% command and the right mark is changed by a |\section| command.
+% However, it does produce somewhat anomalous results if 2 |\markboth|'s
+% occur on the same page.
+%
+% Commands like |\tableofcontents| that should set the marks in some
+% page styles use a |\@mkboth| command, which is |\let| by the pagestyle
+% command (|\ps@...|) to |\markboth| for setting the heading or to
+% |\@gobbletwo| to do nothing.
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macro}{\pagestyle}
+% User command to set the page style for this and following pages.
+% \changes{LaTeX2e}{1994/01/24}
+% {(DPC) Complain if pagestyle is undefined.}
+% \changes{LaTeX2e}{1994/02/01}
+% {(DPC) Modify to get nicer error message}
+% \begin{macrocode}
+\def\pagestyle#1{%
+ \@ifundefined{ps@#1}%
+ \undefinedpagestyle
+ {\@nameuse{ps@#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thispagestyle}
+% User command to set the page style for this page only.
+% \changes{LaTeX2e}{1994/02/01}
+% {(DPC) Modify to get nicer error message}
+% \begin{macrocode}
+\def\thispagestyle#1{%
+ \@ifundefined{ps@#1}%
+ \undefinedpagestyle
+ {\global\@specialpagetrue\gdef\@specialstyle{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ps@empty}
+% The empty page style: No head or foot line.
+% \begin{macrocode}
+\def\ps@empty{%
+ \let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@oddfoot\@empty
+ \let\@evenhead\@empty\let\@evenfoot\@empty}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ps@plain}
+% \changes{v1.0g}{1995/05/26}{removed \cs{rmfamily} (PR 1578)}
+% The plain page style: No head, centred page number in foot.
+% \begin{macrocode}
+\def\ps@plain{\let\@mkboth\@gobbletwo
+ \let\@oddhead\@empty\def\@oddfoot{\reset@font\hfil\thepage
+ \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@leftmark}
+% \begin{macro}{\@rightmark}
+% We implement |\@leftmark| and |\@rightmark| in terms of already
+% defined commands to save token space. We can't get rid of them
+% since they are sometimes used in applications.
+% \begin{macrocode}
+\let\@leftmark\@firstoftwo
+\let\@rightmark\@secondoftwo
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\markboth}
+% \begin{macro}{\markright}
+% \changes{v1.0d}{1994/05/20}{Changed setting for \cs{protect}.}
+% \changes{v1.0e}{1994/11/04}{Added \cs{@unexpandable@protect}.
+% ASAJ.}
+%
+% User commands for setting \LaTeX\ marks.
+%
+% Test for |\@nobreak| added 15 Apr 86 in |\markboth| and |\markright|
+% letting |\label| and |\index| to |\relax| added 22 Feb 86 so these
+% commands can appear in sectioning command arguments
+% RmS 91/06/21 Same for |\glossary|
+% \changes{v1.0k}{2000/06/02}{Tidied 1.0j reimplementation, CAR}
+% \changes{v1.0k}{2000/06/02}{Small adjustment to give slightly less
+% expansion, CAR}
+% \changes{v1.0j}{2000/05/26}{Reimplementation to fix expansion
+% error (pr/3203).}
+% \begin{macrocode}
+\def\markboth#1#2{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \unrestored@protected@xdef\@themark {{#1}{#2}}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi}
+\def\markright#1{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+% \end{macrocode}
+% Protection is handled inside |\@markright|.
+% \begin{macrocode}
+ \expandafter\@markright\@themark {#1}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@markright}
+% \changes{v1.0j}{2000/05/26}{Reimplementation to fix expansion
+% error (pr/3203).}
+% \changes{v1.0k}{2000/06/02}{Small adjustment to give slightly less
+% expansion, CAR}
+% \begin{macro}{\leftmark}
+% \changes{v1.0j}{2000/05/26}{Use \cs{@empty} instead of brace group
+% (pr/3203).}
+% \begin{macro}{\rightmark}
+% \changes{LaTeX2e}{1993/12/17}{Stopgap solution to mark \cs{leftmark}
+% and \cs{rightmark} work without initializing mark until
+% the problem is solved.}
+% \changes{v1.0j}{2000/05/26}{Use \cs{@empty} instead of brace group
+% (pr/3203).}
+% \task{???}{mark initialisation solved?}
+% \begin{macrocode}
+\def\@markright#1#2#3{\@temptokena {#1}%
+ \unrestored@protected@xdef\@themark{{\the\@temptokena}{#3}}}
+\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
+\def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@themark}
+% Initialise \LaTeX's marks without setting a \TeX\ mark \meta{whatsit}.
+% \begin{macrocode}
+\def\@themark{{}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mark}
+% Test versions of \LaTeXe\ initialised \TeX's |\mark| system
+% at this point, but this was removed before the first release.
+% \changes{LaTeX2e}{1993/12/16}{Init \cs{mark} at begin document}
+% \changes{LaTeX2e}{1993/12/17}{Removed init \cs{mark} at begin
+% document, since it doesn't work.}
+%\begin{verbatim}
+%\AtBeginDocument{\mark{{}{}}}
+%\end{verbatim}
+% \end{macro}
+%
+%
+% \begin{macro}{\raggedbottom}
+% |\raggedbottom| typesets pages with no vertical stretch, so they have
+% their natural height instead of all being exactly the
+% same height. (Uses a space of .0001fil to avoid
+% interfering with the 1fil space of |\newpage|.)
+%
+% \begin{macrocode}
+\def\raggedbottom{%
+ \def\@textbottom{\vskip \z@ \@plus.0001fil}\let\@texttop\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flushbottom}
+% |\flushbottom|:
+% Inverse of |\raggedbottom| --- makes all pages the same height.
+% \begin{macrocode}
+\def\flushbottom{%
+ \let\@textbottom\relax \let\@texttop\relax}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\sloppy}
+% |\sloppy| will never (well, hardly ever) produce overfull boxes, but
+% may produce underfull ones. (14 June 85)
+% \changes{LaTeX2e}{1993/12/18}{Added \cs{emergencystretch}}
+% \changes{v1.0h}{1994/07/20}{Save a few tokens}
+% \begin{macrocode}
+\def\sloppy{%
+ \tolerance 9999%
+ \emergencystretch 3em%
+ \hfuzz .5\p@
+ \vfuzz\hfuzz}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{sloppypar}
+% A sloppypar environment is equivalent to |{\par \sloppy ... \par}|.
+% \begin{macrocode}
+\def\sloppypar{\par\sloppy}
+\def\endsloppypar{\par}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\fussy}
+% \changes{v1.0f}{1995/04/24}{reset \cs{emergencystretch} latex/1344}
+% Resets \TeX's parameters to their normal finicky values.
+% \begin{macrocode}
+\def\fussy{%
+ \emergencystretch\z@
+ \tolerance 200%
+ \hfuzz .1\p@
+ \vfuzz\hfuzz}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\overfullrule}
+% \LaTeX\ default is no overfull box rule. Changed by document
+% class option.
+% \begin{macrocode}
+\overfullrule 0pt
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltpageno.dtx b/macros/latex-dev/base/ltpageno.dtx
new file mode 100644
index 0000000000..da1d574b15
--- /dev/null
+++ b/macros/latex-dev/base/ltpageno.dtx
@@ -0,0 +1,101 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltpageno.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltpageno.dtx}
+ [1994/05/19 v1.1a LaTeX Kernel (Page Numbering)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltpageno.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0c}{1994/03/29}
+% {Create file ltcntlen from parts of ltmiscen and ltherest.}
+% \changes{v1.1a}{1994/05/19}
+% {Extract file ltpageno from ltcntlen.}
+%
+% \section{Page Numbering}
+% Page numbers are produced by a page counter, used just like any other
+% counter. The only difference is that |\c@page| contains the number of
+% the next page to be output (the one currently being produced), rather
+% than one minus it. Thus, it is normally initialized to~1 rather
+% than~0. |\c@page| is defined to be |\count0|, rather than a count
+% assigned by |\newcount|.
+%
+% \DescribeMacro{\pagenumbering}
+% The user sets the pagenumber style with the |\pagenumbering|\marg{foo}
+% command, which sets the page counter to 1 and defines |\thepage| to be
+% |\foo|. For example, |\pagenumbering{roman}| causes pages to be
+% numbered i, ii, etc.
+%
+%
+% \StopEventually{}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{page nos.,}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\countdef\c@page=0 \c@page=1
+\def\cl@page{}
+\def\pagenumbering#1{%
+ \global\c@page \@ne \gdef\thepage{\csname @#1\endcsname
+ \c@page}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltpar.dtx b/macros/latex-dev/base/ltpar.dtx
new file mode 100644
index 0000000000..3b72b43a9c
--- /dev/null
+++ b/macros/latex-dev/base/ltpar.dtx
@@ -0,0 +1,181 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltpar.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltpar.dtx}
+ [1995/04/29 v1.1c LaTeX Kernel (paragraphs)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltpar.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Tobias Oetiker \thanks{Tobi did the documentation update}\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.1b}{1995/04/29}{(TO) Comments clean-up.}
+%
+% \section{Paragraphs}
+%
+% This section of the kernel declares the commands used to set
+% |\par| and |\everypar| when ever their function needs to be
+% changed for a long time.
+%
+% \StopEventually{}
+%
+% \subsection{Implementation}
+%
+%
+% There are two situations in which |\par| may be changed:
+%
+% \begin{itemize}
+% \item Long-term changes, in which the new value is to remain in effect
+% until the current environment is left. The environments that
+% change |\par| in this way are the following:
+% \begin{itemize}
+% \item All list environments (itemize, quote, etc.)
+% \item Environments that turn |\par| into a noop:
+% tabbing, array and tabular.
+% \end{itemize}
+% \item Temporary changes, in which |\par| is restored to its previous
+% value the next time it is executed. The following are all such uses.
+% \begin{itemize}
+% \item |\end| when preceded by |\@endparenv|, which is called by
+% |\endtrivlist|
+% \item The mechanism for avoiding page breaks and getting the
+% spacing right after section heads.
+% \end{itemize}
+% \end{itemize}
+%
+% \DescribeMacro{\@setpar}
+% To permit the proper interaction of these two situations, long-term
+% changes are made by the |\@setpar{|\meta{VAL}|}| command.
+% It's function is:
+% \begin{quote}
+% To set |\par|. It |\def|'s |\par| and |\@par| to \meta{VAL}.
+% \end{quote}
+%
+% \DescribeMacro{\@restorepar}
+% Short-term changes are made by the usual |\def\par| commands.
+% The original values are restored after a short-term change
+% by the |\@restorepar| commands.
+%
+% \DescribeMacro{\@@par}
+% |\@@par| always is defined to be the original \TeX{} |\par|.
+%
+% \DescribeMacro{\everypar}
+% |\everypar| is changed only for the short term. Whenever |\everypar|
+% is set non-null, it should restore itself to null when executed.
+%
+% The following commands change |\everypar| in this way:
+% \begin{itemize}
+% \item |\item|
+% \item |\end| when preceded by |\@endparenv|, which is called by
+% |endtrivlist|
+% \item |\minipage|
+% \end{itemize}
+%
+% When dealing with |\par| and |\everypar| remember the following two
+% warnings:
+% \begin{enumerate}
+% \item Commands that make short-term changes to |\par| and |\everypar|
+% must take account of the possibility that the new commands and the
+% ones that do the restoration may be executed inside a group. In
+% particular, |\everypar| is executed inside a group whenever a new
+% paragraph begins with a left brace. The |\everypar| command
+% that restores its definition should be local to the current
+% group (in case the command
+% is inside a minipage used inside someplace where |\everypar| has
+% been redefined). Thus, if |\everypar| is redefined to do an
+% |\everypar{}| it could take several executions of |\everypar|
+% before the restoration ``holds''. This usually causes no problem.
+% However, to prevent the extra executions from doing harm,
+% use a global switch to keep anything harmful in the new
+% |\everypar| from being done twice.
+% \item Commands that change |\everypar| should remember that
+% |\everypar| might be supposed to set the following switches false:
+% \begin{itemize}
+% \item |@nobreak|
+% \item |@minipage|
+% \end{itemize}
+% they should do the setting if necessary.
+% \end{enumerate}
+% \begin{macrocode}
+%<*2ekernel>
+\message{par,}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\@setpar}
+% \begin{macro}{\@par}
+% Initiate a long-term change to |\par|.
+% \begin{macrocode}
+\def\@setpar#1{\def\par{#1}\def\@par{#1}}
+% \end{macrocode}
+%
+% The default definition of |\@par| will ensure that if
+% |\@restorepar| defines |\par| to execute |\@par| it will redefine
+% itself to the primitive |\@@par| after one iteration.
+% \begin{macrocode}
+\def\@par{\let\par\@@par\par}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@restorepar}
+% Restore from a short-term change to |\par|.
+% \begin{macrocode}
+\def\@restorepar{\def\par{\@par}}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput
+
diff --git a/macros/latex-dev/base/ltpictur.dtx b/macros/latex-dev/base/ltpictur.dtx
new file mode 100644
index 0000000000..6b84231ab5
--- /dev/null
+++ b/macros/latex-dev/base/ltpictur.dtx
@@ -0,0 +1,1542 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltpictur.dtx
+%<*driver>
+% \fi
+ \ProvidesFile{ltpictur.dtx}
+ [2016/03/29 v1.1l LaTeX Kernel (Picture Mode)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltpictur.dtx}
+\title{\filename}
+\date{\filedate}
+\author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0g}{1995/05/07}{Use \cs{hb@xt@}}
+% \changes{v1.1a}{1995/05/19}{Support autoloading feature}
+% \changes{v1.1b}{1995/06/13}{Use \cs{ProvidesFile} in autoload}
+% \changes{v1.1d}{1995/07/12}{allow 2e commands in 209 mode. latex/1737}
+% \changes{v1.1e}{1995/10/03}{New autoload code}
+% \changes{v1.1h}{1999/04/15}{Replaced octal numbers, CAR}
+% \changes{v1.1k}{2015/02/21}{Removed autoload code}
+%
+% \section{Picture Mode}
+% Picture mode commands. In addition to the commands available in
+% \LaTeX2.09, This section adds the new |\qbezier| command for
+% drawing curves.
+%
+% \DescribeMacro{\qbezier}
+% |\qbezier|\oarg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}
+% plots a quadratic Bezier curve from \parg{AX,AY} to \parg{CX,CY},
+% with \parg{BX,BY} as the third Bezier point, using $N+1$ points
+% equally spaced parametrically.
+% If $N = 0$ (the default value), then a sufficient number of points
+% are used to draw a connected curve--except that at most
+% $|\qbeziermax| + 1$ points are drawn. A ``point'' is a square of
+% side |\@wholewidth|.
+%
+% \DescribeMacro{\bezier}
+% In addition, to be compatible with the old |bezier| package, a
+% variant of this command, |\bezier|, is defined, in which the first
+% argument is not optional.
+%
+% \StopEventually{}
+%
+%
+% \changes{v0.1a}{1994/03/07}{Initial version, split from latex.dtx}
+% \changes{v0.1a}{1994/03/07}{Long lines wrapped to 72 columns}
+% \changes{v0.1b}{1994/04/24}
+% {Removed surplus spaces after \cs{hbox to } in several cases}
+% \changes{v0.1d}{1994/05/13}
+% {Removed surplus braces from \cs{@if..} constructions}
+% \changes{v0.1e}{1994/05/22}{Use new warning cmds}
+% \changes{v1.0f}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+%
+% \begin{oldcomments}
+%
+% \unitlength = value of dimension argument
+% \@wholewidth = current line width
+% \@halfwidth = half of current line width
+% \@linefnt = font for drawing lines
+% \@circlefnt = font for drawing circles
+%
+% \linethickness{DIM} : Sets the width of horizontal and vertical lines
+% in a picture to DIM. Does not change width of slanted lines
+% or circles. Width of all lines reset by \thinlines and
+% \thicklines
+%
+% \picture(XSIZE,YSIZE)(XORG,YORG)
+% BEGIN
+% \@picht :=L YSIZE * \unitlength
+% box \@picbox :=
+% \hb@xt@ XSIZE * \unitlength
+% {\hskip -XORG * \unitlength
+% \lower YORG * \unitlength
+% \hbox{
+% \ignorespaces %% added 13 June 89
+% END
+%
+% \endpicture ==
+% BEGIN
+% } \hss }
+% height of \@picbox := \@picht
+% depth of \@picbox := 0
+% \mbox{\box\@picbox} %% change 26 Aug 91
+% END
+%
+% \put(X, Y){OBJ} ==
+% BEGIN
+% \@killglue
+% \raise Y * \unitlength \hb@xt@ 0pt { \hskip X * \unitlength
+% OBJ \hss }
+% \ignorespaces
+% END
+%
+% \multiput(X,Y)(DELX,DELY){N}{OBJ} ==
+% BEGIN
+% \@killglue
+% \@multicnt := N
+% \@xdim := X * \unitlength
+% \@ydim := Y * \unitlength
+% while \@multicnt > 0
+% do \raise \@ydim \hb@xt@ 0pt { \hskip \@xdim
+% OBJ \hss }
+% \@multicnt := \@multicnt - 1
+% \@xdim := \@xdim + DELX * \unitlength
+% \@ydim := \@ydim + DELY * \unitlength
+% od
+% \ignorespaces
+% END
+%
+% \shortstack[POS]{TEXT} : Makes a \vbox containing TEXT stacked as
+% a one-column array, positioned l, r or c as indicated by POS.
+%
+% \end{oldcomments}
+%
+% The `2ekernel' code ensures that a |\usepackage{autopict}| is
+% essentially ignored if a `full' format is being used that has
+% picture mode already in the format.
+% \begin{macrocode}
+%<2ekernel>\expandafter\let\csname ver@autopict.sty\endcsname\fmtversion
+% \end{macrocode}
+%
+% \begin{macro}{\@wholewidth}
+% \begin{macro}{\@halfwidth}
+% \begin{macrocode}
+%<*2ekernel>
+\newdimen\@wholewidth
+\newdimen\@halfwidth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\unitlength}
+% \begin{macrocode}
+\newdimen\unitlength \unitlength =1pt
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@picbox}
+% \begin{macro}{\@picht}
+% \begin{macrocode}
+\newbox\@picbox
+\newdimen\@picht
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\picture}
+% \changes{v0.1c}{1994/04/28}{(DPC) Ignore spaces before (}
+% |#1| should be white space.
+% \begin{macro}{\pictur@}
+% \changes{v1.0h}{1995/05/12}{Macro added for latex/1355}
+% |#1| should be a |(| (eating any white space before the bracket),
+% \begin{macrocode}
+\long\gdef\picture#1{\pictur@#1}
+\gdef\pictur@(#1){%
+ \@ifnextchar({\@picture(#1)}{\@picture(#1)(0,0)}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@picture}
+% \begin{macrocode}
+\gdef\@picture(#1,#2)(#3,#4){%
+ \@picht#2\unitlength
+ \setbox\@picbox\hb@xt@#1\unitlength\bgroup
+ \hskip -#3\unitlength
+ \lower #4\unitlength\hbox\bgroup
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\endpicture}
+% \changes{LaTeX2.09}{1991/08/26}
+% {(RmS \& FMi) extra boxing level around \cs{@picbox}
+% to guard against unboxing in math mode
+% (proposed by John Hobby)}
+%
+% \begin{macrocode}
+\gdef\endpicture{%
+ \egroup\hss\egroup
+ \ht\@picbox\@picht\dp\@picbox\z@
+ \mbox{\box\@picbox}}
+% \end{macrocode}
+% \end{macro}
+%
+% In the definitions of |\put| and |\multiput|, |\hskip| was replaced by
+% |\kern| just in case arg |#3| = ``plus''. (Bug detected by Don Knuth.
+% changed 20 Jul 87).
+%
+% \begin{macrocode}
+\long\gdef\put(#1,#2)#3{%
+ \@killglue\raise#2\unitlength
+ \hb@xt@\z@{\kern#1\unitlength #3\hss}%
+ \ignorespaces}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\multiput}
+% \changes{v0.1c}{1994/04/28}{(DPC) Ignore spaces between )(}
+% |#3| had better be a |(|.
+% \begin{macrocode}
+\gdef\multiput(#1,#2)#3{%
+ \@xdim #1\unitlength
+ \@ydim #2\unitlength
+ \@multiput(}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\multiput}
+% \changes{v0.1c}{1994/04/28}{(DPC) Macro added}
+% \begin{macrocode}
+\long\gdef\@multiput(#1,#2)#3#4{%
+ \@killglue\@multicnt #3\relax
+ \@whilenum \@multicnt >\z@\do
+ {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
+ \advance\@multicnt\m@ne
+ \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@killglue}
+% \begin{macrocode}
+\gdef\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thinlines}
+% \begin{macro}{\thicklines}
+% \begin{macrocode}
+\gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
+ \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
+\gdef\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
+ \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\linethickness}
+% \begin{macrocode}
+\gdef\linethickness#1{\@wholewidth #1\relax \@halfwidth .5\@wholewidth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ishortstack}
+% \begin{macrocode}
+\gdef\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ishortstack}
+% \begin{macrocode}
+\gdef\@shortstack[#1]{%
+ \leavevmode
+ \vbox\bgroup
+ \baselineskip-\p@\lineskip 3\p@
+ \let\mb@l\hss\let\mb@r\hss
+ \expandafter\let\csname mb@#1\endcsname\relax
+ \let\\\@stackcr
+ \@ishortstack}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{LaTeX2.09}{1991/08/14}
+% {(RmS) inserted extra braces around entry for NFSS}
+% \changes{LaTeX2.09}{1993/11/03}
+% {(RmS) changed \cs{halign} to \cs{ialign} to initialize
+% \cs{tabskip} and \cs{everycr}}
+%
+% \begin{macro}{\@ishortstack}
+% \begin{macrocode}
+\gdef\@ishortstack#1{\ialign{\mb@l {##}\unskip\mb@r\cr #1\crcr}\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@stackcr}
+% \begin{macro}{\@ixstackcr}
+% \begin{macrocode}
+\gdef\@stackcr{\@ifstar\@ixstackcr\@ixstackcr}
+\gdef\@ixstackcr{\@ifnextchar[\@istackcr{\cr\ignorespaces}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@istackcr}
+% \begin{macrocode}
+\gdef\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{oldcomments}
+% \line(X,Y){LEN} ==
+% BEGIN
+% \@xarg := X
+% \@yarg := Y
+% \@linelen := LEN * \unitlength
+% if \@xarg = 0
+% then \@vline
+% else if \@yarg = 0
+% then \@hline
+% else \@sline
+% if
+% if
+% END
+%
+% \@sline ==
+% BEGIN
+% if \@xarg < 0
+% then @negarg := T
+% \@xarg := -\@xarg
+% \@yyarg := -\@yarg
+% else @negarg := F
+% \@yyarg := \@yarg
+% fi
+% \@tempcnta := |\@yyarg|
+% if \@tempcnta > 6
+% then error: 'LATEX ERROR: Illegal \line or \vector argument.'
+% \@tempcnta := 0
+% fi
+% \box\@linechar := \hbox{\@linefnt \@getlinechar(\@xarg,\@yyarg) }
+% if \@yarg > 0 then \@upordown = \raise
+% \@clnht := 0
+% else \@upordown = \lower
+% \@clnht := height of \box\@linechar
+% fi
+% \@clnwd := width of \box\@linechar
+% if @negarg
+% then \hskip - width of \box\@linechar
+% \reserved@a == \hskip - 2* width of box \@linechar
+% else \reserved@a == \relax
+% fi
+% %% Put out integral number of line segments
+% while \@clnwd < \@linelen
+% do \@upordown \@clnht \copy\@linechar
+% \reserved@a
+% \@clnht := \@clnht + ht of \box\@linechar
+% \@clnwd := \@clnwd + width of \box\@linechar
+% od
+%
+% %% Put out last segment
+% \@clnht := \@clnht - height of \box\@linechar
+% \@clnwd := \@clnwd - width of \box\@linechar
+% \@tempdima := \@linelen - \@clnwd
+% \@tempdimb := \@tempdima - width of \box\@linechar
+% if @negarg then \hskip -\@tempdimb
+% else \hskip \@tempdimb
+% fi
+% \@tempdima := 1000 * \@tempdima
+% \@tempcnta := \@tempdima / width of \box\@linechar
+% \@tempdima := (\@tempcnta * ht of \box\@linechar)/1000
+% \@clnht := \@clnht + \@tempdima
+% if \@linelen < width of box\@linechar
+% then \hskip width of box\@linechar
+% else \hbox{\@upordown \@clnht \copy\@linechar}
+% fi
+% END
+%
+% \@hline ==
+% BEGIN
+% if \@xarg < 0 then \hskip -\@linelen \fi
+% \vrule height \@halfwidth depth \@halfwidth width \@linelen
+% if \@xarg < 0 then \hskip -\@linelen \fi
+% END
+%
+% \@vline == if \@yarg < 0 \@downline else \@upline fi
+%
+%
+% \@getlinechar(X,Y) ==
+% BEGIN
+% \@tempcnta := 8*X - 9
+% if Y > 0
+% then \@tempcnta := \@tempcnta + Y
+% else \@tempcnta := \@tempcnta - Y + 64
+% fi
+% \char\@tempcnta
+% END
+%
+% \vector(X,Y){LEN} ==
+% BEGIN
+% \@xarg := X
+% \@yarg := Y
+% \@linelen := LEN * \unitlength
+% if \@xarg = 0
+% then \@vvector
+% else if \@yarg = 0
+% then \@hvector
+% else \@svector
+% if
+% if
+% END
+%
+% \@hvector ==
+% BEGIN
+% \@hline
+% {\@linefnt if \@xarg < 0 then \@getlarrow(1,0)
+% else \@getrarrow(1,0)
+% fi}
+% END
+%
+% \@vvector == if \@yarg < 0 \@downvector else \@upvector fi
+%
+% \@svector ==
+% BEGIN
+% \@sline
+% \@tempcnta := |\@yarg|
+% if \@tempcnta < 5
+% then \hskip - width of \box\@linechar
+% \@upordown \@clnht \hbox
+% {\@linefnt
+% if @negarg then \@getlarrow(\@xarg,\@yyarg)
+% else \@getrarrow(\@xarg,\@yyarg)
+% fi }
+% else error: 'LATEX ERROR: Illegal \line or \vector argument.'
+% fi
+% END
+%
+% \@getlarrow(X,Y) ==
+% BEGIN
+% if Y = 0
+% then \@tempcnta := '33
+% else \@tempcnta := 16 * X - 9
+% \@tempcntb := 2 * Y
+% if \@tempcntb > 0
+% then \@tempcnta := \@tempcnta + \@tempcntb
+% else \@tempcnta := \@tempcnta - \@tempcntb + 64
+% fi
+% fi
+% \char\@tempcnta
+% END
+%
+% \@getrarrow(X,Y) ==
+% BEGIN
+% \@tempcntb := |Y|
+% case of \@tempcntb
+% 0 : \@tempcnta := '55
+% 1 : if X < 3
+% then \@tempcnta := 24*X - 6
+% else if X = 3
+% then \@tempcnta := 49
+% else \@tempcnta := 58 fi
+% fi
+% 2 : if X < 3
+% then \@tempcnta := 24*X - 3
+% else \@tempcnta := 51 % X must = 3
+% fi
+% 3 : \@tempcnta := 16*X - 2
+% 4 : \@tempcnta := 16*X + 7
+% endcase
+% if Y < 0
+% then \@tempcnta := \@tempcnta + 64
+% fi
+% \char\@tempcnta
+% END
+% \end{oldcomments}
+%
+% \begin{macro}{\if@negarg}
+% \begin{macrocode}
+\newif\if@negarg
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\line}
+% \begin{macrocode}
+\gdef\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+ \@linelen #3\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \ifnum\@xarg =\z@ \@vline
+ \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@sline}
+% \begin{macrocode}
+\gdef\@sline{%
+ \ifnum\@xarg<\z@ \@negargtrue \@xarg -\@xarg \@yyarg -\@yarg
+ \else \@negargfalse \@yyarg \@yarg \fi
+\ifnum \@yyarg >\z@ \@tempcnta\@yyarg \else \@tempcnta -\@yyarg \fi
+\ifnum\@tempcnta>6 \@badlinearg\@tempcnta\z@ \fi
+\ifnum\@xarg>6 \@badlinearg\@xarg \@ne \fi
+\setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}%
+% \end{macrocode}
+% If we have something like |\line(5,5){30}| the |\@linechar| will
+% not contain a char and later on we will end in an infinite loop.
+% So we check the width of the box and put in something as an
+% emergency fix if necessary.
+% \changes{v1.1k}{2003/08/27}{check for \cs{@linechar} being empty pr/3570}
+% \begin{macrocode}
+\ifdim\wd\@linechar=\z@
+ \setbox\@linechar\hbox{.}%
+ \@badlinearg
+\fi
+\ifnum \@yarg >\z@ \let\@upordown\raise \@clnht\z@
+ \else\let\@upordown\lower \@clnht \ht\@linechar\fi
+\@clnwd \wd\@linechar
+\if@negarg
+ \hskip -\wd\@linechar \def\reserved@a{\hskip -2\wd\@linechar}%
+\else
+ \let\reserved@a\relax
+\fi
+\@whiledim \@clnwd <\@linelen \do
+ {\@upordown\@clnht\copy\@linechar
+ \reserved@a
+ \advance\@clnht \ht\@linechar
+ \advance\@clnwd \wd\@linechar}%
+\advance\@clnht -\ht\@linechar
+\advance\@clnwd -\wd\@linechar
+\@tempdima\@linelen\advance\@tempdima -\@clnwd
+\@tempdimb\@tempdima\advance\@tempdimb -\wd\@linechar
+\if@negarg \hskip -\@tempdimb \else \hskip \@tempdimb \fi
+\multiply\@tempdima \@m
+\@tempcnta \@tempdima
+\@tempdima \wd\@linechar \divide\@tempcnta \@tempdima
+\@tempdima \ht\@linechar \multiply\@tempdima \@tempcnta
+\divide\@tempdima \@m
+\advance\@clnht \@tempdima
+\ifdim \@linelen <\wd\@linechar
+ \hskip \wd\@linechar
+% \end{macrocode}
+% Warn if line gets so short that it can't be printed.
+% \changes{v1.1g}{1997/09/15}{Warn if lines become invisible pr/2524}
+% But don't warn if it is exactly zero since that was probably
+% deliberate (e.g., to get a vector head only).
+% \changes{v1.1j}{2001/06/04}{Don't warn for exactly zero pr/3318}
+% \begin{macrocode}
+ \ifdim \@linelen = \z@
+ \else
+ \@picture@warn
+ \fi
+ \else\@upordown\@clnht\copy\@linechar\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@hline}
+% \begin{macrocode}
+\gdef\@hline{\ifnum \@xarg <\z@ \hskip -\@linelen \fi
+\vrule \@height \@halfwidth \@depth \@halfwidth \@width \@linelen
+\ifnum \@xarg <\z@ \hskip -\@linelen \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@getlinechar}
+% \begin{macrocode}
+\gdef\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8%
+ \advance\@tempcnta -9\ifnum #2>\z@ \advance\@tempcnta #2\relax\else
+ \advance\@tempcnta -#2\relax\advance\@tempcnta 64 \fi
+ \char\@tempcnta}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vector}
+% \begin{macrocode}
+\gdef\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+ \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
+ \ifnum\@tempcnta<5\relax
+ \@linelen #3\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \ifnum\@xarg =\z@ \@vvector
+ \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
+ \fi
+ \fi
+ \else\@badlinearg\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@hvector}
+% \begin{macrocode}
+\gdef\@hvector{\@hline\hb@xt@\z@{\@linefnt
+ \ifnum \@xarg <\z@ \@getlarrow(1,0)\hss\else
+ \hss\@getrarrow(1,0)\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@vvector}
+% \begin{macrocode}
+\gdef\@vvector{\ifnum \@yarg <\z@ \@downvector \else \@upvector \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@svector}
+% \begin{macrocode}
+\gdef\@svector{\@sline
+ \@tempcnta\@yarg \ifnum\@tempcnta <\z@ \@tempcnta -\@tempcnta\fi
+ \ifnum\@tempcnta <5%
+ \hskip -\wd\@linechar
+ \@upordown\@clnht \hbox{\@linefnt \if@negarg
+ \@getlarrow(\@xarg,\@yyarg)\else \@getrarrow(\@xarg,\@yyarg)\fi}%
+ \else\@badlinearg\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@getlarrow}
+% \changes{v1.1h}{1999/04/15}{Replaced octal number, CAR}
+% \begin{macrocode}
+\gdef\@getlarrow(#1,#2){\ifnum #2=\z@ \@tempcnta 27 % '33
+ \else
+ \@tempcnta #1\relax\multiply\@tempcnta \sixt@@n
+ \advance\@tempcnta -9 \@tempcntb #2\relax\multiply\@tempcntb \tw@
+ \ifnum \@tempcntb >\z@ \advance\@tempcnta \@tempcntb
+ \else\advance\@tempcnta -\@tempcntb\advance\@tempcnta 64
+ \fi\fi\char\@tempcnta}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.1h}{1999/04/15}{Replaced octal number, CAR}
+% \begin{macro}{\@getrarrow}
+% \begin{macrocode}
+\gdef\@getrarrow(#1,#2){\@tempcntb #2\relax
+\ifnum\@tempcntb <\z@ \@tempcntb -\@tempcntb\relax\fi
+\ifcase \@tempcntb\relax \@tempcnta 45 % '55
+\or
+\ifnum #1<\thr@@ \@tempcnta #1\relax\multiply\@tempcnta
+24\advance\@tempcnta -6 \else \ifnum #1=\thr@@ \@tempcnta 49
+\else\@tempcnta 58 \fi\fi\or
+\ifnum #1<\thr@@ \@tempcnta=#1\relax\multiply\@tempcnta
+24\advance\@tempcnta -\thr@@ \else \@tempcnta 51 \fi\or
+\@tempcnta #1\relax\multiply\@tempcnta
+\sixt@@n \advance\@tempcnta -\tw@ \else
+\@tempcnta #1\relax\multiply\@tempcnta
+\sixt@@n \advance\@tempcnta 7 \fi\ifnum #2<\z@ \advance\@tempcnta 64 \fi
+\char\@tempcnta}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@vline}
+% \begin{macrocode}
+\gdef\@vline{\ifnum \@yarg <\z@ \@downline \else \@upline\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@upline}
+% \begin{macrocode}
+\gdef\@upline{%
+ \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
+ \@height \@linelen \@depth \z@\hss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@downline}
+% \begin{macrocode}
+\gdef\@downline{%
+ \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
+ \@height \z@ \@depth \@linelen \hss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@upvector}
+% \changes{v1.1h}{1999/04/15}{Replaced octal number, CAR}
+% \changes{v1.1i}{2000/01/15}{Removed space at end-of-line, CAR}
+% \begin{macrocode}
+\gdef\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char 54}% '66
+ \raise \@linelen \hb@xt@\z@{\lower \ht\@tempboxa\box\@tempboxa\hss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.1h}{1999/04/15}{Replaced octal number, CAR}
+% \begin{macro}{\@downvector}
+% \begin{macrocode}
+\gdef\@downvector{\@downline\lower \@linelen
+ \hb@xt@\z@{\@linefnt\char 63 % '77
+ \hss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{oldcomments}
+% \dashbox{D}(X,Y) ==
+% BEGIN
+% leave vertical mode
+% \hb@xt@ 0pt {
+% \baselineskip := 0pt
+% \lineskip := 0pt
+% %% HORIZONTAL DASHES
+% \@dashdim := X * \unitlength
+% \@dashcnt := \@dashdim + 200 % to prevent roundoff error
+% \@dashdim := D * \unitlength
+% \@dashcnt := \@dashcnt / \@dashdim
+% if \@dashcnt is odd
+% then \@dashdim := 0pt
+% \@dashcnt := (\@dashcnt + 1) / 2
+% else \@dashdim := \@dashdim / 2
+% \@dashcnt := \@dashcnt / 2 - 1
+% \box\@dashbox := \hbox{\vrule height \@halfwidth
+% depth \@halfwidth width \@dashdim}
+% \put(0,0){\copy\@dashbox}
+% \put(0,Y){\copy\@dashbox}
+% \put(X,0){\hskip -\@dashdim\copy\@dashbox}
+% \put(X,Y){\hskip -\@dashdim\box\@dashbox}
+% \@dashdim := 3 * \@dashdim
+% fi
+% \box\@dashbox := \hbox{\vrule height \@halfwidth
+% depth \@halfwidth width D * \unitlength
+% \hskip D * \unitlength}
+% \@tempcnta := 0
+% \put(0,0){\hskip \@dashdim
+% while \@tempcnta < \@dascnt
+% do \copy\@dashbox
+% \@tempcnta := \@tempcnta + 1
+% od
+% }
+% \@tempcnta := 0
+% put(0,Y){\hskip \@dashdim
+% while \@tempcnta < \@dascnt
+% do \copy\@dashbox
+% \@tempcnta := \@tempcnta + 1
+% od
+% }
+%
+% %% vertical dashes
+% \@dashdim := Y * \unitlength
+% \@dashcnt := \@dashdim + 200 % to prevent roundoff error
+% \@dashdim := D * \unitlength
+% \@dashcnt := \@dashcnt / \@dashdim
+% if \@dashcnt is odd
+% then \@dashdim := 0pt
+% \@dashcnt := (\@dashcnt + 1) / 2
+% else \@dashdim := \@dashdim / 2
+% \@dashcnt := \@dashcnt / 2 - 1
+% \box\@dashbox := \hbox{\hskip -\@halfwidth
+% \vrule width \@wholewidth
+% height \@dashdim }
+% \put(0,0){\copy\@dashbox}
+% \put(X,0){\copy\@dashbox}
+% \put(0,Y){\lower\@dashdim\copy\@dashbox}
+% \put(X,Y){\lower\@dashdim\copy\@dashbox}
+% \@dashdim := 3 * \@dashdim
+% fi
+% \box\@dashbox := \hbox{\vrule width \@wholewidth
+% height D * \unitlength }
+% \@tempcnta := 0
+% put(0,0){\hskip -\halfwidth
+% \vbox{while \@tempcnta < \@dashcnt
+% do \vskip D*\unitlength
+% \copy\@dashbox
+% \@tempcnta := \@tempcnta + 1
+% od
+% \vskip \@dashdim
+% } }
+% \@tempcnta := 0
+% put(X,0){\hskip -\halfwidth
+% \vbox{while \@tempcnta < \@dashcnt
+% do \vskip D*\unitlength
+% \copy\@dashbox
+% \@tempcnta := \@tempcnta + 1
+% od
+% \vskip \@dashdim
+% }
+% }
+% } % END DASHES
+%
+% \@imakepicbox(X,Y)
+% END
+% \end{oldcomments}
+%
+% \begin{macro}{\dashbox}
+% \begin{macrocode}
+\gdef\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip
+\lineskip \z@skip
+\@dashdim #2\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt\@dashdim \z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
+\@width \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(0,#3){\copy\@dashbox}%
+\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
+\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
+\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
+\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
+\@dashdim #3\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt \@dashdim \z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else
+\divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox\hbox{\hskip -\@halfwidth
+\vrule \@width \@wholewidth
+\@height \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(#2,0){\copy\@dashbox}%
+\put(0,#3){\lower\@dashdim\copy\@dashbox}%
+\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
+\@height #1\unitlength}\@tempcnta\z@
+\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\vskip\@dashdim}}\@tempcnta\z@
+\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
+\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\vskip\@dashdim}}}\@makepicbox(#2,#3)}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{oldcomments}
+% CIRCLES AND OVALS
+%
+% USER COMMANDS:
+%
+% \circle{D} : Produces the circle with the diameter as close as
+% possible to D * \unitlength. \put(X,Y){\circle{D}}
+% puts the circle with its center at (X,Y).
+%
+% \oval(X,Y) : Makes an oval as round as possible that fits in the
+% rectangle of width X * \unitlength and height
+% Y * \unitlength. The reference point is the center.
+%
+% \oval(X,Y)[POS] : Save as \oval(X,Y) except it draws only the
+% half or quadrant of the oval indicated by POS.
+% E.G., \oval(X,Y)[t] draws just the top half
+% and \oval(X,Y)[br] draws just the bottom right
+% quadrant. In all cases, the reference point is
+% the same as the unqualified \oval(X,Y) command.
+%
+% \@ovvert {DELTA1} {DELTA2} : Makes a vbox containing either the left
+% side or the right side of the oval being constructed. The baseline
+% will coincide with the outside bottom edge of the oval; the left
+% side of the box will coincide with the left edge of the vertical
+% rule. The width of the box will be \@tempdima.
+% DELTA1 and DELTA2 are added to the character number in \@tempcnta
+% to get the characters for the top and bottom quarter circle pieces.
+%
+% \@ovhorz : Makes an hbox containing the straight rule for either the
+% top or the bottom of the oval being constructed. The baseline
+% will coincide with bottom edge of the rule; the left side of
+% the box will coincide with the left side of the oval.
+% The width of the box will be \@ovxx.
+%
+% \@getcirc {DIAM} : Sets \@tempcnta to the character number
+% of the top-right quarter circle with the largest
+% diameter less than or equal to DIAM.
+% Sets \@tempboxa to an hbox containing that character.
+% Sets \@tempdima to \wd \@tempboxa, which is the distance
+% from the circle's left outside edge to its right
+% inside edge.
+% (These characters are like those described in the
+% TeXbook, pp. 389-90.)
+%
+% \@getcirc {DIAM} ==
+% BEGIN
+% \@tempcnta := integer coercion of (DIAM + 2pt)
+% + 2pt added 1 Nov 88
+% \@tempcnta := \@tempcnta / integer coercion of 4pt
+% if \@tempcnta > 10
+% then \@tempcnta := 10 fi
+% if \@tempcnta > 0
+% then \@tempcnta := \@tempcnta-1
+% else LaTeX Warning: Oval too small.
+% fi
+% \@tempcnta := 4 * \@tempcnta
+% \@tempboxa := \hbox{\@circlefnt \char \@tempcnta}
+% \@tempdima := \wd \@tempboxa
+% END
+%
+% \@put{X}{Y}{OBJ} ==
+% BEGIN
+% \raise Y \hb@xt@ 0pt{\hskip X OBJ \hss}
+% END
+%
+% \@oval(X,Y)[POS] ==
+% BEGIN
+% \begingroup
+% \boxmaxdepth := \maxdimen
+% @ovt := @ovb := @ovl := @ovr := true
+% for all E in POS
+% do @ovE := false od
+% \@ovxx := X * \unitlength
+% \@ovyy := Y * \unitlength
+% \@tempdimb := min(\@ovxx,\@ovyy)
+% \@getcirc{\@tempdimb-2pt} %% "-2pt" added 7 Dec 89
+% \@ovro := \ht \@tempboxa
+% \@ovri := \dp \@tempboxa
+% \@ovdx := \@ovxx - \@tempdima
+% \@ovdx := \@ovdx/2
+% \@ovdy := \@ovyy - \@tempdima
+% \@ovdy := \@ovyy/2
+% \@circlefnt
+% \@tempboxa :=
+% \hbox{
+% if @ovr
+% then \@ovvert{3}{2} \kern -\@tempdima
+% fi
+% if @ovl
+% then \kern \@ovxx \@ovvert{0}{1} \kern -\@tempdima
+% \kern -\@ovxx
+% fi
+% if @ovt
+% then \@ovhorz \kern -\@ovxx
+% fi
+% if @ovb
+% then \raise \@ovyy \@ovhorz
+% fi
+% }
+% \@ovdx := \@ovdx + \@ovro
+% \@ovdy := \@ovdy + \@ovro
+% \ht\@tempboxa := \dp\@tempboxa := 0
+% \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}
+% \endgroup
+% END
+%
+% \@ovvert {DELTA1} {DELTA2} ==
+% BEGIN
+% \vbox to \@ovyy {
+% if @ovb
+% then \@tempcntb := \@tempcnta + DELTA1
+% \kern -\@ovro
+% \hbox { \char \@tempcntb }
+% \nointerlineskip
+% else \kern \@ovri \kern \@ovdy
+% fi
+% \leaders \vrule width \@wholewidth \vfil
+% \nointerlineskip
+% if @ovt
+% then \@tempcntb := \@tempcnta + DELTA2
+% \hbox { \char \@tempcntb }
+% else \kern \@ovdy \kern \@ovro
+% fi
+% }
+% END
+%
+% \@ovhorz ==
+% BEGIN
+% \hb@xt@ \@ovxx{
+% \kern \@ovro
+% if @ovr
+% then
+% else \kern \@ovdx
+% fi
+% \leaders \hrule height \@wholewidth \hfil
+% if @ovl
+% then
+% else \kern \@ovdx
+% fi
+% \kern \@ovri
+% }
+% END
+%
+% \circle{DIAM} ==
+% BEGIN
+% \begingroup
+% \boxmaxdepth := maxdimen
+% \@tempdimb := DIAM *\unitlength
+% if \@tempdimb > 15.5pt
+% then \@getcirc{\@tempdimb}
+% \@ovro := \ht \@tempboxa
+% \@tempboxa := \hbox{
+% \@circlefnt
+% \@tempcnta := \@tempcnta + 2
+% \char \@tempcnta
+% \@tempcnta := \@tempcnta - 1
+% \char \@tempcnta
+% \kern -2\@tempdima
+% \@tempcnta := \@tempcnta + 2
+% \raise \@tempdima \hbox { \char \@tempcnta }
+% \raise \@tempdima \box\@tempboxa
+% }
+% \ht\@tempboxa := \dp\@tempboxa := 0
+% \@put{-\@ovro}{-\@ovro}{\@tempboxa}
+% else
+% \@circ{\@tempdimb}{96}
+% fi
+% \endgroup
+% END
+%
+% \circle*{DIAM} == \@dot{DIAM} == \@circ{DIAM*\unitlength}{112}
+%
+% \@circ{DIAM}{CHAR} ==
+% BEGIN
+% \@tempcnta := integer coercion of (DIAM + .5pt)/1pt.
+% if \@tempcnta > 15 then \@tempcnta := 15 fi
+% if \@tempcnta > 1 then \@tempcnta := \@tempcnta - 1 fi
+% \@tempcnta := \@tempcnta + CHAR
+% \@circlefnt
+% \char \@tempcnta
+% END
+% \end{oldcomments}
+%
+%
+% \begin{macro}{\if@ovt}
+% \begin{macro}{\if@ovb}
+% \begin{macro}{\if@ovl}
+% \begin{macro}{\if@ovr}
+% If producing the Top Bottom Left or Right of an oval.
+% \begin{macrocode}
+\newif\if@ovt
+\newif\if@ovb
+\newif\if@ovl
+\newif\if@ovr
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ovxx}
+% \begin{macro}{\@ovyy}
+% \begin{macro}{\@ovdx}
+% \begin{macro}{\@ovdy}
+% \begin{macro}{\@ovro}
+% \begin{macro}{\@ovri}
+% \begin{macrocode}
+\newdimen\@ovxx
+\newdimen\@ovyy
+\newdimen\@ovdx
+\newdimen\@ovdy
+\newdimen\@ovro
+\newdimen\@ovri
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% |\advance\@tempdima 2pt\relax| added 1 Nov 88 to fix bug in which
+% size of drawn circle not monotonic function of argument of |\circle|,
+% caused by different rounding for dimensions of large and small
+% circles.
+%
+%
+% \begin{macro}{\@getcirc}
+% \changes{v1.1j}{2003/12/30}{issue warning if circle size can't be met pr/3473}
+% \begin{macrocode}
+\gdef\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2\p@
+ \@tempcnta\@tempdima
+ \@tempdima 4\p@ \divide\@tempcnta\@tempdima
+ \ifnum \@tempcnta >10\relax
+ \@picture@warn
+ \@tempcnta 10\relax
+ \fi
+ \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne
+% \end{macrocode}
+% Warn if requirements for oval or circle can't be met.
+% \changes{v1.1g}{1997/09/15}{Warn if lines become invisible pr/2524}
+% \begin{macrocode}
+ \else \@picture@warn \fi
+ \multiply\@tempcnta 4\relax
+ \setbox \@tempboxa \hbox{\@circlefnt
+ \char \@tempcnta}\@tempdima \wd \@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@picture@warn}
+% Generic warning for lines, vectors (used in |\@sline|) and
+% oval or circle (used in |\@getcirc|) are not available at
+% right size.
+% \changes{v1.1g}{1997/09/15}{Macro added pr/2524}
+% \begin{macrocode}
+\def\@picture@warn{\@latex@warning{%
+ \string\oval, \string\circle, or \string\line\space
+ size unavailable}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@put}
+% \begin{macrocode}
+\gdef\@put#1#2#3{\raise #2\hb@xt@\z@{\hskip #1#3\hss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\oval}
+% \begin{macrocode}
+\gdef\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2016/03/31}%
+%<latexrelease> {\@ovhlinetrue}%
+%<latexrelease> {Avoid almost zero length leaders}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macro}{\if@ovvline}
+% \changes{v1.1l}{2016/03/29}{macro added (latex/4452)}
+% \begin{macro}{\if@ovhline}
+% \changes{v1.1l}{2016/03/29}{macro added (latex/4452)}
+% Tests whether horizontal or vertical lines are needed.
+% \begin{macrocode}
+\newif\if@ovvline \@ovvlinetrue
+\newif\if@ovhline \@ovhlinetrue
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@oval}
+% \begin{macrocode}
+\gdef\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
+ \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
+% \end{macrocode}
+% \changes{v1.1l}{2016/03/29}{initialise tests}
+% \begin{macrocode}
+ \@ovvlinefalse \@ovhlinefalse
+% \end{macrocode}
+% \begin{macrocode}
+ \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}%
+ \@ovxx #1\unitlength
+ \@ovyy #2\unitlength
+% \end{macrocode}
+% \changes{v1.1l}{2016/03/29}{add setting of line tests}
+% \begin{macrocode}
+ \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
+ \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi
+% \end{macrocode}
+% \begin{macrocode}
+ \advance \@tempdimb -2\p@
+ \@getcirc \@tempdimb
+ \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
+ \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
+ \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
+% \end{macrocode}
+% \changes{v1.1l}{2016/03/29}{add setting of line tests}
+% \begin{macrocode}
+ \ifdim \@ovdx >\z@ \@ovhlinetrue \fi
+ \ifdim \@ovdy >\z@ \@ovvlinetrue \fi
+% \end{macrocode}
+% \begin{macrocode}
+ \@circlefnt \setbox\@tempboxa
+ \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
+ \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
+ \if@ovt \@ovhorz \kern -\@ovxx \fi
+ \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
+ \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ovvert}
+% \begin{macrocode}
+\gdef\@ovvert#1#2{\vbox to\@ovyy{%
+ \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
+ \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
+ \else \kern \@ovri \kern \@ovdy \fi
+% \end{macrocode}
+% \changes{v1.1l}{2016/03/29}
+% {use glue not leaders if vertical line not required}
+% \begin{macrocode}
+ \if@ovvline \leaders\vrule \@width \@wholewidth \fi
+% \end{macrocode}
+% \begin{macrocode}
+ \vfil \nointerlineskip
+ \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
+ \hbox{\char \@tempcntb}%
+ \else \kern \@ovdy \kern \@ovro \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ovhorz}
+% \begin{macrocode}
+\gdef\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
+ \if@ovr \else \kern \@ovdx \fi
+% \end{macrocode}
+% \changes{v1.1l}{2016/03/29}
+% {use glue not leaders if horizontal line not required}
+% \begin{macrocode}
+ \if@ovhline \leaders \hrule \@height \@wholewidth \fi
+% \end{macrocode}
+% \begin{macrocode}
+ \hfil
+ \if@ovl \else \kern \@ovdx \fi
+ \kern \@ovri}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@ovhlinetrue}%
+%<latexrelease> {Avoid almost zero length leaders}%
+%<latexrelease>\let\if@ovvline\@undefined
+%<latexrelease>\let\if@ovhline\@undefined
+%<latexrelease>\gdef\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
+%<latexrelease> \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
+%<latexrelease> \@tfor\reserved@a :=#3\do
+%<latexrelease> {\csname @ov\reserved@a false\endcsname}%
+%<latexrelease> \@ovxx #1\unitlength
+%<latexrelease> \@ovyy #2\unitlength
+%<latexrelease> \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
+%<latexrelease> \advance \@tempdimb -2\p@
+%<latexrelease> \@getcirc \@tempdimb
+%<latexrelease> \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
+%<latexrelease> \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
+%<latexrelease> \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
+%<latexrelease> \@circlefnt \setbox\@tempboxa
+%<latexrelease> \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
+%<latexrelease> \if@ovl
+%<latexrelease> \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx
+%<latexrelease> \fi
+%<latexrelease> \if@ovt \@ovhorz \kern -\@ovxx \fi
+%<latexrelease> \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
+%<latexrelease> \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
+%<latexrelease> \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
+%<latexrelease> \endgroup}
+%<latexrelease>\gdef\@ovvert#1#2{\vbox to\@ovyy{%
+%<latexrelease> \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
+%<latexrelease> \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
+%<latexrelease> \else \kern \@ovri \kern \@ovdy \fi
+%<latexrelease> \leaders\vrule \@width \@wholewidth\vfil \nointerlineskip
+%<latexrelease> \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
+%<latexrelease> \hbox{\char \@tempcntb}%
+%<latexrelease> \else \kern \@ovdy \kern \@ovro \fi}}
+%<latexrelease>\gdef\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
+%<latexrelease> \if@ovr \else \kern \@ovdx \fi
+%<latexrelease> \leaders \hrule \@height \@wholewidth \hfil
+%<latexrelease> \if@ovl \else \kern \@ovdx \fi
+%<latexrelease> \kern \@ovri}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macro}{\circle}
+% \changes{LaTeX2.09}{1993/08/05}
+% {(RMS) Added error message if \cs{circle} is used in math mode.}
+% \begin{macrocode}
+\gdef\circle{\@inmatherr\circle\@ifstar\@dot\@circle}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@circle}
+% \begin{macrocode}
+\gdef\@circle#1{%
+ \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
+ \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
+ \@ovro\ht\@tempboxa
+ \setbox\@tempboxa\hbox{\@circlefnt
+ \advance\@tempcnta\tw@ \char \@tempcnta
+ \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
+ \advance\@tempcnta\tw@
+ \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
+ \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
+ \else \@circ\@tempdimb{96}\fi\endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@dot}
+% Internal form of |\circle*|.
+% \begin{macrocode}
+\gdef\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@circ}
+% \begin{macrocode}
+\gdef\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@
+ \@tempcnta\@tempdima \@tempdima \p@
+ \divide\@tempcnta\@tempdima
+ \ifnum\@tempcnta >15\relax \@tempcnta 15\relax \fi
+ \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne\fi
+ \advance\@tempcnta #2\relax
+ \@circlefnt \char\@tempcnta}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@xarg}
+% \begin{macro}{\@yarg}
+% \begin{macro}{\@yyarg}
+% Counters used for manipulating the `slope' arguments.
+% \begin{macrocode}
+\newcount\@xarg
+\newcount\@yarg
+\newcount\@yyarg
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@multicnt}
+% Counter used in |\multiput|, and also |\multicolumn|.
+% \begin{macrocode}
+\newcount\@multicnt
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xdim}
+% \begin{macro}{\yxdim}
+% Length registers.
+% \begin{macrocode}
+\newdimen\@xdim
+\newdimen\@ydim
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@linechar}
+% Box for holding a line segment character, for sloping lines.
+% \begin{macrocode}
+\newbox\@linechar
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@linelen}
+% Length of the line currently being built.
+% \begin{macrocode}
+\newdimen\@linelen
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@clnwd}
+% \begin{macro}{\@clnht}
+% Height and width of current line segment.
+% \begin{macrocode}
+\newdimen\@clnwd
+\newdimen\@clnht
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@dashdim}
+% \begin{macro}{\@dashbox}
+% \begin{macro}{\@dashcnt}
+% |\dashbox| internal registers.
+% \begin{macrocode}
+\newdimen\@dashdim
+\newbox\@dashbox
+\newcount\@dashcnt
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Initialization: ``|\thinlines|''
+% \changes{v1.1f}{1995/10/27}
+% {Move initialisation to kernel from autoload file}
+% \begin{macrocode}
+\let\@linefnt\tenln
+\let\@circlefnt\tencirc
+\@wholewidth\fontdimen8\tenln
+\@halfwidth .5\@wholewidth
+% \end{macrocode}
+%
+%
+%
+% \subsection{Curves}
+% The new |\qbezier| command, based on the old |\bezier| defined in
+% |bezier.sty|.
+% \changes{v0.1c}{1994/04/28}{bezier curves added}
+%
+% \begin{oldcomments}
+%
+% \qbezier[N] == \bezier{N}
+%
+% \bezier{N}(AX,AY)(BX,BY)(CX,CY) ==
+% BEGIN
+% IF N = 0
+% THEN \@xdima := |BX - AX|
+% \@xb := |CX - BX|
+% \@xa := Max(\@xa, \@xb)
+% \@ya := |BY - AY|
+% \@yb := |CY - BY|
+% \@ya := Max(\@ya, \@yb)
+% @sc := Max(\@xa, \@ya)
+% %% The coefficient .5 below is the degree of overlap of
+% %% successive points, where 1 is no overlap and 0 is
+% %% complete overlap. A coefficient of C multiplies
+% %% the number of points plotted by 1/C.
+% %%
+% \@xa := .5 * \@halfwidth
+% @sc := @sc / \@halfwidth
+% @sc := Max(@sc, qbeziermax)
+% ELSE @sc := N
+% @scp := @sc+1
+% \@xb := 2 * (BX - AX) * \unitlength
+% \@xa := ((CX-AX)*\unitlength - \@xb)/@sc
+% \@yb := 2 * (BY - AY) * \unitlength
+% \@ya := ((CY-AY)*\unitlength - \@yb)/@sc
+% \@pictdot := square rule of width \@wholewidth
+% \count@ := 0
+% WHILE \count@ < @scp
+% DO \@xdim := ((\count@*\@xa + @xb) / @sc) * \count@
+% \@ydim := ((\count@*\@ya + @yb) / @sc) * \count@
+% plot pt with relative coords (\@xdim,\@ydim)
+% \count@ := \count@+1
+% OD
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\qbeziermax}
+% The maximum number of points to plot.
+% \begin{macrocode}
+\gdef\qbeziermax{500}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% In the code below, to save registers |\@a| \ldots\ are not used.
+% Instead other registers are reused.
+%
+% |\newcounter{@sc} -> \c@multicnt|\par
+% |\newcounter{@scp} -> \@tempcnta|\par
+% |\newdimen\@xa -> \@ovxx|\par
+%
+% |\newdimen\@xb -> \@ovdx|
+%
+% |\newdimen\@ya -> \@ovyy|\par
+% |\newdimen\@yb -> \@ovdy|
+%
+% |\newsavebox{\@pictdot} -> \@tempboxa|
+%
+% \begin{macro}{\qbezier}
+% Main user-level command to plot quadratic bezier curves.
+% |#2| should be |(|.
+% \begin{macrocode}
+\newcommand\qbezier[2][0]{\bezier{#1}#2}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bezier}
+% Form of |\bezier| compatible with 2.09 |bezier.sty|, but modified to
+% ignore spaces between its arguments.
+% |#2| should be white space, and |#4| should be |(|.
+% \begin{macrocode}
+\gdef\bezier#1)#2(#3)#4({\@bezier#1)(#3)(}
+% \end{macrocode}
+%
+% \begin{macro}{\@bezier}
+% \begin{macrocode}
+\gdef\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
+ \ifnum #1=\z@
+ \@ovxx #4\unitlength
+ \advance\@ovxx -#2\unitlength
+ \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
+ \@ovdx #6\unitlength
+ \advance\@ovdx -#4\unitlength
+ \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
+ \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
+ \@ovyy #5\unitlength
+ \advance\@ovyy -#3\unitlength
+ \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
+ \@ovdy #7\unitlength
+ \advance\@ovdy -#5\unitlength
+ \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
+ \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
+ \@multicnt
+ \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
+ \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
+ \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
+ \else \@multicnt#1\relax \fi
+ \@tempcnta\@multicnt \advance\@tempcnta\@ne
+ \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
+ \multiply\@ovdx \tw@
+ \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
+ \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
+ \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
+ \multiply\@ovdy \tw@
+ \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
+ \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
+% \end{macrocode}
+%
+% \changes{v1.1k}{2003/08/27}{added missing displacement pr/3566}
+% \begin{macrocode}
+ \setbox\@tempboxa\hbox{%
+ \hskip -\@halfwidth
+ \vrule \@height\@halfwidth
+ \@depth \@halfwidth
+ \@width \@wholewidth}%
+ \put(#2,#3){%
+ \count@\z@
+ \@whilenum{\count@<\@tempcnta}\do
+ {\@xdim\count@\@ovxx
+ \advance\@xdim\@ovdx
+ \divide\@xdim\@multicnt
+ \multiply\@xdim\count@
+ \@ydim\count@\@ovyy
+ \advance\@ydim\@ovdy
+ \divide\@ydim\@multicnt
+ \multiply\@ydim\count@
+ \raise \@ydim
+ \hb@xt@\z@{\kern\@xdim
+ \unhcopy\@tempboxa\hss}%
+ \advance\count@\@ne}}}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltplain.dtx b/macros/latex-dev/base/ltplain.dtx
new file mode 100644
index 0000000000..5c4050b734
--- /dev/null
+++ b/macros/latex-dev/base/ltplain.dtx
@@ -0,0 +1,1588 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%%% From File: ltplain.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltplain.dtx}
+ [2017/04/10 v2.3c LaTeX Kernel (Plain TeX)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltplain.dtx}
+\begin{document}
+\title{\filename\\(The file plain.tex, modified for \LaTeX)}
+\author{Donald~E.~Knuth\\
+ Modified by
+ Leslie Lamport, Frank Mittelbach,\\
+ Rainer Sch\"opf, David Carlisle}
+\date{\filedate}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0a}{1994/03/08}
+% {Remove need for a driver file.}
+% \changes{v1.0b}{1994/03/12}
+% {Name changed from lplain. The end of an era}
+% \changes{v1.0e}{1994/03/12}{Replaced remaining width, height, depth
+% by \LaTeX{} macro names to save tokens.}
+% \changes{v1.1a}{1994/10/14}
+% {Moved code to other files.}
+% \changes{v1.1b}{1994/11/10}
+% {(CAR) added patch to \cs{loop}.}
+% \changes{v1.1f}{1994/11/25}
+% {(DPC) Comment out lots of obsolete code}
+% \changes{v1.1g}{1994/12/01}
+% {(DPC) More doc changes}
+% \changes{v1.1j}{1995/05/07}{Use \cs{hb@xt@}}
+% \changes{v1.1j}{1995/05/21}{Moved some code to other files}
+% \changes{v1.1n}{1995/07/02}{Removed surplus `by' and `\quotechar=' in
+% various places}
+% \changes{v1.1o}{1995/09/14}{Moved \cs{multispan} to lttab.dtx}
+% \changes{v1.1r}{1995/10/10}{Autoload tracing code}
+% \changes{v1.1u}{1996/10/28}{(CAR) More doc changes}
+% \changes{v2.0e}{2015/02/21}{Removed autoload code}
+% \changes{v2.2d}{2016/10/15}{Require e\TeX{}}
+% \changes{v2.3b}{2016/11/06}{Drop \cs{outer} entirely}
+%
+% \section{Plain \TeX}
+%
+% \LaTeX\ includes almost all of the functionality of Knuth's original
+% `Basic Macros' That is, the plain \TeX\ format described in Appendix~B
+% of the \TeX{}Book. However, some of the user commands are not much
+% use so, in order to save memory, we may remove them from the kernel
+% into a package. Here is a list of the commands that may be removed
+% (PROBABLY NOT COMPLETE).
+% \begin{verbatim}
+% \magstep \magstephalf
+% \mathhexbox
+% \vglue \vgl@
+% \hglue \hgl@
+% \end{verbatim}
+%
+% This file is by now very small as most of it has been moved to more
+% appropriate kernel files: it may disappear completely one day.
+%
+% \LaTeX\ font definitions are done using NFSS2 so none of PLAIN's
+% font definitions are in \LaTeX.
+%
+% \LaTeX\ has its own tabbing environment, so PLAIN's is disabled.
+%
+% \LaTeX{} uses its own output routine, so most of the plain one was
+% removed.
+%
+% \StopEventually{}
+%
+%
+% \begin{macrocode}
+%<*2ekernel>
+\catcode`\{=1 % left brace is begin-group character
+\catcode`\}=2 % right brace is end-group character
+\catcode`\$=3 % dollar sign is math shift
+\catcode`\&=4 % ampersand is alignment tab
+\catcode`\#=6 % hash mark is macro parameter character
+\catcode`\^=7 % circumflex and uparrow are for superscripts
+\catcode`\_=8 % underline and downarrow are for subscripts
+\catcode`\^^I=10 % ascii tab is a blank space
+\chardef\active=13 \catcode`\~=\active % tilde is active
+\catcode`\^^L=\active \def^^L{\par}% ascii form-feed is \par
+% \end{macrocode}
+%
+% \begin{macrocode}
+\message{catcodes,}
+% \end{macrocode}
+%
+% We had to define the |\catcodes| right away, before the message line,
+% since |\message| uses the |{| and |}| characters.
+% When INITEX (the \TeX\ initializer) starts up,
+% it has defined the following |\catcode| values:\\
+% |\catcode`\^^@=9 % | ascii null is ignored\\
+% |\catcode`\^^M=5 % | ascii return is end-line\\
+% |\catcode`\\=0 % | backslash is TeX escape character\\
+% |\catcode`\%=14 % | percent sign is comment character\\
+% |\catcode`\ =10 % | ascii space is blank space\\
+% |\catcode`\^^?=15 %| ascii delete is invalid\\
+% |\catcode`\A=11 ... \catcode`\Z=11 %| uppercase letters\\
+% |\catcode`\a=11 ... \catcode`\z=11 %| lowercase letters\\
+% all others are type 12 (other)
+%
+% Here is a list of the characters that have been specially catcoded:
+% \begin{macrocode}
+\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\_\do\%\do\~}
+% \end{macrocode}
+% (not counting ascii null, tab, linefeed, formfeed, return, delete)
+% Each symbol in the list is preceded by \do, which can be defined
+% if you want to do something to every item in the list.
+%
+% We make |@| signs act like letters, temporarily, to avoid conflict
+% between user names and internal control sequences of plain format.
+% \begin{macrocode}
+\catcode`@=11
+% \end{macrocode}
+%
+% To make the plain macros more efficient in time and space,
+% several constant values are declared here as control sequences.
+% If they were changed, anything could happen;
+% so they are private symbols.
+% \begin{macro}{\@ne}
+% \begin{macro}{\tw@}
+% \begin{macro}{\thr@@}
+% \begin{macro}{\sixt@@n}
+% \begin{macro}{\@cclv}
+% Small constants are defined using |\chardef|.
+% \begin{macrocode}
+\chardef\@ne=1
+\chardef\tw@=2
+\chardef\thr@@=3
+\chardef\sixt@@n=16
+\chardef\@cclv=255
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@cclvi}
+% \begin{macro}{\@m}
+% \begin{macro}{\@M}
+% \begin{macro}{\@MM}
+% Constants above 255 defined using |\mathchardef|.
+% \begin{macrocode}
+\mathchardef\@cclvi=256
+\mathchardef\@m=1000
+\mathchardef\@M=10000
+\mathchardef\@MM=20000
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Allocation of registers
+%
+% Here are macros for the automatic allocation of |\count|, |\box|,
+% |\dimen|, |\skip|, |\muskip|, and |\toks| registers, as well as
+% |\read| and |\write| stream numbers, |\fam| codes, |\language| codes,
+% and |\insert| numbers.
+%
+% \begin{macrocode}
+\message{registers,}
+% \end{macrocode}
+%
+% When a register is used only temporarily, it need not be allocated;
+% grouping can be used, making the value previously in the register
+% return after the close of the group. The main use of these macros is
+% for registers that are defined by one macro and used by others,
+% possibly at different nesting levels. All such registers should be
+% defined through these macros; otherwise conflicts may occur,
+% especially when two or more macro packages are being used at
+% the same time.
+%
+% \begin{oldcomments}
+% The following counters are reserved:
+% 0 to 9 page numbering
+% 10 count allocation
+% 11 dimen allocation
+% 12 skip allocation
+% 13 muskip allocation
+% 14 box allocation
+% 15 toks allocation
+% 16 read file allocation
+% 17 write file allocation
+% 18 math family allocation
+% 19 language allocation
+% 20 insert allocation
+% 21 the most recently allocated number
+% 22 constant -1
+% \end{oldcomments}
+%
+% New counters are allocated starting with 23, 24, etc. Other registers
+% are allocated starting with 10. This leaves 0 through 9 for the user
+% to play with safely, except that counts 0 to 9 are considered to be
+% the page and subpage numbers (since they are displayed during
+% output). In this scheme, |\count| 10 always contains the number of the
+% highest-numbered counter that has been allocated, |\count| 14 the
+% highest-numbered box, etc. Inserts are given numbers 254, 253, etc.,
+% since they require a |\count|, |\dimen|, |\skip|, and |\box| all with
+% the same number; |\count| 20 contains the lowest-numbered insert that
+% has been allocated. Of course, |\box|255 is reserved for |\output|;
+% |\count|255, |\dimen|255, and |\skip|255 can be used freely.
+%
+% It is recommended that macro designers always use
+% |\global| assignments with respect to registers numbered\\
+% 1, 3, 5, 7, 9,\\
+% and always non-|\global| assignments with respect to registers\\
+% 0, 2, 4, 6, 8, 255.\\
+% This will prevent ``save stack buildup'' that might otherwise occur.
+%
+% \begin{macrocode}
+\count10=22 % allocates \count registers 23, 24, ...
+\count11=9 % allocates \dimen registers 10, 11, ...
+\count12=9 % allocates \skip registers 10, 11, ...
+\count13=9 % allocates \muskip registers 10, 11, ...
+\count14=9 % allocates \box registers 10, 11, ...
+\count15=9 % allocates \toks registers 10, 11, ...
+\count16=-1 % allocates input streams 0, 1, ...
+\count17=-1 % allocates output streams 0, 1, ...
+\count18=3 % allocates math families 4, 5, ...
+\count19=0 % allocates \language codes 1, 2, ...
+\count20=255 % allocates insertions 254, 253, ...
+% \end{macrocode}
+%
+% \begin{macro}{\insc@unt}
+% \begin{macro}{\allocationnumber}
+% The insertion counter and most recent allocation.
+% \begin{macrocode}
+\countdef\insc@unt=20
+\countdef\allocationnumber=21
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\m@ne}
+% The constant $-1$.
+% \begin{macrocode}
+\countdef\m@ne=22 \m@ne=-1
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\wlog}
+% Write on log file (only)
+% \begin{macrocode}
+\def\wlog{\immediate\write\m@ne}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\count@}
+% \begin{macro}{\dimen@}
+% \begin{macro}{\dimen@i}
+% \begin{macro}{\dimen@ii}
+% \begin{macro}{\skip@}
+% \begin{macro}{\toks@}
+% Here are abbreviations for the names of scratch registers
+% that don't need to be allocated.
+% \begin{macrocode}
+\countdef\count@=255
+\dimendef\dimen@=0
+\dimendef\dimen@i=1 % global only
+\dimendef\dimen@ii=2
+\skipdef\skip@=0
+\toksdef\toks@=0
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newcount}
+% \begin{macro}{\newdimen}
+% \begin{macro}{\newskip}
+% \begin{macro}{\newmuskip}
+% \begin{macro}{\newbox}
+% \begin{macro}{\newread}
+% \begin{macro}{\newwrite}
+% \begin{macro}{\newlanguage}
+% \changes{v1.0c}{1994/03/28}
+% {Remove some \cs{outer} declarations.}
+% \changes{v1.1h}{1995/04/24}
+% {Remove remaining \cs{outer} declarations.}
+% Now, we define |\newcount|, |\newbox|, etc. so that you can say
+% |\newcount\foo| and |\foo| will be defined (with |\countdef|) to
+% be the next counter.
+%
+% To find out which counter |\foo| is, you can look at
+% |\allocationnumber|.
+%
+% Since there's no |\boxdef| command, |\chardef| is used to define a
+% |\newbox|, |\newinsert|, |\newfam|, and so on.
+%
+% \LaTeX\ change: remove |\outer| from |\newcount| and |\newdimen| (FMi)
+% This is necessary to use |\newcount| inside |\if...|
+% later on. Also remove from |\newskip|, |\newbox|
+% |\newwrite| and |\newfam| (DPC) to save later redefinition.
+% \changes{v2.0a}{2014/12/30}{New engine-specific allocation scheme (latexrelease)}
+% \changes{v2.0f}{2015/03/02}{allow 255 math groups in Unicode engines}
+% \changes{v2.0h}{2015/06/19}{Use $-1$ for first range to get contiguous allocation}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\newcount}{Extended Allocation}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\newcount {\e@alloc\count \countdef {\count10}\insc@unt\float@count}
+\def\newdimen {\e@alloc\dimen \dimendef {\count11}\insc@unt\float@count}
+\def\newskip {\e@alloc\skip \skipdef {\count12}\insc@unt\float@count}
+\def\newmuskip
+ {\e@alloc\muskip\muskipdef{\count13}\m@ne\e@alloc@top}
+% \end{macrocode}
+% For compatibility use |\chardef| in the classical range.
+% \begin{macrocode}
+\def\newbox {\e@alloc\box
+ {\ifnum\allocationnumber<\@cclvi
+ \expandafter\chardef
+ \else
+ \expandafter\e@alloc@chardef
+ \fi}
+ {\count14}\insc@unt\float@count}
+\def\newtoks {\e@alloc\toks \toksdef{\count15}\m@ne\e@alloc@top}
+\def\newread {\e@alloc\read \chardef{\count16}\m@ne\sixt@@n}
+% \end{macrocode}
+%
+% \changes{v2.2a}{2015/11/18}
+% {Extended stream allocation in luatex (0.85)}
+% \changes{v2.2b}{2015/11/19}
+% {Only extend allocation of write streams (see luatex list)}
+% \changes{v2.3c}{2017/04/10}
+% {Correction to code to skip write18 in luatex}
+% Skip |\write18| due to its traditional use as a shell-escape.
+% \begin{macrocode}
+\ifx\directlua\@undefined
+ \def\newwrite {\e@alloc\write \chardef{\count17}\m@ne\sixt@@n}
+\else
+ \def\newwrite {\e@alloc\write
+ {\ifnum\allocationnumber=18
+ \advance\count17\@ne
+ \allocationnumber\count17 %
+ \fi
+ \global\chardef}%
+ {\count17}%
+ \m@ne
+ {128}}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\new@mathgroup
+ {\e@alloc\mathgroup\chardef{\count18}\m@ne\e@mathgroup@top}
+\let\newfam\new@mathgroup
+% \end{macrocode}
+%
+% \changes{v2.3a}{2016/10/16}{Allow languages up to 16383 in luatex}
+% \begin{macrocode}
+\ifx\directlua\@undefined
+ \def\newlanguage {\e@alloc\language \chardef{\count19}\m@ne\@cclvi}
+\else
+ \def\newlanguage {\e@alloc\language \chardef{\count19}\m@ne{16384}}
+\fi
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\newcount}{Extended Allocation}%
+%<latexrelease>\def\newcount{\alloc@0\count\countdef\insc@unt}
+%<latexrelease>\def\newdimen{\alloc@1\dimen\dimendef\insc@unt}
+%<latexrelease>\def\newskip{\alloc@2\skip\skipdef\insc@unt}
+%<latexrelease>\def\newmuskip{\alloc@3\muskip\muskipdef\@cclvi}
+%<latexrelease>\def\newbox{\alloc@4\box\chardef\insc@unt}
+%<latexrelease>\def\newtoks{\alloc@5\toks\toksdef\@cclvi}
+%<latexrelease>\def\newread{\alloc@6\read\chardef\sixt@@n}
+%<latexrelease>\def\newwrite{\alloc@7\write\chardef\sixt@@n}
+%<latexrelease>\def\new@mathgroup{\alloc@8\fam\chardef\sixt@@n}
+%<latexrelease>\def\newlanguage{\alloc@9\language\chardef\@cclvi}
+%<latexrelease>\let\newfam\new@mathgroup
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%\begin{macro}{\e@alloc@chardef}
+% \changes{v2.0a}{2014/12/30}{macro added}
+%\begin{macro}{\e@alloc@top}
+% \changes{v2.0a}{2014/12/30}{macro added}
+% The upper limit of extended registers, which leaves
+% this number (eg |\dimen32767|) always unallocated
+% by these macros.
+% cf traditional |\dimen255|.
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\e@alloc@chardef}{Extended Allocation}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\directlua\@undefined
+ \ifx\widowpenalties\@undefined
+% \end{macrocode}
+% classic tex has $2^8$ registers.
+% \begin{macrocode}
+ \mathchardef\e@alloc@top=255
+ \let\e@alloc@chardef\chardef
+ \else
+% \end{macrocode}
+% etex and xetex have $2^{15}$ registers.
+% \begin{macrocode}
+ \mathchardef\e@alloc@top=32767
+ \let\e@alloc@chardef\mathchardef
+ \fi
+\else
+% \end{macrocode}
+% luatex has $2^{16}$ registers.
+% \begin{macrocode}
+ \chardef\e@alloc@top=65535
+ \let\e@alloc@chardef\chardef
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\e@alloc@chardef}{Extended Allocation}%
+%<latexrelease>\let\e@alloc@top\@undefined
+%<latexrelease>\let\e@alloc@chardef\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%\begin{macro}{\e@mathgroup@top}
+% \changes{v2.0f}{2015/03/02}{macro added}
+% The upper limit of extended math groups (|\fam|)
+% 16 in classic \TeX\ and e-\TeX, but 256 in Unicode TeX variants.
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\e@mathgroup@top}{Extended Allocation}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\Umathcode\@undefined
+% \end{macrocode}
+% classic and e tex have 16 fam (0--15).
+% \begin{macrocode}
+ \chardef\e@mathgroup@top=16
+\else
+% \end{macrocode}
+% xetex and luatex have 256 fam (0--255).
+% \begin{macrocode}
+ \chardef\e@mathgroup@top=256
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\e@mathgroup@top}{Extended Allocation}%
+%<latexrelease>\let\e@mathgroup@top\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\e@alloc}
+% \changes{v2.0a}{2014/12/30}{macro added}
+% A modified version of |\alloc@| that
+% takes the count register rather than just the final digit of its number
+% (assuming |\count|$1x$).
+% It also has an extra argument to give the top of the extended range.
+%
+% | #1 #2 #3 #4 #5 #6 |
+%
+% | \e@alloc type defcmd current top extended-top newname|
+%
+% Note that if just a single allocation range is required
+% (not omitting a range up to 255 for inserts) then $-1$
+% should be used for the first upper bound argument, |#4|.
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\e@alloc}{Extended Allocation}%
+% \end{macrocode}
+%
+% \changes{v2.0h}{2015/06/19}{extra braces in case arguments not single token}
+% \begin{macrocode}
+\def\e@alloc#1#2#3#4#5#6{%
+ \global\advance#3\@ne
+ \e@ch@ck{#3}{#4}{#5}#1%
+ \allocationnumber#3\relax
+ \global#2#6\allocationnumber
+ \wlog{\string#6=\string#1\the\allocationnumber}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\e@alloc}{Extended Allocation}%
+%<latexrelease>\let\e@alloc\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\e@ch@ck}
+% \changes{v2.0a}{2014/12/30}{macro added}
+% Extended check command.
+% If the first range is exceeded, bump to 256 (or 266 for counts)
+% and try again, testing the extended range.
+%\begin{macro}{\extrafloats}
+% \changes{v2.0a}{2014/12/30}{macro added}
+% \changes{v2.0c}{2015/01/23}{reserve counts 256--265}
+% Allocate matching registers from the top of the extended range
+% and add to |\@freelist|.
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/10/01}
+%<latexrelease> {\e@ch@ck}{Extended Allocation (checking)}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\e@ch@ck#1#2#3#4{%
+ \ifnum#1<#2\else
+% \end{macrocode}
+%
+% If we've reached the classical top limit, bump to 256
+% or 266 for counts (count 256--265 are reserved by the allocation
+% system).
+% \changes{v2.1b}{2015/10/27}
+% {Use global assignment when switching to extended range}
+% \begin{macrocode}
+ \ifnum#1=#2\relax
+ \global#1\@cclvi
+ \ifx\count#4\global\advance#1 10 \fi
+ \fi
+% \end{macrocode}
+% Check we are below the extended limit.
+% \changes{v2.0i}{2015/08/06}
+% {Add \cs{string} in case argument is not an unexpandable primitive}
+% \begin{macrocode}
+ \ifnum#1<#3\relax
+ \else
+ \errmessage{No room for a new \string#4}%
+ \fi
+ \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\e@ch@ck}{Extended Allocation (checking)}%
+%<latexrelease>\gdef\e@ch@ck#1#2#3#4{%
+%<latexrelease> \ifnum#1<#2\else
+%<latexrelease> \ifnum#1=#2\relax
+%<latexrelease> #1\@cclvi
+%<latexrelease> \ifx\count#4\advance#1 10 \fi
+%<latexrelease> \fi
+%<latexrelease> \ifnum#1<#3\relax
+%<latexrelease> \else
+%<latexrelease> \errmessage{No room for a new #4}%
+%<latexrelease> \fi
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\e@ch@ck}{Extended Allocation (checking)}%
+%<latexrelease>\let\e@ch@ck\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\extrafloats}{Extra floats}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\let\float@count\e@alloc@top
+% \end{macrocode}
+%
+% \begin{macro}{\extrafloats}
+% \changes{v2.2c}{2016/07/29}{use \cs{global} \cs{chardef}}
+% \begin{macrocode}
+\ifx\numexpr\@undefined
+% \end{macrocode}
+% In classic TeX use |\newinsert| to allocate float boxes.
+% \begin{macrocode}
+\def\extrafloats#1{%
+\count@#1\relax
+\ifnum\count@>\z@
+\newinsert\reserved@a
+\global\expandafter\chardef
+ \csname bx@\the\allocationnumber\endcsname\allocationnumber
+\@cons\@freelist{\csname bx@\the\allocationnumber\endcsname}%
+\advance\count@\m@ne
+\expandafter\extrafloats
+\expandafter\count@
+\fi
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% In e-tex take float boxes from the top of the extended range.
+% \begin{macrocode}
+\def\extrafloats#1{%
+\ifnum#1>\z@
+\count@\numexpr\float@count-1\relax
+ \ch@ck0\count@\count
+ \ch@ck1\count@\dimen
+ \ch@ck2\count@\skip
+ \ch@ck4\count@\box
+\global\e@alloc@chardef\float@count\count@
+\global\expandafter\e@alloc@chardef
+ \csname bx@\the\float@count\endcsname\float@count
+\@cons\@freelist{\csname bx@\the\float@count\endcsname}%
+\expandafter
+\extrafloats\expandafter{\numexpr#1-1\relax}%
+\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\extrafloats}{Extra floats}%
+%<latexrelease>\let\float@count\@undefined
+%<latexrelease>\let\extrafloats\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\alloc@}
+% \begin{macrocode}
+\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
+ \ch@ck#1#4#2%
+ \allocationnumber\count1#1%
+ \global#3#5\allocationnumber
+ \wlog{\string#5=\string#2\the\allocationnumber}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newinsert}
+% \changes{v2.1a}{2015/08/30}{new \cs{newinsert} implementation}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/10/01}
+%<latexrelease> {\newinsert}{Extended \newinsert}%
+% \end{macrocode}
+% \begin{macrocode}
+\ifx\numexpr\@undefined
+% \end{macrocode}
+% If e-\TeX\ is not available use the original plain \TeX\
+% definition of |\newinsert|.
+% \begin{macrocode}
+\def\newinsert#1{\global\advance\insc@unt \m@ne
+ \ch@ck0\insc@unt\count
+ \ch@ck1\insc@unt\dimen
+ \ch@ck2\insc@unt\skip
+ \ch@ck4\insc@unt\box
+ \allocationnumber\insc@unt
+ \global\chardef#1\allocationnumber
+ \wlog{\string#1=\string\insert\the\allocationnumber}}
+% \end{macrocode}
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% The highest register allowed with |\insert|.
+% \begin{macrocode}
+\ifx\directlua\@undefined
+ \chardef\e@insert@top255
+\else
+ \chardef\e@insert@top\e@alloc@top
+\fi
+% \end{macrocode}
+% If the classic registers are exausted, take an insert from the free float list
+% and use |\extrafloats| to add a new float to that list.
+% \changes{v2.2c}{2016/07/29}{fix for tlb-newinsert-001}
+% \begin{macrocode}
+\def\newinsert#1{%
+\@tempswafalse
+\global\advance\insc@unt\m@ne
+\ifnum\count10<\insc@unt
+\ifnum\count11<\insc@unt
+\ifnum\count12<\insc@unt
+\ifnum\count14<\insc@unt
+ \@tempswatrue
+\fi\fi\fi\fi
+\if@tempswa
+\allocationnumber\insc@unt
+\else
+\global\advance\insc@unt\@ne
+ \extrafloats\@ne
+ \@next\@currbox\@freelist
+ {\ifnum\@currbox<\e@insert@top
+ \allocationnumber\@currbox
+ \else
+ \ch@ck0\m@ne\insert
+ \fi}%
+ {\ch@ck0\m@ne\insert}%
+\fi
+\global\chardef#1\allocationnumber
+\wlog{\string#1=\string\insert\the\allocationnumber}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\fi
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\newinsert}{Extended \newinsert}%
+%<latexrelease>\let\e@insert@top\@undefined
+%<latexrelease>\def\newinsert#1{\global\advance\insc@unt \m@ne
+%<latexrelease> \ch@ck0\insc@unt\count
+%<latexrelease> \ch@ck1\insc@unt\dimen
+%<latexrelease> \ch@ck2\insc@unt\skip
+%<latexrelease> \ch@ck4\insc@unt\box
+%<latexrelease> \allocationnumber\insc@unt
+%<latexrelease> \global\chardef#1\allocationnumber
+%<latexrelease> \wlog{\string#1=\string\insert\the\allocationnumber}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ch@ck}
+% \begin{macrocode}
+\gdef\ch@ck#1#2#3{%
+ \ifnum\count1#1<#2\else
+ \errmessage{No room for a new #3}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.0h}{2015/06/19}{delete spurious old definition of \cs{newtoks}}
+% \begin{macro}{\newhelp}
+% \begin{macrocode}
+\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maxdimen}
+% \begin{macro}{\hideskip}
+% Here are some examples of allocation.
+% \begin{macrocode}
+\newdimen\maxdimen \maxdimen=16383.99999pt % the largest legal <dimen>
+\newskip\hideskip \hideskip=-1000pt plus 1fill % negative but can grow
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\p@}
+% \begin{macro}{\z@}
+% \begin{macro}{\z@skip}
+% \begin{macro}{\voidb@x}
+% \begin{macrocode}
+\newdimen\p@ \p@=1pt % this saves macro space and time
+\newdimen\z@ \z@=0pt % can be used both for 0pt and 0
+\newskip\z@skip \z@skip=0pt plus0pt minus0pt
+\newbox\voidb@x % permanently void box register
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Assign initial values to \TeX's parameters
+%
+% \begin{macrocode}
+\message{parameters,}
+% \end{macrocode}
+%
+% All of \TeX's numeric parameters are listed here,
+% but the code is commented out if no special value needs to be set.
+% INITEX makes all parameters zero except where noted.
+%
+% \begin{oldcomments}
+% \begin{macrocode}
+\pretolerance=100
+\tolerance=200 % INITEX sets this to 10000
+\hbadness=1000
+\vbadness=1000
+\linepenalty=10
+\hyphenpenalty=50
+\exhyphenpenalty=50
+\binoppenalty=700
+\relpenalty=500
+\clubpenalty=150
+\widowpenalty=150
+\displaywidowpenalty=50
+\brokenpenalty=100
+\predisplaypenalty=10000
+% \end{macrocode}
+% \postdisplaypenalty=0
+% \interlinepenalty=0
+% \floatingpenalty=0, set during \insert
+% \outputpenalty=0, set before TeX enters \output
+% \begin{macrocode}
+\doublehyphendemerits=10000
+\finalhyphendemerits=5000
+\adjdemerits=10000
+% \end{macrocode}
+% \looseness=0, cleared by TeX after each paragraph
+% \pausing=0
+% \holdinginserts=0
+% \tracingonline=0
+% \tracingmacros=0
+% \tracingstats=0
+% \tracingparagraphs=0
+% \tracingpages=0
+% \tracingoutput=0
+% \begin{macrocode}
+\tracinglostchars=1
+% \end{macrocode}
+% \tracingcommands=0
+% \tracingrestores=0
+% \language=0
+% \begin{macrocode}
+\uchyph=1
+% \end{macrocode}
+% \lefthyphenmin=2 \righthyphenmin=3 set below
+% \globaldefs=0
+% \maxdeadcycles=25 % INITEX does this
+% \hangafter=1 % INITEX does this, also TeX after each paragraph
+% \fam=0
+% \mag=1000 % INITEX does this
+% \escapechar=`\\ % INITEX does this
+% \begin{macrocode}
+\defaulthyphenchar=`\-
+\defaultskewchar=-1
+% \end{macrocode}
+% \endlinechar=`\^^M % INITEX does this
+% \newlinechar=-1 \LaTeX\ sets this in ltdefns.dtx.
+% \begin{macrocode}
+\delimiterfactor=901
+% \end{macrocode}
+% \time=now % TeX does this at beginning of job
+% \day=now % TeX does this at beginning of job
+% \month=now % TeX does this at beginning of job
+% \year=now % TeX does this at beginning of job
+%
+% \end{oldcomments}
+% In \LaTeX{} we don't want box information in the transcript
+% unless we do a full tracing.
+% \changes{v1.0g}{1994/04/28}{Turn off overfull box tracing in log}
+%
+% \begin{macrocode}
+\showboxbreadth=-1
+\showboxdepth=-1
+\errorcontextlines=-1
+% \end{macrocode}
+%
+% \begin{macrocode}
+\hfuzz=0.1pt
+\vfuzz=0.1pt
+\overfullrule=5pt
+\maxdepth=4pt
+\splitmaxdepth=\maxdimen
+\boxmaxdepth=\maxdimen
+% \end{macrocode}
+%
+% \begin{oldcomments}
+% \lineskiplimit=0pt, changed by \normalbaselines
+% \begin{macrocode}
+\delimitershortfall=5pt
+\nulldelimiterspace=1.2pt
+\scriptspace=0.5pt
+% \end{macrocode}
+% \mathsurround=0pt
+% \predisplaysize=0pt, set before TeX enters $$
+% \displaywidth=0pt, set before TeX enters $$
+% \displayindent=0pt, set before TeX enters $$
+% \begin{macrocode}
+\parindent=20pt
+% \end{macrocode}
+% \hangindent=0pt, zeroed by TeX after each paragraph
+% \hoffset=0pt
+% \voffset=0pt
+%
+% \baselineskip=0pt, changed by \normalbaselines
+% \lineskip=0pt, changed by \normalbaselines
+% \begin{macrocode}
+\parskip=0pt plus 1pt
+\abovedisplayskip=12pt plus 3pt minus 9pt
+\abovedisplayshortskip=0pt plus 3pt
+\belowdisplayskip=12pt plus 3pt minus 9pt
+\belowdisplayshortskip=7pt plus 3pt minus 4pt
+% \end{macrocode}
+% \leftskip=0pt
+% \rightskip=0pt
+% \begin{macrocode}
+\topskip=10pt
+\splittopskip=10pt
+% \end{macrocode}
+% \tabskip=0pt
+% \spaceskip=0pt
+% \xspaceskip=0pt
+% \begin{macrocode}
+\parfillskip=0pt plus 1fil
+% \end{macrocode}
+% \end{oldcomments}
+%
+%
+% \begin{macro}{\normalbaselineskip}
+% \begin{macro}{\normallineskip}
+% \begin{macro}{\normallineskiplimit}
+% We also define special registers that function like parameters:
+% \begin{macrocode}
+\newskip\normalbaselineskip \normalbaselineskip=12pt
+\newskip\normallineskip \normallineskip=1pt
+\newdimen\normallineskiplimit \normallineskiplimit=0pt
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\interfootlinepenalty}
+% \begin{macrocode}
+\newcount\interfootnotelinepenalty \interfootnotelinepenalty=100
+% \end{macrocode}
+% \end{macro}
+%
+% Definitions for preloaded fonts
+%
+% \begin{macro}{\magstephalf}
+% \begin{macro}{\magstep}
+% \begin{macrocode}
+\def\magstephalf{1095 }
+\def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or
+ 2074\or 2488\fi\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% Macros for setting ordinary text
+%
+% \begin{macro}{\frenchspacing}
+% \begin{macro}{\nonfrenchspacing}
+% \begin{macrocode}
+\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m
+ \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m}
+\def\nonfrenchspacing{\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\normalbaselines}
+% \begin{macrocode}
+\def\normalbaselines{\lineskip\normallineskip
+ \baselineskip\normalbaselineskip \lineskiplimit\normallineskiplimit}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\M}
+% \begin{macro}{\I}
+% \changes{v1.1m}{1995/09/01}{Use \cs{let} to save space}
+% Save a bit of space by using |\let| here.
+% \begin{macrocode}
+\def\^^M{\ } % control <return> = control <space>
+\let\^^I\^^M % same for <tab>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\lq}
+% \begin{macro}{\rq}
+% \begin{macrocode}
+\def\lq{`}
+\def\rq{'}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\lbrack}
+% \begin{macro}{\rbrack}
+% \begin{macrocode}
+\def\lbrack{[}
+\def\rbrack{]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\aa}
+% \begin{macro}{\AA}
+% These are not from plain.tex but they are similar to other commands
+% found here and nowhere else, being alternate input forms for
+% characters.
+% \begin{macrocode}
+\def \aa {\r a}
+\def \AA {\r A}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\endgraf}
+% \begin{macro}{\endline}
+% \begin{macrocode}
+\let\endgraf=\par
+\let\endline=\cr
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\space}
+% \begin{macrocode}
+\def\space{ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\empty}
+% \changes{v1.1m}{1995/09/01}{Use \cs{let} to save space}
+% This probably ought to go altogether, but let it to the \LaTeX\
+% version to save space.
+% \begin{macrocode}
+\let\empty\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\null}
+% \begin{macrocode}
+\def\null{\hbox{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bgroup}
+% \begin{macro}{\egroup}
+% \begin{macrocode}
+\let\bgroup={
+\let\egroup=}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\obeylines}
+% \begin{macro}{\obeyspaces}
+% In |\obeylines|, we say |\let^^M=\par| instead of |\def^^M{\par}|
+% since this allows, for example, |\let\par=\cr \obeylines \halign{...|
+% \begin{macrocode}
+{\catcode`\^^M=\active % these lines must end with %
+ \gdef\obeylines{\catcode`\^^M\active \let^^M\par}%
+ \global\let^^M\par} % this is in case ^^M appears in a \write
+\def\obeyspaces{\catcode`\ \active}
+{\obeyspaces\global\let =\space}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\loop}
+% \changes{v1.0h}{1994/05/16}{Use Kabelschacht method}
+% \begin{macro}{\iterate}
+% \changes{v1.1b}{1994/11/10}
+% {(CAR) added extra \cs{relax}}
+% \changes{v1.1m}{1994/05/26}
+% {(CAR) added \cs{long}}
+% \begin{macro}{\repeat}
+% We use Kabelschacht's method of doing loops, see TUB 8\#2 (1987).
+% (unless that breaks something :-). It turned out to need an
+% extra |\relax|: see pr/642 (|\loop| could do one iteration too much
+% in certain cases).
+% \begin{macrocode}
+\long\def \loop #1\repeat{%
+ \def\iterate{#1\relax % Extra \relax
+ \expandafter\iterate\fi
+ }%
+ \iterate
+ \let\iterate\relax
+}
+% \end{macrocode}
+% This setting of |\repeat| is needed to make |\loop...\if...\repeat|
+% skippable within another |\if...|.
+% \begin{macrocode}
+\let\repeat=\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \LaTeX\ defines |\smallskip|, etc.\ in |ltspace.dtx|.
+%
+% \begin{macro}{\nointerlineskip}
+% \begin{macro}{\offinterlineskip}
+% \changes{v1.1n}{1995/07/02}{Replaced 1000 by \cs{@m}}
+% \begin{macrocode}
+\def\nointerlineskip{\prevdepth-\@m\p@}
+\def\offinterlineskip{\baselineskip-\@m\p@
+ \lineskip\z@ \lineskiplimit\maxdimen}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\vglue}
+% \begin{macro}{\hglue}
+% \begin{macrocode}
+\def\vglue{\afterassignment\vgl@\skip@=}
+\def\vgl@{\par \dimen@\prevdepth \hrule \@height\z@
+ \nobreak\vskip\skip@ \prevdepth\dimen@}
+\def\hglue{\afterassignment\hgl@\skip@=}
+\def\hgl@{\leavevmode \count@\spacefactor \vrule \@width\z@
+ \nobreak\hskip\skip@ \spacefactor\count@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \LaTeX\ defines |~| in |ltdefns.dtx|.
+%
+% \begin{macro}{\slash}
+% This generates a |/| acting a bit like |-| but still allows hyphenation
+% in the word part preceding it (but not after).
+% \begin{macrocode}
+\def\slash{/\penalty\exhyphenpenalty}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\break}
+% \begin{macro}{\nobreak}
+% \begin{macro}{\allowbreak}
+% \begin{macrocode}
+\def\break{\penalty-\@M}
+\def\nobreak{\penalty \@M}
+\def\allowbreak{\penalty \z@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\filbreak}
+% \begin{macro}{\goodbreak}
+% \begin{macrocode}
+\def\filbreak{\par\vfil\penalty-200\vfilneg}
+\def\goodbreak{\par\penalty-500 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\eject}
+% \changes{v1.1s}{1995/10/17}{Move \cs{supereject} to compat file}
+% Define |\eject| as in plain \TeX\ but define |\supereject| only in
+% the compatibility file.
+% \begin{macrocode}
+\def\eject{\par\break}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\removelastskip}
+% \begin{macrocode}
+\def\removelastskip{\ifdim\lastskip=\z@\else\vskip-\lastskip\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\smallbreak}
+% \begin{macro}{\medbreak}
+% \begin{macro}{\bigbreak}
+% \begin{macrocode}
+\def\smallbreak{\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi}
+\def\medbreak{\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi}
+\def\bigbreak{\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\m@th}
+% \changes{v1.0h}{1994/05/16}{Remove unnecessary space}
+% \begin{macrocode}
+\def\m@th{\mathsurround\z@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\underbar}
+% Due to \LaTeX's redefinition of |\underline| plain \TeX's
+% |\underbar| can be done in a simpler fashion (but do we
+% need it at all?).
+% \changes{v1.1m}{1994/05/26}
+% {(CAR/FMi) changed to use box \cs{tw@}}
+% \changes{v1.1p}{1994/05/26}
+% {(DPC) changed to use \cs{sbox}}
+% \begin{macrocode}
+\def\underbar#1{\underline{\sbox\tw@{#1}\dp\tw@\z@\box\tw@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\strutbox}
+% \begin{macro}{\strut}
+% \LaTeX\ sets |\strutbox| in |\set@fontsize|.
+% \begin{macrocode}
+\newbox\strutbox
+\def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hidewidth}
+% For alignment entries that can stick out.
+% \begin{macrocode}
+\def\hidewidth{\hskip\hideskip}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0h}{1994/05/16}{Remove unnecessary def for \cs{item}}
+% \changes{v1.1i}{1995/04/27}
+% {Move \cs{hang} and \cs{textindent} to latex209.def}
+% \changes{RmS}{1991/11/04}{Removed \cs{itemitem} since never
+% needed/useful with \LaTeX.}
+%
+% \begin{macro}{\narrower}
+% \begin{macrocode}
+\def\narrower{%
+ \advance\leftskip\parindent
+ \advance\rightskip\parindent}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.1c}{1994/11/12}{Comment out more encoding specific
+% commands}
+% \LaTeX\ defines |\ae| and similar commands elsewhere.
+%
+% \begin{macrocode}
+\chardef\%=`\%
+\chardef\&=`\&
+\chardef\#=`\#
+% \end{macrocode}
+%
+% Most text commands are actually encoding specific and therefore
+% defined later, so commented out or removed from this file.
+% \changes{v1.0h}{1994/05/16}{Comment out encoding specific commands}
+%
+% \begin{macro}{\leavevmode}
+% begins a paragraph, if necessary
+% \begin{macrocode}
+\def\leavevmode{\unhbox\voidb@x}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mathhexbox}
+% \begin{macrocode}
+\def\mathhexbox#1#2#3{\mbox{$\m@th \mathchar"#1#2#3$}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ialign}
+% \begin{macrocode}
+\def\ialign{\everycr{}\tabskip\z@skip\halign} % initialized \halign
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\oalign}
+% \begin{macro}{\o@lign}
+% \begin{macro}{\ooalign}
+% \begin{macrocode}
+\def\oalign#1{\leavevmode\vtop{\baselineskip\z@skip \lineskip.25ex%
+ \ialign{##\crcr#1\crcr}}}
+\def\o@lign{\lineskiplimit\z@ \oalign}
+\def\ooalign{\lineskiplimit-\maxdimen \oalign}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\sh@ft}
+% \changes{v1.1t}{1996/07/26}{replace \cs{dimen}\cs{z@} by
+% \cs{dimen@}}
+% \changes{v1.1y}{2005/09/27}{Macro no longer used but
+% left for compatibility}
+% The definition of this macro in plain.tex was improved in
+% about 1997; but as a result its usage was changed and its new
+% definition is not appropriate for \LaTeX{}.
+%
+% Since the version given here has been in use by
+% \LaTeX{} for many years it does not seem prudent to remove it now.
+% As far as we can tell it has only been used to define~|\b| and~|\d|
+% but this cannot be certain.
+% \begin{macrocode}
+\def\sh@ft#1{\dimen@.00#1ex\multiply\dimen@\fontdimen1\font
+ \kern-.0156\dimen@} % compensate for slant in lowered accents
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ltx@sh@ft}
+% \changes{v1.1y}{2005/09/27}{New macro}
+% This is the \LaTeX{} version of the second incarnation of the plain
+% macro |\sh@ft|, which takes a dimension as its argument. It shifts
+% a pseudo-accent horizontally by an amount proportional to the product
+% of its argument and the slant-per-point (fontdimen 1).
+%
+% \begin{macrocode}
+\def\ltx@sh@ft #1{%
+ \dimen@ #1%
+ \kern \strip@pt
+ \fontdimen1\font \dimen@
+ } % kern by #1 times the current slant
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \LaTeX{} change: the text commands such as
+% |\d|, |\b|, |\c|, |\copyright|,~|\TeX|
+% are now defined elsewhere.
+%
+% \changes{LaTeX2e}
+% {1993/11/29}{All accents in decimals; suggested by Paul Taylor}
+% \changes{v1.0d}{1994/04/12}
+% {Define \cs{@acci}}
+% \changes{v1.0h}{1994/05/16}{Remove \cs{@acci} and friends again}
+%
+% \LaTeX{} change: Make |\t| work in a moving argument.
+% Now defined elsewhere.
+%
+% \begin{macro}{\hrulefill}
+% \begin{macro}{\dotfill}
+% \LaTeX\ change: |\kern\z@| added to end of
+% |\hrulefill| and |\dotfill|
+% to make them work in `tabular' and `array' environments.
+% (Change made 24 July 1987).
+% \LaTeX\ change: |\leavevmode| added at beginning of
+% |\dotfill| and |\hrulefill|
+% so that they work as expected in vertical mode.
+% \begin{macrocode}
+\def\hrulefill{\leavevmode\leaders\hrule\hfill\kern\z@}
+% \end{macrocode}
+% The box in |\dotfill| originally contained (in plain.tex):\\
+% |\mkern 1.5mu .\mkern 1.5mu|;\\
+% the width of .44em differs from this
+% by .04pt which is probably an acceptable difference within leaders.
+% \changes{v1.1u}{1996/10/28}{Removed math mode}
+% \changes{v1.1v}{1996/10/29}{Got arithmetic correct (CAR)}
+% \changes{v1.1w}{1996/11/03}{Saved tokens by using \cs{hb@xt@}}
+% \begin{macrocode}
+\def\dotfill{%
+ \leavevmode
+ \cleaders \hb@xt@ .44em{\hss.\hss}\hfill
+ \kern\z@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% INITEX sets |\sfcode x=1000| for all x, except that |\sfcode`X=999|
+% for uppercase letters. The following changes are needed:
+% \begin{macrocode}
+\sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
+% \end{macrocode}
+% The |\nonfrenchspacing| macro will make further changes to
+% |\sfcode| values.
+%
+%
+% Definitions related to output
+%
+%
+% \changes{v1.1k}{1995/05/22}{Definitions of \cs{footins} and
+% \cs{footnoterule} moved to ltfloat.}
+%
+%
+% |\magnification| doesn't work in \LaTeX.
+%\begin{verbatim}
+%\def\magnification{\afterassignment\m@g\count@}
+%\def\m@g{\mag\count@
+% \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
+%\end{verbatim}
+%
+% \begin{macro}{\showoverfull}
+% \changes{v0.1k ltfinal}{1994/05/19}{used \cs{@ne} not 1}
+% The following commands are used in debugging:
+% \begin{macrocode}
+\def\showoverfull{\tracingonline\@ne}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\showoutput}
+% \changes{v0.1k ltfinal}{1994/05/19}
+% {used \cs{maxdimen} not 99999}
+% \changes{v1.1n}{1995/07/02}{Use \cs{showoverfull} to save space}
+% \changes{v1.1x}{2002/02/24}{Use newly added \cs{loggingoutput}}
+% \begin{macro}{\loggingoutput}
+% \changes{v1.1x}{2002/02/24}{Macro added}
+% \begin{macrocode}
+\gdef\loggingoutput{\tracingoutput\@ne
+ \showboxbreadth\maxdimen\showboxdepth\maxdimen\errorstopmode}
+\gdef\showoutput{\loggingoutput\showoverfull}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\tracingall}
+% \changes{LaTeX209}{1991/08/26}{Added
+% \cs{errorcontextlines}!=\cs{maxdimen}, suggested by J. Schrod}
+% \changes{v1.1n}{1995/07/02}{Use \cs{showoutput} to save space}
+% \changes{v1.1x}{2002/02/24}{Use newly added \cs{loggingoutput}}
+% \begin{macro}{\loggingall}
+% \changes{v1.1x}{2002/02/24}{Macro added}
+% \changes{v2.0b}{2012/01/20}{etex tracing if available}
+% \changes{v2.0d}{2015/02/20}{Spell commands correctly :-)}
+% \changes{v2.0g}{2015/03/10}{Reorganise to be less noisy}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}{\loggingall}{etex tracing}%
+%<*2ekernel|latexrelease>
+\ifx\tracingscantokens\@undefined
+\gdef\loggingall{%
+ \tracingstats\tw@
+ \tracingpages\@ne
+ \tracinglostchars\@ne
+ \tracingparagraphs\@ne
+ \errorcontextlines\maxdimen
+ \loggingoutput
+ \tracingmacros\tw@
+ \tracingcommands\tw@
+ \tracingrestores\@ne
+ }%
+\else
+\gdef\loggingall{%
+ \tracingstats\tw@
+ \tracingpages\@ne
+ \tracinglostchars\tw@
+ \tracingparagraphs\@ne
+ \tracinggroups\@ne
+ \tracingifs\@ne
+ \tracingscantokens\@ne
+ \tracingnesting\@ne
+ \errorcontextlines\maxdimen
+ \loggingoutput
+ \tracingmacros\tw@
+ \tracingcommands\thr@@
+ \tracingrestores\@ne
+ \tracingassigns\@ne
+}%
+\fi
+\gdef\tracingall{\showoverfull\loggingall}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\loggingall}{etex tracing}%
+%<latexrelease>\gdef\loggingall{\tracingcommands\tw@\tracingstats\tw@
+%<latexrelease> \tracingpages\@ne\tracinglostchars\@ne
+%<latexrelease> \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne
+%<latexrelease> \errorcontextlines\maxdimen\loggingoutput}
+%<latexrelease> \gdef\tracingall{\loggingall\showoverfull}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\tracingnone}
+% \changes{v2.0g}{2015/03/10}{macro added}
+% \begin{macro}{\hideoutput}
+% \changes{v2.0g}{2015/03/10}{macro added}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}{\tracingnone}%
+%<latexrelease> {turn off etex tracing}%
+%<*2ekernel|latexrelease>
+\ifx\tracingscantokens\@undefined
+\def\tracingnone{%
+ \tracingonline\z@
+ \tracingcommands\z@
+ \showboxdepth\m@ne
+ \showboxbreadth\m@ne
+ \tracingoutput\z@
+ \errorcontextlines\m@ne
+ \tracingrestores\z@
+ \tracingparagraphs\z@
+ \tracingmacros\z@
+ \tracinglostchars\@ne
+ \tracingpages\z@
+ \tracingstats\z@
+}%
+\else
+\def\tracingnone{%
+ \tracingassigns\z@
+ \tracingrestores\z@
+ \tracingonline\z@
+ \tracingcommands\z@
+ \showboxdepth\m@ne
+ \showboxbreadth\m@ne
+ \tracingoutput\z@
+ \errorcontextlines\m@ne
+ \tracingnesting\z@
+ \tracingscantokens\z@
+ \tracingifs\z@
+ \tracinggroups\z@
+ \tracingparagraphs\z@
+ \tracingmacros\z@
+ \tracinglostchars\@ne
+ \tracingpages\z@
+ \tracingstats\z@
+}%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\hideoutput{%
+ \tracingoutput\z@
+ \showboxbreadth\m@ne
+ \showboxdepth\m@ne
+ \tracingonline\m@ne
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\tracingnone}%
+%<latexrelease> {turn off etex tracing}%
+%<latexrelease>\let\tracingnone\@undefined
+%<latexrelease>\let\hideoutput\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \LaTeX\ change: |\showhyphens| Defined later.
+%
+% Punctuation affects the spacing.
+% \begin{macrocode}
+%<*2ekernel>
+\nonfrenchspacing
+%</2ekernel>
+% \end{macrocode}
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltsect.dtx b/macros/latex-dev/base/ltsect.dtx
new file mode 100644
index 0000000000..cb1c6d2c30
--- /dev/null
+++ b/macros/latex-dev/base/ltsect.dtx
@@ -0,0 +1,948 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltsect.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltsect.dtx}[2018/09/26 v1.1c LaTeX Kernel (Sectioning)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltsect.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Tobias Oetiker\thanks{Tobi updated
+ the comments to `doc' conventions}\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0o}{1995/05/07}{Use \cs{hb@xt@}}
+% \changes{v1.0y}{1996/10/31}{Corrected and tidied documentation;
+% removed long lines}
+%
+%
+% \section{Sectioning Commands}
+%
+% This file defines the declarations such as |\author| which are used
+% by |\maketitle|. |\maketitle| itself is defined by each class, not
+% in the \LaTeX{} kernel.
+%
+% The second part of the file defines the generic commands used for
+% defining sectioning commands such as |\chapter|. Again the actual
+% document level commands are defined in the class files, in terms of
+% these commands.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/04}{Initial version, split from latex.dtx}
+% \changes{v1.0b}{1994/03/28}{Split further from ltherest.dtx}
+% \changes{v1.0d}{1994/05/21}{Use new error commands}
+% \changes{v1.0f}{1994/10/12}{Doc. typos}
+% \changes{v1.0g}{1994/10/18}{Added \cs{normalcolor}}
+% \changes{v1.0i}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v1.0m}{1995/05/03}{TO: Promoted documentation to doc.sty
+% standard}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{title,}
+% \end{macrocode}
+%
+% \subsection{The Title}
+%
+% \DescribeMacro{\title}
+% The user defines the title and author by the declarations
+% |\title|\marg{name},
+% \DescribeMacro{\author}
+% |\author|\marg{name}
+%
+% \DescribeMacro{\date}
+% Similarly the date is declared with
+% |\date|\marg{date}.
+%
+% \DescribeMacro{\thanks}
+% Inside these, the |\thanks|\marg{footnote text} command may be used
+% to make acknowledgements, notice of address, etc.\ in a footnote.
+% \DescribeMacro{\and}
+% If there are multiple authors, they have to be separated with the
+% |\and| command.
+%
+% \DescribeMacro{\maketitle}
+% And finally, the |\maketitle| command produces the actual title,
+% using the information previously saved with the other commands.
+%
+% \begin{macro}{\title}
+% \begin{macro}{\@title}
+% \changes{LaTeX2e}{1993/12/11}{Added default}
+% |\title| for use in |\maketitle|. If not given |\maketitle| will
+% produce an error message.
+% \begin{macrocode}
+\def\title#1{\gdef\@title{#1}}
+\def\@title{\@latex@error{No \noexpand\title given}\@ehc}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\author}
+% \begin{macro}{\@author}
+% \changes{LaTeX2e}{1993/12/11}{Added default}
+%
+% |\author| for use in |\maketitle|. If not given |\maketitle| will
+% produce a warning message.
+%
+% \begin{macrocode}
+\def\author#1{\gdef\@author{#1}}
+\def\@author{\@latex@warning@no@line{No \noexpand\author given}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\date}
+% \begin{macro}{\@date}
+% |\date| for use in |\maketitle|. If not given |\maketitle| will
+% produce |\today| as the default.
+% \begin{macrocode}
+\def\date#1{\gdef\@date{#1}}
+\gdef\@date{\today}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{1.0h}{1994/11/04}{(ASAJ) Added \cs{protected@xdef} to
+% \cs{thanks}.}
+% \begin{macro}{\thanks}
+% \begin{macrocode}
+\def\thanks#1{\footnotemark
+ \protected@xdef\@thanks{\@thanks
+ \protect\footnotetext[\the\c@footnote]{#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@thanks}
+% \begin{macrocode}
+\let\@thanks\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\and}
+% \begin{macrocode}
+\def\and{% % \begin{tabular}
+ \end{tabular}%
+ \hskip 1em \@plus.17fil%
+ \begin{tabular}[t]{c}}% % \end{tabular}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\message{sectioning,}
+% \end{macrocode}
+% \subsection{Sectioning}
+%
+%
+% \begin{macro}{\@secpenalty}
+% \begin{macrocode}
+\newcount\@secpenalty
+\@secpenalty = -300
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@noskipsec}
+% \begin{macro}{\@noskipsectrue}
+% \changes{1.0w}{1996/09/29}{Added documentation}
+% Way back in 1991 (08/26) FMi \& RmS set the |\@noskipsec| switch
+% to true for the preamble and to false in |\document|.
+% This was done to trap lists and related text in the preamble but it
+% does not catch everything.
+% \begin{macrocode}
+\newif\if@noskipsec \@noskipsectrue
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@startsection}
+%
+% The |\@startsection{|\meta{name}|}{|\meta{level}|}{|%
+% \meta{indent}|}{|\meta{beforeskip}|}|\\
+% |{|\meta{afterskip}|}{|\meta{style}|}*[|\meta{altheading}%
+% |]{|\meta{heading}|}|
+% command is the mother of all the user level sectioning commands.
+% The part after the |*|, including the |*| is optional.
+%
+% \begin{description}
+% \item[name:] e.g., 'subsection'
+% \item[level:] a number, denoting depth of section -- e.g.,
+% chapter = 0, section = 1, etc.
+% \item[indent:] Indentation of heading from left margin
+% \item[beforeskip:] Absolute value = skip to leave above the heading.
+% If negative, then paragraph indent of text following
+% heading is suppressed.
+% \item[afterskip:] if positive, then skip to leave below heading, else
+% negative of skip to leave to right of run-in heading.
+% \item[style:] Commands to set style. Since June 1996 release the
+% \emph{last} command in this argument may be a command
+% such as |\MakeUppercase| or |\fbox| that takes an
+% argument. The section heading will be supplied as the
+% argument to this command. So setting |#6| to, say,
+% |\bfseries\MakeUppercase| would produce bold,
+% uppercase headings.
+% \end{description}
+%
+% If `|*|' is missing, then increment the counter. If it is
+% present, then there should be no |[|\meta{altheading}|]| argument.
+% The command uses the counter 'secnumdepth'. It contains a pointer
+% to the highest section level that is to be numbered.
+%
+% \textbf{Warning:}
+% The |\@startsection| command should be at the same or higher
+% grouping level as the text that follows it. For example, you should
+% \emph{not} do something like
+% \begin{verbatim}
+% \def\foo{ \begingroup ...
+% \paragraph{...}
+% \endgroup}
+% \end{verbatim}
+%
+% Pseudocode for the |\@startsection| command
+% \begin{oldcomments}
+% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} ==
+% BEGIN
+% IF @noskipsec = T THEN \leavevmode FI
+% % true if previous section had no body.
+%
+% \par
+% \@tempskipa := BEFORESKIP
+% @afterindent := T
+% IF \@tempskipa < 0 THEN \@tempskipa := -\@tempskipa
+% @afterindent := F
+% FI
+% IF @nobreak = true
+% THEN \everypar == null
+% ELSE \addpenalty{\@secpenalty}
+% \addvspace{\@tempskipa}
+% FI
+% IF * next
+% THEN \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
+% ELSE \@dblarg{\@sect
+% {NAME}{LEVEL}{INDENT}
+% {BEFORESKIP}{AFTERSKIP}{STYLE}}
+% FI
+% END
+% \end{oldcomments}
+%
+% \begin{macrocode}
+\def\@startsection#1#2#3#4#5#6{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \@tempskipa #4\relax
+ \@afterindenttrue
+ \ifdim \@tempskipa <\z@
+ \@tempskipa -\@tempskipa \@afterindentfalse
+ \fi
+ \if@nobreak
+ \everypar{}%
+ \else
+ \addpenalty\@secpenalty\addvspace\@tempskipa
+ \fi
+ \@ifstar
+ {\@ssect{#3}{#4}{#5}{#6}}%
+ {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@sect}
+% Pseudocode for the |\@sect| command
+% \begin{oldcomments}
+% \@sect{NAME}{LEVEL}
+% {INDENT}{BEFORESKIP}{AFTERSKIP}
+% {STYLE}[ARG1]{ARG2}
+% ==
+% BEGIN
+% IF LEVEL > \c@secnumdepth
+% THEN \@svsec :=L null
+% ELSE \refstepcounter{NAME}
+% \@svsec :=L BEGIN \@seccntformat{#1}\relax END
+% FI
+% IF AFTERSKIP > 0
+% THEN \begingroup
+% STYLE
+% \@hangfrom{\hskip INDENT\@svsec}
+% {\interlinepenalty 10000 ARG2\par}
+% \endgroup
+% \NAMEmark{ARG1}
+% \addcontentsline{toc}{NAME}
+% { IF LEVEL > \c@secnumdepth
+% ELSE \protect\numberline{\theNAME} FI
+% ARG1 }
+% ELSE \@svsechd == BEGIN STYLE
+% \hskip INDENT\@svsec
+% ARG2
+% \NAMEmark{ARG1}
+% \addcontentsline{toc}{NAME}
+% { IF LEVEL > \c@secnumdepth
+% ELSE
+% \protect\numberline{\theNAME}
+% FI
+% ARG1 }
+% END
+% FI
+% \@xsect{AFTERSKIP}
+% END
+% \end{oldcomments}
+%
+% \changes{LaTeX2.09}{1992/08/25}
+% {(FMi) replaced explicit setting of \cs{@svsec}
+% by call to \cs{@seccntformat}}
+% \changes{LaTeX2.09}{1993/08/05}
+% {(RmS) Made sure that \cs{protect} works correctly in
+% expansion of \cs{the} counter}
+% \changes{1.0h}{1994/11/04}
+% {(ASAJ) Added \cs{protected@edef}.}
+% \begin{macrocode}
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+% \end{macrocode}
+% Since |\@seccntformat| might end with an improper |\hskip| which
+% is scanning forward for |plus| or |minus| we end the definition
+% of |\@svsec| with |\relax| as a precaution.
+% \changes{1.0n}{1995/05/06}{Added \cs{relax} after
+% \cs{@seccntformat} just in case}
+% \begin{macrocode}
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+% \end{macrocode}
+% \changes{v1.0s}{1996/05/21}
+% {(DPC) Moved brace to allow commands like
+% \cs{MakeUppercase} in 6th argument.
+% Changed \cs{par} to \cs{endgraf} to allow non-long
+% commands. internal/2148}
+% \changes{v1.0t}{1996/06/10}
+% {(DPC) Changed \cs{endgraf} to \cs{@@par}}
+% This |{| used to be after the argument to |\@hangfrom| but was moved
+% here to allow commands such as |\MakeUppercase| to be used at the end
+% of |#6|.
+% \begin{macrocode}
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M #8\@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}%
+ \fi
+ #7}%
+ \else
+% \end{macrocode}
+% |\relax| added 2 May 90
+% \changes{v1.0s}{1996/05/21}
+% {(DPC) Added extra braces for internal/2148}
+% \begin{macrocode}
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec #8}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}%
+ \fi
+ #7}}%
+ \fi
+ \@xsect{#5}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xsect}%
+% Pseudocode for the |\@xsect| command
+% \begin{oldcomments}
+% \@xsect{AFTERSKIP} ==
+% BEGIN
+% IF AFTERSKIP > 0
+% THEN \par \nobreak
+% \vskip AFTERSKIP
+% \@afterheading
+% ELSE @nobreak :=G F
+% @noskipsec :=G T
+% \everypar{ IF @noskipsec = T
+% THEN @noskipsec :=G F
+% \clubpenalty := 10000 % local
+% \hskip -\parindent
+% \begingroup
+% \@svsechd
+% \endgroup
+% \unskip
+% \hskip -AFTERSKIP \relax
+% %% relax added 14 Jan 91
+% ELSE \clubpenalty := \@clubpenalty % local
+% \everypar := NULL
+% FI
+% }
+% FI
+%
+% END
+% \end{oldcomments}
+%
+% \changes{0.0}{1992/08/19}
+% {(RmS) corrected bug: stretch and shrink in argument to
+% \cs{hskip} previously not negated}
+% \begin{macrocode}
+\def\@xsect#1{%
+ \@tempskipa #1\relax
+ \ifdim \@tempskipa>\z@
+% \end{macrocode}
+% Why not combine |\@sect| and |\@xsect| and save doing the
+% same test twice? It is not possible to change this now as these
+% have become hooks!
+%
+% This |\par| seems unnecessary.
+% \begin{macrocode}
+ \par \nobreak
+ \vskip \@tempskipa
+ \@afterheading
+ \else
+% \end{macrocode}
+% \changes{v1.0u}{1996/07/26}{Removed \cs{global} before
+% \cs{@nobreak...}}
+% \changes{v1.0x}{1996/10/23}{Replaced \cs{hskip...} with \cs{setbox...}
+% as used in \cs{@afterheading}}
+% \begin{macrocode}
+ \@nobreakfalse
+ \global\@noskipsectrue
+ \everypar{%
+ \if@noskipsec
+ \global\@noskipsecfalse
+ {\setbox\z@\lastbox}%
+ \clubpenalty\@M
+ \begingroup \@svsechd \endgroup
+ \unskip
+ \@tempskipa #1\relax
+ \hskip -\@tempskipa
+ \else
+ \clubpenalty \@clubpenalty
+ \everypar{}%
+ \fi}%
+ \fi
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@seccntformat}
+% This command formats the section number including the space
+% following it.
+% \changes{1.0n}{1995/05/06}{Use \cs{quad} instead of \cs{hskip}}
+% \begin{macrocode}
+\def\@seccntformat#1{\csname the#1\endcsname\quad}
+% \end{macrocode}
+% \end{macro}
+%
+% Pseudocode for the |\@ssect| command
+% \begin{oldcomments}
+% \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}{ARG} ==
+% BEGIN
+% IF AFTERSKIP > 0
+% THEN \begingroup
+% STYLE
+% \@hangfrom{\hskip INDENT}
+% {\interlinepenalty 10000 ARG\par}
+% \endgroup
+% ELSE \@svsechd == BEGIN STYLE
+% \hskip INDENT
+% ARG
+% END
+% FI
+% \@xsect{AFTERSKIP}
+% END
+% \end{oldcomments}
+%
+% Pseudocode for the |\@afterheading| command
+% \begin{oldcomments}
+% \@afterheading ==
+% BEGIN
+% @nobreak :=G true
+% \everypar := BEGIN IF @nobreak = T
+% THEN @nobreak :=G false
+% \clubpenalty := 10000 % local
+% IF @afterindent = F
+% THEN remove \lastbox
+% FI
+% ELSE \clubpenalty := \@clubpenalty % local
+% \everypar := NULL
+% FI
+% END
+% END
+% \end{oldcomments}
+%
+%
+% \begin{macro}{\@ssect}
+% \begin{macrocode}
+\def\@ssect#1#2#3#4#5{%
+ \@tempskipa #3\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+% \end{macrocode}
+% \changes{v1.0s}{1996/05/21}
+% {(DPC) Moved brace to allow commands like
+% \cs{MakeUppercase} in 4th argument.
+% Changed \cs{par} to \cs{endgraf} to allow non-long
+% commands. internal/2148}
+% \changes{v1.0t}{1996/06/10}
+% {(DPC) Changed \cs{endgraf} to \cs{@@par}}
+% This |{| used to be after the argument to |\@hangfrom| but was moved
+% here to allow commands such as |\MakeUppercase| to be used at the end
+% of |#4|.
+% \begin{macrocode}
+ #4{%
+ \@hangfrom{\hskip #1}%
+ \interlinepenalty \@M #5\@@par}%
+ \endgroup
+ \else
+% \end{macrocode}
+% \changes{v1.0s}{1996/05/21}
+% {(DPC) Added extra braces for internal/2148}
+% \begin{macrocode}
+ \def\@svsechd{#4{\hskip #1\relax #5}}%
+ \fi
+ \@xsect{#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@afterindent}
+% \begin{macro}{\@afterindenttrue}
+% \begin{macrocode}
+\newif\if@afterindent \@afterindenttrue
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\@afterheading}
+% \changes{v1.0v}{1996/08/02}{Removed \cs{global}
+% before \cs{@nobreak...}}
+%
+% This hook is used in setting up custom-built headings in classes.dtx.
+%
+% \begin{macrocode}
+\def\@afterheading{%
+ \@nobreaktrue
+ \everypar{%
+ \if@nobreak
+ \@nobreakfalse
+ \clubpenalty \@M
+ \if@afterindent \else
+ {\setbox\z@\lastbox}%
+ \fi
+ \else
+ \clubpenalty \@clubpenalty
+ \everypar{}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@hangfrom}
+%
+% |\@hangfrom{|\meta{text}|}| : Puts \meta{text} in a box, and makes a
+% hanging indentation of the following material up to the first
+% |\par|. Should be used in vertical mode.
+%
+% \changes{v1.0a}{1994/03/07}{(DPC)Extra groups for colour}
+% \begin{macrocode}
+\def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
+ \hangindent \wd\@tempboxa\noindent\box\@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@secnumdepth}
+% \begin{macro}{\c@tocdepth}
+% \begin{macrocode}
+\newcount\c@secnumdepth
+\newcount\c@tocdepth
+% \end{macrocode}
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\secdef}
+%
+% |\secdef{|\meta{unstarcmds}|}{|\meta{unstarcmds}|}{|%
+% \meta{starcmds}|}|\\
+% When defining a |\chapter| or |\section| command without using
+% |\@startsection|, you can use |\secdef| as follows:
+% \begin{enumerate}
+% \item |\def\chapter{| \ldots |\secdef|
+% |\|\meta{starcmd} |\|\meta{unstarcmd} |}|
+% \item |\def\|\meta{starcmd}|[#1]#2{| \ldots |}|
+% |%| Command to define |\chapter[|\ldots|]{|\ldots|}|
+% \item |\def\|\meta{unstarcmd}|#1{| \ldots |}|
+% |%| Command to define |\chapter*{|\ldots|}|
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\secdef#1#2{\@ifstar{#2}{\@dblarg{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Initializations}
+% \begin{macro}{\sectionmark}
+% \begin{macro}{\subsectionmark}
+% \begin{macro}{\subsubsectionmark}
+% \begin{macro}{\paragraphmark}
+% \begin{macro}{\subparagraphmark}
+% \changes{v1.0q}{1995/10/25}{Use \cs{let} not \cs{def} to save space.}
+% \begin{macrocode}
+\let\sectionmark\@gobble
+\let\subsectionmark\@gobble
+\let\subsubsectionmark\@gobble
+\let\paragraphmark\@gobble
+\let\subparagraphmark\@gobble
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\message{contents,}
+% \end{macrocode}
+%
+% \subsection{Table of Contents etc.}
+%
+% \subsubsection{Convention}
+% |\tf@|\meta{foo} = file number for output for table foo.
+% The file is opened only if |@filesw| = |true|.
+%
+% \subsubsection{Commands}
+%
+%
+% A |\l@|\meta{type}|{|\meta{entry}|}{|\meta{page}|}| Macro needs to
+% defined by document style for making an entry of type \meta{type}
+% in a table of contents, etc. E.g., the document style
+% should define |\l@chapter|, |\l@section|, etc.
+%
+% \textbf{Note:} When the |\protect| command is
+% used in the \meta{entry} or \meta{text} of one of the commands
+% below, it causes the following control sequence to be written on
+% the file without being expanded. The sequence will be expanded
+% when the table of contents entry is processed.
+%
+% \textbf{Surprise:} Inside an |\addcontentsline| or |\addtocontents|
+% command argument, the commands: |\index|, |\glossary|, and |\label|
+% are no-ops . This could cause a problem if the user puts an
+% |\index| or |\label| into one of the commands he writes, or into the
+% optional `short version' argument of a |\section| or |\caption|
+% command.
+%
+% \begin{macro}{\@starttoc}
+% The |\@starttoc|\marg{ext} command is used to define the commands:\\
+% |\tableofcontents|, |\listoffigures|, etc.
+%
+% For example:
+% |\@starttoc{lof}| is used in |\listoffigures|. This command
+% reads the |.|\meta{ext} file and sets up to write the new
+% |.|\meta{ext} file.
+%
+% \begin{oldcomments}
+% \@starttoc{EXT} ==
+% BEGIN
+% \begingroup
+% \makeatletter
+% read file \jobname.EXT
+% IF @filesw = true
+% THEN open \jobname.EXT as file \tf@EXT
+% FI
+% @nobreak :=G FALSE %% added 24 May 89
+% \endgroup
+% END
+% \end{oldcomments}
+%
+% \changes{0.0}{1992/01/14}{(RmS) added \cs{immediate} to \cs{openout}
+% as all \cs{write} commands
+% are also executed \cs{immediate}}
+% \changes{v1.0u}{1996/07/26}{removed \cs{global}
+% before \cs{@nobreak...}}
+% \begin{macrocode}
+\def\@starttoc#1{%
+ \begingroup
+ \makeatletter
+ \@input{\jobname.#1}%
+ \if@filesw
+ \expandafter\newwrite\csname tf@#1\endcsname
+ \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
+ \fi
+ \@nobreakfalse
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\addcontentsline}
+% The |\addcontentsline{|\meta{table}|}{|\meta{type}|}{|%
+% \meta{entry}|}| command allows the user to add
+% his/her own entry to a table of contents, etc. The command adds the
+% entry |\contentsline{|\meta{type}|}{|\meta{entry}|}{|\meta{page}|}|
+% to the |.|\meta{table} file.
+%
+% This macro is implemented as an application of |\addtocontents|.
+% Note that |\thepage| is not expandable during |\protected@write|
+% therefore one gets the page number at the time of the |\shipout|.
+%
+% \changes{v1.0c}{1994/05/20}{Correct setting of \cs{protect}.}
+% \changes{v1.0j}{1995/04/23}{Use \cs{contentsline} internally.}
+% \changes{v1.0h}{1994/11/04}{Added \cs{protected@write} to
+% \cs{addcontentsline}. ASAJ.}
+% \changes{v1.1c}{2018/09/26}{Sometimes mask the endline char when
+% writing to files (github/73)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\addcontentsline}{Mask line endings}%
+\def\addcontentsline#1#2#3{%
+ \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
+% \end{macrocode}
+% We add \cs{protected@file@percent} at the end which is turned om
+% \cs{@writefile} into a percent character to mask the newline after
+% the closing argument brace.
+% \begin{macrocode}
+ \protected@file@percent}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\addcontentsline}{Mask line endings}%
+%<latexrelease>\def\addcontentsline#1#2#3{%
+%<latexrelease> \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.0c}{1994/05/20}{Correct setting of \cs{protect}.}
+% \changes{v1.0h}{1994/11/04}{Added \cs{protected@write} to
+% \cs{addtocontents}. ASAJ.}
+% \begin{macro}{\addtocontents}
+%
+% The |\addtocontents{|\meta{table}|}{|\meta{text}|}| command
+% adds \meta{text} to the |.|\meta{table} file, with no
+% page number.
+%
+% \begin{macrocode}
+\long\def\addtocontents#1#2{%
+ \protected@write\@auxout
+ {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}%
+ {\string\@writefile{#1}{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\contentsline}
+% The |\contentsline{|\meta{type}|}{|\meta{entry}|}{|\meta{page}|}|
+% macro produces a \meta{type} entry in a table of contents, etc.
+% It will appear in the |.toc| or other file. For example,
+% The entry for subsection 1.4.3 in the table of contents for
+% example, might be produced by:
+%
+% \begin{verbatim}
+% \contentsline{subsection}
+% {\makebox{30pt}[r]{1.4.3} Gnats and Gnus}{22}
+% \end{verbatim}
+%
+% The |\protect| command causes command sequences to be written
+% without expanding them.
+%
+% \begin{macrocode}
+\def\contentsline#1{\csname l@#1\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|\meta{numwidth}%
+% |}{|\meta{title}|}{|\meta{page}|}|:
+% Macro to produce a table of contents line with the following
+% parameters:
+% \begin{description}
+% \item[level] If \meta{level} $>$ |\c@tocdepth|, then no line
+% produced.
+% \item[indent] Total indentation from the left margin.
+% \item[numwidth] Width of box for number if the \meta{title} has a
+% |\numberline| command.
+% As of 25 Jan 1988, this is also the amount of extra
+% indentation added to second and later lines of a
+% multiple line entry.
+% \item[title] Contents of entry.
+% \item[page] Page number.
+% \end{description}
+%
+% Uses the following parameters, which must be set by the document
+% style. They should be defined with |\def|'s.
+% \begin{description}
+% \item[|\@pnumwidth|] Width of box in which page number is set.
+% \item[|\@tocrmarg|] Right margin indentation for all but last line
+% of multiple-line entries.
+% \item[|\@dotsep|] Separation between dots, in mu units.
+% Should be |\def|'d to a number like 2 or 1.7
+% \end{description}
+%
+% \begin{macro}{\@dottedtocline}
+% \changes{LaTeX2.09}{1991/09/29}
+% {(RmS) added \cs{reset@font} for page number}
+% \changes{v1.0e}{1994/05/25}{Put braces around argument 4
+% (the actual toc entry) to avoid font (and possibly other)
+% changes leaking out to the leaders.}
+% \changes{v1.0g}{1994/10/18}{Added \cs{normalcolor} for page number}
+% \changes{v1.0z}{1996/12/20}{Added \cs{nobreak} for latex/2343}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\@dottedtocline}{Prevent protrusion}%
+\def\@dottedtocline#1#2#3#4#5{%
+ \ifnum #1>\c@tocdepth \else
+ \vskip \z@ \@plus.2\p@
+ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
+ \parindent #2\relax\@afterindenttrue
+ \interlinepenalty\@M
+ \leavevmode
+ \@tempdima #3\relax
+% \end{macrocode}
+% \changes{v1.0z}{1996/12/20}{Added \cs{nobreak} for latex/2343}
+% \begin{macrocode}
+ \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
+ {#4}\nobreak
+ \leaders\hbox{$\m@th
+% \end{macrocode}
+% If a document uses fonts other than computer modern, the use of a
+% dot from math can be very disturbing despite the fact that this
+% might be the only place in a document that then uses computer
+% modern.
+% Therefore we surround the dot with an |\hbox| to escape to the
+% surrounding text font.
+% \changes{v1.0k}{1995/04/25}{Added \cs{hbox} around dots.}
+% \changes{v1.0l}{1995/05/02}{Don't reset to \cs{rmfamily}}
+% \begin{macrocode}
+ \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
+ mu$}\hfill
+ \nobreak
+ \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5%
+% \end{macrocode}
+% We finish off by preventing
+% any protrusion if that is enabled. If protrusion happens the
+% number may shift to the right and as a result you may end up with
+% an additional dot in the toc line in some situations.
+% \changes{v1.1b}{2018/09/02}{Prevent protrusion
+% (\url{https://tex.stackexchange.com/q/172785/10109})}
+% \begin{macrocode}
+ \kern-\p@\kern\p@}%
+ \par}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+% \begin{macro}{\noprotrusion}
+% This command, if placed directly to the right (or left) of a
+% word, will prevent prevent protrusion of that word into the
+% margin. It is used in the toc entry lines as they shouldn't
+% protrude. It is implemented as to kerns that cancel each other
+% but being there hide the word so that protrusion is not
+% added. Note that a zero kern or an empty box would not work as
+% the protrusion mechanism will skip over those.
+% \begin{macrocode}
+\DeclareRobustCommand\noprotrusion{\leavevmode\kern-\p@\kern\p@}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@dottedtocline}{Prevent protrusion}%
+%<latexrelease>\def\@dottedtocline#1#2#3#4#5{%
+%<latexrelease> \ifnum #1>\c@tocdepth \else
+%<latexrelease> \vskip \z@ \@plus.2\p@
+%<latexrelease> {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
+%<latexrelease> \parindent #2\relax\@afterindenttrue
+%<latexrelease> \interlinepenalty\@M
+%<latexrelease> \leavevmode
+%<latexrelease> \@tempdima #3\relax
+%<latexrelease> \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
+%<latexrelease> {#4}\nobreak
+%<latexrelease> \leaders\hbox{$\m@th
+%<latexrelease> \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
+%<latexrelease> mu$}\hfill
+%<latexrelease> \nobreak
+%<latexrelease> \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
+%<latexrelease> \par}%
+%<latexrelease> \fi}
+%<latexrelease>
+%<latexrelease>\let\noprotrusion\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \textbf{Note:} |\nobreak|'s added 7 Jan 86 to prevent bad line break
+% that left the page number dangling by itself at left edge of a new
+% line.
+%
+% Changed 25 Jan 88 to use |\leftskip| instead of |\hangindent| so
+% leaders of multiple-line contents entries would line up properly.
+% \begin{macro}{\numberline}
+% |\numberline{|\meta{number}|}|: For use in a |\contentsline| command.
+% It puts \meta{number} flushleft in a box of width |\@tempdima|
+% (Before 25
+% Jan 88 change, it also added |\@tempdima| to the hanging
+% indentation.)
+%
+% \begin{macrocode}
+\def\numberline#1{\hb@xt@\@tempdima{#1\hfil}}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltspace.dtx b/macros/latex-dev/base/ltspace.dtx
new file mode 100644
index 0000000000..6f212bba15
--- /dev/null
+++ b/macros/latex-dev/base/ltspace.dtx
@@ -0,0 +1,1210 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltspace.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltspace.dtx}
+ [2018/10/10 v1.3i LaTeX Kernel (spacing)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltspace.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
+% \changes{v1.2f}{1995/05/25}{Macros moved to ltlists.dtx}
+% \changes{v1.2n}{1996/04/22}{Documentation Improvements}
+% \changes{v1.2o}{1996/06/22}{Documentation of problems added}
+% \changes{v1.2q}{1996/07/27}{Further documentation of problems}
+% \changes{v1.2r}{1996/07/27}{Correct documentation of problems}
+% \changes{v1.2w}{1998/08/17}{Documentation fixes.}
+%
+%
+% \section{Spacing}
+%
+% This section deals with spacing, and line- and page-breaking.
+%
+% \subsection{User Commands}
+%
+% \DescribeMacro\nopagebreak\oarg{i} : \meta{i} = 0,...,4.
+%
+% Default argument = 4. Puts a penalty into the vertical list
+% output as follows:\\
+% 0 : penalty = 0\\
+% 1 : penalty = |\@lowpenalty|\\
+% 2 : penalty = |\@medpenalty|\\
+% 3 : penalty = |\@highpenalty|\\
+% 4 : penalty = 10000
+%
+% \DescribeMacro\pagebreak\oarg{i} :
+% same as \nopagebreak except negatives of its penalty
+%
+% \DescribeMacro\linebreak\oarg{i} : analog of the above
+%
+% \DescribeMacro\nolinebreak\oarg{i} : analog of the above
+%
+% \DescribeMacro\samepage :
+% inhibits page breaking most places by setting the
+% following penalties to 10000:\\
+% |\interlinepenalty|\\
+% |\postdisplaypenalty|\\
+% |\interdisplaylinepenalty|\\
+% |\@beginparpenalty|\\
+% |\@endparpenalty|\\
+% |\@itempenalty|\\
+% |\@secpenalty|\\
+% |\interfootnotelinepenalty|
+%
+% \DescribeMacro{\\} : initially defined to be |\newline|
+%
+% |\\|\oarg{length} : initially defined to be
+% |\vspace|\marg{length}|\newline|\\
+% Note: |\\*| adds a |\vadjust{\penalty 10000}|
+%
+% OBSOLETE COMMANDS (which never made it into the manual):
+%
+% |\obeycr| : defines <CR> == |\\\relax|\\
+% |\restorecr| : restores <CR> to its usual meaning.
+%
+%
+% \StopEventually{}
+%
+% \subsection{Chris' comments}
+%
+% There are several aspects of the handling of space in horizontal
+% mode that are inconsistent or do not work well in some cases.
+% These are largely concerned with ignoring the effect of space
+% tokens that would otherwise typeset an inter-word space.
+%
+% Negating the effect of such space tokens is achieved by two
+% mechanisms:
+% \begin{itemize}
+% \item |\unskip| is used to remove the glue just added by
+% a space that has already had its effect; it is sometimes
+% invoked after an |\ifdim| test on |\lastskip| (see below);
+% \item |\ignorespaces| is used to ignore space-tokens yet to come.
+% \end{itemize}
+%
+% The test done on |\lastskip| is sometimes for equality with zero and
+% sometimes for being positive. Recall also that the test is only on
+% the natural length of the glue and that no glue cannot be
+% distinguished from glue whose natural length is zero: to summarise,
+% a pretty awful test. It is not clear why these tests are not all
+% the same; I think that they should all be for equality. One place
+% where |\unskip| is often used is just before a |\par| (which itself
+% internally does an |\unskip|) and one bit of code (in |\@item|) even
+% has two |\unskips| before a |\par|. These uses may be fossil code
+% but if they are necessary, maybe |\@killglue| would be even safer.
+%
+% Such removal of glue by |\unskip| may sometimes have the wrong result,
+% removing not the glue from a space-token but other explicit glue;
+% this is sometimes not what is intended.
+%
+% A common way to prevent such removal is to add an |\hskip\z@| after
+% the glue that should not be removed. This protects that glue
+% against one |\unskip| with no test but not against more than one.
+% It does work for `tested |\unskip|s'. This is used
+% by |\hspace*| but not by |\hspace|; this is inconsistent as the star
+% is supposed to prevent removal only at the beginning of a line, not
+% at the end, or in a tabular, etc.
+%
+% If this reason for removing glue were the only consideration then a
+% tested-|\unskip| and protection by |\hskip\z@| would suffice but
+% would need to be consistently implemented.
+%
+% However, the class of invisibles, commands and environments tries to
+% be even cleverer: one of these tries to leave only one inter-word
+% space whenever there is one before it and one after it; and it does
+% this quite well.
+%
+% But problems can arise when there is not a space-token on
+% both sides of it; in particular, when an invisible appears at the
+% beginning or end of a piece of text the method still leaves one space
+% token whereas usually in these cases it should leave none.
+%
+% Also, the current rules do not work well when more than one such
+% command appears consecutively, separated by space-tokens; it leaves
+% glue between every other invisible.
+%
+% There is also a question about what these commands should do when
+% they occur next to spaces that do not come from space tokens but,
+% for example, from |\hspace|. Should they still produce `just one
+% space'? If so, which one? It is good to note that the manual
+% is sufficiently cautious about invisibles that we are not obliged to
+% make anything work.
+%
+% Another interesting side-road to explore is whether the space-tokens
+% either side of an |\hspace{...}| should be ignored.
+%
+% One alternative to the current algorithm that is often suggested is
+% that all glue around the invisible should be consolidated into a
+% space after it (usually without stating how much glue should be put
+% there). The command |\nolinebreak| is implemented this way (and
+% |\linebreak| should also be). This does not work correctly for the
+% following common case:
+% \begin{verbatim}
+% ... some text
+% \index{some-word}
+% some-word and more text.
+% \end{verbatim}
+% This is optimal coding since it is normal to index a word that gets
+% split across a page-break on its starting page. This would, on the
+% other hand, fix another common (and documented) failure of the
+% current system: when the invisible is the last thing in a paragraph
+% the space before it is not removed and, worse, it is also hidden
+% from the paragraph-ending mechanism so that an `empty' line can be
+% created at the end of the paragraph.
+%
+% Another deficiency (I think) of the current system is that the
+% following is treated as having the |\index| command between the
+% paragraphs, which is probably not what the author intended (since
+% there is no empty line after it).
+% \begin{verbatim}
+%
+% \index{beginnings}
+% Beginnings of paragraphs ...
+% \end{verbatim}
+%
+% I know of no algorithm that will handle satisfactorily even
+% all the most common cases; note that it could be that the best
+% algorithm may be different for different invisibles since,
+% for example, the common uses and expected behaviour of
+% |\index|, |\marginpar|, |\linebreak|, |\pagebreak| and
+% |\vspace| are somewhat different. [For example, is
+% |\vspace| ever used in the middle of a paragraph?]
+%
+% One method that can (and is) used to make invisible commands produce
+% no space when used at the beginning of text is to put in some glue
+% that is nearly enough the same as no glue or glue of zero length in
+% all respects except for the precise test for not being exactly equal
+% to zero; examples of such glue are |\hskip 1sp| and, possibly better
+% but more complex, |\hskip -1sp \hskip 1sp|. However, this only works
+% when it is known that user-supplied text is about to start.
+%
+% Some similar concerns apply to the handling of space and penalties
+% in vertical mode; there is an extra hurdle here as |\unskip| does
+% not work on the main vertical list. The complexity of the tests done
+% by |\addvspace| have never been explained.
+%
+% The implementation of space hacks etc for vertical mode is another
+% major area that needs further attention; my earlier experiments
+% did not produce much improvement over the current unsatisfactory
+% situation.
+%
+% One particular problem is what happens when the following very
+% natural coding is used (part of the problem here is that this looks
+% like an hmode problem, but it is not):
+% \begin{verbatim}
+% ... end of text.
+%
+% \begin{enumerate}
+% \item \label{item:xxx} Item text.
+% \end{enumerate}
+% \end{verbatim}
+%
+% \subsection{Some immediate actions}
+%
+% \begin{itemize}
+% \item Fix bug in |\linebreak|.
+% \item Fix bug in |\\*|.
+% \item Reimplement |\\|, etc, removing extra |\vadjust|s and getting
+% better error trapping (this seems to involve a lot more tokens).
+% \item Investigate whether |\\|, etc need to be errors in vmode; I
+% think that they could be noops (maybe with a warning).
+% \item Make all(?) |\unskips| include test for zero skip (rather than
+% other tests or no test).
+% \item Consider replacing |\hskip 1sp| by something better (here
+% called an `infinitesimal' skip).
+% \item Look at all |\hskip\z@| (or similar) to see if they should be
+% changed to an `infinitesimal' skip.
+% \item Resolve the inconsistency between |\hspace| and |\hspace*|.
+% \item Remove unnecessary |\unskips|.
+% \item Investigate and rationalise the `newline' code.
+% \item Find better algorithms for all sorts of things or, easier(?),
+% fix \TeX{} itself.
+% \end{itemize}
+%
+% \subsection{The code}
+%
+% \begin{macrocode}
+%<*2ekernel>
+\message{spacing,}
+% \end{macrocode}
+%
+% \begin{macro}{\pagebreak}
+% \begin{macro}{\nopagebreak}
+% \changes{v1.2h}{1995/07/05}{Reimplemented both using \cs{@no@pgbk}}
+% \changes{v1.2j}{1995/10/16}{(DPC) Use \cs{@testopt} /1911}
+% \begin{macrocode}
+\def\pagebreak{\@testopt{\@no@pgbk-}4}
+\def\nopagebreak{\@testopt\@no@pgbk4}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@no@pgbk}
+% \changes{v1.2h}{1995/07/05}{Macro replaces \cs{@pgbk}
+% and \cs{@nopgbk}}
+% \begin{macrocode}
+\def\@no@pgbk #1[#2]{%
+ \ifvmode
+ \penalty #1\@getpen{#2}%
+ \else
+ \@bsphack
+ \vadjust{\penalty #1\@getpen{#2}}%
+ \@esphack
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\linebreak}
+% \begin{macro}{\nolinebreak}
+% \changes{v1.2u}{1996/10/29}{Reimplemented both using \cs{@no@lnbk}}
+% \changes{v1.2j}{1995/10/16}{(DPC) Use \cs{@testopt} /1911}
+% \begin{macrocode}
+\def\linebreak{\@testopt{\@no@lnbk-}4}
+\def\nolinebreak{\@testopt\@no@lnbk4}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\@no@lnbk}
+% \changes{v1.2u}{1996/10/29}{Macro replaces \cs{@lnbk}
+% and \cs{@nolnbk}}
+% \begin{macrocode}
+\def\@no@lnbk #1[#2]{%
+ \ifvmode
+ \@nolnerr
+ \else
+ \@tempskipa\lastskip
+ \unskip
+ \penalty #1\@getpen{#2}%
+ \ifdim\@tempskipa>\z@
+ \hskip\@tempskipa
+ \ignorespaces
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\samepage}
+% \begin{macrocode}
+\def\samepage{\interlinepenalty\@M
+ \postdisplaypenalty\@M
+ \interdisplaylinepenalty\@M
+ \@beginparpenalty\@M
+ \@endparpenalty\@M
+ \@itempenalty\@M
+ \@secpenalty\@M
+ \interfootnotelinepenalty\@M}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\\}
+% \changes{v1.2a}{1994/11/11}{(DPC) Make robust}
+% \changes{v1.2d}{1994/11/14}{(DPC) Macro modified}
+%
+% \changes{v1.2u}{1996/10/29}{Corrected and rationalised code}
+% The purpose of the new code is to fix a few bugs; however, it also
+% attempts to optimize the following, in order of priority:
+% \begin{enumerate}
+% \item efficient execution of plain |\\|;
+% \item efficient execution of |\\[...]|;
+% \item memory use;
+% \item name-space use.
+% \end{enumerate}
+% The changes should make no difference to the typeset output.
+% It appears to be safe to use |\reserved@e| and |\reserved@f| here
+% (other reserved macros are somewhat disastrous).
+%
+% These changes made |\newline| even less robust than it had been,
+% so now it is explicitly robust, like |\\|.
+% \begin{macro}{\@normalcr}
+% The internal definition of the `normal' definition of |\\|.
+% \begin{macrocode}
+\DeclareRobustCommand\\{%
+ \let \reserved@e \relax
+ \let \reserved@f \relax
+ \@ifstar{\let \reserved@e \vadjust \let \reserved@f \nobreak
+ \@xnewline}%
+ \@xnewline}
+\expandafter\let\expandafter\@normalcr
+ \csname\expandafter\@gobble\string\\ \endcsname
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\newline}
+% A simple form of the `normal' definition of |\\|.
+% \changes{v1.2v}{1997/05/07}{Made completely robust.}
+% \begin{macrocode}
+\DeclareRobustCommand\newline{\@normalcr\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xnewline}
+% \begin{macrocode}
+\def\@xnewline{\@ifnextchar[% ] bracket matching
+ \@newline
+ {\@gnewline\relax}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@newline}
+% \begin{macrocode}
+\def\@newline[#1]{\let \reserved@e \vadjust
+ \@gnewline {\vskip #1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@gnewline}
+% \changes{v1.2u}{1996/10/29}{Added macro}
+% The |\nobreak| added to prevent null lines when |\\|
+% ends an overfull line. Change made 24 May 89 as suggested by
+% Frank Mittelbach and Rainer Sch\"opf
+% \changes{v1.2h}{1995/07/05}{Use \cs{break}}
+% \begin{macrocode}
+\def\@gnewline #1{%
+ \ifvmode
+ \@nolnerr
+ \else
+ \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@getpen}
+% \begin{macrocode}
+\def\@getpen#1{\ifcase #1 \z@ \or \@lowpenalty\or
+ \@medpenalty \or \@highpenalty
+ \else \@M \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\if@nobreak}
+% \changes{v1.2p}{1996/07/26}{put \cs{global} inside definition}
+% Switch used to avoid page breaks caused by |\label| after a
+% section heading, etc. It should be \textbf{GLOBALLY} set true
+% after the |\nobreak| and \textbf{globally} set false by the
+% next invocation of |\everypar|.
+%
+% Commands that reset |\everypar| should globally set it false if
+% appropriate.
+% \begin{macrocode}
+\def\@nobreakfalse{\global\let\if@nobreak\iffalse}
+\def\@nobreaktrue {\global\let\if@nobreak\iftrue}
+\@nobreakfalse
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@savsk}
+% \begin{macro}{\@savsf}
+% Registers used to save the space factor and last skip.
+% \begin{macrocode}
+\newdimen\@savsk
+\newcount\@savsf
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@bsphack}
+% \changes{LaTeX2e}{1993/12/08}
+% {Command reimplemented; late birthday present for Chris}
+% \changes{LaTeX2e}{1993/12/08}{Command reimplemented}
+% \changes{LaTeX2e}{1993/12/16}{Corrected optimisation :-)}
+% |\@bsphack| and |\@esphack|
+% used by macros such as |\index| and
+% |\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|
+% The macro in question should not create any text, nor change the
+% mode.
+%
+% Before giving the current definition we give an extended definition
+% that is currently not used (because it doesn't work as advertised:-)
+%
+% These are generalised hacks which attempt to do sensible things
+% when `invisible commands' appear in vmode too.
+%
+% They need to cope with space in both hmode (plus spacefactor) and
+% vmode, and also cope with breaks etc. In vmode this means
+% ensuring that any following |\addvspace|, etc sees the correct
+% glue in |\lastskip|.
+%
+% In fact, these improved versions should be used for other cases
+% of `whatsits, thingies etc' which should be invisible. They are
+% only for commands, not environments (see notes on |\@Esphack|).
+%
+% BTW, anyone know why the standard hacks are surrounded by
+% |\ifmmode\else| rather than simply |\ifhmode|?
+%
+% And are there any cases where saving the spacefactor is
+% essential? I have some extensions where it is, but it does not
+% appear to be so in the standard uses.
+%\begin{verbatim}
+%\def \@bsphack{%
+% \relax \ifvmode
+% \@savsk \lastskip
+% \ifdim \lastskip=\z@
+% \else
+% \vskip -\lastskip
+% \fi
+% \else
+% \ifhmode
+% \@savsk \lastskip
+% \@savsf \spacefactor
+% \fi
+% \fi
+%}
+%\end{verbatim}
+% I think that, in vmode, it is the safest to put
+% in a |\nobreak| immediately after such things since writes,
+% inserts etc followed by glue give valid breakpoints and, in
+% general, it is possible to create breaks but impossible to
+% destroy them.
+%\begin{verbatim}
+%\def \@esphack{%
+% \relax \ifvmode
+% \nobreak
+% \ifdim \@savsk=\z@
+% \else
+% \vskip\@savsk
+% \fi
+% \else
+% \ifhmode
+% \spacefactor \@savsf
+% \ifdim \@savsk>\z@
+% \ignorespaces
+% \fi
+% \fi
+% \fi
+%}
+%\end{verbatim}
+% For the moment we are going to ignore the vertical versions until
+% they are correct.
+% \changes{LaTeX2e}{1993/12/19}{There seem to be problems with selfmade
+% birthday presents}
+% \begin{macrocode}
+\def\@bsphack{%
+ \relax
+ \ifhmode
+ \@savsk\lastskip
+ \@savsf\spacefactor
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@esphack}
+% Companion to |\@bsphack|. If this command is not properly paired
+% with |\@bsphack| one might end up with a low-level \TeX{} error:
+% ``BAD spacefactor''. One possible cause is calling |\@bsphack| in
+% vertical mode, then doing something that gets you (sometimes) into
+% horizontal mode and finally calling |\@esphack|. Even if no error
+% is generated that is wrong, because |\@esphack| will then use the
+% saved values for |\@savsk| and |\@savsf| from some earlier
+% invocation of |\@bsphack| which will have nothing to do with the
+% current situation.
+% \changes{v1.3d}{2015/01/11}{Allow hyphenation (Donald Arseneau pr/3498) (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2018/10/10}%
+%<latexrelease> {\@esphack}{hyphenation and nobreak after space hack}%
+%<*2ekernel|latexrelease>
+\def\@esphack{%
+ \relax
+ \ifhmode
+ \spacefactor\@savsf
+ \ifdim\@savsk>\z@
+% \end{macrocode}
+% \changes{v1.3f}{2015/11/07}
+% {Only space if there is no space at the end of the hlist latex/4443}
+% \begin{macrocode}
+ \ifdim\lastskip=\z@
+ \nobreak \hskip\z@skip
+ \fi
+ \ignorespaces
+ \fi
+% \end{macrocode}
+% \changes{v1.3i}{2018/10/10}
+% {Don't introduce breakpoints if @nobreak is true and after sections}
+% \begin{macrocode}
+ \else
+ \ifvmode
+ \if@nobreak\nobreak\else\if@noskipsec\nobreak\fi\fi
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/10/01}%
+%<latexrelease> {\@esphack}{hyphenation and nobreak after space hack}%
+%<latexrelease>\def\@esphack{%
+%<latexrelease> \relax
+%<latexrelease> \ifhmode
+%<latexrelease> \spacefactor\@savsf
+%<latexrelease> \ifdim\@savsk>\z@
+%<latexrelease> \ifdim\lastskip=\z@
+%<latexrelease> \nobreak \hskip\z@skip
+%<latexrelease> \fi
+%<latexrelease> \ignorespaces
+%<latexrelease> \fi
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@esphack}{hyphenation and nobreak after space hack}%
+%<latexrelease>\def\@esphack{%
+%<latexrelease> \relax
+%<latexrelease> \ifhmode
+%<latexrelease> \spacefactor\@savsf
+%<latexrelease> \ifdim\@savsk>\z@
+%<latexrelease> \nobreak \hskip\z@skip
+%<latexrelease> \ignorespaces
+%<latexrelease> \fi
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@esphack}{hyphenation and nobreak after space hack}%
+%<latexrelease>\def\@esphack{%
+%<latexrelease> \relax
+%<latexrelease> \ifhmode
+%<latexrelease> \spacefactor\@savsf
+%<latexrelease> \ifdim\@savsk>\z@
+%<latexrelease> \ignorespaces
+%<latexrelease> \fi
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@Esphack}
+% A variant of |\@esphack| that sets the |@ignore| switch to
+% true (as |\@esphack| used to do previously).
+% This is currently used only for floats and similar environments.
+% \changes{v1.2s}{1996/08/02}{Remove \cs{global} before \cs{@ignore...}}
+% \changes{v1.3d}{2015/01/11}{Allow hyphenation (Donald Arseneau pr/3498) (latexrelease)}w
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@Esphack}{hyphenation after space hack}%
+%<*2ekernel|latexrelease>
+\def\@Esphack{%
+ \relax
+ \ifhmode
+ \spacefactor\@savsf
+ \ifdim\@savsk>\z@
+ \nobreak \hskip\z@skip
+ \@ignoretrue
+ \ignorespaces
+ \fi
+ \fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@Esphack}{hyphenation after space hack}%
+%<latexrelease>\def\@Esphack{%
+%<latexrelease> \relax
+%<latexrelease> \ifhmode
+%<latexrelease> \spacefactor\@savsf
+%<latexrelease> \ifdim\@savsk>\z@
+%<latexrelease> \@ignoretrue
+%<latexrelease> \ignorespaces
+%<latexrelease> \fi
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@vbsphack}
+% \changes{LaTeX2e}{1993/12/08}{Command added}
+% Another variant which is useful for invisible things which should
+% not live in vmode (this is how some people feel about marginals).
+%
+% If it occurs in vmode then it enters hmode and ensures that
+% |\@savsk| is nonzero so that the |\ignorespaces| is put in later.
+% It is not used at present.
+% \changes{v1.2f}{1995/05/25}{(CAR) not used so `removed'.}
+%\begin{verbatim}
+% \def \@vbsphack{ %
+% \relax \ifvmode
+% \leavevmode
+% \@savsk 1sp
+% \@savsf \spacefactor
+% \else
+% \ifhmode
+% \@savsk \lastskip
+% \@savsf \spacefactor
+% \fi
+% \fi
+% }
+%\end{verbatim}
+% \end{macro}
+%
+%
+% \subsection{Vertical spacing}
+%
+%
+% \LaTeX\ supports the plain \TeX\ commands
+% |\smallskip|, |\medskip| and |\bigskip|.
+% However, it redefines them using |\vspace| instead of |\vskip|.
+%
+% Extra vertical space is added by the command
+% |\addvspace|\marg{skip},
+% which adds a vertical skip of \meta{skip} to the document.
+% The sequence\\
+% |\addvspace|\marg{s1} |\addvspace|\marg{s2}
+% is equivalent to\\
+% |\addvspace|\marg{maximum of s1, s2}.
+%
+% |\addvspace| should be used only in vertical mode, and gives an
+% error if it's not. The |\addvspace| command does \emph{not} add
+% vertical space if |@minipage| is true. The minipage environment uses
+% this to inhibit the addition of extra vertical space at the beginning.
+%
+% Penalties are put into the vertical list with the
+% |\addpenalty|\marg{penalty}
+% command. It works properly when |\addpenalty| and |\addvspace|
+% commands are mixed.
+%
+% The |@nobreak| switch is set true used when in vertical mode and no
+% page break should occur. (Right now, it is used only by the section
+% heading commands to inhibit page breaking after a heading.)
+%
+%
+%\begin{verbatim}
+% \addvspace{SKIP} ==
+% BEGIN
+% if vmode
+% then if @minipage
+% else if \lastskip =0
+% then \vskip SKIP
+% else if \lastskip < SKIP
+% then \vskip -\lastskip
+% \vskip SKIP
+% else if SKIP < 0 and \lastskip >= 0
+% then \vskip -\lastskip
+% \vskip \lastskip + SKIP
+% fi fi fi fi
+% else useful error message (CAR).
+% fi
+% END
+%\end{verbatim}
+%
+% \begin{macro}{\@xaddvskip}
+% Internal macro for |\vspace| handling the case that space has
+% previously been added.
+% \begin{macrocode}
+\def\@xaddvskip{%
+ \ifdim\lastskip<\@tempskipb
+ \vskip-\lastskip
+ \vskip\@tempskipb
+ \else
+ \ifdim\@tempskipb<\z@
+ \ifdim\lastskip<\z@
+ \else
+ \advance\@tempskipb\lastskip
+ \vskip-\lastskip
+ \vskip \@tempskipb
+ \fi
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\addvspace}
+% \changes{v1.2b}{1994/11/12}{Corrected error message}
+% \changes{v1.2c}{1994/11/13}{Recorrected error message}
+% Add vertical space taking into account space already added, as
+% described above.
+% \begin{macrocode}
+\def\addvspace#1{%
+ \ifvmode
+ \if@minipage\else
+ \ifdim \lastskip =\z@
+ \vskip #1\relax
+ \else
+ \@tempskipb#1\relax
+ \@xaddvskip
+ \fi
+ \fi
+ \else
+ \@noitemerr
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\addpenalty}
+% \changes{v1.2b}{1994/11/12}{Corrected error message}
+% \changes{v1.2c}{1994/11/13}{Recorrected error message}
+% \changes{v1.1h}{2015/01/09}{Donald Arseneau's fix from PR/377703 (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\addpenalty}{\addpenalty}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+% Fix provided by Donald (though the original fix was not good
+% enough). In 2005 Plamen Tanovski discovered that this fix wasn't
+% good enough either as the \cs{vskip} kept getting bigger if
+% several \cs{addpenalty} commands followed each other. Donald
+% kindly send a new fix.
+% \begin{macrocode}
+\def\addpenalty#1{%
+ \ifvmode
+ \if@minipage
+ \else
+ \if@nobreak
+ \else
+ \ifdim\lastskip=\z@
+ \penalty#1\relax
+ \else
+ \@tempskipb\lastskip
+% \end{macrocode}
+% We have to make sure the final \cs{vskip} seen by \TeX\ is the
+% correct one, namely \cs{@tempskipb}. However we may have to
+% adjust for \cs{prevdepth} when placing the penalty but that
+% should not affect the skip we pass on to \TeX.
+% \changes{v1.3e}{2015/01/14}{Avoid adding redundant skips (DPC)}
+% \begin{macrocode}
+ \begingroup
+ \@tempskipa\@tempskipb
+ \advance \@tempskipb
+ \ifdim\prevdepth>\maxdepth\maxdepth\else
+% \end{macrocode}
+% If |\prevdepth| is -1000pt due to |\nointerlineskip| we better
+% not add it!
+% \begin{macrocode}
+ \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+ \fi
+ \vskip -\@tempskipb
+ \penalty#1%
+ \ifdim\@tempskipa=\@tempskipb
+% \end{macrocode}
+% Do nothing if the |\prevdepth| check made no adjustment.
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+% Combine the prevdepth adjustment into a single skip.
+% \begin{macrocode}
+ \advance\@tempskipb -\@tempskipa
+ \vskip \@tempskipb
+ \fi
+% \end{macrocode}
+% The final skip is always the specified length.
+% \begin{macrocode}
+ \vskip \@tempskipa
+ \endgroup
+ \fi
+ \fi
+ \fi
+ \else
+ \@noitemerr
+ \fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\addpenalty}{\addpenalty}%
+%<latexrelease>\def\addpenalty#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \if@minipage
+%<latexrelease> \else
+%<latexrelease> \if@nobreak
+%<latexrelease> \else
+%<latexrelease> \ifdim\lastskip=\z@
+%<latexrelease> \penalty#1\relax
+%<latexrelease> \else
+%<latexrelease> \@tempskipb\lastskip
+%<latexrelease> \vskip -\lastskip
+%<latexrelease> \penalty#1%
+%<latexrelease> \vskip\@tempskipb
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@noitemerr
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vspace}
+% \changes{v1.2m}{1996/01/20}{Made robust}
+% \begin{macro}{\@vspace}
+% \begin{macro}{\@vspacer}
+% \changes{v1.2f}{1995/05/25}
+% {(CAR) macros modified to be more efficient}
+% \changes{v1.2f}{1995/05/25}{(CAR) \cs{@restorepar} added to avoid
+% possible infinite tail recursion caused by a typo in the argument.}
+% The new code for these commands depends on the following facts:
+% \begin{itemize}
+% \item The value of prevdepth is changed only when a box or rule
+% is created and added to a vertical list;
+% \item The value of prevdepth is used only when a box is created
+% and added to a vertical list;
+% \item The value of prevdepth is always local to the building of
+% one vertical list.
+% \end{itemize}
+% \begin{macrocode}
+\DeclareRobustCommand\vspace{\@ifstar\@vspacer\@vspace}
+\def\@vspace #1{%
+ \ifvmode
+ \vskip #1
+ \vskip\z@skip
+ \else
+ \@bsphack
+ \vadjust{\@restorepar
+ \vskip #1
+ \vskip\z@skip
+ }%
+ \@esphack
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@vspacer#1{%
+ \ifvmode
+ \dimen@\prevdepth
+ \hrule \@height\z@
+ \nobreak
+ \vskip #1
+ \vskip\z@skip
+ \prevdepth\dimen@
+ \else
+ \@bsphack
+ \vadjust{\@restorepar
+ \hrule \@height\z@
+ \nobreak
+ \vskip #1
+ \vskip\z@skip}%
+ \@esphack
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\smallskip}
+% \begin{macro}{\medskip}
+% \begin{macro}{\bigskip}
+% \begin{macrocode}
+\def\smallskip{\vspace\smallskipamount}
+\def\medskip{\vspace\medskipamount}
+\def\bigskip{\vspace\bigskipamount}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\smallskipamount}
+% \begin{macro}{\medskipamount}
+% \begin{macro}{\bigskipamount}
+% \begin{macrocode}
+\newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
+\newskip\medskipamount \medskipamount =6pt plus 2pt minus 2pt
+\newskip\bigskipamount \bigskipamount =12pt plus 4pt minus 4pt
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{Horizontal space (and breaks)}
+%
+% \begin{macro}{\nobreakdashes}
+% \changes{v1.3}{2004/02/04}{(Macro added}
+% \changes{v1.3a}{2004/02/15}{(Added spacefactor setting}
+% This idea is borrowed from the \textsf{amsmath} package but
+% here we define a robust command.
+%
+% This command is a low-level command designed for use only before
+% hyphens or dashes (such as |-|, |--|, or |---|).
+%
+% It could probably be better implemented: it may need its own
+% private token register and temporary command.
+%
+% Setting the hyphen in a box and then unboxing it means that the
+% normal penalty will not be added after it---and if the penalty is
+% not there a break will not be taken (unless an explicit penalty
+% or glue follows, thus the final \verb=\nobreak=).
+%
+% Note that even if it is not followed by a `-', it still leaves
+% vmode and sets the spacefactor; so use it carefully!
+%
+% \begin{macrocode}
+\DeclareRobustCommand{\nobreakdashes}{%
+ \leavevmode
+ \toks@{}%
+ \def\reserved@a##1{\toks@\expandafter{\the\toks@-}%
+ \futurelet\@let@token \reserved@b}%
+ \def\reserved@b {\ifx\@let@token -%
+ \expandafter\reserved@a
+ \else
+ \setbox\z@ \hbox{\the\toks@\nobreak}%
+ \unhbox\z@
+ \spacefactor\sfcode`\-
+ \fi}%
+ \futurelet\@let@token \reserved@b
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nobreakspace}
+% \changes{v1.2k}{1995/12/04}{(Macro added}
+% \begin{macro}{\@xobeysp}
+% \changes{v1.2t}{1996/09/28}{Moved from ltmiscen.dtx and redefined to
+% use \cs{nobreakspace }}
+%
+% This is a robust command that produces a horizontal space at
+% which, in paragraph-mode, a line-break is not possible. We then
+% define an active |~| to expand to it since this is the documented
+% behaviour of |~|. One reason for introducing this is that some
+% 8-bit input encodings have a slot for such a space and we do not
+% want to use active characters as the \LaTeX{} internal commands.
+%
+% The braces in the definition of |~| are needed to ensure that a
+% following space is preserved when reading to/from internal files.
+% \changes{v1.2l}{1995/12/04}{(braces added to definition of tilde}
+%
+% We need to keep \cs{@xobeysp} as it is widely used; so here it is
+% let to the non-robust command \cs{nobreakspace }.
+%
+% \begin{macrocode}
+\DeclareRobustCommand{\nobreakspace}{%
+ \leavevmode\nobreak\ }
+\catcode `\~=13
+\def~{\nobreakspace{}}
+\expandafter\let\expandafter\@xobeysp\csname nobreakspace \endcsname
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+% \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
+% right thing for other punctuation marks as well. Does this by
+% setting spacefactor to 1000.
+% \changes{v1.3b}{2014/12/30}{\cs{@} discards spaces when moving
+% (pr3039)(latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@}{Space after \@}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+% \begin{macrocode}
+\def\@{\spacefactor\@m{}}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@}{Space after \@}%
+%<latexrelease>\def\@{\spacefactor\@m}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\hspace}
+% \changes{v1.0o}{1994/05/11}{Use \cs{DeclareRobustCommand}. ASAJ.}
+% \begin{macrocode}
+\DeclareRobustCommand\hspace{\@ifstar\@hspacer\@hspace}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@hspace}
+% \changes{LaTeX2e}{1993/08/05}
+% {(RmS) Removed superfluous \cs{leavevmode} in \cs{@hspace} and
+% \cs{@hspacer}, as suggested by CAR.}
+% \begin{macrocode}
+\def\@hspace#1{\hskip #1\relax}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@hspacer}
+% 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}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\fill}
+% \begin{macrocode}
+\newskip\fill
+\fill = 0pt plus 1fill
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\stretch}
+% \begin{macrocode}
+\def\stretch#1{\z@ \@plus #1fill\relax}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<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}
+\def\thinspace{\leavevmode@ifvmode\kern .16667em }
+\def\negthinspace{\leavevmode@ifvmode\kern-.16667em }
+\def\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
+% expansion is empty (which is not the case with the default definition).
+% \changes{v1.3h}{2018/09/24}{Macro added (git/49)}
+% \begin{macrocode}
+\protected\def\leavevmode@ifvmode{\ifvmode\expandafter\indent\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\thinspace}{Start LR-mode}%
+%<latexrelease>\def\thinspace{\kern .16667em }
+%<latexrelease>\def\negthinspace{\kern-.16667em }
+%<latexrelease>\def\enspace{\kern.5em }
+%<latexrelease>\let\leavevmode@ifvmode\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\enskip}
+% \begin{macro}{\quad}
+% \begin{macro}{\qquad}
+% \begin{macrocode}
+\def\enskip{\hskip.5em\relax}
+\def\quad{\hskip1em\relax}
+\def\qquad{\hskip2em\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\obeycr}
+% \begin{macro}{\restorecr}
+% The following definitions will probably get deleted or moved to
+% compatibility mode soon.
+%
+% \changes{v1.2g}{1995/06/11}
+% {(CAR) \cs{relax} added to stop silent eating of *.}
+% \begin{macrocode}
+{\catcode`\^^M=13 \gdef\obeycr{\catcode`\^^M13 \def^^M{\\\relax}%
+ \@gobblecr}%
+{\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar
+\@gobble\ignorespaces}}
+\gdef\restorecr{\catcode`\^^M5 }}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+\endinput
+
diff --git a/macros/latex-dev/base/lttab.dtx b/macros/latex-dev/base/lttab.dtx
new file mode 100644
index 0000000000..54bffa5974
--- /dev/null
+++ b/macros/latex-dev/base/lttab.dtx
@@ -0,0 +1,1607 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: lttab.dtx
+%<*driver>
+% \fi
+\ProvidesFile{lttab.dtx}[2018/12/30 v1.1p LaTeX Kernel (Columns)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{lttab.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \changes{v1.0l}{1995/05/07}{Use \cs{hb@xt@}}
+% \changes{v1.1a}{1995/05/22}{Support autoloading feature}
+% \changes{v1.1b}{1995/06/14}{Use \cs{ProvidesFile} in autoload}
+% \changes{v1.1d}{1995/10/04}{Modify autoload support}
+% \changes{v1.1k}{1998/06/18}{Small addition to documentation}
+% \changes{v1.1l}{1998/07/06}{Small correction to documentation}
+% \changes{v1.1n}{2015/02/21}{Removed autoload code}
+%
+% \section{Tabbing, Tabular and Array Environments}
+% This section deals with `Lining It Up in Columns'. First the
+% |tabbing| environment is defined, and then in second part, |tabular|
+% together with its variants, |tabular*| and |array|.
+%
+% Note that the |tabular| defined here is essentially the original
+% \LaTeX~2.09 version, not the extended version described in \emph{The
+% \LaTeX\ Companion}. Use the |array| package to obtain the extended
+% version.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/04}{Initial version, split from latex.dtx}
+% \changes{v1.0a}{1994/03/07}{Long lines wrapped to 72 columns}
+% \changes{v1.0b}{1994/03/28}{Improve documentation}
+% \changes{v1.0c}{1994/05/07}{Removed definition of \cs{+}}
+% \changes{v1.0c}{1994/05/07}{Removed surplus braces from
+% \cs{@ifnextchar} constructs}
+% \changes{v1.0f}{1994/05/21}{Use new error commands}
+% \changes{v1.0j}{1994/11/17}
+% {\cs{@tempa} to \cs{reserved@a}}
+%
+% \subsection{tabbing}
+%
+% \begin{oldcomments}
+%
+% \dimen(\@firsttab + i) = distance of tab stop i from left margin
+% 0 <= i <= 15 (?).
+%
+% \dimen\@firsttab is initialized to \@totalleftmargin, so it starts
+% at the prevailing left margin.
+%
+% \@maxtab = number of highest defined tab register
+% probably = \@firsttab + 12
+% \@nxttabmar = tab stop number of next line's left margin
+% \@curtabmar = tab stop number of current line's left margin
+% \@curtab = number of the current tab. At start of line,
+% it equals \@curtabmar
+% \@hightab = largest tab number currently defined.
+% \@tabpush = depth of \pushtab's
+%
+% \box\@curline = contents of current line, excluding left margin
+% skip, and excluding contents of current field
+% \box\@curfield = contents of current field
+%
+% @rjfield = switch: T iff the last field of the line should
+% be right-justified at the right margin.
+%
+% \tabbingsep = distance left by the \' command between the
+% current position and the field that is
+% ``left-shifted''.
+%
+% UTILITY MACROS
+% \@stopfield : closes the current field
+% \@addfield : adds the current field to the current line.
+% \@contfield : continues the current field
+% \@startfield : begins the next field
+% \@stopline : closes the current line and outputs it
+% \@startline : starts the next line
+% \@ifatmargin : an \if that is true iff the current line.
+% has width zero
+%
+% \@startline ==
+% BEGIN
+% \@curtabmar :=G \@nxttabmar
+% \@curtab :=G \@curtabmar
+% \box\@curline :=G null
+% \@startfield
+% \strut
+% END
+%
+% \@stopline ==
+% BEGIN
+% \unskip
+% \@stopfield
+% if @rjfield = T
+% then @rjfield :=G F
+% \@tempdima := \@totalleftmargin + \linewidth
+% \hb@xt@ \@tempdima{\@itemfudge
+% \hskip \dimen\@curtabmar
+% \box\@curline
+% \hfil
+% \box\@curfield}
+% else \@addfield
+% \hbox {\@itemfudge
+% \hskip \dimen\@curtabmar
+% \box\@curline}
+% fi
+% END
+%
+% \@startfield ==
+% BEGIN
+% \box\@curfield :=G \hbox {
+% END
+%
+% \@stopfield ==
+% BEGIN
+% }
+% END
+%
+% \@contfield ==
+% BEGIN
+% \box\@curfield :=G \hbox { \unhbox\@currfield %%} brace matching
+% END
+% \@addfield ==
+% BEGIN
+% \box\@curline :=G \unbox\@curline * \unbox\@curfield
+% END
+%
+% \@ifatmargin ==
+% BEGIN
+% if dim of box\@curline = 0pt then
+% END
+%
+%
+% \tabbing ==
+% BEGIN
+% \lineskip :=L 0pt
+% \> == \@rtab
+% \< == \@ltab
+% \= == \@settab
+% \+ == \@tabplus
+% \- == \@tabminus
+% \` == \@tabrj
+% \' == \@tablab
+% \\ == BEGIN \@stopline \@startline END
+% \\[DIST] == BEGIN
+% \@stopline \vskip DIST \@startline\ignorespaces END
+% \\* == BEGIN \@stopline \penalty 10000 \@startline END
+% \\*[DIST] == BEGIN \@stopline \penalty 10000 \vskip DIST
+% \@startline\ignorespaces END
+% \@hightab := \@nxttabmar :=G \@firsttab
+% \@tabpush :=G 0
+% \dimen\@firsttab := \@totalleftmargin
+% @rjfield :=G F
+% \trivlist \item\relax
+% if @minipage = F then \vskip \parskip fi
+% \box\@tabfbox = \rlap{\indent\the\everypar}
+% % note: \the\everypar sets @inlabel :=G F
+% \@itemfudge == BEGIN \box\@tabfbox END
+% \@startline
+% \ignorespaces
+% END
+%
+% \@endtabbing ==
+% BEGIN
+% \@stopline
+% if \@tabpush > 0 then error message: ''unmatched \poptabs'' fi
+% \endtrivlist
+% END
+%
+% \@rtab ==
+% BEGIN
+% \@stopfield
+% \@addfield
+% if \@curtab < \@hightab
+% then \@curtab :=G \@curtab + 1
+% else error message ``Undefined Tab'' fi
+% \@tempdima := \dimen\@curtab - \dimen\@curtabmar
+% - width of box \@curline
+% \box\@curline :=G \hbox{\unhbox\@curline + \hskip\@tempdima}
+% \@startfield
+% END
+%
+% \@settab ==
+% BEGIN
+% \@stopfield
+% \@addfield
+% if \@curtab < \@maxtab
+% then \@curtab :=G \@curtab+1
+% else error message: ``Too many tabs'' fi
+% if \@curtab > \@hightab
+% then \@hightab :=L \@curtab fi
+% \dimen\@curtab :=L \dimen\@curtabmar + width of \box\@curline
+% \@startfield
+% END
+%
+% \@ltab ==
+% BEGIN
+% \@ifatmargin
+% then if \@curtabmar > \@firsttab
+% then \@curtab :=G \@curtab - 1
+% \@curtabmar :=G \@curtabmar - 1
+% else error message ``Too many untabs'' fi
+% else error message ``Left tab in middle of line''
+% fi
+% END
+%
+% \@tabplus ==
+% BEGIN
+% if \@nxttabmar < \@hightab
+% then \@nxttabmar :=G \@nxttabmar+1
+% else error message ``Undefined tab''
+% fi
+% END
+%
+% \@tabminus ==
+% BEGIN
+% if \@nxttabmar > \@firsttab
+% then \@nxttabmar :=G \@nxttabmar-1
+% else error message ``Too many untabs''
+% fi
+% END
+%
+% \@tabrj ==
+% BEGIN \@stopfield
+% \@addfield
+% @rjfield :=G T
+% \@startfield
+% END
+%
+% \@tablab ==
+% BEGIN \@stopfield
+% \box\@curline G:= \hbox{\box\@curline %% `G' added 17 Jun 86
+% \hskip - width of \box\@curfield
+% \hskip -\tabbingsep
+% \box\@curfield
+% \hskip \tabbingsep }
+% \@startfield
+% END
+%
+% \pushtabs ==
+% BEGIN
+% \@stopfield
+% \@tabpush :=G \@tabpush + 1
+% \begingroup
+% \@contfield
+% END
+%
+% \poptabs ==
+% BEGIN
+% \@stopfield
+% if \@tabpush > 0
+% then \endgroup
+% \@tabpush :=G \@tabpush - 1
+% else error message: ``Too many \poptabs''
+% fi
+% \@contfield
+% END
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\a}
+% The accents |\`| , |\'| , and |\=| that have been redefined inside a
+% tabbing environment can be called by typing |\a`| , |\a'| , and |\a=|.
+% The macro |\a| is defined in |ltoutenc.dtx|.
+% \changes{v1.0d}{1994/05/13}
+% {moved to ltoutenc}
+% \end{macro}
+%
+%
+% The `2ekernel' code ensures that a |\usepackage{autotabg}| is
+% essentially ignored if a `full' format is being used that has
+% picture mode already in the format.
+% \begin{macrocode}
+%<2ekernel>\expandafter\let\csname ver@autotabg.sty\endcsname\fmtversion
+% \end{macrocode}
+%
+% \begin{macro}{\@firsttab}
+% \begin{macro}{\@maxtab}
+% \changes{v1.0c}{1994/05/07}{Changed \cs{@firsttab} to \cs{chardef}}
+% \changes{v1.0c}{1994/05/07}{Changed \cs{@maxtab} to \cs{chardef}}
+% \begin{macrocode}
+%<*2ekernel>
+\newdimen\@gtempa
+\chardef\@firsttab=\the\allocationnumber
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa
+\chardef\@maxtab=\the\allocationnumber
+\dimen\@firsttab=0pt
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@nxttabmar}
+% \begin{macro}{\@curtabmar}
+% \begin{macro}{\@curtab}
+% \begin{macro}{\@hightab}
+% \begin{macro}{\@tabpush}
+% \begin{macrocode}
+\newcount\@nxttabmar
+\newcount\@curtabmar
+\newcount\@curtab
+\newcount\@hightab
+\newcount\@tabpush
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@curline}
+% \begin{macro}{\@curfield}
+% \begin{macro}{\@tabfbox}
+% \begin{macrocode}
+\newbox\@curline
+\newbox\@curfield
+\newbox\@tabfbox
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\if@rjfield}
+% \begin{macrocode}
+\newif\if@rjfield
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@startline}
+% \changes{v1.1f}{1995/10/23}{(CAR)Ensure that \cs{@nxttabmar} is never
+% larger than \cs{@hightab}}
+% It is, in some sense, an error if the current margin
+% tab setting is higher than the value of |\@hightab| (which is
+% a local variable). That this is allowed is a fundamental design
+% flaw which is not going to be corrected now.
+% \begin{macrocode}
+\gdef\@startline{%
+ \ifnum \@nxttabmar >\@hightab
+ \@badtab
+ \global\@nxttabmar \@hightab
+ \fi
+ \global\@curtabmar \@nxttabmar
+ \global\@curtab \@curtabmar
+ \global\setbox\@curline \hbox {}%
+ \@startfield
+ \strut}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@stopline}
+% \begin{macrocode}
+\gdef\@stopline{%
+ \unskip
+ \@stopfield
+ \if@rjfield
+ \global\@rjfieldfalse
+ \@tempdima\@totalleftmargin
+ \advance\@tempdima\linewidth
+ \hb@xt@\@tempdima{%
+ \@itemfudge\hskip\dimen\@curtabmar
+ \box\@curline
+ \hfil
+ \box\@curfield}%
+ \else
+ \@addfield
+ \hbox{\@itemfudge\hskip\dimen\@curtabmar\box\@curline}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@startfield}
+% \changes{v1.0d}{1994/05/13}
+% {Colour support}
+% \begin{macrocode}
+\gdef\@startfield{%
+ \global\setbox\@curfield\hbox\bgroup\color@begingroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@stopfield}
+% \changes{v1.0d}{1994/05/13}
+% {Colour support}
+% \begin{macrocode}
+\gdef\@stopfield{%
+ \color@endgroup\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@contfield}
+% \changes{v1.0d}{1994/05/13}
+% {Colour support}
+% \begin{macrocode}
+\gdef\@contfield{%
+ \global\setbox\@curfield\hbox\bgroup\color@begingroup
+ \unhbox\@curfield}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addfield}
+% \begin{macrocode}
+\gdef\@addfield{\global\setbox\@curline\hbox{\unhbox
+ \@curline\unhbox\@curfield}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifatmargin}
+% \begin{macrocode}
+\gdef\@ifatmargin{\ifdim \wd\@curline =\z@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabcr}
+% \begin{macrocode}
+\gdef\@tabcr{\@stopline \@ifstar{\penalty \@M \@xtabcr}\@xtabcr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xtabcr}
+% \begin{macrocode}
+\gdef\@xtabcr{\@ifnextchar[\@itabcr{\@startline\ignorespaces}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@itabcr}
+% \begin{macrocode}
+\gdef\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\kill{\@stopfield\@startline\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabbing}
+% \changes{v1.1f}{1995/10/23}{(CAR)Make \cs{@hightab} consistently a
+% local variable}
+% \changes{latex2e}{1993/12/13}{Removed optional argument of \cs{item}}
+% We use |\relax| to prevent |\item| from scanning too far.
+% \begin{macrocode}
+\gdef\tabbing{\lineskip \z@skip\let\>\@rtab\let\<\@ltab\let\=\@settab
+ \let\+\@tabplus\let\-\@tabminus\let\`\@tabrj\let\'\@tablab
+ \let\\=\@tabcr
+ \@hightab\@firsttab
+ \global\@nxttabmar\@firsttab
+ \dimen\@firsttab\@totalleftmargin
+ \global\@tabpush\z@ \global\@rjfieldfalse
+ \trivlist \item\relax
+ \if@minipage\else\vskip\parskip\fi
+% \end{macrocode}
+% \changes{v1.1i}{1996/10/21}{Moved the \cs{indent} so that the
+% \cs{everypar} can remove it when necessary; this is needed because
+% the code for items in lists has changed (see pr/22111)}
+% \begin{macrocode}
+ \setbox\@tabfbox\hbox{%
+ \rlap{\hskip\@totalleftmargin\indent\the\everypar}}%
+ \def\@itemfudge{\box\@tabfbox}%
+ \@startline\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\endtabbing}
+% \begin{macrocode}
+\gdef\endtabbing{%
+ \@stopline\ifnum\@tabpush >\z@ \@badpoptabs \fi\endtrivlist}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@rtab}
+% Omitted |\global| added to |\@rtab| 17 Jun 86
+% \begin{macrocode}
+\gdef\@rtab{\@stopfield\@addfield\ifnum \@curtab<\@hightab
+ \global\advance\@curtab \@ne \else\@badtab\fi
+ \@tempdima\dimen\@curtab
+ \advance\@tempdima -\dimen\@curtabmar
+ \advance\@tempdima -\wd\@curline
+ \global\setbox\@curline\hbox{\unhbox\@curline\hskip\@tempdima}%
+ \@startfield\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@settab}
+% \changes{v1.1f}{1995/10/23}{(CAR)Ensure that \cs{@hightab} increases
+% by at most one}
+% \begin{macrocode}
+\gdef\@settab{\@stopfield\@addfield
+ \ifnum \@curtab <\@maxtab
+ \ifnum\@curtab =\@hightab
+ \advance\@hightab \@ne
+ \fi
+ \global\advance\@curtab \@ne
+ \else
+ \@latex@error{Tab overflow}\@ehd
+ \fi
+ \dimen\@curtab \dimen\@curtabmar
+ \advance\dimen\@curtab \wd\@curline
+ \@startfield
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ltab}
+% \begin{macrocode}
+\gdef\@ltab{\@ifatmargin\ifnum\@curtabmar >\@firsttab
+ \global\advance\@curtab \m@ne \global\advance\@curtabmar\m@ne\else
+ \@badtab\fi\else
+ \@latex@error{\string\<\space in mid line}\@ehd\fi\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabplus}
+% \begin{macrocode}
+\gdef\@tabplus{%
+ \ifnum\@nxttabmar<\@hightab
+ \global\advance\@nxttabmar\@ne
+ \else
+ \@badtab
+ \fi
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabminus}
+% \begin{macrocode}
+\gdef\@tabminus{%
+ \ifnum\@nxttabmar>\@firsttab
+ \global\advance\@nxttabmar\m@ne
+ \else
+ \@badtab
+ \fi
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabrj}
+% \begin{macrocode}
+\gdef\@tabrj{%
+ \@stopfield\@addfield\global\@rjfieldtrue\@startfield\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tablab}
+% |\setbox\@curline| made |\global| in |\@tablab|. 17 Jun 86
+% \begin{macrocode}
+\gdef\@tablab{%
+ \@stopfield
+ \global\setbox\@curline\hbox{%
+ \box\@curline
+ \hskip-\wd\@curfield \hskip-\tabbingsep
+ \box\@curfield
+ \hskip\tabbingsep}%
+ \@startfield
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pushtabs}
+% \begin{macrocode}
+\gdef\pushtabs{%
+ \@stopfield\@addfield\global\advance\@tabpush \@ne \begingroup
+ \@contfield}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\poptabs}
+% \changes{v1.1f}{1995/10/23}{(CAR)Ensure that \cs{@curtab} is never
+% larger than \cs{@hightab}}
+% It is, in some sense, an error if, after the endgroup, the current
+% tab setting is higher than the new value of |\@hightab| (which is
+% a local variable). That this is allowed is a fundamental design
+% flaw which is not going to be corrected now.
+% \begin{macrocode}
+\gdef\poptabs{\@stopfield\@addfield
+ \ifnum \@tabpush >\z@
+ \endgroup
+ \global\advance\@tabpush \m@ne
+ \ifnum \@curtab >\@hightab
+ \global \@curtab \@hightab
+ \@badtab
+ \fi
+ \else
+ \@badpoptabs
+ \fi
+ \@contfield}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\tabbingsep}
+% \begin{macrocode}
+\newdimen\tabbingsep
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{array and tabular environments}
+%
+% \begin{oldcomments}
+%
+% ARRAY PARAMETERS:
+% \arraycolsep
+% : half the width separating columns in an array environment
+% \tabcolsep
+% : half the width separating columns in a tabular environment
+% \arrayrulewidth
+% : width of rules
+% \doublerulesep
+% : space between adjacent rules in array or tabular
+% \arraystretch
+% : line spacing in array and tabular environments is done by
+% placing a strut in every row of height and depth
+% \arraystretch times the height and depth of the strut
+% produced by an ordinary \strut command.
+%
+% PREAMBLE:
+% The PREAMBLE argument of an array or tabular environment can
+% contain the following:
+% l,r,c : indicate where entry is to be placed.
+% | : for vertical rule
+% @{EXP} : inserts the text EXP in every column.
+% \arraycolsep or \tabcolsep spacing is suppressed.
+% *{N}{PRE} : equivalent to writing N copies of PRE in the preamble.
+% PRE may contain *{N'}{EXP'} expressions.
+% p{LEN} : makes entry in parbox of width LEN.
+%
+% SPECIAL ARRAY COMMANDS:
+% \multicolumn{N}{FORMAT}{ITEM} : replaces the next N column
+% items by ITEM, formatted according to FORMAT.
+% FORMAT should contain at most one l,r or c.
+% If it contains none, then ITEM is ignored.
+%
+% \vline : draws a vertical line the height of the current row. May
+% appear in an array element entry.
+% \hline : draws a horizontal line between rows. Must appear either
+% before the first entry (to appear above the first row) or
+% right after a \\ command. If followed by another \hline,
+% then adds a \vskip of \doublerulesep.
+%
+% \cline{i-j} : draws horizontal lines between rows covering columns
+% i through j, inclusive. Multiple commands may follow
+% one another to provide lines covering several disjoint
+% columns
+% \extracolsep{WIDTH} : for use inside an @ in the preamble. Causes
+% a WIDTH space to be added between columns for the rest
+% of the columns. This is in addition to the ordinary
+% intercolumn space.
+%
+% \array ==
+% BEGIN
+% \@acol == \@arrayacol
+% \@classz == \@arrayclassz
+% \@classiv == \@arrayclassiv
+% \\ == \@arraycr
+% \@halignto == NULL
+% \@tabarray
+% END
+%
+% \endarray{NAME} == BEGIN \crcr }} END
+%
+% \tabular ==
+% BEGIN
+% \@halignto == NULL
+% \@tabular
+% END
+%
+% \tabular*{WIDTH} ==
+% BEGIN
+% \@halignto == to WIDTH
+% \@tabular
+% END
+%
+% \@tabular ==
+% BEGIN
+% \leavevmode
+% \hbox { $
+% \@acol == \@tabacol
+% \@classz == \@tabclassz
+% \@classiv == \@tabclassiv
+% \\ == \@tabularcr
+% \@tabarray
+% END
+%
+% \endtabular == BEGIN \crcr}} $} END
+%
+% \@tabarray == if next char = [ then \@array else \@array[c] fi
+%
+% \@array[POS]{PREAMBLE} ==
+% BEGIN
+% define \@arstrutbox to make \@arstrut produce strut of height
+% and depth \arraystretch times the height and
+% depth of a normal strut.
+% \@mkpream{PREAMBLE}
+% \@preamble == \halign \@halignto {\tabskip=0pt\@arstrut
+% eval{\@preamble}\tabskip = 0pt\cr %%}
+% \@startpbox == \@@startpbox
+% \@endpbox == \@@endpbox
+% if POS = t then \vtop
+% else if POS = b then \vbox
+% else \vcenter
+% fi fi
+% {
+% \par ==L {} % changed 92/09/18
+% \@sharp == #
+% \protect == \relax
+% \lineskip :=L 0pt
+% \baselineskip :=L 0pt
+% \@preamble
+% END
+%
+%
+% \@arraycr ==
+% BEGIN
+% $ %% Prevents extra space at end of row's last entry.
+% if next char = [
+% then \@argarraycr
+% else $ \cr %% Needed to balance $
+% END
+%
+% \@argarraycr[LENGTH] ==
+% BEGIN
+% $ %% Needed to balance $ of \@arraycr
+% if LENGTH > 0
+% then \@tempdima := depth of \@arstrutbox + LENGTH
+% \vrule height 0pt width 0pt depth \@tempdima
+% \cr
+% else \cr \noalign{\vskip LENGTH}
+% END
+%
+% \@tabularcr and \@argtabularcr same as \@arraycr and \@argarraycr
+% except without the extra $'s.
+% \end{oldcomments}
+%
+%
+% \begin{macro}{\extracolsep}
+% \begin{macrocode}
+\def\extracolsep#1{\tabskip #1\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\array}
+% \begin{macrocode}
+\def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
+ \let\@classiv\@arrayclassiv
+ \let\\\@arraycr\let\@halignto\@empty\@tabarray}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\endarray}
+% \begin{macro}{\endtabular}
+% \begin{macro}{\endtabular*}
+% \begin{macrocode}
+\def\endarray{\crcr\egroup\egroup}
+\def\endtabular{\crcr\egroup\egroup $\egroup}
+\expandafter \let \csname endtabular*\endcsname = \endtabular
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\tabular}
+% \begin{macrocode}
+\def\tabular{\let\@halignto\@empty\@tabular}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabular*}
+% \changes{v1.1j}{1998/05/18}{Use \cs{setlength}, so that
+% calc extensions apply.}
+% Note that the change to use |\setlength| slightly alters the
+% timing of the expansion and use of the length in |#1| but this is
+% very unlikely to have any practical effect.
+% \changes{latex2e}{1993/08/05}{Replaced \cs{expandafter}\cs{def}
+% by \cs{@namedef}.}
+% \begin{macrocode}
+\@namedef{tabular*}#1{%
+ \setlength\dimen@{#1}%
+ \edef\@halignto{to\the\dimen@}\@tabular}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabular}
+% \begin{macrocode}
+\def\@tabular{\leavevmode \hbox \bgroup $\let\@acol\@tabacol
+ \let\@classz\@tabclassz
+ \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabarray}
+% RmS 91/11/04 added |\m@th|.
+% \begin{macrocode}
+\def\@tabarray{\m@th\@ifnextchar[\@array{\@array[c]}}
+% \end{macrocode}
+% \end{macro}
+%
+% RmS 1993/11/03 changed |\halign| to |\ialign| and removed superfluous
+% |\tabskip| assignment
+%
+%
+% \changes{v1.1i}{1996/10/21}{Moved the code associated with
+% \cs{@mkpream} into the group provided by the box, for robustness
+% (latex/2183)}
+% \begin{macro}{\@array}
+% \begin{macrocode}
+\def\@array[#1]#2{%
+ \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
+% \end{macrocode}
+% \changes{LaTeX2.09}{1992/09/18}
+% {Changed \cs{par} to \cs{@empty} to avoid starting new row
+% e.g. after \cs{hline}}
+% \begin{macrocode}
+ \bgroup
+% \end{macrocode}
+% This next bit of code sets up the strut and then builds the halign
+% and its preamble according to the specification in the second
+% argument.
+%
+% This code has been moved inside the box.
+% A side effect of this has been to expose what was a buglet in the
+% previous version: since the |\@arstrut| below is expanded and
+% contains an |\ifmmode| then it could produce an unnecessary extra
+% box in every row, thus wasting `lots of' main memory.
+% \begin{macrocode}
+ \setbox\@arstrutbox\hbox{%
+ \vrule \@height\arraystretch\ht\strutbox
+ \@depth\arraystretch \dp\strutbox
+ \@width\z@}%
+ \@mkpream{#2}%
+ \edef\@preamble{%
+ \ialign \noexpand\@halignto
+ \bgroup \@arstrut \@preamble \tabskip\z@skip \cr}%
+% \end{macrocode}
+% That is the end of setting up the preamble; now we reset
+% things before executing the halign built-up in |\@preamble|.
+% The restorations could be done by introducing an extra group,
+% thus saving tokens.
+% \changes{v1.0k}{1994/12/08}{Add \cs{tabularnewline}}
+% \changes{v1.1i}{1996/10/21}{Use \cs{set@typeset@protect}}
+% \begin{macrocode}
+ \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
+ \let\tabularnewline\\%
+ \let\par\@empty
+ \let\@sharp##%
+ \set@typeset@protect
+ \lineskip\z@skip\baselineskip\z@skip
+% \end{macrocode}
+% If the parsing of the preamble goes wrong there my be some
+% characters left which \TeX{} then tries to typeset, i.e., we
+% would be in horizontal mode. That would produce an endless loop
+% because the |\halign| expects vertical mode thus issues a |\par|
+% but that is a no-op at this point. So we better test this case
+% issue some error message and make a crude recovery by ending that
+% horizontal mode with force.
+% A better fix would be to ensure that we never pick up more than a
+% single character token (not done).
+% \changes{v1.1m}{1998/11/13}{Check for hmode to see if something
+% went wrong during parsing (pr/2884)}
+% \begin{macrocode}
+ \ifhmode \@preamerr\z@ \@@par\fi
+ \@preamble}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@arraycr}
+% Array version of |\\|.
+% \begin{macrocode}
+\def\@arraycr{%
+ ${\ifnum0=`}\fi\@ifstar\@xarraycr\@xarraycr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@arraycr}
+% \begin{macrocode}
+\def\@xarraycr{\@ifnextchar[\@argarraycr{\ifnum0=`{\fi}${}\cr}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@argarraycr}
+% \begin{macrocode}
+\def\@argarraycr[#1]{%
+ \ifnum0=`{\fi}${}\ifdim #1>\z@ \@xargarraycr{#1}\else
+ \@yargarraycr{#1}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabularnewline}
+% \changes{v1.0i}{1994/11/14}{(DPC) Macro added}
+% \changes{v1.0k}{1994/12/08}{(DPC) Made it \cs{relax}}
+% Tabular version of |\\|.
+% \begin{macrocode}
+\let\tabularnewline\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabularcr}
+% \begin{macrocode}
+\def\@tabularcr{%
+ {\ifnum0=`}\fi\@ifstar\@xtabularcr\@xtabularcr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xtabularcr}
+% \begin{macrocode}
+\def\@xtabularcr{\@ifnextchar[\@argtabularcr{\ifnum0=`{\fi}\cr}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@argtabularcr}
+% \begin{macrocode}
+\def\@argtabularcr[#1]{%
+ \ifnum0=`{\fi}%
+ \ifdim #1>\z@
+ \unskip\@xargarraycr{#1}%
+ \else
+ \@yargarraycr{#1}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xargarraycr}
+% \begin{macrocode}
+\def\@xargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox
+ \vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@yargarraycr}
+% \begin{macrocode}
+\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\multicolumn}
+% \begin{oldcomments}
+% \multicolumn{NUMBER}{FORMAT}{ITEM} ==
+% BEGIN
+% \multispan{NUMBER}
+% \begingroup
+% \@addamp == null
+% \@mkpream{FORMAT}
+% \@sharp == ITEM
+% \protect == \relax
+% \@startpbox == \@@startpbox
+% \@endpbox == \@@endpbox
+% \@arstrut
+% \@preamble
+% \endgroup
+% END
+% \end{oldcomments}
+%
+% The command |\def\@addamp{}| was removed from |\multicolumn| on
+% 6 Dec 86 because it caused embedded array environments not to work. I
+% think that it was included originally to prevent an error message if
+% the 2nd argument to the |\multicolumn| command had two column
+% specifiers.
+%
+% 8 Feb 89 --- |\hbox{}| added after |\@preamble| to correct bug that
+% occurred if |\multicolumn| preceded |\\[D]| with |D > 0|,
+% caused by |\\[]| command doing an |\unskip|, which removed
+% |\tabcolsep| glue inserted by |\multicolumn|.
+%
+%
+% \changes{v1.0h}{1994/11/04}{(ASAJ) added \cs{set@typeset@protect}.}
+% \changes{v1.1i}{1996/10/21}{Make \cs{multicolumn} long (latex/2180)}
+% This has been made long so that, for example, a |p|-column can
+% contain multiple paragraphs; maybe the arguments of |@|-expressions
+% should also be able to contain multiple paragraphs.
+% \begin{macrocode}
+\long\def\multicolumn#1#2#3{\multispan{#1}\begingroup
+ \@mkpream{#2}%
+ \def\@sharp{#3}\set@typeset@protect
+ \let\@startpbox\@@startpbox\let\@endpbox\@@endpbox
+ \@arstrut \@preamble\hbox{}\endgroup\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{oldcomments}
+% Codes for classes and character numbers of array, tabular and
+% multicolumn arguments.
+%
+% Character Class Number
+% --------- ----- ------
+% c 0 0
+% l 0 1
+% r 0 2
+%
+% | 1 -
+% @ 2 -
+% p 3 -
+% {@-exp} 4 -
+% {p-arg} 5 -
+%
+% \@testpach \foo : expands \foo, which should be an array parameter
+% token, and sets \@chclass and \@chnum to its class and
+% number. Uses \@lastchclass to distinguish 4 and 5
+%
+% Preamble error codes
+% 0: 'illegal character'
+% 1: 'Missing @-exp'
+% 2: 'Missing p-arg'
+%
+% \@addamp ==
+% BEGIN if @firstamp = true then @firstamp := false
+% else & fi
+% END
+%
+% \@mkpream TOKENLIST ==
+% BEGIN
+% @firstamp := T
+% \@lastchclass := 6
+% \@preamble == null
+% \@sharp == \relax
+% \protect == BEGIN \noexpand\protect\noexpand END
+% \@startpbox == \relax
+% \@endpbox == \relax
+% \@expast{TOKENLIST}
+% for \@nextchar := expand(\reserved@a)
+% do \@testpach{\@nextchar}
+% case of \@chclass
+% 0 -> \@classz
+% 1 -> \@classi
+% ...
+% 5 -> \@classv
+% end case
+% \@lastchclass := \@chclass
+% od
+% case of \@lastchclass
+% 0 -> \hskip \arraycolsep % lrc
+% 1 -> % |
+% 2 -> \@preamerr1 % 'Missing @-exp' % @
+% 3 -> \@preamerr2 % 'Missing p-arg' % p
+% 4 -> % @-exp
+% 5 -> \hskip \arraycolsep % p-exp
+% end case
+% END
+%
+% \@arrayclassz ==
+% BEGIN
+% \@preamble := \@preamble *
+% case of \@lastchclass
+% 0 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
+% 1 -> \@addamp \hskip \arraycolsep
+% 2 -> % impossible
+% 3 -> % impossible
+% 4 -> \@addamp
+% 5 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
+% 6 -> \@addamp \hskip \arraycolsep
+% end case
+% * case of \@chnum
+% 0 -> \hfil$\relax\@sharp$\hfil
+% 1 -> $\relax\@sharp$\hfil
+% 2 -> \hfil$\relax\@sharp$
+% end case
+% END
+%
+% \@tabclassz == similar to \@arrayclassz
+%
+% \@classi ==
+% BEGIN
+% \@preamble := \@preamble *
+% case of \@lastchclass
+% 0 -> \hskip \arraycolsep \@arrayrule
+% 1 -> \hskip \doublerulesep \@arrayrule
+% 2 -> % impossible
+% 3 -> % impossible
+% 4 -> \@arrayrule
+% 5 -> \hskip \arraycolsep \@arrayrule
+% 6 -> \@arrayrule
+% end case
+% END
+%
+% \@classii ==
+% BEGIN
+% \@preamble := \@preamble *
+% case of \@lastchclass
+% 0 ->
+% 1 -> \hskip .5\arrayrulewidth
+% 2 -> % impossible
+% else ->
+% end case
+% END
+%
+% \@classiii ==
+% BEGIN
+% \@preamble := \@preamble *
+% case of \@lastchclass
+% 0 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
+% 1 -> \@addamp \hskip \arraycolsep
+% 2 -> % impossible
+% 3 -> % impossible
+% 4 -> \@addamp
+% 5 -> \hskip \arraycolsep \@addamp \hskip \arraycolsep
+% 6 -> \@addamp \hskip \arraycolsep
+% end case
+% END
+%
+% \@arrayclassiv ==
+% BEGIN \@preamble := \@preamble * $ \@nextchar$ END
+%
+% \@tabclassiv == same as \@arrayclassv except without the $ ... $
+%
+% \@classv ==
+% BEGIN
+% \@preamble :=
+% \@preamble * \@startpbox{\@nextchar}\ignorespaces\@sharp
+% \@endpbox
+% END
+%
+% \@expast{S}:
+% Sets \reserved@a := S with all instances of *{N}{STRING}
+% replaced by N copies of STRING, where N > 0. An *
+% appearing inside braces is ignored, but *-expressions
+% inside STRING are expanded, so nested *-expressions are
+% handled properly.
+%
+% \@expast{S} == BEGIN \@xexpast S *0x\@@ END
+%
+% \@xexpast S1 *{N}{S2} S3 \@@ ==
+% BEGIN
+% \reserved@a := S1
+% \@tempcnta := N
+% if \@tempcnta > 0
+% then while \@tempcnta > 0 do \reserved@a := \reserved@a S2
+% \@tempcnta := \@tempcnta - 1 od
+% \reserved@b == \@xexpast
+% else \reserved@b == \@xexnoop
+% fi
+% \expandafter \reserved@b \reserved@a S3 \@@
+% END
+% \end{oldcomments}
+%
+%
+% \begin{macro}{\@xexnoop}
+% \begin{macrocode}
+\def\@xexnoop #1\@@{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@expast}
+% \begin{macrocode}
+\def\@expast#1{\@xexpast #1*0x\@@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xexpast}
+% \begin{macrocode}
+\def\@xexpast#1*#2#3#4\@@{%
+ \edef\reserved@a{#1}%
+ \@tempcnta#2\relax
+ \ifnum\@tempcnta>\z@
+ \@whilenum\@tempcnta>\z@\do
+ {\edef\reserved@a{\reserved@a#3}\advance\@tempcnta \m@ne}%
+ \let\reserved@b\@xexpast
+ \else
+ \let\reserved@b\@xexnoop
+ \fi
+ \expandafter\reserved@b\reserved@a #4\@@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@firstamp}
+% \begin{macro}{\@addamp}
+% \begin{macrocode}
+\newif\if@firstamp
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@addamp{%
+ \if@firstamp
+ \@firstampfalse
+ \else
+ \edef\@preamble{\@preamble &}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@arrayacol}
+% \begin{macro}{\@tabacol}
+% \begin{macro}{\@ampacol}
+% \begin{macro}{\@acolampacol}
+% \begin{macrocode}
+\def\@arrayacol{\edef\@preamble{\@preamble \hskip \arraycolsep}}
+\def\@tabacol{\edef\@preamble{\@preamble \hskip \tabcolsep}}
+\def\@ampacol{\@addamp \@acol}
+\def\@acolampacol{\@acol\@addamp\@acol}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@mkpream}
+% \changes{v1.0h}{1994/11/04}{(ASAJ) Added \cs{@unexpandable@protect}
+% to \cs{@mkpream}.}
+% \begin{macrocode}
+\def\@mkpream#1{\@firstamptrue\@lastchclass6
+ \let\@preamble\@empty
+ \let\protect\@unexpandable@protect
+ \let\@sharp\relax
+ \let\@startpbox\relax\let\@endpbox\relax
+ \@expast{#1}%
+ \expandafter\@tfor \expandafter
+ \@nextchar \expandafter:\expandafter=\reserved@a\do
+ {\@testpach\@nextchar
+ \ifcase \@chclass \@classz \or \@classi \or \@classii \or \@classiii
+ \or \@classiv \or\@classv \fi\@lastchclass\@chclass}%
+ \ifcase \@lastchclass \@acol
+ \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@arrayclassz}
+% \begin{macrocode}
+\def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
+ \or \or \@addamp \or
+ \@acolampacol \or \@firstampfalse \@acol \fi
+\edef\@preamble{\@preamble
+ \ifcase \@chnum
+ \hfil$\relax\@sharp$\hfil \or $\relax\@sharp$\hfil
+ \or \hfil$\relax\@sharp$\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabclassz}
+% RmS 91/08/14 inserted extra braces around entry for NFSS
+% \begin{macrocode}
+\def\@tabclassz{%
+ \ifcase\@lastchclass
+ \@acolampacol
+ \or
+ \@ampacol
+ \or
+ \or
+ \or
+ \@addamp
+ \or
+ \@acolampacol
+ \or
+ \@firstampfalse\@acol
+ \fi
+ \edef\@preamble{%
+ \@preamble{%
+ \ifcase\@chnum
+ \hfil
+% \end{macrocode}
+% \changes{v1.1p}{2018/12/30}{Add extra \cs{hskip} to guard against an
+% \cs{unskip} at the start of a c-column cell (gh/102)}
+% \begin{macrocode}
+ \hskip1sp%
+ \ignorespaces\@sharp\unskip\hfil
+ \or
+% \end{macrocode}
+% \changes{v1.1g}{1996/04/22}
+% {(DPC) Extra \cs{hskip} keeps tabcolsep in empty columns
+% internal/2122}
+% \changes{v1.1h}{1996/06/14}
+% {(DPC) Change both\cs{z@skip} to 1sp for latex/2160}
+% \begin{macrocode}
+ \hskip1sp\ignorespaces\@sharp\unskip\hfil
+ \or
+ \hfil\hskip1sp\ignorespaces\@sharp\unskip
+ \fi}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@classi}
+% \begin{macrocode}
+\def\@classi{%
+ \ifcase\@lastchclass
+ \@acol\@arrayrule
+ \or
+ \@addtopreamble{\hskip \doublerulesep}\@arrayrule
+ \or
+ \or
+ \or
+ \@arrayrule
+ \or
+ \@acol\@arrayrule
+ \or
+ \@arrayrule
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@classii}
+% \begin{macrocode}
+\def\@classii{%
+ \ifcase\@lastchclass
+ \or
+ \@addtopreamble{\hskip .5\arrayrulewidth}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@classiii}
+% \begin{macrocode}
+\def\@classiii{\ifcase \@lastchclass \@acolampacol \or
+ \@addamp\@acol \or
+ \or \or \@addamp \or
+ \@acolampacol \or \@ampacol \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@tabclassiv}
+% \begin{macrocode}
+\def\@tabclassiv{\@addtopreamble\@nextchar}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@arrayclassiv}
+% \begin{macrocode}
+\def\@arrayclassiv{\@addtopreamble{$\@nextchar$}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@classv}
+% \begin{macrocode}
+\def\@classv{\@addtopreamble{\@startpbox{\@nextchar}\ignorespaces
+\@sharp\@endpbox}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addtopreamble}
+% \begin{macrocode}
+\def\@addtopreamble#1{\edef\@preamble{\@preamble #1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chclass}
+% \begin{macro}{\@lastchclass}
+% \begin{macro}{\@chnum}
+% \begin{macrocode}
+\newcount\@chclass
+\newcount\@lastchclass
+\newcount\@chnum
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\arraycolsep}
+% \begin{macro}{\tabcolsep}
+% \begin{macro}{\arrayrulewidth}
+% \begin{macro}{\doublerulesep}
+% \begin{macrocode}
+\newdimen\arraycolsep
+\newdimen\tabcolsep
+\newdimen\arrayrulewidth
+\newdimen\doublerulesep
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\arraystretch}
+% \begin{macrocode}
+\def\arraystretch{1} % Default value.
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@arstrutbox}
+% \begin{macro}{\@arstrut}
+% \begin{macrocode}
+\newbox\@arstrutbox
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@arstrut{%
+ \relax\ifmmode\copy\@arstrutbox\else\unhcopy\@arstrutbox\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@arrayrule}
+% \begin{macrocode}
+\def\@arrayrule{\@addtopreamble{\hskip -.5\arrayrulewidth
+ \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@testpatch}
+% \begin{macrocode}
+\def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
+ \ifnum \@lastchclass=3 5 \else
+ \z@ \if #1c\@chnum \z@ \else
+ \if #1l\@chnum \@ne \else
+ \if #1r\@chnum \tw@ \else
+ \@chclass \if #1|\@ne \else
+ \if #1@\tw@ \else
+ \if #1p3 \else \z@ \@preamerr 0\fi
+ \fi \fi \fi \fi \fi \fi
+\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hline}
+% \begin{macrocode}
+\def\hline{%
+ \noalign{\ifnum0=`}\fi\hrule \@height \arrayrulewidth \futurelet
+ \reserved@a\@xhline}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xhline}
+% \begin{macrocode}
+\def\@xhline{\ifx\reserved@a\hline
+ \vskip\doublerulesep
+% \end{macrocode}
+% Measure from the middle of the rules.
+% \changes{latex2e}{1993/12/16}{Measure from middle of vertical rules}
+% \begin{macrocode}
+ \vskip-\arrayrulewidth
+ \fi
+ \ifnum0=`{\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vline}
+% \begin{macrocode}
+\def\vline{\vrule \@width \arrayrulewidth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cline}
+% \changes{v1.1c}{1995/09/14}
+% {(DPC) New implementation}
+% \begin{macro}{\@cline}
+% The old \LaTeX2.09 implementation of |\cline| used up quite
+% a lot of memory and two precious count registers.
+% This new (1995/09/14) implementation does not use any count registers.
+% It is coded in a way that depends heavily on the definition of
+% |\multispan| so that command has been moved here from the file
+% |ltplain.dtx|.
+%
+% These counters are no longer declared.
+%\begin{verbatim}
+% \newcount\@cla
+% \newcount\@clb
+%\end{verbatim}
+%
+% \begin{macrocode}
+\def\cline#1{\@cline#1\@nil}
+% \end{macrocode}
+%
+% \changes{v1.1e}{1995/10/17}
+% {(DPC) Use \cs{@multicnt}}
+% \begin{macrocode}
+\def\@cline#1-#2\@nil{%
+ \omit
+% \end{macrocode}
+% Use the counter from |\multispan|.
+% \begin{macrocode}
+ \@multicnt#1%
+ \advance\@multispan\m@ne
+ \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
+ \@multicnt#2%
+ \advance\@multicnt-#1%
+ \advance\@multispan\@ne
+% \end{macrocode}
+% The original had |\unskip| at this point,
+% but how could a skip get here ???
+% \begin{macrocode}
+ \leaders\hrule\@height\arrayrulewidth\hfill
+ \cr
+% \end{macrocode}
+% This is back spacing is fairly horrible,
+% but it is what happened in the old version\ldots\
+% An alternative would be to make |\cline| look ahead for a following
+% |\cline| as does |\hline|. This would alter the spacing in existing
+% documents so keep the old version in the kernel. Perhaps a package
+% should do this differently.
+% \begin{macrocode}
+ \noalign{\vskip-\arrayrulewidth}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\mscount}
+% The |\mscount| counter is no longer declared, saving a csname and a
+% register. It is declared in compatibility mode.
+% \end{macro}
+%
+% \begin{macro}{\multispan}
+% \begin{macro}{\@multispan}
+% \changes{v1.1e}{1995/10/17}
+% {(DPC) Macro added.}
+% \begin{macro}{\sp@n}
+% Modify |\multispan| slightly from its plain \TeX\ definition
+% to allow more efficient code sharing with |\multicolumn|.
+% Also share a count register with |\multiput|.
+% \begin{macrocode}
+\def\multispan{\omit\@multispan}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@multispan#1{%
+ \@multicnt#1\relax
+ \loop\ifnum\@multicnt>\@ne \sp@n\repeat}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\sp@n{\span\omit\advance\@multicnt\m@ne}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@startpbox}
+% \begin{macro}{\@endpbox}
+% Helper macros for `p' columns.
+%
+% |\@startpbox|\marg{width} \emph{text} |\egroup| is essentially
+% |\parbox|\marg{width}\marg{text}
+%
+% |\@endpbox| is essentially |\unskip \strut \par \egroup\hfil|
+% (Changed 14 Jan 89) (changed again 1994/05/13)
+%
+% \changes{v1.0d}{1994/05/03}
+% {Use \cs{@finalstrut} based on depth of \cs{@arstrutbox}}
+
+% \changes{v1.1j}{1998/05/18}{Use \cs{setlength} to set \cs{hsize},
+% so that the changes in the calc package apply here.}
+% \begin{macrocode}
+\def\@startpbox#1{\vtop\bgroup \setlength\hsize{#1}\@arrayparboxrestore}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@endpbox{\@finalstrut\@arstrutbox\par\egroup\hfil}
+% \end{macrocode}
+%
+% 14 Jan 89: Def of |\@endpbox| changed from\\
+% |\def\@endpbox{\par\vskip\dp\@arstrutbox\egroup\hfil}|\\
+% so vertical spacing works out right if the last line of a `p' entry
+% has a descender.
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@startpbox}
+% \begin{macro}{\@@endpbox}
+% \begin{macrocode}
+\let\@@startpbox=\@startpbox
+\let\@@endpbox=\@endpbox
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltthm.dtx b/macros/latex-dev/base/ltthm.dtx
new file mode 100644
index 0000000000..78e8a2e586
--- /dev/null
+++ b/macros/latex-dev/base/ltthm.dtx
@@ -0,0 +1,289 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltthm.dtx
+%<*driver>
+% \fi
+\ProvidesFile{ltthm.dtx}
+ [2014/09/29 v1.0f LaTeX Kernel (Theorems)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltthm.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Theorem Environments}
+%
+%
+% The user creates his own theorem-like environments with the command\\
+% |\newtheorem|\marg{name}\marg{text}\oarg{counter} or\\
+% |\newtheorem|\marg{name}\oarg{oldname}\marg{text}\\
+% This defines the environment \meta{name} to be just as one would
+% expect a theorem environment to be, except that it prints \meta{text}
+% instead of ``Theorem''.
+%
+% If \meta{oldname} is given, then environments \meta{name} and
+% \meta{oldname} use the same counter, so using a \meta{name}
+% environment advances the number of the next \meta{name} environment,
+% and vice-versa.
+%
+% If \meta{counter} is given, then environment \meta{name} is numbered
+% within \meta{counter}.
+%
+% E.g., if \meta{counter} = |subsection|, then the first \meta{name} in
+% subsection 7.2 is numbered \meta{text} 7.2.1.
+%
+% The way \meta{name} environments are numbered can be changed by
+% redefining |\the|\meta{name}.
+%
+% \StopEventually{}
+%
+%
+% \changes{v1.0a}{1994/03/28}{Initial version, split from latex.dtx}
+% \changes{v1.0c}{1994/05/25}{Modify documentation}
+% \changes{v1.0f}{1995/10/10}{Make \cs{newtheorem} `only preamble'}
+% \changes{v1.0g}{1995/10/16}
+% {Revert to previous \cs{newtheorem} behaviour}
+%
+% \begin{oldcomments}
+%
+% DOCUMENT STYLE PARAMETERS
+%
+% \@thmcounter{COUNTER} : A command such that
+% \edef\theCOUNTER{\@thmcounter{COUNTER}}
+% defines \theCOUNTER to produce a number for a theorem environment.
+% The default is:
+% BEGIN \noexpand\arabic{COUNTER} END
+%
+% \@thmcountersep : A separator placed between a theorem number and
+% the number of the counter within which it is numbered.
+% E.g., to make the third theorem of section 7.2 be numbered
+% 7.2-3, \@thmcountersep should be \def'ed to '-'. Its
+% default is '.'.
+%
+% \@begintheorem{NAME}{NUMBER} : A command that begins a theorem
+% environment for a 'theorem' named 'NAME NUMBER' --
+% e.g., \@begintheorem{Lemma}{3.7} starts Lemma 3.7.
+%
+% \@opargbegintheorem{NAME}{NUMBER}{OPARG} :
+% A command that begins a theorem
+% environment for a 'theorem' named 'NAME NUMBER' with optional
+% argument OPARG -- e.g., \@begintheorem{Lemma}{3.7}{Jones}
+% starts `Lemma 3.7 (Jones):'.
+%
+% \@endtheorem : A command that ends a theorem environment.
+%
+% \newtheorem{NAME}{TEXT}[COUNTER] ==
+% BEGIN
+% if \NAME is definable
+% then \@definecounter{NAME}
+% if COUNTER present
+% then \@newctr{NAME}[COUNTER] fi
+% \theNAME == BEGIN \theCOUNTER \@thmcountersep
+% eval\@thmcounter{NAME} END
+% else \theNAME == BEGIN eval\@thmcounter{NAME} END
+% \NAME == \@thm{NAME}{TEXT}
+% \endNAME == \@endtheorem
+% else error
+% fi
+% END
+%
+% \newtheorem{NAME}[OLDNAME]{TEXT}==
+% BEGIN
+% if counter OLDNAME nonexistent
+% then ERROR
+% else
+% if \NAME is definable
+% then BEGIN
+% \theNAME == \theOLDNAME
+% \NAME == \@thm{OLDNAME}{TEXT}
+% \endNAME == \@endtheorem
+% END
+% else error
+% fi
+% fi
+% END
+%
+% \@thm{NAME}{TEXT} ==
+% BEGIN
+% \refstepcounter{NAME}
+% if next char = [
+% then \@ythm{NAME}{TEXT}
+% else \@xthm{NAME}{TEXT}
+% fi
+% END
+%
+% \@xthm{NAME}{TEXT} ==
+% BEGIN
+% \@begintheorem{TEXT}{\theNAME}
+% \ignorespaces
+% END
+%
+% \@ythm{NAME}{TEXT}[OPARG] ==
+% BEGIN
+% \@opargbegintheorem{TEXT}{\theNAME}{OPARG}
+% \ignorespaces
+% END
+% \end{oldcomments}
+%
+% \begin{macro}{\newtheorem}
+% |\newtheorem| ought really be allowed only in the preamble
+% Which would be good document style, and allow some main memory to be
+% saved by declaring these commands to be
+% |\@onlypreamble|. Unfortunately the \LaTeX\ book indicates that
+% |\newtheorem| may be used anywhere in the document\ldots
+% \begin{macrocode}
+%<*2ekernel>
+\def\newtheorem#1{%
+ \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@nthm}
+% \begin{macrocode}
+\def\@nthm#1#2{%
+ \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xnthm}
+%
+% 92/09/18 RmS: Changed |\@addtoreset| to |\@newctr| to produce error
+% message if counter |#3| does not exist (to be
+% consistent with behaviour of |\newcounter|)
+% \begin{macrocode}
+\def\@xnthm#1#2[#3]{%
+ \expandafter\@ifdefinable\csname #1\endcsname
+ {\@definecounter{#1}\@newctr{#1}[#3]%
+ \expandafter\xdef\csname the#1\endcsname{%
+ \expandafter\noexpand\csname the#3\endcsname \@thmcountersep
+ \@thmcounter{#1}}%
+ \global\@namedef{#1}{\@thm{#1}{#2}}%
+ \global\@namedef{end#1}{\@endtheorem}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ynthm}
+% \begin{macrocode}
+\def\@ynthm#1#2{%
+ \expandafter\@ifdefinable\csname #1\endcsname
+ {\@definecounter{#1}%
+ \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
+ \global\@namedef{#1}{\@thm{#1}{#2}}%
+ \global\@namedef{end#1}{\@endtheorem}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@othm}
+% \changes{LaTeX2.09}{1992/01/10}
+% {(RmS) Check for existence of theorem environment}
+% \changes{LaTeX2.09}{1992/08/19}
+% {(RmS) Changed error message to complain about undefined
+% counter}
+% \changes{v1.0b}{1994/04/09}{Use standard counter error message (FMi)}
+% \changes{v1.0c}{1994/04/17}{Use new std counter error message (FMi)}
+% \begin{macrocode}
+\def\@othm#1[#2]#3{%
+ \@ifundefined{c@#2}{\@nocounterr{#2}}%
+ {\expandafter\@ifdefinable\csname #1\endcsname
+ {\global\@namedef{the#1}{\@nameuse{the#2}}%
+ \global\@namedef{#1}{\@thm{#2}{#3}}%
+ \global\@namedef{end#1}{\@endtheorem}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@thm}
+% \begin{macrocode}
+\def\@thm#1#2{%
+ \refstepcounter{#1}%
+ \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@xthm}
+% \begin{macro}{\@ythm}
+% \begin{macrocode}
+\def\@xthm#1#2{%
+ \@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}
+\def\@ythm#1#2[#3]{%
+ \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Default values
+% \begin{macro}{\@thmcounter}
+% \begin{macro}{\@thmcountersep}
+% \begin{macrocode}
+\def\@thmcounter#1{\noexpand\arabic{#1}}
+\def\@thmcountersep{.}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@begintheorem}
+% \begin{macro}{\@opargbegintheorem}
+% \begin{macro}{\@endtheorem}
+% \changes{LaTeX2.09}{1991/08/14}
+% {Moved \cs{itshape} after \cs{item} to make it work with
+% NFSS}
+% Providing theorem defaults.
+% \task{???}{add `reset@font?}
+% \begin{macrocode}
+\def\@begintheorem#1#2{\trivlist
+ \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape}
+\def\@opargbegintheorem#1#2#3{\trivlist
+ \item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape}
+\def\@endtheorem{\endtrivlist}
+%</2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltvers.dtx b/macros/latex-dev/base/ltvers.dtx
new file mode 100644
index 0000000000..f8da6086ac
--- /dev/null
+++ b/macros/latex-dev/base/ltvers.dtx
@@ -0,0 +1,273 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltvers.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltvers.dtx}
+ [2019/07/01 v1.1c LaTeX Kernel (Version Info)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltvers.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \section{Version Identification}
+% First we identify the date and version number of this release of
+% \LaTeX, and set |\everyjob| so that it is printed at the start of
+% every \LaTeX\ run.
+%
+% \StopEventually{}
+%
+% \changes{v1.0g}{1996/11/28}
+% {Check for old format modified /2319}
+% \changes{v1.0f}{1996/11/20}
+% {Check for old format modified /2319}
+% \changes{v1.0e}{1995/05/12}
+% {Add autoload docstrip guards}
+% \changes{v1.0e}{1995/05/12}
+% {Check for format older than 1 year}
+% \changes{v1.0d}{1994/05/25}
+% {Remove PRELIMINARY TEST RELEASE from startup banner
+% (spring is here)}
+% \changes{v1.0b}{1994/04/12}
+% {Have version info generated automatically.}
+% \changes{v1.0a}{1994/03/04}
+% {Initial version, split from latex.dtx}
+% \changes{v1.0r}{2015/02/21}{Removed autoload code}
+% \changes{v1.0t}{2015/06/23}
+% {set \cs{patch@level} in ltvers rather than in ltfinal/ltpatch}
+%
+% \begin{macro}{\fmtname}
+% \begin{macro}{\fmtversion}
+% \begin{macro}{\latexreleaseversion}
+% \begin{macro}{\patch@level}
+% A |\patch@level| of \texttt{0} or higher denotes an official
+% public release. A negative value indicates a candidate release
+% that is not distributed.
+%
+% If we put code updates into the kernel that are supposed to go
+% into the next release we set the |\patch@level| to \texttt{-1}
+% and the |\fmtversion| / |\latexreleaseversion| to the dated of
+% the next release (guessed, the real value is not so important and
+% will get corrected when we make the release official).
+%
+% If the |\patch@level| is already at \texttt{-1} we do nothing
+% here and use the |\fmtversion| date for any new|\IncludeInRelease|
+% line when we add further code.
+%
+% Finally, if we do make a public release we either just set the
+% |\patch@level| to zero (if our initial guess was good) or we also
+% change the date and then have to additionally change to that date
+% on all the |\IncludeInRelease| statements that used the
+% ``guessed'' date.
+% \begin{macrocode}
+%<*2ekernel>
+\def\fmtname{LaTeX2e}
+\edef\fmtversion
+%</2ekernel>
+%<latexrelease>\edef\latexreleaseversion
+%<*2ekernel|latexrelease>
+ {2019-10-01}
+%</2ekernel|latexrelease>
+%<*2ekernel>
+\def\patch@level{-2}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Check that the format being made is not too old.
+% The error message complains about `more than 5 years'
+% but in fact the error is not triggered until 65 months.
+%
+% This code is currently not activated as we don't know if we already
+% got to the last official 2e version (due to staff shortage or due to
+% a successor (think positive:-)).
+% \changes{v1.0i}{2001/06/04}{Check for old format disabled}
+% \changes{v1.0k}{2004/01/28}{Check for old format made 5 years (pr/3601)}
+% \changes{v1.0l}{2009/09/24}{Stop checking for old format}
+% \begin{macrocode}
+\iffalse
+\def\reserved@a#1/#2/#3\@nil{%
+ \count@\year
+ \advance\count@-#1\relax
+ \multiply\count@ by 12\relax
+ \advance\count@\month
+ \advance\count@-#2\relax}
+\expandafter\reserved@a\fmtversion\@nil
+% \end{macrocode}
+% |\count@| is now the age of this file in months. Take a generous
+% definition of `year' so this message is not generated too often.
+% \begin{macrocode}
+\ifnum\count@>65
+ \typeout{^^J%
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
+! You are attempting to make a LaTeX format from a source file^^J%
+! That is more than five years old.^^J%
+!^^J%
+! If you enter <return> to scroll past this message then the format^^J%
+! will be built, but please consider obtaining newer source files^^J%
+! before continuing to build LaTeX.^^J%
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
+}
+ \errhelp{To avoid this error message, obtain new LaTeX sources.}
+ \errmessage{LaTeX source files more than 5 years old!}
+\fi
+\let\reserved@a\relax
+\fi
+% \end{macrocode}
+%
+% \changes{v1.0p}{2015/01/22}{Preserve any \cs{everyjob} material inserted
+% by a loader (\texttt{.ini} file)}
+% \changes{v1.0v}{2015/08/23}{Allow negative patchlevel for pre-release}
+% \begin{macrocode}
+ \ifnum\patch@level=0
+ \everyjob\expandafter{\the\everyjob
+ \typeout{\fmtname \space<\fmtversion>}}
+ \immediate
+ \write16{\fmtname \space<\fmtversion>}
+ \else\ifnum\patch@level>0
+ \everyjob\expandafter{\the\everyjob
+ \typeout{\fmtname \space<\fmtversion> patch level \patch@level}}
+ \immediate
+ \write16{\fmtname \space<\fmtversion> patch level \patch@level}
+ \else
+ \everyjob\expandafter{\the\everyjob
+ \typeout{\fmtname \space<\fmtversion> pre-release\patch@level}}
+ \immediate
+ \write16{\fmtname \space<\fmtversion> pre-release\patch@level}
+ \fi
+ \fi
+%</2ekernel>
+% \end{macrocode}
+%
+% \begin{macro}{\IncludeInRelease}
+% \changes{v1.0w}{2015/02/21}
+% {set \cs{@currname} empty here (in case \cs{IncludeInRelease} input early)}
+% \begin{macrocode}
+%<2ekernel>\let\@currname\@empty
+% \end{macrocode}
+%
+% \changes{v1.0n}{2015/01/07}{macro added}
+% \changes{v1.0m}{2015/01/17}{modified with \cs{@currname}}
+% \changes{v1.0o}{2015/01/19}{Optional argument}
+% \changes{v1.0q}{2015/02/19}{Swap argument order}
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\newif\if@includeinrelease
+%<latexrelease>\@includeinreleasefalse
+% \end{macrocode}
+% \begin{macrocode}
+\def\IncludeInRelease#1{%
+ \if@includeinrelease
+ \PackageError{latexrelease}{mis-matched IncludeInRelease}{}%
+ \@includeinreleasefalse
+ \fi
+ \kernel@ifnextchar[%
+ {\@IncludeInRelease{#1}}
+ {\@IncludeInRelease{#1}[#1]}}
+% \end{macrocode}
+%
+% If a specific date has not been specified in |latexrelease|
+% use `|#1|`.
+% \begin{macrocode}
+\def\@IncludeInRelease#1[#2]{\@IncludeInRele@se{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@IncludeInRele@se#1#2#3{%
+ \toks@{[#1] #3}%
+ \expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax
+ \ifnum\expandafter\@parse@version#1//00\@nil
+ >\expandafter\@parse@version\fmtversion//00\@nil
+ \GenericInfo{}{Skipping: \the\toks@}%
+ \expandafter\expandafter\expandafter\@gobble@IncludeInRelease
+ \else
+ \GenericInfo{}{Applying: \the\toks@}%
+ \@includeinreleasetrue
+ \expandafter\let\csname\string#2+\@currname+IIR\endcsname\@empty
+ \fi
+ \else
+ \GenericInfo{}{Already applied: \the\toks@}%
+ \expandafter\@gobble@IncludeInRelease
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\EndIncludeInRelease{%
+\if@includeinrelease
+ \@includeinreleasefalse
+\else
+ \PackageError{latexrelease}{mis-matched EndIncludeInRelease}{}%
+\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\@gobble@IncludeInRelease#1\EndIncludeInRelease{%
+ \@includeinreleasefalse
+ \@check@IncludeInRelease#1\IncludeInRelease\@check@IncludeInRelease
+ \@end@check@IncludeInRelease}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\@check@IncludeInRelease#1\IncludeInRelease
+ #2#3\@end@check@IncludeInRelease{%
+ \ifx\@check@IncludeInRelease#2\else
+ \PackageError{latexrelease}{skipped IncludeInRelease}{}%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+% \end{macro}
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/ltxcheck.tex b/macros/latex-dev/base/ltxcheck.tex
new file mode 100644
index 0000000000..d5426aafa1
--- /dev/null
+++ b/macros/latex-dev/base/ltxcheck.tex
@@ -0,0 +1,975 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%% File `ltxcheck.tex'.
+%% Copyright (C) 1994-1997 LaTeX3 project, David Carlisle
+%%
+% LaTeX Test File.
+% ================
+%
+% Processing this file with a newly installed LaTeX
+% will test various aspects of the installation.
+%
+% To typeset the comments in this file, create a small
+% file ltxcheck.drv that looks like the following (without the %)
+%
+% \documentclass{ltxdoc}
+% \begin{document}
+% \DocInput{ltxcheck.tex}
+% \end{document}
+%
+% and process `latex ltxcheck.drv'.
+%
+\NeedsTeXFormat{LaTeX2e}[1997/06/01]
+% \fi
+%
+% \StopEventually{}
+% \CheckSum{643}
+%
+% \changes{v1.0c}{1994/03/15}
+% {Add \cmd{\NeedsTeXFormat}}
+% \changes{v1.0t}{1996/09/25}
+% {Move ltxcheck to separate file}
+% \changes{v1.0v}{1996/11/20}
+% {lowercase filenames /1044}
+% \changes{v1.1d}{2004/02/11}
+% {Remove pict2e.sty}
+%
+\ProvidesFile{ltxcheck.tex}[2015/03/30 v1.1d LaTeX check file (DPC)]
+%
+% \GetFileInfo{ltxcheck.tex}
+% \title{\textsf{ltxcheck}: The \LaTeX\ test program\thanks
+% {version~\fileversion, dated \filedate}}
+% \author{David Carlisle}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This file, |ltxcheck.tex| should be run after \LaTeX\ has been
+% installed. It Checks some system dependent parts of \LaTeX\ are set up
+% correctly for your system, and checks that the main input files and
+% fonts that \LaTeX\ uses are present and can be found by \LaTeX.
+%
+% \begin{macrocode}
+\makeatletter
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^J%
+LaTeX2e installation check file^^J%
+===============================}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^J%
+ Before running this file through LaTeX2e you should have installed^^J%
+ the Standard LaTeX files in their final `system' directories.^^J%
+ This file should *not* be run in a directory that contains article.cls}
+% \end{macrocode}
+%
+% |\pause| just slows things down so that not too much appears on the
+% screen at once, or scrolls off the top.
+% \begin{macrocode}
+\def\pause{%
+ \typeout{}%
+ \message{** Hit return to continue: }%
+ \read -1 to \xxx
+ \typeout{}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^J%
+ After certain tests, LaTeX will pause so that you can read the^^J%
+ output without it scrolling off the screen.^^J%
+ When you are ready just hit <return> and LaTeX will continue.^^J%
+ When LaTeX pauses, you will see a prompt like the one below.^^J^^J%
+ If a test fails, a message will be displayed followed by^^J%
+ an error message starting `! BAD'.^^J%
+ LaTeX will quit if you try to scroll past some error messages.}
+\pause
+% \end{macrocode}
+%
+% Check that the system has defined |\@currdir| correctly
+% by writing an |.aux| file and then trying to find it again.
+% \begin{macrocode}
+\typeout{^^J%
+ Checking the current directory syntax^^J%
+ =====================================}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newif\iftest\testfalse
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\@currdir\@undefined
+ \typeout{^^J%
+ \noexpand\@currdir is undefined !!^^J%
+ Something is seriously wrong with the LaTeX2e initialisation.^^J%
+ Either you have corrupted files or this is a LaTeX bug.}
+ \errmessage{BAD LaTeX2e system!!}
+ \expandafter\@@end
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifx\@currdir\@empty
+ \typeout{^^J%
+ \noexpand\@currdir is defined to be empty.^^J%
+ This means that LaTeX can not distinguish between a file^^J%
+ aaaaa.tex^^J%
+ that exists in the current directory, and a file aaaaa.tex^^J%
+ in another directory.^^J%
+ It may be that this Operating System has no concept of `directory'^^J%
+ in which case the setting is correct. If however it is possible to^^J%
+ uniquely refer to a file then a suitable definition of
+ \noexpand\@currdir^^J%
+ should be added to texsys.cfg, and the format remade.}
+ \pause
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+ \typeout{^^J%
+\noexpand\@currdir is defined as
+ \expandafter\strip@prefix\meaning\@currdir^^J%
+ (Testing...)}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+\endlinechar=-1
+\count@\time
+\divide\count@ 60
+\count2=-\count@
+\multiply\count2 60
+\advance\count2 \time
+\edef\today{%
+ \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
+ \two@digits{\the\count@}:\two@digits{\the\count2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \immediate\openout15=ltxcheck.aux
+ \immediate\write15{\today^^J}
+ \immediate\closeout15 %
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \openin\@inputcheck\@currdir ltxcheck.aux %
+ \ifeof\@inputcheck
+ \typeout{\@currdir ltxcheck.aux not found}%
+ \else
+ \read\@inputcheck to \reserved@a
+ \ifx\reserved@a\today
+ \typeout{\@currdir ltxcheck.aux found}
+ \testtrue
+ \else
+ \typeout{BAD: old file \reserved@a(should be \today)}%
+ \testfalse
+ \fi
+ \fi
+ \closein\@inputcheck
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \iftest
+ \endgroup
+ \typeout{\noexpand \@currdir OK!}
+ \else
+ \endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \typeout{^^J%
+ The LaTeX2e installation has defined \noexpand\@currdir^^J%
+ to be \expandafter\strip@prefix\meaning\@currdir.^^J%
+ This appears to be incorrect.^^J%
+ You should add a correct definition to texsys.cfg^^J%
+ and rebuild the format.}
+ \errmessage{BAD LaTeX2e system!!}
+ \expandafter\expandafter\expandafter\@@end
+ \fi
+ \pause
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \changes{v1.0k}{1995/09/27}
+% {Check filename parser}
+% Check the filename parser can at least cope with a simple
+% name + extension, |article.cls|.
+% \begin{macrocode}
+\typeout{^^J%
+ Checking the filename parser^^J%
+ ============================}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\filename@parse{article.cls}
+\def\reserved@a{article}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\testtrue
+\ifx\filename@base\reserved@a
+ \ifx\filename@ext\@clsextension
+ \else
+ \testfalse
+ \fi
+\else
+ \testfalse
+\fi
+\iftest
+ \typeout{filename parser OK!}\pause
+\else
+ \typeout{^^J%
+ The LaTeX2e installation has defined \noexpand\filename@parse.^^J%
+ This appears to be incorrect.^^J%
+ You should remove the incorrect definition from texsys.cfg^^J%
+ and rebuild the format.}
+ \errmessage{BAD LaTeX2e system!!}
+ \expandafter\expandafter\expandafter\@@end
+\fi
+%
+% \end{macrocode}
+%
+% Check the input path by looking for |article.cls|. If |article.cls|
+% is in the current directory it would be found anyway, so first check
+% it is not there.
+% \begin{macrocode}
+\typeout{^^J%
+ Checking the input path^^J%
+ =======================^^J}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+\let\input@path\@undefined
+\ifx\@currdir\@empty\else
+ \IfFileExists{\@currdir article.cls}
+ {\typeout{%
+ article.cls appears to be in current directory!^^J^^J%
+ If this is the case, install article.cls into a^^J%
+ `standard input directory'^^J%
+ and copy ltxcheck.tex to another directory before^^J%
+ processing with LaTeX.^^J%
+ ^^J%
+ If article.cls is not in the current directory,^^J%
+ then you need to edit texsys.cfg.^^J%
+ Read the comments in that file. If nothing else works, add:^^J%
+ \string\let\string\@currdir\string\@empty^^J}%
+ \errhelp{Move files, or edit texsys.cfg}
+ \def\ArticleClassFoundInCurrentDirectory{%
+ This file should not be run in a `standard input directory'}
+ \errmessage{BAD: \ArticleClassFoundInCurrentDirectory}}
+ {}
+\fi
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+\IfFileExists{article.cls}
+ {\typeout{input path OK!}}
+ {\typeout{^^J%
+ LaTeX claims that article.cls is not on the system.^^J%
+ Either LaTeX has been incorrectly installed, or the
+ \noexpand\input@path^^J%
+ is incorrect. A correct definition should be added to^^J%
+ texsys.cfg, and the format remade.}
+ \pause
+ \typeout{^^J%
+ Typical definitions of \noexpand\input@path include:^^J^^J%
+ \string\let\string\input@path=\noexpand\@undefined
+ (the default definition)^^J^^J%
+ \string\def\string\input@path{\@percentchar^^J
+ {/usr/lib/tex/inputs/} {/usr/local/lib/tex/inputs/} }^^J^^J%
+ \string\def\string\input@path{\@percentchar^^J
+ {c:/tex/inputs/} {a:/} }^^J^^J%
+ \string\def\string\input@path{\@percentchar^^J
+ {tex_inputs:} {SOMEDISK:[SOMEWHERE.TEX.INPUTS]} }^^J}%
+ \pause
+ \typeout{^^J%
+ Note that \noexpand\input@path should be undefined
+ unless your^^J%
+ TeX installation does not make
+ \noexpand\openin and \noexpand\input^^J%
+ search the same directories.^^J%
+ If \noexpand\input@path is defined, entries should be^^J%
+ in the same syntax as \noexpand\@currdir^^J%
+ ie full directory names that may be concatenated with the^^J%
+ basename (note the final / and ] in the above examples).^^J%
+ Some systems may need more complicated settings.^^J%
+ See texsys.cfg for more examples.^^J%
+ ! BAD \noexpand\input@path!!}
+ \@@end}%
+\pause
+% \end{macrocode}
+%
+% For versions prior to \TeX3 complain to the installer. (Although
+% \LaTeX\ will work with these old \TeX\ versions).
+% For versions between 3 and 3.14 check that \LaTeX\ is using the
+% work-around for the |^^J| in |\message| bug.
+% \begin{macrocode}
+\typeout{^^J%
+ Checking the TeX version^^J%
+ ========================}
+% \end{macrocode}
+%
+% \changes{v0.2j}{1994/02/25}
+% {\cs{noboundary} is \cs{relax} not undef in TeX2 (initialised
+% in 2e format)}
+% \begin{macrocode}
+\dimen@\ifx\@TeXversion\@undefined4\else\@TeXversion\fi\p@%
+\ifx\noboundary\relax
+ \typeout{^^J%
+ This is TeX 2. You will not be able to use all the new features^^J%
+ of LaTeX2e with such an old TeX.^^J%
+ The current version (1995/12/11) is TeX 3.14159.^^J%
+ Consider upgrading your TeX.}
+ \ifdim\dimen@<3\p@\else
+ \errhelp{Check that texsys.cfg has not defined \@TeXversion}
+ \def\OldTeX{%
+ BAD: \noexpand\@TeXversion is incorrect: \meaning\@TeXversion}
+ \errmessage{\OldTeX}
+ \fi
+\else
+% \end{macrocode}
+%
+% \changes{v1.0h}{1994/10/11}
+% {Check for TeX3.141}
+% \begin{macrocode}
+ \ifdim\dimen@>3.14\p@
+ \typeout{This appears to be a recent version of TeX!^^J%
+ If the following `lines' all appear on the same line,^^J%
+ separated by \string^\string^J %
+ then there has been an incorrect installation.}
+ \else
+ \typeout{^^J%
+ This appears to be a TeX between 3.0 and 3.14^^J%
+ but the current version (1995/12/11) is TeX 3.14159^^J%
+ consider upgrading your TeX.^^J%
+ The following `lines' will appear on the same line,^^J%
+ separated by \string^\string^J;^^J%
+ the same problem may affect other messages from LaTeX.}
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\message{line1^^Jline2^^Jline3}
+\pause
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+%
+% To check that the \LaTeX\ fonts have been installed, the well known
+% trick of going into |\batchmode|, and testing for |\nullfont| is used.
+% Not all fonts are tested, just a representative sample.
+% \begin{macrocode}
+\typeout{^^J%
+ Checking fonts^^J%
+ =====================================}
+% \end{macrocode}
+% \changes{v1.0h}{1994/10/11}
+% {Check for fonts}
+% \begin{macrocode}
+\def\checkfont#1{%
+ \batchmode
+ \font\test=#1\relax
+ \errorstopmode
+ \ifx\test\nullfont
+ \typeout{\@spaces! BAD: #1.tfm not found!}
+ \@tempswatrue
+ \else
+ \typeout{\@spaces OK: #1.tfm found}
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^JChecking Standard TeX fonts...}
+\@tempswafalse
+\checkfont{cmr10}
+\checkfont{cmr12}
+\checkfont{cmmi10}
+\if@tempswa
+ \errhelp{Obtain a complete standard TeX font distribution.}
+ \errmessage{BAD: Missing Standard Fonts}
+\else
+% \end{macrocode}
+% \changes{v1.0s}{1996/07/19}
+% {Check for bad cm fonts}
+% \begin{macrocode}
+ \font\testcm=cmr10
+ \testcm
+ \setbox0\hbox{h{}o}
+ \setbox2=\hbox{ho}
+ \ifdim\wd0=\wd2
+ \typeout{^^J%
+OK: correct Computer Modern fonts installed.}%
+ \else
+ \typeout{^^J%
+An unauthorised and incompatible release of the^^J%
+Computer Modern fonts has been installed on your system.^^J%
+The official fonts may be obtained from CTAN archives in:^^J%
+ctan:fonts/cm^^J%
+For further details see Donald Knuth's Home page:^^J%
+http://www-cs-faculty.stanford.edu/\protect~knuth/cm.html}%
+ \errhelp{Re-install Computer Modern fonts, and then rebuild LaTeX}
+ \errmessage{BAD Standard fonts!!}
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \pause
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^JChecking LaTeX Picture Mode fonts...}
+\@tempswafalse
+\checkfont{lcircle10}
+\checkfont{lcirclew10}
+\if@tempswa
+ \@tempswafalse
+ \checkfont{circle10}
+ \checkfont{circlew10}
+ \if@tempswa
+ \typeout{^^J! BAD: You do not have the picture mode fonts:^^J%
+ lcircle10 and lcirclew10}
+ \else
+ \typeout{^^J! BAD:%
+ You have the picture mode fonts with their old names:^^J%
+ circle10 and circlew10 have been renamed to^^J%
+ lcircle10 and lcirclew10}
+ \fi
+ \errhelp{Obtain a complete standard LaTeX font distribution.}
+ \errmessage{BAD: Missing LaTeX Fonts}
+\else
+ \pause
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{^^JChecking Extra LaTeX Computer Modern fonts...}
+\@tempswafalse
+\checkfont{cmmib5}
+\checkfont{cmmib7}
+\checkfont{cmex7}
+\if@tempswa
+\typeout{! BAD:^^J%
+ LaTeX2e uses a few `extra' Computer Modern fonts produced by^^J%
+ The American Mathematical Society.^^J%
+ If you install The AMSFONTS font collection, then these, and other,^^J%
+ fonts will be available to LaTeX.^^J%
+ Although installing AMSFONTS is recommended, LaTeX does not require^^J%
+ The full collection; you may obtain a minimal set of extra LaTeX^^J%
+ fonts from any CTAN archive, in: ctan:macros/latex/fonts/}
+\errhelp{Obtain LaTeX fonts or the AMSFONTS collection.}
+\errmessage{BAD: Missing LaTeX Fonts}
+\else
+ \pause
+\fi
+% \end{macrocode}
+%
+% \changes{v1.0k}{1995/09/27}
+% {Check for dc and tc fonts}
+% \changes{v1.1a}{1997/01/14}
+% {Check for ec fonts}
+% \changes{v1.1c}{1997/06/10}
+% {Modify messages now ec released}
+% \begin{macrocode}
+\typeout{^^JChecking T1 encoded Computer Modern (dc & ec) fonts...}
+% \end{macrocode}
+% \changes{v1.0m}{1995/10/31}
+% {Check the T1 fd files match the dc release.}
+% This command looks for the string |dcr17<| in the font tables for
+% T1/cmr. If it is there, then the T1 fd files match the old dc fonts,
+% for dc release 1.1 or earlier. If not then presumably new fd files
+% are being used.
+% \begin{macrocode}
+\def\dcrseventeen{%
+ \begingroup
+ \escapechar-1
+ \xdef\reserved@a{%
+ \noexpand\in@
+ {\expandafter\string\csname dcr17\endcsname<}%
+ {\expandafter\expandafter\expandafter
+ \string\csname T1/cmr/m/n\endcsname<}}%
+ \endgroup
+ \reserved@a}
+% \end{macrocode}
+% Similarly this command looks for the string |ecrm| in the font tables
+% for T1/cmr. If it is there, then the T1 fd files match the ec fonts,
+% for ec release 1.0 or later.
+% \begin{macrocode}
+\def\ecrm{%
+ \begingroup
+ \escapechar-1
+ \xdef\reserved@a{%
+ \noexpand\in@
+ {\expandafter\string\csname ecrm\endcsname}%
+ {\expandafter\expandafter\expandafter
+ \string\csname T1/cmr/m/n\endcsname}}%
+ \endgroup
+ \reserved@a}
+% \end{macrocode}
+% \changes{v1.0o}{1995/11/14}
+% {dont produce a BAD message if just one set of dc fonts is missing}
+% Remove the ``! BAD'' typeout while checking for dc fonts so
+% as not to worry sites with just the new ones.
+% \begin{macrocode}
+\def\checkfont#1{%
+ \batchmode
+ \font\test=#1\relax
+ \errorstopmode
+ \ifx\test\nullfont
+ \typeout{\@spaces\@spaces #1.tfm not found}
+ \@tempswatrue
+ \else
+ \typeout{\@spaces OK: #1.tfm found}
+ \fi}
+% \end{macrocode}
+%
+
+% \begin{macrocode}
+\@tempswafalse
+\checkfont{ecrm1000}
+\if@tempswa
+% \end{macrocode}
+% No ec fonts. Check the state of the dc fonts.
+%
+% \begin{macrocode}
+\typeout{No EC fonts found, checking DC fonts...}
+\@tempswafalse
+\checkfont{dcr10}
+\if@tempswa
+ \@tempswafalse
+ \checkfont{tcr1000}
+ \if@tempswa
+% \end{macrocode}
+% No dc fonts at all.
+% \begin{macrocode}
+ \typeout{^^J%
+! BAD: No ec fonts found!!^^J%
+LaTeX does not require the use of ec fonts^^J%
+however they are strongly recommended.^^J%
+The ec fonts are available in a more natural range of sizes^^J%
+and allow better hyphenation and kerning than the^^J%
+old fonts such as cmr10.^^J%
+These ec fonts may be obtained from CTAN archives, in:^^J%
+ctan:fonts/ec}
+ \else
+% \end{macrocode}
+% No old dc fonts, but new ones installed.
+% First check whether the latest patch has been applied.
+% \changes{v1.0p}{1995/12/11}
+% {Check for dc fonts 1.2 patch level 1 (Bernd Raichle) /2003}
+% \changes{v1.0q}{1996/06/03}
+% {Check for dc fonts 1.3}
+% \changes{v1.1b}{1997/01/24}
+% {extra closing brace removed from this branch}
+% \begin{macrocode}
+ \font\testdc=dcr1000
+ \testdc
+ \setbox0\hbox{A{}y}
+ \setbox2=\hbox{Ay}
+ \ifdim\wd0>\wd2
+ \typeout{^^J%
+! BAD: dc fonts release 1.3 installed^^J%
+The dc fonts are now replaced by the ec fonts^^J%
+These ec fonts may be obtained from CTAN archives, in:^^J%
+ctan:fonts/ec.}%
+ \else
+ \typeout{^^J%
+! BAD dc fonts 1.2 or older installed.^^J%
+The dc fonts are now replaced by the ec fonts^^J%
+These ec fonts may be obtained from CTAN archives, in:^^J%
+ctan:fonts/ec.}%
+ \fi
+ \dcrseventeen
+ \ifin@
+ \typeout{^^J%
+The fd files for the obsolete release 1.1 of the^^J%
+dc fonts have been loaded into the LaTeX format.^^J%
+However, you appear to have at least release 1.2 of the dc fonts.^^J%
+You should generate suitable fd files by running:^^J%
+latex newdc.ins^^J%
+and then rebuild the format by rerunning:^^J%
+initex latex.ltx}
+ \errmessage{BAD LaTeX2e system!!}
+ \else
+ \typeout{^^J%
+ DC fonts OK!}
+ \fi
+ \fi
+\else
+ \@tempswafalse
+ \checkfont{tcr1000}
+ \if@tempswa
+% \end{macrocode}
+% Old DC fonts, but no new ones.
+% \begin{macrocode}
+ \typeout{^^J%
+Old dc fonts found!!^^J%
+Only the original dc fonts are on your system.^^J%
+Later releases of the dc/ec fonts introduced^^J%
+many improvements and are strongly recommended.^^J%
+They may be obtained from CTAN archives, in:^^J%
+ctan:fonts/ec.}
+ \pause
+ \dcrseventeen
+ \ifin@\else
+ \typeout{^^J%
+The LaTeX2e installation has installed fd files for^^J%
+release 1.2 (or later) of the dc fonts.^^J%
+However, you appear to have only release 1.1 of these fonts.^^J%
+You must now generate the correct fd files by running:^^J%
+latex olddc.ins^^J%
+and then rebuild the format by rerunning:^^J%
+initex latex.ltx}
+ \errmessage{BAD LaTeX2e system!!}
+ \fi
+ \else
+% \end{macrocode}
+% Both old and new DC fonts.
+% \begin{macrocode}
+ \font\testdc=dcr1000
+ \testdc
+ \setbox0\hbox{A{}y}
+ \setbox2=\hbox{Ay}
+ \ifdim\wd0>\wd2
+ \typeout{^^J%
+! BAD: dc fonts release 1.3 installed^^J%
+The dc fonts are now replaced by the ec fonts^^J%
+These ec fonts may be obtained from CTAN archives, in:^^J%
+ctan:fonts/ec.}%
+ \else
+ \typeout{^^J%
+! BAD dc fonts 1.2 or older installed.^^J%
+The dc fonts are now replaced by the ec fonts^^J%
+These ec fonts may be obtained from CTAN archives, in:^^J%
+ctan:fonts/ec.}%
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \dcrseventeen
+ \ifin@
+ \typeout{^^J%
+The fd files for the obsolete release 1.1 of the^^J%
+dc fonts have been loaded into the LaTeX format.^^J%
+However, you appear to have at least release 1.2 of the dcfonts.^^J%
+You should use generate suitable fd files by running:^^J%
+latex newdc.ins^^J%
+and then rebuild the format by running:^^J%
+initex latex.ltx^^J%
+Otherwise LaTeX will always use the older fonts.}
+ \errmessage{BAD LaTeX2e system!!}
+ \else
+ \ecrm
+ \ifin@
+ \typeout{^^J%
+The fd files for the new EC fonts have been loaded into^^J%
+the LaTeX format.^^J%
+However, these fonts are not found by LaTeX.^^J%
+You should either install the ec fonts, or generate suitable^^J%
+fd files for the dc fonts by running: \space latex newdc.ins^^J%
+and then rebuild the format by running: \space initex latex.ltx}
+ \errmessage{BAD LaTeX2e system!!}
+ \else
+ \typeout{^^J%
+DC fonts OK!^^J%
+(Both old and new dc font releases are installed.)^^J%
+Note that the dc fonts are expected to be replaced by ec^^J%
+in January 1997.}
+ \fi
+ \fi
+ \fi
+\fi
+% \end{macrocode}
+% Else EC fonts are found, so check whether LaTeX is going to use them.
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ecrm
+ \ifin@
+ \typeout{EC fonts OK!}
+ \else
+ \typeout{%
+EC fonts installed but LaTeX is still using dc fonts.^^J%
+You may want to run ec.ins and remake the LaTeX format}
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+\pause
+% \end{macrocode}
+%
+%
+%
+% The following files will be unpacked by running iniTeX on
+% |unpack.ins|.
+%
+% \begin{macrocode}
+\typeout{^^JChecking LaTeX input files...^^J}
+% \end{macrocode}
+%
+% If the specified file is not there, add it to the list.
+% \begin{macrocode}
+\def\checkfile#1{%
+ \IfFileExists{#1}{}{\edef\missingfile{\missingfile#1, }}}
+% \end{macrocode}
+%
+% Report any missing files in the last batch tested.
+% \begin{macrocode}
+\def\filereport#1#2{%
+\ifx\missingfile\@empty
+ \typeout{^^J%
+OK: The #1 files such as #2^^J%
+are accessible to LaTeX.}
+\pause
+\expandafter\@gobbletwo
+\else
+ \typeout{^^J%
+! BAD: The #1 files:^^J%
+\missingfile^^J%
+are not accessible to LaTeX.}
+\errhelp{Check the installation!}
+\let\missingfile\@empty
+\fi
+\errmessage{Missing LaTeX files}}
+% \end{macrocode}
+%
+% Kernel files:
+% \begin{macrocode}
+\let\missingfile\@empty
+% \end{macrocode}
+%
+% \begin{macrocode}
+\checkfile{hyphen.ltx}
+\checkfile{fontmath.ltx}
+\checkfile{fonttext.ltx}
+\checkfile{preload.ltx}
+\checkfile{texsys.cfg}
+\checkfile{latex.ltx}
+% \end{macrocode}
+%
+% Don't use |\filereport| here as the message is rather different
+% as the |.ltx| files don't really need to be available to \LaTeX\
+% once the format is made.
+% \begin{macrocode}
+\ifx\missingfile\@empty
+ \typeout{^^J%
+OK: The files such as latex.ltx that are used to make^^J%
+the format are accessible to LaTeX.}
+\else
+ \typeout{^^J%
+The files:^^J%
+\missingfile^^J%
+that are used to make the format are not accessible to LaTeX.^^J%
+This is OK, but you will need those files if you need to remake the^^J%
+the format later.}
+\fi
+\pause
+\let\missingfile\@empty
+% \end{macrocode}
+%
+% Class files and class options:
+% \begin{macrocode}}
+\checkfile{article.cls}
+\checkfile{report.cls}
+\checkfile{book.cls}
+\checkfile{letter.cls}
+\checkfile{ltxdoc.cls}
+\checkfile{proc.cls}
+\checkfile{slides.cls}
+\checkfile{bk10.clo}
+\checkfile{bk11.clo}
+\checkfile{bk12.clo}
+\checkfile{size10.clo}
+\checkfile{size11.clo}
+\checkfile{size12.clo}
+\checkfile{fleqn.clo}
+\checkfile{leqno.clo}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\filereport{main class}{article.cls}
+% \end{macrocode}
+%
+% Package files:
+% \begin{macrocode}
+\checkfile{alltt.sty}
+\checkfile{doc.sty}
+\checkfile{exscale.sty}
+\checkfile{flafter.sty}
+\checkfile{fontenc.sty}
+\checkfile{graphpap.sty}
+\checkfile{ifthen.sty}
+\checkfile{inputenc.sty}
+\checkfile{latexsym.sty}
+\checkfile{makeidx.sty}
+\checkfile{newlfont.sty}
+\checkfile{oldlfont.sty}
+\checkfile{shortvrb.sty}
+\checkfile{showidx.sty}
+\checkfile{slides.sty}
+\checkfile{syntonly.sty}
+\checkfile{tracefnt.sty}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\filereport{main package}{ifthen.sty}
+% \end{macrocode}
+%
+% Font definition (.fd) files:
+% \begin{macrocode}}
+\checkfile{omlcmm.fd}
+\checkfile{omlcmr.fd}
+\checkfile{omllcmm.fd}
+\checkfile{omscmr.fd}
+\checkfile{omscmsy.fd}
+\checkfile{omslcmsy.fd}
+\checkfile{omxcmex.fd}
+\checkfile{omxlcmex.fd}
+\checkfile{ot1cmdh.fd}
+\checkfile{ot1cmfib.fd}
+\checkfile{ot1cmfr.fd}
+\checkfile{ot1cmr.fd}
+\checkfile{ot1cmss.fd}
+\checkfile{ot1cmtt.fd}
+\checkfile{ot1cmvtt.fd}
+\checkfile{ot1lcmss.fd}
+\checkfile{ot1lcmtt.fd}
+\checkfile{t1cmdh.fd}
+\checkfile{t1cmfib.fd}
+\checkfile{t1cmfr.fd}
+\checkfile{t1cmr.fd}
+\checkfile{t1cmss.fd}
+\checkfile{t1cmtt.fd}
+\checkfile{t1cmvtt.fd}
+\checkfile{ts1cmr.fd}
+\checkfile{ts1cmss.fd}
+\checkfile{ts1cmtt.fd}
+\checkfile{ts1cmvtt.fd}
+\checkfile{ucmr.fd}
+\checkfile{ucmss.fd}
+\checkfile{ucmtt.fd}
+\checkfile{ullasy.fd}
+\checkfile{ulasy.fd}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\filereport{font definition}{t1cmr.fd}
+% \end{macrocode}
+%
+% Font encoding files:
+% \begin{macrocode}
+\checkfile{t1enc.def}
+\checkfile{ot1enc.def}
+\checkfile{omsenc.def}
+\checkfile{omlenc.def}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\filereport{font encoding}{t1enc.def}
+% \end{macrocode}
+%
+% Input encoding files:
+% \begin{macrocode}
+\checkfile{ascii.def}
+\checkfile{latin1.def}
+\checkfile{latin2.def}
+\checkfile{latin3.def}
+\checkfile{latin5.def}
+\checkfile{cp850.def}
+\checkfile{cp852.def}
+\checkfile{cp865.def}
+\checkfile{cp437.def}
+\checkfile{cp437de.def}
+\checkfile{applemac.def}
+\checkfile{next.def}
+\checkfile{ansinew.def}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\filereport{input encoding}{latin1.def}
+% \end{macrocode}
+%
+% Compatibility files:
+% \begin{macrocode}
+\checkfile{article.sty}
+\checkfile{book.sty}
+\checkfile{letter.sty}
+\checkfile{proc.sty}
+\checkfile{report.sty}
+\checkfile{fleqn.sty}
+\checkfile{leqno.sty}
+\checkfile{openbib.sty}
+\checkfile{latex209.def}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\filereport{compatibility mode}{article.sty}
+% \end{macrocode}
+%
+% Other files:
+% \begin{macrocode}
+\checkfile{bezier.sty}
+\checkfile{docstrip.tex}
+\checkfile{slides.def}
+\checkfile{sfonts.def}
+\checkfile{t1enc.sty}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\filereport{remaining}{sfonts.def}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@end
+% \end{macrocode}
+%
+% \Finale
+%
+
diff --git a/macros/latex-dev/base/ltxdoc.dtx b/macros/latex-dev/base/ltxdoc.dtx
new file mode 100644
index 0000000000..329353d123
--- /dev/null
+++ b/macros/latex-dev/base/ltxdoc.dtx
@@ -0,0 +1,588 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% \iffalse
+%
+%<class>\NeedsTeXFormat{LaTeX2e}
+%<class>\ProvidesClass{ltxdoc}
+%<class> [2018/03/15 v2.0x Standard LaTeX documentation class]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{ltxdoc.cls}
+\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+\title{The file \texttt{ltxdoc.dtx} for use with
+ \LaTeXe.\thanks{This file has version
+ number \fileversion, dated \filedate.}\\[2pt]
+ It contains the code for \texttt{ltxdoc.cls}}
+\date{\filedate}
+\author{David Carlisle}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{ltxdoc.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \changes{v2.0i}{1994/04/29}{Update the documentation.}
+% \changes{v2.0s}{1998/08/17}{(RmS) Documentation fixes.}
+%
+% \section{Documentation of the \LaTeX\ sources}
+%
+% This class file is designed for documenting the \LaTeX\ source files.
+% You may however find it generally useful as a class for typesetting
+% the documentation of files produced in `doc' format.
+%
+% Each documented file in the standard distribution comes with extension
+% |dtx|. The appropriate class package or initex file will be extracted
+% from the source by the docstrip system. Each |dtx| file may be
+% directly processed with \LaTeXe, for example
+%\begin{verbatim}
+% latex2e docclass.dtx
+%\end{verbatim}
+% would produce the documentation of the Class and package interface.
+%
+% Each file that is used in producing the \LaTeXe\ format (ie not
+% including the standard class and packages) will be printed together in
+% one document if you \LaTeX\ the file |sources2e.tex|. This has the
+% advantage that one can produce a full index of macro usage across all
+% the source files.
+%
+% If you need to customise the typesetting of any of these files, there
+% are two options:
+% \begin{itemize}
+% \item You can use \dst\ with the module `driver' to extract a small
+% \LaTeX\ file that you may edit to use whatever class or package
+% options you require, before inputting the source file.
+% \item You can create a file |ltxdoc.cfg|. This configuration file will
+% be read whenever the |ltxdoc| class is used, and so can be used to
+% customise the typesetting of all the source files, without having to
+% edit lots of small driver files.
+%\end{itemize}
+%
+% The second option is usually more convenient. Various possibilities
+% are discussed in the next section.
+%
+% \section{Customisation}
+%
+% The simplest form of customisation is to pass more options to the
+% |article| class which is loaded by |ltxdoc|. For instance if you wish
+% all the documentation to be formatted for A4 paper, add the following
+% line to |ltxdoc.cfg|:
+%\begin{verbatim}
+% \PassOptionsToClass{a4paper}{article}
+%\end{verbatim}
+%
+% All the source files are in two parts, separated by |\StopEventually|.
+% The first part (should) contain `user' documentation. The second part
+% is a full documented listing of the source code. The |doc| package
+% provides the command |\OnlyDescription| which suppresses the code
+% listings. This may also be used in the configuration file, but as the
+% |doc| package is read later, you must delay the execution of
+% |\OnlyDescription| until after the |doc| package has been read. The
+% simplest way is to use |\AtBeginDocument|. Thus you could put the
+% following in your |ltxdoc.cfg|.
+%\begin{verbatim}
+% \AtBeginDocument{\OnlyDescription}
+%\end{verbatim}
+%
+%
+% If the full source listing |sources2e.tex| is processed, then an index
+% and change history are produced by default, however indices are not
+% normally produced for individual files.
+%
+% As an example, consider |ltclass.dtx|, which contains the sources for
+% the new class and package interface commands. With no |cfg|
+% file, a 19~page document is produced. With the above configuration
+% a slightly more readable document (4~pages) is produced.
+%
+% Conversely, if you really want to read the source listings in detail,
+% you will want to have an index. Again the index commands provided by
+% the doc package may be used, but their execution must be delayed.
+%\begin{verbatim}
+% \AtBeginDocument{\CodelineIndex\EnableCrossrefs}
+% \AtEndDocument{\PrintIndex}
+%\end{verbatim}
+%
+% The |doc| package writes index files to be sorted using MakeIndex with
+% the |gind| style, so one would then use a command such as
+%\begin{verbatim}
+% makeindex -s gind.ist ltclass.idx
+%\end{verbatim}
+% and re-run \LaTeX.
+%
+% Similarly to print a Change history, you would add
+%\begin{verbatim}
+% \AtBeginDocument{\RecordChanges}
+% \AtEndDocument{\PrintChanges}
+%\end{verbatim}
+% to |ltxdoc.cfg|, and use MakeIndex with a command such as
+%\begin{verbatim}
+% makeindex -s gglo.ist -o ltclass.gls ltclass.glo
+%\end{verbatim}
+%
+% Finally if you do not want to list all the sections of |source2e.tex|,
+% you can use |\includeonly| in the |cfg| file:
+%\begin{verbatim}
+% \includeonly{ltvers,ltboxes}
+%\end{verbatim}
+%
+% \StopEventually{}
+%
+%
+% \section{Options}
+%
+% \begin{macrocode}
+%<*class>
+\DeclareOption{a5paper}{\@latexerr{Option not supported}%
+ {}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption*{%
+ \PassOptionsToClass {\CurrentOption}{article}}
+% \end{macrocode}
+%
+% \section{Configuration}
+% Input a local configuration file, if it exists.
+% \begin{macrocode}
+\InputIfFileExists{ltxdoc.cfg}
+ {\typeout{*************************************^^J%
+ * Local config file ltxdoc.cfg used^^J%
+ *************************************}}
+ {}
+% \end{macrocode}
+%
+%
+% \section{Option Processing}
+%
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% \section{Loading article and doc}
+%
+% \begin{macrocode}
+\LoadClass{article}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{doc}
+% \end{macrocode}
+%
+% Make \verb+|+ be a `short verb' character, but not in the document
+% preamble, where an active character may interfere with packages that
+% are loaded.
+% \begin{macrocode}
+\AtBeginDocument{\MakeShortVerb{\|}}
+% \end{macrocode}
+%
+% As `doc' documents tend to have a lot of monospaced material,
+% Set up some |tt| substitutions to occur silently.
+% \changes{v2.0p}{1995/11/02}{Add font substitutions}
+% \changes{v2.0t}{1999/04/17}{Replaced octal number, CAR}
+% \begin{macrocode}
+\DeclareFontShape{OT1}{cmtt}{bx}{n}{<-> ssub * cmtt/m/n}{}
+\DeclareFontFamily{OMS}{cmtt}{\skewchar\font 48} % '60
+\DeclareFontShape{OMS}{cmtt}{m}{n}{<-> ssub * cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmtt}{bx}{n}{<-> ssub * cmsy/b/n}{}
+% \end{macrocode}
+% This substitution is in the standard fd file, but not silent.
+% \begin{macrocode}
+\DeclareFontShape{OT1}{cmss}{m}{it}{<->ssub*cmss/m/sl}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\CodelineNumbered
+\DisableCrossrefs
+% \end{macrocode}
+%
+% Increase the text width slightly so that with the standard fonts
+% 72 columns of code may appear in a |macrocode| environment.
+% \changes{v2.0c}{1994/03/15}{Set \cs{textwidth}.}
+% \begin{macrocode}
+\setlength{\textwidth}{355pt}
+% \end{macrocode}
+%
+% Increase the marginpar width slightly, for long command names.
+% And increase the left margin by a similar amount
+% \changes{v2.0l}
+% {1994/05/25}{Increase \cs{marginparwidth}}
+% \changes{v2.0q}{1995/11/28}
+% {Increase \cs{marginparwidth} and page margin.}
+% \begin{macrocode}
+\addtolength\marginparwidth{30pt}
+\addtolength\oddsidemargin{20pt}
+\addtolength\evensidemargin{20pt}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\setcounter{StandardModuleDepth}{1}
+% \end{macrocode}
+%
+% \section{Useful abbreviations}
+%
+% |\cmd{\foo}| Prints |\foo| verbatim. It may be used inside moving
+% arguments. It can \emph{not} be use to record commands that are defined as
+% ``|\outer|'' nor is it possible to use it on conditionals such as
+% |\iftrue| or defined by |\newif|.
+% |\cs{foo}| also prints |\foo|, for those who prefer that
+% syntax. (This second form can be used to record all types of command so the
+% above restrictions do not apply.
+% \begin{macro}{\cmd}
+% \changes{v2.0k}{1994/05/21}{New definition, so \cmd\{ works.}
+% \begin{macro}{\cs}
+% \changes{v2.0d}{1994/03/17}{Add \cs{cs}}
+% \begin{macrocode}
+\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v2.0r}{1996/01/11}{Removed \cs{star} since useless pr/2039}
+%
+% \begin{macro}{\marg}
+% \changes{v2.0d}{1994/03/17}{Add \cs{marg}}
+% |\marg{text}| prints \marg{text}, `mandatory argument'.
+% \begin{macrocode}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\oarg}
+% |\oarg{text}| prints \oarg{text}, `optional argument'.
+% \begin{macrocode}
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parg}
+% |\parg{te,xt}| prints \parg{te,xt}, `picture mode argument'.
+% \changes{v2.0h}{1994/04/28}{Add \cs{parg}}
+% \changes{v2.0o}{1995/08/09}{Use \cs{meta} when showing arguments}
+% \begin{macrocode}
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section{Old Comments}
+%
+% The \LaTeXe\ sources contain a lot of code inherited from
+% \LaTeX2.09. The comments in this code were not designed to be
+% typeset, and do not contain the necessary \LaTeX\ markup. The
+% \texttt{oldcomments} environment typesets these comments,
+% automatically sensing when any control sequence appears, and
+% implicitly adding the |\verb|. This procedure does not produce
+% particularly beautiful pages, but it allows us to fully document new
+% sections, and have some form of typeset comments on all the old
+% code.
+% \changes{v2.0e}{1994/03/18}{Use a fixed font.}
+%
+% Scan control names and put them in tt.
+% Will actually (incorrectly) scan past |\\| but this does not matter as
+% this is almost never followed by a letter in practice.
+% (ie |\\foo|) would put |foo| in |\ttfamily|.
+% \begin{macrocode}
+\def\oc@scan#1{%
+ \ifx\oc@bslash#1%
+ \egroup\let\next\oc@bslash\else
+ \ifcat a\noexpand#1%
+ #1\let\next\oc@scan\else
+ \ifx\oc@percent#1%
+ \def\next{\char`\%\egroup}%
+ \else
+ #1\let\next\egroup
+ \fi\fi\fi\next}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\oc@bslash{\bgroup\oc@ttf\char`\\\oc@scan}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\oc@verb#1{%
+ \catcode`#1\active
+ \uccode`\~`#1%
+ \uppercase{\def~{{\oc@ttf\char`#1}}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \obeyspaces%
+ \catcode`\/=\catcode`\\
+ /catcode`/\/active
+ /catcode`<=/catcode`{%
+ /catcode`>=/catcode`}%
+ /catcode`/{/active%
+ /catcode`/}/active%
+ /gdef/oldc< \end{oldcomments}>%
+ /gdef/begmac< \begin{macrocode}>%
+ /gdef/obs</def <</oc@ttf/ >>>%
+/endgroup%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode`\/=\catcode`\\
+ \catcode`\\=13
+ /catcode`/|=/catcode`/%
+ /catcode`/%=13
+ /gdef/oldcomments{|
+ /makeatletter
+ /let/do/oc@verb/dospecials
+ /frenchspacing/@vobeyspaces/obs
+ /raggedright
+ /oc@verb/>|
+ /oc@verb/<|
+ /let\/oc@bslash
+ /let%/oc@percent
+ /obeylines
+ /parindent/z@
+ /ttfamily/expandafter/let/expandafter/oc@ttf/the/font
+ /rmfamily
+ /hfuzz/maxdimen
+ }
+/endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \sloppy%
+ \obeylines%
+ \gdef\oc@percent#1^^M{%
+ \ifvmode%
+ \def\commentline{#1}%
+ \ifx\commentline\oldc%
+ \end{oldcomments}%
+ \else%
+ \ifx\commentline\begmac%
+ \begin{macrocode}%
+ \else%
+ \leavevmode%
+ #1^^M%
+ \fi\fi%
+ \else%
+ {\oc@ttf\char`\%}#1^^M%
+ \fi}%
+\endgroup%
+% \end{macrocode}
+%
+%
+% \section{DocInclude}
+%
+% \begin{macrocode}
+\@addtoreset{CodelineNo}{part}
+% \end{macrocode}
+%
+% \begin{macro}{\DocInclude}
+% More or less exactly the same as |\include|, but uses |\DocInput|
+% on a |dtx| file, not |\input| on a |tex| file.
+% \changes{v2.0b}{1994/03/14}{Rename from \cs{docinclude}}
+% \changes{v2.0f}{1994/03/25}{Use \cs{part}}
+% \changes{v2.0u}{1999/08/08}{Also works for .fdd (M. Schroeder)}
+% \begin{macrocode}
+\def\partname{File}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\DocInclude}[1]{%
+ \relax
+ \clearpage
+ \docincludeaux
+ \IfFileExists{#1.fdd}%
+ {\def\currentfile{#1.fdd}}%
+ {\def\currentfile{#1.dtx}}%
+ \ifnum\@auxout=\@partaux
+ \@latexerr{\string\include\space cannot be nested}\@eha
+ \else \@docinclude#1 \fi}
+\def\@docinclude#1 {\clearpage
+\if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi
+\@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for
+\@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi
+\if@tempswa \let\@auxout\@partaux \if@filesw
+\immediate\openout\@partaux #1.aux
+\immediate\write\@partaux{\relax}\fi
+% \end{macrocode}
+% We need to save (and later restore) various index-related
+% commands which might be changed by the included file.
+% \begin{macrocode}
+\let\@ltxdoc@PrintIndex\PrintIndex
+\let\PrintIndex\relax
+\let\@ltxdoc@PrintChanges\PrintChanges
+\let\PrintChanges\relax
+\let\@ltxdoc@theglossary\theglossary
+\let\@ltxdoc@endtheglossary\endtheglossary
+\part{\currentfile}%
+ {\let\ttfamily\relax
+ \xdef\filekey{\filekey, \thepart={\ttfamily\currentfile}}}%
+\DocInput{\currentfile}%
+\let\PrintIndex\@ltxdoc@PrintIndex
+\let\PrintChanges\@ltxdoc@PrintChanges
+\let\theglossary\@ltxdoc@theglossary
+\let\endtheglossary\@ltxdoc@endtheglossary
+\clearpage
+\@writeckpt{#1}\if@filesw \immediate\closeout\@partaux \fi
+\else\@nameuse{cp@#1}\fi\let\@auxout\@mainaux}
+% \end{macrocode}
+%
+% \changes{v2.0x}{2018/03/15}{Set up \cs{protect} in index entries}
+% \begin{macrocode}
+\gdef\codeline@wrindex#1{\if@filesw
+% \end{macrocode}
+% Set \cs{protect} to a suitable value in the index entries (we
+% can't use |\set@display@protect| as that would result in different
+% numer of spaces after a command depending on the number of
+% expansion happening prior to writing the index).
+% \begin{macrocode}
+ \begingroup
+ \let\protect\noexpand
+ \immediate\write\@indexfile
+ {\string\indexentry{#1}%
+ {\filesep\number\c@CodelineNo}}%
+ \endgroup\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\let\filesep\@empty
+% \end{macrocode}
+%
+%
+% \begin{macro}{\aalph}
+% Special form of |\alph| as currently |source2e.tex|
+% includes more than 26 files
+% \changes{v2.0n}{1994/05/27}{Use uppercase letters, for makeindex}.
+% \begin{macrocode}
+\def\aalph#1{\@aalph{\csname c@#1\endcsname}}
+\def\@aalph#1{%
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or
+ t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or
+ D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or
+ N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or
+ X\or Y\or Z\else\@ctrerr\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\docincludeaux}
+% \changes{v2.06}{1994/03/31}{Use \cs{footnotesize} in file key.}
+% \changes{v2.0k}{1994/05/21}{Use \cs{aalph}}
+% \changes{v2.0v}{2017/03/13}{Use \cs{parbox}[t] in file
+% key to maintain space between the text block and the page foot.}
+% \begin{macrocode}
+\def\docincludeaux{%
+ \def\thepart{\aalph{part}}\def\filesep{\thepart-}%
+ \let\filekey\@gobble
+ \g@addto@macro\index@prologue{%
+ \gdef\@oddfoot{\parbox[t]{\textwidth}{\strut\footnotesize
+ \raggedright{\bfseries File Key:} \filekey}}%
+ \let\@evenfoot\@oddfoot}%
+ \global\let\docincludeaux\relax
+ \gdef\@oddfoot{%
+ \expandafter\ifx\csname ver@\currentfile\endcsname\relax
+ File \thepart: {\ttfamily\currentfile} %
+ \else
+ \GetFileInfo{\currentfile}%
+ File \thepart: {\ttfamily\filename} %
+ Date: \filedate\ %
+ Version \fileversion
+ \fi
+ \hfill\thepage}%
+ \let\@evenfoot\@oddfoot}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MaintainedByLaTeXTeam}
+% \changes{v2.0v}{2015/03/25}{macro added}
+% \changes{v2.0w}{2015/03/25}{use display block not footnote text}
+% Generate boilerplate reference to bug database.
+% \begin{macrocode}
+\def\MaintainedBy#1{\gdef\@maintainedby{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\@maintainedby\@empty
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\MaintainedByLaTeXTeam#1{%
+{\gdef\@maintainedby{%
+This file is maintained by the \LaTeX{} Project team.\\%
+Bug reports can be opened (category \texttt{#1}) at\\%
+\url{https://latex-project.org/bugs.html}.}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \ifx\@maintainedby\@empty
+ \else
+ \vskip 1em%
+ \fbox{\fbox{\begin{tabular}{@{}l@{}}\@maintainedby\end{tabular}}}%
+ \fi
+ \end{center}%
+ \par
+ \vskip 1.5em}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\url}
+% \begin{macrocode}
+\providecommand\url{\texttt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\def\task#1#2{}
+%</class>
+% \end{macrocode}
+% \Finale
+%
diff --git a/macros/latex-dev/base/ltxdoc.pdf b/macros/latex-dev/base/ltxdoc.pdf
new file mode 100644
index 0000000000..caff39f754
--- /dev/null
+++ b/macros/latex-dev/base/ltxdoc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltxguide.cls b/macros/latex-dev/base/ltxguide.cls
new file mode 100644
index 0000000000..7b1d05ec20
--- /dev/null
+++ b/macros/latex-dev/base/ltxguide.cls
@@ -0,0 +1,252 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltxguide.cls
+% Author: Alan Jeffrey
+% Version: 0.14 1999/03/06
+
+% This is the document class for the LaTeX guides `LaTeX2e for authors'
+% and `LaTeX2e for class and package writers'. The changes log is at
+% the end of the file.
+
+% Copyright 1994 1999 Alan Jeffrey and the LaTeX3 project.
+
+% This is a LaTeX2e document class.
+
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesClass{ltxguide}[2001/05/28 Standard LaTeX class]
+
+% Input any local configuration file.
+
+\InputIfFileExists{ltxguide.cfg}
+ {\typeout {**********************************************^^J%
+ * Local configuration file ltxguide.cfg used *^^J%
+ **********************************************}}
+ {\ClassInfo{ltxguide}{Local configuration file not found}}
+
+% All options are passed to the article class.
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ProcessOptions
+\LoadClass{article}
+
+% No paragraph indentation, space between paragraphs.
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{\medskipamount}
+
+% The names of some documents:
+
+\newcommand{\clsguide}{\LaTeXe{} for Class and Package Writers}
+\newcommand{\usrguide}{\LaTeXe{} for Authors}
+\newcommand{\fntguide}{\LaTeXe{} Font Selection}
+\newcommand{\cfgguide}{Configuration options for \LaTeXe}
+\newcommand{\cyrguide}{Cyrillic languages support in \LaTeX}
+\newcommand{\modguide}{Modifying \LaTeX}
+\newcommand{\sourcecode}{\LaTeX: the program}
+\newcommand{\LaTeXbook}{\LaTeX: A Document Preparation System}
+\newcommand{\LaTeXcomp}{The \LaTeX{} Companion}
+\newcommand\LaTeXGcomp{The \LaTeX{} Graphics Companion}
+\newcommand\LaTeXWcomp{The \LaTeX{} Web Companion}
+
+\newcommand{\babel}{\textsf{babel}}
+\newcommand{\ctan}{\textsc{ctan}}
+
+\newcommand{\eg}{e.g.,~}
+\newcommand{\ie}{i.e.,~}
+
+% The SliTeX logo:
+
+\newcommand{\SLiTeX}{\textsc{Sli}\TeX}
+
+% A declaration of a command, in a box, set out into the margin.
+%
+% Unfortunately, there is a bug with this command, which allows page
+% breaks to happen after a \begin{decl}[DATE]: it is a bug with TeX that
+% makes it very difficult to get page-breaks correct near marginals,
+% especially at the end of a paragraph.
+
+\newenvironment{decl}[1][]%
+ {\par\small\addvspace{4.5ex plus 1ex}%
+ \vskip -\parskip
+ \ifx\relax#1\relax
+ \def\@decl@date{}%
+ \else
+ \def\@decl@date{\NEWfeature{#1}}%
+ \fi
+ \noindent\hspace{-\leftmargini}%
+ \begin{tabular}{|l|}\hline\ignorespaces}%
+ {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak
+ \vspace{2.3ex}\vskip -\parskip}
+
+% Run the toc tighter:
+
+\def\@starttoc#1{\begingroup
+ \makeatletter
+ \parskip\z@\@plus\p@\relax % <----
+ \@input{\jobname.#1}\if@filesw
+ \expandafter\newwrite\csname tf@#1\endcsname
+ \immediate\openout
+ \csname tf@#1\endcsname \jobname.#1\relax
+ \fi \global\@nobreakfalse \endgroup}
+
+% Some hacks with verbatim... NB: this would be better done with the
+% verbatim package, but this document has to run on any LaTeX
+% installation.
+
+\let\o@verbatim\verbatim
+\def\verbatim{%
+ \ifhmode\unskip\par\fi
+% \nopagebreak % Overridden by list penalty
+ \ifx\@currsize\normalsize
+ \small
+ \fi
+ \o@verbatim
+}
+
+% Here we extend the font-setting command to include making <> active
+% (ie adjusting the input encoding).
+\renewcommand \verbatim@font {%
+ \normalfont \ttfamily
+ \catcode`\<=\active
+ \catcode`\>=\active
+}
+
+% Make |...| a synonym for \verb|...|.
+\RequirePackage{shortvrb}
+\MakeShortVerb{\|}
+
+
+% Make active <...> produce italics surrounded by angle brackets
+% (used in verbatim and \verb).
+% << produces a less-than, and >> produces a greater-than.
+
+\begingroup
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \gdef<{\@ifnextchar<\@lt\@meta}
+ \gdef>{\@ifnextchar>\@gt\@gtr@err}
+ \gdef\@meta#1>{\m{#1}}
+ \gdef\@lt<{\char`\<}
+ \gdef\@gt>{\char`\>}
+\endgroup
+\def\@gtr@err{%
+ \ClassError{ltxguide}{%
+ Isolated \protect>%
+ }{%
+ In this document class, \protect<...\protect>
+ is used to indicate a parameter.\MessageBreak
+ I've just found a \protect> on its own.
+ Perhaps you meant to type \protect>\protect>?
+ }%
+}
+\def\verbatim@nolig@list{\do\`\do\,\do\'\do\-}
+
+% Various forms of argument:
+
+\newcommand{\m}[1]{\mbox{$\langle$\it #1\/$\rangle$}}
+\renewcommand{\arg}[1]{{\tt\string{}\m{#1}{\tt\string}}}
+\newcommand{\oarg}[1]{{\tt[}\m{#1}{\tt]}}
+
+% Logos.
+
+\newcommand{\NFSS}{\textsf{NFSS}}
+
+\newcommand{\AmS}{$${\protect\the\textfont2 A}\kern-.1667em\lower
+ .5ex\hbox{\protect\the\textfont2 M}\kern
+ -.125em{\protect\the\textfont2 S}}
+
+\newcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}
+
+% Table of contents is two deep.
+
+\setcounter{tocdepth}{2}
+
+% Allow more flexibility about bad paragraphs.
+
+\tolerance500
+
+% Marginal notes for new features and description:
+% Changed to command and hacked by Chris to get better positioning and
+% a better chance of printing:
+\newcommand{\NEWfeature}[1]{%
+ \hskip 1sp \marginpar{\small\sffamily\raggedright
+ New feature\\#1}}
+\newcommand{\NEWdescription}[1]{%
+ \hskip 1sp \marginpar{\small\sffamily\raggedright
+ New description\\#1}}
+
+\newcommand{\URL}[1]{\texttt{#1}}
+
+% That's it!
+
+\endinput
+
+% CHANGELOG
+%
+% 24 May 1994, ASAJ: Turned the collection of macros used by
+% usrguide and clsguide into a class.
+%
+% 27 May 1994, ASAJ: Added the SliTeX logo.
+%
+% 28 May 1994, ASAJ: Made << and >> produce < and > inside verbatim.
+% Added ltxguide.cfg.
+%
+% 29 May 1994, ASAJ: Added italic correction to <...>.
+% Added \sourcecode.
+%
+% 1 Jun 1994, ASAJ: Made toc run tighter, corrected bug with verbatim.
+%
+% 28 Jun 1994, CAR: Restricted active <> to verb(atim).
+% Removed ineffective \nopagebreak
+%
+% 23 Sep 1994, ASAJ: Replaced \PassOptionsToPackage{article} with
+% \PassOptionsToClass{article}.
+%
+% 30 Oct 1994, ASAJ: Added environments NEWfeature and NEWdescription.
+%
+% 20 Nov 1994, CAR: Changed NEWfeature and NEWdescription to improve
+% alignment: pagebreaking still not working.
+%
+% 14 Dec 1994, DPC: Add \par to verbatim redefinition.
+% Reported by Ulrik Vieth.
+% 24 July 1995, CAR: Changed cfg messages.
+%
+% 21 Sept 1995, \RequirePackage{shortvrb} for latex/1875
+%
+% 22 Nov 1995, CAR: Corrected cfg loading.
+%
+% 28 Nov 1995, CAR: Added \cfgguide and \modguide.
+%
+% 29 Nov 1995, DPC: Make \small in verbatim conditional on \normalsize.
+%
+% 28 Feb 1999, CAR: Added some shorthand commands.
+%
+% 06 Mar 1999, RmS: Added \URL.
+%
+% 28 May 2001, CAR: Added some more shorthand commands (for books).
diff --git a/macros/latex-dev/base/ltxref.dtx b/macros/latex-dev/base/ltxref.dtx
new file mode 100644
index 0000000000..a5c11bf21b
--- /dev/null
+++ b/macros/latex-dev/base/ltxref.dtx
@@ -0,0 +1,341 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: ltxref.dtx
+%
+%<*driver>
+% \fi
+\ProvidesFile{ltxref.dtx}
+ [2014/09/29 v1.1k LaTeX Kernel (Cross Referencing)]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ltxref.dtx}
+\title{\filename}
+\date{\filedate}
+ \author{%
+ Johannes Braams\and
+ David Carlisle\and
+ Alan Jeffrey\and
+ Leslie Lamport\and
+ Frank Mittelbach\and
+ Chris Rowley\and
+ Rainer Sch\"opf}
+
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
+\end{document}
+%</driver>
+% \fi
+%
+%
+% \changes{v1.0c}{1994/03/29}
+% {Create file ltcntlen from parts of ltmiscen and ltherest.}
+% \changes{v1.1a}{1994/05/19}
+% {Extract file ltxref from ltcntlen.}
+% \changes{v1.1b}{1994/05/21}{Use new warning commands}
+% \changes{v1.1c}{1994/05/25}{Modify documentation}
+%
+% \section{Cross Referencing}
+% The user writes |\label|\marg{foo} to define the following
+% cross-references:
+%
+% |\ref|\marg{foo}: value of most recently incremented referencable
+% counter. in the current environment. (Chapter, section,
+% theorem and enumeration counters counters are
+% referencable, footnote counters are not.)
+%
+% |\pageref|\marg{foo}: page number at which |\label{foo}| command
+% appeared. where foo can be any string of characters not
+% containing `|\|', `|{|' or `|}|'.
+%
+% Note: The scope of the |\label| command is delimited by environments,
+% so\\
+% |\begin{theorem} \label{foo} ... \end{theorem} \label{bar}|\\
+% defines |\ref{foo}| to be the theorem number and |\ref{bar}| to be
+% the current section number.
+%
+% Note: |\label| does the right thing in terms of spacing -- i.e.,
+% leaving a space on both sides of it is equivalent to leaving
+% a space on either side.
+%
+%
+% \StopEventually{}
+%
+% \subsection{Cross Referencing}
+%
+% \begin{oldcomments}
+% \begin{macrocode}
+%<*2ekernel>
+\message{x-ref,}
+% \end{macrocode}
+%
+% This is implemented as follows. A referencable counter CNT is
+% incremented by the command \refstepcounter{CNT} , which sets
+% \@currentlabel == {CNT}{eval(\p@cnt\theCNT)}. The command
+% \label{FOO} then writes the following on file \@auxout :
+% \newlabel{FOO}{{eval(\@currentlabel)}{eval(\thepage)}}
+%
+% \ref{FOO} ==
+% BEGIN
+% if \r@foo undefined
+% then @refundefined := G T
+% ??
+% Warning: 'reference foo on page ... undefined'
+% else \@car \eval(\r@FOO)\@nil
+% fi
+% END
+%
+% \pageref{foo} =
+% BEGIN
+% if \r@foo undefined
+% then @refundefined := G T
+% ??
+% Warning: 'reference foo on page ... undefined'
+% else \@cdr \eval(\r@FOO)\@nil
+% fi
+% END
+%
+% \end{oldcomments}
+%
+% \begin{macro}{\G@refundefinedtrue}
+% \changes{v1.1i}{1995/12/07}{Renamed (back) from \cs{G@refundefined}}
+% \begin{macro}{\@refundefined}
+% \changes{v1.1h}{1995/10/24}{Switch for refundefined replaced}
+% This does not save on name-space (since \cs{G@refundefinedfalse}
+% was never needed) but it does make the implementation of such
+% one-way switches more consistent. The extra macro to make the
+% change is used since this change appears several times.
+%
+% \textbf{Note} despite its name, |\G@refundefinedtrue| does
+% \emph{not} correspond to an |\if| command, and there is no
+% matching \ldots|false|. It would be more natural to call the
+% command |\G@refundefined| (as inspection of the change log will
+% reveal) but unfortunately such a change would break any package
+% that had defined a |\ref|-like command that mimicked the
+% definition of |\ref|, calling |\G@refundefinedtrue|. Inspection
+% of the \TeX\ archives revealed several such packages, and so this
+% command has been named \ldots|true| so that the definition of
+% |\ref| need not be changed, and the packages will work without
+% change.
+% \begin{macrocode}
+% \newif\ifG@refundefined
+% \def\G@refundefinedtrue{\global\let\ifG@refundefined\iftrue}
+% \def\G@refundefinedfalse{\global\let\ifG@refundefined\iffalse}
+\def\G@refundefinedtrue{%
+ \gdef\@refundefined{%
+ \@latex@warning@no@line{There were undefined references}}}
+\let\@refundefined\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+% \end{macrocode}
+% \begin{macro}{\ref}
+% \changes{LaTeX2e}{1993/12/11}{Macro reimplemented}
+% \begin{macro}{\pageref}
+% \changes{LaTeX2e}{1993/12/11}{Macro reimplemented}
+% \begin{macro}{\@setref}
+% \changes{LaTeX2e}{1993/12/11}{Macro added}
+% \changes{v1.1h}{1995/10/24}{Switch for refundefined renamed}
+% \changes{v1.1i}{1995/12/07}{Switch for refundefined restored}
+% Referencing a |\label|.
+% RmS 91/10/25: added a few extra |\reset@font|,
+% as suggested by Bernd Raichle
+%
+% RmS 92/08/14: made |\ref| and |\pageref| robust
+%
+% RmS 93/09/08: Added setting of refundefined switch.
+% \begin{macrocode}
+\def\@setref#1#2#3{%
+ \ifx#1\relax
+ \protect\G@refundefinedtrue
+ \nfss@text{\reset@font\bfseries ??}%
+ \@latex@warning{Reference `#3' on page \thepage \space
+ undefined}%
+ \else
+ \expandafter#2#1\null
+ \fi}
+\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
+ \@secondoftwo{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\newlabel}
+% \changes{v1.1b}{1994/05/21}{Use new warning commands}
+% \changes{v1.1e}{1995/04/24}{Make \cs{@onlypreamble} for /1388.}
+% \changes{v1.1e}{1995/06/19}
+% {Use \cs{@newl@bel} to share code with \cs{bibcite}}
+% \changes{v1.1g}{1995/07/14}
+% {Remove \cs{@onlypreamble} so still defined in new \cs{enddocument}}
+% This command will be written to the \texttt{.aux} file to
+% pass label information from one run to another.
+% \begin{macro}{\@newl@bel}
+% The internal form of |\newlabel| and |\bibcite|. Note that this
+% macro does it's work inside a group. That way the local
+% assignments it needs to do don't clutter the save stack. This
+% prevents large documents with many labels to run out of save
+% stack.
+% \changes{v1.1h}{1995/10/24}{Switch for multiplelabels replaced by
+% inline code}
+% \changes{v1.1k}{2001/02/16}{Added an extra grouplevel (PR3250), jlb}
+% \begin{macrocode}
+\def\@newl@bel#1#2#3{{%
+ \@ifundefined{#1@#2}%
+ \relax
+ {\gdef \@multiplelabels {%
+ \@latex@warning@no@line{There were multiply-defined labels}}%
+ \@latex@warning@no@line{Label `#2' multiply defined}}%
+ \global\@namedef{#1@#2}{#3}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\newlabel{\@newl@bel r}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\@newl@bel
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@multiplelabels}
+% \changes{v1.1h}{1995/10/24}{Macro removed}
+% \begin{macro}{\@multiplelabels}
+% \changes{v1.1h}{1995/10/24}{Switch for multiplelabels removed}
+% This is redefined to produce a warning if at least one label is
+% defined more than once. It is executed by the |\enddocument|
+% command.
+% \begin{macrocode}
+\let \@multiplelabels \relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\label}
+% \changes{v1.1d}{1994/11/04}{(ASAJ)Added \cs{protected@write}}
+% \begin{macro}{\refstepcounter}
+% \changes{v1.1d}{1994/11/04}{(ASAJ)Added \cs{protected@edef}}
+% The commands |\label| and |\refstepcounter| have been changed to
+% allow |\protect|'ed commands to work properly. For example,
+%\begin{verbatim}
+% \def\thechapter{\protect\foo{\arabic{chapter}.\roman{section}}}
+%\end{verbatim}
+% will cause a |\label{bar}| command to define |\ref{bar}| to expand
+% to something like |\foo{4.d}|. Change made 20 Jul 88.
+%
+% \begin{macrocode}
+\def\label#1{\@bsphack
+ \protected@write\@auxout{}%
+ {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}%
+ \@esphack}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\refstepcounter#1{\stepcounter{#1}%
+ \protected@edef\@currentlabel
+ {\csname p@#1\endcsname\csname the#1\endcsname}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@currentlabel}
+% For |\label| commands that come before any environment
+%
+% \begin{macrocode}
+\def\@currentlabel{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \subsection{An extension of counter referencing}
+%
+%
+% At the moment a reference to a counter |foo| will generate the
+% equivalent of |\p@foo\thefoo| although not quite in this form. For
+% some applications it would be nice of one could have |\thefoo| being
+% an argument to |\p@foo| to be able to put material before and after
+% the number generated by |\thefoo|. This can be easily achieved with
+% a small change to one of the kernel commands as follows:
+%
+%\begin{verbatim}
+%\def\refstepcounter#1{\stepcounter{#1}%
+% \protected@edef\@currentlabel
+% {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+%}
+%\end{verbatim}
+%
+% The trick is to ensure that |\csname the#1\endcsname| is turned into
+% a single token before |\p@...| is expanded further. This way, if the
+% |\p@...| command is a macro with one argument it will receive
+% |\the...|. With the kernel code (i.e., without the |\expandafter|)
+% it will instead pick up |\csname| which would be disastrous.
+%
+% Using |\expandafter| instead of braces delimiting the argument is
+% better because, assuming that the |\p@...| command is not defined as
+% a macro with one argument, the braces will stay and prohibit kerning
+% that might otherwise happen between the glyphs generated by
+% |\the...| and surrounding glyphs.
+%
+% We have refrained from making this change in the kernel code
+% although for existing documents it would be 100\% backward
+% compatible. The reason being that any class or package making use of
+% this functionality would then horribly fail with older \LaTeX{}
+% installations.
+%
+% Instead we suggest that people who are interested in using this
+% functionality in a document class or package add the redefinition to
+% the class file. To ensure that this redefinition is properly applied
+% they might want to test for the original definition first, e.g.
+%
+%\begin{verbatim}
+%\CheckCommand*\refstepcounter[1]{\stepcounter{#1}%
+% \protected@edef\@currentlabel
+% {\csname p@#1\endcsname\csname the#1\endcsname}%
+%}
+%\renewcommand*\refstepcounter[1]{\stepcounter{#1}%
+% \protected@edef\@currentlabel
+% {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+%}
+%\end{verbatim}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/makeindx.dtx b/macros/latex-dev/base/makeindx.dtx
new file mode 100644
index 0000000000..280416f65b
--- /dev/null
+++ b/macros/latex-dev/base/makeindx.dtx
@@ -0,0 +1,313 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%\iffalse
+% Copyright (C) 1985 by Leslie Lamport
+% Copyright (C) 1994-98 by \LaTeX3 Project and Johannes Braams
+%\fi
+%
+% \changes{1.0b}{1994/01/21}{added a missing \cs{end\{macro\}}, a
+% missing docstrip end of module and corrected a few typos}
+% \changes{1.0d}{1994/02/11}{Corrected a few documentation errors;
+% added \cs{Checksum}}
+% \changes{1.0e}{1994/02/22}{Another documentation flaw fixed}
+% \changes{1.0f}{1994/03/01}{Moved driver further up; corrected a few
+% errors}
+% \changes{1.0f}{1994/03/01}{Added overview of {\sc docstrip} modules}
+% \changes{1.0i}{1994/11/11}{(DPC) Removed spurious \cs{wlog}}
+% \changes{1.0k}{1998/08/17}{(RmS) Minor documentation corrections.}
+% \changes{1.0m}{2000/03/29}{(RmS) Added macros \cs{seealso} and \cs{alsoname}.}
+%
+%\title{Standard \LaTeXe\ packages \texttt{makeidx} and
+% \texttt{showidx}}
+%
+% \author{%
+% Johannes Braams\and
+% David Carlisle\and
+% Alan Jeffrey\and
+% Leslie Lamport\and
+% Frank Mittelbach\and
+% Chris Rowley\and
+% Rainer Sch\"opf}
+%
+% \date{2014/09/29}
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Description}
+%
+% \subsection{Makeidx}
+%
+% The package \texttt{makeidx} provides two new commands, |\see|
+% and |\printindex|.
+%
+% \DescribeMacro\see
+% The command |\see| can used in the index to cross reference to
+% other items.
+%
+% \DescribeMacro\printindex
+% This command can be used to include the sorted and formatted
+% index in the document.
+%
+% \subsection{Showidx}
+%
+% The package \texttt{showidx} changes a number of internal
+% \LaTeXe\ commands in such a way that each index entry is shown in
+% the margin on the page where the entry appears. This package was
+% originally meant to be used with the \texttt{report} and
+% \texttt{book} document classes, but works with other classes as
+% well. It makes |\flushbottom| the default.
+%
+% \StopEventually{}
+%
+% \section{The {\sc docstrip} modules}
+%
+% The following modules are used in the implementation to direct
+% {\sc docstrip} in generating the external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% makeidx & produce makeidx.sty\\
+% showidx & produce showidx.sty\\
+% driver & produce a documentation driver file \\
+% \end{tabular}
+% \end{center}
+%
+% \section{The documentation driver file}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you are
+% currently reading. It can be extracted from this file by the
+% {\sc docstrip} program.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{makeindx.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \section{Implementation}
+%
+% \subsection{Identification}
+%
+% Announce the package and its version:
+% \changes{v1.0h}{1994/05/01}{Removed use of variables}
+% \begin{macrocode}
+%<makeidx>\ProvidesPackage{makeidx}
+%<showidx>\ProvidesPackage{showidx}
+ [2014/09/29 v1.0m Standard LaTeX package]
+% \end{macrocode}
+%
+% \subsection{Makeidx}
+%
+% \begin{macro}{\see}
+% This macro discards its second argument (typically a page number)
+% and just prints |\seename| together with the entry the reader is
+% pointed to.
+% \changes{v1.0j}{1995/04/19}{Use \cs{emph} instead of \cs{em}}
+% \changes{v1.0j}{1995/04/19}{Disallow \cs{par} in argument}
+% \begin{macrocode}
+%<*makeidx>
+\newcommand*\see[2]{\emph{\seename} #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\seealso}
+% \changes{v1.0m}{2000/03/29}{Macro added (see PR 3133).}
+% This macro discards its second argument (typically a page number)
+% and just prints |\alsoname| together with the entry the reader is
+% pointed to. We use |\providecommand| to retain compatibility with
+% existing files that define this macro.
+% \begin{macrocode}
+\providecommand*\seealso[2]{\emph{\alsoname} #1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\printindex}
+% This command simply inputs the (formatted) index if it exists,
+% otherwise a warning is issued.
+% \changes{1.0c}{1994/02/08}{Use \cs{@input@} instead of \cs{@input} to
+% get the index listed by \cs{listfiles}}
+% \begin{macrocode}
+\newcommand\printindex{\@input@{\jobname.ind}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\seename}
+% This package is for documents prepared in the English language.
+% To prepare a version for another language, various English words
+% must be replaced. All the English words that require replacement
+% are% defined below in command names.
+% \changes{1.0g}{1994/03/07}{Replaced \cs{newcommand} by \cs{providecommand}.}
+% \begin{macrocode}
+\providecommand\seename{see}
+% \end{macrocode}
+% We used |\providecommand| in case the command is already defined
+% by a package loaded earlier.
+% \end{macro}
+%
+% \begin{macro}{\alsoname}
+% \changes{v1.0m}{2000/03/29}{Macro added (see PR 3133).}
+% This macro discards its second argument (typically a page number)
+% and just prints |\alsoname| together with the entry the reader is
+% pointed to. We use |\providecommand| to retain compatibility with
+% existing files that define this macro.
+% \begin{macrocode}
+\providecommand*\alsoname{see also}
+%</makeidx>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{showidx}
+%
+% \begin{macro}{\indexbox}
+% This package uses \TeX's insert mechanism, therefore it needs to
+% allocate an insert register.
+% \begin{macrocode}
+%<*showidx>
+\newinsert\indexbox
+\dimen\indexbox=\maxdimen
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\index}
+% This is a modified default definition for the user level |\index|
+% command. The difference is the change of the category code of the
+% space character.
+% \begin{macrocode}
+\renewcommand\index{\@bsphack\begingroup
+ \@sanitize\catcode32=10\relax\@index}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makeindex}
+% The same change has to be included in the user level |\makeindex|
+% command, which changes the definition of |\index| to actually
+% write index entries to an external file.
+% \begin{macrocode}
+\renewcommand\makeindex{\if@filesw \newwrite\@indexfile
+ \immediate\openout\@indexfile=\jobname.idx
+ \def\index{\@bsphack\begingroup
+ \def\protect####1{\string####1\space}\@sanitize
+ \catcode32=10 \@wrindex\@indexfile}\typeout
+ {Writing index file \jobname.idx }\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@wrindex}
+% This macro takes care of writing the index entries to a file. The
+% definition is modified to call |\@showidx|.
+% \begin{macrocode}
+\def\@wrindex#1#2{\let\thepage\relax
+ \xdef\@gtempa{\write#1{\string
+ \indexentry{#2}{\thepage}}}\endgroup\@gtempa
+ \@showidx{#2}\if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@index}
+% When the user didn't use the |\makeindex| command, the |\index|
+% macro calls |\@index|, which normally does basically nothing.
+% This package changes the definition to call |\@showidx|, which
+% includes the entry in the list of indexentries on the current page.
+% \begin{macrocode}
+\def\@index#1{\@showidx{#1}\endgroup\@esphack}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@showidx}
+% This macro adds the current index entry to the insert
+% |\indexbox|. The |\indexbox| is typeset as a flushleft paragraph.
+% \begin{macrocode}
+\def\@showidx#1{%
+ \insert\indexbox{\small
+ \hsize\marginparwidth
+ \hangindent\marginparsep \parindent\z@
+ \everypar{}\let\par\@@par \parfillskip\@flushglue
+ \lineskip\normallineskip
+ \baselineskip .8\normalbaselineskip\sloppy
+ \raggedright \leavevmode
+ \vrule \@height .7\normalbaselineskip \@width \z@\relax
+ #1\relax
+ \vrule \@height \z@ \@depth .3\normalbaselineskip \@width \z@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\raggedbottom}
+% \begin{macro}{\flushbottom}
+% The definition of these macros from \texttt{latex.dtx} is changed
+% here to add the execution of |\@mkidx| to |\@texttop|, which is
+% executed at the top of each page.
+% \begin{macrocode}
+\renewcommand\raggedbottom{\def\@textbottom{\vskip
+ \z@ plus.0001fil}\let\@texttop\@mkidx}
+\renewcommand\flushbottom{\let\@textbottom\relax
+ \let\@texttop\@mkidx}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@mkidx}
+% This macro actually typesets the box containing all the index
+% entries on the current page. They will occur on the left or the
+% right side of the text, or both, depending on the setting of the
+% switches |\if@twocolumn| and |\if@twoside|.
+% \begin{macrocode}
+\def\@mkidx{\vbox to \z@{\hbox{\if@twocolumn
+ \if@firstcolumn \@leftidx \else \@rightidx \fi
+ \else \if@twoside \ifodd\c@page \@rightidx
+ \else \@leftidx \fi
+ \else \@rightidx \fi
+ \fi
+ \box\indexbox}\vss}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@leftidx}
+% \begin{macro}{\@rightidx}
+% These macros give the amount of displacement for the |\indexbox|.
+% \begin{macrocode}
+\def\@leftidx{\hskip-\marginparsep \hskip-\marginparwidth}
+\def\@rightidx{\hskip\columnwidth \hskip\marginparsep}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% To make this work we have to execute either |\raggedbottom| or
+% |\flushbottom|. Assuming this package is used most often with the
+% document classes \texttt{report} and \texttt{book}, we execute
+% |\flushbottom|.
+% \begin{macrocode}
+\flushbottom
+%</showidx>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/makeindx.ins b/macros/latex-dev/base/makeindx.ins
new file mode 100644
index 0000000000..d7ad42e2f9
--- /dev/null
+++ b/macros/latex-dev/base/makeindx.ins
@@ -0,0 +1,104 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{\file{makeidx.sty}{\from{makeindx.dtx}{makeidx}}
+ \file{showidx.sty}{\from{makeindx.dtx}{showidx}}
+ }
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space makeidx.sty}
+\Msg{* \space\space showidx.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/makeindx.pdf b/macros/latex-dev/base/makeindx.pdf
new file mode 100644
index 0000000000..2b9c8061ec
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..ec74710057
--- /dev/null
+++ b/macros/latex-dev/base/manifest.txt
@@ -0,0 +1,225 @@
+%
+% The following files form the LaTeX2e distribution of 2017-04-15
+%
+%
+% CONTENTS OF THE LaTeX DISTRIBUTION
+% ==================================
+%
+% Documentation:
+% --------------
+%
+% README.txt -- 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).
+% lppl-1-0.txt -- The LaTeX Project Public License (version 1.0).
+% lppl-1-1.txt -- The LaTeX Project Public License (version 1.1).
+% lppl-1-2.txt -- The LaTeX Project Public License (version 1.2).
+% lppl.tex -- The LaTeX Project Public License (current as .tex).
+%
+% bugs.txt -- How to submit a bug report for LaTeX.
+%
+% source2e.tex -- File to produce kernel documentation.
+% changes.txt -- List of changes in reverse chronological order.
+%
+% sample2e.tex -- Sample LaTeX input file.
+% small2e.tex -- Small sample LaTeX input file.
+%
+% clsguide.tex -- How to write class files.
+% cfgguide.tex -- Guide to using `.cfg' files to configure LaTeX.
+% cyrguide.tex -- Guide to using cyrillic languages in LaTeX.
+% encguide.tex -- Guide to font encodings.
+% fntguide.tex -- Guide to font selection.
+% modguide.tex -- Guide to modifying and distributing LaTeX.
+% usrguide.tex -- User guide for this release.
+%
+% ltnews01.tex -- What was new in the release dated 1994/06.
+% ltnews02.tex -- What was new in the release dated 1994/12.
+% ltnews03.tex -- What was new in the release dated 1995/06.
+% ltnews04.tex -- What was new in the release dated 1995/12.
+% ltnews05.tex -- What was new in the release dated 1996/06.
+% ltnews06.tex -- What was new in the release dated 1996/12.
+% ltnews07.tex -- What was new in the release dated 1997/06.
+% ltnews08.tex -- What was new in the release dated 1997/12.
+% ltnews09.tex -- What was new in the release dated 1998/06.
+% ltnews10.tex -- What was new in the release dated 1998/12.
+% ltnews11.tex -- What was new in the release dated 1999/06.
+% ltnews12.tex -- What was new in the release dated 1999/12.
+% ltnews13.tex -- What was new in the release dated 2000/06.
+% ltnews14.tex -- What was new in the release dated 2001/06.
+% ltnews15.tex -- What was new in the release dated 2003/12.
+% ltnews16.tex -- What may happen in 2004 and beyond.
+% ltnews17.tex -- What was new in the release dated 2005/12.
+% ltnews18.tex -- (empty)
+% ltnews19.tex -- What was new in the release dated 2009/09.
+% ltnews20.tex -- What was new in the release dated 2011/06.
+% ltnews21.tex -- What was new in the release dated 2014/05.
+% ltnews22.tex -- What was new in the release dated 2015/01.
+% ltnews23.tex -- What was new in the release dated 2015/10.
+% 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.
+
+%
+% ltx3info.tex -- Information about the LaTeX3 project.
+%
+% manual.err -- Errata for the LaTeX Manual.
+% tlc2.err -- Errata for the LaTeX Companion, second edition.
+% lb2.err -- Errata for the LaTeX-Begleiter, 2te erw. Auflage (German).
+% lgc2.err -- Errata for the LaTeX Graphics Companion, second edition.
+% webcomp.err -- Errata for the LaTeX Web Companion.
+%
+%
+% Kernel files:
+% -------------
+%
+% cmfonts.fdd -- Font definitions for Computer modern fonts.
+% fontdef.dtx -- Code for font definitions.
+% lthyphen.dtx -- Hyphenation support.
+% ltboxes.dtx -- Code for making boxes.
+% ltclass.dtx -- Class and option handling.
+% ltcounts.dtx -- Counters.
+% ltpageno.dtx -- Page numbering.
+% ltxref.dtx -- Cross referencing.
+% ltlength.dtx -- Lengths.
+% ltdirchk.dtx -- Support for search in current directory.
+% ltfiles.dtx -- File handling.
+% ltfinal.dtx -- Code for debugging and final initialisations.
+% ltfloat.dtx -- Float handling.
+% ltfntcmd.dtx -- Various font switching commands.
+% ltfssbas.dtx -- NFSS Base macros
+% ltfsstrc.dtx -- NFSS Tracing (and tracefnt.sty)
+% ltfssdcl.dtx -- NFSS Declarative interface
+% ltfssini.dtx -- NFSS Initialisation
+% ltfsscmp.dtx -- NFSS1 compatibility
+% ltidxglo.dtx -- Index and glossary.
+% ltbibl.dtx -- Bibliography commands.
+% ltalloc.dtx -- Allocation of counters and others.
+% ltdefns.dtx -- Initial definitions.
+% ltcntrl.dtx -- Program control macros.
+% lterror.dtx -- Error handling.
+% ltpar.dtx -- Paragraphs.
+% ltspace.dtx -- Spacing, line and page breaking.
+% ltlogos.dtx -- Logos.
+% ltlists.dtx -- Code for lists and related environments.
+% ltmath.dtx -- Code for math.
+% ltmiscen.dtx -- Code for miscellaneous environments.
+% ltoutenc.dtx -- Code for output encoding commands.
+% ltoutput.dtx -- LaTeX page makeup (output routine).
+% ltpictur.dtx -- The picture environment.
+% ltpage.dtx -- Page styles and related commands.
+% ltplain.dtx -- Things borrowed from the plain format.
+% lttab.dtx -- The tabbing, tabular and array environments.
+% ltthm.dtx -- The theorem-like environments.
+% ltsect.dtx -- Sectioning and title commands.
+% ltvers.dtx -- Version identification code.
+% preload.dtx -- Code for preloading fonts.
+% tulm.fdd -- Font definitions for TU latin modern fonts.
+%
+%
+% Standard Classes:
+% -----------------
+%
+% classes.dtx -- Standard document classes article/book/report.
+% letter.dtx -- Standard document class letter.
+% proc.dtx -- Proc class: modifies the article class.
+% slides.dtx -- Slides class, etc based on SLiTeX.
+% slifonts.fdd -- Font declarations for slides class.
+%
+%
+% LaTeX2.09 compatibility:
+% ------------------------
+%
+% latex209.dtx -- Implements LaTeX 2.09 compatibility mode.
+%
+%
+% Standard packages:
+% ------------------
+%
+% alltt.dtx -- Implements the alltt environment.
+% fix-cm.dtx -- Implements modified font choices for cm fonts.
+% latexrelease.dtx -- Controls fixes to LaTeX.
+% graphpap.dtx -- Implements programming \graphpaper command..
+% inputenc.dtx -- Implements eight-bit input.
+% utf8ienc.dtx -- Supplement for inputenc to implement UTF8 encoding.
+% ifthen.dtx -- Implements programming control structures.
+% makeindx.dtx -- Implements support for generating an index.
+%
+%
+% Font selection files:
+% ---------------------
+%
+% exscale.dtx -- Scaling the math extension font.
+% latexsym.dtx -- Definitions for LaTeX symbol fonts.
+% newlfont.dtx -- New semantics of font switching commands.
+% nfssfont.dtx -- program for testing a font and generating glyph tables.
+% oldlfont.dtx -- Old semantics of font switching commands.
+% syntonly.dtx -- Syntonly package for running in syntax check mode.
+%
+%
+% The doc package:
+% ----------------
+%
+% doc.dtx -- Package for self documenting code.
+% docstrip.dtx -- Module for removing comments.
+% ltxdoc.dtx -- Class file for printing documentation.
+%
+%
+% Installation scripts for the various parts:
+% -------------------------------------------
+%
+% unpack.ins -- LaTeX main installation script (see below).
+%
+%
+% Installation scripts used by unpack.ins:
+% ------------------------------------------
+%
+% alltt.ins -- Installation script for the alltt package.
+% classes.ins -- Installation script for standard classes.
+% cmfonts.ins -- Installation script for OT* Computer Modern 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.
+% 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.
+% latexsym.ins -- Installation script for latexsym.dtx.
+% letter.ins -- Installation script for document class letter.
+% ltoutenc.ins -- Installation script for output encoding files.
+% makeindx.ins -- Installation script for makeindx.dtx.
+% nfssfont.ins -- Installation script for nfssfont.dtx.
+% proc.ins -- Installation script for the proc package.
+% slides.ins -- Installation script for SLiTeX.
+% syntonly.ins -- Installation script for the syntonly package.
+% tulm.ins -- Installation script for TU Latin Modern fonts.
+%
+% Installation scripts to be used by themselves:
+% ----------------------------------------------
+%
+% 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).
+%
+%
+% Support files:
+% --------------
+%
+% ltxguide.cls -- Document class used by the guides.
+% ltnews.cls -- Document class for `news' document.
+% minimal.cls -- Minimal document class for debugging and testing.
+% idx.tex -- Print out index entries in your document.
+% lablst.tex -- Generate list of labels used in a document.
+% testpage.tex -- Test file for checking the accuracy of a printer.
+% ltxcheck.tex -- Test file for checking the LaTeX installation.
+%
+%
+% ======================================================================
diff --git a/macros/latex-dev/base/manual.err b/macros/latex-dev/base/manual.err
new file mode 100644
index 0000000000..e78b18de9f
--- /dev/null
+++ b/macros/latex-dev/base/manual.err
@@ -0,0 +1,365 @@
+\documentclass{article}
+
+\newcommand{\reportedby}[2]{{\small [First reported by #1 on \mbox{#2}.]}}
+\newcommand{\erratum}[1]{\subsubsection*{#1}}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% MODIFICATION DATE %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Defines \moddate to expand to modification date such as %
+% %
+% 5 Aug 1991 %
+% %
+% and \prdate to print it in a large box. Assumes editor %
+% updates modification date in standard SRC Gnu Emacs style. %
+% (should work for any user name). %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\ypmd{% %
+% %
+% %
+ Last modified on Sat 13 October 2018 at 12:56:41 PST by lamport %
+ endypmd} %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\moddate}{\expandafter\xpmd\ypmd} %
+\def\xpmd Last modified %
+on #1 #2 #3 #4 at #5:#6:#7 #8 by #9 endypmd{#2 #3 #4} %
+\newcommand{\prdate}{\noindent\fbox{\Large\moddate}} %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\mytt}{\normalfont\ttfamily}
+\newcommand{\cindex}{\index}
+\newcommand\bs{\char '134 } % A backslash character for \tt font
+
+\title{Errata to the Second Edition of the \LaTeX\ Manual}
+\author{Leslie Lamport}
+\date{\moddate}
+
+\begin{document}
+\maketitle
+
+\noindent These are all the errors and omissions to the manual,
+\LaTeX: {\em A Document Preparation System}, second edition, published
+by Addison-Wesley, reported as of \moddate. Positions in the book are
+indicated by page and line number, where the top line of a page is
+number 1 and the bottom line is number $-1$. A running head and a
+page number are not considered to be lines, but all other lines are.
+Please report any additional errors to The \LaTeX\ Project at
+\texttt{www.latex-project.org/bugs/}\,.
+
+
+\subsection*{Errors Corrected in the First Printing}
+
+\erratum{page 25, example of \texttt{verse} environment}
+Replace \verb|{\em all\/}| by \verb|\emph{all}|.
+ \reportedby{Rosemary Bailey}{29 Aug 1994}
+
+\erratum{page 28, first paragraph}
+Not an error, but it would be
+helpful to add the following sentence to the end of that paragraph:
+ ``(If a declaration has arguments, they become additional
+arguments of the corresponding environment's \verb|\begin| command.)''
+
+
+\erratum{page 33, line 10}
+Add \verb|\]| to the list of fragile commands.
+ \reportedby{Rosemary Bailey}{29 Aug 1994}
+
+\erratum{page 43, table 3.5}
+Add an entry for \verb|\notin| ($\notin$).
+ \reportedby{Rosemary Bailey}{29 Aug 1994}
+
+\erratum{page 72, two examples}
+Change \verb|{\em ...}| to \verb|\emph{...}|
+ \reportedby{Rosemary Bailey}{29 Aug 1994}
+
+\erratum{page 101}
+This is not an error, but some readers will find it helpful if, in the
+descriptions of \verb|\setlength| and \verb|\addtolength|,
+\verb|\gnat| were replaced by \verb|\parskip|.
+ \reportedby{Ellen Gilkerson}{9 Aug 1994}
+
+\erratum{page 108, lines 7 and 10}
+This is not an error, but it might be easier to understand
+the example if \verb|\len| were replaced by something like \verb|\saved|.
+ \reportedby{Rosemary Bailey}{29 Aug 1994}
+
+\erratum{page 139, lines $-8$ and $-9$}
+
+The funny break between these two lines should be eliminated.
+\reportedby{Malcolm Clark}{9 Aug 1994}
+
+\erratum{page 177, line $-12$}
+
+The \verb|twocolumn| option cannot be used with the \verb|letters|
+class.
+
+\erratum{page 197, lines 7 and 9}
+
+The \verb|figure*| environment is ended by \verb|\end{figure*}|, and
+the \verb|table*| environment is ended by \verb|\end{table*}|.
+\reportedby{Malcolm Clark}{9 Aug 1994}
+
+\erratum{page 228}
+
+Add a note that, before running a LaTeX2.09 file in compatibility mode
+in LaTeX2e, you should delete the old versions of the auxiliary files.
+
+\subsection*{Errors Corrected in the Second Printing}
+
+\erratum{page xv, line 10}
+``Chris Rowley'' should come after ``Sebastian Rahtz''.
+\reportedby{Martin Schr\"{o}der}{24 April 1995}
+
+
+
+\erratum{page 29, line $-10$}
+Change ``error indicator line'' to ``error locator line''.
+\reportedby{Xavier Perramon}{2 Jan 1995}
+
+\erratum{page 37, lines 26--28}
+Change the two sentences ``None of these \ldots formula.'' to:
+\begin{quote}
+These text-producing commands can be used in math mode to put ordinary
+text in a formula. (When the command is used in math mode, its
+argument is processed in LR mode.) The declarations cannot be used in
+math mode. Section 3.3.8 explains how to change the type style of a
+formula's math-mode symbols.
+\end{quote}
+\reportedby{Mike Piff}{7 Mar 1995}
+
+\erratum{page 39, line 6}
+Replace ``any mode'' with ``paragraph and LR mode''. Also,
+after line 8, add:
+\begin{quote}
+The commands \verb|\dag|, \verb|\ddag|, \verb|\S|, and \verb|\P|
+can also be used in math mode.
+\end{quote}
+
+\erratum{page 53, line 24}
+Change ``are needed in the'' to ``are used in the''
+\reportedby{Mike Piff}{21 Oct 1994}
+
+\erratum{page 80, line 1}
+The section heading should not be outdented.
+\reportedby{Martin Schr\"{o}der}{23 Jan 1995}
+
+\erratum{page 83, line $-8$}
+Change ``\verb|\resettime|'' to ``\verb|\settime|''.
+
+\erratum{page 84, after line $11$} Add the following sentence: ``The
+\hbox{\verb|\onlyslides|} and \hbox{\verb|\onlynotes|} commands may
+not work right if a \texttt{slide}, \texttt{overlay}, or \texttt{note}
+environment appears in the argument of any command.''
+\reportedby{Eike Ritter}{May 1996}
+
+\erratum{page 153, line 1}
+Add ``or subentry'' after ``entry''.
+\reportedby{Martin Schr\"{o}der}{22 Feb 1995}
+
+\erratum{page 171}
+Add the following before line $-4$:
+\begin{description}
+\item[\mytt \bs columnwidth]
+Normal width
+ \cindex{columnwidth}%
+of a column;
+% \index{column!width}%
+ \index{width!of column}%
+equals \verb|\textwidth| except for multiple-column styles.
+Its value should not be changed with the length-setting commands.
+\end{description}
+Also, in line $-4$, change \verb|\textwidth| to \verb|\columnwidth|.
+%\reportedby{Volker Kuhlmav}{20 Jan 1995}
+\reportedby{Rosemary Bailey}{9 Sep 1994}
+
+\erratum{page 180, lines 15--19}
+%
+Replace these five lines (which begin ``These commands are overridden'')
+with:
+\begin{itemize} \item[]
+To override a heading on a right-hand page (any page for one-sided
+printing), put a \verb|\markright| after the sectioning command and in
+its mandatory argument, and add an optional argument without the
+\verb|markright|, as in
+\begin{itemize}
+\item[]
+ \verb|\chapter[Gnu Scents]{Gnu Scents\markright{|\textit{right\_head}\verb|}}|\\
+ \verb|\markright{|\textit{right\_head}\verb|}|
+\end{itemize}
+To change the heading on a left-hand page, put a \verb|\markboth|
+command immediately after the sectioning command.
+\end{itemize}
+\reportedby{Jerome Breitenbach}{14 Dec 1995}
+
+\erratum{page 182}
+The dimensions
+\verb|\pageheight| and \verb|\pagewidth|
+should be \verb|\paperheight| and \verb|\paperwidth|,
+respectively. (The index entries on page 260 should also be changed.)
+\reportedby{Alan Jeffrey, on behalf of a user}{12 Sep 1995}
+\erratum{page 192, line 19}
+Change ``\emph{cmd}'' to ``\emph{def}''.
+\reportedby{Martin Schr\"{o}der}{9 Mar 1995}
+
+
+\erratum{page 195, line 14}
+Change ``numbered `within' it'' to ``numbered directly `within' it''.
+\reportedby{Martin Schr\"{o}der}{5 Dec 1994}
+
+\erratum{page 197, line 14}
+After ``\verb|\textwidth|'' add ``or \verb|\columnwidth|''
+\reportedby{Volker Kuhlmann}{22 Jan 1995}
+
+\erratum{page 226}
+
+After line 7, add
+\begin{quote}
+These declarations may not be used in math mode.
+\end{quote}
+Replace lines 16-19 (beginning ``None of these commands'') with
+\begin{quote}
+When these commands are used in math mode, the \emph{text}
+argument is processed in LR mode.
+
+These commands and declarations are robust. Words typeset in
+typewriter style are not hyphenated except where permitted by \verb|\-|
+commands.
+\end{quote}
+\reportedby{Marc Lavine}{22 Aug 1995}
+
+\erratum{page 228}
+To the section ``Type Styles and Sizes'', add the following sentence:
+A few mathematical symbols now require the \texttt{latexsym} package---see
+Tables 3.4--3.7.
+
+\subsection*{Errors Corrected in the Sixteenth Printing}
+
+\erratum{page 42, line 14}
+Change ``through a symbol'' by ``through a relation symbol''.
+\reportedby{Frank Mittelbach}{15 Nov 1996}
+
+\erratum{page 42, Table 3.4}
+\verb|\land| should be listed as a synonym for \verb|\wedge|, and
+\verb|\lor| should be listed as a synonym for \verb|\vee|.
+\reportedby{Chris Rowley}{28 Oct 1998}
+
+\erratum{page 43, Table 3.7}
+\verb|\lnot| should be listed as a synonym for \verb|\neg|.
+\reportedby{Chris Rowley}{15 Oct 1998}
+
+\erratum{page 137} This is not an error, but it would be better to
+change lines 23 and 24 to:
+\begin{quote}
+\LaTeX\
+ \index{file!not found error}%
+ \index{file!nonexistent}%
+is trying to read a file that apparently doesn't exist. If the missing
+file has the extension \texttt{tex}, then \LaTeX\ is trying to
+ \index{input)@\verb+\input+!of nonexistent file}%
+ \index{include)@\verb+\include+!of nonexistent file}%
+\verb|\input| or \verb|\include| it; if it
+\end{quote}
+
+\erratum{page 171, line 19}
+Change the description of \verb|\indent| to:
+\begin{description}
+\item[\mytt \bs indent]
+Produces a
+% \cindex{indent}%
+% \index{paragraph!indentation}%
+horizontal space whose width equals the width of the
+paragraph indentation. It can be used to add a paragraph indentation
+where one would otherwise be suppressed. (If it doesn't work,
+try typing \verb|\indent\indent|.) Robust.
+\end{description}
+\reportedby{Chris Rowley}{15 Oct 1998}
+
+\erratum{page 179, line 19}
+%
+Change to:
+\begin{quote}
+page style for the \texttt{article} and \texttt{report} document classes.
+\end{quote}
+\reportedby{Stephen J. Alter}{17 Sep 1997}
+
+\erratum{page 195, line 28}
+Replace ``\textit{num}$_1$ and \textit{num}$_1$ are numbers''
+with ``\textit{num}$_1$ and \textit{num}$_2$ are numbers''.
+\reportedby{Magnus Lewis-Smith}{14 Jan 1999}
+
+\erratum{page 196, line $-5$}
+Change \verb|\newboolean{|\emph{name}\verb|}| to
+\verb|\newboolean{|\emph{nam}\verb|}|.
+\reportedby{Christopher von B\"{u}low}{28 Aug 2000}
+
+
+\erratum{page 198, line 14}
+Change ``it will not be printed'' to ``it will usually not be printed''.
+
+\erratum{page 218, line $-14$}
+Change ``\texttt{tabular}'' to ``\texttt{tabbing}''.
+\reportedby{Carlos Pita}{27 Aug 2001}
+
+\erratum{foldout, column 3, line 3}
+Replace \emph{style} with \emph{class}. \reportedby{Christopher von B\"{u}low}{28 Aug 2000}
+
+\subsection*{Errors Corrected in the Seventeenth Printing}
+
+\erratum{page 51, line 8}
+Change ``The \verb|\,| command'' to ``The \verb|\,| and \verb*|\ | commands''.
+\reportedby{Phillip J Shelton}{2 Jul 1999}
+
+\erratum{page 61, second example (middle of page)}
+Remove the \verb|\mbox{}| following the \texttt{tabbing} environment.
+\reportedby{Marcin Wolinski}{17 Sep 2003}
+
+\erratum{page 210, line 20}
+Add a space after ``bibliography''.
+\reportedby{Marcin Wolinski}{17 Sep 2003}
+
+\subsection*{Error Corrected in the Twenty-First Printing}
+\erratum{page 198, line $-11$}
+The sentence beginning ``The last three rules'' is hard to read. Better
+would be:
+\begin{quote}
+\noindent The last three rules are suspended when a
+ \verb|\clearpage|,\linebreak
+ \verb|\cleardoublepage|, or
+ \verb|\end{document}| command occurs,
+at which point all unprocessed figures and tables are allowed a
+\hbox{\mytt p} option and printed.
+\end{quote}
+\reportedby{Paul Stanford}{9 Oct 2004}
+
+\subsection*{Error Corrected in the Twenty-Second Printing}
+
+\erratum{page 253, column 2, lines $-5$ and $-6$}
+
+The two index entries for \verb|\ldots| should be combined.
+
+
+\reportedby{Christopher Dutchyn}{22 July 2005}
+
+
+\subsection*{Uncorrected Errors}
+
+\erratum{page 206, line 17 (\texttt{\string\multicolumn} explanation)}
+
+Insert the following text right after ``\texttt{l}, and \texttt{r}.''
+\begin{quote}
+If the part of the environment's \emph{cols} argument being replaced
+immediately follows an \texttt{@} expression, then the \emph{item}
+will be preceded by a normal intercolumn space unless the
+\verb|\multicolumn| command's \emph{col} argument begins with an
+\texttt{@} expression. In particular, beginning the \emph{col}
+argument with \verb|@{}| will suppress that space.
+\end{quote}
+\reportedby{Ulrike Fischer, Frank Mittelbach}{23 Sep 2018}
+
+\end{document}
+
+%try
+%try
diff --git a/macros/latex-dev/base/manual.pdf b/macros/latex-dev/base/manual.pdf
new file mode 100644
index 0000000000..24a4b96b1a
--- /dev/null
+++ b/macros/latex-dev/base/manual.pdf
Binary files differ
diff --git a/macros/latex-dev/base/minimal.cls b/macros/latex-dev/base/minimal.cls
new file mode 100644
index 0000000000..48d3cb4cf0
--- /dev/null
+++ b/macros/latex-dev/base/minimal.cls
@@ -0,0 +1,51 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%%
+%% Minimal LaTeX class file.
+%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{minimal}[2001/05/25 Standard LaTeX minimal class]
+
+\renewcommand\normalsize{\fontsize{10pt}{12pt}\selectfont}
+
+\setlength{\textwidth}{6.5in}
+\setlength{\textheight}{8in}
+
+\pagenumbering{arabic} % but no page numbers are printed because:
+\pagestyle{empty} % this is actually already in the kernel
+
+% This documentclass is intended primarily for testing and reference
+% purposes; loading it with \LoadClass{minimal} to use it as a base
+% class for some other document class is probably a mistake. If you wish
+% to start a new document class based on the minimal class, it is better
+% to start by copying the *contents* of minimal.cls directly into your
+% new class and making suitable modifications. You may, at that point
+% also want to start documenting the code using the conventions of the
+% doc package, rather than using simple ascii comments as used here.
diff --git a/macros/latex-dev/base/newdc.ins b/macros/latex-dev/base/newdc.ins
new file mode 100644
index 0000000000..5bbbe900da
--- /dev/null
+++ b/macros/latex-dev/base/newdc.ins
@@ -0,0 +1,133 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\Msg{*** Generating font defs for Cork encoded
+ and Text Companion fonts ***}
+
+\generate{
+ \file{t1cmfib.fd}{
+ \from{cmfonts.fdd}{fd,T1cmfib,new}}
+ \file{t1cmfr.fd}{
+ \from{cmfonts.fdd}{fd,T1cmfr,new}}
+ \file{t1cmdh.fd}{
+ \from{cmfonts.fdd}{fd,T1cmdh,new}}
+ \file{t1cmr.fd}{
+ \from{cmfonts.fdd}{fd,T1cmr,new}}
+ \file{t1cmss.fd}{
+ \from{cmfonts.fdd}{fd,T1cmss,new}}
+ \file{t1cmtt.fd}{
+ \from{cmfonts.fdd}{fd,T1cmtt,tt,new,nowarn}}
+ \file{t1cmvtt.fd}{
+ \from{cmfonts.fdd}{fd,T1cmvtt,tt,new}}
+ \file{ts1cmr.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmr,new}}
+ \file{ts1cmss.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmss,new}}
+ \file{ts1cmtt.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmtt,new,tt}}
+ \file{ts1cmvtt.fd}{
+ \from{cmfonts.fdd}{fd,TS1cmvtt,new,tt}}
+}
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.fdd' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
+
diff --git a/macros/latex-dev/base/newlfont.dtx b/macros/latex-dev/base/newlfont.dtx
new file mode 100644
index 0000000000..f058ddced9
--- /dev/null
+++ b/macros/latex-dev/base/newlfont.dtx
@@ -0,0 +1,204 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%\iffalse % this is a METACOMMENT !
+%
+%% File `newlfont.dtx'.
+%% Copyright (C) 1989-1998 Frank Mittelbach and Rainer Sch\"opf,
+%% all rights reserved.
+%
+%<*dtx>
+ \ProvidesFile{newlfont.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{newlfont}
+%<driver> \ProvidesFile{newlfont.drv}
+% \fi
+% \ProvidesFile{newlfont.dtx}
+ [1998/08/17 v2.2m Standard LaTeX package]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{newlfont.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+%
+% \changes{v2.2a}{1994/01/17}{Added missing definitions to support
+% newlfont in compat mode}
+% \changes{v2.2b}{1994/01/27}{Removed if@compat test since
+% these settings need also be executed in 2e mode.}
+% \changes{v2.2c}{1994/03/06}{Added def for \cs{cal} and \cs{mit}}
+% \changes{v2.2l}{1995/11/29}{Remove duplicate driver code.}
+% \changes{v2.2m}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+% \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+%
+%
+% \GetFileInfo{newlfont.dtx}
+%
+% \title{The file \texttt{newlfont.dtx} for use with
+% \LaTeXe.\thanks{This file has version
+% number \fileversion, dated \filedate.}\\[2pt]
+% It contains the code for \texttt{newlfont.sty}}
+%
+% \author{Frank Mittelbach}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+%
+% This file contains the code for the \texttt{newlfont} package
+% which provides defines commands like |\rm| to behave as with
+% NFSS1, i.e., to change one font attribute without resetting the
+% other attributes.
+%
+% \StopEventually{}
+%
+%
+% \section{The Code}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% We define the font commands for selecting the typeface. They are
+% probably defined by the document class/style but we want to force
+% the old meaning from NFSS1.
+%
+% \changes{v2.2g}{1994/05/11}{DPC Remove definitions of \cs{prm} etc.}
+% \begin{macrocode}
+\let\rm\rmfamily
+\let\sf\sffamily
+\let\tt\ttfamily
+\let\bf\bfseries
+\let\sl\slshape
+\let\sc\scshape
+\let\it\itshape
+% \end{macrocode}
+% We also have to define the \emph{emphasize} font change command
+% (i.e.\ |\em|). This command will look whether the current font is
+% sloped (i.e.\ has a positive |\fontdimen1|) and will then select
+% either an upright or italic font.
+% \changes{v2.2g}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
+% \changes{v2.2h}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
+% \begin{macrocode}
+\DeclareRobustCommand\em{%
+ \@nomath\em
+ \ifdim \fontdimen\@ne\font >\z@\upshape \else \itshape \fi}
+% \end{macrocode}
+%
+% For compatibility with old sources we should define the following
+% commands although their use in new documents is discouraged.
+% \begin{macrocode}
+\let\mediumseries\mdseries
+\let\normalshape\upshape
+% \end{macrocode}
+%
+% In case \texttt{newlfont} is used in compatibility mode, eg
+%\begin{verbatim}
+% \documentstyle[newlfont]{article}
+%\end{verbatim}
+% or with the \texttt{oldlfont} package already loaded
+% we have to undo a number of settings changed by the compatibility
+% mode for \LaTeX~2.09 documents.
+%
+% |\@setfontsize| should not have a |\reset@font| included.
+% \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}}
+% \begin{macrocode}
+\def\@setfontsize#1#2#3{\@nomath#1%
+ \ifx\protect\@typeset@protect
+ \let\@currsize#1%
+ \fi
+ \fontsize{#2}{#3}\selectfont}
+% \end{macrocode}
+% Math alphabet identifiers should have an argument.
+% \changes{v2.2d}{1994/03/10}{Changed \cs{begingroup}/\cs{endgroup} to
+% \cs{bgroup}/\cs{egroup}.}
+% \changes{v2.2f}{1994/05/05}{Added saved versions of the
+% math-groupers, CAR}
+% \begin{macrocode}
+\let\math@bgroup\bgroup
+\def\math@egroup#1{#1\egroup}
+\let \@@math@bgroup \math@bgroup
+\let \@@math@egroup \math@egroup
+% \end{macrocode}
+% Warn again, if text font commands are used in math
+% (same macro as in \texttt{lfonts.dtx}).
+% \changes{v2.2e}{1994/04/21}{Changed error message}
+% \changes{v2.2k}{1995/04/02}{add \cs{noexpand} to second part of message}
+% \begin{macrocode}
+\def\not@math@alphabet#1#2{%
+ \relax
+ \ifmmode
+ \@latex@error{Command \noexpand#1invalid in math mode}%
+ {%
+ Please
+ \ifx#2\relax
+ define a new math alphabet^^J%
+ if you want to use a special font in math mode%
+ \else
+% \end{macrocode}
+% We have to add |\noexpand| below to prevent expansion of |#2|. In
+% case of |#1| we can omit this (due to the current definition of
+% robust commands since they do come out right there :-).
+% \begin{macrocode}
+ use the math alphabet \noexpand#2instead of
+ the #1command%
+ \fi
+ .
+ }%
+ \fi}
+% \end{macrocode}
+%
+% In NFSS1 math alphabets had arguments so we have to change |\cal|
+% and |\mit| which by default are defined to behave like in
+% \LaTeX209.
+% \begin{macrocode}
+\let\pcal\@undefined
+\let\cal\mathcal
+\let\pmit\@undefined
+\let\mit\mathnormal
+% \end{macrocode}
+%
+% The NFSS1 version of \texttt{newlfont} included the \LaTeX{}
+% symbols. And that is probably all there is.
+% \begin{macrocode}
+\RequirePackage{latexsym}
+%</package>
+% \end{macrocode}
+%
+%
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/nfssfont.dtx b/macros/latex-dev/base/nfssfont.dtx
new file mode 100644
index 0000000000..00b82a1499
--- /dev/null
+++ b/macros/latex-dev/base/nfssfont.dtx
@@ -0,0 +1,497 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+\def\nfssfontfileversion{v2.2d}
+\def\nfssfontfiledate{2015/02/01}
+
+%
+% \iffalse
+% Copyright (C) 1994 Donald E. Knuth
+% Copyright (C) 1994-2019 Frank Mittelbach,
+% all rights reserved.
+% \fi
+%
+%
+% \title{The program \texttt{nfssfont}}
+% \author{Frank Mittelbach\thanks{Adapted from code written
+% by Donald E.~Knuth}}
+% \date{\nfssfontfiledate}
+%
+%
+% \def\dst{{\normalfont\scshape docstrip}}
+% \def\NFSS{\textsf{NFSS}}
+% \setcounter{StandardModuleDepth}{1}
+%
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+%
+% Within the \NFSS{} distribution there is a \LaTeX{} file
+% \texttt{nfssfont.tex} which can be used to test new fonts, produce
+% font tables showing all characters, etc. This is an addaption of a
+% program originally written by Don Knuth.
+
+% When you run this file through \LaTeX{} you will be asked to enter
+% the name of the font to test. Your answer should be the external
+% font name without any extension, e.g.\ \texttt{cmr10} (Computer
+% Modern Roman 10pt) or \texttt{yinit} (Yannis Haralambous' Initial
+% font).
+%
+% Alternatively (since version 2.1), you can press \meta{return} at
+% this point. In that case a dialog is started that asks you for the
+% font characteristics in \NFSS{} notation, i.e., first for the
+% encoding scheme (default \texttt{T1}), then for the family name
+% (default \texttt{cmr}), then for the series (default \texttt{m}),
+% then for the shape (default \texttt{n}), and finally for the size
+% (default \texttt{10pt}).
+%
+% You are then requested to enter a command. Probably the most
+% important one is |\table|, which will produce a font chart. To
+% switch to a new test font, type |\init|; to finish the test, type
+% |\bye|; and to learn about all the other possible tests type
+% |\help|.
+%
+% This is at
+% the moment only a crude addaption of the test program for the
+% Computer Modern fonts by Donald Knuth.
+%
+% \StopEventually{}
+%
+% \section{A driver for this document}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you are
+% currently reading. It will be extracted from this file by the
+% \dst{} program.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+ % \OnlyDescription % comment out for implementation details
+\begin{document}
+ \DocInput{nfssfont.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \section{The code}
+%
+% A testbed for font evaluation (see The METAFONTbook, Appendix H)
+% changed for \LaTeX{} with \NFSS.
+%
+% This program should get a complete rewrite some day or at least some
+% code documentation. Any volunteers?
+% \begin{macrocode}
+%<*code>
+\documentclass{article}
+\nofiles
+\setlength\textwidth{470pt}
+\setlength\oddsidemargin{0pt}
+\addtolength\textheight{7\baselineskip}
+\addtolength\topmargin{-3\baselineskip}
+
+\def\sevenrm{\fontencoding{OT1}\fontsize{7}{9pt}\rmfamily}
+
+\typeout{**********************************************}
+\typeout{* NFSS font test program version <\nfssfontfileversion>}
+\typeout{*}
+\typeout{* Follow the instructions}
+\typeout{**********************************************}
+\typeout{}
+
+\tracinglostchars=0
+\tolerance=1000
+\raggedbottom
+\parindent=0pt
+%\newlinechar=`@ %FMi
+\hyphenpenalty=200
+\doublehyphendemerits=30000
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcount\m \newcount\n \newcount\p \newdimen\dim
+\chardef\other=12
+
+\def\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}
+\def\hours{\n=\time \divide\n 60
+ \m=-\n \multiply\m 60 \advance\m \time
+ \twodigits\n\twodigits\m}
+\def\twodigits#1{\ifnum #1<10 0\fi \number#1}
+% \end{macrocode}
+%
+% We first ask for a real external font name\ldots
+% \begin{macrocode}
+\def\init{%
+ \typein[\currfontname]%
+ {Input external font name, e.g., cmr10^^J%
+ (or <enter> for NFSS classification of font):}%
+% \end{macrocode}
+% If the answer is a real font name (like ``cmr10'') then we have no idea
+% what the encoding of this font is, so in this case we record the word
+% ``unknown'' and internally assume |T1| encoding. Commands other than
+% |\table| are then most likely going to fail, unless that assumption was
+% correct.
+% \begin{macrocode}
+ \def\encoding{unknown}%
+ \fontencoding{T1}\selectfont
+% \end{macrocode}
+% If the user answers with ``return'' we ask for the \NFSS{}
+% classification of the font in form of encoding, family, series,
+% shape, and size offering a default each time.
+% \begin{macrocode}
+ \ifx\currfontname\empty
+ \typein[\encoding]{^^J^^J*** NFSS classification
+ ***^^J^^JFont encoding [T1]:}%
+ \ifx\encoding\empty
+ \fontencoding{T1}%
+ \def\encoding{T1}%
+ \else
+% \end{macrocode}
+% Depending on the chosen encoding we have the problem, that the encoding
+% support information may not be available (only for |T1| and |OT1| this is
+% preloaded in the kernel, all other encodings normally need a declaration in
+% the preamble). So here we attempt to load this support file even though
+% it is actually already too late for this.
+% \begin{macrocode}
+ \edef\next{%
+ \lowercase{\def\noexpand\next{\encoding enc.def}}}%
+ \next
+ \makeatletter
+ \InputIfFileExists\next
+ {}%
+% \end{macrocode}
+% If the encoding support file is not found this may indicate an error, eg
+% something misspelled. However, it may equally mean that we dealing
+% with a math font encoding for which no encoding support is
+% available.
+% \begin{macrocode}
+ {\PackageWarningNoLine{nfssfont}%
+ {Encoding file `\next' not found.%
+ \MessageBreak
+ You might have misspelt the name of the encoding
+ \MessageBreak
+ or perhaps this encoding is not a text encoding,
+ \MessageBreak
+ in which case you will probably only be able to
+ \MessageBreak
+ run the \noexpand\table command successfully}%
+% \end{macrocode}
+% But actually the situation is even worse, as some math
+% encodings do have such support files. So for them we need to make the encoding
+% known to NFSS in some other way, otherwise we could not even find the
+% external font name, let alone typesetting a |\table|.
+% \begin{macrocode}
+ \expandafter\let\csname T@\encoding\endcsname\empty
+ }%
+ \makeatother
+ \let\next\relax
+ \fontencoding\encoding
+ \fi
+ \typein[\family]{Font family [cmr]:}%
+ \relax
+ \ifx\family\empty
+ \fontfamily{cmr}%
+ \else
+ \fontfamily\family
+ \fi
+ \typein[\series]{Font series [m]:}%
+ \ifx\series\empty
+ \fontseries{m}%
+ \else
+ \fontseries\series
+ \fi
+ \typein[\shape]{Font shape [n]:}%
+ \ifx\shape\empty
+ \fontshape{n}%
+ \else
+ \fontshape\shape
+ \fi
+ \typein[\size]{Font size [10pt]:}%
+ \ifx\size\empty
+ \fontsize{10}{10}%
+ \else
+ \fontsize\size\size
+ \fi
+% \end{macrocode}
+% Then select the font and assign it to |\currfontname|.
+% \begin{macrocode}
+ \selectfont\edef\currfontname{\fontname\font}%
+ \fi
+ \startfont
+% \end{macrocode}
+% Finally we ask for some ``action'' and offer |\table\bye| as
+% default---basically I got tired of having to type that in each
+% time.
+% If some other action is given you end with a |*| prompt and have
+% to finish the run with |\bye| yourself eventually.
+% \begin{macrocode}
+ \typein[\action]{Now type a test command or
+ \string\help\space for help [ \string\table\space\string\bye\space]:}%
+ \ifx\action\empty
+ \expandafter\table\expandafter\bye
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\startfont{\font\testfont=\currfontname
+ \leftline{\sevenrm Test of font \currfontname\unskip\ (encoding
+ \encoding\unskip) on \today\ at \hours}
+ \medskip
+ \testfont \setbaselineskip
+ \ifdim\fontdimen6\testfont<10pt \rightskip=0pt plus 20pt
+ \else\rightskip=0pt plus 2em \fi
+ \spaceskip=\fontdimen2\testfont % space between words (\raggedright)
+ \xspaceskip=\fontdimen2\testfont \advance\xspaceskip
+ by\fontdimen7\testfont}
+% \end{macrocode}
+%
+% \begin{macrocode}
+{\catcode`\|=0 \catcode`\\=\other
+|gdef|help{|message{%
+\init switches to another font;^^J%
+\stop or \bye finishes the run;^^J%
+\table prints the font layout in tabular format;^^J%
+\text prints a sample text, assuming TeX text font conventions;^^J%
+\sample combines \table and \text;^^J%
+\mixture mixes a background character with a series of others;^^J%
+\alternation interleaves a background character with a series;^^J%
+\alphabet prints all lowercase letters within a given background;^^J%
+\ALPHABET prints all uppercase letters within a given background;^^J%
+\series prints a series of letters within a given background;^^J%
+\lowers prints a comprehensive test of lowercase;^^J%
+\uppers prints a comprehensive test of uppercase;^^J%
+\digits prints a comprehensive test of numerals;^^J%
+\math prints a comprehensive test of TeX math italic;^^J%
+\names prints a text that mixes upper and lower case;^^J%
+\punct prints a punctuation test;^^J%
+\bigtest combines many of the above routines;^^J%
+\help repeats this message;^^J%
+and you can use ordinary TeX commands (e.g., to \input a file).}}}
+
+\def\setbaselineskip{\setbox0=\hbox{\n=0
+\loop\char\n \ifnum \n<255 \advance\n 1 \repeat}
+\baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\setchar#1{{\escapechar-1\message{\string#1 character = }%
+ \def\do##1{\catcode`##1=\other}\dospecials
+ \read-1 to\next
+ \expandafter\finsetchar\next\next#1}}
+\def\finsetchar#1#2\next#3{\global\chardef#3=`#1
+ \ifnum #3=`\# \global\chardef#3=#2 \fi}
+\def\promptthree{\setchar\background
+ \setchar\starting \setchar\ending}
+
+\def\mixture{\promptthree \domix\mixpattern}
+\def\alternation{\promptthree \domix\altpattern}
+\def\mixpattern{\0\1\0\0\1\1\0\0\0\1\1\1\0\1}
+\def\altpattern{\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0}
+\def\domix#1{\par\chardef\0=\background \n=\starting
+ \loop \chardef\1=\n #1\endgraf
+ \ifnum \n<\ending \advance\n 1 \repeat}
+
+\def\!{\discretionary{\background}{\background}{\background}}
+\def\series{\promptthree \!\doseries\starting\ending\par}
+\def\doseries#1#2{\n=#1\loop\char\n\!\ifnum\n<#2\advance\n 1 \repeat}
+\def\complower{\!\doseries{`a}{`z}\doseries{'31}{'34}\par}
+\def\compupper{\!\doseries{`A}{`Z}\doseries{'35}{'37}\par}
+\def\compdigs{\!\doseries{`0}{`9}\par}
+\def\alphabet{\setchar\background\complower}
+\def\ALPHABET{\setchar\background\compupper}
+
+\def\lowers{\docomprehensive\complower{`a}{`z}{'31}{'34}}
+\def\uppers{\docomprehensive\compupper{`A}{`Z}{'35}{'37}}
+\def\digits{\docomprehensive\compdigs{`0}{`4}{`5}{`9}}
+\def\docomprehensive#1#2#3#4#5{\par\chardef\background=#2
+ \loop{#1} \ifnum\background<#3\m=\background\advance\m 1
+ \chardef\background=\m \repeat \chardef\background=#4
+ \loop{#1} \ifnum\background<#5\m=\background\advance\m 1
+ \chardef\background=\m \repeat}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\names{ {\AA}ngel\aa\ Beatrice Claire
+ Diana \'Erica Fran\c{c}oise Ginette H\'el\`ene Iris
+ Jackie K\=aren {\L}au\.ra Mar{\'\i}a N\H{a}ta{\l}{\u\i}e {\O}ctave
+ Pauline Qu\^eneau Roxanne Sabine T\~a{\'\j}a Ur\v{s}ula
+ Vivian Wendy Xanthippe Yv{\o}nne Z\"azilie\par}
+\def\punct{\par\dopunct{min}\dopunct{pig}\dopunct{hid}
+ \dopunct{HIE}\dopunct{TIP}\dopunct{fluff}
+ \$1,234.56 + 7/8 = 9\% @ \#0\par}
+\def\dopunct#1{#1,\ #1:\ #1;\ `#1'\ ?`#1?\ !`#1!\ (#1)\ [#1]\
+ #1*\ #1.\par}
+
+\def\bigtest{\sample
+ hamburgefonstiv HAMBURGEFONSTIV\par
+ \names \punct \lowers \uppers \digits}
+
+\def\math{\textfont1=\testfont \skewchar\testfont=\skewtrial
+ \mathchardef\Gamma="100 \mathchardef\Delta="101
+ \mathchardef\Theta="102 \mathchardef\Lambda="103 \mathchardef\Xi="104
+ \mathchardef\Pi="105 \mathchardef\Sigma="106 \mathchardef\Upsilon="107
+ \mathchardef\Phi="108 \mathchardef\Psi="109 \mathchardef\Omega="10A
+ \def\ii{i} \def\jj{j}
+ \def\\##1{|##1|+}\mathtrial
+ \def\\##1{##1_2+}\mathtrial
+ \def\\##1{##1^2+}\mathtrial
+ \def\\##1{##1/2+}\mathtrial
+ \def\\##1{2/##1+}\mathtrial
+ \def\\##1{##1,{}+}\mathtrial
+ \def\\##1{d##1+}\mathtrial
+ \let\ii=\imath \let\jj=\jmath \def\\##1{\hat##1+}\mathtrial}
+\newcount\skewtrial \skewtrial='177
+\def\mathtrial{$\\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 \\a \\b \\c \\d \\e \\f
+ \\g \\h \\\ii \\\jj \\k \\l \\m \\n \\o \\p \\q \\r \\s \\t \\u \\v \\w
+ \\x \\y \\z \\\alpha \\\beta \\\gamma \\\delta \\\epsilon \\\zeta
+ \\\eta \\\theta \\\iota \\\kappa \\\lambda \\\mu \\\nu \\\xi \\\pi
+ \\\rho \\\sigma \\\tau \\\upsilon \\\phi \\\chi \\\psi \\\omega
+ \\\vartheta \\\varpi \\\varphi \\\Gamma \\\Delta \\\Theta \\\Lambda
+ \\\Xi \\\Pi \\\Sigma \\\Upsilon \\\Phi \\\Psi \\\Omega \\\partial
+ \\\ell \\\wp$\par}
+\def\mathsy{\begingroup\skewtrial='060 % for math symbol font tests
+ \def\mathtrial{$\\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$\par}
+ \math\endgroup}
+% \end{macrocode}
+% Here we have to ensure that we use a suitable encoding otherwise our
+% octal and hexadecimal constants will appear in whatever encoding the
+% current font is.
+% \begin{macrocode}
+\def\oct#1{\hbox{\fontencoding{OT1}\rmfamily\'{}\kern-.2em\itshape
+ #1\/\kern.05em}}% octal constant
+\def\hex#1{\hbox{\fontencoding{OT1}\rmfamily
+ \H{}\ttfamily#1}}% hexadecimal constant
+\def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
+ \m=\n \divide\m by 64 \xdef\0{\the\m}%
+ \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
+\def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
+ \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
+ \global\p=\lastpenalty}} % \p=1 if none of the characters exist
+\def\oddline{\cr
+ \noalign{\nointerlineskip}
+ \multispan{19}\hrulefill&
+ \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
+ \noalign{\nointerlineskip}}
+\newif\ifskipping
+\def\evenline{\loop\skippingfalse
+ \ifnum\n<256 \m=\n \divide\m 16 \chardef\next=\m
+ \expandafter\setdigs\meaning\next \testrow
+ \ifnum\p=1 \skippingtrue \fi\fi
+ \ifskipping \global\advance\n 16 \repeat
+ \ifnum\n=256 \let\next=\endchart\else\let\next=\morechart\fi
+ \next}
+\def\morechart{\cr\noalign{\hrule\penalty5000}
+ \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
+ \chartline \evenline}
+\def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
+\def\chartstrut{\lower4.5pt\vbox to14pt{}}
+\def\table{$$\global\n=0
+ \halign to\hsize\bgroup
+ \chartstrut##\tabskip0pt plus10pt&
+ &\hfil##\hfil&\vrule##\cr
+ \lower6.5pt\null
+ &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
+\def\endchart{\cr\noalign{\hrule}
+ \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
+ &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par}
+\def\:{\setbox0=\hbox{\noboundary\char\n\noboundary}%
+ \ifdim\ht0>7.5pt\reposition
+ \else\ifdim\dp0>2.5pt\reposition\fi\fi
+ \box0\global\advance\n 1 }
+\def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
+ \advance\dim 2pt \dp0=\dim}
+\def\centerlargechars{
+ \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\text{{\advance\baselineskip-4pt
+\setbox0=\hbox{abcdefghijklmnopqrstuvwxyz}
+\ifdim\hsize>2\wd0
+ \ifdim 15pc>2\wd0 \hsize=15pc \else \hsize=2\wd0 \fi
+\fi
+On November 14, 1885, Senator \& Mrs.~Leland Stanford called together
+at their San Francisco mansion the 24~prominent men who had been
+chosen as the first trustees of The Leland Stanford Junior University.
+They handed to the board the Founding Grant of the University, which
+they had executed three days before. This document---with various
+amendments, legislative acts, and court decrees---remains as the
+University's charter. In bold, sweeping language it stipulates that
+the objectives of the University are ``to qualify students for
+personal success and direct usefulness in life; and to promote the
+publick welfare by exercising an influence in behalf of humanity and
+civilization, teaching the blessings of liberty regulated by law, and
+inculcating love and reverence for the great principles of government
+as derived from the inalienable rights of man to life, liberty, and
+the pursuit of happiness.'' \moretext
+(!`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS!)\par}}
+\def\moretext{?`But aren't Kafka's Schlo\ss{} and \AE sop's
+\OE uvres often na\"\i ve vis-\`a-vis the d\ae monic ph\oe nix's
+official r\^ole in fluffy souffl\'es? }
+\def\omitaccents{\let\moretext=\relax}
+
+\def\sample{\table\text}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\bye{\end{document}}
+% \end{macrocode}
+%
+% The redefinition of |\typeout| around the |\begin{document}|
+% prevents \LaTeX{} from reporting that there is no |.aux| file.
+% This is a bad hack, I agree :-)
+% \begin{macrocode}
+\let\oldtypeout\typeout
+\def\typeout#1{}
+% \end{macrocode}
+% And another bad hack: to be able to load an encoding definition file
+% after |\begin{document}| I disable the preamble only setting.
+% \begin{macrocode}
+\makeatletter
+\let\@preamblecmds\@empty
+\makeatother
+
+\begin{document}
+\let\typeout\oldtypeout
+
+\ifx\noinit!\else\expandafter\init\fi
+%</code>
+% \end{macrocode}
+%
+%
+% \DeleteShortVerb{\|}
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/nfssfont.ins b/macros/latex-dev/base/nfssfont.ins
new file mode 100644
index 0000000000..222551ea30
--- /dev/null
+++ b/macros/latex-dev/base/nfssfont.ins
@@ -0,0 +1,87 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{nfssfont.tex}{t}{%
+ \from{nfssfont.dtx}{code}}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/nfssfont.pdf b/macros/latex-dev/base/nfssfont.pdf
new file mode 100644
index 0000000000..f05b4735a2
--- /dev/null
+++ b/macros/latex-dev/base/nfssfont.pdf
Binary files differ
diff --git a/macros/latex-dev/base/olddc.ins b/macros/latex-dev/base/olddc.ins
new file mode 100644
index 0000000000..694cc6df6f
--- /dev/null
+++ b/macros/latex-dev/base/olddc.ins
@@ -0,0 +1,124 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\Msg{*** Generating font defs for Cork encoded fonts ***}
+
+\generate{
+ \file{t1cmfib.fd}{
+ \from{cmfonts.fdd}{fd,T1cmfib,old}}
+ \file{t1cmfr.fd}{
+ \from{cmfonts.fdd}{fd,T1cmfr,old}}
+ \file{t1cmdh.fd}{
+ \from{cmfonts.fdd}{fd,T1cmdh,old}}
+ \file{t1cmr.fd}{
+ \from{cmfonts.fdd}{fd,T1cmr,old}}
+ \file{t1cmss.fd}{
+ \from{cmfonts.fdd}{fd,T1cmss,old}}
+ \file{t1cmtt.fd}{
+ \from{cmfonts.fdd}{fd,T1cmtt,old}}
+ \file{t1cmvtt.fd}{
+ \from{cmfonts.fdd}{fd,T1cmvtt,old}}
+}
+
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.fdd' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/oldlfont.dtx b/macros/latex-dev/base/oldlfont.dtx
new file mode 100644
index 0000000000..3c768e1e8f
--- /dev/null
+++ b/macros/latex-dev/base/oldlfont.dtx
@@ -0,0 +1,252 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%\iffalse % this is a METACOMMENT !
+%
+%% File `oldlfont.dtx'.
+%% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf,
+%% all rights reserved.
+%
+%<*dtx>
+ \ProvidesFile{oldlfont.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{oldlfont}
+%<driver> \ProvidesFile{oldlfont.drv}
+%<*!latex209>
+% \fi
+% \ProvidesFile{oldlfont.dtx}
+ [2014/09/29 v2.2k Standard LaTeX package]
+%
+% \iffalse
+%</!latex209>
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+\DocInput{oldlfont.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+%
+%
+% \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+%
+% \GetFileInfo{oldlfont.dtx}
+%
+% \title{The file \texttt{oldlfont.dtx} for use with
+% \LaTeXe.\thanks{This file has version
+% number \fileversion, dated \filedate.}\\[2pt]
+% It contains the code for \texttt{oldlfont.sty}}
+%
+% \author{Frank Mittelbach}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Introduction}
+%
+% This file contains the code for the \texttt{oldlfont} package
+% which emulates the following \LaTeX~2.09 font commands:
+% \begin{itemize}
+% \item The two-letter font-changing commands |\rm|, etc.~are
+% defined to cancel each other out as they did in \LaTeX~2.09.
+% \item The two-letter font-changing commands are allowed in math
+% mode.
+% \item The |latexsym| package is loaded.
+% \end{itemize}
+% For full compatibility mode, the file |latex209.def| is loaded by
+% |\documentstyle|.
+%
+% The following modules are used in the implementation to direct
+% \dst{} in generating the external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% package & produce |oldlfont.sty| \\
+% latex209 & produce part of |latex209.def|
+% \end{tabular}
+% \end{center}
+%
+% \StopEventually{}
+%
+% \changes{v2.2k}{1995/11/29}{Remove duplicate driver code.}
+%
+% \section{The Code}
+%
+%
+% \begin{macro}{\math@bgroup}
+% \begin{macro}{\math@egroup}
+% To make \meta{math alphabet identifier} work like simple font
+% switches we change the meaning of |\math@bgroup| and
+% |\math@egroup| to |\@empty|. This emulates the behavior of
+% \texttt{oldlfont.sty} in NFSS1 setups. These definitions are not
+% part of \texttt{latex209} automatically, since to emulate 2.09
+% they are not necessary (all standard fonts are declared as math
+% symbol fonts).
+% \changes{v2.2f}{1994/05/05}{Added saved versions of the
+% math-groupers, CAR}
+% \changes{v2.2g}{1994/05/09}{Moved outside latex209 part}
+% \begin{macrocode}
+\let\math@bgroup\@empty
+\let\math@egroup\@empty
+\let \@@math@bgroup \math@bgroup
+\let \@@math@egroup \math@egroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% The rest of this document describes code that is used in
+% |oldlfont.sty| and |latex209.def|.
+% \begin{macrocode}
+%<*package|latex209>
+% \end{macrocode}
+%
+% When emulating the old settings we don't want a lot of NFSS
+% information being displayed. Thus we required that the
+% \texttt{tracefnt} package is loaded with the option
+% \texttt{errorshow}.
+% \begin{macrocode}
+\RequirePackage[errorshow]{tracefnt}
+% \end{macrocode}
+%
+% We define math \emph{alphabet} identifiers for the typefaces
+% described in the \LaTeX{} manual. This is straightforward. Some
+% are already defined by the kernel code.
+% And here are the other ones defined by the old \LaTeX{}. They all
+% get declared as math symbol font alphabets. Thus we first
+% allocate the additional symbol fonts.
+% \begin{macrocode}
+\DeclareSymbolFont{bold}{OT1}{cmr}{bx}{n}
+\DeclareSymbolFont{sans}{OT1}{cmss}{m}{n}
+\DeclareSymbolFont{typewriter}{OT1}{cmtt}{m}{n}
+\DeclareSymbolFont{italic}{OT1}{cmr}{m}{it}
+\DeclareSymbolFont{smallcaps}{OT1}{cmr}{m}{sc}
+\DeclareSymbolFont{slanted}{OT1}{cmr}{m}{sl}
+% \end{macrocode}
+% And here are the corresponding math identifiers.
+% \begin{macrocode}
+\DeclareSymbolFontAlphabet\mathbf{bold}
+\DeclareSymbolFontAlphabet\mathsf{sans}
+\DeclareSymbolFontAlphabet\mathtt{typewriter}
+\DeclareSymbolFontAlphabet\mathsc{smallcaps}
+\DeclareSymbolFontAlphabet\mathsl{slanted}
+% \end{macrocode}
+% We undefine the old |\mit| and |\cal| macros (whatever meaning
+% they have) and reallocate them as symbol font alphabets.
+% \begin{macrocode}
+\let\mit\undefined
+\let\cal\undefined
+\let\mathit\undefined
+\DeclareSymbolFontAlphabet\mathit{italic}
+\DeclareSymbolFontAlphabet{\mit}{letters}
+\DeclareSymbolFontAlphabet{\cal}{symbols}
+% \end{macrocode}
+%
+% We define the font commands for selecting the typeface. They are
+% probably defined by the document class/style but we want to force
+% the old meaning.
+%
+% And here are the definition as they were in \LaTeX~2.09 but
+% translated into NFSS2 language.
+% \changes{v2.2h}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
+% \changes{v2.2i}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
+% \begin{macrocode}
+\DeclareRobustCommand\rm{\normalfont\rmfamily\mathgroup\symoperators}
+\DeclareRobustCommand\sf{\normalfont\sffamily\mathgroup\symsans}
+\DeclareRobustCommand\sl{\normalfont\slshape\mathgroup\symslanted}
+\DeclareRobustCommand\bf{\normalfont\bfseries\mathgroup\symbold}
+\DeclareRobustCommand\sc{\normalfont\scshape\mathgroup\symsmallcaps}
+\DeclareRobustCommand\it{\normalfont\itshape\mathgroup\symitalic}
+\DeclareRobustCommand\tt{\normalfont\ttfamily\mathgroup\symtypewriter}
+% \end{macrocode}
+% We also have to define the \emph{emphasize} font change command
+% (i.e.\ |\em|). This command will look whether the current font is
+% sloped (i.e.\ has a positive |\fontdimen1|) and will then select
+% either |\rm| or |\it|.
+% \begin{macrocode}
+\DeclareRobustCommand\em{%
+ \@nomath\em
+ \ifdim \fontdimen\@ne\font>\z@\rm\else\it\fi}
+% \end{macrocode}
+%
+% \begin{macro}{\@setfontsize}
+% Font size changes are handled using the |\@setfontsize| command
+% (in new class files) or by the |@setsize| command in old document
+% style files. The latter is now defined to call |\@setfontsize| in
+% the NFSS2 kernel code.
+% Thus to make all size changing commands automatically return to
+% the normal font of the document we only have to slightly modify
+% the definition of |\@setfontsize| by adding a |\normalfont|
+% command to it.
+% \changes{v2.2j}{1994/11/06}{Use \cs{@typeset@protect}}
+% \begin{macrocode}
+\def\@setfontsize#1#2#3{\@nomath#1%
+ \ifx\protect\@typeset@protect
+ \let\@currsize#1%
+ \fi
+ \fontsize{#2}{#3}\normalfont}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\non@alpherr}
+% Since we emulate the old syntax we also have to silently ignore
+% uses of a math alphabet outside math mode. Since we now use the
+% |\sym...| switches the following setting is not longer necessary.
+% \begin{macrocode}
+%\let\non@alpherr\@gobble
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\not@math@alphabet}
+% But we need to disable the error message that is generated from
+% |\bfseries| etc.
+% \begin{macrocode}
+\let\not@math@alphabet\@gobbletwo
+% \end{macrocode}
+% \end{macro}
+%
+%
+% We left out the special \LaTeX{} fonts which are not automatically
+% included in the base version of the font selection since these
+% fonts contain only a few characters which are also included in
+% the AMS fonts so anybody who is using these fonts doesn't need
+% them. But for compatibility reasons we will define these symbols.
+%
+% \begin{macrocode}
+\RequirePackage{latexsym}
+%</package|latex209>
+% \end{macrocode}
+%
+% \DeleteShortVerb{\|}
+% \Finale
+\endinput
diff --git a/macros/latex-dev/base/preload.dtx b/macros/latex-dev/base/preload.dtx
new file mode 100644
index 0000000000..0bc9fb4415
--- /dev/null
+++ b/macros/latex-dev/base/preload.dtx
@@ -0,0 +1,269 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%%% From File: preload.dtx
+%<*dtx>
+ \ProvidesFile{preload.dtx}
+%</dtx>
+%<*preload>
+%<*!tex>
+%<+cm> \ProvidesFile{cmpreloa.%
+%<+dc> \ProvidesFile{dcpreloa.%
+%<+xpt> xpt}
+%<+xipt> xip}
+%<+xiipt> xii}
+%<+min> \ProvidesFile{preload.min}
+%<+ori> \ProvidesFile{preload.ori}
+%</!tex>
+%<+tex> \ProvidesFile{preload.ltx}
+% \fi
+% \ProvidesFile{preload.dtx}
+ [2014/09/29 v2.1g LaTeX Kernel (Font Preloading)]
+%
+%
+%
+%\iffalse This is a META comment
+%
+% File `preload.dtx'.
+% Copyright (C) 1989-1994 Frank Mittelbach and Rainer Sch\"opf,
+% all rights reserved.
+%
+% \fi
+%
+% \GetFileInfo{preload.dtx}
+% \title{The \texttt{preload.dtx} file\thanks {This file has version
+% number \fileversion, dated \filedate}\\ for use with \LaTeXe}
+% \date{\filedate}
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+% \changes{v2.0b}{1993/03/08}{Added 12pt preloads}
+% \changes{v2.1e}{1994/11/07}{(DPC) Updated to use \cs{ProvidesFile}}
+% \changes{v2.1g}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+% \def\dst{\expandafter{\normalfont\scshape docstrip}}
+%
+% \setcounter{StandardModuleDepth}{1}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Overview}
+%
+% This file contains an number of possible settings for preloading
+% fonts during installation of NFSS2 (which is used by \LaTeXe). It
+% will be used to generate the following files:
+% \begin{center}
+% \begin{tabular}{ll}
+% preload.min & minimal subset of fonts necessary to run NFSS2 \\
+% preload.ori & preload of CM fonts similar to the old
+% \texttt{lfonts.tex} \\
+% preload.ltx & The standard selection of preloads \\
+% cmpreloa.xpt & preload of CM fonts for 10pt document size\\
+% cmpreloa.xip & preload of CM fonts for 11pt document size\\
+% cmpreloa.xii & preload of CM fonts for 12pt document size\\
+% dcpreloa.xpt & preload of DC fonts for 10pt size \\
+% dcpreloa.xip & preload of DC fonts for 11pt size \\
+% dcpreloa.xii & preload of DC fonts for 12pt size \\
+% \end{tabular}
+% \end{center}
+%
+% These files are for installations that make use of Computer
+% Modern fonts either old encoding (OT1) or Cork encoding (T1). The
+% Computer Modern fonts with Cork encoding are known as DC-fonts.
+%
+% Most important is \texttt{preload.ltx} which is used during
+% format generation. You are \emph{not} allowed to change this file.
+%
+% \section{Customization}
+%
+% You can customize the preloaded fonts in your \LaTeXe{} system by
+% installing a file with the name \texttt{preload.cfg}. If this
+% file exists it will be used in place of the system file
+% \texttt{preload.ltx}. You can, for example, copy one of the
+% files mentioned above (that can be generated from this source) to
+% \texttt{preload.cfg}.
+%
+% Or you can define completely other preloads. In that case start
+% from \texttt{preload.min} since that contains the fonts that have
+% to be preloaded by *all* \LaTeXe{} systems.
+%
+% Avoid using \texttt{preload.ori}, it will load so many fonts that
+% on most installations it is nearly impossible to load other font
+% families afterwards. This file is only generated to show what
+% fonts have been preloaded by \LaTeX~2.09.
+%
+% If you normally use other fonts than Computer Modern
+% \texttt{preload.min} might be best.
+%
+% \begin{quote} \textbf{Warning:} If you preload fonts with
+% encodings other than the normally supported encodings you have to
+% declare that encoding in a \texttt{fontdef.cfg} configuration
+% file (see the documentation in the file \texttt{fontdef.dtx}).
+% Adding an extra encoding to the format might produce non-portable
+% documents, thus this should be avoided if possible.
+% \end{quote}
+%
+%
+% \StopEventually{}
+%
+% \section{Module switches for the \dst{} program}
+%
+% The \dst{} will generate the above file from this source using the
+% following module directives:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% preload& produce a preload\ldots file \\[2pt]
+% cm & for OT1 encoded Computer Modern \\
+% dc & for T1 encoded Computer Modern \\[2pt]
+% min & produce minimal subset \\
+% xpt & produce 10pt preloads \\
+% xipt & produce 11pt preloads \\
+% xiipt & produce 12pt preloads \\
+% ori & produce preloads similar to old \texttt{lfonts.tex}\\
+% tex & produce preload.ltx\\
+% \end{tabular}
+% \end{center}
+% A typical \dst{} command file would then have entries like:
+% \begin{verbatim}
+%\generateFile{preload.min}{t}{\from{preload.dtx}{preload,min}}
+%\end{verbatim}
+% for generating preload files.
+%
+% \section{A driver for this document}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you
+% are currently reading. It will be extracted from this file by the
+% \dst{} program.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+%\OnlyDescription % comment out for implementation details
+\begin{document}
+ \DocInput{preload.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+%
+% \section{The code}
+%
+% We begin by loading the math extension font (cmex10)
+% and the \LaTeX{} line and circle fonts.
+% It is necessary to do this explicitly since these are
+% used by \texttt{lplain.tex} and \texttt{latex.tex}.
+% Since the internal font name contains |/| characters
+% and digits we construct the name via |\csname|.
+% These are the only fonts (!) that must be loaded in this file.
+%
+% All |\DeclarePreloadSizes| can be removed or others can be added,
+% they only influence the processing speed.
+% \changes{v2.0c}{1993/08/13}{Added \cs{relax} at end of font names.}
+% \begin{macrocode}
+\expandafter\font\csname OMX/cmex/m/n/10\endcsname=cmex10\relax
+\font\tenln =line10 \font\tenlnw =linew10\relax
+\font\tencirc=lcircle10 \font\tencircw=lcirclew10\relax
+% \end{macrocode}
+% The above fonts should not be touched but anything below this
+% point here in the preload suggestions can be modified without any
+% problems.
+% \begin{macrocode}
+%<-tex>%*******************************************
+%<-tex>% Start any modification below this point **
+%<-tex>%*******************************************
+%<-tex>
+%%
+%% Computer Modern Roman:
+%%-----------------------
+%<*ori>
+\DeclarePreloadSizes{OT1}{cmr}{m}{n}
+ {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88}
+\DeclarePreloadSizes{OT1}{cmr}{bx}{n}{9,10,10.95,12,14.4,17.28}
+\DeclarePreloadSizes{OT1}{cmr}{m}{sl}{10,10.95,12}
+\DeclarePreloadSizes{OT1}{cmr}{m}{it}{7,8,9,10,10.95,12}
+%</ori>
+%<+xpt&cm> \DeclarePreloadSizes{OT1}{cmr}{m}{n}{5,7,10}
+%<+xpt&dc> \DeclarePreloadSizes{T1}{cmr}{m}{n}{5,7,10}
+%<+xipt&cm> \DeclarePreloadSizes{OT1}{cmr}{m}{n}{6,8,10.95}
+%<+xipt&dc> \DeclarePreloadSizes{T1}{cmr}{m}{n}{6,8,10.95}
+%<+xiipt&cm> \DeclarePreloadSizes{OT1}{cmr}{m}{n}{6,8,12}
+%<+xiipt&dc> \DeclarePreloadSizes{T1}{cmr}{m}{n}{6,8,12}
+%%
+%% Computer Modern Sans:
+%%----------------------
+%<+ori> \DeclarePreloadSizes{OT1}{cmss}{m}{n}{10,10.95,12}
+%%
+%% Computer Modern Typewriter:
+%%----------------------------
+%<+ori> \DeclarePreloadSizes{OT1}{cmtt}{m}{n}{9,10,10.95,12}
+%%
+%% Computer Modern Math:
+%%----------------------
+%<*ori>
+\DeclarePreloadSizes{OML}{cmm}{m}{it}
+ {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74}
+\DeclarePreloadSizes{OMS}{cmsy}{m}{n}
+ {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74}
+%</ori>
+% \end{macrocode}
+%
+% The math fonts are the same for both DC and CM fonts. So far
+% there isn't an agreed on standard.
+% \changes{v2.4e}{1995/12/04}
+% {Ulrik Vieth. added 12pt OMS and OML preloads /1989}
+% \begin{macrocode}
+%<*xpt>
+\DeclarePreloadSizes{OML}{cmm}{m}{it}{5,7,10}
+\DeclarePreloadSizes{OMS}{cmsy}{m}{n}{5,7,10}
+%</xpt>
+%<*xipt>
+\DeclarePreloadSizes{OML}{cmm}{m}{it}{6,8,10.95}
+\DeclarePreloadSizes{OMS}{cmsy}{m}{n}{6,8,10.95}
+%</xipt>
+%<*xiipt>
+\DeclarePreloadSizes{OML}{cmm}{m}{it}{6,8,12}
+\DeclarePreloadSizes{OMS}{cmsy}{m}{n}{6,8,12}
+%</xiipt>
+%%
+%% LaTeX symbol fonts:
+%%--------------------
+%<*ori>
+\DeclarePreloadSizes{U}{lasy}{m}{n}
+ {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74}
+%</ori>
+%</preload>
+% \end{macrocode}
+%
+%
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/proc.dtx b/macros/latex-dev/base/proc.dtx
new file mode 100644
index 0000000000..724b939fd2
--- /dev/null
+++ b/macros/latex-dev/base/proc.dtx
@@ -0,0 +1,441 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+% Copyright (C) 1991,1992 by Leslie Lamport \and
+% Copyright (C) 1994,1995 by the \LaTeX3 project \and Johannes Braams
+%
+% \changes{v1.1}{1994/01/25}{Made `proc' a document class and provide
+% a .sty file for compatibility mode}
+% \changes{v1.2}{1994/01/26}{Removed the setting of a number of
+% variables that became superfluous by passing the twocolumn option
+% to the article class}
+% \changes{v1.3}{1994/03/01}{Moved driver further up; added overview
+% of docstrip modules; added \cs{CheckSum}, \cs{StopEventually} and
+% \cs{Finale}}
+% \changes{v1.3e}{1994/05/22}{Use new warning and error commands}
+% \changes{v1.3f}{1994/05/26}{Inserted missing 'v's in \cs{changes}
+% entries}
+% \changes{v1.3f}{1994/05/26}{Moved identification and driver to the
+% front of the file; these sections now no longer print}
+%
+% \subsection{Identification}
+%
+% This document class can only be used with \LaTeXe, so it is made
+% sure that an appropriate message is displayed when another \TeX{}
+% format is used.
+% \changes{v1.3l}{1995/11/30}{Added date of \LaTeX\ format to argument
+% of \cs{NeedsTeXFormat}}
+% \begin{macrocode}
+%<+class|style>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+% \end{macrocode}
+%
+% Announce the document class and its version.
+% \changes{v1.3c}{1994/04/15}{Added missing / guard}
+% \changes{v1.3d}{1994/05/01}{Removed the use of variables such as
+% \cs{fileversion}}
+% \changes{v1.3b}{1994/03/16}{Removed use of \cs{wlog}, no longer
+% needed}
+% \changes{v1.3f}{1994/05/26}{Removed \cs{typeout} from .sty file;
+% changed description}
+% \changes{v1.3h}{1994/05/26}{The second argument to \cs{ProvidesFile}
+% wasn't closed in the driver and the style file}
+%
+% \begin{macrocode}
+%<*driver>
+\ProvidesFile{proc.drv}
+%</driver>
+%<+class>\ProvidesClass{proc}
+%<+style>\ProvidesFile{proc.sty}
+ [2014/09/29 v1.3l
+%<+class> Standard LaTeX document class]
+%<+style> LaTeX 2.09 compatibility style option `proc']
+% \end{macrocode}
+%
+% \subsection{The documentation driver file}
+%
+% This bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you
+% are currently reading. It can be extracted from this file by the
+% {\sc docstrip} program.
+% \begin{macrocode}
+%<*driver>
+]
+\documentclass{ltxdoc}
+\GetFileInfo{proc.drv}
+\begin{document}
+\newcommand\Lopt[1]{\textsf {#1}}
+\DocInput{proc.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+% \fi
+%
+% \title{Producing proceedings articles with \LaTeXe\thanks
+% {File version \fileversion, dated \filedate}}
+%
+% \author{%
+% Johannes Braams\and
+% David Carlisle\and
+% Alan Jeffrey\and
+% Leslie Lamport\and
+% Frank Mittelbach\and
+% Chris Rowley\and
+% Rainer Sch\"opf}
+%
+% \date{\filedate}
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% \section{Description}
+%
+% This \LaTeXe\ document class is designed to produce camera-ready
+% conference proceedings. It is based upon the document class
+% \texttt{article}, but modifies some of its layout decisions.
+% It also adds one command.
+%
+% For compatibility with \LaTeX2.09 a \texttt{.sty} version is
+% provided because \texttt{proc} used to be a style file. The
+% \texttt{.sty} file can \emph{not} be used as a package however.
+%
+% \DescribeMacro\copyrightspace
+% The |\copyrightspace| command is used to produce a blank space in
+% the first column where a copyright notice belongs. Note that it
+% should appear after any |\footnote| commands that produce
+% footnotes for the first column.
+%
+% \StopEventually{}
+%
+% \section{The {\sc docstrip} modules}
+%
+% The following modules are used in the implementation to direct
+% {\sc docstrip} in generating the external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% class & produce the proc document class\\
+% sty & produce proc.sty for compatibility mode\\
+% driver & produce a documentation driver file \\
+% \end{tabular}
+% \end{center}
+%
+% \section{Implementation}
+%
+% In this case a check is needed to see wether \LaTeXe\ runs in
+% compatibility mode.
+% \changes{v1.3i}{1994/05/27}{Added missing docstrip guard}
+% \begin{macrocode}
+%<*style>
+\if@compatibility
+% \end{macrocode}
+% In this case processing silently continues, but in the |\else|
+% case a warning is issued and reading of this file stops.
+% \begin{macrocode}
+\else
+ \ClassWarningNoLine{proc}{^^J\@spaces%
+ You requested the use of `proc' as a package^^J\@spaces%
+ but it has been turned into a document class.^^J\@spaces%
+ Please change your file to use `proc' as a class.^^J}
+ \expandafter\endinput
+\fi
+%</style>
+% \end{macrocode}
+%
+% Paper sizes smaller than A4 are not supported.
+% \begin{macrocode}
+%<*class>
+\DeclareOption{a5paper}
+ {\ClassError{proc}{Option `a5paper' not supported}{}}
+\DeclareOption{b5paper}
+ {\ClassError{proc}{Option `b5paper' not supported}{}}
+% \end{macrocode}
+%
+% Also the \Lopt{onecolumn} option is disabled in this document
+% class.
+% \begin{macrocode}
+\DeclareOption{onecolumn}%
+ {\ClassError{proc}{Option `onecolumn' not supported}{}}
+% \end{macrocode}
+%
+% Proceedings articles never have separate titlepages, therefore
+% this option is disabled.
+% \begin{macrocode}
+\DeclareOption{titlepage}%
+ {\ClassError{proc}{Option `titlepage' not supported}{}}
+% \end{macrocode}
+%
+% Always print in two column mode.
+% \begin{macrocode}
+\PassOptionsToClass{twocolumn}{article}
+% \end{macrocode}
+%
+% Any other options are passed on to the article class on which
+% this document class is based.
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+% \end{macrocode}
+%
+% Now we can process the options
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% and load the article document class.
+% \begin{macrocode}
+\LoadClass{article}
+%</class>
+% \end{macrocode}
+%
+% \section{Document Layout}
+%
+% Proceedings articles have a different layout than normal
+% articles. Therefore some of the layout parameters are given
+% different values here.
+%
+% \subsection{Page Layout}
+%
+% \subsubsection{Vertical spacing}
+%
+% \begin{macro}{\footskip}
+% The distance from the baseline of the box which contains the
+% running footer to the baseline of last line of text is controlled
+% by the |\footskip|.
+% \begin{macrocode}
+%<*class|style>
+\setlength\footskip{75\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{The dimension of text}
+%
+% \begin{macro}{\textwidth}
+% When \LaTeXe\ runs in compatibility mode it has to be made sure
+% that the dimensions of the printed area are not different from
+% what the user was used to see.
+%
+% \begin{macrocode}
+\if@compatibility
+ \setlength\textwidth{6.75in}
+\else
+ \setlength\textwidth{\paperwidth}
+ \addtolength\textwidth{-126\p@}
+ \@settopoint\textwidth
+\fi
+% \end{macrocode}
+%
+% Here the width of the text a little is modified to be a whole
+% number of points.
+% \begin{macrocode}
+\if@compatibility
+\else
+ \@settopoint\textwidth
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\textheight}
+% Now that we have computed the width of the text, we have to take
+% care of the height. The |\textheight| is the height of text
+% (including footnotes and figures, excluding running head and
+% foot).
+%
+% \begin{macrocode}
+\if@compatibility
+ \setlength\textheight{9in}
+\else
+ \ifcase\@ptsize
+ \setlength\textheight{53\baselineskip}
+ \or
+ \setlength\textheight{47\baselineskip}
+ \or
+ \setlength\textheight{44\baselineskip}
+ \fi
+\fi
+% \end{macrocode}
+%
+% The first line on the page has a height of |\topskip|.
+% \begin{macrocode}
+\advance\textheight by \topskip
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Margins}
+%
+% \begin{macro}{\oddsidemargin}
+% \begin{macro}{\evensidemargin}
+% The width of the text is quite large, therefore the margins
+% have a negative width.
+% \begin{macrocode}
+\setlength\oddsidemargin{-10\p@}
+\setlength\evensidemargin{-10\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\marginparwidth}
+% Because we have such a large |\textwidth| there is no real room
+% for notes in the margins.
+% \begin{macrocode}
+\setlength\marginparwidth {\z@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\topmargin}
+% The |\topmargin| is the distance between the top of `the
+% printable area' --which is 1 inch below the top of the paper--
+% and the top of the box which contains the running head.
+% \begin{macrocode}
+\setlength\topmargin{-47\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\columnsep}
+% Proceedings articles are always set in |\twocolumn| mode,
+% therefore the distance between the two columns (|\columnsep|)is
+% set to a non zero value.
+% \begin{macrocode}
+\setlength\columnsep{.375in}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The page style}
+%
+% The user can use |\markright| (or |\markboth|) to put an
+% identification in the lower left side of the page. The page
+% number is printed in the lower right side of the page.
+%
+% This works as long as he doesn't use either |\pagestyle| or
+% |\thispagestyle| commands.
+% \changes{v1.3f}{1994/05/26}{changed \cs{rm} to
+% \cs{normalfont}\cs{rmfamily}}
+% \changes{v1.3j}{1995/05/26}{Removed \cs{rmfamily} (PR 1578)}
+% \begin{macrocode}
+\let\@oddhead\@empty
+\let\@evenhead\@empty
+\def\@oddfoot{\normalfont\rightmark \hfil
+ \pagename{} \thepage}
+\def\@evenfoot{\@oddfoot}
+% \end{macrocode}
+%
+%
+% \section{Document Markup}
+%
+% \subsection{The title}
+%
+% \begin{macro}{\maketitle}
+% \changes{v1.3k}{1995/07/18}{Modify footnote handling (PR 1735)}
+% The definition of |\maketitle| here is basically the same as the
+% one in the document class \texttt{article}, but the pagestyle is
+% \emph{not} set to \texttt{plain}.
+%
+% \begin{macrocode}
+\def\maketitle{\par
+ \begingroup
+ \renewcommand\thefootnote{\fnsymbol{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}
+% This document class always uses two column mode but the title is
+% set to the full width of the text.
+% \begin{macrocode}
+ \twocolumn[\@maketitle]%
+ \@thanks
+ \endgroup
+ \setcounter{footnote}{0}%
+ \let\maketitle\relax
+ \let\@maketitle\relax
+ \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@maketitle}
+% This macro takes care of formatting the title information.
+%
+% The information is set inside |\vbox| with a width of
+% |\textwidth| and a height of 2.25in. The text is vertically and
+% horizontally centered.
+% \begin{macrocode}
+\def\@maketitle{%
+ \vbox to 2.25in{%
+ \hsize\textwidth
+ \linewidth\hsize
+ \vfil
+ \centering
+ {\LARGE \@title \par}
+ \vskip 2em
+ {\large \begin{tabular}[t]{c}\@author \end{tabular}\par}
+ \vfil}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\copyrightspace}
+% The |\copyrightspace| command is used to produce a blank space in
+% the first column where a copyright notice belongs. It works by
+% producing a blank footnote of the appropriate size.
+%
+% \begin{macrocode}
+\def\copyrightspace{%
+ \footnotetext[0]{\mbox{}\vrule \@height 97\p@ \@width \z@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Modifying environments}
+%
+% \subsubsection{Abstract}
+%
+% \begin{macro}{\abstract}
+% For this document class the definition of the abstract
+% environment is quit simple.
+%
+% \begin{macrocode}
+\renewenvironment{abstract}%
+ {\section*{\abstractname}}
+ {\par}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Initialization}
+%
+% \subsection{Words}
+%
+% \begin{macro}{\pagename}
+% This document class is for documents prepared in the English
+% language. To prepare a version for another language, one English
+% word must be replaced. It is defined below in a command name.
+% \begin{macrocode}
+\newcommand\pagename{Page}
+%</class|style>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/proc.ins b/macros/latex-dev/base/proc.ins
new file mode 100644
index 0000000000..48765bddec
--- /dev/null
+++ b/macros/latex-dev/base/proc.ins
@@ -0,0 +1,105 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{
+ \file{proc.cls}{\from{proc.dtx}{class}}
+ \file{proc.sty}{\from{proc.dtx}{style}}
+ }
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space proc.cls}
+\Msg{* \space\space proc.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/proc.pdf b/macros/latex-dev/base/proc.pdf
new file mode 100644
index 0000000000..6c567d7861
--- /dev/null
+++ b/macros/latex-dev/base/proc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/sample2e.tex b/macros/latex-dev/base/sample2e.tex
new file mode 100644
index 0000000000..715e46d2d0
--- /dev/null
+++ b/macros/latex-dev/base/sample2e.tex
@@ -0,0 +1,204 @@
+% This is a sample LaTeX input file. (Version of 12 August 2004.)
+%
+% A '%' character causes TeX to ignore all remaining text on the line,
+% and is used for comments like this one.
+
+\documentclass{article} % Specifies the document class
+
+ % The preamble begins here.
+\title{An Example Document} % Declares the document's title.
+\author{Leslie Lamport} % Declares the author's name.
+\date{January 21, 1994} % Deleting this command produces today's date.
+
+\newcommand{\ip}[2]{(#1, #2)}
+ % Defines \ip{arg1}{arg2} to mean
+ % (arg1, arg2).
+
+%\newcommand{\ip}[2]{\langle #1 | #2\rangle}
+ % This is an alternative definition of
+ % \ip that is commented out.
+
+\begin{document} % End of preamble and beginning of text.
+
+\maketitle % Produces the title.
+
+This is an example input file. Comparing it with
+the output it generates can show you how to
+produce a simple document of your own.
+
+\section{Ordinary Text} % Produces section heading. Lower-level
+ % sections are begun with similar
+ % \subsection and \subsubsection commands.
+
+The ends of words and sentences are marked
+ by spaces. It doesn't matter how many
+spaces you type; one is as good as 100. The
+end of a line counts as a space.
+
+One or more blank lines denote the end
+of a paragraph.
+
+Since any number of consecutive spaces are treated
+like a single one, the formatting of the input
+file makes no difference to
+ \LaTeX, % The \LaTeX command generates the LaTeX logo.
+but it makes a difference to you. When you use
+\LaTeX, making your input file as easy to read
+as possible will be a great help as you write
+your document and when you change it. This sample
+file shows how you can add comments to your own input
+file.
+
+Because printing is different from typewriting,
+there are a number of things that you have to do
+differently when preparing an input file than if
+you were just typing the document directly.
+Quotation marks like
+ ``this''
+have to be handled specially, as do quotes within
+quotes:
+ ``\,`this' % \, separates the double and single quote.
+ is what I just
+ wrote, not `that'\,''.
+
+Dashes come in three sizes: an
+ intra-word
+dash, a medium dash for number ranges like
+ 1--2,
+and a punctuation
+ dash---like
+this.
+
+A sentence-ending space should be larger than the
+space between words within a sentence. You
+sometimes have to type special commands in
+conjunction with punctuation characters to get
+this right, as in the following sentence.
+ Gnats, gnus, etc.\ all % `\ ' makes an inter-word space.
+ begin with G\@. % \@ marks end-of-sentence punctuation.
+You should check the spaces after periods when
+reading your output to make sure you haven't
+forgotten any special cases. Generating an
+ellipsis
+ \ldots\ % `\ ' is needed after `\ldots' because TeX
+ % ignores spaces after command names like \ldots
+ % made from \ + letters.
+ %
+ % Note how a `%' character causes TeX to ignore
+ % the end of the input line, so these blank lines
+ % do not start a new paragraph.
+ %
+with the right spacing around the periods requires
+a special command.
+
+\LaTeX\ interprets some common characters as
+commands, so you must type special commands to
+generate them. These characters include the
+following:
+ \$ \& \% \# \{ and \}.
+
+In printing, text is usually emphasized with an
+ \emph{italic}
+type style.
+
+\begin{em}
+ A long segment of text can also be emphasized
+ in this way. Text within such a segment can be
+ given \emph{additional} emphasis.
+\end{em}
+
+It is sometimes necessary to prevent \LaTeX\ from
+breaking a line where it might otherwise do so.
+This may be at a space, as between the ``Mr.''\ and
+``Jones'' in
+ ``Mr.~Jones'', % ~ produces an unbreakable interword space.
+or within a word---especially when the word is a
+symbol like
+ \mbox{\emph{itemnum}}
+that makes little sense when hyphenated across
+lines.
+
+Footnotes\footnote{This is an example of a footnote.}
+pose no problem.
+
+\LaTeX\ is good at typesetting mathematical formulas
+like
+ \( x-3y + z = 7 \)
+or
+ \( a_{1} > x^{2n} + y^{2n} > x' \)
+or
+ \( \ip{A}{B} = \sum_{i} a_{i} b_{i} \).
+The spaces you type in a formula are
+ignored. Remember that a letter like
+ $x$ % $ ... $ and \( ... \) are equivalent
+is a formula when it denotes a mathematical
+symbol, and it should be typed as one.
+
+\section{Displayed Text}
+
+Text is displayed by indenting it from the left
+margin. Quotations are commonly displayed. There
+are short quotations
+\begin{quote}
+ This is a short quotation. It consists of a
+ single paragraph of text. See how it is formatted.
+\end{quote}
+and longer ones.
+\begin{quotation}
+ This is a longer quotation. It consists of two
+ paragraphs of text, neither of which are
+ particularly interesting.
+
+ This is the second paragraph of the quotation. It
+ is just as dull as the first paragraph.
+\end{quotation}
+Another frequently-displayed structure is a list.
+The following is an example of an \emph{itemized}
+list.
+\begin{itemize}
+ \item This is the first item of an itemized list.
+ Each item in the list is marked with a ``tick''.
+ You don't have to worry about what kind of tick
+ mark is used.
+
+ \item This is the second item of the list. It
+ contains another list nested inside it. The inner
+ list is an \emph{enumerated} list.
+ \begin{enumerate}
+ \item This is the first item of an enumerated
+ list that is nested within the itemized list.
+
+ \item This is the second item of the inner list.
+ \LaTeX\ allows you to nest lists deeper than
+ you really should.
+ \end{enumerate}
+ This is the rest of the second item of the outer
+ list. It is no more interesting than any other
+ part of the item.
+ \item This is the third item of the list.
+\end{itemize}
+You can even display poetry.
+\begin{verse}
+ There is an environment
+ for verse \\ % The \\ command separates lines
+ Whose features some poets % within a stanza.
+ will curse.
+
+ % One or more blank lines separate stanzas.
+
+ For instead of making\\
+ Them do \emph{all} line breaking, \\
+ It allows them to put too many words on a line when they'd rather be
+ forced to be terse.
+\end{verse}
+
+Mathematical formulas may also be displayed. A
+displayed formula
+is
+one-line long; multiline
+formulas require special formatting instructions.
+ \[ \ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\]
+Don't start a paragraph with a displayed equation,
+nor make one a paragraph by itself.
+
+\end{document} % End of document.
diff --git a/macros/latex-dev/base/slides.dtx b/macros/latex-dev/base/slides.dtx
new file mode 100644
index 0000000000..4ccd6824e6
--- /dev/null
+++ b/macros/latex-dev/base/slides.dtx
@@ -0,0 +1,2733 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+% Copyright (C) 1994-97 LaTeX3 project, Frank Mittelbach
+% and Rainer Sch\"opf, all rights reserved.
+%
+% \begin{macrocode}
+%<+class>\NeedsTeXFormat{LaTeX2e}[1997/06/01]
+% \end{macrocode}
+%
+% Announce the Class name and its version:
+% \changes{v2.3b}{1994/05/01}{Removed the use of \cs{fileversion}
+% c.s.}
+% \changes{v2.3b}{1994/05/01}{Added \cs{ProvidesFile} to slides.def.}
+% \changes{v2.3o}{1995/05/17}{Replaced all \cs{hbox to} with
+% \cs{hb@xt@}.}
+% \changes{v2.3o}{1995/05/17}{Cleaned up the \cs{changes} entries.}
+% \changes{v2.3p}{1995/05/23}{Corrected some brace mismatches.}
+% \changes{v2.3q}{1995/09/20}{Replaced \cs{@tempa} by \cs{reserved@a}.}
+% \changes{v2.3r}{1995/09/27}{Globally replaced scale factor 19.91 by
+% 19.907 in \cs{DeclareFontShape}, as this gives better
+% rounded font sizes at 600dpi (suggested by Denis Roegel).}
+% \begin{macrocode}
+%<+class>\ProvidesClass{slides}
+%<+cmd>\ProvidesFile{slides.def}
+%<*driver>
+ \ProvidesFile{slides.drv}
+%</driver>
+ [2016/03/29 v2.4a
+%<+class> Standard LaTeX document class]
+%<+cmd> SLiTeX definitions]
+% \end{macrocode}
+%
+% \section{A driver for this document}
+%
+% \changes{v2.3f}{1994/05/26}{Moved the driver to the front of the
+% file; it doesn't print any longer}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you are
+% currently reading. It can be extracted from this file by the
+% \dst{} program.
+% \begin{macrocode}
+%<*driver>
+]
+\documentclass{ltxdoc}
+% \end{macrocode}
+% The following command retrieves the date and version information
+% from the file.
+% \begin{macrocode}
+\GetFileInfo{slides.drv}
+% \end{macrocode}
+% Some commonly used abbreviations:
+% \changes{v2.3h}{1994/06/01}{Added definition of \cs{SLiTeX}.}
+% \begin{macrocode}
+\DeclareRobustCommand{\SLiTeX}{{%
+ \normalfont S\kern -.06em
+ {\scshape l\kern -.035emi}\kern -.06em
+ \TeX
+}}
+\newcommand*{\Lopt}[1]{\textsf {#1}}
+\newcommand*{\file}[1]{\texttt {#1}}
+\newcommand*{\Lcount}[1]{\textsl {\small#1}}
+\newcommand*{\pstyle}[1]{\textsl {#1}}
+\newcommand*{\dst}{{\normalfont\scshape docstrip}}
+%
+% \end{macrocode}
+% Now start the document and input this file.
+% \changes{v2.3d}{1994/05/12}{Added a missing \cs{begin\{macrocode\}}}
+% \begin{macrocode}
+\begin{document}
+ \DocInput{slides.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%\fi
+%
+%
+% \changes{v2.1b}{1993/12/13}{Removed \cs{CodelineIndex} from the
+% driver code.}
+% \changes{v2.1e}{1993/12/16}{Removed again different definitions for
+% font commands font commands in non-compatibility mode.}
+%
+% \changes{v2.2}{1993/12/18}{Changes to make it work with
+% compatibility mode.}
+% \changes{v2.2a}{1993/12/19}{Removed float parms}
+% \changes{v2.2d}{1994/01/31}{Removed \cs{@normalsize definition}}
+% \changes{v2.2g}{1994/03/01}{Removed option makeidx.}
+% \changes{v2.2g}{1994/03/01}{Moved driver up front.}
+% \changes{v2.2g}{1994/03/01}{Renamed files \file{slides.ltx} and
+% \file{sfontdef.ltx} to \file{slides.def} and \file{sfonts.def}.}
+% \changes{v2.2l}{1994/03/16}{Removed \cs{typeouts}}
+% \changes{v2.3}{1994/03/16}{Removed root/slide-file structure except
+% for compatibility mode. (LL)}
+% \changes{v2.3}{1994/03/16}{Added clock option (LL)}
+% \changes{v2.3}{1994/03/16}{Modified slide, overlay, note
+% environments. (LL)}
+% \changes{v2.3}{1994/03/16}{Added titlepage option and
+% \cs{maketitle}. (LL)}
+% \changes{v2.3c}{1994/05/06}{Changed documentation to use
+% `environment' instead of `macro' environment for environments}
+% \changes{v2.3f}{1994/05/26}{Wrapped two long lines}
+% \changes{v2.3l}{1994/12/16}{Use \cs{newcommand*} to define commands
+% with an argument}
+% \changes{v2.3n}{1995/04/02}{a slight documentation fix (PR 1517)}
+%
+% \title{Producing slides with \LaTeXe{}}
+% \author{Frank Mittelbach}
+% \date{\filedate}
+%
+% \maketitle
+% \MaintainedByLaTeXTeam{latex}
+%
+% \section{Introduction}
+%
+% With \LaTeXe{} it is now no longer necessary to maintain a special
+% format for producing overhead slides. Instead the standard format
+% may be used and internally only different font definition files come
+% into play.
+%
+% \section{Usage}
+%
+% For producing slides you have to use |slides| as the
+% document class. This class is very similar to the |slides| style
+% that came with \SliTeX{}, in fact it is basically a copy changed to
+% work under \LaTeXe{}.\footnote{Therefore you should compare the
+% new class with old \SliTeX{} styles
+% in case you have local slide classes to see what you have to change
+% in order to use them with \LaTeXe{}.} Thus you have to say something
+% like
+% \begin{verbatim}
+% \documentclass[...]{slides}
+% \end{verbatim}
+% and process this with \LaTeXe.
+%
+% \section{Fonts}
+%
+% Note, that that with NFSS you can easily produce slides with special
+% fonts just by calling an appropriate style file (like |times|) in a
+% |\usepackage| command. This works, for example, with all
+% fonts that are defined to be scaleable (e.g., PostScript fonts) since
+% they can be used at any size by NFSS.
+%
+% However, packages like |pandora| won't work because the standard
+% |.fd| files shipped with NFSS only contain small sizes. You can, of
+% course, produce additional sizes and change the |.fd| files
+% accordingly so that they would be useable for slides as well.
+%
+% \section{Invisible text and color separation}
+%
+% In the original \SliTeX{} it was possible to produce invisible text
+% using the |\invisible| command, so that one was able to put several
+% slides on top of each other (with each slides showing additional
+% details, etc.). It was also possible to produce `color' slides. This
+% was done by producing individual slides one for each color and
+% placing them on top of each other.
+%
+% The availability of color printers and the |color| package make
+% color separation obsolete, so it has been removed. Although the
+% |color| has also made |\invisible| obsolete, the command is
+% retained in the \LaTeXe{} implementation, but there
+% are a few restrictions. Invisible fonts are implemented as special
+% shapes where the shape names are build by prefixing the normal shape
+% name with an uppercase |I|. For example, the `normal invisible
+% shape' would be |In|. When \LaTeX{} is requested to typeset
+% invisible it will thus change the current shape attribute in this
+% manner. To make this work it is necessary that the resulting font
+% shape group is defined. If not, the normal font substitution
+% mechanism of \LaTeXe{} will change the attribute until it finds a
+% usable font shape group with the result that the text may become
+% visible.
+%
+% As long as you use the standard fonts for slides this is not a
+% problem because all the visible font shape groups have invisible
+% counterparts. However, if you decide on using special fonts, e.g.,
+% PostScript fonts, your |\DeclareFontShape| settings may not contain
+% invisible font shape groups and thus you may be unable to use these
+% features without adding additional |\DeclareFontShape| commands to
+% your |.fd| files or the preamble of your document.
+%
+% \StopEventually{}
+%
+%
+% \section{The Implementation}
+%
+% \begin{quote}
+% \textbf{Warning:} The implementation is still very experimental and
+% may change internally very much. It currently basically consists of a
+% slightly modified copy of |slides.sty| (which then forms
+% |slides.cls|) followed by a slightly changed copy of |slitex.tex|.
+% Documentation is practically
+% non-existing. Everybody is invited to help changing this!
+% \end{quote}
+%
+% The code is divided into two parts, we first implement the class
+% related functions and declarations and then define lowlevel stuff
+% that is necessary within every class. By placing such commands into
+% a separate file it will be possible to share it with other slide
+% classes.
+%
+% \subsection{The class code}
+%
+% At this point we input the redefinitions that are necessary for
+% \SLiTeX.
+% \changes{v2.3g}{1994/05/26}{Use \cs{input} instead of \cs{@@input}}
+% \begin{macrocode}
+%<*class>
+\input{slides.def}
+% \end{macrocode}
+%
+%
+% Now we are ready for setting up the font tables. As usual, we first
+% look for a local configuration file |sfonts.cfg|. If there isn't
+% one, we fall back to the default one (|sfonts.def|).
+% \changes{v2.2i}{1994/03/08}{Corrected first argument of
+% \cs{IfFileExists}: \file{sfonts.def} to \file{sfonts.cfg}.}
+% \changes{v2.3g}{1994/05/26}{Use \cs{InputIfFileExists} instead of
+% \cs{IfFileExists} and \cs{input} instead of \cs{@@input}}
+% \begin{macrocode}
+\InputIfFileExists{sfonts.cfg}
+ {\typeout{**************************************^^J%
+ *^^J%
+ * Local config file sfonts.cfg used^^J%
+ *^^J%
+ **************************************}}%
+ {\input{sfonts.def}}
+% \end{macrocode}
+%
+% \section{Declaration of Options}
+%
+% We declare a few options as illegal.
+%
+%
+% \subsection{Setting Paper Sizes}
+%
+% The variables |\paperwidth| and |\paperheight| should reflect the
+% physical paper size after trimming. For desk printer output this
+% is usually the real paper size since there is no post-processing.
+% Classes for real book production will probably add other paper
+% sizes and additionally the production of crop marks for trimming.
+% \changes{v2.1d}{1993/12/14}{Corrected typo, A4 is not 279 mm high}
+% \begin{macrocode}
+\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 wer given for portrait
+% paper.
+% \begin{macrocode}
+\DeclareOption{landscape}
+ {\setlength\@tempdima {\paperheight}%
+ \setlength\paperheight {\paperwidth}%
+ \setlength\paperwidth {\@tempdima}}
+% \end{macrocode}
+%
+% \subsection{The clock option}
+
+% The option \Lopt{clock} prints the time at the bottom of each note.
+% We also define here the commands and counters used to keep track of
+% time.
+% \begin{macrocode}
+\newif\if@clock \@clockfalse
+\DeclareOption{clock}{\@clocktrue
+ \AtEndDocument{\typeout{\@arabic\c@minutes\space minutes}}
+}%
+\newcounter{minutes}%
+\newcounter{seconds}%
+\newcommand*{\settime}[1]{\setcounter{seconds}{0}\addtime{#1}}%
+\newcommand*{\addtime}[1]{\addtocounter{seconds}{#1}%
+ \setcounter{minutes}{\value{seconds}}%
+ \global \divide \value{minutes} by 60\relax}
+
+% \end{macrocode}
+%
+% \subsection{Two-side or one-side printing}
+%
+% Two-sided printing is not allowed, so don't declare an option.
+% But it is necessary to initialize the switch.
+% \changes{v2.2h}{1994/03/07}{Removed declared option twoside.}
+% \begin{macrocode}
+\@twosidefalse
+% \end{macrocode}
+%
+%
+% \subsection{Draft option}
+%
+% If the user requests \Lopt{draft} we show any overfull boxes.
+% We could probably add some more interesting stuff to this option.
+% \begin{macrocode}
+\DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
+% \end{macrocode}
+%
+% \subsection{Titlepage option}
+% The default is for a |\maketitle| command to make a new page.
+% \begin{macrocode}
+\newif\if@titlepage
+\@titlepagetrue
+\DeclareOption{titlepage}{\@titlepagetrue}
+\DeclareOption{notitlepage}{\@titlepagefalse}
+% \end{macrocode}
+%
+% \subsection{Twocolumn printing}
+%
+% Two-column printing is again forbidden.
+% \changes{v2.3e}{1994/05/22}{twocolumn produces only a warning}
+% \begin{macrocode}
+\DeclareOption{onecolumn}{}
+\DeclareOption{twocolumn}{%
+ \ClassWarning{slides}{No 'twocolumn' layout for slides}}
+% \end{macrocode}
+%
+% \subsection{Equation numbering on the left}
+%
+% The option \Lopt{leqno} can be used to get the equation numbers
+% on the left side of the equation.
+% \changes{v2.2g}{1994/03/01}{Option leqno loads \file{leqno.clo}
+% file.}
+% \begin{macrocode}
+\DeclareOption{leqno}{\input{leqno.clo}}
+% \end{macrocode}
+%
+% \subsection{Flush left displays}
+%
+% The option \Lopt{fleqn} redefines the displayed math environments
+% in such a way that they come out flush left, with an indentation
+% of |\mathindent| from the prevailing left margin.
+% \changes{v2.2g}{1994/03/01}{Added fleqn option.}
+% \begin{macrocode}
+\DeclareOption{fleqn}{\input{fleqn.clo}}
+% \end{macrocode}
+%
+%
+% \section{Executing Options}
+%
+% Here we execute the default options to initialize certain
+% variables.
+% \begin{macrocode}
+\ExecuteOptions{letterpaper,final}
+% \end{macrocode}
+%
+% The |\ProcessOptions| command causes the execution of the code
+% for every option \Lopt{FOO}
+% which is declared and for which the user typed
+% the \Lopt{FOO} option in his
+% |\documentclass| command. For every option \Lopt{BAR} he typed,
+% which is not declared, the option is assumed to be a global option.
+% All options will be passed as document options to any
+% |\usepackage| command in the document preamble.
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% \section{Loading Packages}
+%
+% The standard class files do not load additional packages.
+%
+%
+% \section{Document Layout}
+%
+%
+% In this section we are finally dealing with the nasty typographical
+% details.
+%
+%
+%
+% \subsection{Fonts}
+%
+% \begin{macrocode}
+% FMi:
+\def\rmdefault{lcmss} % no roman
+\def\sfdefault{lcmss}
+\def\ttdefault{lcmtt}
+\def\itdefault{sl}
+\def\sldefault{sl}
+\def\bfdefault{bx}
+% \end{macrocode}
+%
+%
+% Since the number of parameters to set are very large it seems
+% reasonable to set up one command |\@setfontsize@parms| which will
+% do the work for us.
+%
+% \LaTeX\ offers the user commands to change the size of the font,
+% relative to the `main' size. Each relative size changing command
+% |\size| executes the command
+% |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where:
+%
+% \begin{description}
+% \item[\meta{font-size}] The absolute size of the font to use from
+% now on.
+%
+% \item[\meta{baselineskip}] The normal value of |\baselineskip|
+% for the size of the font selected. (The actual value will be
+% |\baselinestretch| * \meta{baselineskip}.)
+% \end{description}
+%
+% A number of commands, defined in the \LaTeX{} kernel, shorten the
+% following definitions and are used throughout. They are:
+% \begin{center}
+% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
+% \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
+% \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
+% \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
+% ...
+% \end{tabular}
+% \end{center}
+%
+% \begin{macro}{\ifourteenpt}
+% \begin{macro}{\iseventeenpt}
+% \begin{macro}{\itwentypt}
+% \begin{macro}{\itwentyfourpt}
+% \begin{macro}{\itwentyninept}
+% \begin{macro}{\ithirtyfourpt}
+% \begin{macro}{\ifortyonept}
+% For \SLiTeX{}, however, these are not sufficient, and we therefore
+% need to add a few extra, larger, sizes.
+% \begin{macrocode}
+\def\ifourteenpt{13.82}
+\def\iseventeenpt{16.59}
+\def\itwentypt{19.907}
+\def\itwentyfourpt{23.89}
+\def\itwentyninept{28.66}
+\def\ithirtyfourpt{34.4}
+\def\ifortyonept{41.28}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@setfontsize@parms}
+% This routine is used in \SliTeX{} to interface font size setting
+% it is modeled after the settings I found in \texttt{slides.sty}, so
+% it probably needs an update. But any class is free to redefine
+% it, as it is used only as an abbreviation.
+% It's syntax is:
+% \begin{quote}
+% |\@setfontsize@parms| \\
+% | |\meta{lineskip} \\
+% | |\meta{parskip} \\
+% | |\meta{abovedisplayskip} \\
+% | |\meta{belowdisplayskip} \\
+% | |\meta{abovedisplayshortskip} \\
+% | |\meta{belowdisplayshortskip} \\
+% | |\meta{strut ht} \meta{strut dp} (without pt)
+% \end{quote}
+%
+% For NFSS1 a similar style existed which did run both with a
+% \SliTeX{} with old font selection or with NFSS1. But when no
+% separate format is made this doesn't make much sense.
+% So the following note is history and would only be true if all NFSS
+% stuff would be removed from the file and placed into the format.
+% \begin{quote}\small
+% Note: To interface the old \texttt{sfonts.tex} the \meta{size} must be
+% hidden in commands denoting the size by its name prefixed with
+% `i', i.e.\ 20pt size is called |\itwentypt| at this point. The
+% NFSS interface will define those sizes to expand to the internal
+% size, e.g.\ 20 but for the old sfonts the command name, e.g.
+% |\itwentypt|, will be used to construct the name |\twentypt| etc.
+%
+% This is a crude interface to the old \texttt{sfonts.tex}. It will
+% be a bit slower than the old one because it must define |\@tiny|
+% etc.\ every time a size changes.
+% \end{quote}
+%
+% If classes are set up that are only for use with NFSS then the second
+% argument may be an ordinary font size!
+% \changes{v2.0d}{1993/11/12}{Replaced all pt by \cs{p@}, corrected
+% definition for \cs{tiny}.}
+%
+% \begin{macrocode}
+\def\@setfontsize@parms#1#2#3#4#5#6#7#8{%
+ \lineskip #1\relax%
+ \parskip #2\relax
+ \abovedisplayskip #3\relax
+ \belowdisplayskip #4\relax
+ \abovedisplayshortskip #5\relax
+ \belowdisplayshortskip #6\relax
+%
+% \end{macrocode}
+% I don't see a reason why the |\strutbox| has a dim different from
+% |\baselineskip| but we will leave it for the moment
+% \begin{macrocode}
+ \setbox\strutbox=\hbox{\vrule \@height#7\p@\@depth#8\p@\@width\z@}%
+ \baselineskip\baselinestretch\baselineskip
+ \normalbaselineskip\baselineskip}
+% \end{macrocode}
+% \end{macro}
+%
+% Setting size relations for math scripts:
+% \changes{v2.2e}{1994/02/07}{Corrected entry for size 23.89.}
+% \begin{macrocode}
+\DeclareMathSizes{13.82}{13.82}{10}{7}
+\DeclareMathSizes{16.59}{16.59}{12}{7}
+\DeclareMathSizes{19.907}{19.907}{16.59}{13.82}
+\DeclareMathSizes{23.89}{23.89}{19.907}{16.59}
+\DeclareMathSizes{28.66}{28.66}{23.89}{19.907}
+\DeclareMathSizes{34.4}{34.4}{28.66}{23.89}
+\DeclareMathSizes{41.28}{41.28}{34.4}{28.66}
+% \end{macrocode}
+%
+% \begin{macro}{\normalsize}
+% \begin{macrocode}
+\def\normalsize{%
+ \@setfontsize\normalsize\itwentypt{28\p@ plus3\p@ minus4\p@}%
+% {20}{30\p@ plus3\p@ minus3\p@}% made a bit shorter
+ \@setfontsize@parms
+ {2pt}%
+ {30\p@ plus18\p@ minus9\p@}%
+ {15\p@ plus3\p@ minus3\p@}%
+ {10\p@ plus3\p@ minus3\p@}%
+ {10\p@ plus3\p@}
+ \abovedisplayshortskip
+ {17}{7}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% We initially choose the normalsize font.
+% \begin{macrocode}
+\normalsize
+% \end{macrocode}
+%
+% \begin{macro}{\small}
+% \begin{macrocode}
+\def\small{\@setfontsize\small\iseventeenpt{19\p@ plus3\p@ minus\p@}%
+ \@setfontsize@parms
+ {2\p@}%
+ {15\p@ plus15\p@ minus7\p@}%
+ {12\p@ plus3\p@ minus3\p@}%
+ {9\p@ plus3\p@ minus3\p@}%
+ {6\p@ plus3\p@}%
+ \abovedisplayshortskip
+ {13.5}{5.6}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footnotesize}
+% \begin{macro}{\scriptsize}
+% \begin{macrocode}
+\let\footnotesize=\small
+\let\scriptsize=\small
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\tiny}
+% \begin{macrocode}
+\def\tiny{\@setfontsize\tiny\ifourteenpt{16\p@ plus2\p@ minus\p@}%
+ \@setfontsize@parms
+ {2pt}%
+ {14\p@ plus3\p@ minus10\p@}%
+ {11\p@ plus3\p@ minus10\p@}%
+ \abovedisplayskip
+ {8\p@ plus3\p@ minus5\p@}%
+ {\z@ plus3\p@}%
+ {10}{4}}
+% \end{macrocode}
+% \end{macro}
+%
+% Actually copying the code above would be better because this would
+% correct the error message. Maybe one should remove the first
+% argument of |\set@font@size@parms|.
+%
+% \begin{macro}{\large}
+% \begin{macro}{\Large}
+% \begin{macro}{\LARGE}
+% \begin{macro}{\huge}
+% \begin{macro}{\Huge}
+% \begin{macrocode}
+\def\large{\@setfontsize\large\itwentyfourpt{42\p@ plus8\p@ minus5\p@}%
+ \@setfontsize@parms
+ {2\p@}%
+ {40\p@ plus20\p@ minus4\p@}%
+ {20\p@ plus8\p@ minus3\p@}%
+ \abovedisplayskip
+ {10\p@ plus5\p@}%
+ \abovedisplayshortskip
+ {20}{8.5}}
+
+\def\Large{\@setfontsize\Large\itwentyninept{48\p@ plus10\p@ minus6\p@}%
+ \@setfontsize@parms
+ {2\p@}%
+ {48\p@ plus30\p@ minus6\p@}%
+ {24\p@ plus10\p@ minus6\p@}%
+ \abovedisplayskip
+ {12\p@ plus8\p@}%
+ \abovedisplayshortskip
+ {27}{11}}
+
+\def\LARGE{\@setfontsize\LARGE\ithirtyfourpt{52\p@ plus10\p@ minus6\p@}%
+ \@setfontsize@parms
+ {2\p@}%
+ {52\p@ plus30\p@ minus6\p@}%
+ {24\p@ plus10\p@ minus6\p@}%
+ \abovedisplayskip
+ {12\p@ plus8\p@}%
+ \abovedisplayshortskip
+ {27}{11}}
+
+\def\huge{\@setfontsize\huge\ifortyonept{60\p@ plus10\p@ minus6\p@}%
+ \@setfontsize@parms
+ {2\p@}%
+ {60\p@ plus30\p@ minus6\p@}%
+ {24\p@ plus10\p@ minus6\p@}%
+ \abovedisplayskip
+ {12\p@ plus8\p@}%
+ \abovedisplayshortskip
+ {27}{11}}
+
+\let\Huge\huge
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Paragraphing}
+%
+% \begin{macro}{\baselinestretch}
+% This is used as a multiplier for |\baselineskip|. The default is
+% to {\em not\/} stretch the baselines.
+% \begin{macrocode}
+\renewcommand\baselinestretch{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parindent}
+% |\parindent| is the width of the paragraph indentation.
+% \begin{macrocode}
+\setlength\parindent{\z@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@lowpenalty}
+% \begin{macro}{\@medpenalty}
+% \begin{macro}{\@highpenalty}%
+% The commands |\nopagebreak| and |\nolinebreak| put in penalties
+% to discourage these breaks at the point they are put in.
+% They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
+% dependent on their argument.
+% \begin{macrocode}
+\@lowpenalty 51
+\@medpenalty 151
+\@highpenalty 301
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\clubpenalty}
+% \begin{macro}{\widowpenalty}
+% These penalties are use to discourrage club and widow lines.
+% Because we use their default values we only show them here,
+% commented out.
+% \begin{macrocode}
+% \clubpenalty 150
+% \widowpenalty 150
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\displaywidowpenalty}
+% \begin{macro}{\predisplaypenalty}
+% \begin{macro}{\postdisplaypenalty}
+% Discourrage (but not so much) widows in front of a math display
+% and forbid breaking directly in front of a display. Allow break
+% after a display without a penalty. Again the default values are
+% used, therefore we only show them here.
+% \begin{macrocode}
+% \displaywidowpenalty 50
+% \predisplaypenalty 10000
+% \postdisplaypenalty 0
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\interlinepenalty}
+% Allow the breaking of a page in the middle of a paragraph.
+% \begin{macrocode}
+% \interlinepenalty 0
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\brokenpenalty}
+% We allow the breaking of a page after a hyphenated line.
+% \begin{macrocode}
+% \brokenpenalty 0
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Page Layout}
+%
+% All margin dimensions are measured from a point one inch from the
+% top and lefthand side of the page.
+%
+% \subsubsection{Vertical spacing}
+%
+% \begin{macro}{\headheight}
+% \begin{macro}{\headsep}
+% \begin{macro}{\topskip}
+% The |\headheight| is the height of the box that will contain the
+% running head. The |\headsep| is the distance between the bottom
+% of the running head and the top of the text. |\topskip| is the
+% |\baselineskip| for the first line on a page.
+% \begin{macrocode}
+\setlength\headheight{14\p@}
+\setlength\headsep {15\p@}
+\setlength\topskip {30\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\footskip}
+% The distance from the baseline of the box which contains the
+% running footer to the baseline of last line of text is controlled
+% by the |\footskip|.
+% Bottom of page:
+% \begin{macrocode}
+\setlength\footskip{25\p@} %
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\maxdepth}
+% \begin{macro}{\@maxdepth}
+% \changes{v2.3c}{1994/05/06}{Added setting of \cs{maxdepth} and
+% \cs{@maxdepth}}
+% The \TeX\ primitive register |\maxdepth| has a function that is
+% similar to that of |\topskip|. The register |\@maxdepth| should
+% always contain a copy of |\maxdepth|. In both plain \TeX\ and
+% \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in
+% native \LaTeX2e\ mode we let the value depend on the typesize. We
+% set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times
+% 1.5$. As it happens, in these classes |\topskip| is equal to the
+% typesize, therefor we set |\maxdepth| to half the value of
+% |\topskip|.
+% \begin{macrocode}
+\if@compatibility
+ \setlength\maxdepth{4\p@}
+\else
+ \setlength\maxdepth{.5\topskip}
+\fi
+\setlength\@maxdepth\maxdepth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{The dimension of text}
+%
+% \begin{macro}{\textwidth}
+% When we are in compatibility mode we have to make sure that the
+% dimensions of the printed area are not different from what the
+% user was used to see.
+%
+% \begin{macrocode}
+\if@compatibility
+ \setlength\textwidth{460\p@}
+% \end{macrocode}
+% When we are not in compatibility mode we can set some of the
+% dimensions differently, taking into account the paper size for
+% instance.
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% First, we calculate the maximum textwidth, which depends on the
+% papersize. Then we calculate the approximate length of 65
+% characters, which should be the maximum length of a line of text.
+% The calculated values are stored in |\@tempdima| and |\@tempdimb|.
+% \begin{macrocode}
+ \setlength\@tempdima{\paperwidth}
+ \addtolength\@tempdima{-2in}
+ \setbox\@tempboxa\hbox{\rmfamily im}
+ \setlength\@tempdimb{.5\wd\@tempboxa}
+ \setlength\@tempdimb{65\@tempdimb}
+% \end{macrocode}
+%
+% Now we can set the |\textwidth|, depending on whether we will be
+% setting one or two columns.
+%
+% The text should not be wider than the minimum
+% of the paperwidth (minus 2 inches for the margins) and the
+% maximum length of a line as defined by the number of characters.
+% \begin{macrocode}
+ \ifdim\@tempdima>\@tempdimb\relax
+ \setlength\textwidth{\@tempdimb}
+ \else
+ \setlength\textwidth{\@tempdima}
+ \fi
+\fi
+% \end{macrocode}
+%
+% Here we modify the width of the text a little to be a whole
+% number of points.
+% \begin{macrocode}
+\@settopoint\textwidth
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\columnwidth}
+% \begin{macro}{\columnsep}
+% \begin{macro}{\columnseprule}
+% \begin{macrocode}
+\columnwidth \textwidth
+\columnsep 10pt
+\columnseprule \z@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\textheight}
+% Now that we have computed the width of the text, we have to take
+% care of the height. The |\textheight| is the height of text
+% (including footnotes and figures, excluding running head and
+% foot).
+%
+% First make sure that the compatibility mode gets the same
+% dimensions as we had with \LaTeX2.09. The number of lines was
+% calculated as the floor of the old |\textheight| minus
+% |\topskip|, divided by |\baselineskip| for |\normalsize|. The
+% old value of |\textheight| was 528pt.
+%
+% \begin{macrocode}
+\if@compatibility
+ \setlength\textheight{600\p@}
+% \end{macrocode}
+%
+% Again we compute this, depending on the papersize and depending
+% on the baselineskip that is used, in order to have a whole number
+% of lines on the page.
+% \begin{macrocode}
+\else
+ \setlength\@tempdima{\paperheight}
+% \end{macrocode}
+%
+% We leave at least a 1 inch margin on the top and the bottom of
+% the page.
+% \begin{macrocode}
+ \addtolength\@tempdima{-2in}
+% \end{macrocode}
+%
+% We also have to leave room for the running headers and footers.
+% \begin{macrocode}
+ \addtolength\@tempdima{-1in}
+% \end{macrocode}
+%
+% Then we divide the result by the current |\baselineskip| and
+% store this in the count register |\@tempcnta|, which then
+% contains the number of lines that fit on this page.
+% \begin{macrocode}
+ \divide\@tempdima\baselineskip
+ \@tempcnta=\@tempdima
+% \end{macrocode}
+%
+% From this we can calculate the height of the text.
+% \begin{macrocode}
+ \setlength\textheight{\@tempcnta\baselineskip}
+\fi
+% \end{macrocode}
+%
+% The first line on the page has a height of |\topskip|.
+% \begin{macrocode}
+\advance\textheight by \topskip
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Margins}
+%
+% \begin{macro}{\oddsidemargin}
+% \begin{macro}{\evensidemargin}
+% \begin{macro}{\marginparwidth}
+% First we give the values for the compatibility mode.
+%
+% Values for two-sided printing:
+% \begin{macrocode}
+\if@compatibility
+ \setlength\oddsidemargin {17\p@}
+ \setlength\evensidemargin {17\p@}
+ \setlength\marginparwidth {20\p@}
+\else
+% \end{macrocode}
+%
+% When we are not in compatibility mode we can take the dimensions
+% of the selected paper into account.
+%
+% We center the text on the page, by
+% calculating the difference between |textwidth| and
+% |\paperwidth|$-$|2in|. Half of that difference is then used for
+% the margin. The amount of space that can be used for marginal
+% notes is at least 0.8~inch, to which we add any `leftover' space.
+% \begin{macrocode}
+ \setlength\@tempdima {\paperwidth}
+ \addtolength\@tempdima {-2in}
+ \addtolength\@tempdima {-\textwidth}
+ \setlength\oddsidemargin {.5\@tempdima}
+ \setlength\marginparwidth {.8in}
+ \addtolength\marginparwidth {.5\@tempdima}
+% \end{macrocode}
+%
+% The |\evensidemargin| can now be computed from the values set
+% above.
+% \begin{macrocode}
+\setlength\evensidemargin {\paperwidth}
+\addtolength\evensidemargin{-2in}
+\addtolength\evensidemargin{-\textwidth}
+\addtolength\evensidemargin{-\oddsidemargin}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\marginparsep}
+% \begin{macro}{\marginparpush}
+% The horizontal space between the main text and marginal notes is
+% determined by |\marginparsep|, the minimum vertical separation
+% between two marginal notes is controlled by |\marginparpush|.
+% \begin{macrocode}
+\setlength\marginparsep {5\p@}
+\setlength\marginparpush{5\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\topmargin}
+% The |\topmargin| is the distance between the top of `the
+% printable area' --which is 1 inch below the top of the paper--
+% and the top of the box which contains the running head.
+%
+% It can now be computed from the values set above.
+% \begin{macrocode}
+\if@compatibility
+ \setlength\topmargin{-10pt}
+\else
+ \setlength\topmargin{\paperheight}
+ \addtolength\topmargin{-2in}
+ \addtolength\topmargin{-\headheight}
+ \addtolength\topmargin{-\headsep}
+ \addtolength\topmargin{-\textheight}
+ \addtolength\topmargin{-\footskip} % this might be wrong!
+% \end{macrocode}
+% By changing the factor in the next line the complete page
+% can be shifted vertically.
+% \begin{macrocode}
+ \addtolength\topmargin{-.5\topmargin}
+\fi
+\@settopoint\topmargin
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Footnotes}
+%
+% \begin{macro}{\footnotesep}
+% |\footnotesep| is the height of the strut placed at the beginning
+% of every footnote. It equals the height of a normal
+% |\footnotesize| strut in this
+% class, thus no extra space occurs between footnotes.
+% \begin{macrocode}
+\setlength\footnotesep{20\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footins}
+% |\skip\footins| is the space between the last line of the main
+% text and the top of the first footnote.
+% \begin{macrocode}
+\setlength{\skip\footins}{10\p@ \@plus 2\p@ \@minus 4\p@}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Page Styles}
+%
+% The page style \pstyle{foo} is defined by defining the command
+% |\ps@foo|. This command should make only local definitions.
+% There should be no stray spaces in the definition, since they
+% could lead to mysterious extra spaces in the output (well, that's
+% something that should be always avoided).
+%
+% \begin{macro}{\@evenhead}
+% \begin{macro}{\@oddhead}
+% \begin{macro}{\@evenfoot}
+% \begin{macro}{\@oddfoot}
+% The |\ps@...| command defines the macros |\@oddhead|,
+% |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
+% heads and feet---e.g., |\@oddhead| is the macro to produce the
+% contents of the heading box for odd-numbered pages. It is called
+% inside an |\hbox| of width |\textwidth|.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% The page styles of slides is determined by the 'slide' page style,
+% the slide environment executing a |\thispagestyle{slide}| command.
+% The page styles of overlays and notes are similarly determined by
+% 'overlay' and 'note' page styles. The command standard 'headings',
+% 'plain' and 'empty' page styles work by redefining the 'slide',
+% 'overlay', and 'note' styles.
+%
+% \changes{v2.3q}{1995/09/20}{Wrap some long lines, and use \cs{null}.}
+% \begin{macro}{\ps@headings}
+% \begin{macrocode}
+\if@compatibility
+\def\ps@headings{%
+\def\ps@slide{\def\@oddfoot{\@mainsize +\hfil\hb@xt@3em{\theslide
+ \hss}}%
+ \def\@oddhead{\@mainsize +\hfil +}%
+ \def\@evenfoot{\@mainsize +\hfil\hb@xt@3em{\theslide\hss}}%
+ \def\@evenhead{\@mainsize +\hfil +}}
+
+\def\ps@overlay{\def\@oddfoot{\@mainsize +\hfil\hb@xt@3em{\theoverlay
+ \hss}}%
+ \def\@oddhead{\@mainsize +\hfil +}%
+ \def\@evenfoot{\@mainsize +\hfil\hb@xt@3em{\theoverlay\hss}}%
+ \def\@evenhead{\@mainsize +\hfil +}}
+\def\ps@note{\def\@oddfoot{\@mainsize \hbox{}\hfil\thenote}%
+ \def\@oddhead{}%
+ \def\@evenfoot{\@mainsize \hbox{}\hfil\thenote}%
+ \def\@evenhead{}}}
+%
+\else %%if@compatibility
+%
+\def\ps@headings{%
+ \def\ps@slide{%
+ \def\@oddfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theslide\hss}}%
+ \def\@oddhead{}%
+ \def\@evenfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theslide\hss}}%
+ \def\@evenhead{}}
+
+ \def\ps@overlay{%
+ \def\@oddfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theoverlay\hss}}%
+ \def\@oddhead{}%
+ \def\@evenfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theoverlay\hss}}%
+ \def\@evenhead{}}
+
+ \def\ps@note{%
+ \def\@oddfoot{%
+ \@mainsize
+ \if@clock
+ \fbox{\large \@arabic\c@minutes\space min}%
+ \else
+ \null
+ \fi
+ \hfil\thenote}%
+ \def\@oddhead{}%
+ \def\@evenfoot{%
+ \@mainsize
+ \if@clock
+ \fbox{\large \@arabic\c@minutes\space min}%
+ \else
+ \null
+ \fi
+ \hfil\thenote}%
+ \def\@evenhead{}}}
+\fi %% if@compatibility
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ps@plain}
+% \begin{macrocode}
+\def\ps@plain{\def\ps@slide{%
+ \def\@oddfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theslide\hss}}%
+ \def\@oddhead{}%
+ \def\@evenfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theslide\hss}}%
+ \def\@evenhead{}}
+\def\ps@overlay{\def\@oddfoot{\@mainsize
+ \mbox{}\hfil\hb@xt@3em{\theoverlay\hss}}%
+ \def\@oddhead{}%
+ \def\@evenfoot{\@mainsize \mbox{}\hfil\hb@xt@3em{\theoverlay\hss}}%
+ \def\@evenhead{}}
+\def\ps@note{\def\@oddfoot{\@mainsize \hbox{}\hfil\thenote}%
+ \def\@oddhead{}%
+ \def\@evenfoot{\@mainsize \hbox{}\hfil\thenote}%
+ \def\@evenhead{}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ps@empty}
+% \begin{macrocode}
+\def\ps@empty{%
+\def\ps@slide{\def\@oddhead{}\def\@oddfoot{}%
+\def\@evenhead{}\def\@evenfoot{}}%
+\def\ps@overlay{\def\@oddhead{}\def\@oddfoot{}%
+\def\@evenhead{}\def\@evenfoot{}}%
+\def\ps@note{\def\@oddhead{}\def\@oddfoot{}%
+\def\@evenhead{}\def\@evenfoot{}}}
+% \end{macrocode}
+% \end{macro}
+%
+% Default definition the 'slide', 'overlay', and 'note' page styles.
+% \begin{macrocode}
+\ps@headings
+% \end{macrocode}
+% Set ordinary page style to 'empty'
+% \begin{macrocode}
+\let\@oddhead\@empty\let\@oddfoot\@empty
+\let\@evenhead\@empty\let\@evenfoot\@empty
+% \end{macrocode}
+%
+%
+% \subsection{Providing math {\em versions}}
+%
+% \LaTeX{} provides two {\em versions\/}. We call them
+% \textsf{normal} and \textsf{bold}, respectively.
+% \SliTeX{} does not have a \textsf{bold} version. But we treat the
+% invisible characters as a version. The only thing we have to take
+% care of is to ensure that we have exactly the same fonts in both
+% versions available.
+%
+% \begin{macrocode}
+\DeclareMathVersion{invisible}
+% \end{macrocode}
+%
+% Now we define the basic {\em math groups\/} used by \LaTeX{}. Later
+% on, in packages some other {\em math groups}, e.g., the AMS
+% symbol fonts, will be defined.
+%
+% As a default I used serif fonts for mathgroup 0 to get things like
+% \verb+\log+ look right.
+% \begin{macrocode}
+\SetSymbolFont{operators}{normal}
+ {OT1}{lcmss}{m}{n}
+
+\SetSymbolFont{letters}{normal}
+ {OML}{lcmm}{m}{it}
+\SetSymbolFont{symbols}{normal}
+ {OMS}{lcmsy}{m}{n}
+\SetSymbolFont{largesymbols}{normal}
+ {OMX}{lcmex}{m}{n}
+
+\SetSymbolFont{operators}{invisible}
+ {OT1}{lcmss}{m}{In}
+\SetSymbolFont{letters}{invisible}
+ {OML}{lcmm}{m}{Iit}
+\SetSymbolFont{symbols}{invisible}
+ {OMS}{lcmsy}{m}{In}
+\SetSymbolFont{largesymbols}{invisible}
+ {OMX}{lcmex}{m}{In}
+
+
+\def\@mainsize{\visible\tiny}
+% \end{macrocode}
+%
+%
+% \subsection{Environments}
+%
+% \begin{environment}{titlepage}
+% This environment starts a new page, with pagestyle \pstyle{empty}
+% and sets the page counter to 0.
+% \begin{macrocode}
+\newenvironment{titlepage}
+ {\newpage
+ \thispagestyle{empty}%
+ \setcounter{page}{\z@}}
+ {\newpage}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{General List Parameters}
+%
+% The following commands are used to set the default values for the
+% list environment's parameters. See the \LaTeX{} manual for an
+% explanation of the meaning of the parameters.
+%
+% \begin{macro}{\leftmargini}
+% \begin{macro}{\leftmarginii}
+% \begin{macro}{\leftmarginiii}
+% \begin{macro}{\leftmarginiv}
+% \begin{macro}{\leftmarginv}
+% \begin{macro}{\leftmarginvi}
+% \begin{macrocode}
+\setlength\leftmargini {38\p@}
+\setlength\leftmarginii {30\p@}
+\setlength\leftmarginiii {20\p@}
+\setlength\leftmarginiv {15\p@}
+\setlength\leftmarginv {15\p@}
+\setlength\leftmarginvi {10\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@listi}
+% \begin{macro}{\@listii}
+% \begin{macro}{\@listiii}
+% \begin{macro}{\@listiv}
+% \begin{macro}{\@listv}
+% \begin{macro}{\@listvi}
+% These commands set the values of |\leftmargin|, |\parsep|,
+% |\topsep|, and |\itemsep| for the various levels of lists.
+% \changes{v2.3z}{1997/08/15}{Add initialization of \cs{leftmargin} to
+% \cs@listi.}
+% It is even necessary to initialize |\leftmargin| in |\@listi|,
+% i.e. for a level one list, as a list environment may appear
+% inside a \texttt{trivlist}, for example inside a \texttt{theorem}
+% environment.
+% \begin{macrocode}
+\def\@listi{\leftmargin\leftmargini
+ \parsep .5\parskip
+ \topsep \parsep
+ \itemsep\parskip
+ \partopsep \z@}
+
+\def\@listii{\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \parsep .5\parskip
+ \topsep \parsep
+ \itemsep\parskip}
+\def\@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep}
+\def\@listiv{\leftmargin\leftmarginiv
+ \labelwidth\leftmarginiv
+ \advance\labelwidth-\labelsep}
+\def\@listv{\leftmargin\leftmarginv
+ \labelwidth\leftmarginv
+ \advance\labelwidth-\labelsep}
+\def\@listvi{\leftmargin\leftmarginvi
+ \labelwidth\leftmarginvi
+ \advance\labelwidth-\labelsep}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Here we initialize |\leftmargin| and |\labelwidth|.
+% \begin{macrocode}
+\leftmargin\leftmargini
+\labelwidth\leftmargini\advance\labelwidth-\labelsep
+% \end{macrocode}
+%
+%
+% \subsubsection{Paragraph-formatting environments}
+%
+% \begin{environment}{verse}
+% Inside a |verse| environment, |\\| ends a line, and
+% line continuations are indented further.
+% A blank line makes new paragraph with |\parskip| space.
+% \begin{macrocode}
+\newenvironment{verse}{\let\\=\@centercr
+ \list{}{\itemsep \z@
+ \itemindent -15\p@
+ \listparindent \itemindent
+ \rightmargin \leftmargin
+ \advance\leftmargin 15\p@}%
+ \item[]}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{quotation}
+% The |quotation| environment fills lines, indents paragraphs.
+% \begin{macrocode}
+\newenvironment{quotation}{\list{}{\listparindent 20\p@
+ \itemindent\listparindent
+ \rightmargin\leftmargin}%
+ \item[]}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{quote}
+% The |quote| environment is the same as the |quotation| environment,
+% except that there is no paragraph indentation.
+% \begin{macrocode}
+\newenvironment{quote}{\list{}{\rightmargin\leftmargin}\item[]}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \subsubsection{List-making environments}
+%
+%
+% \begin{environment}{description}
+% The description environment is defined here -- while the itemize
+% and enumerate environments are defined in \file{latex.dtx}.
+%
+% \begin{macrocode}
+\newenvironment{description}{\list{}{\labelwidth\z@
+ \itemindent-\leftmargin
+ \let\makelabel\descriptionlabel}}
+ {\endlist}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\descriptionlabel}
+% To change the formatting of the label, you must redefine
+% |\descriptionlabel|.
+% \begin{macrocode}
+\newcommand*{\descriptionlabel}[1]{\hspace\labelsep
+ \normalfont\bfseries #1}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Enumerate}
+%
+% The enumerate environment uses four counters: \Lcount{enumi},
+% \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
+% \Lcount{enumN} controls the numbering of the Nth level
+% enumeration.
+%
+% \begin{macro}{\theenumi}
+% \begin{macro}{\theenumii}
+% \begin{macro}{\theenumiii}
+% \begin{macro}{\theenumiv}
+% The counters are already defined in \file{latex.dtx}, but their
+% representation is changed here.
+%
+% \begin{macrocode}
+\renewcommand\theenumi{\@arabic\c@enumi}
+\renewcommand\theenumii{\@alph\c@enumii}
+\renewcommand\theenumiii{\@roman\c@enumiii}
+\renewcommand\theenumiv{\@Alph\c@enumiv}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\labelenumi}
+% \begin{macro}{\labelenumii}
+% \begin{macro}{\labelenumiii}
+% \begin{macro}{\labelenumiv}
+% The label for each item is generated by the four commands
+% |\labelenumi| \ldots\ |\labelenumiv|.
+% \changes{v2.3k}{1994/12/12}{Handle the \cs{label...} commands as in
+% the other class files}
+% \begin{macrocode}
+\newcommand\labelenumi{\theenumi.}
+\newcommand\labelenumii{(\theenumii)}
+\newcommand\labelenumiii{\theenumiii.}
+\newcommand\labelenumiv{\theenumiv.}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\p@enumii}
+% \begin{macro}{\p@enumiii}
+% \begin{macro}{\p@enumiv}
+% The expansion of |\p@enumN||\theenumN| defines the output of a
+% |\ref| command when referencing an item of the Nth level of an
+% enumerated list.
+% \begin{macrocode}
+\renewcommand\p@enumii{\theenumi}
+\renewcommand\p@enumiii{\theenumi(\theenumii)}
+\renewcommand\p@enumiv{\p@enumiii\theenumiii}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Itemize}
+%
+%
+% \begin{macro}{\labelitemi}
+% \begin{macro}{\labelitemii}
+% \changes{v2.3x}{1996/08/25}{replaced -{}- with \cs{textendash}}
+% \begin{macro}{\labelitemiii}
+% \begin{macro}{\labelitemiv}
+% Itemization is controlled by four commands: |\labelitemi|,
+% |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which\
+% define the labels of the various itemization levels.
+% \begin{macrocode}
+\newcommand\labelitemi{$\m@th\bullet$}
+\newcommand\labelitemii{\normalfont\bfseries \textendash}
+\newcommand\labelitemiii{$\m@th\ast$}
+\newcommand\labelitemiv{$\m@th\cdot$}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Setting parameters for existing environments}
+%
+% \subsubsection{Array and tabular}
+%
+% \begin{macro}{\arraycolsep}
+% The columns in an array environment are separated by
+% 2|\arraycolsep|.% Array and tabular environment parameters
+% \begin{macrocode}
+\setlength\arraycolsep{8\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabcolsep}
+% The columns in an tabular environment are separated by
+% 2|\tabcolsep|.
+% \begin{macrocode}
+\setlength\tabcolsep{10\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\arrayrulewidth}
+% The width of rules in the array and tabular environments is given
+% by the length parameter|\arrayrulewidth|.
+% \begin{macrocode}
+\setlength\arrayrulewidth{.6\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\doublerulesep}
+% The space between adjacent rules in the array and tabular
+% environments is given by |\doublerulesep|.
+% \begin{macrocode}
+\setlength\doublerulesep{3\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Tabbing}
+%
+% \begin{macro}{\tabbingsep}
+% This controls the space that the |\'| command puts in. (See
+% \LaTeX{} manual for an explanation.)
+% \begin{macrocode}
+\labelsep 10pt
+\setlength\tabbingsep{\labelsep}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Minipage}
+%
+% \begin{macro}{\@minipagerestore}
+% The macro |\@minipagerestore| is called upon entry to a minipage
+% environment to set up things that are to be handled differently
+% inside a minipage environment. In the current styles, it does
+% nothing.
+% \end{macro}
+%
+% \begin{macro}{\@mpfootins}
+% Minipages have their own footnotes; |\skip||\@mpfootins| plays
+% same r\^ole for footnotes in a minipage as |\skip||\footins| does
+% for ordinary footnotes.
+%
+% \begin{macrocode}
+\skip\@mpfootins = \skip\footins
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Framed boxes}
+%
+% \begin{macro}{\fboxsep}
+% The space left by |\fbox| and |\framebox| between the box and the
+% text in it.
+% \begin{macro}{\fboxrule}
+% The width of the rules in the box made by |\fbox| and |\framebox|.
+% \begin{macrocode}
+\setlength\fboxsep{5\p@}
+\setlength\fboxrule{.6\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\theequation}
+% The equation number will be typeset as arabic numerals.
+% \begin{macrocode}
+\def\theequation{\@arabic\c@equation}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\jot}
+% |\jot| is the extra space added between lines of an eqnarray
+% environment. The default value is used.
+% \begin{macrocode}
+% \setlength\jot{3pt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@eqnnum}
+% The macro |\@eqnnum| defines how equation numbers are to appear in
+% equations. Again the default is used.
+%
+% \begin{macrocode}
+% \def\@eqnnum{(\theequation)}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Font changing}
+%
+% \changes{v2.3j}{1994/11/10}{fixed a few typos}
+%
+% Here we supply the declarative font changing commands that were
+% common in \LaTeX\ version 2.09 and earlier. These commands work
+% in text mode \emph{and} in math mode. They are provided for
+% compatibility, but one should start using the |\text...| and
+% |\math...| commands instead. These commands are redefined using
+% |\DeclareOldFontCommand|, a command with three arguments: the
+% user command to be defined, \LaTeX\ commands to execute in text
+% mode and \LaTeX\ commands to execute in math mode.
+%
+% \begin{macro}{\rm}
+% \begin{macro}{\tt}
+% \begin{macro}{\sf}
+% \changes{v2.2}{1993/12/18}{Changed \cs{@newfontswitch} to
+% \cs{@renewfontswitch}.}
+% \changes{v2.3a}{1994/04/14}{\cs{@renewfontswitch} has become
+% \cs{DeclareOldFontCommand}}
+%
+% The commands to change the family. When in compatibility mode we
+% select the `default' font first, to get \LaTeX2.09 behaviour.
+% \begin{macrocode}
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\bf}
+% The command to change to the bold series. One should use
+% |\mdseries| to explicitly switch back to medium series.
+% \changes{v2.2}{1993/12/18}{Changed \cs{@newfontswitch} to
+% \cs{@renewfontswitch}.}
+% \begin{macrocode}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sl}
+% \begin{macro}{\it}
+% \begin{macro}{\sc}
+% \changes{v2.2}{1993/12/18}{Changed \cs{@newfontswitch} to
+% \cs{@renewfontswitch}.}
+% And the commands to change the shape of the font. The slanted and
+% small caps shapes are not available by default as math alphabets,
+% so those changes do nothing in math mode. One should use
+% |\upshape| to explicitly change back to the upright shape.
+% \begin{macrocode}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cal}
+% \changes{v2.1d}{1993/12/14}{Macro added}
+% \begin{macro}{\mit}
+% \changes{v2.1d}{1993/12/14}{Macro added}
+%
+% The commands |\cal| and |\mit| should only be used in math mode,
+% outside math mode they have no effect. Currently the New Font
+% Selection Scheme defines these commands to generate warning
+% messages. Therefore we have to define them `by hand'.
+% \changes{v2.3k}{1994/12/12}{Now define \cs{cal} and \cs{mit} using
+% \cs{DeclareRobustCommand*}}
+% \begin{macrocode}
+\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
+\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Footnotes}
+%
+%
+% \begin{macro}{\footnoterule}
+% Usually, footnotes are separated from the main body of the text
+% by a small rule. This rule is drawn by the macro |\footnoterule|.
+% We have to make sure that the rule takes no vertical space (see
+% \file{plain.tex}). The resulting rule will appear on all color
+% layers, so it's best not to draw a rule.
+% \begin{macrocode}
+\renewcommand\footnoterule{}
+% \let \footnoterule = \relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@footnote}
+% \begin{macro}{\thefootnote}
+% Footnotes are numbered within slides, overlays, and notes and
+% numbered with $\ast$, $\dagger$, etc.
+% \begin{macrocode}
+% \newcounter{footnote}
+\def\thefootnote{\fnsymbol{footnote}}
+\@addtoreset{footnote}{slide}
+\@addtoreset{footnote}{overlay}
+\@addtoreset{footnote}{note}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\@makefntext}
+% \changes{v2.2i}{1994/03/08}{Always call \cs{@makefnmark}.}
+% The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
+% to produce the actual footnote. The macro gets the text of the
+% footnote as its argument and should use |\@makefnmark| to produce
+% the mark of the footnote. The macro |\@makefntext| is called when
+% effectively inside a |\parbox| of width |\columnwidth| (i.e.,
+% with |\hsize| = |\columnwidth|).
+%
+% An example of what can be achieved is given by the following piece
+% of \TeX\ code.
+% \begin{verbatim}
+% \long\def\@makefntext#1{%
+% \@setpar{\@@par
+% \@tempdima = \hsize
+% \advance\@tempdima-10pt
+% \parshape \@ne 10pt \@tempdima}%
+% \par
+% \parindent 1em\noindent
+% \hbox to \z@{\hss\@makefnmark}#1}
+% \end{verbatim}
+% The effect of this definition is that all lines of the footnote
+% are indented by 10pt, while the first line of a new paragraph is
+% indented by 1em. To change these dimensions, just substitute the
+% desired value for `10pt' (in both places) or `1em'. The mark is
+% flushright against the footnote.
+%
+% In these document classes we use a simpler macro, in which the
+% footnote text is set like an ordinary text paragraph, with no
+% indentation except on the first line of a paragraph, and the
+% first line of the footnote. Thus, all the macro must do is set
+% |\parindent| to the appropriate value for succeeding paragraphs
+% and put the proper indentation before the mark.
+%
+% \begin{macrocode}
+\long\def\@makefntext#1{
+ \noindent
+ \hangindent 10\p@
+ \hb@xt@10\p@{\hss\@makefnmark}#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefnmark}
+% The footnote markers that are printed in the text to point to the
+% footnotes should be produced by the macro |\@makefnmark|. We use
+% the default definition for it.
+% \begin{macrocode}
+%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{The title}
+% The commands |\title|, |\author|, and |\date| are already
+% defined, so here we just define |\maketitle|.
+%
+% \changes{v2.3s}{1995/10/10}{Move \cs{par} inside the scope of
+% \cs{Large}, to get even line spacing.}
+% \begin{macrocode}
+\newcommand\maketitle{{\centering {\Large \@title \par}%
+ \@author \par \@date\par}%
+ \if@titlepage \break \fi}
+% \end{macrocode}
+
+% \section{Initialisation}
+%
+% \subsection{Date}
+%
+% \begin{macro}{\today}
+% 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
+ 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}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Default initializations
+%
+% \begin{macrocode}
+\pagenumbering{arabic}
+\onecolumn
+%</class>
+% \end{macrocode}
+%
+% \subsection{Basic code}
+%
+% The code below is basically a copy of |slitex.tex| with some
+% changes.
+%
+% Global changes so far:
+%
+% \changes{FMi}{1990/06/01}{\cs{gdef}\cs{@slidesw} ... replaced by a
+% \cs{newifG} which is similar to \cs{newif} but uses \cs{global}
+% inside.}
+%
+%
+% \subsubsection{Hacks for slide macros}
+%
+% \begin{macrocode}
+%<*cmd>
+\message{hacks,}
+
+\outer\def\newifG#1{\count@\escapechar \escapechar\m@ne
+ \expandafter\expandafter\expandafter
+ \edef\@ifG#1{true}{\global\let\noexpand#1\noexpand\iftrue}%
+ \expandafter\expandafter\expandafter
+ \edef\@ifG#1{false}{\global\let\noexpand#1\noexpand\iffalse}%
+ \@ifG#1{false}\escapechar\count@} % the condition starts out false
+\def\@ifG#1#2{\csname\expandafter\ifG@\string#1#2\endcsname}
+{\uccode`1=`i \uccode`2=`f \uccode`3=`G \uppercase{\gdef\ifG@123{G}}}
+ % `ifG' is required
+
+\def\@gobbletoend#1{\def\@argend{#1}\@ggobtoend}
+
+\long\def\@ggobtoend#1\end#2{\fi\def\reserved@a{#2}%
+\ifx\reserved@a\@argend\else\@ggobtoend\fi}
+% \end{macrocode}
+% FMi: I don't see any reason for this command since |\fi| is hidden
+% anyway in the replacement text
+% |\def\@xfi{\fi}|
+% \begin{macrocode}
+ \message{slides,}
+% \end{macrocode}
+%
+% \subsubsection{Slide macros}
+%
+%
+% Switches:\\
+% \begin{tabular}{ll}
+% |@bw| & true if making black and white slides \\
+% |@visible| & true if visible output to be produced.\\
+% |@makingslides| & true if making a slide/overlay/note
+% \end{tabular}
+%
+% \begin{macrocode}
+\newif\if@bw
+\newif\if@visible
+\newif\if@onlyslidesw \@onlyslideswfalse
+\newif\if@onlynotesw \@onlynoteswfalse
+\newif\if@makingslides
+% \end{macrocode}
+% FMi: |\newifG| replaces |\gdef\@slidesw{T}| stuff
+% \begin{macrocode}
+\newifG\ifG@slidesw
+% \end{macrocode}
+% Counters\\
+% \begin{tabular}{ll}
+% slide & slide number\\
+% overlay & overlay number for a slide\\
+% note & note number for a slide
+% \end{tabular}
+%
+% \begin{macrocode}
+\countdef\c@slide=0 \c@slide=0
+\def\cl@slide{}
+\countdef\c@overlay=1 \c@overlay=0
+\def\cl@overlay{}
+\countdef\c@note=2 \c@note=0
+\def\cl@note{}
+% \end{macrocode}
+% Add these counters explicitly to the `ckpt list' so that the
+% |\include| mechanism works.
+% \changes{v2.3u}{1996/05/09}{Make include work: pr/2140(CAR)}
+% \changes{v2.3y}{1997/05/09}{Make include work properly: add the
+% counters in case some are already in there: pr/2140+2474(CAR)}
+% \changes{v2.3v}{1996/05/11}{Do not add page counter here as it is
+% added below(CAR)}
+% \begin{macrocode}
+\g@addto@macro\cl@@ckpt{\@elt{slide}\@elt{overlay}\@elt{note}}
+\@addtoreset{overlay}{slide}
+\@addtoreset{note}{slide}
+% \end{macrocode}
+% Redefine page counter to some other number.
+% The page counter will always be zero except when putting out an
+% extra page for a slide, note or overlay.
+% \begin{macrocode}
+\@definecounter{page}
+\@addtoreset{page}{slide}
+\@addtoreset{page}{note}
+\@addtoreset{page}{overlay}
+
+\def\theslide{\@arabic\c@slide}
+\def\theoverlay{\theslide-\@alph\c@overlay}
+\def\thenote{\theslide-\@arabic\c@note}
+% \end{macrocode}
+% \begin{verbatim}
+% \@setlimits \LIST \LOW \HIGH
+%
+% Assumes that \LIST = RANGE1,RANGE2,...,RANGEn (n>0)
+% Where RANGEi = j or j-k.
+%
+% Then \@setlimits globally sets
+% (i) \LIST := RANGE2, ... , RANGEn
+% (ii) \LOW := p
+% (iii) \HIGH := q
+% where either RANGE1 = p-q or RANGE1 = p and q=p.
+%\end{verbatim}
+% \begin{macrocode}
+\def\@sl@getargs#1-#2-#3\relax#4#5{\xdef#4{#1}\xdef#5{#2}}
+\def\@sl@ccdr#1,#2\relax#3#4{\xdef#3{#1-#1-}\xdef#4{#2}}
+
+\def\@setlimits #1#2#3{\expandafter\@sl@ccdr#1\relax\@sl@gtmp #1%
+\expandafter\@sl@getargs\@sl@gtmp\relax#2#3}
+% \end{macrocode}
+% \begin{verbatim}
+% \onlyslides{LIST} ::=
+% BEGIN
+% @onlyslidesw := true
+% \@doglslidelist :=G LIST,999999,999999
+% if @onlynotesw = true
+% else @onlynotesw := true
+% \@doglnotelist :=G LIST,999999,999999
+% fi
+% message: Only Slides LIST
+% END
+%\end{verbatim}
+% \begin{macrocode}
+\def\onlyslides#1{\@onlyslideswtrue
+ \gdef\@doglslidelist{#1,999999,999999}%
+ \if@onlynotesw \else
+ \@onlynoteswtrue\gdef\@doglnotelist{999999,999999}\fi
+ \typeout{Only Slides #1}}
+% \end{macrocode}
+%\begin{verbatim}
+% \onlynotes{LIST} ::=
+% BEGIN
+% @onlynotesw := true
+% \@doglnotelist :=G LIST,999999,999999
+% if @onlyslidesw = true
+% else \@onlyslidesw := true
+% \@doglslidelist{999999,999999}
+% fi
+% message: Only Notes LIST
+% END
+%\end{verbatim}
+% \begin{macrocode}
+\def\onlynotes#1{\@onlynoteswtrue
+ \gdef\@doglnotelist{#1,999999,999999}%
+ \if@onlyslidesw \else
+ \@onlyslideswtrue\gdef\@doglslidelist{999999,999999}\fi
+ \typeout{Only Notes #1}}
+% \end{macrocode}
+%\begin{verbatim}
+% \setupcounters ::= (similar to old \blackandwhite #1 ::= )
+% \newpage
+% page counter := 0
+% @bw := T
+% @visible := T
+% if @onlyslidesw = true
+% then \@doslidelist := \@doglslidelist
+% \@setlimits\@doslidelist\@doslidelow\@doslidehigh
+% fi
+% if @onlynotesw = true
+% then \@donotelist := \@doglnotelist
+% \@setlimits\@donotelist\@donotelow\@donotehigh
+% fi
+% \normalsize % Note, this sets font to \rmfamily , which sets
+% % \@currfont to \rmfamily
+% counter slidenumber := 0
+% counter note := 0
+% counter overlay := 0
+% @makingslides := F %% \blackandwhite: @makingslides := T
+% %% input #1
+% %% @makingslides := F
+%\end{verbatim}
+% \begin{macrocode}
+\if@compatibility
+% In compatibility mode, need to define \verb+\blackandwhite+,
+% \verb+\colors+, \verb+\colorslides+, etc.
+\def\blackandwhite#1{\newpage\setcounter{page}{0}\@bwtrue\@visibletrue
+\if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
+\@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
+\if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
+\@setlimits\@donotelist\@donotelow\@donotehigh\fi
+\normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
+\setcounter{note}{0}\@makingslidestrue\input #1\@makingslidesfalse}
+% \end{macrocode}
+%\begin{verbatim}
+% \colors{COLORS} ::=
+% for \@colortemp := COLORS
+% do \csname \@colortemp \endcsname == \@color{\@colortemp} od
+% if \@colorlist = empty
+% then \@colorlist := COLORS
+% else \@colorlist := \@colorlist , COLORS
+% fi
+%\end{verbatim}
+%
+% \begin{macrocode}
+\def\colors#1{\@for\@colortemp:=#1\do{\expandafter
+ \xdef\csname\@colortemp\endcsname{\noexpand\@color{\@colortemp}}}\ifx
+ \@colorlist\@empty \gdef\@colorlist{#1}%
+ \else \xdef\@colorlist{\@colorlist,#1}\fi}
+
+\def\@colorlist{}
+% \end{macrocode}
+%\begin{verbatim}
+% \colorslides{FILE} ::=
+% \newpage
+% page counter := 0
+% @bw := F
+% for \@currcolor := \@colorlist
+% do @visible := T
+% if @onlyslidesw = true
+% then \@doslidelist := \@doglslidelist
+% \@setlimits\@doslidelist\@doslidelow\@doslidehigh
+% fi
+% if @onlynotesw = true
+% then \@donotelist := \@doglnotelist
+% \@setlimits\@donotelist\@donotelow\@donotehigh
+% fi
+% \normalsize
+% counter slide := 0
+% counter overlay := 0
+% counter note := 0
+% type message
+% generate color layer output page
+% @makingslides := T
+% input #1
+% @makingslides := F
+% od
+%\end{verbatim}
+% \begin{macrocode}
+\def\colorslides#1{\newpage\setcounter{page}{0}\@bwfalse
+\@for\@currcolor:=\@colorlist\do
+{\@visibletrue
+\if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
+\@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
+\if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
+\@setlimits\@donotelist\@donotelow\@donotehigh\fi
+\normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
+\setcounter{note}{0}\typeout{color \@currcolor}%
+\newpage
+\begin{huge}%
+\begin{center}%
+COLOR LAYER\\[.75in]%
+\@currcolor
+\end{center}%
+\end{huge}%
+\newpage
+\@makingslidestrue
+\input #1
+\@makingslidesfalse}}
+%
+\else %% if@compatibility
+%
+\def\setupcounters{\newpage\setcounter{page}{0}\@bwtrue\@visibletrue
+\if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
+\@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
+\if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
+\@setlimits\@donotelist\@donotelow\@donotehigh\fi
+\normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
+\setcounter{note}{0}\@makingslidesfalse}
+
+\AtBeginDocument{\setupcounters}
+\fi %% if@compatibility
+% \end{macrocode}
+%\begin{verbatim}
+% \slide COLORS ::=
+% BEGIN
+% \changes{v2.3}{1994/03/16}{Moved \cs{newpage} up front, here and in
+% \cs{note} and \cs{overlay}}
+% \par\break
+% \stepcounter{slide}
+% \setcounter{page}{0} % in case of non-slide pages
+% \@slidesw :=G T
+% if @onlyslidesw = true % set \@slidesw = T iff
+% then % page to be output
+% while \c@slide > \@doslidehigh
+% do \@setlimits\@doslidelist\@doslidelow\@doslidehigh od
+% if \c@slide < \@doslidelow
+% then \@slidesw := F
+% fi
+% fi
+% if \@slidesw = T
+% then \@slidesw :=G F
+% \begingroup
+% if @bw = true
+% then \@slidesw :=G T
+% else \@color{COLORS}
+% \if@visible then \@slidesw :=G T \fi
+% fi
+% \endgroup
+% fi
+% if \@slidesw = T
+% then @makingslides := T
+% \thispagestyle{slide}
+% else \end{slide}
+% \@gobbletoend{slide}
+% fi
+% END
+%
+% \endslide ::=
+% BEGIN
+% \par\break
+% END
+%\end{verbatim}
+% \begin{macrocode}
+\if@compatibility
+\def\slide#1{\stepcounter{slide}\G@slideswtrue\if@onlyslidesw
+\@whilenum \c@slide >\@doslidehigh\relax
+\do{\@setlimits\@doslidelist\@doslidelow\@doslidehigh}\ifnum
+\c@slide <\@doslidelow\relax\G@slideswfalse\fi\fi
+\ifG@slidesw
+ \G@slideswfalse
+% FMi this is only a hack at the moment to get things running.
+% \begingroup
+ \if@bw\G@slideswtrue\else
+ \@color{#1}\if@visible \G@slideswtrue \fi
+ \fi
+% \endgroup
+\fi
+\ifG@slidesw \newpage\thispagestyle{slide}%
+% \end{macrocode}
+% This will set up the last color specified in the argument to
+% \verb+\slide+ as the current color. If only back and white slides
+% are prepared \verb+\last@color+ will be empty and effectively
+% \verb+\relax+ will be generated (hopefully).
+%
+% We need to reset to a default font at the beginning of a slide.
+% (not done yet).
+% \begin{macrocode}
+\csname \last@color \endcsname
+% \end{macrocode}
+% \begin{macrocode}
+\else\end{slide}\@gobbletoend{slide}\fi}
+%
+\else %% if@compatibility
+%
+\def\slide{\par\break
+\stepcounter{slide}\setcounter{page}{0}\G@slideswtrue\if@onlyslidesw
+\@whilenum \c@slide >\@doslidehigh\relax
+\do{\@setlimits\@doslidelist\@doslidelow\@doslidehigh}\ifnum
+\c@slide <\@doslidelow\relax\G@slideswfalse\fi\fi
+\ifG@slidesw
+ \G@slideswfalse
+% FMi this is only a hack at the moment to get things running.
+% \begingroup
+ \if@bw\G@slideswtrue\else
+ \if@visible \G@slideswtrue \fi
+ \fi
+% \endgroup
+\fi
+\ifG@slidesw \@makingslidestrue\thispagestyle{slide}%
+% \end{macrocode}
+% This will set up the last color specified in the argument to
+% \verb+\slide+ as the current color. If only back and white slides
+% are prepared \verb+\last@color+ will be empty and effectively
+% \verb+\relax+ will be generated (hopefully).
+%
+% We need to reset to a default font at the beginning of a slide.
+% (not done yet).
+% \begin{macrocode}
+\csname \last@color \endcsname
+% \end{macrocode}
+% \begin{macrocode}
+\else\end{slide}\@gobbletoend{slide}\fi}
+\fi %% if@compatibility
+
+\let\last@color\@empty
+
+\def\endslide{\par\break}
+% \end{macrocode}
+%\begin{verbatim}
+% \overlay COLORS ::=
+% BEGIN
+% \par\break
+% \stepcounter{overlay}
+% \setcounter{page}{0} % in case of non-slide pages
+% \@slidesw :=G T
+% if @onlyslidesw = T % set \@slidesw = T iff
+% then % page to be output
+% if \c@slide < \@doslidelow
+% then \@slidesw :=G F
+% fi
+% fi
+% if \@slidesw = T
+% \@slidesw :=G F
+% \begingroup
+% if @bw = true
+% then \@slidesw :=G T
+% else \@color{COLORS}
+% \if@visible then \@slidesw :=G T \fi
+% fi
+% \endgroup
+% fi
+% if \@slidesw = T
+% then @makingslides := T
+% \thispagestyle{overlay}
+% else \end{overlay}
+% \@gobbletoend{overlay}
+% fi
+% END
+%
+% \endoverlay ::=
+% BEGIN
+% \par\break
+% END
+%\end{verbatim}
+% \begin{macrocode}
+\if@compatibility
+\def\overlay#1{\stepcounter{overlay}\G@slideswtrue%
+\if@onlyslidesw\ifnum \c@slide <\@doslidelow\relax
+\G@slideswfalse\fi\fi
+\ifG@slidesw \G@slideswfalse\begingroup\if@bw\G@slideswtrue%
+\else\@color{#1}\if@visible \G@slideswtrue\fi\fi\endgroup\fi
+\ifG@slidesw \newpage\thispagestyle{overlay}%
+\else\end{overlay}\@gobbletoend{overlay}\fi}
+%
+\else %%if@compatibility
+%
+\def\overlay{\par\break
+ \stepcounter{overlay}%
+ \setcounter{page}{0}%
+ \G@slideswtrue%
+ \if@onlyslidesw\ifnum \c@slide <\@doslidelow\relax
+ \G@slideswfalse\fi\fi
+ \ifG@slidesw \G@slideswfalse
+ \begingroup\if@bw\G@slideswtrue%
+ \else\if@visible \G@slideswtrue\fi\fi
+ \endgroup\fi
+ \ifG@slidesw \@makingslidestrue\thispagestyle{overlay}%
+ \else\end{overlay}\@gobbletoend{overlay}\fi}
+\fi %%if@compatibility
+
+\def\endoverlay{\par\break}
+% \end{macrocode}
+%
+% \changes{v2.0d}{1993/11/12}{Removed extra blank.}
+%\begin{verbatim}
+% \note ::=
+% BEGIN
+% \par\break
+% \stepcounter{note}
+% \setcounter{page}{0} % in case of non-slide pages
+% if @bw = T
+% then
+% \@slidesw :=G T
+% if @onlynotesw = true % set \@notesw = T iff
+% then % page to be output
+% while \c@slide > \@donotehigh
+% do \@setlimits\@donotelist\@donotelow\@donotehigh od
+% if \c@slide < \@donotelow
+% then \@slidesw :=G F
+% fi
+% fi
+% else \@slidesw :=G F
+% fi
+% if \@slidesw = T
+% then @makingslides := T
+% \thispagestyle{note}
+% else \end{note}
+% \@gobbletoend{note}
+% fi
+% END
+%
+% \endnote ::=
+% BEGIN
+% \par\break
+% END
+%\end{verbatim}
+% \begin{macrocode}
+\if@compatibility
+\def\note{\stepcounter{note}%
+ \if@bw
+ \G@slideswtrue
+ \if@onlynotesw\@whilenum \c@slide >\@donotehigh\relax
+ \do{\@setlimits\@donotelist\@donotelow\@donotehigh}\ifnum
+ \c@slide <\@donotelow\relax \G@slideswfalse\fi\fi
+ \else\G@slideswfalse\fi
+ \ifG@slidesw \newpage\thispagestyle{note}\else
+ \end{note}\@gobbletoend{note}\fi}
+%
+\else %%if@compatibility
+%
+\def\note{\par\break\stepcounter{note}\setcounter{page}{0}%
+ \if@bw
+ \G@slideswtrue
+ \if@onlynotesw\@whilenum \c@slide >\@donotehigh\relax
+ \do{\@setlimits\@donotelist\@donotelow\@donotehigh}\ifnum
+ \c@slide <\@donotelow\relax \G@slideswfalse\fi\fi
+ \else\G@slideswfalse\fi
+ \ifG@slidesw \@makingslidestrue\thispagestyle{note}\else
+ \end{note}\@gobbletoend{note}\fi}
+\fi %%if@compatibility
+
+\def\endnote{\par\break}
+% \end{macrocode}
+%\begin{verbatim}
+% \@color{COLORS} ::=
+% BEGIN
+% if math mode
+% then type warning
+% fi
+% if @bw
+% then \visible
+% else \invisible
+% for \last@color := COLORS
+% do if \last@color = \@currcolor
+% then \visible
+% fi
+% od
+% fi
+% \ignorespaces
+% END
+%\end{verbatim}
+% FMi: |\last@color| will be used in |\slide| to set up first
+% color if no color is given.
+% I suppose that this is much too complicated. |\else\@tempswafalse|
+% would produce the same effect I imagine.
+% \begin{macrocode}
+\def\@color#1{\@mmodetest
+ {\if@bw \@tempswatrue \else \@tempswafalse
+ \@for \reserved@a :=#1\do{\ifx\reserved@a\@currcolor\@tempswatrue\fi
+ \let\last@color\reserved@a}\fi
+ \if@tempswa \visible \else \invisible \fi
+ \ignorespaces}}
+
+\def\@mmodetest#1{\ifmmode\ClassWarning{slides}{Color-changing command
+ in math mode has been ignored}\else #1\fi}
+
+\def\invisible{\@mmodetest
+ {\if@visible
+ \@visiblefalse
+ \fontshape\f@shape\selectfont
+ \mathversion{invisible}%
+ \fi
+ \ignorespaces}}
+
+\def\visible{\@mmodetest
+ {\if@visible
+ \else
+ \@visibletrue
+% \end{macrocode}
+% Here is the \LaTeXe{} interface hidden. We use a trick to provide
+% ourselves with a sort of additional attribute without making the
+% current mechanism even larger. The trick is that we denote
+% invisible by putting an uppercase |I| in front of the shape name
+% for invisible shapes and remove it again if we want to become
+% visible.
+% \begin{macrocode}
+ \fontshape{\expandafter\@gobble\f@shape}\selectfont
+ \mathversion{normal}%
+ \fi
+ \ignorespaces}}
+
+\def\fontshape#1{\edef\f@shape{\if@visible \else I\fi #1}}
+% \end{macrocode}
+%
+% \subsection{Macros for font handling}
+%
+% We let |\familydefault| point at |\sfdefault|, to make it easier
+% to use the document class slides with packages that set up other
+% fonts.
+% \begin{macrocode}
+\renewcommand{\familydefault}{\sfdefault}
+% \end{macrocode}
+%
+% \changes{v2.3l}{1994/12/16}{Added the declaration of the lasy font
+% family}
+% The \texttt{latexsym} package, which is needed to be able to access
+% the \LaTeX\ symbol fonts (lasy), sets things up so that for sizes
+% larger then 10 point magnifications of \texttt{lasy10} are
+% used. For slides we want to use magnifications of \texttt{lasy8},
+% so we set up the lasy family here to prevent \LaTeX\ from loading
+% \texttt{Ulasy.fd}.
+% \begin{macrocode}
+\DeclareFontFamily{U}{lasy}{}{}
+\DeclareFontShape{U}{lasy}{m}{n}{%
+ <12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>lasy8
+}{}
+\DeclareFontShape{U}{lasy}{m}{In}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>ilasy8
+}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\message{picture,}
+% \end{macrocode}
+%
+% \subsubsection{Modifications to the picture environment}
+%
+% Below are the new definitions of the picture-drawing macros
+% required for SLiTeX. Only those commands that actually
+% draw something must be changed so that they do not produce
+% any output when the |@visible| switch is false.
+%
+% \changes{v2.2j}{1994/03/11}{Corrected \cs{@oval}, like previous
+% \changes{v2.4a}{2016/03/29}{initialise in \cs{@oval}tests added for latex/4452}
+% change to \file{latex.dtx}.}
+% \begin{macrocode}
+\def\line(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
+\@linelen #3\unitlength
+\ifnum\@xarg =\z@ \@vline
+ \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
+\fi\fi}
+
+\def\vector(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
+\@linelen #3\unitlength
+\ifnum\@xarg =\z@ \@vvector
+ \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
+\fi\fi}
+
+\def\dashbox#1(#2,#3){%
+\leavevmode\if@visible\hb@xt@\z@{\baselineskip \z@
+\lineskip \z@
+\@dashdim #2\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt\@dashdim\z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
+\@width \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(0,#3){\copy\@dashbox}%
+\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
+\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
+\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
+\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
+\@dashdim #3\unitlength
+\@dashcnt=\@dashdim \advance\@dashcnt 200
+\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt \@dashdim=\z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else
+\divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox\hbox{\hskip -\@halfwidth
+\vrule \@width \@wholewidth
+\@height \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(#2,0){\copy\@dashbox}%
+\put(0,#3){\lower\@dashdim\copy\@dashbox}%
+\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
+\@height #1\unitlength}\@tempcnta\z@
+\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\vskip\@dashdim}}\@tempcnta\z@
+\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+\relax\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\vskip\@dashdim}}}\fi\@makepicbox(#2,#3)}
+% \end{macrocode}
+% (re)declare these booleans as they not defined in old format
+% (or with latexrelease package)
+% \begin{macrocode}
+\newif\if@ovvline \@ovvlinetrue
+\newif\if@ovhline \@ovhlinetrue
+% \end{macrocode}
+% \begin{macrocode}
+\def\@oval(#1,#2)[#3]{\if@visible\begingroup \boxmaxdepth \maxdimen
+ \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
+% \end{macrocode}
+% \begin{macrocode}
+ \@ovvlinefalse \@ovhlinefalse
+% \end{macrocode}
+% \begin{macrocode}
+ \@tfor\reserved@a :=#3\do
+ {\csname @ov\reserved@a false\endcsname}%
+ \@ovxx#1\unitlength \@ovyy #2\unitlength
+% \end{macrocode}
+% \begin{macrocode}
+ \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
+ \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi
+% \end{macrocode}
+% \begin{macrocode}
+ \advance \@tempdimb -2\p@
+ \@getcirc \@tempdimb
+ \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
+ \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
+ \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
+% \end{macrocode}
+% \begin{macrocode}
+ \ifdim \@ovdx >\z@ \@ovhlinetrue \fi
+ \ifdim \@ovdy >\z@ \@ovvlinetrue \fi
+% \end{macrocode}
+% \begin{macrocode}
+ \@circlefnt \setbox\@tempboxa
+ \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
+ \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
+ \if@ovt \@ovhorz \kern -\@ovxx \fi
+ \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
+ \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
+ \endgroup\fi}
+
+\def\@circle#1{\if@visible \begingroup \boxmaxdepth \maxdimen
+ \@tempdimb #1\unitlength
+ \ifdim \@tempdimb >15.5\p@\relax \@getcirc\@tempdimb
+ \@ovro\ht\@tempboxa
+ \setbox\@tempboxa\hbox{\@circlefnt
+ \advance\@tempcnta\tw@ \char \@tempcnta
+ \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
+ \advance\@tempcnta\tw@
+ \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
+ \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
+ \else \@circ\@tempdimb{96}\fi\endgroup\fi}
+
+% \end{macrocode}
+%
+% \changes{v2.0d}{1993/11/12}{Removed extra blank.}
+% \begin{macrocode}
+\def\@dot#1{%
+ \if@visible\@tempdimb #1\unitlength \@circ\@tempdimb{112}\fi}
+% \end{macrocode}
+% \changes {v2.3m}{1994/03/20}{(DPC) Remove old \cs{@iframebox} and
+% \cs{fbox} defn}
+% \changes {v2.3m}{1994/03/20}{(DPC) Add \cs{@frameb@x} defn.}
+% \begin{macrocode}
+\def\@frameb@x#1{%
+ \@tempdima\fboxrule
+ \advance\@tempdima\fboxsep
+ \advance\@tempdima\dp\@tempboxa
+ \leavevmode
+ \hbox{%
+ \lower\@tempdima\hbox{%
+ \vbox{%
+ \if@visible\hrule\@height\else\vskip\fi\fboxrule
+ \hbox{%
+ \if@visible\vrule\@width\else\hskip\fi\fboxrule
+ #1%
+ \vbox{%
+ \vskip\fboxsep
+ \box\@tempboxa
+ \vskip\fboxsep}%
+ #1%
+ \if@visible\vrule\@width\else\hskip\fi\fboxrule}%
+ \if@visible\hrule\@height\else\vskip\fi\fboxrule}}}}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\frame#1{\if@visible\leavevmode
+\vbox{\vskip-\@halfwidth\hrule \@height\@halfwidth \@depth \@halfwidth
+ \vskip-\@halfwidth\hbox{\hskip-\@halfwidth \vrule \@width\@wholewidth
+ \hskip-\@halfwidth #1\hskip-\@halfwidth \vrule \@width \@wholewidth
+ \hskip -\@halfwidth}\vskip -\@halfwidth\hrule \@height \@halfwidth
+ \@depth \@halfwidth\vskip -\@halfwidth}\else #1\fi}
+% \end{macrocode}
+%
+% \changes{v2.0d}{1993/11/12}{Corrected \cs{@math} to \cs{m@th} in
+% definition of \cs{underline}.}
+%
+% \begin{macrocode}
+\message{mods,}
+% \end{macrocode}
+%
+%
+% \subsubsection{Other modifications to \TeX{} and \LaTeX{} commands}
+%
+% |\rule|
+% \begin{macrocode}
+\def\@rule[#1]#2#3{\@tempdima#3\advance\@tempdima #1\leavevmode
+ \hbox{\if@visible\vrule
+ \@width#2 \@height\@tempdima \@depth-#1\else
+\vrule \@width \z@ \@height\@tempdima \@depth-#1\vrule
+ \@width#2 \@height\z@\fi}}
+
+% \_ (Added 10 Nov 86)
+
+\def\_{\leavevmode \kern.06em \if@visible\vbox{\hrule \@width.3em}\else
+ \vbox{\hrule \@height \z@ \@width.3em}\vbox{\hrule \@width \z@}\fi}
+% \end{macrocode}
+%\begin{verbatim}
+% \overline, \underline, \frac and \sqrt
+%
+% \@mathbox{STYLE}{BOX}{MTEXT} : Called in math mode, typesets MTEXT and
+% stores result in BOX, using style STYLE.
+%
+% \@bphant{BOX} : Creates a phantom with dimensions BOX.
+% \@vbphant{BOX} : Creates a phantom with ht of BOX and zero width.
+% \@hbphant{BOX} : Creates a phantom with width of BOX
+% and zero ht & dp.
+% \@hvsmash{STYLE}{MTEXT} : Creates a copy of MTEXT with zero height and
+% width in style STYLE.
+%\end{verbatim}
+% \begin{macrocode}
+\def\@mathbox#1#2#3{\setbox#2\hbox{$\m@th#1{#3}$}}
+
+\def\@vbphantom#1{\setbox\tw@\null \ht\tw@\ht #1\dp\tw@\dp #1%
+ \box\tw@}
+
+\def\@bphantom#1{\setbox\tw@\null
+ \wd\tw@\wd #1\ht\tw@\ht #1\dp\tw@\dp #1%
+ \box\tw@}
+
+\def\@hbphantom#1{\setbox\tw@\null \wd\tw@\wd #1\ht\tw@\z@ \dp\tw@\z@
+ \box\tw@}
+
+\def\@hvsmash#1#2{\@mathbox#1\z@{#2}\ht\z@\z@ \dp\z@\z@ \wd\z@\z@
+ \box\z@}
+
+\def\underline#1{\relax\ifmmode
+ \@xunderline{#1}\else $\m@th\@xunderline{\hbox{#1}}$\relax\fi}
+
+\def\@xunderline#1{\mathchoice{\@xyunderline\displaystyle{#1}}%
+ {\@xyunderline
+ \textstyle{#1}}{\@xyunderline\scriptstyle{#1}}{\@xyunderline
+ \scriptscriptstyle{#1}}}
+
+\def\@xyunderline#1#2{%
+ \@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}%
+ \if@visible \@hvsmash#1{\@@underline{\@bphantom\@smashboxa}}\fi
+ \@mathbox#1\@smashboxb{\@@underline{\box\@smashboxa}}%
+ \@bphantom\@smashboxb}
+
+\let\@@overline=\overline
+
+\def\overline#1{\mathchoice{\@xoverline\displaystyle{#1}}{\@xoverline
+ \textstyle{#1}}{\@xoverline\scriptstyle{#1}}{\@xoverline
+ \scriptscriptstyle{#1}}}
+
+\def\@xoverline#1#2{%
+ \@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}%
+ \if@visible \@hvsmash#1{\@@overline{\@bphantom\@smashboxa}}\fi
+ \@mathbox#1\@smashboxb{\@@overline{\box\@smashboxa}}%
+ \@bphantom\@smashboxb}
+% \end{macrocode}
+%
+% \changes{v2.0b}{1993/04/14}{Corrected \cs{frac} command.}
+% \changes{v2.0d}{1993/11/12}{Removed \cs{vcenter} in \cs{@frac}.}
+%
+%\begin{verbatim}
+% \@frac {STYLE}{DENOMSTYLE}{NUM}{DEN}{FONTSIZE} :
+% Creates \frac{NUM}{DENOM}
+% in style STYLE with NUM and DENOM in style DENOMSTYLE
+% FONTSIZE should be \textfont \scriptfont or \scriptscriptfont
+%\end{verbatim}
+% Added a group around the first argument of |\frac| to prevent
+% changes (for example font changes) to modify the contents of the
+% second argument.
+% \changes{v2.1c}{1993/12/13}{Added group around first arg.}
+% \begin{macrocode}
+\def\frac#1#2{\mathchoice
+ {\@frac\displaystyle\textstyle{#1}{#2}\textfont}{\@frac
+ \textstyle\scriptstyle{#1}{#2}\textfont}{\@frac
+ \scriptstyle\scriptscriptstyle{#1}{#2}\scriptfont}{\@frac
+ \scriptscriptstyle\scriptscriptstyle{#1}{#2}\scriptscriptfont}}
+
+\def\@frac#1#2#3#4#5{%
+ \@mathbox#1\@smashboxc{{\begingroup#3\endgroup\over#4}}%
+ \setbox\tw@\null
+ \ht\tw@ \ht\@smashboxc
+ \dp\tw@ \dp\@smashboxc
+ \wd\tw@ \wd\@smashboxc
+ \box\if@visible\@smashboxc\else\tw@\fi}
+
+\def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\@xysqrt#1{#2}$}%
+ \dimen@\ht\z@ \advance\dimen@-\dp\z@
+ \mskip5mu\raise.6\dimen@\copy\rootbox \mskip-10mu\box\z@}
+% \end{macrocode}
+% \changes{v2.3w}{1996/05/15}{Removed use of obsolete command
+% \cs{@@sqrt} (CAR)}
+% \begin{macrocode}
+\def\sqrt{\@ifnextchar[{\@sqrt}{\@xsqrt}}
+\def\@sqrt[#1]{\root #1\of}
+\def\@xsqrt#1{\mathchoice{\@xysqrt\displaystyle{#1}}{\@xysqrt
+ \textstyle{#1}}{\@xysqrt\scriptstyle{#1}}{\@xysqrt
+ \scriptscriptstyle{#1}}}
+\def\@xysqrt#1#2{\@mathbox#1\@smashboxa{#2}\if@visible
+ \@hvsmash#1{\sqrtsign{\@bphantom\@smashboxa}}\fi
+ \phantom{\sqrtsign{\@vbphantom\@smashboxa}}\box\@smashboxa}
+
+\newbox\@smashboxa
+\newbox\@smashboxb
+\newbox\@smashboxc
+% \end{macrocode}
+%
+% array and tabular environments: changes to `\verb+|+', |\hline|,
+% |\cline|, and |\vline|,
+% added 8 Jun 88
+% \begin{macrocode}
+\def\@arrayrule{\if@visible\@addtopreamble{\hskip -.5\arrayrulewidth
+ \vrule \@width \arrayrulewidth\hskip -.5\arrayrulewidth}\fi}
+% \end{macrocode}
+%
+% \changes{v2.3t}{1996/01/31}{Change in \cs{cline} calling interface}
+% \begin{macrocode}
+\def\cline#1{\if@visible\@cline#1\@nil\fi}
+
+\def\hline{\noalign{\ifnum0=`}\fi
+ \if@visible \hrule \@height \arrayrulewidth
+ \else \hrule \@width \z@
+ \fi
+ \futurelet \reserved@a\@xhline}
+
+\def\vline{\if@visible \vrule \@width \arrayrulewidth
+ \else \vrule \@width \arrayrulewidth \@height \z@
+ \@depth \z@ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\message{output,}
+% \end{macrocode}
+%
+% \subsubsection{Changes to \LaTeX{} output routine}
+%
+%\begin{verbatim}
+% \@makecol ==
+% BEGIN
+% % Following test added for slides to check if extra page
+% if @makingslides = T
+% then if \c@page > 0
+% then if \c@note > 0
+% then type 'Note \thenote too long.'
+% else if \c@overlay > 0
+% then type 'Overlay \theoverlay too long.'
+% else type 'Slide \theslide too long'
+% fi fi fi fi
+% ifvoid \insert\footins
+% then \@outputbox := \box255
+% else \@outputbox := \vbox {\unvbox255
+% \vskip \skip\footins
+% \footnoterule
+% \unvbox\@footinsert
+% }
+% fi
+% \@freelist :=G \@freelist * \@midlist
+% \@midlist :=G empty
+% \@combinefloats
+% \@outputbox := \vbox to \@colht{\boxmaxdepth := \maxdepth
+% \vfil %%\vfil added for slides
+% \unvbox\@outputbox
+% \vfil } %%\vfil added for slides
+% \maxdepth :=G \@maxdepth
+% END
+%\end{verbatim}
+% FMi simple hack to allow none centered slides Should be revised
+% of course.
+% \begin{macrocode}
+\let\@topfil\vfil
+
+\def\@makecol{\if@makingslides\ifnum\c@page>\z@ \@extraslide\fi\fi
+\ifvoid\footins \setbox\@outputbox\box\@cclv \let\@botfil\vfil
+ \else\let\@botfil\relax\setbox\@outputbox
+ \vbox{\unvbox\@cclv\vfil
+ \vskip\skip\footins\footnoterule\unvbox\footins\vskip
+ \z@ plus.1fil\relax}\fi
+ \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
+ \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
+ \@topfil\unvbox\@outputbox\@botfil}\global\maxdepth\@maxdepth}
+
+\def\@extraslide{\ifnum\c@note>\z@
+ \ClassWarning{slides}{Note \thenote\space too long}\else
+ \ifnum\c@overlay>\z@
+ \ClassWarning{slides}{Overlay \theoverlay\space too long}\else
+ \ClassWarning{slides}{Slide \theslide\space too long}\fi\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\message{init}
+% \end{macrocode}
+%
+%
+% \subsubsection{Special \SLiTeX{} initializations}
+%
+%FMi why not allow for ref's ?
+% \begin{macrocode}
+% \nofiles
+
+\@visibletrue
+%</cmd>
+% \end{macrocode}
+%
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/slides.ins b/macros/latex-dev/base/slides.ins
new file mode 100644
index 0000000000..a5bbc579c3
--- /dev/null
+++ b/macros/latex-dev/base/slides.ins
@@ -0,0 +1,213 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\Msg{*** Generating slide cmd files and styles ***}
+
+\generate{
+ \file{slides.cls}{
+ \from{slides.dtx}{class}}
+ \file{slides.def}{
+ \from{slides.dtx}{cmd}}
+ }
+
+\Msg{*** Generating default fonts setup file for slides ***}
+
+\preamble
+
+This is a generated file.
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+Details of how to use a configuration file to modify this part of
+the system are in the document `cfgguide.tex'.
+
+
+\endpreamble
+
+
+
+\Msg{*** Generating .fd files ***}
+
+\declarepreamble\fdpreamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+\usedir{tex/latex/base}
+
+\generate{
+ \file{sfonts.def}{
+ \from{slifonts.fdd}{main}}
+ \usepreamble\fdpreamble % change of preamble !
+ \file{ot1lcmss.fd}{
+ \from{slifonts.fdd}{lcmss,fd}}
+ \file{ot1lcmtt.fd}{
+ \from{slifonts.fdd}{lcmtt,fd}}
+ \file{omllcmm.fd}{
+ \from{slifonts.fdd}{lcmm,fd}}
+ \file{omslcmsy.fd}{
+ \from{slifonts.fdd}{lcmsy,fd}}
+ \file{omxlcmex.fd}{
+ \from{slifonts.fdd}{lcmex,fd}}
+ \file{ullasy.fd}{
+ \from{slifonts.fdd}{llasy,fd}}
+ }
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{* \space\space All *.def}
+\Msg{* \space\space slides.cls}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.drv' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/slides.pdf b/macros/latex-dev/base/slides.pdf
new file mode 100644
index 0000000000..83876c4601
--- /dev/null
+++ b/macros/latex-dev/base/slides.pdf
Binary files differ
diff --git a/macros/latex-dev/base/slifonts.fdd b/macros/latex-dev/base/slifonts.fdd
new file mode 100644
index 0000000000..5a0a4ee247
--- /dev/null
+++ b/macros/latex-dev/base/slifonts.fdd
@@ -0,0 +1,496 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+%\iffalse This is a META comment
+%
+% File `slifonts.fdd'.
+% Copyright (C) 1989-1998 LaTeX3 project, Frank Mittelbach and
+% Rainer Sch\"opf, all rights reserved.
+%
+%<lcmss&!ec>\ProvidesFile{ot1lcmss.fd}
+%<lcmtt&!ec>\ProvidesFile{ot1lcmtt.fd}
+%<lcmss&ec>\ProvidesFile{t1lcmss.fd}
+%<lcmtt&ec>\ProvidesFile{t1lcmtt.fd}
+%<lcmm, >\ProvidesFile{omllcmm.fd}
+%<lcmsy, >\ProvidesFile{omslcmsy.fd}
+%<lcmex, >\ProvidesFile{omxlcmex.fd}
+%<llasy, >\ProvidesFile{ullasy.fd}
+%<main, >\ProvidesFile{sfonts.def}
+%<*driver, >
+ \ProvidesFile{sfonts.drv}
+%</driver, >
+ [2019/07/09 v2.2f Standard LaTeX slide font definitions]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{sfonts.drv}
+\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+\title{The file \texttt{slifonts.fdd} for use with
+ \LaTeXe.\thanks{This file has version
+ number \fileversion, dated \filedate.}}
+\date{\filedate}
+\author{Frank Mittelbach \and Rainer Sch\"opf}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{slifonts.fdd}
+\end{document}
+%</driver>
+%
+%\fi
+%
+%
+% \changes{v2.2c}{1997/05/26}{Removed spaces in and around arguments
+% to \cs{DeclareFontShape} and \cs{EC@family}.}
+% \changes{v2.2a}{1997/01/15}
+% {ec font support added}
+% \changes{v2.1m}{1996/11/20}
+% {lowercase fd filenames /1044}
+% \changes{v2.1l}{1996/05/17}
+% {Force \cs{hyphenchar} of OT1 fonts to 45, in case
+% \cs{defaulthyphenchar} has changed.}
+% \changes{v2.1l}{1996/05/17}
+% {Remove some spurious extra empty arguments to
+% \cs{DeclareFontFamily} calls}
+% \changes{v2.1j}{1995/09/27}{Globally replaced scale factor 19.91 by
+% 19.907 in \cs{DeclareFontShape}, as this gives better
+% rounded font sizes at 600dpi (suggested by Denis Roegel).}
+% \changes{v2.1i}{1995/09/19}{Corrected names of .fd files in argument
+% to \cs{ProvidesFile} commands.}
+% \changes{v2.1h}{1994/05/12}{Added \cs{ProvidesFile} commands.}
+% \changes{v2.1c}{1993/12/17}{Added size 8 to allow for \cs{LaTeX}
+% logo.}
+% \changes{v2.1a}{1993/12/13}{Removed \cs{CodelineIndex} from the
+% driver code.}
+% \changes{v2.1e}{1994/01/31}{Corrected extension in typeout.}
+% \changes{v2.1f}{1994/02/28}{Moved driver further up.}
+%
+%
+% \section{Introduction}
+%
+% This file contains the external font information for special
+% variants of the the Computer Modern fonts to be used for overhead
+% slides. They allow to produce slides in a similar fashion as it was
+% originally done by \SliTeX{}.
+%
+% With \LaTeXe{} it is now no longer necessary to maintain a special
+% format. Instead the standard format may be used and internally only
+% different font definition files come into play.
+%
+% Note, that that you therefore can easily produce slides in different
+% fonts just by calling an appropriate package (like |times|) in
+% your |\usepackage| command. This works, for example, with all
+% fonts that are defined to be scalable (eg PostScript fonts) since
+% they can be scaled to any size.
+%
+% However, minor styles like |pandora| won't work because the standard
+% |.fd| files shipped with \LaTeXe{} only contain small sizes. You can,
+% of course, produce additional sizes and change the |.fd| files
+% accordingly, but in this case it might be better to distinguish
+% |.fd| files for normal text and for slides by prefixing the family
+% name with an |l| (see below).
+%
+% All the standard family names for \SliTeX{} fonts start out with
+% with an |l| as the first character. This will distinguish them from
+% text font families with similar names.
+%
+% In addition, we introduce an additional convention for shapes: if
+% $x$ is a shape, then |I|$x$ represents the invisible form of the
+% shape. This is used by the color separation macros and the
+% |\invisible| command of the slides style file.
+%
+%
+% \StopEventually{}
+%
+% \section{A driver for this document}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you are
+% currently reading. It will be extracted from this file by the
+% \dst{} program.
+% \changes{v2.1b}{1993/12/14}{Corrected \cs{documentclass}.}
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
+\RecordChanges % Gather update information
+%\OnlyDescription % comment out for implementation details
+%\OldMakeindex % use if your MakeIndex is pre-v2.9
+\begin{document}
+ \DocInput{slifonts.fdd}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+%
+% \section{The \dst{} modules}
+%
+% The following modules are used to direct \dst{} in
+% generating external files:
+% \begin{center}
+% \begin{tabular}{ll}
+% driver & produce a documentation driver file \\
+% main & generate \texttt{sfonts.def} \\
+% fd & produce a font definition file \\
+% ec & Use the extended EC font set rather than cm \\[2pt]
+% lccr & Concrete Roman slide sizes \\
+% lcmss & Computer Modern Sans slide sizes \\
+% lcmtt & Computer Modern Typewriter slide sizes \\
+% lcmm & Computer Modern Math italic slide sizes \\
+% lcmm & Computer Modern Math symbols slide sizes \\
+% lcmex & Computer Modern Math extension symbols slide sizes \\
+% llasy & \LaTeX{} symbols slide sizes \\
+% \end{tabular}
+% \end{center}
+% A typical \dst{} command file would then have entries like:
+% \begin{verbatim}
+%\generateFile{OMSlcmsy.fd}{t}{\from{slifonts.fdd}{lcmsy,fd}}
+%\end{verbatim}
+%
+% \section{The font definition files}
+%
+%
+% \subsection{Concrete Roman}
+%
+% \changes{v2.2b}{1997/02/25}
+% {typo fixed in cccsc10. latex/2395}
+% \begin{macrocode}
+%<*lccr>
+\DeclareFontFamily{OT1}{lccr}{\hyphenchar\font45 }
+\DeclareFontShape{OT1}{lccr}{m}{sc}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>cccsc10%
+ }{}
+\DeclareFontShape{OT1}{lccr}{m}{sl}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>ccslc9%
+ }{}
+\DeclareFontShape{OT1}{lccr}{m}{n}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>ccr8%
+ }{}
+\DeclareFontShape{OT1}{lccr}{m}{In}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>iccr8%
+ }{}
+%</lccr>
+% \end{macrocode}
+%
+% \subsection{Computer Modern Sans}
+%
+% \begin{macrocode}
+%<*lcmss>
+%<!ec> \DeclareFontFamily{OT1}{lcmss}{\hyphenchar\font45 }
+%<ec> \DeclareFontFamily{T1}{lcmss}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{m}{n}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{m}{n}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> lcmss8%
+%<ec> eclq8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{m}{In}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{m}{In}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> ilcmss8%
+%<ec> ieclq8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{m}{sl}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{m}{sl}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> lcmssi8%
+%<ec> ecli8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{m}{Isl}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{m}{Isl}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> ilcmssi8%
+%<ec> iecli8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{m}{it}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{m}{it}{%
+ <->sub*lcmss/m/sl}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{m}{Iit}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{m}{Iit}{%
+ <->sub*lcmss/m/Isl}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{bx}{n}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{bx}{n}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> lcmssb8%
+%<ec> eclb8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmss}{bx}{In}{%
+%<ec> \DeclareFontShape{T1}{lcmss}{bx}{In}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> ilcmssb8%
+%<ec> ieclb8%
+ }{}
+% \end{macrocode}
+%
+% EC fonts have a bold slanted font for the slides class.
+% \begin{macrocode}
+%<*ec>
+\DeclareFontShape{T1}{lcmss}{bx}{sl}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+ eclo8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{T1}{lcmss}{bx}{Isl}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+ ieclo8%
+ }{}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareFontShape{T1}{lcmss}{bx}{it}{%
+ <->sub*lcmss/bx/sl}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{T1}{lcmss}{bx}{Iit}{%
+ <->sub*lcmss/bx/Isl}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</ec>
+% \end{macrocode}
+%
+% There are extra substitutions for the shape |ui| which are needed
+% for |\pounds| to not come out as a \$ sign (mostly).
+% \changes{v2.1k}{1995/10/31}{Added substitutions to make \cs{pounds}
+% work right in slides.}
+% \begin{macrocode}
+%<*!ec>
+\DeclareFontShape{OT1}{lcmss}{m}{ui}{%
+ <->sub*cmr/m/ui}{}
+\DeclareFontShape{OT1}{lcmss}{bx}{ui}{%
+ <->sub*cmr/m/ui}{}
+%</!ec>
+%</lcmss>
+% \end{macrocode}
+%
+% \subsection{Computer Modern Typewriter}
+%
+% \begin{macrocode}
+%<*lcmtt>
+%<!ec> \DeclareFontFamily{OT1}{lcmtt}{\hyphenchar\font\m@ne}
+%<ec> \DeclareFontFamily{T1}{lcmtt}{\hyphenchar\font\m@ne}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmtt}{m}{n}{%
+%<ec> \DeclareFontShape{T1}{lcmtt}{m}{n}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> cmtt8%
+%<ec> ecltt8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmtt}{m}{In}{%
+%<ec> \DeclareFontShape{T1}{lcmtt}{m}{In}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> icmtt8%
+%<ec> iecltt8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!ec> \DeclareFontShape{OT1}{lcmtt}{m}{it}{%
+%<ec> \DeclareFontShape{T1}{lcmtt}{m}{it}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>%
+%<!ec> cmitt10%
+%<ec> ecit1000%
+ }{}
+% \end{macrocode}
+% There are extra substitutions for the shape |ui| which are needed
+% for |\pounds| to not come out as a \$ sign (mostly).
+% \changes{v2.1k}{1995/10/31}{Added substitutions to make \cs{pounds}
+% work right in slides.}
+% \begin{macrocode}
+%<*!ec>
+\DeclareFontShape{OT1}{lcmtt}{m}{ui}{%
+ <->sub*cmtt/m/it}{}
+\DeclareFontShape{OT1}{lcmtt}{bx}{ui}{%
+ <->sub*cmtt/m/it}{}
+%</!ec>
+%</lcmtt>
+% \end{macrocode}
+%
+% \subsection{Computer Modern Math}
+%
+% \begin{macrocode}
+%<*lcmm>
+\DeclareFontFamily{OML}{lcmm}{\skewchar\font'177}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{OML}{lcmm}{m}{it}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>cmmi8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{OML}{lcmm}{m}{Iit}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>icmmi8%
+ }{}
+%</lcmm>
+% \end{macrocode}
+%
+% \subsection{Computer Modern Symbol}
+%
+% \begin{macrocode}
+%<*lcmsy>
+\DeclareFontFamily{OMS}{lcmsy}{\skewchar\font'60}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{OMS}{lcmsy}{m}{n}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>cmsy8%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{OMS}{lcmsy}{m}{In}{%
+ <7><8><10><12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>icmsy8%
+ }{}
+%</lcmsy>
+% \end{macrocode}
+%
+% \subsection{Computer Modern large symbols}
+%
+% \changes{v2.1g}{1994/03/01}{Removed extra pair of curly braces
+% at end of \cs{DeclareFontFamily} command.}
+% \begin{macrocode}
+%<*lcmex>
+\DeclareFontFamily{OMX}{lcmex}{}
+\DeclareFontShape{OMX}{lcmex}{m}{n}{%
+ <->sfixed*[17.28]cmex10%
+ }{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{OMX}{lcmex}{m}{In}{%
+ <->sfixed*[17.28]icmex10%
+ }{}
+%</lcmex>
+% \end{macrocode}
+%
+% \subsection{\LaTeX{} symbols}
+%
+% \changes{v2.2d}{1997/10/20}{Removed superfluous pair of braces at
+% end of \cs{DeclareFontFamily} command.}
+% \begin{macrocode}
+%<*llasy>
+\DeclareFontFamily{U}{llasy}{}
+\DeclareFontShape{U}{llasy}{m}{n}{%
+ <12><13.82><16.59><19.907><23.89><28.66><34.4><41.28>lasy8%
+}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareFontShape{U}{llasy}{m}{In}{%
+ <13.82><16.59><19.907><23.89><28.66><34.4><41.28>ilasy8%
+}{}
+%</llasy>
+% \end{macrocode}
+%
+% \section{Setting defaults}
+%
+% The following statements go into the file \texttt{sfonts.def}
+% which plays a r\^ole similar to \texttt{fontdef.ltx}. Thus, you may
+% want to produce your own local variant of it if you intend to use
+% different fonts in your slides.
+% \changes{v2.0b}{1993/03/09}{Added \cs{fd@prefix} for \cs{input}}
+% \changes{v2.2a}{1997/01/15}{lowercase fd file}
+% \begin{macrocode}
+%<*main>
+\DeclareErrorFont{OT1}{lcmss}{m}{n}{19.907}
+\DeclareFontSubstitution{OT1}{lcmss}{m}{n}
+\input ot1lcmss.fd
+% \end{macrocode}
+%
+% Ensure some suitable starting values but don't load any font
+% yet. In the past this was implicitly done as part of
+% \cs{DeclareErrorFont} but not any longer.
+% \changes{v2.2f}{2019/07/09}{Explicitly set some defaults}
+% \begin{macrocode}
+\fontencoding{OT1}
+\fontfamily{lcmss}
+\fontseries{m}
+\fontshape{n}
+\fontsize{19.907}{19.907}
+%</main>
+% \end{macrocode}
+%
+%
+% The next line goes into all files and in addition prevents \dst{}
+% from adding any further code from the main source file (such as a
+% character table.
+% \begin{macrocode}
+\endinput
+% \end{macrocode}
+%
+% \Finale
+%
+%% \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
+%% Lower-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
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
diff --git a/macros/latex-dev/base/slifonts.pdf b/macros/latex-dev/base/slifonts.pdf
new file mode 100644
index 0000000000..17385d8b1c
--- /dev/null
+++ b/macros/latex-dev/base/slifonts.pdf
Binary files differ
diff --git a/macros/latex-dev/base/small2e.tex b/macros/latex-dev/base/small2e.tex
new file mode 100644
index 0000000000..9032c46d03
--- /dev/null
+++ b/macros/latex-dev/base/small2e.tex
@@ -0,0 +1,40 @@
+% This is a small sample LaTeX input file (Version of 10 April 1994)
+%
+% Use this file as a model for making your own LaTeX input file.
+% Everything to the right of a % is a remark to you and is ignored by LaTeX.
+
+% The Local Guide tells how to run LaTeX.
+
+% WARNING! Do not type any of the following 10 characters except as directed:
+% & $ # % _ { } ^ ~ \
+
+\documentclass{article} % Your input file must contain these two lines
+\begin{document} % plus the \end{document} command at the end.
+
+
+\section{Simple Text} % This command makes a section title.
+
+Words are separated by one or more spaces. Paragraphs are separated by
+one or more blank lines. The output is not affected by adding extra
+spaces or extra blank lines to the input file.
+
+Double quotes are typed like this: ``quoted text''.
+Single quotes are typed like this: `single-quoted text'.
+
+Long dashes are typed as three dash characters---like this.
+
+Emphasized text is typed like this: \emph{this is emphasized}.
+Bold text is typed like this: \textbf{this is bold}.
+
+\subsection{A Warning or Two} % This command makes a subsection title.
+
+If you get too much space after a mid-sentence period---abbreviations
+like etc.\ are the common culprits)---then type a backslash followed by
+a space after the period, as in this sentence.
+
+Remember, don't type the 10 special characters (such as dollar sign and
+backslash) except as directed! The following seven are printed by
+typing a backslash in front of them: \$ \& \# \% \_ \{ and \}.
+The manual tells how to make other symbols.
+
+\end{document} % The input file ends with this command.
diff --git a/macros/latex-dev/base/source2e.pdf b/macros/latex-dev/base/source2e.pdf
new file mode 100644
index 0000000000..97cf72361c
--- /dev/null
+++ b/macros/latex-dev/base/source2e.pdf
Binary files differ
diff --git a/macros/latex-dev/base/source2e.tex b/macros/latex-dev/base/source2e.tex
new file mode 100644
index 0000000000..79b9a7f5db
--- /dev/null
+++ b/macros/latex-dev/base/source2e.tex
@@ -0,0 +1,503 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+
+% This document will typeset the LaTeX sources as a single document.
+% This will produce quite a large file (roughly 555 pages) and may
+% take a long time.
+%
+% Some notes on processing this document are contained at the end
+% of this document, after \end{document}
+%
+% DPC 1997/11/17
+%
+% First a special index style for makeindex
+%
+
+\begin{filecontents}{source2e.ist}
+actual '='
+quote '!'
+level '>'
+preamble
+"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
+postamble
+"\n\n \\end{theindex}\n"
+item_x1 "\\efill \n \\subitem "
+item_x2 "\\efill \n \\subsubitem "
+delim_0 "\\pfill "
+delim_1 "\\pfill "
+delim_2 "\\pfill "
+% The next lines will produce some warnings when
+% running Makeindex as they try to cover two different
+% versions of the program:
+lethead_prefix "{\\bfseries\\hfil "
+lethead_suffix "\\hfil}\\nopagebreak\n"
+lethead_flag 1
+heading_prefix "{\\bfseries\\hfil "
+heading_suffix "\\hfil}\\nopagebreak\n"
+headings_flag 1
+
+% and just for source2e:
+% Remove R so I is treated in sequence I J K not I II III
+page_precedence "rnaA"
+\end{filecontents}
+
+
+
+\documentclass{ltxdoc}
+
+\listfiles
+
+% Do not index some TeX primitives, and some common plain TeX commands.
+
+\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
+\DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,%
+ \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi}
+\DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,%
+ \vbox,\vtop,\vcenter}
+\DoNotIndex{\@empty,\immediate,\write}
+\DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup}
+\DoNotIndex{\divide,\advance,\multiply,\count,\dimen}
+\DoNotIndex{\relax,\space,\string}
+\DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,%
+ \closein,\closeout}
+\DoNotIndex{\catcode,\endinput}
+\DoNotIndex{\jobname,\message,\read,\the,\m@ne,\noexpand}
+\DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss}
+\DoNotIndex{\m@ne,\z@,\z@skip,\@ne,\tw@,\p@}
+\DoNotIndex{\dp,\wd,\ht,\vss,\unskip}
+
+% Set up the Index and Change History to use \part
+\IndexPrologue{\part*{Index}%
+ \markboth{Index}{Index}%
+ \addcontentsline{toc}{part}{Index}%
+ The italic numbers denote the pages where the
+ corresponding entry is described,
+ numbers underlined point to the definition,
+ all others indicate the places where it is used.}
+
+\GlossaryPrologue{\part*{Change History}%
+% Allow control names to be hyphenated here...
+ {\GlossaryParms\ttfamily\hyphenchar\font=`\-}%
+ \markboth{Change History}{Change History}%
+ \addcontentsline{toc}{part}{Change History}}
+
+% The standard \changes command modified slightly to better cope with
+% this multiple file document.
+\makeatletter
+\def\@changes@iso@date#1/#2/#3/#4\space{#1\if\relax#2\relax\else-#2-#3\fi\space}
+\def\changes@#1#2#3{%
+ \let\protect\@unexpandable@protect
+ \edef\@tempa{\noexpand\glossary{\@changes@iso@date#2///\space
+ \currentfile\space#1\levelchar
+ \ifx\saved@macroname\@empty
+ \space
+ \actualchar
+ \generalname
+ \else
+ \expandafter\@gobble
+ \saved@macroname
+ \actualchar
+ \string\verb\quotechar*%
+ \verbatimchar\saved@macroname
+ \verbatimchar
+ \fi
+ :\levelchar #3}}%
+ \@tempa\endgroup\@esphack}
+
+% Move whole block up so that the file key is not so close
+% to bottom of US letter page.
+\addtolength\topmargin{-2\baselineskip}
+
+
+% Codelines are allowed to run over a bit without showing up as overfull
+%
+\renewcommand*\MacroFont{\fontencoding\encodingdefault
+ \fontfamily\ttdefault
+ \fontseries\mddefault
+ \fontshape\updefault
+ \small
+ \hfuzz 6pt\relax}
+
+% Section numbers now reach eg 74.17.2 which need more space
+\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.8em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.4em}}
+\makeatother
+
+% Produce a Change Log and (2 column) Index.
+\RecordChanges
+\CodelineIndex
+\EnableCrossrefs
+\setcounter{IndexColumns}{2}
+
+% Needed for documentation in ltoutenc.dtx
+\usepackage{textcomp}
+
+\begin{document}
+ \title{The \LaTeXe\ Sources}
+ \author{%
+ Johannes Braams\\
+ David Carlisle\\
+ Alan Jeffrey\\
+ Leslie Lamport\\
+ Frank Mittelbach\\
+ Chris Rowley\\
+ Rainer Sch\"opf}
+
+% This command will be used to input the patch file
+% if that file exists.
+\newcommand{\includeltpatch}{%
+ \def\currentfile{ltpatch.ltx}
+ \part{ltpatch}
+ {\let\ttfamily\relax
+ \xdef\filekey{\filekey, \thepart={\ttfamily\currentfile}}}%
+ Things we did wrong\ldots
+ \IndexInput{ltpatch.ltx}}
+
+
+
+% Get the date and patch level from ltvers.dtx
+\makeatletter
+\let\patchdate=\@empty
+\begingroup
+ \def\ProvidesFile#1\fmtversion#2#3\patch@level#4{%
+ \date{#2}\xdef\patchdate{#4}\endinput}
+ \input{ltvers.dtx}
+\global\let\X@date=\@date
+
+% Add the patch version if available.
+ \long\def\Xdef#1#2#3\def#4#5{%
+ \xdef\X@date{#2}%
+ \xdef\patchdate{#5}%
+ \endinput}%
+ \InputIfFileExists{ltpatch.ltx}
+ {\let\def\Xdef}{\global\let\includeltpatch\relax}
+\endgroup
+
+\ifx\@date\X@date
+ \def\Xpatch{0}
+ \ifx\patchdate\Xpatch\else
+ \edef\@date{\@date\space Patch level \patchdate}
+ \fi
+\else
+ \@warning{ltpatch.ltx does not match ltvers.dtx!}
+ \let\includeltpatch\relax
+\fi
+\makeatother
+
+ \pagenumbering{roman}
+
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \renewcommand\maketitle{}
+
+ \tableofcontents
+
+ \clearpage
+
+ \pagenumbering{arabic}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Each of the following \DocInclude lines includes a file with extension
+% .dtx. Each of these files may be typeset separately. For instance
+% latex ltboxes.dtx
+% will typeset the source of the LaTeX box commands.
+%
+% If this file is processed, each of these separate dtx files will be
+% contained as a part of a single document. Using ltxdoc.cfg you can
+% then optionally produce a combined index and/or change history for
+% the entire source of the format file. Note that such a document will
+% be quite large (about 555 pages).
+%
+
+ \DocInclude{ltdirchk} % System dependent initialisation
+
+ \DocInclude{ltplain} % LaTeX version of Knuth's plain.tex
+
+ \DocInclude{ltvers} % Current version date
+
+ \DocInclude{ltdefns} % Initial definitions.
+
+ \DocInclude{ltalloc} % Allocation of counters and others.
+
+ \DocInclude{ltcntrl} % Program control macros.
+
+ \DocInclude{lterror} % Error handling.
+
+ \DocInclude{ltpar} % Paragraphs.
+
+ \DocInclude{ltspace} % Spacing, line and page breaking.
+
+ \DocInclude{ltlogos} % Logos.
+
+ \DocInclude{ltfiles} % \input files and related commands
+
+ \DocInclude{ltoutenc} % Output encoding interface
+
+ \DocInclude{ltcounts} % Counters
+
+ \DocInclude{ltlength} % Lengths
+
+ \DocInclude{ltfssbas} % NFSS Base macros
+
+ \DocInclude{ltfsstrc} % NFSS Tracing (and tracefnt.sty)
+
+ \DocInclude{ltfsscmp} % NFSS1 Compatibility
+
+ \DocInclude{ltfssdcl} % NFSS Declarative interface
+
+ \DocInclude{ltfssini} % NFSS Initialisation
+
+ \DocInclude{fontdef} % fonttext.ltx/fontmath.ltx
+
+ \DocInclude{preload} % preload.ltx
+
+ \DocInclude{ltfntcmd} % \textrm etc
+
+ \DocInclude{ltpageno} % Page numbering
+
+ \DocInclude{ltxref} % Cross referencing
+
+ \DocInclude{ltmiscen} % Miscellaneous environment definitions.
+
+ \DocInclude{ltmath} % Mathematics set up.
+
+ \DocInclude{ltlists} % List and related environments
+
+ \DocInclude{ltboxes} % Parbox and friends
+
+ \DocInclude{lttab} % Tabbing tabular and array
+
+ \DocInclude{ltpictur} % Picture mode
+
+ \DocInclude{ltthm} % Theorem environments
+
+ \DocInclude{ltsect} % Sectioning
+
+ \DocInclude{ltfloat} % Floats
+
+ \DocInclude{ltidxglo} % Index and Glossary
+
+ \DocInclude{ltbibl} % Bibliography
+
+ \DocInclude{ltpage} % \pagestyle \raggedbottom \sloppy
+
+ \DocInclude{ltoutput} % Output routine
+
+ \DocInclude{ltclass} % Package & Class interface
+
+ \DocInclude{lthyphen} % Hyphenation (hyphen.ltx).
+
+ \DocInclude{ltluatex} % Luatex support
+
+ \DocInclude{ltfinal} % Last minute initialisations and dump
+
+ \includeltpatch % Corrections distributed after the full release
+
+% Stop here if ltxdoc.cfg says \AtEndOfClass{\OnlyDescription}
+\StopEventually{\end{document}}
+
+\clearpage
+\pagestyle{headings}
+
+% Make TeX shut up.
+\hbadness=10000
+\newcount\hbadness
+\hfuzz=\maxdimen
+
+\typeout{%
+ \string # Produce change log with^^J%
+ makeindex -s gglo.ist -o source2e.gls source2e.glo}
+
+
+\PrintChanges
+
+\clearpage
+
+% makeindex needs a symbol between the parts of composite page numbers
+% but we dont want one, so:
+\typeout{%
+ \string # Produce index with^^J%
+ makeindex -s source2e.ist source2e.idx}
+
+\begingroup
+\def\endash{--}
+\catcode`\-\active
+\def-{\futurelet\temp\indexdash}
+\def\indexdash{\ifx\temp-\endash\fi}
+
+\PrintIndex
+\endgroup
+
+% Make sure that the index is not printed twice
+% (ltxdoc.cfg might have a second \PrintIndex command)
+\let\PrintChanges\relax
+\let\PrintIndex\relax
+
+\end{document}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+To use this file to produce a fully indexed source code
+you need to execute the following (or equivalent) commands:
+
+ latex source2e.tex
+
+ makeindex -s source2e.ist source2e.idx
+ makeindex -s gglo.ist -o source2e.gls source2e.glo
+
+ latex source2e.tex
+ latex source2e.tex
+
+
+The makeindex style source2e.ist is used in place of the usual
+doc gind.ist to ensure that I is used in the sequence I J K
+not I II II, which would be the default makeindex behaviour.
+
+The third run with latex is only required to get the table of
+contents entries for the change log and index. You may speed things up
+by using the \includeonly mechanism so as not to typeset the source
+files on the second run. This involves changing the file
+ltxdoc.cfg
+between the latex runs.
+
+The following unix script automates this.
+ (It could easily be ported to scripts for DOS or VMS,
+ rm is ReMove a file, and echo "..." > file writes ... to "file".)
+
+
+After this script (after the second ==============) is a similar script
+that will produce the documentation for all the files in the base
+distribution that are *not* included in source2e.dvi. This second script
+was requested, but before using it, beware it will take a long time!
+It may however be modified as required, eg to not typeset the fdd files
+or whatever...
+
+==============
+#!/bin/sh
+
+rm -f source2e.gls source2e.ind source2e.toc
+
+# First run:
+# Create new standard ltxdoc.cfg file
+# Pass the (possibly empty) list of arguments supplied on the
+# command line to article class.
+#
+# If you use A4 paper, running this script with argument
+# a4paper
+# may save about 30 pages.
+#
+echo "\PassOptionsToClass{$*}{article}" > ltxdoc.cfg
+
+
+# Now LaTeX the file with this cfg file.
+#
+pdflatex source2e.tex
+
+
+# Make the Change log and Glossary.
+#
+makeindex -s source2e.ist source2e.idx
+makeindex -s gglo.ist -o source2e.gls source2e.glo
+
+
+# Second run: append \includeonly{} to ltxdoc.cfg to speed up things
+# (this run needed only to get changes and index listed in .toc file)
+#
+# Note that the index will not be made incorrect by the insertion
+# of the table of contents as the front matter uses a different page
+# numbering scheme.
+#
+echo "\includeonly{}" >> ltxdoc.cfg
+
+pdflatex source2e.tex
+
+
+# Third and final run, to put everything together.
+# First restore the cfg file:
+#
+echo "\PassOptionsToClass{$*}{article}" > ltxdoc.cfg
+pdflatex source2e.tex
+
+
+==============
+#!/bin/sh
+
+# Running this script will process all the dtx fdd and *guide.tex
+# and ltnews*.tex files in the LaTeX distribution, except the dtx
+# files included in source2e.tex.
+# (The shell first script in the comments of source2e.tex will
+# process those.)
+
+# Any command line arguments (eg a4paper) are taken as options to the
+# article class.
+
+# This script is likely to take ages!
+
+echo "\PassOptionsToClass{$*}{article}" > ltxdoc.cfg
+echo "\batchmode" >> ltxdoc.cfg
+
+# The next four lines produce full indexes and change logs
+# you may not want those.
+echo "\AtBeginDocument{\RecordChanges}" >> ltxdoc.cfg
+echo "\AtEndDocument{\PrintChanges}" >> ltxdoc.cfg
+echo "\AtBeginDocument{\CodelineIndex\EnableCrossrefs}" >> ltxdoc.cfg
+echo "\AtEndDocument{\PrintIndex}" >> ltxdoc.cfg
+
+# If you do not want any code listings, just documentation, then instead
+# of the above four lines, uncomment the following:
+# echo "\AtBeginDocument{\OnlyDescription}" >> ltxdoc.cfg
+
+
+for i in *dtx *fdd
+do
+B=`basename $i .dtx`
+
+if (grep "Include{$B}" source2e.tex >/dev/null ; )
+then
+echo In source2e: $i
+else
+echo pdflatex $i
+ if (pdflatex $i > /dev/null)
+ then
+ echo pdflatex $i
+ pdflatex $i > /dev/null
+ echo makeindex -s gind.ist $B.idx
+ makeindex -s gind.ist $B.idx > /dev/null 2> /dev/null
+ echo makeindex -s gglo.ist -o $B.gls $B.glo
+ makeindex -s gglo.ist -o $B.gls $B.glo > /dev/null 2> /dev/null
+ echo pdflatex $i
+ pdflatex $i > /dev/null
+ else
+ echo "!!! LaTeX ERROR: $i. (See $B.log.)"
+ fi
+fi
+
+done
diff --git a/macros/latex-dev/base/syntonly.dtx b/macros/latex-dev/base/syntonly.dtx
new file mode 100644
index 0000000000..98c8e4dfc3
--- /dev/null
+++ b/macros/latex-dev/base/syntonly.dtx
@@ -0,0 +1,282 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%%
+%
+%
+% \changes{v2.1a}{1994/03/10}{Update for \LaTeXe}
+%
+% \DoNotIndex{\@cclvi,\@cclv,\@gobble,\@gobbletwo,\@ifnextchar}
+% \DoNotIndex{\@M,\@tempboxa,\advance,\alloc,\begingroup,\bgroup}
+% \DoNotIndex{\box,\count@,\def,\do,\docdate,\egroup,\endgroup}
+% \DoNotIndex{\fi,\filedate,\fileversion,\font,\fontdimen,\global}
+% \DoNotIndex{\ifinner,\ifnum,\immediate,\let,\long,\loop,\m@ne}
+% \DoNotIndex{\noexpand,\relax,\repeat,\scriptfont}
+% \DoNotIndex{\scriptscriptfont,\setbox,\sixt@@n,\space,\textfont}
+% \DoNotIndex{\toks,\toksdef,\write,\xdef,\z@}%
+%
+%
+%\title{The file \texttt{syntonly.dtx} for use with
+% \LaTeXe.\thanks{This file has version
+% number \fileversion, dated \filedate.}\\[2pt]
+% It contains the code for \texttt{syntonly.sty}}
+% \author{Frank Mittelbach \and Rainer Sch\"opf}
+%
+%
+% \MaintainedByLaTeXTeam{latex}
+% \maketitle
+%
+% This package implements the |\syntaxonly| declaration for \LaTeXe.
+% This command can be used in the preamble for running a document
+% through \LaTeX{} without actually getting any output.
+%
+% \StopEventually{}
+%
+%
+% \section{Identification}
+%
+% We identify the package and its current version.
+% \changes{v2.1b}{1995/04/22}{Removed surplus \cs{typeout} lines}
+% \changes{v2.1c}{1996/06/14}{Rearrange \cs{GetFileInfo} usage.}
+% \changes{v2.1d}{1998/08/17}{(RmS) Minor documentation fixes.}
+%
+% \begin{macrocode}
+%<package>\ProvidesPackage{syntonly}
+%<*dtx>
+ \ProvidesFile{syntonly.dtx}
+%</dtx>
+%<*package|dtx>
+ [2017/06/30 v2.1e Standard LaTeX2e package]
+%</package|dtx>
+% \end{macrocode}
+%
+%\iffalse
+%
+% \section{The documentation driver file}
+%
+% The next bit of code contains the documentation driver file for
+% \TeX{}, i.e., the file that will produce the documentation you are
+% currently reading. It will be extracted from this file by the \dst{}
+% program.
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{syntonly.dtx}
+\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+\begin{document}
+ \DocInput{syntonly.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%\fi
+%
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{macro}{\dummyft@}
+% First of all we need to define the `dummy' font.
+% \begin{macrocode}
+\font\dummyft@=dummy \relax
+% \end{macrocode}
+% \end{macro}
+% \changes{v2.1b}{1995/05/25}{Removed unneeded fontdimen settings for
+% dummyft@}
+%
+% \begin{macro}{\ifsyntax@}
+% Now we can define the `syntax only' feature. We define a switch
+% |\if@syntax| so that any macro can always find out if it
+% is really supposed to typeset text. Its default is to run in
+% normal mode.
+% \begin{macrocode}
+\newif\ifsyntax@
+\syntax@false
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\syntaxonly}
+% The |\syntaxonly| macro sets up everything for syntax
+% checking.
+% \begin{macrocode}
+\def\syntaxonly{%
+% \end{macrocode}
+% First of all it sets the |syntax@| switch to \texttt{true}.
+% \begin{macrocode}
+ \syntax@true
+% \end{macrocode}
+% Then it globally sets all fonts to the dummy font. These are:
+% the current font outside math mode,
+% \begin{macrocode}
+ \global\dummyft@
+% \end{macrocode}
+% and the $3\times16$ math fonts for the $16$ math \emph{groups}.
+% We use a loop to set these.
+% \begin{macrocode}
+ \count@\sixt@@n
+ \loop
+ \ifnum\count@ >\z@
+ \advance\count@\m@ne
+ \global\textfont\count@\dummyft@
+ \global\scriptfont\count@\dummyft@
+ \global\scriptscriptfont\count@\dummyft@
+ \repeat
+% \end{macrocode}
+% Since all font changes occur either via |\selectfont| (in
+% text or |\mathversion| (for math mode) it is sufficient
+% to change these to no-ops. In addition we must prevent
+% the loading of math fonts, this is done by making
+% |\getanddefine@fonts| a no-op.
+% \begin{macrocode}
+ \global\let\selectfont\relax
+ \global\let\mathversion\@gobble
+ \global\let\getanddefine@fonts\@gobbletwo
+% \end{macrocode}
+% We prevent \TeX{} from complaining about the dummy font
+% having no characters.
+% \begin{macrocode}
+ \tracinglostchars\z@
+% \end{macrocode}
+% Then we disable the output routine, and set |\frenchspacing|
+% (which is slightly faster than |\nonfrenchspacing|).
+% Finally we set |\hbadness| to $10000$ to avoid overfull box
+% messages.
+% \begin{macrocode}
+ \nopages@
+ \frenchspacing
+ \hbadness\@M}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.1b}{1995/05/25}{Removed non-outer newtoks@: newtoks is no
+% longer outer}
+%
+% \begin{macro}{\nopages@}
+% \changes{v1.0b}{1990/01/14}{Rewrite of the \cs{nopages@} macro to
+% correctly handle footnote insertions, floats and marginpars.}
+% The |\nopages@| macro disables the \LaTeX{} output routine.
+% To this end we define a very simple output routine that empties
+% the output \emph{and} footnote boxes (remember that the latter
+% are insertions.
+% \begin{macrocode}
+\def\nopages@{%
+ \output {\setbox\z@\box\@cclv
+ \setbox\z@\box\footins
+ \deadcycles\z@}%
+% \end{macrocode}
+% Then we protect it against definition by a style file.
+% \changes{v2.1b}{1995/05/25}{newtoks is no longer outer}
+% \begin{macrocode}
+ \newtoks\output
+% \end{macrocode}
+% But this is not enough: normally the \LaTeX{} output routine
+% is responsible for dealing with floating objects.
+% We therefore also redefine the internal macros for handling
+% floats and marginpars.
+% \begin{macrocode}
+ \def\@xfloat##1[##2]{%
+% \end{macrocode}
+% There are a few things that have to be retained:
+% the definition of |\@captype| since it is used by the
+% |\caption| command,
+% \changes{v1.0c}{1990/01/16}{Definition of \cs{@captype} added.}
+% \begin{macrocode}
+ \def\@captype{##1}%
+% \end{macrocode}
+% the error message issued when not in outer paragraph mode,
+% \begin{macrocode}
+ \ifinner\@parmoderr\fi
+% \end{macrocode}
+% and the |\@parboxrestore| command for the body of the
+% float. This is necessary since it restores the original
+% definitions of important commands like |\par| or |\\|.
+% \begin{macrocode}
+ \setbox\@tempboxa\vbox\bgroup\@parboxrestore}%
+% \end{macrocode}
+% |\end@float| must now only close the brace:
+% \begin{macrocode}
+ \let\end@float\egroup
+% \end{macrocode}
+% The above would be enough also for two-column floats with the
+% kernel algorithm. However with the refined algorithm inside
+% \texttt{fixlxt2e} this doesn't any longer work, so there we also
+% need to explicitly overwrite the end macro for two-column floats
+% (the begin is still okay as it resolves to |\@xfloat| eventually).
+% \begin{macrocode}
+ \let\end@dblfloat\egroup
+% \end{macrocode}
+% The redefinition of the |\marginpar| command is a bit more
+% complicated since we have to check for the optional argument.
+% First we redefine the command itself:
+% \begin{macrocode}
+ \def\marginpar{\ifinner\@parmoderr\fi
+% \end{macrocode}
+% We open a group so that everything gathered in a temporary box
+% can easily be thrown away by closing it again (see below).
+% \begin{macrocode}
+ \begingroup \@ifnextchar [\@xmpar\@ympar}
+% \end{macrocode}
+% |\@xmpar| and |\@ympar| are now defined similar to
+% |\@xfloat| above.
+% If an optional argument is present |\@xmpar| typesets
+% it in a temporary box that is thrown away later.
+% Then it calls up |\@ympar| to process |\marginpar|'s
+% argument.
+% \changes{v1.0d}{1990/01/21}{Added forgotten \cs{vbox}.}
+% \begin{macrocode}
+ \long\def\@xmpar[##1]{%
+ \setbox\@tempboxa\vbox{\@parboxrestore ##1}\@ympar}%
+% \end{macrocode}
+% |\@ympar| gathers its argument in the same temporary box
+% and throws away its contents by closing the group opened up in
+% |\marginpar| above.
+% \changes{v1.0d}{1990/01/21}{Added forgotten \cs{vbox}.}
+% \begin{macrocode}
+ \long\def\@ympar##1{%
+ \setbox\@tempboxa\vbox{\@parboxrestore ##1}\endgroup}%
+% \end{macrocode}
+% And that's all we had to do.
+% \begin{macrocode}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@preamblecmds}
+% We disable the use of the |\syntaxonly| command after
+% |\begin{document}|
+% \begin{macrocode}
+\@onlypreamble\syntaxonly
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+
+\endinput
diff --git a/macros/latex-dev/base/syntonly.ins b/macros/latex-dev/base/syntonly.ins
new file mode 100644
index 0000000000..c05eb92bf0
--- /dev/null
+++ b/macros/latex-dev/base/syntonly.ins
@@ -0,0 +1,88 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 1993-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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 has the LPPL maintenance status "maintained".
+
+This file may only be distributed together with a copy of the LaTeX
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+The list of derived (unpacked) files belonging to the distribution
+and covered by LPPL is defined by the unpacking scripts (with
+extension .ins) which are part of the distribution.
+\endpreamble
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generateFile{syntonly.sty}{t}{%
+ \from{syntonly.dtx}{package}}
+
+\endbatchfile
+
diff --git a/macros/latex-dev/base/syntonly.pdf b/macros/latex-dev/base/syntonly.pdf
new file mode 100644
index 0000000000..7f8dc926e9
--- /dev/null
+++ b/macros/latex-dev/base/syntonly.pdf
Binary files differ
diff --git a/macros/latex-dev/base/testpage.tex b/macros/latex-dev/base/testpage.tex
new file mode 100644
index 0000000000..d7f468d241
--- /dev/null
+++ b/macros/latex-dev/base/testpage.tex
@@ -0,0 +1,523 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% testpage.tex - created 21 January 1994.
+% Copyright (C) 1994 by Rainer Schoepf
+%
+% Test of how accurately printer reproduces dimensions specified
+% by LaTeX output.
+
+\typeout{}
+\typeout{*****************************************************}
+\typeout{* Type paper type in form of document class option,}
+\typeout{* e.g., `a4paper' or `letterpaper' (without the quotes).}
+\typein[\papertype]{*************************************%
+**************}
+
+\typeout{}
+\typeout{*****************************************************}
+\typeout{* Do you want to produce two test pages for use with}
+\typeout{* a double sided printer? (y/n)}
+\typein[\doublesided]{*************************************%
+**************}
+
+\documentclass[\papertype]{article}
+
+\usepackage{ifthen}
+
+\pagestyle{empty}
+
+\nofiles
+
+\setlength{\oddsidemargin}{0pt}
+\setlength{\evensidemargin}{0pt}
+\setlength{\marginparwidth}{1in}
+\setlength{\marginparsep}{0pt}
+
+\setlength{\topmargin}{0pt}
+\setlength{\headheight}{0pt}
+\setlength{\headsep}{0pt}
+\setlength{\topskip}{0pt}
+
+\setlength{\footskip}{0pt}
+
+\setlength{\textwidth}{\paperwidth}
+\addtolength{\textwidth}{-2in}
+\setlength{\textheight}{\paperheight}
+\addtolength{\textheight}{-2in}
+
+\setlength{\parindent}{0pt}
+
+\setlength{\unitlength}{1sp}
+
+
+\newcounter{textheight}
+\newcounter{textwidth}
+
+\setcounter{textheight}{\textheight}
+\setcounter{textwidth}{\textwidth}
+
+\newlength{\help}
+\newcounter{help}
+
+\newcommand{\sethelpcounter}[2]{%
+ \setlength{\help}{#2}\setcounter{#1}{\help}}
+
+\newcounter{in}
+\newcounter{halfin}
+\newcounter{fifthin}
+\newcounter{tenthin}
+\newcounter{twtin}
+
+\setlength{\help}{1in}
+\setcounter{in}{\help}
+
+\setlength{\help}{0.5in}
+\setcounter{halfin}{\help}
+
+\setlength{\help}{0.2in}
+\setcounter{fifthin}{\help}
+
+\setlength{\help}{0.1in}
+\setcounter{tenthin}{\help}
+
+\setlength{\help}{0.05in}
+\setcounter{twtin}{\help}
+
+
+\newcounter{mm}
+\newcounter{tmm}
+\newcounter{frmm}
+\newcounter{fvmm}
+\newcounter{tenmm}
+
+\setlength{\help}{1mm}
+\setcounter{mm}{\help}
+
+\setlength{\help}{2mm}
+\setcounter{tmm}{\help}
+
+\setlength{\help}{4mm}
+\setcounter{frmm}{\help}
+
+\setlength{\help}{5mm}
+\setcounter{fvmm}{\help}
+
+\setlength{\help}{10mm}
+\setcounter{tenmm}{\help}
+
+\newcounter{foo}
+
+\newcounter{x}
+\newcounter{y}
+
+\newcommand{\addtox}{\addtocounter{x}}
+\newcommand{\addtoy}{\addtocounter{y}}
+
+\newcommand{\putxy}{\put(\value{x},\value{y})}
+\newcommand{\multiputxy}{\multiput(\value{x},\value{y})}
+
+\begin{document}
+
+\begin{picture}(0,0)
+\scriptsize
+
+\put(0,-\value{textheight}){%
+ \framebox(\value{textwidth},\value{textheight}){}}
+
+% left mm ruler
+\setcounter{x}{0}
+\sethelpcounter{y}{-0.45\textheight}
+\putxy{\line(-1,0){\value{in}}}
+
+\addtox{-\value{fvmm}}
+\addtoy{-\value{tmm}}
+\multiputxy(-\value{fvmm},0){5}{\line(0,1){\value{frmm}}}
+
+\addtoy{\value{mm}}
+\multiput(-\value{mm},\value{y})(-\value{mm},0){25}%
+ {\line(0,1){\value{tmm}}}
+
+\addtoy{\value{frmm}}
+\setcounter{foo}{1}
+\multiput(-\value{tenmm},\value{y})(-\value{tenmm},0){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% left in ruler
+\setcounter{x}{0}
+\sethelpcounter{y}{-0.55\textheight}
+\putxy{\line(-1,0){\value{in}}}
+
+\addtox{-\value{tenthin}}
+\addtoy{-\value{tenthin}}
+\multiputxy(-\value{tenthin},0){10}{\line(0,1){\value{fifthin}}}
+
+\addtox{\value{twtin}}
+\addtoy{\value{twtin}}
+\multiputxy(-\value{tenthin},0){10}{\line(0,1){\value{tenthin}}}
+
+\setcounter{foo}{1}
+
+\addtox{-\value{twtin}}
+\addtoy{\value{tenthin}}
+\addtoy{\value{tenthin}}
+\multiputxy(-\value{tenthin},0){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% right mm ruler
+\sethelpcounter{x}{\textwidth}
+\sethelpcounter{y}{-0.45\textheight}
+\putxy{\line(1,0){\value{in}}}
+
+\addtox{\value{mm}}
+\addtoy{-\value{mm}}
+\multiputxy(\value{mm},0){25}{\line(0,1){\value{tmm}}}
+
+\addtox{\value{frmm}}
+\addtoy{-\value{mm}}
+\multiputxy(\value{fvmm},0){5}{\line(0,1){\value{frmm}}}
+
+\addtox{\value{fvmm}}
+\addtoy{\value{fvmm}}
+\setcounter{foo}{1}
+\multiputxy(\value{tenmm},0){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% right in ruler
+\sethelpcounter{x}{\textwidth}
+\sethelpcounter{y}{-0.55\textheight}
+\putxy{\line(1,0){\value{in}}}
+
+\addtox{\value{tenthin}}
+\addtoy{-\value{tenthin}}
+\multiputxy(\value{tenthin},0){10}{%
+ \line(0,1){\value{fifthin}}}
+
+\addtox{-\value{twtin}}
+\addtoy{\value{twtin}}
+\multiputxy(\value{tenthin},0){10}{%
+ \line(0,1){\value{tenthin}}}
+
+\setcounter{foo}{1}
+\addtox{\value{twtin}}
+\addtoy{\value{tenthin}}
+\addtoy{\value{tenthin}}
+\multiputxy(\value{tenthin},0){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+
+% top mm ruler
+\sethelpcounter{x}{0.45\textwidth}
+\setcounter{y}{0}
+\putxy{\line(0,1){\value{in}}}
+
+\addtox{-\value{tmm}}
+\addtoy{\value{fvmm}}
+\multiputxy(0,\value{fvmm}){5}{\line(1,0){\value{frmm}}}
+
+\addtox{\value{mm}}
+\addtoy{-\value{frmm}}
+\multiputxy(0,\value{mm}){25}{\line(1,0){\value{tmm}}}
+
+\setcounter{foo}{1}
+\addtox{-\value{tmm}}
+\addtoy{-\value{mm}}
+\addtoy{\value{tenmm}}
+\multiputxy(0,\value{tenmm}){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% top in ruler
+\sethelpcounter{x}{0.55\textwidth}
+\setcounter{y}{0}
+\putxy{\line(0,1){\value{in}}}
+
+\addtox{-\value{tenthin}}
+\addtoy{\value{tenthin}}
+\multiputxy(0,\value{tenthin}){10}{\line(1,0){\value{fifthin}}}
+
+\addtox{\value{twtin}}
+\addtoy{-\value{twtin}}
+\multiputxy(0,\value{tenthin}){10}{\line(1,0){\value{tenthin}}}
+
+\setcounter{foo}{1}
+\addtox{\value{fifthin}}
+\addtoy{\value{twtin}}
+\multiputxy(0,\value{tenthin}){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% bottom mm ruler
+\sethelpcounter{x}{0.45\textwidth}
+\setcounter{y}{-\textheight}
+\putxy{\line(0,-1){\value{in}}}
+
+\addtox{-\value{tmm}}
+\addtoy{-\value{fvmm}}
+\multiputxy(0,-\value{fvmm}){5}{\line(1,0){\value{frmm}}}
+
+\addtox{\value{mm}}
+\addtoy{\value{frmm}}
+\multiputxy(0,-\value{mm}){25}{\line(1,0){\value{tmm}}}
+
+\setcounter{foo}{1}
+\addtox{-\value{tmm}}
+\addtoy{\value{mm}}
+\addtoy{-\value{tenmm}}
+\multiputxy(0,-\value{tenmm}){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+
+% bottom in ruler
+\sethelpcounter{x}{0.55\textwidth}
+\setcounter{y}{-\textheight}
+\putxy{\line(0,-1){\value{in}}}
+
+\addtox{-\value{tenthin}}
+\addtoy{-\value{tenthin}}
+\multiputxy(0,-\value{tenthin}){10}{\line(1,0){\value{fifthin}}}
+
+\addtox{\value{twtin}}
+\addtoy{\value{twtin}}
+\multiputxy(0,-\value{tenthin}){10}{\line(1,0){\value{tenthin}}}
+
+\setcounter{foo}{1}
+\addtox{\value{fifthin}}
+\addtoy{-\value{twtin}}
+\multiputxy(0,-\value{tenthin}){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+
+\end{picture}
+
+\setlength{\help}{\textwidth}
+\addtolength{\help}{-2in}
+
+\vfill
+\mbox{}\hfill
+\begin{minipage}{\help}
+The frame on this page should be one
+inch from each edge of the paper.\\[10pt]
+The rulers at the four edges will indicate how much of the page is
+useable. The ticks of the left and top rulers are $1 {\rm mm}$ apart.
+The large ticks are $.1''$ apart.
+\end{minipage}
+\hfill\mbox{}
+
+\vfill
+\mbox{}
+
+\ifthenelse{\equal{\doublesided}{y}}{\newpage}{\end{document}}
+
+\begin{picture}(0,0)
+\scriptsize
+
+\put(0,-\value{textheight}){%
+ \framebox(\value{textwidth},\value{textheight}){}}
+
+% left mm ruler
+\setcounter{x}{0}
+\sethelpcounter{y}{-0.45\textheight}
+\putxy{\line(-1,0){\value{in}}}
+
+\addtox{-\value{fvmm}}
+\addtoy{-\value{tmm}}
+\multiputxy(-\value{fvmm},0){5}{\line(0,1){\value{frmm}}}
+
+\addtoy{\value{mm}}
+\multiput(-\value{mm},\value{y})(-\value{mm},0){25}%
+ {\line(0,1){\value{tmm}}}
+
+\addtoy{\value{frmm}}
+\setcounter{foo}{1}
+\multiput(-\value{tenmm},\value{y})(-\value{tenmm},0){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% left in ruler
+\setcounter{x}{0}
+\sethelpcounter{y}{-0.55\textheight}
+\putxy{\line(-1,0){\value{in}}}
+
+\addtox{-\value{tenthin}}
+\addtoy{-\value{tenthin}}
+\multiputxy(-\value{tenthin},0){10}{\line(0,1){\value{fifthin}}}
+
+\addtox{\value{twtin}}
+\addtoy{\value{twtin}}
+\multiputxy(-\value{tenthin},0){10}{\line(0,1){\value{tenthin}}}
+
+\setcounter{foo}{1}
+
+\addtox{-\value{twtin}}
+\addtoy{\value{tenthin}}
+\addtoy{\value{tenthin}}
+\multiputxy(-\value{tenthin},0){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% right mm ruler
+\sethelpcounter{x}{\textwidth}
+\sethelpcounter{y}{-0.45\textheight}
+\putxy{\line(1,0){\value{in}}}
+
+\addtox{\value{mm}}
+\addtoy{-\value{mm}}
+\multiputxy(\value{mm},0){25}{\line(0,1){\value{tmm}}}
+
+\addtox{\value{frmm}}
+\addtoy{-\value{mm}}
+\multiputxy(\value{fvmm},0){5}{\line(0,1){\value{frmm}}}
+
+\addtox{\value{fvmm}}
+\addtoy{\value{fvmm}}
+\setcounter{foo}{1}
+\multiputxy(\value{tenmm},0){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% right in ruler
+\sethelpcounter{x}{\textwidth}
+\sethelpcounter{y}{-0.55\textheight}
+\putxy{\line(1,0){\value{in}}}
+
+\addtox{\value{tenthin}}
+\addtoy{-\value{tenthin}}
+\multiputxy(\value{tenthin},0){10}{%
+ \line(0,1){\value{fifthin}}}
+
+\addtox{-\value{twtin}}
+\addtoy{\value{twtin}}
+\multiputxy(\value{tenthin},0){10}{%
+ \line(0,1){\value{tenthin}}}
+
+\setcounter{foo}{1}
+\addtox{\value{twtin}}
+\addtoy{\value{tenthin}}
+\addtoy{\value{tenthin}}
+\multiputxy(\value{tenthin},0){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+
+% top mm ruler
+\sethelpcounter{x}{0.45\textwidth}
+\setcounter{y}{0}
+\putxy{\line(0,1){\value{in}}}
+
+\addtox{-\value{tmm}}
+\addtoy{\value{fvmm}}
+\multiputxy(0,\value{fvmm}){5}{\line(1,0){\value{frmm}}}
+
+\addtox{\value{mm}}
+\addtoy{-\value{frmm}}
+\multiputxy(0,\value{mm}){25}{\line(1,0){\value{tmm}}}
+
+\setcounter{foo}{1}
+\addtox{-\value{tmm}}
+\addtoy{-\value{mm}}
+\addtoy{\value{tenmm}}
+\multiputxy(0,\value{tenmm}){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% top in ruler
+\sethelpcounter{x}{0.55\textwidth}
+\setcounter{y}{0}
+\putxy{\line(0,1){\value{in}}}
+
+\addtox{-\value{tenthin}}
+\addtoy{\value{tenthin}}
+\multiputxy(0,\value{tenthin}){10}{\line(1,0){\value{fifthin}}}
+
+\addtox{\value{twtin}}
+\addtoy{-\value{twtin}}
+\multiputxy(0,\value{tenthin}){10}{\line(1,0){\value{tenthin}}}
+
+\setcounter{foo}{1}
+\addtox{\value{fifthin}}
+\addtoy{\value{twtin}}
+\multiputxy(0,\value{tenthin}){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+% bottom mm ruler
+\sethelpcounter{x}{0.45\textwidth}
+\setcounter{y}{-\textheight}
+\putxy{\line(0,-1){\value{in}}}
+
+\addtox{-\value{tmm}}
+\addtoy{-\value{fvmm}}
+\multiputxy(0,-\value{fvmm}){5}{\line(1,0){\value{frmm}}}
+
+\addtox{\value{mm}}
+\addtoy{\value{frmm}}
+\multiputxy(0,-\value{mm}){25}{\line(1,0){\value{tmm}}}
+
+\setcounter{foo}{1}
+\addtox{-\value{tmm}}
+\addtoy{\value{mm}}
+\addtoy{-\value{tenmm}}
+\multiputxy(0,-\value{tenmm}){2}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+
+% bottom in ruler
+\sethelpcounter{x}{0.55\textwidth}
+\setcounter{y}{-\textheight}
+\putxy{\line(0,-1){\value{in}}}
+
+\addtox{-\value{tenthin}}
+\addtoy{-\value{tenthin}}
+\multiputxy(0,-\value{tenthin}){10}{\line(1,0){\value{fifthin}}}
+
+\addtox{\value{twtin}}
+\addtoy{\value{twtin}}
+\multiputxy(0,-\value{tenthin}){10}{\line(1,0){\value{tenthin}}}
+
+\setcounter{foo}{1}
+\addtox{\value{fifthin}}
+\addtoy{-\value{twtin}}
+\multiputxy(0,-\value{tenthin}){9}{%
+ \makebox(0,0){\arabic{foo}}\addtocounter{foo}{1}}
+
+
+\end{picture}
+
+\setlength{\help}{\textwidth}
+\addtolength{\help}{-2in}
+
+\vfill
+\mbox{}\hfill
+\begin{minipage}{\help}
+The frame on this page should be one
+inch from each edge of the paper.\\[10pt]
+The rulers at the four edges will indicate how much of the page is
+useable. The ticks of the left and top rulers are $1 {\rm mm}$ apart.
+The large ticks are $.1''$ apart.
+\end{minipage}
+\hfill\mbox{}
+
+\vfill
+\mbox{}
+
+\end{document}
+
+
diff --git a/macros/latex-dev/base/tex2.txt b/macros/latex-dev/base/tex2.txt
new file mode 100644
index 0000000000..09cd388cde
--- /dev/null
+++ b/macros/latex-dev/base/tex2.txt
@@ -0,0 +1,83 @@
+ LaTeX installation TeX2 information
+
+ 16 September 1995
+
+
+In order to make a LaTeX format and use it you need, in addition to
+the LaTeX source files, a TeX implementation.
+
+If your TeX is very old, prior to version TeX3, then certain features
+will be missing from your system. In particular, you will probably
+have no support for `8-bit' input and hyphenation of words with
+accented characters.
+
+Most (perhaps all) TeX implementations are available in versions that
+are at least as recent as TeX3 (released in 1989) so the best course
+of action is to update your TeX installation before building LaTeX.
+
+However, if you must for some reason make the LaTeX format by running
+the old TeX2 then it is necessary to have a `configuration file' named
+fonttext.cfg. The existence of this file will prevent LaTeX trying to
+access 8-bit characters, which is not allowed in the old TeX2 version
+of TeX.
+
+If you fail to use such a configuration file, LaTeX will detect that it
+is running under TeX2 and stop with the following message (without
+making a format file):
+
+*************************************
+*
+* You MUST use a fonttext.cfg file!
+* As you are still using TeX2!!!!!!
+*
+* See the documentation file tex2.txt
+*
+*************************************
+
+
+There is more information about the file fonttext.cfg in the file
+cfgguide.tex; but for a minimal configuration that allows LaTeX to
+be built on TeX2, just do the following:
+
+ * Copy the standard fonttext.ltx file to fonttext.cfg
+ * Then edit the file fonttext.cfg as follows:
+ -- Change the \ProvidesFile call (see below).
+ -- Comment out all the lines referring to the `T1' encoding (but not
+ those referring to the `OT1' encoding).
+
+Thus the resulting file will look something like the following.
+
+%%% File: fonttext.cfg
+\ProvidesFile{fonttext.cfg}
+ [1995/06/05 v1.0 TeX2 text font setup]
+
+\input {OMLenc.def}
+%%%%% NOT FOR TeX2 \input {T1enc.def}
+\input {OT1enc.def} % <- should come after T1 for speed
+\input {OMSenc.def}
+\fontencoding{OT1}
+\DeclareFontEncodingDefaults{}{}
+%%%%% NOT FOR TeX2 \DeclareFontSubstitution{T1}{cmr}{m}{n}
+\DeclareFontSubstitution{OT1}{cmr}{m}{n}
+%%%%% NOT FOR TeX2 \input {T1cmr.fd}
+\input {OT1cmr.fd}
+\input {OT1cmss.fd}
+\input {OT1cmtt.fd}
+\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
+\newcommand\rmdefault{cmr}
+\newcommand\sfdefault{cmss}
+\newcommand\ttdefault{cmtt}
+
+\newcommand\bfdefault{bx}
+\newcommand\mddefault{m}
+
+\newcommand\itdefault{it}
+\newcommand\sldefault{sl}
+\newcommand\scdefault{sc}
+\newcommand\updefault{n}
+
+\newcommand\encodingdefault{OT1}
+\newcommand\familydefault{\rmdefault}
+\newcommand\seriesdefault{\mddefault}
+\newcommand\shapedefault{\updefault}
+\endinput
diff --git a/macros/latex-dev/base/texpert.txt b/macros/latex-dev/base/texpert.txt
new file mode 100644
index 0000000000..7e2860d09d
--- /dev/null
+++ b/macros/latex-dev/base/texpert.txt
@@ -0,0 +1,210 @@
+ LaTeX installation TeX expert information
+
+ 1 June 1997
+
+
+SUMMARY
+=======
+
+This document contains information about the LaTeX installation for
+TeX experts. In particular it describes:
+
+ * The checks performed by ltxcheck.tex
+
+ * How to print the LaTeX source.
+
+For more general information, see install.txt.
+
+For information on configuring LaTeX see cfgguide.tex.
+
+
+THE LTXCHECK.TEX CHECKS
+=======================
+
+Here is a description of the checks run by ltxcheck.
+
+1) The \@currdir check.
+
+ It is useful for LaTeX to know the syntax for the `current directory
+ (or folder)', or `default directory', if the operating system has
+ such a concept.
+
+ For example, file abc.tex in this directory, or folder, is specified
+ by:
+ ./abc.tex on Unix and most DOS/OS2 TeX's,
+ []abc.tex on VMS
+ :abc.tex on a Macintosh.
+ The above possibilities will be found automatically during the
+ installation. However, if none of these syntaxes works on your
+ system then the internal macro \@currdir will be set to be empty
+ and ltxcheck will report this.
+
+ If your system does have a notion of a current directory, you can
+ define \@currdir in the file texsys.cfg.
+
+ You could also report this to the latex-bug address, so that
+ later releases can automatically cope with your system.
+
+2) The file name parser check.
+ \filename@parse may be defined in texsys.cfg if the default
+ installation does not define a suitable parser. (In fact no widely
+ used TeX system should need such a re-definition as the standard
+ installation should correctly define this command for unix, dos,
+ atari, VMS, and Macintosh, at least.)
+ Because of differences in directory syntax, most features of this
+ command can not be checked in a portable way, however ltxcheck does
+ check that at least {article.cls} is correctly parsed as base name
+ article and extension cls.
+
+3) The \input@path check.
+
+ On some systems TeX cannot check whether a file exists before
+ trying to input it, unless the filename is expressed as a full path
+ name, including the directory. On these systems LaTeX needs to be
+ given a list of directories in which to look for files; the
+ internal macro \input@path holds this information.
+
+ When run, ltxcheck will try to locate the file article.cls.
+ If it fails to find this file (and you have placed it in the
+ `standard input directory') then you must define \input@path in
+ the file texsys.cfg.
+
+ The files texsys.cfg and ltdirchk.dtx contain examples of how to do
+ this but only you know the directories and syntax that should be used
+ for your installation.
+
+ We hope to build up a better collection of examples in future
+ releases of LaTeX, as it is tested on more TeX systems.
+
+4) TeX version check.
+
+ The next check tests that you are running a recent version of TeX.
+ If ltxcheck reports that you have TeX2, then you should try to
+ upgrade TeX (and rebuild LaTeX) as soon as possible. LaTeX may be
+ used with TeX2, but certain features will be missing and you will
+ not be able to use the new (8-bit) font families that are now
+ available. If you must stick with TeX2, please read the extra
+ information in the file tex2.txt.
+
+ If ltxcheck reports that your TeX version is older than 3.141, you
+ will see some strange messages during the installation. This is
+ because earlier versions of TeX printed certain line-breaks in
+ messages on the terminal as `^^J' rather than starting a new line.
+
+ LaTeX will work round this bug and thus avoid `^^J' appearing in
+ error messages, but you should upgrade your TeX as soon as
+ possible, as other bugs have been fixed, not just line breaks in
+ messages.
+
+ At the present time (2005) the current TeX version is 3.141592.
+
+5) Fonts check.
+
+ Finally ltxcheck.tex tests to see if it can find a `representative
+ sample' of the fonts used by LaTeX.
+
+ Fonts that may cause problems are:
+ a) The circle fonts. These were renamed some years ago from circle*
+ to lcircle*, although some sites still have them under the old
+ name. Also the names are longer than 8 letters which may cause
+ some problems.
+ b) The `extra Computer Modern' fonts. The American Mathematical
+ Society has extended the range of sizes available in the
+ Computer Modern fonts. LaTeX now assumes that these extra cm
+ fonts are available.
+ The fonts are available from a CTAN archive, in the directory
+ ctan:macros/latex/fonts or alternatively as part of the
+ AMS fonts collection, which also includes many useful
+ mathematical fonts.
+ c) The `T1 encoded Computer Modern' fonts. This is the ec or dc font
+ collection. The new (1995) release 1.2 of the dc fonts changed
+ most of the file names. For this reason the fd files such as
+ t1cmr.fd cannot be written to work with the dc fonts of different
+ releases. LaTeX by default unpacks the fd files for the ec
+ dc fonts.
+ If you have an older release of the dc fonts and do not wish to
+ upgrade then you should unpack the necessary fd files by running
+ LaTeX on the file olddc.ins (dc older than version 1.2) or
+ newdc.ins (version 1.2 and 1.3).
+ As the T1 fd files will have been used when making the format,
+ you must re-run initex latex.ltx to remake the format if you
+ update the fd files in this way.
+ Running ltxcheck will produce a ! BAD LaTeX2e system!! error
+ message if it detects that the `new' fd files are loaded into
+ the format, but only the old dc fonts are available, and vice
+ versa.
+ If the old fonts are detected, and the `old' fd files are loaded
+ then no error is generated, but a message suggesting that you
+ upgrade is produced.
+ The ec fonts are available from a CTAN archive, in the directory
+ ctan:fonts/ec .
+
+
+6) Files check.
+
+ Finally ltxcheck checks that the main TeX input files that LaTeX
+ will use when running documents (such as the article class file,
+ fd files, and main packages such as fontenc) are all available.
+
+
+DOCUMENTATION OF THE CODE
+=========================
+
+Most of the documentation is nowadays available as precomplied PDF
+files. This section describes how to produce typeset code
+documentation yourself from the source.
+
+To typeset a documented code file (a .dtx file) you simply run LaTeX
+on it. The file source2e.tex is a master file which produces the
+documented code for the whole LaTeX kernel (but not the standard
+packages, classes, or compatibility mode). You need to have LaTeX2e
+installed before doing this.
+
+To configure the appearance of this documentation, you can use a
+ltxdoc.cfg file. For example, putting the following line into this
+file will format the documentation for A4 paper:
+
+ \PassOptionsToClass{a4paper}{article}
+
+The doc package, which is used by the documentation files, writes
+index files and change-history files that can be processed by the
+program MakeIndex. If this program is part of your TeX installation,
+you can get an index and history listing for a documentation file
+by running the .idx and .glo files through this program.
+
+For example, in Unix MakeIndex, you should say:
+
+ makeindex -s gind.ist FILENAME
+ makeindex -s gglo.ist -o FILENAME.gls FILENAME.glo
+
+source2e.tex needs a special source2e.ist file (in place of gind.ist).
+Running makeindex will produce some warning messages about ignored
+style specifiers; these can be safely ignored.
+
+See the comments at the end of source2e.tex for more information.
+
+
+CONFIGURING LaTeX
+=================
+
+In addition to the system-dependent customisation in texsys.cfg,
+various other parts of LaTeX can be configured to suit local needs.
+Further details can be found in the document cfgguide.tex. We
+recommend that you install the standard system before attempting any
+further customisation.
+
+If you are thinking of making other changes to LaTeX, please read the
+document modguide.tex as it describes the precautions you need to take
+when making modifications in order to ensure that standard LaTeX
+remains a stable, maintainable system.
+
+
+FURTHER INFORMATION
+===================
+
+You will find further information about various aspects of LaTeX in
+the distributed files with names <*>guide.tex. You will need
+to install the new version before you can typeset these files.
+
+
+--- Copyright 1995-2016 the LaTeX3 project. All rights reserved ---
diff --git a/macros/latex-dev/base/tlc2.err b/macros/latex-dev/base/tlc2.err
new file mode 100644
index 0000000000..57b3c85715
--- /dev/null
+++ b/macros/latex-dev/base/tlc2.err
@@ -0,0 +1,4630 @@
+\newcommand\erratafiledate{2014-09-30}
+
+\def\comando#1{\texttt{\string#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% To produce a printed version of this errata file run this file through
+% LaTeX. It will unpack a small class file (if not already present) and
+% a configuration file with the extension .cfg. You might want to modify
+% the setting in this configuration file to print only a partial errata
+% suitable for your printed revision of this book, see details in the
+% .cfg file.
+%
+% The current version of this file can be found at:
+%
+% https://www.latex-project.org/help/books/
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\begin{filecontents}{ttcterrata.cls}
+%%
+%% Copyright (C) 1997,2004,2005,2007, 2014 Frank Mittelbach
+%% This class file is licenced under LPPL latest version;
+%% see https://www.latex-project.org/lppl
+%
+%
+% It sets up a few commands used to format the errata entries for books in the
+% Addison-Wesley Series:
+%
+% Tools and Techniques for Computer Typesetting
+%
+% hence the name. However, anybody who likes to use it is free to apply it for
+% errata files of other books.
+%
+% Changes:
+%
+% v1.0a - changed name from errata.cls to ttcterrata.cls
+
+\ProvidesClass{ttcterrata}
+ [2007/11/10 v1.0a Mini class for errata files; subject to change (FMi)]
+
+\LoadClass{article}
+
+\setcounter{secnumdepth}{-1}
+\addtolength\textwidth{5cm}
+\addtolength\oddsidemargin{-3cm}
+
+\addtolength\textheight{36pt}
+
+\RequirePackage{shortvrb}
+\MakeShortVerb{\|}
+
+\RequirePackage{array,longtable}
+\RequirePackage{multicol}
+
+
+\newcommand\erratagetnumber{}
+\def\erratagetnumber#1/#2/#3\erratagetnumber{#1#2#3}
+
+
+\newcommand\gobbleerrata{%
+ \setbox\@tempboxa\vbox\bgroup
+ \let\endgobble\egroup
+ \let\hideamp\relax
+ \let\\\relax\let\par\@@par}
+
+\newcommand*\hideamp{&}
+
+\let\endgobble\relax
+
+
+\newcommand\erratastartdate{}
+\newcommand\myprinting{1}
+
+
+\newcommand\doweprint[2]{%
+ \ifnum \myprinting < \if!#2!1000 \else \ifx s#2 1000\else#2 \fi\fi
+ \ifnum \expandafter\erratagetnumber\erratastartdate\erratagetnumber <
+ \erratagetnumber#1\erratagetnumber \relax
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \else
+ \@tempswafalse
+ \fi
+}
+
+
+
+\newcommand\includedentries{entries after = \erratastartdate}
+\newcommand\printedentries{between \erratastartdate\space and}
+
+\newcommand\showallerrors{%
+ \renewcommand\includedentries{all errata entries}%
+ \renewcommand\printedentries{up to}
+ \renewcommand\doweprint[2]{\@tempswatrue}}
+
+
+\newcommand\displayrevisionfix[2]{%
+ \if!#2!\textbf{#1}\else\textit{#1}\rlap{\textsuperscript{#2}}\fi}
+
+\newcommand\norevisionnumbers{%
+ \renewcommand\displayrevisionfix[2]{\textbf{##1}}}
+
+\IfFileExists{\jobname.cfg}
+ {
+ \input{\jobname.cfg}
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* Configuration file for \jobname.err found }
+ \typeout{*}
+ \typeout{***************************************************}
+ \AtEndDocument{
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* If you wish to generate an errata listing}
+ \typeout{* containing only errors found after a certain revision}
+ \typeout{* and/or only errors found after a certain date}
+ \typeout{* modify the information stored in \jobname.cfg}
+ \typeout{*}
+ \typeout{* Current settings are:}
+ \typeout{*}
+ \typeout{* \@spaces printing of your book = \myprinting}
+ \typeout{* \@spaces include \includedentries}
+ \typeout{*}
+ \typeout{***************************************************}
+ }}
+ {}
+
+%% \erroronpage <page> <line info> <contributor> <date> <fixed in revision>
+
+\newcommand\erroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\seriouserroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\CHAPTER[1]{\endgobble
+ &\\[4pt]%
+ \multicolumn{4}{l}{\framebox[10cm][l]{\textbf{\normalsize\strut#1}}} \\}
+
+\newenvironment{erratalist}
+ {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
+ {\endgobble\end{longtable}}
+
+\newcommand\erratatitle[2]
+ {\begin{center}\LARGE\bfseries
+ Errata list for #1\\[5pt](\myprinting.\ printing)\\[10pt]
+ \small Includes all entries found \printedentries\space #2\\
+ (For other periods/print runs reprocess this document
+ with different config settings)
+ \end{center}%
+ \markright{Errata for #1 (\printedentries\space #2)}%
+ \thispagestyle{plain}%
+ \vspace{20pt}}
+
+\pagestyle{myheadings}
+
+\AtBeginDocument{\small}
+
+\setlength\parindent{0pt}
+\setlength\parskip{2pt}
+
+\newcommand\contributor[2]{\makebox[1cm][l]{\sffamily#1} #2\par}
+
+% some special shortcuts overwriting existing commands:
+
+\let\u\underline
+\renewcommand\>{$\to$}
+
+%%% some code suggested by Thorsten Hansen to count the number of
+%%% contributions by individuals (will work only if we do not get
+%%% too many :-)
+
+\def\count@contributors#1/#2/#3\@nil{
+ \@ifundefined{c@#1}{\newcounter{#1}}{}\stepcounter{#1}%
+%%% also count secondary:
+%%% \@ifundefined{c@#2}{\newcounter{#2}}{}\stepcounter{#2}%
+}
+
+\renewcommand\erroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\seriouserroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\contributor[2]{\makebox[1cm][l]{%
+ \sffamily#1} #2\@ifundefined{c@#1}{}{ (\arabic{#1})}\par}
+
+\end{filecontents}
+
+
+\begin{filecontents}{\jobname.cfg}
+%
+%
+% Configuration file for the errata listing of
+%
+% The LaTeX Companion, Second Edition
+%
+%
+% \erratastartdate
+%
+% Specifies the date from which on errata entries should be listed.
+%
+% The format is YYYY/MM/DD.
+%
+% The default below ensures that all entries for a particular
+% printing are typeset.
+%
+
+\renewcommand\erratastartdate{2004/04/22}
+
+
+%
+% \myprinting
+%
+% Specifies which (revised) printing you own. For example, if you
+% have the second printing set this to 2 so that errors already
+% corrected in that printing will not appear in your errata
+% listing.
+%
+% The default below ensures that all entries relevant to the x-th
+% printing are typeset.
+%
+%
+
+\renewcommand\myprinting{1}
+\renewcommand\myprinting{2} % 3rd printing was without corrections
+\renewcommand\myprinting{4} % September 2005
+
+%
+% \norevisionnumbers
+%
+% Specifies that all page numbers in the errata are shown in the same
+% format (bold face) irregardless of whether or not they are fixed
+% in some revision. The default is to print corrected errors in
+% italic and add the revision number as a superscript.
+
+%
+% \showallerrors
+%
+% With this command you tell the program that all errata entries are
+% supposed to be generated. This makes \myprinting and
+% \erratastartdate basically obsolete so this isn't turned on by
+% default.
+%
+%
+\endinput
+\end{filecontents}
+
+
+\documentclass{ttcterrata}[2005/11/10] % we want new class
+
+\usepackage[T1]{fontenc}
+\let\u\underline % shortcut for this file
+\newcommand\meta[1]{$\langle$\textit{#1\/}$\rangle$}
+
+\usepackage{textcomp}
+
+\usepackage{url}
+
+\begin{document}
+
+\erratatitle{The \LaTeX{} Companion, Second Edition}{\erratafiledate}
+
+
+\begin{verbatim}
+@book(A-W:MG04,
+ author = {Frank Mittelbach and Michel Goossens},
+ title = {The {\LaTeX} Companion},
+ edition = 2,
+ note = {With Johannes Braams, David Carlisle, and Chris Rowley},
+ series = {Tools and Techniques for Computer Typesetting},
+ publisher = {Addison-Wesley},
+ address = {Boston, Massachusetts},
+ year = 2004,
+ pagenums = {1120},
+ bibliography = {yes},
+ index = {yes},
+ isbn = {0-201-36299-6},
+)
+\end{verbatim}
+
+
+\begin{list}{}{\setlength\leftmargin{0cm}\setlength\rightmargin{3cm}}
+\item[]
+
+This file (\texttt{\jobname.err}) can be found as part of the \LaTeX{}
+distribution and its latest version is maintained on the \LaTeX{}
+project site at \texttt{https://www.latex-project.org/help/books/\jobname.err}
+where you will also find extracts of the book.
+
+The first column in the table shows the page number of the errata
+entry. Superscript numbers in the first column refer to the printed
+revision in which this entry was corrected (\textit{s} indicates a
+correction in the sources only). The second
+column gives the precise location (negative line or paragraph numbers
+are counted from the bottom of the page). The third column shows the
+first finder of the problem.
+
+You can customize this list to only show errata related to the printing
+you own by changing the configuration in the file \texttt{\jobname.cfg}.
+
+\begin{center}
+ \Large \bfseries To Err is Human --- Bug Contest
+\end{center}
+
+Any mistake found and reported is a gain for all readers of our book.
+For this reason Addison-Wesley and the authors offer a prize (for 6
+periods) to the eligible person who finds the largest
+number of bugs during that period (in case of a draw a random choice
+will be made between all those with the largest number of findings).
+A person can receive at most one prize, ever; errors found by any of
+the authors do not count.
+
+Each prize is a free choice of any single computing book found on the
+AW Professional web site \texttt{http://www.awprofessional.com} (that
+is, no boxed sets or multiple volume offers).
+
+
+As usual, the authors and publisher reserve the right to make various
+decisions such as whether a reported feature is an error for
+competitive purposes or whether similar features count as a single or
+multiple errors. ---
+Good luck!
+
+\begin{center}
+\begin{tabular}{clr}
+Contest period ends & Winner \\[4pt]
+2004/10 & Hubert G\"a\ss lein & 287 suggestions\\
+2005/04 & Ulrich Dirr & 11 suggestions\\
+2005/10 & Daniel Alonso i Alemany & 13 suggestions\\
+2006/04 & Michael Schutte & 2 suggestions\\
+2008/05 & Brooks Moses & 1 suggestion \\
+\ldots & -- final draw eventually --
+\end{tabular}
+\end{center}
+\end{list}
+
+\newpage
+
+
+%<--------------------------
+
+\newcommand\BibTeX{\textsc{Bib}\TeX}
+
+\begin{erratalist}
+
+\CHAPTER{General }
+
+\seriouserroronpage{general}{}{FMi}{2004/06/12}{}
+
+ To help you in assessing this errata document we have placed
+ exclamation marks in front of each entry that we consider essential
+ for correctly understanding the book contents.
+
+\erroronpage{general}{}{FMi}{2004/05/14}{}
+
+ Due to the printing process there may be small alignment problems
+ between blue and black text on some pages. These can vary from book
+ to book depending on how the paper was handled between print
+ runs---such is the analog nature of printing on a press.
+
+
+
+\erroronpage{general}{}{FMi}{2004/07/28}{}
+ Slightly updated examples matching the second printing will be made
+ available at CTAN: \texttt{info/examples/tlc2}. The book CD will
+ have the original examples from the first printing.
+
+
+
+\CHAPTER{Front matter}
+
+\erroronpage{iv}{bottom}{FMi}{2004/04/23}{2}
+ Some updates indicating second printing (with corrections)
+
+\erroronpage{v}{l.7}{FMi}{2004/04/23}{}
+ For the record: the term ``for ever'' is the British spelling and a
+ conscious decision.
+
+\erroronpage{xiii}{\S 8.6.2}{FMi}{2004/06/21}{2}
+ Change section heading: ``Operator \u{and function} names''
+
+\erroronpage{xxiii}{11.2}{FMi}{2004/07/26}{2}
+ Change table caption: ``Languages supported by \u{\texttt{texindy}}''
+
+\erroronpage{xxvii}{para 1, l.1+6+7}{CAR}{2004/05/20}{2}
+ Each time a space is missing between package names in parentheses.
+
+\erroronpage{xxvii}{para 1, l.-2}{THa}{2004/06/21}{2}
+ Add: ``Thorsten Hansen (\textsf{bibunits}\u{, \textsf{multibib}})
+
+\erroronpage{xxvii}{para 4, l.2}{NBe}{2004/04/23}{2}
+ Replace ``Wai Wing'' with ``Wai Wong'' (very sorry for this typo).
+
+\erroronpage{xxvii}{para 4, l.2}{MHCL/CAR}{2004/06/09}{2}
+ Kai Tek airport is correctly named Kai Tak airport but the photo
+ was actually taken at Hong Kong International Airport
+
+\erroronpage{xxvii}{after para 4}{FMi}{2004/06/09}{2}
+ Add following paragraph:
+``Any mistake found and reported is a gain for all readers of our
+book. We would therefore like to thank those readers who reported
+any of the mistakes which had been overlooked so far.
+The latest version of the errata file can
+be found on the \LaTeX{} project site at
+\texttt{https://www.latex-project.org/help/books/tlc2.err} where you will also
+find an on-line version of the index and other extracts from the book.''
+
+\CHAPTER{Chapter 1}
+
+\erroronpage{2}{para 5, l.1}{MSc}{2004/06/03}{2}
+ Replace: LaTeX \> \LaTeX{}
+
+\erroronpage{7}{para 5, l.-2}{HjG}{2004/05/20}{2}
+ Missing word and wrong designation of acronym:
+ ``\ldots\
+ languages such \u{as} the \u{Portable Document} Format (PDF)
+ \ldots''
+
+
+\erroronpage{7}{para 5, l.-2}{MSc/CAR}{2004/06/06}{2}
+Replace: ``\ldots produce other device-independent
+ output forms in proprietary languages such as the Portable Document
+ Format~(PDF) (extension~\texttt{.pdf}).'' \> \\
+ ``\ldots produce device-independent
+ file formats including the Portable Document Format~(PDF)
+ (extension~\texttt{.pdf}), which is the native file format of Adobe
+ Acrobat.''
+
+
+\erroronpage{13}{para -2, l.5}{FMi}{2004/04/23}{2}
+ Replace ``writes'' with ``write''.
+
+%\erroronpage{13}{last para, l.1}{MSc}{2004/06/08}{}
+% ``blue notes`` vertically misaligned
+
+\erroronpage{14}{para 2, l.2}{FMi}{2004/06/12}{2}
+ Bug in \texttt{url.sty} generated extra space.
+
+\erroronpage{14}{para 2, l.6}{FMi}{2004/04/23}{2}
+ Printing problem: ``or'' only half visible.
+
+\erroronpage{14}{para 3, l.3}{HjG}{2004/05/20}{2}
+ Printing problem: ``d'' in ``document'' only half visible.
+
+\erroronpage{14}{exa 1-3-5, l.6}{DHL}{2004/05/14}{2}
+ Printing problem: ``i'' in ``\verb=\section='' not visible.
+
+
+\CHAPTER{Chapter 2}
+
+\erroronpage{16}{para 4,ll.2--4}{HjG}{2005/04/03}{4}
+ Nitpicking? Code for class options will not be in a package file!\\
+ ``Code for \u{class} options is sometimes stored in files
+ (in \u{this case} with the extension \texttt{.clo}) but is normally
+ directly specified in the class or package file (\dots).''
+ \>\\
+ ``Code for options is sometimes stored in files
+ (in \u{the case of classes} with the extension \texttt{.clo}) but
+ is normally
+ directly specified in the class or package file (\dots).''
+
+\erroronpage{16}{para 4, l.-2}{HjG}{2004/10/10}{4}
+ Although not wrong, better:
+ ``For example,
+ the option \texttt{11pt} \u{might be} related to
+ \u{\texttt{art11.clo}} when\ldots''
+ \>
+ ``For example,
+ the option \texttt{11pt} \u{is} related to
+ \u{\texttt{size11.clo}} when\ldots''
+
+\erroronpage{20}{para 1, l.-2}{BMo}{2004/05/14}{2}
+ Words need to be swapped: ``\ldots can achieve \u{this effect} by
+ \ldots''
+
+\erroronpage{20}{footnote, l.2}{MSc/FMi}{2004/06/10}{2}
+ Replace ``e.g.,'' with ``i.e.,''
+
+\erroronpage{21}{para 1 of 2.1.4, l.-1}{HjG}{2004/05/20}{2}
+ Words need to be swapped:
+ ``\ldots package \u{created by} Donald Arseneau.''
+
+\erroronpage{21}{para -2, l.2}{MLi}{2013/07/12}{}
+ The command is called \verb=\AskOption= (without ``s'')
+
+\erroronpage{24}{para -2,ll.-3\slash -2}{HjG}{2005/04/03}{4}
+ \LaTeX{}nically not correct:\\
+ ``\u{all} lower-level counter\u{s} (i.e., \u{those} with
+ higher-level number\u{s}) \u{are} reset.''\>\\
+ ``\u{the next} lower-level counter (i.e., \u{that} with \u{the next}
+ higher-level number) \u{is} reset.''
+
+\seriouserroronpage{26}{footnote}{HjG}{2004/05/20}{2}
+ Misplaced closing brace (see example 2-2-3):\\
+ \verb=\fbox{\csname thesection\endcsname\hspace{0.5em}=%
+ \u{\texttt{\textbraceright}}
+ \>
+ \verb=\fbox{\csname thesection\endcsname=%
+ \u{\texttt{\textbraceright}}\verb=\hspace{0.5em}=
+
+\erroronpage{27}{exa 2-2-4}{MBr}{2004/08/01}{2}
+ Rewrite example text to avoid overfull hbox.
+
+\erroronpage{27}{para -2, l.4}{HjG}{2004/05/20}{2}
+ Missing italic correction:
+ \verb=\=\emph{name}\verb=mark=
+
+
+\seriouserroronpage{28}{afterskip item, ll.3--4}{HjG}{2005/04/03}{4}
+ \LaTeX{}nically not correct (cf.\ latex/3463):\\
+ ``\dots\ whether a display heading (\textit{afterskip}${}\geq0$) or a
+ run-in heading (\textit{afterskip}${}<0$) is produced.''\>\\
+ ``\dots\ whether a display heading (\textit{afterskip}${}>0$) or a
+ run-in heading (\textit{afterskip}${}\leq0$) is produced.''
+
+\seriouserroronpage{32}{para -1,l.4--7}{HjG/FMi}{2004/05/20}{2}
+ Replace: ``The modified |\section| command
+also starts a new page, which is typeset with a special page style
+(see Chapter~4) and with
+top floats suppressed.
+The indentation of the first paragraph in a
+section is also suppressed by using the low-level kernel command
+ |\@afterheading| and setting
+the Boolean switch \texttt{@afterindent} to \texttt{false}.
+For details on the use of these commands see the |\chapter| implementation in
+the standard classes (file \texttt{classes.dtx}).''
+
+\seriouserroronpage{33}{code}{FMi}{2004/05/20}{2}
+ Replace code as follows to make statement on p.32 true:\\
+\hspace{0pt minus\linewidth}\begin{minipage}{1.35\linewidth}
+\begin{verbatim}
+\makeatletter
+ \renewcommand\appendix{%
+ \renewcommand\section{% % Redefinition of \section...
+ \newpage\thispagestyle{plain}% % new page, folio bottom
+ \suppressfloats[t]\@afterindentfalse % no top floats, no indent
+ \secdef\Appendix\sAppendix}% % call \Appendix or \sAppendix
+ \setcounter{section}{0}\renewcommand\thesection{\Alph{section}}}
+
+ \newcommand\Appendix[2][?]{% % Complex form:
+ \refstepcounter{section}% % step counter/ set label
+ \addcontentsline{toc}{appendix}% % generate toc entry
+ {\protect\numberline{\appendixname~\thesection}#1}%
+ {\raggedleft\large\bfseries \appendixname\ % typeset the title
+ \thesection\par \centering#2\par}% % and number
+ \@afterheading % prepare indentation handling
+ \sectionmark{#1}% % add to running header
+ \addvspace{\baselineskip}} % space after heading
+
+ \newcommand\sAppendix[1]{% % Simplified (starred) form
+ {\raggedleft\large\bfseries\appendixname\par \centering#1\par}%
+ \@afterheading\addvspace{\baselineskip}}
+\makeatother
+\end{verbatim}
+\end{minipage}
+
+\erroronpage{30}{para-3, l.-2}{RPa}{2004/09/14}{4}
+ ``page 426'' should be ``page 428''
+
+\seriouserroronpage{33}{code}{HjG}{2004/05/20}{2}
+ Definitions of \verb=\Appendix= and \verb=\sAppendix= use
+ \verb=\flushright= instead of \verb=\raggedleft=!
+
+ Editorial note: already addressed in previous major change.
+
+\erroronpage{33}{exa 2-2-11}{MBr}{2004/08/01}{2}
+ Text contains two spaces after period (not wrong but unnecessary).
+
+\erroronpage{33}{exa 2-2-11}{FMi}{2004/04/23}{2}
+ Comment only needs one \% not two.
+
+% not really a bug but ...
+\erroronpage{35}{para 1}{hajk}{2005/09/29}{}
+ Package fncychap also makes unwanted ``Chapter 0'' heading for
+ |\chapter{Preface}| in |\frontmatter| of book.
+
+ Comment: I don't really consider this a bug (as it is not surprising
+ with such designs) but will see if it can be explicitly mentioned.
+
+\seriouserroronpage{45}{para 2, l.13}{DHL}{2004/05/27}{2}
+ In the displayed code, the second occurrence of
+ ``\verb=\renewcommand\theBhead=\dots'' \>
+ ``\verb=\renewcommand\theChead=\dots''
+
+\erroronpage{37}{para 3, l.-2}{FMi}{2004/10/21}{4}
+ Replace: ``\ldots title in lowercase'' \>
+ ``\ldots title in \u{small capitals}''
+
+\erroronpage{46}{para -2,l.3}{HjG}{2005/04/03}{4}
+ Delete: ``need\u{ed}'' \> ``need''
+
+\erroronpage{48}{para 2, l.5}{HjG}{2004/05/20}{2}
+ Delete doubled word:
+ ``(\ldots\ to the \u{the} table of contents)''
+
+\erroronpage{49}{para 3, l.2}{DHL/CAR}{2004/05/27}{2}
+ Replace: ``Thereby, the result of'' \>
+ ``The exact effect of''
+
+\erroronpage{50}{para -4, l.3}{HjG}{2004/05/20}{2}
+ Add remark:
+ ``\ldots, so that the standard document classes have definitions
+ for \verb=\l@part= and \verb=\l@chapter=
+ \u{(or \texttt{\char`\\l@section} with \textsf{article})}
+ that do not use \verb=\@dottedtocline=.''
+
+\erroronpage{50}{para --1}{FMi}{2004/10/22}{4}
+ Replace para with:
+ The nesting level of the entry.
+ With the help of the counter \texttt{tocdepth} the user can
+ control how many nesting levels will be displayed.
+ Levels greater than the value of this counter
+ will not appear in the table of contents.
+
+
+\erroronpage{51}{fig.~2.3}{HjG}{2004/05/20}{2}
+ The lines of the ``heading text'' are wrapped at a place different
+ from that indicated by the \verb=|<- \@tocrmarg ->|=.
+
+\seriouserroronpage{51}{descr. of
+ \texttt{\textbackslash
+ @pnumwidth}}{CBa}{2005/04/04}{4}
+ Needs changing with |\renewcommand|!
+
+\seriouserroronpage{51}{descr. of
+ \texttt{\textbackslash @tocrmarg}}{HjG/FMi}{2004/05/20}{2}
+ Add additional sentence:
+ ``It can be set to a rubber length, which results in the TOC being set
+ unjustified.''
+
+\erroronpage{51}{footnote}{FMi}{2004/09/19}{4}
+ Add: ``\ldots See Section 7.10.3 \u{on page 428} for more\ldots''
+
+\seriouserroronpage{52}{para 2, exa}{CBa}{2005/04/04}{4}
+ As |\@pnumwidth| is actually a macro the assignment using
+ |\settowidth| unfortunately doesn't work at all.
+ Instead a value needs to be assigned via |\renewcommand|.
+
+\erroronpage{52}{para 3, l.1}{HjG}{2004/05/20}{2}
+ Printing problem: ``w'' in ``down'' only half visible.
+
+\erroronpage{52}{middle}{HjG}{2004/05/21}{2}
+ Add after code line:
+ ``When adjusting \verb=\@pnumwidth= this way it is likely that the
+ value of \verb=\@tocrmarg= needs to be changed as well to keep the
+ layout of the table of contents consistent.''
+
+\seriouserroronpage{52}{para 3, l.-1}{JJN}{2004/08/17}{4}
+ Replace ``and section'' with ``section, and subsection''.
+ (or replace code above to use |\setcounter{tocdepth}{1}| and speak
+ of "first" level)
+
+\erroronpage{55}{ll.-8/-7}{HjG}{2004/05/21}{2}
+ Missing word: ``\ldots\ is defined by \u{the} second argument.''
+
+\erroronpage{56}{footnote}{CBe}{2004/07/27}{2}
+Remove: ``\ldots are limited to three characters, like MS-DOS \u{or Windows}.''
+
+\seriouserroronpage{57}{tab.~2.3}{HjG}{2004/05/21}{2}
+ \verb=\mtcPSfont= \> \verb=\mtcSPfont=\\
+ \verb=\nomtcrules= \> \verb=\nomtcrule=\\
+ \verb=\mtcrules= \> \verb=\mtcrule=
+
+\seriouserroronpage{57}{para-2, l.-3}{HjG}{2004/05/21}{2}
+ \verb=\partoc= \> \verb=\parttoc=
+
+ \erroronpage{58}{exa 2-3-8}{CBe}{2004/07/27}{2}
+ km2 appears two times in the code and in the printed output;
+ it should be \verb=km\textsuperscript={2} in the code
+ and km\textsuperscript{2} in the output.
+
+\erroronpage{62}{l.-11}{HjG}{2004/05/21}{2}
+ ``recourse'' \> ``recur''
+
+\erroronpage{63}{para 1, l.1}{FMi}{2004/11/11}{4}
+ Typo: ``This artific\u{i}al example shows how''
+
+\erroronpage{65}{para 2, l.-1}{CKr}{2004/10/15}{4}
+ Correct: ``formated'' \> ``format\u{t}ed''
+
+\erroronpage{66}{marginal note}{FMi}{2004/04/23}{2}
+ Restrictions on keys deserve a dangerous bend sign.
+
+\erroronpage{68}{exa 2-4-3}{HjG}{2004/05/21}{2}
+ The box in the margin ``\fbox{2-4-3}'' is shifted right
+ (with respect to other such boxes).
+
+\erroronpage{72}{para 3, l.-3}{HjG/FMi}{2004/05/21}{2}
+ Change/add:
+ ``\ldots by comparing \u{the number of the chapter} in which the
+|\label| \u{occurred} with the current\ldots''
+
+\erroronpage{75}{para -1, l.2}{CKr}{2004/10/17}{4}
+ Change: ``provided the \textit{keys}'' \>
+ ``provided the \textit{key}\u{s}''
+
+\seriouserroronpage{76}{para -2, l.5--8}{DAr/FMi}{2004/07/24}{2}
+Change marginal to ``{\itshape Unnumbered sections get moving
+arguments}''
+
+Change text to: ``As a consequence, \u{the
+arguments of unnumbered sectioning commands} are turned into
+moving arguments, \ldots''
+
+\erroronpage{77}{para -1, l.-4}{DAr}{2004/07/24}{2}
+ Add: ``In addition, no \u{unrelated} |\addcontentsline| command is
+allowed to intervene between heading and label.''
+
+\erroronpage{78}{\S 2.4.5, l.1}{HjG}{2004/05/24}{2}
+ Add: ``Sebastian
+ Rahtz \u{(with contributions by Heiko Oberdiek and
+ David Carlisle)} has developed\ldots''
+
+\erroronpage{78}{para 3, l.3}{UFi}{2004/06/01}{2}
+ Program name changed: ``Acrobat Reader'' \> ``Adobe Reader''
+
+
+\CHAPTER{Chapter 3}
+
+\erroronpage{84}{}{DAr}{2004/07/23}{2}
+Change: ``For example, if the current size is \u{\ttfamily\textbackslash Large} then
+\verb=\relsize{-2}= would change to \u{\ttfamily\textbackslash normalsize}\,.
+
+\seriouserroronpage{84}{exa 3-1-7}{FMi}{2004/04/23}{2}
+ To avoid extra space in the output, second line should read:\\
+ \verb*= {\relsize{-2}small words} inside.=
+
+\erroronpage{85}{para -1, l.5}{WaS/FMi}{2004/06/16}{2}
+ Change: ``ON 28TH \u{OF} JULY 2003'' \> ``ON 2ND AUGUST 2004''
+ (no OF generated)
+
+\seriouserroronpage{87}{para 3, l.1}{DAr}{2004/07/24}{2}
+ Replace: |\uuline| \> |\uline|
+
+\erroronpage{87}{exa. 3-1-15}{V-Li}{2004/08/14}{}
+ \verb+\-+ should be used on a word that is actually hyphenated.
+
+ Well, would be nice but not easy to find one.
+
+\erroronpage{87}{exa. 3-1-16}{DHL}{2004/06/07}{2}
+ The solid band produced by |\xout| is actually supposed to come
+ out as a series of separated ``/'' symbols. With the
+ \texttt{ulem} package used for the first printing that works well
+ for most text fonts, but
+ with Times Roman (used in the example) you get the result shown.
+ The new package version fixes this defect.
+
+\erroronpage{92}{para 3, l.1+4}{UFi}{2004/07/31}{2}
+Change: ``The position and the \u{height} of the line
+produced by the |\ul| command can be customized using either
+|\setul| or |\setuldepth|\,. The command |\setul| takes two
+dimensions as arguments: the position of the line in relation to the
+baseline and the \u{height} of the line.
+
+\erroronpage{92}{para -1}{FMi}{2004/07/31}{2}
+Add: ``\ldots can use colored rules instead and, if desired, modify the
+highlighting color\u{ as demonstrated below}:
+
+\erroronpage{95}{exa 3-1-33}{MHo/FMi}{2004/05/17}{2}
+ Replace: ``setup'' by ``set-up'' for consistency.
+
+\erroronpage{102}{para 1, l.-3}{CBC}{2004/05/18}{2}
+ Replace: ``in great \u{of} detail'' with ``in great detail''.
+
+\erroronpage{103}{l.8}{HjG}{2004/05/23}{2}
+ Replace: ``arbitrary bad lines'' \> ``arbitrar\u{il}y bad lines''
+
+\erroronpage{105}{para -3, l.1}{HjG}{2004/05/23}{2}
+ Replace: ``typesetting'' \> ``typing''
+
+
+
+\erroronpage{107}{l.3--7}{CBe}{2004/07/27}{4}
+ |\linespread| is the \LaTeXe\ command for
+ setting up the value of \comando{\baselinestretch}; it is not necessary
+ to use |\renewcommand| and in particular it is not necessary to
+ activate the new interline spacing by changing font; it suffices the command
+ |\selectfont|; the procedure described in this paragraph,
+ although still possible, was the one to use with \LaTeX\,209 and with the
+ early versions of \LaTeXe, and it was the only way when the First Edition was
+ published. The command |\linespread| is introduced the first
+ time on page~204, but section 3.1.13 was the right place to do it.
+
+
+\erroronpage{107}{para 4, l.3}{HjG}{2004/05/25}{2}
+ Delete word: ``\ldots\ single\u{ (default)}, \ldots''
+
+\erroronpage{107}{para -1, l.3--5}{DHL/FMi}{2004/06/07}{2}
+ Add/change:
+ ``\ldots leading is increased twice---once by |\baselineskip| (where
+ \LaTeX{} already adds about 20\% space between baselines)\ldots'' \>
+``\ldots leading is \u{effectively} increased twice---once by |\baselineskip| (\u{which
+ \LaTeX{} already sets to about 20\% above the font size})\ldots''
+
+
+\erroronpage{116}{Footnote 1, line 1}{CBC}{2004/05/18}{2}
+ Replace: ``I managed to confuse'' with ``we managed to confuse''.
+
+\erroronpage{117}{para 2, l.2}{HjG}{2004/05/25}{2}
+ Missing letter: ``It take\u{s} two \ldots''
+
+\erroronpage{117}{para 3, l.3}{CBC}{2004/05/18}{2}
+ Tense correction: ``\ldots they did not change when the text font
+ \u{was} modified''.
+
+\erroronpage{117}{para 3,l.-3}{FMi}{2004/05/31}{2}
+ Change: ``your list consist of'' \> ``your list\u{s} consist of''.
+
+\erroronpage{117}{para 3,l.-2}{CBC}{2004/05/18}{2}
+ Change: ``lists consist\u{s} of'' \> ``lists consist of''.
+
+\erroronpage{117}{footnote}{HjG}{2004/05/26}{2}
+ Missing word: ``See, \ldots, the \textsf{ledmac} package [171]
+ \u{for} the kinds of \ldots''
+
+\erroronpage{119}{para 2, l.1}{DHL}{2004/06/07}{2}
+ Replace word: ``By default, the footnote text is \u{justified}\ldots''
+
+\erroronpage{121}{para 2, l.4}{HjG}{2004/05/25}{2}
+ Missing word: ``the \texttt{symbol*} \u{option}''
+
+\erroronpage{124}{middle para, ll. -3/-2}{HjG}{2004/05/26}{2}
+ Missing word: ``It is even possible \u{to} use \ldots''
+
+\iffalse
+%% only do if real error on page
+\erroronpage{125}{para 3 of \S 3.2.7, ll.-2/-1}{HjG}{2004/05/26}{}
+ Word position: ``\ldots\ whenever |\endnote| or |\endnotemark|
+ \u{is used} without an optional argument.''
+\fi
+
+\erroronpage{127}{para 3, l.last}{PYu}{2004/07/01}{2}
+ Replace: ``ragged left'' \> ``ragged right''.
+
+\erroronpage{131}{footnote, l.1}{CBC}{2004/05/19}{2}
+ Change: ``is not producing'' \> ``does not produce''.
+
+\seriouserroronpage{141}{syntax box}{HjG}{2004/05/26}{2}
+ Replace:
+ \emph{body-font} \> \emph{body-style}\\
+ \emph{head-font} \> \emph{head-style}\\
+ \emph{head-after-format} \> \emph{head-after-space}
+
+\erroronpage{142}{exa 3-3-21/22}{UZi}{2005/03/15}{}
+ With the newest version of \texttt{amsthm} the font setting for the headline
+ is ignored for the optional description of the theorem (looks like a
+ bug in amsthm).
+
+\erroronpage{142}{exa 3-3-21}{FMi}{2005/08/15}{4}
+ There is an incompatibility between \texttt{amsthm} and
+ \texttt{ragged2e}. If the latter is used then the use of |\newline|
+ in a theorem declaration doesn't work.
+
+\erroronpage{142}{para -2, l.1}{DHL}{2004/06/07}{2}
+ Missing word: ``make'' \> ``\u{to} make''.
+
+\seriouserroronpage{148}{exa 3-3-26}{HjG}{2004/05/26}{2}
+ In the example, |\hfil| is used; the text immediately before says:
+ ``By using |\hfill| \ldots''
+
+\erroronpage{150}{exa 3-3-28}{HjG}{2004/05/27}{2}
+ Nit-picking :-)\\
+ Comment should read: ``|%|\quad\texttt{term <\u{=} labelwidth}''\\
+ And in ll.2/3 of the text following the example:
+ ``If the label is \u{smaller} than |\labelwidth|, \ldots'' \>
+ ``\ldots\ \u{not wider} \ldots''
+
+\erroronpage{150}{Example 3-3-28, line 7}{UF}{2004/06/27}{2}
+In the code of the parbox there should be a |\mbox{}| or something
+similar after the |\\| to prevent an underfull hbox-warning.
+
+\erroronpage{150}{exa 3-3-28}{JBez}{2004/07/20}{}
+ The vertical space above "Return values" is too small.
+
+\erroronpage{151}{para 3, l.2}{DHL}{2004/06/07}{2}
+ Wrong word: to match the example,
+ ``\textsc{Notes}'' should be ``\textsc{Note}''
+
+\erroronpage{152}{l.-1 before exa 3-4-2}{HjG}{2004/05/31}{2}
+ Replace: ``(see page 167)'' \> ``(see page 168)''
+
+\erroronpage{155}{para 3, l.2}{HjG}{2004/05/31}{2}
+ Replace: ``behaves similarly to''
+ \> ``is much like''
+
+\erroronpage{155}{para -2, l.5}{HjG}{2004/05/31}{2}
+ Replace: ``behave in similar fashion to''
+ \> ``\ldots in \u{a fashion similar} to''
+
+\erroronpage{156}{para -1, l.4}{CBC}{2004/05/20}{2}
+ Change: ``There is also the possibility to operate'' \> ``It is also
+ possible to operate''.
+
+\erroronpage{157}{para 2, l.-4}{CBC}{2004/05/20}{2}
+ Change: ``\ldots discussed below) are potentially'' \> ``\ldots
+ discussed below) \u{is} potentially''.
+
+\erroronpage{158}{para3, l.3}{DHL/FMi}{2004/06/07}{2}
+ Change word: ``tiny white rules \u{behind} the lines'' \> ``tiny white
+ rules \u{between} the lines''.
+
+\erroronpage{166}{syntax box}{CAR}{2004/06/02}{2}
+ Remove extra space: ``\ldots\verb*/}=/\u{~}\emph{data}\texttt=''
+
+\erroronpage{167}{para 1, l.2}{DAl}{2005/01/11}{4}
+ Missing letter: ``\ldots bold italic face exi\u{s}ts.''
+
+\erroronpage{168}{para 3, l.2}{MLa}{2004/05/10}{2}
+ Letter missing: ``While on\u{e} can successfully deploy a
+ package\ldots''
+
+\erroronpage{169}{tab.~3.7}{HjG}{2004/05/26}{2}
+ Spurious space: ``Pascal (\u{ \strut}Borland, \ldots)''
+
+\erroronpage{169}{tab.~3.7}{THa/FMi}{2004/06/21}{2}
+ Move the information about blue entries to a separate table note.
+
+\erroronpage{173}{para 2, l.2}{FMi}{2004/11/11}{4}
+ Typo: ``to indicate that the line was artific\u{i}ally broken''
+
+\erroronpage{175}{para 1, l.6}{FMi}{2005/02/22}{4}
+ Replace: \textsf{inputenclistings} \> \textsf{inputenc}
+
+\erroronpage{177}{exa 3-5-1}{HjG/FMi}{2004/05/31}{2}
+ In the first paragraph, the ``\ldots \verb*=.\para='' yields a
+ single (sentence ending) interword space; but in the following
+ three, ``\ldots \verb*=. \para='' yields doubled space.
+ (Due to the leading space in the definition of |\para|.)
+ The same problem is in exa 3-5-2 except that there is does not show
+ in the output due to a linebreak.
+
+\seriouserroronpage{177/178}{ll.-2/-1/1}{HjG/FMi}{2004/06/01}{2}
+ Missing word and references to wrong paragraphs of exa 3-5-2:\\
+ ``The line numbers in the second |\marginpar| continue the
+ numbering on the main vertical list (the last line of \u{first}
+ paragraph was~5) and the \u{second} paragraph then continues with
+ line number~9.''
+ \\ \>
+ ``\ldots\ (the last line of \u{the} \u{preceding} paragraph was~5) and
+ the \u{third} paragraph \ldots''
+
+\erroronpage{179}{exa 3-5-5}{HjG}{2004/05/31}{2}
+ In the first paragraph, the two instances of
+ ``|\linelabel{|\ldots|}|\verb*= \sample=''
+ yield double (sentence ending) interword space.
+ (Due to the leading space in the definition of |\sample|.)
+
+\erroronpage{179}{Example 3-5-5, l.-2}{CBC}{2004/05/20}{2}
+ Change: ``we see to refer to'' \> ``we see references to''.
+
+\erroronpage{182}{para 2, l.-2}{CBC}{2004/05/20}{2}
+ Change: ``of an \verb=\Parallel..Text='' \> ``of \u{a}
+ \verb=\Parallel..Text=.
+
+\erroronpage{182}{para 3, l.1}{HjG/FMi}{2004/05/31}{2}
+ ``computer \u{lingua}'' \> ``computer \u{jargon}''
+
+\erroronpage{182}{exa 3-5-11}{HjG/FMi}{2004/05/31}{2}
+ Small improvement:\\
+ |\setlength\parindent{|\u{\texttt{-10pt}}|}| \>
+ \ldots \u{\texttt{\char`\{-\char`\\leftskip\char`\}}}
+
+\iffalse only on some books
+\erroronpage{183}{exa 3-5-13}{HjG}{2004/05/31}{}
+ Printing problem:
+ ``|[|'' in ``|\begin{Parallel}[v]{}{}|'' only half visible.
+\fi
+
+\erroronpage{184}{footnote 1, l.1--2}{BMo}{2004/05/16}{2}
+ Rewrite beginning: ``Although the \textsf{multicol} package is
+ distributed under LPPL (\LaTeX{} Project Public License)~[111], for
+ historical reasons its copyright contains an additional ``moral
+ obligation'' clause\ldots''
+
+\erroronpage{189}{para 3, l.2}{MHo}{2004/05/08}{2}
+ Spurious extra letter: ``If this is a
+ possibility, \texttt{multicols}\u{t} produces a warning.''
+
+\erroronpage{189}{para -2, ll.2/3}{HjG}{2004/05/31}{2}
+ Extra word: ``bars in the margin, \u{the} known as \ldots''
+
+\erroronpage{189}{par -1, l.4/5}{HjG}{2004/05/31}{2}
+ Add comma: ``However, if \ldots\ another\u{,} the \ldots''
+
+\erroronpage{190}{}{FMi}{2004/06/13}{2}
+ Editorial comment: changes for page 189 affect page break position
+ so 190 has to be retypeset for second printing.
+
+
+\CHAPTER{Chapter 4}
+
+\erroronpage{196}{table 4.2}{YiL}{2012/05/07}{}
+ The values shown in the table aren't any quite correct. These days
+ some of them are calculated depending on the chosen paper size option
+ and so have slightly different values from what is listed in the table.
+ The values listed are those that have been used in 2.09 (i.e., they
+ would be fully correct in compatibility mode, that is for documents
+ starting with |\documentstyle|).
+
+\erroronpage{199}{code block}{UFi}{2004/07/31}{2}
+ Change:
+ \texttt{\u{1in}+}|\oddsidemargin+\textwidth+\evensidemargin|\texttt{\u{+1in}}
+
+
+\erroronpage{202}{para 3, l.4}{CBC}{2004/05/21}{2}
+ Change: ``list-related parameter'' \> ``list-related parameters''.
+
+\erroronpage{202}{para 3, l.4}{PYu}{2004/07/07}{2}
+ Remove surplus word: ``in \u{in} figure 3.3''
+
+\erroronpage{203}{para 3, l.3}{HjG}{2004/05/31}{2}
+ ``one or the other criteri\u{a}''
+ \> ``\ldots\ criteri\u{on}'' (singular)
+
+\seriouserroronpage{205}{para 2, l.2}{HjG}{2004/05/31}{2}
+ Delete backslash: ``an option of the type
+ \u{\texttt{\char`\\}}\emph{num}|headlines|''
+
+\erroronpage{205}{para 3, l.1}{CBC}{2004/05/21}{2}
+ Swap words: ``header \u{is size} enlarged'' \> ``header \u{size is}
+ enlarged''.
+
+\erroronpage{205}{para 4, l.4}{CAR}{2004/06/06}{2}
+ Delete word: ``\ldots taken up by the binding\u{ method}. For
+ example,\ldots''
+
+\erroronpage{205}{para 5, l.2}{CBC}{2004/05/21}{2}
+Omitted word: ``one can \u{perform} the parameter calculations''.
+
+\seriouserroronpage{205}{para 5}{FMi}{2004/06/06}{2}
+Append: For details see the KOMA-Script documentation.
+
+\seriouserroronpage{205}{Example 4-2-6, 1.3}{CBC}{2004/05/21}{2}
+Add a comment line: ``\verb=% syntax: \typearea[<binding corr.>]{<slices>}=''
+
+\erroronpage{206}{para 2, l.6}{FMi}{2004/06/06}{2}
+
+ Replace: ``\ldots shows a layout \u{identical} to the one
+ produced\ldots'' \>
+ ``\ldots shows a layout \u{very similar} to the one produced\ldots''
+
+\seriouserroronpage{206}{para 2, l.6}{HjG}{2004/05/31}{2}
+ Wrong references:\\
+ ``Example \u{4-2-4} on page \u{204}'' \>
+ ``Example \u{4-2-5} on page \u{205}''
+
+\erroronpage{209}{para 1, l.1--2}{BMo}{2004/05/16}{2}
+ Replace:
+ ``\ldots and does not leave sufficient space for marginal notes
+ that fall outside the page.''
+ \>
+ ``\ldots but does not adjust the size of the marginal boxes to fit
+ in the remaining margin.''
+
+
+\erroronpage{210}{para -1, l.3}{CBC}{2004/05/21}{2}
+ Omitted word: ``allow you \u{to} set several values''.
+
+\erroronpage{211}{para 4, l.6}{FMi}{2004/08/30}{4}
+ Add: ``\ldots be called multiple times \u{in the preamble},
+ each time overwriting the previous settings.''
+
+\erroronpage{212}{para -1, l.2}{CKr}{2004/11/11}{4}
+ Remove surplus: ``the \emph{logical} page
+ \u{you} you want to produce.''
+
+\seriouserroronpage{213}{para 1, l.2}{BMo}{2004/05/16}{2}
+ Option \texttt{executive} is listed twice, replace once with
+ \texttt{letter}.
+
+\erroronpage{213}{para 2, l.1}{CKr}{2004/11/11}{4}
+ Typo: ``The following example sets up an artific\u{i}ally small logical page''
+
+\erroronpage{213}{para 1, l.1--2}{FMi}{2006/09/09}{4}
+ Option \texttt{b3} is listed twice.
+
+\erroronpage{213/214}{exa 4-2-11/13}{FMi}{2004/06/05}{2}
+ The picture (|rosette.ps|) is clipped a tiny bit at the left side.
+ That's actually an error in the |.ps| file itself and can be seen
+ in all other examples where the file is used.
+
+\seriouserroronpage{214}{para 1, l.6}{BMo}{2004/05/16}{2}
+ ``\ldots\ \texttt{notext} \ldots'' should be ``\ldots\
+ \texttt{nographics} \ldots''.
+
+\erroronpage{217}{para -2, l.1}{HjG}{2005/05/08}{4}
+ Replace (since the package's default is different):\\
+ Finally the \u{en dash} between the prefix and the page number \dots\ \>\\
+ Finally the \u{separator} between the prefix and the page number \dots
+
+\erroronpage{219}{l.4}{HjG}{2004/06/03}{2}
+ Missing italic correction:
+ \verb=\=\emph{name}\verb=mark=
+
+\erroronpage{219}{para -1,l.2}{HjG}{2005/05/09}{4}
+ Reference to wrong section:\\
+ ``Table~9.2 on page~547 in Section~\u{9.1.3}'' \>\\
+ ``Table~9.2 on page~547 in Section~\u{9.2.1}''
+ (or omit section refence completely)
+
+\erroronpage{223}{tab 4.3}{THa}{2004/06/22}{2}
+ Spurious space after superscript \textsuperscript{a} in footnote.
+
+\erroronpage{226}{para. 5, l.2}{PYu}{2004/07/05}{2}
+ Change to plural: ``The headers and footers are typeset \u{in boxes}
+ that, by default, \u{have} the same width as |\textwidth|\,. The
+ \u{boxes} can be made wider (or narrower)\ldots''
+
+
+\erroronpage{227}{para 2,l.1}{HjG}{2005/05/09}{4}
+ Replace:
+ ``running \u{heading}'' \>
+ ``running \u{header}''
+
+\erroronpage{227}{para 3,l.1}{HjG}{2005/05/09}{4}
+ Replace:
+ ``the \u{heading} is extended'' \>
+ ``the \u{header} is extended'' \>
+
+\erroronpage{229}{2.-1}{CBC}{2004/05/24}{2}
+ Change: ``if the first B-head\ldots would have already been'' \> ``if
+ the first B-head\ldots had already been''.
+
+\erroronpage{229}{para -2,l.-2}{HjG}{2005/05/09}{4}
+ Replace:
+ ``the \u{heading}'' \>
+ ``the \u{header}''
+
+\erroronpage{230}{exa 4-4-3}{HjG}{2005/05/09}{4}
+ Add |%| character:
+ ``|\fancyfoot[R]{\scriptsize\today}|\texttt{\u{\char`\%}}''
+
+% not a bug, but heh ho
+\erroronpage{232}{ll.1/2}{HjG}{2004/06/03}{2}
+ Add words: ``With a similar mechanism we prepared \u{the running
+ headers of} the index for this book.''
+
+\erroronpage{232}{ll.1/2}{CKr}{2004/11/17}{4}
+ Remove surplus: ``With a similar mechanism we prepared \u{the} the running\ldots''
+
+\seriouserroronpage{234}{First boxed command}{CBC}{2004/05/24}{2}
+ Change: ``\verb=\enlargethispage*{=size\verb=}='' \>
+ ``\verb=\enlargethispage{=size\verb=}=''.
+
+\erroronpage{237}{para 1, l.3}{MKo}{2004/08/06}{2}
+ Change: ``\textsf{scrpage}'' \> ``\textsf{scrpage2}''
+
+\erroronpage{237}{para 4, l.3}{DAl}{2005/01/11}{4}
+ Change: ``also works as \u{an} replacement'' \> ``also works as
+ \u{a} replacement''
+
+\erroronpage{237}{para 5, l.2}{CBe}{2004/07/27}{2}
+ Change: ``14pt'' \> ``17pt''
+
+
+\CHAPTER{Chapter 5}
+
+\erroronpage{239}{para -1, l.1}{HjG}{2004/06/03}{2}
+ Extra word: ``After \u{a} taking a quick look \ldots''
+
+\erroronpage{241}{Example 5-1-1}{CBC}{2004/05/24}{2}
+
+ Change: ``esprit trouble'' \> ``esprit troubl\'e''.
+
+The whole example has been changed to better demonstrate
+the \verb|\kill| command.
+
+\erroronpage{242}{para -2}{DSch/FMi}{2005/09/19}{4}
+ Replace para with:
+``The \texttt{tabular*} environment has an additional width argument that
+specifies the required total width of the table.
+It needs stretchable spaces between columns, that have to be added using
+|\extracolsep| (see page~246).''
+
+\iffalse
+%% check, maybe (if other error
+\erroronpage{243}{para 1, l.3/4}{HjG}{2004/06/03}{}
+ Change: ``Their scope can be \u{general} or local.''
+ \> ``\u{global}''
+\fi
+
+\erroronpage{243}{}{CBe}{2004/07/27}{4}
+ The explanation of the command \comando{\arraystretch} is
+ wrong; in fact it does not multiply the inter-row space by the specified
+ factor, so that a factor of 1.5 would move the rows 50\% farther apart.
+ \comando{\arraystretch} scales by the specified factor the height and depth of
+ the invisible strut that is in the first cell of every row of tabular and array
+ environments. If all the cells of the row are smaller than the strut the effect
+ is more or less similar to an enlargement of the inter-row space, while if at
+ least one cell in the row is larger than the strut no spreading apart takes
+ place other than that required by the largest cell.
+
+
+
+\erroronpage{243/244}{tab.~5.1/5.2}{HjG}{2004/06/03}{2}
+ In the left columns of these tables, typewriter font should be used
+ for the braces, to better match the appearance in the syntax boxes.
+
+\erroronpage{244}{tab.~5.2}{HjG}{2004/06/03}{2}
+ 1. In the |m| row, the braces in |\parbox|\u{\{}\emph{width}\u{\}}
+ are not from the typewriter font, as they are in the |b| row.\\
+ 2. In the |>| and |<| rows, the |p|, |m|, and |b| options are
+ listed once without and once with their |{..}| arguments.
+
+\seriouserroronpage{244}{para -1, l.3--4}{FMi/DCa}{2005/02/05}{4}
+ Replace: ``the sum of its value,
+ added to the product
+ |\baselineskip|${}\times{}$|\arraystretch}|''
+ \>
+ `` $|\arraystretch| \times (|\extrarowheight| + 0.7 |\baselineskip|)$''
+
+
+\erroronpage{246}{para 3}{FMi}{2005/09/19}{4}
+ Add blue marginal note: ``Making \texttt{tabular*} stretch to the
+ required width''
+
+\erroronpage{246}{para 3, l.3/4}{HjG}{2004/06/03}{2}
+ Change:
+ ``The use \ldots\ is subject\u{ed} to two restrictions: \ldots''
+ \> ``\ldots~subject \ldots''
+
+\erroronpage{247}{exa 5-2-9}{CBe}{2004/07/27}{2}
+ Add hyphenation points for |Possibi\-li\-t\'es|
+
+\erroronpage{248}{para 1}{FMi}{2005/09/19}{4}
+ Replace para with: ``A
+ common use of |@{}| is to remove the space equal to
+the value of |\tabcolsep| (for \texttt{tabular}) that, by default,
+appears on each side of the table,
+except when the column specification starts or ends in a \verb=|=.''
+
+
+\erroronpage{249}{exa 5-2-11}{FMi}{2004/07/27}{2}
+ Add hyphenation points for |Possibi\-li\-t\'es|
+
+\seriouserroronpage{249}{l.-2}{HjG}{2004/06/03}{2}
+ Change:
+ ``\ldots\ the \textsf{array} package \texttt{m} and \u{\texttt{t}}
+ types, \ldots''
+ \> ``\ldots\ \u{\texttt{b}} \ldots''
+
+\erroronpage{252}{para 2, l.3}{HjG}{2004/06/03}{2}
+ Missing word: ``\ldots\ the last entry in \u{a} row \ldots''\\
+ Missing word: ``This specification may \u{be} saved \ldots''
+
+\erroronpage{252}{para 3, l.1}{HjG}{2004/06/03}{2}
+ Either add: ``The |X| columns are set using the |p| column
+ \u{type}, \ldots''\\
+ or change (cf.~l.2: an |m| column): ``\ldots\ using \u{a} |p|
+ column \ldots''
+
+\seriouserroronpage{257}{syntax box~2}{HjG}{2004/06/03}{2}
+ Typo: ``\texttt{\char`\\botto\u{m}caption}''
+
+\erroronpage{261}{para 3, l.3}{HPB/FMi}{2004/07/16}{2}
+Add: ``\ldots may be typeset using
+ \u{the packages \textsf{array} and} \textsf{longtable} \ldots''
+
+\erroronpage{262}{para -1, l.2}{HjG/FMi}{2004/06/04}{2}
+ Missing characters:
+ ``in standard \LaTeX{}\u{'s} \textsf{article} class''
+
+\erroronpage{270}{exa 5-6-7}{DCa}{2004/07/22}{2}
+ Spurious `` d'' after ``Beef'' should be deleted.
+
+\seriouserroronpage{270}{para 3 l.1}{UFi}{2004/07/31}{2}
+ Change: |\botrule| \> |\bottomrule|
+
+\seriouserroronpage{271}{para 3}{FMi}{2004/12/17}{4}
+ Replace para by: ``By default, the rule extends all the way to the left, but is
+ ``trimmed'' from the rightmost column by the length specified in the
+ length parameter |\cmidrulekern|. The optional (\emph{trim})
+ \u{argument may contain the characters
+ \texttt{l} and \texttt{r},
+ indicating that the rule}
+ \u{is to be trimmed from the left or right, respectively.}
+ Each \texttt{l} and \texttt{r} may optionally be followed by a width
+ argument \u{specified using \texttt{\{}\emph{widths}\texttt{\}}},
+ in which case the rule is trimmed by this amount rather than by the default
+ |\cmidrulekern|.
+
+
+\seriouserroronpage{271}{syntax box~1}{HjG}{2004/06/04}{2}
+ Argument is optional, not mandatory:
+ |\addlinespace|\texttt{\u[}\emph{width}\texttt{\u]}
+
+\erroronpage{273}{para 3, l.3}{HjG}{2004/05/26}{2}
+ Missing word: ``not accounted for \u{by} |\multirow|''
+
+\seriouserroronpage{278}{para 2, l.-1}{HjG}{2004/05/26}{2}
+ Replace: ``Section 6-3-4'' \> ``Example 6-3-4''
+
+\erroronpage{279}{list, item 1}{CKr}{2004/11/30}{4}
+ Correct typo: ``forced line b\u{r}eaks.''
+
+
+
+\CHAPTER{Chapter 6}
+
+\erroronpage{283}{para 2, l.5--8}{FMi}{2005/01/15}{4}
+Replace with: ``We then continue by
+ explaining how you can define and use your own floating environments (Section~6.3.1),
+ or, conversely, how captioning commands can be used to enter
+ information into the list of figures and tables for nonfloating
+ material (Section~6.3.2).
+ Then methods for rotating the content of a float are described
+ (Section~6.3.3).
+
+\erroronpage{284}{}{FMi}{2005/01/15}{4}
+ Editorial comment: needs reprinting since one line moved from
+ 283 to the current page.
+
+\erroronpage{285}{item 3, l.3}{FMi}{2005/02/13}{4}
+ Use typewriter: ``the default is \texttt{12pt}
+ \texttt{plus} \texttt{2pt} \u{\texttt{minus}}
+ \texttt{2pt} for 10\,pt''
+
+\erroronpage{285}{item 3, l.3}{HjG}{2005/02/06}{4}
+ Default for 12pt document size is given wrong:\\
+ ``\texttt{\u{14pt} plus 2pt minus 4pt}'' \>
+ ``\texttt{\u{12pt} plus 2pt minus 4pt}''
+
+\erroronpage{285}{item 3, l.4}{HjG}{2004/06/05}{2}
+ Should be singular: ``for 12pt document size\u{s}).''
+
+\erroronpage{285}{item 7, l.3}{HjG/FMi}{2005/02/06}{4}
+ Replace (as it is rubbish):
+ ``(the default is like |\textfloatsep| on a text page,
+ but is |8pt plus 2fil| on a page that contains only floats)'' \>\\
+ ``(the default is like |\textfloatsep|)''
+
+\erroronpage{288}{para -1, l.4--7}{DAr/FMi}{2004/07/23}{2}
+ Replace part with:
+``However, by itself this option
+forces all floats to appear \emph{before} the next section material is
+typeset, since the |\FloatBarrier| prevents a float from a current
+ section from appearing below
+the start of the new section, even if some material of the current
+section is present on the same page. ''
+
+\erroronpage{292}{para 4, ll.1/2}{HjG}{2004/06/05}{2}
+ Replace: ``combination \u{to}'' \> ``combination \u{of}''
+
+\seriouserroronpage{292}{para -1, l-2}{FMi}{2005/01/08}{4}
+Add sentence:
+ ``Because the float styles define the placement of the caption,
+floats can contain only a single \verb=\caption= command which is a
+restriction compared to standard \LaTeX's behavior.''
+
+Also add marginal warning: ``Only one \verb=\caption= supported''
+
+
+\erroronpage{293}{para 1, l.3}{J-CCh}{2005/06/01}{4}
+Remove surplus char: ``package documentation in
+\texttt{float\u{s}.dtx}.''
+
+\seriouserroronpage{293}{exa 6-3-1}{HjG/FMi}{2004/06/05}{2}
+ Wrong command used (or misplaced opening brace) in preamble code:\\
+ |\newcommand\xmlcode[1]{\|\u{\ttfamily ttfamily}|{#1}}|
+ \>\\
+ |\newcommand\xmlcode[1]{\|\u{\ttfamily texttt}|{#1}}| \\
+ only by chance this doesn't do any harm in the example!
+
+\erroronpage{293}{exa 6-3-1}{CBe}{2004/07/27}{4}
+The Euler constant must be typeset in roman type according
+to the ISO rules; $e$ is the charge of the electron.
+
+\erroronpage{294}{exa 6-3-3}{HjG/FMi}{2004/06/05}{2}
+ The picture (|rosette.ps|) is clipped a tiny bit at the left side.
+ That's actually an error in the |.ps| file itself and can be seen
+ in all other examples where the file is used.
+
+\erroronpage{295}{para -2, l.3}{HjG}{2004/06/05}{2}
+ Missing word: ``The |[H]| \u{float} is \ldots''
+
+
+\erroronpage{298}{para 1, l.4}{AMa}{2005/01/13}{4}
+ The word ``caption'' should be should typeset in sans serif.
+
+\seriouserroronpage{298}{para 3, l.5}{HjG}{2004/06/06}{2}
+ Missing argument: ``|\newfloat{XMLexa}|%
+ \u{\texttt{\textbraceleft\meta{placement}\textbraceright}}|{lox}|''
+
+\erroronpage{299}{para 2, ll.-2/-1}{HjG}{2004/06/06}{2}
+ Missing word: ``so that it \u{is} not worth''
+
+\erroronpage{301}{exa 6-4-2}{HjG}{2004/06/06}{2}
+ Misspelled word (both in source and output):\\
+ ``\texttt{ex-\u{s}ample}'' \> ``\texttt{ex-ample}''
+
+\seriouserroronpage{302}{para 2, l.4}{HjG}{2004/06/06}{2}
+ Missing argument: ``|\newfloat{XML}|%
+ \u{\texttt{\textbraceleft\meta{placement}\textbraceright}}|{lox}|''
+
+\erroronpage{304/305}{exa 6-4-4}{HjG}{2004/06/06}{2}
+ The |\FIG| command is different from the one from
+ exa 6-4-3 (p.303).
+ Add a line:\\
+ |\newcommand\FIG{\includegraphics[width=10mm]{elephant}}|\\
+ in the preamble part of the example's source.\\
+ (But that will probably spoil your hand-optimized page breaks. ---
+ Actually it will improve them: by getting the example larger on
+ line will carry over from 304 to 305 avoiding the widow there
+ without changing that page otherwise)
+
+\erroronpage{307}{l.-4}{HjG}{2005/02/12}{4}
+ Surplus closing brace:\\
+ ``|\makebox[\linewidth][c]{\usebox\@tempboxa}|%
+ |\par|\texttt{\u\textbraceright}|% single line|''
+
+\iffalse
+\erroronpage{307}{l.3--4}{CBe}{2004/07/27}{}
+The Runaway error may be explained in a better way: the
+ \emph{short-text} cannot exceed one paragraph; the \emph{long-text} may be
+ several paragraphs long; if the optional argument \emph{short-text} is missing
+ the \emph{long-text} replaces it, therefore the macros that should process the
+ single paragraph \emph{short-text} get terribly shaken and produce the Runaway
+ argument error. A reference to Appendix~B and the long\slash short definition
+ of commands should be helpful.
+\fi
+
+\erroronpage{309}{para 4, l.3}{DAl}{2005/06/29}{4}
+ Missing comma: ``\ldots you will get a typical ``standard \LaTeX''
+ format\u{,} that is, \ldots''
+
+\erroronpage{312}{\texttt{position} option}{JS/FMi}{2005/09/14}{4}
+ State that key \texttt{bottom} is the default.
+
+\erroronpage{312}{para 2, l.2}{DAl}{2005/06/29}{4}
+ Word in wrong position: ``for example, ``above'' the caption if
+ caption is \u{the} placed at the bottom.''
+ \>
+ ``for example, ``above'' the caption if \u{the} caption is \ldots''
+
+\erroronpage{317}{para -4, l.1}{HjG}{2004/06/06}{2}
+ Extra letter: ``The \textsf{subfig} package\u{s} \ldots''
+
+\erroronpage{319}{para 1, l.5}{C-JCh}{2005/06/10}{4}
+ Incorrect right quote: ``numbers like ``11.3\u{''}\ldots''
+
+\erroronpage{319}{para 2, l.3}{C-JCh}{2005/06/10}{4}
+ Incorrect right quote: ``such as ``Figure 1(a-c)\u{''}.''
+
+\erroronpage{321}{exa 6-5-13, l.2}{HjG/FMi}{2004/06/06}{2}
+ Change value:
+ ``|listofindent=4em|'' \> ``|listofindent=5em|''.\\
+ Looks better and also makes description on page 320 correct.
+
+\erroronpage{321}{para 3, l.2}{UFi}{2004/07/31}{2}
+Remove: ``approach is to \u{to} specify\ldots''
+
+\erroronpage{326}{para -1, l.4}{DAl}{2005/07/14}{4}
+ Missing letter: ``floats appear to\u{o} close to each other\ldots''
+
+
+
+\CHAPTER{Chapter 7}
+
+\erroronpage{332}{para -2,l.2}{THa}{2004/07/21}{2}
+ SinCE SEriFS arE noT alwayS horizonTaL: ``Serifs are the tiny
+ horizontal strokes\dots'' \> ``Serifs are the tiny strokes\dots''
+
+\erroronpage{338}{para -1, l.3}{HjG}{2004/06/29}{2}
+ Missing word: ``command \u{and} declarative forms''
+
+\erroronpage{341}{para -2, l.-2}{HjG}{2004/06/29}{2}
+ Missing comma: ``such as |\OE|\u, to lowercase).''
+
+\erroronpage{342}{tab 7.1}{CBe/FMi}{2004/07/27}{2}
+ Add footnote: ``\textit{The actual sizes shown above are those specially
+ tailored for use in this book}''
+
+\erroronpage{347}{para 2, l.5+6}{JS/FMi}{2006/11/08}{s}
+Replace: ``\u{Computer Modern Typewriter and}
+Computer Modern Sans \u{have} only bold extended variants.''
+\>
+ ``\u{In contrast} Computer Modern Sans \u{has} only bold extended variants.''
+
+\erroronpage{349}{Table 7.4}{AFV}{2008/08/08}{}
+The font associated with the command |\mathtt| is a sans typewriter font. This
+differs from nearly all TeX set ups where the math typewriter font is Computer
+Modern Typewriter.
+
+\erroronpage{349}{para -1, l.2}{HjG}{2004/06/29}{2}
+ Missing comma:
+ ``\ldots\ where commands, such as |\rm|\u, would cause \ldots''
+
+\erroronpage{351}{para -2, l.5}{HjG}{2004/06/29}{2}
+ Surplus word:
+ ``\ldots\ belongs to the text \u{the} surrounding the formula.''
+
+\erroronpage{353}{para 4, l.2}{HjG}{2004/06/29}{2}
+ Replace:
+ ``\u{Extended} Computer Modern'' \>
+ ``\u{European} Computer Modern''
+
+\erroronpage{354/355}{marginal 3}{FMi}{2004/04/23}{2}
+ Should be on top of page 355.
+
+\erroronpage{354}{table caption}{AFV/FMi}{2009/01/5}{}
+ Replace: ``Classification of the Computer Modern font families'' \>
+ ``Classification of \u{most} Computer Modern font families''
+ as not all fonts are listed.
+
+\erroronpage{355}{para 4, l.2}{HjG}{2004/06/29}{2}
+ Missing character: ``on\u{e} can simply exchange''
+
+\erroronpage{356}{para 2, l.2}{HjG}{2004/06/30}{2}
+ Correct: ``\u{ZE}-fonts'' \> ``\u{EZ}-fonts''
+ (Index entry is OK!)
+
+\erroronpage{357}{exa 7-5-5, last line}{RSt}{2004/05/26}{2}
+ Reference [174] instead of [175].
+
+\erroronpage{357}{exa 7-5-5}{HjG}{2004/06/30}{2}
+ Add page entries for ``Clasen, Matthias'', ``Vieth, Ulrik'', and
+ ``Ziegler, Justin'' to ``People'' index (pp.1080+1082)
+
+\erroronpage{357}{l.-2}{HjG}{2004/06/30}{2}
+ Add word:
+ ``Clearly, no one wants to type \u{text} like this \ldots''
+
+\erroronpage{358}{para -1, l.1}{HjG}{2004/06/30}{2}
+ Change word order:\\
+ ``The list of \u{currently} \u{supported encodings} by
+ \textsf{inputenc} \ldots'' \>\\
+ ``The list of \u{encodings} \u{currently supported} by
+ \textsf{inputenc} \ldots''
+
+\erroronpage{359}{several places}{MKu/FMi}{2004/06/24}{2}
+ Replace: ISO-8859 \> ISO 8859
+
+\erroronpage{360}{item 8}{CKr}{2004/12/30}{4}
+ Replace: Next Computer encoding \> Ne\u{XT} Computer encoding
+
+\erroronpage{360}{item 9}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8
+
+\erroronpage{360}{para -1}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8 (several times)
+
+\erroronpage{361}{para 2+3}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8 (several times)
+
+\erroronpage{361}{l.-14}{CBe/FMi}{2004/07/27}{2}
+ Replace: ``preamble or the document class'' \>
+ ``document class, a package, or in the preamble''
+
+
+\erroronpage{362}{l.1}{HjG}{2004/06/30}{2}
+ Swap phrases:\\
+ ``\ldots\ the user \u{in the preamble} \u{to load still
+ more encodings}.'' \\\>\\
+ ``\ldots\ the user \u{to load still more encodings}
+ \u{in the preamble}.''
+
+\erroronpage{362}{para 1, l.1}{SCo}{2004/05/17}{2}
+ Printing problem in some books: ``still'', second `l' only half visible.
+
+\erroronpage{367}{para 2, l.3}{CKr}{2005/01/03}{4}
+ Wrong font: ``old-style numerals by simply switching to the \u{\texttt{TS1}}''
+
+\erroronpage{368}{para -4, l.3}{HjG}{2004/07/01}{2}
+ Change:\\
+ ``\ldots\ only. \u{Only} real errors will be shown.'' \>\\
+ ``\ldots\ only. \u{However,} real errors will be shown
+ \u{on the terminal}.''
+
+\erroronpage{370}{para 2, l.-1}{RSt}{2004/05/26}{2}
+ Replace: ``ran run'' with ``\u{you ran}''.
+
+\erroronpage{370}{para 4, l.5}{HjG}{2004/07/06}{2}
+ Add: ``\ldots\ in one of the three \u{text font} categories.''
+
+\erroronpage{371}{para 1, l.4}{HjG}{2004/07/06}{2}
+ Add: ``\ldots, such as via a call to |\usefont|\u{ (see Example
+ 7-6-1 below)}.''
+
+\erroronpage{373}{first line of 7.6.1}{UFi}{2004/07/31}{2}
+ Remove ``the \u{the} fonts''
+
+\erroronpage{373}{first para, l.-1}{BeB}{2004/06/28}{2}
+ ``collection'' is (at least seems to me) singular:\\
+ Typo: ``appear'' \> ``appears''
+
+\erroronpage{374}{`Bookman', l.1}{HjG}{2004/07/08}{2}
+ Typo: ``Bookman was originally design\u{ed} \ldots''
+
+\seriouserroronpage{380}{para 1, l.4--5}{BMo}{2004/05/16}{2}
+ Better show octal numbers: ``\ldots starting positions like
+ \texttt{'254}, \texttt{'266}, \texttt{'300}, and \texttt{'312}
+ (i.e., in octal notation) in\ldots''
+
+\erroronpage{380}{exa. 7-6-10}{J-CCh}{2005/07/06}{4}
+ Replace: AGEWMET\u{P}HTOS \> AGEWMET\u{R}HTOS
+
+\erroronpage{386}{para -1, l.2}{RWa}{2004/05/31}{2}
+ Replace ``the X Window\u{s} system'' with ``the X Window \u{S}ystem''.
+
+\erroronpage{387}{para -1, ll.3/4}{HjG}{2004/07/09}{2}
+ Missing word: ``\texttt{0.87478} should \u{be} used''\\
+
+\iffalse
+% no idea if we can fit that in:
+\erroronpage{387}{para -1, ll.3/4}{HjG}{2004/07/09}{}
+ Value for 12\,pt?
+\fi
+
+\erroronpage{388}{tab. 7.14}{HjG}{2004/07/09}{2}
+ Row~1: Thickness of vertical line between first two columns too
+ wide (printing problem).
+
+\erroronpage{388}{tab 7.14, l.-2}{RPa}{2004/09/14}{4}
+ Missing space between ``m,'' and ``bx'' in the middle column.
+
+\erroronpage{391}{tab. 7.15}{FMi}{2004/07/09}{2}
+ Row~1: Thickness of vertical line between first two columns too
+ wide (printing problem).
+
+\erroronpage{391}{tab 7.15, l.-2}{RPa}{2004/09/14}{4}
+ Missing space between ``m,'' and ``bx'' in the middle column.
+
+\erroronpage{392}{tab 7.16, l.3}{RPa}{2004/09/14}{4}
+ ``(bx)'' should be moved to the second column.
+
+\erroronpage{393}{tab 7.17, l.3}{RPa}{2004/09/14}{4}
+ Missing space between ``(it),'' and ``sc'' in the third column.
+
+\erroronpage{395}{exa 7-7-20}{HjG}{2004/06/22}{2}
+ Commands need to be swapped to match text:\\
+ ``|\gothfamily| Swab'' \> ``|\swabfamily| Swab''\\
+ ``|\swabfamily| Gothic'' \> ``|\gothfamily| Gothic''
+
+\erroronpage{395}{exa 7-7-21}{TSS}{2004/05/25}{2}
+ The ``s'' in word ``dies'' should be the ``short s'' (ligature
+ ``s:'') since it occurs in a syllable-final position.
+% others wrong???
+%According to page 765 of "The World's Writing Systems" (edited by P.T.
+%Daniels and W. Bright, ISBN 0-19-507993-0, Oxford University Press,
+%1996), a syllable-final "s" in fraktur text should be the "short s".
+
+\erroronpage{396}{para 3, l.5}{FMi}{2004/04/23}{2}
+ Should be: ``\ldots on the \u{third} line.''
+
+\erroronpage{396}{exa 7-7-22}{TSS}{2004/05/25}{2}
+ The ``s'' in word ``dies'' should be the ``short s'' (ligature
+ ``s:'') since it occurs in a syllable-final position.
+
+\erroronpage{403}{para 1, ll.1/2}{HjG}{2004/07/09}{2}
+ Change: ``by using \u{G}lyph \u{C}hart''
+ \> ``by using \u{the} \u{g}lyph \u{c}hart''\\
+ (cf.\ para 3, l.1)
+
+\erroronpage{405}{para 3, l.4}{HjG}{2004/06/22}{2}
+ Missing word:
+ ``of \u{the} International Phonetic Alphabet (IPA)''
+
+\erroronpage{405/406}{ll.-1/1/2}{HjG}{2004/06/22}{2}
+ Move closing parenthesis:\\
+ ``\ldots (based on \ldots\ by Donald Knuth, \ldots \u).'' \> \\
+ ``\ldots (based on \ldots\ by Donald Knuth\u), \ldots \,.''
+
+\erroronpage{406}{exa 7-8-11}{HjG}{2004/07/09}{2}
+ Add comma (?): ``|k\ae{}t|\texttt{\u,}''
+
+\erroronpage{407}{para -2, l.1}{BMo}{2004/05/16}{2}
+ Missing word: ``With popular fonts designed for use with \TeX{},
+ the euro symbol \u{is} usually available\ldots''
+
+\erroronpage{413}{para -2, l-1}{CBe}{2004/07/27}{4}
+ ``local guide''; I believe this is an obsolete concept, dating back to
+ the times when \TeX\ and \LaTeX\ were used on multitasking mainframes;
+ commercial distributions might still have a ``local guide'', but I have never
+ seen one.
+
+
+\erroronpage{414}{footnote}{hv}{2008/10/30}{}
+Replace: |\pcharpath| \> |\pscharpath|.
+
+These days the package |pst-char| has been integrated into |pst-text|.
+
+\erroronpage{416}{tab. 7.27}{HjG}{2004/07/09}{2}
+ Uppercase vs.\ lowercase in entries for \texttt{T3} and
+ \texttt{TS3}:\\
+ ``\LaTeX{} \u{P}honetic \u{A}lphabet encoding'' $\leftrightarrow$\\
+ ``\LaTeX{} \u{p}honetic \u{a}lphabet encoding''
+
+\erroronpage{417}{para 4, l.6}{HjG}{2004/07/10}{2}
+ Correct case:
+ ``\ldots\ in front of it. \u For example,''
+
+\erroronpage{418}{para 2, l.-2}{HjG}{2004/07/10}{2}
+ Add:
+ ``a typewriter font \u{in medium series} with italic shape''
+
+\erroronpage{420}{table 7.28}{CKr}{2005/04/08}{4}
+ For consistency: ``narrow'' \> ``\u{N}arrow''
+
+\erroronpage{420}{para 1, l.6}{FMi}{2004/06/24}{2}
+ Replace: ISO-9660 \> ISO 9660
+
+\erroronpage{426}{para 1, l.-2}{CKr}{2005/01/17}{4}
+ Remove surplus: ``\ldots---other declarations that use this \u{the}
+ font will benefit automatically.''
+
+\erroronpage{426}{para 1, last sentence}{CAR}{2005/01/22}{4}
+ Replace with following sentence:
+ ``This may seem like a strange usage but it has the advantage that when
+ such additional
+ fonts become available you will need to change
+ only one font shape group declaration---all declarations that
+ refer indirectly to these fonts will then benefit automatically.''
+
+
+\erroronpage{426}{para 5}{HjG}{2004/07/10}{2}
+ Surplus word: ``\ldots, this function \u{it} writes \ldots''
+
+\erroronpage{426}{l.-2}{HjG}{2004/07/10}{2}
+ Add word: ``The \u{third} argument''
+
+\erroronpage{428}{item 6}{CKr}{2005/01/18}{4}
+ Replace: ``Specified the quad width'' \> ``Specifie\u{s} the quad
+ width''
+
+\erroronpage{432}{para 4, l.9}{HjG}{2004/07/11}{2}
+ Not plural: ``\ldots: the outer text size\u{s} and the three math
+ sizes for this text size.''
+
+\erroronpage{433}{l.-10}{HjG}{2004/07/11}{2}
+ Not start of a sentence, hence \> lowercase:
+ ``\u{a}nd are usually placed in an \texttt{.fd} file.''
+
+\erroronpage{441}{para 5, l.1}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8
+
+\erroronpage{442}{footnote, l.2}{usw}{2005/01/11}{4}
+ Sentence begins with lowercase 's'.
+
+\erroronpage{443}{para 1, l.1--2}{FMi}{2005/06/10}{4}
+Replace the parentheses with: ``(for the latter people sometimes use
+the single character \verb="=\,, but this is incorrect as it may
+produce a straight double quote, i.e., ")''
+
+\erroronpage{443}{para 3, l.4}{CKr}{2005/01/21}{4}
+ Correct order: ``Instead, these commands have been implemented in
+ \u{such a} way that \ldots''
+
+\erroronpage{444}{para 2, l.4}{DAl}{2005/08/01}{4}
+ Missing word: ``\ldots associates the number 224 \u{with} the
+command |\alpha|.''
+
+\erroronpage{445}{para 4, ll.3--5}{HjG}{2004/07/12}{2}
+ Move closing parenthesis:\\
+ ``\ldots, which normally denote certain accents (i.e.,
+ are encoding-specific commands, but \ldots\ environment\u).''
+ \\ \> \\
+ ``\ldots, which normally denote certain accents (i.e.,
+ are encoding-specific commands\u), but \ldots\ environment.''
+
+\erroronpage{446}{footnote, l.1}{CKr}{2005/01/21}{4}
+ Correct order: \ldots ``\textthreesuperior'' \u{was a}
+ math glyph---comprehensible?
+
+\erroronpage{447}{Heading}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8
+
+\erroronpage{451}{para 4, l.2}{HjG}{2004/07/12}{2}
+ Wrong number:
+ ``\texttt{\u{'240}} octal'' \> ``\texttt{\u{'344}} octal''
+
+\erroronpage{453}{para 2, l.2}{DAl}{2005/08/01}{4}
+ Missing word : ``\ldots an \emph{LICR-object} that is \u{to} be
+used whenever\ldots''
+
+\erroronpage{455}{para 3, l.-1}{JCh}{2004/07/17}{2}
+ Typo (characters need to be swapped):
+ ``L\u{CI}R'' \> ``L\u{IC}R''
+
+\erroronpage{457}{tab. 7.33}{HjG}{2004/07/12}{2}
+ Wrong sort order (table rows need to be swapped):\\
+ |\OE| $\leftrightarrow$ |\O| -- cf.\ |\o| and |\oe| on p.459
+
+\erroronpage{457}{tab. 7.33}{HjG}{2004/07/12}{2}
+ Entry |\`i|: ``(\u{avail})'' \> ``(\u{alias})''
+
+\erroronpage{458}{\texttt{\string\copyright}}{FMi/usw}{2005/01/11}{4}
+ Natively available in LY1 encoding
+
+\seriouserroronpage{458}{l. 27--30}{JLV}{2005/05/31}{4}
+ Unfortunately |\guillemotleft|, |\guillemotright|, |\guilsinglleft|, and
+ |\guilsinglright| have no ``default'' and only function in |OT1| if
+ \textsf{babel} is loaded
+
+
+\erroronpage{458}{\texttt{\string\k} entries}{usw}{2005/01/11}{4}
+ All |\k| entries should be |<constr.>| in LY1 encoding
+
+\erroronpage{459}{\texttt{\string\r A}}{FMi}{2005/04/09}{4}
+ |\r A| is |<constr.>| in OT1 encoding
+
+\erroronpage{459}{\texttt{\string\r} entries}{usw}{2005/01/11}{4}
+ All |\r| entries should be |<constr.>| in LY1 encoding
+
+\erroronpage{459}{\texttt{\string\textcelsius}}{usw}{2005/01/11}{4}
+ Default from |constr./TS1|.
+
+\erroronpage{460}{\texttt{\string\textcopyright}}{usw}{2005/01/11}{4}
+ Natively available in LY1 encoding
+
+\erroronpage{460}{\texttt{\string\textdiv}}{usw}{2005/01/11}{4}
+ Natively available in LY1 encoding
+
+\erroronpage{460}{\texttt{\string\texteuro}}{usw}{2005/01/11}{4}
+ Defined in the newer versions of the encoding (but not available in
+ all fonts!)
+
+\erroronpage{460}{tab. 7.33}{HjG}{2004/07/12}{2}
+ Wrong sort order (table rows need to be swapped):\\
+ |\textdblhyphenchar| $\leftrightarrow$ |\textdblhyphen|
+
+\erroronpage{461}{\texttt{\string\textlnot}}{usw}{2005/01/11}{4}
+ Natively available in LY1 encoding
+
+\erroronpage{461}{\texttt{\string\textpertenthousand}}{DAl}{2005/08/01}{4}
+ Constructed in T1 encoding
+
+\erroronpage{461}{\texttt{\string\textperthousand}}{DAl}{2005/08/01}{4}
+ Constructed in T1 encoding
+
+\erroronpage{461}{\texttt{\string\textpm}}{usw}{2005/01/11}{4}
+ Natively available in LY1 encoding
+
+\erroronpage{461}{table, l. -12}{usw}{2004/05/24}{2}
+ ``\verb=\textquotedblleft=" is indented by accident.
+
+\erroronpage{462}{\texttt{\string\texttimes}}{usw}{2005/01/11}{4}
+ Natively available in LY1 encoding
+
+\erroronpage{462}{tab. 7.33}{HjG}{2004/07/12}{2}
+ Wrong sort order (table rows need to be swapped):\\
+ |\textthreequartersemdash| $\leftrightarrow$ |\textthreequarters|
+
+\erroronpage{463}{para 1, ll.1/2}{HjG}{2004/06/28}{2}
+ Add: ``prior \u{to} 1990''
+
+\erroronpage{463}{para 1, l.2}{HjG}{2004/06/28}{2}
+ Change:
+ ``\ldots integrated in \u{1993})'' \>
+ ``\ldots integrated in \u{1994})''
+
+
+\CHAPTER{Chapter 8}
+
+\erroronpage{465}{para 4, ll.2+4}{HjG}{2004/06/20}{2}
+ Add page entry for ``Swanson, Ellen'' to ``People'' index
+ (p.1082). \\
+ Add page entry for ``Knuth, Donald'' to ``People'' index
+ (p.1081).
+
+ Editorial comment: no need for reprinting this page.
+
+
+\erroronpage{466}{para 2, ll.3+6}{HjG}{2004/06/20}{2}
+ Add page entry for ``Spivak, Michael'' to ``People'' index
+ (p.1082).\\
+ Add page entry for ``Jones, David'' to ``People'' index
+ (p.1081).
+
+\erroronpage{466}{para 3 l.1}{UFi}{2004/06/04}{2}
+ Remove comma: ``Michael\u, would have been\ldots''
+
+\seriouserroronpage{468}{para 3, ll.10+11}{JTa}{2004/08/31}4{}
+ Extra closing brace after the second argument of
+ \texttt{\textbackslash newenvironment} on both lines.
+
+\erroronpage{471}{para 2, l.4}{VPe}{2004/06/02}{2}
+ Extra word: ``\ldots this change \u{can} are discussed\ldots''
+
+\erroronpage{478}{exa 8-2-19}{CBe}{2004/07/27}{2}
+Poor Maxwell's equations! No doubt there are mathematical
+ physicists or physical mathematicians that write Maxwell's equations that way.
+ This is a good example for showing some capabilities of the
+ \textsf{amsmath} package and its possible extensions by means of the
+ \comando{\newenvironment} command, but it is an example where all possible ISO
+ rules are violated! Physical equations deal with quantities, not with
+ mathematical variables; and quantities have dimensions; as such they have to
+ comply with the rules established by the Sisth\`{e}me International (SI) and the
+ various obsolete ``cgm'' systems are officially deprecated; the partial
+ derivative sign $\partial$ has exactly that meaning and it cannot substitute
+ the ``nabla'' $\nabla$ sign; finally the $j$ symbol probably indicates the
+ current density, but in an equation that does not comply with the ISO rules it
+ might indicate the imaginary unit (which, on the opposite, is prescribed to be
+ typeset in roman or upright shape as well as $\pi$); treating with vectorial
+ quantities these should be well marked either with a vector math accent or
+ must be set in bold italic; with variables depending from four quantities the
+ apex for indicating the derivative is not univocal for specifying the quantity
+ with respect to which the derivative is taken. I repeat: the example is good
+ for describing the math extension capabilities but it could induce the casual
+ reader to believe that this is the correct form for writing down the Maxwell's
+ equations; unfortunately it is not.
+
+\erroronpage{480}{para -2, ll.8/9}{HjG}{2004/06/20}{2}
+ ``(there must be no space before the \texttt[)'' --- why?\\
+ (Would be ignored by \TeX{} as the end of the cs-name!)
+
+ Deleted this text.
+
+\erroronpage{484}{para 3, ll.1/2}{HjG}{2004/06/20}{2}
+ Add word: ``\ldots\ the \texttt{equation} \u{environment} is
+\ldots''
+
+\erroronpage{488}{para 1, l.2}{HjG}{2004/06/20}{2}
+ Add word: ``\ldots\ as a subscript \u{or} superscript.''
+
+\erroronpage{488}{para 1, l.1}{FMi}{2005/04/23}{4}
+ Replace word: ``Note that both \u{environments} \ldots''
+ \> ``Note that both \u{structures} \ldots'' (as one is a command)
+
+\erroronpage{489}{para -2, l.3}{HjG}{2004/06/20}{2}
+ Missing closing parenthesis: ``(see Section 8.5.3\u)''
+
+\erroronpage{489}{exa. 8-3-9.1}{DAl}{2005/08/21}{4}
+ The third array actually only needs \texttt{c} as preamble even
+ though \texttt{cc} is not wrong. as empty columns on the right are ignored
+
+\erroronpage{491}{para -2, l.3}{BMo}{2004/05/21}{2}
+ Replace: ``aside'' \> ``at the side''
+
+\erroronpage{493--95}{ll.-1/-2}{HjG}{2004/06/21}{2}
+ Perhaps a note regarding the defaults should be added:\\
+ ``The first two parameters, \emph{ldelim} and \emph{rdelim}, are
+ the left and right delimiters, respectively.
+ \u{They must be either both empty or both non-empty;}
+ \u{to place a single delimiter, use a period ``\texttt.'' on the
+ ``empty'' side.}''
+
+ Editorial comment: affects pagebreaks for 494/95 as well
+
+\iffalse % more blue align stuff
+\erroronpage{498}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+\erroronpage{499}{\S 8.6.2}{HjG}{2004/06/21}{2}
+ Change section heading: ``Operator \u{and function} names''
+
+\iffalse % more blue align stuff
+\erroronpage{500}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+\erroronpage{501}{exa 8-6-4}{HjG}{2004/06/21}{2}
+ Surplus word (in source comment):\\
+ ``\texttt{\% the old \u{the} definition of \textbackslash csc}''
+
+\erroronpage{507}{footnote}{CKr}{2005/02/16}{4}
+ Good try but wrong word: ``Technically this is due to the denominator being
+ wider than the \u{numerator} in this case\ldots''
+
+\seriouserroronpage{508}{table 8.6, col.5}{FMi}{2004/04/23}{2}
+ The bad alignment (in some books) of the blue color probably makes
+ the illustrations in this column useless.
+
+\iffalse % more blue align stuff
+\erroronpage{510}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+\erroronpage{511}{marginal note}{MHe}{2004/05/22}{2}
+ Swap words: ``\ldots change \u{the existing} math font
+ set-up''
+
+\erroronpage{512}{para 3, l.6}{HjG}{2004/06/22}{2}
+ Surplus closing brace:
+ ``|\bm{\alpha}|\texttt{\u\textbraceright}''
+
+\seriouserroronpage{513}{Figure 8.1}{LSchu}{2004/05/22}{2}
+ Text font is Times, but should be Computer Modern (rather
+ embarrassing that).
+
+\erroronpage{513}{para 3, l.1}{HjG}{2004/06/22}{2}
+ Change: ``In this section show a sample text'' \>\\
+ ``In this section \u{we} show a sample text''
+
+\iffalse % more blue align stuff
+\erroronpage{513}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+\erroronpage{515}{para 1, l.3}{HjG}{2004/06/22}{2}
+ Wrong reference: ``Figure~8.3'' \> ``Figure~8.2''
+
+\erroronpage{515}{para -1, l.1}{BMo/CAR}{2004/05/21}{2}
+ Replace: ``The Metafont versions of Concrete Roman and Math\ldots''
+ \> ``The Metafont versions of Concrete, both Roman and Math,\ldots''
+
+\seriouserroronpage{516}{fig.~8.6}{CKr/FMi}{2005/02/18}{4}
+ The txfonts have the symbols |\succapprox| and |\precapprox| in the
+ wrong position in the fonts.
+ Until the fonts are corrected one can manually fix the problem by
+ redeclaring them after loading the \texttt{txfonts} package, i.e.,
+\begin{verbatim}
+\usepackage{txfonts}
+\DeclareMathSymbol{\succapprox}{\mathrel}{AMSb}{119}
+\DeclareMathSymbol{\precapprox}{\mathrel}{AMSb}{118}
+\end{verbatim}
+
+\erroronpage{517}{footnote}{FMi}{2005/06/03}{4}
+ Y\&Y has unfortunately folded and their domain was taking over by a
+ seller for ``latex'' clothing (interesting isnt it?).
+ Some information about Y\&Y can be found at
+ \texttt{https://www.tug.org/yandy}.
+
+\seriouserroronpage{518}{fig.~8.9}{CKr/FMi}{2005/02/18}{4}
+ The pxfonts have the symbols |\succapprox| and |\precapprox| in the
+ wrong position in the fonts.
+ Until the fonts are corrected one can manually fix the problem by
+ redeclaring them after loading the \texttt{pxfonts} package, i.e.,
+\begin{verbatim}
+\usepackage{pxfonts}
+\DeclareMathSymbol{\succapprox}{\mathrel}{AMSb}{119}
+\DeclareMathSymbol{\precapprox}{\mathrel}{AMSb}{118}
+\end{verbatim}
+
+\erroronpage{521}{para 2, l.3}{HjG}{2004/06/26}{2}
+ Missing interword space: ``Section\u~7.6.1''
+
+\erroronpage{521}{footnote}{FMi}{2005/06/03}{4}
+ Y\&Y has unfortunately folded and their domain was taking over by a
+ seller for ``latex'' clothing (interesting isnt it?).
+ Some information about Y\&Y can be found at
+ \texttt{https://www.tug.org/yandy}.
+
+\seriouserroronpage{523}{figure 8.16}{MHe}{2004/05/22}{2}
+ The symbols to the left and right of ``Q(t)'' in the middle of
+ the figure are wrong (this is
+ actually a bug in the informal math set-up which has now been
+ corrected).
+
+\erroronpage{523}{figure 8.16, caption}{BMo}{2004/05/21}{2}
+ Replace: ``Info Math fonts'' with ``Informal Math fonts''.
+
+\erroronpage{523}{para 3, l.2}{HjG}{2004/06/26}{2}
+ Change:\\
+ ``The HV math fonts \u{are} designed at MicroPress'' \>\\
+ ``The HV math fonts \u{have been} designed at MicroPress''
+
+\erroronpage{524}{para 1, ll.4--6}{HjG}{2004/06/27}{2}
+ Change:\\
+ ``This \u{package} extends the \ldots\ font collections\u{ and}
+ should normally be loaded \ldots'' \>\\
+ ``This \u{font} extends the \ldots\ font collections\u{; the
+ corresponding \textsf{stmaryrd} package} should normally be loaded
+ \ldots''
+
+\erroronpage{524}{para 2, l.7}{HjG}{2004/06/27}{2}
+ The text states: ``\u{\raisebox{1ex}{\scriptsize(\emph{kernel})}}
+ identifies symbols \ldots''. However, later on only
+ ``\u{\raisebox{1ex}{\scriptsize(\emph{ker})}}'' is used.
+ [E.g., Table~8.10 on page~527 (|\hbar|)
+ and Table~8.11 on page~528 (|\angle|).]
+
+\erroronpage{524}{para 2, l.-3}{HjG}{2004/06/27}{2}
+ The text speaks of ``Alphabetic symbols'' -- but the referenced
+ Table~7.30 on page~435 calls it ``Alphabet character''~!?
+
+\erroronpage{524}{exa 8-9-1}{HjG}{2004/06/27}{2}
+ The |fleqn| option is used, but in the output, the two equations
+ seem to be right aligned rather than left aligned!\\
+ Indeed true: this is because in \textsf{amsmath} the |\mathindent|
+ added on the left is
+ actually a rubber length (see page 471) that is automatically
+ shortend if there is not enough space.
+
+\iffalse % more blue align stuff
+\erroronpage{524}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+
+\erroronpage{525}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+
+\erroronpage{526}{para -1, l.1}{CKr/FMi}{2005/02/20}{4}
+Change: ``The unaccented ASCII Latin letters and Arabic
+ numeral digits (see Table~8.8) \u{all} referred to\ldots''
+ \> ``\ldots \u{are} referred to\ldots''
+
+\erroronpage{527}{para 2, l.1}{HjG}{2005/05/21}{4}
+ Replace:\\
+ ``in the first \u{columns} of Table~8.9'' \>
+ ``in the first \u{rows} of Table~8.9''
+
+\erroronpage{527}{para 2, l.5}{HjG}{2004/06/27}{2}
+ Change:
+ ``Similarly, the list of lowercase Greek letters \u{there is}
+ no omicron'' \>\\
+ ``Similarly, the list of lowercase Greek letters \u{contains}
+ no omicron''
+
+\iffalse % more blue align stuff
+\erroronpage{528}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+ \erroronpage{527}{table 8.10}{BMo/CAR}{2004/05/21}{2}
+ This table would be
+ better if reordered, in particular so that the first row
+ contains: \verb=\aleph \beth \gimmel \daleth=. This would
+ make the this text correct: ``The first four [entries in
+ table 8.10] are Hebrew letters.''
+
+
+\erroronpage{527,528}{table 8-10/11}{FMi}{2006/08/09}{s}
+ Added the missing symbol from amssymb: |\circledR|, |\yen|,
+ |\checkmark|, and |\maltese|.
+
+ The general distribution of symbols between the two tables is a bit
+ questionable, but this will stay as it is.
+
+\erroronpage{528}{table 8-11}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\erroronpage{528}{table 8.11}{LHe}{2008/02/08}{}
+ |\dag| and |\ddag| are |\mathord|s not |\mathbin| as claimed in table
+ 8.13.
+
+
+\seriouserroronpage{529}{table 8.12, l.3}{JGr}{2004/06/10}{2}
+ \verb=\mathring{x}= is missing its accent.
+
+\erroronpage{529}{para 1, l.2}{CKr}{2005/04/24}{4}
+ Replace: ``looked up |\neq|'' \> ``looked up |\ne|\u{\texttt{g}}''
+
+\erroronpage{530}{table 8-13}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\erroronpage{530}{table 8.13}{LHe}{2008/02/08}{}
+ |\dag| and |\ddag| are not |\mathbin|s, hence don't belong in this table
+ and they
+ aren't (as claimed in legend) synonyms of |\dagger|
+ and |\ddagger| respectively.
+
+\erroronpage{531}{table 8.15}{BMo/FMi}{2004/05/21}{2}
+ The commands starting with |\var...| are only partially in blue to
+ indicate their relationship with those commands missing the ``var'' in their
+ names. But this is more confusing than helpful, so they are now made
+ fully blue.
+
+\seriouserroronpage{531}{table 8.15}{CAR/FMi}{2004/06/05}{2}
+ |\obar| is listed twice while |\obslash| (also from stmaryrd) is missing
+
+\erroronpage{531}{table 8-15}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\seriouserroronpage{532}{tables 8-16, 8-17}{HjG}{2004/07/13}{2}
+ Since |\precsim| is not a negated symbol, it should be moved from
+ Table~8-17 to Table~8-16, where its sibling |\succsim| already
+ lives.
+
+\erroronpage{532}{tables 8-16/17}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\erroronpage{532}{table 8.17}{CKr}{2005/02/22}{4}
+ Add: ``\ldots or, \u{if} flagged\ldots''
+
+\iffalse % more blue align stuff
+\erroronpage{533}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned.
+\fi
+
+\erroronpage{533}{tables 8-18/19}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\iffalse % more blue align stuff
+\erroronpage{534}{page}{FMi}{2004/04/23}{}
+ Printing problem: blue color not properly aligned (horizontally).
+\fi
+
+\erroronpage{534}{table 8-20}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\erroronpage{534}{tab. 8.20}{HjG}{2004/06/28}{2}
+ 1. |\hookleftarrow| is listed twice.\\
+ 2. Some ``compound'' symbols have different line widths in their
+ ``head'' and ``tail'' parts:
+ |\Longleftarrow|, |\Longmapsfrom|, |\Longmapsto|, |\Longrightarrow|.
+
+
+\erroronpage{534}{table 8-21}{MBr}{2004/08/02}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\erroronpage{535}{table 8-22/23}{HjG}{2004/07/13}{2}
+ Various deviations from alphabetical sort order of the table
+ entries.
+
+\erroronpage{537}{table 8-27}{DIs/FMi}{2006/08/09}{s}
+ Added the four missing delimiters from amssymb: |\llcorner|, |\lrcorner|,
+ |\ulcorner|, and |\urcorner|. Updated the table note and galley text accordingly.
+
+
+\CHAPTER{Chapter 9}
+
+\erroronpage{540}{para -2, l.6}{MKu/FMi}{2004/06/24}{2}
+ Replace: ISO-8859-x \> ISO 8859-x
+
+\erroronpage{540}{para -1, l.4}{FMi}{2004/07/20}{2}
+Plural: ``Clearly, 8 bits \u{are} not sufficient\ldots''
+
+\erroronpage{541}{para 1, l.-2}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8
+
+\seriouserroronpage{543}{table 9.1}{MHe/JBr}{2004/06/10}{}
+ The Babel implementation on the CD is missing the australian and
+ newzealand
+ options. If you need them, download a new version of Babel.
+
+\erroronpage{543}{table 9.1}{JBr/WaS}{2004/07/31}{2}
+ Replace: ``\texttt{english}, \texttt{USenglish}
+ (\texttt{\itshape american}, \texttt{\itshape canadian}), \texttt{UKenglish}
+ (\texttt{\itshape british}), \texttt{australian} (\texttt{\itshape
+ newzealand})''
+
+ Add footnote: ``\textit{The option \texttt{\upshape english}
+ combines American hyphenation patterns
+ with a British date format.}''
+
+
+\erroronpage{545}{exa 9-2-1}{JAn}{2005/09/09}{4}
+ The quotes surrounding R\'ef\'erences and Chapitre
+ should be the french ones: use |\og| and |\fg{}|. And similar those
+ around German words should use |"`| and |"'|.
+
+
+\erroronpage{546}{para 3, l.4}{HjG}{2004/06/17}{2}
+ Typo: ``pattern\u{s}''
+
+\seriouserroronpage{548}{para 2, l.4}{UFi}{2004/06/03}{2}
+ Replace: |\aliasshorthand{"}{/}| should be \verb=\aliasshorthand{"}{|}=
+
+\erroronpage{549}{para 1, l.5}{HjG}{2004/06/17}{2}
+ Characters should be in `typewriter font' (as in l.2):\\
+ ``\,``;'' and ``?''\,'' \> ``\,``|;|'' and ``|?|''\,''
+
+\erroronpage{550}{para -2, l.1--2}{CKr}{2005/02/28}{4}
+ Correct: ``Some are
+ meant to ease typing, wher\u{e}as others\ldots''
+
+
+\erroronpage{551}{tab 9.3}{CBe}{2004/07/27}{}
+ I am surprised that in Russian there is no word for ``Glossary''.
+
+ Frank: It most certainly exits :-), but right now Babel doesn't
+ know about it---so there is nothing we can do about it at the
+ moment. Actually the same problem exists with Polish, although here
+ I got a translation ``s\l{}ownik termin\'ow'' which will eventually
+ find its way into Babel.
+
+\erroronpage{552}{exa 9-3-4}{CBe}{2004/07/27}{2}
+ The words \texttt{i"lusio} and il$\cdot$lusio in the example are
+ incorrect. They should be \texttt{i"lusi\string\'o} and il$\cdot$lusi\'{o}
+ respectively %(ref: TB 14-3-252-259)
+
+
+\seriouserroronpage{553}{para 4}{UFi}{2004/06/03}{2}
+
+ Replace with: ``Another popular shorthand is |"-|, which indicates a
+ hyphenation point (like |\-|), but without supressing
+ hyphenation in the remainder of the word:''
+
+\erroronpage{553}{exa 9-3-8}{FMi}{2004/06/03}{2}
+ Replace the example body with:
+\begin{verbatim}
+\fbox{\parbox[t]{1cm}{minister"-president}} \quad
+\fbox{\parbox[t]{1cm}{minister\-president}} \quad
+\fbox{\parbox[t]{1cm}{ministerpresident}}
+\end{verbatim}
+to show the differences between |"-|, |\-|, and no hyphen.
+
+\erroronpage{553}{exa 9-3-9}{FMi}{2004/06/03}{2}
+ Replace the example body with:
+\begin{verbatim}
+1. \present{Gutenberg-Universit"at}
+2. \present{Gutenberg"-Universit"at}
+3. \present{Gutenberg""Universit"at}
+4. \present{Gutenberg"=Universit"at}
+5. \present{Gutenberg"~Universit"at}
+\end{verbatim}
+
+\erroronpage{554}{para 4, l.2}{HjG}{2004/06/17}{2}
+ Replace: ``|~n~|\meta{letter}'' \> ``|~n|''
+ and ``|~N~|\meta{letter}'' \> ``|~N|''
+
+\erroronpage{554}{exa 9-3-11}{UFi/MGo}{2004/06/03}{2}
+ Replace body with:
+ ``|En fran\c{c}ais on doit mettre un \fg petit espace\fg\|
+ |devant la ponctuation double: comme cela!|
+ \ldots''
+
+\erroronpage{556}{item 2, l.3}{HjG}{2004/06/17}{2}
+ Remove:
+ ``\ldots\u{, with the addition that also \texttt{'u} and
+ \texttt{'U} are made available}.''
+\iffalse
+auf s.556 unten (1. item) steht, dass der ' fuer Catalan mit allen
+vokalen verwendet werden kann; das gilt auch fuer Galician (2. item);
+deswegen macht der u.g. nebensatz wenig sinn, denn U gehoert ja zu den
+vokalen! -- war vielleicht 'N gemeint? (aber auch das wird bei
+Galician schon erwaehnt!)
+\fi
+
+\erroronpage{556}{para 4, l.2}{UFi}{2004/06/03}{2}
+ Correct spelling: ``\ldots optional \u{because} the acute accent has\ldots''
+
+\erroronpage{557}{exa 9-3-19}{FMi/JBe}{2005/03/20}{4}
+ Replaced the example text with a spanish example showing 3 levels of
+ quotations.
+
+\erroronpage{558}{para -1, l.2}{UFi}{2004/06/03}{2}
+ Add comma: ``day, month\u, year''
+
+\iffalse % alternative (but needs to change two pages)
+ Replace:
+ ``\ldots |\hebdate| to translate any Gregorian date, given \u{the three
+ arguments \emph{day}, \emph{month},
+ and \emph{year},}
+ into a Gregorian date in Hebrew.''
+\fi
+
+\erroronpage{561--562}{para 2, l.-1; para 2, l.1}{BMo}{2004/05/16}{2}
+ The number 999999 (and 1000, in the second instance) should not
+ be written with a period as thousands-separator as this is
+ confusing for readers used to a different convention.
+
+\erroronpage{562}{para 2, l.1+2}{FMi/DPa}{2004/07/24}{2}
+ Change: ``digits \u{before the decimal point} are expressed'' \>
+ ``digits \u{denoting multiples of a thousand} are expressed''
+
+\erroronpage{563}{l -18/-17}{CBe}{2004/07/27}{4}
+The non zero \texttt{lccode} for the apostrophe is not
+ a speciality of the Italian language; this non null assignment is made at least
+ also for Catalan and for French; it should be done for all languages that use
+ the apostrophe for replacing an elided vowel.
+
+\seriouserroronpage{564}{table 9.5}{FMi}{2004/04/23}{2}
+ Add a note that the definition of \verb=\th= conflicts with its standard
+ definition as the LICR object ``\th{}'' (thorn).
+
+\erroronpage{564}{tab. 9.5}{HjG/FMi}{2004/06/18}{2}
+ In the `Serbian' column, ``|\sh| sh'' is listed twice;
+ replace the second instance with ``|\arsh| arsh''.
+
+\erroronpage{564}{para -1, l.5}{ERy}{2004/08/06}{2}
+ Change: ``helpfull'' \> ``helpful''
+
+\erroronpage{565}{line 1}{JGr}{2004/06/16}{2}
+ Missing space in: Anotherlayout
+
+\erroronpage{569}{l.-2}{HjG}{2004/06/18}{2}
+ Misspelled name:
+ ``Andrew Janishe\u{w}sky'' \> ``Andrew Janishe\u{v}sky''
+ (This affects p.1081, too!)
+
+\erroronpage{571}{l.1}{HjG}{2004/06/18}{2}
+ Replace: ``UNIX-like'' \> ``UN*X-like''
+ (to match spelling elsewhere in the book)
+
+\erroronpage{571}{ll.3+4}{MKu/FMi}{2004/08/03}{2}
+ Change: ``ISO-IR-111'' \> ``ISO-IR~111'' \\
+ and ``ISO-IR-144'' \> ``ISO-IR~144''
+
+\erroronpage{571}{para 4}{HjG}{2004/06/18}{2}
+ Code page ``|mnk|'' listed twice.
+
+%\erroronpage{572}{page}{FMi}{2004/04/23}{}
+% Printing problem: blue color not properly aligned.
+
+\erroronpage{573}{descr. env.}{HjG}{2004/06/18}{2}
+ Items \texttt{T2B:} and \texttt{T2C:} ``Crimean~Tatar'' \> ``Crimean-Tatar''
+
+\erroronpage{573}{para 3, l.4}{HjG}{2004/06/18}{2}
+ Typo: ``pac\u{ak}ge'' \> ``pac\u{ka}ge''
+
+\erroronpage{574}{para 6, l.1}{HjG}{2004/06/18}{2}
+ Replace: ``The |cb| font use\u{s} \ldots''
+ \> ``The |cb| font\u{s} use \ldots''
+
+\erroronpage{574}{para 7, l.2}{HjG}{2004/06/18}{2}
+ Replace: ``translation'' \> ``transliteration''
+
+\erroronpage{575}{tab 9.7}{CBe}{2004/07/27}{2}
+ I do not recognize my \texttt{grmn1000} font table; at least
+ it is incomplete compared with the one that has been uploaded on CTAN in 2002,
+ well ahead of the publication of this Second Edition.
+
+ (Unfortunately an older tfm file was used so that some glyphs do not
+ show up in the table)
+
+\erroronpage{576}{tab. 9.9}{HjG}{2004/06/18}{2}
+ Replace: ``Diaresis'' \> ``Dia\u{e}resis''
+
+\erroronpage{576}{tab 9.9}{CBe}{2004/07/27}{2}
+|<'otan| does not produce the Greek word on its right,
+ which was by mistake obtained with |<'o|\texttt{\'otan}
+
+\erroronpage{576}{tab 9.10}{CBe}{2004/07/27}{2}
+ In the first line all the examples with upper case letters
+ are wrong in the sence that these glyphs cannot appear in real text,
+ hence they are removed.
+ The last two lines are wrong with both lower and upper case
+ letters. The former error implies a hiatus between an initial capital letter
+ and a preceding vowel that by definition of ``initial'' is missing. The latter
+ error is related to the fact that spirit and accent are separated, the former
+ to the left of the vowel, the latter over the vowel.
+
+ Part of the problems are due to a missing |\languageattribute{greek}{polutoniko}|.
+
+\erroronpage{579}{table 9.12, l.7}{HjG}{2005/06/02}{4}
+ Remove extra right brace: ``|\fontfamily{fr}|\u{\texttt{\textbraceright}}''
+
+\seriouserroronpage{580}{example file \texttt{language.dat}}{WaS}{2004/06/14}{2}
+ \u{\texttt{us}}\texttt{english} \> \texttt{\u{US}english}\\
+ \u{\texttt{uk}}\texttt{english} \> \texttt{\u{UK}english}
+
+\seriouserroronpage{580}{\texttt{language.dat} on CD}{WaS}{2004/06/14}{}
+The language name problem, i.e.,
+
+ \u{\texttt{us}}\texttt{english} \> \texttt{\u{US}english}\\
+ \u{\texttt{uk}}\texttt{english} \> \texttt{\u{UK}english}
+
+is also present in the language.dat file on
+the book CD.
+
+\erroronpage{581}{para 2, l.2}{UFi}{2004/06/04}{2}
+ Six "languages" are loaded ...: seven?
+
+\erroronpage{581}{para 1, l.2}{WaS/FMi}{2004/06/14}{2}
+ Change: ``\ldots loaded first by INI\TeX{}; English in the example
+ above).''
+ \> ``\ldots loaded first by INI\TeX{}); for compatibility reasons this language
+ should contain US-English hyphenation patterns.''
+
+\erroronpage{581}{para 2, l.2}{WaS}{2004/06/14}{2}
+ Language names are to be corrected according to p.580.
+
+\iffalse
+% no space. do what? probably nothing right now
+\erroronpage{581}{para 2, l.3}{HjG}{2004/06/18}{}
+ Add a footnote to explain the meaning of the term
+ ``hyphenation trie''?
+\fi
+
+\erroronpage{583}{para 1, l.1}{HjG}{2004/06/18}{2}
+ Wrong number: ``(line 32)'' \> ``(line 34)''
+
+\erroronpage{583}{para 1, l.3}{HjG}{2004/06/18}{2}
+ Replace: ``\texttt{welsh.\u{sty}}'' \> ``\texttt{welsh.\u{ldf}}''
+
+\seriouserroronpage{585}{}{CBe}{2004/07/27}{2}
+The line:\\
+ \comando{\adddialect\{austrian\}\{german\}}\\
+ and the following one correspond neither to lines 102\textendash 103 of the language
+ skeleton, nor to the grammar of the \comando{\adddialect} on page 584; this
+ description as well as the skeleton file apparently require that the language
+ name be preceded by \comando{\l@}; in facts, for example,
+ the \texttt{germanb.ldf} contains the line:\\
+ \comando{\adddialect}\comando{\l@austrian}\comando{\l@german}
+
+\seriouserroronpage{586}{code line 2}{TSS}{2004/05/26}{2}
+ Extra closing brace after \verb|\def\germanhyphenmins|.
+
+\seriouserroronpage{589}{syntax box}{UFi}{2004/06/04}{2}
+ Change: |\addto\csname[code]| \> |\addto\csname{code}| (wrong braces)
+
+\erroronpage{591}{para 1, l.5}{UFi}{2004/06/04}{2}
+ Extra character: ``The third argument, \emph{ex\u{c}ec}, contains\ldots''
+
+\erroronpage{592}{para 3, l.2+4}{PPN}{2004/05/25}{2}
+ Replace: ``Panday'' \> ``Pand\u{e}y'' (sorry)
+
+\seriouserroronpage{592}{para 3, l.3}{PPN}{2004/05/25}{2}
+ Replace ``\textsf{bang}'' with ``\textsf{bengali}''. This
+ package is available on CTAN in the \textsf{languages/bengali/pandey}.
+
+\seriouserroronpage{592}{para 3, l.4 }{PPN}{2004/05/25}{2}
+ Replace ``\textsf{denag}'' with ``\textsf{devnag}''.
+ This package is on CTAN \texttt{languages/devanagari/velthuis}.
+
+\erroronpage{592}{para 5, l.1}{CKr}{2004/10/15}{4}
+ Replace: ``E\u{hit}opian'' \> ``E\u{thi}opian''
+
+\erroronpage{592}{general remarks}{PPn}{2004/05/25}{}
+Additional remarks not for inclusion in the book: For \TeX{}, \LaTeX{}
+in languages of India,
+there are several nice packages. An overview can be found in the
+following {\sc TUGboat} Articles;
+
+\begin{enumerate}
+\item Anshuman Pandey, \textsl{An overview of Indic Fonts for \TeX{}},
+{\sc TUGboat} Volume 19, Number 2 / June 1998 115---119
+\item Anshuman Pandey, \textsl {Typesetting Bengali in \TeX{}}, {\sc
+TUGboat} Volume 20, Number 2, June 1999 119---126
+\item C. V. Radhakrishnan, \textsl{A case for \TeX{} in India}, {\sc
+TUGboat} Volume 19, Number 1, March 1998, 6---9.
+\item Karel P\'{\i}\v{s}ka, \textsl{A conversion of public Indic fonts
+from METAFONT into Type I format with} {\sc TeX{}TRACE}, Volume
+23, Number 1, 2002, 70---73
+\item
+Yannis Haralambous and John Plaice, \textsl{Low-level Devan\=agari
+support for Omega-- Adapting {\sf devnag}}, i
+Volume 23, Number 1, 2002, 50---56
+\end{enumerate}
+
+In addition to these articles, TUGIndia has uploaded two
+\LaTeXe{} packages (i) Malayalam for \LaTeXe{}, and (ii) Kannada
+\LaTeX{}, both available from www.sarovar.org.
+
+A remark on {\sf devnag} package:-- Originally developed by Frans
+Velthuis in 1991, it was upgraded for use with \LaTeXe{} (made
+NFSS-complaint), and maintained by a team consisting of Dominik
+Wujastyk, John Smith, Anshuman Pandey, Fran\c{c}ois Patte, and
+Zden\v{e}k Wagner. Very recently, the project has
+been handed over to TUGIndia, for further development,
+and as of May 2004, it has moved from sourceforge.net to
+sarovar.org.
+
+
+
+\CHAPTER{Chapter 10}
+
+\erroronpage{chap.10}{boxed texts}{HjG}{2004/06/08}{2}
+ In addition to what has been reported elsewhere, here's an overview
+ of some more inconsistencies in (some of) the ``syntax boxes'' of
+ this chapter. \\
+ With parenthesized arguments, commas are part of the syntax;
+ hence they should be set in `typewriter font' (???). \\
+ The space after these commas should also be uniform.
+ \\ \vspace{.5\baselineskip}
+ %
+ \begin{tabular}{@{}rrllp{44mm}@{}} \hline
+ page(s) & box(es) & comma & space & remark \\ \hline
+ 599 & & |\rm| & no & asterisk should be in |\tt| \\
+ 602/3 & all & |\rm| & yes & ``...'' vs.\ ``\ldots'' \\
+ 606 & 1 & |\rm| & no & ``...'' vs.\ ``\ldots'' \\
+ 606 & 2 & |\it| & no & \\
+ 607 & & |\rm| & yes & \\
+ 608 & all & |\it| & no & \\
+ 610 & 1--2 & |\rm| & yes & ``...'' vs.\ ``\ldots'' \\
+ 616 & & |\it| & no & \raggedright
+ also in text after box! \\
+ (ll.1+5 in first para)
+ \tabularnewline
+ 639 & & |\it| & no & \\
+ 641 & 1--2 & $^*$ & no & \raggedright
+ $^*$various flaws; \\
+ see separate error entry.
+ \tabularnewline \hline
+ \end{tabular}
+
+
+\erroronpage{596}{para 4, l.2}{HjG}{2004/06/07}{2}
+ Replace: ``is the same as \u{those} produced''
+ \> ``\ldots \u{that} \ldots''
+
+\erroronpage{597}{para -1, l.-4/-3}{HjG}{2004/06/07}{2}
+ Replace: ``\ldots, in case \u{they are} changed''
+ \> ``\ldots, in case \u{it is} changed''
+
+\erroronpage{597/598}{para -1, l.-2}{HjG}{2004/06/07}{2}
+ Delete word: ``which again \u{that} expects one argument.''
+
+\erroronpage{599}{boxed text}{CAR}{2004/05/26}{2}
+ The asterisk after |\fancyput| should be centred and the `(' and `)'
+ should be in typewriter.
+
+\seriouserroronpage{599}{boxed text}{HjG}{2004/06/08}{2}
+ Replace brackets by braces. (The \emph{horizontal-material}
+ argument is not an optional, but a mandatory one.)
+
+\erroronpage{600}{para 2, l.4}{HjG}{2004/06/07}{2}
+ Replace: ``\u{don't} work'' \> ``\u{does not} work''
+
+\erroronpage{600}{exa 10-1-12}{GBa}{2004/07/28}{2}
+ The optional parameter ``[t]'' in the second example is printed as text
+in line (1).
+
+ Remove in code: ``\texttt{[t]}''
+
+ Append to previous paragraph: ``An optional position argument is not supported.''
+
+\erroronpage{601}{l.-17}{CBe}{2004/07/27}{2}
+Add word: Calculating the horizontal and vertical \u{distance}
+
+\erroronpage{602--603}{all boxed texts}{CAR}{2004/05/26}{2}
+ All the parentheses `(' and `)' (9 pairs in total)
+ should be in `typewriter font'.
+
+\erroronpage{604,605,609}{}{HjG}{2004/06/07}{2}
+ On p.604 (l. -2) and p.605 (ll. 1, 2) we have ``|join|
+ environment(s)''.\\
+ On p.605 (ll. -6, -1) these are called ``|..join| environments''.\\
+ On p.609 (para 3, l.5) it's ``|join| environments'' again.
+
+\erroronpage{606}{para 2, l.1}{HjG}{2005/05/16}{4}
+ ``The \textsf{epic} \ldots'' \>
+ either: ``\textsf{epic} \ldots''
+ or: ``The \textsf{epic} package \ldots''
+
+\erroronpage{606}{para 3, l.1}{HjG}{2004/06/07}{2}
+ Delete comma and move word:\\
+ ``This command\u{, which} is a variant \ldots\ command, allows
+ \ldots'' \>\\
+ ``This command is a variant \ldots\ command, \u{which} allows
+ \ldots''
+
+\erroronpage{606}{second boxed text}{CAR}{2004/05/26}{2}
+ Brackets should also be in `typerwriter font'.
+
+\erroronpage{606}{para -1}{HjG/FMi}{2005/05/19}{4}
+ The arguments ``\textit{$\Delta$width}'' and
+ ``\textit{$\Delta$height}'' are mistakenly used in math mode. In
+ the book that means a different font and different kerning.
+
+\erroronpage{606--608}{all boxed texts}{CAR}{2004/05/26}{2}
+ All the parentheses `(' and `)' (9 pairs in total)
+ should be in `typewriter font'.
+
+\erroronpage{609}{}{FMi}{2004/06/07}{2}
+ Editorial comment: reprinted see earlier summary entries.
+
+\erroronpage{610}{first two boxed texts}{CAR}{2004/05/26}{2}
+ All the parentheses `(' and `)' (6 pairs in total)
+ should be in `typewriter font'.
+
+\erroronpage{612}{exa 10-1-25}{PYu/FMi}{2004/07/05}{2}
+ The |\protect| in front of |\footnotesize| (twice) is not necessary.
+
+\erroronpage{613}{para 1, ll.2/3}{HjG}{2004/06/21}{2}
+ Citations disrupt sentence!\\
+ ``\ldots\ bundle [48,49] or [57, Chapter~6] for \ldots'' \> \\
+ ``\ldots\ bundle \u{(see }[48,49] or [57, Chapter~6]\u)''\\
+ and move the parenthesised citations to the end of the sentence.
+
+\erroronpage{614}{para 1, l.4}{HjG}{2004/06/07}{2}
+ Missing closing quotes:
+ ``the ``extended\u{\strut''} or ``enhanced'' \ldots''
+
+\erroronpage{615}{Tab.\ 10.1}{FMi}{2006/10/21}{s}
+The important driver ``vtex'' is missing. On the other hand
+some of the listed drivers are only of historical interest.
+
+\erroronpage{616}{boxed texts}{FMi}{2004/05/26}{2}
+ Corrections as outlined in summary entry above.
+
+\erroronpage{618}{boxed text}{CAR}{2004/05/26}{2}
+ Replace: ``\textit{key val list}'' \> ``\textit{key/val-list}''
+ (also in following text).
+
+\erroronpage{619}{viewport}{BMo/FMi}{2007/10/20}{s}
+ Explanation of \texttt{viewport} key changed to better explain that it only
+ changes the space reserved but doesn't prevent printing the whole graphic
+ (unless \texttt{clip} is used additionally)
+
+\erroronpage{620}{editorial change}{FMi}{2007/10/20}{s}
+ Text changes on previous page results in different page break.
+
+\erroronpage{620}{para 1, l.1; para 2, l.1}{HjG}{2004/06/07}{2}
+ Replace:
+ ``the first \u{seven} keys'' \> ``the first \u{eight} keys''\\
+ ``The first \u{nine} keys'' \> ``The first \u{ten} keys''
+
+\erroronpage{620}{para 5, l.2}{FMi}{2005/04/27}{4}
+ Replace:
+ ``\ldots in the \u{optional arguments}.'' \>
+ ``\ldots in the \textit{key/val-list}.''
+
+%\erroronpage{621}{page}{FMi}{2004/04/23}{}
+% Printing problem: blue color not properly aligned.
+
+\erroronpage{623}{para 1, l.7}{HjG}{2004/06/07}{2}
+ Delete word: ``some \u{of} key combinations''
+
+\erroronpage{623}{boxed text}{CAR}{2004/05/26}{2}
+ Replace: ``\textit{key val list}'' \> ``\textit{key/val-list}''
+ (also in following text).
+
+\erroronpage{630}{para 3, l.3}{UFi}{2004/06/01}{2}
+ Replace: ``the next |\parbox| examples'' \> ``the next
+ \u{\texttt{tabular}} examples''
+
+\erroronpage{631}{para.2, l.6}{FMi/HjG}{2006/10/22}{s}
+ Ersetze: "`\u{This point} is shown \ldots"' \>
+ "`\u{This} is shown \ldots"'
+
+\erroronpage{631}{para -1, l.-1}{JBr}{2004/08/02}{2}
+ Replace: ``\textit{key val}'' \> ``\textit{key/val}''
+
+\erroronpage{632}{fig. 10.2}{HjG}{2004/06/07}{2}
+ The horizontal extent of the box is called ``|length|'' \>
+ probably better: ``|width|''.\\
+ Missing standalone horizontal specs:
+ ``|[l]|'' $\equiv$ ``|[lc]|'';
+ ``|[r]|'' $\equiv$ ``|[rc]|''.
+
+\erroronpage{632}{boxed text}{CAR}{2004/05/26}{2}
+ Replace: ``\textit{key val list}'' \> ``\textit{key/val-list}''
+
+\erroronpage{633}{para 1, ll.4/5}{HjG}{2005/05/16}{4}
+ Add character: ``A matrix \ldots\ appear\u{s} below.''
+
+\erroronpage{633}{l.-2}{HjG/DPa}{2004/06/07}{2}
+ Replace: ``The material in the section can be compared to
+ Sebastian\ldots'' \>
+ ``The material in this section is similar to that of Sebastian\ldots''
+
+\seriouserroronpage{633}{example}{HjG}{2006/10/21}{s}
+ The first column shows incorrect output: instead of x=0mm it uses some
+ internal default.
+
+\erroronpage{634}{editorial change}{FMi}{2006/10/21}{s}
+ Fix on previous page will change page break.
+
+
+\erroronpage{637}{footnote 2}{FMi}{2004/06/12}{2}
+ Bug in \texttt{url.sty} generated extra space.
+
+\erroronpage{639}{boxed text}{HjG}{2004/06/08}{2}
+ The parentheses `(' and `)' should be in `typewriter font'.
+
+\erroronpage{640}{para -1, l.-2}{HjG}{2004/06/07}{2}
+ ``the second |\vector| is truncated'' \>
+ ``the second |\vector| is not rendered correctly''
+
+\erroronpage{641}{first two boxed texts}{HjG}{2004/06/08}{2}
+ The parentheses `(' and `)' around ``x1,y1'' (3 pairs in total)
+ should be in `typewriter font'.\\
+ All coordinates should be in (math) italic with subscripts
+ (cf., e.g., pp.607/610): $x_1$, $y_1$, $x_2$, $y_2$.
+
+\seriouserroronpage{641}{para 2 l.1}{UFi}{2004/06/01}{2}
+ Replace: ``between points (x1,y2)'' \> ``between points (x1,\u{y1})''
+
+\erroronpage{641}{syntax boxes}{FMi}{2004/06/01}{2}
+ The variable parts do not show the right fonts.
+
+\erroronpage{641}{para 3, l.1}{ReSt}{2005/04/17}{4}
+ Remove: ``The |\Curve| command\u{s} is similar\ldots''
+
+\erroronpage{641}{para 3, l.2}{HjG}{2004/06/07}{2}
+ Second occurrence of mandatory argument should use the same font as
+ the first one, i.e., ``\textit{m}'' instead of ``\texttt{m}''.
+
+\seriouserroronpage{641}{para 4, ll.2/3}{HjG}{2004/06/07}{2}
+ Change sentence:\\
+ ``Like |\linethickness|, it is an absolute value \u{in points}
+ (i.e., not affected by |\unitlength|)\u{ with the unit omitted}.''
+ \>\\
+ ``Like |\linethickness|, it is an absolute value (i.e., not
+ affected by |\unitlength|)\u{, given in any of \LaTeX's units}.''
+
+\erroronpage{642}{item 6, l.2}{ReSt}{2005/04/28}{4}
+ Remove: ``font information \u{information} to allow\ldots''
+
+\seriouserroronpage{643}{para 4, l.3}{MSc}{2004/06/04}{2}
+ delete ``,and .gif''
+
+\erroronpage{643}{para 3, l.1}{FMi}{2005/11/11}{s}
+ Unfortunately Th\`anh's name is misspelled. The correct spelling
+ is ``H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh''.
+
+\erroronpage{643}{para 4, l.5}{CBe}{2004/07/27}{2}
+Add: ``\ldots can be converted to PDF by
+ImageMagick's \texttt{convert} utility\u{, \texttt{eps2pdf}} (\u{both
+of} which call \texttt{ghostscript}
+internally), \texttt{Acrobat Distiller}, or\ldots''
+
+\erroronpage{646}{l.1}{HjG/FMi}{2004/06/08}{2}
+Add:
+ ``(If the \texttt{dvi} file contains more than one
+page several output files are generated.)''
+
+
+\CHAPTER{Chapter 11}
+
+\erroronpage{651}{1st example}{PYu}{2004/07/01}{2}
+ ``Page 9 :'' should be typeset ``Page 9:''.
+
+\erroronpage{652}{2nd example}{HjG}{2004/06/10}{2}
+ Missing colon: ``Page 22\u{\strut:}''
+
+\erroronpage{652}{l.-3}{HjG}{2004/06/10}{2}
+ Surplus words: ``The latter case \u{is for} allows for \ldots''
+
+\seriouserroronpage{654}{para 2 l.7}{UFi}{2004/06/01}{2}
+ Missing |}|: ``like
+ |\index{\texttt{|\emph{key}|}|\u{\texttt{\textbraceright}} and''
+
+
+
+%That's a nice one: somehow the copy-editor has but the output is one
+%of the few remaining graphics in the book, sigh
+
+\seriouserroronpage{656}{figs. 11.3+4}{HjG}{2004/06/10}{2}
+ The text on p.649, l.1 claims:
+ ``Figures 11.3 and 11.4 on page 656 show the input and generated
+ output of a small \LaTeX{} document, \ldots, together with the
+ result of including the \textsf{showidx} package \ldots''
+ This does not quite hold: There are some differences in the text
+ and the output of \textsf{showidx} contains some index entries not
+ present in the source.
+
+\vspace{.5\baselineskip}
+ %
+\hspace*{-100pt}\begin{minipage}[b]{\linewidth}
+ \begin{tabular}{@{}lll@{}} \hline
+ \multicolumn{3}{c}{Differences in the text} \\ \hline
+ & source (fig. 11.3) & output (fig. 11.4) \\ \hline
+ \S1 & \ldots actually written into that file \u{only} \ldots
+ & \ldots actually \u{only} written into that file \ldots \\
+ \S2 & \u{To} prepare the index \ldots
+ & \u{In order to} prepare the index \ldots\\
+ \S2 & \ldots, \u {such as} \ldots
+ & \ldots, \u{like} \ldots \\
+ \S3 & \ldots by \u{the index processor} \ldots
+ & \ldots by \u{\texttt{makeindex}} \ldots \\ \hline
+ \multicolumn{3}{c}{Missing index entries} \\ \hline
+ & \multicolumn{2}{l}{include index} \\
+ & \multicolumn{2}{l}{Final production run} \\
+ & \multicolumn{2}{l}{makeindex@\texttt{makeindex} program
+ \emph{(2nd instance)}} \\ \hline
+ \end{tabular}
+\end{minipage}
+
+\vspace{.5\baselineskip}
+The source has now been edited to match the printed output.
+
+
+\erroronpage{656}{}{CBe}{2004/07/27}{s}
+ How horrible the page rotated counterclockwise!
+
+\erroronpage{657}{\texttt{-p} item, l.-1}{HjG}{2004/06/10}{2}
+ Add word: ``\ldots the three \u{special} cases \ldots''
+
+\erroronpage{660}{tab 11.1, note}{JMH}{2005/08/06}{4}
+ Swap the words ``single'' and ``double''
+
+\iffalse
+% not a bug make it look nicer
+\erroronpage{661}{tab. 11.2, right col.}{HjG}{2004/06/10}{}
+ Inter-line spacing in multiple-line entries ???\\(Keywords:
+ |headings_flag|, |item_x1|, |delim_0|, |page_precedence|)
+\fi
+
+\erroronpage{661}{tab. 11.2, l.12}{JMH}{2005/08/06}{4}
+ The identifier referred is ``\texttt{heading\_flag}'', but the
+ description uses the word ``\texttt{flag}''.
+
+
+\erroronpage{662}{l.6}{RPa}{2004/09/14}{4}
+ The |-p| option is described on page 657.
+
+
+% in short rnaRA is correct
+\seriouserroronpage{664/665}{para -2/-1}{HjG}{2004/06/10}{2}
+ Confusion: default value of |page_precedence|:\\
+ In para~\mbox{-2}, l.\mbox{-1}:
+ ``\ldots; the default is |rRnaA|, as noted in Table~11.2 on
+ page~661.''
+ But in that table, ``|"rnaRA"|'' is given!\\
+ In para~\mbox{-1}, l.\mbox{-2}:
+ ``\ldots\ default |page_precedence| of |rnaRA| \ldots''!\\
+ (Also note that the remarks on p.666, para~2, suggest |rRnaA|,
+ referring to the same table as above.)
+
+Changed to consistently refer to rnaRA.
+
+page 666 changed to reflect rnaRA:\\
+`` \ldots\ assumes that pages numbered with lowercase Roman
+numerals precede those numbered with Arabic numerals, which in turn
+precede those numbered with the lowercase alphabet, uppercase Roman
+numerals and finally the uppercase alphabet.
+
+
+\seriouserroronpage{661/664-5}{}{FMi}{2005/08/14}{4}
+
+ Confusion: the changes made in the second printing were wrong! The
+ default for |page_precedence| is |rRnaA| after all. (Or more
+ precisely: the program code shows |rnaRA| as the default but that
+ value is never used and the program logic implements |rRnaA| -- what
+ a mess.)
+
+ Most of that section rewriten to better explain the limitations of
+ MakeIndex in the area of ``funny'' page numbers.
+
+
+\seriouserroronpage{666}{para 4 l.5 and l.6}{UFi}{2004/06/01}{2}
+ Add extra visual space in second index: ``Likewise,
+ \verb*=\index{a space}= and
+ \verb*=\index{a space}= produce\ldots''
+
+\erroronpage{668}{boxed text}{HjG}{2004/06/10}{2}
+ Slight inconsistency (also in subsequent text: para~\mbox{-2}):
+ File arguments named ``\emph{idx1 idx2 \ldots}'' -- as opposed to
+ pp.~655 and~674, where they're named ``\emph{idx0 idx1 \ldots}''.
+
+\erroronpage{669}{para 3}{JS}{2004/07/24}{2}
+ Since xindy ignores all macros, it has no problems at all with
+ formatting macros, but more problems with macros producing text.
+ Substituted this paragraph with:
+
+ ``\texttt{texindy} ignores unknown
+ \TeX{} commands by default under the assumption that they do not
+ produce text. It also knows about typical text-producing commands
+ like \verb=\LaTeX= and \verb=\BibTeX= and handles them correctly.
+ If you have your own command definition that produces text, or if you
+ use one supplied by a package, then the entry is sorted
+ incorrectly. You will either need to specify an explicit sort key
+ in your index entry, as in \verb=\index{prog@\Prog}=, or write a
+ \texttt{xindy} style file with a merge rule, as explained in
+ Section~11.3.4.
+
+ Be aware that producing index entries in arguments of commands has
+ its own pitfalls, e.g., in
+ \verb=\command{Properties of \Prog\index{\Prog}}=.
+ Then \LaTeX{} commands might be expanded
+ before they are written to the \texttt{idx} file and the placement
+ in the index will depend on the expansion of \verb=\Prog=.''
+
+\erroronpage{669}{para -2, l.3}{MKu/FMi}{2004/07/01}{2}% already done by fmi
+ Add: ``\ldots \verb|\usepackage[latin1]{inputenc}| to all her
+ documents \u{(or on recent Linux distributions the
+ option \texttt{utf8})}, while\ldots''
+
+\erroronpage{669}{section 11.3.2, para 2, L.3}{JMH}{2005/08/06}{4}
+"*her* documents": why a female *her*?
+
+\erroronpage{670}{table 11.3}{TMW/JS}{2004/06/07}{2}
+ texindy can only work with Latin scripts out of the box. Removed
+ all other languages, and checked list of supported languages with
+ current xindy ``\LaTeX{} Companion Release''.
+
+\erroronpage{671}{para 2}{JS}{2004/06/07}{2}
+Replace with: ``There are about 50 predefined languages available, 35 of them are
+readily usable with \texttt{texindy}. They are listed in
+Table~11.3 on the facing page; you select one of them with the
+\texttt{texindy} option~\texttt{-L}. The other predefined
+languages have non-Latin scripts, their usage is described in the
+\texttt{xindy} documentation.
+
+
+\erroronpage{672}{table 11.4}{TSS/JS/CAR}{2004/05/26}{2}
+ The \verb|word-order| module has two essentially equivalent
+ descriptions. The |letter-order| module doesn't mention that
+ it's turned on by texindy option \texttt{-l}. Use ``so-called'' as
+ an example for |ignore-hyphen|. Add table footnote ``When two
+ entries are identical except for ignored characters, those
+ characters are not ignored any more.''
+
+\erroronpage{673}{para 5, ll.2/3}{HjG}{2004/06/10}{2}
+ Words need to be swapped:
+ ``multiple \u{characters may} form a unit''
+
+\erroronpage{674}{para 1 l.1}{UFi}{2004/06/01}{2}
+ Extra word: ``those \u{of} available''
+
+\erroronpage{674/675}{boxed text and item list below}{JS}{2004/07/24}{2}
+ Add option |[-C codepage]|. Add explanation between option |-L|
+ and |-q|: ``Use \textit{codepage} as internal base
+ encoding for sorting. This is used for fine-grained control of language
+ module selection, needed only for non-Latin scripts.''
+
+\erroronpage{675}{example code}{JS}{2004/07/24}{2}
+ Exchange xindy example style file with one that works. (Half of the
+ lines were problematic in subtle ways.)
+
+\erroronpage{679}{example 3, para after the source}{JMH}{2005/08/06}{4}
+ \texttt{:define-attributes} \> \texttt{define-attributes}
+
+\seriouserroronpage{679}{descr of theindex}{DSch}{2005/05/23}{4}
+ Comparing the code in TLC2 with \texttt{book.cls} made me realize
+that the |\columnsep| command must come \emph{before} |\twocolumn| in
+order to have the desired effect.
+
+\seriouserroronpage{680}{descr of theindex}{DSch}{2005/05/23}{4}
+ Comparing the code in TLC2 with \texttt{book.cls} made me realize
+that the |\columnsep| command must come \emph{before} |\twocolumn| in
+order to have the desired effect.
+
+\erroronpage{680}{First code block}{AFV}{2006/01/13}{s}
+ Correct: |\mark|\texttt{\u k}|both| \>
+ |\markboth|
+
+\erroronpage{681}{para 1 of \S 11.4.3, l.2}{HjG}{2004/05/26}{2}
+ Extra word: ``augments \u{the} \LaTeX's indexing mechanism''
+
+
+\CHAPTER{Chapter 12}
+
+\erroronpage{general}{several pages}{HVo/FMi}{2004/05/21}{}
+ The German word ``Schuldrecht'' is incorrectly hyphenated as
+ ``Schul\-drecht'' in several examples due to the fact that English
+ hyphenation patterns are used unless the language is
+ explicitly marked. This is a deliberate effect, see pages 719 and
+ 733--734.
+
+\erroronpage{683}{para 3, l.1}{HjG}{2004/06/12}{2}
+ Missing word:
+ ``The chapter begins \u{with} a short introduction \ldots''
+
+
+\erroronpage{684/685}{exa 12-1-2, l.-2 of source}{BMo/FMi}{2004/05/16}{2}
+ ``But then it might not'' should be ``But then they might not''
+ for parallelism with the ``Multiple authors'' to which it is
+ referring.
+
+ Also changed: ``Multiple authors'' \> ``Entries with multiple
+ authors''
+ so that it is clear that not the authors are a problem (though
+ come to think of it: given the example's authors\ldots)
+
+\erroronpage{685}{exa 12-1-1/2}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+
+\erroronpage{687}{para 1}{FMi}{2004/08/03}{2}
+Add: ``Depending on the layout produced by the class,
+it may result in \u{a normal space,} some extra space\u, or in starting a new line.''
+
+\erroronpage{688}{figure 12.1}{JMH}{2005/07/18}{4}
+ Replace in first item: |\cite| \> |\citation|
+
+\erroronpage{690}{entry test97}{HjG/FMi}{2004/06/18}{2}
+ Add ``\texttt{and others}'' to the author field. Otherwise the
+ example explanations in chapter 13 (pages 793--797) are
+ partially wrong.
+
+ Editorial comment: This change will affect the output of a
+ number of examples in chapter 12 as well.
+
+\erroronpage{691}{syntax box}{HjG}{2004/06/13}{2}
+ Set commas in `typewriter font'
+
+\erroronpage{694}{para 3, l.2}{HjG}{2004/06/13}{2}
+ Missing comma: `\,``see [2--3,7\u,13]''\,'
+
+\erroronpage{696}{para 1, l.1}{DAl}{2005/08/21}{4}
+ Missing word: ``\ldots option \u{is} shown in Example 12-2-9\ldots''
+
+\erroronpage{697}{para 3, l.5}{HjG}{2004/06/13}{2}
+ Move period: `\,``Ref\u{''.}\,' \> `\,``Ref\u{.''}\,'
+
+%%\erroronpage{702}{para 2, l.2}{BMo}{2004/05/16}{}
+%% ``Evidently'' does not seem to me to be quite the right word here.
+%
+% not convinced yet /FMi
+
+\erroronpage{705}{exa 12-3-17/18}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+\erroronpage{705}{para 3, l.5}{TMi}{2004/08/27}{4}
+ Replace ``Geophysics'' with ``Geophysical''.
+
+\erroronpage{707}{exa 12-3-22}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+\erroronpage{707}{exa 12-3-22, l.-2 of source}{BMo}{2004/05/16}{2}
+ ``But then it might not'' should be ``But then they might not''
+ for parallelism with the ``Multiple authors'' to which it is
+ referring.
+
+ Also changed: ``Multiple authors'' \> ``Entries with multiple
+ authors''
+
+
+\erroronpage{708}{para 3, l.6}{UFi}{2004/05/27}{2}
+ Replace: ``situati\u{ui}n'' \> ``situation''
+
+\erroronpage{708}{para 4, l.1}{HjG}{2004/06/14}{2}
+ Add: ``when using \u{the} \texttt{chicago} \u{\BibTeX\ style}.''
+
+\seriouserroronpage{710}{para 4, l.2}{BMo}{2004/05/16}{2}
+ Replace:
+ ``locate the printed version.'' \> ``locate the
+ article within the journal.''
+
+\erroronpage{713}{para 1, l.3}{HjG}{2004/06/14}{2}
+ Replace: ``|\citep|'' \> ``|\citealp|''
+
+\erroronpage{717}{para 1, l.4}{JMH}{2005/07/18}{4}
+Add word: ``If you \u{only} want to specify an \textit{annotator},
+\ldots''
+
+\seriouserroronpage{719}{para 4, l.-2/-1}{UFi}{2004/05/27}{2}
+ Extra word: ``the \u{the} journal'' \\
+ Correct explanation: ``\ldots the journal name\u{, volume number,}
+ and year of publication, which is why we got ``TUGboat \u{10
+ [}1989\u]''.''
+
+\seriouserroronpage{719}{syntax box}{HjG/FMi}{2004/06/14}{2}
+ Order of optional arguments are like |\cite| (i.e., swapped):\\
+ |\citetitle[|\emph{post-note}|]{|\emph{key(s)}|}| or
+ |\citetitle[|\emph{annotator}|][|\emph{post-note}|]{|\emph{key(s)}|}|\\
+ |\cite*[|\emph{post-note}|]{|\emph{key(s)}|}| or
+ |\cite*[|\emph{annotator}|][|\emph{post-note}|]{|\emph{key(s)}|}|
+
+\seriouserroronpage{722}{para 2, ll.2/3}{HjG}{2004/06/14}{2}
+ Correct explanation: ``\ldots is always ``author name, journal,
+ \u{volume,} and year''.''
+
+\seriouserroronpage{723}{syntax box}{HjG/FMi}{2004/06/14}{2}
+ Order of optional arguments are like with |\cite|:\\
+ |\fullcite[|\emph{post-note}|]{|\emph{key(s)}|}| or
+ |\fullcite[|\emph{annotator}|][|\emph{post-note}|]{|\emph{key(s)}|}|
+
+\erroronpage{726}{para 3, l.2}{HjG}{2004/06/14}{2}
+ Delete comma:
+ ``\ldots\ when used together\u, with \ldots''
+
+\seriouserroronpage{727}{para 3, l.-3}{JBe}{2004/06/01}{2}
+ Replace: \texttt{\textbackslash jbnovarioref} \>
+ \texttt{\textbackslash jbignorevarioref}
+
+\erroronpage{727}{examples 12-5-21/22}{FMi}{2004/06/03}{2}
+ Not wrong, but it looks funny: due to the chosen example height the
+ footnote from the previous page (not shown) is partially carried
+ over so we get ``43311-7'' as the first item in the footnote. That
+ is the last part of the ISBN number see example 12-5-20.
+
+ Previous page enlarged by one line to avoid this.
+ \verb|\AtBeginDocument{\enlargethispage*{\baselineskip}}|
+ added to (hidden) preamble commands.
+
+\erroronpage{729}{para 1, l.-1}{HjG}{2004/06/14}{2}
+ Correct: ``to ``Ibid.\u{, \S\,3}''.''
+
+\seriouserroronpage{730}{example 12-5-28}{UFi}{2004/05/27}{2}
+ Citation 7 and 8 are similar, but the description above says
+ something else...
+
+ To correct this mistake and to better show what happens, the example
+ was changed to contain a slightly different set of citations (same
+ change was made to example 12-5-27):
+\begin{verbatim}
+ Full citations: \cite{aschur} \cite{bschur}
+ not shown on the left!
+\newpage
+ text \cite[\S\,7]{aschur} text
+ \cite[\S\,8]{aschur} \cite[\S\,16]{zpo}
+ text \cite[\S\,7]{bschur} \cite{aschur}
+ text \cite[\S\,3]{zpo}
+\end{verbatim}
+And the text above the example was changed as follows:
+
+ ``If \texttt{name\&title\&auto} was selected (either implicitly or
+explicitly), then the following happens: the first citation of a
+publication automatically displays the full entry (citation~5 in the
+next example). In case of repeated citations to unambiguous works
+only the name of the author(s) are shown (citation~8). For ambiguous citations
+this will be done only for immediately following citations
+(citation~4). However, if there are
+intervening citations, then the name(s) and short titles are shown
+(citations~3, 6, and~7).''
+
+\erroronpage{731}{para 1, l.4}{HjG/FMi}{2004/06/15}{2}
+ Correct/change to: ``that \u{two}
+ citation\u{s} \ldots\ \u{are} actually wrong:''
+
+\erroronpage{732}{para 3. l.2}{JMH}{2005/07/18}{4}
+Replace: ``in which case \u{the first} cross-reference \ldots''
+\> ``in which case \u{a} cross-reference \ldots''
+
+\erroronpage{734}{para 1, l.2}{CKr}{2005/05/7}{4}
+ Correct: |\bibgerman| \> |\bib|\u{\texttt s}|german|
+
+\erroronpage{734}{para 2, l.-1}{CKr}{2005/03/24}{4}
+ Remove surplus letters: ``get the correct\u{ion} hyphenation.''
+
+\seriouserroronpage{741}{l.-5}{HjG}{2004/06/15}{2}
+ Missing closing brace:
+ |\renewcommand\opcit{\textit{supra}|\u{\texttt{\textbraceright}}
+
+\seriouserroronpage{743}{item 3}{UFi}{2004/05/27}{2}
+ Equal sign missing: \texttt{sortkey\u{ = }"Bismarck, Otto von"}.
+
+\erroronpage{744}{exa 12-5-48/49}{HjG}{2004/06/15}{}
+ There's a spurious space before all occurrences of
+ ``\textsc{D. E. Knuth}''! \\ This is (partly, ie in the footnote)
+ due to a missing percent in the definition of |\@realcite| and
+ |\@printbibliography| in the camel package. Seems that a problem
+ with the volume parsing in camel is the reason for the surplus
+ spaces showing up in the bibliography output. Reported to the
+ author.
+
+\erroronpage{745}{ll.3/4}{HjG}{2004/06/15}{2}
+ Missing metaness:\\
+ ``\ldots\ \texttt{jobname.tts}'' \>
+ ``\ldots\ \meta{jobname}\texttt{.tts}''\\
+ ``\ldots\ \texttt{jobname.lts}'' \>
+ ``\ldots\ \meta{jobname}\texttt{.lts}''
+
+\erroronpage{746}{tab 12.2}{HjG}{2004/06/15}{2}
+ Replace (`bibtopic' column, row 4; `multibib' column, row 7):\\
+ ``no'' \> ``No''
+
+\erroronpage{746}{Tab. 12.2}{THa}{2004/06/21}{2}
+ Change ``Requires tailored .bib files'' \> ``Works with standard
+ .bib files''
+ (and change matching row entries)
+
+\erroronpage{746}{Tab. 12.2}{THa}{2004/06/21}{2}
+ Change: ``Above typeset together somewhere'' \>
+ ``Group bibliographies together''
+
+\erroronpage{749}{para -1, l.1}{THa}{2004/06/22}{2}
+ Missing accents: ``Jose Alberto Fernandez'' \> ``Jos\'e Alberto
+ Fern\'andez''
+
+\erroronpage{750}{para -3, l.-2}{CKr}{2005/03/31}{4}
+ Delete surplus word: ``\ldots as \u{the} the auxiliary files would be
+ overwritten.''
+
+\erroronpage{752}{para 1, l.-1}{HjG}{2004/06/15}{2}
+ Delete backslash:
+ ``\ldots in an \texttt{\u\textbackslash article} class).''
+
+\erroronpage{753}{para 4, l.5}{HjG}{2004/06/15}{2}
+ Replace: ``|\bibliography|'' \> ``|\bibliographystyle|''
+
+\seriouserroronpage{755/756}{}{THa}{2004/06/21}{2}
+ Wrong limitation of multibib: The whole passage from ``A final
+ difference'' up to ``|nocite|.'' should be replaced with something
+ like: ``The multibib package (since version 2.3 of 2004/01/24) is
+ compatible with most other packages that provide extensions to the
+ cite mechanisms, including \textsf{cite}, \textsf{natbib}, and
+ {jurabib}. Moreover, the package provides a general interface which
+ allows to add arbitrary extensions of cite commands to be recognized
+ by \textsf{multibib}.''
+
+ Editorial comment: change affects pagebreak position.
+
+\erroronpage{756}{Ex. 12-6-10}{THa/FMi}{2004/06/21}{2}
+ Replace source text with:
+ |\LaTeX{} offers an interface to include|\\
+ |graphics \citelatex{LGC97}. \LaTeX's|\\
+ |default citation scheme is| \\
+ |number-only \cite{vLeunen:92}.|\\
+ i.e., move/remove the sentence periods. This should not affect the
+ output as the superscript is moved and double periods are removed.
+
+
+\CHAPTER{Chapter 13}
+
+% perhaps
+\erroronpage{758}{para 3, ll.1/2}{HjG}{2004/06/16}{2}
+ Delete word: ``\ldots\ to look for
+ \u{management} tools that help in managing such databases.''
+
+\erroronpage{758}{para 4}{HjG/FMi}{2004/06/16}{2}
+ Add+change: ``Once everything is under control, we return in
+ \u{Section~13.5} to the task of typesetting
+and look at how different \BibTeX{} styles can be used to produce
+different bibliography layouts from the same input. As there may not
+be a suitable style for a particular set of layout requirements
+available, Section~\u{13.5.2} discusses how to
+generate\ldots''
+
+\erroronpage{763}{tab. 13.1}{HjG/FMi}{2004/06/16}{2}
+ In the explanation for \texttt{misc}, replace:\\
+ ``(i.e., the entire field is empty)'' \>
+ ``(i.e., the entire entry is empty or has only ignored fields).''
+
+\erroronpage{764}{para -3, l.-1}{HjG}{2004/06/16}{2}
+ Add: ``following a field \u{name (and \texttt= sign)}''
+
+\erroronpage{765}{tab. 13.2}{HjG}{2004/06/16}{2}
+ In the explanation for \texttt{type}:\\
+ l.2: Add word:
+ ``For the \u{entry} type \texttt{phdthesis} \ldots''\\
+ l.3: Punctuation is not part of string:
+ ``|type = "{Ph.D.} dissertation|\texttt{\u.}|"|'' \>
+ ``|type = "{Ph.D.} dissertation"|\u.''\\
+ l.5: Punctuation is not part of strings:\\
+ ``\texttt{chapter = "1.2\u," type = "Section\u."}'' \> \\
+ ``\texttt{chapter = "1.2"}\u{ and} \texttt{type = "Section"}\u.''
+
+\erroronpage{765}{`key's description, l.1}{JMH}{2005/06/29}{4}
+Remove ``cross-referencing'': cross-referencing just uses key appearing in
+|\cite| commands.
+
+\erroronpage{766/767}{several places}{DAl}{2005/09/12}{4}
+ Replaced ``Miguel Lopez Fernandez'' by ``Miguel Parra Benavides''
+ as the original name would really require accents that are not yet
+ discussed at this point.
+
+\erroronpage{766}{para 6, l.1 }{UFi}{2004/05/27}{2}
+ Move comma: Fernandez\u{,''} should be Fernandez\u{'',}
+
+\erroronpage{767}{l.7}{SPe}{2007/05/21}{s}
+``Miguel Parra Benavides'' is missing closing quotes.
+
+\erroronpage{767}{l.10}{SPe}{2007/05/21}{s}
+``Parra'' and ``Benavides'' are missing closing quotes.
+
+\erroronpage{768}{para 4, l.4}{UFi}{2004/05/27}{2}
+ Replace: ``(see Section 13.2.2)'' \> ``(see below)'' \\
+ After all we are in 13.2.2 :-)
+
+\erroronpage{770}{para 1, l.1}{HjG}{2004/06/16}{2}
+ Replace: ``text \u{field} of \BibTeX\ \u{entries}'' \>
+ ``text \u{part} of \BibTeX\ \u{fields}''
+
+\seriouserroronpage{771}{verb. text}{HjG}{2004/06/16}{2}
+ Surplus closing brace:
+ ``|"\providecommand\url[1]{\texttt{#1}}|\texttt{\u\textbraceright}|"|''
+
+\erroronpage{771}{l.-3}{HjG}{2004/06/16}{2}
+ Change: ``different sorting rules from English'' \>
+ ``sorting rules different from those of English''
+
+\erroronpage{772}{l.-5}{HjG}{2004/06/16}{2}
+ Shell command line should be underlined (as on pp.~775--778).
+
+\erroronpage{773}{para 3, ll.2/3}{HjG}{2004/06/16}{2}
+ Change: ``put \u{from \BibTeX}\ into the \texttt{.bbl} file'' \>
+ ``put into the \texttt{.bbl} file \u{by \BibTeX}''
+
+\seriouserroronpage{773}{para 3, ll.-1}{HjG}{2004/06/16}{2}
+ Change: ``and \u{an} additional \LaTeX\ run'' \>
+ ``and \u{two} additional \LaTeX\ run\u{s}''
+
+\erroronpage{773}{para -2, l.3}{HjG}{2004/06/16}{2}
+ Add: ``articles and book\u{s}''
+
+\erroronpage{775}{para -2, l.1}{HjG}{2004/06/16}{2}
+ Change font: ``in the \texttt{\u{string}} parameter'' \>
+ ``in the \emph{\u{string}} parameter''
+
+\erroronpage{777}{program output}{FMi}{2004/08/03}{2}
+After changing the bib file this line comes out as:
+\begin{verbatim}
+%% "EX/tex.bib", line 92: Unexpected value in ``year = "1980ff"''.
+\end{verbatim}
+
+\erroronpage{777}{para -1, l.-3}{HjG}{2004/06/16}{2}
+ Change: ``all \u{entries} are examined'' \>
+ ``all \u{fields of an entry} are examined''
+
+\erroronpage{777}{para -1, l.-2}{HjG}{2004/06/16}{2}
+ Change: ``value part of the \u{entries}'' \>
+ ``value part of the \u{fields}''
+
+\erroronpage{778}{para 4,l.2}{JMH}{2005/07/18}{4}
+ Replace: ``\texttt{year=1980ff}'' \> ``|year={1980ff}|''
+
+\erroronpage{779--784}{throughout}{HjG}{2004/06/16}{2}
+ Shell command lines should be underlined (as on pp.~775--778).
+
+\erroronpage{779}{para 3, l.2/3}{HjG}{2004/06/16}{2}
+ Add: ``one ore more \BibTeX\ databases as its argument\u{(s)}''
+
+\erroronpage{779}{footnote 2}{HjG}{2004/06/16}{2}
+ Add second hyphen: ``after the \texttt{-} option.''
+ \> ``after the \texttt{-\u-} option.''
+
+\erroronpage{780}{top}{FMi}{2004/08/03}{2}
+ Spurious space on top of page.
+
+\erroronpage{784}{para 1, l.-1}{HjG}{2004/06/16}{2}
+ Typo (forgotten backslash!?):
+ ``Progpybliographer'' \> ``\textsf{pybliographer}''
+
+\erroronpage{787}{l.2}{HjG}{2004/06/16}{2}
+ Shell command line should be underlined (as on pp.~775--778).
+
+\erroronpage{787}{para -2, l.1}{CKr}{2005/04/20}{4}
+ Remove surplus letter: ``The \textsf{JBibtexManager} program
+ develop\u{p}ed by Nizar Batada''
+
+\erroronpage{788}{fig. caption}{FMi}{2004/05/14}{2}
+ Add: The \textsf{JBibtexManager} workspace with the \u{(German locale)}
+
+\erroronpage{788}{footnote}{FMi}{2004/04/23}{2}
+ Replace: ``Most of these restrictions have been lifted in the
+ new version of JBibtexManager.''
+
+\erroronpage{789}{para 2, l.1}{FMi}{2004/04/23}{2}
+ Replace: ``\ldots are kept unchanged but they are
+ neither visible nor modifiable from within the program.'' \\
+ \>
+ ``\ldots are neither visible nor modifiable
+ except when using the ``raw \BibTeX'' mode in the newest version of
+ the program. ''
+
+
+\erroronpage{789}{para 3}{FMi}{2005/06/02}{4}
+Replace whole paragraph with:
+``The program is not available on CTAN. Its current home is
+\texttt{https://www.jabref.org}, where it was merged
+with a similar project called \textsf{BibKeeper}
+under the new name \textsf{JabRef}.''
+
+\erroronpage{789}{para 5, l.3}{FMi}{2004/05/14}{2}
+ Small rewrite:
+ The only ``foreign'' export formats supported are \texttt{.bbl} files
+ \u{and \texttt{.htm} files} (i.e., processing a selection of entries with
+ \BibTeX{} or \BibTeX8 from within the program and producing HTML
+ from a selection of entries\u{)}.
+
+\erroronpage{791--793}{tab 13.4}{HjG}{2004/06/16}{2}
+ \texttt{apa.bst} -- add:
+ ``American Psychology Association \u{\BibTeX\ style}'' \\
+ \texttt{jmb.bst} -- add:
+ ``\emph{Journal of Molecular Biology} \u{\BibTeX}\ style''\\
+ Some journal names are written in italic, other's aren't:
+ Astronomy; Behavioral and Brain Sciences; Human Biology.
+
+
+\erroronpage{793}{para 1, l.2}{SN}{2004/06/11}{2}
+ Remove surplus word: ``using another \u{the} \BibTeX{} style''.
+
+\erroronpage{793}{para 2,l.5}{DAl}{2005/09/03}{4}
+ Remove comma: ``\ldots wich will show us\u{,} how different\ldots''
+
+\erroronpage{794}{exa 13-5-1/2}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+\erroronpage{795}{exa 13-5-3/4}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+\erroronpage{795}{para 2, l.2}{JMH}{2005/07/18}{4}
+ Replace: ``author's name'' \> ``authors' names''
+
+\seriouserroronpage{795}{para 2, ll.4/5}{HjG}{2004/06/18}{2}
+ The text states: ``Also note the interesting label produced for the
+ reference with more than three authors.'' \\
+ However, example 13-5-4 cannot show this, as there are only three
+ authors (item~[GUD97]).
+
+\erroronpage{796}{exa 13-5-5/6}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+\seriouserroronpage{796}{para 1, ll.-2/-1}{HjG}{2004/06/18}{2}
+ The text states: ``Note that the entry with more than three authors
+ has now been collapsed, showing only the first one.'' \\
+ Again, example 13-5-5 does not show this, as there are only three
+ authors, and all three are shown (item~[5]).
+
+\seriouserroronpage{797}{para 3, l.3}{HjG}{2004/06/18}{2}
+ Replace:
+ ``\ldots; as a result, we get an incomplete \u{first} entry.'' \>
+ ``\ldots; as a result, we get an incomplete \u{second} entry.'' \\
+ (Obviously, the citation of \texttt{LGC97} has been added to
+ example 13-5-7 \emph{after} this text was written.)
+
+\erroronpage{797}{exa 13-5-7}{FMi}{2004/06/20}{2}
+ Editorial comment: due to the modification of the \BibTeX{} data
+ base \texttt{tex.bib} on page 690 the example output will change
+ slightly in a reprint.
+
+\erroronpage{798}{tab 13.5, l. 1-2}{MSch}{2006/01/06}{s}
+ Replace: ``Erwin'' \>
+ '`Ervin''
+
+\erroronpage{798}{para 1, l.3}{CKr}{2005/04/23}{4}
+ Remove surplus word: ``\ldots, then it is all that \u{it} is necessary.''
+
+\erroronpage{800}{Citation scheme,l.2}{DAl}{2005/09/03}{4}
+ Replace letter: ``\ldots different questions th\u{a}n if you
+ choose\ldots''
+
+\erroronpage{802}{para 2, l.4}{HjG}{2004/06/17}{2}
+ Replace: ``derivation'' \> ``deviation''
+
+\erroronpage{802}{para -1, l.3}{FMi}{2005/06/02}{4}
+ Replace wrong braces:
+ ``|\urlprefix\url[|\textit{field-value}|]|'' \>
+ ``|\urlprefix\url{|\textit{field-value}|}|''
+
+\erroronpage{803}{para -2, l.2}{HjG}{2004/06/17}{2}
+ Replace: ``in the second phase of the \u{formatting}'' \>
+ ``in the second phase of the \u{processing}''
+
+
+\erroronpage{806}{list, item 3}{UFi}{2004/06/01}{2}
+ Extra character: ``Printed in the order in which the\u{e}
+ references\ldots''
+
+\erroronpage{806}{para -3}{FMi}{2005/06/02}{4}
+ Move this paragraph to the bottom of the page since it is really an
+ explanation about the functions defined for each publication type.
+
+\erroronpage{808}{table 13.8}{JMH}{2005/07/18}{4}
+ Replace description for |int.to.chr$| with:
+ ``Translates integers into a characters using the ASCII mapping''
+
+\erroronpage{810}{\texttt{fin.entry} example}{HjG}{2004/06/17}{2}
+ Replace in ``\emph{After Modification}'' part (2~times):
+ ``|\sc|'' \> ``|\scshape|''
+
+\erroronpage{811}{para 2, l.3}{HjG}{2004/06/17}{2}
+ Replace: ``at the beginning of this section'' \>
+ ``on the facing page''
+
+
+
+\CHAPTER{Chapter 14}
+
+\erroronpage{814}{para 6, l.1}{HjG}{2004/06/08}{2}
+ Delete doubled word:
+ ``The most important \u{important} commands \ldots''
+
+%% not really a bug but inconsistent
+\erroronpage{814}{para -1, l.-2}{HOb}{2004/05/28}{2}
+ Explicitly show spaces: \verb*=% \iffalse= \ldots\ \verb*=% \fi=
+
+\erroronpage{815}{syntax boxes 2+3}{HOb}{2004/05/28}{2}
+ For clarification the argument of |\DescribeMacro| and that of
+ |\begin{macro}| should both start with a |\|.
+
+\erroronpage{816}{para -3, l.4+}{HOb}{2004/05/28}{2}
+ Change sentence:
+ Note that \u{such short forms for \texttt{\textbackslash verb},
+ just} like \texttt{\textbackslash verb} itself,
+ cannot appear in the argument of another command, but
+ \u{the characters} may be used
+ freely inside \texttt{verbatim} and \texttt{macrocode} environments.
+
+\seriouserroronpage{820}{para 2, last line}{DHL}{2004/05/16}{2}
+ Change to: ``lines 1, 2, and \u{4} if \texttt{Bname} is also
+asked for, and lines 1, \u{3}, and 4 otherwise.''
+
+\erroronpage{820}{para 3, l.5}{HOb}{2004/05/29}{2}
+ Remove surplus space: ``behind \%\u{~} signs\ldots''
+
+\erroronpage{820}{table 14.1}{HOb}{2004/05/29}{2}
+ Entries not sorted correctly: swap |\CheckSum| and |\CheckModules|
+
+\seriouserroronpage{821}{descr.\ of
+ \ttfamily\textbackslash DeleteShortVerb}{UFi}{2004/05/23}{2}
+ \verb=\MakeshortVerb= should be \verb=\Make=\u{S}\texttt{hortVerb}\\
+ \verb=\MakeshortVerb*= should be \verb=\Make=\u{S}\texttt{hortVerb*}
+
+\erroronpage{821}{table 14.1}{HjG}{2004/06/08}{2}
+ As suggested by HOb (p.815):
+ ``|\DescribeMacro{\|\emph{cmd}|}|'' and
+ ``|\begin{macro}{\|\emph{cmd}|}|''.
+
+\erroronpage{822}{table 14.1, entry 2}{HjG}{2004/06/08}{2}
+ |\meta{|\emph{arg}|}| ``Print \u{the} argument \ldots''
+
+\erroronpage{822}{table 14.1, entry 3}{HOb}{2004/05/29}{2}
+ Replace with: \verb=\SpecialEscapechar{\=\emph{char\/}\verb=}=
+
+\seriouserroronpage{822}{table 14.1, entry -2}{HOb}{2004/05/29}{2}
+ Wrong default: ``(default |*|)'' \> ``(default |!|)''
+
+\erroronpage{823}{table 14.1}{HjG}{2004/06/08}{2}
+ As suggested by HOb (p.815):
+ ``|\SpecialIndex{\|\emph{cmd}|}|'',
+ ``|\SpecialMainIndex{\|\emph{cmd}|}|'', and
+ ``|\SpecialUsageIndex{\|\emph{cmd}|}|''.
+
+\seriouserroronpage{824}{table 14.1, entry 6}{HOb}{2004/05/29}{2}
+ Typo: |\MakePercentCommand| \> |\MakePercentComment|
+
+\erroronpage{825}{para 3, l.1}{THa}{2004/06/25}{2}
+ ``\% sign'' \> ``|%| sign''
+
+\erroronpage{825}{para 5, l.1}{THa}{2004/06/25}{2}
+ ``target'' \> ``target machine''
+
+% making the syntax box bigger affects next page as well:
+\seriouserroronpage{826/827}{code box}{UFi/FMi}{2004/05/24}{2}
+ Closing brace of \verb=\generate{...}= is missing. Also it would be
+ better if the box shows that several |\file| commands can be used.
+
+\erroronpage{826/827}{para -1\slash para 2}{HjG}{2005/05/15}{4}
+ The descriptions referring to the syntax box do not characterize
+ the changed contents of that box (due to a previous error report).
+
+ Not only a single \textit{result-file} is possible:\\
+ ``Within the argument to |\generate| you specify the
+ \textit{result-file} you want to produce by using a |\file|
+ declaration.''
+
+ The text ``as given above'' does no longer hold:\\
+ ``With the syntax specification for |\generate| as given above,
+ you can produce one \textit{result-file} from one or more
+ \textit{source-files}.''
+
+\erroronpage{826}{l.2}{HjG}{2005/02/26}{4}
+ Replace: LaTeX \> \LaTeX{}
+
+\erroronpage{826}{para -2, l.-3}{HjG}{2004/06/08}{2}
+ Add: ``only the code piece\u{s}''
+
+\erroronpage{827}{para 2, l.-1}{HjG}{2005/05/15}{4}
+ ``source files'' \> ``\emph{source-files}''
+
+\erroronpage{827}{}{FMi}{2004/06/08}{2}
+ Editorial comment: reprinted because of pagebreak changes.
+
+\erroronpage{828}{para 3, l.2}{DHL}{2004/05/16}{2}
+ Extra word: ``If so, \u{case}'' \> ``If so,''
+
+\seriouserroronpage{829}{syntax box}{HOb}{2004/05/29}{2}
+ |\preamble|, |\endpreamble|, |\postamble|, and |\endpostamble| all
+ have to be on lines by themselves, so the displayed syntax is a bit
+ misleading (to say it nicely).
+
+\erroronpage{829}{para -2, l.-2/-1}{HjG}{2004/06/08}{2}
+ Add word: ``in \u{the} \textsc{docstrip} package documentation''
+
+\erroronpage{830}{para 4, ll.5/6}{HjG}{2004/06/08}{2}
+ Change:
+ ``In addition, the user \u{has configured} the \textsc{docstrip}
+ program \ldots'' \>
+ ``\ldots\ \u{has to configure} \ldots''
+
+\erroronpage{830}{para 5, l.4}{HjG}{2004/06/08}{2}
+ Add: ``in the \textsc{docstrip} \u{script}''
+
+\erroronpage{831}{ll. 4 to 15}{UFi/FMi}{2004/05/27}{2}
+ The |\usedir| declarations in the example are not in accordance
+ with the TDS set-up. They show what \textsf{jurabib}
+ currently implements in its \texttt{.ins} files.
+ However, the correct set-up would be:
+\begin{verbatim}
+ \usedir{tex/latex/jurabib}
+ \file{jurabib.sty}{\from{jurabib.dtx}{package}}
+ \file{dejbbib.ldf}{\from{jurabib.dtx}{german}}
+ ...
+ \usedir{bibtex/bst/jurabib}
+ \file{jurabib.bst}{\from{jurabib.dtx}{jurabst}}
+ ...
+ \usedir{doc/latex/jurabib}
+ \file{jbtest.tex}{\from{jurabib.dtx}{test}}
+ ...
+\end{verbatim}
+ This also requires to change the text following.
+
+\erroronpage{831}{ll.16/17}{HjG}{2004/06/09}{2}
+ Double interword space?
+ (if so: 2x visible, 1x vanished in line break)\\
+ ``in \ |tex/...|'' \qquad yes, bug in \texttt{url}.
+
+\seriouserroronpage{831/832}{general}{HjG}{2004/06/09}{2}
+ Replace throughout: |\DeclareDirectory| \> |\DeclareDir|.\\
+ Unfortunately, \texttt{docstrip} is not consistent in its command names.
+
+\seriouserroronpage{832}{l. 5}{UFi}{2004/05/27}{2}
+ Missing \texttt{*}: |\DeclareDir|\u{\texttt{*}}|{tex/bibtex/...|
+
+\erroronpage{832}{code blocks}{DPa}{2004/08/04}{2}
+ Three instances of |tex/bibtex| in |\DeclareDir| should lose the |tex/| to
+ conform to TDS and change made on page 831
+
+\erroronpage{832}{2. code block}{MSch}{2006/01/06}{s}
+ Replace: |text/latex/base| \> |tex/latex/base|
+
+\erroronpage{832}{para 4, l.-2}{HOb}{2004/05/29}{2}
+ Change: ``\ldots a single |\UseTDS| in\ldots'' \>
+ ``a |\UseTDS| and a |\BaseDirectory| declaration in\ldots''
+
+\erroronpage{832}{para 5, l. -3}{UFi}{2004/05/23}{2}
+ The ``\TeX{} Live CD'' is spelled incorrectly as
+ ``\TeX{} live'' or ``\TeX live''
+
+\erroronpage{832}{l.-2}{HjG}{2005/05/15}{4}
+ Underline, as it is command line input.
+
+\erroronpage{833}{para -1, l.1}{J-CCh}{2005/07/17}{4}
+ Spurious extra blank between ``Another potential''.
+
+
+\erroronpage{834}{para 4, l.2}{HjG}{2004/06/09}{2}
+ Change: ``These command\u{s}''
+
+\erroronpage{834}{para 5, l.-1}{HjG}{2004/06/09}{2}
+ Closing parenthesis should not be in `typewriter font':\\
+ ``(after |\begin{document}|\u)''
+
+\erroronpage{834}{para 5}{FMi}{2007/11/13}{}
+ Explain that |\cmd| can't be used with conditionals, e.g., those produced
+ with |\newif| .
+
+\erroronpage{835}{para 6, l.2}{DHL}{2004/05/16}{2}
+Missing letter: ``the source files into a
+``user'' documentation and a\u{n} ``implementation'' part.''
+
+\erroronpage{835}{para 6, l.5}{DHL}{2004/05/16}{2}
+Missing word: ``as the \textsf{doc} package \u{is} loaded''
+
+\erroronpage{835}{ll.-6/-4}{HjG}{2004/06/09}{2}
+ Replace:
+ ``\ldots\ \u{and no} configuration file.'' \>
+ ``\ldots\ \u{without a} configuration file.''
+
+\erroronpage{837}{exa 14-4-1}{FMi}{2004/06/12}{}
+ Editorial comment: example has to be reprocessed whenever this
+ chapter is modified to show correct rcs checkin (otherwise input
+ and output will not match).
+
+\erroronpage{837}{para 2,l.3}{DAl}{2005/09/03}{4}
+ Replace:
+ ``running \u{heading}'' \>
+ ``running \u{header}''
+
+\erroronpage{838}{code box}{UFi}{2004/05/27}{2}
+ \texttt{\$Id\$}: first |$| uses wrong font (2 times)
+
+\erroronpage{839}{exa 14-4-2}{FMi}{2004/06/12}{}
+ Editorial comment: example has to be reprocessed whenever this chapter is modified to
+ show correct rcs checkin (otherwise input and output will not match).
+
+\seriouserroronpage{839}{item 1, l.1 and l.3}{AHo}{2004/09/02}{4}
+ Replace: \texttt{nottoday} \> \texttt{notoday}
+
+\seriouserroronpage{839}{item 2, l.4}{HjG}{2004/06/09}{2}
+ Replace brackets with braces: ``\texttt{%
+ \char`\\pagestyle\u\textbraceleft fancy\u\textbraceright}''
+
+
+\CHAPTER{Appendix A}
+
+\erroronpage{842}{para 2, l.5}{PYu/FMi}{2004/07/03}{2}
+ Remove: ``\ldots
+ \texttt{A}\ldots\texttt{Z})\u{ in case of command names prefixed with a
+ backslash}.''
+
+\erroronpage{842}{para 3, marginal}{FMi}{2004/08/01}{2}
+ Change: ``Environments and command names'' \> ``Environments''
+
+\erroronpage{842}{para 3}{PYu/FMi}{2004/08/01}{2}
+ Remove: ``On
+ the other hand, names of environments \u{and counters}
+ are different.''
+
+Add: ``In this case the
+\texttt{*} is part of the name \u{and spaces preceding it are not ignored}. Thus, when writing
+\verb*=\begin{figure *}=, the space would become part of the name \u{and
+is not recognized as the start of a \texttt{figure*} environment}.''
+
+
+\erroronpage{843}{para 3, l.2}{YvH}{2004/05/28}{2}
+ Missing word: ``and |\z@| contain |@| \u{in} their name''
+
+\erroronpage{843}{para 4, l.3}{PYu}{2004/07/03}{2}
+ Change: ``to do: the difficult'' \> ``to do\u; the difficult''
+
+\erroronpage{844}{para 4, l.4}{PYu/FMi}{2004/07/04}{2}
+ Replace: ``Thus, the above example could be shortened to'' \>
+ ``Thus, the definition in the above example should be
+ replaced as follows:''
+
+\erroronpage{846}{para 1, l.2}{ARi}{2004/07/02}{2}
+ A period should follow the right parenthesis and ``without''
+ should be capitalized.
+
+\iffalse
+% maybe
+\erroronpage{845/846/847}{syntax boxes and text}{FMi}{2004/07/04}{}
+ Replace: ``\textit{command definition}'' \>
+ ``\textit{command-definition}''
+\fi
+
+\erroronpage{847}{para. 5, ll. 2-3}{PYu}{2004/07/04}{2}
+ For consistency replace \meta{cmd}with \textit{cmd}
+and \meta{command definition} with \textit{command definition}.
+
+
+\erroronpage{847}{para -2, l.3}{VVo}{2008/09/02}{}
+Replace: ``An error is raised if the definitions differ, ldots''
+\> ``A warning is shown if the definitions differ, \ldots''
+
+
+\erroronpage{851}{para 5, l.-2}{FMi}{2004/07/20}{2}
+ Add + change font: ``It also defines \u{the command}
+ |\the|\u{\textit{newctr}} to\ldots''
+
+\erroronpage{852}{code block 1, l.2}{JGr}{2004/06/10}{2}
+ Second \verb=\makeatletter= should be \verb=\makeatother=
+
+\erroronpage{852}{para 3, l.-3}{FMi}{2004/06/23}{2}
+ ``\u{For that reason} the next example'' \> ``\u{As a result} the next example''
+
+\erroronpage{852}{para -1, l.3}{FMi}{2004/07/24}{2}
+Move word: ``|\setcounter| or |\addtocounter| \u{command} or when\ldots'' \>
+ ``\u{command} |\setcounter| or |\addtocounter| or when\ldots''
+
+\erroronpage{852}{para -1, l.-3}{THa/FMi}{2004/06/23}{2}
+Change:
+ ``It is \emph{not} suitable to print that number! For that reason a
+ set\ldots'' \>
+ ``However, the command cannot be used to typeset the value of the
+ counter! For that purpose a set\ldots''
+
+
+\erroronpage{853}{l.6}{THa/FMi}{2004/06/23}{2}
+ Missing space: ``c,\u{~}\dots, z''
+
+\erroronpage{853}{para 4,ll.2+3}{HjG}{2004/05/25}{2}
+ Add word: ``\ldots definitions for sectioning \u{counters}''
+
+\erroronpage{853}{counter code block}{FMi}{2005/06/09}{4}
+The order of declarations of the counters is incorrect; they have to be
+\begin{verbatim}
+\newcounter{part}
+\newcounter{section}
+\newcounter{subsection}[section]
+\newcounter{subsubsection}[subsection]
+\end{verbatim}
+or you will receive a ``counter not defined'' error.
+
+\iffalse
+\erroronpage{853}{general}{THa/FMi}{2004/06/23}{}
+ Perhaps ``|\the|\meta{ctr}'' should be written without the meta
+ braces to match the form used on p.~852. \\
+ Then again, perhaps not.
+\fi
+
+\erroronpage{854}{ll. 1+2}{FMi}{2004/05/25}{2}
+ Add word and commata: ``Only the representation\u{, prefix,} and
+ label field commands
+ are defined \ldots''
+
+\seriouserroronpage{854}{code block 1}{HjG/FMi}{2004/05/25}{2}
+Replace with approx:\\[6pt]
+\hspace*{-140pt}\begin{minipage}[b]{\linewidth}
+\begin{verbatim}
+\renewcommand\theenumi {\arabic{enumi}} \renewcommand\theenumii{\alph{enumii}}
+\renewcommand\theenumiii{\roman{enumiii}} \renewcommand\theenumiv{\Alph{enumiv}}
+\end{verbatim}
+\begin{verbatim}
+ \renewcommand\p@enumii{\theenumi}
+\renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii}
+\end{verbatim}
+\begin{verbatim}
+\newcommand\labelenumi {\theenumi.} \newcommand\labelenumii{(\theenumii)}
+\newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.}
+\end{verbatim}
+\end{minipage}
+
+
+\erroronpage{855}{fig A.1, l.4}{JAn}{2005/09/09}{4}
+ Change ``Did\^ot'' \> ``Didot'' (no caret); and delete the
+comma after inch
+
+
+\erroronpage{855}{fig A.1}{CBe/FMi}{2004/07/27}{2}
+Add: \texttt{ex} \quad Height of a small ``x'' in the current font \u{(approximately)}
+\\
+Add: \texttt{em} \quad Width
+ of capital ``M'' in current font \u{(approximately)}
+
+
+
+\erroronpage{856}{tab A.2, ll.1-3}{YvH}{2004/05/28}{2}
+ Correct: ``horizonal'' \> ``horizon\u{t}al'' (three times)
+
+\erroronpage{856}{tab A.2, l.6}{PYu}{2004/07/05}{2}
+ Add: ``a \u{solid} horizontal line''
+
+\erroronpage{857}{table A.3}{V-Li}{2004/09/14}{4}
+ |\vspace{len}| is missing
+
+\erroronpage{858}{l.-8}{HjG/FMi}{2004/05/26}{2}
+ Add: ``\u{missing or} misplaced |\item|''
+
+\erroronpage{858}{syntax box}{PYu}{2004/07/03}{2}
+ |\addvspace{|\textit{space}|}| should be typeset in a smaller font.
+
+\erroronpage{859}{para -4, l.1}{HjG}{2004/05/20}{2}
+ Typo: ``ar\u{r}ises'' \> ``arises''
+
+\erroronpage{860}{para 1 of \S A.2, l.5}{CAR}{2004/05/26}{2}
+ Replace: ``that behaves similarly to a\ldots''
+ \> ``that behaves \u{much like} a\ldots''
+
+\erroronpage{861}{l.-2}{HjG}{2004/05/26}{2}
+ The \(\Longleftrightarrow\) in the margin seems to sport a tiny
+ gap in the middle (seems to be a lucida set-up problem).
+
+\erroronpage{866}{para 2 of \S A.2.3, l.5}{HjG}{2004/05/26}{2}
+ Words need to be swapped: ``height of a \u{box framed} with
+ |\fbox| or |\framebox|''
+
+\seriouserroronpage{867}{ll.1/2 after exa A-2-17}{HjG}{2004/05/26}{2}
+ \(2 \times 5.3\,\mathrm{pt} + 0.4\,\mathrm{pt} = 11\,\mathrm{pt}
+ \ne 12\,\mathrm{pt}\) so skip should be $5.8\,\mathrm{pt}$.
+
+\seriouserroronpage{868}{Table A4.}{UFi}{2004/05/22}{2}
+ Default value of depth of \verb=\hrule= should be 0.0pt (not 0.4pt).
+
+\seriouserroronpage{871}{para 2, l.2}{UFi}{2004/05/21}{2}
+ ``binary operators (, , , )'' should be typeset
+ ``binary operators (\texttt{+}, \texttt{-}, \texttt{*}, \texttt{/})''.
+
+
+\erroronpage{875/876}{tab. A.5}{FMi}{2004/07/28}{2}
+ Add: ``\TeX{} switches \u{(can only be queried)}'' \\
+ Add: ``\LaTeX{} switches \u{(last two can be set)}'' \\ \qquad (these are
+ |@afterindent| and |@tempswa|)\\
+ Add row:\\
+ |@afterindent| \quad \parbox[t]{7cm}{Switch checked by command
+ |\@afterheading| (usually used in headings) to
+ prevent (if |false|) indentation of next
+ paragraph.}
+
+ Editorial comment: change moves pagebreak.
+
+\seriouserroronpage{878}{codeline 4 (?)}{UFi}{2004/05/22}{2}
+ |\usepackage[german]{varioref}[2001/09/0]:| day number is missing
+ (test for version doesn't work then anymore!)
+
+\erroronpage{886}{fig.~A.1}{HjG}{2004/05/21}{2}
+ Add: \verb=\ProcessOptions= \u{\texttt{\char`\\relax}}
+ (cf. hint on p.~882!)
+
+
+\CHAPTER{Appendix B}
+
+\erroronpage{891}{para 1, l.7}{DHL}{2004/05/16}{2}
+Missing letter: ``\verb=l.167 \par=\u{\texttt{t}}\verb={Text}=''
+
+\seriouserroronpage{892}{para 1, l.-2}{HjG}{2004/05/22}{2}
+ ``\verb=\romen= (lines 1 and~2)''
+ \>
+ ``\verb=\romen= (lines 2 and~3)''
+
+\erroronpage{892}{para -1, ll.2--4}{HOb/FMi}{2004/05/22}{2}
+ Add: ``Technically, a moving argument is an argument
+ that is internally expanded by \LaTeX{} without typesetting it
+ directly\u{ (e.g.}, by using the internal \LaTeX{} construct
+ |\protected@edef|\textsuperscript{1}\u).''
+
+\erroronpage{893}{para 2, l.8}{MHo/FMi}{2004/10/05}{4}
+ Replace:
+ ``On the other hand, |\cong| is fragile\ldots''
+ \>
+ ``On the other hand, |\[...\]| is fragile\ldots''
+
+
+\erroronpage{894}{l.-7}{FMi}{2004/04/23}{2}
+ Add word: \ldots still open) \u{or} will be swallowed\ldots
+
+\erroronpage{896}{item 1}{UFi}{2004/05/23}{2}
+ Not in alphabetical order: move one item down.
+
+\erroronpage{896}{item 4}{UFi}{2004/05/23}{2}
+ Not in alphabetical order: move four items down.
+
+\erroronpage{896}{item -1}{HOb}{2004/05/29}{2}
+ Whether or not the image size can be automatically determined
+ depends on the graphics driver. Last sentence rewritten as follows:\\
+ ``It usually does this automatically, for example, for
+\texttt{.eps} files by reading the bounding box
+information. However, depending on the graphics driver, it may be
+unable to extract this information from binary
+bitmap images such as \texttt{.jpg}, \texttt{.gif}, and \texttt{.png} files.''
+
+\erroronpage{897}{item 5}{UFi}{2004/05/23}{2}
+ Not in alphabetical order: move one item down.
+
+\erroronpage{899}{item 1}{JGr}{2004/06/10}{2}
+ The extra \verb=\or= could result from bad use of \verb=\ifthenelse=
+
+\erroronpage{899}{item 5}{UFi}{2004/05/23}{2}
+ The ``\TeX{} Live CD'' is spelled incorrectly as
+ ``\TeX{} live'' or ``\TeX live''
+
+\erroronpage{901}{item 3}{UFi}{2004/05/23}{2}
+ The ``\TeX{} Live CD'' is spelled incorrectly as
+ ``\TeX{} live'' or ``\TeX live''
+
+\seriouserroronpage{902}{l.5}{HjG}{2004/05/22}{2}
+ Missing letter: ``\texttt{\char`\\dis\u{c}retionary}''
+
+\erroronpage{907}{item 5, l.2}{CKr}{2005/05/30}{4}
+ Add missing word: ``\ldots or \texttt{figure}, \u{is} encountered\ldots''
+
+\erroronpage{907--909}{item 2}{UFi/FMi}{2004/07/31}{2}
+ \TeX{} error message missing: ``\texttt{No room for a new ...}''
+
+ The packages loaded in your document require more internal registers
+(|\count|, |\dimen|, \ldots) than there are available in \TeX. Try
+processing your document with e\TeX{} and additionally load the
+\textsf{etex} package.
+
+ Editorial comment: affects pagebreaks for 908/909 as well.
+
+
+
+\erroronpage{909}{middle}{HjG}{2004/05/22}{2}
+ In the sample output, the lines ``\texttt{<*> samplefile.tex}'' and
+ ``\texttt{? }'' should be indented by the same amount as the first
+ four lines.
+
+\erroronpage{909}{l.-2}{HjG}{2004/05/22}{2}
+ Missing interword space: ``an\u{ }\verb=\addvspace= command''
+
+%%check (that's me)
+\iffalse
+\erroronpage{911}{item 5}{HjG}{2004/05/22}{}
+ ``To the author's knowledge, \ldots''
+ \>
+ ``To the authors' knowledge, \ldots''
+\fi
+
+\erroronpage{913}{item 1}{MKu/FMi}{2004/06/24}{2}
+ Replace: UTF8 \> UTF-8
+
+\erroronpage{913}{item 1}{UFi}{2004/05/23}{2}
+ Not in alphabetical order: move four items down.
+
+\erroronpage{913}{item -3, l.-3/-1}{HjG}{2004/05/22}{2}
+ Replace word: ``\ldots commands \u{and}, if necessary, masking a line
+ break in the source with a \verb=%= sign.''
+
+\erroronpage{914}{l.8}{HjG}{2004/05/22}{2}
+ Missing interword space: ``\verb=\spacefactor=\u{ }only''
+
+\erroronpage{917}{footnote}{HOb}{2004/05/29}{2}
+ Replace footnote with: ``In modern distributions \LaTeX{} is automatically
+ using the e\TeX{} program. On older installations you may have to
+ call a different program (e.g., \texttt{elatex} instead of
+ \texttt{latex}) when processing a
+ document.''
+
+
+\erroronpage{918}{l.-13}{HjG}{2004/05/22}{2}
+ Misplaced comma:\\
+ ``\ldots\ arguments thereby, using up \ldots''
+ \>\\
+ ``\ldots\ arguments, thereby using up \ldots''
+
+\erroronpage{920}{item 2}{UFi}{2004/05/23}{2}
+ Not in alphabetical order: move one item down.
+
+\erroronpage{921}{item -2}{MBr}{2004/08/03}{2}
+ Not in alphabetical order: move item to top.
+
+\erroronpage{923}{item 1}{UFi}{2004/05/23}{2}
+ Not in alphabetical order: move one item down.
+
+\erroronpage{924}{item 2, para 2, l.1}{HjG}{2004/05/22}{2}
+ Typo: ``th\u{r}ough'' \> ``though''
+
+\erroronpage{925}{l.1}{HjG}{2004/05/22}{2}
+ Missing interword space: ``the command\u{ }\verb=\symbol=''
+
+\erroronpage{925}{item -2, l.-2}{HjG}{2004/05/22}{2}
+ Extra word: ``are \u{the} those'' \> ``are those''\\
+ Surplus space: `` register~\u~0'' \> ``register~0''
+
+\erroronpage{925}{item -2}{MBr}{2004/08/03}{2}
+ Not in alphabetical order: move item one up.
+
+\seriouserroronpage{926}{item 4, title}{UFi}{2004/05/23}{2}
+ ``\verb=Overfull \hbox (badness= \meta{number}\texttt)'' should be
+ ``\verb=Overfull \hbox (=\meta{number}\texttt{pt too wide)}''
+
+\erroronpage{926}{item 5, l.1}{HjG}{2004/05/23}{2}
+ Typo: ``built'' \> ``build''
+
+\seriouserroronpage{926}{item 5, title}{UFi}{2004/05/23}{2}
+ ``\verb=Overfull \vbox (badness= \meta{number}\texttt)'' should be
+ ``\verb=Overfull \vbox (=\meta{number}\texttt{pt too wide)}''
+
+\seriouserroronpage{928}{item 6, title}{UFi}{2004/05/23}{2}
+ ``\verb=Tight \hbox='' should be ``\verb=Tight \vbox=''
+
+\erroronpage{930}{item 1, l.1}{HjG}{2004/05/23}{2}
+ Omit paragraph indentation!
+
+\erroronpage{930}{item 4, l.2}{UFi}{2004/05/23}{2}
+ Typo: ``i\u{t}entify'' \> ``identify''
+
+\erroronpage{931}{item 4, l.-1}{HjG}{2004/05/23}{2}
+ Add: ``\ldots\ package \u{or class} in question.''
+
+\erroronpage{931}{item 4}{JGr}{2004/06/10}{2}
+ The warning also happens if you give absolute or relative
+ pathnames like \verb=\documentclass{base/article}=
+
+\erroronpage{931}{item 6}{MBr/FMi}{2004/08/03}{2}
+ Order here is debatable but a ``,'' may not be good for visual
+ sorting, so move this item one up (placeholder are always sorted to
+ top so it doesn't pass ``package-or-class''.
+
+\erroronpage{932}{para 4, l.1}{UFi}{2004/05/23}{2}
+ Typo: ``\u{t}which \> ``which''
+
+\seriouserroronpage{935}{ll.3--5}{HjG}{2004/05/23}{2}
+ The text claims:\\
+ ``The output is slightly different: the name \u{and the type} of a
+ token are not shown by |\meaning|; instead, only its ``meaning'' is
+ presented.''\\
+ However, as example B-3-1 depicts, the type \emph{is} shown; hence,
+ the sentence should be changed to:\\
+ ``The output is slightly different: the name
+ of the token \u{is} not shown by
+ |\meaning|; instead, only \u{its type and} its ``meaning''
+ \u{are} presented.''
+
+\erroronpage{936}{para 1, l.3}{UFi}{2004/05/23}{2}
+ Closing brace should be after ``19'' and not at end of line.
+
+\erroronpage{938}{para -1, l.3}{UFi/FMi}{2004/05/23}{2}
+ Difficult to understand; replace:
+ ``\ldots a large \u{increase in} \texttt{t=} between''
+
+\erroronpage{939}{para 3, l.2}{HjG}{2004/05/23}{2}
+ Words need to be swapped:
+ ``\ldots\ \TeX{} indicates \u{this fact} with \ldots''
+
+\erroronpage{941}{l.19/20}{HjG}{2004/05/24}{2}
+ Add: ``so-called demerits \u{(\texttt{d=})}''
+
+\erroronpage{942}{l.22}{HjG}{2004/05/24}{2}
+ Change: ``several ways to reach \u{\texttt{@@2}};''
+ \> ``several ways to reach \u{\texttt{@@6}};''
+
+\erroronpage{943}{para -1 of \S B.3.3, l.-6}{HjG}{2004/05/24}{2}
+ Typo: ``shinkability'' \> ``shrinkability''
+
+
+
+\CHAPTER{Appendix C}
+
+\erroronpage{general}{several pages}{FMi}{2005/07/01}{4}
+ Appendix was partially rewritten to reflect changes in the layout
+ of the web sites. More importantly: CTAN changed their ftp
+ software and stopped supporting the generation of directory
+ archives on the fly. Instead they now offer precompiled
+ \texttt{zip} files that can be downloaded.
+
+\erroronpage{947}{ll.-2/-1}{HjG}{2004/05/24}{2}
+ Missing word: ``it is best \u{to} access''
+
+\erroronpage{947}{para -1, l.5}{FMi}{2004/06/12}{2}
+ Bug in \texttt{url.sty} generated extra space.
+
+\erroronpage{948}{para -1, l.5}{UFi}{2004/05/23}{2}
+ Show short name: ``\ldots\ \TeX{} Users Group (\u{TUG}, United States)''
+
+\erroronpage{950}{para 1, l.2}{FMi}{2006/09/12}{s}
+ Replace: Figure C.\u{2} \> Figure C.\u{1}
+
+\erroronpage{950}{para 3, l.2}{HjG}{2004/05/24}{2}
+ Typo: ``a site that i\u{s} not too distant''
+
+\seriouserroronpage{953}{l.11}{HjG}{2004/05/24}{2}
+ Replace line: ``\verb=>>>>>>> 1.6='' \>
+ ``\texttt{200-index graphicx}''
+ (probably due to an incomplete merge with CVS)
+
+\erroronpage{954}{para 3, l.1}{HjG}{2005/05/09}{4}
+ ``\TeX live'' \> ``\TeX{} Live''
+
+\erroronpage{955}{para 2, l.4}{HjG}{2005/05/09}{4}
+ Remove surplus word:
+ ``in \u{the} Thomas Esser's \texttt{tetex} distribution''
+
+\erroronpage{955}{para -2, l.-4}{MHe}{2004/05/22}{2}
+ Letters need to be swapped: ``eig\u{ht}eenth''
+
+\erroronpage{956}{cn: entry}{HjG}{2005/05/09}{4}
+ Replace:
+ ``\u{name}: Hong Feng'' \> ``\u{contact}: Hong Feng''
+
+\erroronpage{957}{col. 2, l.15}{TMW}{2004/06/07}{2}
+ This should read ``Lietuvos \TeX'o Vartotoj\k{u} Grup\.{e}''.
+
+\erroronpage{958}{col. 1, l.19}{TMW}{2004/06/07}{2}
+ An acute accent should be added: ``Toru\'n''
+
+
+
+\CHAPTER{Bibliography}
+
+\erroronpage{963}{[1]}{CKr}{2005/06/20}{4}
+ Url changed: \url{https://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF}
+ 2017: url no longer valid; maybe \url{https://www-cdf.fnal.gov/offline/PostScript/T1_SPEC.PDF}
+
+\erroronpage{963}{[2]}{CKr}{2005/06/20}{4}
+ Url changed: \url{https://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf}
+ 2017: url no longer valid; maybe \url{https://www-cdf.fnal.gov/offline/PostScript/5001.PDF}
+
+\erroronpage{963}{[3]}{CKr}{2005/06/20}{4}
+ Url changed:
+ \url{https://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf}
+ 2017: url no longer valid; maybe \url{https://archive.org/details/5002.EPSFSpec}
+
+\erroronpage{964}{[5]}{CKr}{2005/06/20}{4}
+ Url changed:
+ \url{https://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf}
+ 2017: url no longer valid; maybe \url{http://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf}
+
+
+\erroronpage{965}{[17], l.-1}{HjG}{2004/06/18}{2}
+ Delete character: ``in a\u{n} multi-language setting''
+
+\erroronpage{966}{[25]}{HjG}{2004/05/20}{2}
+ First line of online resources is not flush right but centered.
+
+\erroronpage{971}{[74]}{FMi}{2006/09/18}{s}
+ Add ``Lars Hellstr\"om'' as author. Change date to December 2004.
+ Change comment to ``Documentation for
+ the fontinst utility package that supports \ldots''
+
+\erroronpage{973}{[88]}{TSS}{2004/05/26}{2}
+ The bibliography entry for "The Art of Computer Programming" lacks
+ ISBN numbers: 0-201-89683-4, 0-201-03822-6, and 0-201-03803-X.
+
+\erroronpage{973}{[90], l.2}{HjG}{2004/06/07}{2}
+ Words need to be swapped:
+ ``\ldots do not look as \u{beautiful now} as they did in the past.''
+
+\erroronpage{973}{[91]}{HjG}{2004/05/20}{2}
+ First line of online resources is not flush right but centered.
+
+\erroronpage{975}{[107], [109], [110], [111]}{HjG}{2004/06/21}{2}
+ Incomplete URLs:\\
+ \texttt{https://www.latex-project.org\u{/news/latex2e-news/}}\\
+ \texttt{https://www.latex-project.org\u{/help/documentation/fntguide.pdf}}\\
+ \texttt{https://www.latex-project.org\u{/help/documentation/cfgguide.pdf}}\\
+ \texttt{https://www.latex-project.org\u{/lppl/}}
+
+\erroronpage{976}{[117]}{FMi}{2005/11/07}{s}
+ The title is ``E-\TeX: Guidelines for Future \TeX{} Extensions''.
+
+\erroronpage{977}{[124]}{HjG}{2004/05/20}{2}
+ First line of online resources is not flush right but centered.
+
+\erroronpage{977}{[124]}{FMi}{2005/07/09}{4}
+ Link is missing a period:
+ \url{https://www.latex-project.org/publications/tug99}\texttt{\u.pdf}
+
+\erroronpage{978}{[138]}{FMi}{2005/06/25}{4}
+ Now has appeared: 24\#1, pp.~105--114, 2004. URL:
+ \url{https://www.tug.org/TUGboat/Articles/tb24-1/plaice.pdf}
+
+\erroronpage{979}{[143]}{HjG}{2004/05/20}{2}
+ Missing period: Robert M\u. Ritter
+
+\erroronpage{979}{entry 146, l.3}{RWa}{2004/06/01}{2}
+ Missing word: ``for \LaTeX\ \u{and} a possible''
+
+\erroronpage{980}{[151]}{THa}{2004/06/25}{2}
+ Remove: ``\LaTeX\u{Joachim Schrod}.''
+
+\erroronpage{980}{[153]}{THa}{2004/06/25}{2}
+ Swap words: ``often are'' \> ``are often''
+
+\erroronpage{980}{[155]}{THa}{2004/06/25}{2}
+ Missing word: ``For \u{the} \textsf{kuvio} system\ldots''
+
+\erroronpage{980}{[157]}{HjG}{2004/05/20}{2}
+ First line of online resources is not flush right (stray space?).
+
+\erroronpage{981}{[158]-[162]}{RKo}{2005/11/11}{s}
+ Unfortunately Th\`anh's name is misspelled (accents in [161/2]). The correct spelling
+ is ``H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh''.
+
+ Furthermore, the surename is H\`an so the entries should have been sorted
+ under H (something that can't be corrected easily).
+
+\erroronpage{981}{[161]}{CKr}{2005/07/06}{4}
+ Remove surplus name in text: ``User\u{Sebastian Rahtz} manual \ldots''
+
+\erroronpage{981}{[162/3], title}{THa}{2004/06/25}{2}
+ Change: ``Makeindex'' \> ``makeindex''
+
+\erroronpage{982}{[168]}{HjG}{2004/05/20}{2}
+ First line of online resources should be:\\
+ \texttt{https://www.tug.org/TUGboat/Articles/\u{tb11-3/tb29vulis.pdf}}
+
+
+\CHAPTER{Index}
+
+\erroronpage{983--1082}{index}{FMi}{2004/06/11}{}
+ I do not list changes to the index that are results of other errata
+ entries as they are too difficult to track. Instead I will put an
+ updated index on the web at
+ \url{https://www.latex-project.org/help/books/tlc2-ap4.pdf} once in a while.
+
+\erroronpage{general}{}{FMi}{2004/06/08}{2}
+ Editorial comment: the whole index has been reprinted.
+
+\erroronpage{general}{}{FMi}{2005/09/08}{4}
+ Editorial comment: the whole index has been reprinted.
+
+\erroronpage{general}{}{FMi}{2004/06/08}{2}
+ Add index entries into production notes, e.g., for example setup,
+ hanging punctuation, \ldots
+
+\erroronpage{983}{para 1, l.3}{UFi}{2004/05/23}{2}
+ Remove surplus word: ``\ldots one of \u{the} the following''
+
+\seriouserroronpage{983}{para -2}{HjG}{2004/05/20}{2}
+ The text explains the meaning of bold and blue page numbers,
+ but fails to point out the significance of slanted (italic)
+ ones---there is none: blue italic indicates normal example blue bold
+ indicates example and also important info.
+
+\erroronpage{988,1009}{}{CKr}{2004/10/10}{4}
+ Replace: ``alphabetical document headings''
+ \> ``alphabetically numbered document headings''
+
+and
+
+ ``document headings / alphabetical''
+ \>
+ ``document headings / alphabetically numbered''
+
+\erroronpage{990}{}{J-CCh}{2005/07/17}{s}
+ Correct range: author-date citations / history of (699, 700)
+
+\erroronpage{992}{}{J-CCh}{2005/07/17}{s}
+ Correct: ``B\u{\'e}zier''
+
+\erroronpage{993}{}{SEg}{2005/04/26}{4}
+ bibliographies/authors/name,formatting shows 798--1092 but should be
+ just 798
+
+\erroronpage{1000}{}{J-CCh}{2005/07/17}{s}
+ Correct range: Citation systems /
+ author-date /
+ history of (699, 700)
+
+\erroronpage{1007}{}{HjG}{2004/07/12}{2}
+ Add page entry for |\DeclareFontSubstitution|
+ back to 431 (para~2).
+
+
+\erroronpage{1014}{secound col., l.8}{MSc}{2004/06/04}{2}
+ missing index entry for ``eTeX, TeX extension''
+
+\erroronpage{1017}{}{FHa}{2004/10/05}{4}
+ The index entry for "floats / placement control" lists pages 286-983
+ for information. I think that is a bit too much. It should probably
+ end at page 291.
+
+
+\erroronpage{1019}{}{J-CCh}{2005/07/17}{s}
+ Correct range: fonts /
+ oblique (333)
+
+\erroronpage{1020}{}{CKr}{2005/01/09}{4}
+ Replace ``fonts / URW Antigua'' \> ``fonts / URW Anti\u{q}ua''
+
+\erroronpage{1034}{first col.}{FMi}{2004/05/15}{2}
+ Add entry: ``lists / enumerated / user-defined, 151''
+
+\erroronpage{1035}{}{THa}{2004/07/02}{2}
+ ``\textsf{makeindex}'' \> ``\textsl{MakeIndex}''
+
+\erroronpage{1041}{}{FMi}{2004/08/02}{2}
+ ``\texttt{NACRO} \BibTeX{} command'' \>
+ ``\texttt{MACRO} \BibTeX{} command''
+
+\erroronpage{1051}{secound col., l.14}{MSc}{2004/06/04}{2}
+ missing index entries for ``pdftex'' on p.7 and p.643
+
+\erroronpage{1069}{}{FMi}{2004/11/07}{4}
+ Replace: ``text symbols / setting-up'' \>
+ ``\u{math} symbols / setting-up''
+
+
+\erroronpage{1076}{}{CKr}{2005/01/09}{4}
+ Replace ``URW Antigua'' \> ``URW Anti\u{q}ua''
+
+
+\CHAPTER{People}
+
+\erroronpage{1080}{page}{FMi}{2004/07/26}{4}
+ Editorial comment: Needs manual breaking in index output file for
+ second and fourth printing.
+
+\erroronpage{1081}{col 1}{FMi}{2004/06/22}{2}
+ Missing accents: ``Fernandez, Jose Alberto '' \> `Fern\'andez, Jos\'e Alberto''
+
+\erroronpage{1081}{col 1}{HjG}{2004/06/22}{2}
+ Change page number in entry:
+ ``Fukui, Rei, xxvii, 405, \u{969}'' \> ``\ldots, \u{968}''
+
+\erroronpage{1081}{col 1}{LMa}{2004/05/14}{2}
+ The name ``M\o ller Neergaard, Peter'' should be sorted as
+ ``Neergaard, Peter M\o ller''.
+
+\erroronpage{1081}{col 2}{HjG}{2004/06/16}{2}
+ Change page number in entry:
+ ``Hufflen, Jean-Michel, 761, \u{971}'' \> ``\ldots, \u{970}''
+
+\erroronpage{1081}{}{HjG}{2004/07/08}{2}
+ Add page entries for ``Kettler, Howard'' and ``Frutiger, Adrian''
+ to ``People'' index back to 374.
+
+\erroronpage{1082}{}{HjG}{2004/07/08}{2}
+ Add page entry for ``Smith, Ralph'' to ``People'' index back to 376.
+
+
+\erroronpage{1082}{col 1, l.19 }{PPn}{2004/05/25}{2}
+ Replace ``Panday'' with ``Pandey'' (very sorry for the typo).
+
+\erroronpage{1082}{col 1}{FMi}{2004/04/23}{2}
+ Replace ``Wing, Wai'' with ``Wong, Wai'' (very sorry for the typo).
+
+\erroronpage{1082}{col 1}{HjG}{2004/07/13}{2}
+ Change page numbers in entry:
+ ``Mittelbach, Frank, \ldots, 976--\u{978, 980}, \ldots''
+ \> ``\ldots, 976--\u{979}, \ldots''
+
+\erroronpage{1082}{}{HjG}{2004/07/13}{2}
+ Add page entry for ``Rahtz, Sebastian''
+ back to 981 (bib-item [161]).
+
+
+
+
+
+
+\CHAPTER{Biographies}
+
+\erroronpage{1084}{Goossens image}{THa}{2004/06/23}{2}
+ Spurious gray square in upper right corner of framed image of Michel
+ Goossens.
+
+\erroronpage{1085}{para 3, l.6}{MSc}{2004/05/19}{2}
+ Replace ``TeX'' with ``\TeX''.
+
+
+\CHAPTER{Production Notes}
+
+\erroronpage{1089}{para 4, l.4}{FMi}{2004/07/21}{2}
+ Add: ``\ldots this typographical icing \u{(package
+ \textsf{pdfcprot})} was\ldots''
+
+\erroronpage{1089}{l.-5}{HjG}{2004/05/20}{2}
+ Missing period: \ldots files\u. It \ldots
+
+\erroronpage{1090}{para -3, l.-4}{HjG}{2004/05/23}{2}
+ Change/add: ``paragraphs ending \u{with a} single word \u{line}''
+
+\erroronpage{1091}{top}{WAd}{2004/05/08}{2}
+ The series title in the box does not use a real caps and small caps
+ font but a faked one (compare with the front cover where
+ the font \emph{Christiana} designed by Gudrun Zapf-von Hesse is used).
+
+\end{erratalist}
+
+
+\setcounter{collectmore}{3}
+
+\begin{multicols}{3}[Thanks to all who have found errors or
+ omissions. Listed are the people who found an errata entry first.]
+\contributor{AFV}{Alfonso Fernandez-Vazquez}
+\contributor{AHo}{Antti Honkela}
+\contributor{AMa}{Arni Magnusson}
+\contributor{ARi}{Alan Ristow}
+\contributor{BMo}{Brooks Moses}
+\contributor{BeB}{Bernd Burghardt}
+\contributor{CAR}{Chris A. Rowley}
+\contributor{CBC}{Charles B. Cameron}
+\contributor{CBa}{Cristian Battaglia}
+\contributor{CBe}{Claudio Beccari}
+\contributor{CKr}{Claudia Krysztofiak}
+\contributor{DAl}{Daniel Alonso i Alemany}
+\contributor{DAr}{Donald Arseneau}
+\contributor{DCa}{David Carlisle}
+\contributor{DHL}{Dan Luecking}
+\contributor{DIs}{Daniel Isaacson}
+\contributor{DSch}{Dirk Schlimm}
+\contributor{ERy}{Elizabeth Ryan}
+\contributor{FHa}{Ferdy Hanssen}
+\contributor{FMi}{Frank Mittelbach}
+\contributor{GBa}{Gerhard Bachmaier}
+\contributor{HOb}{Heiko Oberdiek}
+\contributor{HPB}{Harold P. Boas}
+\contributor{HVo}{Herbert Voss}
+\contributor{HjG}{Hubert G\"a\ss lein}
+\contributor{J-CCh}{Jean-C\^ome Charpentier}
+\contributor{JAn}{Jacques Andr\'e}
+\contributor{JBez}{Javier Bezos}
+\contributor{JBe}{Jens Berger}
+\contributor{JBr}{Johannes Braams}
+\contributor{JCh}{Joel Chan}
+\contributor{JGr}{Jose Grimm}
+\contributor{JJN}{Jarmo Niemel\"a}
+\contributor{JLV}{Juan Luis Varona}
+\contributor{JMH}{Jean-Michel Hufflen}
+\contributor{JS}{Joachim Schrod}
+\contributor{JTa}{Juhani Takkinen}
+\contributor{LHe}{Lars Hellstr\"om}
+\contributor{LMa}{Lars Madsen}
+\contributor{LSchu}{Lothar Schumacher}
+\contributor{MBr}{Marion Braams}
+\contributor{MGo}{Michel Goossens}
+\contributor{MHCL}{Martin Hiu Chung Law}
+\contributor{MHe}{Martin Hensel}
+\contributor{MHo}{Morten H\o gholm}
+\contributor{MKo}{Markus Kohm}
+\contributor{MKu}{Markus Kuhn}
+\contributor{MLa}{Mark Laplante}
+\contributor{MLi}{Martin Liebmann}
+\contributor{MSc}{Martin Schr\"oder}
+\contributor{MSch}{Michael Schutte}
+\contributor{NBe}{Nelson Beebe}
+\contributor{PPN}{P.P. Narayanaswami}
+\contributor{PYu}{Peng Yu}
+\contributor{RKo}{Reinhard Kotucha}
+\contributor{RPa}{Reimo Palm}
+\contributor{RSt}{Ralf Stubner}
+\contributor{RWa}{Richard Walker}
+\contributor{ReSt}{Rebecca Stiels}
+\contributor{SCo}{Steven Douglas Cochran}
+\contributor{SEg}{Stephen Eglen}
+\contributor{SPe}{Sa\v sa Petrovi\' c}
+\contributor{THa}{Thorsten Hansen}
+\contributor{TMW}{Thomas Widmann}
+\contributor{TMi}{Tom Micevski}
+\contributor{TSS}{Tommi Syrj\"anen}
+\contributor{UFi}{Ulrike Fischer}
+\contributor{UZi}{Uwe Ziegenhagen}
+\contributor{V-Li}{Christian Faulhammer}
+\contributor{VPe}{Vivi Petersen}
+\contributor{VVo}{Vladimir Volovich}
+\contributor{WAd}{William Adams}
+\contributor{WaS}{Walter Schmidt}
+\contributor{YiL}{Yiannis Lazarides}
+\contributor{YvH}{Yvon Henel}
+\contributor{hajk}{Henk Koster}
+\contributor{usw}{Ulrich Dirr}
+\end{multicols}
+
+
+Other people have sent us corrections for errors already found.
+Thanks to all of you!
+
+If you find further errors please report them to one of the authors, e.g.,
+\begin{quote}\ttfamily
+ frank.mittelbach@latex-project.org
+\end{quote}
+preferably in a form usable directly in this file, i.e.,
+\begin{flushleft}
+|\erroronpage{|\textit{page-number}|}{|\textit{line-identification}|}{|%
+ \textit{your-initials}|}{|\textit{date}|}{}| \\
+ \hspace*{2em}\textit{description of the the erratum}
+\end{flushleft}
+Here is an example:
+\begin{verbatim}
+\erroronpage{5}{para 3, l.1}{MOs}{1997/06/01}{}
+ ``LaTeX'' should be typeset ``\LaTeX''.
+\end{verbatim}
+
+\end{document}
+
+
diff --git a/macros/latex-dev/base/tlc2.pdf b/macros/latex-dev/base/tlc2.pdf
new file mode 100644
index 0000000000..c79d0723d3
--- /dev/null
+++ b/macros/latex-dev/base/tlc2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/tulm.fdd b/macros/latex-dev/base/tulm.fdd
new file mode 100644
index 0000000000..a5a212c6e1
--- /dev/null
+++ b/macros/latex-dev/base/tulm.fdd
@@ -0,0 +1,330 @@
+% \iffalse meta-comment
+%
+% Copyright 2016-2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+%\iffalse This is a META comment
+%
+% File `cmfonts.fdd'.
+% Copyright (C) 2016-2017 LaTeX3 Project
+%
+%
+%<TUlmr>\ProvidesFile{tulmr.fd}
+%<TUlmss>\ProvidesFile{tulmss.fd}
+%<TUlmssq>\ProvidesFile{tulmssq.fd}
+%<TUlmtt>\ProvidesFile{tulmtt.fd}
+%<TUlmvtt>\ProvidesFile{tulmvtt.fd}
+%<TUlmdh>\ProvidesFile{tulmdh.fd}
+%<*driver>
+ \ProvidesFile{tulm.drv}
+%</driver>
+ [2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{tulm.drv}
+\providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
+\title{The file \texttt{tulm.fdd} for use with
+ \LaTeXe.\thanks{This file has version
+ number \fileversion, dated \filedate.}}
+\date{\filedate}\author{LaTeX3 Project}
+\addtolength\textwidth{30pt}
+\begin{document}
+\MaintainedByLaTeXTeam{latex}
+\maketitle
+ \DocInput{tulm.fdd}
+\end{document}
+%</driver>
+%
+%\fi
+%
+% \section{TUlmr}
+% \begin{macrocode}
+%<*TUlmr>
+\DeclareFontFamily{TU}{lmr}{}
+\DeclareFontShape{TU}{lmr}{m}{n}%
+ {<-5.5> \UnicodeFontFile{lmroman5-regular}{\UnicodeFontTeXLigatures}
+ <5.5-6.5> \UnicodeFontFile{lmroman6-regular}{\UnicodeFontTeXLigatures}
+ <6.5-7.5> \UnicodeFontFile{lmroman7-regular}{\UnicodeFontTeXLigatures}
+ <7.5-8.5> \UnicodeFontFile{lmroman8-regular}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmroman9-regular}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}
+ <11-15> \UnicodeFontFile{lmroman12-regular}{\UnicodeFontTeXLigatures}
+ <15-> \UnicodeFontFile{lmroman17-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{m}{sl}%
+ {<-8.5> \UnicodeFontFile{lmromanslant8-regular}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmromanslant9-regular}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmromanslant10-regular}{\UnicodeFontTeXLigatures}
+ <11-15> \UnicodeFontFile{lmromanslant12-regular}{\UnicodeFontTeXLigatures}
+ <15-> \UnicodeFontFile{lmromanslant17-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{m}{it}%
+ {<-7.5> \UnicodeFontFile{lmroman7-italic}{\UnicodeFontTeXLigatures}
+ <7.5-8.5> \UnicodeFontFile{lmroman8-italic}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmroman9-italic}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}
+ <11-> \UnicodeFontFile{lmroman12-italic}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{m}{sc}%
+ {<-> \UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{m}{ui}%
+ {<-> ec-lmu10}{}
+\DeclareFontShape{TU}{lmr}{m}{scsl}%
+ {<-> \UnicodeFontFile{lmromancaps10-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{b}{n}
+ {<-> \UnicodeFontFile{lmromandemi10-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{b}{sl}
+ {<-> \UnicodeFontFile{lmromandemi10-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{bx}{n}
+ {<-5.5> \UnicodeFontFile{lmroman5-bold}{\UnicodeFontTeXLigatures}
+ <5.5-6.5> \UnicodeFontFile{lmroman6-bold}{\UnicodeFontTeXLigatures}
+ <6.5-7.5> \UnicodeFontFile{lmroman7-bold}{\UnicodeFontTeXLigatures}
+ <7.5-8.5> \UnicodeFontFile{lmroman8-bold}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmroman9-bold}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}
+ <11-> \UnicodeFontFile{lmroman12-bold}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{bx}{it}
+ {<-> \UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{bx}{sl}
+ {<-> \UnicodeFontFile{lmromanslant10-bold}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{b}{it}
+ {<->sub * lmr/b/sl}{}
+%</TUlmr>
+% \end{macrocode}
+%
+% \section{TUlmss}
+% \begin{macrocode}
+%<*TUlmss>
+\DeclareFontFamily{TU}{lmss}{}
+\DeclareFontShape{TU}{lmss}{m}{n}
+ {<-8.5> \UnicodeFontFile{lmsans8-regular}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmsans9-regular}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmsans10-regular}{\UnicodeFontTeXLigatures}
+ <11-15.5> \UnicodeFontFile{lmsans12-regular}{\UnicodeFontTeXLigatures}
+ <15.5-> \UnicodeFontFile{lmsans17-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmss}{m}{it}
+ {<->ssub*lmss/m/sl}{}
+\DeclareFontShape{TU}{lmss}{m}{sl}
+ {<-8.5> \UnicodeFontFile{lmsans8-oblique}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmsans9-oblique}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmsans10-oblique}{\UnicodeFontTeXLigatures}
+ <11-15.5> \UnicodeFontFile{lmsans12-oblique}{\UnicodeFontTeXLigatures}
+ <15.5-> \UnicodeFontFile{lmsans17-oblique}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmss}{m}{sc}
+ {<->sub*lmr/m/sc}{}
+\DeclareFontShape{TU}{lmss}{b}{n}
+ {<->ssub * lmss/bx/n}{}
+\DeclareFontShape{TU}{lmss}{b}{sl}
+ {<->ssub * lmss/bx/sl}{}
+\DeclareFontShape{TU}{lmss}{b}{it}
+ {<->ssub * lmss/bx/it}{}
+\DeclareFontShape{TU}{lmss}{sbc}{n}
+ {<-> \UnicodeFontFile{lmsansdemicond10-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{sbc}{sl}
+ {<-> \UnicodeFontFile{lmsansdemicond10-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{sbc}{it}
+ {<->ssub*lmss/sbc/sl}{}
+\DeclareFontShape{TU}{lmss}{bx}{n}
+ {<-> \UnicodeFontFile{lmsans10-bold}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{bx}{sl}
+ {<-> \UnicodeFontFile{lmsans10-boldoblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{bx}{it}
+ {<->ssub*lmss/bx/sl}{}
+%</TUlmss>
+% \end{macrocode}
+%
+% \section{TUlmssq}
+% \begin{macrocode}
+%<*TUlmssq>
+\DeclareFontFamily{TU}{lmssq}{}
+\DeclareFontShape{TU}{lmssq}{m}{n}
+ {<-> \UnicodeFontFile{lmsansquot8-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmssq}{m}{sl}
+ {<-> \UnicodeFontFile{lmsansquot8-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmssq}{bx}{n}
+ {<-> \UnicodeFontFile{lmsansquot8-bold}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmssq}{bx}{sl}
+ {<-> \UnicodeFontFile{lmsansquot8-boldoblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmssq}{m}{it}
+ {<->ssub*lmssq/m/sl}{}
+\DeclareFontShape{TU}{lmssq}{bx}{it}
+ {<->ssub*lmssq/bx/sl}{}
+\DeclareFontShape{TU}{lmssq}{b}{n}
+ {<->ssub * lmssq/bx/n}{}
+\DeclareFontShape{TU}{lmssq}{b}{sl}
+ {<->ssub * lmssq/bx/sl}{}
+\DeclareFontShape{TU}{lmssq}{b}{it}
+ {<->ssub * lmssq/bx/it}{}
+%</TUlmssq>
+% \end{macrocode}
+%
+% \section{TUlmtt}
+% \begin{macrocode}
+%<*TUlmtt>
+\DeclareFontFamily{TU}{lmtt}{%
+\hyphenchar \font\m@ne
+\fontdimen3\font\z@
+\fontdimen4\font\z@
+}
+\ifx\lmtt@use@light@as@normal\@empty
+\DeclareFontShape{TU}{lmtt}{sb}{n}
+ {<-8.5> \UnicodeFontFile{lmmono8-regular}{}
+ <8.5-9.5> \UnicodeFontFile{lmmono9-regular}{}
+ <9.5-11> \UnicodeFontFile{lmmono10-regular}{}
+ <11-> \UnicodeFontFile{lmmono12-regular}{}
+ }{}
+\DeclareFontShape{TU}{lmtt}{sb}{it}
+ {<-> \UnicodeFontFile{lmmono10-italic}{}}{}
+\DeclareFontShape{TU}{lmtt}{sb}{sl}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{sb}{sc}
+ {<-> \UnicodeFontFile{lmmonocaps10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{sb}{scsl}
+ {<-> \UnicodeFontFile{lmmonocaps10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{n}
+ {<-> \UnicodeFontFile{lmmonolt10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{it}
+ {<->sub*lmtt/l/sl}{}
+\DeclareFontShape{TU}{lmtt}{m}{sl}
+ {<-> \UnicodeFontFile{lmmonolt10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{c}{n}
+ {<-> \UnicodeFontFile{lmmonoltcond10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{c}{it}
+ {<->sub*lmtt/lc/sl}{}
+\DeclareFontShape{TU}{lmtt}{c}{sl}
+ {<-> \UnicodeFontFile{lmmonoltcond10-oblique}{}}{}
+\else
+\DeclareFontShape{TU}{lmtt}{m}{n}
+ {<-8.5> \UnicodeFontFile{lmmono8-regular}{}
+ <8.5-9.5> \UnicodeFontFile{lmmono9-regular}{}
+ <9.5-11> \UnicodeFontFile{lmmono10-regular}{}
+ <11-> \UnicodeFontFile{lmmono12-regular}{}
+ }{}
+\DeclareFontShape{TU}{lmtt}{m}{it}
+ {<-> \UnicodeFontFile{lmmono10-italic}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{sl}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{sc}
+ {<-> \UnicodeFontFile{lmmonocaps10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{scsl}
+ {<-> \UnicodeFontFile{lmmonocaps10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{l}{n}
+ {<-> \UnicodeFontFile{lmmonolt10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{l}{it}
+ {<->sub*lmtt/l/sl}{}
+\DeclareFontShape{TU}{lmtt}{l}{sl}
+ {<-> \UnicodeFontFile{lmmonolt10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{lc}{n}
+ {<-> \UnicodeFontFile{lmmonoltcond10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{lc}{it}
+ {<->sub*lmtt/lc/sl}{}
+\DeclareFontShape{TU}{lmtt}{lc}{sl}
+ {<-> \UnicodeFontFile{lmmonoltcond10-oblique}{}}{}
+\fi
+\DeclareFontShape{TU}{lmtt}{b}{n}
+ {<-> \UnicodeFontFile{lmmonolt10-bold}{}}{}
+\DeclareFontShape{TU}{lmtt}{b}{it}
+ {<->sub*lmtt/b/sl}{}
+\DeclareFontShape{TU}{lmtt}{b}{sl}
+{<-> \UnicodeFontFile{lmmonolt10-boldoblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{bx}{it}
+ {<->sub*lmtt/b/sl}{}
+\DeclareFontShape{TU}{lmtt}{bx}{n}
+ {<->ssub*lmtt/b/n}{}
+\DeclareFontShape{TU}{lmtt}{bx}{sl}
+ {<->ssub*lmtt/b/sl}{}
+%</TUlmtt>
+% \end{macrocode}
+%
+% \section{TUlmvtt}
+% \begin{macrocode}
+%<*TUlmvtt>
+\DeclareFontFamily{TU}{lmvtt}{}
+\ifx\lmtt@use@light@as@normal\@empty
+\DeclareFontShape{TU}{lmvtt}{sb}{n}
+ {<->\UnicodeFontFile{lmmonoprop10-regular}{}}{}
+\DeclareFontShape{TU}{lmvtt}{sb}{sl}
+ {<->\UnicodeFontFile{lmmonoprop10-oblique}{}}{}
+\DeclareFontShape{TU}{lmvtt}{sb}{it}
+ {<->sub*lmvtt/m/sl}{}
+\DeclareFontShape{TU}{lmvtt}{m}{n}
+ {<->\UnicodeFontFile{lmmonoproplt10-regular}{}}{}
+\DeclareFontShape{TU}{lmvtt}{m}{sl}
+ {<->\UnicodeFontFile{lmmonoproplt10-oblique}{}}{}
+\DeclareFontShape{TU}{lmvtt}{m}{it}
+ {<->sub*lmvtt/l/sl}{}
+\else
+\DeclareFontShape{TU}{lmvtt}{m}{n}
+ {<->\UnicodeFontFile{lmmonoprop10-regular}{}}{}
+\DeclareFontShape{TU}{lmvtt}{m}{sl}
+ {<->\UnicodeFontFile{lmmonoprop10-oblique}{}}{}
+\DeclareFontShape{TU}{lmvtt}{m}{it}
+ {<->sub*lmvtt/m/sl}{}
+\DeclareFontShape{TU}{lmvtt}{l}{n}
+ {<->\UnicodeFontFile{lmmonoproplt10-regular}{}}{}
+\DeclareFontShape{TU}{lmvtt}{l}{sl}
+ {<->\UnicodeFontFile{lmmonoproplt10-oblique}{}}{}
+\DeclareFontShape{TU}{lmvtt}{l}{it}
+ {<->sub*lmvtt/l/sl}{}
+\fi
+\DeclareFontShape{TU}{lmvtt}{b}{n}
+ {<->\UnicodeFontFile{lmmonoproplt10-bold}{}}{}
+\DeclareFontShape{TU}{lmvtt}{b}{sl}
+ {<->\UnicodeFontFile{lmmonoproplt10-boldoblique}{}}{}
+\DeclareFontShape{TU}{lmvtt}{b}{it}
+ {<->sub*lmvtt/b/sl}{}
+\DeclareFontShape{TU}{lmvtt}{bx}{n}
+ {<->ssub*lmvtt/b/n}{}
+\DeclareFontShape{TU}{lmvtt}{bx}{sl}
+ {<->ssub*lmvtt/b/sl}{}
+\DeclareFontShape{TU}{lmvtt}{bx}{it}
+ {<->sub*lmvtt/b/sl}{}
+%</TUlmvtt>
+% \end{macrocode}
+%
+% \section{TUlmdh}
+% \begin{macrocode}
+%<*TUlmdh>
+\DeclareFontFamily{TU}{lmdh}{}%
+\DeclareFontShape{TU}{lmdh}{m}{n}
+ {<-> \UnicodeFontFile{lmromandunh10-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmdh}{m}{sl}
+ {<-> \UnicodeFontFile{lmromandunh10-oblique}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmdh}{m}{it}
+ {<->sub*lmdh/m/sl}{}
+%</TUlmdh>
+% \end{macrocode}
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/base/tulm.ins b/macros/latex-dev/base/tulm.ins
new file mode 100644
index 0000000000..1a48c866b4
--- /dev/null
+++ b/macros/latex-dev/base/tulm.ins
@@ -0,0 +1,113 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 2016-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3b
+%% 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.3b or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+
+\preamble
+
+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.html
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright 2016-2017
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the LaTeX base system.
+--------------------------------------------------------------
+
+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
+base system. You may however distribute the LaTeX base system without
+such generated files.
+
+The list of all files belonging to the LaTeX base distribution is
+given in the file `manifest.txt'. See also `legal.txt' for additional
+information.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, a modified version of this file under its original name
+should not be distributed as part of a standard LaTeX distribution, as
+the modification will be nontransparent for the user of that
+distribution (and thus violating clause 6a of the LPPL license),
+making successful document exchange impossible.
+
+\endpreamble
+
+
+\keepsilent
+\usedir{tex/latex/base}
+
+\generate{\file{tulmss.fd}{\from{tulm.fdd}{TUlmss}}
+ \file{tulmssq.fd}{\from{tulm.fdd}{TUlmssq}}
+ \file{tulmr.fd}{\from{tulm.fdd}{TUlmr}}
+ \file{tulmtt.fd}{\from{tulm.fdd}{TUlmtt}}
+ \file{tulmvtt.fd}{\from{tulm.fdd}{TUlmvtt}}
+ \file{tulmdh.fd}{\from{tulm.fdd}{TUlmdh}}}
+
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.fd}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* `.fdd' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endbatchfile
+
diff --git a/macros/latex-dev/base/tulm.pdf b/macros/latex-dev/base/tulm.pdf
new file mode 100644
index 0000000000..2e0609184b
--- /dev/null
+++ b/macros/latex-dev/base/tulm.pdf
Binary files differ
diff --git a/macros/latex-dev/base/unpack.ins b/macros/latex-dev/base/unpack.ins
new file mode 100644
index 0000000000..969028edfe
--- /dev/null
+++ b/macros/latex-dev/base/unpack.ins
@@ -0,0 +1,135 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1993-2017
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the LaTeX base system.
+%% -------------------------------------------
+%%
+%% 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 has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%%
+%%
+%%
+%% --------------- start of bootstrap commands ------------------
+%%
+%%
+%% LaTeX 2e installation script (concurrent version)
+\let\documentclass\undefined
+\input ltdirchk.dtx
+\input docstrip.dtx
+
+{
+\def\ProvidesFile#1\end#2{}
+\@@input ltvers.dtx
+\Msg{**********************************************}
+\Msg{*}
+\Msg{* Welcome to the Installation routine of}
+\Msg{*}
+\Msg{* \space\space\space\space\fmtname\space <\fmtversion>}
+\Msg{*}
+\Msg{* Depending on your machine the installation}
+\Msg{* might take a long time --- this is the}
+\Msg{* price for being able to run on all platforms.}
+\Msg{* So please be patient :-)}
+\Msg{*}
+\Msg{**********************************************}
+\Msg{}
+\Msg{}
+}
+
+
+%\askonceonly
+\askforoverwritefalse
+
+\keepsilent
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% generate main kernel file
+%%% and the .ltx files that set up the default settings
+%%% that may be changed by the use of .cfg files.
+
+\batchinput{format.ins}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% generate .def files for encoding support
+
+\batchinput{inputenc.ins}
+\batchinput{ltoutenc.ins}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% other classes and packages
+
+\batchinput{classes.ins}
+
+\batchinput{letter.ins}
+
+\batchinput{slides.ins}
+
+\batchinput{proc.ins}
+
+\batchinput{latexsym.ins}
+
+\batchinput{cmfonts.ins}
+
+\batchinput{tulm.ins}
+
+\batchinput{ec.ins}
+
+\batchinput{latex209.ins}
+
+\batchinput{docstrip.ins}
+
+\batchinput{ifthen.ins}
+
+\batchinput{graphpap.ins}
+
+\batchinput{makeindx.ins}
+
+\batchinput{syntonly.ins}
+
+\batchinput{exscale.ins}
+
+\batchinput{alltt.ins}
+
+\batchinput{nfssfont.ins}
+
+\batchinput{fix-cm.ins}
+
+\batchinput{latexrelease.ins}
+
+
+\Msg{}
+\Msg{*********************************************}
+\Msg{*}
+\Msg{* Now run initex to generate the format file}
+\Msg{*}
+\Msg{*********************************************}
+\Msg{}
+
+\endbatchfile
diff --git a/macros/latex-dev/base/utf8ienc.dtx b/macros/latex-dev/base/utf8ienc.dtx
new file mode 100644
index 0000000000..d6c8f82f40
--- /dev/null
+++ b/macros/latex-dev/base/utf8ienc.dtx
@@ -0,0 +1,2264 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% 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 has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[latin1,utf8]{inputenc}% force utf8 to be re-loaded, to get version info
+\GetFileInfo{utf8.def}
+\title{Providing some UTF-8 support via \texttt{inputenc}}
+\date{\fileversion\space\filedate{} printed \today}
+ \author{%
+ David Carlisle \and Frank Mittelbach \and
+ Chris Rowley\thanks{Borrowing heavily from tables by Sebastian Rahtz; some table
+ and code cleanup by Javier Bezos}}
+\begin{document}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \tableofcontents
+ \DocInput{utf8ienc.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \newpage
+%
+% \section{Introduction}
+%
+%
+% \subsection{Background and general stuff}
+%
+% For many reasons what this package provides is a long way from any
+% type of `Unicode compliance'.
+%
+% In stark contrast to 8-bit character sets, with 16 or more bits it can
+% easily be very inefficient to support the full range.\footnote{In
+% fact, \LaTeX's current 8-bit support does not go so far as to make
+% all 8-bit characters into valid input.} Moreover, useful support of
+% character input by a typesetting system overwhelmingly means finding
+% an acceptable visual representation of a sequence of characters and
+% this, for \LaTeX{}, means having available a suitably encoded 8-bit
+% font.
+%
+% Unfortunately it is not possible to predict exactly what valid UTF-8
+% octet sequences will appear in a particular file so it is best to
+% make all the unsupported but valid sequences produce a reasonably
+% clear and noticeable error message.
+%
+% There are two directions from which to approach the question of what
+% to load. One is to specify the ranges of Unicode characters that will
+% result in some sensible typesetting; this requires the provider to
+% ensure that suitable fonts are loaded and that these input characters
+% generate the correct typesetting via the encodings of those fonts. The
+% other is to inspect the font encodings to be used and use these to
+% define which input Unicode characters should be supported.
+%
+% For Western European languages, at least, going in either direction
+% leads to many straightforward decisions and a few that are more
+% subjective. In both cases some of the specifications are \TeX{}
+% specific whilst most are independent of the particular typesetting
+% software in use.
+%
+% As we have argued elsewhere, \LaTeX{} needs to refer to characters via
+% `seven-bit-text' names and, so far, these have been chosen by
+% reference to historical sources such as Plain \TeX{} or Adobe encoding
+% descriptions. It is unclear whether this ad hoc naming structure should
+% simply be extended or whether it would be useful to
+% supplement it with standardised internal Unicode character names such as
+% one or more of the following:\footnote{Burkhard und Holger Mittelbach
+% spielen mit mir! Sie haben etwas hier geschrieben.}
+%
+% \begin{verbatim}
+% \ltxutwochar <4 hex digits>
+%
+% \ltxuchar {<hex digits>}
+% B H U R R R
+%
+% \ltxueightchartwo <2 utf8 octets as 8-bit char tokens>
+% \ltxueightcharthree <3 utf8 octets ...>
+% \ltxueightcharfour <4 utf8 octets ...>
+% \end{verbatim}
+%
+%
+% \subsection{More specific stuff}
+%
+% In addition to setting up the mechanism for reading UTF-8 characters
+% and specifying the \LaTeX-level support available, this package
+% contains support for some default historically expected \TeX-related
+% characters and some example `Unicode definition files' for standard
+% font encodings.
+%
+%
+% \subsection{Notes}
+%
+% This package does not support Unicode combining characters as \TeX{}
+% is not really equipped to make this possible.
+%
+% No attempt is made to be useful beyond Latin, and maybe Cyrillic,
+% for European languages (as of now).
+%
+%
+% \subsection{Basic operation of the code}
+%
+% The \texttt{inputenc} package makes the upper 8-bit characters active and
+% assigns to all of them an error message. It then waits for the
+% input encoding files to change this set-up. Similarly, whenever
+% |\inputencoding| is encountered in a document, first the upper
+% 8-bit characters are set back to produce an error and then the
+% definitions for the new input encoding are loaded, changing some of the
+% previous settings.
+%
+% The 8-bit input encodings currently supported by \texttt{inputenc}
+% all use declarations such as |\DeclareInputText| and the like to map an
+% 8-bit number to some \LaTeX{} internal form, e.g.~to |\"a|.
+%
+% The situation when supporting UTF-8 as the input encoding is
+% different, however. Here we only have to set up the actions of
+% those 8-bit numbers that can be the first octet in a UTF-8
+% representation of a Unicode character. But we cannot simply set
+% this to some internal \LaTeX{} form since the Unicode character
+% consists of more than one octet; instead we have to define this
+% starting octet to parse the right number of further octets that
+% together form the UTF-8 representation of some Unicode character.
+%
+% Therefore when switching to \texttt{utf8} within the
+% \texttt{inputenc} framework the characters with numbers (hex)
+% from \texttt{"C2} to \texttt{"DF} are defined to parse for a
+% second octet following, the characters from \texttt{"E0} to
+% \texttt{"EF} are defined to parse for two more octets and finally
+% the characters from \texttt{"F0} to \texttt{"F3} are defined to
+% parse for three additional octets. These additional octets are
+% always in the range \texttt{"80} to \texttt{"B9}.
+%
+% Thus, when such a character is encountered in the document (so
+% long as expansion is not prohibited) a defined number of
+% additional octets (8-bit characters) are read and from them a
+% unique control sequence name is immediately constructed.
+%
+% This control sequence is either defined (good) or undefined
+% (likely); in the latter case the user gets an error message
+% saying that this UTF-8 sequence (or, better, Unicode character)
+% is not supported.
+%
+% If the control sequence is set up to do something useful then it will
+% expand to a \LaTeX{} internal form: e.g.~for the utf8 sequence of
+% two octets \texttt{"C3 "A4} we get |\"a| as the
+% internal form which then, depending on the font encoding,
+% eventually resolves to the single glyph `latin-a-umlaut' or to
+% the composite glyph `latin-a with an umlaut accent'.
+%
+% These mappings from (UTF-8 encoded) Unicode characters to \LaTeX{}
+% internal forms are made indirectly. The code below provides a
+% declaration |\DeclareUnicodeCharacter| which maps Unicode numbers
+% (as hexadecimal) to \LaTeX{} internal forms.
+%
+% This mapping needs to be set up only once so it is done at
+% |\begin{document}| by looking at the list of font encodings that
+% are loaded by the document and providing mappings related to
+% those font encodings whenever these are available. Thus at most
+% only those Unicode characters that can be represented by the glyphs
+% available in these encodings will be defined.
+%
+% Technically this is done by loading one file per encoding,
+% if available, that is supposed to provide the necessary mapping
+% information.
+%
+%
+% \StopEventually{}
+%
+%
+%
+%
+% \section{Coding}
+%
+% \subsection{Housekeeping}
+%
+% The usual introductory bits and pieces:
+%
+% \begin{macrocode}
+%<utf8>\ProvidesFile{utf8.def}
+%<test>\ProvidesFile{utf8-test.tex}
+%<+lcy> \ProvidesFile{lcyenc.dfu}
+%<+ly1> \ProvidesFile{ly1enc.dfu}
+%<+oms> \ProvidesFile{omsenc.dfu}
+%<+ot1> \ProvidesFile{ot1enc.dfu}
+%<+ot2> \ProvidesFile{ot2enc.dfu}
+%<+t1> \ProvidesFile{t1enc.dfu}
+%<+t2a> \ProvidesFile{t2aenc.dfu}
+%<+t2b> \ProvidesFile{t2benc.dfu}
+%<+t2c> \ProvidesFile{t2cenc.dfu}
+%<+ts1> \ProvidesFile{ts1enc.dfu}
+%<+x2> \ProvidesFile{x2enc.dfu}
+%<+all> \ProvidesFile{utf8enc.dfu}
+%<-utf8-2018> [2019/07/11 v1.2j UTF-8 support for inputenc]
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*utf8>
+% \end{macrocode}
+% This is a temporary fix for the e-p\TeX{} / e-up\TeX{} engines that do not yet
+% have a |\ifincsname| primitive. Once this is available the the extra file will
+% be dropped.
+% \changes{v1.2h}{2019/07/09}{Temp rollback fix for e-pTeX}
+% \begin{macrocode}
+\ifx\ifincsname\@undefined % old e-pTeX or e-upTeX engines
+ \input utf8-2018.def
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+ \endinput
+% \end{macrocode}
+%
+% \begin{macrocode}
+\makeatletter
+% \end{macrocode}
+% We restore the |\catcode| of space (which is set to ignore in
+% \texttt{inputenc}) while reading \texttt{.def} files. Otherwise
+% we would need to explicitly use |\space| all over the place in
+% error and log messages.
+% \changes{v1.1d}{2004/05/08}{Explicitly set catcode of space}
+% \begin{macrocode}
+\catcode`\ \saved@space@catcode
+% \end{macrocode}
+%
+%
+%
+% \subsection{Parsing UTF-8 input}
+%
+% A UTF-8 char (that is not actually a 7-bit char, i.e.~a single
+% octet) is parsed as follows: each starting octet is an active
+% \TeX{} character token; each of these is defined below to be a
+% macro with one to three arguments nominally (depending on the
+% starting octet). It calls one of |\UTFviii@two@octets|,
+% |\UTFviii@three@octets|, or |\UTFviii@four@octets| which then
+% actually picks up the remaining octets as the argument(s).
+%
+% \begin{itemize}
+% \item When typesetting we pick up the necessary number of additional
+% octets, check if they form a command that \LaTeX{} knows about
+% (via \cs{csname} \texttt{u8:}\cs{string}
+% \verb=#1=\cs{string} \verb=#2...=\cs{endcsname}) and if so use that
+% for typesetting. \cs{string} is needed as the octets may (all?) be
+% active and we want the literal values in the name.
+%
+% \item If the UTF-8 character is going to be part of a label, then it is
+% essentially becoming part of some csname and with the
+% test \cs{ifincsname} we can find this out. If so, we render the whole
+% sequence off octets harmless by using \cs{string} too when the
+% starting octet executes (\cs{UTF@...@octets@string}).
+%
+% \item Another possible case is that \cs{protect} has \emph{not} the meaning
+% of \cs{typeset@protect}. In that case we may do a \cs{write} or we may do
+% a \cs{protected@edef} or \ldots{} In all such cases we want to keep the
+% sequence of octets unchanged, but we can't use \cs{string} this time, since at
+% least in the case of \cs{protect@edef} the result may later be
+% typeset after all (in fact that is quite likely) and so at that
+% point the starting octet needs to be an active character again
+% (the others could be stringified). So for this case we use \cs{noexpand}
+% ((\cs{UTF@...s@octets@noexpand}).
+% \end{itemize}
+%
+% \begin{macro}{\UTFviii@two@octets}
+% \changes{v1.2a}{2018/03/24}{Macros made `\cs{long} for improved error messages}%
+% Putting that all together the code for a start octet of a two
+% byte sequence would then look like this:
+% \begin{macrocode}
+\long\def\UTFviii@two@octets{%
+ \ifincsname
+ \expandafter \UTF@two@octets@string
+ \else
+ \ifx \protect\@typeset@protect \else
+ \expandafter\expandafter\expandafter \UTF@two@octets@noexpand
+ \fi
+ \fi
+ \UTFviii@two@octets@combine
+}
+% \end{macrocode}
+
+% \cs{ifcsname} is tested first because that can be true even if we
+% are otherwise doing typesetting. If this is the case we use
+% \cs{string} on the whole octet
+% sequence. \cs{UTF@two@octets@string} not only does this but also
+% gets rid of the command \cs{UTFviii@two@octets@combine} in the input
+% stream by picking it up as a first argument and dropping it.
+%
+% If this is not the case and we are doing typesetting (i.e.,
+% \cs{protect} is \cs{typeset@protect}), then we execute
+% \cs{UTFviii@two@octets@combine} which picks up all octets and typesets
+% the character (or generates an error if it doesn't know how to
+% typeset it).
+%
+% However, if we are not doing typesetting, then we execute the
+% command \cs{UTFviii@two@octets@noexpand} which works like
+% \cs{UTF@two@octets@string} but uses \cs{noexpand} instead of
+% \cs{string}. This way the sequence is temporay rendered harmless,
+% e.g., would display as is or stays put inside a
+% \cs{protected@edef}. But if the result is later reused the
+% starting octet is still active and so will be able to construct
+% the UTF-8 character again.
+% \end{macro}
+%
+%
+% \begin{macro}{\UTFviii@three@octets}
+% \changes{v1.2a}{2018/03/24}{Macros made `\cs{long} for improved error messages}%
+% \begin{macro}{\UTFviii@four@octets}
+% \changes{v1.2a}{2018/03/24}{Macros made `\cs{long} for improved
+% error messages}
+% The definitions for the other starting octets
+% are the same except that they pick up more octets after them.
+% \begin{macrocode}
+\long\def\UTFviii@three@octets{%
+ \ifincsname
+ \expandafter \UTF@three@octets@string
+ \else
+ \ifx \protect\@typeset@protect \else
+ \expandafter\expandafter\expandafter \UTF@three@octets@noexpand
+ \fi
+ \fi
+ \UTFviii@three@octets@combine
+}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\UTFviii@four@octets{%
+ \ifincsname
+ \expandafter \UTF@four@octets@string
+ \else
+ \ifx \protect\@typeset@protect \else
+ \expandafter\expandafter\expandafter \UTF@four@octets@noexpand
+ \fi
+ \fi
+ \UTFviii@four@octets@combine
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\UTFviii@two@octets@noexpand}
+% \begin{macro}{\UTFviii@three@octets@noexpand}
+% \begin{macro}{\UTFviii@four@octets@noexpand}
+% These tempoarily prevent the active chars from expanding.
+% \begin{macrocode}
+\long\def\UTF@two@octets@noexpand#1#2{\noexpand#2\noexpand}
+\long\def\UTF@three@octets@noexpand#1#2#3{\noexpand#2\noexpand#3\noexpand}
+\long\def\UTF@four@octets@noexpand#1#2#3#4{\noexpand#2\noexpand#3\noexpand#4\noexpand}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\UTFviii@two@octets@string}
+% \begin{macro}{\UTFviii@three@octets@string}
+% \begin{macro}{\UTFviii@four@octets@string}
+% And the same with \cs{string} for use in \cs{csname} constructions.
+% \begin{macrocode}
+\long\def\UTF@two@octets@string#1#2{\string#2\string}
+\long\def\UTF@three@octets@string#1#2#3{\string#2\string#3\string}
+\long\def\UTF@four@octets@string#1#2#3#4{\string#2\string#3\string#4\string}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+
+
+% \begin{macro}{\UTFviii@two@octets@combine}
+% \begin{macro}{\UTFviii@three@octets@combine}
+% \begin{macro}{\UTFviii@four@octets@combine}
+% From the arguments a control sequence with a name of the form
+% \verb=u8:#1#2...= is constructed where the |#i| ($i>1$) are the
+% arguments and |#1| is the starting octet (as a \TeX{} active character
+% token). Since some or even all of these characters are active
+% we need to use |\string| when building
+% the \cs{csname}.
+%
+% The \cs{csname} thus constructed can of course be undefined but to
+% avoid producing an unhelpful low-level undefined command error we
+% pass it to |\UTFviii@defined| which is responsible for producing
+% a more sensible error message (not yet done!!). If, however, it is
+% defined we simply execute the thing (which should then expand to
+% an encoding specific internal \LaTeX{} form).
+% \begin{macrocode}
+\long\def\UTFviii@two@octets@combine#1#2{\expandafter
+ \UTFviii@defined\csname u8:\string#1\string#2\endcsname}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\UTFviii@three@octets@combine#1#2#3{\expandafter
+ \UTFviii@defined\csname u8:\string#1\string#2\string#3\endcsname}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\UTFviii@four@octets@combine#1#2#3#4{\expandafter
+ \UTFviii@defined\csname u8:\string#1\string#2\string#3\string#4\endcsname}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\UTFviii@defined}
+% This tests whether its argument is different from |\relax|: it
+% either calls for a sensible error message (not done), or it gets
+% the |\fi| out of the way (in case the command has arguments) and
+% executes it.
+% \begin{macrocode}
+\def\UTFviii@defined#1{%
+ \ifx#1\relax
+% \end{macrocode}
+% Test if the sequence is invalid UTF-8 or valid UTF-8 but without
+% a \LaTeX\ definition.
+% \begin{macrocode}
+ \if\relax\expandafter\UTFviii@checkseq\string#1\relax\relax
+% \end{macrocode}
+% The endline character has a special definition within the
+% inputenc package (it is gobbling spaces). For this reason we
+% can't produce multiline strings without some precaution.
+% \changes{v1.1b}{2004/02/09}{No newlines allowed in error messages}
+% \changes{v1.1g}{2005/09/27}{Real spaces do not show up so use \cs{space}}
+% \changes{v1.1o}{2015/08/28}{Show Unicode number of character in hex}
+% \changes{v1.2a}{2018/03/24}{Error message improved for non-UTF-8 sequences}%
+% \begin{macrocode}
+ \UTFviii@undefined@err{#1}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \else
+ \PackageError{inputenc}{Invalid UTF-8 byte sequence}%
+ \UTFviii@invalid@help
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \else\expandafter
+ #1%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UTFviii@invalid@err}
+% \begin{macro}{\UTFviii@invalid@help}
+% \changes{v1.2a}{2018/03/24}{Macro added}%
+% \changes{v1.2f}{2018/10/05}{Show invalid byte in hex}%
+% \begin{macrocode}
+\def\UTFviii@invalid@err#1{%
+ \PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii@hexnumber{`#1}}%
+ \UTFviii@invalid@help}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\UTFviii@invalid@help{%
+ The document does not appear to be in UTF-8 encoding.\MessageBreak
+ Try adding \noexpand\UseRawInputEncoding as the first line of the file\MessageBreak
+ or specify an encoding such as \noexpand\usepackage[latin1]{inputenc}\MessageBreak
+ in the document preamble.\MessageBreak
+ Alternatively, save the file in UTF-8 using your editor or another tool}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\UTFviii@undefined@err}
+% \changes{v1.2a}{2018/03/24}{Macro added}%
+% \begin{macrocode}
+\def\UTFviii@undefined@err#1{%
+ \PackageError{inputenc}{Unicode character \expandafter
+ \UTFviii@splitcsname\string#1\relax
+ \MessageBreak
+ not set up for use with LaTeX}%
+ {You may provide a definition with\MessageBreak
+ \noexpand\DeclareUnicodeCharacter}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\UTFviii@checkseq}
+% \begin{macro}{\UTFviii@check@continue}
+% \changes{v1.2a}{2018/03/24}{Macro added}%
+% Check that the csname consists of a valid UTF-8 sequence.
+% \begin{macrocode}
+\def\UTFviii@checkseq#1:#2#3{%
+ \ifnum`#2<"80 %
+ \ifx\relax#3\else1\fi
+ \else
+ \ifnum`#2<"C0 %
+ 1 %
+ \else
+ \expandafter\expandafter\expandafter\UTFviii@check@continue
+ \expandafter\expandafter\expandafter#3%
+ \fi
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\UTFviii@check@continue#1{%
+ \ifx\relax#1%
+ \else
+ \ifnum`#1<"80 1\else\ifnum`#1>"BF 1\fi\fi
+ \expandafter\UTFviii@check@continue
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\UTFviii@loop}
+% This bit of code derived from \texttt{xmltex} defines the active character
+% correspnding to starting octets to call |\UTFviii@two@octets| etc as appropriate.
+% The starting octet itself is passed directly as the first argument, the others
+% are picked up later en route.
+%
+% The |\UTFviii@loop| loops through the numbers starting at
+% |\count@| and ending at |\@tempcnta|${} - 1$, each time executing
+% the code in |\UTFviii@tmp|.
+%
+% All this is done in a group so that temporary catcode changes
+% etc.~vanish after everything is set up.
+%
+% \begin{macrocode}
+\begingroup
+\catcode`\~13
+\catcode`\"12
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\UTFviii@loop{%
+ \uccode`\~\count@
+ \uppercase\expandafter{\UTFviii@tmp}%
+ \advance\count@\@ne
+ \ifnum\count@<\@tempcnta
+ \expandafter\UTFviii@loop
+ \fi}
+% \end{macrocode}
+%
+% Handle the single byte control characters.
+% \changes{v1.2a}{2018/03/24}{Loop over C0 controls added}%
+% C0 controls are valid UTF-8 but defined to give the ``Character not defined error''
+% They may be defined with |\DeclareUnicodeCharacter|.
+% \begin{macrocode}
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@undefined@err{:\string~}}}
+% 0 ^^@ null
+ \count@"1
+ \@tempcnta9
+% 9 ^^I tab
+% 10 ^^J nl
+\UTFviii@loop
+ \count@11
+ \@tempcnta12
+\UTFviii@loop
+% 12 ^^L
+% 13 ^^M
+ \count@14
+ \@tempcnta32
+\UTFviii@loop
+% \end{macrocode}
+%
+%
+% Bytes with leading bits |10| are not valid UTF-8 starting bytes
+% \begin{macrocode}
+ \count@"80
+ \@tempcnta"C2
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}}
+\UTFviii@loop
+% \end{macrocode}
+%
+% Setting up 2-byte UTF-8: The starting bytes is passed as an
+% active character so that it can be reprocessed later!
+% \begin{macrocode}
+ \count@"C2
+ \@tempcnta"E0
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\noexpand~}}
+\UTFviii@loop
+% \end{macrocode}
+%
+% Setting up 3-byte UTF-8:
+% \begin{macrocode}
+ \count@"E0
+ \@tempcnta"F0
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\noexpand~}}
+\UTFviii@loop
+% \end{macrocode}
+%
+% Setting up 4-byte UTF-8:
+% \changes{v1.2e}{2018/09/28}{Fix "F4 lead byte}%
+% \begin{macrocode}
+ \count@"F0
+ \@tempcnta"F5
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\noexpand~}}
+\UTFviii@loop
+% \end{macrocode}
+%
+% Bytes above F4 are not valid UTF-8 starting bytes as they would encode numbers beyond
+% the Unicode range
+% \begin{macrocode}
+ \count@"F5
+ \@tempcnta"100
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}}
+\UTFviii@loop
+% \end{macrocode}
+%
+% \begin{macrocode}
+\endgroup
+% \end{macrocode}
+%
+% \end{macro}
+%
+% For this case we must disable the warning generated by
+% \texttt{inputenc} if it doesn't see any new |\DeclareInputText|
+% commands.
+% \begin{macrocode}
+\@inpenc@test
+% \end{macrocode}
+%
+%
+% If this file (\texttt{utf8.def}) is not being read while setting
+% up \texttt{inputenc}, i.e.~in the preamble, but when
+% |\inputencoding| is called somewhere within the document, we do not
+% need to input the specific Unicode mappings again. We therefore
+% stop reading the file at this point.
+% \begin{macrocode}
+\ifx\@begindocumenthook\@undefined
+ \makeatother
+% \end{macrocode}
+% The |\fi| must be on the same line as |\endinput| or else it will
+% never be seen!
+% \begin{macrocode}
+ \endinput \fi
+% \end{macrocode}
+%
+%
+% \subsection{Mapping Unicode codes to \LaTeX{} internal forms}
+%
+%
+% \begin{macro}{\DeclareUnicodeCharacter}
+% The |\DeclareUnicodeCharacter| declaration defines a mapping from
+% a Unicode character code point to a \LaTeX{} internal form. The first
+% argument is the Unicode number as hexadecimal digits and the second is
+% the actual \LaTeX{} internal form.
+%
+% We start by making sure that some characters have the right
+% |\catcode| when they are used in the definitions below.
+% \begin{macrocode}
+\begingroup
+\catcode`\"=12
+\catcode`\<=12
+\catcode`\.=12
+\catcode`\,=12
+\catcode`\;=12
+\catcode`\!=12
+\catcode`\~=13
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\DeclareUnicodeCharacter#1#2{%
+ \count@"#1\relax
+ \wlog{ \space\space defining Unicode char U+#1 (decimal \the\count@)}%
+ \begingroup
+% \end{macrocode}
+% Next we do the parsing of the number stored in |\count@| and assign the
+% result to |\UTFviii@tmp|. Actually all this could be done in-line,
+% the macro |\parse@XML@charref| is only there to extend this code
+% to parsing Unicode numbers in other contexts one day (perhaps).
+% \begin{macrocode}
+ \parse@XML@charref
+% \end{macrocode}
+%
+% Here is an example of what is happening, for the pair \texttt{"C2 "A3}
+% (which is the utf8 represenation for the character \textsterling{}).
+% After |\parse@XML@charref| we have, stored in |\UTFviii@tmp|, a
+% single command with two character tokens as arguments:
+% \begin{quote}
+% [$t_{C2}$ and $t_{A3}$ are the characters corresponding to these
+% two octets]\\
+% |\UTFviii@two@octets| $t_{\rm C2}t_{\rm A3}$
+% \end{quote}
+% what we actually need to produce is a definition of the form
+% \begin{quote}
+% |\def\u8:|$t_{\rm C2}$$t_{\rm A3}$ |{|\textit{\LaTeX{} internal form}|}|\,.
+% \end{quote}
+% So here we temporarily redefine the prefix commands
+% |\UTFviii@two@octets|, etc.~to
+% generate the csname that we wish to define> the |\string|s are
+% added in case these tokens are still active.
+% \begin{macrocode}
+ \def\UTFviii@two@octets##1##2{\csname u8:##1\string##2\endcsname}%
+ \def\UTFviii@three@octets##1##2##3{\csname u8:##1%
+ \string##2\string##3\endcsname}%
+ \def\UTFviii@four@octets##1##2##3##4{\csname u8:##1%
+ \string##2\string##3\string##4\endcsname}%
+% \end{macrocode}
+% Now we simply:-) need to use the right number of |\expandafter|s to
+% finally construct the definition: expanding |\UTFviii@tmp| once to get
+% its contents, a second time to replace the prefix command by its
+% |\csname| expansion, and a third time to turn the expansion into
+% a csname after which the |\gdef| finally gets applied.
+% We add an irrelevant |\IeC| and braces around the definition, in
+% order to avoid any space after the command being gobbled up
+% when the text is written out to an auxiliary file (see
+% \texttt{inputenc} for further details
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter
+ \expandafter
+ \gdef\UTFviii@tmp{\IeC{#2}}%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\parse@XML@charref}
+% This macro parses a Unicode number (decimal) and returns its
+% UTF-8 representation as a sequence of non-active \TeX{} character
+% tokens. In the
+% original code it had two arguments delimited by \texttt{;} here,
+% however, we supply the Unicode number implicitly.
+% \begin{macrocode}
+\gdef\parse@XML@charref{%
+% \end{macrocode}
+% We need to keep a few things local, mainly the |\uccode|'s that
+% are set up below. However, the group originally used here is
+% actually unnecessary since we call this macro only within another
+% group; but it will be important to restore the group if this
+% macro gets used for other purposes.
+% \begin{macrocode}
+% \begingroup
+% \end{macrocode}
+% The original code from \texttt{xmltex} supported the convention that a
+% Unicode slot number could be given either as a decimal or as a
+% hexadecimal (by starting with \texttt{x}). We do not do this so
+% this code is also removed. This could be reactivated if one
+% wants to support document commands that accept Unicode numbers
+% (but then the first case needs to be changed from an error
+% message back to something more useful again).
+% \begin{macrocode}
+% \uppercase{\count@\if x\noexpand#1"\else#1\fi#2}\relax
+% \end{macrocode}
+% As |\count@| already contains the right value we make
+% |\parse@XML@charref| work without arguments.
+% \changes{v1.1g}{2005/09/27}{Real spaces do not show up so use \cs{space}}
+% \changes{v1.2a}{2018/03/24}{Allow control characters if active}
+% In the case single byte UTF-8 sequences, only allow definition if
+% the character os already active. The definition of |\UTFviii@tmp|
+% looks slightly strange but is designed for the sequence of |\expandafter|
+% in |\DeclareUnicodeCharacter|.
+%
+% \begin{macrocode}
+ \ifnum\count@<"A0\relax
+ \ifnum\catcode\count@=13
+ \uccode`\~=\count@\uppercase{\def\UTFviii@tmp{\@empty\@empty~}}%
+ \else
+ \PackageError{inputenc}%
+ {Cannot define non-active Unicode char value < 00A0}%
+ \@eha
+ \def\UTFviii@tmp{\UTFviii@tmp}%
+ \fi
+% \end{macrocode}
+% The code below is derived from \texttt{xmltex} and generates the UTF-8 byte sequence
+% for the number in |\count@|.
+%
+% The reverse operation (just used in error messages)
+% has now been added as \cs{decode@UTFviii}.
+% \begin{macrocode}
+ \else\ifnum\count@<"800\relax
+ \parse@UTFviii@a,%
+ \parse@UTFviii@b C\UTFviii@two@octets.,%
+ \else\ifnum\count@<"10000\relax
+ \parse@UTFviii@a;%
+ \parse@UTFviii@a,%
+ \parse@UTFviii@b E\UTFviii@three@octets.{,;}%
+ \else
+% \end{macrocode}
+%
+% Test added here for out of range values, the 4-octet definitions are still set up
+% so that |\DeclareUnicodeCharacter| does something sensible if the user scrolls
+% past this error.
+% \begin{macrocode}
+ \ifnum\count@>"10FFFF\relax
+ \PackageError{inputenc}%
+ {\UTFviii@hexnumber\count@\space too large for Unicode}%
+ {Values between 0 and 10FFFF are permitted}%
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \parse@UTFviii@a;%
+ \parse@UTFviii@a,%
+ \parse@UTFviii@a!%
+ \parse@UTFviii@b F\UTFviii@four@octets.{!,;}%
+ \fi
+ \fi
+ \fi
+% \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parse@UTFviii@a}
+% \ldots so somebody else can document this part :-)
+% \changes{v1.1b}{2004/02/09}{Space in the wrong place \cs{count @64}}
+% \begin{macrocode}
+\gdef\parse@UTFviii@a#1{%
+ \@tempcnta\count@
+ \divide\count@ 64
+ \@tempcntb\count@
+ \multiply\count@ 64
+ \advance\@tempcnta-\count@
+ \advance\@tempcnta 128
+ \uccode`#1\@tempcnta
+ \count@\@tempcntb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\parse@UTFviii@b}
+% \ldots same here
+% \begin{macrocode}
+\gdef\parse@UTFviii@b#1#2#3#4{%
+ \advance\count@ "#10\relax
+ \uccode`#3\count@
+ \uppercase{\gdef\UTFviii@tmp{#2#3#4}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\decode@UTFviii}
+% \changes{v1.1o}{2015/08/28}{Macro added}
+% In the reverse direction, take a sequence of octects(bytes)
+% representing a character in UTF-8 and construct the Unicode number.
+% The sequence is terminated by |\relax|.
+%
+% In this version, if the sequence is not valid UTF-8 you probably
+% get a low level arithmetic error from |\numexpr| or stray characters
+% at the end. Getting a better error message would be somewhat expensive.
+% As the main use is for reporting characters in messages, this is done
+% just using expansion, so |\numexpr| is used, A stub returning 0 is defined
+% if |\numexpr| is not available.
+% \begin{macrocode}
+\ifx\numexpr\@undefined
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\decode@UTFviii#1{0}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\else
+% \end{macrocode}
+%
+% If the input is malformed UTF-8 there may not be enough closing ) so
+% add 5 so there are always some remaining then cleanup and remove
+% any remaining ones at the end. This avoids |\numexpr| parse errors
+% while outputting a package error.
+% \begin{macrocode}
+\gdef\decode@UTFviii#1\relax{%
+ \expandafter\UTFviii@cleanup
+ \the\numexpr\dec@de@UTFviii#1\relax)))))\@empty}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\UTFviii@cleanup#1)#2\@empty{#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\gdef\dec@de@UTFviii#1{%
+\ifx\relax#1%
+\else
+ \ifnum`#1>"EF
+ ((((`#1-"F0)%
+ \else
+ \ifnum`#1>"DF
+ (((`#1-"E0)%
+ \else
+ \ifnum`#1>"BF
+ ((`#1-"C0)%
+ \else
+ \ifnum`#1>"7F
+ )*64+(`#1-"80)%
+ \else
+ +`#1 %
+ \fi
+ \fi
+ \fi
+ \fi
+ \expandafter\dec@de@UTFviii
+\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UTFviii@hexnumber}
+% \changes{v1.1o}{2015/08/28}{Macro added}
+% Convert a number to a sequence of uppercase hex digits.
+% If |\numexpr| is not available, it returns its argument unchanged.
+% \begin{macrocode}
+\ifx\numexpr\@undefined
+% \end{macrocode}
+% \begin{macrocode}
+\global\let\UTFviii@hexnumber\@firstofone
+\global\UTFviii@hexdigit\hexnumber@
+% \end{macrocode}
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% \begin{macrocode}
+\gdef\UTFviii@hexnumber#1{%
+\ifnum#1>15 %
+\expandafter\UTFviii@hexnumber\expandafter{\the\numexpr(#1-8)/16\relax}%
+\fi
+\UTFviii@hexdigit{\numexpr#1\ifnum#1>0-((#1-8)/16)*16\fi\relax}%
+}
+% \end{macrocode}
+%
+% Almost but not quite |\hexnumber@|.
+% \begin{macrocode}
+\gdef\UTFviii@hexdigit#1{\ifcase\numexpr#1\relax
+ 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or
+ A\or B\or C\or D\or E\or F\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UTFviii@splitcsname}
+% \changes{v1.1o}{2015/08/28}{Macro added}
+% \begin{macro}{\UTFviii@hexcodepoint}
+% \changes{v1.2e}{2018/09/28}{Macro added: Format codepoint properly}
+% Split a csname representing a unicode character and return
+% the character and the unicode number in hex.
+% \begin{macrocode}
+\gdef\UTFviii@hexcodepoint#1{U+%
+ \ifnum#1<16 0\fi
+ \ifnum#1<256 0\fi
+ \ifnum#1<4096 0\fi
+ \UTFviii@hexnumber{#1}%
+}%
+\gdef\UTFviii@splitcsname#1:#2\relax{%
+% \end{macrocode}
+% \changes{v1.2b}{2018/03/26}{add percent as \cs{endlinechar} not -1 in the format}%
+% Need to pre-expand the argument to ensure cleanup in case of mal-formed UTF-8.
+% \begin{macrocode}
+#2 (\expandafter\UTFviii@hexcodepoint\expandafter{%
+ \the\numexpr\decode@UTFviii#2\relax})%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@onlypreamble\DeclareUnicodeCharacter
+% \end{macrocode}
+% These are preamble only as long as we don't support Unicode
+% charrefs in documents.
+% \begin{macrocode}
+\@onlypreamble\parse@XML@charref
+\@onlypreamble\parse@UTFviii@a
+\@onlypreamble\parse@UTFviii@b
+% \end{macrocode}
+%
+%
+% \subsection{Loading Unicode mappings at begin document}
+%
+% The original plan was to set up the UTF-8 support at
+% |\begin{document}|; but then any text characters used in the preamble
+% (as people do even though advised against it) would fail in one way or
+% the other.
+% So the implementation was changed and the Unicode definition files
+% for already defined encodings are loaded here.
+%
+% We loop through all defined font encodings
+% (stored in |\cdp@list|) and for each load a file
+% \textit{name}\texttt{enc.dfu} if it exist. That file is then
+% supposed to contain |\DeclareUnicodeCharacter| declarations.
+% \begin{macrocode}
+\begingroup
+ \def\cdp@elt#1#2#3#4{%
+ \wlog{Now handling font encoding #1 ...}%
+ \lowercase{%
+ \InputIfFileExists{#1enc.dfu}}%
+ {\wlog{... processing UTF-8 mapping file for font %
+ encoding #1}%
+% \end{macrocode}
+% \changes{v1.1m}{2008/04/05}{Ensure we don't lose spaces in the log}
+% The previous line is written to the log with the newline char being
+% ignored (thus not producing a space). Therefore either everything has to
+% be on a single input line or some special care must be taken. From this
+% point on we ignore spaces again, i.e., while we are reading the
+% \texttt{.dfu} file. The |\endgroup| below will restore it again.
+% \changes{v1.1d}{2004/05/08}{Explicitly set catcode of space}
+% \changes{v1.1g}{2005/09/27}{We lost the ``false'' case}
+% \begin{macrocode}
+ \catcode`\ 9\relax}%
+ {\wlog{... no UTF-8 mapping file for font encoding #1}}%
+ }
+ \cdp@list
+\endgroup
+% \end{macrocode}
+% However, we don't know if there are font encodings still to be
+% loaded (either with \texttt{fontenc} or directly with |\input| by
+% some some package). Font encoding files are loaded only if the
+% corresponding encoding has not been loaded yet, and they always
+% begin with |\DeclareFontEncoding|. We now redefine the internal
+% kernel version of the latter to load the Unicode file if available.
+%
+% \begin{macrocode}
+\def\DeclareFontEncoding@#1#2#3{%
+ \expandafter
+ \ifx\csname T@#1\endcsname\relax
+ \def\cdp@elt{\noexpand\cdp@elt}%
+ \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
+ {\default@family}{\default@series}%
+ {\default@shape}}%
+ \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
+ \begingroup
+ \wlog{Now handling font encoding #1 ...}%
+ \lowercase{%
+ \InputIfFileExists{#1enc.dfu}}%
+ {\wlog{... processing UTF-8 mapping file for font %
+ encoding #1}}%
+ {\wlog{... no UTF-8 mapping file for font encoding #1}}%
+ \endgroup
+ \else
+ \@font@info{Redeclaring font encoding #1}%
+ \fi
+ \global\@namedef{T@#1}{#2}%
+ \global\@namedef{M@#1}{\default@M#3}%
+ \xdef\LastDeclaredEncoding{#1}%
+ }
+%</utf8>
+% \end{macrocode}
+%
+%
+%
+% \section{Mapping characters ---\newline based on font (glyph) encodings}
+%
+% This section is a first attempt to provide Unicode definitions for
+% characters whose standard glyphs are currently provided by the
+% standard \LaTeX{} font-encodings |T1|, |OT1|, etc. They are by
+% no means completed and need checking.
+%
+% For example, one should check the already existing input encodings
+% for glyphs that may in fact be available and required,
+% e.g.~\texttt{latin4} has a number of glyphs with the |\=|
+% accent. Since the |T1| encoding does not provide such glyphs,
+% these characters are not listed below (yet).
+%
+% The list below was generated by looking at the current \LaTeX{} font
+% encoding files, e.g., \texttt{t1enc.def} and using the work by
+% Sebastian Rahtz (in \texttt{ucharacters.sty}) with a few
+% modifications. In combinations such as |\^\i| the preferred form
+% is that and not |\^i|.
+%
+% This list has been built from several sources, obviously including
+% the Unicode Standard itself. These sources include Passive \TeX{} by
+% Sebastian Rahtz, the \texttt{unicode}
+% package by Dominique P. G. Unruh (mainly for Latin encodings) and
+% \texttt{text4ht} by Eitan Gurari (for Cyrillic ones).
+%
+% Note that it strictly follows the Mittelbach principles for
+% input character encodings: thus it offers no support for using utf8
+% representations of math symbols such as $\times$ or $\div$ (in math mode).
+%
+%
+% \subsection{About the table itself}
+%
+% In addition to generating individual files, the table below is, at present,
+% a one-one (we think) partial relationship between the (ill-defined) set
+% of LICRs and the Unicode slots "0080 to "FFFF. At present these entries
+% are used only to define a collection of partial mappings from Unicode
+% slots to LICRs; each of these mappings becomes full if we add an exception
+% value (`not defined') to the set of LICRs.
+%
+% It is probably not essential for the relationship in the full table to be
+% one-one; this raises questions such as: the exact role of LICRs;
+% the formal relationships on the set of LICRs; the (non-mathematical)
+% relationship between
+% LICRs and Unicode (which has its own somewhat fuzzy equivalences);
+% and ultimately what a character is and what a character representation
+% and/or name is.
+%
+% It is unclear the extent to which entries in this table should
+% resemble the closely related ones in the 8-bit \texttt{inputenc} files.
+% The Unicode standard claims that the first 256 slots `are' ASCII and
+% Latin-1.
+%
+% Of course, \TeX{} itself typically does not treat even many perfectly
+% `normal text' 7-bit slots as text characters, so it is unclear
+% whether \LaTeX{} should even attempt to deal in any consistent way with
+% those Unicode slots that are not definitive text characters.
+%
+%
+% \subsection{The mapping table}
+%
+% \begingroup
+% \hfuzz=12pt ^^A just because
+%
+% Note that the first argument must be a hex-digit number greater
+% than \texttt{00BF} and at most \texttt{10FFFF}.
+%
+% There are few notes about inconsistencies etc at the end of the table.
+%
+% \changes{v1.1o}{2015/08/28}{Add U+00A0 and U+00AD}
+% \changes{v1.1q}{2015/12/02}{Add remaining latin uses of accents in T1}
+% \changes{v1.1r}{2015/12/03}{Add some more ogoneck cases}
+% \changes{v1.1s}{2016/01/11}{Add some more caron and acute}
+% \changes{v1.1t}{2017/01/28}{Add caron cominations for GgYy}
+% \begin{macrocode}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00A0}{\nobreakspace}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00A1}{\textexclamdown}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00A2}{\textcent}
+%<all,ts1,t1,ot1,ly1>\DeclareUnicodeCharacter{00A3}{\textsterling}
+%<all,x2,ts1,t2c,t2b,t2a,ly1,lcy>\DeclareUnicodeCharacter{00A4}{\textcurrency}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00A5}{\textyen}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00A6}{\textbrokenbar}
+%<all,x2,ts1,t2c,t2b,t2a,oms,ly1>\DeclareUnicodeCharacter{00A7}{\textsection}
+%<all,ts1>\DeclareUnicodeCharacter{00A8}{\textasciidieresis}
+%<all,ts1,utf8>\DeclareUnicodeCharacter{00A9}{\textcopyright}
+%<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{00AA}{\textordfeminine}
+%<*all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
+\DeclareUnicodeCharacter{00AB}{\guillemotleft}
+%</all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
+%<all,ts1>\DeclareUnicodeCharacter{00AC}{\textlnot}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00AD}{\-}
+%<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{00AE}{\textregistered}
+%<all,ts1>\DeclareUnicodeCharacter{00AF}{\textasciimacron}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00B0}{\textdegree}
+%<all,ts1>\DeclareUnicodeCharacter{00B1}{\textpm}
+%<all,ts1>\DeclareUnicodeCharacter{00B2}{\texttwosuperior}
+%<all,ts1>\DeclareUnicodeCharacter{00B3}{\textthreesuperior}
+%<all,ts1>\DeclareUnicodeCharacter{00B4}{\textasciiacute}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00B5}{\textmu} % micro sign
+%<all,ts1,oms,ly1>\DeclareUnicodeCharacter{00B6}{\textparagraph}
+%<all,oms,ts1,ly1>\DeclareUnicodeCharacter{00B7}{\textperiodcentered}
+%<all,ot1>\DeclareUnicodeCharacter{00B8}{\c\ }
+%<all,ts1>\DeclareUnicodeCharacter{00B9}{\textonesuperior}
+%<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{00BA}{\textordmasculine}
+%<*all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
+\DeclareUnicodeCharacter{00BB}{\guillemotright}
+%</all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00BC}{\textonequarter}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00BD}{\textonehalf}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{00BE}{\textthreequarters}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00BF}{\textquestiondown}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C0}{\@tabacckludge`A}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C1}{\@tabacckludge'A}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C2}{\^A}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C3}{\~A}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C4}{\"A}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00C5}{\r A}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00C6}{\AE}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C7}{\c C}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C8}{\@tabacckludge`E}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00C9}{\@tabacckludge'E}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00CA}{\^E}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00CB}{\"E}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00CC}{\@tabacckludge`I}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00CD}{\@tabacckludge'I}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00CE}{\^I}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00CF}{\"I}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D0}{\DH}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D1}{\~N}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D2}{\@tabacckludge`O}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D3}{\@tabacckludge'O}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D4}{\^O}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D5}{\~O}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D6}{\"O}
+%<all,ts1>\DeclareUnicodeCharacter{00D7}{\texttimes}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00D8}{\O}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00D9}{\@tabacckludge`U}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00DA}{\@tabacckludge'U}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00DB}{\^U}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00DC}{\"U}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00DD}{\@tabacckludge'Y}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00DE}{\TH}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00DF}{\ss}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E0}{\@tabacckludge`a}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E1}{\@tabacckludge'a}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E2}{\^a}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E3}{\~a}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E4}{\"a}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E5}{\r a}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00E6}{\ae}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E7}{\c c}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E8}{\@tabacckludge`e}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00E9}{\@tabacckludge'e}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00EA}{\^e}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00EB}{\"e}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00EC}{\@tabacckludge`\i}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00ED}{\@tabacckludge'\i}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00EE}{\^\i}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00EF}{\"\i}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F0}{\dh}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F1}{\~n}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F2}{\@tabacckludge`o}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F3}{\@tabacckludge'o}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F4}{\^o}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F5}{\~o}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F6}{\"o}
+%<all,ts1>\DeclareUnicodeCharacter{00F7}{\textdiv}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00F8}{\o}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00F9}{\@tabacckludge`u}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00FA}{\@tabacckludge'u}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00FB}{\^u}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00FC}{\"u}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00FD}{\@tabacckludge'y}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00FE}{\th}
+%<all,t1,ly1>\DeclareUnicodeCharacter{00FF}{\"y}
+%<all,t1>\DeclareUnicodeCharacter{0100}{\@tabacckludge=A}
+%<all,t1>\DeclareUnicodeCharacter{0101}{\@tabacckludge=a}
+%<all,t1>\DeclareUnicodeCharacter{0102}{\u A}
+%<all,t1>\DeclareUnicodeCharacter{0103}{\u a}
+%<all,t1>\DeclareUnicodeCharacter{0104}{\k A}
+%<all,t1>\DeclareUnicodeCharacter{0105}{\k a}
+%<all,t1>\DeclareUnicodeCharacter{0106}{\@tabacckludge'C}
+%<all,t1>\DeclareUnicodeCharacter{0107}{\@tabacckludge'c}
+%<all,t1>\DeclareUnicodeCharacter{0108}{\^C}
+%<all,t1>\DeclareUnicodeCharacter{0109}{\^c}
+%<all,t1>\DeclareUnicodeCharacter{010A}{\.C}
+%<all,t1>\DeclareUnicodeCharacter{010B}{\.c}
+%<all,t1>\DeclareUnicodeCharacter{010C}{\v C}
+%<all,t1>\DeclareUnicodeCharacter{010D}{\v c}
+%<all,t1>\DeclareUnicodeCharacter{010E}{\v D}
+%<all,t1>\DeclareUnicodeCharacter{010F}{\v d}
+%<all,t1>\DeclareUnicodeCharacter{0110}{\DJ}
+%<all,t1>\DeclareUnicodeCharacter{0111}{\dj}
+%<all,t1>\DeclareUnicodeCharacter{0112}{\@tabacckludge=E}
+%<all,t1>\DeclareUnicodeCharacter{0113}{\@tabacckludge=e}
+%<all,t1>\DeclareUnicodeCharacter{0114}{\u E}
+%<all,t1>\DeclareUnicodeCharacter{0115}{\u e}
+%<all,t1>\DeclareUnicodeCharacter{0116}{\.E}
+%<all,t1>\DeclareUnicodeCharacter{0117}{\.e}
+%<all,t1>\DeclareUnicodeCharacter{0118}{\k E}
+%<all,t1>\DeclareUnicodeCharacter{0119}{\k e}
+%<all,t1>\DeclareUnicodeCharacter{011A}{\v E}
+%<all,t1>\DeclareUnicodeCharacter{011B}{\v e}
+%<all,t1>\DeclareUnicodeCharacter{011C}{\^G}
+%<all,t1>\DeclareUnicodeCharacter{011D}{\^g}
+%<all,t1>\DeclareUnicodeCharacter{011E}{\u G}
+%<all,t1>\DeclareUnicodeCharacter{011F}{\u g}
+%<all,t1>\DeclareUnicodeCharacter{0120}{\.G}
+%<all,t1>\DeclareUnicodeCharacter{0121}{\.g}
+%<all,t1>\DeclareUnicodeCharacter{0122}{\c G}
+%<all,t1>\DeclareUnicodeCharacter{0123}{\c g}
+%<all,t1>\DeclareUnicodeCharacter{0124}{\^H}
+%<all,t1>\DeclareUnicodeCharacter{0125}{\^h}
+%<all,t1>\DeclareUnicodeCharacter{0128}{\~I}
+%<all,t1>\DeclareUnicodeCharacter{0129}{\~\i}
+%<all,t1>\DeclareUnicodeCharacter{012A}{\@tabacckludge=I}
+%<all,t1>\DeclareUnicodeCharacter{012B}{\@tabacckludge=\i}
+%<all,t1>\DeclareUnicodeCharacter{012C}{\u I}
+%<all,t1>\DeclareUnicodeCharacter{012D}{\u\i}
+%<all,t1>\DeclareUnicodeCharacter{012E}{\k I}
+% \end{macrocode}
+% \changes{v1.2g}{2019/02/06}{Corrected 012F (github/122)}
+% \begin{macrocode}
+%<all,t1>\DeclareUnicodeCharacter{012F}{\k i}
+%<all,t1>\DeclareUnicodeCharacter{0130}{\.I}
+%<all,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>\DeclareUnicodeCharacter{0131}{\i}
+%<all,t1>\DeclareUnicodeCharacter{0132}{\IJ}
+%<all,t1>\DeclareUnicodeCharacter{0133}{\ij}
+%<all,t1>\DeclareUnicodeCharacter{0134}{\^J}
+%<all,t1>\DeclareUnicodeCharacter{0135}{\^\j}
+%<all,t1>\DeclareUnicodeCharacter{0136}{\c K}
+%<all,t1>\DeclareUnicodeCharacter{0137}{\c k}
+%<all,t1>\DeclareUnicodeCharacter{0139}{\@tabacckludge'L}
+%<all,t1>\DeclareUnicodeCharacter{013A}{\@tabacckludge'l}
+%<all,t1>\DeclareUnicodeCharacter{013B}{\c L}
+%<all,t1>\DeclareUnicodeCharacter{013C}{\c l}
+%<all,t1>\DeclareUnicodeCharacter{013D}{\v L}
+%<all,t1>\DeclareUnicodeCharacter{013E}{\v l}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0141}{\L}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0142}{\l}
+%<all,t1>\DeclareUnicodeCharacter{0143}{\@tabacckludge'N}
+%<all,t1>\DeclareUnicodeCharacter{0144}{\@tabacckludge'n}
+%<all,t1>\DeclareUnicodeCharacter{0145}{\c N}
+%<all,t1>\DeclareUnicodeCharacter{0146}{\c n}
+%<all,t1>\DeclareUnicodeCharacter{0147}{\v N}
+%<all,t1>\DeclareUnicodeCharacter{0148}{\v n}
+%<all,t1>\DeclareUnicodeCharacter{014A}{\NG}
+%<all,t1>\DeclareUnicodeCharacter{014B}{\ng}
+%<all,t1>\DeclareUnicodeCharacter{014C}{\@tabacckludge=O}
+%<all,t1>\DeclareUnicodeCharacter{014D}{\@tabacckludge=o}
+%<all,t1>\DeclareUnicodeCharacter{014E}{\u O}
+%<all,t1>\DeclareUnicodeCharacter{014F}{\u o}
+%<all,t1>\DeclareUnicodeCharacter{0150}{\H O}
+%<all,t1>\DeclareUnicodeCharacter{0151}{\H o}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{0152}{\OE}
+%<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{0153}{\oe}
+%<all,t1>\DeclareUnicodeCharacter{0154}{\@tabacckludge'R}
+%<all,t1>\DeclareUnicodeCharacter{0155}{\@tabacckludge'r}
+%<all,t1>\DeclareUnicodeCharacter{0156}{\c R}
+%<all,t1>\DeclareUnicodeCharacter{0157}{\c r}
+%<all,t1>\DeclareUnicodeCharacter{0158}{\v R}
+%<all,t1>\DeclareUnicodeCharacter{0159}{\v r}
+%<all,t1>\DeclareUnicodeCharacter{015A}{\@tabacckludge'S}
+%<all,t1>\DeclareUnicodeCharacter{015B}{\@tabacckludge's}
+%<all,t1>\DeclareUnicodeCharacter{015C}{\^S}
+%<all,t1>\DeclareUnicodeCharacter{015D}{\^s}
+%<all,t1>\DeclareUnicodeCharacter{015E}{\c S}
+%<all,t1>\DeclareUnicodeCharacter{015F}{\c s}
+%<all,t1,ly1>\DeclareUnicodeCharacter{0160}{\v S}
+%<all,t1,ly1>\DeclareUnicodeCharacter{0161}{\v s}
+%<all,t1>\DeclareUnicodeCharacter{0162}{\c T}
+%<all,t1>\DeclareUnicodeCharacter{0163}{\c t}
+%<all,t1>\DeclareUnicodeCharacter{0164}{\v T}
+%<all,t1>\DeclareUnicodeCharacter{0165}{\v t}
+%<all,t1>\DeclareUnicodeCharacter{0168}{\~U}
+%<all,t1>\DeclareUnicodeCharacter{0169}{\~u}
+%<all,t1>\DeclareUnicodeCharacter{016A}{\@tabacckludge=U}
+%<all,t1>\DeclareUnicodeCharacter{016B}{\@tabacckludge=u}
+%<all,t1>\DeclareUnicodeCharacter{016C}{\u U}
+%<all,t1>\DeclareUnicodeCharacter{016D}{\u u}
+%<all,t1>\DeclareUnicodeCharacter{016E}{\r U}
+%<all,t1>\DeclareUnicodeCharacter{016F}{\r u}
+%<all,t1>\DeclareUnicodeCharacter{0170}{\H U}
+%<all,t1>\DeclareUnicodeCharacter{0171}{\H u}
+%<all,t1>\DeclareUnicodeCharacter{0172}{\k U}
+%<all,t1>\DeclareUnicodeCharacter{0173}{\k u}
+% \end{macrocode}
+%
+% \changes{v1.1p}{2015/09/07}{Welsh circumflex combinations}
+% \begin{macrocode}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0174}{\^W}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0175}{\^w}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0176}{\^Y}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0177}{\^y}
+%<all,t1,ly1>\DeclareUnicodeCharacter{0178}{\"Y}
+%<all,t1>\DeclareUnicodeCharacter{0179}{\@tabacckludge'Z}
+%<all,t1>\DeclareUnicodeCharacter{017A}{\@tabacckludge'z}
+%<all,t1>\DeclareUnicodeCharacter{017B}{\.Z}
+%<all,t1>\DeclareUnicodeCharacter{017C}{\.z}
+%<all,t1,ly1>\DeclareUnicodeCharacter{017D}{\v Z}
+%<all,t1,ly1>\DeclareUnicodeCharacter{017E}{\v z}
+%<all,ts1,ly1>\DeclareUnicodeCharacter{0192}{\textflorin}
+% \end{macrocode}
+% \changes{v1.1s}{2016/01/11}{add 01CD-01F4}
+% \begin{macrocode}
+%<all,t1>\DeclareUnicodeCharacter{01CD}{\v A}
+%<all,t1>\DeclareUnicodeCharacter{01CE}{\v a}
+%<all,t1>\DeclareUnicodeCharacter{01CF}{\v I}
+%<all,t1>\DeclareUnicodeCharacter{01D0}{\v \i}
+%<all,t1>\DeclareUnicodeCharacter{01D1}{\v O}
+%<all,t1>\DeclareUnicodeCharacter{01D2}{\v o}
+%<all,t1>\DeclareUnicodeCharacter{01D3}{\v U}
+%<all,t1>\DeclareUnicodeCharacter{01D4}{\v u}
+%<all,t1>\DeclareUnicodeCharacter{01E2}{\@tabacckludge=\AE}
+%<all,t1>\DeclareUnicodeCharacter{01E3}{\@tabacckludge=\ae}
+%<all,t1>\DeclareUnicodeCharacter{01E6}{\v G}
+%<all,t1>\DeclareUnicodeCharacter{01E7}{\v g}
+%<all,t1>\DeclareUnicodeCharacter{01E8}{\v K}
+%<all,t1>\DeclareUnicodeCharacter{01E9}{\v k}
+%<all,t1>\DeclareUnicodeCharacter{01EA}{\k O}
+%<all,t1>\DeclareUnicodeCharacter{01EB}{\k o}
+%<all,t1>\DeclareUnicodeCharacter{01F0}{\v\j}
+%<all,t1>\DeclareUnicodeCharacter{01F4}{\@tabacckludge'G}
+%<all,t1>\DeclareUnicodeCharacter{01F5}{\@tabacckludge'g}
+% \end{macrocode}
+% \changes{v1.1o}{2015/08/28}{comma accent latex/4414}
+% \begin{macrocode}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0218}{\textcommabelow S}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0219}{\textcommabelow s}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{021A}{\textcommabelow T}
+%<all,t1,ot1,ly1>\DeclareUnicodeCharacter{021B}{\textcommabelow t}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<all,t1>\DeclareUnicodeCharacter{0232}{\@tabacckludge=Y}
+%<all,t1>\DeclareUnicodeCharacter{0233}{\@tabacckludge=y}
+%<all,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>\DeclareUnicodeCharacter{0237}{\j}
+%<all,ly1,utf8>\DeclareUnicodeCharacter{02C6}{\textasciicircum}
+%<all,ts1>\DeclareUnicodeCharacter{02C7}{\textasciicaron}
+%<all,ly1,utf8>\DeclareUnicodeCharacter{02DC}{\textasciitilde}
+%<all,ts1>\DeclareUnicodeCharacter{02D8}{\textasciibreve}
+%<all,t1>\DeclareUnicodeCharacter{02D9}{\.{}}
+%<all,t1>\DeclareUnicodeCharacter{02DB}{\k{}}
+%<all,ts1>\DeclareUnicodeCharacter{02DD}{\textacutedbl}
+% \end{macrocode}
+% The Cyrillic code points have been recently checked (2007) and extended
+% and corrected by Matthias Noe (\verb=a9931078@unet.univie.ac.at=) --- thanks.
+% \changes{v1.1j}{2007/11/09}{Added a few new unicode decls in cyrillic (pr/3988)}
+% \changes{v1.1k}{2007/11/11}{Added and further unicode decls in cyrillic}
+% \changes{v1.1n}{2015/06/27}{correct accent https://tex.stackexchange.com/q/252521}
+% \begin{macrocode}
+%<*all,x2,t2c,t2b,t2a,ot2,lcy>
+\DeclareUnicodeCharacter{0400}{\@tabacckludge`\CYRE}
+%</all,x2,t2c,t2b,t2a,ot2,lcy>
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{0401}{\CYRYO}
+%<all,x2,t2a,ot2>\DeclareUnicodeCharacter{0402}{\CYRDJE}
+%<*all,x2,t2c,t2b,t2a,ot2,lcy>
+\DeclareUnicodeCharacter{0403}{\@tabacckludge'\CYRG}
+%</all,x2,t2c,t2b,t2a,ot2,lcy>
+%<all,x2,t2a,ot2,lcy>\DeclareUnicodeCharacter{0404}{\CYRIE}
+%<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0405}{\CYRDZE}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{0406}{\CYRII}
+%<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0407}{\CYRYI}
+%<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0408}{\CYRJE}
+%<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{0409}{\CYRLJE}
+%<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{040A}{\CYRNJE}
+%<all,x2,t2a,ot2>\DeclareUnicodeCharacter{040B}{\CYRTSHE}
+%<*all,x2,t2c,t2b,t2a,ot2,lcy>
+\DeclareUnicodeCharacter{040C}{\@tabacckludge'\CYRK}
+\DeclareUnicodeCharacter{040D}{\@tabacckludge`\CYRI}
+%</all,x2,t2c,t2b,t2a,ot2,lcy>
+%<all,x2,t2b,t2a,lcy>\DeclareUnicodeCharacter{040E}{\CYRUSHRT}
+%<all,x2,t2c,t2a,ot2>\DeclareUnicodeCharacter{040F}{\CYRDZHE}
+%<*all,x2,t2c,t2b,t2a,ot2,lcy>
+\DeclareUnicodeCharacter{0410}{\CYRA}
+\DeclareUnicodeCharacter{0411}{\CYRB}
+\DeclareUnicodeCharacter{0412}{\CYRV}
+\DeclareUnicodeCharacter{0413}{\CYRG}
+\DeclareUnicodeCharacter{0414}{\CYRD}
+\DeclareUnicodeCharacter{0415}{\CYRE}
+\DeclareUnicodeCharacter{0416}{\CYRZH}
+\DeclareUnicodeCharacter{0417}{\CYRZ}
+\DeclareUnicodeCharacter{0418}{\CYRI}
+\DeclareUnicodeCharacter{0419}{\CYRISHRT}
+\DeclareUnicodeCharacter{041A}{\CYRK}
+\DeclareUnicodeCharacter{041B}{\CYRL}
+\DeclareUnicodeCharacter{041C}{\CYRM}
+\DeclareUnicodeCharacter{041D}{\CYRN}
+\DeclareUnicodeCharacter{041E}{\CYRO}
+\DeclareUnicodeCharacter{041F}{\CYRP}
+\DeclareUnicodeCharacter{0420}{\CYRR}
+\DeclareUnicodeCharacter{0421}{\CYRS}
+\DeclareUnicodeCharacter{0422}{\CYRT}
+\DeclareUnicodeCharacter{0423}{\CYRU}
+\DeclareUnicodeCharacter{0424}{\CYRF}
+\DeclareUnicodeCharacter{0425}{\CYRH}
+\DeclareUnicodeCharacter{0426}{\CYRC}
+\DeclareUnicodeCharacter{0427}{\CYRCH}
+\DeclareUnicodeCharacter{0428}{\CYRSH}
+\DeclareUnicodeCharacter{0429}{\CYRSHCH}
+\DeclareUnicodeCharacter{042A}{\CYRHRDSN}
+\DeclareUnicodeCharacter{042B}{\CYRERY}
+\DeclareUnicodeCharacter{042C}{\CYRSFTSN}
+\DeclareUnicodeCharacter{042D}{\CYREREV}
+\DeclareUnicodeCharacter{042E}{\CYRYU}
+\DeclareUnicodeCharacter{042F}{\CYRYA}
+\DeclareUnicodeCharacter{0430}{\cyra}
+\DeclareUnicodeCharacter{0431}{\cyrb}
+\DeclareUnicodeCharacter{0432}{\cyrv}
+\DeclareUnicodeCharacter{0433}{\cyrg}
+\DeclareUnicodeCharacter{0434}{\cyrd}
+\DeclareUnicodeCharacter{0435}{\cyre}
+\DeclareUnicodeCharacter{0436}{\cyrzh}
+\DeclareUnicodeCharacter{0437}{\cyrz}
+\DeclareUnicodeCharacter{0438}{\cyri}
+\DeclareUnicodeCharacter{0439}{\cyrishrt}
+\DeclareUnicodeCharacter{043A}{\cyrk}
+\DeclareUnicodeCharacter{043B}{\cyrl}
+\DeclareUnicodeCharacter{043C}{\cyrm}
+\DeclareUnicodeCharacter{043D}{\cyrn}
+\DeclareUnicodeCharacter{043E}{\cyro}
+\DeclareUnicodeCharacter{043F}{\cyrp}
+\DeclareUnicodeCharacter{0440}{\cyrr}
+\DeclareUnicodeCharacter{0441}{\cyrs}
+\DeclareUnicodeCharacter{0442}{\cyrt}
+\DeclareUnicodeCharacter{0443}{\cyru}
+\DeclareUnicodeCharacter{0444}{\cyrf}
+\DeclareUnicodeCharacter{0445}{\cyrh}
+\DeclareUnicodeCharacter{0446}{\cyrc}
+\DeclareUnicodeCharacter{0447}{\cyrch}
+\DeclareUnicodeCharacter{0448}{\cyrsh}
+\DeclareUnicodeCharacter{0449}{\cyrshch}
+\DeclareUnicodeCharacter{044A}{\cyrhrdsn}
+\DeclareUnicodeCharacter{044B}{\cyrery}
+\DeclareUnicodeCharacter{044C}{\cyrsftsn}
+\DeclareUnicodeCharacter{044D}{\cyrerev}
+\DeclareUnicodeCharacter{044E}{\cyryu}
+\DeclareUnicodeCharacter{044F}{\cyrya}
+\DeclareUnicodeCharacter{0450}{\@tabacckludge`\cyre}
+\DeclareUnicodeCharacter{0451}{\cyryo}
+%</all,x2,t2c,t2b,t2a,ot2,lcy>
+%<all,x2,t2a,ot2>\DeclareUnicodeCharacter{0452}{\cyrdje}
+%<*all,x2,t2c,t2b,t2a,ot2,lcy>
+\DeclareUnicodeCharacter{0453}{\@tabacckludge'\cyrg}
+%</all,x2,t2c,t2b,t2a,ot2,lcy>
+%<all,x2,t2a,ot2,lcy>\DeclareUnicodeCharacter{0454}{\cyrie}
+%<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0455}{\cyrdze}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{0456}{\cyrii}
+%<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0457}{\cyryi}
+%<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0458}{\cyrje}
+%<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{0459}{\cyrlje}
+%<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{045A}{\cyrnje}
+%<all,x2,t2a,ot2>\DeclareUnicodeCharacter{045B}{\cyrtshe}
+%<*all,x2,t2c,t2b,t2a,ot2,lcy>
+\DeclareUnicodeCharacter{045C}{\@tabacckludge'\cyrk}
+\DeclareUnicodeCharacter{045D}{\@tabacckludge`\cyri}
+%</all,x2,t2c,t2b,t2a,ot2,lcy>
+%<all,x2,t2b,t2a,lcy>\DeclareUnicodeCharacter{045E}{\cyrushrt}
+%<all,x2,t2c,t2a,ot2>\DeclareUnicodeCharacter{045F}{\cyrdzhe}
+%<all,x2,ot2>\DeclareUnicodeCharacter{0462}{\CYRYAT}
+%<all,x2,ot2>\DeclareUnicodeCharacter{0463}{\cyryat}
+%<all,x2>\DeclareUnicodeCharacter{046A}{\CYRBYUS}
+%<all,x2>\DeclareUnicodeCharacter{046B}{\cyrbyus}
+% \end{macrocode}
+% The next two declarations are questionable, the encoding definition
+% should probably contain |\CYROTLD| and |\cyrotld|. Or alternatively, if
+% the characters in the X2 encodings are really meant to represent the
+% historical characters in Ux0472 and Ux0473 (they look like them) then
+% they would need to change instead.
+%
+% However, their looks are probably a font designers decision and the next
+% two mappings are wrong or rather the names in OT2 should change for
+% consistency.
+%
+% On the other hand the names |\CYROTLD| are somewhat questionabled as the
+% Unicode standard only describes ``Cyrillic barred O'' while |TLD| refers
+% to a tilde (which is more less what the ``Cyrillic FITA looks according
+% to the Unicode book).
+% \begin{macrocode}
+%<all,ot2>\DeclareUnicodeCharacter{0472}{\CYRFITA}
+%<all,ot2>\DeclareUnicodeCharacter{0473}{\cyrfita}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<all,x2,ot2>\DeclareUnicodeCharacter{0474}{\CYRIZH}
+%<all,x2,ot2>\DeclareUnicodeCharacter{0475}{\cyrizh}
+% \end{macrocode}
+% While the double grave accent seems to exist in X2, T2A, T2B and T2C
+% encoding, the letter izhitsa exists only in X2 and OT2. Therefore,
+% izhitsa with double grave seems to be possible only using X2.
+% \begin{macrocode}
+%<all,x2>\DeclareUnicodeCharacter{0476}{\C\CYRIZH}
+%<all,x2>\DeclareUnicodeCharacter{0477}{\C\cyrizh}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<all,t2c>\DeclareUnicodeCharacter{048C}{\CYRSEMISFTSN}
+%<all,t2c>\DeclareUnicodeCharacter{048D}{\cyrsemisftsn}
+%<all,t2c>\DeclareUnicodeCharacter{048E}{\CYRRTICK}
+%<all,t2c>\DeclareUnicodeCharacter{048F}{\cyrrtick}
+%<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0490}{\CYRGUP}
+%<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0491}{\cyrgup}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0492}{\CYRGHCRS}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0493}{\cyrghcrs}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{0494}{\CYRGHK}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{0495}{\cyrghk}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0496}{\CYRZHDSC}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0497}{\cyrzhdsc}
+%<all,x2,t2a>\DeclareUnicodeCharacter{0498}{\CYRZDSC}
+%<all,x2,t2a>\DeclareUnicodeCharacter{0499}{\cyrzdsc}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{049A}{\CYRKDSC}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{049B}{\cyrkdsc}
+%<all,x2,t2a>\DeclareUnicodeCharacter{049C}{\CYRKVCRS}
+%<all,x2,t2a>\DeclareUnicodeCharacter{049D}{\cyrkvcrs}
+%<all,x2,t2c>\DeclareUnicodeCharacter{049E}{\CYRKHCRS}
+%<all,x2,t2c>\DeclareUnicodeCharacter{049F}{\cyrkhcrs}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04A0}{\CYRKBEAK}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04A1}{\cyrkbeak}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04A2}{\CYRNDSC}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04A3}{\cyrndsc}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04A4}{\CYRNG}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04A5}{\cyrng}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04A6}{\CYRPHK}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04A7}{\cyrphk}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04A8}{\CYRABHHA}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04A9}{\cyrabhha}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04AA}{\CYRSDSC}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04AB}{\cyrsdsc}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04AC}{\CYRTDSC}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04AD}{\cyrtdsc}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04AE}{\CYRY}
+%<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04AF}{\cyry}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04B0}{\CYRYHCRS}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04B1}{\cyryhcrs}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B2}{\CYRHDSC}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B3}{\cyrhdsc}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04B4}{\CYRTETSE}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04B5}{\cyrtetse}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B6}{\CYRCHRDSC}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B7}{\cyrchrdsc}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04B8}{\CYRCHVCRS}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04B9}{\cyrchvcrs}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04BA}{\CYRSHHA}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04BB}{\cyrshha}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04BC}{\CYRABHCH}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04BD}{\cyrabhch}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04BE}{\CYRABHCHDSC}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04BF}{\cyrabhchdsc}
+% \end{macrocode}
+% The character |\CYRpalochka| is not defined by OT2 and LCY. However it is
+% looking identical to |\CYRII| and the Unicode standard explicitly refers
+% to that (and to Latin I). So perhaps those encodings could get an alias?
+% On the other hand, why are there two distinct slots in the T2 encodings
+% even though they are so pressed for space? Perhaps they don't always look
+% alike.
+% \begin{macrocode}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04C0}{\CYRpalochka}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04C1}{\U\CYRZH}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04C2}{\U\cyrzh}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04C3}{\CYRKHK}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04C4}{\cyrkhk}
+% \end{macrocode}
+% According to the Unicode standard Ux04C5 should be an L with ``tail'' not
+% with descender (which also exists as Ux04A2) but it looks as if the char
+% names do not make this distinction). Should they?
+% \begin{macrocode}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C5}{\CYRLDSC}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C6}{\cyrldsc}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C7}{\CYRNHK}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C8}{\cyrnhk}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04CB}{\CYRCHLDSC}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04CC}{\cyrchldsc}
+% \end{macrocode}
+% According to the Unicode standard Ux04CD should be an M with ``tail'' not
+% with descender. However this time there is no M with descender in the
+% Unicode standard.
+% \begin{macrocode}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04CD}{\CYRMDSC}
+%<all,x2,t2c>\DeclareUnicodeCharacter{04CE}{\cyrmdsc}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D0}{\U\CYRA}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D1}{\U\cyra}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D2}{\"\CYRA}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D3}{\"\cyra}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04D4}{\CYRAE}
+%<all,x2,t2a>\DeclareUnicodeCharacter{04D5}{\cyrae}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D6}{\U\CYRE}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D7}{\U\cyre}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04D8}{\CYRSCHWA}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04D9}{\cyrschwa}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04DA}{\"\CYRSCHWA}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04DB}{\"\cyrschwa}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DC}{\"\CYRZH}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DD}{\"\cyrzh}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DE}{\"\CYRZ}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DF}{\"\cyrz}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04E0}{\CYRABHDZE}
+%<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04E1}{\cyrabhdze}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E2}{\@tabacckludge=\CYRI}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E3}{\@tabacckludge=\cyri}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E4}{\"\CYRI}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E5}{\"\cyri}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E6}{\"\CYRO}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E7}{\"\cyro}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04E8}{\CYROTLD}
+%<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04E9}{\cyrotld}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04EC}{\"\CYREREV}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04ED}{\"\cyrerev}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04EE}{\@tabacckludge=\CYRU}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04EF}{\@tabacckludge=\cyru}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F0}{\"\CYRU}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F1}{\"\cyru}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F2}{\H\CYRU}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F3}{\H\cyru}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F4}{\"\CYRCH}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F5}{\"\cyrch}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04F6}{\CYRGDSC}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04F7}{\cyrgdsc}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F8}{\"\CYRERY}
+%<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F9}{\"\cyrery}
+%<all,t2b>\DeclareUnicodeCharacter{04FA}{\CYRGDSCHCRS}
+%<all,t2b>\DeclareUnicodeCharacter{04FB}{\cyrgdschcrs}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04FC}{\CYRHHK}
+%<all,x2,t2b>\DeclareUnicodeCharacter{04FD}{\cyrhhk}
+%<all,t2b>\DeclareUnicodeCharacter{04FE}{\CYRHHCRS}
+%<all,t2b>\DeclareUnicodeCharacter{04FF}{\cyrhhcrs}
+%<all,ts1>\DeclareUnicodeCharacter{0E3F}{\textbaht}
+%<all,t1>\DeclareUnicodeCharacter{1E02}{\.B}
+%<all,t1>\DeclareUnicodeCharacter{1E03}{\.b}
+%<all,t1>\DeclareUnicodeCharacter{1E9E}{\SS}
+%<all,x2,t2c,t2b,t2a,t1,utf8>\DeclareUnicodeCharacter{200C}{\textcompwordmark}
+% \end{macrocode}
+% \changes{v1.1s}{2016/02/28}{Add more hyphens and dashes}
+% \begin{macrocode}
+%<all,t1>\DeclareUnicodeCharacter{2010}{-}
+%<all,t1>\DeclareUnicodeCharacter{2011}{\mbox{-}}
+% \end{macrocode}
+% U+2012 should be the width of a digit, endash is OK in many fonts including cm.
+% \begin{macrocode}
+%<all,t1>\DeclareUnicodeCharacter{2012}{\textendash}
+%<*all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
+\DeclareUnicodeCharacter{2013}{\textendash}
+\DeclareUnicodeCharacter{2014}{\textemdash}
+% \end{macrocode}
+% U+2015 is Horizontal bar
+% \begin{macrocode}
+%<all,t1>\DeclareUnicodeCharacter{2015}{\textemdash}
+%</all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
+%<all,ts1>\DeclareUnicodeCharacter{2016}{\textbardbl}
+%<*all,x2,t2c,t2b,t2a,t1,ot2,ot1,lcy>
+\DeclareUnicodeCharacter{2018}{\textquoteleft}
+\DeclareUnicodeCharacter{2019}{\textquoteright}
+%</all,x2,t2c,t2b,t2a,t1,ot2,ot1,lcy>
+%<all,t1>\DeclareUnicodeCharacter{201A}{\quotesinglbase}
+%<*all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
+\DeclareUnicodeCharacter{201C}{\textquotedblleft}
+\DeclareUnicodeCharacter{201D}{\textquotedblright}
+%</all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
+%<all,x2,t2c,t2b,t2a,t1,lcy>\DeclareUnicodeCharacter{201E}{\quotedblbase}
+%<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2020}{\textdagger}
+%<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2021}{\textdaggerdbl}
+%<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2022}{\textbullet}
+%<all,ly1,utf8>\DeclareUnicodeCharacter{2026}{\textellipsis}
+%<*all,x2,ts1,t2c,t2b,t2a,t1,ly1>
+\DeclareUnicodeCharacter{2030}{\textperthousand}
+%</all,x2,ts1,t2c,t2b,t2a,t1,ly1>
+%<*all,x2,ts1,t2c,t2b,t2a,t1>
+\DeclareUnicodeCharacter{2031}{\textpertenthousand}
+%</all,x2,ts1,t2c,t2b,t2a,t1>
+%<all,t1,ly1>\DeclareUnicodeCharacter{2039}{\guilsinglleft}
+%<all,t1,ly1>\DeclareUnicodeCharacter{203A}{\guilsinglright}
+%<all,ts1>\DeclareUnicodeCharacter{203B}{\textreferencemark}
+%<all,ts1>\DeclareUnicodeCharacter{203D}{\textinterrobang}
+%<all,ts1>\DeclareUnicodeCharacter{2044}{\textfractionsolidus}
+%<all,ts1>\DeclareUnicodeCharacter{204E}{\textasteriskcentered}
+%<all,ts1>\DeclareUnicodeCharacter{2052}{\textdiscount}
+%<all,ts1>\DeclareUnicodeCharacter{20A1}{\textcolonmonetary}
+%<all,ts1>\DeclareUnicodeCharacter{20A4}{\textlira}
+%<all,ts1>\DeclareUnicodeCharacter{20A6}{\textnaira}
+%<all,ts1>\DeclareUnicodeCharacter{20A9}{\textwon}
+%<all,ts1>\DeclareUnicodeCharacter{20AB}{\textdong}
+%<all,ts1>\DeclareUnicodeCharacter{20AC}{\texteuro}
+%<all,ts1>\DeclareUnicodeCharacter{20B1}{\textpeso}
+%<all,ts1>\DeclareUnicodeCharacter{2103}{\textcelsius}
+%<all,x2,ts1,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{2116}{\textnumero}
+%<all,ts1>\DeclareUnicodeCharacter{2117}{\textcircledP}
+%<all,ts1>\DeclareUnicodeCharacter{211E}{\textrecipe}
+%<all,ts1>\DeclareUnicodeCharacter{2120}{\textservicemark}
+%<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{2122}{\texttrademark}
+%<all,ts1>\DeclareUnicodeCharacter{2126}{\textohm}
+%<all,ts1>\DeclareUnicodeCharacter{2127}{\textmho}
+%<all,ts1>\DeclareUnicodeCharacter{212E}{\textestimated}
+%<all,ts1>\DeclareUnicodeCharacter{2190}{\textleftarrow}
+%<all,ts1>\DeclareUnicodeCharacter{2191}{\textuparrow}
+%<all,ts1>\DeclareUnicodeCharacter{2192}{\textrightarrow}
+%<all,ts1>\DeclareUnicodeCharacter{2193}{\textdownarrow}
+%<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{2329}{\textlangle}
+%<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{232A}{\textrangle}
+%<all,ts1>\DeclareUnicodeCharacter{2422}{\textblank}
+%<all,x2,t2c,t2b,t2a,t1,utf8>\DeclareUnicodeCharacter{2423}{\textvisiblespace}
+%<all,ts1>\DeclareUnicodeCharacter{25E6}{\textopenbullet}
+%<all,ts1>\DeclareUnicodeCharacter{25EF}{\textbigcircle}
+%<all,ts1>\DeclareUnicodeCharacter{266A}{\textmusicalnote}
+% \end{macrocode}
+% \changes{v1.2h}{2019/02/07}{Added 27E8 and 27E9 (github/110)}
+% \begin{macrocode}
+%<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{27E8}{\textlangle}
+%<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{27E9}{\textrangle}
+%<all,t1>\DeclareUnicodeCharacter{1E20}{\@tabacckludge=G}
+%<all,t1>\DeclareUnicodeCharacter{1E21}{\@tabacckludge=g}
+% \end{macrocode}
+%
+% When doing cut-and-paste from other documents f-ligatures might show
+% up as Unicode characters. We translate them back to individual
+% characters so that they get accepted. If supported by the font
+% (which is normally the case) they are then reconstructed as
+% ligatures so they come out as desired. Otherwise they will come
+% out as individual characters which is fine too.
+% \changes{v1.2j}{2019/07/11}{Add typical f-ligatures and st (github/154)}
+% \begin{macrocode}
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB00}{ff} % ff
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB01}{fi} % fi
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB02}{fl} % fl
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB03}{ffi} % ffi
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB04}{ffl} % ffl
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB05}{ft} % ſt
+%<all,t1,ot1,ly1,t2a,t2b,t2c>\DeclareUnicodeCharacter{FB06}{st} % st
+% \end{macrocode}
+%
+%
+% \changes{v1.2c}{2018/04/05}{Add BOM}
+% \begin{macrocode}
+%<all,ts1,utf8>\DeclareUnicodeCharacter{FEFF}{\ifhmode\nobreak\fi}
+% \end{macrocode}
+%
+%
+% \endgroup
+% \subsection{Notes}
+%
+% \changes{v1.1e}{2004/05/22}{Added notes on inconsistency with `8-bit files'.}
+% The following inputs are inconsistent with the 8-bit inputenc files
+% since they will always only produce the `text character'. This is an
+% area where inputenc is notoriously confused.
+% \begin{verbatim}
+% %<all,ts1,t1,ot1,ly1>\DeclareUnicodeCharacter{00A3}{\textsterling}
+% %<*all,x2,ts1,t2c,t2b,t2a,oms,ly1>
+% \DeclareUnicodeCharacter{00A7}{\textsection}
+% %</all,x2,ts1,t2c,t2b,t2a,oms,ly1>
+% %<all,ts1,utf8>\DeclareUnicodeCharacter{00A9}{\textcopyright}
+% %<all,ts1>\DeclareUnicodeCharacter{00B1}{\textpm}
+% %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{00B6}{\textparagraph}
+% %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2020}{\textdagger}
+% %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2021}{\textdaggerdbl}
+% %<all,ly1,utf8>\DeclareUnicodeCharacter{2026}{\textellipsis}
+% \end{verbatim}
+%
+% The following definitions are in an encoding file but have no
+% direct equivalent in Unicode, or they simply do not make sense in that
+% context (or we have not yet found anything or \ldots :-). For
+% example, the non-combining accent characters are certainly
+% available somewhere but these are not equivalent to a \TeX{}
+% accent command.
+%\begin{verbatim}
+%\DeclareTextSymbol{\j}{OT1}{17}
+%\DeclareTextSymbol{\SS}{T1}{223}
+%\DeclareTextSymbol{\textcompwordmark}{T1}{23}
+%
+%\DeclareTextAccent{\"}{OT1}{127}
+%\DeclareTextAccent{\'}{OT1}{19}
+%\DeclareTextAccent{\.}{OT1}{95}
+%\DeclareTextAccent{\=}{OT1}{22}
+%\DeclareTextAccent{\H}{OT1}{125}
+%\DeclareTextAccent{\^}{OT1}{94}
+%\DeclareTextAccent{\`}{OT1}{18}
+%\DeclareTextAccent{\r}{OT1}{23}
+%\DeclareTextAccent{\u}{OT1}{21}
+%\DeclareTextAccent{\v}{OT1}{20}
+%\DeclareTextAccent{\~}{OT1}{126}
+%\DeclareTextCommand{\b}{OT1}[1]
+%\DeclareTextCommand{\c}{OT1}[1]
+%\DeclareTextCommand{\d}{OT1}[1]
+%\DeclareTextCommand{\k}{T1}[1]
+%\end{verbatim}
+%
+%
+%
+% \subsection{Mappings for OT1 glyphs}
+%
+% This is even more incomplete as again it covers only the single
+% glyphs from |OT1| plus some that have been explicitly defined for
+% this encoding. Everything that is provided in |T1|, and that
+% could be provided as composite glyphs via |OT1|, could and
+% probably should be set up as well. Which leaves the many things
+% that are not provided in |T1| but can be provided in |OT1| (and
+% in |T1|) by composite glyphs.
+%
+% Stuff not mapped (note that |\j| ($\jmath$) is not equivalent to any
+% Unicode character):
+%\begin{verbatim}
+%\DeclareTextSymbol{\j}{OT1}{17}
+%\DeclareTextAccent{\"}{OT1}{127}
+%\DeclareTextAccent{\'}{OT1}{19}
+%\DeclareTextAccent{\.}{OT1}{95}
+%\DeclareTextAccent{\=}{OT1}{22}
+%\DeclareTextAccent{\^}{OT1}{94}
+%\DeclareTextAccent{\`}{OT1}{18}
+%\DeclareTextAccent{\~}{OT1}{126}
+%\DeclareTextAccent{\H}{OT1}{125}
+%\DeclareTextAccent{\u}{OT1}{21}
+%\DeclareTextAccent{\v}{OT1}{20}
+%\DeclareTextAccent{\r}{OT1}{23}
+%\DeclareTextCommand{\b}{OT1}[1]
+%\DeclareTextCommand{\c}{OT1}[1]
+%\DeclareTextCommand{\d}{OT1}[1]
+%\end{verbatim}
+%
+%
+%
+% \subsection{Mappings for OMS glyphs}
+%
+% Characters like |\textbackslash| are not mapped as they are
+% (primarily) only in the lower 127 and the code here only sets up
+% mappings for UTF-8 characters that are at least 2 octets long.
+%\begin{verbatim}
+%\DeclareTextSymbol{\textbackslash}{OMS}{110} % "6E
+%\DeclareTextSymbol{\textbar}{OMS}{106} % "6A
+%\DeclareTextSymbol{\textbraceleft}{OMS}{102} % "66
+%\DeclareTextSymbol{\textbraceright}{OMS}{103} % "67
+%\end{verbatim}
+%
+% But the following (and some others) might actually lurk in Unicode
+% somewhere\ldots
+%\begin{verbatim}
+%\DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03
+%\DeclareTextCommand{\textcircled}{OMS}
+%\end{verbatim}
+%
+%
+%
+%
+% \subsection{Mappings for TS1 glyphs}
+%
+% Exercise for somebody else.
+%
+%
+% \subsection{Mappings for \texttt{latex.ltx} glyphs}
+%
+% There is also a collection of characters already set up in the kernel,
+% one way or the other. Since these do not clearly relate to any
+% particular font encoding they are mapped when the
+% \texttt{utf8} support is first set up.
+%
+% Also there are a number of |\providecommand|s in the various input
+% encoding files which may or may not go into this part.
+% \changes{v1.1b}{2004/02/09}{Added commands already defined in the kernel}
+% \begin{macrocode}
+%<*utf8>
+% This space is intentionally empty ...
+%</utf8>
+% \end{macrocode}
+%
+% \subsection{Old \texttt{utf8.def} file as a temp fix for p\TeX{} and friends}
+%
+%
+% \changes{v1.2h}{2019/07/09}{Temp rollback fix for e-pTeX}
+% \begin{macrocode}
+%<*utf8-2018>
+\ProvidesFile{utf8.def}
+ [2018/10/05 v1.2f UTF-8 support for inputenc]
+\makeatletter
+\catcode`\ \saved@space@catcode
+\long\def\UTFviii@two@octets#1#2{\expandafter
+ \UTFviii@defined\csname u8:#1\string#2\endcsname}
+\long\def\UTFviii@three@octets#1#2#3{\expandafter
+ \UTFviii@defined\csname u8:#1\string#2\string#3\endcsname}
+\long\def\UTFviii@four@octets#1#2#3#4{\expandafter
+ \UTFviii@defined\csname u8:#1\string#2\string#3\string#4\endcsname}
+\def\UTFviii@defined#1{%
+ \ifx#1\relax
+ \if\relax\expandafter\UTFviii@checkseq\string#1\relax\relax
+ \UTFviii@undefined@err{#1}%
+ \else
+ \PackageError{inputenc}{Invalid UTF-8 byte sequence}%
+ \UTFviii@invalid@help
+ \fi
+ \else\expandafter
+ #1%
+ \fi
+}
+\def\UTFviii@invalid@err#1{%
+ \PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii@hexnumber{`#1}}%
+ \UTFviii@invalid@help}
+\def\UTFviii@invalid@help{%
+ The document does not appear to be in UTF-8 encoding.\MessageBreak
+ Try adding \noexpand\UseRawInputEncoding as the first line of the file\MessageBreak
+ or specify an encoding such as \noexpand\usepackage[latin1]{inputenc}\MessageBreak
+ in the document preamble.\MessageBreak
+ Alternatively, save the file in UTF-8 using your editor or another tool}
+\def\UTFviii@undefined@err#1{%
+ \PackageError{inputenc}{Unicode character \expandafter
+ \UTFviii@splitcsname\string#1\relax
+ \MessageBreak
+ not set up for use with LaTeX}%
+ {You may provide a definition with\MessageBreak
+ \noexpand\DeclareUnicodeCharacter}%
+ }
+\def\UTFviii@checkseq#1:#2#3{%
+ \ifnum`#2<"80 %
+ \ifx\relax#3\else1\fi
+ \else
+ \ifnum`#2<"C0 %
+ 1 %
+ \else
+ \expandafter\expandafter\expandafter\UTFviii@check@continue
+ \expandafter\expandafter\expandafter#3%
+ \fi
+ \fi}
+\def\UTFviii@check@continue#1{%
+ \ifx\relax#1%
+ \else
+ \ifnum`#1<"80 1\else\ifnum`#1>"BF 1\fi\fi
+ \expandafter\UTFviii@check@continue
+ \fi
+}
+\begingroup
+\catcode`\~13
+\catcode`\"12
+\def\UTFviii@loop{%
+ \uccode`\~\count@
+ \uppercase\expandafter{\UTFviii@tmp}%
+ \advance\count@\@ne
+ \ifnum\count@<\@tempcnta
+ \expandafter\UTFviii@loop
+ \fi}
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@undefined@err{:\string~}}}
+ \count@"1
+ \@tempcnta9
+\UTFviii@loop
+ \count@11
+ \@tempcnta12
+\UTFviii@loop
+ \count@14
+ \@tempcnta32
+\UTFviii@loop
+ \count@"80
+ \@tempcnta"C2
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}}
+\UTFviii@loop
+ \count@"C2
+ \@tempcnta"E0
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\string~}}
+\UTFviii@loop
+ \count@"E0
+ \@tempcnta"F0
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\string~}}
+\UTFviii@loop
+ \count@"F0
+ \@tempcnta"F5
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\string~}}
+\UTFviii@loop
+ \count@"F5
+ \@tempcnta"100
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}}
+\UTFviii@loop
+\endgroup
+\@inpenc@test
+\ifx\@begindocumenthook\@undefined
+ \makeatother
+ \endinput \fi
+\begingroup
+\catcode`\"=12
+\catcode`\<=12
+\catcode`\.=12
+\catcode`\,=12
+\catcode`\;=12
+\catcode`\!=12
+\catcode`\~=13
+\gdef\DeclareUnicodeCharacter#1#2{%
+ \count@"#1\relax
+ \wlog{ \space\space defining Unicode char U+#1 (decimal \the\count@)}%
+ \begingroup
+ \parse@XML@charref
+ \def\UTFviii@two@octets##1##2{\csname u8:##1\string##2\endcsname}%
+ \def\UTFviii@three@octets##1##2##3{\csname u8:##1%
+ \string##2\string##3\endcsname}%
+ \def\UTFviii@four@octets##1##2##3##4{\csname u8:##1%
+ \string##2\string##3\string##4\endcsname}%
+ \expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter
+ \expandafter
+ \gdef\UTFviii@tmp{\IeC{#2}}%
+ \endgroup
+}
+\gdef\parse@XML@charref{%
+ \ifnum\count@<"A0\relax
+ \ifnum\catcode\count@=13
+ \uccode`\~=\count@\uppercase{\def\UTFviii@tmp{\@empty\@empty~}}%
+ \else
+ \PackageError{inputenc}%
+ {Cannot define non-active Unicode char value < 00A0}%
+ \@eha
+ \def\UTFviii@tmp{\UTFviii@tmp}%
+ \fi
+ \else\ifnum\count@<"800\relax
+ \parse@UTFviii@a,%
+ \parse@UTFviii@b C\UTFviii@two@octets.,%
+ \else\ifnum\count@<"10000\relax
+ \parse@UTFviii@a;%
+ \parse@UTFviii@a,%
+ \parse@UTFviii@b E\UTFviii@three@octets.{,;}%
+ \else
+ \ifnum\count@>"10FFFF\relax
+ \PackageError{inputenc}%
+ {\UTFviii@hexnumber\count@\space too large for Unicode}%
+ {Values between 0 and 10FFFF are permitted}%
+ \fi
+ \parse@UTFviii@a;%
+ \parse@UTFviii@a,%
+ \parse@UTFviii@a!%
+ \parse@UTFviii@b F\UTFviii@four@octets.{!,;}%
+ \fi
+ \fi
+ \fi
+}
+\gdef\parse@UTFviii@a#1{%
+ \@tempcnta\count@
+ \divide\count@ 64
+ \@tempcntb\count@
+ \multiply\count@ 64
+ \advance\@tempcnta-\count@
+ \advance\@tempcnta 128
+ \uccode`#1\@tempcnta
+ \count@\@tempcntb}
+\gdef\parse@UTFviii@b#1#2#3#4{%
+ \advance\count@ "#10\relax
+ \uccode`#3\count@
+ \uppercase{\gdef\UTFviii@tmp{#2#3#4}}}
+\ifx\numexpr\@undefined
+\gdef\decode@UTFviii#1{0}
+\else
+\gdef\decode@UTFviii#1\relax{%
+ \expandafter\UTFviii@cleanup
+ \the\numexpr\dec@de@UTFviii#1\relax)))))\@empty}
+\gdef\UTFviii@cleanup#1)#2\@empty{#1}
+\gdef\dec@de@UTFviii#1{%
+\ifx\relax#1%
+\else
+ \ifnum`#1>"EF
+ ((((`#1-"F0)%
+ \else
+ \ifnum`#1>"DF
+ (((`#1-"E0)%
+ \else
+ \ifnum`#1>"BF
+ ((`#1-"C0)%
+ \else
+ \ifnum`#1>"7F
+ )*64+(`#1-"80)%
+ \else
+ +`#1 %
+ \fi
+ \fi
+ \fi
+ \fi
+ \expandafter\dec@de@UTFviii
+\fi}
+\fi
+\ifx\numexpr\@undefined
+\global\let\UTFviii@hexnumber\@firstofone
+\global\UTFviii@hexdigit\hexnumber@
+\else
+\gdef\UTFviii@hexnumber#1{%
+\ifnum#1>15 %
+\expandafter\UTFviii@hexnumber\expandafter{\the\numexpr(#1-8)/16\relax}%
+\fi
+\UTFviii@hexdigit{\numexpr#1\ifnum#1>0-((#1-8)/16)*16\fi\relax}%
+}
+\gdef\UTFviii@hexdigit#1{\ifcase\numexpr#1\relax
+ 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or
+ A\or B\or C\or D\or E\or F\fi}
+\fi
+\gdef\UTFviii@hexcodepoint#1{U+%
+ \ifnum#1<16 0\fi
+ \ifnum#1<256 0\fi
+ \ifnum#1<4096 0\fi
+ \UTFviii@hexnumber{#1}%
+}%
+\gdef\UTFviii@splitcsname#1:#2\relax{%
+#2 (\expandafter\UTFviii@hexcodepoint\expandafter{%
+ \the\numexpr\decode@UTFviii#2\relax})%
+}
+\endgroup
+\@onlypreamble\DeclareUnicodeCharacter
+\@onlypreamble\parse@XML@charref
+\@onlypreamble\parse@UTFviii@a
+\@onlypreamble\parse@UTFviii@b
+\begingroup
+ \def\cdp@elt#1#2#3#4{%
+ \wlog{Now handling font encoding #1 ...}%
+ \lowercase{%
+ \InputIfFileExists{#1enc.dfu}}%
+ {\wlog{... processing UTF-8 mapping file for font %
+ encoding #1}%
+ \catcode`\ 9\relax}%
+ {\wlog{... no UTF-8 mapping file for font encoding #1}}%
+ }
+ \cdp@list
+\endgroup
+\def\DeclareFontEncoding@#1#2#3{%
+ \expandafter
+ \ifx\csname T@#1\endcsname\relax
+ \def\cdp@elt{\noexpand\cdp@elt}%
+ \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
+ {\default@family}{\default@series}%
+ {\default@shape}}%
+ \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
+ \begingroup
+ \wlog{Now handling font encoding #1 ...}%
+ \lowercase{%
+ \InputIfFileExists{#1enc.dfu}}%
+ {\wlog{... processing UTF-8 mapping file for font %
+ encoding #1}}%
+ {\wlog{... no UTF-8 mapping file for font encoding #1}}%
+ \endgroup
+ \else
+ \@font@info{Redeclaring font encoding #1}%
+ \fi
+ \global\@namedef{T@#1}{#2}%
+ \global\@namedef{M@#1}{\default@M#3}%
+ \xdef\LastDeclaredEncoding{#1}%
+ }
+\DeclareUnicodeCharacter{00A9}{\textcopyright}
+\DeclareUnicodeCharacter{00AA}{\textordfeminine}
+\DeclareUnicodeCharacter{00AE}{\textregistered}
+\DeclareUnicodeCharacter{00BA}{\textordmasculine}
+\DeclareUnicodeCharacter{02C6}{\textasciicircum}
+\DeclareUnicodeCharacter{02DC}{\textasciitilde}
+\DeclareUnicodeCharacter{200C}{\textcompwordmark}
+\DeclareUnicodeCharacter{2026}{\textellipsis}
+\DeclareUnicodeCharacter{2122}{\texttrademark}
+\DeclareUnicodeCharacter{2423}{\textvisiblespace}
+\DeclareUnicodeCharacter{FEFF}{\ifhmode\nobreak\fi}
+\endinput
+</utf8-2018>
+% \end{macrocode}
+%
+%
+% \section{A test document}
+%
+% Here is a very small test document which may or may not survive
+% if the current document is transferred from one place to the
+% other.
+% \begin{macrocode}
+%<*test>
+\documentclass{article}
+
+\usepackage[latin1,utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{trace}
+
+\scrollmode % to run past the error below
+
+\begin{document}
+
+ German umlauts in UTF-8: ^^c3^^a4^^c3^^b6^^c3^^bc %%% äöü
+
+\inputencoding{latin1} % switch to latin1
+
+ German umlauts in UTF-8 but read by latin1 (and will produce one
+ error since \verb=\textcurrency= is not provided):
+ ^^c3^^a4^^c3^^b6^^c3^^bc
+
+\inputencoding{utf8} % switch back to utf8
+
+ German umlauts in UTF-8: ^^c3^^a4^^c3^^b6^^c3^^bc
+
+
+Some codes that should produce errors as nothing is set up
+for them: ^^c3F ^^e1^^a4^^b6
+
+And some that are not legal utf8 sequences: ^^c3X ^^e1XY
+
+\showoutput
+\tracingstats=2
+\stop
+%</test>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/base/utf8ienc.pdf b/macros/latex-dev/base/utf8ienc.pdf
new file mode 100644
index 0000000000..62c50c5f0a
--- /dev/null
+++ b/macros/latex-dev/base/utf8ienc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/webcomp.err b/macros/latex-dev/base/webcomp.err
new file mode 100644
index 0000000000..f604d8ef35
--- /dev/null
+++ b/macros/latex-dev/base/webcomp.err
@@ -0,0 +1,381 @@
+\newcommand\erratafiledate{1999/06/05}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% To produce a printed version of this errata file run this file through
+% LaTeX. It will unpack a small class file (if not already present) and
+% a configuration file with the extension .cfg. You might want to modify
+% the setting in this configuration file to print only a partial errata
+% suitable for your printed revision of this book, see details in the
+% .cfg file.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\begin{filecontents}{ttcterrata.cls}
+%%
+%% Copyright (C) 1997,2004,2005,2007 Frank Mittelbach
+%% This class file is licenced under LPPL latest version;
+%% see https://www.latex-project.org/lppl
+%
+%
+% It sets up a few commands used to format the errata entries for books in the
+% Addison-Wesley Series:
+%
+% Tools and Techniques for Computer Typesetting
+%
+% hence the name. However, anybody who likes to use it is free to apply it for
+% errata files of other books.
+%
+% Changes:
+%
+% v1.0a - changed name from errata.cls to ttcterrata.cls
+
+\ProvidesClass{ttcterrata}
+ [2007/11/10 v1.0a Mini class for errata files; subject to change (FMi)]
+
+\LoadClass{article}
+
+\setcounter{secnumdepth}{-1}
+\addtolength\textwidth{5cm}
+\addtolength\oddsidemargin{-3cm}
+
+\addtolength\textheight{36pt}
+
+\RequirePackage{shortvrb}
+\MakeShortVerb{\|}
+
+\RequirePackage{array,longtable}
+\RequirePackage{multicol}
+
+
+\newcommand\erratagetnumber{}
+\def\erratagetnumber#1/#2/#3\erratagetnumber{#1#2#3}
+
+
+\newcommand\gobbleerrata{%
+ \setbox\@tempboxa\vbox\bgroup
+ \let\endgobble\egroup
+ \let\hideamp\relax
+ \let\\\relax\let\par\@@par}
+
+\newcommand*\hideamp{&}
+
+\let\endgobble\relax
+
+
+\newcommand\erratastartdate{}
+\newcommand\myprinting{1}
+
+
+\newcommand\doweprint[2]{%
+ \ifnum \myprinting < \if!#2!1000 \else \ifx s#2 1000\else#2 \fi\fi
+ \ifnum \expandafter\erratagetnumber\erratastartdate\erratagetnumber <
+ \erratagetnumber#1\erratagetnumber \relax
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \else
+ \@tempswafalse
+ \fi
+}
+
+
+
+\newcommand\includedentries{entries after = \erratastartdate}
+\newcommand\printedentries{between \erratastartdate\space and}
+
+\newcommand\showallerrors{%
+ \renewcommand\includedentries{all errata entries}%
+ \renewcommand\printedentries{up to}
+ \renewcommand\doweprint[2]{\@tempswatrue}}
+
+
+\newcommand\displayrevisionfix[2]{%
+ \if!#2!\textbf{#1}\else\textit{#1}\rlap{\textsuperscript{#2}}\fi}
+
+\newcommand\norevisionnumbers{%
+ \renewcommand\displayrevisionfix[2]{\textbf{##1}}}
+
+\IfFileExists{\jobname.cfg}
+ {
+ \input{\jobname.cfg}
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* Configuration file for \jobname.err found }
+ \typeout{*}
+ \typeout{***************************************************}
+ \AtEndDocument{
+ \typeout{***************************************************}
+ \typeout{*}
+ \typeout{* If you wish to generate an errata listing}
+ \typeout{* containing only errors found after a certain revision}
+ \typeout{* and/or only errors found after a certain date}
+ \typeout{* modify the information stored in \jobname.cfg}
+ \typeout{*}
+ \typeout{* Current settings are:}
+ \typeout{*}
+ \typeout{* \@spaces printing of your book = \myprinting}
+ \typeout{* \@spaces include \includedentries}
+ \typeout{*}
+ \typeout{***************************************************}
+ }}
+ {}
+
+%% \erroronpage <page> <line info> <contributor> <date> <fixed in revision>
+
+\newcommand\erroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\seriouserroronpage[5]{%
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\newcommand\CHAPTER[1]{\endgobble
+ &\\[4pt]%
+ \multicolumn{4}{l}{\framebox[10cm][l]{\textbf{\normalsize\strut#1}}} \\}
+
+\newenvironment{erratalist}
+ {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
+ {\endgobble\end{longtable}}
+
+\newcommand\erratatitle[2]
+ {\begin{center}\LARGE\bfseries
+ Errata list for #1\\[5pt](\myprinting.\ printing)\\[10pt]
+ \small Includes all entries found \printedentries\space #2\\
+ (For other periods/print runs reprocess this document
+ with different config settings)
+ \end{center}%
+ \markright{Errata for #1 (\printedentries\space #2)}%
+ \thispagestyle{plain}%
+ \vspace{20pt}}
+
+\pagestyle{myheadings}
+
+\AtBeginDocument{\small}
+
+\setlength\parindent{0pt}
+\setlength\parskip{2pt}
+
+\newcommand\contributor[2]{\makebox[1cm][l]{\sffamily#1} #2\par}
+
+% some special shortcuts overwriting existing commands:
+
+\let\u\underline
+\renewcommand\>{$\to$}
+
+%%% some code suggested by Thorsten Hansen to count the number of
+%%% contributions by individuals (will work only if we do not get
+%%% too many :-)
+
+\def\count@contributors#1/#2/#3\@nil{
+ \@ifundefined{c@#1}{\newcounter{#1}}{}\stepcounter{#1}%
+%%% also count secondary:
+%%% \@ifundefined{c@#2}{\newcounter{#2}}{}\stepcounter{#2}%
+}
+
+\renewcommand\erroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\seriouserroronpage[5]{%
+ \count@contributors#3/secondary/\@nil
+ \endgobble
+ \doweprint{#4}{#5}%
+ \if@tempswa
+ \typeout{Typesetting entry #1 #2 #3 #4}%
+ \else
+ \typeout{Ignoring entry #1 #2 #3 #4}%
+ \expandafter\gobbleerrata
+ \fi
+ \hideamp \\%
+ \fbox{\bfseries !!}\hfill
+ \displayrevisionfix{#1}{#5}
+ \hideamp #2 \hideamp (\textsf{#3}) \hideamp
+}
+
+\renewcommand\contributor[2]{\makebox[1cm][l]{%
+ \sffamily#1} #2\@ifundefined{c@#1}{}{ (\arabic{#1})}\par}
+
+\end{filecontents}
+
+
+\begin{filecontents}{\jobname.cfg}
+%
+%
+% Configuration file for the errata listing of
+%
+% The LaTeX Web Companion
+%
+%
+% \erratastartdate
+%
+% Specifies the date from which on
+% errata entries should be listed.
+%
+% The format is YYYY/MM/DD.
+%
+% The default below ensures that all
+% entries are typeset.
+%
+\renewcommand\erratastartdate{1999/05/01}
+
+%
+% \myprinting
+%
+% Specifies which (revised) printing you
+% own. For example, if you have the second
+% printing set this to 2 so that errors
+% already corrected in that printing will not
+% appear in your errata listing.
+%
+% The default below ensures that all
+% entries are typeset.
+%
+\renewcommand\myprinting{1}
+%
+%
+% \norevisionnumbers
+%
+% Specifies that all page numbers in the errata are shown in the same
+% format (bold face) irregardless of whether or not they are fixed
+% in some revision. The default is to print corrected errors in
+% italic and add the revision number as a superscript.
+%
+%
+% \showallerrors
+%
+% With this command you tell the program that all errata entries are
+% supposed to be generated. This makes \myprinting and
+% \erratastartdate basically obsolete so this isn't turned on by
+% default.
+%
+%
+\endinput
+\end{filecontents}
+
+
+
+\documentclass{ttcterrata}
+
+
+\begin{document}
+
+\erratatitle{The \LaTeX{} Web Companion}{\erratafiledate}
+
+
+\begin{verbatim}
+@book(A-W:GR99,
+ author = {Michel Goossens and Sebastian Rahtz},
+ title = {The {\LaTeX} Web Companion},
+ substitle = {Integrating {\TeX}, HTML, and XML},
+ series = "Tools and Techniques for Computer Typesetting",
+ publisher = {Addison-Wesley},
+ address = {Reading, Massachusetts},
+ year = 1999,
+ ISBN = "0-201-43311-7",
+ LCCN = "QA76.76.H94G66 1999",
+ pagenums = {xxii + 522},
+ source-infos = {yes},
+ bibliography = {yes},
+ index = {yes},
+ price = "US\$39.95",
+ note = "With Eitan M. Gurari and Ross Moore and Robert S.
+ Sutor.",
+)
+\end{verbatim}
+
+\begin{list}{}{\setlength\leftmargin{0cm}\setlength\rightmargin{5cm}}
+\item[]
+The latest version of this file (\texttt{\jobname.err}) can be found
+as part of the \LaTeX{} distribution.
+
+The first column in the table shows the page number of the errata
+entry. Superscript numbers in the first column refer to the printed
+revision in which this entry was corrected. The second column gives
+the precise location, negative line numbers are counted from the
+bottom of the page. The third column shows the first finder of the
+problem.
+
+\end{list}
+
+
+\begin{erratalist}
+
+%=======================================================================
+\CHAPTER{Chapter 6}
+
+\erroronpage{247}{3 para l.5}{MGo}{1999/06/05}{}
+ GenCod \> GenCode
+
+\CHAPTER{Appendix B}
+
+\erroronpage{418}{3 para}{MGo}{1999/06/05}{}
+ The \texttt{book} element types (lines 10--\u{15})
+
+\end{erratalist}
+
+
+
+%==========================================================================
+
+\bigskip
+
+
+\begin{multicols}{3}[Thanks to all who have found errors or
+ omissions. Listed are the people who found an errata entry first.]
+\contributor{MGo}{Michel Goossens}
+\end{multicols}
+
+
+If you find further errors please report them to one of the authors
+\begin{quote}\ttfamily
+ sebastian.rahtz@oucs.ox.ac.uk\\
+ goossens@cern.ch
+\end{quote}
+preferable in a form usable for this file, i.e.,
+\begin{flushleft}
+|\erroronpage{|\textit{page-number}|}{|\textit{line-identification}|}{|%
+ \textit{your-initials}|}{|\textit{date}|}{}| \\
+ \hspace*{2em}\textit{description of the the errata}
+\end{flushleft}
+Here is an example:
+\begin{verbatim}
+\erroronpage{4}{l.-7}{PMcJ}{1998/06/11}{}
+ surprisingly \> surprising
+\end{verbatim}
+
+
+\end{document}
diff --git a/macros/latex-dev/base/webcomp.pdf b/macros/latex-dev/base/webcomp.pdf
new file mode 100644
index 0000000000..063e429db7
--- /dev/null
+++ b/macros/latex-dev/base/webcomp.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/README-doc.md b/macros/latex-dev/doc/README-doc.md
new file mode 100644
index 0000000000..aaf48be918
--- /dev/null
+++ b/macros/latex-dev/doc/README-doc.md
@@ -0,0 +1,29 @@
+Documentation for the LaTeX kernel
+==================================
+
+Release 2019-10-01 pre-release 2
+
+Overview
+--------
+
+This bundle provides the core documentation supporting the LaTeX kernel.
+
+For historical reasons, the base distribution and the core documentation
+are bundled separately. Documentation is found in the `doc` bundle. In an
+installed TeX system, `base` and `doc` should be placed within the same
+location; the distinction is therefore primarily of importance when looking
+at the development code.
+
+License
+-------
+
+The contents of this bundle are distributed under the [LaTeX Project
+Public License](https://www.latex-project.org/lppl/lppl-1-3c/),
+version 1.3c or later.
+
+-----
+
+<p>Copyright (C) 2019 The LaTeX3 Project <br />
+<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
+All rights reserved.</p>
+
diff --git a/macros/latex-dev/doc/README.md b/macros/latex-dev/doc/README.md
new file mode 120000
index 0000000000..564c261ef5
--- /dev/null
+++ b/macros/latex-dev/doc/README.md
@@ -0,0 +1 @@
+README-doc.md \ No newline at end of file
diff --git a/macros/latex-dev/doc/cfgguide.pdf b/macros/latex-dev/doc/cfgguide.pdf
new file mode 100644
index 0000000000..9568b6fac1
--- /dev/null
+++ b/macros/latex-dev/doc/cfgguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/cfgguide.tex b/macros/latex-dev/doc/cfgguide.tex
new file mode 100644
index 0000000000..7ac0208ba4
--- /dev/null
+++ b/macros/latex-dev/doc/cfgguide.tex
@@ -0,0 +1,561 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: cfgguide.tex
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[1995/11/28]
+
+\newcommand{\filesection}[1]{\subsection{\sffamily{#1}}}
+\newcommand{\iniTeX}{ini\TeX}
+
+\setcounter{secnumdepth}{0}
+
+\title{Configuration options for \LaTeXe}
+
+\author{\copyright~Copyright 1998, 2001, 2003 \LaTeX3 Project Team.\\
+ All rights reserved.}
+
+\date{14 February 2003}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\newpage
+
+\section{Configuring \LaTeX}
+
+Since one of the main aims of the new standard \LaTeX{} is to give all
+users the freedom provided by a reliable document processing system
+linked to a highly portable document format, the number of
+configuration possibilities is strictly limited. The reasons for this
+are explained in more detail in the article
+\textit{Modifying \LaTeX{}} in the file \texttt{modguide.tex}.
+An important consequence of this is that any document that relies on
+any extension package must declare this package within the document
+file; this helps to ensure that the document will work at a different
+site, where the \LaTeX{} system may be configured differently.
+
+Local configuration options are, by convention, placed in
+`configuration files', which have extension |.cfg|. This document
+describes the possibilities for configuration in this release of
+\LaTeX; it also explains how to configure the font definition files to
+take advantage of the available fonts.
+
+The last section considers briefly how to proceed if you require
+further customisation of the formatter.
+
+
+\section{System configuration}
+
+\filesection{texsys.cfg}
+
+This is the only configuration file that \emph{must} be present.
+During installation, if \LaTeX\ cannot find a file with this name
+then a default file |texsys.cfg|, consisting entirely of comments, is
+written out and used. Note that, until this file has been read,
+\LaTeX{} is not able to test reliably whether a given file exists on
+the system.
+
+The contents of the file |texsys.cfg| allow \LaTeX{} to cope with
+various differences between the behaviours of different \TeX{} systems,
+mainly in relation to file handling. The default version of this file
+contains, in its comments, possible settings that may be needed for a
+range of \TeX{} systems. For more information, typeset the file
+|ltdirchk.dtx|.
+
+If you have copied your \LaTeX{} installation from a computer that
+used a different operating system then you may well have a version of
+|texsys.cfg| that will make it difficult to install \LaTeX{} on your
+system. If this happens then start the process again with an empty
+|texsys.cfg| file; this will produce an installation that should, at
+least, allow you to typeset the documentation. However, it is
+possible that \LaTeX{} can still find only those files that are in the
+current directory; in this case you must set the macro |\input@path|
+correctly for your system.
+
+
+\section{Configuring the \LaTeX\ format}
+
+There are four configuration files that enable personal preferences to
+be incorporated into the \LaTeX{} format file |latex.fmt|. The range
+of preferences that can be configured by these files is strictly
+limited as this helps to ensure document portability.
+
+All four files work in the same way: if the file \m{file}|.cfg| is
+found, it will be input by \iniTeX; otherwise a default file
+\m{file}|.ltx| will be input; this is sometimes done via a
+minimal \m{file}|.cfg| that simply inputs \m{file}|.ltx|. Thus,
+providing your own version of any of these |.cfg| files can completely
+override any settings in the corresponding default standard |.ltx|
+file.
+
+
+\subsection{Font configuration}
+
+Before you even think about configuring the font declarations by
+producing a file |fontmath.cfg| or |fonttext.cfg|, you should
+read the documented file |fontdef.dtx|. This is the source file from
+which the default files |fonttext.ltx| and |fontmath.ltx| are
+produced; it contains information concerning the
+contents of the default files and what sort of customisation is
+possible. In particular, it describes in detail the effects of
+individual customisations on document portability including: which
+customisations can be made without endangering the ability to exchange
+documents with other sites (even if the formatting differs); and which
+things should be left untouched because they will make your system so
+different from others that the documents it produces will be
+non-portable.
+
+\textbf{WARNING } Please note that use of either of these font
+configuration files has the following consequences.
+ \begin{itemize}
+ \item Since the content of the file |fontdef.dtx| \emph{might}
+ change in the future, anyone writing a font configuration file
+ must be prepared to update it for use with future releases.
+ \item Documents produced on your system are likely, at best, to be
+ portable only in the sense of being processable at a different
+ site---the actual formatting will not be the same if different
+ fonts are used.
+ \item The \LaTeX3 project team will not be able to support you in
+ diagnosing problems if these cannot be reproduced with a format
+ that does not use any configuration files.
+ \end{itemize}
+
+\filesection{fonttext.cfg}
+
+The file |fonttext.cfg| can contain declarations relating to the use
+of fonts in text modes.
+
+If it exists, it defines which font shapes, families and encodings are
+normally used in text mode, as well as the behavior of font attribute
+commands such as |\textbf| etc.
+
+It could be used, for example, to produce a \LaTeX\ format that, by
+default, typesets documents using Times fonts. Be warned, however,
+that such customisation can have unfortunate consequences; so please
+read carefully this section and the file |fontdef.dtx| below if you
+are thinking of doing this.
+
+Please note carefully the above \textbf{warning}.
+
+\filesection{fontmath.cfg}
+
+The file |fontmath.cfg| can contain declarations relating to the use
+of fonts in math mode.
+
+If it exists, it defines which fonts in which sizes are used in math
+mode, and how they are used. It also defines all the math mode
+commands that `are likely to' depend on the choice of math fonts used
+(e.g.~commands that depend on the position of a glyph in a math font).
+
+The main reason for the existence of this file is to provide for future
+updates when a standard math font encoding is available. Right now we
+do \emph{not} encourage the use of this configuration file other than
+for special applications. Writing a proper configuration file for math
+mode needs expert knowledge!
+
+Please note carefully the above \textbf{warning}.
+
+\filesection{preload.cfg}
+
+The contents of the file |preload.cfg| can control the preloading of
+commonly used fonts. Preloading fonts speeds up the processing of
+documents but, because fonts cannot be `unloaded', you should not
+preload too many; otherwise you may be unable to process documents
+requiring unusual font families.
+
+The default file |preload.ltx| is produced from |preload.dtx|. It
+loads only a few fonts and these are a good choice if you normally use
+documents at the default, 10\,pt, size. If you normally use 11\,pt
+or~12\,pt then the time for \LaTeX\ to startup may be noticeably
+decreased if you preload the corresponding fonts for the sizes you
+use. Similarly, if you normally use a different font family, for
+example Times Roman (|ptm|) then you may want to preload fonts in this
+family rather than the default Computer Modern fonts.
+
+\subsection{Hyphenation configuration}
+
+\filesection{hyphen.cfg}
+
+In order to hyphenate text, \TeX{} must have hyphenation patterns and,
+since these patterns can be loaded only by \iniTeX, the choice of
+which patterns to load must be made when the format is created.
+
+The hyphenation patterns for American English are stored in the file
+named |hyphen.tex|; \LaTeX~2.09 always loaded this file when its
+format was made.
+
+With \LaTeXe{} it is possible to configure which hyphenation patterns
+are to be loaded into the format. When \iniTeX{} is processing
+|latex.ltx|, it looks for a file called |hyphen.cfg|; this file can
+be used to control which hyphenation patterns are loaded. If a file
+|hyphen.cfg| cannot be found then \iniTeX{} will load the file
+|hyphen.ltx|.
+
+The file |hyphen.ltx| loads the file |hyphen.tex| if it can find it;
+otherwise it stops with an error since a format with no hyphenation
+patterns is not very useful. It then sets |\language=0| and it sets
+the values |\lefthyphenmin=2| and |\righthyphenmin=3|, which are
+needed for American English.
+
+Thus, if you want any other patterns to be loaded then you should
+create a file |hyphen.cfg|. For each language for which you wish to
+load hyphenation patterns this file should:
+\begin{itemize}
+\item set |\language=|\m{number};
+\item load the file which contains the hyphenation patterns for that
+ language.
+\end{itemize}
+If the patterns you use require some definitions or assignments then
+a group should be used to keep such changes local to their file.
+
+\textbf{Note.} The hyphenation files that are read in should \emph{only}
+set the hyphenation tables for the language, using the commands
+|\hyphenation| and |\patterns|. In particular they should make no
+assignments to the lowercase/uppercase tables (|\lccode| and
+|\uccode|) and should not make any global command definitions to be
+used after the file has been read. Unfortunately some older
+hyphenation files do contain such settings; thus they are
+\emph{incompatible} with the mechanisms \LaTeX\ uses to ensure
+independence of input and output encodings.
+
+After this the file |hyphen.cfg| should:
+\begin{itemize}
+\item set |\language| to its default value;
+\item set |\lefthyphenmin| and |\righthyphenmin| to the correct values
+ for this default language.
+\end{itemize}
+
+There are packages available, such as `french', that can help you with
+this configuration. The `babel' collection contains many examples of
+setting up a multi-lingual \LaTeX{} format. The documentation in
+|lthyphen.dtx| (the source file for |hyphen.ltx|) also contains some
+useful examples.
+
+[We intend in a future release of \LaTeX{} to provide a set of
+standard commands for use in configuring hyphenation.]
+
+
+\section{Configuring the font definition files}
+
+If you have special fonts available (or if some fonts are unavailable)
+at your site then you may need to produce customised versions of the
+font definition files; these have extension \texttt{.fd} and are read
+by \LaTeX{} to obtain information about the font files installed at your
+system and when to load them.
+
+Although we do not encourage such customisation, you will find
+information about the content of these files and its syntax in the
+documented source file \texttt{cmfonts.fdd} and
+\textit{\LaTeXe{} font selection} in the file \texttt{fntguide.tex}.
+[We hope to be able to provide further information and examples on
+this subject at some time in the future.]
+
+Please note that the use of customised font definition files has the
+following consequences.
+ \begin{itemize}
+ \item Documents produced on your system will, at best, to be
+ portable only in the sense of being processable at a different
+ site---the actual formatting will not be the same if different
+ fonts are used.
+ \item The \LaTeX3 project team will not be able to support you in
+ diagnosing problems if these cannot be reproduced with a format
+ that does not use any customised font definition files.
+ \end{itemize}
+
+Please also note that the whilst licence conditions on the standard
+font definition files allow you to produce a customised version for
+your own use, they do not allow you to distribute such a customised
+font definition file under the original file name!
+
+
+\subsection*{Note to system administrators}
+
+If you install a version of \LaTeX{} with a locally configured font
+set-up then this system is likely to produce documents that are no
+longer `formatting compatible'; for example, the use of different
+default fonts will most likely produce different line and page breaks.
+If you do install, on a multi-user system, a system that is configured
+in such a way that it is not `formatting compatible' then you should
+consider carefully the needs of users who need to create portable
+documents. A good way to provide for their needs is to make
+available, in addition, a standard form of \LaTeX{} without any
+`formatting incompatible' customisations.
+
+
+\section{Configuring compatibility mode}
+
+When processing documents that begin with |\documentstyle|, \LaTeXe{}
+tries to emulate the old \LaTeX~2.09 system as far as possible.
+
+\filesection{latex209.cfg}
+
+Whenever a \LaTeX{} document starts with |\documentstyle|, rather than
+with |\documentclass|, \LaTeX{} assumes that it is a \LaTeX~2.09
+document and therefore processes it in `compatibility mode'. This
+does the following:
+\begin{itemize}
+\item sets the flag |\@compatibilitytrue|;
+\item inputs the file |latex209.def|;
+\item inputs the file |latex209.cfg| if it exists.
+\end{itemize}
+
+The \LaTeX~2.09 set-up allowed the format itself to be customised.
+When making the format with \iniTeX, the process ended with this
+request:
+\begin{quote}\tt
+ Input any local modifications here.
+\end{quote}
+
+If your site did input any modifications at that point then the
+\LaTeXe{} `compatibility mode' will not fully emulate \LaTeX~2.09
+\emph{as installed at your site}. In this case you should put all
+these `local modifications' into a file called |latex209.cfg| and put
+this file in the default input path at your site. These `local
+modifications', although not stored in the format, will then be loaded
+before any old-style document is processed. This should ensure that
+you can continue to process any old documents that made use of this
+local customisation.
+
+
+\section[Configuration files for standard packages and classes]%
+ {Configuration files for standard packages\\ and classes}
+
+Most of the packages in the distribution do not have any associated
+configuration files. The exceptions are listed here.
+
+\filesection{sfonts.cfg}
+
+The file |sfonts.cfg| can contain declarations relating to the use of
+fonts in the slides class.
+If it exists, it is read instead of the file |sfonts.def|.
+
+Please note that use of this configuration file has the following
+consequences.
+ \begin{itemize}
+ \item Since the font set-up for slides has not yet been revised to
+ fit modern usage, the content of this file should be completely
+ updated sometime. Thus anyone writing such a configuration
+ file must be prepared to update it for use with future releases.
+ \item Documents are portable only in the sense of being processable
+ at a different site---the actual formatting will not be the same
+ if different fonts are used.
+ \item The \LaTeX3 project team will not be able to support you in
+ diagnosing problems if these cannot be reproduced with a format
+ that does not use this configuration file.
+ \end{itemize}
+
+
+\filesection{ltnews.cfg}
+
+The file |ltnews.cfg| can be used to customise some aspects of the
+behaviour of the \textsf{ltnews} class; this class is used to typeset
+the the one page newsletter accompanying every \LaTeX{} distribution.
+If this file is present then it is read in at the beginning of the
+file |ltnews.cls|.
+
+
+\filesection{ltxdoc.cfg}
+
+The file |ltxdoc.cfg| can be used to customise some aspects of the
+behaviour of the \textsf{ltxdoc} class; this class is used to typeset
+the documented code in the |.dtx| files. If this file is present then
+it is read in at the beginning of the file |ltxdoc.cls|.
+
+As this file is read before the \textsf{article} class is loaded, you
+may pass options to \textsf{article}. For example the following line
+might be added to |ltxdoc.cfg| to format the documentation for A4 paper
+instead of the default US letter paper size.
+\begin{quote}
+|\PassOptionsToClass{a4paper}{article}|
+\end{quote}
+You should note however, that even if paper size options are specified,
+the \textsf{ltxdoc} class always sets the |\textwidth| parameter to
+355\,pt, to enable 72 columns of text to appear in the verbatim code
+listings. If you really need to over-ride this you could use:
+\begin{quote}
+|\AtEndOfClass{\setlength{\textwidth}{ ...}}|
+\end{quote}
+To set the |\textwidth| to your desired value at the end of the
+\textsf{ltxdoc} class.
+
+By default, most of the |.dtx| documented code files in the
+distribution will produce a `description' section followed by full
+source listing of the package. If you wish to suppress the source
+listings you may add the following line to |ltxdoc.cfg|:
+\begin{quote}
+|\AtBeginDocument{\OnlyDescription}|
+\end{quote}
+
+The documentation of the \textsf{ltxdoc} package, which may be typeset
+from the file |ltxdoc.dtx|, contains more examples of the use of this
+configuration file.
+
+\filesection{ltxguide.cfg}
+
+The class \textsf{ltxguide} is used by the `guide' documents, such as
+this document, in the \LaTeX\ distribution. A configuration file
+|ltxguide.cfg| may be used with this class in a way very similar to
+the customisation of the \textsf{ltxdoc} class described in the
+previous section.
+
+\section{Configuration for other supported packages}
+
+The `graphics' bundle of packages needs two configuration files,
+primarily to specify the driver used to process the |.dvi| file that
+\LaTeX{} produces. More documentation on these files comes with the
+graphics bundle but we mention them here for completeness.
+
+\filesection{graphics.cfg}
+ Normally this file just specifies a default option, by calling
+ |\ExecuteOptions|, for example |\ExecuteOptions{dvips}| or
+ |\ExecuteOptions{textures}|.
+
+ This file is read by the \textsf{graphics} package, and so affects
+ all the packages in the bundle that are based on \textsf{graphics}:
+ \textsf{graphicx}, \textsf{epsfig}, \textsf{lscape}.
+
+\filesection{color.cfg}
+ Normally this file is identical to |graphics.cfg|. It specifies the
+ default driver option for the \textsf{color} package.
+
+\section{Non-standard versions}
+
+If you feel the need to make a version of \LaTeX{} that differs from
+the standard version in ways that are not possible using the above
+configuration possibilities, then you should first read
+\textit{Modifying \LaTeX{}} in the file |modguide.tex|; this
+will probably make you realise that you do not have any such need.
+
+Thus we are sure that you will never need to create a non-standard
+version and, even if you do create one, we hope that you will not
+distribute such a version. Nevertheless, you are permitted to do this
+provided you take great care to do the following:
+\begin{itemize}
+\item
+respect the conditions in legal.txt and individual files regarding
+modification of files and changing the name;
+
+\item
+change all the relevant `|\typeout| banners': i.e.~those produced by
+all the non-standard files in your version and by the format;
+
+\item
+ ensure that the method used to run your version is clearly
+ distinguished from that used to run standard \LaTeX{}; e.g.~by using
+ a command name or menu entry that is clearly different from
+ \texttt{latex} (or \texttt{LaTeX} etc).
+\end{itemize}
+
+\subsection{Examples}
+
+Since we have been prompted, despite our misgivings, to document how
+to do this by members of the League for Programming Freedom, it seems
+appropriate to describe here a possible modification of \LaTeX{} to
+produce a system called fsf\TeX.
+
+To do this, you should create a file called \texttt{fsftex.tex} and
+then run it using \iniTeX{} and the standard \LaTeX{} format.
+
+The contents of the file \texttt{fsftex.tex} should be as shown on
+page \pageref{fsfcode}. The particular changes to the \LaTeX{} kernel
+that you wish to make need to be added to the file at the position
+indicated. You can also choose the extensions you want to use for the
+class and package files in your system.
+
+\newpage
+\label{fsfcode}
+
+\begin{footnotesize}
+\begin{verbatim}
+% fsftex.tex
+%
+% iniTEX Source code to make a `fsftex' format.
+%
+% To make this format on Unix:
+%
+% initex \&latex fsftex
+%
+% Then to run the format on file.tex:
+%
+% tex &fsftex file
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% *** VERY IMPORTANT!!! ***
+% Change the typeout banner so users know that they
+% are NOT running Standard LaTeX.
+\everyjob{\typeout{fsfTeX 1.0 based on LaTeX2e \fmtversion}}
+\makeatletter
+
+% fsfTeX changes some LaTeX internals:
+% ... put what you like here ...
+\def \fsf@xxxx {Some arbitrary \emph{freely modifiable} code goes here}
+
+% fsfTeX class files have extension .fcl (this week):
+\def \@clsextension {fcl}
+
+% fsfTeX package files have extension .fsy:
+\def \@pkgextension {fsy}
+
+% Change the file handling so that when a fsfTeX package or class
+% is not available, the standard LaTeX file will be read.
+%
+% For example, \documentclass{article} will load article.fcl if such
+% a file exists, but article.cls otherwise. This allows arbitrary
+% processing on `article' documents without changing the standard
+% article.cls file.
+
+\let\fsf@missingfileerror\@missingfileerror
+
+\def\@missingfileerror#1#2{%
+ \ifx #2\@clsextension
+ \InputIfFileExists {#1.cls}%
+ {\wlog {fsfTeX: loading #1.cls rather than #1.#2.}}%
+ {\fsf@missingfileerror {#1}{#2}}%
+ \else
+ \ifx #2\@pkgextension
+ \InputIfFileExists {#1.sty}%
+ {\wlog {fsfTeX: loading #1.sty rather than #1.#2.}}%
+ {\fsf@missingfileerror {#1}{#2}}%
+ \else
+ \fsf@missingfileerror {#1}{#2}%
+ \fi
+ \fi
+}
+
+\makeatother
+\dump
+\end{verbatim}
+\end{footnotesize}
+
+\end{document}
diff --git a/macros/latex-dev/doc/changes-doc.txt b/macros/latex-dev/doc/changes-doc.txt
new file mode 100644
index 0000000000..cd70fad506
--- /dev/null
+++ b/macros/latex-dev/doc/changes-doc.txt
@@ -0,0 +1,32 @@
+This file lists changes to the LaTeX2e files in reverse chronological order.
+It is provided for convenience only. It therefore makes no claims to
+completeness or accuracy and it contains some references to files that
+are not part of the distribution.
+=======================================================================
+
+2016-03-31 Joseph Wright <latex-bugs@latex-project.org>
+
+ * latexchanges.tex: Bring up to date to 2016/03/31
+
+2016-02-01 Joseph Wright <latex-bugs@latex-project.org>
+
+ * latexchanges.tex: Bring up to date to 2016/02/01
+
+2015-10-27 Joseph Wright <latex-bugs@latex-project.org>
+
+ * latexchanges.tex: Bring up to date to 2015/10/01 PL2
+
+2015-07-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * latexchanges.tex: describe the patch level system
+
+2015-04-05 Joseph Wright <joseph.wright@morningstar2.co.uk>
+ * Clarify reason for \typein change in LuaTeX
+
+2015-04-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltnews22.tex: set date back to Jan
+
+2015-03-31 Joseph Wright <joseph.wright@morningstar2.co.uk>
+ * New changes.txt file for LaTeX2e core documentation
+
diff --git a/macros/latex-dev/doc/clsguide.pdf b/macros/latex-dev/doc/clsguide.pdf
new file mode 100644
index 0000000000..9becca0547
--- /dev/null
+++ b/macros/latex-dev/doc/clsguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/clsguide.tex b/macros/latex-dev/doc/clsguide.tex
new file mode 100644
index 0000000000..be77a5f244
--- /dev/null
+++ b/macros/latex-dev/doc/clsguide.tex
@@ -0,0 +1,1874 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: clsguide.tex
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[1995/11/28]
+
+\title{\LaTeXe~for class and package writers}
+
+\author{Copyright \copyright~1995--2006 The \LaTeX3 Project\\
+ All rights reserved}
+
+\date{15 February 2006}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+This document is an introduction to writing classes and packages for
+\LaTeX{}, with special attention given to upgrading existing
+\LaTeX~2.09 packages to \LaTeXe{}. The latter subject is also
+covered in an article by Johannes Braams published in TUGboat~15.3.
+
+\subsection{Writing classes and packages for \LaTeXe}
+
+\LaTeX{} is a document preparation system that enables the document
+writer to concentrate on the contents of their text, without bothering
+too much about the formatting of it. For example, chapters are
+indicated by |\chapter{<title>}| rather than by selecting 18pt bold.
+
+The file that contains the information about how to turn logical
+structure (like `|\chapter|') into formatting (like `18pt bold ragged
+right') is a \emph{document class}. In addition, some features (such
+as colour or included graphics) are independent of the document class
+and these are contained in \emph{packages}.
+
+One of the largest differences between \LaTeX~2.09 and \LaTeXe{} is in
+the commands used to write packages and classes. In \LaTeX~2.09,
+there was very little support for writing |.sty| files, and so writers
+had to resort to using low-level commands.
+
+\LaTeXe{} provides high-level commands for structuring packages.
+It is also much easier to build classes and packages on top of each
+other, for example writing a local technical report class |cetechr|
+(for the Chemical Engineering department) based on |article|.
+
+\subsection{Overview}
+
+This document contains an overview of how to write classes and
+packages for \LaTeX{}. It does \emph{not} introduce all of the
+commands necessary to write packages: these can be found in either
+\emph{\LaTeXbook} or \emph{\LaTeXcomp}. But it does describe the new
+commands for structuring classes and packages.
+
+\begin{description}
+
+\item[Section~\ref{Sec:general}] contains some general advice about
+ writing classes and packages. It describes the difference between
+ classes and packages, the command naming conventions, the use of
+ |doc| and |docstrip|, how \TeX's primitive file and box commands
+ interact with \LaTeX{}. It also contains some hints about general
+ \LaTeX{} style.
+
+\item[Section~\ref{Sec:structure}] describes the structure of classes
+ and packages. This includes building classes and packages on top of
+ other classes and packages, declaring options and declaring
+ commands. It also contains example classes.
+
+\item[Section~\ref{Sec:commands}] lists the new class and package
+ commands.
+
+ \item[Section~\ref{Sec:upgrade}] gives detailed advice on how to
+ upgrade existing \LaTeX~2.09 classes and packages to \LaTeXe{}.
+
+\end{description}
+
+\subsection{Further information}
+
+For a general introduction to \LaTeX{}, including the new features of
+\LaTeXe{}, you should read \emph{\LaTeXbook}
+by Leslie Lamport~\cite{A-W:LLa94}.
+
+A more detailed description of the new features of \LaTeX, including an
+overview of more than 200 packages and nearly 1000 ready to run examples, is
+to be found in \emph{\LaTeXcomp\ second edition} by Frank Mittelbach and
+Michel Goossens~\cite{A-W:MG2004}.
+
+The \LaTeX{} system is based on \TeX{}, which is
+described in \emph{The \TeX book} by Donald E.~Knuth~\cite{A-W:DEK91}.
+
+There are a number of documentation files which accompany every copy
+of \LaTeX{}. A copy of \emph{\LaTeX{} News} will come out with each
+six-monthly release of \LaTeX{}, and is found in the files
+|ltnews*.tex|. The author's guide \emph{\usrguide} describes the new
+\LaTeX{} document features; it is in |usrguide.tex|. The guide
+\emph{\fntguide} describes the \LaTeX{} font selection scheme for
+class- and package-writers; it is in |fntguide.tex|. Configuring
+\LaTeX{} is covered by the guide \emph{\cfgguide} in
+\texttt{cfgguide.tex} whilst the philosophy behind our policy on
+modifying \LaTeX{} is described in \emph{\modguide} in
+\texttt{modguide.tex}.
+
+The documented source code (from the files used to produce the kernel
+format via |latex.ltx|) is now available as
+\emph{The \LaTeXe\ Sources}.
+This very large document also includes an index of
+\LaTeX{} commands. It can be typeset from the \LaTeX{} file
+|source2e.tex| in the |base| directory, using the source files and
+the class file |ltxdoc.cls| from this directory.
+
+For more information about \TeX{} and \LaTeX{}, please contact your
+local \TeX{} Users Group, or the international \TeX{} Users Group.
+Addresses and other details can be found at:
+\begin{quote}\small\label{addrs}
+ \texttt{http://www.tug.org/lugs.html}
+\end{quote}
+
+
+\subsection{Policy on standard classes}
+
+Many of the problem reports we receive concerning the standard classes
+are not concerned with bugs but are suggesting, more or less politely,
+that the design decisions embodied in them are `not optimal' and
+asking us to modify them.
+
+There are several reasons why we should not make such changes to these
+files.
+\begin{itemize}
+\item
+ However misguided, the current behaviour is clearly what was
+ intended when these classes were designed.
+\item
+ It is not good practice to change such aspects of `standard classes'
+ because many people will be relying on them.
+\end{itemize}
+
+We have therefore decided not to even consider making such
+modifications, nor to spend time justifying that decision. This does
+not mean that we do not agree that there are many deficiencies in the
+design of these classes, but we have many tasks with higher priority
+than continually explaining why the standard classes for \LaTeX{}
+cannot be changed.
+
+We would, of course, welcome the production of better classes, or of
+packages that can be used to enhance these classes. So your first
+thought when you consider such a deficiency will, we hope, be ``what
+can I do to improve this?''
+
+Similar considerations apply to those parts of the kernel that are
+implementing design decisions, many of which should be left to the
+class file but are not in the current system. We realise that in such
+cases it is much more difficult for you to rectify the problem
+yourself but it is also the case that making such changes in the
+kernel would probably be a major project for us; therefore such
+enhancements will have to wait for \LaTeX3.
+
+\section{Writing classes and packages}
+\label{Sec:writing}
+
+This section covers some general points concerned with writing
+\LaTeX{} classes and packages.
+
+
+\subsection{Old versions}
+
+If you are upgrading an existing \LaTeX~2.09 style file then we
+recommend freezing the 2.09 version and no longer maintaining it.
+Experience with the various dialects of \LaTeX{} which existed in the
+early 1990's suggests that maintaining packages for different versions
+of \LaTeX{} is almost impossible. It will, of course, be necessary
+for some organisations to maintain both versions in parallel for some
+time but this is not essential for those packages and classes
+supported by individuals: they should support only the new standard
+\LaTeXe{}, not obsolete versions of \LaTeX{}.
+
+
+\subsection{Using `docstrip' and `doc'}
+
+If you are going to write a large class or package for \LaTeX{} then
+you should consider using the |doc| software which comes with
+\LaTeX{}.
+\LaTeX{} classes and packages written using this can be
+processed in two ways: they can be run through \LaTeX{}, to produce
+documentation; and they can be processed with |docstrip|, to produce
+the |.cls| or |.sty| file.
+
+The |doc| software can automatically generate indexes of definitions,
+indexes of command use, and change-log lists. It is very useful for
+maintaining and documenting large \TeX{} sources.
+
+The documented sources of the \LaTeX{} kernel itself, and of the
+standard classes, etc, are |doc| documents; they are in the |.dtx|
+files in the distribution. You can, in fact, typeset the source code
+of the kernel as one long document, complete with index, by running
+\LaTeX{} on |source2e.tex|. Typesetting these documents uses the
+class file |ltxdoc.cls|.
+
+For more information on |doc| and |docstrip|, consult the files
+|docstrip.dtx|, |doc.dtx|, and \emph{\LaTeXcomp}. For examples of its
+use, look at the |.dtx| files.
+
+\subsection{Is it a class or a package?}
+\label{Sec:classorpkg}
+
+The first thing to do when you want to put some new \LaTeX{} commands
+in a file is to decide whether it should be a \emph{document class} or a
+\emph{package}. The rule of thumb is:
+\begin{quote}
+ If the commands could be used with any document class, then make
+ them a package; and if not, then make them a class.
+\end{quote}
+
+There are two major types of class: those like |article|, |report| or
+|letter|, which are free-standing; and those which are extensions or
+variations of other classes---for example, the |proc| document class,
+which is built on the |article| document class.
+
+Thus, a company might have a local |ownlet| class for printing letters
+with their own headed note-paper. Such a class would build on top of
+the existing |letter| class but it cannot be used with any other
+document class, so we have |ownlet.cls| rather than |ownlet.sty|.
+
+The |graphics| package, in contrast, provides commands for including
+images into a \LaTeX{} document. Since these commands can be used
+with any document class, we have |graphics.sty| rather than
+|graphics.cls|.
+
+
+\subsection{Command names}
+
+\LaTeX{} has three types of command.
+
+There are the author commands, such as |\section|, |\emph| and
+|\times|: most of these have short names, all in lower case.
+
+There are also the class and package writer commands:
+most of these have long mixed-case names such as the following.
+\begin{verbatim}
+ \InputIfFileExists \RequirePackage \PassOptionsToClass
+\end{verbatim}
+
+Finally, there are the internal commands used in the \LaTeX{}
+implementation, such as |\@tempcnta|, |\@ifnextchar| and |\@eha|:
+most of these commands contain |@| in their name, which means they
+cannot be used in documents, only in class and package files.
+
+Unfortunately, for historical reasons the distinction between these
+commands is often blurred. For example, |\hbox| is an internal
+command which should only be used in the \LaTeX{} kernel, whereas
+|\m@ne| is the constant $-1$ and could have been |\MinusOne|.
+
+However, this rule of thumb is still useful: if a command has |@| in
+its name then it is not part of the supported \LaTeX{} language---and
+its behaviour may change in future releases! If a command is
+mixed-case, or is described in \emph{\LaTeXbook}, then you can rely on
+future releases of \LaTeXe{} supporting the command.
+
+\subsection{Box commands and colour}
+\label{Sec:colour}
+
+Even if you do not intend to use colour in your own documents, by
+taking note of the points in this section you can ensure that your
+class or package is compatible with the |color| package. This may
+benefit people using your class or package who have access to colour
+printers.
+
+The simplest way to ensure `colour safety' is to always use \LaTeX{}
+box commands rather than \TeX{} primitives, that is use |\sbox| rather
+than |\setbox|, |\mbox| rather than |\hbox| and |\parbox| or
+the |minipage| environment rather than |\vbox|.
+The \LaTeX{} box commands have new options which mean that they are now
+as powerful as the \TeX{} primitives.
+
+As an example of what can go wrong, consider that in
+|{\ttfamily <text>}|
+the font is restored just \emph{before} the |}|, whereas in the
+similar looking construction
+|{\color{green} <text>}|
+the colour is restored just \emph{after} the final |}|. Normally this
+distinction does not matter at all; but consider a primitive \TeX{}
+box assignment such as:
+\begin{verbatim}
+ \setbox0=\hbox{\color{green} <text>}
+\end{verbatim}
+Now the colour-restore occurs after the |}| and so is \emph{not}
+stored in the box. Exactly what bad effects this can have depends on
+how colour is implemented: it can range from getting the wrong
+colours in the rest of the document, to causing errors in the
+dvi-driver used to print the document.
+
+Also of interest is the command |\normalcolor|. This is
+normally just |\relax| (i.e., does nothing)
+but you can use it rather like |\normalfont| to
+set regions of the page such as captions or section headings to the
+`main document colour'.
+
+
+\subsection{Defining text and math characters}
+\label{Sec:chars}
+
+Because \LaTeXe{} supports different encodings, definitions of commands
+for producing symbols, accents, composite glyphs, etc.\ must be
+defined using the commands provided for this purpose and described in
+\emph{\fntguide}. This part of the system is still under development
+so such tasks should be undertaken with great caution.
+
+Also, |\DeclareRobustCommand| should be used for encoding-independent
+commands of this type.
+
+Note that it is no longer possible to refer to the math font set-up
+outside math mode: for example, neither |\textfont 1| nor
+|\scriptfont 2| are guaranteed to be defined in other modes.
+
+
+\subsection{General style}
+\label{Sec:general}
+
+The new system provides many commands designed to help you produce
+well-structured class and package files that are both robust and
+portable. This section outlines some ways to make intelligent use of
+these.
+
+\subsubsection{Loading other files}
+\label{Sec:loading}
+
+\NEWdescription{1995/12/01}
+\LaTeX{} provides these commands:
+\begin{verbatim}
+ \LoadClass \LoadClassWithOptions
+ \RequirePackage \RequirePackageWithOptions
+\end{verbatim}
+for using classes or packages inside other classes or packages. We
+recommend strongly that you use them, rather than the primitive
+|\input| command, for a number of reasons.
+
+Files loaded with |\input <filename>| will not be listed in the
+|\listfiles| list.
+
+If a package is always loaded with |\RequirePackage...| or |\usepackage|
+then, even if its loading is requested several times, it will be
+loaded only once. By contrast, if it is loaded with |\input| then it
+can be loaded more than once; such an extra loading may waste time and
+memory and it may produce strange results.
+
+If a package provides option-processing then, again, strange results
+are possible if the package is |\input| rather than loaded by means of
+|\usepackage| or |\RequirePackage...|.
+
+If the package |foo.sty| loads the package |baz.sty| by use of
+|\input baz.sty| then the user will get a warning:
+\begin{verbatim}
+ LaTeX Warning: You have requested package `foo',
+ but the package provides `baz'.
+\end{verbatim}
+Thus, for several reasons, using |\input| to load packages is not a
+good idea.
+
+Unfortunately, if you are upgrading the file |myclass.sty| to a class
+file then you have to make sure that any old files which contain
+|\input myclass.sty| still work.
+
+This was also true for the standard classes (|article|, |book| and
+|report|), since a lot of existing \LaTeX~2.09 document styles contain
+|\input article.sty|. The approach which we use to solve this is
+to provide minimal files |article.sty|, |book.sty| and |report.sty|,
+which simply load the appropriate class files.
+
+For example, |article.sty| contains just the following lines:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \@obsoletefile{article.cls}{article.sty}
+ \LoadClass{article}
+\end{verbatim}
+You may wish to do the same or, if you think that it is safe to do so,
+you may decide to just remove |myclass.sty|.
+
+\subsubsection{Make it robust}
+
+We consider it good practice, when writing packages and classes, to use
+\LaTeX{} commands as much as possible.
+
+Thus, instead of using |\def...| we recommend using one of
+|\newcommand|, |\renewcommand| or |\providecommand|; |\CheckCommand| is
+also useful. Doing this makes
+it less likely that you will inadvertently redefine a command, giving
+unexpected results.
+
+When you define an environment, use |\newenvironment| or
+|\renewenvironment| instead |\def\foo{...}| and |\def\endfoo{...}|.
+
+If you need to set or change the value of a \m{dimen} or \m{skip}
+register, use |\setlength|.
+
+To manipulate boxes, use \LaTeX{} commands such as |\sbox|,
+|\mbox| and |\parbox| rather than |\setbox|, |\hbox| and |\vbox|.
+
+Use |\PackageError|, |\PackageWarning| or |\PackageInfo| (or the
+equivalent class commands) rather than |\@latexerr|, |\@warning| or
+|\wlog|.
+
+It is still possible to declare options by defining |\ds@<option>| and
+calling |\@options|; but we recommend the |\DeclareOption| and
+|\ProcessOptions| commands instead. These are more powerful and use
+less memory. So rather than using:
+\begin{verbatim}
+ \def\ds@draft{\overfullrule 5pt}
+ \@options
+\end{verbatim}
+you should use:
+\begin{verbatim}
+ \DeclareOption{draft}{\setlength{\overfullrule}{5pt}}
+ \ProcessOptions\relax
+\end{verbatim}
+
+The advantage of this kind of practice is that your code is more
+readable and, more important, that it is less likely to break when
+used with future versions of \LaTeX{}.
+
+\subsubsection{Make it portable}
+
+It is also sensible to make your files are as portable as possible. To
+ensure this; they should contain only visible 7-bit text; and the
+filenames should contain at most eight characters (plus the three
+letter extension). Also, of course, it \textbf{must not} have the
+same name as a file in the standard \LaTeX{} distribution, however
+similar its contents may be to one of these files.
+
+It is also useful if local classes or packages have a common prefix,
+for example the University of Nowhere classes might begin with |unw|.
+This helps to avoid every University having its own thesis class, all
+called |thesis.cls|.
+
+If you rely on some features of the \LaTeX{} kernel, or on a package,
+please specify the release-date you need. For example, the package
+error commands were introduced in the June 1994 release so, if you use
+them then you should put:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\end{verbatim}
+
+\subsubsection{Useful hooks}
+
+Some packages and document styles had to redefine the command
+|\document| or |\enddocument| to achieve their goal. This is no
+longer necessary. You can now use the `hooks' |\AtBeginDocument| and
+|\AtEndDocument| (see Section~\ref{Sec:delays}). Again, using these
+hooks makes it less likely that your code breaks with future versions
+of \LaTeX{}. It also makes it more likely that your package can work
+together with someone else's.
+
+\NEWdescription{1996/12/01}
+However, note that code in the |\AtBeginDocument| hook is part of the
+preamble. Thus there are restrictions on what can be put there; in
+particular, no typesetting can be done.
+
+\section{The structure of a class or package}
+\label{Sec:structure}
+
+\LaTeXe{} classes and packages have more structure than \LaTeX~2.09
+style files did. The outline of a class or package file is:
+\begin{description}
+\item[Identification] The file says that it is a \LaTeXe{} package or
+ class, and gives a short description of itself.
+\item[Preliminary declarations]
+ Here the file declares some commands and can also load
+ other files. Usually these commands will be just those needed for
+ the code used in the declared options.
+\item[Options] The file declares and processes its options.
+\item[More declarations] This is where the file does most of its work:
+ declaring new variables, commands and fonts; and loading other files.
+\end{description}
+
+\subsection{Identification}
+
+The first thing a class or package file does is identify itself.
+Package files do this as follows:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{<package>}[<date> <other information>]
+\end{verbatim}
+For example:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{latexsym}[1994/06/01 Standard LaTeX package]
+\end{verbatim}
+Class files do this as follows:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesClass{<class-name>}[<date> <other information>]
+\end{verbatim}
+For example:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesClass{article}[1994/06/01 Standard LaTeX class]
+\end{verbatim}
+\NEWdescription{1998/06/19}
+The \m{date} should be given in the form `\textsc{yyyy/mm/dd}' and
+must be present if the optional argument is used (this is also true
+for the |\NeedsTeXFormat| command).
+Any derivation from this syntax will result in low-level \TeX{}
+errors---the commands expect a valid syntax to speed up the daily
+usage of the package or class and make no provision for the case that
+the developer made a mistake!
+
+This date is checked whenever a user specifies a date in their
+|\documentclass| or |\usepackage| command. For example, if you wrote:
+\begin{verbatim}
+ \documentclass{article}[1995/12/23]
+\end{verbatim}
+then users at a different location
+would get a warning that their copy of |article| was out of
+date.
+
+The description of a class is displayed when the class is used. The
+description of a package is put into the log file. These descriptions
+are also displayed by the |\listfiles| command. The phrase
+\texttt{Standard LaTeX} \textbf{must not} be used in the identification
+banner of any file other than those in the standard \LaTeX{}
+distribution.
+
+
+\subsection{Using classes and packages}
+
+The first major difference between \LaTeX~2.09 style files and
+\LaTeXe{} packages and classes is that \LaTeXe{} supports
+\emph{modularity}, in the sense of building files from small
+building-blocks rather than using large single files.
+
+A \LaTeX{} package or class can load a package as follows:
+\begin{verbatim}
+ \RequirePackage[<options>]{<package>}[<date>]
+\end{verbatim}
+For example:
+\begin{verbatim}
+ \RequirePackage{ifthen}[1994/06/01]
+\end{verbatim}
+This command has the same syntax as the author command |\usepackage|.
+It allows packages or classes to use features provided by other
+packages. For example, by loading the |ifthen| package, a package
+writer can use the `if\dots then\dots else\dots' commands provided
+by that package.
+
+A \LaTeX{} class can load one other class as follows:
+\begin{verbatim}
+ \LoadClass[<options>]{<class-name>}[<date>]
+\end{verbatim}
+For example:
+\begin{verbatim}
+ \LoadClass[twocolumn]{article}
+\end{verbatim}
+This command has the same syntax as the author command |\documentclass|.
+It allows classes to be based on the syntax and appearance of another
+class. For example, by loading the |article| class, a class writer
+only has to change the bits of |article| they don't like, rather than
+writing a new class from scratch.
+
+\NEWfeature{1995/12/01}
+The following commands can be used in the common case that you want to
+simply load a class or package file with exactly those options that
+are being used by the current class.
+\begin{verbatim}
+ \LoadClassWithOptions{<class-name>}[<date>]
+ \RequirePackageWithOptions{<package>}[<date>]
+\end{verbatim}
+For example:
+\begin{verbatim}
+ \LoadClassWithOptions{article}
+ \RequirePackageWithOptions{graphics}[1995/12/01]
+\end{verbatim}
+
+\subsection{Declaring options}
+
+\NEWdescription{1998/12/01}
+The other major difference between \LaTeX~2.09 styles and \LaTeXe{}
+packages and classes is in option handling. Packages and classes can
+now declare options and these can be specified by authors; for
+example, the |twocolumn| option is declared by the |article| class.
+Note that the name of an option should contain only those characters
+allowed in a `\LaTeX{} name'; in particular it must not contain any
+control sequences.
+
+An option is declared as follows:
+\begin{verbatim}
+ \DeclareOption{<option>}{<code>}
+\end{verbatim}
+For example, the |dvips| option (slightly simplified)
+to the |graphics| package is implemented as:
+\begin{verbatim}
+ \DeclareOption{dvips}{\input{dvips.def}}
+\end{verbatim}
+This means that when an author writes |\usepackage[dvips]{graphics}|,
+the file |dvips.def| is loaded. As another example, the |a4paper|
+option is declared in the |article| class to set the |\paperheight|
+and |\paperwidth| lengths:
+\begin{verbatim}
+ \DeclareOption{a4paper}{%
+ \setlength{\paperheight}{297mm}%
+ \setlength{\paperwidth}{210mm}%
+ }
+\end{verbatim}
+Sometimes a user will request an option which the class
+or package has not explicitly declared. By default this will produce
+a warning (for classes) or error (for packages); this behaviour
+can be altered as follows:
+\begin{verbatim}
+ \DeclareOption*{<code>}
+\end{verbatim}
+For example, to make the package |fred| produce a warning rather than
+an error for unknown options, you could specify:
+\begin{verbatim}
+ \DeclareOption*{%
+ \PackageWarning{fred}{Unknown option `\CurrentOption'}%
+ }
+\end{verbatim}
+Then, if an author writes |\usepackage[foo]{fred}|, they will get a
+warning \texttt{Package fred Warning: Unknown option `foo'.} As
+another example, the |fontenc| package tries to load a file
+|<ENC>enc.def| whenever the \m{ENC} option is used. This
+can be done by writing:
+\begin{verbatim}
+ \DeclareOption*{%
+ \input{\CurrentOption enc.def}%
+ }
+\end{verbatim}
+\NEWdescription{1998/12/01}
+It is possible to pass options on to another package or class, using
+the command |\PassOptionsToPackage| or |\PassOptionsToClass| (note
+that this is a specialised operation that works only for option
+names). For example, to pass every unknown option on to the |article|
+class, you can use:
+\begin{verbatim}
+ \DeclareOption*{%
+ \PassOptionsToClass{\CurrentOption}{article}%
+ }
+\end{verbatim}
+If you do this then you should make sure you load the class at some
+later point, otherwise the options will never be processed!
+
+So far, we have explained only how to declare options, not how to
+execute them. To process the options with which the file was called,
+you should use:
+\begin{verbatim}
+ \ProcessOptions\relax
+\end{verbatim}
+This executes the \m{code} for each option that was both specified and
+declared (see Section~\ref{Sec:commands.options} for details of how
+this is done).
+
+For example, if the |jane| package file contains:
+\begin{verbatim}
+ \DeclareOption{foo}{\typeout{Saw foo.}}
+ \DeclareOption{baz}{\typeout{Saw baz.}}
+ \DeclareOption*{\typeout{What's \CurrentOption?}}
+ \ProcessOptions\relax
+\end{verbatim}
+and an author writes |\usepackage[foo,bar]{jane}|, then they will see
+the messages \texttt{Saw foo.} and \texttt{What's bar?}
+
+\subsection{A minimal class file}
+
+Most of the work of a class or package is in defining new commands, or
+changing the appearance of documents. This is done in the body of the
+package, using commands such as |\newcommand| or |\setlength|.
+
+\LaTeXe{} provides several new commands to help class and package
+writers; these are described in detail in Section~\ref{Sec:commands}.
+
+There are four things that every class file \emph{must} contain: these
+are a definition of |\normalsize|, values for |\textwidth| and
+|\textheight| and a specification for page-numbering. So a minimal
+document class file\footnote {This class is now in the standard
+distribution, as \texttt{minimal.cls}.} looks like this:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesClass{minimal}[1995/10/30 Standard LaTeX minimal class]
+ \renewcommand{\normalsize}{\fontsize{10pt}{12pt}\selectfont}
+ \setlength{\textwidth}{6.5in}
+ \setlength{\textheight}{8in}
+ \pagenumbering{arabic} % needed even though this class will
+ % not show page numbers
+\end{verbatim}
+However, this class file will not support footnotes, marginals,
+floats, etc., nor will it provide any of the 2-letter font commands
+such as |\rm|; thus most classes will contain more than this minimum!
+
+\subsection{Example: a local letter class}
+
+A company may have its own letter class, for setting letters in the
+company style. This section shows a simple implementation of such a
+class, although a real class would need more structure.
+
+The class begins by announcing itself as |neplet.cls|.
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesClass{neplet}[1995/04/01 NonExistent Press letter class]
+\end{verbatim}
+Then this next bit passes any options on to the |letter| class, which
+is loaded with the |a4paper| option.
+\begin{verbatim}
+ \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
+ \ProcessOptions\relax
+ \LoadClass[a4paper]{letter}
+\end{verbatim}
+In order to use the company letter head, it redefines the
+|firstpage| page style: this is the page style that is used on
+the first page of letters.
+\begin{verbatim}
+ \renewcommand{\ps@firstpage}{%
+ \renewcommand{\@oddhead}{<letterhead goes here>}%
+ \renewcommand{\@oddfoot}{<letterfoot goes here>}%
+ }
+\end{verbatim}
+And that's it!
+
+\subsection{Example: a newsletter class}
+
+A simple newsletter can be typeset with \LaTeX{}, using a variant of the
+|article| class.
+The class begins by announcing itself as |smplnews.cls|.
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesClass{smplnews}[1995/04/01 The Simple News newsletter class]
+
+ \newcommand{\headlinecolor}{\normalcolor}
+\end{verbatim}
+It passes most specified options on to the |article| class: apart from
+the |onecolumn| option, which is switched off, and the |green| option,
+which sets the headline in green.
+\begin{verbatim}
+ \DeclareOption{onecolumn}{\OptionNotUsed}
+ \DeclareOption{green}{\renewcommand{\headlinecolor}{\color{green}}}
+
+ \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+
+ \ProcessOptions\relax
+\end{verbatim}
+It then loads the class |article| with the option |twocolumn|.
+\begin{verbatim}
+ \LoadClass[twocolumn]{article}
+\end{verbatim}
+Since the newsletter is to be printed in colour, it now loads the
+|color| package. The class does not specify a device driver option
+since this should be specified by the user of the |smplnews| class.
+\begin{verbatim}
+ \RequirePackage{color}
+\end{verbatim}
+The class then redefines |\maketitle| to produce the title in 72pt
+Helvetica bold oblique, in the appropriate colour.
+\begin{verbatim}
+ \renewcommand{\maketitle}{%
+ \twocolumn[%
+ \fontsize{72}{80}\fontfamily{phv}\fontseries{b}%
+ \fontshape{sl}\selectfont\headlinecolor
+ \@title
+ ]%
+ }
+\end{verbatim}
+It redefines |\section| and switches off section numbering.
+\begin{verbatim}
+ \renewcommand{\section}{%
+ \@startsection
+ {section}{1}{0pt}{-1.5ex plus -1ex minus -.2ex}%
+ {1ex plus .2ex}{\large\sffamily\slshape\headlinecolor}%
+ }
+
+ \setcounter{secnumdepth}{0}
+\end{verbatim}
+It also sets the three essential things.
+\begin{verbatim}
+ \renewcommand{\normalsize}{\fontsize{9}{10}\selectfont}
+ \setlength{\textwidth}{17.5cm}
+ \setlength{\textheight}{25cm}
+\end{verbatim}
+In practice, a class would need more than this: it would provide
+commands for issue numbers, authors of articles, page styles and so
+on; but this skeleton gives a start. The |ltnews| class file is not
+much more complex than this one.
+
+\section{Commands for class and package writers}
+\label{Sec:commands}
+
+This section describes briefly each of the new commands for class and
+package writers. To find out about other aspects of the new system,
+you should also read \emph{\LaTeXbook}, \emph{\LaTeXcomp} and
+\emph{\usrguide}.
+
+\subsection{Identification}
+
+The first group of commands discussed here are those used
+to identify your class or package file.
+
+\begin{decl}
+|\NeedsTeXFormat| \arg{format-name} \oarg{release-date}
+\end{decl}
+This command tells \TeX{} that this file should be processed using a
+format with name \m{format-name}. You can use the optional argument
+\m{release-date} to further specify the earliest release date of the
+format that is needed. When the release date of the format is older
+than the one specified a warning will be generated. The standard
+\m{format-name} is \texttt{LaTeX2e}. The date, if present, must be in
+the form \textsc{yyyy/mm/dd}.
+
+Example:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\end{verbatim}
+
+\begin{decl}
+|\ProvidesClass| \arg{class-name} \oarg{release-info} \\
+|\ProvidesPackage| \arg{package-name} \oarg{release-info}
+\end{decl}
+This declares that the current file contains the definitions for the
+document class \m{class-name} or package \m{package-name}.
+
+The optional \m{release-info}, if used, must contain:
+\begin{itemize}
+ \item the release date of
+ this version of the file, in the form \textsc{yyyy/mm/dd};
+\item optionally followed by a space and a short description, possibly
+ including a version number.
+\end{itemize}
+The above syntax must be followed exactly so that this information
+can be used by |\LoadClass| or |\documentclass| (for classes) or
+|\RequirePackage| or |\usepackage| (for packages) to test that the
+release is not too old.
+
+The whole of this \m{release-info} information is displayed by
+|\listfiles| and should therefore not be too long.
+
+Example:
+\begin{verbatim}
+ \ProvidesClass{article}[1994/06/01 v1.0 Standard LaTeX class]
+ \ProvidesPackage{ifthen}[1994/06/01 v1.0 Standard LaTeX package]
+\end{verbatim}
+
+\begin{decl}
+ |\ProvidesFile| \arg{file-name} \oarg{release-info}
+\end{decl}
+This is similar to the two previous commands except that here the full
+filename, including the extension, must be given. It is used for
+declaring any files other than main class and package files.
+
+Example:
+\begin{verbatim}
+ \ProvidesFile{T1enc.def}[1994/06/01 v1.0 Standard LaTeX file]
+\end{verbatim}
+
+Note that the phrase \texttt{Standard LaTeX} \textbf{must not} be used
+in the identification banner of any file other than those in the
+standard \LaTeX{} distribution.
+
+\subsection{Loading files}
+\label{Sec:loadf}
+
+\NEWfeature{1995/12/01}
+This group of commands can be used to create your own document class or
+package by building on existing classes or packages.
+\begin{decl}
+ |\RequirePackage| \oarg{options-list} \arg{package-name}
+ \oarg{release-info}\\
+ |\RequirePackageWithOptions| \arg{package-name}
+ \oarg{release-info}
+\end{decl}
+Packages and classes should use these commands to load other packages.
+
+The use of |\RequirePackage| is the same as the author command
+|\usepackage|.
+
+Examples:
+\begin{verbatim}
+ \RequirePackage{ifthen}[1994/06/01]
+ \RequirePackageWithOptions{graphics}[1995/12/01]
+\end{verbatim}
+
+\begin{decl}
+ |\LoadClass| \oarg{options-list} \arg{class-name}
+ \oarg{release-info}\\
+ |\LoadClassWithOptions| \arg{class-name}
+ \oarg{release-info}
+\end{decl}
+\NEWfeature{1995/12/01}
+These commands are for use \emph{only} in class files, they cannot be
+used in packages files;
+they can be used at most once within a class file.
+
+The use of |\LoadClass| is the same as
+the use of |\documentclass| to load a class file.
+
+Examples:
+\begin{verbatim}
+ \LoadClass{article}[1994/06/01]
+ \LoadClassWithOptions{article}[1995/12/01]
+\end{verbatim}
+
+\NEWfeature{1995/12/01}
+The two |WithOptions| versions simply load the class (or package) file
+with exactly those options that are being used by the current file
+(class or package). See below, in \ref{Sec:opmove}, for further
+discussion of their use.
+
+
+\subsection{Option declaration}
+\label{Sec:commands.options.dec}
+
+\NEWdescription{1998/12/01}
+The following commands deal with the declaration and handling of
+options to document classes and packages. Every option name must be a
+`\LaTeX{} name'.
+
+There are some commands designed especially for use within the
+\m{code} argument of these commands (see below).
+
+\begin{decl}
+ |\DeclareOption| \arg{option-name} \arg{code}
+\end{decl}
+This makes \m{option-name} a `declared option' of the class or package
+in which it is put.
+
+The \m{code} argument contains the code to be executed if that option
+is specified for the class or package; it can contain any valid
+\LaTeXe{} construct.
+
+Example:
+\begin{verbatim}
+ \DeclareOption{twoside}{\@twosidetrue}
+\end{verbatim}
+
+\begin{decl}
+ |\DeclareOption*| \arg{code}
+\end{decl}
+This declares the \m{code} to be executed for every option which is
+specified for, but otherwise not explicitly declared by, the class or
+package; this code is called the `default option code' and it can
+contain any valid \LaTeXe{} construct.
+
+If a class file contains no |\DeclareOption*| then, by default, all
+specified but undeclared options for that class will be silently
+passed to all packages (as will the specified and declared options for
+that class).
+
+If a package file contains no |\DeclareOption*| then, by default, each
+specified but undeclared option for that package will produce an error.
+
+
+\subsection{Commands within option code}
+\label{Sec:within.code}
+
+These two commands can be used only within the \m{code} argument of
+either |\DeclareOption| or |\DeclareOption*|. Other commands commonly
+used within these arguments can be found in the next few subsections.
+
+\begin{decl}
+ |\CurrentOption|
+\end{decl}
+This expands to the name of the current option.
+
+\begin{decl}
+ |\OptionNotUsed|
+\end{decl}
+This causes the current option to
+be added to the list of `unused options'.
+
+\NEWfeature{1995/06/01}
+ You can now include hash marks (\texttt{\#}) within these \m{code}
+ arguments without special treatment (formerly, it had been
+ necessary to double them).
+
+\subsection{Moving options around}
+\label{Sec:opmove}
+
+These two commands are also very useful within the \m{code} argument
+of |\DeclareOption| or |\DeclareOption*|:
+\begin{decl}
+ |\PassOptionsToPackage| \arg{options-list} \arg{package-name}\\
+ |\PassOptionsToClass| \arg{options-list} \arg{class-name}
+\end{decl}
+The command |\PassOptionsToPackage| passes the option names in
+\m{options-list} to package \m{package-name}.
+This means that it adds the \m{option-list} to the
+list of options used by any future |\RequirePackage| or |\usepackage|
+command for package \m{package-name}.
+
+Example:
+\begin{verbatim}
+ \PassOptionsToPackage{foo,bar}{fred}
+ \RequirePackage[baz]{fred}
+\end{verbatim}
+is the same as:
+\begin{verbatim}
+ \RequirePackage[foo,bar,baz]{fred}
+\end{verbatim}
+
+Similarly, |\PassOptionsToClass| may be used in a class file to pass
+options to another class to be loaded with |\LoadClass|.
+
+\NEWdescription{1995/12/01}
+The effects and use of these two commands should be contrasted with
+those of the following two (documented above, in \ref{Sec:loadf}):
+\begin{verbatim}
+ \LoadClassWithOptions
+ \RequirePackageWithOptions
+\end{verbatim}
+The command |\RequirePackageWithOptions| is similar to
+|\RequirePackage|, but it always loads the required package with
+exactly the same option list as that being used by the current class
+or package, rather than with any option explicitly supplied or passed
+on by |\PassOptionsToPackage|.
+
+The main purpose of |\LoadClassWithOptions| is to allow one class to
+simply build on another, for example:
+\begin{verbatim}
+ \LoadClassWithOptions{article}
+\end{verbatim}
+This should be compared with the slightly different construction
+\begin{verbatim}
+ \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+ \ProcessOptions\relax
+ \LoadClass{article}
+\end{verbatim}
+As used above, the effects are more or less the same, but the first is
+a lot less to type; also the |\LoadClassWithOptions| method runs
+slightly quicker.
+
+If, however, the class declares options of its own then
+the two constructions are different. Compare, for example:
+\begin{verbatim}
+ \DeclareOption{landscape}{\@landscapetrue}
+ \ProcessOptions\relax
+ \LoadClassWithOptions{article}
+\end{verbatim}
+with:
+\begin{verbatim}
+ \DeclareOption{landscape}{\@landscapetrue}
+ \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+ \ProcessOptions\relax
+ \LoadClass{article}
+\end{verbatim}
+In the first example, the \textsf{article} class will be loaded with
+option |landscape| precisely when the current class is called with
+this option. By contrast, in the second example it will never be
+called with option \texttt{landscape} as in that case \textsf{article}
+is passed options only by the default option handler, but this handler
+is not used for |landscape| because that option is explicitly
+declared.
+
+\subsection{Delaying code}
+\label{Sec:delays}
+
+These first two commands are also intended primarily for use within
+the \m{code} argument of |\DeclareOption| or |\DeclareOption*|.
+
+\begin{decl}
+ |\AtEndOfClass| \arg{code}\\
+ |\AtEndOfPackage| \arg{code}
+\end{decl}
+These commands declare \m{code} that is saved away internally and then
+executed after processing the whole of the current class or package
+file.
+
+Repeated use of these commands is permitted: the code in the
+arguments is stored (and later executed) in the order of their
+declarations.
+
+\begin{decl}
+ |\AtBeginDocument| \arg{code}\\
+ |\AtEndDocument| \arg{code}
+\end{decl}
+These commands declare \m{code} to be saved internally and executed
+while \LaTeX{} is executing |\begin{document}| or |\end{document}|.
+
+The \m{code} specified in the argument to |\AtBeginDocument| is
+executed near the end of the |\begin{document}| code, \emph{after} the
+font selection tables have been set up. It is therefore a useful
+place to put code which needs to be executed after everything has been
+prepared for typesetting and when the normal font for the document is
+the current font.
+
+\NEWdescription{1995/12/01}
+The |\AtBeginDocument| hook should not be used for code that does any
+typesetting since the typeset result would be unpredictable.
+
+The \m{code} specified in the argument to |\AtEndDocument| is
+executed at the beginning of the |\end{document}| code,
+\emph{before} the final page is finished and before any leftover
+floating environments are processed. If some of the \m{code} is to be
+executed after these two processes, you should include a |\clearpage|
+at the appropriate point in \m{code}.
+
+Repeated use of these commands is permitted: the code in the
+arguments is stored (and later executed) in the order of their
+declarations.
+
+\begin{decl}[1994/12/01]
+ |\AtBeginDvi| \arg{specials}
+\end{decl}
+These commands save in a box register things which are written to the
+|.dvi| file at the beginning of the `shipout' of the first page of the
+document.
+
+This should not be used for anything that will add any typeset
+material to the |.dvi| file.
+
+Repeated use of this command is permitted.
+
+
+\subsection{Option processing}
+\label{Sec:commands.options}
+
+\begin{decl}
+ |\ProcessOptions|
+\end{decl}
+This command executes the \m{code} for each selected option.
+
+We shall first describe how |\ProcessOptions| works in a package file,
+and then how this differs in a class file.
+
+To understand in detail what |\ProcessOptions| does in a package file,
+you have to know the difference between \emph{local} and \emph{global}
+options.
+\begin{itemize}
+\item \textbf{Local options} are those which have been explicitly
+ specified for this particular package in the \m{options} argument of
+ any of these:
+\begin{quote}
+ |\PassOptionsToPackage{<options>}| \ |\usepackage[<options>]|\\
+ |\RequirePackage[<options>]|
+\end{quote}
+\item \textbf{Global options} are any other options that are specified
+ by the author in the \m{options} argument of
+ |\documentclass[<options>]|.
+\end{itemize}
+For example, suppose that a document begins:
+\begin{verbatim}
+ \documentclass[german,twocolumn]{article}
+ \usepackage{gerhardt}
+\end{verbatim}
+whilst package |gerhardt| calls package |fred| with:
+\begin{verbatim}
+ \PassOptionsToPackage{german,dvips,a4paper}{fred}
+ \RequirePackage[errorshow]{fred}
+\end{verbatim}
+then:
+\begin{itemize}
+\item |fred|'s local options are |german|, |dvips|, |a4paper|
+ and |errorshow|;
+\item |fred|'s only global option is |twocolumn|.
+\end{itemize}
+
+When |\ProcessOptions| is called, the following happen.
+\begin{itemize}
+\item \emph{First}, for each option so far declared in |fred.sty|
+ by |\DeclareOption|, it looks to see if that option is either a
+ global or a local option for |fred|: if it is then the corresponding
+ code is executed.
+
+ This is done in the order in which these options
+ were declared in |fred.sty|.
+\item \emph{Then}, for each remaining \emph{local} option, the command
+ |\ds@<option>| is executed if it has been defined somewhere (other
+ than by a |\DeclareOption|); otherwise, the `default option code' is
+ executed. If no default option code has been declared then an error
+ message is produced.
+
+ This is done in the order in which these
+ options were specified.
+\end{itemize}
+Throughout this process, the system ensures that the code declared for
+an option is executed at most once.
+
+Returning to the example, if |fred.sty| contains:
+\begin{verbatim}
+ \DeclareOption{dvips}{\typeout{DVIPS}}
+ \DeclareOption{german}{\typeout{GERMAN}}
+ \DeclareOption{french}{\typeout{FRENCH}}
+ \DeclareOption*{\PackageWarning{fred}{Unknown `\CurrentOption'}}
+ \ProcessOptions\relax
+\end{verbatim}
+then the result of processing this document will be:
+\begin{verbatim}
+ DVIPS
+ GERMAN
+ Package fred Warning: Unknown `a4paper'.
+ Package fred Warning: Unknown `errorshow'.
+\end{verbatim}
+Note the following:
+
+\begin{itemize}
+\item the code for the |dvips| option is executed before that for the
+ |german| option, because that is the order in which they are declared
+ in |fred.sty|;
+\item the code for the |german| option is executed only once, when the
+ declared options are being processed;
+\item the |a4paper| and |errorshow| options produce the warning from
+ the code declared by |\DeclareOption*| (in the order in which they
+ were specified), whilst the |twocolumn| option does not: this is
+ because |twocolumn| is a global option.
+\end{itemize}
+
+In a class file, |\ProcessOptions| works in the same way, except
+that: \emph{all} options are local; and the default value for
+|\DeclareOption*| is |\OptionNotUsed| rather than an error.
+
+\NEWdescription{1995/12/01}
+Note that, because |\ProcessOptions| has a |*|-form, it is wise to
+follow the non-star form with |\relax|, as in the previous examples,
+since this prevents unnecessary look ahead and possibly misleading
+error messages being issued.
+
+\begin{decl}
+ |\ProcessOptions*| \\
+ |\@options|
+\end{decl}
+This is like |\ProcessOptions| but it executes the options in the
+order specified in the calling commands, rather than in the order of
+declaration in the class or package. For a package this means that the
+global options are processed first.
+
+The |\@options| command from \LaTeX~2.09 has been made equivalent to
+this in order to ease the task of updating old document styles to
+\LaTeXe{} class files.
+
+\begin{decl}
+ |\ExecuteOptions| \arg{options-list}
+\end{decl}
+
+For each option in the \m{options-list}, in order,
+this command simply executes the command
+|\ds@<option>| (if this command is not defined, then that option is
+silently ignored).
+
+It can be used to provide a `default option list' just before
+|\ProcessOptions|. For example, suppose that in a class file you want
+to set up the default design to be: two-sided printing; 11pt fonts;
+in two columns. Then it could specify:
+\begin{verbatim}
+ \ExecuteOptions{11pt,twoside,twocolumn}
+\end{verbatim}
+
+
+\subsection{Safe file commands}
+
+These commands deal with file input; they ensure that the non-existence
+of a requested file can be handled in a user-friendly way.
+
+\begin{decl}
+|\IfFileExists| \arg{file-name} \arg{true} \arg{false}
+\end{decl}
+If the file exists then the code specified in \m{true} is
+executed.
+
+If the file does not exist then the code specified in \m{false} is
+executed.
+
+This command does \emph{not} input the file.
+
+\begin{decl}
+ |\InputIfFileExists| \arg{file-name} \arg{true} \arg{false}
+\end{decl}
+This inputs the file \m{file-name} if it exists and, immediately
+before the input, the code specified in \m{true} is executed.
+
+If the file does not exist then the code specified in \m{false} is
+executed.
+
+It is implemented using |\IfFileExists|.
+
+
+\subsection{Reporting errors, etc}
+
+These commands should be used by third party classes and packages to
+report errors, or to provide information to authors.
+
+\begin{decl}
+ |\ClassError| \arg{class-name} \arg{error-text} \arg{help-text}\\
+ |\PackageError| \arg{package-name} \arg{error-text} \arg{help-text}
+\end{decl}
+These produce an error message. The \m{error-text} is displayed and the
+|?| error prompt is shown. If the user types |h|, they will be shown
+the \m{help-text}.
+
+Within the \m{error-text} and \m{help-text}: |\protect| can be used to
+stop a command from expanding; |\MessageBreak| causes a line-break;
+and |\space| prints a space.
+
+Note that the \m{error-text} will have a full stop added to it, so do
+not put one into the argument.
+
+For example:
+\begin{verbatim}
+ \newcommand{\foo}{FOO}
+ \PackageError{ethel}{%
+ Your hovercraft is full of eels,\MessageBreak
+ and \protect\foo\space is \foo
+ }{%
+ Oh dear! Something's gone wrong.\MessageBreak
+ \space \space Try typing \space <<return>>
+ \space to proceed, ignoring \protect\foo.
+ }
+\end{verbatim}
+produces this display:
+\begin{verbatim}
+ ! Package ethel Error: Your hovercraft is full of eels,
+ (ethel) and \foo is FOO.
+
+ See the ethel package documentation for explanation.
+\end{verbatim}
+If the user types |h|, this will be shown:
+\begin{verbatim}
+ Oh dear! Something's gone wrong.
+ Try typing <<return>> to proceed, ignoring \foo.
+\end{verbatim}
+
+\begin{decl}
+ |\ClassWarning| \arg{class-name} \arg{warning-text}\\
+ |\PackageWarning| \arg{package-name} \arg{warning-text}\\
+ |\ClassWarningNoLine| \arg{class-name} \arg{warning-text}\\
+ |\PackageWarningNoLine| \arg{package-name} \arg{warning-text}\\
+ |\ClassInfo| \arg{class-name} \arg{info-text}\\
+ |\PackageInfo| \arg{package-name} \arg{info-text}
+\end{decl}
+The four |Warning| commands are similar to the error commands, except
+that they produce only a warning on the screen, with no error prompt.
+
+The first two, |Warning| versions, also show the line number where the
+warning occurred, whilst the second two, |WarningNoLine| versions, do
+not.
+
+The two |Info| commands are similar except that they log the
+information only in the transcript file, including the line number.
+There are no |NoLine| versions of these two.
+
+Within the \m{warning-text} and \m{info-text}: |\protect| can be used to
+stop a command from expanding; |\MessageBreak| causes a line-break;
+and |\space| prints a space.
+Also, these should not end with a full stop as one is
+automatically added.
+
+
+\subsection{Defining commands}
+\label{Sec:commands.define}
+
+\LaTeXe{} provides some extra methods of (re)defining commands that are
+intended for use in class and package files.
+
+\NEWfeature{1994/12/01}
+The \texttt{*}-forms of these commands should be used to define
+commands that are not, in \TeX{} terms, long. This can be useful for
+error-trapping with commands whose arguments are not intended to
+contain whole paragraphs of text.
+
+\begin{decl}
+ |\DeclareRobustCommand| \arg{cmd} \oarg{num} \oarg{default}
+ \arg{definition}\\
+ |\DeclareRobustCommand*| \arg{cmd} \oarg{num} \oarg{default}
+ \arg{definition}
+\end{decl}
+This command takes the same arguments as |\newcommand| but it declares
+a robust command, even if some code within the \m{definition} is
+fragile. You can use this command to define new robust commands, or
+to redefine existing commands and make them robust. A log is put into
+the transcript file if a command is redefined.
+
+For example, if |\seq| is defined as follows:
+\begin{verbatim}
+ \DeclareRobustCommand{\seq}[2][n]{%
+ \ifmmode
+ #1_{1}\ldots#1_{#2}%
+ \else
+ \PackageWarning{fred}{You can't use \protect\seq\space in text}%
+ \fi
+ }
+\end{verbatim}
+Then the command |\seq| can be used in moving arguments, even though
+|\ifmmode| cannot, for example:
+\begin{verbatim}
+ \section{Stuff about sequences $\seq{x}$}
+\end{verbatim}
+
+Note also that there is no need to put a |\relax| before the
+|\ifmmode| at the beginning of the definition; this is because the
+protection given by this |\relax| against expansion at the wrong time
+will be provided internally.
+
+\begin{decl}
+ |\CheckCommand| \arg{cmd} \oarg{num} \oarg{default}
+ \arg{definition}\\
+ |\CheckCommand*| \arg{cmd} \oarg{num} \oarg{default}
+ \arg{definition}
+\end{decl}
+This takes the same arguments as |\newcommand| but, rather than define
+\m{cmd}, it just checks that the current definition of \m{cmd} is
+exactly as given by \m{definition}. An error is raised if these
+definitions differ.
+
+This command is useful for checking the state of the system before
+your package starts altering the definitions of commands. It allows
+you to check, in particular, that no other package has redefined the
+same command.
+
+\subsection{Moving arguments}
+
+\NEWdescription{1994/12/01}
+The setting of protect whilst processing (i.e.~moving) moving arguments
+has been reimplemented, as has the method of writing information from
+the |.aux| file to other files such as the |.toc| file. Details can
+be found in the file |ltdefns.dtx|.
+
+We hope that these changes will not affect many packages.
+
+\section{Miscellaneous commands, etc}
+\label{Sec:commands.misc}
+
+\subsection{Layout parameters}
+
+\begin{decl}
+|\paperheight|\\
+|\paperwidth|
+\end{decl}
+These two parameters are usually set by the class to be the size of
+the paper being used. This should be actual paper size, unlike
+|\textwidth| and |\textheight| which are the size of the main text
+body within the margins.
+
+
+\subsection{Case changing}
+\label{sec:case}
+
+\begin{decl}
+ |\MakeUppercase| \arg{text} \\
+ |\MakeLowercase| \arg{text}
+\end{decl}
+
+\NEWfeature{1995/06/01}
+\TeX{} provides two primitives |\uppercase| and |\lowercase| for
+changing the case of text. These are sometimes used in document
+classes, for example to set information in running heads in all
+capitals.
+
+Unfortunately, these \TeX{} primitives do not change the case of
+characters accessed by commands like |\ae| or |\aa|. To overcome this
+problem, \LaTeX{} provides two new commands |\MakeUppercase| and
+|\MakeLowercase| to do this.
+
+For example:
+\begin{quotation}
+\begin{tabular}{rl}
+ |\uppercase{aBcD\ae\AA\ss\OE}| & \uppercase{aBcD\ae\AA\ss\OE}\\
+ |\lowercase{aBcD\ae\AA\ss\OE}| & \lowercase{aBcD\ae\AA\ss\OE}\\
+ |\MakeUppercase{aBcD\ae\AA\ss\OE}| &
+ \MakeUppercase{aBcD\ae\AA\ss\OE}\\
+ |\MakeLowercase{aBcD\ae\AA\ss\OE}| & \MakeLowercase{aBcD\ae\AA\ss\OE}
+\end{tabular}
+\end{quotation}
+
+The commands |\MakeUppercase| and |\MakeLowercase| themselves are
+robust, but they have moving arguments.
+
+The commands use the \TeX{} primitives |\uppercase| and |\lowercase|,
+and so have a number of unexpected `features'. In particular, they
+change the case of everything (except characters in the names of
+control-sequences) in their text argument: this includes mathematics,
+environment names, and label names.
+
+For example:
+\begin{verbatim}
+ \MakeUppercase{$x+y$ in \ref{foo}}
+\end{verbatim}
+produces $X+Y$ and the warning:
+\begin{verbatim}
+ LaTeX Warning: Reference `FOO' on page ... undefined on ...
+\end{verbatim}
+In the long run, we would like to use all-caps fonts rather than any
+command like |\MakeUppercase| but this is not possible at the moment
+because such fonts do not exist.
+
+\NEWdescription{1995/12/01}
+In order that upper/lower-casing will work reasonably well, and in
+order to provide any correct hyphenation, \LaTeXe{} \emph{must} use,
+throughout a document, the same fixed table for changing case.
+The table used is designed for the font encoding |T1|; this works well
+with the standard \TeX{} fonts for all Latin alphabets but will cause
+problems when using other alphabets.
+
+\subsection{The `openany' option in the `book' class}
+
+\NEWdescription{1996/06/01}
+The |openany| option allows chapter and similar openings to
+occur on left hand pages. Previously this option affected only
+|\chapter| and |\backmatter|. It now also affects
+|\part|, |\frontmatter| and |\mainmatter|.
+
+\subsection{Better user-defined math display environments}
+
+\begin{decl}
+ |\ignorespacesafterend|
+\end{decl}
+
+\NEWfeature{1996/12/01}
+\NEWdescription{2003/12/01}
+Suppose that you want to define an environment for displaying text
+that is numbered as an equation. A straightforward way to do this is
+as follows:
+\begin{verbatim}
+ \newenvironment{texteqn}
+ {\begin{equation}
+ \begin{minipage}{0.9\linewidth}}
+ {\end{minipage}
+ \end{equation}}
+\end{verbatim}
+However, if you have tried this then you will probably have noticed
+that it does not work perfectly when used in the middle of a paragraph
+because an inter-word space appears at the beginning of the first
+line after the environment.
+
+There is now an extra command (with a very long name) available that
+you can use to avoid this problem; it should be inserted as shown here:
+\begin{verbatim}
+ \newenvironment{texteqn}
+ {\begin{equation}
+ \begin{minipage}{0.9\linewidth}}
+ {\end{minipage}
+ \end{equation}
+ \ignorespacesafterend}
+\end{verbatim}
+
+This command may also have other uses.
+
+\subsection{Normalising spacing}
+
+\begin{decl}
+ |\normalsfcodes|
+\end{decl}
+
+\NEWfeature{1997/06/01}
+This command should be used to restore the normal settings of the
+parameters that affect spacing between words, sentences, etc.
+
+An important use of this feature is to correct a problem, reported by
+Donald Arseneau, that punctuation in page headers has always (in all
+known \TeX{} formats) been potentially wrong whenever a page break
+happens while a local setting of the space codes is in effect. These
+space codes are changed by, for example, the command
+\verb|\frenchspacing|) and the \textsf{verbatim} environment.
+
+It is normally given the correct definition automatically in
+|\begin{document}| and so need not be explicitly set; however, if it
+is explicitly made nonempty in a class file then automatic
+default setting will be over-ridden.
+
+
+\section{Upgrading \LaTeX~2.09 classes and packages}
+\label{Sec:upgrade}
+
+This section describes the changes you may need to make when you
+upgrade an existing \LaTeX{} style to a package or class but we shall
+start in optimistic mode.
+
+Many existing style files will run with \LaTeXe{} without any
+modification to the file itself. When everything is running OK,
+please put a note in the newly created package or class file to record
+that it runs with the new standard \LaTeX{}; then distribute it to
+your users.
+
+\subsection{Try it first!}
+\label{Sec:try-it}
+
+The first thing you should do is to test your style in `compatibility
+mode'. The only change you need to make in order to do this is,
+possibly, to change the extension of the file to |.cls|: you should
+make this change only if your file was used as a main document style.
+Now, without any other modifications, run \LaTeXe{} on a document that
+uses your file. This assumes that you have a suitable collection of
+files that tests all the functionality provided by your style file.
+(If you haven't, now is the time to make one!)
+
+You now need to change the test document files so that they are
+\LaTeXe{} documents: see \emph{\usrguide} for details of how to do
+this and then try them again. You have now tried the test documents
+in both \LaTeXe{} native mode and \LaTeX~2.09 compatibility mode.
+
+\subsection{Troubleshooting}
+\label{Sec:trouble}
+
+If your file does not work with \LaTeXe{}, there are two likely
+reasons.
+\begin{itemize}
+\item \LaTeX{} now has a robust, well-defined designer's interface for
+ selecting fonts, which is very different from the \LaTeX~2.09
+ internals.
+\item Your style file may have used some \LaTeX~2.09 internal commands
+ which have changed, or which have been removed.
+\end{itemize}
+
+When you are debugging your file, you will probably need more
+information than is normally displayed by \LaTeXe. This is achieved
+by resetting the counter |errorcontextlines| from its default value of
+$-1$ to a much higher value, e.g.~999.
+
+\subsection{Accommodating compatibility mode}
+
+Sometimes an existing collection of \LaTeX~2.09 documents makes it
+inconvenient or impossible to abandon the old commands entirely.
+If this is the case, then it is possible to accommodate both conventions
+by making special provision for documents processed in compatibility
+mode.
+
+\begin{decl}
+|\if@compatibility|
+\end{decl}
+This switch is set when a document begins with |\documentstyle| rather
+than |\documentclass|. Appropriate code can be supplied for either
+condition, as follows:
+\begin{verbatim}
+ \if@compatibility
+ <code emulating LaTeX 2.09 behavior>
+ \else
+ <code suitable for LaTeX2e>
+ \fi
+\end{verbatim}
+
+
+\subsection{Font commands}
+
+Some font and size commands are now defined by the document class
+rather than by the \LaTeX{} kernel. If you are upgrading a
+\LaTeX~2.09 document style to a class that does not load one of the
+standard classes, then you will probably need to add definitions for
+these commands.
+
+\begin{decl}
+ |\rm| |\sf| |\tt| |\bf| |\it| |\sl| |\sc|
+\end{decl}
+None of these short-form font selection commands are defined in the
+\LaTeXe{} kernel. They are defined by all the standard class files.
+
+If you want to define them in your class file, there are several
+reasonable ways to do this.
+
+One possible definition is:
+\begin{verbatim}
+ \newcommand{\rm}{\rmfamily}
+ ...
+ \newcommand{\sc}{\scshape}
+\end{verbatim}
+This would make the font commands orthogonal; for example
+|{\bf\it text}| would produce bold italic, thus: \textbf{\textit{text}}.
+It will also make them produce an error if used in math mode.
+
+Another possible definition is:
+\begin{verbatim}
+ \DeclareOldFontCommand{\rm}{\rmfamily}{\mathrm}
+ ...
+ \DeclareOldFontCommand{\sc}{\scshape}{\mathsc}
+\end{verbatim}
+This will make |\rm| act like |\rmfamily| in text mode (see above) and
+it will make |\rm| select the |\mathrm| math alphabet in math mode.
+
+Thus |${\rm math} = X + 1$| will produce `${\rm math} = X + 1$'.
+
+If you do not want font selection to be orthogonal then you can
+follow the standard classes and define:
+\begin{verbatim}
+ \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+ ...
+ \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\mathsc}
+\end{verbatim}
+This means, for example, that |{\bf\it text}| will produce medium
+weight (rather than bold) italic, thus: \textit{text}.
+
+\begin{decl}
+ |\normalsize| \\
+ |\@normalsize|
+\end{decl}
+The command |\@normalsize| is retained for compatibility with
+\LaTeX~2.09 packages which may have used its value; but redefining it
+in a class file will have no effect since it is always reset to have
+the same meaning as |\normalsize|.
+
+This means that classes \emph{must} now redefine |\normalsize| rather
+than redefining |\@normalsize|; for example (a rather incomplete one):
+\begin{verbatim}
+ \renewcommand{\normalsize}{\fontsize{10}{12}\selectfont}
+\end{verbatim}
+Note that |\normalsize| is defined by the \LaTeX{} kernel to be an
+error message.
+
+\begin{decl}
+ |\tiny| |\footnotesize| |\small| |\large|\\
+ |\Large| |\LARGE| |\huge| |\Huge|
+\end{decl}
+None of these other `standard' size-changing commands are defined in
+the kernel: each needs to be defined in a class file if you need it.
+They are all defined by the standard classes.
+
+This means you should use |\renewcommand| for |\normalsize| and
+|\newcommand| for the other size-changing commands.
+
+
+\subsection{Obsolete commands}
+
+Some packages will not work with \LaTeXe{}, normally because they relied
+on an internal \LaTeX{} command which was never supported and has now
+changed, or been removed.
+
+In many cases there will now be a robust, high-level means of
+achieving what previously required low-level commands. Please consult
+Section~\ref{Sec:commands} to see if you can now use the \LaTeXe{}
+class and package writers commands.
+
+Also, of course, if your package or class redefined any of the kernel
+commands (i.e.~those defined in the files |latex.tex|, |slitex.tex|,
+|lfonts.tex|, |sfonts.tex|) then you will need to check it very
+carefully against the new kernel in case the implementation has
+changed or the command no longer exists in the \LaTeX2e{} kernel.
+
+Too many of the internal commands of \LaTeX~2.09 have been
+re-implemented or removed to be able to list them all here. You must
+check any that you have used or changed.
+
+We shall, however, list some of the more important commands which are
+no longer supported.
+
+\begin{decl}
+ |\tenrm| |\elvrm| |\twlrm| \dots\\
+ |\tenbf| |\elvbf| |\twlbf| \dots\\
+ |\tensf| |\elvsf| |\twlsf| \dots\\
+ \qquad$\vdots$
+\end{decl}
+The (approximately) seventy internal commands of this form are no longer
+defined. If your class or package uses them then \emph{please}
+replace them with new font commands described in \emph{\fntguide}.
+
+For example, the command |\twlsf| should be replaced by:
+\begin{verbatim}
+ \fontsize{12}{14}\normalfont\sffamily\selectfont
+\end{verbatim}
+
+Another possibility is to use the |rawfonts| package, described in
+\emph{\usrguide}.
+
+Also, remember that many of the fonts preloaded by \LaTeX~2.09
+are no longer preloaded.
+
+\begin{decl}
+ |\vpt| |\vipt| |\viipt| \dots
+\end{decl}
+These were the internal size-selecting commands in \LaTeX~2.09.
+(They can still be used in \LaTeX~2.09 compatibility mode.)
+Please use the command |\fontsize| instead: see \emph{\fntguide} for
+details.
+
+For example, |\vpt| should be replaced by:
+\begin{verbatim}
+ \fontsize{5}{6}\normalfont\selectfont
+\end{verbatim}
+
+\begin{decl}
+ |\prm|, |\pbf|, |\ppounds|, |\pLaTeX| \dots
+\end{decl}
+\LaTeX~2.09 used several commands beginning with |\p| in order to
+provide `protected' commands. For example, |\LaTeX| was defined to be
+|\protect\pLaTeX|, and |\pLaTeX| was defined to produce the \LaTeX{}
+logo. This made |\LaTeX| robust, even though |\pLaTeX| was not.
+
+These commands have now been reimplemented using
+|\DeclareRobustCommand|
+(described in Section~\ref{Sec:commands.define}).
+If your package redefined one of the |\p|-commands then you must
+remove the redefinition and use |\DeclareRobustCommand| to redefine the
+non-|\p| command.
+
+\begin{decl}
+|\footheight|\\
+|\@maxsep|\\
+|\@dblmaxsep|
+\end{decl}
+These parameters are not used by \LaTeXe{} so they have been removed,
+except in \LaTeX~2.09 compatibility mode. Classes should no longer
+set them.
+
+\begin{thebibliography}{1}
+
+\bibitem{A-W:DEK91}
+Donald~E. Knuth.
+\newblock {\em The \TeX book}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1986.
+\newblock Revised to cover \TeX3, 1991.
+
+\bibitem{A-W:LLa94}
+Leslie Lamport.
+\newblock {\em {\LaTeX:} A Document Preparation System}.
+\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
+
+\bibitem{A-W:MG2004}
+Frank Mittelbach and Michel Goossens.
+\newblock {\em The {\LaTeX} Companion second edition}.
+\newblock With Johannes Braams, David Carlisle, and Chris Rowley.
+\newblock Addison-Wesley, Reading, Massachusetts, 2004.
+
+\end{thebibliography}
+
+\newpage
+\thispagestyle{empty}
+
+\section*{\LaTeXe{} Summary sheet: updating old styles}
+
+Section references below are to \emph{\clsguide}.
+
+\begin{enumerate}
+
+\item Should it become a class or a package?
+ See Section~\ref{Sec:classorpkg} for how to answer this question.
+
+\item If it uses another style file, then you will need to obtain an
+ updated version of this other file. Look at Section~\ref{Sec:loading}
+ for information on how to load other class and package files.
+
+\item Try it: see Section~\ref{Sec:try-it}.
+
+\item It worked? Excellent, but there are probably still some things
+ you should change in order to make your file into a well-structured
+ \LaTeXe{} file that is both robust and portable. So you should now
+ read Section~\ref{Sec:writing}, especially~\ref{Sec:general}. You
+ will also find some useful examples in Section~\ref{Sec:structure}.
+
+ If your file sets up new fonts, font-changing commands or symbols,
+ you should also read \emph{\fntguide}.
+
+\item It did not work? There are three possibilities here:
+ \begin{itemize}
+ \item error messages are produced whilst reading your file;
+ \item error messages are produced whilst processing test documents;
+ \item there are no errors but the output is not as it should be.
+ \end{itemize}
+ Don't forget to check carefully for this last possibility.
+
+ If you have got to this stage then you will need to read
+ Section~\ref{Sec:upgrade} to find the solutions that will make your
+ file work.
+\end{enumerate}
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/cyrguide.pdf b/macros/latex-dev/doc/cyrguide.pdf
new file mode 100644
index 0000000000..62d6037839
--- /dev/null
+++ b/macros/latex-dev/doc/cyrguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/cyrguide.tex b/macros/latex-dev/doc/cyrguide.tex
new file mode 100644
index 0000000000..4080fcb617
--- /dev/null
+++ b/macros/latex-dev/doc/cyrguide.tex
@@ -0,0 +1,398 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[1999/02/28]
+
+\title{Cyrillic languages support in \LaTeX}
+
+\author{\copyright~Copyright 1998--1999,\\ Vladimir Volovich,
+ Werner Lemberg and \LaTeX3 Project Team.\\ All rights reserved.}
+
+\date{12 March 1999}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\begin{abstract}
+ This document contains basic information on the Cyrillic setup for
+ \LaTeX{}: how to get the fonts, how to set them up, how to use
+ the interface, its interaction with \babel{}, etc. This is only a first
+ draft of the document and it will probably be modified in future; so
+ please send in comments on it via the \texttt{latexbug} system
+ (see below).
+\end{abstract}
+
+
+\section{Introduction}
+
+Most Latin-based European languages were supported in \LaTeX{} by
+introducing the~|T1|~font encoding and by using the \textsf{fontenc}
+and \textsf{inputenc} packages; these use only standard \TeX{} means
+to support any \mbox{8-bit} input encoding and this one standard font
+encoding. The restriction to a single font encoding guarantees that
+multiple languages can happily coexist in one document (\eg
+hyphenation will be correct for all languages).
+
+Starting with the December~1998 Release, \LaTeX{} finally supports
+Cyrillic languages. This support is based on the new standard
+Cyrillic \TeX{} font encodings---|T2A|, |T2B|, |T2C|, and~|X2|. The
+first three of these satisfy some basic requirements for
+\LaTeX{}~|T*|~encodings, and thus can be used in multi-lingual documents
+with other languages based on standard font encodings.
+
+The reason why we need four different Cyrillic font encodings is that
+these font encodings support \emph{all} the Cyrillic languages that
+have been used during the twentieth century (see
+Section~\ref{fontencs})! The number of Cyrillic glyphs is large, so
+they cannot be represented with 128~character slots; the other (lower)
+128~slots are reserved for Latin letters and other invariant symbols
+that are needed for the encoding to be a conformant
+\LaTeX{}~\texttt{T}~encoding.
+
+There are some glyphs in the |T2*|~encodings which do not yet have
+associated characters in \emph{Unicode}, the world-wide character
+standard. Also, one more font encoding, |T2D|,~is planned for a
+forthcoming release of \LaTeX{}. A lot of Cyrillic input encodings
+are already supported (see Section~\ref{inputencs}), and additional
+encodings could be added easily.
+
+
+\subsection{Acknowledgments}
+\label{sec:acks}
+
+The work on |T2*|~encodings was carried out by the T2~Team, led by
+Alexander Berdnikov (other members are Mikhail Kolodin and Andrew
+Janishewskii). The LH~fonts were produced by Olga Lapko (with
+A.~Khodulev). The \textsf{T2} bundle and \textsf{ruhyphen} package
+were written by Werner Lemberg and Vladimir Volovich (except that the
+concrete hyphenation patterns which are part of \textsf{ruhyphen} came
+from individual authors). The support for the Ukrainian language was
+prepared by Andrij Shvaika.
+
+
+\section{Installation}
+
+The \textsf{fontenc} and \textsf{inputenc} packages are installed
+automatically in every base \LaTeX{} distribution.
+
+All the necessary extra files to use with these packages for Cyrillic
+are in the \textsf{cyrillic} bundle, which at present contains the
+following: four font encoding definition files (|t2aenc.def|,
+|t2benc.def|, |t2cenc.def|, |x2enc.def|); several input encoding
+definition files (all the other |*.def| files), and font definition
+files (|*.fd|).
+The installation of these is described here.
+
+\subsection{Fonts}
+
+The default font families in \LaTeX{} are the Computer Modern
+families, namely the CM~fonts (|OT1|~encoded) and the EC~fonts
+(|T1|~encoded). The LH~fonts, which are now available, provide
+Computer Modern fonts for all Cyrillic font encodings. They are
+designed to be compatible with the EC~fonts, and they provide the same
+font shapes and sizes; they are available at |CTAN:fonts/cyrillic/lh|
+(the latest version is 3.20). The installation instructions for the
+fonts are in the file |INSTALL| in the font distribution.
+
+Other fonts, including Type~1 fonts, can also be used, provided that
+their encoding (for \TeX{}) is \mbox{|T2|-compatible}. Some
+ready-to-use packages supporting such fonts are also available, \eg at
+\URL{ftp://ftp.vsu.ru/pub/tex} (they should soon be on \ctan). Currently,
+you will find two packages there: \textsf{PsCyr}, which contains some
+freely distributable Cyrillic Type~1 fonts with support for \LaTeX{};
+and \textsf{c1fonts}, which contains virtual fonts similar to the
+\textsf{AE}~fonts package using the BlueSky and BaKoMa fonts
+available from \ctan{} (see the |README| file in that package for
+detailed information). Further font packages are expected soon.
+
+\subsection{Hyphenation patterns}
+
+You can find a collection of hyphenation patterns for the Russian
+language in the \textsf{ruhyphen} package at
+|CTAN:language/hyphenation/ruhyphen|. These patterns support the
+|T2*|~encodings, as well as other popular font encodings used for
+Russian typesetting (including the Omega internal encoding).
+Patterns for other Cyrillic languages should be adapted to work with
+the |T2*|~encodings.
+
+\subsection{\babel{} support for Russian and Ukrainian}
+\label{bblrus}
+
+Version~3.6k of \babel{} includes support for the |T2*|~encodings and
+for typesetting both Russian and Ukrainian texts using the Cyrillic
+letters. The temporary fontencoding |LWN|, which was used in earlier
+releases of \babel{}, will be withdrawn in the near future and replaced
+by the |OT2| encoding.
+
+\subsection{Getting pre-built packages}
+
+Many of the major \TeX{} distributions, such as te\TeX{}, fp\TeX{} and
+\TeX{}live, contain (or soon will) everything that is needed,
+including the LH~fonts, \textsf{ruhyphen} and the latest version of
+\babel{}. We hope that all \TeX{} distributions will soon include all
+of these, so that the chances are that you will not need to install
+this by yourself (but it is not difficult).
+
+If you are using em\TeX, Mik\TeX, or fp\TeX, you
+can download the \textsf{ruemtex} package from
+\URL{ftp://ftp.vsu.ru/pub/tex}.
+
+\section{Usage}
+
+Support for Cyrillic is based on these standard \LaTeX{} mechanisms:
+the \textsf{fontenc} and \textsf{inputenc} packages (and on \babel{}).
+Thus the basic principles for its use are similar to those for other
+European languages: you simply add, to your document preamble, lines
+like the following.
+
+\begin{verbatim}
+\usepackage[T2A]{fontenc}
+\usepackage[koi8-r]{inputenc}
+\end{verbatim}
+
+Here you can put any desired input encoding instead of
+\mbox{\texttt{koi8-r}}: for example, it would be \texttt{cp866} if you are
+using a MS-DOS text editor with this Cyrillic code page to prepare your
+documents, or \texttt{cp1251} if you are a MS~Windows user with Cyrillic
+support. A full list of the available Cyrillic encodings can be found in
+Section~\ref{inputencs} and in the file |cyinpenc.dtx|.
+
+Documents are, naturally, not restricted to a single font encoding;
+this is essential for multi-lingual journals or documents. Such
+changes can be made by using the |\fontencoding| command as part of a
+font-change. However, it is best to access these font encodings via a
+higher-level interface.
+
+Since such changes are often closely related to other
+language-dependent settings, it is often sensible to use the \babel{}
+system, which provides further useful `localisation' and standardised
+multi-lingual interfaces (for further details, see
+Section~\ref{bblrus}). Then you can use lines like the following in
+your document:
+
+\begin{verbatim}
+\usepackage[koi8-r]{inputenc}
+\usepackage[russian]{babel}
+\end{verbatim}
+
+This will automatically choose the default font encoding for Russian,
+which is |T2A|, if available. Documentation of the complete set of
+font-encoding selection rules can be found in |cyrillic.dtx| which is
+part of |rusbabel|.
+
+These \LaTeX{} interfaces are very convenient because they make your
+documents completely portable, being based solely on standard \TeX{}
+features. This will mean that your documents can be processed on any
+\TeX{} system without any need for re-encoding to the `native'
+encoding used on each platform; this is because the encoding of the
+document is specified in the document itself.
+
+Moreover, if necessary, more than one input encoding can be used
+within a document; this could be useful if, for example, you need to
+combine articles prepared by authors on different machines. Each part
+of the document is then identified by a |\inputencoding| command,
+which can therefore only be used between paragraphs.
+
+Please note that you must always use the two standard \LaTeX{}
+commands, |\MakeUppercase| and |\MakeLowercase| to produce uppercase
+or lowercase text in your documents. This is because |\uppercase| and
+|\lowercase| will not work at all for Cyrillic (note that these latter
+two commands are not, and never have been, available for use directly
+in \LaTeX{} documents).
+
+
+\section{Font encodings for Cyrillic languages}
+\label{fontencs}
+
+The Cyrillic font encodings support the following languages. Note
+that some languages can be properly typeset with more than one
+encoding.
+
+\begin{itemize}
+\raggedright
+\item[|T2A|:]
+ Abaza, Avar, Agul, Adyghei, Azerbaijani, Altai, Balkar, Bashkir,
+ Bulgarian, Buryat, Byelorussian, Gagauz, Dargin, Dungan, Ingush,
+ Kabardino-Cherkess, Kazakh, Kalmyk, Karakalpak, Karachaevskii,
+ Karelian, Kirghiz, Komi-Zyrian, Komi-Permyak, Kumyk, Lak, Lezghin,
+ Macedonian, Mari-Mountain, Mari-Valley, Moldavian, Mongolian,
+ Mordvin-Moksha, Mordvin-Erzya, Nogai, Oroch, Osetin, Russian, Rutul,
+ Serbian, Tabasaran, Tadzhik, Tatar, Tati, Teleut, Tofalar, Tuva,
+ Turkmen, Udmurt, Uzbek, Ukrainian, Hanty-Obskii, Hanty-Surgut,
+ Gipsi, Chechen, Chuvash, Crimean-Tatar.
+\item[|T2B|:]
+ Abaza, Avar, Agul, Adyghei, Aleut, Altai, Balkar, Byelorussian,
+ Bulgarian, Buryat, Gagauz, Dargin, Dolgan, Dungan, Ingush, Itelmen,
+ Kabardino-Cherkess, Kalmyk, Karakalpak, Karachaevskii, Karelian,
+ Ketskii, Kirghiz, Komi-Zyrian, Komi-Permyak, Koryak, Kumyk, Kurdian,
+ Lak, Lezghin, Mansi, Mari-Valley, Moldavian, Mongolian,
+ Mordvin-Moksha, Mordvin-Erzya, Nanai, Nganasan, Negidal, Nenets,
+ Nivh, Nogai, Oroch, Russian, Rutul, Selkup, Tabasaran, Tadzhik,
+ Tatar, Tati, Teleut, Tofalar, Tuva, Turkmen, Udyghei, Uigur, Ulch,
+ Khakass, Hanty-Vahovskii, Hanty-Kazymskii, Hanty-Obskii,
+ Hanty-Surgut, Hanty-Shurysharskii, Gipsi, Chechen, Chukcha, Shor,
+ Evenk, Even, Enets, Eskimo, Yukagir, Crimean Tatar, Yakut.
+\item[|T2C|:]
+ Abkhazian, Bulgarian, Gagauz, Karelian, Komi-Zyrian, Komi-Permyak,
+ Kumyk, Mansi, Moldavian, Mordvin-Moksha, Mordvin-Erzya, Nanai,
+ Orok (Uilta), Negidal, Nogai, Oroch, Russian, Saam, Old-Bulgarian,
+ Old-Russian, Tati, Teleut, Hanty-Obskii, Hanty-Surgut, Evenk,
+ Crimean Tatar.
+\end{itemize}
+
+The |X2|~encoding was designed to support all the above languages.
+Its name does not start with |T| because, for example, it contains no
+Latin letters (it is purely a Cyrillic glyph container); it therefore
+cannot be used in mixed-script documents along with the other |T*|
+encodings. Please consult Section~6.4 \textit{Naming conventions} of
+the file |fntguide.tex| in the base \LaTeX{} distribution for details
+of the differences between \LaTeX{} font encodings and how they are
+named.
+
+There are two other \LaTeX{} Cyrillic font encodings, |OT2| and |LCY|,
+that are not included in the base \LaTeX{} distribution. The first is
+a \mbox{7-bit} encoding (hence the |O|) developed by the AMS; it is
+useful for typesetting relatively small fragments of text in Cyrillic,
+using a Latin transliteration scheme. The other, |LCY|, is an
+\mbox{8-bit} Cyrillic encoding which is not compatible with the
+requirements for \LaTeX{} |T*|~encodings (hence the |L|); thus it is not
+suitable for typesetting multi-lingual documents, but it can be used in
+Plain \TeX{}-based macro packages because it is an extension of |OT1|.
+These two encodings are supported by \babel{} and by \textsf{ot2cyr}.
+
+
+\section{Input encodings}
+\label{inputencs}
+
+Several Cyrillic code-pages are widely used. Currently, \LaTeX{}
+contains support for 20~Cyrillic input encodings (some of which are
+variants of each other).
+
+\begin{itemize}
+
+\item |cp855| --- the standard \mbox{MS-DOS} Cyrillic code-page.
+
+\item |cp866| --- the standard \mbox{MS-DOS} Russian code-page.
+ Several code-pages very similar to this are also supported
+ (the differences are all in the range 242--254).
+ \begin{itemize}
+ \item |cp866av| -- the `Cyrillic Alternative' code-page (an
+ alternative variant of cp866);
+ \item |cp866mav| -- the `Modified Alternative Variant';
+ \item |cp866nav| -- the `New Alternative Variant';
+ \item |cp866tat| -- an experimental Tatarian code-page.
+ \end{itemize}
+
+\item |cp1251| --- the standard MS Windows Cyrillic code-page.
+
+\item \mbox{\texttt{koi8-r}} --- a standard Cyrillic code-page widely
+ used in UNIX-like systems for Russian language support that is
+ specified in RFC~1489. The situation with \mbox{\texttt{koi8-r}} is
+ somewhat similar to that for |cp866|: there are several similar
+ code-pages which coincide for all Russian letters but add some other
+ Cyrillic letters. The following are supported:
+ \begin{itemize}
+ \item \mbox{\texttt{koi8-u}} -- for Ukrainian;
+ \item \mbox{\texttt{koi8-ru}} -- this is described in a draft RFC
+ document specifying a widely used character set for mail and news
+ exchange in the Ukrainian internet community, as well as for
+ presenting WWW information resources in the Ukrainian language;
+ \item |isoir111| -- the \mbox{ISO-IR-111 ECMA} Cyrillic Code Page.
+ \end{itemize}
+
+\item |iso88595| --- the \mbox{ISO 8859-5} Cyrillic code-page (also called
+ \mbox{ISO-IR-144}).
+
+\item |maccyr| --- the Apple Macintosh Cyrillic code-page (also known
+ as Microsoft cp10007) and |macukr|, the Apple Macintosh Ukrainian
+ code-page, very similar to the Cyrillic code-page.
+
+\item The Mongolian code-pages: |ctt| |dbk| |mnk| |mos| |ncc| |mls|.
+ These code-pages were taken from Oliver Corff's `Mon\TeX' package
+ (available at |CTAN:language/mongolian/montex|). Since the |T2*|
+ encodings support the Mongolian Cyrillic script, it is convenient to
+ have support for Mongolian input encodings as well. Pointers to
+ documentation for these code-pages will be much appreciated.
+
+\end{itemize}
+
+
+\section{Reporting bugs}
+
+In case you find a bug and want to report it, please follow the
+guidelines given in the file |bugs.txt| in the base \LaTeX{}
+distributions. Note that there is a category specifically for
+reporting any bugs that occur only when using Cyrillic fonts or
+support packages.
+
+
+\section{Miscellanea in the \textsf{T2} bundle}
+\label{t2m}
+
+The \textsf{T2}~bundle at |CTAN:macros/latex/contrib/supported/t2|
+contains some other useful files, including support for Plain
+\TeX{}-based macro packages, support for Bib\TeX{} and MakeIndex (see
+also the \textsf{xindy} program and package---highly recommended for
+making indices with Cyrillic), support for the \textsf{fontinst}
+package, mapping tables relating these Cyrillic font encodings (and
+input encodings) to the Unicode character names and slots (these are
+in the subdirectory |enc-maps|), and more!
+
+To produce documented source listings of the \textsf{T2}~package, run
+\LaTeX{} on the |*.dtx| and |*.fdd| files therein.
+
+When typesetting Cyrillic texts, there is a tradition of using
+Cyrillic letters (in some situations) within math formul\ae, in
+exactly the same way as most of the world uses Latin letters.
+By default this does not work, because symbols declared with
+|\DeclareTextSymbol| may not be used in math.
+
+If you need within math to `transparently' typeset glyphs declared in
+font encoding definition files, then you could try using the
+experimental \textsf{mathtext} package, which is also in the
+\textsf{T2}~bundle. Note that this package uses up at least one
+additional math alphabet per font encoding. For this and other
+reasons, The \LaTeX3 Project Team considers that this experimental
+extension to \LaTeX{}'s glyph-handling mechanisms should be used with
+caution; but please try it out and send us your opinions and ideas.
+Note that it is not included in the core of \LaTeX{} because both the
+coding and the interfaces are likely to change at some point in the
+future.
+
+Finally, here are some pointers to further information:
+
+\begin{quote}
+ \URL{http://www.cemi.rssi.ru/cyrtug}\\
+ \URL{http://xtalk.price.ru/tex}
+\end{quote}
+
+\end{document}
diff --git a/macros/latex-dev/doc/encguide.pdf b/macros/latex-dev/doc/encguide.pdf
new file mode 100644
index 0000000000..dd13622c48
--- /dev/null
+++ b/macros/latex-dev/doc/encguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/encguide.tex b/macros/latex-dev/doc/encguide.tex
new file mode 100644
index 0000000000..96ed7edf6f
--- /dev/null
+++ b/macros/latex-dev/doc/encguide.tex
@@ -0,0 +1,1481 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+%
+
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[1994/11/20]
+
+\usepackage[T1]{fontenc}
+\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
+\usepackage{textcomp}
+\usepackage{url}
+\usepackage{mflogo}
+
+\addtolength\textheight{6\baselineskip}
+\addtolength\topmargin{-2\baselineskip}
+
+
+\newcommand\ttverb[1]{\texttt{\string#1}}
+
+
+% for encodings
+\providecommand{\Enc}[1]{\texttt{#1}}
+
+% for packages
+\providecommand{\Pkg}[1]{%
+ \textsf{#1}}
+
+% for files
+\providecommand{\File}[1]{%
+ \texttt{#1}}
+
+% let's have meta values too
+\providecommand{\meta}[1]{%
+ \ensuremath{\langle}\emph{#1}\ensuremath{\rangle}}
+
+\usepackage{tabularx}
+
+% eine Umgebung zur Darstellung von Kodierungen
+%
+% Argumente:
+% #1: Name in LaTeX (z.B. OT1)
+% #2: Name der Kodierung (z.B. TeX text)
+% #3: Name des Autors (z.B. Don Knuth)
+% #4: Bereich der benützten Glyphindizes
+% #5: variable Positionen
+% #6: Beispielzeichensatz
+% #7: Referenz
+%
+% XXX add code to handle more than a single font example (e.g., larm1000,
+% lbrm1000, and lcrm1000).
+%
+\newenvironment{encodinginfo}[7]%
+ {\noindent
+ \begin{tabularx}{\linewidth}{@{}l>{\raggedright\let\\\tabularnewline}X}%
+ \LaTeX{} name: & \texttt{#1}\\%
+ Public name: & #2\\%
+ Author: & #3\\%
+ Glyph slots used: & #4\\%
+ Variable slots: & #5\\%
+ Font example: & \def\@tempa{#6}\ifx\@tempa\@empty---%
+ \else\texttt{#6}\referenceftable{#6}\fi\\%
+ Further reference: & #7%
+ \end{tabularx}%
+ \par\nobreak
+ \vspace*{3pt}%
+ \quote
+ }%
+ {\endquote
+ \vspace{6pt}}
+
+\makeatletter
+\def\referenceftable#1{
+ \@ifundefined{r@fonttable:#1}%
+ \relax
+ {;\space encoding table on page~\pageref{fonttable:#1}}%
+}
+
+% font table macros mainly lifted from manmac.tex
+\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}}
+\def\hex#1{\hbox{\rm\H{}\tt#1}}
+
+\def\oddline#1{\cr\noalign{\nointerlineskip}
+ \multispan{19}\hrulefill&
+ \setbox0=\hbox{\lower 2.3pt\hbox{\hex{#1x}}}\smash{\box0}\cr
+ \noalign{\nointerlineskip}}
+\def\evenline{\cr\noalign{\hrule}}
+\def\chartstrut{\lower4.5pt\vbox to14pt{}}
+\def\beginchart#1#2{$$\global\count@=0 #1
+ \halign to\hsize\bgroup
+ \chartstrut##\tabskip0pt plus10pt&
+ &\hfil##\hfil&\vrule##\cr
+ \lower6.5pt\null
+ &#2&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
+\def\endchart{\raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
+ &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$}
+\def\:{\setbox0=\hbox{\noboundary\char\count@\noboundary}%
+ \ifdim\ht0>7.5pt\reposition
+ \else\ifdim\dp0>2.5pt\reposition\fi\fi
+ \box0\global\advance\count@ by1 }
+\def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}
+\def\normalchart{%
+ &\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0
+ &\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1
+ &\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2
+ &\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3
+ &\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4
+ &\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5
+ &\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6
+ &\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7
+ &\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ \top}
+
+\def\notophalf{}
+\def\tophalf{%
+%\noalign{\vskip 5pt\hrule}
+ &\oct{20x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline8
+ &\oct{21x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{22x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline9
+ &\oct{23x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{24x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline A
+ &\oct{25x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{26x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline B
+ &\oct{27x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{30x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline C
+ &\oct{31x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{32x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline D
+ &\oct{33x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{34x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline E
+ &\oct{35x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
+ &\oct{36x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline F
+ &\oct{37x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline}
+
+\def\ftable#1#2{%
+ \batchmode
+ \font\X=#1%
+ \errorstopmode
+ \ifx\X\nullfont
+ \@warning{Font #1 not found, table omitted}
+ \else
+ \count@="80
+ \setbox0=\hbox{\X
+ \loop\char\count@\advance\count@ by1 \ifnum\count@<"100
+ \repeat}%
+ \ifdim\wd0>0pt \let\top\tophalf\else\let\top\notophalf\fi
+ \beginchart\X{\hfill\llap{\textbf{#1, \large#2}\label{fonttable:#1}}}\normalchart
+ \endchart\par\vfill
+ \fi}
+\makeatother
+
+
+\setcounter{tocdepth}{3}
+
+\title{\LaTeX{} font encodings}
+
+\author{Frank Mittelbach \and Robin
+ Fairbairns \and Werner Lemberg \and \LaTeX3 Project Team.}
+
+\date{\copyright~Copyright 1995--2016 \\[5pt] 18 February 2016}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+This document explains the ideas that underpin \LaTeX{} font
+encodings and the constraints that apply when defining a new encoding; it
+also lists the encodings that have already been defined.
+
+\subsection{Encodings in \TeX{}}
+
+\TeX{} (the program) implicitly recognises three sorts of encoding,
+and all are (in a sense) discussed in the \TeX{}book~\cite{A-W:DKn86}:
+\begin{itemize}
+\item[1.] The input encoding, which specifies the meanings of characters
+ in files presented to \TeX{} for processing. The \TeX{}book
+ suggests that `your version of \TeX{} will recognise the characters
+ you type on your keyboard' (\TeX{} the program has provision for
+ static translations of input characters).
+\end{itemize}
+Such direct use of \TeX{}'s facilities is not the way modern
+\LaTeX{} (or indeed any other \TeX{} macro package) is likely to deal
+with input encodings. This document does not address the topic of
+input encodings; the interested reader should examine the \LaTeX{}
+base package \Pkg{inputenc} \cite[sec.~7.5.2, p.~357]{A-W:MG2004}.
+\begin{itemize}
+\item[2.] The token stream that \TeX{} processes internally. This stream
+ of \TeX{}'s consciousness is discussed in great detail in the
+ \TeX{}book.
+\end{itemize}
+Again, this document does not address the topic. \LaTeX's internal
+character representation (\textsc{licr}) is well discussed in
+\cite[sec.~7.11.2, p.~442]{A-W:MG2004}.
+\begin{itemize}
+\item[3.] The font encoding---i.e., the mapping of character codes to
+ glyphs in the fonts that are used to typeset \TeX{}'s output.
+ Again, a set of font encodings is enumerated in the \TeX{}book, but
+ that set has proved inadequate to the needs of modern multilingual
+ use of \LaTeX.
+\end{itemize}
+This document explains \emph{why} Knuth's original set of encodings is
+inadequate to modern conditions, and discusses the issues that
+surround the design and definition of new font encodings.
+
+Font encodings are important for more than their r\^{o}le in mapping the
+glyphs of the fonts to be used for typesetting: their glyph tables are
+also the context in which \TeX{}'s hyphenation algorithm operates.
+There are constraints imposed by \TeX{} that affect the way in which
+new font encodings, for use in a multi-lingual environment, may be
+structured (see section~\ref{sec:restrictions} for details).
+
+\subsection{The history of \TeX{} font encodings}
+
+Little attention was paid to font encodings prior to the arrival of
+\TeX{}\,3. Up to that time, one used Donald Knuth's fonts (the
+Computer Modern family, using the encodings we now refer to as \Enc{OT1} and
+the \Enc{OM} series), or one was on one's own.
+
+The Computer Modern text encoding raises problems in unmodified
+\TeX{}, because hyphenation cannot break words containing
+\verb"\accent" commands. Even in those Western European languages for
+which the \Enc{OT1} encoding has symbols for the necessary
+\verb"\accent"-based diacritics, this shortcoming ruins typesetting of
+running text.
+
+With the advent of \TeX{}\,3, with its ability to switch between
+hyphenation pattern sets, it was clear that the situation could not
+continue. Thus a group at the TUG Annual General Meeting in Cork,
+Ireland, specified a uniform encoding for 256-glyph fonts, that
+contains accented letters and non-\textsc{ascii} letters necessary to
+express most Western European languages (and some Eastern European ones)
+without recourse to the \verb"\accent" command.
+
+This ``Cork'' encoding has since been realised in a series of fonts
+designed with Metafont, in at least one font series that is available
+both in Adobe Type 1 format and in OpenType format, % viz., Latin Modern
+and in a number of virtual-font mappings of other font series.
+
+Since the time of the Cork meeting, much effort has been devoted to
+the design of encodings for text fonts to use with \TeX{}, and the
+Cork encoding influenced the design of many such encodings.
+
+Encodings for mathematical fonts have, in contrast, changed little
+since Knuth's contributions. A TUG Technical Working Group was
+established at the Cork meeting, whose aim was to define a set of
+256-glyph encodings to regularise and extend Knuth's originals, using
+ideas from several other fonts that had appeared since, and from the
+known needs of researchers in mathematics and the mathematical sciences.
+
+Independently, a first proposal (the so-called \emph{Aston proposal}) was worked
+out by Justin Ziegler together with Frank Mittelbach and other members of the
+\LaTeX3 project team~\cite{ziegler}. A first implementation of
+this propsal was realized by Matthias Clasen und Ulrik
+Vieth~\cite{clasen,clasen-vieth}.
+
+However, the slow progress of these Mathematical encodings has been
+overtaken by the addition (in the last decade or so) of a large number
+of mathematical symbols to Unicode~\cite{beeton}; one can expect
+further changes so that new public mathematical font encodings will
+most likely be delayed still further.
+
+
+
+\subsection{Further information}
+
+For a general introduction to \LaTeX, including the new features of
+\LaTeXe, you should read \emph{\LaTeXbook},
+Leslie Lamport, Addison Wesley, 2nd~ed, 1994.
+
+A more detailed description of the new features of \LaTeX, including an
+overview of more than 200 packages and nearly 1000 ready to run examples, is
+to be found in \emph{\LaTeXcomp{} second edition} by Frank Mittelbach and
+Michel Goossens~\cite{A-W:MG2004}.
+
+The \LaTeX{} project sponsored a report on Mathematical % spelt out in full
+font encodings, which
+is worth reading for its insight into the problems of defining the way
+in which math is used: see~\cite{ziegler,clasen,clasen-vieth}.
+
+The \LaTeX{} font selection scheme is based on \TeX, which is described
+by its developer in \emph{The \TeX book}, Donald E.~Knuth, Addison
+Wesley, 1986, revised in 1991 to include the features of \TeX~3.
+
+For more information about \TeX{} and \LaTeX, please contact your local
+\TeX{} Users Group, or the international \TeX{} Users Group
+(\url{http://www.tug.org}).
+
+
+
+\section{Existing font encodings}
+
+This section lists the encodings currently assigned; for each
+encoding, we list the registered (\LaTeX{}) name, the assigned purpose
+of the encoding, and the author. Further details may list the code
+positions used in the encoding, the \emph{variable slots} (see below),
+an example font (for which a listing will be provided later in the
+document if the relevant fonts are present), and a source for further
+reference.
+
+While the characteristic feature of an encoding is that each font
+encoded according to the encoding should have the same glyph set,
+there are some encodings (notably \Enc{OT1} and its descendants) in
+which a few glyph code slots differ in their contents in different
+fonts.
+
+\subsection{Naming conventions}
+
+Names for encoding schemes are strings of up to three letters (all
+upper case) plus digits.
+
+The \LaTeX3 project reserves the use of encoding names starting with the
+following letters: |T| (standard 256-long text encodings), |TS|
+(symbols that are designed to extend a corresponding |T| encoding),
+|X| (text encodings that do not conform to the strict requirements for
+|T| encodings), |M| (standard 256-long mathematical encodings), |S| (other
+symbol encodings), |A| (other special applications), |OT| (standard
+128-long text encodings), and |OM| (standard 128-long mathematical encodings).
+
+Please do not use the above starting letters for non-portable
+encodings. If new standard encodings emerge then we shall add them in
+a later release of \LaTeX.
+
+Encoding schemes which are local to a site or a system should start
+with |L|, experimental encodings intended for wide distribution will
+start with |E|, whilst |U| is for Unknown or Unclassified encodings.
+
+\begin{quote}
+ \itshape We recommend that new encoding names should not be
+ introduced unless careful consideration and discussion in the user
+ community has confirmed the need for the encoding. If encodings have to
+ change from font to font, a number of problems arise, so it is best to
+ develop encodings that can be used with a large number of fonts in parallel.
+ This allows documents to be typeset using different fonts without problems.
+
+ The \Enc{TS1} encoding is a good example of a \emph{bad} encoding (even
+ though it was developed with the best intentions) as a huge number of fonts
+ can only implement parts of it. Similarly, the fact that the few sets of
+ available mathematical fonts (beside Computer Modern Math) nearly
+ all implement slightly different encodings is a huge source of
+ problems. Don't add to this if possible!
+\end{quote}
+
+
+\subsection{128$^+$ glyph encodings (text)}
+
+The `OT' series of font encodings start with Donald Knuth's original
+text encoding, that used for the text fonts in the earliest releases
+of \TeX{} itself. The `O' of the encoding designator may be taken as
+signifying `original', or just `old'.
+
+\begin{encodinginfo}{OT1}
+ {\TeX{} text}
+ {Donald Ervin Knuth}
+ {0x00--0x7F}
+ {0x0B--0x0F, 0x24, 0x3C, 0x3E, 0x5C, 0x7B--0x7D}
+% {0X--'177}
+% {'13--'17, '44, '74, '76, '134, '173--'175}
+ {cmr10}
+ {\cite[p.427]{A-W:DKn86}}
+
+ Donald Knuth designed his font encoding (and hence his fonts) in a
+ very different environment from that which now pervades the \TeX{}
+ world: his (mainframe) computer had very little memory, there was
+ little experience in (or demand for) for multilingual technical
+ typesetting, and as a result it was appropriate to sacrifice
+ uniformity for efficiency.
+
+ Thus Knuth's original fonts differ slightly in some encoded slots:
+ for example, the glyphs \texttt{\string<}, \texttt{\string>},
+ \verb=\=, \verb={=, and \verb=}= are only available in the
+ typewriter fonts and the \textdollar{} and \textsterling{} signs
+ share the same position (in different font shapes).
+
+ This means that direct selection of these slots can produce
+ unpredictable results, e.g., typing \texttt{\string<} or
+ \verb=\symbol{'74}= in a document can yield `\textquestiondown'.
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{OT2}
+ {UW cyrillic encoding}
+ {University of Washington}
+ {0x00--0x7F}
+ {---}
+ {wnr10}
+ {\cite{Beeton:TB6-3-124}}
+ Support for this encoding is available in the Cyrillic bundle although for
+ all practical purposes it is better to use one of the \Enc{T2} encodings.
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{OT3}
+ {UW IPA encoding}
+ {University of Washington}
+ {0x00--0x7f}
+ {---}
+ {wsuipa10}
+ {\cite[p.149]{CorkGW:91}}
+ The \Enc{OT3} encoding was never really used with \LaTeXe{}
+ following the introduction of the TIPA system which offers much
+ better support for IPA. In particular, no \File{ot3enc.def}
+ file was ever produced.
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{OT4}
+ {Polish text encoding}
+ {B.~Jackowski and M.~Ry\'cko} %% ? Marcin Woli\'nski
+ {0x00--0x7F, 0x81, 0x82, 0x86, 0x8A, 0x8B, 0x91, 0x99, 0x9B, 0xA1,
+ 0xA2, 0xA6, 0xAA, 0xAB, 0xAE, 0xAF, 0xB1, 0xB9, 0xBB, 0xD3, 0xF3,
+ 0xFF}
+ {0x0B--0x0F, 0x24, 0x3C, 0x3E, 0x5C, 0x7B--0x7D}
+ {plr10}
+ {---}
+
+ While Knuth included the means of typesetting the `lost L' (\L) in
+ his \Enc{OT1} encoding, he omitted the ogonek (\,\,\k{}), a diacritic
+ mark that is also needed in Polish text; hence the appearance, well
+ before the \Enc{T1} encoding, of fonts using this encoding.
+\end{encodinginfo}
+
+\begin{encodinginfo}{OT5}
+ {Not currently allocated}
+ {---}
+ {---}
+ {---}
+ {}
+ {---}
+
+\end{encodinginfo}
+
+
+
+\begin{encodinginfo}{OT6}
+ {Armenian text encoding}
+ {Serguei Dachian}
+ {0x03--0x0F, 0x13--0x7F}
+ {---}
+ {artmr10}
+ {---}
+
+ This encoding was allocated to permit use of Dachian's
+ Armenian fonts in a standard \LaTeX{} environment.
+
+ Because of license issues the \texttt{artmr} fonts are not necessarily
+ included in distributed \TeX{} installations (and for this reason the
+ corresponding encoding table is not shown below). However, the fonts
+ and the support macros can be found on the CTAN archives (look for
+ \texttt{armtex}).
+
+\end{encodinginfo}
+
+
+
+\subsection{256 glyph encodings (text)}
+
+\begin{encodinginfo}{T1}
+ {Cork encoding}
+ {Euro \TeX{} conference at Cork}
+ {0x00--0xFF}
+ {---}
+ {ecrm1000}
+ {\cite[p.514]{tub:MFe90}, \cite[p.99]{Knappen:TB17-2-96}}
+
+ The Cork encoding was developed so that advantage could be taken of
+ the (then) new facilities of \TeX{}\,3, allowing hyphenation of
+ most Western European (and some Eastern European) languages in an
+ unmodified version of \TeX{}.
+
+ The encoding was developed in the absence of any extant effort at
+ font design, but instances written in Metafont (the `EC' fonts), and
+ more recently Adobe Type 1 instances of the same fonts have become
+ available.
+
+ Substantial (but incomplete) instances have also been developed,
+ which use virtual fonts. These latter instances map either Knuth's
+ original (OT1-encoded) fonts, or commercial fonts that contain the
+ Adobe `standard' set of 224 glyphs.
+\end{encodinginfo}
+
+\begin{encodinginfo}
+ {T2A, T2B, T2C}
+ {Cyrillic encodings}
+ {The CyrTUG font team}
+ {0x00--0xFF}
+ {--- (within each encoding)}
+ {larm1000}
+ {\cite{Berdnikov:eurotex-98}}
+
+ There are too many glyphs in the full Cyrillic complement of
+ languages for all of them to be covered by a single
+ \LaTeX{}-compliant encoding (the lower half of each
+ \Enc{T2}~encoding is identical to that of \Enc{T1}, in order that
+ each should be a conforming \LaTeX{} encoding~--- see
+ section~\ref{sec:restrictions}). The approach taken is
+ therefore to develop a single encoding, \Enc{X2} (see \ref{sec:extendedenc})
+ which contains all the glyphs needed for the full set of
+ languages, and then to derive the three \LaTeX{}-complaint
+ \Enc{T2}-family encodings using the \Enc{X2} set together with that of
+ \Enc{T1}.
+
+\end{encodinginfo}
+
+
+
+\begin{encodinginfo}{T3}
+ {IPA encoding}
+ {FUKUI Rei, University of Tokyo}
+ {0x00--0xFF}
+ {---}
+ {tipa10}
+ {\cite[p.102]{Rei:TB17-2-102}}
+
+
+ The \Enc{T3} encoding (and associated macros) provides the glyphs required
+ in phonetic description according to current International Phonetic
+ Association recommendations \cite{ipa}.
+
+ The \Enc{T3} encoding does \emph{not fulfil} the requirements for \Enc{T}
+ encodings---the name is a historical accident. The correct name would be
+ \Enc{X3}, but due to the fact that this font family has been used under its
+ current encoding name for a long time, the name will not change for
+ compatibility reasons.
+
+\end{encodinginfo}
+
+
+
+\begin{encodinginfo}{T4}
+ {African Latin (fc)} % public name
+ {J\"org Knappen} % author name
+ {0x00--0xFF} % range(s) of slots used for glyphs
+ {0x24} % range(s) of slots with variable glyphs if any
+ {fcr10} % name of an example font
+ {\cite{tub:JKn93}}
+
+The African Latin fonts contain in their lower half (0--127) the same
+characters as the European Latin (T1-encoded) Fonts, while in their
+upper half (128--255) they
+contain letters and symbols for African languages that use extended
+Latin alphabets.
+Due to lack of space, J\"org had to play the unfortunate trick of
+assigning \verb=\textdollar= and \verb=\textsterling=
+the same position; users should take these characters
+from the text companion font, if they are needed. Instead of defining
+a lot of new control sequences for the single letters, there are three
+accent-like control sequences with general purpose:
+\verb=\m= (Modified-1),
+\verb=\M= (Modified-2) and
+\verb=\B= (Barred).
+Most standard \LaTeX{} encoding-dependent commands
+work. However, the Icelandic special letters are not available and `best
+replacements' for \verb=\Th=, \verb=\th=, and \verb=\dh=
+are used (barred T and d resp.).
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{T5}
+ {Vietnamese encoding}
+ {Werner Lemberg and
+ Vladimir Volovich}
+ {0x00--0xFF}
+ {---}
+ {vnr10}
+ {\cite{vnr}}
+
+ The \Enc{T5} encoding was developed for Vietnamese. Again, this encoding
+ \emph{does not} conform to the requirements for a \Enc{T}-encoding
+ because its large number of accented letters prevent the \verb=\lccode= and
+ \verb=\uccode= mapping requirements for \Enc{T} encodings from being
+ fulfilled. However, since the Vietnamese language does not
+ use word division in typesetting so that this requirement is
+ actually not important for this particular language.
+ Since every glyph used in Vietnamese text is internally
+ represented as \textsc{licr} macros, the commands \verb=\MakeUppercase= and
+ \verb=\MakeLowercase= still work as expected (as they change the case of the
+ \textsc{ascii} characters in \textsc{licr} definitions).
+
+\end{encodinginfo}
+
+\begin{encodinginfo}
+ {T6}
+ {Armenian}
+ {---}
+ {---}
+ {---}
+ {}
+ {---}
+
+ This encoding is reserved to permit future expansion of Armenian
+ \TeX{} to use 256-character (hyphenatable) fonts.
+\end{encodinginfo}
+
+\begin{encodinginfo}{T7}
+ {Greek encoding}
+ {---}
+ {---}
+ {---}
+ {}
+ {---}
+
+The name is already reserved for a 256 glyph greek encoding. The encoding
+itself hasn't been defined so far.
+
+\end{encodinginfo}
+
+
+
+\subsection{256$^-$ glyph encodings (text symbols)}
+
+\begin{encodinginfo}{TS1}
+ {Text Companion encoding (Cork)}
+ {J\"org Knappen}
+ {0x00--0x0D, 0x12, 0x15, 0x16, 0x18--0x1D, 0x20, 0x24, 0x27, 0x2A,
+ 0x2C--0x3A, 0x3C--0x3E, 0x4D, 0x4F, 0x57, 0x5B, 0x5D--0x60,
+ 0x62--0x64, 0x6C--0x6E, 0x7E--0xBF, 0xD6, 0xF6}
+ {---}
+ {tcrm1000}
+ {\cite{Knappen:TB17-2-96}}
+
+ The text symbol encoding offers access to symbolic glyphs that are
+ commonly used in text (for a variety of reasons), and whose style
+ should vary with the text that surrounds them.
+
+ Unfortunately, the \Enc{TS1} encoding was developed without
+ reference to the glyphs available in existing commercial fonts.
+ As a result, only font families
+ explicitly developed for \TeX{} (i.e., typically originating with
+ \MF{}) actually contain all glyphs required by the \Enc{TS1}
+ encoding. Most other font families (whether free or commercial)
+ often only provide half of the set%
+%%
+%% don't show the comment if the tables are not generated
+%%
+\expandafter\ifx\csname r@fonttable:tcrm1000\endcsname\relax
+\else
+ \expandafter\ifx\csname r@fonttable:ptmr8c\endcsname\relax
+ \else
+ \space (compare the two tables for \Enc{TS1} on
+ pages~\pageref{fonttable:tcrm1000}
+ and~\pageref{fonttable:ptmr8c})%
+ \fi
+\fi.
+ To improve this situation somewhat, NFSS provides a way to define encoding
+ subsets on a per family basis in the \Pkg{textcomp} package (which
+ package offers support for the \Enc{TS1} encoding).
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{TS3}
+ {IPA symbol encoding}
+ {FUKUI Rei, University of Tokyo}
+ {0x00--0x0A, 0x20--0x49, 0x50--0x56, 0x70--0x7B}
+ {---}
+ {tipx10}
+ {\cite{Rei:TB17-2-102}}
+
+ The \Enc{TS3} encoding (together with the \Enc{T3} encoding) provides the
+ glyphs for typesetting phonetic transcriptions following the
+ guidelines of the International Phonetic Association \cite{ipa}. Support
+ is offered through the \Pkg{tipa} package.
+\end{encodinginfo}
+
+
+
+
+\subsection{256 glyph encodings (text extended)}
+\label{sec:extendedenc}
+
+\begin{encodinginfo}
+ {X2}
+ {Cyrillic glyph container}
+ {The CyrTUG font team}
+ {0x00--0xFF}
+ {---}
+ {rxrm1000}
+ {\cite{Berdnikov:eurotex-98}}
+
+ This encoding specifies the glyph container for Cyrillic characters,
+ which is used in specifying the \Enc{T2A}, \Enc{T2B} and \Enc{T2C} encodings.
+\end{encodinginfo}
+
+
+
+
+\subsection{128$^+$ glyph encodings (mathematics)}
+
+
+\begin{encodinginfo}{OML}
+ {\TeX{} math italic}
+ {Donald Ervin Knuth}
+ {0x00--0x7F}
+ {---}
+ {cmmi10}
+ {\cite[p.430]{A-W:DKn86}}
+
+ The \Enc{OML} encoding contains italic Latin and Greek letters for
+ use in mathematical formulas (typically used for variables) together
+ with some symbols.
+
+\end{encodinginfo}
+
+\begin{encodinginfo}{OMS}
+ {\TeX{} math symbol}
+ {Donald Ervin Knuth}
+ {0x00--0x7F}
+ {---}
+ {cmsy10}
+ {\cite[p.431]{A-W:DKn86}}
+
+ The \Enc{OMS} encoding contains basic mathematical symbols,
+ together with an uppercase ``calligraphic'' Latin alphabet.
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{OMX}
+ {\TeX{} math extension}
+ {Donald Ervin Knuth}
+ {0x00--0x7F}
+ {---}
+ {cmex10}
+ {\cite[p.432]{A-W:DKn86}}
+
+ \Enc{OMS} encodes mathematical symbols with variable sizes, such as
+ the $\sum$ sign, which changes its size if used in displayed
+ formulas, and the construction parts for
+ brackets, braces and radicals, etc., which can stretch to accommodate
+ the thing they're enclosing.
+
+\end{encodinginfo}
+
+
+
+
+\subsection{256 glyph encodings (mathematics)}
+
+So far there are no 256 glyph mathematical encodings. A proposal is
+given in \cite{ziegler}.
+
+
+\subsection{Other encodings}
+
+\begin{encodinginfo}
+ {C..}
+ {CJK encodings}
+ {Werner Lemberg}
+ {0x00--0xFF}
+ {---}
+ {} % no font, of course
+ {\cite{CJK}}
+
+ The \Pkg{CJK} package defines a number of encodings which access Chinese,
+ Japanese and Korean fonts.
+
+\end{encodinginfo}
+
+\begin{encodinginfo}
+ {E..}
+ {Experimental encodings}
+ {---}
+ {0x00--0xFF}
+ {all}
+ {}
+ {\cite[p.416]{A-W:MG2004}}
+
+ As the name indicates, encodings starting with the letter \Enc{E} are
+ intended for experimental encodings, that are still likely to change.
+\end{encodinginfo}
+
+\begin{encodinginfo}{L..}
+ {Local encoding (site dependent)}
+ {---}
+ {0x00--0xFF}
+ {all}
+ {}
+ {\cite[p.416]{A-W:MG2004}}
+
+ `Local' encodings provide the means to develop representation
+ techniques that are suited to a particular \TeX{} environment. While
+ the developer has freedom to specify their encoding as he or she
+ pleases, there is a strong incentive to obey the \LaTeX{} rules for
+ encodings, since it will otherwise be difficult to compose text using
+ the encoding.
+
+ At least it was the intention that \Enc{L..} encodings are local and
+ site dependent. However, a number of such encodings became generally
+ used without ever getting a different name allocated.
+
+\end{encodinginfo}
+
+
+
+\begin{encodinginfo}{LY1}
+ {Y\&Y 256 glyph encoding}
+ {Berthold Horn}
+ {0x00--0x08, 0x0C, 0x10, 0x12--0xFF}
+ {\emph{believed none}}
+ {ptmr8y}
+ {\cite[p.416]{A-W:MG2004}}
+
+ This is an alternative to the \Enc{T1} encoding developed by Y\&Y and
+ used in their commercial \TeX{} implementation.
+
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{LV1}
+ {MicroPress encoding}
+ {Michael Vulis}
+ {\emph{unknown}}
+ {\emph{unknown}}
+ {}
+ {\cite[p.416]{A-W:MG2004}}
+
+ This is an encoding developed by MicroPress and used for some of their
+ fonts.
+
+\end{encodinginfo}
+
+
+\begin{encodinginfo}{LGR}
+ {Greek 256 glyph encoding}
+ {\emph{unknown}}
+ {0x00--0xFF}
+ {\emph{believed none}}
+ {grmn1000}
+ {\cite[p.575]{A-W:MG2004}}
+
+ Currently the main encoding in use for the Greek language.
+
+ This encoding doesn't conform to the restrictions for
+ \Enc{T}-encodings described in section~\ref{sec:restrictions} on
+ page~\pageref{sec:restrictions} as it doesn't have \textsc{ascii}
+ glyphs at all.
+
+\end{encodinginfo}
+
+
+\begin{encodinginfo}
+ {PD1}
+ {PDF DocEncoding}
+ {Adobe}
+ {0x08--0x0A, 0x0C, 0x0D, 0x18--0x7E, 0x80--0x9E, 0xA0--0xAE, 0xB0--0xFF}
+ {---}
+ {}
+ {\cite{Adobe:PDF-1.6}, \cite{hyperref}}
+
+ The \Enc{PD1} encoding is a virtual encoding with 256 glyphs needed to
+ produce bookmarks and similar text in PDF document generated with pdf\LaTeX.
+ The encoding is ``virtual'' because by design there are no \TeX{}
+ fonts that cover \Enc{PD1}. Details can be found in appendix D.1
+ of~\cite{Adobe:PDF-1.6}.
+\end{encodinginfo}
+
+\begin{encodinginfo}
+ {PU}
+ {PDF Unicode Encoding}
+ {Adobe}
+ {---}
+ {---}
+ {}
+ {\cite{Adobe:PDF-1.6}, \cite{hyperref}}
+
+ Another virtual encoding (with more than 600 characters) for
+ Unicode-encoded bookmarks in PDF documents.
+\end{encodinginfo}
+
+\begin{encodinginfo}{U}
+ {Unknown encoding}
+ {---}
+ {potentially 0x00-0xFF}
+ {all}
+ {wasy10}
+ {\cite[p.416]{A-W:MG2004}}
+
+ This encoding should be used for fonts that resist classification,
+ e.g., when it is clear that there will never be more than one font
+ using the same encoding.
+
+\end{encodinginfo}
+
+
+
+\section{Restrictions}
+\label{sec:restrictions}
+
+
+\subsection{Required glyphs for general text encodings}
+
+Encodings that are supposed to be used with \LaTeX{} for `general
+purpose text fonts' need to have certain fixed glyphs in certain
+encoding slots. A `general purpose text font' is one intended for
+arbitrary natural language text and not just within special
+environments (such as the phonetic alphabet) or just for typesetting
+individual symbols (e.g., the text companion font with encoding
+\Enc{TS1}).
+
+This is the case for the following glyphs that have to be in their
+\textsc{ascii} positions for general purpose text encodings:
+\begin{center}
+\begin{tabular}[t]{cc}
+ Glyph & Position \\ \hline
+ ! & \number`\! \\
+ ' & \number`\' \\
+ ( & \number`\( \\
+ ) & \number`\) \\
+ \relax* & \number`\* \\
+ + & \number`\+ \\
+ , & \number`\, \\
+ - & \number`\- \\
+ . & \number`\. \\
+ / & \number`\/ \\
+ 0 \ldots\ 9 & \number`\0\ to \number`\9 \\
+ \end{tabular}
+ \quad
+ \begin{tabular}[t]{cc}
+ Glyph & Position \\ \hline
+ : & \number`\: \\
+ ; & \number`\; \\
+ = & \number`\= \\
+ ? & \number`\? \\
+ @ & \number`\@ \\
+ A \ldots\ Z & \number`\A\ to \number`\Z \\
+ \relax[ & \number`\[ \\
+ ] & \number`\] \\
+ ` & \number`\` \\
+ a \ldots\ z & \number`\a\ to \number`\z \\
+\end{tabular}
+\quad
+\begin{tabular}[t]{cc}
+Glyph\footnotemark & Position \\ \hline
+< & \number`\< \\
+> & \number`\> \\
+\string| & \number`\| \\
+\end{tabular}\footnotetext{The requirement for these three glyphs is
+ violated in the Latin alphabet \Enc{OT} encodings.}
+\end{center}
+In addition the following glyphs have to be present
+somewhere\footnote{The position in this case is not important as they
+are generated from ligature programs.} in the encoding together with
+corresponding ligature programs to generate them:
+\begin{center}
+\begin{tabular}[t]{cc}
+Glyph & Ligature program \\ \hline
+ `` & \texttt{`\/`} \\
+ '' & \texttt{'\/'} \\
+ -- & \texttt{-\/-} \\
+ --- & \texttt{-\/-\/-} \\
+\end{tabular}
+\end{center}
+
+This is $33 + 2 * 26 = 85$ positions ``required'', which leaves 171
+positions free.
+
+If there are free slots available then adding all or some of the
+diacritics would be the best way to fill them.
+
+If there are insufficient slots for the characters needed, a possible
+technique is to create a subsidiary encoding, and to move non-letter
+characters to it. Since only ``letters'' take part in the hyphenation
+algorithm, this technique doesn't affect the appearance of the typeset
+result.
+
+\subsection{The constraints on upper/lower case tables}
+
+Due to some technical restrictions of \TeX{} related to hyphenation it
+is not possible in \LaTeX{} to use more than one \verb=\lccode= or
+\verb=\uccode= table. Therefore all encodings need to share these two
+tables which are defined to be those of the \Enc{T1} encoding.
+
+The \Enc{T1} encoding has some nasty peculiarities which make certain slot
+positions more or less unusable for other encodings if this
+restriction is to be obeyed. This is unfortunate but since \Enc{T1} is well
+established and the basis for a large number of languages it seemed
+better to live with this situation instead of trying to replace \Enc{T1} with a
+slightly better standard (with the result that for a long time
+different \LaTeX{} installations would not be able to communicate with
+each other because of incompatible font sets).
+
+The positions that are problematic are as follows.
+\begin{center}
+\begin{tabular}{lp{.8\linewidth}}
+25 (\char 25) & uppercase maps strangely (same as for 105, \char 105)\\
+26 (\char 26) & uppercase maps strangely (same as for 106, \char 106)\\
+27 (\char 27) & lowercase maps to itself which makes this slot subject
+ to hyphenation (used to support \Enc{OT1} encoding) \\
+157 (\char 157) & lowercase maps strangely (same as for 73, \char 73) \\
+158 (\char 158) & uppercase maps strangely (same as for 240, \char 240) \\
+\end{tabular}
+\end{center}
+One way to use such slots is to fill them with ligature glyphs as
+\TeX{} will not consult these tables for glyphs constructed through
+ligatures programs but instead uses the entries for the individual
+glyphs used to produce the ligature.
+
+A complete listing of the uppercase/lowercase mapping tables is to be
+found in section~\ref{sec:uclc-tab} (page \pageref{sec:uclc-tab}).
+
+\newcount\temp \newcount\tempL \newcount\tempU
+
+\def\nextstep{\global\tempL=\lccode\temp
+ \global\tempU=\uccode\temp
+ \lctablenumbersize\the\temp &
+ \the\tempL&
+ \the\tempU&\printlowerupper{\the\temp}{\the\tempL}{\the\tempU}\\
+ \global\advance\temp by 1
+ \stepprint}
+
+\def\printlowerupper#1#2#3{\char#1\relax
+ (\ifnum#2=0\relax--\else\char#2\fi
+ /\ifnum#3=0\relax--\else\char#3\fi)}
+
+\def\stepprint{\relax\ifnum\temp<\endval
+ \let\next=\nextstep
+ \else
+ \let\next=\relax
+ \fi
+ \next}
+
+\def\dolctable#1#2{{\temp=#1\relax
+\def\endval{#2}%
+\setlength\tabcolsep{1.5pt}%
+\begin{tabular}[t]{@{}cccc@{}}
+pos&lc&uc&glyphs\\\hline
+\stepprint
+\end{tabular}}}
+
+\iffalse
+\begin{center}
+\tiny\let\lctablenumbersize\tiny
+\mbox{\dolctable{0}{52}\vrule
+\dolctable{52}{104}\vrule
+\dolctable{104}{156}\vrule
+\dolctable{156}{208}\vrule
+\dolctable{208}{256}}
+\end{center}
+\fi
+
+\iffalse
+\begin{center}\tiny
+\mbox{\dolctable{0}{65}\vrule
+\dolctable{65}{128}\vrule
+\dolctable{128}{193}\vrule
+\dolctable{193}{256}}
+\end{center}
+\fi
+
+
+
+\section{Encoding specific commands}
+
+An encoding specific command is one that generates a glyph (or
+glyphs), to produce a graphic effect that may be implemented
+differently in different encodings. The encoding specific command
+automatically changes its implementation when the encoding changes in
+the course of the document. Encoding specific commands figure in
+\LaTeX's internal character representation (\textsc{licr}) and are also
+discussed in \cite[sec.~7.11.2, p.~442]{A-W:MG2004}.
+
+The following table only covers the encoding specific commands from
+the \Enc{OT1} and \Enc{T1} encodings. Other encodings may specify
+additional encoding specific commands. In the table, the first 15
+commands are `accent-like' and need as an argument the character to be
+accented. For example, |\v{c}| is the \textsc{licr} for `\v{c}'.
+
+\begin{tabbing}
+\ttverb\textvisiblespace\quad\=bbbbbbbbbbbbbb\=b'b'\=ccccccccccc\kill
+\ttverb\`{} \>OT1,T1\> \a`{}\> (grave) \\
+\ttverb\'{} \>OT1,T1\> \a'{}\> (acute) \\
+\ttverb\^{} \>OT1,T1\> \^{}\> (circumflex) \\
+\ttverb\~{} \>OT1,T1\> \~{}\> (tilde) \\
+\ttverb\"{} \>OT1,T1\> \"{}\> (umlaut) \\
+\ttverb\H{} \>OT1,T1\> \H{}\> (Hungarian umlaut) \\
+\ttverb\r{} \>OT1,T1\> \r{}\> (ring) \\
+\ttverb\v{} \>OT1,T1\> \v{}\> (ha\v{c}ek) \\
+\ttverb\u{} \>OT1,T1\> \u{}\> (breve) \\
+\ttverb\t{} \>OT1,T1\> \t{}\> (tie) \\
+\ttverb\={} \>OT1,T1\> \a={}\> (macron) \\
+\ttverb\.{} \>OT1,T1\> \.{}\> (dot) \\
+\ttverb\b{} \>OT1,T1\> \b{}\> (underbar) \\
+\ttverb\c{} \>OT1,T1\> \c{}\> (cedilla) \\
+\ttverb\d{} \>OT1,T1\> \d{}\> (dot under) \\
+\ttverb\k{} \>T1 \> \k{}\> (ogonek) \\
+% \ttverb\AA \>OT1,T1\> \AA \> \\ % no longer
+\ttverb\AE \>OT1,T1\> \AE \> \\
+\ttverb\DH \>T1 \> \DH \> \\
+\ttverb\DJ \>T1 \> \DJ \> \\
+\ttverb\L \>OT1,T1\> \L \> \\
+\ttverb\NG \>T1 \> \NG \> \\
+\ttverb\OE \>OT1,T1\> \OE \> \\
+\ttverb\O \>OT1,T1\> \O \> \\
+\ttverb\SS \>OT1,T1\> \SS \> \\
+\ttverb\TH \>T1 \> \TH \> \\
+% \ttverb\aa \>OT1,T1\> \aa \> \\ no-longer
+\ttverb\ae \>OT1,T1\> \ae \> \\
+\ttverb\dh \>T1 \> \dh \> \\
+\ttverb\dj \>T1 \> \dj \> \\
+\ttverb\guillemotleft \>T1 \> \guillemotleft \> (guillemet) \\
+\ttverb\guillemotright \>T1 \> \guillemotright \> (guillemet) \\
+\ttverb\guilsinglleft \>T1 \> \guilsinglleft \> (guillemet) \\
+\ttverb\guilsinglright \>T1 \> \guilsinglright \> (guillemet) \\
+\ttverb\i \>OT1,T1\> \i \> \\
+\ttverb\j \>OT1,T1\> \j \> \\
+\ttverb\l \>OT1,T1\> \l \> \\
+\ttverb\ng \>T1 \> \ng \> \\
+\ttverb\oe \>OT1,T1\> \oe \> \\
+\ttverb\o \>OT1,T1\> \o \> \\
+\ttverb\quotedblbase \>T1 \> \quotedblbase \> \\
+\ttverb\quotesinglbase \>T1 \> \quotesinglbase \> \\
+\ttverb\ss \>OT1,T1\> \ss \> \\
+\ttverb\textasciicircum \>OT1,T1\> \textasciicircum \> \\
+\ttverb\textasciitilde \>OT1,T1\> \textasciitilde \> \\
+\ttverb\textbackslash \>OT1,T1\> \textbackslash \> \\
+\ttverb\textbar \>OT1,T1\> \textbar \> \\
+\ttverb\textbraceleft \>OT1,T1\> \textbraceleft \> \\
+\ttverb\textbraceright \>OT1,T1\> \textbraceright \> \\
+\ttverb\textcompwordmark \>OT1,T1\> \textcompwordmark\> (invisible) \\
+\ttverb\textdollar \>OT1,T1\> \textdollar \> \\
+\ttverb\textemdash \>OT1,T1\> \textemdash \> \\
+\ttverb\textendash \>OT1,T1\> \textendash \> \\
+\ttverb\textexclamdown \>OT1,T1\> \textexclamdown \> \\
+\ttverb\textgreater \>OT1,T1\> \textgreater \> \\
+\ttverb\textless \>OT1,T1\> \textless \> \\
+\ttverb\textquestiondown \>OT1,T1\> \textquestiondown\> \\
+\ttverb\textquotedbl \>T1 \> \textquotedbl \> \\
+\ttverb\textquotedblleft \>OT1,T1\> \textquotedblleft\> \\
+\ttverb\textquotedblright \>OT1,T1\> \textquotedblright\> \\
+\ttverb\textquoteleft \>OT1,T1\> \textquoteleft \> \\
+\ttverb\textquoteright \>OT1,T1\> \textquoteright \> \\
+\ttverb\textregistered \>OT1,T1\> \textregistered \> \\
+\ttverb\textsection \>OT1,T1\> \textsection \> \\
+\ttverb\textsterling \>OT1,T1\> \textsterling \> \\
+\ttverb\texttrademark \>OT1,T1\> \texttrademark \> \\
+\ttverb\textunderscore \>OT1,T1\> \textunderscore \> \\
+\ttverb\textvisiblespace \>OT1,T1\> \textvisiblespace\> \\
+\ttverb\th \>T1 \> \th \>
+\end{tabbing}
+
+\section{Encodings for Unicode based \TeX\ systems}
+\label{sec:unicode}
+
+The preceding text has assumed a classic TeX system that is
+restricted to the use of fonts with at most 256 characters. In order
+to accommodate all the characters needed for different languages and
+mathematics it is necessary to have multiple encodings as described
+above, and \LaTeX\ needs to be aware of the encoding used for each
+font.
+
+Unicode aims to provide a single encoding that removes most of the
+need to switch encodings, apart from very specialist use for non-standard characters. Rather than assign codes in the range 0--256 (hex
+FF) Unicode codes are in the range 0--1,114,111 (hex 10FFFF), although
+not all slots are available for distinct characters for technical
+reasons. Unicode offers the possibility to use a single input encoding
+(usually UTF-8) for all documents and to use essentially the same
+Unicode encoding for all fonts, so removing the need to switch
+encodings in different contexts.
+
+Omega was perhaps the first widely used \TeX\ extension that
+supported Unicode. Currently the two actively supported systems that are
+present in most modern \TeX\ distributions are Xe\TeX\ and Lua\TeX.
+
+When used with these extended \TeX\ engines, \LaTeX's font system can
+refer to Unicode fonts (typically OpenType fonts installed system-wide
+on your operating system rather than fonts specifically encoded/installed for
+\TeX). Currently the usual method of accessing these fonts is through
+the contributed \Pkg{fontspec} package. This uses as encoding \Enc{TU}:
+``\TeX{} Unicode'' (historically two experimental encodings \Enc{EU1}
+and \Enc{EU2}
+were used, depending on the engine, but these are deprecated).
+The exact rules for \LaTeX\ encodings
+for Unicode engines have not yet been finalised in terms of the (usual)
+requirement that each slot should be defined. (This is not realistic for
+a Unicode font, as almost all fonts address subsets of the full range.)
+It is rare to need to specify the \Enc{TU} encoding a document as the
+\Pkg{fontspec} package sets up the correct encoding when loaded.
+
+The restrictions described in section \ref{sec:restrictions} do not
+apply, or need to be modified in a Unicode based engine. Clearly the
+lowercase table (and hyphenation patterns) can not be restricted to
+the values used for \Enc{T1} and do only refer to the first 256
+characters.
+
+When the \LaTeX\ format is made \LaTeX\ sets up the lowercase table
+and classifies characters as letter- or non-letter-based on \Enc{T1} if
+a classic \TeX\ or pdf\TeX\ is being used. If a Unicode based \TeX\ is
+detected, the values are instead based on the classification and
+lower-case mappings provided by the Unicode Character Database
+\cite{ucd}. The \LaTeX{} team have written a generic loader bundle,
+\Pkg{unicode-data}, which provides the mechanism to load this information
+directly from the Unicode Character Database data files and which is read
+when a Unicode-compliant engine is detected during format-building.
+
+Similarly in the default configuration files used by modern \TeX\
+distribution, the hyphenation files for each supported language are
+written in UTF-8 encoding, using Unicode code points for all letters,
+then if a classic \TeX\ system is detected, some additional macros are
+loaded to convert these files to 256-character encodings where
+possible, and assuming the \Enc{T1} lowercase table. For Unicode engines
+no conversion takes place. (The hyphenation patterns for a small number of
+languages require that some punctuation characters have non-zero
+c values. This are set during pattern reading, and may at some
+stage in the future use the e-\TeX{} \verb=\savinghyphcodes= mechanism to
+avoid any need to manipulate \verb=\lccode= in the document.)
+
+
+
+
+\begin{thebibliography}{99}
+\addcontentsline{toc}{section}{\numberline{\relax}\refname}
+
+
+\bibitem{Adobe:PDF-1.6} \emph{\textsc{PDF} reference}:
+ Adobe portable document format version~1.6. Adobe Systems
+ Incorporated, 2005. % why \textsuperscript{3}?
+ \url{http://partners.adobe.com/public/developer/en/pdf/PDFReference16.pdf}.
+
+\bibitem{Beeton:TB6-3-124} Barbara Beeton:
+ \emph{Mathematical symbols and cyrillic fonts ready for
+ distribution}. In: TUGBoat, 6\#3), 1985.
+ \url{http://tug.org/TUGboat/Articles/tb06-3/tb13beetcyr.pdf}.
+
+\bibitem{beeton} Barbara Beeton: \emph{Unicode
+ and math, a combination whose time has come -- Finally!}. In:
+ TUGBoat, 21\#3, 2000.
+ \url{http://www.tug.org/TUGboat/Articles/tb21-3/tb68beet.pdf}.
+
+
+\bibitem{Berdnikov:eurotex-98} A.\@ Berdnikov, O.\@
+ Lapko, M.\@ Kolodin, A.\@ Janishevsky and
+ A.\@ Burykin: \emph{The Encoding Paradigm in
+ \LaTeXe{} and the Projected X2 Encoding for Cyrillic Texts}.
+ Euro\TeX~98.
+ \url{http://www.gutenberg.eu.org/pub/GUTenberg/publicationsPDF/28-29-berdnikova.pdf}.
+
+\bibitem{CJK} \emph{The \Pkg{CJK} package}:
+ \url{http://cjk.ffii.org}.
+
+\bibitem{clasen} Matthias Clasen: \emph{A new
+ implementation of \LaTeX{} math}, 1997-98.
+ \url{http://www.tug.org/twg/mfg/papers/current/newmath.ps.gz}.
+
+\bibitem{clasen-vieth} Matthias Clasen and Ulrik
+ Vieth: \emph{Towards a new Math Font Encoding
+ for (La)\TeX}. March 1998,
+ \url{http://www.tug.org/twg/mfg/papers/current/mfg-euro-all.ps.gz}.
+
+\bibitem{CorkGW:91}
+Dean Guenther and Janene Winter.
+\newblock An international phonetic alphabet.
+\newblock In Guenther \cite{proc:MGu91}, pages 149--156.
+\newblock Published as {TUG}boat 12\#1.
+
+\bibitem{proc:MGu91}
+Mary Guenther, editor.
+\newblock {\em {\TeX} 90 Conference Proceedings}, March 1991.
+\newblock Published as {TUG}boat 12\#1.
+
+\bibitem{tub:MFe90}
+Michael~J. Ferguson.
+\newblock Report on multilingual activities.
+\newblock {\em {TUG}boat}, 11(4):514--516, 1990.
+
+\bibitem{fontinst} \emph{The \Pkg{fontinst} package}:
+ \textlangle CTAN\textrangle\url{/fonts/utilities/fontinst}.
+
+\bibitem{Rei:TB17-2-102} Fukui Rei:
+ \emph{\textsl{TIPA}: A system for processing phonetic
+ symbols in \LaTeX}. In: TUGBoat, 17\#, 1996.
+ \url{http://www.tug.org/TUGboat/Articles/tb17-2/tb51rei.pdf}.
+
+\bibitem{hyperref} \emph{The \Pkg{hyperref} package}:
+ \url{http://www.tug.org/applications/hyperref}.
+
+\bibitem{tub:JKn93}
+J\"org Knappen.
+\newblock Fonts for Africa: The fc Fonts.
+\newblock {\em {TUG}boat}, 14(2):104, 1993.
+
+\bibitem{Knappen:TB17-2-96} J\"org Knappen:
+ \emph{The \Pkg{dc} fonts~1.3: Move towards stability
+ and completeness}. In: TUGBoat 17\#2, 1996.
+ \url{http://www.tug.org/TUGboat/Articles/tb17-2/tb51knap.pdf}.
+
+\bibitem{A-W:DKn86}
+Donald~E. Knuth.
+\newblock {\em The {\TeX}book}.
+\newblock Volume~A of {\em Computers \& {T}ypesetting\/},
+ May 1989.
+\newblock Eight printing.
+
+\bibitem{vnr} \emph{The \Pkg{vnr} font family}, developed by
+ the author of pdf\TeX, {H\`an Th\^e\protect\llap{\raise 0.5ex\hbox{\'{\relax}}} Th\`anh}.
+ \url{http://vntex.org/download/vntex}.
+
+ \bibitem{ipa} Home page of the International Phonetic Association.
+ \url{http://www.arts.gla.ac.uk/IPA/ipa.html}
+
+\bibitem{A-W:LLa94}
+Leslie Lamport.
+\newblock {\em {\LaTeX:} A Document Preparation System}.
+\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
+
+\bibitem{LH-Fonts} \emph{The \Pkg{lh}-Fonts for Cyrillic}:
+ \textlangle CTAN\textrangle\url{/fonts/cyrillic/lh}.
+
+\bibitem{A-W:MG2004}
+Frank Mittelbach and Michel Goossens.
+\newblock {\em The {\LaTeX} Companion second edition}.
+\newblock With Johannes Braams, David Carlisle, and Chris Rowley.
+\newblock Addison-Wesley, Reading, Massachusetts, 2004.
+
+\bibitem{Unicode} \emph{The Unicode Standard}.
+ \url{http://unicode.org}.
+
+\bibitem{ucd} \emph{The Unicode Character Database}.
+ \url{http://unicode.org/ucd}.
+
+\bibitem{ziegler} Justin Ziegler, \emph{Technical
+ Report on Math Font Encodings}, June 1994,
+ \url{http://www.tug.org/twg/mfg/papers/ltx3pub/l3d007.ps.gz}.
+
+\end{thebibliography}
+
+\clearpage\appendix
+\begin{center}
+ \Large\bfseries Appendices
+\end{center}
+
+\section{Example code tables}
+
+This appendix contains a table of each font mentioned as an ``example''
+font above, providing that the font was available when the document
+was processed with \LaTeX{}. (\LaTeX{} generates a warning message
+for each font it fails to find.)
+
+\subsection{Text encodings}
+
+\ftable{cmr10}{OT1}
+
+\ftable{wnr10}{OT2}
+
+\ftable{wsuipa10}{OT3}
+
+\ftable{plr10}{OT4}
+
+%\ftable{artmr10}{OT6}
+
+\ftable{ecrm1000}{T1}
+
+\ftable{larm1000}{T2A}
+
+\ftable{lbrm1000}{T2B}
+
+\ftable{lcrm1000}{T2C}
+
+\ftable{tipa10}{T3}
+
+\ftable{fcr10}{T4}
+
+\ftable{vnr10}{T5}
+
+
+\subsection{Text symbol encodings}
+
+The full table for \Enc{TS1} as provided by European Computer Modern family:
+\ftable{tcrm1000}{TS1}
+
+\pagebreak
+
+In contrast typical PostScript fonts usually have incomplete implementations
+of \Enc{TS1} sometimes missing more than half of the glyphs:
+
+\ftable{ptmr8c}{TS1}
+
+\ftable{tipx10}{TS3}
+
+
+
+\subsection{Extended text encodings}
+
+\ftable{rxrm1000}{X2}
+
+
+\subsection{Mathematical encodings}
+
+\ftable{cmmi10}{OML}
+
+\ftable{cmsy10}{OMS}
+
+\ftable{cmex10}{OMX}
+
+
+\subsection{Other encodings}
+
+\ftable{ptmr8y}{LY1}
+
+%%\ftable{????}{LV1}
+
+\ftable{grmn1000}{LGR}
+
+\ftable{wasy10}{U}
+\ftable{logo10}{U}
+
+\clearpage
+\section{Uppercase and lowercase tables}
+\label{sec:uclc-tab}
+
+The following two sets of tables list the \verb"\uppercase" and
+\verb"\lowercase" values for each position in the \LaTeX{} standard
+256-character tables.
+
+Each row of each table lists:
+\begin{quote}
+ \begin{tabular}{lp{0.7\textwidth}}
+ pos & The position in the table (0-255) \\
+ lc & The value in the \verb"\lowercase" table at the position \\
+ & (note that value 0 here means that \verb"\lowercase" is
+ ineffective for this character, and hyphenation does not apply
+ to it) \\
+ uc & The value in the \verb"\uppercase" table at the position \\
+ & (note that value 0 here means that \verb"\uppercase" is
+ ineffective for this character) \\
+ glyphs & The glyphs specified for the T1 encoding for this
+ position, laid out as \meta{glyph}\textbf{(}\meta{lowercase
+ glyph}\textbf{/}\meta{uppercase glyph}\textbf{)}
+ \end{tabular}
+\end{quote}
+
+\begin{center}
+ \let\lctablenumbersize\footnotesize
+ \makebox[\textwidth]{\hss
+ \dolctable{0}{32}\quad\dolctable{32}{64}\quad
+ \dolctable{64}{96}\quad\dolctable{96}{128}%
+ \hss}
+
+ \makebox[\textwidth]{\hss
+ \dolctable{128}{160}\quad\dolctable{160}{192}\quad
+ \dolctable{192}{224}\quad\dolctable{224}{256}%
+ \hss}
+\end{center}
+\end{document}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex-dev/doc/fntguide.pdf b/macros/latex-dev/doc/fntguide.pdf
new file mode 100644
index 0000000000..99008de40b
--- /dev/null
+++ b/macros/latex-dev/doc/fntguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/fntguide.tex b/macros/latex-dev/doc/fntguide.tex
new file mode 100644
index 0000000000..92dd6d1a84
--- /dev/null
+++ b/macros/latex-dev/doc/fntguide.tex
@@ -0,0 +1,1907 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+%
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: fntguide.tex
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[1995/11/28]
+
+\title{\LaTeXe{} font selection}
+
+\author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
+ All rights reserved.}
+
+\date{July 2019}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+This document describes the new font selection features of the \LaTeX{}
+Document Preparation System. It is intended for package writers who
+want to write font-loading packages similar to |times| or |latexsym|.
+
+This document is only a brief introduction to the new facilities and
+is intended for package writers who are familiar with \TeX{} fonts and
+\LaTeX{} packages. It is \emph{neither} a user-guide \emph{nor} a
+reference manual for fonts in \LaTeXe.
+
+\subsection{\LaTeXe~fonts}
+
+The most important difference between \LaTeX~2.09 and \LaTeXe{} is the
+way that fonts are selected. In \LaTeX~2.09, the Computer Modern fonts
+were built into the \LaTeX~format, and so customizing \LaTeX{} to use
+other fonts was a major effort.
+
+In \LaTeXe, very few fonts are built into the format, and there are
+commands to load new text and math fonts. Packages such as |times| or
+|latexsym| allow authors to access these fonts.
+This document describes how to write similar font-loading packages.
+
+The \LaTeXe{} font selection system was first released as the `New Font
+Selection Scheme' (NFSS) in 1989, and then in release~2 in 1993.
+\LaTeXe{} includes NFSS release~2 as standard.
+
+\subsection{Overview}
+
+This document contains an overview of the new font commands
+of \LaTeX.
+
+\begin{description}
+
+\item[Section~\ref{Sec:text}] describes the commands for selecting fonts
+ in classes and packages. It lists the five \LaTeX{} font
+ attributes, and lists the commands for selecting fonts. It also
+ describes how to customize the author commands such as |\textrm| and
+ |\textit| to suit your document design.
+
+\item[Section~\ref{Sec:math}] explains the commands for controlling
+ \LaTeX{} math fonts. It describes how to specify new math fonts and
+ new math symbols.
+
+\item[Section~\ref{Sec:install}] explains how to install new fonts into
+ \LaTeX. It shows how \LaTeX{} font attributes are turned into \TeX{}
+ font names, and how to specify your own fonts using font definition
+ files.
+
+\item[Section~\ref{Sec:encode}] discusses text font encodings.
+ It describes how to declare a new encoding and how to define
+ commands, such as |\AE| or |\"|, which have different definitions in
+ different encodings, depending on whether ligatures, etc.\ are
+ available in the encoding.
+
+\item[Section~\ref{Sec:misc}] covers font miscellanea. It describes how
+ \LaTeX{} performs font substitution, how to customize fonts that are
+ preloaded in the \LaTeX{} format, and the naming conventions used in
+ \LaTeX{} font selection.
+
+\end{description}
+
+\subsection{Further information}
+
+For a general introduction to \LaTeX, including the new features of
+\LaTeXe, you should read \emph{\LaTeXbook},
+Leslie Lamport, Addison Wesley, 2nd~ed, 1994.
+
+A more detailed description of the \LaTeX{} font selection scheme is to
+be found in \emph{\LaTeXcomp}, 2nd~ed, by Mittelbach and Goossens, Addison
+Wesley, 2004.
+
+The \LaTeX{} font selection scheme is based on \TeX, which is described
+by its developer in \emph{The \TeX book}, Donald E.~Knuth, Addison
+Wesley, 1986, revised in 1991 to include the features of \TeX~3.
+
+Sebastian Rahtz's |psnfss| software contains the software for using a
+large number of Type~1 fonts (including the Adobe Laser Writer 35 and
+the Monotype CD-ROM fonts) in \LaTeX. It should be available from the
+same source as your copy of \LaTeX.
+
+The |psnfss| software uses fonts generated by Alan Jeffrey's
+|fontinst| software. This can convert fonts from Adobe Font Metric
+format into a format readable by \LaTeX, including the generation of
+the font definition files described in Section~\ref{Sec:install}. The
+|fontinst| software should be available from the same source as your
+copy of \LaTeX.
+
+Whenever practical, \LaTeX{} uses the font naming scheme called
+`fontname'; this was described in \emph{Filenames for fonts},%
+\footnote{An up-to-date electronic version
+of this document can be found on any CTAN server, in the directory
+\texttt{info/fontname}.}
+\emph{TUGboat}~11(4),~1990.
+
+The class-writer's guide \emph{\clsguide} describes
+the new \LaTeX{} features for writers of document classes and packages
+and is kept in |clsguide.tex|. Configuring
+\LaTeX{} is covered by the guide \emph{\cfgguide} in
+\texttt{cfgguide.tex} whilst the philosophy behind our policy on
+modifying \LaTeX{} is described in \emph{\modguide} in
+\texttt{modguide.tex}.
+
+The documented source code (from the files used to produce
+the kernel format via |latex.ltx|) is now available as
+\emph{The \LaTeXe\ Sources}.
+This very large document also includes an index of \LaTeX{}
+commands. It can be typeset from the \LaTeX{} file |source2e.tex|
+in the |base| directory; this uses the class file |ltxdoc.cls|.
+
+For more information about \TeX{} and \LaTeX{}, please contact your
+local \TeX{} Users Group, or the international \TeX{} Users Group.
+Addresses and other details can be found at:
+\begin{quote}\small\label{addrs}
+ \texttt{http://www.tug.org/lugs.html}
+\end{quote}
+
+
+\section{Text fonts}
+\label{Sec:text}
+
+This section describes the commands available to class and package
+writers for specifying and selecting fonts.
+
+\subsection{Text font attributes}
+
+Every text font in \LaTeX{} has five \emph{attributes}:
+\begin{description}
+
+\item[encoding] This specifies the order that characters appear in the
+ font. The two most common text encodings used in \LaTeX{} are
+ Knuth's `\TeX{} text' encoding, and the `\TeX{} text extended'
+ encoding developed by the \TeX{} Users Group members during a \TeX{}
+ Conference at Cork in~1990 (hence its informal name `Cork encoding').
+
+\item[family] The name for a collection of fonts, usually grouped under
+ a common name by the font foundry. For example, `Adobe Times', `ITC
+ Garamond', and Knuth's `Computer Modern Roman' are all font families.
+
+\item[series] How heavy and/or expanded a font is. For example, `medium
+ weight', `narrow' and `bold extended' are all series.
+
+\item[shape] The form of the letters within a font family. For
+ example, `italic', `oblique' and `upright' (sometimes called
+ `roman') are all font shapes.
+
+\item[size] The design size of the font, for example `10pt'. If no
+ dimension is specified, `pt' is assumed.
+
+\end{description}
+The possible values for these attributes are given short acronyms by
+\LaTeX. The most common values for the font encoding are:
+\begin{center}
+\begin{minipage}{.7\linewidth}
+ \begin{tabular}{rl}
+ |OT1| & \TeX{} text \\
+ |T1| & \TeX{} extended text \\
+ |OML| & \TeX{} math italic \\
+ |OMS| & \TeX{} math symbols \\
+ |OMX| & \TeX{} math large symbols \\
+ |U| & Unknown \\
+ |L<xx>| & A local encoding
+ \end{tabular}
+\end{minipage}
+\end{center}
+The `local' encodings are intended for font encodings which are only
+locally available, for example a font containing an organization's
+logo in various sizes.
+
+There are far too many font families to list them all, but some common
+ones are:
+\begin{center}
+\begin{minipage}{.7\linewidth}
+ \begin{tabular}{rl}
+ |cmr| & Computer Modern Roman \\
+ |cmss| & Computer Modern Sans \\
+ |cmtt| & Computer Modern Typewriter \\
+ |cmm| & Computer Modern Math Italic \\
+ |cmsy| & Computer Modern Math Symbols \\
+ |cmex| & Computer Modern Math Extensions \\
+ |ptm| & Adobe Times \\
+ |phv| & Adobe Helvetica \\
+ |pcr| & Adobe Courier
+ \end{tabular}
+\end{minipage}
+\end{center}
+\NEWdescription{2019/07/10}
+The font series is denoting a combination of the weight (boldness) and
+the width (amount of expansion). The standard supported for weights
+and widths are:
+\begin{center}
+%\begin{minipage}{.7\linewidth}
+ \begin{tabular}{rl}
+ |ul| & Ultra Light \\
+ |el| & Extra Light \\
+ |l| & Light \\
+ |sl| & Semi Light \\
+ |m| & Medium (normal)\\
+ |sb| & Semi Bold \\
+ |b| & Bold \\
+ |eb| & Extra Bold \\
+ |ub| & Ultra Bold \\
+ \end{tabular}
+\qquad
+ \begin{tabular}{rlr}
+ |uc| & Ultra Condensed & 50\% \\
+ |ec| & Extra Condensed & 62.5\% \\
+ |c| & Condensed & 75\% \\
+ |sc| & Semi Condensed & 87.5\% \\
+ |m| & Medium & 100\% \\
+ |sx| & Semi Expanded & 112.5\% \\
+ |x| & Expanded & 125\% \\
+ |ex| & Extra Expanded & 150\% \\
+ |ux| & Ultra Expanded & 200\% \\
+ \end{tabular}
+\end{center}
+These are concatenated to a single series value except that |m| is
+dropped unless both weight and width are medium in which case a single
+|m| is used.
+
+\newpage
+
+Examples for series values are then:
+\begin{center}
+\begin{minipage}{.7\linewidth}
+ \begin{tabular}{rl}
+ |m| & Medium weight and width \\
+ |b| & Bold weight, medium width \\
+ |bx| & Bold extended \\
+ |sb| & Semi-bold, medium width\\
+ |sbx| & Semi-bold extended\\
+ |c| & Medium weight, condensed width
+ \end{tabular}
+\end{minipage}
+\end{center}
+\NEWdescription{2019/07/10}
+Note, that there are a large variety of names floating around like
+``regular'', ``black'', ``demi-bold'', ``thin'', ``heavy'' and many
+more. If at all possible they should be matched into the standard
+naming scheme to allow for sensible default substitutions if
+necessary, e.g., ``demi-bold'' is normally just another name for
+``semi-bold'', so should get |sb| assigned, etc.
+
+The most common values for the font shape are:
+\begin{center}
+\begin{minipage}{.7\linewidth}
+ \begin{tabular}{rl}
+ |n| & Normal (that is `upright' or `roman') \\
+ |it| & Italic \\
+ |sl| & Slanted (or `oblique') \\
+ |sc| & Caps and small caps
+ \end{tabular}
+\end{minipage}
+\end{center}
+The font size is specified as a dimension, for example |10pt| or
+|1.5in| or |3mm|; if no unit is specified, |pt| is assumed. These five
+parameters specify every \LaTeX{} font, for example:
+\begin{center}
+ \begin{tabular}{@{}r@{\,}l@{\,}c@{\,}c@{\,}cc@{}r@{}}
+ \multicolumn{5}{@{}c}{\emph{\LaTeX{} specification}} &
+ \emph{Font} &
+ \emph{\TeX{} font name} \\
+ |OT1| & |cmr| & |m| & |n| & |10| &
+ Computer Modern Roman 10 point &
+ |cmr10| \\
+ |OT1| & |cmss| & |m| & |sl| & |1pc| &
+ Computer Modern Sans Oblique 1 pica &
+ |cmssi12| \\
+ |OML| & |cmm| & |m| & |it| & |10pt| &
+ Computer Modern Math Italic 10 point &
+ |cmmi10| \\
+ |T1| & |ptm| & |b| & |it| & |1in| &
+ Adobe Times Bold Italic 1 inch &
+ |ptmb8t at 1in|
+ \end{tabular}
+\end{center}
+These five parameters are displayed whenever \LaTeX{} gives an overfull
+box warning, for example:
+\begin{verbatim}
+ Overfull \hbox (3.80855pt too wide) in paragraph at lines 314--318
+ []\OT1/cmr/m/n/10 Normally [] and [] will be iden-ti-cal,
+\end{verbatim}
+The author commands for fonts set the five attributes:
+\begin{center}
+ \begin{tabular}{rcl}
+ \emph{Author command} &
+ \emph{Attribute} &
+ \emph{Value in} |article| \emph{class} \\
+ |\textnormal{..}| or |\normalfont| & family & |cmr| \\
+ |\textrm{..}| or |\rmfamily| & family & |cmr| \\
+ |\textsf{..}| or |\sffamily| & family & |cmss| \\
+ |\texttt{..}| or |\ttfamily| & family & |cmtt| \\
+ |\textmd{..}| or |\mdseries| & series & |m| \\
+ |\textbf{..}| or |\bfseries| & series & |bx| \\
+ |\textup{..}| or |\upshape| & shape & |n| \\
+ |\textit{..}| or |\itshape| & shape & |it| \\
+ |\textsl{..}| or |\slshape| & shape & |sl| \\
+ |\textsc{..}| or |\scshape| & shape & |sc| \\
+ |\tiny| & size & |5pt| \\
+ |\scriptsize| & size & |7pt| \\
+ |\footnotesize| & size & |8pt| \\
+ |\small| & size & |9pt| \\
+ |\normalsize| & size & |10pt| \\
+ |\large| & size & |12pt| \\
+ |\Large| & size & |14.4pt| \\
+ |\LARGE| & size & |17.28pt| \\
+ |\huge| & size & |20.74pt| \\
+ |\Huge| & size & |24.88pt|
+ \end{tabular}
+\end{center}
+The values used by these commands are determined by the document class,
+using the parameters defined in Section~\ref{Sec:text.param}.
+
+Note that there are no author commands for selecting new encodings.
+These should be provided by packages, such as the |fontenc| package.
+
+This section does not explain how \LaTeX{} font specifications are
+turned into \TeX{} font names. This is described in
+Section~\ref{Sec:install}.
+
+\subsection{Selection commands}
+
+The low-level commands used to select a text font are as follows.
+
+\begin{decl}
+|\fontencoding| \arg{encoding} \\
+|\fontfamily| \arg{family}\\
+|\fontseries| \arg{series}\\
+|\fontshape| \arg{shape}\\
+|\fontsize| \arg{size} \arg{baselineskip}\\
+|\linespread| \arg{factor}
+\end{decl}
+
+\NEWdescription{1998/12/01}
+Each of the commands starting with |\font...| sets one of the font
+attributes; |\fontsize| also sets |\baselineskip|. The |\linespread|
+command prepares to multiply the current (or newly defined)
+|\baselineskip| with \m{factor} (e.g., spreads the lines apart for
+values greater one).
+
+The actual font in use is not altered by these commands, but the
+current attributes are used to determine which font and baseline skip
+to use after the next |\selectfont| command.
+
+
+\begin{decl}
+|\selectfont|
+\end{decl}
+Selects a text font, based on the current values of the font attributes.
+
+\emph{Warning}: There \emph{must} be a |\selectfont| command
+immediately after any settings of the font parameters by (some of)
+the six commands above, before any following text.
+For example, it is legal to say:
+\begin{verbatim}
+ \fontfamily{ptm}\fontseries{b}\selectfont Some text.
+\end{verbatim}
+but it is \emph{not} legal to say:
+\begin{verbatim}
+ \fontfamily{ptm} Some \fontseries{b}\selectfont text.
+\end{verbatim}
+You may get unexpected results if you put text between a
+|\font<parameter>| command (or |\linespread|) and a |\selectfont|.
+
+\begin{decl}
+|\usefont| \arg{encoding} \arg{family} \arg{series} \arg{shape}
+\end{decl}
+A short hand for the equivalent |\font...| commands followed by a
+call to |\selectfont|.
+
+
+\subsection{Internals}
+
+The current values of the font attributes are held in internal macros.
+
+\begin{decl}
+ |\f@encoding| \\
+ |\f@family| \\
+ |\f@series| \\
+ |\f@shape| \\
+ |\f@size| \\
+ |\f@baselineskip| \\
+ |\tf@size| \\
+ |\sf@size| \\
+ |\ssf@size|
+\end{decl}
+
+These hold the current values of the encoding, the family, the series,
+the shape, the size, the baseline skip, the main math size, the
+`script' math size and the `scriptscript' math size. The last three
+are accessible only within a formula; outside of math they may contain
+arbitrary values.
+
+For example, to set the size to 12 without
+changing the baseline skip:
+\begin{verbatim}
+ \fontsize{12}{\f@baselineskip}
+\end{verbatim}
+However, you should \emph{never} alter the values of the internal
+commands directly; they must only be modified using the low-level
+commands like |\fontfamily|, |\fontseries|, etc. If you disobey this
+warning you might produce code that loops.
+
+\subsection{Parameters for author commands}
+\label{Sec:text.param}
+
+The parameter values set by author commands such as |\textrm| and
+|\rmfamily|, etc.\ are not hard-wired into \LaTeX; instead these
+commands use the values of a number of parameters set by the document
+class and packages. For example, |\rmdefault| is the name of the
+default family selected by |\textrm| and |\rmfamily|. Thus to set a
+document in Adobe Times, Helvetica and Courier, the document designer
+specifies:
+\begin{verbatim}
+ \renewcommand{\rmdefault}{ptm}
+ \renewcommand{\sfdefault}{phv}
+ \renewcommand{\ttdefault}{pcr}
+\end{verbatim}
+
+\begin{decl}
+ |\encodingdefault| \\
+ |\familydefault| \\
+ |\seriesdefault| \\
+ |\shapedefault|
+\end{decl}
+The encoding, family, series and shape of the main body font. By
+default these are |OT1|, |\rmdefault|, |m| and |n|. Note that since
+the default family is |\rmdefault|, this means that changing
+|\rmdefault| will change the main body font of the document.
+
+\begin{decl}
+ |\rmdefault| \\
+ |\sfdefault| \\
+ |\ttdefault|
+\end{decl}
+The families selected by |\textrm|, |\rmfamily|, |\textsf|,
+|\sffamily|, |\texttt| and |\ttfamily|. By default these are |cmr|,
+|cmss| and |cmtt|.
+
+\begin{decl}
+ |\bfdefault| \\
+ |\mddefault|
+\end{decl}
+The series selected by |\textbf|, |\bfseries|, |\textmd| and
+|\mdseries|. By default these are |bx| and |m|.
+These values are suitable for the default families used. If other
+fonts are used as standard document fonts (for example, certain
+PostScript fonts) it might be necessary to adjust the value of
+|\bfdefault| to |b| since only a few such families have a `bold
+extended' series. An alternative (taken for the fonts provided by
+|psnfss|) is to define silent substitutions from |bx| series to |b|
+series with special |\DeclareFontShape| declarations and the |ssub|
+size function, see Section~\ref{sec:sizefunct}.
+
+
+\begin{decl}
+ |\itdefault| \\
+ |\sldefault| \\
+ |\scdefault| \\
+ |\updefault|
+\end{decl}
+The shapes selected by |\textit|, |\itshape|, |\textsl|, |\slshape|,
+|\textsc|, |\scshape|, |\textup| and |\upshape|. By default these are
+|it|, |sl|, |sc| and |n|.
+
+Note that there are no parameters for the size commands. These should
+be defined directly in class files, for example:
+\begin{verbatim}
+ \renewcommand{\normalsize}{\fontsize{10}{12}\selectfont}
+\end{verbatim}
+More elaborate examples (setting additional parameters when the text
+size is changed) can be found in |classes.dtx| the source
+documentation for the classes |article|, |report|, and |book|.
+
+
+\subsection{Special font declaration commands}
+
+\begin{decl}
+|\DeclareFixedFont| \arg{cmd} \arg{encoding} \arg{family} \arg{series}
+ \arg{shape} \arg{size}
+\end{decl}
+
+Declares command \m{cmd} to be a font switch which selects the font
+that is specified by the attributes \m{encoding}, \m{family},
+\m{series}, \m{shape}, and \m{size}.
+
+The font is selected without any adjustments to baselineskip and other
+surrounding conditions.
+
+This example makes |{\picturechar .}| select a small dot very quickly:
+\begin{verbatim}
+ \DeclareFixedFont{\picturechar}{OT1}{cmr}{m}{n}{5}
+\end{verbatim}
+
+
+\begin{decl}
+|\DeclareTextFontCommand| \arg{cmd} \arg{font-switches}
+\end{decl}
+
+Declares command \m{cmd} to be a font command with one argument.
+The current font attributes are locally modified by \m{font-switches}
+and then the argument of \m{cmd} is typeset in the resulting new font.
+
+Commands defined by |\DeclareTextFontCommand| automatically take care
+of any necessary italic correction (on either side).
+
+The following example shows how |\textrm| is defined by the kernel.
+\begin{verbatim}
+ \DeclareTextFontCommand{\textrm}{\rmfamily}
+\end{verbatim}
+
+To define a command that always typeset its argument in the italic
+shape of the main document font you could declare:
+\begin{verbatim}
+ \DeclareTextFontCommand{\normalit}{\normalfont\itshape}
+\end{verbatim}
+
+This declaration can be used to change the meaning of a command; if
+\m{cmd} is already defined, a log that it has been redefined
+is put in the transcript file.
+
+\begin{decl}
+|\DeclareOldFontCommand| \arg{cmd} \arg{text-switch}
+ \arg{math-switch}
+\end{decl}
+
+Declares command \m{cmd} to be a font switch (i.e.~used with the
+syntax |{<cmd>...}|) having the definition \m{text-switch}
+when used in text and the definition \m{math-switch} when used in a
+formula.
+Math alphabet commands, like |\mathit|, when used within \m{math-switch}
+should not have an argument. Their use in this argument causes their
+semantics to change so that they here act as a font switch, as
+required by the usage of the \m{cmd}.
+
+This declaration is useful for setting up commands like |\rm| to behave
+as they did in \LaTeX~2.09. We strongly urge you \emph{not} to misuse
+this declaration to invent new font commands.
+
+The following example defines |\it| to produce the italic shape of the
+main document font if used in text and to switch to the font that would
+normally be produced by the math alphabet |\mathit| if used in a
+formula.
+\begin{verbatim}
+ \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\end{verbatim}
+
+This declaration can be used to change the meaning of a command; if
+\m{cmd} is already defined, a log that it has been redefined
+is put in the transcript file.
+
+
+\section{Math fonts}
+\label{Sec:math}
+
+This section describes the commands available to class and package
+writers for specifying math fonts and math commands.
+
+\subsection{Math font attributes}
+
+The selection of fonts within math mode is quite different to that of
+text fonts.
+
+Some math fonts are selected explicitly by one-argument commands such
+as |\mathsf{max}| or |\mathbf{vec}|; such fonts are called \emph{math
+alphabets}. These math alphabet commands affect only the font used
+for letters and symbols of type |\mathalpha| (see
+Section~\ref{Sec:math.commands}); other symbols within the argument
+will be left unchanged. The predefined math alphabets are:
+\begin{center}
+ \begin{tabular}{ccc}
+ \emph{Alphabet} & \emph{Description} & \emph{Example} \\
+ |\mathnormal| & default & $abcXYZ$ \\
+ |\mathrm| & roman & $\mathrm{abcXYZ}$ \\
+ |\mathbf| & bold roman & $\mathbf{abcXYZ}$ \\
+ |\mathsf| & sans serif & $\mathsf{abcXYZ}$ \\
+ |\mathit| & text italic & $\mathit{abcXYZ}$ \\
+ |\mathtt| & typewriter & $\mathtt{abcXYZ}$ \\
+ |\mathcal| & calligraphic & $\mathcal{XYZ}$
+ \end{tabular}
+\end{center}
+Other math fonts are selected implicitly by \TeX{} for symbols, with
+commands such as |\oplus| (producing $\oplus$) or with straight
+characters like |>>| or |+|. Fonts containing such math symbols are
+called \emph{math symbol fonts}. The predefined math symbol fonts
+are:
+\begin{center}
+ \begin{tabular}{ccc}
+ \emph{Symbol font} & \emph{Description} & \emph{Example} \\
+ |operators| & symbols from |\mathrm| & $[\;+\;]$ \\
+ |letters| & symbols from |\mathnormal| & $<<\star>>$ \\
+ |symbols| & most \LaTeX{} symbols & $\leq*\geq$ \\
+ |largesymbols| & large symbols & $\sum\prod\int$
+ \end{tabular}
+\end{center}
+Some math fonts are both \emph{math alphabets} and \emph{math symbol
+fonts}, for example |\mathrm| and |operators| are the same font, and
+|\mathnormal| and |letters| are the same font.
+
+Math fonts in \LaTeX{} have the same five attributes as text fonts:
+encoding, family, series, shape and size. However, there are no
+commands that allow the attributes to be individually changed.
+Instead, the conversion from math fonts to these five attributes is
+controlled by the \emph{math version}. For example, the |normal| math
+version maps:
+\begin{center}
+ \begin{tabular}{rlc@{ }c@{ }c@{ }c}
+ \multicolumn{2}{c}{\emph{Math font}} &
+ \multicolumn{4}{c}{\emph{External font}} \\
+ \emph{Alphabets} & \emph{Symbol fonts} &
+ \multicolumn{4}{c}{\emph{Attributes}} \\
+ |\mathnormal| & |letters| & |OML| & |cmm| & |m| & |it| \\
+ |\mathrm| & |operators| & |OT1| & |cmr| & |m| & |n| \\
+ |\mathcal| & |symbols| & |OMS| & |cmsy| & |m| & |n| \\
+ & |largesymbols| & |OMX| & |cmex| & |m| & |n| \\
+ |\mathbf| & & |OT1| & |cmr| & |bx| & |n| \\
+ |\mathsf| & & |OT1| & |cmss| & |m| & |n| \\
+ |\mathit| & & |OT1| & |cmr| & |m| & |it| \\
+ |\mathtt| & & |OT1| & |cmtt| & |m| & |n|
+ \end{tabular}
+\end{center}
+The |bold| math version is similar except that it contains bold fonts.
+The command |\boldmath| selects the |bold| math version.
+
+Math versions can only be changed outside of math mode.
+
+The two predefined math versions are:
+\begin{center}
+ \begin{tabular}{rl}
+ |normal| & the default math version \\
+ |bold| & the bold math version
+ \end{tabular}
+\end{center}
+Packages may define new math alphabets, math symbol fonts, and math
+versions. This section describes the commands for writing such
+packages.
+
+\subsection{Selection commands}
+
+There are no commands for selecting symbol fonts. Instead, these are
+selected indirectly through symbol commands like |\oplus|.
+Section~\ref{Sec:math.commands} explains how to define symbol commands.
+
+\begin{decl}
+ |\mathnormal{<math>}|\\
+ |\mathcal{<math>}|\\
+ |\mathrm{<math>}|\\
+ |\mathbf{<math>}|\\
+ |\mathsf{<math>}|\\
+ |\mathit{<math>}|\\
+ |\mathtt{<math>}|
+\end{decl}
+Each math alphabet is a command which can only be used inside math
+mode. For example, |$x + \mathsf{y} + \mathcal{Z}$| produces $x +
+\mathsf{y} + \mathcal{Z}$.
+
+\begin{decl}
+|\mathversion{<version>}|
+\end{decl}
+This command selects a math version; it can only be used outside math
+mode. For example, |\boldmath| is defined to be |\mathversion{bold}|.
+
+\subsection{Declaring math versions}
+
+\begin{decl}
+|\DeclareMathVersion| \arg{version}
+\end{decl}
+
+Defines \m{version} to be a math version.
+
+The newly declared version is initialized with the defaults for all
+symbol fonts and math alphabets declared so far (see the commands
+|\DeclareSymbolFont| and |\DeclareMathAlphabet|).
+
+If used on an already existing version, an information message is
+written to the transcript file and all previous |\SetSymbolFont| or
+|\SetMathAlphabet| declarations for this version are overwritten by
+the math alphabet and symbol font defaults, i.e.~one ends up with a
+virgin math version.
+
+Example:
+\begin{verbatim}
+ \DeclareMathVersion{normal}
+\end{verbatim}
+
+
+\subsection{Declaring math alphabets}
+
+\begin{decl}
+|\DeclareMathAlphabet| \arg{math-alph} \arg{encoding} \arg{family}
+ \arg{series} \arg{shape}
+\end{decl}
+
+\NEWdescription{1997/12/01}
+If this is the first declaration for \m{math-alph} then a new math
+alphabet with this as its command name is created.
+
+The arguments \m{encoding} \m{family} \m{series} \m{shape} are used to
+set, or reset, the default values for this math alphabet in all math
+versions; if required, these must be further reset later for a
+particular math version by a |\SetMathAlphabet| command.
+
+If \m{shape} is empty then this \m{math-alph} is declared to be invalid
+in all versions, unless it is set by a later |\SetMathAlphabet|
+command for a particular math version.
+
+Checks that the command \m{math-alph} is either already a math
+alphabet command or is undefined; and that \m{encoding} is a known
+encoding scheme, i.e., has been previously declared.
+
+
+In these examples, |\foo| is defined for all math versions but |\baz|,
+by default, is defined nowhere.
+\begin{verbatim}
+ \DeclareMathAlphabet{\foo}{OT1}{cmtt}{m}{n}
+ \DeclareMathAlphabet{\baz}{OT1}{}{}{}
+\end{verbatim}
+
+
+\begin{decl}
+|\SetMathAlphabet| \arg{math-alph} \arg{version}\\
+ \null\hfill\arg{encoding} \arg{family} \arg{series} \arg{shape}
+\end{decl}
+
+Changes, or sets, the font for the math alphabet \m{math-alph} in math
+version \m{version} to \m{encoding}\m{family}\m{series}\m{shape}.
+
+Checks that \m{math-alph} has been declared as a math alphabet,
+\m{version} is a known math version and \m{encoding} is a known
+encoding scheme.
+
+
+This example defines |\baz| for the `normal' math version only:
+\begin{verbatim}
+ \SetMathAlphabet{\baz}{normal}{OT1}{cmss}{m}{n}
+\end{verbatim}
+
+Note that this declaration is not used for all math alphabets:
+Section~\ref{sec:symalph} describes |\DeclareSymbolFontAlphabet|,
+which is used to set up math alphabets contained in fonts which have
+been declared as symbol fonts.
+
+
+\subsection{Declaring symbol fonts}
+\label{sec:symalph}
+
+\begin{decl}
+|\DeclareSymbolFont| \arg{sym-font} \arg{encoding} \arg{family}
+ \arg{series} \arg{shape}
+\end{decl}
+
+\NEWdescription{1997/12/01}
+If this is the first declaration for \m{sym-font} then a new
+symbol font with this name is created (i.e.~this identifier is assigned
+to a new \TeX{} math group).
+
+The arguments \m{encoding} \m{family} \m{series} \m{shape} are used to
+set, or reset. the default values for this symbol font in \emph{all}
+math versions; if required, these must be further reset later for
+a particular math version by a |\SetSymbolFont| command.
+
+Checks that \m{encoding} is a declared encoding scheme.
+
+
+For example, the following sets up the first four standard math symbol
+fonts:
+\begin{verbatim}
+ \DeclareSymbolFont{operators}{OT1}{cmr}{m}{n}
+ \DeclareSymbolFont{letters}{OML}{cmm}{m}{it}
+ \DeclareSymbolFont{symbols}{OMS}{cmsy}{m}{n}
+ \DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
+\end{verbatim}
+
+
+\begin{decl}
+|\SetSymbolFont| \arg{sym-font} \arg{version}\\
+ \null\hfill \arg{encoding} \arg{family} \arg{series} \arg{shape}
+\end{decl}
+
+Changes the symbol font \m{sym-font} for math version \m{version}
+to \m{encoding} \m{family} \m{series} \m{shape}.
+
+Checks that \m{sym-font} has been declared as a symbol font,
+\m{version} is a known math version and \m{encoding} is a
+declared encoding scheme.
+
+
+For example, the following come from the set up of the `bold'
+math version:
+\begin{verbatim}
+ \SetSymbolFont{operators}{bold}{OT1}{cmr}{bx}{n}
+ \SetSymbolFont{letters}{bold}{OML}{cmm}{b}{it}
+\end{verbatim}
+
+
+\begin{decl}
+|\DeclareSymbolFontAlphabet| \arg{math-alph} \arg{sym-font}
+\end{decl}
+
+\NEWdescription{1997/12/01}
+Allows the previously declared symbol font \m{sym-font} to be the
+math alphabet with command \m{math-alph} in \emph{all} math versions.
+
+Checks that the command \m{math-alph} is either already a math alphabet
+command or is undefined; and that \m{sym-font} is a symbol font.
+
+
+Example:
+\begin{verbatim}
+ \DeclareSymbolFontAlphabet{\mathrm}{operators}
+ \DeclareSymbolFontAlphabet{\mathcal}{symbols}
+\end{verbatim}
+
+This declaration should be used in preference to
+|\DeclareMathAlphabet| and |\SetMathAlphabet| when a math alphabet is
+the same as a symbol font; this is because it makes better use of the
+limited number (only 16) of \TeX's math groups.
+
+\NEWdescription{1997/12/01}
+Note that, whereas a \TeX{} math group is allocated to each symbol font
+when it is first declared, a math alphabet uses a \TeX{} math group
+only when its command is used within a math formula.
+
+
+\subsection{Declaring math symbols}
+\label{Sec:math.commands}
+
+\begin{decl}
+|\DeclareMathSymbol| \arg{symbol} \arg{type} \arg{sym-font}
+ \arg{slot}
+\end{decl}
+
+The \m{symbol} can be either a single character such as `|>>|', or a
+macro name, such as |\sum|.
+
+Defines the \m{symbol} to be a math symbol of type
+\m{type} in slot \m{slot} of symbol font \m{sym-font}. The
+\m{type} can be given as a number or as a command:
+\begin{center}
+ \begin{tabular}{ccc}
+ \emph{Type} & \emph{Meaning} & \emph{Example} \\
+ |0| or |\mathord | & Ordinary & $\alpha$ \\
+ |1| or |\mathop | & Large operator & $\sum$ \\
+ |2| or |\mathbin | & Binary operation & $\times$ \\
+ |3| or |\mathrel | & Relation & $\leq$ \\
+ |4| or |\mathopen | & Opening & $\langle$ \\
+ |5| or |\mathclose| & Closing & $\rangle$ \\
+ |6| or |\mathpunct| & Punctuation & $;$ \\
+ |7| or |\mathalpha| & Alphabet character & $A$
+ \end{tabular}
+\end{center}
+Only symbols of type |\mathalpha| will be affected by math alphabet
+commands: within the argument of a math alphabet command they will
+produce the character in slot \m{slot} of that math alphabet's font.
+Symbols of other types will always produce the same symbol
+(within one math version).
+
+|\DeclareMathSymbol| allows a macro \m{symbol} to be redefined only if
+it was previously defined to be a math symbol. It also checks that
+the \m{sym-font} is a declared symbol font.
+
+Example:
+\begin{verbatim}
+ \DeclareMathSymbol{\alpha}{0}{letters}{"0B}
+ \DeclareMathSymbol{\lessdot}{\mathbin}{AMSb}{"0C}
+ \DeclareMathSymbol{\alphld}{\mathalpha}{AMSb}{"0C}
+\end{verbatim}
+
+\begin{decl}
+ |\DeclareMathDelimiter| \arg{cmd} \arg{type}
+ \arg{sym-font-1} \arg{slot-1}\\
+ \null\hfill \arg{sym-font-2} \arg{slot-2}
+\end{decl}
+Defines \m{cmd} to be a math delimiter where the small variant is in
+slot \m{slot-1} of symbol font \m{sym-font-1} and the large
+variant is in slot \m{slot-2} of symbol font \m{sym-font-2}.
+Both symbol fonts must have been declared previously.
+
+Checks that \m{sym-font-i} are both declared symbol fonts.
+
+If \TeX{} is not looking for a delimiter, \m{cmd} is treated just as
+if it had been defined with |\DeclareMathSymbol| using
+\m{type}, \m{sym-font-1} and \m{slot-1}. In other words, if a
+command is defined as a delimiter then this automatically defines it
+as a math symbol.
+
+\NEWdescription{1998/06/01}
+In case \m{cmd} is a single character such as `|[|', the same syntax is
+used. Previously the \arg{type} argument was not present (and thus the
+corresponding math symbol declaration had to be provided separately).
+
+Example:
+\begin{verbatim}
+ \DeclareMathDelimiter{\langle}{\mathopen}{symbols}{"68}
+ {largesymbols}{"0A}
+ \DeclareMathDelimiter{(} {\mathopen}{operators}{"28}
+ {largesymbols}{"00}
+\end{verbatim}
+
+
+\begin{decl}
+|\DeclareMathAccent| \arg{cmd} \arg{type} \arg{sym-font} \arg{slot}
+\end{decl}
+
+Defines \m{cmd} to act as a math accent.
+
+The accent character comes from slot \m{slot} in
+\m{sym-font}. The \m{type} can be either
+|\mathord| or |\mathalpha|; in the latter case the accent character
+changes font when used in a math alphabet.
+
+Example:
+\begin{verbatim}
+ \DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
+ \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
+\end{verbatim}
+
+
+\begin{decl}
+|\DeclareMathRadical| \arg{cmd}
+ \arg{sym-font-1} \arg{slot-1}\\
+ \null\hfill \arg{sym-font-2} \arg{slot-2}
+\end{decl}
+
+Defines \m{cmd} to be a radical where the small variant is in
+slot \m{slot-1} of symbol font \m{sym-font-1} and the
+large variant is in slot \m{slot-2} of symbol font
+\m{sym-font-2}. Both symbol fonts must have been declared
+previously.
+
+Example (probably the only use for it!):
+\begin{verbatim}
+ \DeclareMathRadical{\sqrt}{symbols}{"70}{largesymbols}{"70}
+\end{verbatim}
+
+\subsection{Declaring math sizes}
+
+\begin{decl}
+|\DeclareMathSizes| \arg{t-size} \arg{mt-size} \arg{s-size}
+ \arg{ss-size}
+\end{decl}
+
+Declares that \m{mt-size} is the (main) math text size, \m{s-size} is
+the `script' size and \m{ss-size} the `scriptscript' size to be used
+in math, when \m{t-size} is the current text size. For text sizes for
+which no such declaration is given the `script' and `scriptscript'
+size will be calculated and then fonts are loaded for the calculated
+sizes or the best approximation (this may result in a warning
+message).
+
+Normally, \m{t-size} and \m{mt-size} will be identical; however, if,
+for example, PostScript text fonts are mixed with bit-map math fonts
+then you may not have available a \m{mt-size} for every \m{t-size}.
+
+Example:
+\begin{verbatim}
+ \DeclareMathSizes{13.82}{14.4}{10}{7}
+\end{verbatim}
+
+\section{Font installation}
+\label{Sec:install}
+
+This section explains how \LaTeX's font attributes are turned into
+\TeX{} font specifications.
+
+\subsection{Font definition files}
+
+\NEWdescription{1997/12/01}
+The description of how \LaTeX{} font attributes are turned into \TeX{}
+fonts is usually kept in a \emph{font definition file} (|.fd|). The
+file for family \m{family} in encoding \m{ENC} must be
+called |<enc><family>.fd|: for example, |ot1cmr.fd| for Computer
+Modern Roman with encoding |OT1| or |t1ptm.fd| for Adobe Times with
+encoding |T1|. Note that encoding names are converted to lowercase
+when used as part of file names.
+
+Whenever \LaTeX{} encounters an encoding/family combination that it
+does not know (e.g.~if the document designer says
+|\fontfamily{ptm}\selectfont|) then \LaTeX{} attempts to load the
+appropriate |.fd| file. ``Not known'' means: there was no
+|\DeclareFontFamily| declaration issued for this encoding/family
+combination. If the |.fd| file could not be found, a warning is
+issued and font substitutions are made.
+
+The declarations in the font definition file are responsible for
+telling \LaTeX{} how to load fonts for that encoding/family
+combination.
+
+\subsection{Font definition file commands}
+
+\emph{Note}: A font definition file should contain only commands
+from this subsection.
+
+Note that these commands can also be used outside a font definition
+file: they can be put in package or class files, or even in the
+preamble of a document.
+
+\begin{decl}
+ |\ProvidesFile{<file-name>}[<release-info>]|
+\end{decl}
+The file should announce itself with a |\ProvidesFile| command,
+as described in \emph{\clsguide}. For example:
+\begin{verbatim}
+ \ProvidesFile{t1ptm.fd}[1994/06/01 Adobe Times font definitions]
+\end{verbatim}
+
+Spaces within the arguments specific to font definition files are
+ignored to avoid surplus spaces in the document. If a real space is
+necessary use |\space|.
+\NEWdescription{2004/02/10}However, note that this is only true if the
+declaration is made at top level! If used within the definition of
+another command, within |\AtBeginDocument|, option code or in similar
+places, then spaces within the argument will remain and may result in
+incorrect table entries.
+
+\begin{decl}
+|\DeclareFontFamily| \arg{encoding} \arg{family} \arg{loading-settings}
+\end{decl}
+
+Declares a font family \m{family} to be available in encoding scheme
+\m{encoding}.
+
+The \m{loading-settings} are executed immediately after loading any
+font with this encoding and family.
+
+Checks that \m{encoding} was previously declared.
+
+This example refers to the Computer Modern Typewriter font family in
+the Cork encoding:
+\begin{verbatim}
+ \DeclareFontFamily{T1}{cmtt}{\hyphenchar\font=-1}
+\end{verbatim}
+
+Each |.fd| file should contain exactly one |\DeclareFontFamily|
+command, and it should be for the appropriate encoding/family
+combination.
+
+\begin{decl}
+|\DeclareFontShape| \arg{encoding} \arg{family} \arg{series}
+ \arg{shape}\\
+ \null\hfill \arg{loading-info} \arg{loading-settings}
+\end{decl}
+
+Declares a font shape combination; here \m{loading-info} contains the
+information that combines sizes with external fonts. The syntax is
+complex and is described in Section~\ref{sec:loadinfo} below.
+
+The \m{loading-settings} are executed after loading any font with this
+font shape. They are executed immediately after the
+`loading-settings' which were declared by |\DeclareFontFamily| and so
+they can be used to overwrite the settings made at the family level.
+
+Checks that the combination \m{encoding}\m{family} was previously
+declared via |\DeclareFontFamily|.
+
+Example:
+\begin{verbatim}
+ \DeclareFontShape{OT1}{cmr}{m}{sl}{%
+ <<5-8>> sub * cmr/m/n
+ <<8>> cmsl8
+ <<9>> cmsl9
+ <<10>> <<10.95>> cmsl10
+ <<12>> <<14.4>> <<17.28>> <<20.74>> <<24.88>> cmsl12
+ }{}
+\end{verbatim}
+The file can contain any number of |\DeclareFontShape| commands,
+which should be for the appropriate \m{encoding} and \m{family}.
+
+\NEWfeature{1996/06/01}
+The font family declarations for the |OT1|-encoded fonts now all
+contain:
+\begin{verbatim}
+ \hyphenchar\font=`\-
+\end{verbatim}
+This enables the use of an alternative |\hyphenchar| in other encodings
+whilst maintaining the correct value for all fonts.
+
+\subsection{Font file loading information}
+\label{sec:loadinfo}
+
+The information which tells \LaTeX{} exactly which font (\texttt{.tfm})
+files to load is contained in the \m{loading-info} part of a
+|\DeclareFontShape| declaration. This part consists of one or more
+\m{fontshape-decl}s, each of which has the following form:
+
+\begin{center}
+\begin{tabular}{r@{ $::=$ }l}
+ \m{fontshape-decl} & \m{size-infos} \m{font-info} \\
+ \m{size-infos} & \m{size-infos} \m{size-info} $\mid$
+ \m{size-info} \\
+ \m{size-info} & ``|<<|'' \m{number-or-range} ``|>>|'' \\
+ \m{font-info} & $[$ \m{size-function} ``|*|'' $]$
+ $[$ ``|[|'' \m{optarg} ``|]|'' $]$ \m{fontarg} \\
+\end{tabular}
+\end{center}
+The \m{number-or-range} denotes the size or size-range
+for which this entry applies.
+
+If it contains a hyphen it is a
+range: lower bound on the left (if missing, zero implied), upper bound
+on the right (if missing, $\infty$ implied). For ranges, the
+upper bound is \emph{not} included in the range and the lower bound is.
+
+Examples:
+\begin{center}
+\begin{tabular}{lll}
+ |<<10>>| & simple size& 10pt only\\
+ |<<-8>>| & range& all sizes less than 8pt\\
+ |<<8-14.4>>| & range& all sizes greater than or equal to 8pt\\
+ & & \ but less than 14.4pt\\
+ |<<14.4->>| & range& all sizes greater than or equal 14.4pt
+\end{tabular}
+\end{center}
+If more than one \m{size-info} entry follows without any
+intervening \m{font-info}, they all share the next \m{font-info}.
+
+The \m{size-function}, if present, handles the use of \m{font-info}.
+If not present, the `empty' \m{size-function} is assumed.
+
+All the \m{size-info}s are inspected in the order in which they appear
+in the font shape declaration. If a \m{size-info} matches the
+requested size, its \m{size-function} is executed. If |\external@font|
+is non-empty afterwards this process stops, otherwise the next
+\m{size-info} is inspected. (See also |\DeclareSizeFunction|.)
+
+If this process does not lead to a non-empty |\external@font|,
+\LaTeX{} tries the nearest simple size. If the entry contains only
+ranges an error is returned.
+
+
+\subsection{Size functions}
+\label{sec:sizefunct}
+
+
+\LaTeX{} provides the following size functions, whose `inputs' are
+\m{fontarg} and \m{optarg} (when present).
+
+\begin{description}
+\item[`' (empty)]
+Load the external font \m{fontarg} at the user-requested size. If
+\m{optarg} is present, it is used as the scale-factor.
+
+\item[s]
+Like the empty function but without terminal warnings, only
+loggings.
+
+\item[gen]
+Generates the external font from \m{fontarg} followed by
+the user-requested size, e.g.~|<<8>> <<9>> <<10>> gen * cmtt|
+
+\item[sgen]
+Like the `gen' function but without terminal warnings, only loggings.
+
+\item[genb]
+\NEWfeature{1995/12/01}
+Generates the external font from \m{fontarg} followed by
+the user-requested size, using the conventions of the `ec' fonts.
+e.g.~|<<10.98>> genb * dctt| produces |dctt1098|.
+
+\item[sgenb]
+\NEWfeature{1995/12/01}
+Like the `genb' function but without terminal warnings, only loggings.
+
+\item[sub]
+Tries to load a font from a different font shape declaration given by
+\m{fontarg} in the form \m{family}|/|\m{series}|/|\m{shape}.
+
+\item[ssub]
+Silent variant of `sub', only loggings.
+
+\item[subf]
+Like the empty function but issues a warning that it has to substitute
+the external font \m{fontarg} because the desired font shape was not
+available in the requested size.
+
+\item[ssubf]
+Silent variant of `subf', only loggings.
+
+\item[fixed]
+Load font \m{fontarg} as is, disregarding the user-requested size.
+If present, \m{optarg} gives the ``at \ldots pt'' size to be used.
+
+\item[sfixed]
+Silent variant of `fixed', only loggings.
+
+\end{description}
+
+Examples for the use of most of the above size functions can be found
+in the file |cmfonts.fdd|---the source for the standard |.fd| files
+describing the Computer Modern fonts by Donald Knuth.
+
+
+\begin{decl}
+|\DeclareSizeFunction| \arg{name} \arg{code}
+\end{decl}
+
+Declares a size-function \m{name} for use in |\DeclareFontShape|
+commands. The interface is still under development but there should be
+no real need to a define new size functions.
+
+The \m{code} is executed when the size or size-range in
+|\DeclareFontShape| matches the user-requested size.
+
+The arguments of the size-function are automatically parsed and placed
+into |\mandatory@arg| and |\optional@arg| for use in \m{code}. Also
+available, of course, is |\f@size|, which is the user-requested size.
+
+To signal success \m{code} must define the command |\external@font|
+to contain the external name and any scaling options (if present) for
+the font to be loaded.
+
+This example sets up the `empty' size function (simplified):
+\begin{verbatim}
+ \DeclareSizeFunction{}
+ {\edef\external@font{\mandatory@arg\space at\f@size}
+\end{verbatim}
+
+
+\section{Encodings}
+\label{Sec:encode}
+
+This section explains how to declare and use new font encodings and
+how to declare commands for use with particular encodings.
+
+\subsection{The \textsf{fontenc} package}
+
+Users can select new font encodings using the |fontenc| package. The
+|fontenc| package has options for encodings; the last option becomes
+the default encoding. For example, to use the |OT2| (Washington
+University Cyrillic encoding) and |T1| encodings, with |T1| as the
+default, an author types:
+\begin{verbatim}
+ \usepackage[OT2,T1]{fontenc}
+\end{verbatim}
+
+\NEWdescription{1997/12/01}
+For each font encoding \m{ENC} given as an option, this package loads
+the \emph{encoding definition} (|<enc>enc.def|, with an all
+lower-case name) file; it also sets |\encodingdefault| to be the last
+encoding in the option list.
+
+The declarations in the encoding definition file |<enc>enc.def| for
+encoding \m{ENC} are responsible for declaring this encoding and
+telling \LaTeX{} how to produce characters in this encoding; this file
+should contain nothing else (see Section~\ref{Sec:encode.def}.
+
+The standard \LaTeX{} format declares the |OT1| and |T1| text
+encodings by inputting the files |ot1enc.def| and |t1enc.def|; it also
+sets up various defaults which require that |OT1|-encoded fonts are
+available.
+Other encoding set-ups might be added to the distribution at a
+later stage.
+
+Thus the example above loads the files |ot2enc.def| and |t1enc.def|
+and sets |\encodingdefault| to |T1|.
+
+\emph{Warning}: If you wish to use |T1|-encoded fonts other than the `cmr'
+family then you may need to load the package (e.g.~\texttt{times})
+that selects the fonts \emph{before} loading \texttt{fontenc} (this
+prevents the system from attempting to load any |T1|-encoded fonts from
+the `cmr' family).
+
+
+
+\subsection{Encoding definition file commands}
+\label{Sec:encode.def}
+
+\emph{Note}: An encoding definition file should contain only commands
+from this subsection.
+
+\NEWdescription{2019/07/10}
+As an exception it may also contain a |\DeclareFontsubstitution|
+declaration (described in \ref{sec:encoding-defaults}) to specify how
+font substitution for this encoding should be handled. In that case
+it is important that the values used point to a font that is guaranteed
+to be available on all \LaTeX{} installations.\footnote{If the font
+ encoding file is made available as part of a CTAN bundle, that could
+ be a font that is provided together with that bundle, but it should
+ not point to font which requires further installation steps and
+ therefore may or may not be installed.}
+
+
+\NEWdescription{1997/12/01}
+As with the font definition file commands, it is also possible
+(although normally not necessary) to use these declarations directly
+within a class or package file.
+
+\emph{Warning}: Some aspects of the contents of font definition files
+are still under development. Therefore, the current versions of the
+files |ot1enc.def| and |t1enc.def| are temporary versions and should
+not be used as models for producing further such files. For further
+information you should read the documentation in |ltoutenc.dtx|.
+
+\begin{decl}
+ |\ProvidesFile{<file-name>}[<release-info>]|
+\end{decl}
+The file should announce itself with a |\ProvidesFile|
+command, described in \emph{\clsguide}. For example:
+\begin{verbatim}
+ \ProvidesFile{ot2enc.def}
+ [1994/06/01 Washington University Cyrillic encoding]
+\end{verbatim}
+
+
+\begin{decl}
+|\DeclareFontEncoding| \arg{encoding} \arg{text-settings}
+ \arg{math-settings}
+\end{decl}
+
+Declares a new encoding scheme \m{encoding}.
+
+The \m{text-settings} are
+declarations which are executed every time |\selectfont| changes the
+encoding to be \m{encoding}.
+
+The \m{math-settings} are similar but are for math alphabets. They
+are executed whenever a math alphabet with this encoding is
+called.
+
+\NEWfeature{1998/12/01}
+It also saves the value of \m{encoding} in the macro
+|\LastDeclaredEncoding|.
+
+Example:
+\begin{verbatim}
+ \DeclareFontEncoding{OT1}{}{}
+\end{verbatim}
+
+Some author commands need to change their definition depending on
+which encoding is currently in use. For example, in the |OT1|
+encoding, the letter `\AE' is in slot |"1D|, whereas in the |T1|
+encoding it is in slot |"C6|. So the definition of |\AE| has to
+change depending on whether the current encoding is |OT1| or |T1|.
+The following commands allow this to happen.
+
+\begin{decl}
+ |\DeclareTextCommand| \arg{cmd} \arg{encoding}
+ \oarg{num} \oarg{default} \arg{definition}
+\end{decl}
+This command is like |\newcommand|, except that it defines a
+command which is specific to one encoding. For example, the
+definition of |\k| in the |T1| encoding is:
+\begin{verbatim}
+ \DeclareTextCommand{\k}{T1}[1]
+ {\oalign{\null#1\crcr\hidewidth\char12}}
+\end{verbatim}
+|\DeclareTextCommand| takes the same optional arguments as
+|\newcommand|.
+
+The resulting command is
+robust, even if the code in \m{definition} is fragile.
+
+It does not produce an error if the command has already
+been defined but logs the redefinition in the transcript file.
+
+\begin{decl}[1994/12/01]
+ |\ProvideTextCommand| \arg{cmd} \arg{encoding}
+ \oarg{num} \oarg{default} \arg{definition}
+\end{decl}
+This command is the same as |\DeclareTextCommand|, except that
+if \m{cmd} is already defined in encoding \m{encoding}, then the
+definition is ignored.
+
+\begin{decl}
+ |\DeclareTextSymbol| \arg{cmd} \arg{encoding} \arg{slot}
+\end{decl}
+This command defines a text symbol with slot \m{slot} in the
+encoding. For example, the definition of |\ss| in the |OT1| encoding
+is:
+\begin{verbatim}
+ \DeclareTextSymbol{\ss}{OT1}{25}
+\end{verbatim}
+It does not produce an error if the command has already
+been defined but logs the redefinition in the transcript file.
+
+\begin{decl}
+ |\DeclareTextAccent| \arg{cmd} \arg{encoding} \arg{slot}
+\end{decl}
+This command declares a text accent, with the accent taken from slot
+\m{slot} in the encoding. For example, the definition of |\"| in
+the |OT1| encoding is:
+\begin{verbatim}
+ \DeclareTextAccent{\"}{OT1}{127}
+\end{verbatim}
+It does not produce an error if the command has already
+been defined but logs the redefinition in the transcript file.
+
+\begin{decl}
+ |\DeclareTextComposite| \arg{cmd} \arg{encoding} \arg{letter}
+ \arg{slot}
+\end{decl}
+This command declares that the composite letter formed from applying
+\m{cmd} to \m{letter} is defined to be simply slot \m{slot} in the
+encoding. The \m{letter} should be a single letter (such as |a|) or
+a single command (such as |\i|).
+
+
+For example, the definition of |\'{a}|
+in the |T1| encoding could be declared like this:
+\begin{verbatim}
+ \DeclareTextComposite{\'}{T1}{a}{225}
+\end{verbatim}
+
+The \m{cmd} will normally have been previously declared
+for this encoding, either by using
+|\DeclareTextAccent|, or as a one-argument |\DeclareTextCommand|.
+
+\begin{decl}[1994/12/01]
+ |\DeclareTextCompositeCommand| \arg{cmd} \arg{encoding} \arg{letter}
+ \arg{definition}
+\end{decl}
+This is a more general form of |\DeclareTextComposite|, which allows
+for an arbitrary \m{definition}, not just a \m{slot}. The main use
+for this is to allow accents on |i| to act like accents on |\i|, for
+example:
+\begin{verbatim}
+ \DeclareTextCompositeCommand{\'}{OT1}{i}{\'\i}
+\end{verbatim}
+It has the same restrictions as |\DeclareTextComposite|.
+
+
+\begin{decl}[1998/12/01]
+ |\LastDeclaredEncoding|
+\end{decl}
+This holds the name of the last encoding declared via
+|\DeclareFontEncoding| (this should also be the currently most
+efficient encoding). It can be used in the \m{encoding} argument
+of the above declarations in place of explicitly mentioning the
+encoding, e.g.
+\begin{verbatim}
+ \DeclareFontEncoding{T1}{}{}
+ \DeclareTextAccent{\`}{\LastDeclaredEncoding}{0}
+ \DeclareTextAccent{\'}{\LastDeclaredEncoding}{1}
+\end{verbatim}
+This can be useful in cases where encoding files sharing common code
+are generated from one source.
+
+
+\subsection{Default definitions}
+
+\NEWdescription{1997/12/01}
+The declarations used in encoding definition files define
+encoding-specific commands but they do not allow those commands to be
+used without explicitly changing the encoding. For some commands,
+such as symbols, this is not enough. For example, the~|OMS| encoding
+contains the symbol~`\S', but we need to be able to use the
+command~|\S| whatever the current encoding may be, without explicitly
+selecting the encoding~|OMS|.
+
+\NEWdescription{1997/12/01}
+To allow this, \LaTeX{} has commands that declare default definitions
+for commands; these defaults are used when the command is not defined
+in the current encoding. For example, the default encoding for~|\S|
+is~|OMS|, and so in an encoding (such as |OT1|) which does not
+contain~|\S|, the~|OMS| encoding is selected in order to access this
+glyph. But in an encoding (such as~|T1|) which does contain~|\S|, the
+glyph in that encoding is used. The standard \LaTeXe{} format sets
+up several such defaults using the following encodings: |OT1|,~|OMS|
+and~|OML|.
+
+\emph{Warning}: These commands should \emph{not} occur in encoding
+definition files, since those files should declare only commands for use
+when that encoding has been selected. They should instead be placed
+in packages; they must, of course, always refer to encodings that are
+known to be available.
+
+\begin{decl}[1994/12/01]
+ |\DeclareTextCommandDefault| \arg{cmd} \arg{definition}
+\end{decl}
+This command allows an encoding-specific command to be given a default
+definition. For example, the default definition for |\copyright| is
+defined be be a circled `c' with:
+\begin{verbatim}
+ \DeclareTextCommandDefault{\copyright}{\textcircled{c}}
+\end{verbatim}
+\begin{decl}[1994/12/01]
+ |\DeclareTextAccentDefault| \arg{cmd} \arg{encoding} \\
+ |\DeclareTextSymbolDefault| \arg{cmd} \arg{encoding}
+\end{decl}
+These commands allow an encoding-specific command to be given a
+default encoding. For example, the default encoding for |\"| and
+|\ae| is set to be |OT1| by:
+\begin{verbatim}
+ \DeclareTextAccentDefault{\"}{OT1}
+ \DeclareTextSymbolDefault{\ae}{OT1}
+\end{verbatim}
+Note that |\DeclareTextAccentDefault| can be used on any one-argument
+encoding-specific command, not just those defined with
+|\DeclareTextAccent|. Similarly, |\DeclareTextSymbolDefault| can be
+used on any encoding-specific command with no arguments, not just
+those defined with |\DeclareTextSymbol|.
+
+For more examples of these definitions, see |ltoutenc.dtx|.
+
+\begin{decl}[1994/12/01]
+ |\ProvideTextCommandDefault| \arg{cmd} \arg{definition}
+\end{decl}
+This command is the same as |\DeclareTextCommandDefault|, except that
+if the command already has a default definition, then the definition
+is ignored. This is useful to give `faked' definitions of symbols
+which may be given `real' definitions by other packages. For example,
+a package might give a fake definition of |\textonequarter| by saying:
+\begin{verbatim}
+ \ProvideTextCommandDefault{\textonequarter}{$\m@th\frac14$}
+\end{verbatim}
+
+ \subsection{Encoding defaults} \label{sec:encoding-defaults}
+
+\begin{decl}
+|\DeclareFontEncodingDefaults| \arg{text-settings} \arg{math-settings}
+\end{decl}
+
+Declares \m{text-settings} and \m{math-settings} for all encoding
+schemes. These are executed before the encoding scheme dependent ones
+are executed so that one can use the defaults for the major cases and
+overwrite them if necessary using |\DeclareFontEncoding|.
+
+If |\relax| is used as an argument, the current setting of this default
+is left unchanged.
+
+This example is used by amsfonts.sty for accent positioning; it changes
+only the math settings:
+\begin{verbatim}
+ \DeclareFontEncodingDefaults{\relax}{\def\accentclass@{7}}
+\end{verbatim}
+
+
+\begin{decl}
+|\DeclareFontSubstitution| \arg{encoding} \arg{family} \arg{series}
+ \arg{shape}
+\end{decl}
+
+Declares the default values for font substitution which will be used
+when a font with encoding \m{encoding}
+should be loaded but no font can be found with the current
+attributes.
+
+These substitutions are local to the encoding scheme because the
+encoding scheme is never substituted! They are tried in the order
+\m{shape} then \m{series} and finally \m{family}.
+
+\NEWdescription{2019/07/10}
+This declaration is normally done in an encoding definition file
+(see~\ref{Sec:encode.def}), but can also be used in a class file or
+the document preamble to alter the default for a specific encoding.
+
+If no defaults are set up for an encoding, the values given by
+|\DeclareErrorFont| are used.
+
+The font specification for
+\m{encoding}\m{family}\m{series}\m{shape}
+must have been defined by |\DeclareFontShape|
+before the |\begin{document}| is reached.
+
+Example:
+\begin{verbatim}
+ \DeclareFontSubstitution{T1}{cmr}{m}{n}
+\end{verbatim}
+
+\subsection{Case changing}
+\label{sec:case}
+
+\begin{decl}
+ |\MakeUppercase| \arg{text} \\
+ |\MakeLowercase| \arg{text}
+\end{decl}
+
+\NEWfeature{1995/06/01}
+\TeX{} provides the two primitives |\uppercase| and |\lowercase| for
+changing the case of text. Unfortunately, these \TeX{} primitives do
+not change the case of characters accessed by commands like |\ae| or
+|\aa|. To overcome this problem, \LaTeX{} provides these two commands.
+
+In the long run, we would like to use all-caps fonts rather than any
+command like |\MakeUppercase| but this is not possible at the moment
+because such fonts do not exist.
+
+For further details, see \texttt{clsguide.tex}.
+
+\NEWdescription{1999/04/23}
+In order that upper/lower-casing will work reasonably well, and in
+order to provide any correct hyphenation, \LaTeXe{} \emph{must} use,
+throughout a document, the same fixed table for changing case. The
+table used is designed for the font encoding |T1|; this works well
+with the standard \TeX{} fonts for all Latin alphabets but will cause
+problems when using other alphabets. As an experiment, it has now
+been extended for use with some Cyrillic encodings.
+
+
+\section{Miscellanea}
+\label{Sec:misc}
+
+This section covers the remaining font commands in \LaTeX{} and some
+other issues.
+
+\subsection{Font substitution}
+
+\begin{decl}
+|\DeclareErrorFont| \arg{encoding} \arg{family} \arg{series}
+ \arg{shape} \arg{size}
+\end{decl}
+
+Declares \m{encoding}\m{family}\m{series}\m{shape} to be the font shape
+used in cases where the standard substitution mechanism fails
+(i.e.~would loop). For the standard mechanism see the command
+|\DeclareFontSubstitution| above.
+
+The font specification for
+\m{encoding}\m{family}\m{series}\m{shape}
+must have been defined by |\DeclareFontShape|
+before the |\begin{document}| is reached.
+
+Example:
+\begin{verbatim}
+ \DeclareErrorFont{OT1}{cmr}{m}{n}{10}
+\end{verbatim}
+
+\NEWdescription{2019/07/10}
+This declaration is a system wide fallback and it should normally not
+be changed, in particular it does not belong into font encoding
+definition files but rather into the \LaTeX{} format. It is normally
+set up in \texttt{fonttext.cfg}. Adjustments on a per encoding base
+should be made through |\DeclareFontSubstitution| instead!
+
+
+\begin{decl}
+|\fontsubfuzz|
+\end{decl}
+
+This parameter is used to decide whether or not to produce a terminal
+warning if a font size substitution takes place. If the difference
+between the requested and the chosen size is less than |\fontsubfuzz|
+the warning is only written to the transcript file. The default value
+is |0.4pt|. This can be redefined with |\renewcommand|, for example:
+\begin{verbatim}
+ \renewcommand{\fontsubfuzz}{0pt} % always warn
+\end{verbatim}
+
+\subsection{Preloading}
+
+\begin{decl}
+|\DeclarePreloadSizes| \arg{encoding} \arg{family} \arg{series}
+ \arg{shape}
+\arg{size-list}
+\end{decl}
+
+
+Specifies the fonts that should be preloaded by the format. These
+commands should be put in a |preload.cfg| file, which is read in when
+the \LaTeX{} format is being built.
+Read |preload.dtx| for more information on how to built such a
+configuration file.
+
+Example:
+\begin{verbatim}
+ \DeclarePreloadSizes{OT1}{cmr}{m}{sl}{10,10.95,12}
+\end{verbatim}
+
+\NEWdescription{2019/07/10}
+Preloading is really an artifact of the days when loading fonts while
+processing a document contributed substantially to the processing
+time. These days it is usually best not to use this mechanism any more.
+
+\subsection{Accented characters}
+
+\NEWdescription{1996/06/01}
+Accented characters in \LaTeX{} can be produced using commands such as
+|\"a| etc. The precise effect of such commands depends on the font
+encoding being used. When using a font encoding that contains the
+accented characters as individual glyphs (such as the |T1| encoding,
+in the case of |\"a|) words that contain such accented characters can
+be automatically hyphenated. For font encodings that do not contain
+the requested individual glyph (such as the |OT1| encoding) such a
+command invokes typesetting instructions that produce the accented
+character as a combination of character glyphs and diacritical marks
+in the font. In most cases this involves a call to the \TeX{}
+primitive |\accent|. Glyphs constructed as composites in this way
+inhibit hyphenation of the current word; this is one reason why the
+|T1| encoding is preferable to the original \TeX{} font encoding
+|OT1|.
+
+It is important to understand that commands like |\"a| in \LaTeXe{}
+represent just a name for a single glyph (in this case `umlaut a') and
+contain no information about how to typeset that glyph---thus it does
+\emph{not} mean `put two dots on top of the character a'. The
+decision as to what typesetting routine to use will depend on the
+encoding of the current font and so this decision is taken at the last
+minute. Indeed, it is possible that the same input will be typeset in
+more than one way in the same document; for example, text in section
+headings may also appear in table of contents and in running heads; and
+each of these may use a font with a different encoding.
+
+For this reason the notation |\"a| is \emph{not} equivalent to:
+\begin{verbatim}
+ \newcommand \chara {a} \"\chara
+\end{verbatim}
+In the latter case, \LaTeX{} does not expand the macro |\chara| but
+simply compares the notation (the string |\"\chara|) to its list of
+known composite notations in the current encoding; when it fails to
+find |\"\chara| it does the best it can and invokes the typesetting
+instructions that put the umlaut accent on top of the expansion of
+|\chara|. Thus, even if the font actually contains `\"a' as an
+individual glyph, it will not be used.
+
+The low-level accent commands in \LaTeX{} are defined in such a way
+that it is possible to combine a diacritical mark from one font with a
+glyph from another font; for example, |\"\textparagraph| will produce
+\"\textparagraph. The umlaut here
+is taken from the |OT1| encoded font |cmr10| whilst the paragraph sign
+is from the |OMS| encoded font |cmsy10|. (This example may be
+typographically silly but better ones would involve font encodings
+like |OT2| (Cyrillic) that might not be available at every
+site.)
+
+There are, however, restrictions on the font-changing commands that
+will work within the argument to such an accent command. These are
+\TeX{}nical in the sense that they follow from the way that \TeX{}'s
+|\accent| primitive works, allowing only a special class of commands
+between the accent and the accented character.
+
+The following are examples of commands that will not work correctly as
+the accent will appear above a space: the font commands with text
+arguments (|\textbf{...}| and friends); all the font size declarations
+(|\fontsize| and |\Large|, etc.); |\usefont| and declarations that
+depend on it, such as |\normalfont|; box commands (e.g.~|\mbox{...}|).
+
+The lower-level font declarations that set the attributes family,
+series and shape (such as |\fontshape{sl}\selectfont|) will produce
+correct typesetting, as will the default declarations such as
+|\bfseries|.
+
+
+\subsection{Naming conventions}
+
+\begin{itemize}
+\item
+Math alphabet commands all start with |\math...|: examples are
+|\mathbf|, |\mathcal|, etc.
+
+\item
+The text font changing commands with arguments all start with
+|\text...|: e.g.~|\textbf| and |\textrm|. The exception to this is
+|\emph|, since it occurs very commonly in author documents and so
+deserves a shorter name.
+
+\item
+Names for encoding schemes are strings of up to three letters (all
+upper case) plus digits.
+
+The \LaTeX3 project reserves the use of encodings starting with the
+following letters: |T| (standard 256-long text encodings), |TS|
+(symbols that are designed to extend a corresponding |T| encoding),
+|X| (text encodings that do not conform to the strict requirements for
+|T| encodings), |M| (standard 256-long math encodings), |S| (other
+symbol encodings), |A| (other special applications), |OT| (standard
+128-long text encodings) and |OM| (standard 128-long math encodings).
+
+Please do not use the above starting letters for non-portable
+encodings. If new standard encodings emerge then we shall add them in
+a later release of \LaTeX.
+
+Encoding schemes which are local to a site or a system should start
+with |L|, experimental encodings intended for wide distribution will
+start with |E|, whilst |U| is for Unknown or Unclassified encodings.
+
+\item
+Font family names should contain up to five lower case letters.
+Where possible, these should conform to the \emph{Filenames for fonts}
+font naming scheme.
+
+\item
+Font series names should contain up to four lower case letters.
+
+\item
+Font shapes should contain up to two letters lower case.
+
+\item
+Names for symbol fonts are built from lower and upper case letters
+with no restriction.
+\end{itemize}
+
+Whenever possible, you should use the series and shape names suggested
+in \emph{\LaTeXcomp} since this will make it easier to combine new
+fonts with existing fonts.
+
+\NEWdescription{1994/12/01}
+ Where possible, text symbols should be named as |\text| followed by
+ the Adobe glyph name: for example |\textonequarter| or
+ |\textsterling|. Similarly, math symbols should be named as
+ |\math| followed by the glyph name, for example |\mathonequarter|
+ or |\mathsterling|. Commands which can be used in text or math can
+ then be defined using |\ifmmode|, for example:
+\begin{verbatim}
+ \DeclareRobustCommand{\pounds}{%
+ \ifmmode \mathsterling \else \textsterling \fi
+ }
+\end{verbatim}
+ Note that commands defined in this way must be robust, in case they
+ get put into a section title or other moving argument.
+
+\section{If you need to know more \ldots}
+
+\NEWdescription{1996/06/01}
+The |tracefnt| package provides for tracing the actions concerned with
+loading, substituting and using fonts.
+The package accepts the following options:
+\begin{description}
+\item[errorshow] Write all information about font changes, etc.\ but
+ only to the transcript file unless an error occurs. This means that
+ information about font substitution will not be shown on the
+ terminal.
+
+\item[warningshow] Show all font warnings on the terminal. This
+ setting corresponds to the default behavior when this
+ \texttt{tracefnt} package is \emph{not} used!
+
+\item[infoshow] Show all font warnings and all font info messages
+ (that are normally only written to the transcript file) also on the
+ terminal. This is the default when this \texttt{tracefnt} package is
+ loaded.
+
+\item[debugshow] In addition to what is shown by \texttt{infoshow},
+ show also changes of math fonts (as far as possible): beware, this
+ option can produce a large amount of output.
+
+\item[loading] Show the names of external font files when they are
+ loaded. This option shows only `newly loaded' fonts, not those
+ already preloaded in the format or the class file before this
+ \texttt{tracefnt} package becomes active.
+
+\item[pausing]
+ Turn all font warnings into errors so that \LaTeX{} will stop.
+\end{description}
+
+\emph{Warning}: The actions of this package can change the layout of a
+document and even, in rare cases, produce clearly wrong output, so
+it should not be used in the final formatting of `real documents'.
+
+\begin{thebibliography}{1}
+
+\bibitem{A-W:MG2004}
+Frank Mittelbach and Michel Goossens.
+\newblock {\em The {\LaTeX} Companion second edition}.
+\newblock With Johannes Braams, David Carlisle, and Chris Rowley.
+\newblock Addison-Wesley, Reading, Massachusetts, 2004.
+
+\bibitem{tub:DKn89}
+Donald~E. Knuth.
+\newblock Typesetting concrete mathematics.
+\newblock {\em {TUG}boat}, 10(1):31--36, April 1989.
+
+\bibitem{A-W:LLa94}
+Leslie Lamport.
+\newblock {\em {\LaTeX:} A Document Preparation System}.
+\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
+
+\end{thebibliography}
+
+\end{document}
diff --git a/macros/latex-dev/doc/latexchanges.pdf b/macros/latex-dev/doc/latexchanges.pdf
new file mode 100644
index 0000000000..ec91b76940
--- /dev/null
+++ b/macros/latex-dev/doc/latexchanges.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/latexchanges.tex b/macros/latex-dev/doc/latexchanges.tex
new file mode 100644
index 0000000000..59a8488c2f
--- /dev/null
+++ b/macros/latex-dev/doc/latexchanges.tex
@@ -0,0 +1,756 @@
+% \iffalse meta-comment
+%
+% Copyright 2015-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: latexchanges.tex
+
+\NeedsTeXFormat{LaTeX2e}
+
+\documentclass{ltxguide}
+
+\usepackage[T1]{fontenc}
+
+\title{Changes to the \LaTeXe{} format}
+
+\author{\copyright~Copyright 2015--2019, \LaTeX3 Project Team.\\
+ All rights reserved.}
+
+\date{2019-10-01}
+
+% a few commands from doc
+\newcommand\Lpack[1]{\mbox{\textsf{#1}}}
+\newcommand\DescribeMacro[1]{\texttt{\string#1}}
+
+\makeatletter % -- provide command introduced in new release
+ % so this typesets with an old format
+
+\DeclareTextCommandDefault\textcommabelow[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
+ \hbox{\check@mathfonts\fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+\makeatother
+
+\ifx\href\undefined
+ \newcommand\ghissue[1]{#1}
+ \newcommand\gnatsissue[1]{#1}
+ \newcommand\ltnewsissue[1]{\LaTeX\ News~#1}
+ \newcommand\sxanswer[1]{https://tex.stackexchange.com\slash a\slash #1}
+ \newcommand\sxquestion[1]{https://tex.stackexchange.com\slash q\slash #1}
+\else
+ \newcommand\ghissue[1]{%
+ \href{https://github.com/latex3/latex2e/issues/#1}{#1}}
+ \newcommand\gnatsissue[1]{%
+ \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/#1}{#1}}
+ \newcommand\ltnewsissue[1]{%
+ \href{https://www.latex-project.org/news/latex2e-news/ltnews#1.pdf}{\LaTeX\ News~#1}}
+ \newcommand\sxanswer[1]{%
+ \url{https://tex.stackexchange.com/a/#1}}
+ \newcommand\sxquestion[1]{%
+ \url{https://tex.stackexchange.com/q/#1}}
+\fi
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\newpage
+
+\section{Introduction}
+
+This document describes changes that have been made to the
+\LaTeX\ format since the 2014/05/01 \LaTeX\ release.
+
+
+As announced in \ltnewsissue{22}, the 2015 \LaTeX{} release adopts a new
+policy. Improvements and bug fixes will be made to the format sources,
+with the \Lpack{latexrelease} package being available to revert
+changes to use definitions from an earlier format.
+
+
+\section{Changes introduced in 2019-10-01}
+
+\emph{to be added}
+
+\section{Changes introduced in 2018-12-01}
+
+Further additions to the characters supported by default in UTF-8.
+\verb|\guillemetleft| and \verb|\guillemetright| provided as alias for
+the names based on the Adobe font names (\ghissue{65}).
+
+The use of potrusion in tables of contents is suppressed by default,
+see \sxquestion{172785}.
+
+The handling of visible space in verbation was adjusted for
+\ghissue{69} and \ghissue{70}.
+
+Spaces are removed from the argument passed to BiBTeX, \ghissue{88}.
+
+New commands \verb\Hwithstroke| and \verb|\hwithstroke| added to T1 encoding support.
+
+The internal box structure for floats is adjusted to preserve box
+levels of split hyperlinks, avoiding a fatal pdftex error. \ghissue{94}.
+
+
+\section{Changes introduced in 2018-04-01 patch~5}
+Improved support for non ASCII filenames on the commandline on
+filesystems using legacy encodings.
+
+Adjusted the new package rollback code so that some edge cases where rollback
+can not be guaranteed become a warning not an error.
+
+\section{Changes introduced in 2018-04-01 patch~4}
+No changes to the format, but \texttt{docstrip} adjusted so that non-ASCII
+\texttt{.ins} files work with the new UTF-8 defaults.
+
+\section{Changes introduced in 2018-04-01 patch~3}
+Additional adjustments for GitHub issues \ghissue{34} and \ghissue{38}, adjustment to the
+location of some documentation files, such as \texttt{source2e.tex} to
+be installed in the documentation sources not the default \TeX\ input
+tree.
+
+
+\section{Changes introduced in 2018-04-01 patch~2}
+Additional adjustments for GitHub issues \ghissue{32} and \ghissue{33}.
+
+\section{Changes introduced in 2018-04-01 patch~1}
+Make \verb|\UseRawInputEncoding| and \Lpack{latexrelease} reset \verb|\inputencodingname|
+when disabling the UTF-8 input handling.
+
+\section{Changes introduced in 2018-04-01}
+Further details of changes at this release are given in \ltnewsissue{28}, but in brief
+the main changes are as listed below.
+
+The default encoding for files has been changed to UTF-8.
+
+A new possibility to refer to older versions of packages has been added.
+
+New commands previously available in \Lpack{remreset} and
+\Lpack{chngcntr} packages for controlling counters have been added.
+
+The definition of \verb|\@ifundefined| has been refined to use the e-\TeX \verb|\ifcsname|
+primitive when available, and to avoid defining the command being tested to be \verb|\relax|
+in the case that it was previously undefined.
+
+\section{Changes introduced in 2017-04-15}
+Optionally, \LaTeX{} format and package dates may use ISO style dates with
+\texttt{-} rather than \texttt{/}.
+
+For Unicode \TeX{}s, made further adjustments to the composite accent
+code in \texttt{tuenc.def}, and further updates tracking changes in
+Lua\TeX, now at 1.04.
+
+Previously defining an encoding-specific composite with an undeclared
+accent (or an accent declared later) gave no error, but did nothing useful.
+\LaTeX\ will now detect this and give the accent comamnd a default definition
+as an error, allowing the declared composite to work as intended.
+
+The definition of \verb|\-| is adjusted to match the comments in
+\gnatsissue{3855} to accomodate non standard settings of \verb|\hyphenchar|.
+
+In parboxes and similar settings, \verb|\lineskiplimit| is now
+reset (to the existing default value, \verb|\normallineskiplimit|).
+See \sxanswer{359934}.
+
+ The code for verb|\newpage| has been adjusted to add a test on the value of
+\verb|\prevdepth| so that the depth of the last line is preserved in
+forced page breaks.
+
+\section{Changes introduced in 2017/01/01 patch~3}
+Emergency patch to correct a typo in a change introduced in patch~2.
+
+\section{Changes introduced in 2017/01/01 patch~2}
+More adjustments for TU encoding, allowing for characters missing in
+common system fonts. Additional \texttt{fd} files
+for Latin Modern variants are included in the documented sources.
+
+\section{Changes introduced in 2017/01/01 patch~1}
+Fixes to TU encoding definitions for Lua\TeX\ and Xe\TeX.
+
+\section{Changes introduced in 2017/01/01}
+
+A new test is added during format making that e\TeX\ extensions are
+available. As noted in \LaTeX\ news, e\TeX\ will now be required to
+build \LaTeX.
+
+Further updates tracking changes for Lua\TeX~1.0.
+
+The definition of \verb|\showhyphens| is changed in formats built
+with Xe\TeX, as the original version, inherited from plain \TeX\ does
+not work with Xe-\TeX.
+
+Changes to the default encoding used by Lua\TeX\ and Xe\TeX\ formats to
+be TU (Unicode) rather than OT1 (7 bit legacy \TeX\ encoding).
+
+\section{Changes introduced in 2016/03/31 patch~3}
+Fixes to \verb|\newinsert| and \verb|\extrafloats|.
+
+\section{Changes introduced in 2016/03/31 patch~2}
+Adjustments to \verb|\c{g}| in OT1 encoding.
+
+\section{Changes introduced in 2016/03/31 patch~1}
+Adjust the upper limit for Character Class allocation in Xe-\TeX\ to
+4096 to match a change in Xe-\TeX.
+
+\section{Changes introduced in 2016/03/31}
+Modify picture mode as suggested in latex/4452 to avoid leaders of
+almost zero length.
+
+Modify the checks in \verb|\DeclareMathSymbol| and related commands
+so that they do not give errors with new Lua\TeX\ releases.
+
+\section{Changes introduced in 2016/02/01}
+Adjustments to Lua\TeX\ support to match changes to the Lua\TeX\ engine,
+and to the character class allocation in Xe\TeX.
+
+Load Unicode data from new generic \texttt{unicode-data} distribution.
+
+\section{Changes introduced in 2015/10/01 patch~2}
+
+This release fixes the behaviour of the allocation mechanism if the switch
+from the standard to extended pool takes place within a group.
+
+\section{Changes introduced in 2015/10/01 patch~1}
+This release allows \Lpack{latexrelease} to revert the
+Lua\TeX{}-specific
+changes, in particular fixing an incorrect date in part of the mechanism and
+adding a method to disable callback management entirely.
+
+\section{Changes introduced in \LaTeX\ 2015/10/01}
+
+\subsection{LuaTeX allocation}
+Almost all changes at this release relate to incorporating allocation macros for luatex into the format
+as done for etex and xetex in 2015/01/01. For details see |ltluatex.dtx| or \ltnewsissue{22}.
+|ltluatex.dtx| now forms a new chapter (N) in the documented sources, |source2e.tex|.
+
+
+\subsection{Increased number of floats}
+The default float list has been increased from 18 to 52 registers if
+e\TeX\ is available.
+The list can be increased further using |\extrafloats| however this
+default allocation uses classic registers below 256 so the registers are
+also available for |\newinsert| as described below.
+
+\subsection{Improved \texttt{\textbackslash newinsert}}
+The command |\newinsert| has been extended to take registers from the lists of free float
+registers once the classic register allocation is used up. This should make it highly unlikely
+to get ``no room'' errors on register allocation assuming the format is used with
+an e-\TeX\ based \TeX\ engine.
+
+\subsection{New accent, \texttt{\textbackslash textcommabelow} (pr/4414)}
+The command |\textcommabelow| has been added. This is mainly intended for Romanian letters
+\textcommabelow{S}\,\textcommabelow{s}\,\textcommabelow{T}\,\textcommabelow{t}.
+
+\subsection{Unicode 8}
+The file |unicode-letters.def| used to initialise character data in
+Unicode \TeX\ variants has been regenerated from data files updated
+to Unicode~8.
+
+\section{Changes introduced in 2015/01/01 patch~2}
+There were no changes to the format at this release, but the sources were fixed to fix bug latex/4434
+affecting bottom float positioning if the \Lpack{latexrelease} package was used.
+
+\section{Changes introduced in 2015/01/01 patch~1}
+This release re-introduces the ``Patch Level'' scheme for identifying
+releases between main ``dated'' releases. Early \LaTeXe\ releases
+included a mechanism whereby updates could be provided by a
+\emph{patch
+ file}. This was mainly intended to allow updates to be made without
+downloading the full sources again, which was an important
+consideration with download speeds and costs at the time.
+
+The new mechanism incorporates any changes directly into the sources,
+but having the patch level identified in the banner allows the
+\LaTeX\ release to be identified, even if (as in this case) most of the
+changes do not affect the format but affect other base packages such
+as \Lpack{latexrelease} and \Lpack{inputenc}. The patch level is shown
+in the banner at the start of the job, but does not affect the date
+handling of the |\IncludeInRelease| mechanism.
+
+Apart from re-arranging the version banner, the only change in the
+format is that |\newtoks| was accidentally defined twice, using the
+old and new allocation scheme described in Section \ref{e@alloc}.
+The old definition is now only in the \Lpack{latexrelease} package,
+for use when emulating old formats.
+
+
+
+
+\section
+[Changes between \LaTeX\ releases 2014/05/01 and 2015/01/01]
+{Changes between \LaTeX\ releases 2014/05/01 and 2015/01/01\footnote{Much of this text
+is taken from \Lpack{fixltx2e} package which was formerly used to make such changes available separately.}}
+
+\subsection{Support for \LaTeX\ version changes}
+\DescribeMacro{\includeInRelease}\arg{date}\oarg{date}\arg{label}\arg{message}\arg{code}
+
+\smallskip
+
+The |\includeInRelease| command has been added to support backward and
+forward compatibility for the \LaTeX\ format. It supports the
+declaration of conditional code that can be loaded based on options
+given to the \Lpack{latexrelease} package. Its use is described in
+detail in the \Lpack{latexrelease} package documentation.
+
+\subsection{New Allocation Code\label{e@alloc}}
+Previously |\newcount| and related commands were based on classic TeX
+and only allocated in the range 0--255. This was extended (in
+different ways) for e-\TeX\ in the |etex| package and in the
+|xelatex.ini| and |lualatex.ini| files used in those formats. Related
+to this the number of boxes allocated to store floats was
+limited. This was extended to a certain extent in the |morefloats|
+package (by Don Hosek and H.-Martin Muench) but the new allocation
+incorporates float allocation directly and supports much larger float
+lists using the extended registers.
+
+The new code allocates registers in the full extended range (
+$2^{15}-1$ for etex and xelatex, $2^{16}-1$ for lualatex.
+In addition a new command |\extrafloats| is provided.
+
+\DescribeMacro{\extrafloats}\arg{number}
+\smallskip
+
+This allocates additional registers for the \LaTeX\ float system to
+hold figures and tables etc. Similar functionality has been
+available via the \Lpack{morefloats} package but this is a different
+implementation using extended e-\TeX\ registers when available so
+allows many more registers to be reserved for floats as they are
+allocated from a pool of 32 or 64 thousand rather than 256 registers,
+depending on the engine in use.
+
+\DescribeMacro{\newmarks}\arg{command}
+\smallskip
+
+e-\TeX\ only, previously available via the \Lpack{etex} package.
+Allocates commands to use the extended e-\TeX\ mark mechanism.
+
+\DescribeMacro{\newXeTeXintercharclass}\arg{command}
+\smallskip
+
+Xe-\TeX\ only, previously in the Xe-\LaTeX\ format, but added via
+|xelatex.ini| not part of the core release.
+Allocates commands to use the Xe-\TeX\ character class mechanism.
+
+
+\subsection{e-\TeX\ tracing if available}
+|\loggingall| (Usually used via |\tracingall|) is extended to enable
+additional e-\TeX\ tracing if e-\TeX\ is available. (|\tracingall|
+extension has been available as part of the |etex| package previously).
+
+Also based on code from the |etex| package, a command |\tracingnone|
+is added to reverse the effects of |\tracingall| and turn off all primitive
+\TeX\ tracing. A new command |\hideoutput| has been added which resets the
+tracing parameters set by |\showoutput|.
+
+
+
+
+\subsection{\texttt{\textbackslash textsubscript} not defined in
+ latex.ltx (pr/3492)}
+
+\begin{verbatim}
+>>Number: 3492
+>>Category: latex
+>>Synopsis: \textsubscript not defined in latex.ltx
+>>Arrival-Date: Tue Jan 14 23:01:00 CET 2003
+>>Originator: Ionel Mugurel Ciobica
+
+I use \textsubscript much more often than \textsuperscript, and
+\textsubscript it is not defined in latex.ltx. Could you please
+consider including the definition of \textsubscript in the latex.ltx
+for the next versions of LaTeX. Thank you.
+\end{verbatim}
+
+\subsection{\texttt{\textbackslash @} discards spaces when moving
+ (pr/3039)}
+
+\begin{verbatim}
+>>Number: 3039
+>>Category: latex
+>>Synopsis: \@ discards spaces when moving
+>>Arrival-Date: Sat May 22 09:01:06 1999
+>>Originator: Donald Arseneau
+>>Description:
+The \@ command expands to \spacefactor\@m in auxiliary files,
+which then ignores following spaces when it is reprocessed.
+\end{verbatim}
+
+\subsection{1-col fig can come before earlier 2-col fig
+ (pr/2346)}
+
+\begin{verbatim}
+>>Number: 2346
+>>Category: latex
+>>Synopsis: 2-col: 1-col fig can come before earlier 2-col fig
+>>Arrival-Date: Wed Dec 18 15:41:07 1996
+>>Originator: bil kleb
+>>Description:
+as documented in Lamport's book, p. 198, concerning figure
+placement, "a figure will not be printed before an earlier
+figure, and a table will not be printed before an earlier
+table." however, there is a footnote stating, "However,
+in two-column page style, a single-column figure can come before
+an earlier double-column figure, and vice versa."
+
+This twocolumn behavior is undesirable---at least by me and
+most professional organizations i publish in. ed snyzter developed
+a hack fix for 2.09 several years ago which links the two
+counters, but i have not run across a similar "fix" for 2e...
+\end{verbatim}
+
+Originally fixed in package \Lpack{fix2col} which was merged into
+this package. Documentation and code from this package have been
+merged into this file.
+
+\subsubsection{Notes on the Implementation Strategy}
+
+The standard output routine maintains two lists of floats that have
+been `deferred' for later consideration. One list for single column
+floats, and one for double column floats (which are always
+immediately put onto their deferred list). This mechanism means
+that \LaTeX\ `knows' which type of float is contained in each box
+by the list that it is processing, but having two lists means
+that there is no mechanism for preserving the order between the
+floats in each list.
+
+The solution to this problem consists of two small changes to
+the output routine.
+
+Firstly, abandon the `double column float list' |\@dbldeferlist|
+and change every command where it is used so that instead the
+same |\@deferlist| is used as for single column floats.
+That one change ensures that double and single column floats
+stay in the same sequence, but as \LaTeX\ no longer `knows'
+whether a float is double or single column, it will happily
+insert a double float into a single column, overprinting the
+other column, or the margin.
+
+The second change is to provide an alternative mechanism for
+recording the two column floats. \LaTeX\ already has a compact
+mechanism for recording float information, an integer count register
+assigned to each float records information about the `type' of float
+`figure', `table' and the position information `htp' etc.
+
+The type information is stored in the `high' bits, one bit position
+(above `32') allocated to each float type. The `low' bits store
+information about the allowed positions, one bit each allocated for
+|h t b p|. In the \LaTeX2.09 system, the bit corresponding to `16'
+formed a `boundary' between these two sets of information, and it
+was never actually used by the system. Ed Sznyter's
+\Lpack{fixfloats} package not unreasonably used this position to
+store the double column information, setting the bit for double
+column floats. Then at each point in the output routine at which a
+float is committed to a certain region, an additional check must be
+made to check that the float is (or is not) double column. If it
+spans the wrong number of columns it is deferred rather than being
+added.
+
+Unfortunately the bit `16' is not available in \LaTeXe. It is used
+to encode the extra float position possibility `|!|' that was added
+in that system. It would be possible to use position `32' and to
+move the flags for `table', `figure',\ldots\ up one position, to
+start at 64, but this would mean that in principle one less float
+type would be supported, and more importantly is likely to break
+any other packages that assume anything about the output routine
+internals. So here I instead use another mechanism for flagging
+double column floats: By default all floats have depth 0pt.
+This package arranges that double column ones have depth 1sp.
+This information may then be used in the same manner as in
+the \Lpack{fixfloats} package, to defer any floats that are not of
+the correct column spanning type.
+
+
+
+\subsection{Infinite glue found (pr/4023 and pr/2346)}
+
+The fix for pr/2346 did not work as intended when used in conjunction
+with |\enlargethispage| as the latter introduced an infinite negative
+glue at the bottom of the page. That in turn make a |\vsplit|
+operation to get at the column marks invalid.
+
+\subsection{Wrong header for twocolumn (pr/2613)}
+
+\begin{verbatim}
+>>Number: 2613
+>>Category: latex
+>>Synopsis: wrong headline for twocolumn
+>>Arrival-Date: Mon Sep 22 16:41:09 1997
+>>Originator: Daniel Reischert
+>>Description:
+When setting the document in two columns
+the headline shows the top mark of the second column,
+but it should show the top mark of the first column.
+\end{verbatim}
+
+Originally fixed in package \Lpack{fix2col} which was merged into
+this package. Documentation and code from this package have been
+merged into this file.
+
+\subsubsection{Notes on the Implementation Strategy}
+
+The standard \LaTeX\ twocolumn system works internally by making
+each column a separate `page' that is passed independently to \TeX's
+page breaker. (Unlike say the \Lpack{multicol} package, where all
+columns are gathered together and then split into columns later,
+using |\vsplit|.) This means that the primitive \TeX\ marks that are
+normally used for header information, are globally reset after the
+first column. By default \LaTeX\ does nothing about this.
+A good solution is provided by Piet van Oostrum (building on earlier
+work of Joe Pallas) in his \Lpack{fixmarks} package.
+
+After the first column box has been collected the mark information
+for that box is saved, so that any |\firstmark| can be
+`artificially' used to set the page-level marks after the second
+column has been collected. (The second column |\firstmark| is not
+normally required.) Unfortunately \TeX\ does not provide a direct
+way of knowing if any marks are in the page, |\firstmark| always has a
+value from previous pages, even if there is no mark in this page.
+The solution is to make a copy of the box and then |\vsplit| it
+so that any marks show up as |\splitfirstmark|.
+
+The use of |\vsplit| does mean that the output routine will globally
+change the value of |\splitfirstmark| and
+|\splitbotmark|. The \Lpack{fixmarks} package goes to some trouble
+to save and restore these values so that the output routine does
+\emph{not} change the values. This part of \Lpack{fixmarks} is not
+copied here as it is quite costly (having to be run on every page) and
+there is no reason why anyone writing code using |\vsplit| should
+allow the output routine to be triggered before the split marks have
+been accessed.
+
+
+
+\subsection{\texttt{\textbackslash setlength} produces error if
+ used with registers like \texttt{\textbackslash dimen0} (pr/3066)}
+
+\begin{verbatim}
+>>Number: 3066
+>>Category: latex
+>>Synopsis: \setlength{\dimen0}{10pt}
+>>Arrival-Date: Tue Jul 6 15:01:06 1999
+>>Originator: Heiko Oberdiek
+>>Description:
+The current implementation of \setlength causes an error,
+because the length specification isn't terminated properly.
+More safe:
+\def\setlength#1#2{#1=#2\relax}
+\end{verbatim}
+
+\subsection{Fewer fragile commands}
+
+\begin{verbatim}
+>>Number: 3816
+>>Category: latex
+>>Synopsis: Argument of \@sect has an extra }.
+>>Arrival-Date: Sat Oct 22 23:11:01 +0200 2005
+>>Originator: Susanne Wunsch
+
+Use of a \raisebox in \section{} produces the error message
+mentioned in the subject.
+
+PR latex/1738 described a similar problem, which has been solved
+10 years ago. Protecting the \raisebox with \protect solved my
+problem as well, but wouldn't it make sense to have a similar fix
+as in the PR?
+
+It is particularly confusing, that an unprotected \raisebox in a
+\section*-environment works fine, while in a \section-environment
+produces error.
+\end{verbatim}
+
+While not technically a bug, in this day and age there are few
+reasons why commands taking optional arguments should not be robust.
+
+\subsubsection{Notes on the implementation strategy}
+
+Rather than changing the kernel macros to be robust, we have decided
+to add the macro \DescribeMacro{\MakeRobust}|\MakeRobust| in
+\Lpack{fixltx2e} so that users can easily turn fragile macros into
+robust ones. A macro |\foo| is made robust by doing the simple
+|\MakeRobust{\foo}|. \Lpack{fixltx2e} makes the following kernel
+macros robust: |\(|, |\)|, |\[|, |\]|,
+ |\makebox|, |\savebox|,
+|\framebox|, |\parbox|, |\rule| and |\raisebox|.
+
+\ldots TODO \ldots fleqn vesion of |\[\]|
+
+\subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
+
+\begin{verbatim}
+>>Number: 3073
+>>Category: latex
+>>Synopsis: \addpenalty ruins flush-bottom
+>>Arrival-Date: Sat Jul 17 05:11:05 1999
+>>Originator: Donald Arseneau
+>>Description:
+Just to keep in mind for further development eh?
+A page break at an \addpenalty after \vspace does *not*
+give a flush-bottom page. (The intent of \addpenalty is
+apparently just to preserve the flush bottom by putting
+the breakpoint `above' the skip.)
+\end{verbatim}
+
+\subsection{Within counters only reset next level down (pr4393)}
+
+This is actually implicitly documented behavior in the \LaTeX{}
+Manual that states that |\stepcounter| resets all counters marked
+``within''. However it means that if, for example, theorems are
+numbered within sections and you start a new chapter in a book, the
+section counter is reset to zero but the theorem counter is not
+until the first section appears. Thus a theorem directly within the
+chapter body (without a new section) would show an incremented
+number relative to the last theorem of the previous chapter.
+
+
+For this reason we are now resetting all levels of within in one go
+even if that means that some of these resets may happen several times
+unnecessarily.
+
+
+\subsection{Check the optional arguments of floats}
+
+By default LaTeX silently ignores unknown letters in the optional
+arguments of floats. |\begin{figure}[tB]| the |B| is ignored so it
+acts like |\begin{figure}[t]| However |\begin{figure}[B]| does
+\emph{not} act like |\begin{figure}[]| as the check for an empty
+argument, or unsupplied argument, is earlier. |[]| causes the
+default float placement to be used, but |[B]| means that \emph{no}
+float area is allowed and so the float will not be placed until the
+next |\clearpage| or end of document, no warning is given.
+
+This package adds a check on each letter, and if it not one of
+|!tbhp| then an error is given and the code acts as if |p| had been
+used, so that the float may be placed somewhere.
+
+\subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
+ (pr/3693)}
+
+\begin{verbatim}
+>>Number: 3693
+>>Category: latex
+>>Synopsis: \DeclareMathSizes only take pts.
+>>Arrival-Date: Fri Jun 11 16:21:00 CEST 2004
+>>Originator: Morten Hoegholm
+
+The last three arguments of \@DeclareMathSizes cannot take a dimension
+as argument, making it inconsistent with the rest of the font changing
+commands and itself, as the second argument can take a dimension
+specification.
+\end{verbatim}
+
+\subsection{No hyphenation in first word after float environment (pr/3498)}
+
+\begin{verbatim}
+>>Number: 3498
+>>Category: latex
+>>Synopsis: No hyphenation in first word after float environment
+>>Arrival-Date: Thu Jan 30 13:21:00 CET 2003
+>>Originator: Harald Harders
+
+If a float environment (figure, table) is written within a paragraph,
+the first word after the environment is not hyphenated.
+\end{verbatim}
+
+\subsection{\texttt{\textbackslash fnsymbol} should use text symbols
+ (pr/3400)}
+
+\begin{verbatim}
+>>Number: 3400
+>>Category: latex
+>>Synopsis: \fnsymbol should use text symbols if possible
+>>Arrival-Date: Fri Jan 04 20:41:00 CET 2002
+>>Originator: Walter Schmidt
+
+The \fnsymbol command can be used in both text and math
+mode. The symbols produced are, however, always taken from
+the math fonts. As a result, they may not match the text
+fonts, even if the symbols are actually available, for
+instance from the TS1 encoding. Since \fnsymbol is
+primarily used for footnotes in text, this should be fixed,
+IMO.
+\end{verbatim}
+
+
+
+
+
+\subsection{\texttt{\textbackslash footnotemark}[x] crashes with fixltx2e.sty
+ (pr/3752)}
+
+\begin{verbatim}
+>>Number: 3752
+>>Category: tools
+>>Synopsis: feature \footnotemark[x] crashes with fixltx2e.sty
+>>Arrival-Date: Fri Dec 17 10:11:00 +0100 2004
+>>Originator: Stefan Pofahl
+
+ If I use /fnsymbol together with fixltx2e.sty I can not use
+ optional parameter [num]
+ \footnotemark[1] is not showing the mark number 1 but
+ the mark \value{footnote}.
+\end{verbatim}
+This bug was related to pr/3400, where |\@fnsymbol| was made robust.
+
+\subsubsection{Notes on the implementation strategy}
+
+Pr/3400 made |\@fnsymbol| decide between text-mode and math-mode,
+which requires a certain level of robustness somewhere as the
+decision between text and math must be made at typesetting time and
+not when inside |\protected@edef| or similar commands. One way of
+dealing with this is to make sure the value seen by |\@fnsymbol| is
+a fully expanded number, which could be handled by code such as
+\begin{verbatim}
+\def\fnsymbol#1{\expandafter\@fnsymbol
+ \expandafter{\the\csname c@#1\endcsname}}
+\end{verbatim}
+This would be a good solution if everybody used the high level
+commands only by writing code like |\fnsymbol{footnote}|. Unfortunately
+many classes (including the standard classes) and packages use the
+internal forms directly as in |\@fnsymbol\c@footnote| so the easy
+solution of changing |\fnsymbol| would break code that had worked for
+the past 20~years.
+
+Therefore the implementation here makes |\@fnsymbol| itself a
+non-robust command again and instead uses a new robust command
+\DescribeMacro{\TextOrMath}|\TextOrMath|, which will take care of
+typesetting either the math or the text symbol. In order to do so,
+we face an age old problem and unsolvable problem in \TeX: A
+reliable test for math mode that doesn't destroy
+kerning. Fortunately this problem can be solved when using e\TeX\ so
+if you use this as engine for your \LaTeX\ format, as recommended by
+the \LaTeX3 Project, you will get a fully functioning |\TextOrMath|
+command with no side effects. If you use regular \TeX\ as engine for
+your \LaTeX\ format then we have to choose between the lesser of two
+evils: 1)~breaking ligatures and preventing kerning or 2)~face the
+risk of choosing text-mode at the beginning of an alignment cell,
+which was supposed to be math-mode. We have decided upon 1) as is
+customary for regular robust commands in \LaTeX.
+
+
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews.pdf b/macros/latex-dev/doc/ltnews.pdf
new file mode 100644
index 0000000000..4b8a3bcbed
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/ltnews.tex b/macros/latex-dev/doc/ltnews.tex
new file mode 100644
index 0000000000..d989ff8c42
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews.tex
@@ -0,0 +1,276 @@
+% \iffalse meta-comment
+%
+% Copyright 2006, 2009, 2011, 2014 Heiko Oberdiek
+% Copyright 2014-2018 The LaTeX3 Project
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% 2006/06/02 v1.0: First version.
+% 2009/09/25 v1.1: \usepackage disabled.
+% 2011/07/01 v1.2: Fixes.
+% 2014/02/30 v1.3:
+% * Update for LaTeX 2014/05/01.
+% * Fix for anchor positions of issue titles.
+% 2014/05/15 v1.4:
+% * Updates for ltnews21.tex.
+% 2014/11/14 v1.4a:
+% * LaTeX Project version
+% 2015/02/16 v1.4b:
+% * Fix TOC issue
+% \fi
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{ltnews.tex}%
+ [2015/02/16 v1.4b Master file for ltnews*.tex (LaTeX Project)]
+\providecommand*{\lastissue}{30}
+\InputIfFileExists{ltnews-lastissue.cfg}{}{}
+
+
+\ifx\pdfoutput\undefined
+\let\pdfoutput\outputmode
+\protected\def\pdfinfo{\pdfextension info }
+\fi
+
+\RequirePackage{ifpdf}
+\ifpdf
+ % overwrite nasty stuff of ltnews.cfg
+ % (use of hyperref for this would also support other drivers)
+ \pdfinfo{%
+ /Title(LaTeX News)%
+ /Subject(Issues 1--\lastissue)%
+ /Author(The LaTeX Project)%
+ /Creator(LaTeX)%
+ }
+ \newtoks\pdfinfo
+\else
+ \AtBeginDocument{%
+ \hypersetup{%
+ pdftitle={LaTeX News},%
+ pdfsubject={Issues 1\textendash\lastissue},%
+ pdfauthor={The LaTeX Project},%
+ pdfcreator={LaTeX}%
+ }%
+ }%
+\fi
+
+\RequirePackage{lmodern}
+\RequirePackage[T1]{fontenc}
+\RequirePackage{hologo}
+\RequirePackage{graphicx}
+
+
+\documentclass{ltnews}
+
+\RequirePackage{url,csquotes}
+
+\expandafter
+\DeclareRobustCommand\expandafter*\expandafter\small\expandafter{\small}
+
+\RequirePackage{hyperref}
+\hypersetup{colorlinks}
+\RequirePackage{bookmark}
+
+\makeatletter
+
+\newcounter{issue}
+\renewcommand*{\theissue}{%
+ \ifnum\value{issue}<10 0\fi
+ \number\value{issue}%
+}
+
+\newcommand*{\MonthJanuary}{01}
+\newcommand*{\MonthFebruary}{02}
+\newcommand*{\MonthMarch}{03}
+\newcommand*{\MonthApril}{04}
+\newcommand*{\MonthMay}{05}
+\newcommand*{\MonthJune}{06}
+\newcommand*{\MonthJuly}{07}
+\newcommand*{\MonthAugust}{08}
+\newcommand*{\MonthSeptember}{09}
+\newcommand*{\MonthOctober}{10}
+\newcommand*{\MonthNovember}{11}
+\newcommand*{\MonthDecember}{12}
+\newcommand*{\printissue}{%
+ Issue %
+ \texorpdfstring{\number\value{issue}}{\theissue}, %
+ \texorpdfstring{\@month\space\@year}{\@year/\@nameuse{Month\@month}}%
+}
+\let\l@part\l@section
+\let\l@section\l@subsection
+\let\l@subsection\l@subsubsection
+\let\l@subsubsection\l@paragraph
+\let\l@paragraph\l@subparagraph
+
+\newcommand*{\makefirsttitle}{%
+ \twocolumn[{%
+ \parbox[t][4\baselineskip]{\textwidth}{%
+ \@titlefont\@title, Issues 1--\lastissue
+ }%
+ }]%
+}
+
+% table of contents with underlined links
+\iffalse % disable if option colorlinks is used
+\@ifpackagelater{hyperref}{2006/06/01}{%
+ \newcommand*{\saved@tableofcontents}{}%
+ \let\saved@tableofcontents\tableofcontents
+ \renewcommand*{\tableofcontents}{%
+ \begingroup
+ \hypersetup{pdfborderstyle={/S/U/W 1}}%
+ \saved@tableofcontents
+ \endgroup
+ }%
+}{}
+\fi
+
+% -- provide command introduced in new release
+% so this typesets with an old format
+\DeclareTextCommandDefault\textcommabelow[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
+ \hbox{\check@mathfonts\fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+\DeclareTextCommandDefault\textcommaabove[1]{%
+ \hmode@bgroup
+ \ooalign{%
+ \hidewidth
+ \raise.7ex\hbox{%
+ \check@mathfonts\fontsize\ssf@size\z@\math@fontsfalse\selectfont`%
+ }%
+ \hidewidth\crcr
+ \null#1\crcr
+ }%
+ \egroup
+ }
+
+\makeatother
+
+\begin{document}
+
+%%% Title and Table of Contents
+
+\makefirsttitle
+\pdfbookmark[0]{\contentsname}{toc}
+\tableofcontents
+\clearpage
+
+%%% Issues
+
+\begingroup
+ \makeatletter
+ \renewcommand*{\usepackage}[2][]{%
+ \begingroup
+ \def\x{#1|#2}%
+ \def\y{T1|fontenc}%
+ \ifx\x\y
+ \else
+ \def\y{|lmodern,url}%
+ \ifx\x\y
+ \else
+ \def\y{|lmodern,url,hologo}%
+ \ifx\x\y
+ \else
+ \def\y{|csquotes}%
+ \ifx\x\y
+ \else
+ \def\y{|graphicx}%
+ \ifx\x\y
+ \else
+ \@latex@error{ltnews.tex: \string\usepackage[#1]{#2} found}\@ehc
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \endgroup
+ }%
+ \renewcommand*{\documentclass}[2][]{%
+ \setcounter{footnote}{0}%
+ \gobbleopt
+ }%
+ \newcommand*{\gobbleopt}[1][]{}%
+ \let\org@twocolumn\twocolumn
+ \renewenvironment{document}{%
+ \clearpage
+ \ifnum\@issue=20 %
+ \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
+ \addtocontents{toc}{%
+ \protect\makeatletter
+ }%
+ \addtocontents{toc}{%
+ \let\protect\saved@l@paragraph\protect\l@paragraph
+ }%
+ \addtocontents{toc}{%
+ \let\protect\l@paragraph\protect\l@subsection
+ }%
+ \fi
+ \ifnum\@issue=\lastissue\space
+ \addtocontents{toc}{%
+ \let\protect\l@paragraph\protect\saved@l@paragraph
+ }%
+ \def\toclevel@subsection{1}%
+ \def\toclevel@subsubsection{2}%
+ \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
+ \renewcommand*{\tableofcontents}{%
+ \section*{\contentsname}%
+ \@starttoc{toc\lastissue}%
+ }%
+ \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\lastissue}{##2}%
+ \fi
+ }%
+ \let\l@subsubsection\l@subsection
+ \let\l@subsection\l@section
+ \let\l@section\l@part
+ \let\l@part\@gobbletwo
+ \fi
+ \def\twocolumn[{%
+ \let\twocolumn\org@twocolumn
+ \org@twocolumn[%
+ {% because of optional argument of \twocolumn
+ \pdfbookmark[0]{\printissue}{issue\theissue}%
+ }%
+ \begingroup
+ \let\WriteBookmarks\relax
+ \@firstofone{% inside opt. arg. of \twocolumn: protect "]"
+ \renewcommand*{\Hy@writebookmark}[5]{}%
+ }%
+ \phantomsection
+ \addcontentsline{toc}{part}{\printissue}%
+ \endgroup
+ }%
+ }{%
+ \clearpage
+ }%
+ \makeatother
+ \loop
+ \ifnum\value{issue}<\lastissue
+ \stepcounter{issue}%
+ \input{ltnews\theissue}%
+ \repeat
+ \stepcounter{issue}%
+ \makeatletter
+ \IfFileExists{ltnews\theissue}{%
+ \@latex@error{\jobname.tex is out of date,\MessageBreak
+ there is `ltnews\theissue.tex'%
+ }\@ehc
+ }{}%
+ \makeatother
+\endgroup
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews01.tex b/macros/latex-dev/doc/ltnews01.tex
new file mode 100644
index 0000000000..92090e17d0
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews01.tex
@@ -0,0 +1,152 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews01.tex
+
+% This is issue 1 of LaTeX News.
+
+\documentclass
+% [type1fonts]
+ {ltnews}
+
+\publicationmonth{June}
+\publicationyear{1994}
+\publicationissue{1}
+
+\begin{document}
+
+\maketitle
+
+\section{Welcome to \LaTeXNews}
+
+An issue of \emph{\LaTeXNews} will accompany every future release of
+\LaTeX. It will tell you about important events, such as major bug
+fixes, newly available packages, or any other \LaTeX{} news.
+
+\section{\LaTeXe---the new \LaTeX{} release}
+
+The most important news is the release of \LaTeXe, the new version of
+the \LaTeX{} software. This version has better support for fonts,
+graphics and colour, and will be actively maintained by the \LaTeX3
+project team. Upgrades will be issued every six months, in June and
+December.
+
+\section{Why a new \LaTeX?}
+
+Over the years many extensions have been developed for \LaTeX. This
+is, of course, a sure sign of its continuing popularity but it has had
+one unfortunate result: incompatible \LaTeX{} formats came into use at
+different sites. Thus, to process documents from various places, a
+site maintainer was forced to keep \LaTeX{} (with and without \NFSS),
+\SLiTeX, \AmSLaTeX, and so on. In addition, when looking at a source
+file it was not always clear for which format the document was written.
+
+To put an end to this unsatisfactory
+situation a new release of \LaTeX{} was produced.
+It brings all such extensions back under a single format and thus
+prevents the proliferation of mutually incompatible dialects of
+\LaTeX~2.09. The new release was available for several months as a
+test version, and the final release of 1~June officially
+replaces the old version.
+
+\section{Processing documents with \LaTeXe}
+
+Documents written for \LaTeX~2.09 will
+still be read by \LaTeXe. Any such document is run in
+\emph{\LaTeX~2.09 compatibility mode}.
+
+Unfortunately, compatibility mode comes with a price: it can run
+up to 50\% slower than \LaTeX~2.09 did. If you want to run your document
+in the faster \emph{native mode}, you should try replacing the line:
+\begin{verbatim}
+ \documentstyle[<options>,<packages>]{<class>}
+\end{verbatim}
+with:
+\begin{verbatim}
+ \documentclass[<options>]{<class>}
+ \usepackage{latexsym,<packages>}
+\end{verbatim}
+Unfortunately, this will not always work, because some \LaTeX~2.09
+packages will only work in \LaTeXe{} compatibility mode. You should find
+out if there is a \LaTeXe{} version of the package available.
+
+\LaTeXe{} native mode also gives access to the new features of \LaTeXe,
+described in \emph{\LaTeXe{} for authors}.
+
+\section{New packages}
+
+\LaTeXe{} has much better support for graphics, colour, fonts, and
+multi-lingual typesetting. The following software should be available
+from the distributor who brought you \LaTeXe:
+
+\begin{citations}
+\item[babel] for typesetting in many languages.
+\item[color] for colour support.
+\item[graphics] for including images.
+\item[mfnfss] for using bitmap fonts.
+\item[psnfss] for using Type~1 fonts.
+\item[tools] other packages by the \LaTeX3 team.
+\end{citations}
+The packages come with full documentation, and are also described in
+\emph{\LaTeX: A Document Processing System} or
+\emph{The \LaTeX{} Companion}.
+
+\section{Further information}
+
+More information about \LaTeXe{} is to be found in:
+
+\begin{citations}
+\item[\LaTeX: A Document Preparation System]
+ Leslie Lamport, \AW, 2nd ed, 1994.
+\item[The \LaTeX{} Companion]
+ Goossens, Mittelbach and Samarin, \AW, 1994.
+\end{citations}
+The \LaTeX{} distribution comes with documentation on the new features of
+\LaTeX:
+
+\begin{citations}
+\item[\LaTeXe{} for authors]
+ describes the new features of \LaTeX{} documents,
+ in the file \verb|usrguide.tex|.
+\item[\LaTeXe{} for class and package writers]
+ describes the new features of \LaTeX{} classes and packages,
+ in the file \verb|clsguide.tex|.
+\item[\LaTeXe{} font selection]
+ describes the new features of \LaTeX{} fonts for
+ class and package writers,
+ in the file \verb|fntguide.tex|.
+\end{citations}
+For more information on \TeX{} and \LaTeX, get in touch with your local
+\TeX{} Users Group, or the international \TeX{} Users Group,
+P.~O.~Box~869, Santa~Barbara, CA~93102-0869, USA, Fax:~+1~805~963~8358,
+EMail:~tug@tug.org.
+
+\end{document}
+
+
+
diff --git a/macros/latex-dev/doc/ltnews02.tex b/macros/latex-dev/doc/ltnews02.tex
new file mode 100644
index 0000000000..d46cb1b52f
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews02.tex
@@ -0,0 +1,154 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews02.tex
+
+% This is issue 2 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+\publicationmonth{December}
+\publicationyear{1994}
+\publicationissue{2}
+
+\begin{document}
+
+\maketitle
+
+\section{Welcome to \LaTeXNews~2}
+
+An issue of \emph{\LaTeXNews} will accompany every future release of
+\LaTeX. It will tell you about important events, such as major bug
+fixes, newly available packages, or any other \LaTeX{} news.
+
+\section{December 1994 release of \LaTeX}
+
+December 1994 sees the second release of \LaTeXe. We are on schedule
+to deliver a release of \LaTeX{} every six months, in December and
+June.
+
+This release has seen quite a lot of activity, which is not too
+surprising as it's only been a year since the first test release of
+\LaTeXe. We don't expect so much activity in the next six months.
+
+Many of the changes are minor improvements and bug-fixes---see
+\emph{\LaTeXe{} for authors} (\verb|usrguide.tex|), \emph{\LaTeXe{}
+font selection} (\verb|fntguide.tex|) and our change log
+(\verb|changes.txt|) for more details.
+
+However, there are two important new packages available for \LaTeX:
+\texttt{inputenc} and AMS-\LaTeX.
+
+\section{Accented input}
+
+One of the problems with writing non-English documents in \LaTeX{} is
+the accent commands. Reading documents containing text like
+\verb|na\"\i ve| is frustrating, especially if your keyboard allows
+you to type \texttt{na\"\i ve}.
+
+In the past, \LaTeX{} has not supported input containing accented
+characters such as \texttt{\"\i}, because Windows, Macintosh and Unix
+all have different ways of dealing with accented input, called
+\emph{input encodings}.
+
+However, the \verb|inputenc| package allows you to specify which input
+encoding your document is written with, for example to use the ISO
+Latin-1 encoding, you type:
+\begin{verbatim}
+ \usepackage[latin1]{inputenc}
+\end{verbatim}
+At the moment, \verb|inputenc| supports the \verb|ascii| and
+\verb|latin1| input encodings, but more will be added with future
+releases.
+
+The \verb|inputenc| package is
+currently a test release. The user interface for the full release will
+be upwardly compatible with the test version.
+
+\section{AMS-\LaTeX{}}
+
+ AMS-\LaTeX{} is a set of miscellaneous extensions for \LaTeX{}
+ distributed by the American Mathematical Society. They provide superior
+ information structure and superior printed output for mathematical
+ documents.
+
+ There are far too many features of AMS-\LaTeX{} to list here.
+ AMS-\LaTeX{} is described in the accompanying documentation,
+ and in \emph{The \LaTeX{} Companion}.
+
+ Version 1.2beta of AMS-\LaTeX{} was released for testing by intrepid
+ users in October 1994. The full release of AMS-\LaTeX{}~1.2 is expected
+ in early January 1995.
+
+ It will be divided into two bundles:
+ \begin{itemize}
+
+ \item the \verb|amsfonts| packages, which give access to
+ hundreds of new mathematical symbols, and new math fonts
+ such as blackboard bold and fraktur.
+
+ \item the \verb|amsmath| packages, which provide finer control over
+ mathematical typesetting, such as multi-line subscripts,
+ enhanced theorem and proof environments,
+ and improved displayed equations,
+
+ \end{itemize}
+ For compatibility with older documents, an \verb|amstex| package will be
+ provided.
+
+\section{\LaTeX{} on the internet}
+
+\LaTeX{} has its own home page on the World Wide Web, with the URL:
+\begin{verbatim}
+ http://www.tex.ac.uk/CTAN/latex/
+\end{verbatim}
+This page describes \LaTeX{} and the \LaTeX3 project, and contains
+pointers to other \LaTeX{} resources, such as the user guides, the
+\TeX{} Frequently Asked Questions, and the \LaTeX{} bugs database.
+
+The electronic home of anything \TeX-related is the Comprehensive
+\TeX{} Archive Network (CTAN). This is a network of cooperating ftp
+sites, with over a gigabyte of \TeX{} material:
+\begin{verbatim}
+ ftp://ftp.tex.ac.uk/tex-archive/
+ ftp://ftp.shsu.edu/tex-archive/
+ ftp://ftp.dante.de/tex-archive/
+\end{verbatim}
+For more information, see the \LaTeX{} home page.
+
+\section{Further information}
+
+For more information on \TeX{} and \LaTeX, get in touch with your local
+\TeX{} Users Group, or the international \TeX{} Users Group,
+P.~O.~Box~869, Santa~Barbara, CA~93102-0869, USA, Fax:~+1~805~963~8358,
+EMail:~tug@tug.org.
+
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews03.tex b/macros/latex-dev/doc/ltnews03.tex
new file mode 100644
index 0000000000..d7c8ff0b20
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews03.tex
@@ -0,0 +1,145 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews03.tex
+
+% This is issue 3 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+\publicationmonth{June}
+\publicationyear{1995}
+\publicationissue{3}
+
+\begin{document}
+
+\maketitle
+
+\section{Welcome to \LaTeXNews~3}
+
+An issue of \emph{\LaTeXNews} will accompany every future release of
+\LaTeX. It will tell you about important events, such as major bug
+fixes, newly available packages, or any other \LaTeX{} news.
+
+\section{June 1995 release of \LaTeX}
+
+June 1995 sees the third release of \LaTeXe. We are on schedule
+to deliver a release of \LaTeX{} every six months, in December and
+June.
+
+In the last \emph{\LaTeXNews}, we said ``we don't expect so much
+activity in the next six months,'' which has turned out not to be
+true!
+
+\section{Additional input encodings}
+
+In the last release of \LaTeX{} we distributed a test version of the
+\texttt{inputenc} package which allows the use of input characters
+other than just a--z and A--Z. The package has proved to be robust,
+so we are now distributing an expanded version.
+The new release comes with a number of input encodings:
+
+\begin{itemize}
+\item \texttt{ascii} the standard encoding,
+\item \texttt{latin1} the ISO Western European alphabet,
+\item \texttt{latin2} the ISO Eastern European alphabet,
+\item \texttt{cp437} the IBM codepage 437,
+\item \texttt{cp850} the IBM codepage 850, and
+\item \texttt{applemac} the Apple Macintosh encoding.
+\end{itemize}
+These can be used by specifying an option to the \texttt{inputenc}
+package, for example:
+\begin{verbatim}
+ \usepackage[latin1]{inputenc}
+\end{verbatim}
+The new input encodings are currently being tested, but we don't
+expect any major changes.
+
+\section{\LaTeX\ getting smaller}
+
+In the past releases of \LaTeXe, the amount of memory \LaTeX{}
+requires has increased, but we are pleased to say that this trend has
+been reversed. We hope that future releases of \LaTeX{} will continue
+to get smaller.
+
+For example, on this document, the December 1994 release used 52,622
+words of memory, and the June 1995 release uses 51,216 words of
+memory, which is a 2.7\% reduction.
+
+We are currently experimenting with other ways of reducing the size of
+\LaTeX. For example, we are experimenting with an option to remove
+the \texttt{picture} and \texttt{tabbing} environments from the
+\LaTeX{} kernel, and to load them from a file the first time they are
+used. This should help \LaTeX{} to run on machines with limited
+memory. See \texttt{autoload.txt} for details.
+
+\section{Distribution and modification}
+
+One topic of discussion that has kept us busy is the distribution and
+modification conditions of \LaTeX. We are committed to keeping
+\LaTeX{} as free reliable software, and ensuring that (as far as
+possible) \LaTeX{} documents will produce the same results on all
+systems.
+
+The modification conditions are currently under discussion, and we
+would like to hear from anyone interested. Please read
+\texttt{modguide.tex} for more information.
+
+\section{AMS-\LaTeX\ full release}
+
+The AMS-\LaTeX\ packages were still in beta test in the December 1994
+release of \LaTeX, and the full release came out in January 1995.
+
+AMS-\LaTeX\ is described in the \emph{User's Guide}
+(\texttt{amsldoc.tex}) and in \emph{The \LaTeX{} Companion}.
+
+\section{PostScript fonts}
+
+There is a new test release of the PSNFSS packages for accessing
+PostScript fonts in \LaTeXe. This includes an update to all of the
+fonts, to remove many of the underfull and overfull \verb|\hbox|
+warnings, and improve the setting of non-English languages.
+
+The new release of \LaTeX{} removes all of the `hidden' uses of
+Computer Modern mathematics. For example, the footnote markers used
+to use math mode, so always used Computer Modern digits rather than
+ones from the current text font. This has now been fixed.
+
+\section{Further information}
+
+For more information on \TeX{} and \LaTeX, get in touch with your local
+\TeX{} Users Group, or the international \TeX{} Users Group,
+P.~O.~Box~869, Santa~Barbara, CA~93102-0869, USA, Fax:~+1~805~963~8358,
+EMail:~tug@tug.org.
+
+The \LaTeX{} home page is \verb|http://www.tex.ac.uk/ctan/latex/|
+and contains links to other WWW resources for \LaTeX.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews04.tex b/macros/latex-dev/doc/ltnews04.tex
new file mode 100644
index 0000000000..15e9599952
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews04.tex
@@ -0,0 +1,143 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews04.tex
+
+% This is issue 4 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+
+\publicationmonth{December}
+\publicationyear{1995}
+\publicationissue{4}
+
+\begin{document}
+
+\maketitle
+
+\section{Welcome to \LaTeXNews~4}
+
+An issue of \emph{\LaTeXNews} will accompany every future release of
+\LaTeX. It will tell you about important events, such as major bug
+fixes, newly available packages, or any other \LaTeX{} news.
+This issue accompanies the fourth release of \LaTeXe.
+
+
+\section{\LaTeX\ getting smaller}
+
+The last release in June started a trend of \LaTeX\ becoming
+smaller, we are pleased to announce that this has continued with this
+release. In particular the experimental `autoload' version described in
+\texttt{autoload.txt} is much smaller as more parts of \LaTeX\ are
+autoloaded.
+
+\section{New `concurrent' docstrip}
+
+The time taken to `unpack' this release from the documented sources
+should be much reduced (roughly half the time, depending on
+installation conditions). This is due to an improved version of the
+docstrip program that has been contributed by Marcin Woli\'nski.
+This can write up to 16 files at once. The
+previous version could only write one file at a time which meant that
+it was very slow when producing many small files from the same source
+file as the source needed to be re-read for each file written.
+
+\section{New T1 encoded fonts}
+
+This year J\"org Knappen has completed a new release of the `Cork'
+(T1) encoded Computer Modern fonts: the dc fonts release 1.2.
+
+This release of the dc fonts fixes many bugs (including the missing
+\verb|?`| (?`) and \verb|!`| (!`) ligatures) and improves the fonts in
+many other ways. It is strongly recommended that you upgrade as soon as
+possible if currently you are using the old dc fonts, release 1.1 or
+earlier. The new fonts are available from the CTAN archives, in
+\texttt{tex-archive/fonts/dc}.
+
+The names of the font files are \emph{different}. This does not affect
+\LaTeX\ documents but \emph{does} affect the installation procedure as
+it assumes that you have the \emph{new} fonts, and will write suitable
+`fd' files for those fonts. If you have not yet upgraded your dc fonts
+then, after unpacking the distribution, you \emph{must}
+\verb|latex olddc.ins| to produce `fd' files for the old dc fonts.
+This must be done \emph{before} the format is made. Running the test
+document at \texttt{ltxcheck.tex} the end of the installation will
+inform you if the wrong set of `fd' files has been installed.
+
+Note that this change does not affect the standard `OT1' Computer
+Modern fonts that \LaTeX\ uses by default.
+
+\section{More robust commands}
+
+The commands \verb|\cite| and \verb|\sqrt| are now robust.
+
+Although most commands with optional arguments are fragile, as
+documented, such commands defined using the second optional argument
+of \verb|\newcommand| and its derivatives are now \emph{robust}.
+
+\section{New Interface to building `extension' classes}
+
+The mechanism provided by \verb|\DeclareOption|, \verb|\ProcessOptions|
+and \verb|\LoadClass| has proved to be a powerful and expressive means
+of defining one class in terms of another `base' class. However there
+have been some requests to simplify the declaration of the common case
+where you want the `base' class to be called with \emph{all} the
+options that were specified to the extension class. This is now
+provided by the new command \verb|\LoadClassWithOptions|. A similar
+command \verb|\RequirePackageWithOptions| is provided for package use.
+More details of this feature are provided in \texttt{clsguide.tex} and
+\texttt{ltclass.dtx}.
+
+\section{More Input Encodings}
+
+The experimental \texttt{inputenc} package allows a more natural style
+of input of accented and other characters.
+
+Three new input encodings are now supported.
+\begin{itemize}
+\item \texttt{ansinew} the Windows ansi encoding,
+ as used in Microsoft Windows 3.x.
+\item \texttt{cp437de} a variant of \texttt{cp437}, which uses \ss\
+ rather than $\beta$ in the appropriate slot.
+\item \texttt{next} the encoding used on Next computers.
+\end{itemize}
+
+\section{Further information}
+
+For more information on \TeX{} and \LaTeX, get in touch with your local
+\TeX{} Users Group, or the international \TeX{} Users Group,
+1850 Union Street, \#1637, San Francisco, CA~94123, USA,
+Fax:~+1~415~982~8559,
+EMail:~tug@tug.org.
+The \LaTeX{} home page is \verb|http://www.tex.ac.uk/ctan/latex/|
+and contains links to other WWW resources for \LaTeX.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews05.tex b/macros/latex-dev/doc/ltnews05.tex
new file mode 100644
index 0000000000..9416f0e4ed
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews05.tex
@@ -0,0 +1,158 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews05.tex
+
+% This is issue 5 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{June}
+\publicationyear{1996}
+\publicationissue{5}
+
+\begin{document}
+
+\maketitle
+
+\section{Welcome to \LaTeXNews~5}
+This issue of \emph{\LaTeXNews} accompanies the fifth release of the
+new standard \LaTeX{}, \LaTeXe.
+
+\section{Extra possibilities for section headings}
+Most \LaTeX\ sectioning commands are defined using
+\verb|\@startsection|.
+For example, the \textsf{article} class defines:
+\begin{small}
+\begin{verbatim}
+\newcommand\section{\@startsection
+ {section}{1}{0pt}{-3.5ex plus-1ex minus-.2ex}%
+ {2.3ex plus.2ex}{\normalfont\Large\bfseries}}
+\end{verbatim}
+\end{small}
+The last argument specifies the style in which the section heading is
+to be typeset.
+
+The new feature added at this release is that at the \emph{end} of
+this argument you may specify a command that \emph{takes an argument}.
+This command will be applied to the section number and heading.
+For example, one could use the \verb|\MakeUppercase| command to
+produce uppercase headings. A package or class file could contain:
+\begin{small}
+\begin{verbatim}
+\renewcommand\section{\@startsection
+ {section}{1}{0pt}{-3.5ex plus-1ex minus-.2ex}%
+ {2.3ex plus.2ex}{\normalfont\Large\MakeUppercase}}
+\end{verbatim}
+\end{small}
+to produce section headings using uppercase medium weight text, rather
+than the bold text used by \textsf{article}. Note that, like the font
+choice, the uppercasing applies only to the actual heading (including
+any automatically generated section number), not to the text as it may
+appear in the running head or table of contents.
+
+\section{The `openany' option in the `book' class}
+The \textsf{openany} option allows chapter and similar openings to
+occur on left hand pages. Previously this option only affected
+\verb|\chapter| and \verb|\backmatter|. It now also affects
+\verb|\part|, \verb|\frontmatter| and \verb|\mainmatter|.
+
+\section{More font (output) encodings}
+The font encoding name \texttt{T3} has been allocated to the encoding
+used in the new 256-character \textsc{IPA} fonts (for the phonetic
+alphabet) produced by Rei Fukui. His package, \textsf{tipa},
+gives access to these fonts and should soon be available. (The
+encoding named \texttt{OT3} is the 128-character encoding used in the
+\textsc{IPA} fonts produced by Washington State University.)
+
+
+
+\section{More input encodings supported}
+The \textsf{inputenc} package now supports the IBM codepage~852 used
+in Eastern Europe, with the option~\texttt{[cp852]} contributed by
+Petr~Sojka.
+
+Also, the \textsf{inputenc} package now activates most `control codes'
+with \textsc{ascii} values below 32.
+Currently none of the encodings in the standard distribution makes use
+of these positions.
+
+\section{Fixes and improvements}
+The \LaTeX\ kernel has only had minor changes, apart from
+\verb|\@startsection| mentioned above.
+However, some small fixes have been incorporated removing the
+following problems:
+
+\begin{itemize}
+\item
+ In tabular and array, previous versions of \LaTeX\ `lost' the
+ inter-column space from an `\texttt{l}'-column, when that column
+ was completely empty.
+
+\item
+ Previously, the use of the \verb|\nofiles| command could change
+ the \emph{vertical spacing} in a document.\\ A side effect of fixing
+ this is that when \verb|\nofiles| is used, \verb|\label| puts a
+ blank line in the log file.
+
+\item
+ \LaTeX~often loads fonts `on demand'. Previously, this could
+ happen inside the argument of an accent command and this would
+ cause the accent to appear in the wrong place.
+
+\end{itemize}
+
+\section{Changes to the `tools' packages}
+
+\begin{itemize}
+\item
+ The \textsf{longtable} package now uses a modified algorithm,
+ contributed by David Kastrup, to align the `chunks' of a table.
+ It is now unnecessary to edit the document to add
+ \verb|\setlongtables| before the final run of \LaTeX.
+ In certain cases of overlapping \verb|\multicolumn| entries, the new
+ algorithm will produce better column widths than the old (at the
+ price of extra passes through \LaTeX).
+
+\item
+ The \textsf{dcolumn} package now has the extra possibility of
+ specifying the number of digits both \emph{before} and after the
+ `decimal point'. This makes it easy to centre the column of numbers
+ under a wide heading.
+\end{itemize}
+
+\section{New copy of the \LaTeX\ bug database}
+\verb|http://www.tex.ac.uk/ctan/latex/bugs.html| will soon have links
+to a copy of the searchable \LaTeX\ bugs database at Mainz (Germany)
+as well as the original copy at Sussex (England).
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews06.tex b/macros/latex-dev/doc/ltnews06.tex
new file mode 100644
index 0000000000..b5c7a28a24
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews06.tex
@@ -0,0 +1,149 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews06.tex
+
+% This is issue 6 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{December}
+\publicationyear{1996}
+\publicationissue{6}
+
+\begin{document}
+
+\maketitle
+
+\section{Welcome to \LaTeXNews~6}
+This issue of \emph{\LaTeXNews} accompanies the sixth release of the
+new standard \LaTeX{}, \LaTeXe.
+
+\section{Mono-case file names}
+Previously \LaTeX\ has used some files with `mixed-case' file names
+such as \texttt{T1cmr.fd} and \texttt{T1enc.def}.
+
+These file names cause problems on some systems (in particular they
+are illegal on the ISO 9660 CDROM format) and so in this release
+all file names have been made lowercase (for example
+\texttt{t1cmr.fd} and \texttt{t1enc.def}).
+
+This change should \emph{not} affect any document. Within \LaTeX,
+encodings still have the usual uppercase names in uses such as
+\verb|\usepackage[T1]{fontenc}| and \verb|\fontencoding{T1}|.
+\LaTeX\ will automatically convert to the lowercase form while
+constructing the file name.
+\LaTeX\ will input the `fd' file under the old name if it fails to
+find the file with the new name, so existing collections of fd files
+should still work with this new release.
+
+The change \emph{does} affect the configuration files that may be used
+to make the \LaTeX\ format with initex. For example, the file
+\texttt{fonttext.ltx} previously specified \verb|\input{T1cmr.fd}|.
+It now has \verb|\input{t1cmr.fd}|.
+If you use a local file \texttt{fonttext.cfg}
+you will need to make similar changes, as \verb|\input{T1cmr.fd}|
+will not work as \texttt{T1cmr.fd} is no longer in the distribution.
+
+The files affected by this change all have names of the form
+\verb|*.fd| or \verb|*enc.def|.
+
+\section{Another input encoding}
+Thanks to work by S\o ren Sandmann, the \textsf{inputenc} package now
+supports the IBM codepage~865 used in Scandinavia.
+
+\section{Better user-defined math display environments}
+Suppose that you want to define an environment for displaying text
+that is numbered as an equation. A straightforward way to do this is
+as follows:
+\begin{verbatim}
+ \newenvironment{texteqn}
+ {\begin{equation}
+ \begin{minipage}{0.9\linewidth}}
+ {\end{minipage}
+ \end{equation}}
+\end{verbatim}
+However, if you have tried this then you will probably have noticed
+that it does not work perfectly when used in the middle of a paragraph
+because an inter-word space appears at the beginning of the first
+line after the environment.
+
+There is now an extra command (with a very long name) available that
+you can use to avoid this problem; it should be inserted as shown here:
+\begin{verbatim}
+ \newenvironment{texteqn}
+ {\begin{equation}
+ \begin{minipage}{0.9\linewidth}}
+ {\end{minipage}
+ \end{equation}
+ \ignorespacesafterend}
+\end{verbatim}
+
+\section{Docstrip improvements}
+The \textsf{docstrip} program that is used to unpack the \LaTeX\
+sources has undergone further development. The new version should be
+able to process all old `batchfiles' but it allows a simpler syntax in
+new `batchfiles' (no need to define \verb|\def\batchfile{|\ldots).
+
+It also allows `target' directories to be specified when writing
+files. This directory support is disabled by default unless activated
+in a local \texttt{docstrip.cfg} configuration file.
+See \texttt{docstrip.dtx} for details.
+
+\section{AMS \LaTeX\ update}
+Since the last \LaTeX\ release in June, the American Mathematical
+Society have re-issued the `AMS\LaTeX' classes and packages, fixing
+several reported problems.
+
+\section{Graphics package update}
+The \LaTeX\ color and graphics packages have been updated slightly,
+principally to support more dvi drivers, see the readme file in the
+\textsf{graphics} distribution.
+
+\section{EC Fonts released}
+The first release of the Extended Computer Modern fonts has just been
+made. (In January 1997.)
+
+This release of \LaTeX\ does \emph{not} default to these `ec' fonts
+as its T1 encoded fonts. By default it will
+use the `dc' fonts if the T1 encoding is requested.
+
+As noted in \texttt{install.txt} you may run \TeX\ on the install file
+\texttt{ec.ins} \emph{after} unpacking the base distribution but
+\emph{before} making the \LaTeX\ format. This will produce
+suitable `fd' files making \LaTeX\ (including, for the first time, the
+\textsf{slides} class) use the `ec' fonts as the default T1 encoded
+font set.
+
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltnews07.tex b/macros/latex-dev/doc/ltnews07.tex
new file mode 100644
index 0000000000..81d0ed3143
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews07.tex
@@ -0,0 +1,146 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews07.tex
+
+% This is issue 7 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{June}
+\publicationyear{1997}
+\publicationissue{7}
+
+\begin{document}
+
+\maketitle
+
+\section{T1 encoded Computer Modern fonts}
+As in the last release the base \LaTeX\ distribution contains
+three different sets of `fd' files for T1 encoded fonts.
+
+In this release the default installation uses \texttt{ec.ins}
+and so installs files suitable for the current `EC fonts'
+distribution. If you have still not updated to the EC fonts and
+are using the earlier test versions, known as DC then you should
+unpack \texttt{newdc.ins} (for DC release 1.2 or later) or
+\texttt{olddc.ins} (for the original releases of the DC fonts).
+This should be done after unpacking \texttt{unpack.ins} but
+before making the format by running ini\TeX{} on \texttt{latex.ltx}.
+There are further details in \texttt{install.txt}.
+
+
+\section{T1 encoded Concrete fonts}
+The Metafont sources for T1 encoded `Concrete' fonts have been
+removed from the \textsf{mfnss} distribution as they were based
+on the now obsolete DC fonts release 1.1. Similarly the
+\textsf{cmextra.ins} install file in the \textsf{base} distribution no
+longer generates fd files for the `Concrete' fonts.
+To use these fonts in either T1 or OT1 encoding it is
+recommended that you obtain Walter Schmidt's \textsf{ccfonts} package
+and fonts from CTAN \texttt{macros/latex/contrib/supported/ccfonts}.
+
+
+\section{Further input encodings}
+Two more \textsf{inputenc} packages have been added: for latin5,
+thanks to H. Turgut Uyar; and for latin3, thanks to J\"org Knappen.
+
+
+\section{Normalising spacing after punctuation}
+The command \verb|\normalsfcodes| was introduced at the last patch
+release. This is normally given the correct definition automatically
+and so need not be explicitly set. It is used to correct a problem,
+reported by Donald Arseneau, that punctuation in page headers has
+always (in all known \TeX\ formats) been potentially incorrect if the
+page break happens while a local setting of the space codes (for
+instance by the command \verb|\frenchspacing|) is in effect. A common
+example of this happening in \LaTeX\ is in the \textsf{verbatim}
+environment.
+
+
+\section{Accessing Bold Math Symbols}
+The \textsf{tools} distribution contains a new package, \textsf{bm},
+which defines a command \verb|\bm| that allows individual bold symbols
+to be accessed within a math expression (in contrast to
+\verb|\boldmath| which makes whole math expressions default to bold
+fonts). It is more general than the existing \textsf{amsbsy} package;
+however, to ease the translation of documents between these two
+packages, \textsf{bm} makes \verb|\boldsymbol| an alias for
+\verb|\bm|.
+
+This package was previously made available from the `contrib' area of
+the CTAN archives, and as part of Y\&Y's \LaTeX\ support for the
+MathTime fonts.
+
+
+\section{Policy on standard classes}
+
+Many of the problem reports we receive concerning the standard classes
+are not concerned with bugs but are suggesting, more or less politely,
+that the design decisions embodied in them are `not optimal' and
+asking us to modify them.
+
+There are several reasons why we have decided not to make such changes
+to these files.
+\begin{itemize}
+\item
+ However misguided, the current behaviour is clearly what was
+ intended when these classes were designed.
+\item
+ It is not good practice to change such aspects of `standard classes'
+ because many people will be relying on them.
+\end{itemize}
+
+We have therefore decided not to even consider making such
+modifications, nor to spend time justifying that decision. This does
+not mean that we do not agree that there are many deficiencies in the
+design of these classes, but we have many tasks with higher priority
+than continually explaining why the standard classes for \LaTeX{}
+cannot be changed.
+
+We would, of course, welcome the production of better classes, or of
+packages that can be used to enhance these classes.
+
+
+\section{New addresses for TUG}
+For information about joining the \TeX{} Users Group, and about lots
+of other \LaTeX-related matters, please contact
+them at their new address:
+\begin{quote}\small
+ \TeX{} Users Group, P.O. Box 1239,\\
+ Three Rivers, CA~93271-1239, USA\\
+ Fax:~+1~209~561~4584\\
+ E-mail: \texttt{tug@mail.tug.org}\\
+ URL: \texttt{http://www.tug.org/}
+\end{quote}
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews08.tex b/macros/latex-dev/doc/ltnews08.tex
new file mode 100644
index 0000000000..b43c4f53f9
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews08.tex
@@ -0,0 +1,154 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews08.tex
+
+% This is issue 8 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{December}
+\publicationyear{1997}
+\publicationissue{8}
+
+\begin{document}
+
+\maketitle
+
+\section{New supported font encodings}
+
+Two new font encodings are supported as options to the \textsf{fontenc}
+package:
+\begin{description}
+\item [OT4]
+This is a seven-bit encoding designed for Polish. The \LaTeX\ support
+was developed by Mariusz Olko.
+\item [TS1] This is the `Text Companion Encoding'; it contains symbols
+designed to be used in text, as opposed to mathematical formulas, and
+some accents designed for uppercase letters. It is currently
+supported by the `tc' fonts, which match the T1 encoded `ec' text
+fonts. A subset of the glyphs in this encoding is supported by
+virtual fonts distributed with the PostScript font metrics on the
+\textsc{ctan} archives. (This is the `8c' encoding in Karl Berry's
+fontname scheme.) The \textsf{textcomp} package provides access to
+this encoding but here is a warning to current users of that package:
+some of the internal names for the characters have changed.
+\end{description}
+
+
+\section{New input encodings}
+
+These additions to the \textsf{inputenc} package are
+\texttt{decmulti} (the DEC Multinational
+Character Set, contributed by M.~Y.~Chartoire)
+and \texttt{cp1250} (an MS-Windows encoding for Central and Eastern
+Europe, contributed by Marcin Woli\'nski). There is also a
+\texttt{cp1252} encoding that is identical to \texttt{ansinew}.
+
+
+\section{Tools}
+
+The \textsf{calc} package (used in many examples in \emph{The \LaTeX\
+Companion}) has been contributed to this distribution by Kresten Krab
+Thorup and Frank Jensen. This is essentially the same as the version
+that has been available from the \textsc{ctan} archives for some time,
+with one minor change: to use \LaTeX-style error messages. It enables
+the use of arithmetic expressions within arguments to standard
+\LaTeX{} commands where a length or a counter value is required. For
+example:
+\begin{verbatim}
+ \setcounter {page} { \value{page} * 2 + 1 }
+ \parbox { 3in - ( 2mm + \textwidth / 9 ) }
+\end{verbatim}
+
+There have also been some improvements to several other packages in
+this collection. In particular, \textsf{bm} now works correctly with
+constructions such as \verb|\bm{f'}| involving \texttt{'} or other
+characters which use \TeX's special ``\verb|\mathcode"8000|''
+feature. Also, \textsf{multicol} sets the length \verb|\columnwidth|
+to an appropriate value; this enables it to work with classes that
+support two-column setting, e.g.,~the AMS classes.
+
+
+\section{Graphics}
+
+The special \verb|oztex.def| driver file has been removed, and Oz\TeX\
+support has been merged with dvips, following advice from
+Andrew Trevorrow about Oz\TeX~3.x.
+
+The \textsf{keyval} package has had some internal improvements: to
+use \LaTeX\ format error messages; and to avoid `\verb|#| doubling'.
+This latter change means that the \verb|command| key for the
+\textsf{graphicx} version of \verb|\includegraphics| should now be used
+with one \verb|#| rather than two. For example, \verb|command = `gunzip #1|.
+Fortunately this key is almost never used in practice, so few if any
+documents should be affected by this change.
+
+
+\section{\LaTeX3 experimental programming conventions}
+
+As announced at the \TeX\ Users Group meeting (Summer 1997), a group of
+highly experimental packages will soon be released to allow experienced\\
+\TeX\ programmers to experiment with, and comment on, a proposed set
+of syntax conventions and basic data-types that might form
+the basis for programming large scale projects in \TeX.
+They will be located in\\
+this CTAN directory:
+\begin{verbatim}
+ CTAN:macros/latex/packages/expl3
+\end{verbatim}
+The documentation of this material is as follows: individual package
+files provide outline, draft documentation; there is an article that
+gives an overview of the syntax and related concepts; there is a
+\texttt{readme.txt} file containing a brief description of the
+collection.
+
+All aspects of these packages are liable, indeed likely, to change.
+They should not be used at this stage for anything
+that requires a stable system. However, we do encourage people to
+experiment with these packages, and to send comments on them to the
+\texttt{LaTeX-L} mailing list.
+To subscribe to this list, mail to:
+\begin{verbatim}
+ listserv@urz.uni-heidelberg.de
+\end{verbatim}
+the following one line message:
+\begin{verbatim}
+ subscribe LATEX-L <<first-name>> <<second-name>>
+\end{verbatim}
+
+% Revert to this if gets too full.
+% See \texttt{modguide.tex} for
+% information on how to subscribe to \texttt{LaTeX-L}.
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltnews09.tex b/macros/latex-dev/doc/ltnews09.tex
new file mode 100644
index 0000000000..c4f8b43ec8
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews09.tex
@@ -0,0 +1,142 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews09.tex
+
+% This is issue 9 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}[1999/02/23]
+
+%\usepackage[T1]{fontenc}
+
+\publicationmonth{June}
+\publicationyear{1998}
+\publicationissue{9}
+
+\begin{document}
+
+\maketitle
+
+
+\section{New math font encodings}
+
+A joint working group of the \TeX{} Users Group and the \LaTeX3
+Project is developing a new 8-bit math font encoding for \TeX{}.
+It is designed to overcome several limitations and implementation
+problems of the old math font encodings and to simplify switching
+between different sets of math fonts, much as the \LaTeX{} font
+selection interface has simplified switching between text fonts.
+
+Since the work on this project relies entirely on volunteer work, we
+cannot give a specific release date yet. However, a prototype
+implementation already exists. This contains several sets of virtual
+fonts, some \LaTeX{} packages and a kernel module; we hope to
+integrate it into the main \LaTeX{} distribution for the next
+release.
+
+Documents using only standard \LaTeX{} commands for math symbols
+should not be affected by switching to the new math font encodings
+However, documents, classes or packages making specific assumptions
+about the encoding of math symbol fonts are likely to break.
+
+Further information about the Math Font Group may be found on
+the World Wide Web at \texttt{http://www.tug.org/twg/mfg/}.
+
+
+\section{A new math accent}
+
+A new math accent, \verb|\mathring|, has been added. This is a math mode
+version of the ring accent (\r{}) which is available in text
+mode with the command \verb|\r|.
+
+\section{Extended \cs{DeclareMathDelimiter}}
+
+The command \verb|\DeclareMathDelimiter| has been extended.
+Normally this command takes six arguments. Previously, when being used
+to declare a character (such as \texttt{[}) as a delimiter, a variant
+form was used with only five arguments. The argument specifying the
+default `math class' was omitted. Now the full six-argument form may be
+used in this case. The extra information is used to implicitly declare
+the character via \verb|\DeclareMathSymbol| for use when the symbol is
+not used with \verb|\left| or \verb|\right|.
+
+The old five-argument form is detected and will work as before.
+
+\newpage
+
+\section{Tools distribution}
+
+The \texttt{multicol} package now supports the production of multiple
+columns without balancing the last page. To get this effect use the
+\texttt{multicols*} environment.
+
+The \texttt{layout} package was partly recoded by Hideo Umeki to
+display page layout effects in a better way.
+
+As suggested by Donald Arseneau, the \texttt{calc} package was extended
+to support the new commands \verb|\widthof{<text>}|,
+\verb|\heightof{<text>}|, and \verb|\depthof{<text>}| within a
+\texttt{calc}-expression. At the same time we modified a few kernel
+commands so that \texttt{calc}-expressions can now be used in various
+useful places such as the dimension arguments to the \texttt{tabular}
+environment and the \verb|\rule| command. For many other standard
+\LaTeX{} commands this was already possible.
+
+
+\section{Support for Cyrillic encodings}
+
+We are very pleased that, after a lengthy period of development, a set
+of fonts, encodings and support files for using \LaTeX\ with Cyrillic
+characters will soon be available.
+
+Test versions of the `LH' fonts for these Cyrillic encodings, based on
+the Computer Modern design, are available from CTAN archives in the
+directory \texttt{fonts/cyrillic/lh-test}. The \LaTeX\ support files
+(by Werner Lemberg and Vladimir Volovich) are also available from CTAN
+archives in\\
+ \texttt{macros/latex/contrib/supported/t2}
+
+
+\section{Default docstrip header}
+
+Many \LaTeX\ users now distribute packages in documented source form
+using the \textsf{docstrip} system. Docstrip allows a header to be
+placed on generated package files, suitable for giving copyright
+information, or distribution conditions.
+
+We have changed the default version of this header so that it allows
+stripped files to be distributed in ready-to-run installations such as
+the \TeX{}Live CD\@. If you use the default header for distributing
+your files you should check that the new copyright text is acceptable
+to you. The file \texttt{docstrip.dtx} explains how to produce your own
+header if you wish to do so.
+
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews10.tex b/macros/latex-dev/doc/ltnews10.tex
new file mode 100644
index 0000000000..d9e0d4de53
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews10.tex
@@ -0,0 +1,153 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews10.tex 12/01/1998
+
+% This is issue 10 of LaTeX News.
+
+\documentclass
+% [lw35fonts]
+ {ltnews}[1999/02/23]
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{December}
+\publicationyear{1998}
+\publicationissue{10}
+
+\begin{document}
+
+\maketitle
+
+
+\section{Five years of \LaTeXe}
+
+Since this is the 10th edition of \LaTeX{} News, the (no longer) New
+Standard \LaTeX{} must have hit the streets almost this long ago. In
+fact it was only the beta-version that some people got just in time for
+Christmas~1993, and since then there has been a lot of tidying-up and
+smoothing of rough edges (not to mention a few bug fixes!).
+
+Maybe it is time for something more radically different to emerge and
+be hungrily adopted by the world; but don't panic, we shall be
+maintaining what you have now for a long time yet. Amongst the more
+polite things that have been written about our efforts, we found that this
+quote (somewhat censored to protect the guilty) well reflects some of
+our feelings about working on \LaTeX{} over the years: \textit{the mere
+existence of \LaTeXe{} is a great miracle}.
+
+
+ \section{Restructuring the \LaTeX{} distribution}
+
+ Since the (once) `new' standard \LaTeX{} has reached such a venerable
+ age, we are reviewing the way in which the system is presented to the
+ world.
+
+ An early intention is to define, given the wide variety of good
+ packages now available, what now constitutes a useful installation of
+ \LaTeX{}. We also hope that such a definition will help document
+ portability if it leads to a future in which a \LaTeX{} class
+ designer can reasonably assume that a known list of
+ facilities will be there for all users (so that each class
+ need not supply them).
+
+ As a first small step towards this definition, we shall replace the
+ \texttt{latex/packages} subdirectory on \ctan{}.
+ This directory was a curious mixture of the important, such as the
+ \LaTeX{} \texttt{tools}, that any self-respecting \LaTeX{}
+ installation ought to have, and the esoteric or experimental.
+
+ The esoterica from \texttt{packages} will be moved to
+ new locations, as follows:
+ \begin{quote}
+ \texttt{expl3} to \texttt{latex/exptl/project}\\
+ \texttt{mfnfss} to \texttt{latex/contrib/supported/mfnfss}
+ \end{quote}
+
+ The subdirectory that replaces \texttt{packages} will be called
+ \texttt{latex/required}; all the other sub-directories of
+ \texttt{packages} will be moved there.
+
+\vspace{17pt}
+\pagebreak
+
+ \section{\LaTeX\ Project on the Internet}
+A new \texttt{latex-project.org} domain has been registered.
+The web site is not yet fully functional but the old \LaTeX\ pages from
+\ctan\ are available at \texttt{http://www.latex-project.org/} and the
+\LaTeX\ bug reporting address has been changed to
+\texttt{latex-bugs@latex-project.org}.
+
+ \section{Restructuring the \LaTeX{} package licenses}
+
+Several people have requested an easy mechanism for the distribution
+of \LaTeX\ packages and other software ``under the same conditions as
+\LaTeX''. The old \texttt{legal.txt} file was unsuitable as a general
+licence as it referred to specific \LaTeX\ authors, and to specific
+files.
+
+Therefore, in this release \texttt{legal.txt} contains just the
+copyright notice and a reference to the new \emph{\LaTeX\ Project
+Public License} (LPPL) for the distribution and modification
+conditions. The \texttt{tools}, \texttt{graphics}, and \texttt{mfnfss}
+packages also now refer to this license in their distribution notices.
+
+ \section{Support for Cyrillic encodings}
+
+Basic Cyrillic support, as announced in \LaTeX{} News~9, is now
+finally an official part of \LaTeX{}. It includes support for the
+following standard Cyrillic font encodings (this list may
+grow):~\mbox{\texttt{T2A T2B T2C X2}}.
+
+It also includes various Cyrillic input encodings (20~in total,
+including commonly used variants and Mongolian Cyrillic
+encodings). This provides platform independent and
+sophisticated basic support for high-quality typesetting in various
+Cyrillic-based languages.
+
+For further information see the file \texttt{cyrguide.tex}.
+
+\section{Tools distribution}
+
+The \texttt{varioref} package has been extended to support textual
+page references to a range of objects: e.g.,~if \texttt{eq-first}
+and \texttt{eq-last} are the label names for the first and last
+equation in a sequence, then you can now write
+\begin{verbatim}
+ see~\vrefrange{eq-first}{eq-last}
+\end{verbatim}
+This results in different text depending on whether both
+labels fall on the same page.
+
+Some additional user commands, as well as building-blocks for writing
+private extensions, are described in the accompanying documentation.
+
+
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltnews11.tex b/macros/latex-dev/doc/ltnews11.tex
new file mode 100644
index 0000000000..6587a691af
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews11.tex
@@ -0,0 +1,141 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews11.tex 01/06/1999
+% This is issue 11 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Times
+ {ltnews}
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{June}
+\publicationyear{1999}
+\publicationissue{11}
+
+\begin{document}
+
+\maketitle
+
+\section{Back in sync}
+
+The last release of \LaTeX{} was delayed even longer than you have
+come to expect. We hope that it proved worth waiting for. It
+required a major integration of the code from several people and,
+independently, the introduction of the LPPL (see \LaTeX{} News~10) plus
+several related changes to our internal systems. It therefore seemed
+sensible to wait until everything was complete rather than do things
+in too much hurry.
+
+This seem to have been a successful strategy as
+the recent patch release was related to an isolated change that was
+done many months previously. If this release does not appear a lot
+closer to its nominal date then \ldots~well, you will not be reading
+this sentence!
+
+\section{Yearly release cycles}
+
+With the year 2000 rapidly approaching, we intend to switch to a
+release frequency of just one per year (with patches if necessary) for
+the core of \LaTeXe{}. These days the system is sufficiently stable
+that the original update policy is costing everybody more time than is
+now warranted.
+
+\section{LPPL update}
+
+Thanks to extensive and valuable input from Matt Swift
+(\email{swift@alum.mit.edu}) we now have a clearer and more detailed
+form of the \LaTeX{} Project Public Licence. This release contains
+both the original version (in \file{lppl-1-0.txt}) and the updated
+version, LPPL~1.1.
+
+\section{The future of Sli\TeX{}}
+
+We still get a very small trickle of reports about this part of the
+system (if you are no longer able to recall \LaTeX~2.09 then you will
+know it as the \class{slides} class). We have not classified them (in
+our minds at least) as bugs since we have always known that there are
+many problems with this class. It is clear to us that the only
+sensible action would be to redesign the system completely; in
+particular, to remove much of its complexity whose purpose is to
+support 10-year-old overlay technology. However, this would take a
+lot too much time and would be completely out of proportion to its
+current usage.
+
+We are therefore planning to make the \class{slides} class
+unsupported in the sense that any problem related to the use of
+invisible fonts is considered to be a feature (The \LaTeXe{} manual by
+Leslie Lamport doesn't even describe this part of the class any more).
+Of course, if it still has its enthusiasts then we are happy to cede
+it to their loving care (somewhat like a preserved steam locomotive,
+in some parts of the world).
+
+\section{Fontenc package peculiarities}
+
+The \verb=\usepackage= interface normally ensures that a package is
+loaded only once. The \pkg{fontenc} package has become an
+exception to this rule: it can be loaded several times using different
+options, e.g., allowing the user to add a font encoding in the
+preamble. This comes at a price for package writers: the low-level
+commands (see \file{ltclass.dtx}) used to check if a package was
+loaded, and with which options, do not work for the \pkg{fontenc}
+package.
+
+\section{New math font encodings}
+
+As we announced in \LaTeX{} News~9, a joint working group of the
+\TeX{} Users Group and the \LaTeX3 Project has developed a new
+\mbox{8-bit} math font encoding for \TeX{}.
+The reason why this work is not yet released is because of other
+exciting developments in the world of math fonts and math characters.
+It is obviously wise to ensure that the encoding work is fully
+integrated with the available fonts.
+
+Those interested are reminded that further information about the Math
+Font Group may be found on the World Wide Web at:\\
+\url{http://www.tug.org/twg/mfg/}.
+
+\section{Tools distribution}
+
+The \pkg{multicol} package has now got a small but useful extension
+which allows you to force a column break where this is really
+necessary. This is done with the command \verb=\columnbreak=, which
+can be used like \verb=\pagebreak= (e.g.,~within paragraphs) except
+that it cannot have an optional argument and thus it always forces a
+new column.
+
+\section{Coming soon}
+
+Major work on a new class file structure to support flexible
+designs is well under way; some of this work will be presented at the
+TUG'99 conference in Vancouver, Canada. With a bit of luck much of
+this work could be ready for integration into the next release---so
+watch this space!
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews12.tex b/macros/latex-dev/doc/ltnews12.tex
new file mode 100644
index 0000000000..47609689ce
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews12.tex
@@ -0,0 +1,154 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews12.tex
+%
+% This is issue 12 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Times
+ {ltnews}[1999/12/01]
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{December}
+\publicationyear{1999}
+\publicationissue{12}
+
+% Should go to .cls:
+\newcommand{\acro}[1]{\textsc{\MakeLowercase{#1}}}
+
+\begin{document}
+
+\maketitle
+
+\section{LPPL update}
+
+Since the release of the \LaTeX{} Project Public Licence version~1.1,
+we have received a small number of queries which resulted in some
+minor changes to improve the wording or explain the intentions better.
+As a consequence this release now contains LPPL~1.2 in the file
+\file{lppl.txt} and the previous versions as \file{lppl-1-0.txt} and
+\file{lppl-1-1.txt}.
+
+\section{fixltx2e package}
+
+ This package provides fixes to \LaTeXe{} which are desirable but
+ cannot be integrated into the \LaTeXe{} kernel directly as they
+ would produce a version incompatible to earlier releases (either
+ in formatting or functionality).
+
+ By having these fixes in the form of a package, users can benefit
+ from them without the danger that their documents will fail, or
+ produce unexpected results, at other sites; this works because a
+ document will contain a clear indication (the \verb=\usepackage=
+ line, preferably with a required date) that at least some of these
+ fixes are required to format it.
+
+\section{Outcome of TUG '99 (Vancouver)}
+
+The slides from the \acro{TUG}'99 presentation we gave on \emph{a
+new interface for \LaTeX\ class designers} are available from the
+\LaTeX\ Project website; look for the file \verb|tug99.pdf| at:
+\begin{quote}
+ \url{http://www.latex-project.org/talks/}
+\end{quote}
+
+Please note that this document was intended only to be informal
+``speaker's notes'' for our own use. We decided to make them available (the
+speaker's notes as well as the slides that were presented) because several
+people requested copies after the talk. However, they are \emph{not} in
+a polished copy-edited form and are not intended for publication.
+
+Prototype implementations of parts of this interface are now available from:
+\begin{quote}
+ \url{http://www.latex-project.org/code/experimental/}
+\end{quote}
+
+We are continuing to add new material at this location so as to
+stimulate further discussion of the underlying concepts. As of
+December 1, 1999
+the following parts can be downloaded.
+\begin{description}
+
+ \item[xparse] Prototype implementation of the interface for declaring
+ document command syntax. See the \texttt{.dtx} files for
+ documentation.
+
+ \item[template] Prototype implementation of the template interface
+ (needs parts of \texttt{xparse}).
+
+ The file \texttt{template.dtx} in that directory has a large section
+ of documentation at the front describing the commands in the
+ interface and giving a `worked example' building up some templates
+ for caption formatting.
+
+ \item[xcontents] Interface description for table of contents data (no
+ code yet). Coding examples have been thoroughly discussed on the
+ \texttt{latex-l} list.
+
+ \item[xfootnote] Working examples for generating footnotes,
+ etc. Needs \texttt{xparse} and \texttt{template}.
+
+ \end{description}
+All examples are organised in subdirectories and additionally
+ available as \texttt{gzip} \texttt{tar} files.
+
+ Please remember
+that this material is intended only for experimentation and comments;
+thus any aspect of it, e.g., the user interface or the functionality,
+may change and, in fact, is very likely to change.
+For this reason it is explicitly forbidden to place this material on
+\acro{CD-ROM} distributions or public servers.
+
+These concepts, as well as their implementation, are under discussion
+on the list \texttt{LATEX-L}. You can join this list, which is
+intended solely for discussing ideas and concepts for future versions
+of \LaTeX, by sending mail to
+%\begin{quote}
+ \email{listserv@URZ.UNI-HEIDELBERG.DE}
+%\end{quote}
+containing the line
+ \begin{quote}
+ \texttt{SUBSCRIBE LATEX-L} \textit{Your Name}
+ \end{quote}
+
+This list is archived and, after subscription, you can retrieve older
+posts to it by sending mail to the above address, containing a command
+such as:
+\begin{quote}
+\texttt{GET LATEX-L LOGyymm}
+\end{quote}
+where \texttt{yy}=Year and \texttt{mm}=Month, e.g.
+\begin{quote}
+\texttt{GET LATEX-L LOG9910}
+\end{quote}
+for all messages sent in October 1999.
+
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews13.tex b/macros/latex-dev/doc/ltnews13.tex
new file mode 100644
index 0000000000..ae08f3d90d
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews13.tex
@@ -0,0 +1,201 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews13.tex
+%
+% This is issue 13 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Palatino
+ {ltnews}[2000/07/21]
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{June}
+\publicationyear{2000}
+\publicationissue{13}
+
+
+\begin{document}
+
+\maketitle
+
+\raisefirstsection
+\section{Yearly release cycle}
+
+We announced in \textit{\LaTeX{} News~11} that we intended to switch
+to a 12-monthly release schedule. With the present (June~2000)
+release, this switch is being made: thus the next release of \LaTeX{}
+will be dated June~2001. We shall of course continue, as in the past,
+to release patches as needed to fix significant bugs.
+
+
+\section{PSNFSS: \small Quote of the Month}
+
+\begin{quote}
+ You should say in the \LaTeX{} News that Walter Schmidt has taken over
+ \PSNFSS{} from me. It gives me a certain pleasure to be able to draw a
+ line under that part of my life\ldots
+
+ \begin{latexonly}
+ \vspace{-\baselineskip}
+ \end{latexonly}
+
+ \begin{flushright}
+ Sebastian Rahtz
+ \end{flushright}
+\end{quote}
+
+\begin{latexonly}
+ \vspace{-\baselineskip}
+\end{latexonly}
+
+\noindent
+The \PSNFSS{} material, which supports the use\latex{\\}
+of common PostScript fonts with \LaTeX{}, has been thoroughly updated.
+Most noticeably, the \package{mathpple} package, which used to be
+distributed separately, is now part of the basic \PSNFSS{} bundle;
+this package provides mathematical typesetting with the Palatino
+typeface family. In addition, numerous bugs and flaws have been fixed
+and the distribution has been `cleaned up'. The file
+\file{changes.txt} contains a detailed list of these changes.
+\latex{\looseness=-1} %%!!!!! It worked!
+
+The documentation (in \file{psnfss2e.pdf}) has been completely
+rewritten to provide a comprehensive introduction to the use
+of PostScript fonts.
+
+Notice that the new \PSNFSS{} needs updated files for font metrics,
+virtual fonts and font definitions. If you received the new
+version~(8.1) as part of a complete \TeX{} system then these new font
+files should also have been installed. However, if you intend to
+install or update \PSNFSS{} yourself, please read the instructions in
+the file \file{00readme.txt} of the new \PSNFSS{} distribution.
+
+Support for commercial PostScript fonts, such as
+Lucida~Bright, has been removed from the basic distribution;
+it is now available from \ctan{}:
+\begin{latexonly}
+ \file{\ctanhttp macros/latex/\\
+ contrib/supported/psnfssx}.
+\end{latexonly}
+\begin{htmlonly}
+ \url{http://www.tex.ac.uk/tex-archive/macros/latex/contrib/supported/psnfssx}.
+\end{htmlonly}
+
+\section{New AMS-\LaTeX{}}
+
+Version 2.0 of AMS-\LaTeX{} was released on December 1, 1999. It can
+be obtained via \url{ftp://ftp.ams.org/pub/tex/} or
+\url{http://www.ams.org/tex/amslatex.html}, as well from \ctan{}:
+\begin{latexonly}
+ \file{\ctanhttp macros/latex/\\
+ required/amslatex}.
+\end{latexonly}
+\begin{htmlonly}
+ \url{http://www.tex.ac.uk/tex-archive/macros/latex/required/amslatex}.
+\end{htmlonly}
+
+This release consists chiefly of bug fixes and consolidation of the
+existing features. The division of AMS-\LaTeX{} into two main parts
+(the math packages;\latex{\\}
+the AMS document classes) has been made more pronounced.
+The files \file{diffs-m.txt}, \file{diffs-c.txt},
+\file{amsmath.faq}, and \file{amsclass.faq} describe the\latex{\\}
+changes and address some common questions.
+
+The primary documentation files remain \file{amsldoc.tex}, for the
+\package{amsmath} package, and \file{instr-l.tex}, for the AMS
+document classes.\latex{\\}
+The documentation for the \package{amsthm} package,\latex{\\}
+however, has been moved from \file{amsldoc.tex}\latex{\\}
+to a separate document \file{amsthdoc.tex}.
+
+\begin{latexonly}
+ \vfill
+\end{latexonly}
+
+\section{New input encoding \package{latin4}}
+
+The package \package{inputenc} has, thanks to Hana Skoumalov\'a,
+been extended to cover the \package{latin4} input encoding; this
+covers Baltic and Scandinavian languages as well as Greenland
+Inuit and Lappish.
+
+\begin{latexonly}
+ \vfill
+\end{latexonly}
+
+\section{New experimental code}
+
+In \textit{\LaTeX{} News~12} we announced some ongoing work towards a
+`Designer Interface for \LaTeX' and we presented some early results
+thereof. Since then, at Gutenberg\,2000 in Toulouse and TUG\,2000 in
+Oxford, we described a new output routine and an improved method of
+handling vertical mode material between paragraphs. In combination
+these support higher quality \emph{automated}\footnote
+ {The stress here is on automated!}
+page-breaking and page make-up\latex{\\}
+for complex pages---the best yet achieved with \TeX{}!
+
+A paper describing the new output routine is
+\begin{latexonly}
+ at\\
+ \file{http://www.latex-project.org/papers/xo-pfloat.pdf%
+ \hspace*{-16pt}}\\
+\end{latexonly}
+\begin{htmlonly}
+ at \url{http://www.latex-project.org/papers/xo-pfloat.pdf}.
+\end{htmlonly}
+All code examples and documentation are available
+\begin{latexonly}
+ at\\
+ \file{http://www.latex-project.org/code/experimental/%
+ \latex{\hspace*{-5pt}}}.\\[3pt]
+\end{latexonly}
+\begin{htmlonly}
+ at \url{http://www.latex-project.org/code/experimental/}.
+
+\end{htmlonly}
+This directory has been extended to contain
+\begin{description}
+ \item[galley] Prototype implementation of the interface\latex{\\}
+ for manipulating vertical material in galleys.
+ \item[xinitials] Prototype implementation of the interface\latex{\\}
+ for paragraph initials (needs the \texttt{galley} package.
+ \item[xtheorem] Contributed example using the \texttt{template}
+ package to provide a designer interface for theorem environments.
+ \item[xoutput] A prototype implementation of the new output routine
+ as described in the \texttt{xo-pfloat.pdf} paper. Expected
+ availability: at or shortly after\latex{\\}
+ the TUG\,2000 conference.
+\end{description}
+
+\end{document}
+
+
diff --git a/macros/latex-dev/doc/ltnews14.tex b/macros/latex-dev/doc/ltnews14.tex
new file mode 100644
index 0000000000..1e5c8d72c8
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews14.tex
@@ -0,0 +1,169 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews14.tex
+%
+% This is issue 14 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Palatino
+ {ltnews}[2001/07/12]
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{June}
+\publicationyear{2001}
+\publicationissue{14}
+
+
+\begin{document}
+
+\maketitle
+
+\raisefirstsection
+\section{Future releases}
+
+We are currently exploring how to best support the very large
+community of individuals, organisations and enterprises that depend on
+the robustness and availability of the current standard \LaTeX{}
+distribution. The results of this may lead to some changes in the
+regular release schedule and the handling of bug reports during the
+next year.
+
+\section{New release of \textsf{Babel} (required)}
+
+Earlier this year a new release of \textsf{Babel} (3.7) became
+available. You can read about its new features in
+\begin{latexonly}
+ \file{http://www.ctan.org/tex-archive/macros/}\\
+ \hspace*{4em}\file{latex/required/babel/announce.txt}
+\end{latexonly}
+\begin{htmlonly}
+ \url{http://www.ctan.org/tex-archive/macros/latex/required/babel/announce.txt}
+\end{htmlonly}
+
+One of the bugs that got fixed in this release deals with how labels
+are handled by \LaTeX{}. Because this part of the kernel is modified
+by \textsf{babel}, the relevant changes need to be coordinated.
+Therefore to use \textsf{Babel} with this release of \LaTeX{} you will
+need to update your version of \textsf{babel} to at least 3.7.
+
+\section{New input encoding \package{latin9}}
+
+The package \package{inputenc} has, thanks to Karsten Tinnefeld, been
+extended to cover the \package{latin9} input encoding. The
+ISO-Latin~9 encoding is a useful modern replacement for ISO-Latin~1
+that contains a few characters needed for French and Finnish. Of wider
+interest, it also contains the euro currency sign; this could be the
+killer argument for many 8-bit texts to use Latin-9 in the future.
+
+According to a Linux manpage, ISO~Latin-9 supports Albanian, Basque,
+Breton, Catalan, Danish, Dutch, English, Estonian, Faroese, Finnish,
+French, Frisian, Galician, German, Greenlandic, Icelandic, Irish
+Gaelic, Italian, Latin, Luxembourgish, Norwegian, Portuguese,
+Rhaeto-Romanic, Scottish Gaelic, Spanish and Swedish.\\
+The characters added in \package{latin9} are (in \LaTeX{} notation):\\
+\begin{small}
+\verb| \texteuro \v S \v s \v Z \v z \OE \oe \" Y |
+\end{small}\\
+They displace the following characters from \package{latin1}:\\
+\begin{small}
+\verb| \textcurrency \textbrokenbar \"{} \'{} \c{} |\\
+\verb| \textonequarter \textonehalf \textthreequarters |
+\end{small}
+
+
+\section{New tools}
+
+The new package \package{trace} provides many commands to control
+\LaTeX{}'s tracing and debugging output, including the excellent new
+information available with \eTeX{} such as the extremely useful
+tracing of local assignments. You will find it in the tools
+distribution.
+
+It offers the command \verb|\traceon|, which is similar to
+\verb|\tracingall| but suppresses uninteresting stuff such as font
+loading by NFSS (which can go on for pages if you are unlucky). It
+also offers \verb|\traceoff| to \ldots\ guess what! Full details are
+in the documented source file, \file{trace.dtx}.
+
+In the base \package{ifthen} package we have added
+the uppercase synonyms \verb|\NOT| \verb|\AND| and \verb|\OR|.
+
+\section{New experimental code}
+
+In \textit{\LaTeX{} News~12} we announced some ongoing work towards a
+`Designer Interface for \LaTeX' and we presented some early results
+thereof. Since then, at Gutenberg\,2000 in Toulouse and TUG\,2000 in
+Oxford, we described a new output routine and an improved method of
+handling vertical mode material between paragraphs. In combination
+these support higher quality \emph{automated}\footnote
+ {The stress here is on automated!}
+page-breaking and page make-up\latex{\\}
+for complex pages---the best yet achieved with \TeX{}!
+
+More recently we have added material to handle the complex front
+matter requirements of journal articles; this was presented at
+Gutenberg\,2001 in Metz.
+
+A paper describing the new output routine is
+\begin{latexonly}
+ at\\
+\begin{small}
+ \file{http://www.latex-project.org/papers/xo-pfloat.pdf}\\
+\end{small}
+\end{latexonly}
+\begin{htmlonly}
+ at \url{http://www.latex-project.org/papers/xo-pfloat.pdf}.
+\end{htmlonly}
+All code examples and documentation are available
+\begin{latexonly}
+ at\\
+\begin{small}
+ \file{http://www.latex-project.org/code/experimental}
+\end{small}
+\end{latexonly}
+\begin{htmlonly}
+ at \url{http://www.latex-project.org/code/experimental/}.
+\end{htmlonly}
+
+This directory has been extended to contain the following.
+\begin{description}
+ \item[galley] Prototype implementation of the interface\latex{\\}
+ for manipulating vertical material in galleys.
+ \item[xinitials] Prototype implementation of the interface\latex{\\}
+ for paragraph initials (needs the \texttt{galley} package).
+ \item[xtheorem] Contributed example using the \texttt{template}
+ package to provide a designer interface for theorem environments.
+ \item[xor] A prototype implementation of the new output routine
+ as described in the \texttt{xo-pfloat.pdf} paper.
+ \item[xfrontm] A prototype version of
+ the new font matter interface.
+\end{description}
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews15.tex b/macros/latex-dev/doc/ltnews15.tex
new file mode 100644
index 0000000000..389ed6334d
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews15.tex
@@ -0,0 +1,169 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews15.tex
+%
+% This is issue 15 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Palatino
+ {ltnews}[2004/02/28]
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{December}
+\publicationyear{2003}
+\publicationissue{15}
+
+\begin{document}
+
+\maketitle
+
+%\raisefirstsection
+
+\section{Anniversary release}
+
+Yes, it's now 10~years since the first release in this series and, for
+Knuthists, this release also contains \textit{Issue 16}\,!
+
+Meanwhile this \textit{Issue~15} describes the major new features in
+the current release whilst \textit{Issue~16} looks\newline
+a little way into the future of \LaTeX{}.
+
+
+\section{LPPL -- new version}
+
+Most importantly, there is now a new version, 1.3, of the \LaTeX{}
+Project Public Licence. Many of you will\newline
+be thrilled to know that, following the exchange of over 1600 e-mail
+messages dissecting various aspects of its philosophy such as `how
+many angels can appear in the name of a file before it becomes
+non-free', this version\newline
+is now officially a DFSG (Debian Free Software Guidelines) approved license.
+The discussions start at
+\url{http://lists.debian.org/debian-legal/2002/debian-legal-200207/threads.html}
+with high traffic throughout August to October~2002 and further
+heated discussions starting in April~2003 and concluding
+around June at
+\url{http://lists.debian.org/debian-legal/2003/debian-legal-200306/msg00206.html}.
+
+The important features of the new version are useful clarifications in
+the wording, and revised procedures\newline
+for making a change to the Current Maintainer of a package. Special
+thanks to all those people from\newline Debian Legal who worked
+constructively with us\newline
+on this onerous task, especially but not exclusively\newline
+Jeff Licquia and Branden Robinson.
+
+
+\section{Small updates to varioref}
+
+The English has been corrected in \verb|\reftextbefore|
+(an incompatible change). There are other extensions
+such as \verb|\labelformat|, \verb|\Ref|, \verb|\Vref| and \verb|\vpagerefnum|.
+Some Dutch text has also been changed and two\newline
+new options added: \package{slovak} and \package{slovene}.
+
+
+\section{New and more robust commands}
+
+Many of the math mode commands for compound symbols have been made
+robust and a new robust command has been added: \verb|\nobreakdashes|.
+This last is a low-level command, borrowed from the \package{amsmath}
+package, for use only before hyphens or dashes. It prevents the line
+break that is normally allowed\newline
+after the following sequence of dashes.
+
+
+\section{Fixing font sizes}
+
+The new \package{fix-cm} package, by Walter Schmidt, changes the CM font
+definition (\texttt{.fd}) files so that similar design sizes are used
+in both the \texttt{OT1} and \texttt{T1} encodings.
+
+
+\section{Font encodings}
+
+A number of options have been added to the \package{textcomp} package,
+enabling only available glyphs to be used.
+Also, the `NFSS font families' are now divided into five different groups
+according to the subset of glyphs each provides from the full
+collection of symbols in the TS1 encoding.
+Given sufficient information about a font family
+\package{textcomp} will use this in order to limit the\newline
+typesetting to those glyphs that are available.
+
+Use of this mechanism has also enhanced \verb|\oldstylenums|
+to use the current font if possible.
+
+
+\section{Displaying font tables}
+
+With the \package{nfssfont} package you can now
+specify the font to display by giving its `NFSS classification',
+rather than needing to know its external font file's name.
+It is also now possible to generate large collections of font
+tables in batch mode by providing a suitable input file.
+
+
+\section{New input encodings}
+
+The \package{inputenc} package has been extended as follows:
+\package{macce} input encoding
+(Apple Central European),
+thanks to Radek Tryc and Marcin Wolinski; \package{cp1257}\newline
+for Baltic languages; \package{latin10},
+thanks to Ionel Ciob\^{i}c\u{a}.\newline
+The euro symbol has by
+now been added to several encodings:
+\package{ansinew}, \package{cp1250}
+and \package{cp1252} (which also\newline
+has another addition), whilst \package{cp858}
+adds it to \package{cp850}.
+
+
+\section{Unicode input}
+
+Partial, experimental support for text files that use the Unicode
+encoding form UTF-8 is now provided by the option \package{utf8} for
+the \package{inputenc} package.
+
+The only Unicode text file characters supported by the current version
+are those based on the most common inputs for glyphs from the small
+collection\newline
+of standard \LaTeX{} Latin encodings.
+
+
+\section{And finally \ldots\ pict2e}
+
+The old, non-functional version of this package has been removed
+ as there is now a fully working version from Hubert G\"a{\ss}lein
+ and Rolf Niepraschk. It is described
+ in \textit{The \LaTeX{} Manual}.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews16.tex b/macros/latex-dev/doc/ltnews16.tex
new file mode 100644
index 0000000000..69e05973a8
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews16.tex
@@ -0,0 +1,161 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews16.tex
+%
+% This is issue 16 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Palatino
+ {ltnews}[2004/02/28]
+
+% \usepackage[T1]{fontenc}
+
+\publicationmonth{December}
+\publicationyear{2003}
+\publicationissue{16}
+
+\begin{document}
+
+\maketitle
+
+%\raisefirstsection
+
+\section{Anniversary news}
+
+This anniversary \textit{Issue~16} takes a brief look into the future work of
+the \LaTeX3 Project Team, both short and and longer range. Please let
+us know if you want %\newline
+to get involved with us in any of this work (see below).
+
+An overview of the 10th Anniversary Release, dated 2003/12/01, is
+can be found in \textit{Issue~15}.
+
+
+\section{TLC2: The \LaTeX{} Companion -- 2nd edition!}
+
+Since you are reading this newsletter, there is a good chance that
+you, or a friend, has already bought this encyclopedic volume: the
+incomparable Second\newline
+Edition of this work that is every \LaTeX{}ie's\newline
+ultimate lucky charm.
+
+If by some chance you have not yet purchased your own copy then get
+into training, get shopping, and get flexing your muscles (both
+physical---it's $1100+$~pages,\newline
+and intellectual) by using it to discover
+masses of invaluable `insider information' about:
+\begin{itemize}
+\item the latest release of Standard \LaTeX{};
+\item over~200~extension packages;
+\item plus related software and systems.
+\end{itemize}
+For more information on this all new (??\ldots OK,\newline
+not \emph{all}, but over 90\%!!),
+all accurate (we hope!)\newline
+10th~Anniversary Edition, check out\newline
+ \mbox{\url{http://www.awprofessional.com/titles/0201362996}}.
+
+
+\section{Future maintenance}
+
+We are currently exploring how best to support the very large and
+rapidly growing community of individuals, organisations and
+enterprises that depend on the robustness and availability of the
+current standard \LaTeX{} distribution. Although we remain firmly\newline
+resolved not to make changes in the base distribution (the kernel) of
+Standard \LaTeX{}, there is still much that needs doing to maintain
+its reliability and utility and to keep up the necessary level of
+communication with users and supporters. Also, as with all advanced
+software systems, bugs are still turning up occasionally so %\newline
+some fixes are still essential.
+
+One major impediment to providing adequate service levels in this area
+is, of course, the difficulties inherent in obtaining the time and
+commitment of skilled minds---hence the appeal above to anyone
+interested %\newline
+in getting involved.
+
+
+\section{LPPL certification}
+
+There are still some outstanding diplomatic tasks around the
+\LaTeX{} Project Public Licence: these include
+e.g.,~getting it `OSF certified' and ensuring that it gains
+more support and wider use, even in the FSF world\newline
+where it has long been tolerated.
+
+
+\section{Use of \eTeX/pdf\TeX}
+
+We expect that within the next two years, releases of \LaTeX{} will
+change modestly in order to run best under an extended \TeX{} engine
+that contains the \eTeX{} primitives, e.g., \eTeX{} or pdf\TeX{}.
+The details of this possible upgrade need further work so we are not
+making a definite announcement yet.
+
+Although the current release does not \emph{require} \eTeX{} features,
+we certainly recommend using an extended \TeX{}, especially if you
+need to debug macros.
+
+
+\section{End of `autoload' support}
+
+As computer systems generally grow in capacity, requirements change
+and so we believe that the \package{autoload} variant of \LaTeX{} is
+no longer required. Thus, although the code remains it is no longer
+supported. We hope this does not cause any problems.
+
+
+\section{New models, new code}
+
+In the period 1999--2001 we published many results of our work over
+the previous decade on the development of new concepts and models
+for automated typesetting based on \TeX{} as the underlying platform.
+These can be found at \url{http://www.latex-project.org/papers/}
+and
+\mbox{\url{http://www.latex-project.org/code/experimental/}}.
+
+Since then a very large proportion of the The Team's efforts have been
+diverted to provide the core author team for TLC2, which provides
+over 1000 pages of carefully researched and tested documentation of
+many aspects of the vast world of \LaTeX{} related software that
+was developed over that same time period and that continues
+to grow and improve prodigiously.
+
+Completion of that task \ldots\ until TLC3!! \ldots\ presents the
+possibility of getting back to this more exciting development work,
+or even to more radical work on non-\TeX{}-based models and
+implementations.
+
+Of course, any such ideas are predicated on our ability to organise
+(with you, we hope) an efficient\newline
+but responsive maintenance and support system\newline
+for Standard \LaTeX{}.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews17.tex b/macros/latex-dev/doc/ltnews17.tex
new file mode 100644
index 0000000000..99267429bc
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews17.tex
@@ -0,0 +1,230 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews17.tex
+%
+% This is issue 17 of LaTeX News.
+
+\documentclass
+% [lw35fonts] % uncomment this line to get Palatino
+ {ltnews}[2004/02/28]
+
+% \usepackage[T1]{fontenc}
+
+
+\publicationmonth{December}
+\publicationyear{2005}
+\publicationissue{17}
+
+\begin{document}
+
+\maketitle
+
+% \raisefirstsection
+
+\section{Project licence news}
+
+The \LaTeX{} Project Public License has been updated slightly so that
+it is now version 1.3c. In the warranty section the
+phrase ``unless required by applicable law'' has been reinstated,
+having got lost at some point. Also,
+it now contains three clarifications: of the difference between
+``maintained'' and ``author-maintained''; of the
+term ``Base Interpreter''; and when clause 6b and 6d shall not apply.
+
+Following requests, we now also provide the text of the licence as a
+\LaTeX{} document (in the file \texttt{lppl.tex}). This file can be
+processed either as a stand-alone document or it can be included
+(without any modification) into another \LaTeX{} document, e.g., as an
+appendix, using \verb|\input| or \verb|\include|.
+
+
+\section{New guide on font encodings}
+
+Way back in 1995 work was started on a guide to document the
+officially allocated \LaTeX{} font encoding names. However, for one
+reason or another this guide (named \textit{\LaTeX{} font encodings})
+was, until now, not added to the distribution. It describes the major
+7-bit and 8-bit font encodings used in the \LaTeX{} world and explains
+the restrictions required of conforming text font encodings. It also
+lists all the `encoding specific commands' (the LICR or \LaTeX{}
+Internal Character Representation) for characters supported by the
+encodings \texttt{OT1} and \texttt{T1}.
+
+When the file \texttt{encguide.tex} is processed by \LaTeX{}, it will
+attempt to typeset an encoding table for each encoding it describes.
+For this to be possible, \LaTeX{} must be able to find \texttt{.tfm}
+files for a representative example font for each encoding. If
+\LaTeX{} cannot find such a file then a warning is issued and the
+corresponding table is omitted.
+
+
+\section{Robust commands in math}
+
+The font changing commands in text-mode have been robust commands for years,
+but the same has not been true for the math versions such as
+\verb|\mathbf|. While the math-mode commands worked correctly in
+section heads, they could cause problems in other places such as index
+entries. With this release, these math-mode commands are now robust in
+the same way as their text-mode counterparts.
+
+%%
+\pagebreak
+%%
+
+
+\section{Updates of required packages}
+
+Several of the packages in the \package{tools} bundle have been updated
+for this release.
+
+The \package{xspace} package has some new features. One is an
+interface for adding and removing the exceptions it knows about and
+another is that it works with active characters. These remove problems
+of incompatibility with the \package{babel} system.
+
+In \textit{\LaTeX\ News~16} we announced that some packages might
+begin to take advantage of \eTeX{} extensions on systems where these
+are available: and the latest version of \package{xspace} does just
+that. Note also that \package{fixltx2e} will make use of the
+facilities in \eTeX{} whenever these are present (see below).
+
+The \package{calc} package has also been given an update with a few
+extra commands.
+The commands \verb|\maxof| and \verb|\minof|, each with two
+brace-delimited arguments, provide the usual numeric $\max$ and $\min$
+operations. The commands \verb|\settototalheight| and
+\verb|\totalheightof| work like \verb|\settoheight| and
+\verb|\heightof|. There are also some internal improvements to make
+\package{calc} work with some more primitive \TeX\ constructs, such as
+\verb|\ifcase|.
+
+The \package{varioref} package has acquired a few more default
+strings but there are still a number of languages for
+which good strings are still missing.
+
+The \package{showkeys} package has also been updated slightly to work
+with more recent developments in \package{varioref}. Also, it now
+provides an easy way to define the look of the printed labels with
+the command \verb|\showkeyslabelformat|.
+
+\section{Work on \LaTeX{} fixes}
+
+The package known as \package{fixltx2e} has three new additions. A new
+command \verb|\textsubscript| has been added as a complement to the
+command \verb|\textsuperscript| in the kernel. Secondly, a new form of
+\verb|\DeclareMathSizes| that allows all of its arguments to have a
+dimension suffix. This means you can now use expressions such as
+\verb|\DeclareMathSizes{9.5dd}{9.5dd}{7.4dd}{6.6dd}|.
+
+The third new
+addition is the robust command \verb|\TextOrMath| which takes two
+arguments and executes one of them when typesetting in text or math
+mode respectively. This command also takes advantage of \eTeX{}
+extensions if available; more specifically,
+%%
+%%\pagebreak
+%%
+when the \eTeX{} extensions are available, it does not
+destroy kerning between previous letters and the text to be typeset.
+The command is also used
+internally in \package{fixltx2e} to resolve a problem with
+\verb|\fnsymbol|.
+
+Also, further work has been done on reimplementing
+the command \verb|\addpenalty|, which is used internally in several
+places: we hope it is an improvement!
+
+\section{The graphics bundle}
+
+The \package{graphics} bundle now supports the
+\package{dvipdfmx} post-processor and Jonathan Kew's XE\TeX\
+program. By support we mean that the graphics packages recognize the
+new options \texttt{xetex} and \texttt{dvipdfmx} but we do not
+distribute the respective driver files.
+
+This leads elegantly to a description of the
+new policy concerning such driver files in the \package{graphics} bundle.
+Most driver files for our graphics packages are maintained by the
+developers of the associated post-processor or \TeX\ programs.
+The teams developing these packages are working very hard: their rapid
+development offers a stark contrast to the current schedule of \LaTeX\
+releases. It is therefore no longer practical
+for the \LaTeX\ Team to be responsible for distributing the
+latest versions of these driver files.
+
+Therefore the installation files for \package{graphics} have been
+split: there is now \file{graphics.ins} to install the package files and
+\file{graphics-drivers.ins} for the driver files (located in
+\file{drivers.dtx}).
+There is no need
+to install all those provided in the file \file{drivers.dtx}.
+
+Please also note that, as requested by the maintainers of
+\package{PStricks}, we have removed the package \package{pstcol} as
+current versions of \package{PSTricks} make it obsolete.
+
+%%
+\newpage
+%%
+
+
+\section{Future development}
+
+The title of this section is a little misleading as it actually
+describes \emph{current} development. In 1998 the \package{expl3}
+bundle of packages was put on \ctan\ to demonstrate a possible \LaTeX3
+programming environment. These packages have been lying dormant for some
+time while the \LaTeX\ Project Team were preoccupied by other things
+such as developing the experimental packages \package{xor},
+\package{template}, etc., (and also writing that indispensable
+and encyclopaedic volume,\\
+The \LaTeX{} Companion -- 2nd edition).
+
+In October 2004 work on this code base was resumed with the goal of
+some day turning it into a kernel for \LaTeX3. This work can now
+also make full use of the widely accepted \eTeX\ extensions. Currently
+two areas are central to this work.
+
+\begin{itemize}
+\item Extending the
+ kernel code of \LaTeX3.
+\item Converting the experimental packages
+ such as \package{xor}, \package{template} to use the new
+ syntax internally.
+\end{itemize}
+
+Beware! Development of
+\package{expl3} is happening so fast that the descriptions above might
+be out of date when you read this! If you wish to see what's going on
+then go to
+\url{http://www.latex-project.org/code.html} where you can download
+ fully working code (we hope!).
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltnews18.tex b/macros/latex-dev/doc/ltnews18.tex
new file mode 100644
index 0000000000..4e6090c02b
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews18.tex
@@ -0,0 +1,51 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews18.tex
+%
+% This is issue 18 of LaTeX News.
+
+\documentclass
+ [lw35fonts] % uncomment this line to get Palatino
+ {ltnews}[2004/02/28]
+
+% \usepackage[T1]{fontenc}
+
+
+\publicationmonth{December}
+\publicationyear{2007}
+\publicationissue{18}
+
+\begin{document}
+
+\maketitle
+
+\noindent This news never existed.
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltnews19.tex b/macros/latex-dev/doc/ltnews19.tex
new file mode 100644
index 0000000000..6441449c2a
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews19.tex
@@ -0,0 +1,116 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews19.tex
+%
+% This is issue 19 of LaTeX News.
+
+\documentclass{ltnews}
+
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url}
+
+\publicationmonth{September}
+\publicationyear{2009}
+
+\publicationissue{19}
+
+\begin{document}
+
+\maketitle
+
+\section{New \LaTeX\ release}
+
+This issue of \LaTeX~News marks the first release of a new version of
+\LaTeXe\ since the publication of The \LaTeX\ Companion in 2005--2006.
+
+Just in time for \TeX\ Live 2009, this version is a maintenance
+release and introduces no new features. A number of small changes have
+been made to correct minor bugs in the kernel, slightly extend the Unicode
+support, and improve various
+aspects of some of the \texttt{tools} packages.
+
+\section{New code repository}
+
+Since the last \LaTeX\ release, the entire code base has been moved
+to a public \textsc{svn} repository%
+\footnote{\url{http://www.latex-project.org/svnroot/latex2e-public/}}
+and the entire build architecture re-written. In fact, it has only
+been possible for us to consider a new \LaTeX\ release since earlier
+this year when the test suite was finally set up with the new system.
+In the process, a bug in the \LaTeX\ picture fonts distributed with
+\TeX\ Live was discovered, proving that the
+tests are working and are still very valuable.
+
+Now that we can easily generate new packaged versions of the \LaTeXe\
+distribution, we expect to be able to roll out bug fixes in a much
+more timely manner than over the last few years. New versions should
+be distributed yearly with \TeX\ Live. Having said this, the
+maintenance of the \LaTeXe\ kernel is slowing down as the bugs become
+fewer and more subtle. Remember that we cannot change any of the
+underlying architecture of the kernel or any design decisions of the
+standard classes because we must preserve backwards compatibility with
+legacy documents at all costs.
+
+Even new features cannot be added, because any new documents using
+them will not compile in systems (such as journal production engines)
+that are generally not updated once they've been proven to work as
+necessary.
+
+None of this is to say that we consider \LaTeXe\ to be any less
+relevant for document production than in years past: a stable system
+is a useful one.
+Moreover, the package system continues to provide a flourishing and stable
+means
+for the development of a wide range of extensions.
+
+\newpage
+
+\section{Babel}
+
+One area of the \LaTeXe\ code base that is still receiving feedback to
+be incorporated into the main distribution is the Babel system for
+multilingual typesetting.
+While the Babel sources have already been added to the \textsc{svn} repository the
+integration of the test system for Babel is still outstanding.
+
+
+\section{The future}
+
+While work on \LaTeXe\ tends to maintenance over active development,
+the \LaTeX3 project is
+seeing new life. Our goals here are to provide a transition from the
+\LaTeXe\ document processing model to one with a more flexible
+foundation. Work is continuing in the \textsf{expl3} programming
+language and the \textsf{xpackages} for document design. Future
+announcements
+about \LaTeX3 will be available via the \LaTeX\ Project
+website and in TUGboat.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews20.tex b/macros/latex-dev/doc/ltnews20.tex
new file mode 100644
index 0000000000..b095411c67
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews20.tex
@@ -0,0 +1,153 @@
+% \iffalse meta-comment
+%
+% Copyright 1993--2011
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews20.tex
+%
+% This is issue 20 of LaTeX News.
+
+\documentclass{ltnews}
+
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url}
+
+\publicationmonth{June}
+\publicationyear{2011}
+
+\publicationissue{20}
+
+\begin{document}
+
+\maketitle
+
+\section{Scheduled \LaTeX\ bug-fix release}
+
+This issue of \LaTeX~News marks the first bug-fix release of
+\LaTeXe\ since shifting to a new build system in 2009.
+Provided sufficient changes are made each year, we expect to
+repeat such releases once per year to stay in sync with \TeX\ Live.
+Due to the excitement of \TeX's $2^5$-th birthday last year,
+we missed our window of opportunity to do so for 2010.
+This situation has been rectified this year!
+
+\section{Continued development}
+
+The \LaTeXe\ program is no longer being actively developed, as any non-negligible changes now could have dramatic backwards compatibility issues with old documents. Similarly, new features cannot be added to the kernel since any new documents written now would then be incompatible with legacy versions of \LaTeX.
+
+The situation on the package level is quite different though. While most of us have stopped developing packages for \LaTeXe{} there are many contributing developers that continue to enrich \LaTeXe{} by providing or extending add-on packages with new or better functionality.
+
+However, the \LaTeX\ team certainly recognises that there are improvements to be made to the kernel code; over the last few years we have been working on building, expanding, and solidifying the \textsf{expl3} programming layer for future \LaTeX\ development. We are using \textsf{expl3} to build new interfaces for package development and tools for document design. Progress here is continuing.
+
+\section{Release notes}
+
+In addition to a few small documentation fixes, the following changes have been made to the \LaTeXe\ code; in accordance with the philosophy of minimising forwards and backwards compatibility problems, most of these will not be noticeable to the regular \LaTeX\ user.
+
+\paragraph{Font subsets covered by Latin Modern and \TeX\ Gyre}
+
+The Latin Modern and \TeX\ Gyre fonts are a modern suite of families based
+on the well-known Computer Modern and `PostScript 16' families with many additional
+characters for high-quality multilingual typesetting.%
+\footnote{%
+ See their respective TUGboat articles for more information:\\
+ \url{http://www.tug.org/TUGboat/tb24-1/jackowski.pdf}\\
+ \url{http://www.tug.org/TUGboat/tb27-2/tb87hagen-gyre.pdf}%
+}
+
+Information about their symbol coverage in the \verb|TS1| encoding is now included
+in \texttt{textcomp}'s default font definitions.
+
+% \paragraph{Private conditional switch in italic correction}
+% negligible improvement/only useful to LaTeX programmers: not worth documenting I think?
+
+% \paragraph{Improve formatting in \texttt{doc} for filenames with some punctuation}
+% negligible improvement, again?
+
+\paragraph{Redefinition of \cs{enddocument}}
+
+Inside the definition of \verb=\end{document}= the \texttt{.aux} file is read back in to resolve cross-references and build the table of contents etc. From 2.09 days this was done using \verb=\input= without any surrounding braces which could lead to some issues in boundary cases, especially if \verb=\input= was redefined by some package. It was therefore changed to use \LaTeXe{}'s internal name for this function. As a result, packages that modify \verb=\enddocument= other than through the officially provided hooks may need to get updated.
+
+\paragraph{Small improvement with split footnotes in \texttt{ftnright}}
+
+If in the first column there is more than a full column worth of footnote
+material the material will be split resulting in footnotes out of
+order. This issue is now at least detected and generates an error but the algorithm used by the package is
+unable to gracefully handle it in an automated fashion (some alternatives for resolving the problem if it happens are given in the package documentation).
+
+\paragraph{Improvement in \texttt{xspace} and font-switching}
+
+The \texttt{xspace} package provides the command \verb|\xspace|
+which attempts to be clever about inserting spaces automatically
+after user-defined control sequences.
+An important bug fix has been made to this command to correct its
+behaviour when used in conjunction with font-switching commands
+such as \verb|\emph| and \verb|\textbf|.
+Previously, writing
+\begin{verbatim}
+ \newcommand\foo{foo\xspace}
+ ... \emph{\foo} bar baz
+ ... \emph{\foo}, bar baz
+\end{verbatim}
+would result in an extraneous space being inserted after `foo' in
+both cases; this has now been corrected.
+
+
+\paragraph{RTL in \texttt{multicol}}
+
+ The 1.7 release of \texttt{multicol} adds support for languages that are typeset
+ right-to-left. For those languages the order of the columns on the page
+ also needs to be reversed---something that wasn't possible in earlier releases.
+
+The new feature is supported through the
+commands \verb|\RLmulticolcolumns| (switching to right-to-left typesetting)
+and \verb|\LRmulticolcolumns| (switching to left-to-right typesetting) the
+latter being the default.
+
+\paragraph{Improve French \texttt{babel} interaction with \texttt{varioref}}
+
+ Extracting and saving the page number turned out to be a source of subtle
+ bugs. Initially it was done through an \verb"\edef" with a bunch of
+\verb"\expandafter" commands inside. This posed a problem if the page number
+ itself contained code which needed protection (e.g., pr/4080) so this got
+ changed in the last release to use \verb"\protected@edef". However, that in turn failed with Babel
+(bug report/4093) if the label contained active characters, e.g., a ``:'' in French. So now
+we use (after one failed attempt pr/4159) even more \verb"\expandafter" commands and \verb"\romannumeral" trickery to avoid any expansion other
+ than what is absolutely required---making the code in that space absolutely unreadable.
+\begin{verbatim}
+ \expandafter\def\expandafter#1\expandafter{%
+ \romannumeral
+ \expandafter\expandafter\expandafter
+ \z@
+ \expandafter \@cdr
+ \romannumeral
+ \expandafter\expandafter\expandafter
+ \z@
+ \csname r@#2\endcsname\@nil}%
+\end{verbatim}
+Code like this nicely demonstrates the limitations in the programming layer of \LaTeXe{} and the advantages that \textsf{expl3} will offer on this level.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews21.tex b/macros/latex-dev/doc/ltnews21.tex
new file mode 100644
index 0000000000..b7c87d6f32
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews21.tex
@@ -0,0 +1,255 @@
+% \iffalse meta-comment
+%
+% Copyright 2014
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews21.tex
+%
+% This is issue 21 of LaTeX News.
+
+\documentclass{ltnews}
+\def\ConTeXt{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\publicationmonth{May}
+\publicationyear{2014}
+
+\publicationissue{21}
+
+\begin{document}
+
+\maketitle
+
+\section{Scheduled \LaTeX\ bug-fix release}
+
+This issue of \LaTeX~News marks the second bug-fix release of
+\LaTeXe\ (standard \LaTeX) since shifting to a new build system in 2009.
+Provided sufficient changes are made, we expect to
+make such releases yearly or every two years, in sync with \TeX\ Live.
+
+
+
+\subsection{Release notes}
+
+This release makes no changes to the core code in the \LaTeXe\ format
+but there are a small number of documentation fixes (not listed
+here). In addition several packages in the \textsf{base} and
+\textsf{required} areas have been updated as detailed below.
+
+
+This has been done in accordance with the philosophy of minimising
+problems in both forwards and backwards compatibility, so most of
+these changes should not be noticed by the regular \LaTeX\ user.
+
+References in the text below of the form ``graphics/3873'' are to
+bug reports listed
+at:\\ \url{http://latex-project.org/cgi-bin/ltxbugs2html}
+
+
+\let\paragraph\subsubsection
+
+\paragraph{\textsf{fixltx2e} updates}
+
+
+
+There are a number of bugs and faulty design decisions in \LaTeXe{}
+that should have been corrected long ago in the kernel code. However,
+such corrections cannot be done as this would break backwards
+compatibility in the following sense. A large number of documents
+exist by now that have worked around the bug or have even made use of
+a particular misfeature. Thus changing the kernel code would break
+too many existing documents.
+
+The corrections for these types of bug have therefore been collected together
+in a package that can be loaded only when needed; its name is \textsf{fixltx2e}.
+For this release we made the following changes to this package:
+\begin{itemize}
+\item
+ Misspelled float placement specifiers such as
+ \verb=\begin{figure}[tv]= instead of \texttt{tb} are silently
+ ignored by the kernel code. Now we test for such letters and issue
+ an error message.
+\item
+ \LaTeX's float handling algorithm can get out of sync if you mix
+ single and double-column floats (as they are placed independently
+ of each other). This was corrected in \textsf{fixltx2e} a few years ago
+ but the fix was not perfect as one situation using
+ \verb=\enlargethispage= generated a low-level \TeX{} error.
+ This behaviour of the package is now improved.
+\end{itemize}
+
+
+
+
+\paragraph{New \textsf{fltrace} package}
+
+For years the file \texttt{ltoutput.dtx} contained some hidden code to
+trace the detailed behaviour of the float placement algorithm of
+\LaTeX. Prompted by questions on StackExchange we now extract this
+code into a new \textsf{fltrace} package. To see the float algorithm
+in action (or to understand why it decides to place all your floats at
+the very end of the document) use
+\begin{verbatim}
+ \usepackage{fltrace} \tracefloats
+\end{verbatim}
+To stop tracing somewhere in the document use
+\verb=\tracefloatsoff= and to see the current value of various float
+parameters use \verb=\tracefloatvals=. As the package is identical to
+the kernel code with tracing added, it may or may not work if you load any
+other package that manipulates that part of the kernel code. In such a
+case your best bet is to load \textsf{fltrace} first.
+
+\paragraph{\textsf{inputenc} package updates}
+
+The \textsf{inputenc} package allows different input encodings for
+\LaTeX\ documents to be specified including the important
+\texttt{utf8} option used to specify the Unicode UTF-8 encoding. A
+common mistake in documents has been to also include this option when
+using the Unicode-based \TeX\ engines \hologo{LuaTeX} and \hologo{XeTeX}
+producing strange errors as these engines natively deal with UTF-8
+characters.
+
+If a document stored in an 8bit encoding is processed by
+\hologo{pdfTeX}, it needs the \textsf{inputenc} package to work
+correctly. However, if such a document is processed unchanged by
+\hologo{LuaTeX} or \hologo{XeTeX}, then accented characters may
+silently get dropped from the output.
+
+The package has been modified so that if used with \hologo{LuaTeX} or
+\hologo{XeTeX}, then it just issues a warning if \texttt{utf8} or
+\texttt{ascii} is specified, and stops with an error for any other
+encoding requested.
+
+
+
+One further improvement has been made to the encoding definition files
+(\texttt{.def}) used by \textsf{inputenc}: the catcode of \texttt{@}
+is now saved and restored when reading them instead of always using
+\verb=\makeatother= inside the files (latex/4192).
+
+
+
+\paragraph{The tools directory}
+
+In the past each of the sub-directories in the ``required'' section of
+the \LaTeX{} distribution contained a single \texttt{.ins} file to
+generate the code files from the source files. We have now
+started to provide individual \texttt{.ins} files for each of those
+packages that are likely to require updates outside a major
+\LaTeX{} release.
+
+\paragraph{\textsf{multicol} updates}
+
+Version 1.8 of \textsf{multicol} implements some improvements/fixes
+and one extension. In the past the balancing algorithm enlarged the
+column height until it found a solution that satisfied all
+constraints. If there were insufficient break points then the final
+column height could have been much larger than expected and if that
+happened near the end of the page it resulted in the text overflowing
+into the bottom margin. This situation is now detected and in that
+case a normal page is cut and balancing is resumed on the next
+page. Some overflow is still allowed and controlled via the parameter
+\verb=\maxbalancingoverflow=.
+
+The use of \verb=\enlargethispage= is now properly supported within
+the environment. Finally a new command \verb=\docolaction= was added
+to allow the execution of code depending on the column in which the
+command is executed. See the documentation for details.
+
+Bug fixes: the new version fixes both a color leak that could happen
+in certain situations and the problem that \texttt{multicols} could
+mess up the positioning of \verb=\marginpar=s that followed the
+environment.
+
+
+\paragraph{\textsf{tabularx} updates}
+
+The restrictions on embedding \verb|\tabularx| \verb|\endtabularx|
+into the definition of a new environment have been relaxed
+slightly. See the package documentation for details.
+
+\paragraph{\textsf{showkeys} updates}
+
+The \textsf{showkeys} package has been updated to fix problems if used
+at the start of list items, and to work if brace groups (\verb|{| and
+\verb|}|) are used in the optional argument of
+\verb|\cite|. (tools/4162, tools/4173)
+
+
+\paragraph{\textsf{color} updates}
+
+The \verb|\nopagecolor| command suggested by Heiko Oberdiek,
+available for some years in the \textsf{pdftex} option, has been
+added to the core package as suggested in graphics/3873. Currently
+this is supported in the driver files for \textsf{dvips} and
+\textsf{pdftex}. Patches to support other drivers are welcome.
+
+ \paragraph{\textsf{graphicx} updates}
+
+The \textsf{graphicx} version of \verb|\rotatebox| now allows
+\verb|\par| (and blank lines) in values, to match the change made
+to the \textsf{graphics} version some years ago. See graphics/4296.
+
+
+\paragraph{\textsf{keyval} updates}
+
+All parsing used in the \textsf{keyval} package has been changed
+to allow \verb|\par| (and blank lines) in values.
+(A second change, to parsing of brace groups
+in a construct such as \texttt{key=\{\{\{value\}\}\}}, was reverted in v1.15.)
+See graphics/3446.
+
+
+
+
+\vfill
+
+\section{Standard \LaTeX\ (\LaTeXe) and \textsf{expl3}}
+
+The substantial collection of innovative code in \textsf{expl3}
+implements a new programming language that has for a while now been
+used by some writers of \LaTeXe\ packages. This code has recently
+also been made available for use on top of plain \TeX\ or {\ConTeXt},
+largely to support generic packages that are supposed to work with
+different flavours of \TeX. These uses in no way affect authors of
+\LaTeX\ documents and such \LaTeXe\ packages will continue to work as
+advertised by their authors with standard \LaTeX.
+
+This code base will also become an important foundation for the kernel
+of \LaTeX3 and so the new programming language can be described as
+`The \LaTeX3 Programming Language'. However, if you see or hear that a
+package `uses \LaTeX3' then it remains very unlikely (as yet) to mean
+that the package is part of some `new version of \LaTeX'.
+
+News about the development and use of \textsf{expl3} and about other
+developments in the \LaTeX3 code base is reported regularly in the
+\LaTeX3~News series (\url{http://latex-project.org/l3news/}), the most
+recent issue of which was published in March 2014.
+
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews22.tex b/macros/latex-dev/doc/ltnews22.tex
new file mode 100644
index 0000000000..c574f60568
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews22.tex
@@ -0,0 +1,244 @@
+% \iffalse meta-comment
+%
+% Copyright 2015
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews22.tex
+%
+% This is issue 22 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\publicationmonth{January}
+\publicationyear{2015}
+
+\publicationissue{22}
+
+\begin{document}
+
+\maketitle
+
+\section{New \LaTeXe\ bug-fix policy}
+
+\subsection{Introduction}
+
+For some years we have supplied bug fixes to the \LaTeXe\ kernel via the
+\textsf{fixltx2e} package. This
+kept the kernel stable, but at the expense of meaning that most users did not
+benefit from bug fixes, and that some compromises
+which were made to save space in the
+machines of the time are still affecting most users today.
+
+In this release we have started a new update policy. All the fixes previously
+available via \textsf{fixltx2e} are now enabled \emph{by default} in the
+format, as are some further extensions for extended \TeX\ engines, \eTeX,
+\hologo{XeTeX} and \hologo{LuaTeX}. Compatibility and stability are still
+important considerations, and while most users will not notice these
+improvements, or will want to benefit from them, a new \textsf{latexrelease}
+package is provided that will revert all the changes and re-instate the
+definitions from earlier releases. The package can also be used with older
+releases to effectively \emph{update} the kernel to be equivalent to this 2015
+release.
+
+A new document, \textsf{latexchanges}, is distributed with the release
+that documents all the changes to documented commands since the 2014
+\LaTeX\ release, and will be updated in future releases if further
+changes have been made.
+
+\subsection{The \textsf{latexrelease} package}
+
+As noted above a new package is available to manage differences between \LaTeX\
+releases. If you wish to revert all changes back to the definitions as they
+were in previous releases you may start your document requesting the \LaTeX{} release from May~2014:
+\begin{verbatim}
+\RequirePackage[2014/05/01]{latexrelease}
+\documentclass{article}
+\end{verbatim}
+Conversely if you start a large project now and want to protect yourself
+against possible future changes, you may start your document
+\begin{verbatim}
+\RequirePackage[2015/01/01]{latexrelease}
+\documentclass{article}
+\end{verbatim}
+Then the version of \textsf{latexrelease} distributed with any future \LaTeX\
+release will revert any changes made in that format, and revert to the
+definitions as they where at the beginning of 2015.
+
+If you wish to share a document using the latest features with a
+user restricted to using an older
+format, you may use the form above and make the \textsf{latexrelease} package
+available on the older installation. The package will then update the format
+definitions as needed to enable the older format to work as if dated on the date
+specified in the package option.
+
+\subsection{The \cs{IncludeInRelease} command}
+
+The mechanism used in the \textsf{latexrelease} package is available for use in
+package code. If in your \textsf{zzz} package you have
+\begin{verbatim}
+\RequirePackage{latexrelease}
+\IncludeInRelease{2015/06/01}
+ {\zzz}{\zzz definition}
+ \def\zzz......new code
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}
+ {\zzz}{\zzz definition}
+ \def\zzz....original
+\EndIncludeInRelease
+\end{verbatim}
+then in a document using a format dated 2015/06/01 or later, the ``new code''
+will be used, and for documents being processed with an older format, the
+``original'' code will be used. Note the format date here may be the original
+format date as shown at the start of every \LaTeX\ run, or a format date
+specified as a package option to the \textsf{latexrelease} package.
+
+So if the document has
+\begin{verbatim}
+\RequirePackage[2014/05/01]{latexrelease}
+\documentclass{article}
+\usepackage{zzz}
+\end{verbatim}
+then it will use the \emph{original} definition of \verb|\zzz| even if
+processed with the current format, as the format acts as if dated 2014/05/01.
+
+
+\subsection{Limitations of the approach}
+
+The new concept provides full backward and forward compatibility for
+the \LaTeX{} format, i.e., with the help of a current
+\textsf{latexrelease} package the kernel can emulate all released
+formats (starting with 2014/06/01\footnote{Patching an older format
+ most likely works too, given that the changes in the past have been
+ minimal, though this isn't guaranteed and hasn't been tested.}).
+
+
+However, this is not necessarily true for all packages.
+ Only if a package makes use of the \cs{IncludeInRelease}
+functionality will it adjust to the
+requested \LaTeX{} release date. Initially this will only be true for
+a few selected packages and in general it may not even be advisable for packages
+that have their own well-established release cycles and methods.
+
+Thus, to regenerate a document with 100\,\% compatible behavior
+it will still be necessary
+to archive it together with all its inputs, for example, by archiving
+the base distribution trees (and any modifications made). However, the
+fact that a document requests a specific \LaTeX{} release date should
+help identifying what release tree to use to achieve perfect accuracy.
+
+
+\section{Updates to the kernel}
+
+\subsection{Updates incorporated from \textsf{fixltx2e}}
+
+The detailed list of changes incorporated from \textsf{fixltx2e} is
+available in the new \textsf{latexchanges} document that is
+distributed with this release. The main changes are that $2$-column
+floats are kept in sequence with one column floats, corrections are
+made to the \verb|\mark| system to ensure correct page headings in
+$2$-column documents, several additional commands are made robust.
+
+\subsection{\eTeX\ register allocation}
+
+\LaTeX\ has traditionally used allocation routines inherited from plain \TeX\
+that allocated registers in the range $0$--$255$. Almost all distributions have
+for some years used \eTeX\ based formats (or \hologo{XeTeX} or \hologo{LuaTeX})
+which have $2^{15}$ registers of each type ($2^{16}$ in the case of
+\hologo{LuaTeX}). The \textsf{etex} package has been available to provided an
+allocation mechanism for these extended registers but now the format will by
+default allocate in a range suitable for the engine being used. The new
+allocation mechanism is different than the \textsf{etex} package mechanism, and
+supports \hologo{LuaTeX}'s full range and an allocation mechanism for \LaTeX\
+floats as described below.
+
+On \eTeX\ based engines, an additional command, \verb|\newmarks| is available
+(as with the \textsf{etex} package) that allocates extended \eTeX\ marks, and
+similarly if \hologo{XeTeX} is detected a new command
+\verb|\newXeTeXintercharclass| is available, this is similar to the command
+previously defined in the \texttt{xelatex.ini} file used to build the
+\texttt{xelatex} format.
+
+\subsection{Additional \LaTeX{} float storage}
+
+\LaTeX's float placement algorithm needs to store floats (figures and tables)
+until it finds a suitable page to output them. It allocates $18$ registers for
+this storage, but this can often be insufficient.
+ The contributed \textsf{morefloats} package has
+been available to extend this list; however, it also only allocates from the
+standard range $0$--$255$ so cannot take advantage of the extended registers.
+The new allocation mechanism in this release incorporates a new command
+\verb|\extrafloats|. If you get the error:
+\mbox{\texttt{Too many unprocessed floats.}}
+then you can add (say) \verb|\extrafloats{500}| to the document preamble to
+make many more boxes available to hold floats.
+
+
+\subsection{Built-in support for Unicode engines}
+
+The kernel sources now detect the engine being used and adjust definitions
+accordingly, this reduces the need for the ``\texttt{.ini}'' files used to make
+the formats to patch definitions defined in \texttt{latex.ltx}.
+
+As noted above the format now includes extended allocation routines.
+
+The distribution includes a file \textsf{unicode-letters.def} derived from the
+Unicode Consortium's Unicode Character Data files that details the upper and
+lower case transformation data for the full Unicode range. This is used to set
+the \verb|lccode| and \verb|uccode| values if a Unicode engine is being used,
+rather than the values derived from the T1 font encoding which are used with
+8-bit engines.
+
+Finally \verb|\typein| is modified if \hologo{LuaTeX} is detected
+such that it works with this engine.
+
+\section{l3build}
+
+This release has been tested and built using a new build system implemented in
+\textsf{Lua}, intended to be run on the \textsf{texlua} interpreter distributed
+with modern \TeX\ distributions. It is already separately available
+from CTAN. This replaces earlier build systems (based at various times on
+\textsf{make}, \textsf{cons}, and Windows \textsf{bat} files). It allows the
+sources to be tested and packaged on a range of platforms (within the team,
+OS X, Windows, Linux and Cygwin platforms are used). It also allows the
+format to be tested on \hologo{XeTeX} and \hologo{LuaTeX} as well as the
+standard \hologo{pdfTeX}/\eTeX\ engines.
+
+\section{Hyperlinked documentation and TDS zip files}
+
+As well as updating the build system, the team have looked again at exactly
+what gets released to \textsc{ctan}. Taking inspiration from Heiko Oberdiek's
+\textsf{latex-tds} bundle, the PDF documentation provided now includes
+hyperlinks where appropriate. This has been done without modifying the sources
+such that users without \textsf{hyperref} available can still typeset the
+documentation using only the core distribution. At the same time, the release
+now includes ready-to-install TDS-style zip files. This will be of principal
+interest to \TeX\ system maintainers, but end users with older machines who
+wish to manually update \LaTeX\ will also benefit.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews23.tex b/macros/latex-dev/doc/ltnews23.tex
new file mode 100644
index 0000000000..149bd1a74b
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews23.tex
@@ -0,0 +1,257 @@
+% \iffalse meta-comment
+%
+% Copyright 2015
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews23.tex
+%
+% This is issue 23 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\makeatletter % -- provide command introduced in new release
+ % so this typesets with an old format
+
+% Check we are not in the preamble of a composite document
+\def\@tempa{\@latex@error{Can be used only in preamble}\@eha}
+\ifx\DeclareTextCommandDefault\@tempa
+\else
+ \DeclareTextCommandDefault\textcommabelow[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
+ \hbox{\check@mathfonts\fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+\fi
+\makeatother
+
+\publicationmonth{October}
+\publicationyear{2015}
+
+\publicationissue{23}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Enhanced support for \hologo{LuaTeX}}
+
+As noted in \LaTeX\ News 22, the 2015/01/01 release of \LaTeX{}
+introduced built-in support for extended \TeX\ systems.
+
+The range of allocated register numbers (for example, for count
+registers) is now set according to the underlying engine capabilities
+to 256, 32768 or 65536. Additional allocators were also added for the
+facilities added by \hologo{eTeX} (\verb|\newmark|) and \hologo{XeTeX}
+(\verb|\newXeTeXintercharclass|). At that time, however, the work to
+incorporate additional allocators for \hologo{LuaTeX} was not ready for
+distribution.
+
+The main feature of this release is that by default it includes
+allocators for \hologo{LuaTeX}-provided features, such as Lua
+functions, bytecode registers, catcode tables and Lua callbacks.
+Previously these features have been provided by the contributed
+\package{luatex} (Heiko Oberdiek) and \package{luatexbase}
+(\'{E}lie Roux,
+ Manuel P\'{e}gouri\'{e}-Gonnard and Philipp Gesang)
+packages. However, just as
+noted with the \package{etex} package in the previous release, it is
+better if allocation is handled by the format to avoid problems with
+conflicts between different allocation schemes, or definitions made
+before a package-defined allocation scheme is enabled.
+
+The facilities incorporated into the format with this release, and
+described below, are closely modelled on the \package{luatexbase}
+package and we thank the authors, and especially \'{E}lie Roux, for
+help in arranging this transition.
+
+The implementation of these \hologo{LuaTeX} features has been
+redesigned to match the allocation system introduced in the 2015/01/01
+\LaTeX\ release, and there are some other differences from the previous
+\package{luatexbase} package. However, as noted below,
+\package{luatexbase} is being updated in line with this \LaTeX\ release
+to provide the previous interface as a wrapper around the new
+implementation, so we expect the majority of documents using
+\package{luatexbase} to work without change.
+
+\subsection{Names of \hologo{LuaTeX} primitive commands}
+
+The 2015/01/01 \LaTeX\ release for the first time initialised
+\hologo{LuaTeX} in \textsf{latex.ltx} if \hologo{LuaTeX} is being
+used. Following the convention used in the contributed
+\textsf{lualatex.ini} file used to set up the format for earlier
+releases, most \hologo{LuaTeX}-specific primitives were defined with
+names prefixed by \texttt{luatex}. This was designed to minimize name
+clashes but had the disadvantage that names did not match the
+\hologo{LuaTeX} manual, or the names used in other formats, and
+produced some awkward command names such as \verb|\luatexluafunction|.
+From this release the names are enabled without the \texttt{luatex}
+prefix.
+
+In practice this change should not affect many documents; relatively
+few packages access the primitive commands, and many of those are
+already set up to work with prefixed or unprefixed names, so that they
+work with multiple formats.
+
+For package writers, if you want to ensure that your code works with
+this and earlier releases, use unprefixed names in the package and
+ensure that they are defined by using code such as:
+\begin{verbatim}
+\directlua{tex.enableprimitives("",
+ tex.extraprimitives(
+ "omega", "aleph", "luatex"))}
+\end{verbatim}
+Conversely if your document uses a package relying on prefixed names
+then you can add:
+\begin{verbatim}
+\directlua{tex.enableprimitives("luatex",
+ tex.extraprimitives(
+ "omega", "aleph", "luatex"))}
+\end{verbatim}
+to your document.
+
+Note the compatibility layer offered by the \package{luatexbase} package
+described below makes several commands available under both names.
+
+As always, this change can be reverted using:\\
+\verb|\RequirePackage[2015/01/01]{latexrelease}|\\
+at the start of the document.
+
+
+
+\subsection{\TeX\ commands for allocation in \hologo{LuaTeX}}
+For detailed descriptions of the new allocation commands see the
+documented sources in \textsf{ltluatex.dtx} or chapter N of
+\textsf{source2e}; however, the following new allocation commands are
+defined by default in \hologo{LuaTeX}:
+\verb|\newattribute|,
+\verb|\newcatcodetable|,
+\verb|\newluafunction| and
+\verb|\newwhatsit|.
+In addition, the commands \verb|\setattribute| and
+\verb|\unsetattribute| are defined to set and unset Lua attributes
+(integer values similar to counters, but attached to nodes). Finally
+several catcode tables are predefined:
+\verb|\catcodetable@initex|,
+\verb|\catcodetable@string|,
+\verb|\catcodetable@latex|,
+\verb|\catcodetable@atletter|.
+
+\subsection{Predefined Lua functions}
+If used with \hologo{LuaTeX}, \LaTeX\ will initialise a Lua table,
+\textsf{luatexbase}, with functions supporting allocation and also
+the registering of Lua callback functions.
+
+\subsection{Support for older releases and plain \TeX}
+The \hologo{LuaTeX} allocation functionality made available in this
+release is also available in plain \TeX\ and older \LaTeX\ releases
+in the files \textsf{ltluatex.tex} and \textsf{ltluatex.lua} which may be
+used simply by including the \TeX\ file: \verb|\input{ltluatex}|.
+An alternative for old \LaTeX\ releases is to use:\\
+\verb|\RequirePackage[2015/10/01]{latexrelease}|\\
+which will update the kernel to the current release, including
+\hologo{LuaTeX} support.
+
+\subsection{Additional \hologo{LuaTeX} support packages}
+In addition to the base \LaTeX\ release two packages have been
+contributed to the \textsf{contrib} area on CTAN. The
+\package{ctablestack} package offers some commands to help package
+writers control the \hologo{LuaTeX} \textsf{catcodetable}
+functionality, and the \package{luatexbase} package replaces the
+previously available package of the same name, providing a compatible
+interface but implemented over the \package{ltluatex} code.
+
+\section{More Floats and Inserts}
+If \hologo{eTeX} is available, the number of registers allocated in
+the format to hold floats such as figures is increased from 18 to 52.
+
+The extended allocation system introduced in 2015/01/01 means that in
+most cases it is no longer necessary to load the \package{etex}
+package. Many classes and packages that previously loaded this package
+no longer do so. Unfortunately in some circumstances where a package
+or class previously used the \package{etex} \verb|\reserveinserts|
+command, it is possible for a document that previously worked to
+generate an error ``no room for a new insert''. In practice this error
+can always be avoided by declaring inserts earlier, before the
+registers below 256 are all allocated. However, it is better not
+to require packages to be re-ordered and in some cases the re-ordering
+is complicated due to delayed allocations in \verb|\AtBeginDocument|.
+
+In this release, a new implementation of
+\verb|\newinsert| is used which allocates inserts from the previously
+allocated float lists once the classical register allocation has run
+out. This allows an extra 52 (or in \hologo{LuaTeX}, 64~thousand)
+insert allocations which is more than enough for practical documents
+(by default, \LaTeX\ only uses two insert allocations).
+
+\section{Updated Unicode data}
+
+
+The file \textsf{unicode-letters.def} recording catcodes, upper and
+lower case mappings and other properties for Unicode characters has
+been regenerated using the data files from Unicode~8.0.0.
+
+\section{Support for Comma Accent}
+The command \verb|\textcommabelow| has been added to the format.
+This is mainly used for the Romanian letters
+\textcommabelow{S}\textcommabelow{s}\textcommabelow{T}\textcommabelow{t}.
+This was requested in latex/4414 in the \LaTeX\ bug tracker.
+
+\section{Extended \package{inputenc}}
+The \texttt{utf8} option for \package{inputenc} has been extended to support
+the letters s and t with comma accent,
+U+0218\,--\,U+021b. Similarly circumflex w and y U+0174\,--\,U+0177 are defined.
+Also U+00a0 and U+00ad are declared by default, and defined to be
+\verb|\nobreakspace| and \verb|\-| respectively.
+
+The error message given on undefined UTF-8 input characters
+now displays the Unicode number
+in U+\textit{hex} format in addition
+to showing the character.
+
+\section{Pre-release Releases}
+The patch level mechanism has been used previously to identify \LaTeX\
+releases that have small patches applied to the main release, without
+changing the main format date.
+
+The mechanism has now been extended to allow identification of
+pre-release versions of the software (which may or may not be released
+via CTAN) but can be identified with a banner such as\\
+{\catcode`\<=13 \def<{\string<} \catcode`\>=13 \def>{\string>}%
+\verb|LaTeX2e <2015/10/01> pre-release-1|}\\
+Internally this is identified as a patch release with a negative patch
+level.
+
+\section{Updates in tools}
+
+The \package{multicol} package has been updated to fix the interaction
+with ``here'' floats that land on the same page as the start or end of
+a \textsf{multicols} environment.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews24.tex b/macros/latex-dev/doc/ltnews24.tex
new file mode 100644
index 0000000000..573f1e87c8
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews24.tex
@@ -0,0 +1,263 @@
+% \iffalse meta-comment
+%
+% Copyright 2015,2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews24.tex
+%
+% This is issue 24 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\makeatletter % -- provide command introduced in new release
+ % so this typesets with an old format
+
+% Check we are not in the preamble of a composite document
+\def\@tempa{\@latex@error{Can be used only in preamble}\@eha}
+\ifx\DeclareTextCommandDefault\@tempa
+\else
+ \DeclareTextCommandDefault\textcommabelow[1]
+ {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
+ \hbox{\check@mathfonts\fontsize\ssf@size\z@
+ \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+ \DeclareTextCommandDefault\textcommaabove[1]{%
+ \hmode@bgroup
+ \ooalign{%
+ \hidewidth
+ \raise.7ex\hbox{%
+ \check@mathfonts\fontsize\ssf@size\z@\math@fontsfalse\selectfont`%
+ }%
+ \hidewidth\crcr
+ \null#1\crcr
+ }%
+ \egroup
+ }
+\fi
+
+\makeatother
+
+\publicationmonth{February}
+\publicationyear{2016}
+
+\publicationissue{24}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{\hologo{LuaTeX} support}
+
+This release refines the \hologo{LuaTeX} support introduced in the
+2015/10/01 release. A number of patches have been added to improve the
+behavior of \package{ltluatex} (thanks largely to code review by Philipp Gesang).
+The kernel code has been adjusted to
+allow for changes in \hologo{LuaTeX} v0.85--v0.88. Most notably, newer
+\hologo{LuaTeX} releases allow more than $16$ write streams and these are now
+enabled for use by \verb|\newwrite|, but also the experimental
+\texttt{newtoken} Lua library has been renamed back to \texttt{token}
+which required small adjustments in the \hologo{LuaTeX} setup.
+
+The biggest change in \hologo{LuaTeX} v0.85--v0.87 compared to previous
+versions is that all the primitives (originally defined in
+\hologo{pdfTeX}) dealing with the PDF ``back end''
+are no longer defined, being replaced by a much smaller set of new primitives.
+This does not directly affect the core \LaTeX{}
+files in this release but has required major changes to the
+\texttt{.ini} files used by \TeX{} Live and similar distributions to
+set up the format files. These changes in the \hologo{LuaTeX} engine
+will affect any packages using these back end commands (packages such
+as \package{graphics}, \package{color}, \package{hyperref}, etc.).
+Until all contributed packages are updated to the new syntax users may
+need to add aliases for the old \hologo{pdfTeX} commands. A new
+\package{luapdftexalias} package has been contributed to CTAN (not part of the
+core \LaTeX\ release) that may be used for this purpose.
+
+See also the sections below for related changes in the
+\textsf{tools} and \textsf{graphics} bundles.
+
+
+\section{Unicode data}
+
+As noted in \LaTeX{} News~22, the 2015/01/01 release of \LaTeX{} introduced
+built-in support for extended \TeX{} systems. In particular, the kernel now
+loads appropriate data from the Unicode Consortium to set \verb|\lccode|,
+\verb|\uccode|, \verb|\catcode| and \verb|\sfcode| values in an automated
+fashion for the entire Unicode range.
+
+The initial approach taken by the team was to incorporate the existing model
+used by (plain) \hologo{XeTeX} and to pre-process the ``raw'' Unicode data into
+a ready-to-use form as \verb|unicode-letters.def|. However, the relationship
+between the Unicode Consortium files and \TeX{} data structures is non-trivial and still
+being explored. As such, it is preferable to directly parse the original
+(\verb|.txt|) files at point of use. The team has therefore ``spun-out'' both
+the data and the loading to a new generic package, \package{unicode-data}. This
+package makes the original Unicode Consortium data files available in the
+\verb|texmf| tree (in \verb|tex/generic/unicode-data|) and provides generic
+loaders suitable for reading this data into the plain, \LaTeXe{}, and other,
+formats.
+
+At present, the following data files are included in this new package:
+\begin{itemize}\parskip=0pt
+ \item \verb|CaseFolding.txt|
+ \item \verb|EastAsianWidth.txt|
+ \item \verb|LineBreak.txt|
+ \item \verb|MathClass.txt|
+ \item \verb|SpecialCasing.txt|
+ \item \verb|UnicodeData.txt|
+\end{itemize}
+These files are used either by \LaTeXe{} or by \package{expl3}
+(i.e.~they represent the set currently required by the team). The
+Unicode Consortium provides various other data files and we would be happy to add
+these to the generic package, as it is intended to provide a single place
+to collect this material in the \verb|texmf| tree. Such requests can be
+mailed to the team as~usual or logged at the package home page:
+\url{https://github.com/latex3/unicode-data}.
+
+The new approach extends use of Unicode data in setting \TeX{} information in
+two ways. First, the \verb|\sfcode| of all end-of-quotation/closing punctuation
+is now set to $0$ (transparent to \TeX{}). Second, \verb|\Umathcode| values are
+now set using \verb|MathClass.txt| rather than setting up only letters (which
+was done using an arbitrary plane~$0$/plane~$1$ separation). There are also
+minor refinements to the existing code setting, particularly splitting the
+concepts of case and letter/non-letter category codes.
+
+For \hologo{XeTeX}, users should note that \verb|\xtxHanGlue| and
+\verb|\xtxHanSpace| are \emph{no longer defined}, that no assignments are made
+to \verb|\XeTeXinterchartoks| and that no \verb|\XeTeXintercharclass| data is
+loaded into the format. The values which were previously inherited from
+the plain \hologo{XeTeX} setup files are \emph{not} suitable for properly
+typesetting East Asian text. There are third-party packages addressing this
+area well, notably those in the \package{CTeX} bundle. Third-party packages
+may need adjustment to load the data themselves; see the \textsf{unicode-data}
+package for one possible loader.
+
+\section{More support for east European accents}
+
+As noted in \LaTeX{} News~23, comma accent support was added for \texttt{s} and
+\texttt{t} in the 2015/10/01 release. In this release a matching
+\verb|\textcommaabove| accent has been added for U+0123 (\verb|\c{g}|,
+\textcommaabove{g}) which is the lower case of U+0122 (\verb|\c{G}|,
+\textcommabelow{G}). In the OT1 and T1 encodings the combinations are
+declared as composites with the \verb|\c| command, which matches the
+Unicode names ``\textsf{latin (capital|small) letter g with cedilla}'' and
+also allows \verb|\MakeUppercase{\c{g}}| to produce \verb|\c{G}|, as
+required. In T1 encoding, the composite of \verb|\c| with \texttt{k}, \texttt{l},
+\texttt{n} and \texttt{r} are also
+declared to use the comma below accent rather than cedilla to match the
+conventional use of these letters.
+
+The UTF-8 \texttt{inputenc} option \texttt{utf8} has been extended to
+support all latin combinations that can be reasonably constructed with a
+(single) accent command an a base character for the T1 encoding so
+\textcommaabove{g}, \k{u} and similar characters may be directly input
+using UTF-8 encoding.
+
+\section{Changes in Graphics}
+
+The changes in \hologo{LuaTeX}~v0.87 mean that the \package{color} and
+\package{graphics} packages no longer share the \texttt{pdftex.def} file
+between \hologo{LuaTeX} and \hologo{pdfTeX}. A separate file
+\texttt{luatex.def} (distributed separately) has been produced, and
+distributions are encouraged to modify \texttt{graphics.cfg} and
+\texttt{color.cfg} configuration files to default to the \texttt{luatex}
+option if \hologo{LuaTeX}~v0.87 or later is being used. The team has
+contributed suitable \texttt{.cfg} files to CTAN to be used
+as models.
+
+Normally it is best to let the local \texttt{graphics.cfg}
+automatically supply the right option depending on the \TeX\ engine
+being used; however the \package{color} and \package{graphics} (and so
+\package{graphicx}) packages have been extended to have an explicit
+\texttt{luatex} option comparable to the existing \texttt{pdftex} and
+\texttt{xetex} options.
+
+The \package{trig} package has been updated so that pre-computed values
+such as $\sin(90)$ now expand to digits (\texttt{1} rather than the
+internal token \verb|\@one| in this case). This allows them to be used
+directly in PDF literal strings.
+
+\section{Changes in Tools}
+
+\hologo{LuaTeX} from version v0.87 no longer supports the
+\verb|\write18| syntax to access system commands. A new package
+\package{shellesc} has been added to \textsf{tools} that defines a new
+command \verb|\ShellEscape| that may be used in all \TeX\ variants to
+provide a consistent access to system commands. The package also
+defines \verb|\write18| in \hologo{LuaTeX} so that it continues to access
+system commands as before; see the package documentation for details.
+
+\section{Improving support for Unicode engines}
+
+\looseness=-1
+Stability concerns are always paramount when considering any change to
+the \LaTeXe{} kernel. At the same time, it is important that the format
+remains usable and gives reliable results for users. For the Unicode
+\TeX{} engines \hologo{XeTeX} and \hologo{LuaTeX} there are important
+differences in behavior from classical ($8$-bit) \TeX{} engines which
+mean that identical default behaviors are not appropriate. Over the
+past 18 months the team has addressed the most pressing of these
+considerations (as detailed above and in \LaTeX{} News~22 and 23),
+primarily by integrating existing patches into the kernel. There are,
+though, important areas which still need consideration, and which
+\emph{may} result in refinements to kernel support in this area in
+future releases.
+
+The default font setup in \LaTeXe{} at present is to use the \texttt{OT1}
+encoding. This assumes that hyphenation patterns have been read using
+appropriate codes: the \texttt{T1} encoding is assumed. The commonly-used
+hyphenation patterns today, \package{hyph-utf8}, are set up in this
+way for $8$-bit engines (\hologo{pdfTeX}) but for Unicode engines use
+Unicode code points. This means that hyphenation will be incorrect
+with Unicode engines unless a Unicode font is loaded. This requires
+a concept of a Unicode font encoding, which is currently provided by
+the \package{fontspec} package in two versions, \texttt{EU1} and
+\texttt{EU2}. The team is working to fully understand what is meant
+by a ``Unicode font encoding'', as unlike a classical \TeX{} encoding
+it is essentially impossible to know what glyphs will be provided
+(though each slot is always defined with the same meaning). There
+is also an overlap between this area and ideas of language and writing
+system, most obviously in documents featuring mixed scripts (for example
+Latin and Cyrillic).
+
+As well as these font considerations, the team is also exploring
+to what extent it is possible to allow existing ($8$-bit)
+documents to compile directly with Unicode engines without requiring
+changes in the sources. Whether this is truly possible remains an open
+question.
+
+It is important to stress that changes will only be made in this area where
+they do \emph{not} affect documents processed with
+\hologo{eTeX}/\hologo{pdfTeX} (i.e.~documents which are written for
+``classical'' $8$-bit \TeX{} engines). Changes will also be made only where
+they clearly address deficiencies in the current setup for Unicode engines
+(i.e.~where current behaviors are wrong).
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews25.tex b/macros/latex-dev/doc/ltnews25.tex
new file mode 100644
index 0000000000..e32187e702
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews25.tex
@@ -0,0 +1,137 @@
+% \iffalse meta-comment
+%
+% Copyright 2016
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews25.tex
+%
+% This is issue 25 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+
+\publicationmonth{March}
+\publicationyear{2016}
+
+\publicationissue{25}
+
+\begin{document}
+
+\maketitle
+
+\section{Lua\TeX}
+This \LaTeX\ release sees several internal changes designed to ensure
+that the system is still usable with Lua\TeX\ versions greater than
+0.80, which have introduced many changes into the engine, most notably
+the removal or renaming of most of the primitive commands introduced by
+pdf\TeX. Also the lists of Lua callbacks handled by the callback
+allocation mechanism has been updated to match the callbacks defined
+in Lua\TeX\ version 0.90.
+
+These changes have also required updates in \textsf{tools}
+and \textsf{amsmath} as described below.
+
+This is the first release of \LaTeX\ for which the test suite reports
+no failures when used with Lua\TeX.
+
+\section{Documentation checksums}
+The \package{doc} package has always provided two mechanisms that were
+mainly intended to guard against file truncation or corruption when
+files were commonly distributed by email through unreliable mail
+gateways: a Character Table of the ASCII character set could be
+inserted (and checked) and a ``checksum'' (count of the number of
+backslashes in the code sections) could be checked. These features
+are not really needed with modern distribution mechanisms and can be a
+distraction when reading the source code and so have been removed. The
+\package{doc} package has been updated so that if you use a
+\verb|\CheckSum| command then, as before, the number is checked;
+however, if you omit the command then no error or warning is given.
+
+
+\section{Updates to \package{inputenc}}
+
+The UTF-8 support in \package{inputenc} has been further extended with
+support for non-breaking hyphens and more dashes.
+
+\section{Updates in Tools}
+
+The \package{varioref} package has been updated with improved
+documentation of multi\-lingual support, and avoiding unnecessary warnings in
+some cases with \verb|\reftextfaraway|.
+
+The \package{tabularx} package's handling of \verb|\endtabularx| in
+environment definitions has been fixed to again match its documentation.
+
+The \package{bm} package has been updated as required by the changes
+to \verb|\mathchardef| in Lua\TeX.
+
+
+\section{amsmath}
+
+Since the launch of \LaTeXe\ in 1993, the \textsf{amsmath} bundle has
+been part of the \emph{required} packages in the core \LaTeX\
+distribution, with bug reports handled by the \LaTeX\ bug database at
+\url{https://latex-project.org/bugs-upload.html}.
+
+The \textsf{amsmath} packages and the \textsf{amscls} classes have
+been maintained by the American Mathematical Society.
+
+With this release a new arrangement has been agreed between the
+American Mathematical Society and the \LaTeX3 project. The \LaTeX3
+project will take over maintenance of the \textsf{amsmath} bundle,
+with the American Mathematical Society retaining maintenance of
+\textsf{amscls}.
+
+The recommended installation of these files in the \TeX\ directory
+structure remains unchanged as \path|tex/latex/amsmath| and
+\path|tex/latex/amscls| respectively.
+
+This release of \package{amsmath} includes several updates so that
+\package{amsmath} does not generate errors when math is used with
+Lua\TeX\ v0.87+, which has changes to \verb|\mathchardef| that are
+incompatible with the previous version of \package{amsmath}. It also
+improves \verb|\dots| handling so that \verb|\long| macros are
+correctly handled (for example, \verb|\dots \Rightarrow| now
+uses centered dots), as well as commands expanding to character tokens
+(for example, \verb|\times \dots \times| will use centered dots with
+\verb|\times| defined as in the \package{unicode-math} package).
+
+\section{Related updates}
+In addition to the updates in the core \LaTeX\ release, some files in
+the CTAN ``contrib'' area have also been updated. Notably there have
+been further updates to the \textsf{unicode-data} files; also, the
+files required to build plain and \LaTeX\ formats have now been
+submitted to CTAN as \textsf{tex-ini-files}. The
+addition of a new \texttt{luatex} option for \textsf{graphics}-related
+packages (\textsf{luatex-def} on CTAN) has required updates to the
+configuration files to select a
+default option and these have similarly been uploaded to CTAN as
+\textsf{graphics-cfg}. (Previously these files were maintained
+directly in the \TeX\ Live repository, and were not available on CTAN.)
+\end{document} \ No newline at end of file
diff --git a/macros/latex-dev/doc/ltnews26.tex b/macros/latex-dev/doc/ltnews26.tex
new file mode 100644
index 0000000000..3dc40ffb73
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews26.tex
@@ -0,0 +1,239 @@
+% \iffalse meta-comment
+%
+% Copyright 2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews26.tex
+%
+% This is issue 26 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\publicationmonth{January}
+\publicationyear{2017}
+
+\publicationissue{26}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\setlength\rightskip{0pt plus 3em}
+\section{\eTeX{}}
+
+In \LaTeX{} News~16 (December 2003) the team announced
+\begin{quotation}
+We expect that within the next two years, releases of \LaTeX{} will
+change modestly in order to run best under an extended \TeX{} engine
+that contains the \eTeX{} primitives, e.g., \eTeX{} or pdf\TeX{}.
+\end{quotation}
+and also said
+\begin{quotation}
+Although the current release does not \emph{require} \eTeX{} features, we
+certainly recommend using an extended \TeX{}, especially if you need to debug
+macros.
+\end{quotation}
+
+For many years the team have worked on the basis that users will have \eTeX{}
+available but had not revisited the above statements formally. As of the
+January 2017 release of \LaTeXe{}, \eTeX{} is \emph{required} to build the
+format, and attempting to build a format without the extensions will fail.
+
+Practically, modern \TeX{} distributions provide the extensions in all engines
+other than the ``pure'' Knuth \texttt{tex}, and indeed parts of the
+format-building process already require \eTeX{}, most notably some of the UTF-8
+hyphenation patterns. As such, there should be no noticeable effect on users of
+this change.
+
+The team expect to make wider use of \eTeX{} within the kernel in future;
+details will be announced where they impact on end users in a visible way.
+
+\section{Default encodings in \hologo{XeLaTeX} and \hologo{LuaLaTeX}}
+The default encoding in \LaTeX\ has always been the original
+128-character encoding \texttt{OT1}. For Unicode based \TeX\ engines, this
+is not really suitable, and is especially problematic with
+\hologo{XeLaTeX} as in the major distributions this is built with
+Unicode based hyphenation patterns in the format. In practice this has
+not been a major problem as documents use the contributed
+\textsf{fontspec} package in order to switch to a
+Unicode encoded font.
+
+In this release we are adding \texttt{TU} as a new supported
+encoding in addition to the previously supported encodings such as \texttt{OT1}
+and \texttt{T1}. This denotes a Unicode based font encoding. It is essentially
+the same as the \texttt{TU} encoding that has been on trial with the
+experimental \texttt{tuenc} option to \textsf{fontspec} for the past
+year.
+
+The \hologo{XeLaTeX} and \hologo{LuaLaTeX} formats will now default
+to \texttt{TU} encoding and \texttt{lmr} (Latin Modern) family. In the
+case of \hologo{LuaLaTeX} the contributed \textsf{luaotfload} Lua
+module will be loaded at the start of each run to enable the loading
+of OpenType fonts.
+
+The \textsf{fontspec} package is being adjusted in a companion release
+to recognise the new encoding default arrangements.
+
+Note that in practice no font supports the full Unicode range, and so
+\texttt{TU} encoded fonts, unlike fonts specified for \texttt{T1}, may be
+expected to be incomplete in various ways. In the current release the file
+\texttt{tuenc.def} that implements the \texttt{TU} encoding-specific commands
+has made some basic assumptions for (for example) default handling of
+accent commands, and the set of command names is derived from the
+command names used for the UTF-8 support in the \textsf{inputenc} package,
+restricted roughly to the character ranges classically provided by
+the \texttt{T1} and \texttt{TS1} encodings, but is part of a longer term plan
+seen over recent releases to increase support for Unicode based \TeX\ engines
+into the core \LaTeX\ support.
+
+
+
+If for any reason you need to process a document with the previous
+default \texttt{OT1} encoding, you may switch encoding in the usual ways, for
+example
+\begin{verbatim}
+\usepackage[OT1]{fontenc}
+\end{verbatim}
+or you may roll back all the changes for this release by starting the
+document with
+\begin{verbatim}
+\RequirePackage[2016/12/31]{latexrelease}
+\end{verbatim}
+
+\section{\cs{showhyphens} in \hologo{XeLaTeX}}
+Due to the way \hologo{XeLaTeX} interfaces to font libraries, the
+standard definition of \cs{showhyphens} does not work. A variant
+definition has been available in the contributed \textsf{xltxtra}
+package, however a (slightly different) definition for \cs{showhyphens}
+is now included in \hologo{XeLaTeX} by default. As usual
+this change will be undone if an earlier
+release is specified using the \textsf{latexrelease} package.
+
+\section{The \textsf{fixltx2e} package}
+As described in \LaTeX{} News~22, the \textsf{fixltx2e} package has become
+obsolete with the new update policy. Since 2015 it has just made a
+warning and exited. In this release we have re-introduced all
+the code from the original fixes in the 2014 \LaTeX\ but guarded by
+\verb|\IncludeInRelease{2015/01/01}|.
+So for current releases \textsf{fixltx2e} still just displays a warning
+but for old releases, whether that is an old format, or a format with
+the version date reset via the \textsf{latexrelease} package, the
+fixes in the original \textsf{fixltx2e} will be applied.
+
+This improves the ability to run old documents in a way that is compatible
+with contemporary formats. If you have a 2014 document that used
+\verb|\usepackage{fixltx2e}| and you add
+\verb|\RequirePackage[2014/01/01]{latexrelease}| and process it with the
+current format then \textsf{latexrelease} will undo most changes made
+since 2014, but now when the document includes \textsf{fixltx2e} it
+will act like a 2014 version of the package and apply the code fixes,
+not just give a warning that the package is obsolete.
+
+\section{The \textsf{latexbug} package}
+
+As explained in more detail
+at the \LaTeX\ Project
+ website\footnote{\url{https://www.latex-project.org/bugs/}}
+a new package, \textsf{latexbug}, has been produced to help produce
+test files to accompany bug reports on the core \LaTeX\ distribution.
+This is being published separately to CTAN at the same time as this
+release. By using the \textsf{latexbug} package you can easily check
+that the packages involved in the test are all part of the core
+release. The \LaTeX\ project cannot handle bug reports on contributed
+packages, which should be directed to the package maintainer as given
+in the package documentation.
+
+\section{Updates to \textsf{amsmath}}
+The \textsf{amsmath} package has two updates at this release.
+\begin{itemize}
+\item The spacing to the left of the \texttt{aligned} and
+ \texttt{gathered} environments has been fixed: the spurious thin
+ space is no longer added by default. Package options control this
+ to revert to the original behaviour where required; see the
+ \textsf{amsldoc} guide for further details.
+\item The large delimiters around generalised fractions (for example
+ in the \cs{binom} construct) did not work in previous releases if
+ using \hologo{LuaTeX} or \hologo{XeTeX} with OpenType math fonts. This is
+ related to the lack of specific metrics for this use in the OpenType Math
+ table. In principle \hologo{LuaTeX} has two additional named metrics
+ to control the delimiters but these are not initialised by default,
+ and in \hologo{XeTeX} it does not seem possible to make them work at all.
+ So for Unicode \TeX\ systems, a new implementation of
+ \cs{genfrac} is used at this release that uses \verb|\left\right|
+ internally but parameterised to give spacing as close to the
+ original as possible. The implementation in (pdf)\TeX\ is
+ unaffected.
+\end{itemize}
+
+\section{Updates to \textsf{tools}}
+The \textsf{array} package has been updated to fix a longstanding but
+previously unreported issue with unwanted interactions between tables
+in the page head or foot and the body of the page, as reported in
+\href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=tools/4488}{PR
+ tools/4488}.
+There is also an update to the \hologo{LuaTeX} support in \textsf{bm}.
+
+\section{An addendum to the release changes in 2015: page breaks and vertical spacing}
+
+In 2015 we announced the introduction of the roll-back\slash
+roll-forward concept to manage bug fixes and additions to core
+\LaTeX{} in a manageable way. We also announced at that time
+that we now incorporate all fixes from \textsf{fixltx2e} into the
+kernel (as the old mechanism produced problems instead of improving
+the situation). Refer to
+\href{https://www.latex-project.org/news/latex2e-news/ltnews22.pdf}{\texttt{ltnews22.pdf}}
+for details.
+
+One of the fixes from \textsf{fixltx2e} was for a glaring bug in
+\cs{addvspace} that was originally detected in the mid-nineties and
+back then added to the \textsf{fixltx2e} support package. In certain
+situations \cs{addvspace} would result in a page/column break below
+the baseline of the last line. As a result documents using
+\cs{flushbottom} would show a clear misalignment (even more prominent
+when typesetting in two-column mode).
+
+Starting with release 2015/01/01 this is now finally corrected already
+in the kernel and not only in \textsf{fixltx2e}. In nearly all
+circumstances this will either make no difference to existing
+documents, or it will locally improve the visual appearance of that
+document without changing anything on other pages. However, by the
+nature of the change it is also possible that there are further
+non-local changes to the page breaks due to the different break
+positions introduced by the fix.
+
+Thus, for documents that have been written before 2015 and that should
+be preserved unchanged at all costs you may have to add
+\begin{verbatim}
+\RequirePackage[2014/01/01]{latexrelease}
+\end{verbatim}
+at the top of the document, to roll back the format to a date before
+the policy change.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews27.tex b/macros/latex-dev/doc/ltnews27.tex
new file mode 100644
index 0000000000..93281c1912
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews27.tex
@@ -0,0 +1,135 @@
+% \iffalse meta-comment
+%
+% Copyright 2017
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews27.tex
+%
+% This is issue 27 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\publicationmonth{April}
+\publicationyear{2017}
+
+\publicationissue{27}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\setlength\rightskip{0pt plus 3em}
+
+\section{ISO 8601 Date format}
+Since before the first releases of \LaTeXe, \LaTeX\ has used a date
+format in the form \textsc{yyyy/mm/dd}. This has many advantages over more
+conventional formats, as it is easy to sort and avoids the unfortunate
+ambiguity between different communities as to whether 01/02/2017 is the
+1st of February or 2nd of January.
+
+However there is another date format, formalised by the
+International Standard ISO~8601. The basic format defined by this
+standard is functionally equivalent to the \LaTeX\ format, but using
+\texttt{-} rather than \texttt{/}. This date format is now supported
+in many Operating Systems and applications
+(for example the \verb|date --iso-8601| command in Linux and similar systems).
+
+From this release, \LaTeX\ will accept ISO format date strings in the
+date argument of \verb|\ProvidesPackage|, \verb|\usepackage|, etc.
+Currently we recommend that you do not use this format in any packages
+that need to work with older \LaTeX\ releases;
+the \textsf{latexrelease} package may be used with older releases to
+ add this functionality. This change is handled in a special way by
+ \textsf{latexrelease}: The package always adds support for ISO dates
+whatever format date is requested; this is required so that the
+necessary date comparisons may be made.
+
+The new functionality can be seen in the startup banner which
+advertises \texttt{LaTeX2e <2017-04-15>}.
+
+\section{Further TU encoding improvements}
+The 2017/01/01 release saw the introduction of the new TU encoding for
+specifying Unicode fonts with \hologo{LuaTeX} and
+\hologo{XeTeX}. There were a number of small corrections and additions
+in the patch releases updating 2017/01/01, and a further addition in
+this release, notably extended support for the dot-under accent,
+\verb|\d|.
+
+
+\section{Disabling hyphenation}
+The existing \LaTeX\ code for \verb|\verb| and \verb|verbatim| had some
+issues when used with fonts that were not loaded with hyphenation
+disabled via setting \verb|\hyphenchar| to $-1$. In this release these
+verbatim environments use a \verb|\language| setting,
+\verb|\l@nohyphenation|, that has no hyphenation patterns associated.
+
+The format ensures that a language has been allocated with this name.
+For most users this will in fact be no change as the standard
+\textsf{babel} language has for a long time allocated a language with
+this name.
+
+In order that page breaks in \texttt{verbatim} do not influence the
+language used in the page head and foot, the format now normalises the
+language used in the output routine to a default language as described
+below.
+
+\section{Discretionary hyphenation}
+The \LaTeX\ definition of \verb|\-| has been adjusted so that it will
+insert the current font's \verb|\hyphenchar|, as would the
+\TeX\ primitive. A comment in \textsf{source2e} has given
+this new definition since the first releases of \LaTeXe, and in this
+release we finally acted upon this comment. Previously \verb|\-|
+always inserted a \texttt{-} at a break point even if a different
+character would be used for automatic hyphenation with the current font.
+
+\section{Default document language}
+
+A new integer parameter \verb|\document@default@language| is
+introduced; this is initialised to $-1$ but is set at
+\verb|\begin{document}| to the language in force at that time if it
+ has not been set by preamble code. This is very similar to the
+ handling of the default color, and is used in a similar way to
+ normalise the settings for page head and foot as described above.
+Users should not normally need to set this explicitly but it is expected that
+language packages such as \textsf{babel} may set this if the default
+behaviour is not suitable.
+
+\section{Line spacing in parboxes}
+Inside a \verb|\parbox|
+\LaTeX\ normalises the baseline spacing. However it has not
+previously reset \verb|\lineskiplimit|. This meant that
+lines of a paragraph that have ascenders or descenders could be set
+with \emph{closer} line spacing than lines without. This can easily
+happen if you use a \verb|\parbox| in an AMS alignment, as they use a
+relatively large value of \verb|\lineskiplimit|.
+As usual, the \textsf{latexrelease} package may be used to
+force the older behavior.
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews28.tex b/macros/latex-dev/doc/ltnews28.tex
new file mode 100644
index 0000000000..92c087e6b0
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews28.tex
@@ -0,0 +1,365 @@
+% \iffalse meta-comment
+%
+% Copyright 2017-2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews28.tex
+%
+% This is issue 28 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\providecommand\acro[1]{\textsc{#1}}
+\providecommand\meta[1]{$\langle$\textit{#1}$\rangle$}
+
+
+\publicationmonth{April}
+\publicationyear{2018}
+
+\publicationissue{28}
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\setlength\rightskip{0pt plus 3em}
+
+\section{A new home for \LaTeXe{} sources}
+
+In the past the development version of the \LaTeXe{} source files has
+been managed in a Subversion source control system with read access
+for the public. This way it was possible to download in an emergency
+the latest version even before it was released to CTAN and made its
+way into the various distributions.
+
+We have recently changed this setup and now manage the sources using
+Git and placed the master sources on GitHub at
+\begin{quote}
+\url{https://github.com/latex3/latex2e}
+\end{quote}
+where we already store the sources
+for \pkg{expl3} and other work. As before, direct write access is restricted
+to \LaTeX{} Project Team members, but everything is publicly accessible
+including the ability to download, clone (using Git) or checkout
+(using SVN). More details are given in~\cite{Mittelbach:TB39-1}.
+
+\section{Bug reports for core \LaTeXe{}}
+
+For more than two decades we used GNATS, an open source bug tracking
+system developed by the FSF. While that has served us well in the past
+it started to show its age more and more. So as part of this move we
+also decided to finally retire the old \LaTeX{} bug database and replace
+it with the standard ``Issue Tracker'' available at Github.
+
+The requirements and the workflow for reporting a bug in the core
+\LaTeX{} software is documented at
+\begin{quote}
+\url{https://www.latex-project.org/bugs/}
+\end{quote}
+and with further details also discussed in~\cite{Mittelbach:TB39-1}.
+
+
+\section{UTF-8: the new default input encoding}
+
+The first \TeX{} implementations only supported reading 7-bit
+\acro{ascii} files---any accented or otherwise ``special'' character
+had to be entered using commands, if it could be represented at
+all. For example to obtain an ``\"a'' one would enter \verb=\"a=, and to
+typeset a ``\ss'' the command \verb=\ss=. Furthermore fonts at that
+time had 128 glyphs inside, holding the \acro{ascii} characters, some
+accents to build composite glyphs from a letter and an accent, and a
+few special symbols such as parentheses, etc.
+
+With 8-bit \TeX{} engines such as \hologo{pdfTeX} this situation changed
+somewhat: it was now possible to process 8-bit files, i.e., files that
+could encode 256 different characters. However, 256 is still a fairly
+small number and with this limitation it is only possible to encode a
+few languages and for other languages one would need to change the
+encoding (i.e., interpret the character positions 0--255 in a
+different way). The first code points 0--127 were essentially normed
+(corresponding to \acro{ascii}) while the second half 128--255 would
+vary by holding different accented characters to support a certain set
+of languages.
+
+Each computer used one of these encodings when storing or interpreting
+files and as long as two computers used the same encoding it was
+(easily) possible to exchange files between them and have them
+interpreted and processed correctly.
+
+But different computers may have used different encodings and given
+that a computer file is simply a sequence of bytes with no indication for
+which encoding is intended, chaos could easily happen and has
+happened. For example, the German word ``Gr\"o\ss e'' (height) entered on a
+German keyboard could show up as ``Gr\v T\`ae'' on a different
+computer using a different encoding by default.
+
+So in summmary the situation wasn't at all good and it was clear in
+the early nineties that \LaTeXe{} (that was being developed to provide
+a \LaTeX{} version usable across the world) had to provide a solution
+to this issue.
+
+The \LaTeXe{} answer was the introduction of the \package{inputenc}
+package~\cite{Mittelbach:Brno95} through which it is possible to
+provide support for multiple encodings. It also allows to correctly
+process a file written in one encoding on a computer using a different
+encoding and even supports documents where the encoding changes
+midway.
+
+Since the first release of \LaTeXe{} in 1994, \LaTeX{} documents that
+used any characters outside \acro{ascii} in the source (i.e. any
+characters in the range of 128--255) were supposed to load
+\package{inputenc} and specify in which file encoding they were
+written and stored.
+%
+If the \package{inputenc} package was not loaded then \LaTeX{} used a
+``raw'' encoding which essentially took each byte from the input file
+and typeset the glyph that happened to be in that position in the
+current font---something that sometimes produces the right result but
+often enough will not.
+
+In 1992 Ken Thompson and Rob Pike developed the UTF-8 encoding scheme
+which enables the encoding of all Unicode characters within 8-bit sequences.
+Over time this encoding has gradually taken over the world,
+replacing the legacy 8-bit encodings used before. These days all major
+computer operating systems use UTF-8 to store their files and it
+requires some effort to explicitly store files in one of the legacy
+encodings.
+
+As a result, whenever \LaTeX{} users want to use any accented
+characters from their keyboard (instead of resorting to \verb=\"a= and
+the like) they always have to use
+\begin{verbatim}
+ \usepackage[utf8]{inputenc}
+\end{verbatim}
+in the preamble of their documents as otherwise \LaTeX{} will produce
+gibberish.
+
+\subsection{The new default}
+
+With this release, the default encoding for \LaTeX\ files has been
+changed from the ``fall through raw'' encoding to UTF-8 if used with
+classic \TeX\ or \hologo{pdfTeX}. The implementation is essentially
+the same as the existing UTF-8 support from
+\verb|\usepackage[utf8]{inputenc}|.
+
+The \hologo{LuaTeX} and \hologo{XeTeX} engines always supported the
+UTF-8 encoding as their native (and only) input encoding, so with
+these engines \package{inputenc} was always a no-op.
+
+This means that with new documents one can assume UTF-8 input and it
+is no longer required to always specify
+\verb|\usepackage[utf8]{inputenc}|. But if this line is present it
+will not hurt either.
+
+
+\subsection{Compatibility}
+
+For most existing documents this change will be transparent:
+\begin{itemize}
+\item documents using only \acro{ascii} in the input file and
+ accessing accented characters via commands;
+\item documents that specified the encoding of their file via an
+ option to the \package{inputenc} package and then used 8-bit
+ characters in that encoding;
+\item documents that already had been stored in UTF-8 (whether or not
+ specifying this via \package{inputenc}).
+\end{itemize}
+Only documents that have been stored in a legacy encoding and used
+accented letters from the keyboard \emph{without} loading
+\package{inputenc} (relying on the similarities between the input used
+and the T1 font encoding) are affected.
+
+These documents will now generate an error that they contain invalid
+UTF-8 sequences. However, such documents may be easily processed by
+adding the new command \verb|\UseRawInputEncoding| as the first line
+of the file. This will re-instate the previous ``raw'' encoding
+default.
+
+\verb|\UseRawInputEncoding| may also be used on the command line to
+process existing files without requiring the file to be edited
+\begin{verbatim}
+ pdflatex '\UseRawInputEncoding \input' file
+\end{verbatim}
+will process the file using the previous default encoding.
+
+Possible alternatives are reencoding the file to UTF-8 using a tool
+(such as recode or iconv or an editor) or adding the line
+\begin{flushleft}
+\verb= \usepackage[=\meta{encoding}\verb=]{inputenc}=
+\end{flushleft}
+to the preamble specifying the \meta{encoding} that fits the file
+encoding. In many cases this will be \texttt{latin1} or
+\texttt{cp1252}. For other encoding names and their meaning see the
+\package{inputenc} documentation.
+
+As usual, this change may also be reverted via the more general
+\package{latexrelease} package mechanism, by speciying a release date
+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
+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
+past such files would have generated a ``Missing begin document''
+error or displayed strange characters when loaded at a later stage.
+
+With the addition of UTF-8 support to the kernel it is now possible to
+identify and ignore such BOMs characters even before
+\verb=\documentclass= so that these issues will no longer be showing
+up.
+
+
+
+\section[A general rollback concept]
+ {A general rollback concept for packages and classes}
+
+ In 2015 a rollback concept for the \LaTeX{} kernel was introduced.
+ Providing this feature allowed us to make corrections to the
+ software (which more or less didn't happen for nearly two decades)
+ while continuing to maintain backward compatibility to the highest
+ degree.
+
+ In this release we have now extended this concept to
+ the world of packages and classes which was not covered
+ initially. As the classes and the extension packages have different
+ requirements compared to the kernel, the approach is different (and
+ simplified). This should make it easy for package developers to
+ apply it to their packages and authors to use when necessary.
+
+ The documentation of this new feature is given in an article
+ submitted to TUGboat and also available from our
+ website~\cite{Mittelbach:TB39-2}.
+
+
+\section[Integration of \pkg{remreset} and \pkg{chngcntr} packages]
+ {Integration of \pkg{remreset} and \pkg{chngcntr} packages
+ into the kernel}
+
+With the optional argument to \cs{newcounter} \LaTeX{} offers to
+automatically reset counters when some counter is stepped, e.g.,
+stepping a \texttt{chapter} counter resets the \texttt{section}
+counter (and recursively all other heading counters). However, what
+was until now missing was a way to undo such a link between counters
+or to link two counters after they have been defined.
+
+This can be now be done with \cs{counterwithin} and \cs{counterwithout},
+respectively. In the past one had to load the \pkg{chngcntr} package
+for this. For the programming level we also added
+\cs{@removefromreset} as the counterpart of the already existing
+\cs{@addtoreset} command. Up to now this was offered by the
+\pkg{remreset} package.
+
+\section{Testing for undefined commands}
+\LaTeX\ packages often use a test \verb|\@ifundefined| to test if a command
+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
+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|.
+
+
+\section{Changes to packages in the tools category}
+
+\subsection{\LaTeX{} table columns with fixed widths}
+
+Frank published a short paper in
+TUGboat~\cite{Mittelbach:TB38-2-213} on producing tables that have
+columns with fixed widths. The outlined approach using column
+specifiers ``\texttt{w}'' and ``\texttt{W}'' has now been integrated
+into the \pkg{array} package.
+
+\subsection{Obscure overprinting with \pkg{multicol} fixed}
+
+A rather peculiar bug was reported on StackExchange for
+\pkg{multicol}. If the column/page breaking was fully controlled by
+the user (through \cs{columnbreak}) instead of letting the environment
+do its job and if then more \cs{columnbreak} commands showed up on the
+last page then the balancing algorithm was thrown off track.
+As a result some parts of the columns did overprint each other.
+
+The fix required a redesign of the output routines used by
+\pkg{multicol} and while it ``should'' be transparent in other cases
+(and all tests in the regession test suite came out fine) there is the
+off-chance that code that hooked into internals of \pkg{multicol}
+needs adjustment.
+
+
+\section{Changes to packages in the amsmath category}
+
+With this release of \LaTeX{} a few minor issues with \pkg{amsmath}
+have been corrected.
+
+\subsection{Updated user's guide}
+
+Furthermore, \texttt{amsldoc.pdf}, the AMS user's
+guide for the \pkg{amsmath} package~\cite{amsldoc}, has been updated
+from version~2.0 to~2.1 to incorporate changes and corrections made
+between 2016 and 2018.
+
+
+\begin{thebibliography}{9}
+
+\bibitem{Mittelbach:TB39-1} Frank Mittelbach:
+ \emph{New rules for reporting bugs in the \LaTeX{} core software}.
+ In: TUGboat, 39\#1, 2018.
+ \url{https://www.latex-project.org/publications/}
+
+\bibitem{Mittelbach:Brno95} Frank Mittelbach:
+ \emph{\LaTeXe{} Encoding Interface --- Purpose, concepts, and
+ Open Problems}.
+ Talk given in Brno June 1995.
+ \url{https://www.latex-project.org/publications/}
+
+\bibitem{Mittelbach:TB39-2} Frank Mittelbach:
+ \emph{A rollback concept for packages and classes}.
+ Submitted to TUGboat.
+ \url{https://www.latex-project.org/publications/}
+
+\bibitem{Mittelbach:TB38-2-213} Frank Mittelbach:
+ \emph{\LaTeX{} table columns with fixed widths}.
+ In: TUGboat, 38\#2, 2017.
+ \url{https://www.latex-project.org/publications/}
+
+\bibitem{amsldoc} American Mathematical Society and The \LaTeX3 Project:
+ \emph{User's Guide for the \texttt{amsmath} package} (Version 2.1).
+ April 2018.
+ Available from
+ \url{https://www.ctan.org}
+ and distributed as part of every \LaTeX{} distribution.
+
+\end{thebibliography}
+
+\end{document}
diff --git a/macros/latex-dev/doc/ltnews29.tex b/macros/latex-dev/doc/ltnews29.tex
new file mode 100644
index 0000000000..1cc856aaed
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews29.tex
@@ -0,0 +1,526 @@
+% \iffalse meta-comment
+%
+% Copyright 2018
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews29.tex
+%
+% This is issue 29 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\usepackage{csquotes}
+
+\providecommand\acro[1]{\textsc{#1}}
+\providecommand\meta[1]{$\langle$\textit{#1}$\rangle$}
+
+
+\providecommand\XeTeX{\hologo{XeTeX}}
+\providecommand\LuaTeX{\hologo{LuaTeX}}
+\providecommand\pdfTeX{\hologo{pdfTeX}}
+
+\newcommand\githubissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
+ {github issue#1 #2}%
+ )}%
+ \par}
+
+% simple solution right now (just link to the first issue if there are more)
+\def\getfirstgithubissue#1 #2\relax{#1}
+
+\newcommand\sxissue[1]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
+
+\let\cls\pkg
+\newcommand\env[1]{\texttt{#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iffalse % only for TUB production
+\usepackage{graphicx}
+\makeatletter
+% Xe\TeX{} requires reflecting the first E, hence we complain if the
+% graphics package is not present. (For plain documents, this can be
+% loaded via Eplain.) Also, at Barbara's suggestion, if the current
+% font is slanted, we rotate by 180 instead of reflecting so there is at
+% least a chance to look ok. (The magic values here seem more or less
+% ok for \texttt{cmsl} and \texttt{cmti}.)
+%
+% \begin{macrocode}
+\def\tubreflect#1{%
+ \@ifundefined{reflectbox}{%
+ \TBerror{A graphics package must be loaded for \string\XeTeX}%
+ }{%
+ \ifdim \fontdimen1\font>0pt
+ \raise 1.6ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em
+ \else
+ \reflectbox{#1}%
+ \fi
+ }%
+}
+\def\tubhideheight#1{\setbox0=\hbox{#1}\ht0=0pt \dp0=0pt \box0 }
+\def\XekernbeforeE{-.125em}
+\def\XekernafterE{-.1667em}
+\DeclareRobustCommand{\Xe}{\leavevmode
+ \tubhideheight{\hbox{X%
+ \setbox0=\hbox{\TeX}\setbox1=\hbox{E}%
+ \ifdim \fontdimen1\font>0pt \def\XekernbeforeE{0em}\fi
+ \lower\dp0\hbox{\raise\dp1\hbox{\kern\XekernbeforeE\tubreflect{E}}}%
+ \kern\XekernafterE}}}
+\def\XeTeX{\Xe\TeX}
+\def\XeLaTeX{\Xe{\kern.11em \LaTeX}}
+\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\publicationmonth{December}
+\publicationyear{2018}
+
+\publicationissue{29}
+
+\begin{document}
+
+%\addtolength\textheight{4.2pc} % only for TUB
+
+\maketitle
+\tableofcontents
+
+\setlength\rightskip{0pt plus 3em}
+
+\bigskip
+
+\section{Introduction}
+
+The December 2018 release of \LaTeX{} is a maintenance release in
+which we have fixed a few bugs in the software: some are old, some
+newer, and they are mostly rather obscure.
+
+\section[Bug reports for core \LaTeXe{} and packages]
+ {Bug reports for core \LaTeXe{} and packages maintained by the Project Team}
+
+In Spring 2018 we established a new issue tracking system
+(Github issues at \url{https://github.com/latex3/latex2e/issues}) for both
+the \LaTeX{} core and the packages maintained by the
+\LaTeX{} Project Team, with an updated procedure for how to report a
+bug or problem.
+
+Initial experience with this system is good, with people who report
+problems following the guidelines and including helpful working
+examples to show the problem---thanks for doing this.
+
+The detailed requirements and the workflow for reporting a bug in the
+core \LaTeX{} software is documented at
+\begin{quote}
+\url{https://www.latex-project.org/bugs/}
+\end{quote}
+with further details and discussion in~\cite{29:Mittelbach:TB39-1}.
+
+
+\section{Changes to the \LaTeX{} kernel}
+
+\subsection{UTF-8:\ updates to the default input encoding}
+
+In the April 2018 release of \LaTeX{} we changed the default encoding
+from 7-bit \acro{ascii} to \acro{utf}-8 when using classic \TeX\ or
+\hologo{pdfTeX}; see \textit{\LaTeX{} News~28}~\cite{29:ltnews28} for
+details.
+
+Now, after half a year of experience with
+this new default,
+we have
+made a small number of adjustments to further improve the user experience.
+These include:
+\begin{itemize}
+\item
+ Some improvements when displaying error messages about \acro{utf}-8
+ characters that have not been set up for use with \LaTeX{},
+ or are invalid for some other reason;
+%
+\githubissue[s]{60, 62 and 63}
+%
+\item
+ The addition of a number of previously missing declarations for
+ characters that are in fact available with the default fonts, e.g.,
+ \cs{j} \enquote{\j} (0237), \cs{SS} \enquote{\SS} (1E9E),
+ \verb=\k{}= \enquote{\k{ }} (02DB) and \verb=\.{}= \enquote{\.{ }}
+ (02D9);
+\item
+ Correcting the names for \cs{guillemetleft}
+ \enquote{\guillemotleft} and \cs{guillemetright}
+ \enquote{\guillemotright} in all encoding files. These correct
+ names are in addition to the old (but wrong) Adobe names: Adobe
+ mistakenly called them Guillemot, which is a sea bird.
+%
+ \githubissue{65}
+%
+\item
+ Added \cs{Hwithstroke} (\enquote{\Hwithstroke}) and \cs{hwithstroke}
+ (\enquote{\hwithstroke}) necessary for typesetting Maltese.
+%
+ \sxissue{q/460110}
+\end{itemize}
+
+
+
+\subsection{Fixed \cs{verb*} and friends in \texorpdfstring{\XeTeX}{XeTeX} and \LuaTeX{}}
+
+
+The original \cs{verb*} and \texttt{verbatim*} in \LaTeX{} were coded
+under the assumption that the position of the space character (i.e.,
+\acro{ascii} 32) in a typewriter font contains a visible space glyph
+``\verb*= =''. This is correct for \pdfTeX{} with the most used font
+encodings \texttt{OT1} and \texttt{T1}. However, this unfortunately
+does not work for Unicode engines using the \texttt{TU} encoding since
+the space character slot (\acro{ascii} 32) then usually contains a real
+(normal) space, which has the effect that \cs{verb*} produces the same
+results as \cs{verb}.
+
+The \cs{verb*} code now always uses the newly introduced command
+\cs{verbvisiblespace} to produce the visible space character and this
+command will get appropriate definitions for use with the different
+engines. With \pdfTeX{} it will simply use \cs{asciispace}, which is
+a posh name for ``select character 32 in the current font'', but with
+Unicode engines the default definition is
+\begin{verbatim}
+ \DeclareRobustCommand\verbvisiblespace
+ {\leavevmode
+ {\usefont{OT1}{cmtt}{m}{n}\asciispace}}
+\end{verbatim}
+which uses the visible space from the font Computer Modern Typewriter,
+regardless of the currently chosen typewriter font. Internally the
+code ensures that the character used has exactly the same width as the
+other characters in the current (monospaced) font; thus, for example,
+code displays line up properly.
+
+It is possible to redefine this command to select your own character,
+for example
+\begin{verbatim}
+ \DeclareRobustCommand\verbvisiblespace
+ {\textvisiblespace}
+\end{verbatim}
+will select the the ``official'' visible space character of the
+current font. This may look like the natural default, but it wasn't
+chosen as our default because many fonts just don't have that Unicode
+character, or they have one with a strange shape.
+%
+\githubissue[s]{69 and 70}
+
+
+\subsection{Error message corrected}
+Trying to redefine an undefined command could in a few cases generate
+an error message with a missing space, e.g.,
+\verb=\renewcommand\1{...}= gave
+\begin{verbatim}
+ LaTeX Error: \1undefined.
+\end{verbatim}
+This is now fixed.
+%
+\githubissue{41}
+
+
+\subsection{Fixed fatal link error with \pkg{hyperref}}
+
+If an \cs{href} link text gets broken across pages, \pdfTeX{} and
+\LuaTeX{} will generate a fatal error unless both parts of the link
+are internally at the same boxing level. In two-column mode that was
+not the case if one of the pages had spanning top floats. This has now
+been changed so that the error is avoided.
+%
+\githubissue{94}
+
+
+\subsection{Avoid page breaks caused by invisible commands}
+
+Commands like \cs{label} or \cs{index} could generate a potential page
+break in places where a page break was otherwise prohibited, e.g.,
+when used between two consecutive headings. This has now been
+corrected. If for some reason you really want a break and you relied
+on this faulty behavior, you can always add one using \cs{pagebreak},
+with or without an optional argument.
+%
+\githubissue{81}
+
+
+
+\subsection{Prevent spurious spaces when reading table of contents data}
+
+When table of contents data is read in from a \texttt{.toc} file, the
+new-line character at the end of each line is converted by \TeX{} to a
+space. In normal processing this is harmless (as \TeX{} is doing this
+input reading whilst in vertical mode and each line in the file
+represents a single line (paragraph) in the table of contents. If,
+however, this is done in horizontal mode, which is sometimes the case,
+then these spaces will appear in the output. If you then omit some of
+the input lines (e.g., because you do not display \acro{toc} data below a
+certain level), then these spaces accumulate in the typeset output and
+you get surprising, and unwanted, gaps inside the text.
+
+The new code now adds a \texttt{\%} sign at the end of problematic
+lines in the \texttt{.toc} file so that \TeX{} will not generate such
+spaces that may survive to spoil the printed result. As some third
+party packages have augmented or changed the core \LaTeX{}
+functionality in that area (for example, by adding additional
+arguments to the commands in \acro{toc} files) the code uses a conservative
+approach and the \texttt{\%} signs are added only when certain
+conditions are met. Therefore some packages might require updates if
+they want to benefit from this correction, especially if they
+unconditionally overwrite \LaTeX{}'s \cs{addcontentsline} definition.
+%
+\githubissue{73}
+
+
+\subsection{Prevent protrusion in table of contents lines}
+
+In \TeX{}'s internal processing model,
+paragraph data is one of the
+major data structures. As a result,
+many things are internally modeled
+as paragraphs even if they are not conceptually
+``text paragraphs'' in
+the traditional sense.
+In a few cases this has some surprising effects
+that are not always
+for the better. One example is
+standard \acro{toc} entries,
+where you have
+heading data followed by some dot leaders and a page
+number at the right, produced, for example, from this:
+\begin{quote}
+ \contentsline {subsection}{Error message corrected}{2}{section*.7}
+\end{quote}
+The space reserved for the page number is of a fixed width, so that
+the dots always end in the same place. Well, they did end in the same
+place until the advent of protrusion support in the \TeX{} engines.
+Now, with the \pkg{microtype} package loaded, it is possible that the
+page number will protrude slightly into the margin (even though it’s
+typeset inside a box) and as a result this page number box gets
+shifted. With enough bad luck this can get you another dot in the
+line, sticking out like the proverbial sore thumb, as exhibited in the
+question on StackExchange that triggered the correction.
+
+\LaTeX{} now takes care that there will be no protrusion happening on
+such lines, even if it is generally enabled for the whole document.
+%
+\sxissue{q/172785}
+
+
+
+\subsection{Start L-R mode for \cs{thinspace} and friends}
+
+In \LaTeX{}, commands that are intended only for paragraph (L-R) mode
+are generally careful to start paragraph mode if necessary; thus they
+can be used at the start of a paragraph without surprising and
+unwanted consequences. This important requirement had been overlooked
+for a few horizontal spacing commands, such as \cs{thinspace}
+(a.k.a.\ ``\cs{,}''), and for some other support commands such as
+\cs{smash} or \cs{phantom}. Thus they ended up adding vertical space
+when used at the beginning of a paragraph or, in the case of
+\cs{smash}, creating a paragraph of their own. This has now been
+corrected, and a corresponding update has been made to the
+\pkg{amsmath} package, in which these commands are also defined.
+%
+\githubissue[s]{49 and 50}
+
+
+
+\subsection{Guarding \cs{pfill} in \pkg{doc}}
+
+For presenting index entries pointing to
+code fragments and the like,
+the \pkg{doc} package has a \cs{pfill} command that
+generates within the index a line of dots leading from
+the command name to the page or code line numbers.
+If necessary it would automatically split the entry
+over two lines. That worked well enough for a quarter century, but we
+discovered recently that it is broken inside
+the \cls{ltugboat} class,
+where it sometimes produces
+bad spacing within continuation lines.
+
+The reason turned out to be a redefinition of the \LaTeX{} command
+\cs{nobreakspace} (\verb=~=) inside the class \cls{ltugboat}, which
+removed any preceding space (and thus unfortunately also removed the
+dots on the continuation line). While one can argue that this is a
+questionable redefinition (if only done by a single class and not generally),
+it has been in the class so long that changing it would
+certainly break older documents. So instead we now guard against that
+removal of space.
+%
+\githubissue[s]{25 and 75}
+
+
+
+
+
+\section{Changes to packages in the \pkg{tools} category}
+
+\subsection{Sometimes the \pkg{trace} package turned off too much}
+
+The \pkg{trace} package is a useful little tool for tracing macro
+execution: it hides certain lengthy and typically uninteresting
+expansions resulting from font changes and similar activities.
+However, it had the problem that it also reset other tracing settings
+such as \cs{showoutput} in such situations, so that you couldn't use
+\cs{showoutput} in the preamble to get symbolic output of all the
+pages in the document. This has now been corrected.
+
+
+
+
+\subsection{Update to \pkg{xr}}
+
+The \pkg{xr} package has been updated so that the code that reads the
+\texttt{.aux} file has been made more robust. It now correctly
+ignores conditionals (added by \pkg{hyperref} and other packages)
+rather than generating low level parsing errors.
+\sxissue{a/452321}
+
+
+\subsection{Column data for \env{multicols*} sometimes vanished}
+
+In certain situations involving \env{multicols*}, when there are more
+explicit \cs{columnbreak} requests than there are columns on the
+current page, data could vanish due to the removal of an internal
+penalty marking the end of the environment. This has been corrected by
+explicitly reinserting that penalty if necessary.
+%
+\githubissue{53}
+
+\subsection{Extension to \cs{docolaction} in \pkg{multicol}}
+
+The \cs{docolaction} command can be used to carry out actions
+depending on the column you are currently in, i.e., first, any inner
+one (if more than two) or last. However, if the action generates text
+then there is the question: is this text part of the current column or
+the one after? That is, on the next run, do we test before or after it,
+to determine in which column we are?
+
+This is now resolved as follows: if you use \cs{docolaction*} any
+generated text by the chosen action is considered to be after the test
+point. But if you use the command without the star then all the material
+it generates will be placed before the test point to determine the
+current column, i.e., the text will become part of the current column
+and may affect the test result on the next run.
+
+
+
+\subsection{Prevent color leak in \pkg{array}}
+
+In some cases the color used inside a \env{tabular} cell could ``leak
+out'' into the surrounding text. This has been corrected.
+%
+\githubissue{72}
+
+\subsection{Support fragile commands in \texttt{array} or \texttt{tabular} column templates}
+
+The preamble specifiers \texttt{p}, \texttt{m} and \texttt{b} each receives
+a user supplied argument: the width of the paragraph column. Normally
+that is something harmless, like a length or a simple length
+expression. But in more complicated settings involving the \pkg{calc}
+package it could break with a low-level error message. This has now
+been corrected.
+%
+\sxissue{q/459285}
+
+
+
+\section{Changes to packages in the amsmath category}
+
+The changes in the kernel made for \cs{thinspace}, \cs{smash},
+etc.\ (see above) have been reflected in the \pkg{amsmath} package
+code, so that loading this package doesn't revert them.
+%
+\githubissue[s]{49 and 50}
+
+
+
+
+
+\section{Website updates}
+
+\subsection{Publications area reorganized and extended}
+
+To help readers to find relevant information in more convenient and
+easy ways, the area of the website covering publications by the
+\LaTeX{} Project Team was reorganized and extended (many more
+abstracts added). We now provide the articles, talks and supplementary
+data structured both by year and also by major
+topics~\cite{29:site-pub}. Feel free to take a look.
+
+\subsection{Japanese translations of the user's guide}
+
+Yukitoshi Fujimura has kindly translated
+into Japanese two documents that are
+distributed with standard \LaTeX{}.
+These are:
+\begin{itemize}
+\item
+ \LaTeXe{} for authors;
+\item
+ User's Guide for the \pkg{amsmath}~Package~\cite{29:amsldoc}.
+\end{itemize}
+They can be found on the website documentation page~\cite{29:site-doc}.
+You will now also find there a typeset version of the full \LaTeXe{}
+source code (with index etc.\@) and a number of other goodies.
+
+
+
+
+\begin{thebibliography}{9}
+
+\bibitem{29:Mittelbach:TB39-1} Frank Mittelbach:
+ \emph{New rules for reporting bugs in the \LaTeX{} core software}.
+ In: TUGboat, 39\#1, 2018.
+ \url{https://latex-project.org/publications/}
+
+\bibitem{29:ltnews28}
+ \emph{\LaTeX{} News, Issue 28}.
+ In: TUGboat, 39\#1, 2018.\\
+ \rlap{\url{https://latex-project.org/news/latex2e-news/}}
+
+\bibitem{29:site-doc}
+ \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
+ \url{https://latex-project.org/documentation/}
+
+\bibitem{29:site-pub}
+ \emph{\LaTeX{} Project publications on the \LaTeX{} Project Website}.\\
+ \url{https://latex-project.org/publications/}
+
+\bibitem{29:amsldoc} American Mathematical Society and The \LaTeX3 Project:
+ \emph{User's Guide for the \texttt{amsmath} Package} (Version 2.1).
+ April 2018.
+ Available from
+ \url{https://www.ctan.org}
+ and distributed as part of every \LaTeX{} distribution.
+
+\end{thebibliography}
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltnews30.tex b/macros/latex-dev/doc/ltnews30.tex
new file mode 100644
index 0000000000..7b4b282cc9
--- /dev/null
+++ b/macros/latex-dev/doc/ltnews30.tex
@@ -0,0 +1,297 @@
+% \iffalse meta-comment
+%
+% Copyright 2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews30.tex
+%
+% This is issue 30 of LaTeX News.
+
+\documentclass{ltnews}
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\usepackage{csquotes}
+
+\providecommand\acro[1]{\textsc{#1}}
+\providecommand\meta[1]{$\langle$\textit{#1}$\rangle$}
+
+
+\providecommand\XeTeX{\hologo{XeTeX}}
+\providecommand\LuaTeX{\hologo{LuaTeX}}
+\providecommand\pdfTeX{\hologo{pdfTeX}}
+
+\providecommand\githubissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
+ {github issue#1 #2}%
+ )}%
+ \par}
+
+% simple solution right now (just link to the first issue if there are more)
+\def\getfirstgithubissue#1 #2\relax{#1}
+
+\providecommand\sxissue[1]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
+
+\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F#2}%
+ {gnats issue #1/#2}%
+ )}%
+ \par}
+
+\let\cls\pkg
+\providecommand\env[1]{\texttt{#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iffalse % only for TUB production
+\usepackage{graphicx}
+\makeatletter
+% Xe\TeX{} requires reflecting the first E, hence we complain if the
+% graphics package is not present. (For plain documents, this can be
+% loaded via Eplain.) Also, at Barbara's suggestion, if the current
+% font is slanted, we rotate by 180 instead of reflecting so there is at
+% least a chance to look ok. (The magic values here seem more or less
+% ok for \texttt{cmsl} and \texttt{cmti}.)
+%
+% \begin{macrocode}
+\def\tubreflect#1{%
+ \@ifundefined{reflectbox}{%
+ \TBerror{A graphics package must be loaded for \string\XeTeX}%
+ }{%
+ \ifdim \fontdimen1\font>0pt
+ \raise 1.6ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em
+ \else
+ \reflectbox{#1}%
+ \fi
+ }%
+}
+\def\tubhideheight#1{\setbox0=\hbox{#1}\ht0=0pt \dp0=0pt \box0 }
+\def\XekernbeforeE{-.125em}
+\def\XekernafterE{-.1667em}
+\DeclareRobustCommand{\Xe}{\leavevmode
+ \tubhideheight{\hbox{X%
+ \setbox0=\hbox{\TeX}\setbox1=\hbox{E}%
+ \ifdim \fontdimen1\font>0pt \def\XekernbeforeE{0em}\fi
+ \lower\dp0\hbox{\raise\dp1\hbox{\kern\XekernbeforeE\tubreflect{E}}}%
+ \kern\XekernafterE}}}
+\def\XeTeX{\Xe\TeX}
+\def\XeLaTeX{\Xe{\kern.11em \LaTeX}}
+\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\publicationmonth{Pre-release Version --- unfinished}
+\publicationyear{2019}
+
+\publicationissue{30}
+
+\begin{document}
+
+%\addtolength\textheight{4.2pc} % only for TUB
+
+\maketitle
+\tableofcontents
+
+\setlength\rightskip{0pt plus 3em}
+
+\bigskip
+
+\section{Introduction}
+
+This document is under construction \ldots
+
+
+\section{Improving Unicode handling in \pdfTeX{}}
+
+The perhaps most important improvement in this release is an even
+better support for UTF-8 characters when using \pdfTeX{}.\footnote{The
+ Japanese engines e-p\TeX{} and e-up\TeX{} can't use these features
+ yet as they don't support the primitive \cs{ifincsname}. Work is
+ under way to resolve this in the engines.}
+
+In Unicode engines any Unicode character (that is not acting as a
+command, i.e., is \enquote{active}) can be used as part of the
+\cs{label}/\cs{ref} mechanism or can be displayed in a message or
+written to a file. In 8-bit engines, however, this was severely
+restricted, essentially you had to limit yourself to using
+\acro{ascii} letters, digits and a few punctuation symbols. With the
+new release most of these restrictions have been removed and you now
+can write labels such as
+\begin{verbatim}
+ \label{eq:größer}
+\end{verbatim}
+or use accented characters, etc.\ as part of a \cs{typeout} message.
+The only requirement remaining is that only those UTF-8 characters
+that are also available for typesetting can be used, i.e., only those
+which which adequate font support is loaded. Otherwise you will get an
+error message stating that a particular Unicode character is not set
+up for use with \LaTeX{}.
+
+What is not possible with an 8-bit engine such as \pdfTeX{} is to use
+characters other than \acro{ascii} letters as part of a command
+name. This is due to the fact that all other characters in such
+engines are not single character tokens, but in fact consist of a
+sequence of bytes and this is not supported in command names.
+
+\section{Improving file name handling in \pdfTeX{}}
+
+A related change is that file names used as part of \cs{input}, \cs{includegraphics}, etc.\ can now contain Unicode characters as well as spaces. In this case even characters that can't be typeset because of missing font support can be used.
+
+
+
+
+\section{Other changes to the \LaTeX{} kernel}
+
+
+\subsection{Guard against \cs{unskip} at the start of a tabular cell}
+
+If a \env{tabular} or \env{array} cell started with command that
+issued an \cs{unskip} as its first action centering the column got
+broken because the space on the left got removed. This got corrected
+by adding a minuscule additional space after the stretching space that
+could be safely removed in such a case without being noticeable.
+
+This change was also applied in the \pkg{array} package.
+
+\githubissue{102}
+
+
+\subsection{Fixes to Unicode table data}
+
+\texttt{U+012F} which is \enquote{i with ogonek} should produce an
+\enquote{i} and not a\enquote{dotless i}. This has been corrected.
+
+\githubissue{122}
+
+The Unicode slots \texttt{27E8} and \texttt{27E9} have been mapped to
+\cs{textlangle} and \cs{textrangle} which is the recommended mapping.
+
+\githubissue{110}
+
+When doing cut-and-paste from other documents f-ligatures might show
+up as Unicode characters. In the past those got rejected. We now
+translate them back to individual characters so that they get
+accepted. If supported by the font (which is normally the case) they
+are then reconstructed as ligatures and thus come out as
+desired. Otherwise they will come out as individual characters which
+is fine too.
+
+\githubissue{154}
+
+
+\subsection{Improve \cs{InputIfFileExists}'s handling of file names}
+
+In rare circumstances it was possible that \cs{InputIfFileExists}
+would work incorrectly, e.g., a construction such as
+\begin{verbatim}
+\InputIfFileExists{foo}{\input{bar}}{}
+\end{verbatim}
+Would not load the files \texttt{foo.tex} and \texttt{bar.tex} but
+would load \texttt{foo.tex} twice. This has been corrected.
+
+\githubissue{109}
+
+
+\subsection{Improve wording of a warning message}
+
+\emph{write}
+
+\githubissue{107}
+
+
+\subsection{Avoid \cs{DeclareErrorFont} side effects}
+
+\emph{write}
+
+\gnatsissue{latex}{4399}
+
+
+
+\subsection{\pkg{nfssfont}: Generate a font table as the default action}
+
+With the small file \texttt{nfssfont.tex} it is possible to produce
+font tables and other font tests in the style set up by Don Knuth. As
+in nearly all cases producing a font table is the desired action this
+action has been made the default so that one can simply hit enter
+instead of having to write \verb=\table\bye=.
+
+
+
+
+
+
+\section{Changes to packages in the \pkg{tools} category}
+
+\subsection{\pkg{multicol}: Introduce \texttt{minrows} counter for balancing}
+
+When there are only a few lines of text on a page at the end of a
+\env{multicols} environment balancing them looks rather odd, e.g., if
+you then end up with three columns each containing a single line. This
+can now be controlled through the counter \texttt{minrows} (default is
+1) which requires at least that many lines in the first column during
+balancing. Thus, if you set it to \texttt{2} one would get a
+distribution of \texttt{2+1+0} lines and if set it to three, the result
+would have been \texttt{3+0+0} instead of the default \texttt{1+1+1}.
+
+What is most appropriate really depends on the circumstances, but this
+now gives you the tools to make local or global adjustments.
+
+
+
+\section{Changes to packages in the \pkg{amsmath} category}
+
+\subsection{\pkg{amsmath}: Introduce \texttt{overunderset} command}
+
+\emph{describe}
+
+
+
+\section{Documentation updates}
+
+\subsection{High-lighting the standard NFSS codes for series}
+
+\emph{describe}
+
+
+\begin{thebibliography}{9}
+
+\bibitem{29:site-doc}
+ \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
+ \url{https://latex-project.org/documentation/}
+
+\bibitem{29:site-pub}
+ \emph{\LaTeX{} Project publications on the \LaTeX{} Project Website}.\\
+ \url{https://latex-project.org/publications/}
+
+\end{thebibliography}
+
+\end{document}
+
diff --git a/macros/latex-dev/doc/ltx3info.pdf b/macros/latex-dev/doc/ltx3info.pdf
new file mode 100644
index 0000000000..2f80af9747
--- /dev/null
+++ b/macros/latex-dev/doc/ltx3info.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/ltx3info.tex b/macros/latex-dev/doc/ltx3info.tex
new file mode 100644
index 0000000000..e0aabafba4
--- /dev/null
+++ b/macros/latex-dev/doc/ltx3info.tex
@@ -0,0 +1,474 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+\documentclass[a4paper]{article}
+
+% Commands and environments:
+
+\newcommand{\eg}{e.g.~}
+\newcommand{\ie}{i.e.~}
+
+
+\newenvironment{citations}{%
+ \list{}{%
+ \renewcommand{\makelabel}[1]{\normalfont\itshape ##1}%
+ }%
+}{%
+ \endlist
+}
+
+% Some logos:
+
+\newcommand{\NFSS}{NFSS}
+
+\newcommand{\LaTeXNews}{\LaTeX~News}
+
+\newcommand{\AW}{Addison Wesley}
+
+\newcommand{\SGML}{{\sc SGML}}
+\newcommand{\DSSSL}{{\sc DSSSL}}
+\newcommand{\HTML}{{\sc HTML}}
+\newcommand{\XML}{{\sc XML}}
+\newcommand{\PDF}{{\sc PDF}}
+
+\newcommand{\PS}{{\sc Post\-Script}}
+
+\newcommand{\AmSTeX}{$\mathcal A$\lower.4ex\hbox{$\!\mathcal
+ M\!$}$\mathcal S$-\TeX}
+\newcommand{\AmSLaTeX}{$\mathcal A$\lower.4ex\hbox{$\!\mathcal
+ M\!$}$\mathcal S$-\LaTeX}
+\newcommand{\MF}{{\sc Meta\-font}}
+
+% sections
+
+\setcounter{secnumdepth}{-2}
+
+% Front matter:
+
+\title{\Large The \LaTeX3 Project}
+
+\author{\copyright 1995--1999 \
+Frank Mittelbach and
+Chris Rowley}
+
+\date{12 January 1999}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\maketitle
+
+\begin{abstract}
+ This article describes the motivation, achievements and future of
+ the \LaTeX3 Project, which was established to produce a new version
+ of \LaTeX{}, the widely-used and highly-acclaimed document
+ preparation system. It also describes how you can help us to
+ achieve our aims.\\[2pt]
+ \textbf{For Archive maintainers, Authors, Publishers and
+ Distributors:}\\
+ The project team request that, whenever possible, you include this
+ article in any of the following:
+ \begin{itemize}
+ \item Books about \TeX{} and \LaTeX{}.
+ \item Instructions for authors on using \LaTeX{}.
+ \item The printed documentation of CD-ROM collections that contain
+ \LaTeX.
+ \item On-line collections that include a significant proportion of
+ documents encoded in \LaTeX.
+\end{itemize}
+\end{abstract}
+
+\section{Outline}
+
+The purposes of the \LaTeX3 system can be summarized thus: it will
+greatly increase the range of documents which can be processed; and it
+will provide a flexible interface for typographic designers to easily
+specify the formatting of a class of documents.
+
+The \LaTeX3 Project Team is a small group of volunteers whose aim is
+to produce this major new document processing system based on the
+principles pioneered by Leslie Lamport in the current \LaTeX.
+
+The major visible work of the team before 1997 was the development of
+the current \emph{standard} version of \LaTeX{}. This was first
+released in 1994 and has since then been actively maintained and
+enhanced by extensions to that core system. They will continue to
+develop and maintain this system, releasing updated versions every six
+months and recording these activities in the \LaTeX{} bugs database
+(see below).
+
+Although \LaTeX{} may be distributed freely, the production and
+maintenance of the system does require expenditure of reasonably large
+sums of money. The \LaTeX3 Project Fund has therefore been set up to
+channel money into this work. We know that some users are
+aware of this fund as they have already contributed to it---many
+thanks to all of them! If you want to know more about how you can
+help the project, see Page \pageref{fund}---and thanks in advance for
+your generosity in the future.
+
+
+\section{Background}
+
+With \TeX{}, Knuth designed a formatting system that is able to
+produce a large range of documents typeset to extremely high quality
+standards. For various reasons (\eg quality, portability, stability
+and availability) \TeX{} spread very rapidly and can nowadays be best
+described as a world-wide de facto standard for high quality
+typesetting. Its use is particularly common in specialized areas, such
+as technical documents of various kinds, and for multi-lingual
+requirements.
+
+The \TeX{} system is fully programmable. This allows the development
+of high-level user interfaces whose input is processed by \TeX{}'s
+interpreter to produce low-level typesetting instructions; these are
+input to \TeX{}'s typesetting engine which outputs the format of each
+page in a device-independent page-description language. The \LaTeX{}
+system is such an interface; it was designed to support the needs of
+long documents such as textbooks and manuals. It separates content and
+form as much as possible by providing the user with a generic (\ie
+logical rather than visual) mark-up interface; this is combined with
+style sheets which specify the formatting.
+
+Recent years have shown that the concepts and approach of \LaTeX{} are
+now widely accepted. Indeed, \LaTeX{} has become the standard method
+of communicating and publishing documents in many academic
+disciplines. This has led to many publishers accepting \LaTeX{}
+source for articles and books; and the American Mathematical Society
+now provides a \LaTeX{} package making the features of \AmSTeX{}
+available to all users of \LaTeX{}. Its use has also spread into many
+other commercial and industrial environments, where the technical
+qualities of \TeX{} together with the concepts of \LaTeX{} are
+considered a powerful combination of great importance to such areas as
+corporate documentation and publishing. This has also extended to
+on-line publishing using, for example, \PDF{} output incorporating
+hypertext and other active areas.
+
+With the spreading use of \SGML{}-compliant systems (\eg Web-based
+publishing using \HTML{} or \XML{}) \TeX{} again is a common choice as
+the formatting engine for high quality typeset output: a widely used
+such system is {\em The Publisher\/} from ArborText, whilst a more
+recent development is the object-oriented document editor Grif. The
+latter is used for document processing in a wide range of industrial
+applications; it has also been adopted by the Euromath consortium as
+the basis of their mathematician's workbench, one of the most advanced
+of the emerging project-oriented user environments. Typeset output
+from \SGML{}-coded documents in these systems is obtained by
+translation into \LaTeX{}, which will therefore soon also be a natural
+choice for the output of \DSSSL-compliant systems.
+
+Because a typical \SGML{} Document Type Definition (DTD) uses concepts
+similar to those of \LaTeX{}, the formatting is often implemented by
+simply mapping document elements to \LaTeX{} constructs rather than
+directly to `raw \TeX'.
+This enables the
+sophisticated analytical techniques built into the \LaTeX{}
+software to be exploited; and it avoids the need to program in \TeX{}.
+
+\section{Motivation}
+
+This increase in the range of applications of \LaTeX{} has highlighted
+certain limitations of the current system, both for authors of
+documents and for designers of formatting styles.
+
+In addition to the need to extend the variety of classes of document
+which can be processed by \LaTeX{}, substantial enhancements are
+necessary in, at least, the following areas:
+ \begin{itemize}
+ \item
+ the command syntax (attributes, short references, etc);
+ \item
+ the layout specification interface (style design);
+ \item
+ the level of robustness (error recovery, omitted tags);
+ \item
+ the extendibility (package interface);
+ \item
+ the layout specification of tabular material;
+ \item
+ the specification and inclusion of graphical material;
+ \item
+ the positioning of floating material, and other aspects of page
+ layout;
+ \item
+ the requirements of hypertext systems.
+ \end{itemize}
+
+ Further analysis of these deficiencies has shown that some of the
+ problems are to be found in \LaTeX{}'s internal concepts and design.
+ This project to produce a new version therefore involves thorough
+ research into the challenges posed by new applications and by the use
+ of \LaTeX{} as a formatter for a wide range of documents, \eg \SGML{}
+ documents; on-line \PDF{} documents with hypertext links.
+
+ This will result in a major re-implementation of large parts of the
+ system. Some of the results of such rethinking of the fundamentals
+ are already available in Standard \LaTeX{}, notably in the following
+ areas:
+
+\begin{itemize}
+\item Font declaration and selection;
+\item Font and glyph handling within mathematical formulas;
+\item Handling multiple font glyph encodings within a document;
+\item Allowing multiple input character encodings within a document;
+\item A uniform interface for graphics inclusion;
+\item Support for coloured text;
+\item Building and interfacing new classes and extension packages.
+\end{itemize}
+
+
+\section{Description}
+
+The strengths of the present version of \LaTeX{} are
+as follows:
+ \begin{itemize}
+ \item excellent standard of typesetting for text, technical
+formulas\\
+and tabular material;
+ \item separation of generic mark-up from visual formatting;
+ \item ease of use for authors;
+ \item portability of documents over a wide range of platforms;
+ \item adaptability to many languages;
+ \item widespread and free availability;
+ \item reliable support and maintenance by the \LaTeX3 project team.
+ \end{itemize}
+ These will be preserved and in many cases greatly enhanced by the new
+ version which is being developed to fulfill the following requirements.
+ \begin{itemize}
+ \item
+ It will provide a syntax that allows highly automated translation
+ from popular \SGML{} DTDs into \LaTeX{} document classes (these
+ will be provided as standard with the new version).
+
+ The syntax of the new \LaTeX{} user-interface will, for example,
+ support the \SGML{} concepts of `entity', `attribute' and `short
+ reference' in such a way that these can be directly linked to the
+ corresponding \SGML{} features.
+
+ \item
+ It will support hypertext links and other features required for
+ on-line structured documents using, for example, \HTML{} and \XML{}.
+
+\item
+ It will provide a straightforward style-designer interface to support
+ both the specification of a wide variety of typographic requirements
+ and the linking of entities in the generic mark-up of a document to
+ the desired formatting. These two parts of the design process will
+ be clearly separated so that it is possible to specify different
+ layouts for the same DTD.
+
+ The language and syntax of this interface will be as natural as
+ possible for a typographic designer. As a result, this language
+ could easily be interfaced to a visually-oriented, menu-driven
+ specification system.
+
+ This interface will also support \DSSSL{} specifications and
+ style-sheet concepts such as those used with \HTML{} and \XML{}.
+
+ \item
+ It will provide an enhanced user-interface that allows expression of
+ the typesetting requirements from a large range of subject areas. Some
+ examples are listed here.
+
+ \begin{itemize}
+ \item The requirements of technical documentation (\eg offset layout,\\
+ change bars, etc).
+ \item The requirements of academic publishing in the humanities\\
+ (critical text editions, etc).
+ \item The requirements of structural formulas in chemistry.
+ \item Advanced use of the mathematical-typesetting features of \TeX{}.
+ \item The integration of graphical features, such as shading,
+ within text.
+ \item the integration of hypertext and other links in on-line
+ documents using systems such as \HTML{}, \XML{} and \PDF{}.
+
+ \end{itemize}
+
+ Special care will be taken to ensure that this interface is
+ extensible: this will be achieved by use of modular designs.
+
+
+ \item
+ It will provide a more robust author-interface. For example,
+ artificial restrictions on the nesting of commands will be removed.
+ Error handling will be improved by adding
+ a more effective, interactive help system.
+
+ \item
+ It will provide access to arbitrary fonts from any family (such as
+ the \PS{} and TrueType fonts) including a wide range of fonts for
+ multi-lingual documents and the specialist glyphs required by
+ documents in various technical and academic areas.
+
+ \item
+ The new interfaces will be documented in detail and the
+ system will provide extensive catalogues of examples, carefully
+ designed to make the learning time for new users (both designers and
+ authors) as short as possible.
+
+ \item
+ The code itself will be thoroughly documented and it will be
+ designed on modular principles. Thus the system will be easy to
+ maintain and to enhance.
+\end{itemize}
+
+The resulting new \LaTeX{} will, like the present version, be usable
+with any standard \TeX{} system (or whatever replaces it) and so will
+be freely available on a wide range of platforms.
+
+
+\section{\LaTeX{} documentation}
+
+\begingroup
+\setlength{\parindent}{0pt}
+
+A complete description of Standard \LaTeX{} can be found in:
+\begin{citations}
+\item[\LaTeX: A Document Preparation System]
+ Leslie Lamport,\\ \AW, 2nd ed, 1994.
+\item[The \LaTeX{} Companion]
+ Mittelbach, Goossens with Braams, Carlisle and Rowley,\\ \AW, 2nd ed, 2004.
+\end{citations}
+
+A recent addition to the publications closely associated with the
+project is:
+\begin{citations}
+\item[The \LaTeX{} Graphics Companion]
+ Goossens, Mittelbach and Rahtz,\\ \AW, 1997.
+\end{citations}
+
+This \LaTeX{} distribution comes with documentation on several aspects
+of of the system. The newer features of the system are described in
+the following documents:
+\begin{citations}
+\item[\LaTeXe{} for authors]
+ describes the new features of \LaTeX{} documents,
+ in the file \texttt{usrguide.tex};
+\item[\LaTeXe{} for class and package writers]
+ describes how to produce \LaTeX{} classes and packages,
+ in the file \texttt{clsguide.tex};
+\item[\LaTeXe{} font selection]
+ describes the new features of \LaTeX{} fonts for
+ class and package writers,
+ in the file \texttt{fntguide.tex}.
+\end{citations}
+
+For further contacts and sources of information on \TeX{} and
+\LaTeX{}, see the addresses on Page~\pageref{contacts}.
+
+\endgroup
+\pagebreak
+
+
+\section{The \LaTeX3 Project Fund}
+\label{fund}
+
+Although \LaTeX{} may be distributed freely, the production and
+maintenance of the system does require expenditure of reasonably large
+sums of money. There are many necessities that need substantial
+financing: examples are new or enhanced computing equipment and travel
+to team meetings (the volunteers come from many different countries,
+so getting together occasionally is a non-trivial exercise).
+
+This is why we are appealing to you for contributions to the fund.
+Any sum will be much appreciated; the amount need not be large as
+small contributions add up to very useful amounts. Contributions of
+suitable equipment and software will also be of great value. This
+appeal is both to you as an individual author and to you as a member
+of a group or as an employee: please encourage your department or your
+employer to contribute towards sustaining our work.
+
+We should like to see funded projects that make considerable use of
+\LaTeX{} (\eg conferences and research teams who use it to publish
+their work, and electronic research archives using it) include
+contributions to this fund in their budgets. %% e-print systems
+
+We are also asking commercial organisations to assess the benefits
+they gain from using, or distributing, a well-supported \LaTeX{} and
+to make appropriate contributions to the fund in order that we can
+continue to maintain and improve the product. If you work for, or do
+business with, such an organisation, please bring to the attention of
+the relevant people the existence and needs of the project.
+
+In particular, we ask that all the large number of organisations and
+businesses that distribute \LaTeX{}, within other software or as part
+of a CD-ROM collection, should consider pricing all products containing
+\LaTeX{} at a level that enables them to make regular donations to the
+fund from the profit on these items. We also ask all authors and
+publishers of books about \LaTeX{} to consider donating part of the
+royalties to the fund.
+
+Contributions should be sent to one of the following addresses:
+\begin{quote}\small\label{addrs}
+ \TeX{} Users Group, P.O. Box 2311, Portland, OR~97208-2311 USA\\
+ Fax:~+1~503~223~3960 \ Email: \texttt{tug@tug.org}
+
+ \noindent
+ UK TUG, 1 Eymore Close, Selly Oak, Birmingham B29~4LB UK\\
+ Fax: +44 121 476 2159 \ Email: \texttt{uktug-enquiries@tex.ac.uk}
+\end{quote}
+
+Cheques should be payable to the user group (TUG or UKTUG) and be
+clearly marked as contributions to the \LaTeX3 fund.
+Many thanks to all of you who have contributed in the past and thanks
+in advance for your generosity in the future.
+
+\section{Contacts and information}
+\label{contacts}
+
+In addition to the sources mentioned above, \LaTeX{} has its home page
+on the World Wide Web at:
+\begin{verbatim}
+ http://www.latex-project.org/
+\end{verbatim}
+This page describes \LaTeX{} and the \LaTeX3 project, and contains
+pointers to other \LaTeX{} resources, such as the user guides, the
+\TeX{} Frequently Asked Questions, and the \LaTeX{} bugs database.
+
+More general information, including contacts for local User Groups,
+can be accessed via:
+\begin{verbatim}
+ http://www.tug.org/
+\end{verbatim}
+
+The electronic home of anything \TeX-related is the Comprehensive
+\TeX{} Archive Network (CTAN). This is a network of cooperating ftp
+sites, with over a gigabyte of \TeX{} material:
+\begin{verbatim}
+ ftp://cam.ctan.org/tex-archive/
+ ftp://dante.ctan.org/tex-archive/
+ ftp://tug.ctan.org/tex-archive/
+\end{verbatim}
+
+For more information, see the \LaTeX{} home page.
+
+
+\end{document}
+
+
+
diff --git a/macros/latex-dev/doc/modguide.pdf b/macros/latex-dev/doc/modguide.pdf
new file mode 100644
index 0000000000..4079173f4d
--- /dev/null
+++ b/macros/latex-dev/doc/modguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/modguide.tex b/macros/latex-dev/doc/modguide.tex
new file mode 100644
index 0000000000..147fec7878
--- /dev/null
+++ b/macros/latex-dev/doc/modguide.tex
@@ -0,0 +1,412 @@
+% \iffalse meta-comment
+%
+% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: modguide.tex
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[1995/11/28]
+
+\newcommand{\reasonsection}[1]{\subsubsection*{\it #1}}
+
+\newcommand{\nstex}{\textsf{NS-TeX}}
+
+\setcounter{secnumdepth}{-1}
+
+\title{Modifying \LaTeX}
+
+\author{\copyright~Copyright 1995, \LaTeX3 Project Team.\\
+ All rights reserved.}
+
+\date{12 December 1995}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\begin{abstract}
+ This document was produced in response to suggestions that the
+ modification and distribution conditions for the files constituting
+ the New Standard \LaTeX{} system should be similar to those implied
+ by Version~2 of the \textsc{GNU} General Public Licence, as
+ published by the Free Software Foundation.
+\end{abstract}
+
+\section{Introduction}
+\label{sec:intro}
+
+This article describes the principles underlying our policy on
+distribution and modification of the files comprising the \LaTeX{}
+system. It has been produced as a result of detailed discussions of
+the issues involved in the support and maintenance of a widely
+distributed document processing system used by diverse people for many
+applications. These discussions have involved users, maintainers of
+installations that support \LaTeX{} and various types of organisations
+that distribute it. The discussions are continuing and we hope that
+the ideas in this article will make a useful contribution to the
+debate.
+
+Our aim is that \LaTeX{} should be a system which can be trusted by
+users of all types to fulfill their needs. Such a system must be
+stable and well-maintained. This implies that it must be reasonably
+easy to maintain (otherwise it will simply not get maintained at
+all). So here is a summary of our basic philosophy:
+\begin{quote}
+ We believe that the freedom to rely on a widely-used standard for
+ document interchange and formatting is as important as the freedom to
+ experiment with the contents of files.
+
+ We are therefore adopting a policy similar to that which Donald
+ Knuth applies to modifications of the underlying \TeX{} system: that
+ certain files, together with their names, are part of the system and
+ therefore the contents of these files should not be changed unless
+ the following conditions are met:
+ \begin{itemize}
+ \item they are clearly marked as being no longer part of the
+ standard system;
+ \item the name of the file is changed.
+ \end{itemize}
+\end{quote}
+
+
+\section{The system}
+\label{sec:sys}
+
+In developing this philosophy, and the consequent limitations on how
+modifications of the system should be carried out, we were heavily
+influenced by the following facts concerning the current widespread
+and wide-ranging uses of the \LaTeX{} system.
+\begin{enumerate}
+\item \LaTeX{} is not just a document processing system;
+ it also defines a language for document exchange.
+
+\item The standard document class files, and some other files, also
+ define a particular formatting of a document.
+
+\item The packages that we maintain define a particular document
+ interface and, in some cases, particular formatting of parts of a
+ document.
+
+\item The interfaces between different parts of the \LaTeX{} system
+ are very complex and it is therefore very difficult to check that a
+ change to one file does not affect the functionality of both that
+ file and also other parts of the system not obviously connected to
+ the file that has been changed.
+\end{enumerate}
+
+This leads us to the general principle that:
+\begin{quote}
+ with certain special exceptions, if you change the contents of a
+ file then the changed version should have a different file name.
+\end{quote}
+
+We certainly do not wish to prevent people from experimenting with the
+code in different ways and adapting it to their purposes. However, we
+are concerned that any distribution of modifications to the code
+should be very clearly identified as not being a part of the standard
+distribution. The exact wording and form of the distribution
+conditions is thus something that is flexible, but only within the
+constraint of keeping \LaTeX{} as a standardised, reliable product for
+the purposes described above: the exchange and formatting of
+documents.
+
+
+\section{Some examples}
+\label{sec:expl}
+
+Here we elaborate the arguments that have led us to the above
+conclusion.
+
+
+\reasonsection{Separate development considered harmful!}
+\label{sec:ja}
+
+In many fields, the use of \LaTeX{} as a language for communication
+is just as important as its capacity for fine typesetting; this is a
+very important consideration for a large population of authors,
+journal editors, archivists, etc.
+
+Related to this issue of portability is the fact that the file names
+are part of the end-user syntax.
+
+As a real example, the \LaTeX{} `tools' collection contains the
+package `array.sty'. A new user-level feature was added to this file
+at the end of 1994 and a document using this feature can contain the
+line:
+\begin{verbatim}
+ \usepackage{array}[1994/10/16]
+\end{verbatim}
+
+By supplying the optional argument, the document author is indicating
+that a version of the file \texttt{array.sty} dated no earlier than
+that date is required to run this document without error.
+
+This feature would be totally worthless if we were to allow an
+alternative version of the array package to be distributed under the
+same name since it would mean that there would be in circulation files
+of a later date, but without the new feature. If the document
+were processed using this `alternative array' then it would certainly
+produce `undefined command' errors and would probably not be
+processable at all.
+
+
+\reasonsection{What's in a file-name?}
+\label{sec:jb}
+
+In a pure markup language, such as SGML, it is reasonably clear that
+control over the final presentation lies with the receiver of a
+document and not with the author.
+
+However, the way that \LaTeX{} is often used in practice means that
+most people (at least when using the standard classes and packages)
+expect the formatting to be preserved when they send the document to
+another site.
+
+For example, suppose, as is still the most common use of \LaTeX{} in
+publishing, you produce a document for `camera-ready-copy' using the
+class `article' and that you carefully tune the formatting by, for
+example, adding some explicit line breaks etc, to ensure that it fits
+the 8 page limit set by the editor a journal or proceedings.
+
+It then gets sent to the editor or a referee who, without anyone
+knowing, has a non-standard version of the class file `article' and so
+it then runs to 9 pages. The consequence of this will, at the least,
+be a lot of wasted time whilst everyone involved works out what has
+gone wrong; it will probably also lead to everyone blaming each other
+for something which was in fact caused by a misguided distribution
+policy.
+
+It should also be noted that, for most people, the version of the
+class file `article' that gets used is decided by a site maintainer
+or the compilers of a CD-ROM distribution. To most users,
+the symbols \texttt{a\,r\,t\,i\,c\,l\,e} in:
+\begin{verbatim}
+ \documentclass{article}
+\end{verbatim}
+are just as much part of \LaTeX{}'s syntax as are the symbols
+\texttt{1\,2\,p\,t} in:
+\begin{verbatim}
+ \hspace{12pt}
+\end{verbatim}
+Thus they should both define a standard formatting rather than
+sometimes producing 1 more page or a 5pt larger space.
+
+Users rely on the fact that the command (or menu item) `LaTeX'
+produces a completely standard \LaTeX, including the fact that
+`article' is the `standard article'. They would not be at all happy
+if the person who installed and maintains \LaTeX{} for them were
+allowed to customise `article' every second day so as (in her or his
+opinion) to improve the layout; or because another user wanted to write
+a document in a different language or typeset one with different fonts.
+
+\reasonsection{\TeX{} itself}
+\label{sec:tex}
+
+We have modelled our policies on those of the \TeX{} system since this
+has for some time now been widely acknowledged as a very stable and
+high quality typesetting system.
+
+The distribution policy set up by Donald Knuth for \TeX{} has the
+following features:
+\begin{itemize}
+\item There is a clearly specified method for changing parts of the
+ software by the use of `change files'.
+\item Although arbitrary changes are allowed, the resulting program
+ can be called \TeX{} only if its functionality is precisely the same
+ as that of \TeX{} (i.e.~neither less nor more) in all important
+ areas.
+\item There are many files in the system that cannot be changed at all
+ (without changing the name): examples are the file
+ \texttt{plain.tex} and the files associated with fonts, including
+ the Metafont source files.
+\end{itemize}
+
+
+\reasonsection{Maintaining complexity}
+\label{sec:compl}
+
+Our experience of maintaining \LaTeX{} has shown us just how complex
+are the interactions between different parts of the system.
+
+We have therefore, with lots of help from the bug reports you send in,
+developed a large suite of test files which we run to check the
+effects of every change we make. A non-negligible percentage of these
+test runs give unexpected results and hence show up some unexpected
+dependency in the system.
+
+
+\section{Some assurances}
+\label{sec:conc}
+
+We are certainly not attempting to stop people reformatting \LaTeX{}
+documents in any way they wish. There are many ways of customising
+incoming documents to your personal style that do not involve changing
+the contents of \LaTeX{}'s standard files; indeed, this freedom is one
+of the system's many advantages.
+The simplest way to achieve this is to replace
+\begin{quote}
+\verb|\documentclass{article}|\quad by\quad
+\verb|\documentclass{myart}|
+\end{quote}
+
+Nor do we wish to discourage the production of new packages improving
+on the functionality or implementation of those we distribute. All we
+ask is that, in the best interests of all \LaTeX{} users, you give
+your superbly improved class or package file some other name.
+
+\section{Configuration possibilities}
+\label{sec:conposs}
+
+The standard \LaTeX{} system format can be configured in several ways
+to suit the needs and resources of an installation. For example, the
+loading of fonts and font tables can be customised to match the font
+shapes, families and encodings normally used in text mode. Also, by
+producing the appropriate font definition files, the font tables
+themselves can be set up to take advantage of the available fonts and
+sizes. The loading of hyphenation patterns can be adjusted to cover
+the languages used; this has to be done as part of making the format
+since this is the only stage at which patterns can be loaded.
+
+A complete list of these configuration possibilities can be found in
+the distributed guide \emph{Configuration options for} \LaTeXe{}
+(\texttt{cfgguide.tex}). However, as it says there, the number of
+configuration possibilities is strictly limited; we hope that having
+read this far you will appreciate the reasons for this decision. One
+consequence of this is that there is no provision for a general
+purpose configuration file, or for adding extra code just before the
+|\dump| of the format file.
+
+This was a deliberate decision and we hope that everyone (yes, that
+includes you!) will support its intent. Otherwise there will be a
+rapid return to the very situation, of several incompatible versions
+of \LaTeX~2.09, that originally prompted us to produce \LaTeXe{}: the
+new, and \emph{only}, `Standard \LaTeX'. This will make \LaTeX{}
+unmaintainable and, hence, unmaintained (by us, at least).
+
+\begin{quote}
+ Therefore you should not misuse the configuration files or other
+ parts of the distribution to produce non-standard versions of
+ \LaTeX{}.
+\end{quote}
+
+Some of the allowed configurations can result in a system that can produce
+documents that are no longer `formatting compatible'; for example, the
+use of different default fonts will most likely produce different line
+and page breaks. If you do produce a system that is configured in
+such a way that it is not `formatting compatible' then you should
+consider carefully the needs of users who need to create portable
+documents. A good way to provide for their needs is to make
+available, in addition, a standard form of \LaTeX{} without any
+`formatting incompatible' customisations.
+
+
+\section{Modification conditions}
+\label{sec:modcon}
+
+It is possible that you need to produce a document processing system
+based on standard \LaTeX{} but with functionality that cannot be
+implemented by using the approved configuration files and complying
+with the restriction on the code that is allowed in them. In other
+words, you may need a system which is sufficiently distinct from
+Standard \LaTeX{} that it is not feasible to do this simply by using
+the configuration options we provide or by producing new classes and
+packages.
+
+If you do produce such a system then, for the reasons described
+above, you should ensure that your system is clearly distinguished
+from Standard \LaTeX{} in every possible way, including the following.
+
+
+\begin{enumerate}
+\item
+ Give your system a distinguished name, such as \nstex, which clearly
+ distinguishes it from \LaTeX{}.
+
+\item
+ Ensure that it contains no file with a name the same as that of
+ a file in the standard distribution but with different contents.
+ (If this is not possible then you must:
+ \begin{itemize}
+ \item
+ ensure that files from the non-\LaTeX{} system cannot be
+ accidentally accessed whilst using a standard \LaTeX{};
+ \item ensure that each file from the non-\LaTeX{} system clearly
+ identifies itself as a non-\LaTeX{} file on the terminal and in the
+ log file.)
+ \end{itemize}
+
+\item
+ Ensure that the method used to run your system is clearly
+\label{mcon:command}
+ distinct from that used to run Standard \LaTeX; e.g.~by using a
+ command name or menu entry that is clearly not \texttt{latex}
+ (or \texttt{LaTeX} etc).
+
+\item
+ Ensure that, when a file is being processed by your system, the
+ use of non-standard \LaTeX{} is clearly proclaimed to the user by
+ whatever means is appropriate.
+
+\item Ensure that what is written at the beginning of the log file
+ clearly shows that your system has been used, and that it is
+ not Standard \LaTeX{}.
+ See the file \texttt{cfgguide.tex} for how to achieve this.
+
+\item
+ Clearly explain to users that bug reports concerning your
+ system should not be sent to the maintainers of Standard
+ \LaTeX{}.
+\end{enumerate}
+
+\subsection*{Note to system administrators}
+
+If you install a non-standard (modified) version of \LaTeX{} on a
+multi-user site then please, in addition, install Standard \LaTeX{}
+and observe the conditions enumerated above, particularly
+\ref{mcon:command}.
+
+
+\section{What do you think?}
+\label{sec:you}
+
+We are interested in your views on the issues raised in this document.
+The best way to let us know what you think, and to discuss your ideas
+with others, is to join the \texttt{LaTeX-L} mailing list and send your
+comments there.
+To subscribe to this list, mail to:
+\begin{verbatim}
+ listserv@urz.uni-heidelberg.de
+\end{verbatim}
+the following one line message:
+\begin{verbatim}
+ subscribe LATEX-L <your-first-name> <your-second-name>
+\end{verbatim}
+
+\end{document}
diff --git a/macros/latex-dev/doc/usrguide.pdf b/macros/latex-dev/doc/usrguide.pdf
new file mode 100644
index 0000000000..d19c69139e
--- /dev/null
+++ b/macros/latex-dev/doc/usrguide.pdf
Binary files differ
diff --git a/macros/latex-dev/doc/usrguide.tex b/macros/latex-dev/doc/usrguide.tex
new file mode 100644
index 0000000000..df02c20293
--- /dev/null
+++ b/macros/latex-dev/doc/usrguide.tex
@@ -0,0 +1,1817 @@
+% \iffalse meta-comment
+%
+% Copyright 1993-2019
+% The LaTeX3 Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -------------------------------------------
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: usrguide.tex
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\documentclass{ltxguide}[2001/05/28]
+
+\title{\LaTeXe~for authors}
+
+\author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
+ All rights reserved.}
+
+\date{27 January 2019}
+
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+
+Welcome to \LaTeXe, the new standard version of the \LaTeX{} Document
+Preparation System.
+
+This document describes how to take advantage of the new features of
+\LaTeX, and how to process your old \LaTeX{} documents with
+\LaTeXe. However, this document is only a brief introduction to the
+new facilities and is intended for authors who are already familiar
+with the old version of \LaTeX{}. It is \emph{not} a reference manual
+for \LaTeXe{} nor is it a complete introduction to \LaTeX.
+
+It is somewhat of an historical document now, since \LaTeXe{} came into
+existence in 1994.
+
+\subsection[\LaTeXe---The new \LaTeX~release]
+ {\LaTeXe---The new \LaTeX~release\\ (well, for more than 10 years now)}
+
+The previous version of \LaTeX{} was known as \LaTeX~2.09. Over the
+years many extensions have been developed for \LaTeX. This is, of
+course, a sure sign of its continuing popularity but it has had one
+unfortunate result: incompatible \LaTeX{} formats came into use at
+different sites. This included `standard \LaTeX~2.09', \LaTeX{} built
+with the \emph{New Font Selection Scheme}~(\NFSS), \SLiTeX, \AmSLaTeX,
+and so on. Thus, to process documents from various places, a site
+maintainer was forced to keep multiple versions of the \LaTeX{}
+program. In addition, when looking at a source file it was not always
+clear for which format the document was written.
+
+To put an end to this unsatisfactory situation, \LaTeXe{} has been
+produced; it brings all such extensions back under a single format and
+thus prevents the proliferation of mutually incompatible dialects of
+\LaTeX~2.09. With \LaTeXe{} the `new font selection scheme' is
+standard and, for example, \textsf{amsmath} (formerly the \AmSLaTeX{}
+format) or \textsf{slides} (formerly the \SLiTeX{} format) are simply
+extensions, which may be loaded by documents using the same base format.
+
+The introduction of a new release also made it possible to add a small
+number of often-requested features and to make the task of writing
+packages and classes simpler.
+
+\subsection{\LaTeX3---The long-term future of \LaTeX}
+\label{Sec:ltx3}
+
+\LaTeXe{} is the consolidation step in a comprehensive
+reimplementation of the \LaTeX{} system. The next major release of
+\LaTeX{} will be \LaTeX3, which will include a radical overhaul of the
+document designers' and package writers' interface to \LaTeX.
+
+\LaTeX3 is a long-term research project but, until it is completed,
+the project team are committed to the active maintenance of \LaTeXe{}.
+Thus the experience gained from the production and maintenance of
+\LaTeXe{} will be a major influence on the design of \LaTeX3.
+A brief description of the project can be found in the document
+|ltx3info.tex|.
+
+If you would like to support the project then you are welcome to send
+donations to the \LaTeX3 Project Fund; this has been set up to help
+the research team by financing various expenses associated with this
+voluntary work of maintaining the current \LaTeX{} and developing
+\LaTeX3.
+
+The fund is administered by The \TeX{} Users Group and by various
+local user groups. Information about making donations and joining
+these groups is available from:
+\begin{quote}\small\label{addrs}
+ \texttt{http://www.tug.org/lugs.html}
+\end{quote}
+
+The \LaTeX3{} project has its home page
+on the World Wide Web at:
+\begin{verbatim}
+ http://www.latex-project.org/
+\end{verbatim}
+This page describes \LaTeX{} and the \LaTeX3 project, and contains
+pointers to other \LaTeX{} resources, such as the user guides, the
+\TeX{} Frequently Asked Questions, and the \LaTeX{} bugs database.
+
+Older articles covering aspects of the \LaTeX3 project are also
+available for anonymous ftp from the Comprehensive \TeX{} Archive, in
+the directory:
+\begin{verbatim}
+ ctan:info/ltx3pub
+\end{verbatim}
+The file |ltx3pub.bib| in that directory contains an abstract of each
+of the files.
+
+\subsection{Overview}
+
+This document contains an overview of the new structure and features
+of \LaTeX. It is \emph{not} a self-contained document, as it contains
+only the features of \LaTeX{} which have changed since version 2.09.
+You should read this document in conjunction with an introduction to
+\LaTeX{}.
+
+\begin{description}
+
+\item[Section~\ref{Sec:class+packages}]
+ contains an overview of the new structure of
+ \LaTeX{} documents. It describes how classes and packages work and
+ how class and package options can be used. It lists the standard
+ packages and classes which come with \LaTeX.
+
+\item[Section~\ref{Sec:commands}] describes the new commands available
+ to authors in \LaTeXe.
+
+\item[Section~\ref{Sec:209}] shows how to process old \LaTeX{}
+ documents with \LaTeXe.
+
+\item[Section~\ref{Sec:problems}] contains advice on dealing with
+ problems you may encounter in running \LaTeXe.
+ It lists some error messages which are new in \LaTeXe{} and
+ it describes some of the more common problems and how to cure them,
+ or where to find further information.
+
+\end{description}
+
+\subsection{Further information}
+
+For a general introduction to \LaTeX, including the new features of
+\LaTeXe, you should read \emph{\LaTeXbook}
+by Leslie Lamport~\cite{A-W:LLa94}.
+
+A more detailed description of the new features of \LaTeX, including an
+overview of more than 200 packages and nearly 1000 ready to run examples, is
+to be found in \emph{\LaTeXcomp second edition} by Frank Mittelbach and
+Michel Goossens~\cite{A-W:MG2004}.
+
+Packages and programs for producing and manipulating graphics are
+discussed at length in \emph{\LaTeXGcomp} by Michel Goossens,
+Sebastian Rahtz and Frank Mittelbach~\cite{A-W:GRM97}.
+
+Solutions for publishing with \LaTeX{} on the World Wide Web are given
+in \emph{\LaTeXWcomp} by Michel Goossens and Sebastian
+Rahtz~\cite{A-W:GR99}.
+
+For more information about the many new \LaTeX{} packages you should
+read the package documentation, which should be available from the
+same source as your copy of \LaTeX.
+
+There are a number of documentation files which accompany every copy
+of \LaTeX. A copy of \emph{\LaTeX{} News} will come out with each
+six-monthly release of \LaTeX; it will be found in the files
+|ltnews*.tex|. The class- and package-writer's guide \emph{\clsguide}
+describes the new \LaTeX{} features for writers of document classes
+and packages; it is in |clsguide.tex|. The guide \emph{\fntguide}
+describes the \LaTeX{} font selection scheme for class- and
+package-writers; it is in |fntguide.tex|. Support for Cyrillic languages
+in \LaTeX{} is described in \emph{\cyrguide}.
+
+The documented source code (from the files used to produce the kernel
+format via |latex.ltx|) is now available as
+\emph{The \LaTeXe\ Sources}. ]
+This very large document also includes an index of
+\LaTeX{} commands. It can be typeset from the \LaTeX{} file
+|source2e.tex| in the |base| directory, using the source files and
+the class file |ltxdoc.cls| from this directory.
+
+For more information about \TeX{} and \LaTeX{}, please contact your
+local \TeX{} Users Group, or the international \TeX{} Users Group (see
+page \pageref{addrs}).
+
+
+\section{Classes and packages}
+\label{Sec:class+packages}
+
+This section describes the new structure of \LaTeX{} documents and the
+new types of file: \emph{classes} and \emph{packages}.
+
+\subsection{What are classes and packages?}
+
+The main difference between \LaTeX~2.09 and \LaTeXe{} is in the
+commands before |\begin{document}|.
+
+In \LaTeX~2.09, documents had \emph{styles},
+such as \textsf{article} or \textsf{book}, and \emph{options},
+such as \textsf{twoside} or \textsf{epsfig}.
+These were indicated by the |\documentstyle| command:
+\begin{quote}
+ |\documentstyle|\oarg{options}\arg{style}
+\end{quote}
+For example, to specify a two-sided article with encapsulated
+PostScript figures, you said:
+\begin{verbatim}
+ \documentstyle[twoside,epsfig]{article}
+\end{verbatim}
+However, there were two different types of document style option:
+\emph{built-in options} such as |twoside|; and \emph{packages} such as
+|epsfig.sty|. These were very different, since any \LaTeX{} document
+style could use the \textsf{epsfig} package but only document styles
+which declared the \textsf{twoside} option could use that option.
+
+To avoid this confusion, \LaTeXe{} differentiates between built-in
+options and packages. These are given by the new |\documentclass| and
+|\usepackage| commands:
+\begin{quote}
+ |\documentclass|\oarg{options}\arg{class} \\
+ |\usepackage|\oarg{options}\arg{packages}
+\end{quote}
+For example, to specify a two-sided article with encapsulated
+PostScript figures, you now write:
+\begin{verbatim}
+ \documentclass[twoside]{article}
+ \usepackage{epsfig}
+\end{verbatim}
+You can load more than one package with a single |\usepackage|
+command; for example, rather than writing:
+\begin{verbatim}
+ \usepackage{epsfig}
+ \usepackage{multicol}
+\end{verbatim}
+you can specify:
+\begin{verbatim}
+ \usepackage{epsfig,multicol}
+\end{verbatim}
+Note that \LaTeXe{} still understands the \LaTeX~2.09 |\documentstyle|
+command. This command causes \LaTeXe{} to enter \emph{\LaTeX~2.09
+compatibility mode}, which is described in Section~\ref{Sec:209}.
+
+You should not, however, use the |\documentstyle| command for new
+documents because this compatibility mode is very slow and the new
+features of \LaTeXe{} are not available in this mode.
+
+To help differentiate between classes and packages, document classes
+now end with |.cls| rather than |.sty|. Packages still end with
+|.sty|, since most \LaTeX~2.09 packages work well with \LaTeXe.
+
+\subsection{Class and package options}
+
+In \LaTeX~2.09, only document styles could have options such as
+|twoside| or |draft|. In \LaTeXe{}, both classes and packages are
+allowed to have options. For example, to specify a two-sided article
+with graphics using the |dvips| driver, you write:
+
+\begin{verbatim}
+ \documentclass[twoside]{article}
+ \usepackage[dvips]{graphics}
+\end{verbatim}
+It is possible for packages to share common options. For example,
+you could, in addition, load the \textsf{color} package by specifying:
+\begin{verbatim}
+ \documentclass[twoside]{article}
+ \usepackage[dvips]{graphics}
+ \usepackage[dvips]{color}
+\end{verbatim}
+But because |\usepackage| allows more than one package to be listed,
+this can be shortened to:
+\begin{verbatim}
+ \documentclass[twoside]{article}
+ \usepackage[dvips]{graphics,color}
+\end{verbatim}
+In addition, packages will also use each option given to
+the |\documentclass| command (if they know what to do with it), so you
+could also write:
+\begin{verbatim}
+ \documentclass[twoside,dvips]{article}
+ \usepackage{graphics,color}
+\end{verbatim}
+Class and package options are covered in more detail in
+\emph{\LaTeXcomp} and in \emph{\clsguide}.
+
+\subsection{Standard classes}
+
+The following classes are distributed with \LaTeX:
+\begin{description}
+
+\item[article] The |article| class described in \emph{\LaTeXbook}.
+\item[book] The |book| class described in \emph{\LaTeXbook}.
+\item[report] The |report| class described in \emph{\LaTeXbook}.
+\item[letter] The |letter| class described in \emph{\LaTeXbook}.
+\item[slides] The |slides| class described in \emph{\LaTeXbook},
+ formerly \SLiTeX.
+\item[proc] A document class for proceedings, based on |article|.
+ Formerly the |proc| package.
+\item[ltxdoc] The document class for documenting the \LaTeX{}
+ program, based on |article|.
+\item[ltxguide] The document class for \emph{\usrguide} and
+ \emph{\clsguide}, based on |article|. The document you are reading
+ now uses the |ltxguide| class. The layout for this class is likely
+ to change in future releases of \LaTeX.
+\item[ltnews] The document class for the \emph{\LaTeX{} News}
+ information sheet, based on |article|. The layout for this class
+ is likely to change in future releases of \LaTeX.
+\item[minimal]
+\NEWfeature{1995/12/01}
+ This class is the bare minimum (3 lines) that is needed in a
+ \LaTeX\ class file. It just sets the text width and height, and
+ defines |\normalsize|. It is principally intended for debugging
+ and testing \LaTeX\ code in situations where you do not need to
+ load a `full' class such as |article|. If, however, you are
+ designing a completely new class that is aimed for documents with
+ structure radically different from the structure supplied by the
+ article class, then it may make sense to use this as a base and add
+ to it code implementing the required structure, rather than
+ starting from |article| and modifying the code there.
+\end{description}
+
+\subsection{Standard packages}
+\label{Sec:st-pack}
+
+The following packages are distributed with \LaTeX:
+\begin{description}
+\item[alltt]
+\NEWfeature{1994/12/01}
+ This package provides the |alltt| environment, which is like
+ the |verbatim| environment except that |\|, |{|, and |}|
+ have their usual meanings. It is described in |alltt.dtx| and
+ \emph{\LaTeXbook}.
+\item[doc] This is the basic package for typesetting the documentation
+ of \LaTeX{} programs. It is described in |doc.dtx| and in
+ \emph{\LaTeXcomp}.
+\item[exscale] This provides scaled versions of the math extension
+ font. It is described in |exscale.dtx| and \emph{\LaTeXcomp}.
+ \item[fontenc] This is used to specify which font encoding \LaTeX{}
+ should use. It is described in |ltoutenc.dtx|.
+\item[graphpap]
+\NEWfeature{1994/12/01}
+ This package defines the |\graphpaper| command; this
+ can be used in a |picture| environment.
+\item[ifthen] Provides commands of the form `if\dots then do\dots
+ otherwise do\dots'.
+ It is described in |ifthen.dtx| and \emph{\LaTeXcomp}.
+\item[inputenc]
+\NEWfeature{1994/12/01}
+ This is used to specify which input encoding \LaTeX{} should use.
+ It is described in |inputenc.dtx|.
+\item[latexsym] \LaTeXe{} no longer loads the \LaTeX{} symbol font by
+ default. To access it, you should use the |latexsym| package. It
+ is described in |latexsym.dtx| and in \emph{\LaTeXcomp}; see also
+ Section~\ref{Sec:problems}.
+ \item[makeidx] This provides commands for producing indexes. It is
+ described in \emph{\LaTeXbook} and in \emph{\LaTeXcomp}.
+ \item[newlfont] This is used to emulate the font commands of
+ \LaTeX~2.09 with the New Font Selection Scheme. It is described in
+ \emph{\LaTeXcomp}.
+ \item[oldlfont] This is used to emulate the font commands of
+ \LaTeX~2.09. It is described in \emph{\LaTeXcomp}.
+ \item[showidx]
+ This causes the argument of each |\index| command to
+ be printed on the page where it occurs.
+ It is described in \emph{\LaTeXbook}.
+ \item[syntonly] This is used to process a document without
+ typesetting it. It is described in |syntonly.dtx| and in
+ \emph{\LaTeXcomp}.
+ \item[tracefnt] This allows you to control how much information about
+ \LaTeX's font loading is displayed. It is described in
+ \emph{\LaTeXcomp}.
+\end{description}
+
+\subsection{Related software}
+
+\NEWdescription{1998/12/01}
+The following software should be available from the same distributor
+as your copy of \LaTeXe. You should obtain at least the
+\textsf{graphics} and \textsf{tools} collections in order to have all
+the files described in \emph{\LaTeXbook}. The |amsmath| package (part
+of \textsf{amslatex} and formerly known as |amstex|)
+and \textsf{babel} are also mentioned in the list
+of `standard packages' in section C.5.2 of that book.
+\begin{description}
+\item[amslatex] Advanced mathematical typesetting from the American
+ Mathematical Society. This includes the |amsmath| package; it
+ provides many commands for typesetting mathematical formulas of
+ higher complexity. It is produced and supported by the American
+ Mathematical Society and it is described in \emph{\LaTeXcomp}.
+\item[babel] This package and related files support typesetting in
+ many languages. It is described in \emph{\LaTeXcomp}.
+\item[cyrillic]
+\NEWfeature{1998/12/01}
+ Everything you need (except the fonts themselves) for
+ typesetting with Cyrillic fonts.
+\item[graphics] This includes the |graphics| package which
+ provides support for the inclusion and transformation of graphics,
+ including files produced by other software. Also included, is the
+ |color| package which provides support for typesetting in colour.
+ Both these packages are described in \emph{\LaTeXbook}.
+\item[psnfss] Everything you need (except the fonts themselves) for
+ typesetting with a large range of Type~1 (PostScript) fonts.
+\item[tools] Miscellaneous packages written by the \LaTeX3
+ project team.
+\end{description}
+These packages come with documentation and each of them is also
+described in at least one of the books \emph{\LaTeXcomp} and
+\emph{\LaTeXbook}.
+
+\subsubsection{Tools}
+
+This collection of packages includes, at least, the following (some
+files may have slightly different names on certain systems):
+
+\begin{description}
+\item[array]
+ Extended versions of the environments |array|, |tabular|
+ and |tabular*|, with many extra features.
+\item[calc]
+\NEWfeature{1996/12/01}
+ Enables the use of certain algebraic notation when specifying
+ values for lengths and counters.
+\item[dcolumn]
+ Alignment on `decimal points' in tabular entries. Requires the
+ |array| package.
+\item[delarray]
+ Adds `large delimiters' around arrays. Requires |array|.
+\item[hhline]
+ Finer control over horizontal rules in tables. Requires |array|.
+\item[longtable]
+ Multi-page tables. (Does not require |array|, but it uses the
+ extended features if both are loaded.)
+\item[tabularx]
+ Defines a |tabularx| environment that is similar to |tabular*|
+ but it modifies the column widths, rather than the inter-column
+ space, to achieve the desired table width.
+\item[afterpage]
+ Place text after the current page.
+\item[bm]
+ Access bold math symbols.
+\item[enumerate]
+ Extended version of the |enumerate| environment.
+\item[fontsmpl]
+ Package and test file for producing `font samples'.
+\item[ftnright]
+ Place all footnotes in the right-hand column in two-column mode.
+\item[indentfirst]
+ Indent the first paragraph of sections, etc.
+\item[layout]
+ Show the page layout defined by the current document class.
+\item[multicol]
+ Typeset text in columns, with the length of the columns
+ `balanced'.
+\item[rawfonts]
+ Preload fonts using the old internal font names of \LaTeX~2.09.
+ See Section~\ref{Sec:oldinternals}.
+\item[somedefs]
+ Selective handling of package options. (Used by the rawfonts
+ package.)
+\item[showkeys]
+ Prints the `keys' used by |\label|, |\ref|, |\cite| etc.; useful
+ whilst drafting.
+\item[theorem]
+ Flexible declaration of `theorem-like' environments.
+\item[varioref]
+ `Smart' handling of page references.
+\item[verbatim]
+ Flexible extension of the verbatim environment.
+\item[xr]
+ Cross reference other `external' documents.
+\item[xspace]
+ `Smart space' command that helps you to avoid the common mistake
+ of missing spaces after command names.
+\end{description}
+
+
+\section{Commands}
+\label{Sec:commands}
+
+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}
+
+The changes to the preamble commands are intentionally designed to make
+\LaTeXe{} documents look clearly different from old documents. The
+commands should be used only before |\begin{document}|.
+
+\begin{decl}
+|\documentclass| \oarg{option-list} \arg{class-name}
+ \oarg{release-date}
+\end{decl}
+
+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.
+
+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,
+as well as those in all following |\usepackage| commands (see
+below).
+
+The optional argument \m{release-date} can be used to specify the
+earliest desired release date of the class file; it should contain a
+date in the format \textsc{yyyy/mm/dd}. If a version of the class
+older than this date is found, a warning is issued.
+
+For example, to specify a two-column article, using a version of
+|article.cls| released after June 1994, you specify:
+\begin{verbatim}
+ \documentclass[twocolumn]{article}[1994/06/01]
+\end{verbatim}
+
+\begin{decl}
+|\documentstyle| \oarg{option-list} \arg{class-name}
+\end{decl}
+
+This command is still supported for compatibility with old files. It
+is essentially the same as |\documentclass| except that it invokes
+\emph{\LaTeX~2.09 compatibility mode}. It also causes any options in
+the \m{option-list} that are not processed by the class file to be
+loaded as packages after the class has been loaded. See
+Section~\ref{Sec:209} for more details on \LaTeX~2.09 compatibility
+mode.
+
+\begin{decl}
+|\usepackage| \oarg{option-list} \arg{package-name} \oarg{release-date}
+\end{decl}
+
+Any number of |\usepackage| commands is allowed. Each package file
+(as denoted by \m{package-name}) defines new elements (or modifies
+those defined in the class file loaded by the \m{class-name} argument
+of the |\documentclass| command). A package file thus extends the
+range of documents which can be processed.
+
+The \m{option-list} argument can contain a list of options, each of
+which can modify the formatting of elements which are defined in this
+\m{package-name} file.
+
+As above, \m{release-date} can contain the earliest desired release
+date of the package file in the format \textsc{yyyy/mm/dd}; if an
+older version of the package is found, a warning is issued.
+
+For example, to load the |graphics| package for the |dvips| driver,
+using a version of |graphics.sty| released after June 1994, you write:
+\begin{verbatim}
+ \usepackage[dvips]{graphics}[1994/06/01]
+\end{verbatim}
+Each package is loaded only once. If the same package is requested
+more than once, nothing happens in the second or following attempt
+unless the package has been requested with options that were not given
+in the original |\usepackage|. If such extra options are specified
+then an error message is produced. See Section~\ref{Sec:problems} how
+to resolve this problem.
+
+As well as processing the options given in the \m{option-list} of the
+|\usepackage| command, each package processes the
+\m{option-list} of the |\documentclass| command as well. This
+means that any option which should be processed by every package (to
+be precise, by every package that specifies an action for it) can be
+specified just once, in the |\documentclass| command, rather than
+being repeated for each package that needs it.
+
+\begin{decl}
+|\listfiles|
+\end{decl}
+
+If this command is placed in the preamble then a list of the files
+read in (as a result of processing the document) will be displayed
+on the terminal (and in the log file) at the end of the run. Where
+possible, a short description will also be produced.
+
+\NEWdescription{1995/12/01}
+\emph{Warning}: this command will list only files which were read
+using \LaTeX{} commands such as |\input|\arg{file} or
+|\include|\arg{file}. If the file was read using the primitive \TeX{}
+syntax |\input |\emph{file} (without |{ }| braces around the file name)
+then it will not be listed; failure to use the \LaTeX{} form with the
+braces can cause more severe problems, possibly leading to overwriting
+important files, so \textbf{always put in the braces}.
+
+
+\begin{decl}
+|\setcounter{errorcontextlines}| \arg{num}
+\end{decl}
+
+\TeX~3 introduced a new primitive |\errorcontextlines| which controls
+the format of error messages. \LaTeXe\ provides an interface to this
+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{Document structure}
+
+The |book| document class introduces new commands to indicate
+document structure.
+\begin{decl}
+|\frontmatter| \\ |\mainmatter| \\ |\backmatter|
+\end{decl}
+These commands indicate the beginning of the front matter (title page,
+table of contents and prefaces), main matter (main text) and back
+matter (bibliography, indexes and colophon).
+
+\subsection{Definitions}
+
+In \LaTeX, commands can have both mandatory and optional arguments,
+for example in:
+\begin{verbatim}
+ \documentclass[11pt]{article}
+\end{verbatim}
+the |11pt| argument is optional, whereas the |article| class name is
+mandatory.
+
+In \LaTeX~2.09 users could define commands with arguments, but these
+had to be mandatory arguments. With \LaTeXe, users can now define
+commands and environments which also have one optional argument.
+
+\begin{decl}
+|\newcommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\
+|\newcommand*| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\
+|\renewcommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\
+|\renewcommand*| \arg{cmd} \oarg{num} \oarg{default} \arg{definition}
+\end{decl}
+
+These commands have a new, second, optional argument; this is used for
+defining commands which themselves take one optional argument. This
+new argument is best introduced by means of a simple (and hence not
+very practical) example:
+\begin{verbatim}
+ \newcommand{\example}[2][YYY]{Mandatory arg: #2;
+ Optional arg: #1.}
+\end{verbatim}
+This defines |\example| to be a command with two arguments, referred
+to as |#1| and |#2| in the \arg{definition}---nothing new so far. But
+by adding a second optional argument to this |\newcommand| (the
+|[YYY]|) the first argument (|#1|) of the newly defined command
+|\example| is made optional with its default value being |YYY|.
+
+Thus the usage of |\example| is either:
+\begin{verbatim}
+ \example{BBB}
+\end{verbatim}
+which prints:
+\begin{quote}
+ Mandatory arg: BBB;
+ Optional arg: YYY.
+\end{quote}
+or:
+\begin{verbatim}
+ \example[XXX]{AAA}
+\end{verbatim}
+which prints:
+\begin{quote}
+ Mandatory arg: AAA;
+ Optional arg: XXX.
+\end{quote}
+
+The default value of the optional argument is \texttt{YYY}.
+This value is specified as the \oarg{default} argument of the
+|\newcommand| that created |\example|.
+
+As another more useful example, the definition:
+\begin{verbatim}
+ \newcommand{\seq}[2][n]{\lbrace #2_{0},\ldots,\,#2_{#1} \rbrace}
+\end{verbatim}
+means that the input |$\seq{a}$| produces
+the formula $\lbrace a_{0},\ldots,\,a_{n} \rbrace$,
+whereas the input |$\seq[k]{x}$| produces the formula
+$\lbrace x_{0},\ldots,\,x_{k} \rbrace$.
+
+In summary, the command:
+\begin{quote}
+ |\newcommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition}
+\end{quote}
+defines \m{cmd} to be a command with \m{num} arguments, the first of
+which is optional and has default value \m{default}.
+
+Note that there can only be one optional argument but, as before,
+there can be up to nine arguments in total.
+
+\begin{decl}
+|\newenvironment|
+ \arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} \\
+|\newenvironment*|
+ \arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} \\
+|\renewenvironment|
+ \arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} \\
+|\renewenvironment*|
+ \arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def}
+\end{decl}
+
+\LaTeXe\ also supports the creation of environments that have one
+optional argument. Thus the syntax of these two commands has
+been extended in the same way as that of |\newcommand|.
+
+\begin{decl}
+|\providecommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\
+|\providecommand*| \arg{cmd} \oarg{num} \oarg{default} \arg{definition}
+\end{decl}
+
+This takes the same arguments as |\newcommand|. If \m{cmd} is already
+defined then the existing definition is kept; but if it is currently
+undefined then the effect of |\providecommand| is to define \m{cmd}
+just as if |\newcommand| had been used.
+
+\NEWfeature{1994/12/01}
+ All the above five `defining commands' now have \texttt{*}-forms that
+ are usually the better form to use when defining commands with
+ arguments, unless any of these arguments is intended to contain
+ whole paragraphs of text. Moreover, if you ever do find yourself
+ needing to use the non-star form then you should ask whether
+ that argument would not better be treated as the contents of a
+ suitably defined environment.
+
+\NEWfeature{1995/12/01}
+ The commands produced by the above five `defining commands' are
+ now robust.
+
+\subsection{Boxes}
+
+These next three commands for making LR-boxes all existed in
+\LaTeX~2.09. They have been enhanced in two ways.
+
+\begin{decl}
+|\makebox| \oarg{width} \oarg{pos} \arg{text} \\
+|\framebox| \oarg{width} \oarg{pos} \arg{text} \\
+|\savebox| \arg{cmd} \oarg{width} \oarg{pos} \arg{text}
+\end{decl}
+
+One small but far-reaching change for \LaTeXe\ is that, within the
+\m{width} argument only, four special lengths can be used. These are
+all dimensions of the box that would be produced by using simply
+|\mbox|\arg{text}:
+\begin{itemize}
+\item [] |\height|\quad its height above the baseline;
+\item [] |\depth|\quad its depth below the baseline;
+\item [] |\totalheight|\quad the sum of |\height| and |\depth|;
+\item [] |\width|\quad its width.
+\end{itemize}
+Thus, to put `hello' in the centre of a box of twice its natural
+width, you would use:
+\begin{verbatim}
+ \makebox[2\width]{hello}
+\end{verbatim}
+Or you could put \textit{f} into a square box, like
+this:
+ \framebox{\makebox[\totalheight]{\itshape f\/}}
+\begin{verbatim}
+ \framebox{\makebox[\totalheight]{\itshape f\/}}
+\end{verbatim}
+Note that it is the total width of the framed box, including the
+frame, which is set to |\totalheight|.
+
+The other change is a new possibility for \m{pos}: |s| has been added
+to |l| and |r|. If \m{pos} is |s| then the text is stretched the full
+length of the box, making use of any `rubber lengths' (including any
+inter-word spaces) in the contents of the box. If no such `rubber
+length' is present, an `underfull box' will probably be produced.
+
+\begin{decl}
+|\parbox| \oarg{pos} \oarg{height} \oarg{inner-pos} \arg{width}
+ \arg{text} \\
+|\begin{minipage}|
+ \oarg{pos} \oarg{height} \oarg{inner-pos} \arg{width}\\
+\m{text}\\
+|\end{minipage}|
+\end{decl}
+
+As for the box commands above, |\height|, |\width|, etc.~may be used
+in the \oarg{height} argument to denote the natural dimensions of the
+box.
+
+The \m{inner-pos} argument is new in \LaTeXe. It is the vertical
+equivalent to the \m{pos} argument for |\makebox|, etc, determining
+the position of \m{text} within the box. The \m{inner-pos} may be any
+one of |t|, |b|, |c|, or |s|, denoting top, bottom, centered, or
+`stretched' alignment respectively. When the \m{inner-pos} argument
+is not specified, \LaTeX\ gives it same value as \m{pos} (this could be
+the latter's default value).
+
+
+\begin{decl}
+|\begin{lrbox}| \arg{cmd}\\
+\m{text}\\
+|\end{lrbox}|
+\end{decl}
+
+This is an environment which does not directly print anything.
+Its effect is to save the typeset \m{text} in the bin \m{cmd}. Thus
+it is like |\sbox| \arg{cmd} \arg{text}, except that any white space
+before or after the contents \m{text} is ignored.
+
+This is very useful as it enables both the |\verb| command and the
+\texttt{verbatim} environment to be used within \m{text}.
+
+It also makes it possible to define, for example, a `framed box'
+environment. This is done by first using this environment to save
+some text in a bin \m{cmd} and then calling
+|\fbox{\usebox{|\m{cmd}|}}|.
+
+The following example defines an environment, called |fmpage|, that is
+a framed version of |minipage|.
+\begin{verbatim}
+ \newsavebox{\fmbox}
+ \newenvironment{fmpage}[1]
+ {\begin{lrbox}{\fmbox}\begin{minipage}{#1}}
+ {\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}}
+\end{verbatim}
+
+
+\subsection{Measuring things}
+
+The first of these next commands was in \LaTeX~2.09. The two new
+commands are the obvious analogues.
+
+\begin{decl}
+|\settowidth| \arg{length-cmd} \arg{lr text} \\
+|\settoheight| \arg{length-cmd} \arg{lr text} \\
+|\settodepth| \arg{length-cmd} \arg{lr text}
+\end{decl}
+
+\subsection{Line endings}
+
+\NEWdescription{1994/12/01}
+The command |\\|, which is used to indicate a line-end in various
+places, is now a robust command when used within arguments such as
+section titles.
+
+Also, because it is often necessary to distinguish which type of line
+is to be ended, we have introduced the following new command; it
+has the same argument syntax as that of |\\|.
+\begin{decl}[1994/12/01]
+|\tabularnewline| \oarg{vertical-space}
+\end{decl}
+One example of its use is when the text in the last
+column of a |tabular| environment is set with |\raggedright|; then
+|\tabularnewline| can be used to indicate the end of a row of the
+|tabular|, whilst |\\| will indicate the end of a line of text in a
+paragraph within the column. This command can be used in the |array|
+environment as well as |tabular|, and also the extended versions of
+these environments offered by the \textsf{array} and \textsf{longtable}
+packages in the tools collection.
+
+\subsection{Controlling page breaks}
+
+Sometimes it is necessary, for a final version of a document, to
+`help' \LaTeX\ break the pages in the best way. \LaTeX~2.09 had a
+variety of commands for this situation: |\clearpage|, |\pagebreak|
+etc. \LaTeXe\ provides, in addition, commands which can produce
+longer pages as well as shorter ones.
+
+
+\begin{decl}
+|\enlargethispage| \arg{size} \\
+|\enlargethispage*| \arg{size}
+\end{decl}
+
+These commands increase the height of a page (from its normal value of
+|\textheight|) by the specified amount \m{size}, a rigid length. This
+change affects \emph{only} the current page.
+
+This can be used, for example, to allow an extra line to be fitted
+onto the page or, with a negative length, to produce a page
+shorter than normal.
+
+The star form also shrinks any vertical white space on the page as
+much as possible, so as to fit the maximum amount of text on the
+page.
+
+\NEWdescription{1995/12/01}
+These commands do not change the position of the footer text; thus, if
+a page is lengthened too far, the main text may overprint the footer.
+
+\subsection{Floats}
+
+There is a new command, |\suppressfloats|, and a new `float
+specifier'. These will enable people to gain better
+control of \LaTeX's float placement algorithm.
+
+\begin{decl}
+|\suppressfloats| \oarg{placement}
+\end{decl}
+
+This command stops any further floating environments from being placed
+on the current page. With an optional argument, which should be either
+|t| or |b| (not both), this restriction applies only to putting
+further floats at the top or at the bottom. Any floats which would
+normally be placed on this page are placed on the next page instead.
+
+\begin{decl}
+The extra float location specifier: \ \texttt{!}
+\end{decl}
+
+This can be used, along with at least one of \texttt{h}, \texttt{t},
+\texttt{b} and \texttt{p}, in the location optional argument of a
+float.
+
+If a \texttt{!} is present then, just for this particular float,
+whenever it is processed by the float mechanism the following are
+ignored:
+\begin{itemize}
+\item all restrictions on the number of floats which can appear;
+\item all explicit restrictions on the amount of space on a text page
+which may be occupied by floats or must be occupied by text.
+\end{itemize}
+The mechanism will, however, still attempt to ensure that pages are
+not overfull and that floats of the same type are printed in the
+correct order.
+
+Note that its presence has no effect on the production of float pages.
+
+A \texttt{!} specifier overrides the effect of any |\suppressfloats|
+command for this particular float.
+
+\subsection{Font changing: text}
+
+The font selection scheme used in \LaTeXe{} differs a lot from that
+used in \LaTeX~2.09. In this section, we give a brief description of
+the new commands. A more detailed description with examples is given
+in \emph{\LaTeXcomp}, and the interface for class- and package-writers
+is described in \emph{\fntguide}.
+
+\begin{decl}
+|\normalfont|\\
+|\rmfamily|\\
+|\sffamily|\\
+|\ttfamily|\\
+|\mdseries|\\
+|\bfseries|\\
+|\upshape|\\
+|\itshape|\\
+|\slshape|\\
+|\scshape|
+\end{decl}
+
+These are font commands whose use is the same as the commands |\rm|,
+|\bf|, etc. The difference is that each command changes just one
+attribute of the font (the attribute changed is part of the name).
+One result of this is that, for example, |\bfseries\itshape| produces
+both a change of series and a change of shape, to give a bold italic
+font.
+
+\begin{decl}
+|\textnormal|\arg{text}\\
+|\textrm|\arg{text}\\
+|\textsf|\arg{text}\\
+|\texttt|\arg{text}\\
+|\textmd|\arg{text}\\
+|\textbf|\arg{text}\\
+|\textup|\arg{text}\\
+|\textit|\arg{text}\\
+|\textsl|\arg{text}\\
+|\textsc|\arg{text}\\
+|\emph|\arg{text}
+\end{decl}
+
+These are one-argument commands; they take as an argument the
+text which is to be typeset in the particular font. They also
+automatically insert italic corrections where appropriate; if you do
+not like the result, you can add an italic correction with |\/| or
+remove it with |\nocorr|. The |\nocorr| should always be the first or
+last thing within the \arg{text} argument.
+
+\subsection{Font changing: math}
+
+Most of the fonts used within math mode do not need to be explicitly
+invoked; but to use letters from a range of fonts, the following
+class of commands is provided.
+
+\begin{decl}
+|\mathrm| \arg{letters}\\
+|\mathnormal| \arg{letters}\\
+|\mathcal| \arg{letters}\\
+|\mathbf| \arg{letters}\\
+|\mathsf| \arg{letters}\\
+|\mathtt| \arg{letters}\\
+|\mathit| \arg{letters}
+\end{decl}
+
+These are also one-argument commands which take as an argument the
+letters which are to be typeset in the particular font. The argument
+is processed in math mode so spaces within it will be ignored. Only
+letters, digits and accents have their font changed, for example
+|$\mathbf{\tilde A \times 1}$| produces $\mathbf{\tilde A \times 1}$.
+
+\subsection{Ensuring math mode}
+
+\begin{decl}
+|\ensuremath| \arg{math commands}
+\end{decl}
+
+In \LaTeX~2.09, if you wanted a command to work both in math mode and
+in text mode, the suggested method was to define something like:
+\begin{verbatim}
+ \newcommand{\Gp}{\mbox{$G_p$}}
+\end{verbatim}
+Unfortunately, the |\mbox| stops |\Gp| changing size correctly in (for
+instance) subscripts or a fraction.
+
+In \LaTeXe{} you can define it thus:
+\begin{verbatim}
+ \newcommand{\Gp}{\ensuremath{G_p}}
+\end{verbatim}
+Now |\Gp| will work correctly in all contexts.
+
+This is because the |\ensuremath| does nothing, producing simply
+|G_p|, when |\Gp| is used within math mode; but it ensures that math
+mode is entered (and exited) as required when |\Gp| is used in text
+mode.
+
+
+\subsection{Setting text superscripts}
+
+\begin{decl}
+|\textsuperscript| \arg{text}
+\end{decl}
+
+\NEWfeature{1995/06/01} In \LaTeX~2.09 textual superscripts such as
+footnote markers were produced by internally entering math mode and
+typesetting the number as a math superscript. This normally looked
+fine since the digits in math fonts are the same as those in text
+fonts when Computer Modern fonts are used. But when a different
+document font (such as Times) is selected, the results look rather
+strange. For this reason the command |\textsuperscript| has been
+introduced which typesets its argument in the current text font, in a
+superscript position and in the correct size.
+
+\subsection{Text commands: all encodings}
+
+\NEWdescription{1994/12/01}
+ One of the main differences between \LaTeXe{} and \LaTeX~2.09 is
+ that \LaTeXe{} can deal with fonts in arbitrary \emph{encodings}.
+ (A font encoding is the sequence of characters in the font---for
+ example a Cyrillic font would have a different encoding from a Greek
+ font.)
+
+ The two major font encodings that are used for Latin languages such
+ as English or German are |OT1| (Donald Knuth's 7-bit encoding, which
+ has been used during most of \TeX's lifetime) and |T1| (the new
+ 8-bit `Cork' encoding).
+
+ \LaTeX~2.09 only supported the |OT1| encoding, whereas \LaTeXe{} has
+ support for both |OT1| and |T1| built-in. The next section will
+ cover the new commands which are available if you have |T1|-encoded
+ fonts. This section describes new commands which are available in
+ all encodings.
+
+ Most of these commands provide characters which were available in
+ \LaTeX~2.09 already. For example |\textemdash| gives an `em dash',
+ which was available in \LaTeX~2.09 by typing |---|. However, some
+ fonts (for example a Greek font) may not have the |---| ligature,
+ but you will still be able to access an em dash by typing
+ |\textemdash|.
+
+\begin{decl}[1994/12/01]
+ |\r{<text>}|
+\end{decl}
+ This command gives a `ring' accent, for example `\r{o}' can be typed
+ |\r{o}|.
+
+\begin{decl}[1994/12/01]
+ |\SS|
+\end{decl}
+ This command produces a German `SS', that is a capital `\ss'. This
+ letter can hyphenate differently from `SS', so is needed for entering
+ all-caps German.
+
+\begin{decl}[1994/12/01]
+ |\textcircled{<text>}|
+\end{decl}
+ This command is used to build `circled characters' such as
+ |\copyright|. For example |\textcircled{a}| produces
+ \textcircled{a}.
+
+\begin{decl}[1994/12/01]
+ |\textcompwordmark|
+\end{decl}
+ This command is used to separate letters which would normally
+ ligature. For example `f\textcompwordmark i' is produced with
+ |f\textcompwordmark i|. Note that the `f' and `i' have not
+ ligatured to produce `fi'. This is rarely useful in English
+ (`shelf\textcompwordmark ful' is a rare example of where it might be
+ used) but is used in languages such as German.
+
+\begin{decl}[1994/12/01]
+ |\textvisiblespace|
+\end{decl}
+ This command produces a `visible space' character
+ `\textvisiblespace'. This is sometimes used in computer listings,
+ for example `type \textsf{hello\textvisiblespace world}'.
+
+\begin{decl}[1994/12/01]
+ |\textemdash|
+ |\textendash|
+ |\textexclamdown|
+ |\textquestiondown| \\
+ |\textquotedblleft|
+ |\textquotedblright|
+ |\textquoteleft|
+ |\textquoteright|
+\end{decl}
+ These commands produce characters which would otherwise be
+ accessed via ligatures:
+ \begin{center}
+ \begin{tabular}{ccl}
+ \emph{ligature} & \emph{character} & \emph{command} \\
+ |---| & --- & |\textemdash| \\
+ |--| & -- & |\textendash| \\
+ |!`| & !` & |\textexclamdown| \\
+ |?`| & ?` & |\textquestiondown| \\
+ |``| & `` & |\textquotedblleft| \\
+ |''| & '' & |\textquotedblright| \\
+ |`| & ` & |\textquoteleft| \\
+ |'| & ' & |\textquoteright|
+ \end{tabular}
+ \end{center}
+ The reason for making these characters directly accessible is so
+ that they will work in encodings which do not have these characters.
+
+\begin{decl}[1994/12/01]
+ |\textbullet|
+ |\textperiodcentered|
+\end{decl}
+ These commands allow access to characters which were previously only
+ available in math mode:
+ \begin{center}
+ \begin{tabular}{lcl}
+ \emph{math command} & \emph{character} & \emph{text command} \\
+ |\bullet| & $\bullet$ & |\textbullet| \\
+ |\cdot| & $\cdot$ & |\textperiodcentered|
+ \end{tabular}
+ \end{center}
+
+\begin{decl}[1995/12/01]
+ |\textbackslash|
+ |\textbar|
+ |\textless|
+ |\textgreater|
+\end{decl}
+ These commands allow access to ASCII characters which were
+ only available in verbatim or math mode:
+ \begin{center}
+ \begin{tabular}{lcl}
+ \emph{math command} & \emph{character} & \emph{text command} \\
+ |\backslash| & $\backslash$ & |\textbackslash| \\
+ |\mid| & $\mid$ & |\textbar| \\
+ |<<| & $<$ & |\textless| \\
+ |>>| & $>$ & |\textgreater|
+ \end{tabular}
+ \end{center}
+
+\begin{decl}[1995/12/01]
+ |\textasciicircum|
+ |\textasciitilde|
+\end{decl}
+ These commands allow access to ASCII characters which were
+ previously only available in verbatim:
+ \begin{center}
+ \begin{tabular}{cl}
+ \emph{verbatim} & \emph{text command} \\
+ |^| & |\textasciicircum| \\
+ |~| & |\textasciitilde|
+ \end{tabular}
+ \end{center}
+
+\begin{decl}[1995/12/01]
+ |\textregistered|
+ |\texttrademark|
+\end{decl}
+ These commands provide the `registered trademark' (R) and
+ `trademark' (TM) symbols.
+
+\subsection{Text commands: the T1 encoding}
+
+\NEWdescription{1994/12/01}
+ The |OT1| font encoding is fine for typesetting in English, but has
+ problems when typesetting other languages. The |T1| encoding solves
+ some of these problems, by providing extra characters (such as `eth'
+ and `thorn'), and it allows words containing accented letters to be
+ hyphenated (as long as you have a package like |babel| which allows
+ for non-American hyphenation).
+
+ This section describes the commands you can use if you have the |T1|
+ fonts. To use them, you need to get the `ec fonts', or the
+ |T1|-encoded PostScript fonts, as used by \textsf{psnfss}.
+ All these fonts are
+ available by anonymous ftp in the Comprehensive \TeX{} Archive, and
+ are also available on the CD-ROMs \emph{4all \TeX} and
+ \emph{\TeX{} Live} (both available from the \TeX{} Users Group).
+
+ You can then select the |T1| fonts by saying:
+\begin{verbatim}
+ \usepackage[T1]{fontenc}
+\end{verbatim}
+ This will allow you to use the commands in this section.
+
+ \emph{Note:} Since this document must be processable on any site
+ running an up-to-date \LaTeX, it does not contain any characters
+ that are present only in |T1|-encoded fonts. This means that this
+ document cannot show you what these glyphs look like! If you want
+ to see them then run \LaTeX{} on the document |fontsmpl| and
+ respond `|cmr|' when it prompts you for a family name.
+
+\begin{decl}[1994/12/01]
+ |\k{<text>}|
+\end{decl}
+ This command produces an `ogonek' accent.
+
+\begin{decl}[1994/12/01]
+ |\DH|
+ |\DJ|
+ |\NG|
+ |\TH|
+ |\dh|
+ |\dj|
+ |\ng|
+ |\th|
+\end{decl}
+ These commands produce characters `eth', `dbar', `eng', and `thorn'.
+
+\begin{decl}[1994/12/01]
+ |\guillemotleft|
+ |\guillemotright|
+ |\guilsinglleft|
+ |\guilsinglright| \\
+ |\quotedblbase|
+ |\quotesinglbase|
+ |\textquotedbl|
+\end{decl}
+ % A local hack (could be improved):
+ \newcommand{\fauxguillemet}[1]{$\vcenter{\hbox{$\scriptscriptstyle#1$}}$}
+ These commands produce various sorts of quotation mark.
+ Rough representations of them are:
+ \fauxguillemet\ll a\fauxguillemet\gg{}
+ \fauxguillemet<a\fauxguillemet>
+ ,\kern -0.1em,\kern 0.05em a\kern -0.05em``
+ ,\kern 0.05em a\kern -0.05em` and |"|a|"|.
+
+\NEWdescription{2001/06/01}
+ There are therefore some extra short-form ligatures available for
+ use in documents that will only be used with |T1|-encoded fonts.
+
+ The guillemets |\guillemotleft| and |\guillemotright|%
+ \footnote{We apologise once again for maintaining Adobe's
+ enormous solipsism~(sic) of confusing a diving bird with
+ punctuation marks!}
+ can be obtained by typing |<<<<| and |>>>>| and |\quotedblbase|
+ by typing |,,|\,.
+
+ Also, unlike the unexpected results with
+ |OT1|-encoded fonts, |<<| and |>>| will produce \textless{} and
+ \textgreater{}.
+
+ Note also that the single character |"| will no longer produce ''
+ but rather |\textquotedbl|.
+
+\subsection{Logos}
+
+\begin{decl}
+|\LaTeX|\\
+|\LaTeXe|
+\end{decl}
+
+|\LaTeX| (producing `\LaTeX') is still the `main' logo command,
+but if you need to refer to the new features, you can write
+|\LaTeXe| (producing `\LaTeXe').
+
+\subsection{Picture commands}
+
+\begin{decl}
+ |\qbezier[<N>](<AX>,<AY>)(<BX>,<BY>)(<CX>,<CY>)| \\
+ | \bezier{<N>}(<AX>,<AY>)(<BX>,<BY>)(<CX>,<CY>)|
+\end{decl}
+The |\qbezier| command can be used in |picture| mode to draw a
+quadratic Bezier curve from position |(<AX>,<AY>)| to |(<CX>,<CY>)| with
+control point |(<BX>,<BY>)|. The optional argument \m{N} gives the
+number of points on the curve.
+
+For example, the diagram:
+\begin{center}
+ \begin{picture}(50,50)
+ \thicklines
+ \qbezier(0,0)(0,50)(50,50)
+ \qbezier[20](0,0)(50,0)(50,50)
+ \thinlines
+ \put(0,0){\line(1,1){50}}
+ \end{picture}
+\end{center}
+is drawn with:
+\begin{verbatim}
+ \begin{picture}(50,50)
+ \thicklines
+ \qbezier(0,0)(0,50)(50,50)
+ \qbezier[20](0,0)(50,0)(50,50)
+ \thinlines
+ \put(0,0){\line(1,1){50}}
+ \end{picture}
+\end{verbatim}
+The |\bezier| command is the same, except that the argument \m{N} is not
+optional. It is provided for compatibility with the \LaTeX~2.09
+|bezier| document style option.
+
+\subsection{Old commands}
+
+\begin{decl}
+|\samepage|
+\end{decl}
+
+The |\samepage| command still exists but is no longer being
+maintained.
+This is because it only ever worked erratically; it does not
+guarantee that there will be no page-breaks within its scope; and
+it can cause footnotes and marginals to be wrongly placed.
+
+We recommend using |\enlargethispage| in conjunction with page-break
+commands such as |\newpage| and |\pagebreak| to help control page
+breaks.
+
+\begin{decl}
+ |\SLiTeX|
+\end{decl}
+Since \SLiTeX{} no longer exists, the logo is no longer defined in the
+\LaTeX{} kernel. A suitable replacement is |\textsc{Sli\TeX}|. The
+\SLiTeX{} logo is defined in \LaTeX~2.09 compatibility mode.
+
+\begin{decl}
+|\mho| |\Join| |\Box| |\Diamond| |\leadsto| \\
+|\sqsubset| |\sqsupset| |\lhd| |\unlhd| |\rhd| |\unrhd|
+\end{decl}
+
+These symbols are contained in the \LaTeX{} symbol font, which was
+automatically loaded by \LaTeX~2.09. However, \TeX{} has room for
+only sixteen math font families; thus many users discovered that they
+ran out. Because of this, \LaTeX{} does not load the \LaTeX{} symbol
+font unless you use the \textsf{latexsym} package.
+
+These symbols are also made available, using different fonts, by the
+\textsf{amsfonts} package, which also defines a large number of other
+symbols. It is supplied by the American Mathematical Society.
+
+The \textsf{latexsym} package is loaded automatically in \LaTeX~2.09
+compatibility mode.
+
+\section{\LaTeX~2.09 documents}
+\label{Sec:209}
+
+\LaTeXe{} can process (almost) any \LaTeX~2.09 document, by entering
+\emph{\LaTeX~2.09 compatibility mode}. Nothing has changed, you run
+\LaTeX{} in the same way you always did, and you will get much the
+same results.
+
+The reason for the `almost' is that some \LaTeX~2.09 packages made use
+of low-level unsupported features of \LaTeX. If you discover such a
+package, you should find out if it has been updated to work with
+\LaTeXe. Most packages will still work with \LaTeXe---the easiest way
+to find out whether a package still works is to try it!
+
+\LaTeX~2.09 compatibility mode is a comprehensive emulation of
+\LaTeX~2.09, but at the cost of time. Documents can run up to 50\%
+slower in compatibility mode than they did under \LaTeX~2.09.
+In addition, many of the new features of \LaTeXe{} are not available in
+\LaTeX~2.09 compatibility mode.
+
+\subsection{Warning}
+
+\NEWdescription{1995/12/01}
+This \emph{\LaTeX~2.09 compatibility mode} is provided solely to allow
+you to process 2.09 documents, i.e.~documents that were written (we
+hope, a long time ago) for a very old system and therefore could be
+processed by using a genuine antique \LaTeX~2.09 system.
+
+This mode is therefore \emph{not} intended to provide access to the
+enhanced features of \LaTeXe{}. Thus it must not be used to process
+new documents which masquerade as 2.09 documents (i.e.~they begin with
+|\documentstyle|) but which could not be processed using that genuine
+antique \LaTeX~2.09 system because they contain some new,
+\LaTeXe{}-only, commands or environments.
+
+To prevent such misuse of the system, and the consequent trouble it
+causes when such misleadingly encoded documents are distributed, the
+\emph{\LaTeX~2.09 compatibility mode} turns off most of these new
+features and commands. Any attempt to use them will give you an error
+message and, moreover, many of them simply will not work, whilst
+others will produce unpredictable results.
+So don't bother sending us any bug reports about such occurrences since
+they are intentional.
+
+
+\subsection{Font selection problems}
+\label{Sec:fsprob}
+
+When using compatibility mode, it is possible that you will find
+problems with font-changing commands in some old documents. These
+problems are of two types:
+
+\begin{itemize}
+\item producing error messages;
+\item not producing the font changes you expected.
+\end{itemize}
+
+In case of error messages it is possible that the document (or an old
+style file used therein) contains references to old internal commands
+which are no longer defined, see Section~\ref{Sec:oldinternals} for
+more information if this is the case.
+
+\NEWdescription{1995/12/01}
+One example of the unexpected is if you use one of the new style of
+math-mode font changing command as follows:
+\begin{verbatim}
+$ \mathbf{xy} A $
+\end{verbatim}
+You may well find that this behaves as if you had put:
+\begin{verbatim}
+$ \bf {xy} A $
+\end{verbatim}
+everything including the $A$ coming out bold.
+
+\LaTeX~2.09 allowed sites to customize their \LaTeX{} installation,
+which resulted in documents producing different results on different
+\LaTeX{} installations. \LaTeXe{} no longer allows so much
+customization but, for compatibility with old documents, the local
+configuration file |latex209.cfg| is loaded every time \LaTeXe{}
+enters \LaTeX~2.09 compatibility mode.
+
+For example, if your site was customized to use the New Font
+Selection Scheme (\NFSS) with the |oldlfont| option, then you can
+make \LaTeXe{} emulate this by creating a |latex209.cfg| file
+containing the commands:
+\begin{verbatim}
+\ExecuteOptions{oldlfont}\RequirePackage{oldlfont}
+\end{verbatim}
+Similarly, to emulate \NFSS{} with the |newlfont| option, you can
+create a |latex209.cfg| file containing:
+\begin{verbatim}
+\ExecuteOptions{newlfont}\RequirePackage{newlfont}
+\end{verbatim}
+
+
+\subsection{Native mode}
+\label{Sec:native}
+
+To run an old document faster, and use the new features of
+\LaTeXe, you should try using \emph{\LaTeXe{} native mode}.
+This is done by replacing the command:
+\begin{quote}
+ |\documentstyle[|\m{options}|,|\m{packages}|]|\arg{class}
+\end{quote}
+with:
+\begin{quote}
+ |\documentclass|\oarg{options}\arg{class} \\
+ |\usepackage{latexsym,|\m{packages}|}|
+\end{quote}
+However, some documents which can be processed in \LaTeX~2.09
+compatibility mode may not work in native mode. Some \LaTeX~2.09
+packages will only work with \LaTeXe{} in 2.09 compatibility mode.
+Some documents will cause errors because of \LaTeXe's improved error
+detection abilities.
+
+But most \LaTeX~2.09 documents can be processed by \LaTeXe{}'s native
+mode with the above change. Again, the easiest way to find out
+whether your documents can be processed in native mode is to try it!
+
+
+\section{Local modifications}
+\label{sec:loc}
+
+\NEWdescription{1995/12/01}
+There are two common types of local modifications that can be done
+very simply. Do not forget that documents produced using such
+modifications will not be usable at other places (such documents are
+called `non-portable').
+
+One type of modification is the use of personal commands for commonly
+used symbols or constructions. These should be put into a package
+file (for example, one called \texttt{mymacros.sty}) and loaded by
+putting |\usepackage{mymacros}| in the document preamble.
+
+Another type is a local document class that is very similar to one of
+the standard classes but contains some straightforward modifications
+such as extra environments, different values for some parameters, etc.
+These should be put into a class file; here we shall describe a simple
+method of constructing such a file using, as an example, a class
+called \textsf{larticle} that is very similar to the \textsf{article}
+class.
+
+\NEWfeature{1995/12/01}
+The class file called \texttt{larticle.cls} should (after the
+preliminary identification commands) start as follows:
+\begin{verbatim}
+ \LoadClassWithOptions{article}
+\end{verbatim}
+This command should be followed by whatever additions and changes you
+wish to make to the results of reading in the file
+\texttt{article.sty}.
+
+The effect of using the above |\LoadClassWithOptions| command is to
+load the standard class file \textsf{article} with whatever options
+are asked for by the document. Thus a document using your
+\textsf{larticle} class can specify any option that could be specified
+when using the standard \textsf{article} class; for example:
+\begin{verbatim}
+ \documentclass[a4paper,twocolumn,dvips]{larticle}
+\end{verbatim}
+
+
+\section{Problems}
+\label{Sec:problems}
+
+This section describes some of the things which may go wrong when
+using \LaTeXe, and what you can do about it.
+
+\subsection{New error messages}
+
+\LaTeXe{} has a number of new error messages.
+Please also note that many error messages now produce further helpful
+information if you press |h| in response to the error prompt.
+
+\begin{decl}
+|Option clash for package |\m{package}|.|
+\end{decl}
+The named package has been loaded twice with different options. If
+you enter |h| you will be told what the options were, for example, if
+your document contained:
+\begin{verbatim}
+ \usepackage[foo]{fred}
+ \usepackage[baz]{fred}
+\end{verbatim}
+then you will get the error message:
+\begin{verbatim}
+ Option clash for package fred.
+\end{verbatim}
+and typing |h| at the |?| prompt will give you:
+\begin{verbatim}
+ The package fred has already been loaded with options:
+ [foo]
+ There has now been an attempt to load it with options:
+ [baz]
+ Adding the line:
+ \usepackage[foo,baz]{fred}
+ to your document may fix this.
+ Try typing <<return>> to proceed.
+\end{verbatim}
+The cure is, as suggested, to load the package with both sets of
+options. Note that since \LaTeX{} packages can call other packages,
+it is possible to get a package option clash without explicitly
+requesting the same package twice.
+
+\begin{decl}
+ |Command |\m{command}| not provided in base NFSS.|
+\end{decl}
+The \m{command} is not provided by default in \LaTeXe. This error is
+generated by using one of the commands:
+\begin{verbatim}
+ \mho \Join \Box \Diamond \leadsto
+ \sqsubset \sqsupset \lhd \unlhd \rhd \unrhd
+\end{verbatim}
+which are now part of the \textsf{latexsym} package.
+The cure is to add:
+\begin{verbatim}
+ \usepackage{latexsym}
+\end{verbatim}
+in the preamble of your document.
+
+\begin{decl}
+ |LaTeX2e command <command> in LaTeX 2.09 document.|
+\end{decl}
+The \m{command} is a \LaTeXe{} command but this is a \LaTeX~2.09
+document. The cure is to replace the command by a \LaTeX~2.09
+command, or to run document in native mode, as described in
+Section~\ref{Sec:native}.
+
+\begin{decl}
+ |NFSS release 1 command \newmathalphabet found.|
+\end{decl}
+The command |\newmathalphabet| was used by the New Font Selection
+Scheme Release 1 but it has now been replaced by
+|\DeclareMathAlphabet|, the use of which is described in
+\emph{\fntguide}.
+
+The best cure is to update the package which contained the
+|\newmathalphabet| command. Find out if there is a new release of
+the package, or (if you wrote the package yourself) consult
+\emph{\fntguide} for the new syntax of font commands.
+
+If there is no updated version of the package then you can cure this
+error by using the \textsf{newlfont} or \textsf{oldlfont} package,
+which tells \LaTeX{} which version of |\newmathalphabet| should be
+emulated.
+
+You should use \textsf{oldlfont} if the document selects math fonts with
+syntax such as this:
+\begin{quote}
+ |{\cal A}|, etc.
+\end{quote}
+Use \textsf{newlfont} if the document's syntax is like this:
+\begin{quote}
+ |\cal{A}|, etc.
+\end{quote}
+
+
+\begin{decl}
+ |Text for \verb command ended by end of line.|
+\end{decl}
+The |\verb| command has been begun but not ended on that line. This
+usually means that you have forgotten to put in the end-character of
+the |\verb| command.
+
+\begin{decl}
+ |Illegal use of \verb command.|
+\end{decl}
+The |\verb| command has been used inside the argument of another
+command. This has never been allowed in \LaTeX{}---often producing
+incorrect output without any warning---and so \LaTeXe{} produces
+an error message.
+
+\subsection{Old internal commands}
+\label{Sec:oldinternals}
+
+A number of \LaTeX~2.09 internal commands have been removed, since
+their functionality is now provided in a different way. See
+\emph{\clsguide} for more details of the new, supported interface for
+class and package writers.
+
+\begin{decl}
+ |\tenrm| |\elvrm| |\twlrm| \dots\\
+ |\tenbf| |\elvbf| |\twlbf| \dots\\
+ |\tensf| |\elvsf| |\twlsf| \dots\\
+ $\vdots$
+\end{decl}
+These commands provided access to the seventy fonts preloaded by
+\LaTeX~2.09. In contrast, \LaTeXe{} normally preloads at most
+fourteen fonts, which saves a lot of font memory; but a consequence is
+that any \LaTeX{} file which used the above commands to directly
+access fonts will no longer work.
+
+Their use will usually produce an error message such as:
+\begin{verbatim}
+ ! Undefined control sequence.
+ l.5 \tenrm
+\end{verbatim}
+The cure for this is to update the document to use the new
+font-changing commands provided by \LaTeXe; these are described in
+\emph{\fntguide}.
+
+If this is not possible then, as a last resort, you can
+use the \textsf{rawfonts} package, which loads the
+seventy \LaTeX~2.09 fonts and provides direct access to them using the
+old commands. This takes both time and memory. If you do not
+wish to load all seventy fonts, you can select some of them by using the
+|only| option to \textsf{rawfonts}. For example, to load only |tenrm|
+and |tenbf| you write:
+\begin{verbatim}
+ \usepackage[only,tenrm,tenbf]{rawfonts}
+\end{verbatim}
+
+The \textsf{rawfonts} package is distributed as part of the \LaTeX{}
+tools software, see Section~\ref{Sec:st-pack}.
+
+\subsection{Old files}
+
+One of the more common mistakes in running \LaTeX{} is to read in old
+versions of packages instead of the new versions. If you get an
+incomprehensible error message from a standard package, make sure you
+are loading the most recent version of the package. You can find out
+which version of the package has been loaded by looking in the log
+file for a line like:
+\begin{verbatim}
+ Package: fred 1994/06/01 v0.01 Fred's package.
+\end{verbatim}
+You can use the \m{release-date} options to |\documentclass| and
+|\usepackage| to make sure that you are getting a suitably recent copy
+of the document class or package. This is useful when sending a
+document to another site, which may have out-of-date software.
+
+\subsection{Where to go for more help}
+
+If you can't find the answer for your problem here, try looking in
+\emph{\LaTeXbook} or \emph{\LaTeXcomp}. If you have a problem with
+installing \LaTeX, look in the installation guide files which come with
+the distribution.
+
+If this doesn't help, contact your local \LaTeX{} guru or local
+\LaTeX{} mailing list.
+
+If you think you've discovered a bug then please report it! First,
+you should find out if the problem is with a third-party package or
+class. If the problem is caused by a package or class other than
+those listed in Section~\ref{Sec:class+packages} then please report
+the problem to the author of the package or class, not to the \LaTeX3
+project team.
+
+If the bug really is with core \LaTeX{} then you should create a
+\emph{short}, \emph{self-contained} document which exhibits the
+problem. You should run a \emph{recent} (less than a year old)
+version of \LaTeX{} on the file and then run \LaTeX{} on
+|latexbug.tex|. This will create an error report which you should
+send, together with the sample document and log file, to the
+\LaTeX{} bugs address which can be found in the file
+|latexbug.tex| or |bugs.txt|.
+
+
+\section{Enjoy!}
+\label{Sec:enjoy}
+
+We certainly hope you will enjoy using the new standard \LaTeX{} but,
+if this is not possible, we hope that you will enjoy success and
+fulfillment as a result of the documents which it will help you to
+create.
+
+If you find that the contribution of \LaTeX{} to your life is such
+that you would like to support the work of the project team, then
+please read Section~\ref{Sec:ltx3} and discover practical ways to do
+this.
+
+\begin{thebibliography}{1}
+
+\bibitem{A-W:GRM97}
+Michel Goossens, Sebastian Rahtz and Frank Mittelbach.
+\newblock {\em The {\LaTeX} Graphics Companion}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1997.
+
+
+\bibitem{A-W:GR99}
+Michel Goossens and Sebastian Rahtz.
+\newblock {\em The {\LaTeX} Web Companion}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1999.
+
+
+\bibitem{A-W:DEK91}
+Donald~E. Knuth.
+\newblock {\em The \TeX book}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1986.
+\newblock Revised to cover \TeX3, 1991.
+
+
+\bibitem{A-W:LLa94}
+Leslie Lamport.
+\newblock {\em {\LaTeX:} A Document Preparation System}.
+\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
+
+\bibitem{A-W:MG2004}
+Frank Mittelbach and Michel Goossens.
+\newblock {\em The {\LaTeX} Companion second edition}.
+\newblock With Johannes Braams, David Carlisle, and Chris Rowley.
+\newblock Addison-Wesley, Reading, Massachusetts, 2004.
+
+
+\end{thebibliography}
+
+\end{document}
diff --git a/macros/latex-dev/required/graphics/README.md b/macros/latex-dev/required/graphics/README.md
new file mode 100644
index 0000000000..81f39d1d7b
--- /dev/null
+++ b/macros/latex-dev/required/graphics/README.md
@@ -0,0 +1,64 @@
+The LaTeX `graphics` bundle
+===========================
+
+Release 2019-10-01 pre-release 2
+
+Overview
+--------
+
+This bundle consists of packages supporting basic color, graphics and text
+manipulation operations in LaTeX. The packages provided here are
+
+- `color`: Core color support
+- `graphics`: The original LaTeX graphics inclusion interface
+- `graphicx`: Extended interface for graphics inclusion
+- `lscape`: Production of landscape pages
+- `keyval`: Core key-value support for LaTeX
+- `rotating`: Support for rotating material
+- `trig`: Support for fast trigonometric calculations in TeX
+
+plus the legacy stub `epsfig` (now subsumed into `graphics`).
+
+Installation
+------------
+
+We no longer distribute installation instructions for the various TeX
+implementations. All modern TeX systems include `graphics` as-standard, and end
+users should in general use the release versions supplied in this way.
+
+Release distribution is carried out only through the CTAN archives.
+
+Reporting Bugs
+--------------
+
+If you wish to report a problem or bug in the `graphics` bundle
+please use the [Issue Tracker for LaTeX2e on
+GitHub](https://github.com/latex3/latex2e/issues)
+and follow the guidelines that pop up if you press the "New issue" button.
+
+In particular, to check that you are really seeing a bug, please write
+a short, self-contained document that shows the problem. This should
+include the `latexbug` package, which will warn if your test file is
+not suitable for one or the other reason. See the [CONTRIBUTING
+guide](https://github.com/latex3/latex2e/blob/master/CONTRIBUTING.md)
+for further details, or if you need to obtain the `latexbug` package.
+
+If the bug turns out to be with third-party software then please
+contact the developer, and not us!
+
+License
+-------
+
+The contents of this bundle are distributed under the [LaTeX Project
+Public License](https://www.latex-project.org/lppl/lppl-1-3c/),
+version 1.3c or later.
+
+Copyright
+---------
+
+Copyright is maintained on each of these packages by the author(s)
+of the package.
+
+-----
+
+<p>Copyright (C) 1993-2019 The LaTeX Project <br />
diff --git a/macros/latex-dev/required/graphics/cat.eps b/macros/latex-dev/required/graphics/cat.eps
new file mode 100644
index 0000000000..0042ea088f
--- /dev/null
+++ b/macros/latex-dev/required/graphics/cat.eps
@@ -0,0 +1,305 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 44 527 80 559
+%%Creator: COREL DRAW
+%%Title: CAT.TMP
+%%CreationDate: Sat Jan 18 17:29:05 1992
+
+%%DocumentFonts:
+%%EndComments
+%%BeginProlog
+% -------------- POSTSCRIPT PROLOG FOR CORELDRAW 2.X ------
+% Copyright Corel Systems Corporation 1990
+/AutoFlatness 0 def/wCorelDict 300 dict def
+wCorelDict begin/bd{bind def}bind def/ld{load def}bd
+/xd{exch def}bd/_ null def/$c 0 def/$m 0 def
+/$y 0 def/$k 0 def/$t 1 def/$n _ def/$o 0 def
+/$fil 0 def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def
+/$T 1 def/$N _ def/$O 0 def/$PF false def
+/$pan 0 def/$h false def/$al 0 def/$tr 0 def
+/$le 0 def/$lx 0 def/$ly 0 def/$ctm matrix currentmatrix def
+/$ptm matrix def/$ttm matrix def/$stm matrix def
+/$skm matrix def/$fst 128 def/$pad 0 def/$rox 0 def
+/$roy 0 def currentscreen/@dsp xd/$dsp/@dsp def
+/$dsa xd/$dsf xd/$sdf false def/$SDF false def
+/$Scra 0.0 def statusdict/pageparams known{statusdict begin
+pageparams end 1 ne{/$Scra -90.0 def}if pop pop pop}if
+/$sv 0 def/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld
+/@np/newpath ld/@sv{/$sv save def}bd/@rs{$sv restore}bd
+/@ss{load setscreen}bd AutoFlatness 1 eq{/$cpx ([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator;\n) def
+/@err1{$cpx print flush newpath}bd/@ifl{currentflat dup 10 gt{pop @err1 exit}if 2 add setflat}bd
+/@fill/fill ld/fill{currentflat{{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd
+/@eofill/eofill ld/eofill{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd
+/@clip/clip ld/clip{currentflat{{@clip}stopped{initclip @ifl}{exit}ifelse}bind loop setflat}bd
+/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{initclip @ifl}{exit}ifelse}bind loop setflat}bd
+/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped{@ifl}{exit}ifelse}bind loop setflat}bd
+}if/InRange{3 -1 roll 2 copy le{pop}{exch pop}ifelse
+2 copy ge{pop}{exch pop}ifelse}bd/wDstChck{2 1 roll dup 3 -1 roll
+eq{1 add}if}bd/@dot{dup mul exch dup mul add 1 exch sub 2 div}bd
+/@lin{exch pop abs 1 exch sub}bd/@MN{2 copy le{pop}{exch pop}ifelse}bd
+/setcmykcolor where{pop}{/setcmykcolor{4 1 roll
+3{3 index add 1 @MN 1 exch sub 3 1 roll}repeat
+setrgbcolor pop}bd}ifelse/colorimage where{pop}{/colorimage{/$ncl xd
+pop pop pop pop{currentfile $dat readhexstring pop}repeat
+pop}bd}ifelse/@tc{dup 1 ge{pop}{4{dup 6 -1 roll
+mul exch}repeat pop}ifelse}bd/@spc{7 2 roll
+ColorSeparationMode 1 eq{6 index @tc 0 4 $ink sub index
+exch pop}{5 index dup _ eq{pop 0 4 $ink sub index
+exch pop}{CurrentInkName eq{6 index}{0}ifelse}ifelse}ifelse
+5 1 roll 8 -2 roll 6{pop}repeat 1 exch sub dup setgray
+1 eq exch 1 eq and not}bd/@scc{$ink -1 eq
+{$c $m $y $k $t @tc setcmykcolor true}{$o $c $m $y $k $t $n @spc
+}ifelse}bd/@SCC{$ink -1 eq{$C $M $Y $K $T @tc setcmykcolor true}{
+$O $C $M $Y $K $T $N @spc}ifelse}bd/@sft{
+/$tx $tllx $pxf add dup $tllx gt{$pwid sub}if def
+/$ty $tury $pyf sub dup $tury lt{$phei add}if def}bd
+/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd
+/@ep{{cvx exec}forall}bd/@tp{@sv/$in true def
+2 copy dup $lly le{/$in false def}if $phei sub $ury ge{/$in false def}if
+dup $urx ge{/$in false def}if $pwid add $llx le{/$in false def}if
+$in{@np 2 copy moveto $pwid 0 rlineto 0 $phei neg rlineto
+$pwid neg 0 rlineto 0 $phei rlineto clip @np
+$pn cvlit load aload pop 7 -1 roll 5 index sub
+7 -1 roll 3 index sub translate/$ctm matrix currentmatrix def
+@ep pop pop pop pop}{pop pop}ifelse @rs}bd/@th{@sft
+0 1 $tly 1 sub{dup $psx mul $tx add{dup $llx gt{$pwid sub}{exit}ifelse
+}loop exch $phei mul $ty exch sub 0 1 $tlx 1 sub{$pwid mul
+3 copy 3 -1 roll add exch @tp pop}for pop pop}for}bd
+/@tv{@sft 0 1 $tlx 1 sub{dup $pwid mul $tx add
+exch $psy mul $ty exch sub{dup $ury lt{$phei add}{exit}ifelse}loop
+0 1 $tly 1 sub{$phei mul 3 copy sub @tp pop}for
+pop pop}for}bd/@pf{@gs $ctm setmatrix $pm concat
+@stb @gs ColorSeparationMode 0 eq{1 setgray eofill}{
+$o 0 0 0 0 0 (Black) @spc{eofill}if}ifelse
+@gr eoclip Bburx Bbury $pm itransform/$tury xd/$turx xd
+Bbllx Bblly $pm itransform/$tlly xd/$tllx xd
+/$wid $turx $tllx sub def/$hei $tury $tlly sub def
+$wid 0 gt $hei 0 gt and{$pn cvlit load aload pop
+/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd
+/$tlx $wid $pwid div ceiling 1 add def/$tly $hei $phei div ceiling 1 add def
+$psx 0 eq{@tv}{@th}ifelse}if @gr @np}bd/@dlt{ColorSeparationMode 0 eq{
+/$dc $toc $tot mul $frc $frt mul dup/$c xd sub $fst 1 sub div def
+/$dm $tom $tot mul $frm $frt mul dup/$m xd sub $fst 1 sub div def
+/$dy $toy $tot mul $fry $frt mul dup/$y xd sub $fst 1 sub div def
+/$dk $tok $tot mul $frk $frt mul dup/$k xd sub $fst 1 sub div def
+true}{$o $frc $frm $fry $frk $frt $frn @spc
+dup{/$frk 1 currentgray sub def}{/$frk 0 def}ifelse
+$o $toc $tom $toy $tok $tot $ton @spc dup{/$tok 1 currentgray sub def}
+{/$tok 0 def}ifelse or dup{/$c 0 def/$m 0 def/$y 0 def/$k $frk def
+/$dc 0 def/$dm 0 def/$dy 0 def/$dk $tok $frk sub $fst 1 sub div def}if
+}ifelse}bd/@ftl{1 index 4 index sub dup $pad mul dup/$pdw xd
+2 mul sub $fst div/$wid xd 2 index sub/$hei xd
+pop translate $c $m $y $k 4 copy ColorSeparationMode 0 ne
+{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
+0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill
+$pdw 0 translate $fst{4 copy ColorSeparationMode 0 ne
+{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
+0 0 moveto 0 $hei lineto $wid $hei lineto $wid 0 lineto 0 0 lineto fill
+$wid 0 translate $dk add 4 1 roll $dy add 4 1 roll
+$dm add 4 1 roll $dc add 4 1 roll}repeat $dk sub 4 1 roll
+$dy sub 4 1 roll $dm sub 4 1 roll $dc sub 4 1 roll
+ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop}
+{setcmykcolor}ifelse 0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill
+}bd/@ftr{1 index 4 index sub dup $rox mul/$row xd
+2 div 1 index 4 index sub dup $roy mul/$roh xd
+2 div 2 copy dup mul exch dup mul add sqrt
+$row dup mul $roh dup mul add sqrt add dup/$hei xd $fst div/$wid xd
+4 index add $roh add exch 5 index add $row add
+exch translate pop pop pop pop currentflat 5 mul setflat
+$c $m $y $k 4 copy ColorSeparationMode 0 ne
+{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
+$wid 0 moveto 0 0 $hei 0 360 arc fill 1.0 $pad 2 mul sub dup scale
+$fst{4 copy ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop}
+{setcmykcolor}ifelse $wid 0 moveto 0 0 $hei 0 360 arc fill
+/$hei $hei $wid sub def $dk add 4 1 roll $dy add 4 1 roll
+$dm add 4 1 roll $dc add 4 1 roll}repeat pop pop pop pop}bd
+/@ff{@gs @dlt{$ctm setmatrix eoclip newpath Bbllx Bblly moveto
+Bbllx Bbury lineto Bburx Bbury lineto Bburx Bblly lineto
+$fan rotate pathbbox newpath $fty 1 eq{@ftr}{@ftl}ifelse}if
+@gr @np}bd/@Pf{@sv ColorSeparationMode 0 eq $ink 3 eq or{$ctm setmatrix
+72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch itransform
+ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch itransform
+floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop
+$Psn load exec}{1 setgray eofill}ifelse @rs
+@np}bd/@ftx{{(0) dup 3 -1 roll 0 exch put
+@gs true charpath currentpoint $ctm setmatrix
+@@txt @gr @np moveto $tr 0 rmoveto}forall pop}bd
+/@sm{/$ctm $ctm currentmatrix def}bd/@lorg{$lx $ly moveto
+/$ly $ly $le sub def}bd/@ft{matrix currentmatrix 3 1 roll
+$sdf{$scf $sca $scp @ss}if $fil 1 eq{/@@txt/@pf ld @ftx}{$fil 2 eq
+{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld @ftx}{@scc
+{dup $tr exch 0 exch ashow}if pop pop}ifelse}ifelse}ifelse
+$sdf{$dsf $dsa $dsp @ss}if setmatrix}bd/@st{
+matrix currentmatrix 3 1 roll $SDF{$SCF $SCA $SCP @ss}if
+@SCC{{(0) dup 3 -1 roll 0 exch put @gs true charpath currentpoint
+$ctm setmatrix $ptm concat stroke @gr moveto $tr 0 rmoveto}forall
+pop}{pop pop}ifelse $SDF{$dsf $dsa $dsp @ss}if
+setmatrix}bd/@pt{dup length exch}bd/@te{@pt
+@lorg @ft cleartomark [}bd/@tr{@pt @lorg @st cleartomark [}bd
+/@ta{@pt @lorg 2 copy @gs @ft @gr @st cleartomark [}bd
+/@t@a{@pt @lorg 2 copy @gs @st @gr @ft cleartomark [}bd
+/g{1 exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def
+}bd/G{1 exch sub/$K xd/$C 0 def/$M 0 def/$Y 0 def/$T 1 def/$N _ def}bd
+/k{/$k xd/$y xd/$m xd/$c xd/$t 1 def/$n _ def/$fil 0 def}bd
+/K{/$K xd/$Y xd/$M xd/$C xd/$T 1 def/$N _ def}bd
+/x{1 exch sub/$t xd/$n xd/$k xd/$y xd/$m xd/$c xd/$fil 0 def}bd
+/X{1 exch sub/$T xd/$N xd/$K xd/$Y xd/$M xd/$C xd}bd
+/d/setdash ld/i{dup 0 ne{setflat}{pop}ifelse}bd
+/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit ld
+/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd
+/c/curveto ld/C/c ld/v{4 -2 roll 2 copy 6 -2 roll curveto}bd
+/V/v ld/y{2 copy curveto}bd/Y/y ld/l/lineto ld
+/L/l ld/m/moveto ld/n/newpath ld/N/newpath ld
+/F{matrix currentmatrix $sdf{$scf $sca $scp @ss}if
+$fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{@scc{eofill}{@np}ifelse
+}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if
+setmatrix}bd/f{@cp F}bd/S{matrix currentmatrix
+$ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if @SCC{$skm currentmatrix
+$ptm concat stroke setmatrix}{@np}ifelse $SDF{$dsf $dsa $dsp @ss}if
+setmatrix}bd/s{@cp S}bd/B{@gs F @gr S}bd/b{@cp B}bd
+/W{eoclip}bd/p{/$pm xd 7{pop}repeat/$pyf xd/$pxf xd
+/$pn xd/$fil 1 def}bd/P{11{pop}repeat}bd/z{/$al xd
+/$tr xd/$le xd exch findfont exch scalefont setfont}bd
+/Z{dup type 0 type eq{/$bDir xd}if findfont
+dup maxlength 1 add dict exch dup{1 index/FID ne{3 index
+3 1 roll put}{pop pop}ifelse}forall pop dup dup/Encoding get
+256 array copy dup/$fe xd/Encoding exch put
+dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{
+dup type 0 type eq{exch pop}{$fe exch 2 index exch put
+1 add}ifelse}forall pop}if definefont pop}bd
+/e{@sm concat [/t{@te}def}bd/r{@sm concat [/t{@tr}def}bd
+/o{@sm concat [/t{pop}def}bd/a{@sm concat [/t{@ta}def}bd
+/t{@te}def/T{cleartomark @np/$lx 0 def/$ly 0 def
+$ctm setmatrix/$ttm matrix def}bd/u{}bd/U{}bd
+/A{pop}bd/H{/$h true def}bd/h{@cp H}bd/q/@gs ld
+/Q/@gr ld/E{5 array astore exch cvlit exch def}bd
+/`{}bd/~{}bd/@{}bd/&{}bd/CorelDrawRencodeVect [
+16#80/grave/circumflex/tilde/dotlessi/florin/quotedblleft/quotedblright/guilsinglleft
+16#88/guilsinglright/fi/fl/dagger/daggerdbl/endash/periodcentered/breve
+16#90/quotedblbase/ellipsis/perthousand/trademark/Pt/fractionbar
+16#98/divide 16#a1/exclamdown/cent/sterling/currency/yen/bar/section
+16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/emdash/registered/overbar
+16#b0/ring/plusminus/twosuperior/threesuperior/acute/mu/paragraph/bullet
+16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/OE
+16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/oe
+16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] def/@cc{currentfile $dat readhexstring pop}bd
+/@ii{concat 3 index 3 index m 3 index 1 index l
+2 copy l 1 index 3 index l 3 index 3 index l
+clip pop pop pop pop}bd/@E{/Bbury xd/Bburx xd
+/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def
+/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd/$pn xd}bd
+/@P{/$fil 3 def/$Psn xd array astore/$Prm xd}bd
+/@k{/$fil 2 def/$roy xd/$rox xd/$pad xd/$fty xd/$fan xd
+$fty 1 eq{/$fan 0 def}if/$tok xd/$toy xd/$tom xd/$toc xd
+/$frk xd/$fry xd/$frm xd/$frc xd/$frn _ def/$frt 1 def/$ton _ def/$tot 1 def
+}bd/@x{/$fil 2 def/$roy xd/$rox xd/$pad xd
+/$fty xd/$fan xd 1 exch sub/$tot xd/$ton xd/$tok xd/$toy xd/$tom xd/$toc xd
+1 exch sub/$frt xd/$frn xd/$frk xd/$fry xd/$frm xd/$frc xd}bd
+/@i{@sm @gs @ii 5 index 1 ne{@gs 1 g F @gr}if
+1 eq 5 index 1 eq and{@gs $ctm setmatrix F @gr}if
+@np/$ury xd/$urx xd/$lly xd/$llx xd/$bts xd
+/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi string def
+$bts 1 eq{@SCC/$frg xd}{1 G @SCC/$frg xd}ifelse
+$frg{$SDF{$SCF $SCA $SCP @ss}if $llx $lly translate
+$urx $llx sub $ury $lly sub scale $wid $hei abs
+$bts 1 eq{false}{$bts}ifelse [ $wid 0 0 $hei neg 0
+$hei 0 gt{$hei}{0}ifelse]/@cc load $bts 1 eq{imagemask}{image}ifelse
+$SDF{$dsf $dsa $dsp @ss}if}{$hei{@cc pop}repeat}ifelse
+@gr $ctm setmatrix}def/@M {@sv}bd/@N{/@cc{}def
+12 -1 roll neg 12 1 roll @i @rs}bd/@I{@sm @gs
+@ii @np/$ury xd/$urx xd/$lly xd/$llx xd/$ncl xd
+/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling cvi string def
+$llx $lly translate $urx $llx sub $ury $lly sub scale
+$wid $hei $bts [ $wid 0 0 $hei neg 0 $hei]/@cc load
+false $ncl colorimage @gr $ctm setmatrix}bd
+/@t{/$lx 0 def/$ly 0 def/$stm $stm currentmatrix def
+3 1 roll translate $ttm concat 1 exch t $stm setmatrix}def
+/@n{/$ttm exch matrix rotate def}bd/@z{ exch findfont exch scalefont setfont
+}bd/@s{}bd/@l{}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd
+/@a{@sm concat [/t{@t@a}def}bd/@w{5 2 roll dup/$pan xd
+matrix rotate/$ptm xd matrix scale $ptm dup concatmatrix/$ptm xd
+1 eq{$ptm exch dup concatmatrix/$ptm xd}{pop}ifelse
+1 w}bd/@g{1 eq dup/$sdf xd{/$scp xd/$sca xd
+/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd
+/$SCA xd/$SCF xd}if}bd/@D{3 copy @ss/$dsp xd
+/$dsa xd/$dsf xd}bd/@j{@sv @np}bind def/@J{@rs}bind def
+/@sep{/ColorSeparationMode where{pop}{/ColorSeparationMode 0 def
+/CurrentInkName (Composite) def}ifelse ColorSeparationMode 0 eq
+{/CurrentInkName (Composite) def}if/CurrentInkName where{pop}{
+/CurrentInkName (Composite) def}ifelse CurrentInkName (Composite) eq{/$ink -1 def}
+{CurrentInkName (Cyan) eq{/$ink 0 def} {CurrentInkName (Magenta) eq{/$ink 1 def}
+{CurrentInkName (Yellow) eq{/$ink 2 def} {CurrentInkName (Black) eq{/$ink 3 def}
+{/$ink 4 def}ifelse}ifelse}ifelse}ifelse}ifelse}bd
+@sep/@whi{@gs -72000 dup moveto -72000 72000 lineto
+72000 dup lineto 72000 -72000 lineto closepath 1 setgray fill
+@gr}bd/@neg{ [{1 exch sub}/exec cvx currenttransfer/exec cvx] cvx settransfer
+@whi}bd/@reg{[] 0 d 0 setgray .3 setlinewidth
+2 copy 5.4 0 360 arc closepath 2 copy moveto 9 0 rlineto
+2 copy moveto -9 0 rlineto 2 copy moveto 0 9 rlineto
+moveto 0 -9 rlineto stroke}bd/leftbracket{(\050)}def
+/rightbracket{(\051)}def
+
+%%EndProlog
+%%BeginSetup
+11.4737 setmiterlimit
+1.00 setflat
+/$fst 128 def
+
+%%EndSetup
+@sv
+/$ctm matrix currentmatrix def
+u
+%%Note: Object
+45.22 528.19 78.98 558.14 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+1.01 1.01 0.00 [1.00000 0.00000 0.00000 1.00000 0.00000 0.00000] 0 @w
+%%CURV 106
+73.30 539.78 m
+73.08 538.42 72.22 537.26 71.78 536.33 C
+72.79 534.67 73.73 531.43 74.81 530.64 C
+74.59 530.64 77.04 528.84 73.87 529.06 C
+73.08 529.34 73.08 530.93 70.20 533.81 C
+69.70 533.74 70.56 530.57 71.50 529.63 c
+73.15 528.19 70.27 528.55 70.13 528.62 C
+68.98 529.34 68.62 534.60 67.03 536.26 c
+66.24 537.19 65.16 536.98 64.30 536.90 C
+63.22 536.62 60.62 537.19 60.55 534.02 C
+60.62 532.66 62.14 530.21 62.86 529.78 c
+65.30 528.41 62.06 528.34 61.70 528.77 C
+61.13 529.34 60.19 530.64 59.26 531.65 C
+57.74 532.44 56.38 533.66 56.02 534.96 C
+54.94 534.74 53.86 534.17 53.64 533.23 C
+53.42 532.22 53.86 531.58 54.86 530.14 C
+56.02 529.85 56.38 529.27 56.02 528.98 c
+55.87 528.84 53.71 528.62 53.57 528.91 C
+52.70 529.49 51.70 531.86 51.19 533.16 c
+50.90 533.88 49.97 535.82 51.55 537.77 C
+51.98 538.49 51.91 539.86 51.77 540.65 c
+51.55 541.94 51.55 542.74 52.42 544.46 C
+49.75 546.77 45.22 551.23 49.61 557.14 C
+50.11 557.64 51.55 558.14 50.76 556.27 C
+49.82 553.68 46.66 551.45 53.42 546.19 C
+54.50 546.91 58.97 546.48 60.48 546.19 c
+64.66 545.33 65.52 545.33 68.40 546.05 C
+68.76 546.19 68.83 547.99 70.34 549.22 C
+70.06 550.15 72.00 551.45 72.22 552.53 C
+72.65 553.39 73.66 550.73 73.66 550.66 C
+73.58 551.23 74.66 552.31 74.81 552.96 C
+75.74 553.25 75.10 550.94 75.89 549.50 c
+76.32 548.93 76.68 549.07 77.11 547.70 C
+77.47 546.34 78.98 545.18 76.54 543.89 c
+75.17 543.17 74.59 543.31 73.58 542.88 C
+73.58 542.23 73.51 540.79 73.30 539.78 c
+@c
+S
+U
+@rs
+%%Trailer
+ end
diff --git a/macros/latex-dev/required/graphics/changes.txt b/macros/latex-dev/required/graphics/changes.txt
new file mode 100644
index 0000000000..d059d7958a
--- /dev/null
+++ b/macros/latex-dev/required/graphics/changes.txt
@@ -0,0 +1,951 @@
+This file lists changes to the LaTeX2e files in reverse chronological order.
+It is provided for convenience only. It therefore makes no claims to
+completeness or accuracy and it contains some references to files that
+are not part of the distribution.
+=======================================================================
+
+2019-07-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * graphics.dtx (subsection{Graphics Inclusion}):
+ Support UTF-8 and space in graphic files.
+
+2017-06-25 Joseph Wright <latex-bugs@latex-project.org>
+
+ * New decodearray key, adopted from older pdftex.def
+
+2017-05-31 David Carlisle, Joseph Wright <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Generalize bounding box reader for use in other formats than EPS
+ * graphicsx.dtx: Additional options, moved from pdftex.def
+
+
+2017-04-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: modify \Gscale@box for math mode usage
+ https://github.com/latex3/graphics-def/issues/6
+
+2017-03-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: add \leavevmode to \includegraphics
+ so that \everypar is cleared. (The \leavevmode in \Gin@setfile is
+ too late for this use, but has been left for compatibility.)
+
+2016-12-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: fix the a.ps example file to match the Bounding box
+ change from 2014 (Rolf Niepraschk)
+
+2016-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: Updates to drivers section, and add a note about xcolor.
+
+2016-10-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Avoid arithmetic overflow on very small lengths
+ eg 5sp/2sp https://tex.stackexchange.com/q/328825
+
+2016-08-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * rotating.dtx: Fix name of examples file reference in the
+ documentation (rotex.tex not examples.tex)
+
+2016-07-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics-drivers.ins: stop generating dvips.def
+ (moved to graphics-def)
+
+2016-06-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: guards for contributed packages and plain TeX.
+
+2016-06-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx, color.dtx, drivers.dtx: add pagesize special support to dvips
+ option to match pdftex behaviour and add setpagesize and
+ nosetpagesize options to color and graphics packages to enable or
+ disable this feature for all drivers.
+
+2016-05-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * rotating.dtx: add from rotating distribution
+ * rotex.tex: add from rotating distribution (was example.tex}
+ * cat.eps: add from rotating distribution
+ * grfguide.tex: list the rotating package.
+
+2016-05-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx, color.dtx: add dvisvgm option (Till Tantau)
+
+2016-01-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: dvips can deal natively with compressed eps
+ (was in texlive's graphics.cfg)
+
+2016-01-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx, color.dtx: add luatex option. (luatex.def to be
+ distributed separately.)
+
+ * trig.dtx: make pre-calculated trig values expand to digits
+ rather than use \chardef
+
+2015-12-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: dvips can deal natively with compressed eps
+ (was in texlive's graphics.cfg)
+
+2015-04-02 Joseph Wright <latex-team@latex-project.org>
+
+ * Update CTAN link in README
+
+2015-03-27 David Carlisle <latex-bugs@@latex-project.org>
+
+ * Updating copyright notices etc
+
+2014-11-07 Joseph Wright <latex-bugs@latex-project.org>
+
+ * Rename 00readme.txt to README (named README.txt in the development
+ repository)
+
+2014-10-28 <Frank.Mittelbach@latex-project.org>
+
+ * drivers.dtx, graphics.dtx, graphicx.dtx, keyval.dtx, trig.dtx:
+ Fixed typos in documentation found by Karl Berry.
+
+2014-10-14 <Frank.Mittelbach@latex-project.org>
+
+ * graphics.dtx: Fixed typo in error message.
+
+2014-05-08 David Carlisle <david.carlisle@latex-project.org>
+
+ * keyval.dtx: Revert change to {} parsing.
+
+
+2014-04-26 David Carlisle <david.carlisle@latex-project.org>
+
+ * grfguide.tex: Changes to allow generation of grfguide.pdf via
+ pdflatex: include a.pdf in a filecontents environment and adjust
+ examples to use a modified bounding box starting at 0 0 rather
+ than 100 100.
+
+
+2014-04-25 David Carlisle <david.carlisle@latex-project.org>
+
+ * showkeys.dtx: \leavemode and \long added for
+ graphics/1521, graphics/4296
+
+ * keyval.dtx: add \long on internal parsing macros to allow \par
+ in values, Only strip one {} group not two from values.
+ graphics/3446
+
+2014-04-23 David Carlisle <david.carlisle@latex-project.org>
+
+ * color.dtx: Add \nopagecolor, graphics/3873
+
+ * drivers.dtx: Add \nopagecolor, graphics/3873
+
+2006-02-20 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Added demo option in graphics.
+
+2005-11-14 Morten Hoegholm <latex-bugs@latex-project.org>
+
+ * 00readme.txt: Updated to reflect the changes.
+
+ * color.dtx: Added support for dvipdfmx and XeTeX.
+
+ * Makefile: Remove pstcol and add graphics-drivers.ins.
+
+ * graphics-drivers.ins: New file for installation of driver files.
+
+ * grfguide.tex: Updated documentation to reflect changes in the
+ distribution of driver files. Added dvipdfmx and XeTeX to list of
+ options.
+
+ * graphics.ins: Removed pstcol (pr/3735) and driver files
+ installation.
+
+ * graphics.dtx: Added support for dvipdfmx and XeTeX.
+
+2004-10-21 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * grfguide.pdf: Added creation of this file, from grfguide.ps.
+
+2001-07-07 Chris Rowley <latex-bugs@latex-project.org>
+
+ * graphics.dtx:
+
+ Made \rotatebox long (not previously done for graphics/2908)
+
+2001-06-20 Chris Rowley <latex-bugs@latex-project.org>
+
+ * pstcol.dtx:
+
+ Added redefinitions for PSTricks (graphics/3233)
+
+2001-06-07 Chris Rowley <latex-bugs@latex-project.org>
+
+ * graphics.dtx:
+
+ Extended documentation of \DeclareGraphicsExtensions
+ (graphics/3228}
+
+1999-02-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * dvipdfm.def: lppl (Agreed with Mark Wicks)
+
+1999-02-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: lppl
+
+ * graphics.ins: lppl
+
+ * epsfig.dtx: lppl
+
+ * textures.def: lppl (Agreed with Art Ogawa)
+
+ * drivers.dtx: lppl
+
+ * lscape.dtx: lppl
+
+ * pstcol.dtx: lppl
+
+ * color.dtx: lppl
+
+ * graphicx.dtx: lppl
+
+ * 00readme.txt: lppl
+
+ * graphics.dtx: lppl
+
+1999-01-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: dvipdfm and unknownkeysallowed options.
+
+ * drivers.dtx: documentation corrections.
+
+ * color.dtx: dvipdfm option
+
+ * graphics.dtx: dvipdfm option
+
+ * dvipdfm.def: (from Sebastian) For dvipdfm dvi->pdf driver.
+
+1999-01-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: don't generate .def files for unsupported
+ drivers
+
+ * graphicx.dtx: new option (passed to graphicx)
+
+ * keyval.dtx: new options to not generate error on unknown
+ keys.
+
+1999-01-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * pdftex.def: new version (from https://www.tug.org)
+
+1999-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: \Gscale@box@dd(dd) made long. graphics/2908
+ \@makeother\- added. graphics/2846
+
+1999-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: \Gscale@box@dd(dd) made long. graphics/2908
+ \@makeother\- added. graphics/2846
+
+1999-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: \Gscale@box@dd(dd) made long. graphics/2908
+ \@makeother\- added. graphics/2846
+
+1998-10-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * vtex.def: new version from micropress
+
+1998-06-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * pdftex.def: update for more recent pdftex (from Sebastian).
+
+ * keyval.dtx: make keyval safe if \@tempc is an \if (As
+ happens if you load amsmath and color packages, in that order)
+
+1998-05-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: vtex option
+
+ * color.dtx: vtex option
+
+ * graphics.dtx: vtex option
+
+ * vtex.def: Add file (supplied by MicroPress, Inc).
+
+1998-05-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: update of dvipsone.def from Berthold Horn.
+
+1997-11-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * trig.dtx: Remove an ancient email address of mine.
+
+ * keyval.dtx: CHANGE so that # may appear in <value>s without
+ needing to be doubled. NOTE This will require a change if
+ anybody has used the comand= key in graphicx, the only key
+ currently distributed likely to require # in its argument. A
+ setting such as `command = uncompress ##1' now will need
+ changing to just use one #. Also fix brace handling so a
+ value of {abc}{xyz} is correctly handled. (Old version passed
+ abc{xyz}). Remove an ancient email address of mine.
+
+1997-09-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: Comment out generation of oztex.def.
+
+ * graphics.dtx: [oztex] == [dvips]
+
+ * color.dtx: [oztex] == [dvips]
+
+ * drivers.dtx: merge oztex and dvips support (for oztex 3.x).
+
+1997-09-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: allow TAB in BoundingBox
+ comments. graphics/2587
+
+1997-06-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * textures.def: New one from Arthur Ogawa.
+
+1997-06-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Initialise ext= key to empty, so type= may be
+ used without specifying ext, for Sebastian.
+
+1997-06-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * Makefile: pdftex.def
+
+ * grfguide.tex: pdftex option
+
+ * 00readme.txt: pdftex.tex driver file
+
+ * color.dtx: pdftex option
+
+ * graphics.dtx: pdftex option
+
+ * pdftex.def: add this file for Han The Thanh's TeX variant.
+
+1997-02-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: dvipdf missed out. graphics/2420
+
+1997-01-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Make errors just info messages to the log in the
+ monocrome option. graphics/2350
+
+1996-12-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: new dvipsone eps code (Code from Berthold Horn)
+
+1996-12-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * 00readme.txt: Remove grfguide.ps (it's in latex/doc on ctan)
+
+ * Makefile: Remove grfguide.ps (it's in latex/doc on ctan)
+
+ * grfguide.tex: Assorted improvements.
+
+1996-11-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Minor changes to dvipdf.def (Sergey Lesenko).
+
+1996-11-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * epsfig.dtx: Support active ! for graphics/2302
+
+1996-11-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * 00readme.txt: add old docstrip warning.
+
+1996-10-31 David Carlisle <latex-bugs@latex-project.org>
+
+ * textures.def: add pstricks compatibity code from original
+ textures.def
+
+ * drivers.dtx: tcidvi code supporting viewport/trim/clip.
+
+ * graphicx.dtx: viewport/trim code now saves original bb
+ coords.
+
+ * color.dtx: add dvipdf
+
+ * graphics.dtx: add dvipdf
+
+ * drivers.dtx: add dvipdf (after code from Sergey Lesenko).
+
+1996-10-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: add truetex and tcidvi drivers. Add literal
+ postscript specials to drivers that support it. Add RGB
+ (0-255 integer rgb) model to all drivers.
+
+ * graphics.ins: add truetex (Kinch) and tcidvi (Scientific
+ Word) drivers.
+
+1996-10-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: new style for docstrip 2.4.
+
+ * grfguide.tex: Describe new options, improve descriptions of
+ \graphicspath (for graphics/2294) and \DeclareGraphicsRule.
+ Describe how to add new driver options in a cfg file.
+
+ * graphicx.dtx: Add hiresbb key to \includegraphics.
+
+ * graphics.dtx: Add tcidvi and truetex options, comment out
+ some old drivers. Add hiresbb package option for
+ %%HiResBoundingBox.
+
+ * color.dtx: add missing \colors@false to monochrome option.
+ Add tcidvi and truetex drivers. Comment out some old drivers.
+
+1996-10-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * pstcol.dtx: clean up documentation a bit.
+
+ * Makefile: Add SCRIPTDIR
+
+1996-09-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: add debugshow option, mainly so I can go
+ \usepackage[debugshow]{graphics,color} without color
+ complaining
+
+ * graphics.dtx: stop infinite loop if requested size is zero
+ graphics/2259.
+
+1996-08-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Missing % for /2244
+
+1996-06-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: pctex32
+
+1996-06-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: use \@gtempa not \g@tempa graphics/2090
+
+ * graphicx.dtx: Fix misplaced = in changes
+ entry. graphics/2034
+
+1996-05-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * 00readme.txt: Tidy up.
+
+ * graphicx.dtx: Declare it version 1 (no other change).
+
+ * graphics.dtx: Declare it version 1 (no other change).
+
+ * color.dtx: Declare it version 1 (no other change).
+
+ * drivers.dtx: Change arithmetic in dvips' \Ginclude@eps (and
+ the identical code for pctex32) to avoid overflow on very
+ large posters. (Andreas Schott)
+
+1996-04-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Add pctex32 driver file based on code from pti.
+ Add support for wmf in Y&Y's dviwindo.
+
+ * epsfig.dtx: allow space after [ in \epsfbox bb argument.
+ add `silent' key to \epsfig (ignored).
+
+1996-02-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.ps: Bad dvips configuration forcing A4 paper fixed.
+
+ * textures.def: \gread -> \gread@ typo fixed.
+
+ * graphics.dtx: \gread -> \gread@ typo fixed.
+
+ * graphics.ins: dvi2ps dvitops dvilaser dvialw added back to
+ the .ins file, so the code gets extracted
+
+1995-12-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Remove \showhyphens and \underbar Now all
+ commands are colour safe already in the kernel. CHANGE Add
+ \leavevmode to \textcolor so that it works out right at the
+ start of a \parbox[t] (and other places)
+
+ * grfguide.tex: Bring up to date.
+
+1995-12-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Use \Gin@exclamation to save active !
+ problems. Rename key to keepaspectratio.
+
+ * graphics.dtx: Add \Gin@exclamation for French graphicx
+ mainly
+
+1995-12-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: New dviwin code after correspondence with
+ Hippocrates Sendoukas.
+
+ * graphics.ins: remove textures.def generation
+
+ * textures.def: New version, not generated from drivers.dtx.
+ Code supplied by Arthur Ogawa.
+
+1995-11-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: New version for concurrent docstrip
+
+ * graphicx.dtx: Support height= and width= better for bitmap
+ formats where natural size not known to LaTeX, but known to
+ the driver.
+
+ * graphics.dtx: Support height= and width= better for bitmap
+ formats where natural size not known to LaTeX, but known to
+ the driver.
+
+1995-10-31 David Carlisle <latex-bugs@latex-project.org>
+
+ * lscape.dtx: \StopEventually{\end{landscape}} for
+ graphics/1744
+
+1995-09-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Support isoscale code in \Gscale@box@dddd
+
+ * graphicx.dtx: Support new isoscale key for \includegraphics.
+
+1995-09-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Add origin key for \includegraphics rotation.
+
+1995-09-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Modify \Gin@esetsize to support calc package
+
+ * graphics.dtx: Modify \Gscale@div to support calc package
+
+1995-09-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Fix typo in natheight and natwidth keys.
+
+ * drivers.dtx: Fix bitmap support in dvips for graphics/1879
+
+1995-09-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * keyval.dtx: Documentation changes for graphics/1698
+
+1995-09-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: (Berthold Horn) Fix up clipping code in Y&Y
+ drivers.
+
+1995-09-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Fix up named colour support for dvipsone.
+
+1995-09-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Merge dvipsone and dviwindo options.
+
+ * grfguide.tex: Document the totalheight key which got omitted
+ before.
+
+ * graphics.ins: Remove generation of dviwindo.def
+
+ * drivers.dtx: Fix bounding box spec in dvipsone (should be in
+ sp) Remove generation of dviwindo.def: dviwindo option now
+ uses dvipsone.def
+
+ * graphicx.dtx: Arithmetic in viewport was wrong. (Michel
+ Goossens)
+
+ * graphics.dtx: Merge the two Y&Y options together making
+ dviwindo.def obsolete.
+
+1995-08-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex (section{Colour}): Refer to X Window system in
+ the approved manner.
+
+1995-06-26 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Typos fixed in bb.... keys for graphics/1685
+
+1995-06-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * epsfig.dtx: oops. \ifGin@viewport renamed to \ifGin@bbox
+
+1995-06-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Add \Gin@PS@raw and \Gin@PS@restored for
+ literal PostScript \specials. (cf \pstVerb and \pstverb)
+
+1995-06-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: Modify docstrip options for Y&Y drivers.
+
+ * epsfig.dtx: Remove forcing of dvips option (use graphics.cfg
+ to force the default driver for your site). Modify
+ \ProvidesPackage usage
+
+ * drivers.dtx: Add \AtBeginDvi around `color2' color define
+ \special. Make Y&Y drivers dvipsone and dviwindo use `color2'
+ colour support following mail message from Berthold Horn.
+
+ * color.dtx: Use #1 not ##1 in \DeclareOption, for latex/1557
+
+1995-04-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Move \leavevmode earlier in box commands for
+ graphics/1512
+
+1995-04-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: Add template generation (commented out).
+
+ * drivers.dtx: Remove \Gin@tobp, not needed now.
+
+1995-04-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: Fix mention of obsolete syntax, as reported in
+ latex/1295
+
+1995-04-11 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphicx.dtx: Bounding box changes to match graphics.sty.
+ Add trim viewport and totalheight keys to \includegraphics.
+
+ * graphics.dtx: Start v0.7: \leavevmode positioning. Bounding
+ box cordinates stored as macros (so can use bp) Make more
+ catcodes safe, for binary headers of eps files.
+
+1995-01-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: (Chris Hamlin) Spurious #2 deleted in
+ dviwindo.def: \def\c@lor@cmyk@#1#2,#2,#3,#4,#5\@@{%
+
+1994-12-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: (Denis Roegel) Extra group to keep bb settings
+ local. (Piet van Oostrum) include `.' in \Gin@ext.
+
+1994-12-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Add ln (ln03, ln05 etc) support (untested).
+
+ * graphics.dtx: Add ln (ln03, ln05 etc) support (untested).
+
+1994-11-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: New \DeclareGraphicsExtensions description.
+
+ * graphicx.dtx: Modify the type and read keys to work with new
+ graphics.sty.
+
+ * drivers.dtx: Explicitly mention `.' in all file extensions,
+ to work with graphics v0.6.
+
+ * graphics.dtx: Remove Optional argument to
+ \DeclareGraphicsExtensions Remove the notion of a
+ `separator' and now specify extensions as (eg) .eps rather
+ than eps this makes it easier to work with files without
+ extension.
+
+1994-11-22 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: add color@vbox, remove a load of stuff now in the
+ kernel.
+
+1994-11-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * keyval.dtx: Move the <% plain> docstrip commands which were
+ being typeset by mistake (reported by Martin Schroeder)
+
+ * trig.dtx: Move the <% plain> docstrip commands which were
+ being typeset by mistake (reported by Martin Schroeder)
+
+1994-11-08 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Add \color@hbox and \color@endbox
+
+1994-11-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.ins: add psprint.def (accidentally omitted)
+
+1994-11-02 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: fix catcodes of ctrl-D and \endlinechar when
+ reading eps files.
+
+1994-10-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * pstcol.dtx: add gradbegin and gradend colours.
+
+1994-10-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Modify support for ! in \resizebox (Old code
+ added to support active ! broke \width etc)
+ \DeclareGraphicsRule Check #3 (not #2) is * (Reported by
+ Arthur Ogawa). Missing \expandafter in \Gin@setfile
+ (Reported by Arthur Ogawa).
+
+ * drivers.dtx: Missing \the in dvitops \special. Reported by
+ Arthur Ogawa.
+
+1994-10-17 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: removed xdvi.def: xdvi now calls
+ dvips,monochrome
+
+1994-10-16 David Carlisle <latex-bugs@latex-project.org>
+
+ * trig.dtx: Changed \@xc to \nin@ty (old name clashed with
+ some other package)
+
+1994-10-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * grfguide.tex: Minor improvements to my English.
+
+1994-10-07 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Removed out of date table. Added new code for
+ pctex drivers submitted by PTI.
+
+1994-10-05 David Carlisle <latex-bugs@latex-project.org>
+
+ * lscape.dtx: converted the old 209 style to dtx form and base
+ on graphics package.
+
+ * drivers.dtx: added hsb colour to drivers that support it.
+
+1994-10-04 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Make \definecolor and \DefineNamedColor give an
+ Info message if the colour was previously defined.
+
+ * drivers.dtx: Add support for bounding box to pctex drivers,
+ remove support for scaling which did not work anyway.
+
+1994-10-03 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Add usenames option.
+
+ * graphics.dtx: Error if no driver specified.
+
+1994-09-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Modifications to fit in \DefineNamedColor.
+ textures code redone based on mail from Constantin Kahn (Who
+ owns a Mac which is and advantage when writing code for
+ textures:-)
+
+ * color.dtx (section{Defining Colours}): \DefineNamedColor Add
+ this system, after conversations with Constantin Kahn about
+ the textures support.
+
+1994-09-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx (section{Generic PostScript Colour}): Modify
+ textures code, to force trailing .0.
+
+1994-09-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: small changes to \pagecolor.
+
+1994-09-15 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Add in pctex drivers from Sebastian.
+
+1994-09-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Add fix for footnote bug (should really be in
+ ltfloat/ltoutput)
+
+1994-09-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx (subsection{Coloured Boxes} New implementation of
+ \fcolorbox and \colorbox. Now share code.
+
+1994-09-12 David Carlisle <latex-bugs@latex-project.org>
+
+ * trig.dtx: Improve docstrip handling.
+
+ * keyval.dtx: Improve docstrip handling.
+
+ * color.dtx: Re-organise options, as for graphics package.
+
+ * graphics.dtx (subsection{Options}): Re-organise, so that it
+ is more efficient to specify a default option in
+ graphics.cfg.
+
+ * graphicx.dtx: Make \includegraphics check for 2nd optional
+ arg. Use standard `graphics.sty' form if 2nd arg is there.
+
+1994-07-27 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Add missing 3rd argument to \InputIfFileExists
+
+1994-07-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: documentation changes.
+
+1994-07-20 Sebastian Rahtz <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Fix textures graphics inclusion.
+
+1994-07-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * pstcol.sty: Package modifying pstrics colour interface to
+ work with LaTeX colours.
+
+ * graphics.dtx (subsection{Stretching and Scaling}): Support
+ active ! for French.
+
+ * drivers.dtx: extensive changes to cope with the new code in
+ graphics.dtx and color.dtx.
+
+ * graphics.dtx: Add default rule possibility, so eg a PS
+ driver can handle any unknown extension as eps, rather than
+ generate an error.
+
+ * color.dtx: Completely new implementation of the internal
+ colour commands. Conversion from `user syntax' to `special
+ syntax' is now in a separate (driver dependant) command,
+ distinct from the commands to define or use colours.
+
+1994-06-10 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: minor change to error texts. (dated 1994/05/14:-)
+
+ * drivers.dtx: (From Sebastian) fix for dviwin.
+
+1994-05-30 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: Rename egraphics to graphicx.
+
+ * testx.tex: new name to match graphicx.
+
+ * graphicx.dtx: Rename from egraphics (8+3).
+
+ * epsfig.dtx: (From Sebastian) Make epsfig default to [dvips]
+ RequirePackage{graphicx} not egraphics. Remove \wlog as now
+ done by \ProvidesPackage.
+
+1994-05-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Remove all support for the test release of
+ LaTeX2e. Add optional argument to \NeedsTeXFormat to show
+ this. Define new versions of the `kernel' colour commands,
+ \color@{begin|end|set}group and \normalcolor. Remove
+ redefinition of tabbing commands, now colour-safe in the
+ kernel.
+
+1994-05-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * test.tex: Remove `times' package from test.tex. (Not part of
+ `base' distribution of LaTeX2e.)
+
+ * color.dtx: improve wording of error messages.
+
+ * drivers.dtx: patch to oztex support from Andrew
+ Trevorrow. (via Sebastian)
+
+1994-05-06 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx (subsection{Options}): notdraft renamed again
+ to final.
+
+ * drivers.dtx: Replace grot@ by Grot@ throughout.
+
+ * egraphics.dtx: Removed weird and incorrect setting of
+ \let\Gin@scalex\@empty and \let\Gin@scaley\@empty that I
+ must have added while asleep:-) Now the earlier correct
+ settings actually take effect.
+
+ * graphics.dtx: Changed the handling of `missing file' errors.
+ If no extension is supplied, each extension in the list is
+ tried until a file is found. A File not found error is
+ generated if this search fails. If an extension is
+ supplied, only a warning is given if the file does not
+ exist. This allows the file to be created `on the fly' eg by
+ extracting the file from a tar or zip archive.
+
+1994-04-29 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Removed rotation from drivers.dtx
+ documentation, so it can be processed at any site.
+
+1994-04-28 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: added PS rules for Mac drivers
+
+ * graphics.dtx: Improve the wording of error messages.
+
+1994-04-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * drivers.dtx: Added missing \ProvidesFile for xdvi and
+ dvitops
+
+1994-04-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * graphics.dtx: initialise \Gin@extensions with
+ \providecommand so that definitions in the .def file are not
+ zapped.
+
+1994-04-18 David Carlisle <latex-bugs@latex-project.org>
+
+ * color.dtx: Stop \normalfont resetting the
+ colour. (\reset@font does still reset the colour. This
+ allows \rm to work as expected. Fix marginpar, so the
+ baseline is correctly aligned.
+
+ * README Create initial change log from comments in the README
+
+1994-04-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * notdraft renamed to nodraft
+
+ * zaprotate zapscale renamed to hiderotate hidescale
+
+ * kludges for graphics and colour to work with Feb 1994
+ release now automatically included (so colfix.sty gone)
+
+1994-03-23 David Carlisle <latex-bugs@latex-project.org>
+
+ * rotatebox now correctly rotates about the left hand side.
+
+ * spurious spaces in \resizebox removed
+
+ * no BoundingBox error message improved
+
+ * zaprotate and zapscale options added (probably bad names)
+
+ * notdraft option added to cancel a global draft option.
+
+ * Graphics files now listed by \listfiles
+
+ * PS drivers now support \current@ps@color
+
+ * colfix.sty put back until next release of LaTeX2e.
+
+1994-03-09 David Carlisle <latex-bugs@latex-project.org>
+
+ * \reflectbox added.
+
+ * \rotatebox* removed
+
+ * The order of the arguments of \includegraphics corrected
+
+ * \includegraphics[lower-l,lower-r][upper-l,upper-r]{file}
+
+ * \definecolor not \newcolor to define colours
+
diff --git a/macros/latex-dev/required/graphics/color.dtx b/macros/latex-dev/required/graphics/color.dtx
new file mode 100644
index 0000000000..d85b78349d
--- /dev/null
+++ b/macros/latex-dev/required/graphics/color.dtx
@@ -0,0 +1,963 @@
+%
+% \iffalse
+%
+%% color.dtx Copyright (C) 1994--1999 David Carlisle
+%% Copyright (C) 2005--2016 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%<*dtx>
+ \ProvidesFile{color.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+%<package>\ProvidesPackage{color}
+%<driver> \ProvidesFile{color.drv}
+% \fi
+% \ProvidesFile{color.dtx}
+ [2016/07/10 v1.1e Standard LaTeX Color (DPC)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\newenvironment{option}[1]{\expandafter\macro\expandafter{%
+ \csname ds@#1\endcsname}}{\endmacro}
+\begin{document}
+ \DocInput{color.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{color.dtx}
+%
+% \title{The \textsf{color} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{D. P. Carlisle}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+%
+%
+% \title{The implementation of the \LaTeX\ Colour interface.}
+%
+% \section{Introduction}
+% This package implements \LaTeX\ support for colour, for those
+% \texttt{dvi} drivers that can produce coloured text.
+%
+% The user level documentation of this package is contained in the
+% document \emph{Packages in the `graphics' bundle} in the file
+% \texttt{grfguide.tex}.
+%
+% \StopEventually{}
+%
+%
+% \section{Options}
+%
+% \changes{v0.2a}{1994/04/13}
+% {TEMP KLUDGE for Feb 94 release of 2e:
+% Add extra groups}
+% \changes{v0.2d}{1994/05/13}
+% {All support for Feb 1994 release removed (so used optional arg
+% of \cs{NeedsTeXFormat}).}
+% \changes{v1.0}{1996/05/29}
+% {Version 1 at last}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% First we save the catcodes of some characters, and set them to
+% fixed values whilst this file is being read.
+% \changes{v0.3b}{1994/09/14}
+% {Save and restore catcodes}
+% \begin{macrocode}
+\edef\Gin@codes{%
+ \catcode`\noexpand\^^A\the\catcode`\^^A\relax
+ \catcode`\noexpand\"\the\catcode`\"\relax
+ \catcode`\noexpand\*\the\catcode`\*\relax
+ \catcode`\noexpand\!\the\catcode`\!\relax
+ \catcode`\noexpand\:\the\catcode`\:\relax}
+\catcode`\^^A=\catcode`\%
+\catcode`\"=12
+\catcode`\*=11
+\catcode`\!=12
+\catcode`\:=12
+% \end{macrocode}
+%
+% \begin{macro}{\Gin@driver}
+% Initialize the macro to hold the driver file name.
+% \begin{macrocode}
+\providecommand\Gin@driver{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@lor@error}
+% \changes{v1.0d}{1997/01/07}
+% {Macro added for graphics/2350}
+% Helper macro for error handling (redefined by the monochrome option
+% to make errors warnings).
+% \begin{macrocode}
+\def\c@lor@error#1{%
+ \@latex@error{Undefined color #1}\@ehd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{option}{monochrome}
+% The |monochrome| option should be used \emph{in addition}
+% to one of the standard driver options.
+% \changes{v0.3j}{1995/06/16}
+% {Use single hash for latex/1557}
+% \changes{v1.0b}{1996/10/29}
+% {Add \cs{colors@false}}
+% \changes{v1.0d}{1997/01/07}
+% {Add \cs{c@lor@error} for graphics/2350}
+% \begin{macrocode}
+\DeclareOption{monochrome}{%
+ \def\c@lor@error#1{\PackageInfo{color}{Undefined color #1}}%
+ \AtEndOfPackage{%
+ \colors@false
+ \def\set@color{%
+ \c@lor@special\m@ne
+ {color push \current@color}\aftergroup\reset@color}%
+ \def\reset@color{\c@lor@special\m@ne{color pop}}%
+ \def\set@page@color{%
+ \c@lor@special\m@ne{background \current@color}}%
+ \def\define@color#1#2{%
+ \c@lor@special\m@ne{define #1 #2}}}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{debugshow}
+% The |debugshow| option turns on debugging info (perhaps).
+% \changes{v1.0a}{1996/09/16}
+% {debugshow option added}
+% \begin{macrocode}
+\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{setpagesize}
+% \begin{option}{nosetpagesize}
+% The |setpagesize| option requests that the driver option sets the page size.
+% \changes{v1.1d}{2016/06/02}
+% {(no)setpagesize options added}
+% (Whichever option is used, the page size is not set by this package if |\mag|
+% has been changed from its default value.)
+% \begin{macrocode}
+\newif\ifGin@setpagesize\Gin@setpagesizetrue
+\DeclareOption{setpagesize}{\Gin@setpagesizetrue}
+\DeclareOption{nosetpagesize}{\Gin@setpagesizefalse}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% Now the options for supported drivers.
+%
+% \begin{option}{dvips}
+% \begin{option}{xdvi}
+% Tom Rokicki's dvips driver, and the X Windows previewer, xdvi which uses
+% (a subset of) the same |\specials|.
+% \begin{macrocode}
+\DeclareOption{dvips}{\def\Gin@driver{dvips.def}%
+ \def\c@lor@namefile{dvipsnam.def}}
+\DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{dvipdf}
+% \changes{v1.0c}{1996/10/31}
+% {dvipdf added}
+% Sergey Lesenko's dvipdf driver.
+% \begin{macrocode}
+\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvipdfm}
+% \changes{v1.0h}{1999/01/13}
+% {dvipdfm added}
+% Mark Wick's dvipdfm driver.
+% \begin{macrocode}
+\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvipdfmx}
+% \changes{v1.0j}{2005/11/14}
+% {dvipdfmx added}
+% The driver for the dvipdfmx project.
+% \begin{macrocode}
+\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{pdftex}
+% \changes{v1.0e}{1997/06/07}
+% {pdftex added}
+% Han The Thanh's \TeX\ variant.
+% \begin{macrocode}
+\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{luatex}
+% \changes{v1.1b}{2016/01/03}
+% {luatex added}
+% Lua\TeX\ \TeX\ variant.
+% \begin{macrocode}
+\DeclareOption{luatex}{\def\Gin@driver{luatex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{luatex}
+% \changes{v1.1c}{2016/05/09}
+% {dvisvgm added}
+% dvisvgm driver.
+% \begin{macrocode}
+\DeclareOption{dvisvgm}{\def\Gin@driver{dvisvgm.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{xetex}
+% \changes{v1.0j}{2005/11/14}
+% {xetex added}
+% Jonathan Kew's \TeX\ variant.
+% \begin{macrocode}
+\DeclareOption{xetex}{\def\Gin@driver{xetex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvipsone}
+% \begin{option}{dviwindo}
+% \changes{v0.3k}{1995/09/07}
+% {Merge dviwindo and dvipsone options}
+% The drivers of the Y\&Y \TeX\ system.
+% (Which use the same |\specials|).
+% \begin{macrocode}
+\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
+\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{emtex}
+% \begin{option}{dviwin}
+% Freely available drivers for PCs.
+% \begin{macrocode}
+\DeclareOption{emtex}{\def\Gin@driver{emtex.def}}
+\DeclareOption{dviwin}{\def\Gin@driver{dviwin.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{oztex}
+% \changes{v1.0f}{1997/09/09}
+% {Merge dvips and oztex options}
+% The Oz\TeX\ system for a Macintosh.
+% Since release 3 of Oz\TeX, merge with dvips back end.
+% \begin{macrocode}
+\DeclareOption{oztex}{\ExecuteOptions{dvips}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{textures}
+% Blue sky's Textures system on a Macintosh.
+% \begin{macrocode}
+\DeclareOption{textures}{\def\Gin@driver{textures.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{pctexps}
+% \begin{option}{pctexwin}
+% \begin{option}{pctexhp}
+% \begin{option}{pctex32}
+% \changes{v1.0b}{1996/10/29}
+% {pctex32 option added}
+% The drivers for PTI's \TeX\ system on PCs.
+% \begin{macrocode}
+\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
+\DeclareOption{pctexwin}{\def\Gin@driver{pctexwin.def}}
+\DeclareOption{pctexhp}{\def\Gin@driver{pctexhp.def}}
+\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{truetex}
+% \begin{option}{tcidvi}
+% \changes{v1.0b}{1996/10/29}
+% {truetex and tcidvi options added}
+% The drivers of the Kinch \TeX\ system on PCs, and its
+% version with extra |\special| handling dll's as shipped with
+% TCI's Scientific Word.
+% \begin{macrocode}
+\DeclareOption{truetex}{\def\Gin@driver{truetex.def}}
+\DeclareOption{tcidvi}{\def\Gin@driver{tcidvi.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{vtex}
+% \changes{v1.0g}{1998/05/27}
+% {vtex option added}
+% V\TeX\ driver.
+% \begin{macrocode}
+\DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvi2ps}
+% \begin{option}{dvialw}
+% \begin{option}{dvilaser}
+% \begin{option}{dvitops}
+% \begin{option}{psprint}
+% \begin{option}{pubps}
+% \begin{option}{ln}
+% \changes{v1.0b}{1996/10/29}
+% {old driver options depreciated}
+% Old, probably obsolete, drivers commented out. See the section
+% on `Driver support' in grfguide to see how to re-enable these
+% options in |color.cfg| if you need them.
+% \begin{macrocode}
+%\DeclareOption{dvi2ps}{\def\Gin@driver{dvi2ps.def}}
+%\DeclareOption{dvialw}{\def\Gin@driver{dvialw.def}}
+%\DeclareOption{dvilaser}{\def\Gin@driver{dvilaser.def}}
+%\DeclareOption{dvitops}{\def\Gin@driver{dvitops.def}}
+%\DeclareOption{psprint}{\def\Gin@driver{psprint.def}}
+%\DeclareOption{pubps}{\def\Gin@driver{pubps.def}}
+%\DeclareOption{ln}{\def\Gin@driver{ln.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+%
+%
+% \begin{option}{dvipsnames}
+% \begin{option}{nodvipsnames}
+% By default the named colour model has no pre-declared names.
+% The |dvipsnames| option predeclares all the names in the colour
+% prologue of dvips. The |dvips| option automatically implies
+% |dvipsnames| unless this choice is overruled with the |nodvipsnames|
+% option. For other drivers, eg |textures| you may use this option to
+% explicitly request that these names be declared.
+% \begin{macrocode}
+\DeclareOption{dvipsnames}{\def\c@lor@namefile{dvipsnam.def}}
+\DeclareOption{nodvipsnames}{\let\c@lor@namefile\relax}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{usenames}
+% The |usenames| option modifies the behaviour of |\DefineNamedColor|
+% So that it declares the same name as a ```user's colour'' for use in
+% a |\color| command, as well as a name in the |named| colour model.
+% The normal behaviour is just to declare the name in the named colour
+% model.
+% \begin{macrocode}
+\let\c@lor@usename\@gobble
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{usenames}{%
+ \def\c@lor@usename#1{%
+ \expandafter\color@named\csname\string\color @#1\endcsname{#1}}}
+% \end{macrocode}
+% \end{option}
+%
+% \section{Using Colours}
+%
+% \subsection{Declarative form}
+%
+% \begin{macro}{\color}
+% |\color{|\emph{declared-colour}|}| switches to the colour
+% \emph{declared-colour}, which must previously have been defined
+% using |\definecolor|. This colour will stay in effect until the end of
+% the current \TeX\ group.
+%
+% |\color[|\emph{model}|]{|\emph{colour-specification}|}| is similar
+% to the above, but uses a colour not declared by |\definecolor|. The
+% allowed \emph{model}'s vary depending on the driver. The syntax of
+% the \emph{colour-specification} argument depends on the model.
+%
+% \changes{v0.3a}{1994/07/20}
+% {Make \cs{color} robust}
+% \begin{macrocode}
+\DeclareRobustCommand\color{%
+ \@ifnextchar[\@undeclaredcolor\@declaredcolor}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@undeclaredcolor}
+% \changes{v0.2c}{1994/05/09}
+% {Improve error messages}
+% \changes{v0.3a}{1994/07/20}
+% {New internal implementation of colour commands}
+% Call the driver-dependent command |\color@|\meta{model} to define
+% |\current@color|, then call |\set@color| to change the current colour
+% accordingly.
+% \begin{macrocode}
+\def\@undeclaredcolor[#1]#2{%
+ \@ifundefined{color@#1}%
+ {\c@lor@error{model `#1'}}%
+ {\csname color@#1\endcsname\current@color{#2}%
+ \set@color}%
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@declaredcolor}%
+% \changes{v0.1c}{1994/04/01}
+% {Add \cs{ignorespaces}}
+% \changes{v0.1e}{1994/05/14}
+% {Minor change to error message}
+% \changes{v0.3a}{1994/07/20}
+% {New internal implementation of colour commands}
+% |\let| |\current@color| to the internal representation of the colour
+% if the colour has been declared, otherwise generate an error.
+% Finally call |\set@color| to effect the colour change.
+% \begin{macrocode}
+\def\@declaredcolor#1{%
+ \@ifundefined{\string\color @#1}%
+ {\c@lor@error{`#1'}}%
+ {\expandafter\let\expandafter\current@color
+ \csname\string\color @#1\endcsname
+ \set@color}%
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Command (Argument) Form}
+%
+% \begin{macro}{\textcolor}
+% |\textcolor{|\emph{declared-colour}|}{|\emph{text}|}| and
+% |\textcolor[|\emph{model}|]{|\emph{colour-spec}|}{|\emph{text}|}|
+% are just alternative syntax for |\color|, in
+% which the groups are added implicitly. Thus \emph{text} appears in the
+% specified colour, but then the colour reverts to its previous value.
+% The naming is by analogy with |\textrm| (as opposed to |\rm| and
+% |\rmfamily|) although it is slightly a misnomer as the command also
+% works in math-mode.
+%
+% Since December 95, in fact this command has one other difference
+% from |\color|. It calls |\leavevmode| to ensure the start of
+% horizontal mode. Specifically this means that a construction
+% such as
+%\begin{verbatim}
+% xxx\parbox[t]{1cm}{\textcolor{red}{a}.....
+%\end{verbatim}
+% now works as expected, with the |xxx| and the red |a| lining up
+% correctly.
+% \changes{v0.3a}{1994/07/20}
+% {Stop command being \cs{long}, and make robust.}
+% \changes{v0.3l}{1995/12/07}
+% {Add \cs{leavevmode}}
+% \begin{macrocode}
+\def\textcolor#1#{\@textcolor{#1}}
+\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Background (Page) Colour}
+%
+% \begin{macro}{\pagecolor}
+% |\pagecolor|, which has the same argument forms as |\color|, specifies
+% the background colour for the current, and all following, pages. It is
+% a global declaration which does not respect \TeX\ groups.
+%
+% \changes{v0.1c}{1994/04/01}
+% {end the group even if the colour command generates an error}
+% \changes{v0.3c}{1994/09/19}
+% {Use \cs{color} to parse arguments}
+% \begin{macrocode}
+\def\pagecolor{%
+ \begingroup
+ \let\ignorespaces\endgroup
+ \let\set@color\set@page@color
+ \color}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nopagecolor}
+% |\nopagecolor| (suggested by Heiko Oberdiek) removes any currently specified page colour
+% returning to the default transparent background. It is not yet supported by all driver options
+% and so generates a warning if there is no definition in the driver file.
+%
+% \changes{v1.1a}{2014/04/23}
+% {add \cs{nopagecolor} graphics/3873}
+% \begin{macrocode}
+\def\nopagecolor{%
+ \@ifundefined{no@page@color}{%
+ \PackageInfo{color}{\string\nopagecolor\space is not supported}%
+ }{%
+ \no@page@color
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section{Defining Colours}
+%
+% \begin{macro}{\definecolor}
+% |\definecolor{|\emph{name}|}{|\emph{model}|}{|\emph{colour-spec}|}|
+% defines the color \emph{name}, which may then be used in subsequent
+% |\color| or |\textcolor| commands to refer to a colour specified by
+% \emph{colour-spec} in the colour model \emph{model}.
+%
+% |\definecolor| associates the \emph{name} the to a colour in
+% \emph{model}. So |\color{|\emph{name}|}| would check \emph{name}
+% then issue a |\special| for the colour model \emph{model}.
+%
+% |\definecolor| just calls an internal macro that defines the colour
+% for a particular model. This macro must have been defined by the
+% driver file that supports the requested \emph{model}.
+%
+% \changes{v0.1b}{1994/03/15}
+% {change name from \cs{newcolor} to \cs{definecolor}}
+% \changes{v0.1e}{1994/05/14}
+% {Minor change to error message}
+% \changes{v0.3a}{1994/07/20}
+% {New internal implementation of colour commands}
+% \changes{v0.3f}{1994/10/04}
+% {Give info about redefinitions}
+% \begin{macrocode}
+\def\definecolor#1#2#3{%
+ \@ifundefined{color@#2}%
+ {\c@lor@error{model `#2'}}%
+ {\@ifundefined{\string\color @#1}{}%
+ {\PackageInfo{color}{Redefining color #1}}%
+ \csname color@#2\expandafter\endcsname
+ \csname\string\color @#1\endcsname{#3}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DefineNamedColor}
+% \changes{v0.3d}{1994/09/29}
+% {Macro added}
+% \changes{v0.3e}{1994/10/03}
+% {usenames option added}
+% \changes{v0.3f}{1994/10/04}
+% {Give info about redefinitions}
+%
+% Driver files may opt to define a `named' colour model.
+% Placing colour names rather than numeric specifications into the dvi
+% file has certain advantages, in that post processing software can
+% tune the colour specifications to the particular technology being
+% used, and more easily make colour separations for that colour.
+% The disadvantage is that the driver must `know' the colour
+% names.
+%
+% The `color1' drivers (dvips) currently ignore the specification of
+% the colour, and once a name is defined, just put the colour name in
+% the dvi file. For dvips, The header file \texttt{color.pro} is used to
+% give the cmyk equivalents of the names.
+%
+% The `color2' drivers (textures) use a special postscript operator
+% that takes both the name and the cmyk equivalent. so if the names are
+% not being used, `fall back' definitions in the cmyk model are available.
+% These drivers also allow a numeric value to affect the `density'
+% of the colour to use.
+%
+% Drivers based on `color3' do not support named colours at the dvi
+% level, but to ease document portability, the named model is still
+% defined, but the |\special|'s just put the colour specifications, not
+% the names, into the dvi file.
+%
+% Normally after a colour, say |JungleGreen|, has been declared with:\\
+% |\DefineNamedColor{named}{JungleGreen}{cmyk}{1,2,3,4}|\\
+% it is available in the `named' colour model, for
+% instance by\\
+% |\color[named]{JungleGreen}|\\
+% A user may give a more convenient name, using\\
+% |\definecolor{mygreen}{named}{JungleGreen}|\\
+% If however you are happy with the original names, and want to use
+% them directly, as in |\color{JungleGreen}| without specifying
+% |[named]| all the time, just give the package option |usenames|, which
+% will redefine |\DefineNamedColor|, so that the colour name is declared
+% as a user-colour as well as a name in the `named' model.
+% \begin{macrocode}
+\def\DefineNamedColor#1#2#3#4{%
+ \@ifundefined{define@color@#1}%
+ {\c@lor@error{model `#1'}}%
+ {\@ifundefined{color@#3}%
+ {\c@lor@error{model `#3'}}%
+ {\@ifundefined{c@lor@#1@#2}{}%
+ {\PackageInfo{color}{Redefining color #2 in named color model}}%
+ \csname color@#3\endcsname\@tempa{#4}%
+ \csname define@color@#1\endcsname{#2}\@tempa
+ \c@lor@usename{#2}}}}
+\@onlypreamble\DefineNamedColor
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Colour Switch}
+%
+% \begin{macro}{\ifcolors@}
+% This boolean can be tested by higher level macros that may want to
+% alter their behaviour if a monochrome driver is being used.
+% \begin{macrocode}
+\newif\ifcolors@
+\colors@true
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Whatsit\ldots}
+%
+% \begin{macro}{\c@lor@special}
+% Some drivers can not support all the features of this package. They
+% should always put a \meta{whatsit} in the current list though. The
+% following macro has most of the features of |\special|, but does not
+% put anything into the |dvi| file. It does write to the log file or the
+% terminal (depending on the value of |#1|).
+% \begin{macrocode}
+\def\c@lor@special#1#2{%
+ \edef\@tempa{\write#1{#2}}\@tempa}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Processing Options}
+%
+% A local configuration file may declare more options.
+% It should also make one driver option the default, by calling
+% |\ExecuteOptions| with the appropriate option.
+% \begin{macrocode}
+\InputIfFileExists{color.cfg}{}{}
+% \end{macrocode}
+%
+% After the options are processed, load the appropriate driver file.
+% If a site wants a default driver (eg |dvips|) it just needs to put
+% |\ExecuteOptions{dvips}| in a |color.cfg| file.
+% \changes{v0.3b}{1994/09/14}
+% {New style of loading driver files}
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% \begin{macrocode}
+\if!\Gin@driver!
+ \PackageError{color}
+ {No driver specified}
+ {You should make a default driver option in a file \MessageBreak
+ color.cfg\MessageBreak
+ eg: \protect\ExecuteOptions{dvips}%
+ }
+\else
+ \PackageInfo{color}{Driver file: \Gin@driver}
+ \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@ifundefined{c@lor@namefile}{}{\input{\c@lor@namefile}}
+% \end{macrocode}
+%
+% \section{Default Colour}
+%
+% \begin{macro}{\normalcolor}
+% Early versions of this package redefined |\reset@font| to reset the
+% color as well. Current versions do not do this (there are too many
+% |\reset@font| commands hidden in strange places) and so defines a
+% separate command, |\normalcolor| to reset the colour to the colour in
+% effect at the start of the document.
+%
+% |\normalcolor| is defined (to |\relax|) in the \LaTeX\ kernel, so it
+% is safe to use this in macros that may possibly be used in
+% conjunction with colour. It will have no effect until the |color|
+% package is also loaded.
+% \changes{v0.2b}{1994/04/18}
+% {Only reset the colour with \cmd{\reset@font} not
+% \cmd{\normalfont}}
+% \changes{v0.2d}{1994/05/13}
+% {Stop changing \cs{reset@font}. Use the new \cs{normalfont}
+% instead.}
+% \begin{macrocode}
+\def\normalcolor{\let\current@color\default@color\set@color}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\default@color}
+% Internal macro to store the `default' colour used by |\normalcolor|.
+% \begin{macrocode}
+\AtBeginDocument{\let\default@color\current@color}
+% \end{macrocode}
+% \end{macro}
+%
+% |\current@color| contains an internal representation of the colour
+% at this point in the document. (This can only be an approximation to
+% the truth as the `macro layer' of \TeX\ does not know where the output
+% routine is going to re-insert floats. This is why drivers must
+% maintain their own stack of colours in order to fully support these
+% commands.
+%
+% For dvips, the |\current@color| it is something like `|Black|' or
+% `|rgb 0 1 0|', but other packages should not rely on any particular
+% format for this macro.
+%
+% The driver file \emph{must} initialise |\current@color| to a
+% specification for Black. This initialisation can not occur here, as
+% the possible colour models (and thus the syntax for `black')
+% are not known at this point.
+%
+% \section{Higher Level Commands}
+%
+% With the basic colour primitives specified above we may define a few
+% higher level commands for coloured boxes etc. This is still quite a low
+% level and presumably packages and classes making use of colour will
+% define more appropriate document-level commands.
+%
+% \subsection{Colour Block}
+%
+% \begin{macro}{\color@block}
+% |\color@block{|\emph{width}|}{|\emph{height}|}{|\emph{depth}|}|\\
+% Should take up no space for \TeX, but produce a block in the current
+% colour of the specified size. It is mainly used for producing box
+% backgrounds.
+%
+% The definition here works by selecting a colour, and then drawing a
+% \TeX\ rule (unless |\ifcolors@false|). This allows the `driver
+% independent' colour specials to be used. However it is defined using
+% |\providecommand|, so that this file will not over-write any other
+% definition of this command. A graphics package may want to define it
+% using a special to produce (for example) a PostScript line. Producing
+% the line in the |\special| has the advantage that on a preview that
+% does not understand |\special|s, the line is automatically omited,
+% without needing to modify the source of the document (for instance by
+% adding the |monochrome| option).
+%
+% \begin{macrocode}
+\def\color@block#1#2#3{%
+ {\set@color\rlap{\ifcolors@\vrule\@width#1\@height#2\@depth#3\fi}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Coloured Boxes}
+%
+% \begin{macro}{\colorbox}
+% |\colorbox| takes the same argument forms as |\textcolor|, but the
+% colour specifies the \emph{background} colour of the box.
+% \changes{v0.3b}{1994/09/14}
+% {New implementation}
+% \begin{macrocode}
+\def\colorbox#1#{\color@box{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.3i}{1995/04/27}
+% {Move \cs{leavevmode} for graphics/1521}
+% \begin{macro}{\color@box}
+% \begin{macrocode}
+\def\color@box#1#2{\color@b@x\relax{\color#1{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fcolorbox}
+% |\fcolorbox| has an extra \emph{colour-spec} argument, and puts a
+% frame of the first colour around a box with a background specified by
+% the second colour. If an optional argument is given, it specifies the
+% colour model for both colours.
+% \changes{v0.3b}{1994/09/14}
+% {New implementation}
+% \begin{macro}{\fcolorbox}
+% \begin{macrocode}
+\def\fcolorbox#1#{\color@fbox{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\color@fbox#1#2#3{%
+ \color@b@x{\fboxsep\z@\color#1{#2}\fbox}{\color#1{#3}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+
+% \begin{macro}{\color@b@x}
+% Internal macro for |\colorbox| and |\fcolorbox|.
+% \changes{v0.3b}{1994/09/14}
+% {Macro added.}
+% \changes{v0.3i}{1995/04/27}
+% {Add \cs{leavevmode} for graphics/1521}
+% \begin{macrocode}
+\long\def\color@b@x#1#2#3{%
+ \leavevmode
+ \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}%
+ \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
+ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
+ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}%
+ \box\z@}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section{Extra Groups}
+% Turning on extra groups in the standard \LaTeX\ commands, so that
+% colour commands are scoped correctly.
+%
+% Like |\normalcolor|, the following five commands are defined in the
+% kernel, with empty definitions (|\relax|). This means that they can
+% be used to make macros in packages `colour safe'. The commands
+% will not have any effect unless a user also uses this colour
+% package, when the `active definitions' here will take effect and
+% keep colour commands correctly scoped.
+%
+% \begin{macro}{\color@setgroup}
+% This is to be used in contexts (eg `lrbox') where text is to be
+% saved and used after some other, unknown, text that may contain
+% colour commands. A matching |\color@endgroup| should be used at the
+% end of the text.
+% \changes{v0.2d}{1994/05/13}
+% {Macro added}
+% \begin{macrocode}
+\def\color@setgroup{\begingroup\set@color}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\color@begingroup}
+% This is to be used at the start of contexts that may contain colour
+% commands, but where it is not necessary to save the current colour.
+% Examples of this are in the box commands of |ltboxes.dtx| where
+% user-supplied text is saved internally in a box between
+% |\color@begingroup|, |\color@endgroup|, but the box is used before
+% any other colour commands could intervene. A matching
+% |\color@endgroup| should be used at the end of the text.
+% \changes{v0.2d}{1994/05/13}
+% {New definition, was previously like \cs{color@setgroup}}
+% \begin{macrocode}
+\let\color@begingroup\begingroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\color@endgroup}
+% To be used to close the `group' started by one of the above two
+% commands. The |\endgraf| in its definition is required in the case
+% of groups of text in vertical `par' mode, but doesn't do any harm in
+% horizontal `LR' contexts.
+% \changes{v0.2d}{1994/05/13}
+% {New definition, was previously just \cs{endgroup}}
+% \begin{macrocode}
+\def\color@endgroup{\endgraf\endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\color@hbox}
+% To be used to open a `coloured hbox'
+% \changes{v0.3g}{1994/11/08}
+% {Macro added}
+% \begin{macrocode}
+\def\color@hbox{\hbox\bgroup\color@begingroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\color@vbox}
+% To be used to open a `coloured hbox'
+% \changes{v0.3h}{1994/11/22}
+% {Macro added}
+% \begin{macrocode}
+\def\color@vbox{\vbox\bgroup\color@begingroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\color@endbox}
+% To be used to close a `coloured hbox'
+% \changes{v0.3g}{1994/11/08}
+% {Macro added}
+% \begin{macrocode}
+\def\color@endbox{\color@endgroup\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \changes{v0.2d}{1994/05/13}
+% {tabbing support removed (now in kernel)}
+%
+% \changes{v0.3l}{1995/12/07}
+% {\cs{underbar} removed (now in kernel)}
+%
+% \changes{v0.3h}{1994/11/22}
+% {marginpar, phantom and smash now supported in kernel}
+%
+% \changes{v0.3l}{1995/12/07}
+% {\cs{showhyphens} removed (now in kernel)}
+%
+%
+% \section{Predefining Colours}
+%
+% As long as the driver file has defined sufficient colour models, we
+% define a few colours, just to get people started.
+%
+% \begin{macro}{black}
+% \begin{macro}{white}
+% Black and white `colours'.
+% \begin{macrocode}
+\ifx\color@gray\@undefined
+ \ifx\color@rgb\@undefined
+ \else
+ \definecolor{black}{rgb}{0,0,0}
+ \definecolor{white}{rgb}{1,1,1}
+ \fi
+\else
+ \definecolor{black}{gray}{0}
+ \definecolor{white}{gray}{1}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{red}
+% \begin{macro}{green}
+% \begin{macro}{blue}
+% Additive primaries.
+% \begin{macrocode}
+\ifx\color@rgb\@undefined\else
+ \definecolor{red}{rgb}{1,0,0}
+ \definecolor{green}{rgb}{0,1,0}
+ \definecolor{blue}{rgb}{0,0,1}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{cyan}
+% \begin{macro}{magenta}
+% \begin{macro}{yellow}
+% Subtractive primaries.
+% \begin{macrocode}
+\ifx\color@cmyk\@undefined\else
+ \definecolor{cyan}{cmyk}{1,0,0,0}
+ \definecolor{magenta}{cmyk}{0,1,0,0}
+ \definecolor{yellow}{cmyk}{0,0,1,0}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \section{And Finally}
+%
+% Restore Catcodes
+% \begin{macrocode}
+\Gin@codes
+\let\Gin@codes\relax
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/required/graphics/color.pdf b/macros/latex-dev/required/graphics/color.pdf
new file mode 100644
index 0000000000..efdebda318
--- /dev/null
+++ b/macros/latex-dev/required/graphics/color.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/drivers.dtx b/macros/latex-dev/required/graphics/drivers.dtx
new file mode 100644
index 0000000000..07c201cf87
--- /dev/null
+++ b/macros/latex-dev/required/graphics/drivers.dtx
@@ -0,0 +1,1701 @@
+%
+% \iffalse
+%
+%% drivers.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
+%% Copyright (C) 1995 1996 1997 1998 1999 David Carlisle
+%% Copyright (C) 2000--2016 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3 or, at your option, any later version.
+%%
+%<template, >\ProvidesFile{template.def}
+%<dvips, >\ProvidesFile{dvips.def}
+%<dvipsnames>\ProvidesFile{dvipsnam.def}
+%<dvipdf, >\ProvidesFile{dvipdf.def}
+%<emtex, >\ProvidesFile{emtex.def}
+%<dviwin, >\ProvidesFile{dviwin.def}
+%<dvipsone, >\ProvidesFile{dvipsone.def}
+%<pctexps, >\ProvidesFile{pctexps.def}
+%<pctex32, >\ProvidesFile{pctex32.def}
+%<pctexwin, >\ProvidesFile{pctexwin.def}
+%<pctexhp, >\ProvidesFile{pctexhp.def}
+%<truetex, >\ProvidesFile{truetex.def}
+%<tcidvi, >\ProvidesFile{tcidvi.def}
+%<oztex, >\ProvidesFile{oztex.def}
+%<textures, >\ProvidesFile{textures.def}
+%<dvialw, >\ProvidesFile{dvialw.def}
+%<dvilaser, >\ProvidesFile{dvilaser.def}
+%<psprint, >\ProvidesFile{psprint.def}
+%<dvi2ps, >\ProvidesFile{dvi2ps.def}
+%<pubps, >\ProvidesFile{pubps.def}
+%<dvitops, >\ProvidesFile{dvitops.def}
+%<ln, >\ProvidesFile{ln.def}
+%
+%<*driver>
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesFile{drivers.dtx}
+%</driver>
+ [2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)]
+%
+%<*driver>
+ \documentclass{ltxdoc}
+ \GetFileInfo{drivers.dtx}
+ \begin{document}
+ \title{Graphics drivers for \LaTeXe\thanks
+ {Version \fileversion, revised \filedate}}
+ \author{Sebastian Rahtz and David Carlisle}
+ \date{\filedate}
+ \MaintainedByLaTeXTeam{graphics}
+ \maketitle
+ \DocInput{drivers.dtx}
+ \end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \providecommand\OzTeX{O\kern-.03em z\kern-.15em\TeX}
+%
+% \section{Driver files}
+%
+% This file implements some of the currently supported drivers.
+% If the driver you use is not in this list then a `.def' file
+% may be distributed with This graphics bundle,
+% or may be distributed with your driver.
+%
+% If not, send us some details of the driver's |\special| syntax, and
+% we will try to produce a suitable file.
+%
+% Note that some of these files are for drivers to which we have no
+% access, so they are untested. Please send any corrections to the
+% latexbugs address.
+%
+%
+%
+%
+% \StopEventually{}
+%
+%
+% \section{Colour}
+%
+% Most of the drivers that support colour use one of three methods.
+% \begin{itemize}
+% \item color1: `dvips' style colour specials.
+% \item color2: `textures' style colour specials.
+% \item color3: Colour implemented via literal PostScript specials.
+% \item color4: Colour implemented by specials that only support RGB,
+% i.e., Red Green Blue specified as integers in the range
+% 0--255. Other models converted to this within \TeX.
+% \end{itemize}
+% Some drivers do not use any of these modules and have their own code.
+% Note that drivers using the `color3' code can not fully support the
+% \LaTeX\ colour commands.
+% \begin{macrocode}
+%<*color1|color2|color3|color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\c@lor@arg#1{%
+ \dimen@#1\p@
+ \ifdim\dimen@<\z@\dimen@\maxdimen\fi
+ \ifdim\dimen@>\p@
+ \PackageError{color}{Argument `#1' not in range [0,1]}\@ehd
+ \fi}
+% \end{macrocode}
+%
+% Need to make sure of a trailing .0 for textures. Apparently it
+% is OK to always add a . as 1.3. is accepted by textures.
+% textures gray special is reversed, so just use rgb instead.
+%
+% \begin{macrocode}
+\def\color@gray#1#2{%
+ \c@lor@arg{#2}%
+%<color4> \c@lor@rgb@RGB\@tempa
+%<color1> \edef#1{gray #2}%
+%<color2> \edef#1{rgb #2. #2. #2.}%
+%<color3> \edef#1{#2 setgray}%
+%<color4> \edef#1{\@tempa\@tempa\@tempa}%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
+\def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
+ \c@lor@arg{#4}%
+%<color4> \dimen@ii#4\p@
+ \c@lor@arg{#1}%
+%<color4> \c@lor@cmyk@RGB\@tempa
+ \c@lor@arg{#2}%
+%<color4> \c@lor@cmyk@RGB\@tempb
+ \c@lor@arg{#3}%
+%<color4> \c@lor@cmyk@RGB\@tempc
+%<color1> \edef#5{cmyk #1 #2 #3 #4}%
+%<color2> \edef#5{cmyk #1. #2. #3. #4.}%
+%<color3> \edef#5{#1 #2 #3 #4 setcmykcolor}%
+%<color4> \edef#5{\@tempa\@tempb\@tempc}%
+ }
+% \end{macrocode}
+%
+% A 0--1 range value will have been left in |\dimen@| by |\c@lor@arg|.
+% The black value (0--1) will be stored in |\dimen@ii|.
+% Covert to 0--255 integer, and leave in |#1|.
+% \begin{macrocode}
+%<*color4>
+\def\c@lor@cmyk@RGB#1{%
+ \advance\dimen@-\p@
+ \advance\dimen@\dimen@ii
+ \dimen@-\@cclv\dimen@
+ \divide\dimen@\p@
+ \count@\ifdim\dimen@<\z@\z@\else\dimen@\fi
+ \edef#1{\the\count@\space}}
+%</color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
+\def\c@lor@@rgb#1,#2,#3\@@#4{%
+ \c@lor@arg{#1}%
+%<color4> \c@lor@rgb@RGB\@tempa
+ \c@lor@arg{#2}%
+%<color4> \c@lor@rgb@RGB\@tempb
+ \c@lor@arg{#3}%
+%<color4> \c@lor@rgb@RGB\@tempc
+%<color1> \edef#4{rgb #1 #2 #3}%
+%<color2> \edef#4{rgb #1. #2. #3.}%
+%<color3> \edef#4{#1 #2 #3 setrgbcolor}%
+%<color4> \edef#4{\@tempa\@tempb\@tempc}%
+ }
+% \end{macrocode}
+%
+% A 0--1 range value will have been left in |\dimen@| by |\c@lor@arg|.
+% Convert to 0--255 integer, and leave in |#1|.
+% \begin{macrocode}
+%<*color4>
+\def\c@lor@rgb@RGB#1{%
+ \dimen@\@cclv\dimen@
+ \count@\dimen@
+ \divide\count@\p@
+ \edef#1{\the\count@\space}}
+%</color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\c@lor@@RGB#1,#2,#3\@@#4{%
+%<!color4> \c@lor@RGB@rgb{#1}\@tempa
+%<!color4> \c@lor@RGB@rgb{#2}\@tempb
+%<!color4> \c@lor@RGB@rgb{#3}\@tempc
+%<!color4> \c@lor@@rgb\@tempa,\@tempb,\@tempc\@@#4%
+%<color4> \edef#4{#1 #2 #3}%
+ }
+% \end{macrocode}
+% % Convert 0--255 integer, |#1|, to 0--1 real, and leave in |#2|.
+% \begin{macrocode}
+%<*!color4>
+\def\c@lor@RGB@rgb#1#2{%
+ \dimen@#1\p@
+ \divide\dimen@\@cclv
+ \edef#2{\strip@pt\dimen@}}
+%</!color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*color1|color3>
+\def\color@hsb#1#2{\c@lor@@hsb#2\@@#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\c@lor@@hsb#1,#2,#3\@@#4{%
+ \c@lor@arg{#1}%
+ \c@lor@arg{#2}%
+ \c@lor@arg{#3}%
+%<color1> \edef#4{hsb #1 #2 #3}%
+%<color3> \edef#4{#1 #2 #3 sethsbcolor}%
+ }
+%</color1|color3>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\color@named#1#2{\c@lor@@named#2,,\@@#1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\c@lor@@named#1,#2,#3\@@#4{%
+ \@ifundefined{col@#1}%
+ {\PackageError{color}{Undefined color `#1'}\@ehd}%
+%<color1&!dvipsone> {\edef#4{ #1}}%
+%<color2> {\edef#4{ #1 \if!#2!\else #2.\fi}}%
+%<color3|dvipsone|color4> {\edef#4{\csname col@#1\endcsname}}%
+ }
+% \end{macrocode}
+%
+% Conversion from |\special| syntax to PostScript (for PSTricks).
+% \begin{macrocode}
+%<*color1|color2>
+\def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}
+%</color1|color2>
+%<*color3>
+\def\c@lor@to@ps#1\@@{#1}
+%</color3>
+%<*color4>
+\def\c@lor@to@ps#1#2 #3 #4\@@{%
+ #1#2 255 div #3 255 div #4 255 div setrgbcolor}
+%</color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*color1>
+\def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}
+\def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}
+\def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}
+\def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}
+\def\c@lor@ps@gray#1\@@{#1 setgray}
+%</color1>
+%<*color2>
+\def\c@lor@to@ps@#1 #2\@@{\csname c@lor@ps@#1@\endcsname#2 \@@}
+\def\c@lor@ps@#1 #2\@@{%
+ \expandafter\expandafter\expandafter
+ \c@lor@to@ps@\csname col@#1\expandafter\endcsname\space#2. \@@{#1}}
+\def\c@lor@ps@rgb#1. #2. #3. #4\@@{#1 #2 #3 setrgbcolor}
+\def\c@lor@ps@rgb@#1. #2. #3. #4. #5\@@#6{#1 #2 #3 setrgbcolor}
+\def\c@lor@ps@cmyk#1. #2. #3. #4. #5. #6\@@{#1 #2 #3 #4 setcmykcolor}
+\def\c@lor@ps@cmyk@#1. #2. #3. #4. #5. #6\@@#7{%
+ #1 #2 #3 #4 (#7) findcustomcmykcolor
+ \if!\@firstofone#5!1 \else#5 \fi setcustomcolor}
+%</color2>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<color1&!dvipsone>\def\current@color{ Black}
+%<color1&dvipsone>\def\current@color{gray 0}
+%<color2>\def\current@color{rgb 0. 0. 0.}
+%<color3>\def\current@color{0 setgray}
+%<color4>\def\current@color{0 0 0}
+% \end{macrocode}
+%
+% \changes{v3.0j}{2014/04/23}
+% {add \cs{nopagecolor} for dvips graphics/3873}
+% \begin{macrocode}
+%<*color1>
+\def\set@color{%
+%<!dvipsone&!dvipdf> \special{color push \current@color
+%<dvipsone> \special{color push}\special{color \current@color
+%<dvipdf> \special{pdf: /C \current@color\space<<
+ }\aftergroup\reset@color}
+\def\reset@color{\special{%
+%<!dvipdf> color pop}}
+%<dvipdf> pdf: /C >> }}
+\def\set@page@color{\special{%
+%<!dvipdf> background \current@color}}
+%<dvipdf> pdf: /BG \current@color}}
+\def\define@color@named#1#2{%
+%<!dvipsone> \expandafter\let\csname col@#1\endcsname\@nnil}
+%<dvipsone> \expandafter\edef\csname col@#1\endcsname{#2}}
+%<dvips> \def\no@page@color{\special{background \string"newpath clip}}
+%</color1>
+%<*color2>
+\def\set@color{%
+ \special{color push}%
+ \special{color \current@color}%
+ \aftergroup\reset@color}
+\def\reset@color{\special{color pop}}
+\def\set@page@color{\c@lor@special\sixt@@n{background \current@color}}
+\def\define@color@named#1#2{%
+ \AtBeginDvi{\special{color define #1 #2}}%
+ \expandafter\edef\csname col@#1\endcsname{#2}}
+%</color2>
+%<*color3>
+\def\set@color{%
+ \Gin@PS@raw{\current@color}\aftergroup\reset@color}
+\def\reset@color{\Gin@PS@raw{\current@color}}
+%</color3>
+%<*color4>
+\def\set@color{%
+ \special{textcolor: \current@color}\aftergroup\reset@color}
+\def\reset@color{\special{textcolor: \current@color}}
+%</color4>
+%<*color3|color4>
+\def\set@page@color{%
+ \c@lor@special\sixt@@n{background color ignored: \current@color}}
+\def\define@color@named#1#2{%
+ \expandafter\edef\csname col@#1\endcsname{#2}}
+%</color3|color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</color1|color2|color3|color4>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*colorfix>
+\AtBeginDocument{%
+ \let\@ldc@l@r\color
+ \def\color{\if@inlabel\leavevmode\fi\@ldc@l@r}%
+ \let\@lduseb@x\usebox
+ \def\usebox#1{\@lduseb@x{#1}\set@color}}
+%</colorfix>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvipsnames>
+\DefineNamedColor{named}{GreenYellow} {cmyk}{0.15,0,0.69,0}
+\DefineNamedColor{named}{Yellow} {cmyk}{0,0,1,0}
+\DefineNamedColor{named}{Goldenrod} {cmyk}{0,0.10,0.84,0}
+\DefineNamedColor{named}{Dandelion} {cmyk}{0,0.29,0.84,0}
+\DefineNamedColor{named}{Apricot} {cmyk}{0,0.32,0.52,0}
+\DefineNamedColor{named}{Peach} {cmyk}{0,0.50,0.70,0}
+\DefineNamedColor{named}{Melon} {cmyk}{0,0.46,0.50,0}
+\DefineNamedColor{named}{YellowOrange} {cmyk}{0,0.42,1,0}
+\DefineNamedColor{named}{Orange} {cmyk}{0,0.61,0.87,0}
+\DefineNamedColor{named}{BurntOrange} {cmyk}{0,0.51,1,0}
+\DefineNamedColor{named}{Bittersweet} {cmyk}{0,0.75,1,0.24}
+\DefineNamedColor{named}{RedOrange} {cmyk}{0,0.77,0.87,0}
+\DefineNamedColor{named}{Mahogany} {cmyk}{0,0.85,0.87,0.35}
+\DefineNamedColor{named}{Maroon} {cmyk}{0,0.87,0.68,0.32}
+\DefineNamedColor{named}{BrickRed} {cmyk}{0,0.89,0.94,0.28}
+\DefineNamedColor{named}{Red} {cmyk}{0,1,1,0}
+\DefineNamedColor{named}{OrangeRed} {cmyk}{0,1,0.50,0}
+\DefineNamedColor{named}{RubineRed} {cmyk}{0,1,0.13,0}
+\DefineNamedColor{named}{WildStrawberry}{cmyk}{0,0.96,0.39,0}
+\DefineNamedColor{named}{Salmon} {cmyk}{0,0.53,0.38,0}
+\DefineNamedColor{named}{CarnationPink} {cmyk}{0,0.63,0,0}
+\DefineNamedColor{named}{Magenta} {cmyk}{0,1,0,0}
+\DefineNamedColor{named}{VioletRed} {cmyk}{0,0.81,0,0}
+\DefineNamedColor{named}{Rhodamine} {cmyk}{0,0.82,0,0}
+\DefineNamedColor{named}{Mulberry} {cmyk}{0.34,0.90,0,0.02}
+\DefineNamedColor{named}{RedViolet} {cmyk}{0.07,0.90,0,0.34}
+\DefineNamedColor{named}{Fuchsia} {cmyk}{0.47,0.91,0,0.08}
+\DefineNamedColor{named}{Lavender} {cmyk}{0,0.48,0,0}
+\DefineNamedColor{named}{Thistle} {cmyk}{0.12,0.59,0,0}
+\DefineNamedColor{named}{Orchid} {cmyk}{0.32,0.64,0,0}
+\DefineNamedColor{named}{DarkOrchid} {cmyk}{0.40,0.80,0.20,0}
+\DefineNamedColor{named}{Purple} {cmyk}{0.45,0.86,0,0}
+\DefineNamedColor{named}{Plum} {cmyk}{0.50,1,0,0}
+\DefineNamedColor{named}{Violet} {cmyk}{0.79,0.88,0,0}
+\DefineNamedColor{named}{RoyalPurple} {cmyk}{0.75,0.90,0,0}
+\DefineNamedColor{named}{BlueViolet} {cmyk}{0.86,0.91,0,0.04}
+\DefineNamedColor{named}{Periwinkle} {cmyk}{0.57,0.55,0,0}
+\DefineNamedColor{named}{CadetBlue} {cmyk}{0.62,0.57,0.23,0}
+\DefineNamedColor{named}{CornflowerBlue}{cmyk}{0.65,0.13,0,0}
+\DefineNamedColor{named}{MidnightBlue} {cmyk}{0.98,0.13,0,0.43}
+\DefineNamedColor{named}{NavyBlue} {cmyk}{0.94,0.54,0,0}
+\DefineNamedColor{named}{RoyalBlue} {cmyk}{1,0.50,0,0}
+\DefineNamedColor{named}{Blue} {cmyk}{1,1,0,0}
+\DefineNamedColor{named}{Cerulean} {cmyk}{0.94,0.11,0,0}
+\DefineNamedColor{named}{Cyan} {cmyk}{1,0,0,0}
+\DefineNamedColor{named}{ProcessBlue} {cmyk}{0.96,0,0,0}
+\DefineNamedColor{named}{SkyBlue} {cmyk}{0.62,0,0.12,0}
+\DefineNamedColor{named}{Turquoise} {cmyk}{0.85,0,0.20,0}
+\DefineNamedColor{named}{TealBlue} {cmyk}{0.86,0,0.34,0.02}
+\DefineNamedColor{named}{Aquamarine} {cmyk}{0.82,0,0.30,0}
+\DefineNamedColor{named}{BlueGreen} {cmyk}{0.85,0,0.33,0}
+\DefineNamedColor{named}{Emerald} {cmyk}{1,0,0.50,0}
+\DefineNamedColor{named}{JungleGreen} {cmyk}{0.99,0,0.52,0}
+\DefineNamedColor{named}{SeaGreen} {cmyk}{0.69,0,0.50,0}
+\DefineNamedColor{named}{Green} {cmyk}{1,0,1,0}
+\DefineNamedColor{named}{ForestGreen} {cmyk}{0.91,0,0.88,0.12}
+\DefineNamedColor{named}{PineGreen} {cmyk}{0.92,0,0.59,0.25}
+\DefineNamedColor{named}{LimeGreen} {cmyk}{0.50,0,1,0}
+\DefineNamedColor{named}{YellowGreen} {cmyk}{0.44,0,0.74,0}
+\DefineNamedColor{named}{SpringGreen} {cmyk}{0.26,0,0.76,0}
+\DefineNamedColor{named}{OliveGreen} {cmyk}{0.64,0,0.95,0.40}
+\DefineNamedColor{named}{RawSienna} {cmyk}{0,0.72,1,0.45}
+\DefineNamedColor{named}{Sepia} {cmyk}{0,0.83,1,0.70}
+\DefineNamedColor{named}{Brown} {cmyk}{0,0.81,1,0.60}
+\DefineNamedColor{named}{Tan} {cmyk}{0.14,0.42,0.56,0}
+\DefineNamedColor{named}{Gray} {cmyk}{0,0,0,0.50}
+\DefineNamedColor{named}{Black} {cmyk}{0,0,0,1}
+\DefineNamedColor{named}{White} {cmyk}{0,0,0,0}
+%</dvipsnames>
+% \end{macrocode}
+%
+% \section{dvips}
+% A \LaTeXe\ graphics driver file for Tom Rokicki's \emph{dvips}
+% driver; tested with version 5.58f.
+%
+% \begin{macrocode}
+%<*dvips>
+% \end{macrocode}
+%
+% \subsection{Colour}
+% Uses the generic `color1' code.
+%
+% \subsection{File inclusion}
+%
+% \begin{macro}{\Ginclude@eps}
+% |#1| input file (or command)
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+% \end{macrocode}
+% \emph{dvips} likes to work with its own pixel resolution, so
+% mangle the sizes slightly.
+% \begin{macrocode}
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile="#1"\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ginclude@bmp}
+% |#1| input file; if zero size is requested, the graphic will
+% come at `natural' size.
+% \begin{macrocode}
+\def\Ginclude@bmp#1{%
+ \message{<#1>}%
+ \dimen@\Gin@req@height
+ \advance\dimen@ by-\Gin@lly bp
+ \kern-\Gin@llx bp\raise\Gin@req@height\hbox{%
+ \ifdim\Gin@urx bp=\z@
+ \ifdim\Gin@ury bp=\z@
+ \special{em: graph #1}%
+ \else
+ \special{em: graph #1,\Gin@urx bp}%
+ \fi
+ \else
+ \special{em: graph #1,\Gin@urx bp,\Gin@ury bp}%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ginclude@pict}
+% \begin{macro}{\Ginclude@pntg}
+% \begin{macro}{\oztex@include}
+% PICT/PNTG format from the Mac. Actually only currently supported by
+% the version of dvips distributed with \OzTeX, and with the built in
+% \OzTeX\ drivers, but put here anyway as it is not much code and
+% increases portability between the systems as now |[dvips]| and
+% |[oztex]| share the same back end.
+% \begin{macrocode}
+\def\oztex@include#1#2{%
+ \dimen@1bp%
+ \divide\Gin@req@width\dimen@
+ \divide\Gin@req@height\dimen@
+ \special{#1=#2\space
+ \@width=\number\Gin@req@width \space
+ \@height=\number\Gin@req@height}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Ginclude@pntg{\oztex@include{pntg}}
+\def\Ginclude@pict{\oztex@include{pict}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Rotation}
+% \begin{macrocode}
+\def\Grot@start{%
+ \special{ps: gsave currentpoint
+ currentpoint translate \Grot@angle\space neg
+ rotate neg exch neg exch translate}}
+\def\Grot@end{\special{ps: currentpoint grestore moveto}}
+% \end{macrocode}
+% \subsection{Scaling}
+% \begin{macrocode}
+\def\Gscale@start{\special{ps: currentpoint currentpoint translate
+ \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
+\def\Gscale@end{\special{ps: currentpoint currentpoint translate
+ 1 \Gscale@x\space div 1 \Gscale@y\space div scale
+ neg exch neg exch translate}}
+% \end{macrocode}
+%
+% \section{Literal Postscript}
+%
+% Raw PostScript code, no save/restore.
+% \begin{macrocode}
+\def\Gin@PS@raw#1{\special{ps: #1}}
+% \end{macrocode}
+%
+% PostScript code, to be surrounded by save/restore by the driver.
+% Coordinate system standard PostScript, but with origin
+% at current (\TeX) position.
+% \begin{macrocode}
+\def\Gin@PS@restored#1{\special{" #1}}
+% \end{macrocode}
+%
+% PostScript code to be inserted in the Header section of the final
+% PostScript. Must be issued on the first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@literal@header#1{\AtBeginDvi{\special{! #1}}}
+% \end{macrocode}
+%
+% Name of external file, the contents of which are to be inserted in
+% the Header section of the final PostScript. Must be issued on the
+% first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@file@header#1{\AtBeginDvi{\special{header=#1}}}
+% \end{macrocode}
+%
+% \section{Page Size}
+%
+% \changes{v3.0l}{2016/06/02}{page size special added to patch pdftex.def}
+% \changes{v3.0m}{2016/06/17}{guards for contributed packages and plain TeX}
+% \begin{macrocode}
+\@ifundefined{ifGin@setpagesize}
+ {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname
+ \csname iftrue\endcsname}
+ {}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifGin@setpagesize
+\ifx\paperwidth\@undefined\else
+ \AtBeginDocument{\AtBeginDvi{%
+ \begingroup
+ \ifx\stockwidth\@undefined\else
+ \paperwidth\stockwidth
+ \paperheight\stockheight
+ \fi
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \fi
+ \fi
+ \endgroup}}
+\fi
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dvips>
+% \end{macrocode}
+%
+%
+% \section{dvipdf}
+% A \LaTeXe\ graphics driver file for \emph{dvipdf} driver.
+%
+% \begin{macrocode}
+%<*dvipdf>
+% \end{macrocode}
+%
+% \subsection{Colour}
+% Uses the generic `color1' code.
+%
+% \subsection{File inclusion}
+%
+% \begin{macro}{\Ginclude@eps}
+% |#1| input file (or command)
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+% \end{macrocode}
+% \emph{dvips} likes to work with its own pixel resolution, so
+% mangle the sizes slightly.
+% \begin{macrocode}
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile="#1"\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ginclude@bmp}
+% |#1| input file; if zero size is requested, the graphic will
+% come at `natural' size.
+% \begin{macrocode}
+\def\Ginclude@bmp#1{%
+ \message{<#1>}%
+ \dimen@\Gin@req@height
+ \advance\dimen@ by-\Gin@lly bp
+ \kern-\Gin@llx bp\raise\Gin@req@height\hbox{%
+ \ifdim\Gin@urx bp=\z@
+ \ifdim\Gin@ury bp=\z@
+ \special{pdf: /GRAPH #1}%
+ \else
+ \special{pdf: /GRAPH #1 \number\Gin@req@width sp}%
+ \fi
+ \else
+ \special{pdf: /GRAPH #1 \number\Gin@req@width sp
+ \number\Gin@req@height sp}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Rotation}
+% \begin{macrocode}
+\def\Grot@start{%
+\special{pdf: /ROT \Grot@angle\space << }}
+\def\Grot@end{\special{pdf: /ROT >> }}
+% \end{macrocode}
+%
+% \subsection{Scaling}
+% \begin{macrocode}
+\def\Gscale@start{\special{pdf: /S \Gscale@x\space \Gscale@y\space << }}
+\def\Gscale@end{\special{pdf: /S \space >> }}
+% \end{macrocode}
+%
+% \section{Literal Postscript}
+%
+% Raw PostScript code, no save/restore.
+% \begin{macrocode}
+\def\Gin@PS@raw#1{\special{ps: #1}}
+% \end{macrocode}
+%
+% PostScript code, to be surrounded by save/restore by the driver.
+% Coordinate system standard PostScript, but with origin
+% at current (\TeX) position.
+% \begin{macrocode}
+\def\Gin@PS@restored#1{\special{" #1}}
+% \end{macrocode}
+%
+% PostScript code to be inserted in the Header section of the final
+% PostScript. Must be issued on the first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@literal@header#1{\AtBeginDvi{\special{! #1}}}
+% \end{macrocode}
+%
+% Name of external file, the contents of which are to be inserted in
+% the Header section of the final PostScript. Must be issued on the
+% first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@file@header#1{\AtBeginDvi{\special{header=#1}}}
+% \end{macrocode}
+%
+% \subsection{File extensions}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@.msp}#1{{bmp}{.bb}{#1}}
+\@namedef{Gin@rule@.jpg}#1{{bmp}{.bb}{#1}}
+\@namedef{Gin@rule@.bmp}#1{{bmp}{.bb}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dvipdf>
+% \end{macrocode}
+%
+% \section{\OzTeX}
+%
+% A \LaTeXe\ graphics driver file for \OzTeX\
+% (versions 1.42 and later),
+% by Andrew Trevorrow.
+% \begin{macrocode}
+%<*oztex>
+% \end{macrocode}
+%\subsection{Graphics inclusion}
+% \begin{macrocode}
+\def\Ginclude@eps{\Oztex@Include{epsf}}
+\def\Ginclude@pntg{\Oztex@Include{pntg}}
+\def\Ginclude@pict{\Oztex@Include{pict}}
+\def\Oztex@Include#1#2{%
+ \ifGin@clip
+ \typeout{No clipping support in OzTeX}%
+ \fi
+ \divide\Gin@req@width by 65781% convert sp to bp
+ \divide\Gin@req@height by 65781%
+ \special{#1=#2\space
+ width=\number\Gin@req@width \space
+ height=\number\Gin@req@height
+ }%
+}
+%</oztex>
+% \end{macrocode}
+%\section{Textures}
+% A \LaTeXe\ graphics driver file for Blue Sky's Textures
+%
+% \textbf{WARNING! There is ongoing work to produce a new version of
+% the textures support. Do not rely on anything in this file being in
+% the next version!}
+%
+%
+% \begin{macrocode}
+%<*textures>
+% \end{macrocode}
+% \subsection{Graphics inclusion}
+%
+%
+% \begin{macrocode}
+\PackageInfo{graphics/color}
+ {This file uses the advanced color support\MessageBreak
+ available in textures1.7\MessageBreak
+ If you are using color with an earlier version\MessageBreak
+ of textures, edit graphics.ins where marked,\MessageBreak
+ and re-latex graphics.ins.\MessageBreak\MessageBreak
+ If you are using textures1.7\MessageBreak
+ you may want to delete this warning\MessageBreak
+ from textures.def.\MessageBreak\MessageBreak
+ The code for scaling/rotation and file inclusion\MessageBreak
+ in this file is still rudimentary, and does not\MessageBreak
+ use textures' full capabilities.\MessageBreak\MessageBreak
+ A new textures.def is currently being developed\@gobble}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\def\Ginclude@eps{\Textures@Include{illustration}}
+\def\Ginclude@pict{\Textures@Include{pictfile}}
+\def\Textures@Include#1#2{%
+ \def\@tempa{!}%
+ \ifx\Gin@scaley\@tempa
+ \let\Gin@scaley\Gin@scalex
+ \else
+ \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
+ \fi
+ \setlength\@tempdima{\Gin@scalex pt}%
+ \setlength\@tempdimb{\Gin@scaley pt}%
+ \ifdim\@tempdima>\@tempdimb
+ \let\Gin@scalex\Gin@scaley
+ \fi
+ \ifGin@clip
+ \typeout{no clipping support in Textures}%
+ \fi
+ \@tempdimb=1000sp%
+ \setlength\@tempdima{\Gin@scalex\@tempdimb}%
+ \special{#1 #2\space scaled \number\@tempdima}%
+}
+% \end{macrocode}
+% \subsection{Rotation}
+% This code was written when no unprotected postscript code was allowed;
+% it could almost certainly be rewritten now with `rawpostscript'.
+% \begin{macrocode}
+\def\Grot@start{\special{postscript
+ 0 0 transform
+ grestore
+ matrix currentmatrix
+ 3 1 roll
+ itransform
+ dup 3 -1 roll
+ dup 4 1 roll exch
+ translate
+ \Grot@angle\space neg rotate
+ neg exch neg exch translate
+ gsave}}
+\def\Grot@end{\special{postscript grestore setmatrix gsave}}
+% \end{macrocode}
+% \subsection{Colour}
+% This will only work for versions 1.6 and Version 1.7 uses `color2'.
+% \begin{macrocode}
+%<color3>\def\Gin@PS@raw#1{\special{rawpostscript #1}}
+%</textures>
+% \end{macrocode}
+%
+% \section{dvialw}
+% A \LaTeXe\ graphics driver file for dvialw, by Nelson Beebe
+% \begin{macrocode}
+%<*dvialw>
+% \end{macrocode}
+% \subsection{Rotation}
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \def\@tempa{!}%
+ \ifx\Gin@scaley\@tempa
+ \let\Gin@scaley\Gin@scalex
+ \else
+ \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
+ \fi
+ \ifGin@clip
+ \typeout{no clipping support in dvialw}%
+ \fi
+ \special{language "PS",
+ literal "\Gin@scalex\space
+ \Gin@scaley\space scale",
+ position = "bottom left",
+ include "#1\space"}%
+}
+%</dvialw>
+% \end{macrocode}
+% \section{emtex}
+% A \LaTeXe\ graphics driver file for Eberhard Mattes' emTeX
+% \begin{macrocode}
+%<*emtex>
+% \end{macrocode}
+% \subsection{Graphics file inclusion}
+% \begin{macrocode}
+\def\Ginclude@bmp#1{%
+ \raise\Gin@req@height\hbox{\special{em:graph #1}}%
+\typeout{WARNING: emtex does not permit graphics to be scaled}%
+}
+%</emtex>
+% \end{macrocode}
+% \section{dvilaser/ps}
+% A \LaTeXe\ graphics driver file for Arbortext's dvilaser/ps
+% \begin{macrocode}
+%<*dvilaser>
+% \end{macrocode}
+%\subsection{Graphic file inclusion}
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+\ifGin@clip
+ \typeout{no clipping support in dvilaser/ps}%
+\fi
+\special{ps: epsfile #1\space \the\Gin@req@width}%
+}
+%</dvilaser>
+% \end{macrocode}
+% \section{psprint}
+% A \LaTeXe\ graphics driver file for Trevorrow's psprint
+% \begin{macrocode}
+%<*psprint>
+% \end{macrocode}
+%\subsection{Graphic file inclusion}
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \def\@tempa{!}%
+ \ifx\Gin@scaley\@tempa
+ \let\Gin@scaley\Gin@scalex
+ \else
+ \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
+ \fi
+ \ifGin@clip
+ \typeout{no clipping support in psprint}%
+ \fi
+ \special{#1\space
+ \Gin@scalex\space \Gin@scaley\space scale
+ \Gin@llx\space neg
+ \Gin@lly \space neg translate
+}%
+}
+%</psprint>
+% \end{macrocode}
+% \section{dvipsone}
+%
+% A \LaTeXe\ graphics driver file for Y\&Y's dvipsone
+% \begin{macrocode}
+%<*dvipsone>
+% \end{macrocode}
+%
+% \subsection{Graphic file inclusion}
+%
+% PostScript Files.
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile="#1"\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
+% \end{macrocode}
+%
+% Tiff files.
+% \begin{macrocode}
+\def\Ginclude@tiff#1{%
+\message{<#1>}%
+ \special{insertimage: #1 \number\Gin@req@width\space
+ \number\Gin@req@height}}
+% \end{macrocode}
+%
+% Windows Metafiles.
+% \begin{macrocode}
+\def\Ginclude@wmf#1{%
+ \message{<#1>}%
+ \special{insertmf: #1 0 0 \number\Gin@req@width\space
+ \number\Gin@req@height}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@PS@raw#1{\special{ps: #1}}
+% \end{macrocode}
+%
+% \subsection{Rotation}
+% \begin{macrocode}
+\def\Grot@start{%
+ \special{ps: gsave currentpoint
+ currentpoint translate \Grot@angle\space
+ rotate neg exch neg exch translate}}
+\def\Grot@end{%
+ \special{ps: currentfont currentpoint grestore moveto setfont}}
+% \end{macrocode}
+%
+% \subsection{Scaling}
+% \begin{macrocode}
+\def\Gscale@start{\special{ps: currentpoint currentpoint translate
+ \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
+\def\Gscale@end{\special{ps: currentpoint currentpoint translate
+ 1 \Gscale@x\space div 1 \Gscale@y\space div scale
+ neg exch neg exch translate}}
+% \end{macrocode}
+%
+% \subsection{File Extensions}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@.wmf}#1{{wmf}{}{#1}}
+\@namedef{Gin@rule@.clp}#1{{wmf}{}{#1}}
+% \end{macrocode}
+%
+% \section{Literal Postscript}
+%
+% Raw PostScript code, no save/restore.
+% \begin{macrocode}
+\def\Gin@PS@raw#1{\special{ps: #1}}
+% \end{macrocode}
+%
+% PostScript code, to be surrounded by save/restore by the driver.
+% Coordinate system standard PostScript, but with origin
+% at current (\TeX) position.
+% \begin{macrocode}
+\def\Gin@PS@restored#1{\special{" #1}}
+% \end{macrocode}
+%
+% PostScript code to be inserted in the Header section of the final
+% PostScript. Must be issued on the first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@literal@header#1{\AtBeginDvi{\special{headertext=#1}}}
+% \end{macrocode}
+%
+% Name of external file, the contents of which are to be inserted in
+% the Header section of the final PostScript. Must be issued on the
+% first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@file@header#1{\AtBeginDvi{\special{header=#1}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dvipsone>
+% \end{macrocode}
+%
+% \section{dviwindo}
+% A \LaTeXe\ graphics driver file for Y\&Y's dviwindo.
+%
+% This driver now uses the same file as |dvipsone|.
+%
+% \section{dvitops}
+% A \LaTeXe\ graphics driver file for James Clark's dvitops
+% \begin{macrocode}
+%<*dvitops>
+% \end{macrocode}
+% \subsection{Rotation}
+% \begin{macrocode}
+\newcount\Grot@count
+\Grot@count=\@ne
+\def\Grot@start{\special{dvitops: origin
+ rot\the\@tempdima}%
+\special{dvitops: begin rot\the\Grot@count}}%
+\def\Grot@end{\special{dvitops: end}%
+\special{dvitops: rotate rot\the\Grot@count \space
+ \Grot@angle}%
+\global\advance\Grot@count by\@ne}%
+% \end{macrocode}
+% \subsection{Graphic file inclusion}
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+% These cause an arithmetic overflow, so I've commented them
+% out. Presumably they were there for some reason.
+% Any dvitops users out there??
+% \multiply\Gin@req@width by \@m
+% \multiply\Gin@req@height by \@m
+\ifGin@clip
+ \typeout{no clipping support in dvitops}%
+\fi
+\special{import #1\space \the\Gin@req@width\space
+ \the\Gin@req@height\space fill}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dvitops>
+% \end{macrocode}
+%
+%\section{dvi2ps}
+% A \LaTeXe\ graphics driver file for original dvi2ps
+% \begin{macrocode}
+%<*dvi2ps>
+% \end{macrocode}
+%
+% \subsection{Graphic file inclusion}
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \def\@tempa{!}%
+ \ifx\Gin@scaley\@tempa
+ \let\Gin@scaley\Gin@scalex
+ \else
+ \ifx\Gin@scalex\@tempa\let\Gin@scalex\Gin@scaley\fi
+ \fi
+ \ifGin@clip
+ \typeout{no clipping support in dvi2ps}%
+ \fi
+ \special{psfile=#1\space
+ hscale=\Gin@scalex\space 1000 mul
+ vscale=\Gin@scaley\space 1000 mul}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dvi2ps>
+% \end{macrocode}
+%
+% \section{pctexps}
+% A \LaTeXe\ graphics driver file for Personal TeX's PTI Laser/PS;
+% from information supplied by Lance Carnes and Tao Wang
+% |<pti@crl.com>|.
+% \begin{macrocode}
+%<*pctexps>
+% \end{macrocode}
+%
+% \subsection{Graphic file inclusion}
+%
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexps}%
+ \fi
+ \Gin@req@width.03515\Gin@req@width
+ \Gin@req@height.03515\Gin@req@height
+ \special{ps:#1\space x=\strip@pt\Gin@req@width cm,
+ y=\strip@pt\Gin@req@height cm}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Ginclude@ps#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexps}%
+ \fi
+ \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{ps:#1}}}%
+ \typeout{^^J%
+---------------------------------------------------------^^J%
+.ps graphics without bounding box information cannot be^^J%
+scaled. If the file actually contains the information,^^J%
+please rename the file to .eps file extension.^^J%
+---------------------------------------------------------^^J}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps}
+\@namedef{Gin@rule@.ps}#1{{ps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@PS@raw#1{\special{ps::#1}}
+\def\Grot@start{%
+ \special{ps::gsave currentpoint
+ currentpoint translate \Grot@angle\space
+ rotate neg exch neg exch translate}}
+\def\Grot@end{\special{ps:: currentpoint grestore moveto}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gscale@start{\special{ps:: currentpoint currentpoint translate
+ \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
+\def\Gscale@end{\special{ps:: currentpoint currentpoint translate
+ 1 \Gscale@x\space div 1 \Gscale@y\space div scale
+ neg exch neg exch translate}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</pctexps>
+% \end{macrocode}
+%
+% \section{pctex32}
+% A \LaTeXe\ graphics driver file for Personal TeX's PC TeX for 32 bit
+% Windows; Code supplied by Tao Wang |<pti@crl.com>|.
+%
+% \subsection{Colour}
+% Uses the generic `color1' code.
+%
+% \begin{macrocode}
+%<*pctex32>
+% \end{macrocode}
+%
+% \subsection{Graphic file inclusion}%
+% \begin{macrocode}
+% including PostScript graphics
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile="#1"\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
+% \end{macrocode}
+%
+% including BMP graphics
+% \begin{macrocode}
+\def\Ginclude@bmp#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support for BMP graphics in PCTeX32}%
+ \fi
+ \Gin@req@width.03515\Gin@req@width
+ \Gin@req@height.03515\Gin@req@height
+ \special{bmp:#1\space x=\strip@pt\Gin@req@width cm,
+ y=\strip@pt\Gin@req@height cm}}
+% \end{macrocode}
+%
+% including WMF graphics
+% \begin{macrocode}
+\def\Ginclude@wmf#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support for WMF graphics in PCTeX32}%
+ \fi
+ \Gin@req@width.03515\Gin@req@width
+ \Gin@req@height.03515\Gin@req@height
+ \special{wmf:#1\space x=\strip@pt\Gin@req@width cm,
+ y=\strip@pt\Gin@req@height cm}}
+% \end{macrocode}
+%
+% \subsection{Scaling and Rotating}
+% PostScript rotation and scaling
+% \begin{macrocode}
+\def\Grot@start{%
+ \special{ps:: gsave currentpoint
+ currentpoint translate \Grot@angle\space neg
+ rotate neg exch neg exch translate}}
+\def\Grot@end{\special{ps:: currentpoint grestore moveto}}
+\def\Gscale@start{\special{ps:: currentpoint currentpoint translate
+ \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
+\def\Gscale@end{\special{ps:: currentpoint currentpoint translate
+ 1 \Gscale@x\space div 1 \Gscale@y\space div scale
+ neg exch neg exch translate}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@PS@raw#1{\special{ps:: #1}}
+\def\Gin@PS@restored#1{\special{" #1}}
+% \end{macrocode}
+%
+% \subsection{Default Extensions}
+%
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps,.wmf,.bmp}
+\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+\@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
+\@namedef{Gin@rule@.wmf}#1{{wmf}{}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</pctex32>
+% \end{macrocode}
+%
+% \section{pctexwin}
+% A \LaTeXe\ graphics driver file for Personal TeX's PC TeX for Windows;
+% from information supplied by Lance Carnes and Tao Wang
+% |<pti@crl.com>|.
+% \begin{macrocode}
+%<*pctexwin>
+% \end{macrocode}
+%
+% \subsection{Graphic file inclusion}
+%
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexwin}%
+ \fi
+ \Gin@req@width.03515\Gin@req@width
+ \Gin@req@height.03515\Gin@req@height
+ \special{eps:#1\space x=\strip@pt\Gin@req@width cm,
+ y=\strip@pt\Gin@req@height cm}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Ginclude@ps#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexwin}%
+ \fi
+ \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{ps:#1}}}%
+ \typeout{^^J%
+---------------------------------------------------------^^J%
+.ps graphics without bounding box information cannot be^^J%
+scaled. If the file actually contains the information,^^J%
+please rename the file to .eps file extension.^^J%
+---------------------------------------------------------^^J%
+}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Ginclude@bmp#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexwin}%
+ \fi
+ \Gin@req@width.03515\Gin@req@width
+ \Gin@req@height.03515\Gin@req@height
+ \special{bmp:#1\space x=\strip@pt\Gin@req@width cm,
+ y=\strip@pt\Gin@req@height cm}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Ginclude@wmf#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexwin}%
+ \fi
+ \Gin@req@width.03515\Gin@req@width
+ \Gin@req@height.03515\Gin@req@height
+ \special{wmf:#1\space x=\strip@pt\Gin@req@width cm,
+ y=\strip@pt\Gin@req@height cm}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps,.wmf,.bmp}
+\@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
+\@namedef{Gin@rule@.wmf}#1{{wmf}{}{#1}}
+\@namedef{Gin@rule@.ps}#1{{ps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</pctexwin>
+% \end{macrocode}
+%
+% \section{pctexhp}
+% A \LaTeXe\ graphics driver file for Personal TeX's PTI Laser/HP;
+% from information supplied by Lance Carnes and Tao Wang
+% |<pti@crl.com>|.
+% \begin{macrocode}
+%<*pctexhp>
+% \end{macrocode}
+% \subsection{Graphic file inclusion}
+% \begin{macrocode}
+\def\Ginclude@pcl#1{%
+\message{<#1>}%
+ \ifGin@clip
+ \typeout{no clipping support in pctexhp}%
+ \fi
+ \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{pcl:#1}}}%
+ \typeout{WARNING: pctexhp does not permit graphics to be scaled}}
+\@namedef{Gin@rule@.pcl}#1{{pcl}{}{#1}}
+\def\Gin@extensions{.pcl}
+%</pctexhp>
+% \end{macrocode}
+%
+% \section{pubps}
+% A \LaTeXe\ graphics driver file for Arbortext's PUBps;
+% information from Peter R Wilson |pwilson@rdrc.rpi.edu|.
+% \begin{macrocode}
+%<*pubps>
+% \end{macrocode}
+% \subsection{Rotation}
+% \begin{macrocode}
+\def\Grot@start{\special{ps: gsave currentpoint
+ currentpoint translate \Grot@angle\space
+ rotate neg exch neg exch translate}}
+\def\Grot@end{\special{ps: currentpoint grestore moveto}}
+%</pubps>
+% \end{macrocode}
+%
+% \section{dviwin}
+% A \LaTeXe\ graphics driver file for Hippocrates Sendoukas' dviwin
+% \begin{macrocode}
+%<*dviwin>
+% \end{macrocode}
+% \subsection{Graphic file inclusion}
+% Dviwin sorts out the graphics type itself based on extension.
+% They all use the same |\special|, so as far as graphics.sty is
+% concerned they are all the same `type'. Use `bmp' for the type
+% as that is as good a name as any. Make this the default.
+% \begin{macrocode}
+\@namedef{Gin@rule@*}#1{{bmp}{}{#1}}
+\def\Ginclude@bmp#1{%
+ \raise\Gin@req@height\hbox{%
+ \special{anisoscale #1,
+ \the\Gin@req@width\space \the\Gin@req@height}}}
+% \end{macrocode}
+% The only exception is EPS files, as they may be read for BoundingBox
+% \begin{macrocode}
+\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+\let\Ginclude@eps\Ginclude@bmp
+% \end{macrocode}
+% Add a few default extensions so |\includegraphics{a}|
+% will pick up |a.eps| or |a.wmf|.
+% This list can be reset with |\DeclareGraphicsExtensions|.
+% Other extensions not in the list may be used explicitly, eg
+% |\includegraphics{a.gif}| should work as long as dviwin has access
+% to a gif filter. If |.gif| is added using |\DeclareGraphicsExtensions|
+% then |\includegraphics{a}| would also find |a.gif|.
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps,.wmf,.tif}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dviwin>
+% \end{macrocode}
+%
+% \section{ln}
+% A \LaTeXe\ graphics driver file for B Hamilton Kelly's ln03 driver.
+% Untested, but based on the graphics macros distributed with the
+% driver.
+% \begin{macrocode}
+%<*ln>
+% \end{macrocode}
+% \subsection{Graphic file inclusion}
+% \begin{macrocode}
+\def\Ginclude@sixel#1{\special{ln03:sixel #1}}
+%</ln>
+% \end{macrocode}
+%
+% \section{truetex}
+% A \LaTeXe\ graphics driver file for Kinch `truetex' driver.
+% \begin{macrocode}
+%<*truetex>
+% \end{macrocode}
+%
+% \subsection{Colour}
+% Uses the `color4' colour code.
+%
+% \subsection{Graphic file inclusion}
+%
+% EPS File inclusion: DVIPS style.
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile="#1"\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
+% \end{macrocode}
+%
+% bmp File Inclusion.
+% \begin{macrocode}
+\def\Ginclude@bmp#1{%
+ \message{<#1>}%
+ \special{bmpfile #1}}
+% \end{macrocode}
+%
+% tif(f) File inclusion
+% \begin{macrocode}
+\def\Ginclude@tiff#1{%
+ \message{<#1>}%
+ \special{tifffile #1}}
+% \end{macrocode}
+%
+% \subsection{Literal PostScript}
+% This is not supported, so uses `nops' code.
+%
+% \subsection{Default Rules}
+% Support (e)ps, tif and bmp, default to eps.
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps}
+\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+\@namedef{Gin@rule@.tif}#1{{tiff}{}{#1}}
+\@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</truetex>
+% \end{macrocode}
+%
+% \section{tcidvi}
+% A \LaTeXe\ graphics driver file for Scientific Word/Workplace.
+% Actually for the Kinch truetex driver, augmented with extra
+% |\special| handling with the DLL supplied with SW.
+% \begin{macrocode}
+%<*tcidvi>
+% \end{macrocode}
+%
+% \subsection{Colour}
+% Uses the `color4' colour code.
+%
+% The above colours are handled by the Kinch-supplied dll
+% The TCI dll adds support for |\colorbox|, but only grey scale
+% The code below accepts any color model, but only the red
+% component is used.
+% \begin{macrocode}
+\AtBeginDocument{\def\color@block#1#2#3{%
+ {\rlap{\ifcolors@
+ \@defaultunits\count@\current@color\@nnil
+ \dimen@\count@\p@
+ \divide\dimen@\@cclv
+ \dimen@ii#2%
+ \advance\dimen@ii#3%
+ \lower#3\hbox{%
+ \special{language "Scientific Word";%
+ type "greybox";%
+ greyscale \strip@pt\dimen@;%
+ height \the\dimen@ii;%
+ width \the#1;%
+ depth 0pt;}}%
+ \fi}}}}
+% \end{macrocode}
+%
+% \subsection{Graphic file inclusion}
+%
+% EPS File inclusion.
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \raise\Gin@req@height\hbox{%
+% \end{macrocode}
+%
+% If the bounding box has been changed by a trim or viewport
+% key then need to calculate the crop ratios based on the original
+% bb coordinates. (This assumes that clip key is also used).
+% \begin{macrocode}
+ \ifx\Gin@ollx\@undefined
+ \else
+ \@tempdimb \Gin@ourx bp%
+ \advance\@tempdimb-\Gin@ollx bp%
+ \@tempdima\Gin@llx bp%
+ \advance\@tempdima-\Gin@ollx bp%
+ \Gscale@div\TCI@cropleft\@tempdima\@tempdimb
+ \@tempdima\Gin@urx bp%
+ \advance\@tempdima-\Gin@ollx bp%
+ \Gscale@div\TCI@cropright\@tempdima\@tempdimb
+ \@tempdimb \Gin@oury bp%
+ \advance\@tempdimb-\Gin@olly bp%
+ \@tempdima\Gin@lly bp%
+ \advance\@tempdima-\Gin@olly bp%
+ \Gscale@div\TCI@cropbottom\@tempdima\@tempdimb
+ \@tempdima\Gin@ury bp%
+ \advance\@tempdima-\Gin@olly bp%
+ \Gscale@div\TCI@croptop\@tempdima\@tempdimb
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \special{%
+ language \TCI@language;%
+ type \TCI@type;%
+ valid_file \TCI@validfile;%
+ width \the\Gin@req@width;%
+ height \the\Gin@req@height;%
+ depth 0pt;%
+ original-width \the\Gin@nat@width;%
+ original-height \the\Gin@nat@height;%
+ cropleft "\TCI@cropleft";%
+ croptop "\TCI@croptop";%
+ cropright "\TCI@cropright";%
+ cropbottom "\TCI@cropbottom";%
+ filename '#1';%
+ \ifx\TCI@temp\@empty\else tempfilename \TCI@temp;\fi
+ }}}
+% \end{macrocode}
+%
+% Default values so documents produced elsewhere should work
+% \begin{macrocode}
+\def\TCI@language{"Scientific Word"}
+\def\TCI@type{"GRAPHIC"}
+\def\TCI@validfile{'F'}
+\def\TCI@cropleft{0}
+\def\TCI@croptop{1}
+\def\TCI@cropright{1}
+\def\TCI@cropbottom{0}
+\let\TCI@temp\@empty
+% \end{macrocode}
+%
+% Non PS Graphic files.
+%
+% File inclusion macro is always the same. Use a different name though
+% as LaTeX thinks it can read eps files for BoundingBox.
+% \begin{macrocode}
+\let\Ginclude@bmp\Ginclude@eps
+% \end{macrocode}
+%
+% \subsection{Literal PostScript}
+% This is not supported, so uses `nops' code.
+%
+% \subsection{Default Rules}
+% SW always gives the full name with extension.
+% So leave this list empty.
+% \begin{macrocode}
+\def\Gin@extensions{}
+% \end{macrocode}
+%
+% .ps .PS .eps .EPS are (E)PS
+% rest are `bmp' which is a catch all type for anything
+% that the import filter can handle.
+% \begin{macrocode}
+\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+\@namedef{Gin@rule@.PS}#1{{eps}{.PS}{#1}}
+\@namedef{Gin@rule@.EPS}#1{{eps}{.EPS}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@*}#1{{bmp}{\Gin@ext}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</tcidvi>
+% \end{macrocode}
+%
+% \section{Literal Postscript}
+% Most drivers writing to PostScript allow some form of `literal'
+% PostScript |\special| that inserts code into the final PostScript
+% output. However Non-PS drivers can not support this (and some PS
+% one's can't either). The code here makes all these commands no ops.
+% Individual driver sections may define the commands to do something
+% useful.
+%
+% \begin{macrocode}
+%<*nops>
+% \end{macrocode}
+%
+% Raw PostScript code, no save/restore. Coordinate system unspecified.
+% \begin{macrocode}
+\def\Gin@PS@raw#1{}
+% \end{macrocode}
+%
+% PostScript code, to be surrounded by save/restore by the driver.
+% Coordinate system standard PostScript, but with origin
+% at current (\TeX) position.
+% \begin{macrocode}
+\def\Gin@PS@restored#1{}
+% \end{macrocode}
+%
+% PostScript code to be inserted in the Header section of the final
+% PostScript. Must be issued on the first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@literal@header#1{}
+% \end{macrocode}
+%
+% Name of external file, the contents of which are to be inserted in
+% the Header section of the final PostScript. Must be issued on the
+% first page of a document.
+% \begin{macrocode}
+\def\Gin@PS@file@header#1{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</nops>
+% \end{macrocode}
+%
+% \section{Graphics Inclusion Rules}
+% \begin{macrocode}
+%<*psrules>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</psrules>
+%<*psrulesZ>
+% \end{macrocode}
+%
+% \changes{v3.0j}{2014/04/23}
+% {add .mps for metapost generated postscript to match pdftex graphics/4050}
+% \begin{macrocode}
+\def\Gin@extensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z,.mps}
+% \end{macrocode}
+%
+% \changes{v3.0k}{2015/12/30}
+% {compressed files don't require gunzip for dvips/xdvi}
+% \begin{macrocode}
+\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+\@namedef{Gin@rule@.mps}#1{{eps}{.mps}{#1}}
+\@namedef{Gin@rule@.pz}#1{{eps}{.bb}{#1}}
+\@namedef{Gin@rule@.eps.Z}#1{{eps}{.eps.bb}{#1}}
+\@namedef{Gin@rule@.ps.Z}#1{{eps}{.ps.bb}{#1}}
+\@namedef{Gin@rule@.ps.gz}#1{{eps}{.ps.bb}{#1}}
+\@namedef{Gin@rule@.eps.gz}#1{{eps}{.eps.bb}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</psrulesZ>
+%<*dosrules>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<!psrulesZ>\def\Gin@extensions{.eps,.ps,.pcx,.bmp}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@namedef{Gin@rule@.pcx}#1{{bmp}{}{#1}}
+\@namedef{Gin@rule@.bmp}#1{{bmp}{}{#1}}
+\@namedef{Gin@rule@.msp}#1{{bmp}{}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</dosrules>
+%<*macrules>
+%\def\Gin@extensions{{},.ps,.eps,.pict}
+%\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
+%\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
+\@namedef{Gin@rule@.pict}#1{{pict}{}{#1}}
+\@namedef{Gin@rule@.pntg}#1{{pntg}{}{#1}}
+%\@namedef{Gin@rule@}#1{{pict}{\relax}{#1}}
+%</macrules>
+%<*tiffrules>
+\@namedef{Gin@rule@.tif}#1{{tiff}{}{#1}}
+%</tiffrules>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/required/graphics/drivers.pdf b/macros/latex-dev/required/graphics/drivers.pdf
new file mode 100644
index 0000000000..ef6a372bf5
--- /dev/null
+++ b/macros/latex-dev/required/graphics/drivers.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/epsfig.dtx b/macros/latex-dev/required/graphics/epsfig.dtx
new file mode 100644
index 0000000000..ba37d771cc
--- /dev/null
+++ b/macros/latex-dev/required/graphics/epsfig.dtx
@@ -0,0 +1,142 @@
+%
+% \iffalse
+%
+%% epsfig.dtx Copyright (C) 1994-1996 1999 Sebastian Rahtz
+%% Copyright (C) 2000--2015,2017 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3 or, at your option, any later version.
+%%
+%<*dtx>
+ \ProvidesFile{epsfig.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+%<package>\ProvidesPackage{epsfig}
+%<driver> \ProvidesFile{epsfig.drv}
+% \fi
+% \ProvidesFile{epsfig.dtx}
+ [2017/06/25 v1.7b (e)psfig emulation (SPQR)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+ \DocInput{epsfig.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{epsfig.dtx}
+%
+% \title{The \textsf{epsfig} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{Sebastian Rahtz\\latex-team@latex-project.org}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+%
+% \StopEventually{}
+%
+% \section{Preface}
+% \begin{macrocode}
+%<*package>
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
+\ProcessOptions
+\RequirePackage{graphicx}
+% \end{macrocode}
+% \subsection{Emulation of `psfig' syntax}
+% Emulate "epsfig.sty", and most varieties of psfig
+% \begin{macro}{\psfig,\epsfig}
+% \begin{macrocode}
+\def\psfig#1{%
+ \let\Gin@ewidth\Gin@exclamation\let\Gin@eheight\Gin@ewidth
+ \def\Gin@req@sizes{%
+ \def\Gin@scalex{1}\let\Gin@scaley\Gin@exclamation
+ \Gin@req@height\Gin@nat@height
+ \Gin@req@width\Gin@nat@width}%
+ \begingroup
+ \let\Gfigname\relax
+ \@tempswafalse
+ \toks@{\Ginclude@graphics{\Gfigname}}%
+ \setkeys{Gin}{#1}%
+ \Gin@esetsize
+ \ifx\Gfigname\relax\ErrorNoFile\else
+ \the\toks@
+ \fi
+ \endgroup}
+\define@key{Gin}{figure}{\def\Gfigname{#1}}
+\define@key{Gin}{file}{\def\Gfigname{#1}}
+\define@key{Gin}{prolog}{\typeout{epsfig: header files are not needed}}
+\define@key{Gin}{silent}[]{}
+\def\psdraft{\Gin@drafttrue}
+\def\psfull{\Gin@draftfalse}
+\def\pssilent{\typeout{epsfig option `silent' ignored}}
+\def\psnoisy{\typeout{epsfig option `noisy' ignored}}
+\let\epsfig\psfig
+\def\psfigdriver#1{\makeatletter\input{#1.def}\makeatother}
+% \end{macrocode}
+% \end{macro}
+% \subsection{Emulation of `epsf' syntax}
+% Emulate Rokicki's "epsf.tex" supplied with the ever-popular dvips.
+% \begin{macro}{\epsfbox,\epsffile}
+% \begin{macrocode}
+\newdimen\epsfxsize
+\newdimen\epsfysize
+\epsfysize\z@
+\epsfxsize\z@
+\def\epsfsize#1#2{\epsfxsize}
+\def\epsfbox{%
+ \@ifnextchar[%
+ {\Gin@bboxtrue\epsf@bb@box}%
+ {\Gin@bboxfalse\epsf@box}%
+}
+\def\epsf@bb@box[#1#2]{%
+ \expandafter\Gread@parse@bb#1#2 \\
+ \epsf@box}
+\def\epsf@box#1{%
+ \bgroup
+ \def\Gin@req@sizes{%
+ \epsfxsize\epsfsize{\Gin@nat@width}{\Gin@nat@height}%
+ \ifdim\epsfxsize=\z@
+ \ifdim\epsfysize=\z@
+ \Gin@req@height\Gin@nat@height
+ \Gin@req@width\Gin@nat@width
+ \else
+ \let\Gin@scalex\Gin@exclamation
+ \Gin@req@height\epsfysize
+ \Gscale@div\Gin@scaley\Gin@req@height\Gin@nat@height
+ \Gin@req@width\Gin@scaley\Gin@nat@width
+ \fi
+ \else
+ \Gin@req@width\epsfxsize
+ \Gscale@div\Gin@scalex\Gin@req@width\Gin@nat@width
+ \ifdim\epsfysize=\z@
+ \let\Gin@scaley\Gin@exclamation
+ \Gin@req@height\Gin@scalex\Gin@nat@height
+ \else
+ \Gin@req@height\epsfysize
+ \Gscale@div\Gin@scaley\Gin@req@height\Gin@nat@height
+ \fi
+ \fi
+ }%
+ \Ginclude@graphics{#1}%
+ \egroup
+ \epsfysize\z@
+ \epsfxsize\z@
+}
+\let\epsffile\epsfbox
+\def\epsfclipon{\Gin@cliptrue}
+\def\epsfclipoff{\Gin@clipfalse}
+\def\epsfverbosetrue{\typeout{epsf verbose option ignored}}
+\def\epsfverbosefalse{\typeout{epsf verbose option ignored}}
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+
diff --git a/macros/latex-dev/required/graphics/epsfig.pdf b/macros/latex-dev/required/graphics/epsfig.pdf
new file mode 100644
index 0000000000..3aa7fcff62
--- /dev/null
+++ b/macros/latex-dev/required/graphics/epsfig.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/graphics-2017-06-25.sty b/macros/latex-dev/required/graphics/graphics-2017-06-25.sty
new file mode 100644
index 0000000000..361193cf32
--- /dev/null
+++ b/macros/latex-dev/required/graphics/graphics-2017-06-25.sty
@@ -0,0 +1,526 @@
+%%
+%% This is file `graphics.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% graphics.dtx (with options: `package')
+%%
+%% 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!)
+%%
+%%
+%% graphics.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
+%% Copyright (C) 1995--2017 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{graphics}
+ [2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)]
+\edef\Gin@codes{%
+ \catcode`\noexpand\^^A\the\catcode`\^^A\relax
+ \catcode`\noexpand\"\the\catcode`\"\relax
+ \catcode`\noexpand\*\the\catcode`\*\relax
+ \catcode`\noexpand\!\the\catcode`\!\relax
+ \catcode`\noexpand\:\the\catcode`\:\relax}
+\catcode`\^^A=\catcode`\%
+\@makeother\"%
+\catcode`\*=11
+\@makeother\!%
+\@makeother\:%
+\RequirePackage{trig}
+\providecommand\Grot@start{\@latex@error{Rotation not supported}\@ehc
+ \global\let\Grot@start\relax}
+\providecommand\Grot@end{}
+\providecommand\Gscale@start{\@latex@error{Scaling not supported}\@ehc
+ \global\let\Gscale@start\relax}
+\providecommand\Gscale@end{}
+\edef\Gread@BBox{\@percentchar\@percentchar BoundingBox}
+\DeclareOption{draft}{\Gin@drafttrue}
+\DeclareOption{final}{\Gin@draftfalse}
+\newif\ifGin@draft
+\DeclareOption{hiresbb}{%
+ \edef\Gread@BBox{\@percentchar\@percentchar HiResBoundingBox}}
+\DeclareOption{demo}{%
+ \AtBeginDocument{%
+ \def\Ginclude@graphics#1{%
+ \rule{\@ifundefined{Gin@@ewidth}{150pt}{\Gin@@ewidth}}%
+ {\@ifundefined{Gin@@eheight}{100pt}{\Gin@@eheight}}}}}
+\newif\ifGin@setpagesize\Gin@setpagesizetrue
+\DeclareOption{setpagesize}{\Gin@setpagesizetrue}
+\DeclareOption{nosetpagesize}{\Gin@setpagesizefalse}
+\providecommand\Gin@driver{}
+\DeclareOption{dvips}{\def\Gin@driver{dvips.def}}
+\DeclareOption{xdvi}{\ExecuteOptions{dvips}}
+\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
+\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfmx.def}}
+\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}}
+\DeclareOption{xetex}{\def\Gin@driver{xetex.def}}
+\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
+\DeclareOption{luatex}{\def\Gin@driver{luatex.def}}
+\DeclareOption{dvisvgm}{\def\Gin@driver{dvisvgm.def}}
+\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
+\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
+\DeclareOption{emtex}{\def\Gin@driver{emtex.def}}
+\DeclareOption{dviwin}{\def\Gin@driver{dviwin.def}}
+\DeclareOption{oztex}{\ExecuteOptions{dvips}}
+\DeclareOption{textures}{\def\Gin@driver{textures.def}}
+\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
+\DeclareOption{pctexwin}{\def\Gin@driver{pctexwin.def}}
+\DeclareOption{pctexhp}{\def\Gin@driver{pctexhp.def}}
+\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
+\DeclareOption{truetex}{\def\Gin@driver{truetex.def}}
+\DeclareOption{tcidvi}{\def\Gin@driver{tcidvi.def}}
+\DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
+\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
+\InputIfFileExists{graphics.cfg}{}{}
+\DeclareOption{hiderotate}{%
+ \def\Grot@start{\begingroup\setbox\z@\hbox\bgroup}
+ \def\Grot@end{\egroup\endgroup}}
+\DeclareOption{hidescale}{%
+ \def\Gscale@start{\begingroup\setbox\z@\hbox\bgroup}
+ \def\Gscale@end{\egroup\endgroup}}
+\ProcessOptions
+\if!\Gin@driver!
+ \PackageError{graphics}
+ {No driver specified}
+ {You should make a default driver option in a file \MessageBreak
+ graphics.cfg\MessageBreak
+ eg: \protect\ExecuteOptions{textures}%
+ }
+\else
+ \PackageInfo{graphics}{Driver file: \Gin@driver}
+ \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
+\fi
+\def\Gin@llx{0}
+\let\Gin@lly\Gin@llx
+\let\Gin@urx\Gin@llx
+\let\Gin@ury\Gin@llx
+\let\Gin@nat@width\leftmarginv
+\let\Gin@nat@height\leftmarginvi
+\newif\ifGin@clip
+\newcommand\DeclareGraphicsExtensions[1]{%
+ \edef\Gin@extensions{\zap@space#1 \@empty}}
+\providecommand\Gin@extensions{}
+\def\includegraphics{%
+ \leavevmode
+ \@ifstar
+ {\Gin@cliptrue\Gin@i}%
+ {\Gin@clipfalse\Gin@i}}
+\def\Gin@i{%
+ \@ifnextchar[%]
+ \Gin@ii
+ {\Gin@bboxfalse\Ginclude@graphics}}
+\def\Gin@ii[#1]{%
+ \@ifnextchar[%]
+ {\Gin@iii[#1]}
+ {\Gin@iii[0,0][#1]}}
+\def\Gin@iii[#1,#2][#3,#4]#5{%
+ \begingroup
+ \Gin@bboxtrue
+ \Gin@defaultbp\Gin@llx{#1}%
+ \Gin@defaultbp\Gin@lly{#2}%
+ \Gin@defaultbp\Gin@urx{#3}%
+ \Gin@defaultbp\Gin@ury{#4}%
+ \Ginclude@graphics{#5}%
+ \endgroup}
+\def\Gin@defaultbp#1#2{%
+ \afterassignment\Gin@def@bp\dimen@#2bp\relax{#1}{#2}}
+\def\Gin@def@bp#1\relax#2#3{%
+ \if!#1!%
+ \def#2{#3}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@}%
+ \fi}
+\def\DeclareGraphicsRule#1#2#3#4{%
+ \edef\@tempa{\string *}\def\@tempb{#3}%
+ \expandafter\edef\csname Gin@rule@#1\endcsname##1%
+ {{#2}%
+ {\ifx\@tempa\@tempb\noexpand\Gin@ext\else#3\fi}%
+ {\ifx\indent#4\indent##1\else#4\fi}}}
+\def\graphicspath#1{\def\Ginput@path{#1}}
+\ifx\Ginput@path\@undefined
+ \let\Ginput@path\input@path
+\fi
+\def\Gin@getbase#1{%
+ \edef\Gin@tempa{%
+ \def\noexpand\@tempa####1#1\space{%
+ \def\noexpand\Gin@base{####1}}}%
+ \IfFileExists{\filename@area\filename@base#1}%
+ {\Gin@tempa
+ \expandafter\@tempa\@filef@und
+ \edef\Gin@ext{#1}}{}}%
+\let\Gin@ext\relax
+\def\Gin@sepdefault{.}
+\def\Ginclude@graphics#1{%
+ \begingroup
+ \let\input@path\Ginput@path
+ \filename@parse{#1}%
+ \ifx\filename@ext\relax
+ \@for\Gin@temp:=\Gin@extensions\do{%
+ \ifx\Gin@ext\relax
+ \Gin@getbase\Gin@temp
+ \fi}%
+ \else
+ \Gin@getbase{\Gin@sepdefault\filename@ext}%
+ \ifx\Gin@ext\relax
+ \@warning{File `#1' not found}%
+ \def\Gin@base{\filename@area\filename@base}%
+ \edef\Gin@ext{\Gin@sepdefault\filename@ext}%
+ \fi
+ \fi
+ \ifx\Gin@ext\relax
+ \@latex@error{File `#1' not found}%
+ {I could not locate the file with any of these extensions:^^J%
+ \Gin@extensions^^J\@ehc}%
+ \else
+ \@ifundefined{Gin@rule@\Gin@ext}%
+ {\ifx\Gin@rule@*\@undefined
+ \@latex@error{Unknown graphics extension: \Gin@ext}\@ehc
+ \else
+ \expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}%
+ \fi}%
+ {\expandafter\expandafter\expandafter\Gin@setfile
+ \csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}}%
+ \fi
+ \endgroup}
+\newif\ifGread@\Gread@true
+\def\Gin@setfile#1#2#3{%
+ \ifx\\#2\\\Gread@false\fi
+ \ifGin@bbox\else
+ \ifGread@
+ \csname Gread@%
+ \expandafter\ifx\csname Gread@#1\endcsname\relax
+ eps%
+ \else
+ #1%
+ \fi
+ \endcsname{\Gin@base#2}%
+ \else
+ \Gin@nosize{#3}%
+ \fi
+ \fi
+ \Gin@viewport@code
+ \Gin@nat@height\Gin@ury bp%
+ \advance\Gin@nat@height-\Gin@lly bp%
+ \Gin@nat@width\Gin@urx bp%
+ \advance\Gin@nat@width-\Gin@llx bp%
+ \Gin@req@sizes
+ \expandafter\ifx\csname Ginclude@#1\endcsname\relax
+ \Gin@drafttrue
+ \expandafter\ifx\csname Gread@#1\endcsname\relax
+ \@latex@error{Can not include graphics of type: #1}\@ehc
+ \global\expandafter\let\csname Gread@#1\endcsname\@empty
+ \fi
+ \fi
+ \leavevmode
+ \ifGin@draft
+ \hb@xt@\Gin@req@width{%
+ \vrule\hss
+ \vbox to \Gin@req@height{%
+ \hrule \@width \Gin@req@width
+ \vss
+ \edef\@tempa{#3}%
+ \rlap{ \ttfamily\expandafter\strip@prefix\meaning\@tempa}%
+ \vss
+ \hrule}%
+ \hss\vrule}%
+ \else
+ \@addtofilelist{#3}%
+ \ProvidesFile{#3}[Graphic file (type #1)]%
+ \setbox\z@\hbox{\csname Ginclude@#1\endcsname{#3}}%
+ \dp\z@\z@
+ \ht\z@\Gin@req@height
+ \wd\z@\Gin@req@width
+ \box\z@
+ \fi}
+\let\Gin@decode\@empty
+\def\Gin@exclamation{!}
+\let\Gin@page\@empty
+\def\Gin@pagebox{cropbox}
+\newif\ifGin@interpolate
+\let\Gin@log\wlog
+\let\Gin@req@sizes\relax
+\def\Gin@scalex{1}%
+\let\Gin@scaley\Gin@exclamation
+\let\Gin@req@height\Gin@nat@height
+\let\Gin@req@width\Gin@nat@width
+\let\Gin@viewport@code\relax
+\def\Gin@nosize#1{%
+ \@latex@error
+ {Cannot determine size of graphic in #1 (no size specified)}%
+ \@ehc}
+\newif\ifGin@bbox
+\def\Gread@generic#1#2{%
+ \edef\Gread@attr@hash{%
+ \ifx\Gin@pagebox\@empty\else
+ :\Gin@pagebox
+ \fi
+ \ifx\Gin@page\@empty\else
+ :P\Gin@page
+ \fi
+ }%
+ \@ifundefined{#1 bbox\Gread@attr@hash}%
+ {\Gread@generic@aux{#1}{#2}}
+ {%
+ \expandafter\global\expandafter\let\expandafter\@gtempa
+ \csname #1 bbox\Gread@attr@hash\endcsname
+ }%
+ \expandafter\Gread@parse@bb\@gtempa\\%
+}
+\def\Gread@generic@aux#1#2{%
+ \begingroup
+ \@tempcnta\z@
+ \loop\ifnum\@tempcnta<\@xxxii
+ \catcode\@tempcnta14 %
+ \advance\@tempcnta\@ne
+ \repeat
+ \catcode`\^^?14 %
+ \let\do\@makeother
+ \dospecials
+ \catcode`\ 10 %
+ \catcode`\^^I10 %
+ \catcode\endlinechar5 %
+ \@makeother\:%
+ \@makeother\-%
+ \immediate\openin\@inputcheck"#1" %
+ #2{#1}%
+ \ifGin@bbox
+ \expandafter\xdef\csname #1 bbox\Gread@attr@hash\endcsname{\@gtempa}%
+ \else
+ \@latex@error
+ {Cannot determine size of graphic in #1 (no BoundingBox)}%
+ \@ehc
+ \gdef\@gtempa{0 0 72 72 }%
+ \fi
+ \endgroup
+}
+\def\Gread@eps#1{%
+ \Gread@generic{#1}\Gread@eps@aux
+}
+\def\Gread@eps@aux#1{%
+ \ifeof\@inputcheck
+ \@latex@error{File `#1' not found}\@ehc
+ \else
+ \Gread@true
+ \let\@tempb\Gread@false
+ \loop
+ \read\@inputcheck to\@tempa
+ \ifeof\@inputcheck
+ \Gread@false
+ \else
+ \expandafter\Gread@find@bb\@tempa:.\\%
+ \fi
+ \ifGread@
+ \repeat
+ \immediate\closein\@inputcheck
+ \fi
+}
+\long\def\Gread@find@bb#1:#2#3\\{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\Gread@BBox
+ \Gread@test@atend#2#3()\\%
+ \fi}
+\def\Gread@test@atend#1(#2)#3\\{%
+ \def\@tempa{#2}%
+ \ifx\@tempa\Gread@atend
+ \Gread@true
+ \let\@tempb\relax
+ \else
+ \gdef\@gtempa{#1}%
+ \@tempb
+ \Gin@bboxtrue
+ \fi}
+\def\Gread@parse@bb#1 #2 #3 #4 #5\\{%
+ \Gin@defaultbp\Gin@llx{#1}%
+ \Gin@defaultbp\Gin@lly{#2}%
+ \Gin@defaultbp\Gin@urx{#3}%
+ \Gin@defaultbp\Gin@ury{#4}}%
+\def\Gread@atend{atend}
+\let\Grot@height\@ovxx
+\let\Grot@left\@ovyy
+\let\Grot@right\@ovdx
+\let\Grot@depth\@ovdy
+\let\Grot@l\@ovro
+\let\Grot@r\@ovri
+\let\Grot@h\@xdim
+\let\Grot@d\@ydim
+\let\Grot@x\@linelen
+\let\Grot@y\@dashdim
+\long\def\rotatebox#1#2{%
+ \leavevmode
+ \Grot@setangle{#1}%
+ \setbox\z@\hbox{{#2}}%
+ \Grot@x\z@
+ \Grot@y\z@
+ \Grot@box}
+\def\Grot@setangle#1{\edef\Grot@angle{#1}}
+\def\Grot@Px#1#2#3{%
+ #1\Grot@cos#2%
+ \advance#1-\Grot@sin#3}
+\def\Grot@Py#1#2#3{%
+ #1\Grot@sin#2%
+ \advance#1\Grot@cos#3}
+\def\Grot@box{%
+ \begingroup
+ \CalculateSin\Grot@angle
+ \CalculateCos\Grot@angle
+ \edef\Grot@sin{\UseSin\Grot@angle}%
+ \edef\Grot@cos{\UseCos\Grot@angle}%
+^^A \GDebug{Rotate: angle \Grot@angle, sine is \Grot@sin,
+^^A cosine is \Grot@cos}%
+ \Grot@r\wd\z@ \advance\Grot@r-\Grot@x
+ \Grot@l\z@ \advance\Grot@l-\Grot@x
+ \Grot@h\ht\z@ \advance\Grot@h-\Grot@y
+ \Grot@d-\dp\z@ \advance\Grot@d-\Grot@y
+ \ifdim\Grot@sin\p@>\z@
+ \ifdim\Grot@cos\p@>\z@
+ \Grot@Py\Grot@height \Grot@r\Grot@h%B
+ \Grot@Px\Grot@right \Grot@r\Grot@d%E
+ \Grot@Px\Grot@left \Grot@l\Grot@h%C
+ \Grot@Py\Grot@depth \Grot@l\Grot@d%D
+ \else
+ \Grot@Py\Grot@height \Grot@r\Grot@d%E
+ \Grot@Px\Grot@right \Grot@l\Grot@d%D
+ \Grot@Px\Grot@left \Grot@r\Grot@h%B
+ \Grot@Py\Grot@depth \Grot@l\Grot@h%C
+ \fi
+ \else
+ \ifdim\Grot@cos\p@<\z@
+ \Grot@Py\Grot@height \Grot@l\Grot@d%D
+ \Grot@Px\Grot@right \Grot@l\Grot@h%C
+ \Grot@Px\Grot@left \Grot@r\Grot@d%E
+ \Grot@Py\Grot@depth \Grot@r\Grot@h%B
+ \else
+ \Grot@Py\Grot@height \Grot@l\Grot@h%C
+ \Grot@Px\Grot@right \Grot@r\Grot@h%B
+ \Grot@Px\Grot@left \Grot@l\Grot@d%D
+ \Grot@Py\Grot@depth \Grot@r\Grot@d%E
+ \fi
+ \fi
+ \advance\Grot@height\Grot@y
+ \advance\Grot@depth\Grot@y
+ \Grot@Px\dimen@ \Grot@x\Grot@y
+ \Grot@Py\dimen@ii \Grot@x\Grot@y
+ \dimen@-\dimen@ \advance\dimen@-\Grot@left
+ \dimen@ii-\dimen@ii \advance\dimen@ii\Grot@y
+^^A \GDebug{Rotate: (l,r,h,d)^^J%
+^^A Original \the\Grot@l,\the\Grot@r,\the\Grot@h,\the\Grot@d,^^J%
+^^A New..... \the\Grot@left,\the\Grot@right,%
+^^A \the\Grot@height,\the\Grot@depth}%
+ \setbox\z@\hbox{%
+ \kern\dimen@
+ \raise\dimen@ii\hbox{\Grot@start\box\z@\Grot@end}}%
+ \ht\z@\Grot@height
+ \dp\z@-\Grot@depth
+ \advance\Grot@right-\Grot@left\wd\z@\Grot@right
+ \leavevmode\box\z@
+ \endgroup}
+\def\scalebox#1{%
+ \@ifnextchar[{\Gscale@box{#1}}{\Gscale@box{#1}[#1]}}
+\long\def\Gscale@box#1[#2]#3{%
+ \leavevmode
+ \def\Gscale@x{#1}\def\Gscale@y{#2}%
+ \setbox\z@\hbox{{#3}}%
+ \setbox\tw@\hbox{\Gscale@start\rlap{\copy\z@}\Gscale@end}%
+ \ifdim#2\p@<\z@
+ \ht\tw@-#2\dp\z@
+ \dp\tw@-#2\ht\z@
+ \else
+ \ht\tw@#2\ht\z@
+ \dp\tw@#2\dp\z@
+ \fi
+ \ifdim#1\p@<\z@
+ \hb@xt@-#1\wd\z@{\kern-#1\wd\z@\box\tw@\hss}%
+ \else
+ \hb@xt@#1\wd\z@{\box\tw@\kern#1\wd\z@\hss}%
+ \fi}
+\def\reflectbox{\Gscale@box-1[1]}
+\def\resizebox{%
+ \leavevmode
+ \@ifstar{\Gscale@@box\totalheight}{\Gscale@@box\height}}
+\def\Gscale@@box#1#2#3{%
+ \let\@tempa\Gin@exclamation
+ \expandafter\def\expandafter\@tempb\expandafter{\string#2}%
+ \expandafter\def\expandafter\@tempc\expandafter{\string#3}%
+ \ifx\@tempb\@tempa
+ \ifx\@tempc\@tempa
+ \toks@{\mbox}%
+ \else
+ \toks@{\Gscale@box@dd{#3}#1}%
+ \fi
+ \else
+ \ifx\@tempc\@tempa
+ \toks@{\Gscale@box@dd{#2}\width}%
+ \else
+ \toks@{\Gscale@box@dddd{#2}\width{#3}#1}%
+ \fi
+ \fi
+ \the\toks@}
+\long\def\Gscale@box@dd#1#2#3{%
+ \@begin@tempboxa\hbox{#3}%
+ \setlength\@tempdima{#1}%
+ \setlength\@tempdimb{#2}%
+ \Gscale@div\@tempa\@tempdima\@tempdimb
+ \Gscale@box\@tempa[\@tempa]{\box\@tempboxa}%
+ \@end@tempboxa}
+\long\def\Gscale@box@dddd#1#2#3#4#5{%
+ \@begin@tempboxa\hbox{#5}%
+ \setlength\@tempdima{#1}%
+ \setlength\@tempdimb{#2}%
+ \Gscale@div\@tempa\@tempdima\@tempdimb
+ \setlength\@tempdima{#3}%
+ \setlength\@tempdimb{#4}%
+ \Gscale@div\@tempb\@tempdima\@tempdimb
+ \ifGin@iso
+ \ifdim\@tempa\p@>\@tempb\p@
+ \let\@tempa\@tempb
+ \else
+ \let\@tempb\@tempa
+ \fi
+ \fi
+ \Gscale@box\@tempa[\@tempb]{\box\@tempboxa}%
+ \@end@tempboxa}
+\newif\ifGin@iso
+\def\Gscale@div#1#2#3{%
+ \setlength\dimen@{#3}%
+ \ifdim\dimen@=\z@
+ \PackageError{graphics}{Division by 0}\@eha
+ \dimen@#2%
+ \fi
+ \edef\@tempd{\the\dimen@}%
+ \setlength\dimen@{#2}%
+ \count@65536\relax
+ \ifdim\dimen@<\z@
+ \dimen@-\dimen@
+ \count@-\count@
+ \fi
+ \ifdim\dimen@>\z@
+ \loop
+ \ifdim\ifnum\count@<\tw@\maxdimen\else\dimen@\fi<8192\p@
+ \dimen@\tw@\dimen@
+ \divide\count@\tw@
+ \repeat
+ \dimen@ii\@tempd\relax
+ \divide\dimen@ii\count@
+ \divide\dimen@\dimen@ii
+ \fi
+ \edef#1{\strip@pt\dimen@}}
+\Gin@codes
+\let\Gin@codes\relax
+% alow use of current .def files
+\def\quote@name#1{"\quote@@name#1\@gobble""}
+\def\quote@@name#1"{#1\quote@@name}
+\def\unquote@name#1{\quote@@name#1\@gobble"}
+%
+\endinput
+%%
+%% End of file `graphics.sty'.
diff --git a/macros/latex-dev/required/graphics/graphics-drivers.ins b/macros/latex-dev/required/graphics/graphics-drivers.ins
new file mode 100644
index 0000000000..dda92883ae
--- /dev/null
+++ b/macros/latex-dev/required/graphics/graphics-drivers.ins
@@ -0,0 +1,92 @@
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%% This file has the LPPL maintenance status "maintained".
+
+\input docstrip
+
+
+\preamble
+\endpreamble
+
+\keepsilent
+\askforoverwritefalse
+
+%% Generate a `template' .def file as an example for a new driver.
+%% (This is not set up yet.)
+%%\generate{\file{template.def}{%
+%% \from{drivers.dtx}{template}}}
+
+% These ones probably work
+\generate{%
+% dvips.def moved to graphics-def distribution
+% \file{dvips.def}{%
+% \from{drivers.dtx}{dvips,color1,psrulesZ,dosrules,macrules}}
+ \file{dvipdf.def}{%
+ \from{drivers.dtx}{dvipdf,color1,psrulesZ}}
+ \file{dvipsone.def}{%
+ \from{drivers.dtx}{tiffrules,dvipsone,color1,dosrules,psrules}}
+ \file{dviwin.def}{%
+ \from{drivers.dtx}{dviwin,nops}}
+ \file{emtex.def}{%
+ \from{drivers.dtx}{emtex,dosrules,nops}}
+% OzTeX (>3.0) uses dvips.def
+% \file{oztex.def}{%
+% \from{drivers.dtx}{oztex,macrules,nops}}
+ \file{pctexps.def}{%
+ \from{drivers.dtx}{pctexps,color3,colorfix}}
+ \file{pctex32.def}{%
+ \from{drivers.dtx}{pctex32,color1}}
+ \file{pctexhp.def}{%
+ \from{drivers.dtx}{pctexhp,nops}}
+ \file{pctexwin.def}{%
+ \from{drivers.dtx}{pctexwin,nops}}
+ \file{truetex.def}{%
+ \from{drivers.dtx}{truetex,color4,nops}}
+ \file{tcidvi.def}{%
+ \from{drivers.dtx}{tcidvi,color4,nops}}
+ \file{dvipsnam.def}{%
+ \from{drivers.dtx}{dvipsnames}}}
+
+
+% these ones are largely untested and no longer generated by default.
+%\generate{%
+% \file{pubps.def}{%
+% \from{drivers.dtx}{pubps,psrules}}
+% \file{psprint.def}{%
+% \from{drivers.dtx}{psprint,psrules}}
+%% The textures code generated by this option does more or less work
+%% I believe, but it does not use all of textures features, and as I
+%% have not got a Mac to test it on, it seems better to remove it for
+%% now.
+%% This release of the graphics distribution contains a textures.def
+%% written by Arthur Ogawa which is distributed as a separate file.
+%% It should however be installed in the same directory as the .def
+%% files generated by this .ins installation script.
+%% \file{textures.def}{%
+%% \from{drivers.dtx}{textures,color2,macrules}}
+%%
+%%%% Old versions of textures (prior to 1.7) do not have colour specials.
+%%%% To use colour with these versions, uncomment the next two lines.
+%%
+%%%% \file{textures.def}{%
+%%%% \from{drivers.dtx}{textures,color3,colorfix,macrules}}
+%%
+%%
+% \file{ln.def}{%
+% \from{drivers.dtx}{ln}}
+% \file{dvi2ps.def}{%
+% \from{drivers.dtx}{dvi2ps,psrules}}
+% \file{dvitops.def}{%
+% \from{drivers.dtx}{dvitops,psrules}}
+% \file{dvilaser.def}{%
+% \from{drivers.dtx}{dvilaser,psrules}}
+% \file{dvialw.def}{%
+% \from{drivers.dtx}{dvialw,psrules}}}
+%
+%
+%
+\endbatchfile
diff --git a/macros/latex-dev/required/graphics/graphics.dtx b/macros/latex-dev/required/graphics/graphics.dtx
new file mode 100644
index 0000000000..f2471e94bb
--- /dev/null
+++ b/macros/latex-dev/required/graphics/graphics.dtx
@@ -0,0 +1,1992 @@
+%
+% \iffalse
+%
+%% graphics.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
+%% Copyright (C) 1995-2019 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%<*dtx>
+ \ProvidesFile{graphics.dtx}
+%</dtx>
+%<+package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+%<+package>\providecommand\DeclareRelease[3]{}
+%<+package>\providecommand\DeclareCurrentRelease[2]{}
+%<+package>
+%<+package>\DeclareRelease{}{2017-06-25}{graphics-2017-06-25.sty}
+%<+package>\DeclareCurrentRelease{}{2019-10-01}
+%<+package>
+%<+package>\ProvidesPackage{graphics}
+%<driver> \ProvidesFile{graphics.drv}
+% \fi
+% \ProvidesFile{graphics.dtx}
+ [2019/07/20 v1.3b Standard LaTeX Graphics (DPC,SPQR)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\newenvironment{option}[1]{\expandafter\macro\expandafter{%
+ \csname ds@#1\endcsname}}{\endmacro}
+\begin{document}
+ \DocInput{graphics.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{graphics.dtx}
+%
+% \title{The \textsf{graphics} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{D. P. Carlisle\and S. P. Q. Rahtz}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+%
+% \changes{v0.3a}{1994/02/24}
+% {First DPC version (after prototype by SPQR).}
+% \changes{v0.4e}{1994/05/30}
+% {Rename egraphics to graphicx}
+% \changes{v1.0}{1996/05/29}
+% {Version 1 at last}
+%
+%
+% \def\star{{\ttfamily*}}
+% \makeatletter
+% \def\Describe@Macro#1{\endgroup
+% \setbox0=\lastbox\llap{\PrintDescribeMacro{#1}}}%
+% \makeatother
+% \marginparsep0pt
+%
+% \section{Introduction}
+%
+% This package implements various `graphics' functions. The main
+% features are a) inclusion of `graphics' files. b) Rotation of sections
+% of the page, c) Scaling of sections of the page.
+%
+% The design is split into three `levels'.
+% \begin{itemize}
+% \item The user interface. This is the collection of commands designed
+% to appear in a document text. Actually two separate user interface
+% have been implemented. The `standard' interface, described here, and a
+% more powerful, and more `user-friendly' interface provided by the
+% |graphicx| package.
+% \item The core functions. These functions, which are also implemented
+% in this file do all the `main work'. The `user-interface functions
+% just collect together the information from any optional-arguments or
+% star-forms, and then call one of these functions.
+% \item The driver files. It is not possible to achieve the
+% functionality of this package just using \TeX. The |dvi| driver used
+% must be given additional instructions. (Using the |\special| command
+% of \TeX.) Unfortunately, the capabilities of various drivers differ,
+% and the syntax required to pass instructions to the drivers is also
+% not standardised. So the `core functions' never access |\special|
+% directly, but rather call a series of commands that must be defined in
+% a special file customised for each driver. The accompanying file,
+% |drivers.dtx| has suitable files for a range of popular drivers.
+% \end{itemize}
+%
+% \section{Package Options}
+% Most of the options, such as |dvips|, |textures| etc., specify the
+% driver that is to be used to print the document. You may wish to set
+% up a configuration file so that this option always takes effect, even
+% if not specified in the document. To do this, produce a file
+% |graphics.cfg| containing the line:\\
+% |\ExecuteOptions{dvips}|\\
+% (or whichever other driver you wish.)
+%
+% Apart from the driver options there are a few other options to control
+% the behaviour of the package.
+% \begin{description}
+% \item[draft]
+% Do not include graphics files, but instead print a box of the size
+% the graphic would take up, and the file name. This greatly speeds up
+% previewing on most systems.
+% \item[final]
+% Turns off the |draft| option.
+% \item[debugshow]
+% Show a lot of tracing information on the terminal. If you are not me
+% you probably do not want to use this option.
+% \item[hiderotate]
+% Do not show rotated text. Sometimes useful if your previewer can not
+% rotate text.
+% \item[hidescale]
+% Do not show scaled text.
+% \item[hiresbb]
+% Look for Bounding Box lines of the form |%%HiResBoundingBox| instead
+% of the standard |%%BoundingBox|. These are used by some applications
+% to get round the restriction that BoundingBox comments should only
+% have integer values.
+% \item[setpagesize, nosetpagesize]
+% The |setpagesize| option requests that the driver option sets the page size.
+% (Whichever option is used, the page size is not set by this package if |\mag|
+% has been changed from its default value.)
+% \item[demo] Instead of including a graphics file, make
+% |\includegraphics| insert a black rectangle of size 150\,pt by
+% 100\,pt unless either dimension was already specified by another
+% option.
+% \end{description}
+%
+% \section{Standard Interface}
+%
+% \subsection{Graphics Inclusion}
+%
+% \DescribeMacro
+% \includegraphics\star\oarg{llx,lly}\oarg{urx,ury}\marg{file}\\
+% Include a graphics file.
+%
+% If \star\ is present, then the graphic is `clipped' to the size
+% specified. If \star\ is omitted, then any part of the graphic that is
+% outside the specified `bounding box' will over-print the surrounding
+% text.
+%
+% If the optional arguments are omitted, then the size of the graphic
+% will be determined by reading an external file as described below.
+% If \oarg{urx,ury} is present, then it should specify the coordinates
+% of the top right corner of the image, as a pair of \TeX\ dimensions.
+% If the units are omitted they default to |bp|. So |[1in,1in]| and
+% |[72,72]| are equivalent. If only one optional argument appears, the
+% lower left corner of the image is assumed to be at |[0,0]|. Otherwise
+% \oarg{llx,lly} may be used to specify the coordinates of this point.
+%
+% \DescribeMacro
+% \graphicspath\marg{dir-list}\\
+% This optional declaration may be used to specify a list of directories
+% in which to search for graphics files. The format is as for the
+% \LaTeXe\ primitive |\input@path|, a list of directories, each in a
+% |{}| group (even if there is only one in the list). For example:
+% |\graphicspath{{eps/}{tiff/}}|
+% would cause the system to look in the subdirectories |eps| and |tiff|
+% of the current directory. The default setting of this path is
+% |\input@path| that is: graphics files will be found wherever \TeX\
+% files are found.
+%
+% \DescribeMacro
+% \DeclareGraphicsExtensions\marg{ext-list}\\
+% This specifies the behaviour of the system when the filename argument to
+% |\includegraphics| does not have an extension specified.
+% Here \marg{ext-list} should be a comma-separated list of file
+% extensions, each with a leading period (\texttt{.}).
+% A file name is produced by appending \emph{sep} and one extension.
+% If a file is found, the system acts as if that extension had been
+% specified. If not, the next extension in \emph{ext-list} is tried.
+% \changes{v1.0m}{2001/06/07}{Extended documentation (CAR) graphics/3228}
+%
+% Each use of |\DeclareGraphicsExtensions| overwrites all previous
+% definitions. It is not possible to add an extension to an
+% existing list.
+%
+% Early versions of this package defined a default argument for this
+% command. This has been removed.
+%
+% \DescribeMacro
+% \DeclareGraphicsRule
+% \marg{ext}\marg{type}\marg{read-file}\marg{command}\\
+% Any number of these declarations can be made. They determine how the
+% system behaves when a file with extension \emph{ext} is specified.
+% (The extension may be specified explicitly or, if the argument to
+% |\includegraphics| does not have an extension, it may be a default
+% extension from the \emph{ext-list} specified with
+% |\DeclareGraphicsExtensions|.)
+%
+% \emph{ext} is the \emph{extension} of the file. Any file with this
+% extension will be processed by this graphics rule. Normally a file
+% with an extension for which no rule has been declared will generate an
+% error, however you may use |*| as the extension to define a
+% \emph{default rule}. For instance the |dvips| driver file declares all
+% files to be of type |eps| unless a more specific rule is declared.
+%
+% Since Version v0.6, extensions should be specified including the |.|
+% that is, |.eps| not |eps|.
+%
+% \emph{type} is the `type' of file involved. All files of the same type
+% will be input with the same internal command (which must be defined in
+% a `driver file'). For example files with extensions |ps|, |eps|,
+% |ps.gz| may all be classed as type |eps|.
+%
+% \emph{read-file} determines the extension of the file that should be
+% read to determine size information. It may be the same as \emph{ext}
+% but it may be different, for example |.ps.gz| files are not readable
+% easily by \TeX, so you may want to put the bounding box information in
+% a separate file with extension |.ps.bb|. If \emph{read-file} is empty,
+% |{}|, then the system will not try to locate an external file for size
+% info, and the size must be specified in the arguments of
+% |\includegraphics|. As a special case |*| may be used to denote the
+% same extension as the graphic file. This is mainly of use in
+% conjunction with using |*| as the extension, as in that case the
+% particular graphic extension is not known. For example
+%\begin{verbatim}
+% \DeclareGraphicsRule{*}{eps}{*}{}
+%\end{verbatim}
+% This would declare a default rule, such that all unknown extensions
+% would be treated as EPS files, and the graphic file would be read for
+% a BoundingBox comment.
+%
+% If the driver file specifies a procedure for
+% reading size files for \emph{type}, that will be used, otherwise the
+% procedure for reading |eps| files will be used. Thus the size of
+% bitmap files may be specified in a file with a PostScript style
+% |%%BoundingBox| line, if no other specific format is available.
+%
+% \emph{command} is usually empty, but if non empty it is used in place
+% of the filename in the |\special|. Within this argument, |#1| may be
+% used to denote the filename. Thus using the dvips driver, one may
+% use\\
+% |\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{`zcat #1}|\\
+% the final argument causes dvips to use the |zcat| command to unzip the
+% file before inserting it into the PostScript output.
+%
+% \subsection{Rotation}
+%
+% \DescribeMacro
+% \rotatebox\marg{angle}\marg{text}\\
+% Rotate \emph{text} \emph{angle} degrees anti-clockwise. Normally
+% the rotation is about the left-hand end of the baseline of
+% \emph{text}.
+%
+% \subsection{Scaling}
+%
+% \DescribeMacro
+% \scalebox\marg{h-scale}\oarg{v-scale}\marg{text}\\
+% Scale \emph{text} by the specified amounts. If \emph{v-scale} is
+% omitted, the vertical scale factor is the same as the horizontal one.
+%
+% \DescribeMacro
+% \resizebox\star\marg{h-length}\marg{v-length}\marg{text}\\
+% Scale \emph{text} so that the width is \emph{h-length}.
+% If |!| is used as either length argument, the other argument is used
+% to determine a scale factor that is used in both directions.
+% Normally \emph{v-length} refers to the height of the box, but in the
+% star form, it refers to the `height + depth'.
+% As normal for \LaTeXe\ box length arguments, |\height|,
+% |\width|, |\totalheight| and |\depth| may be used to refer to the
+% original size of the box.
+%
+% \section{The Key=Value Interface}
+% As mentioned in the introduction, apart from the above `standard
+% interface', there is an alternative syntax to the |\includegraphics|
+% and |\rotatebox| commands that some people may prefer. It is provided
+% by the accompanying |graphicx| package.
+%
+% \StopEventually{}
+%
+% \section{The Graphics Kernel Functions}
+%
+% \subsection{Graphics Inclusion}
+%
+% \DescribeMacro
+% {\Ginclude@graphics}\marg{file}\\
+% Insert the contents of the file \emph{file} at the current point.
+% |\Ginclude@graphics| may use the four macros |\Gin@llx|, |\Gin@lly|,
+% |\Gin@urx|, |\Gin@ury| to determine the `bounding box' of the graphic.
+% The result will be a \TeX\ box of width $\mathit{urx}-\mathit{llx}$
+% and height $\mathit{ury}-\mathit{lly}$. If |\Gin@clip| is \meta{true}
+% then part of the graphic that is outside this box should not be
+% displayed. (Not all drivers can support this `clipping'.) Normally all
+% these parameters are set by the `user interface level'.
+%
+%
+% \DescribeMacro
+% {\Gread@eps}\marg{file}\\
+% For each \emph{type} of graphics file supported, the driver file must
+% define |\Ginclude@|\emph{type} and, optionally |\Gread@|\emph{type}.
+% The read command is responsible for obtaining size information from
+% the file specified in the |\DeclareGraphicsRule| command. However the
+% kernel defines a function, |\Gread@eps|, which can read PostScript
+% files to find the
+% |%%BoundingBox| comment. This function will be used for any type for
+% which a specific function has not been declared. |\Gread@eps| accepts
+% a generalised version of the bounding box comment. \TeX\ units may be
+% used (but there must be no space before the unit). If the unit is
+% omitted |bp| is assumed. So\\
+% |%%BoundingBox 0 0 2in 3in|\\
+% Would be accepted by this function, to produce a 2in wide, by 3in high
+% graphic.
+%
+% \subsection{Rotation}
+%
+% \DescribeMacro
+% {\Grot@box}\\
+% Rotate the contents of |\box0| through |\Grot@angle| degrees
+% (anti-clockwise). The user-interface is responsible for setting the
+% macro |\Grot@angle|, and putting the appropriate text in |\Grot@box|.
+%
+% \subsection{Scaling}
+%
+% \DescribeMacro
+% {\Gscale@box}\marg{xscale}\oarg{yscale}\marg{text}\\
+% (The second argument is not optional.)
+% Scale \emph{text} by the appropriate scale factors.
+%
+% \DescribeMacro
+% {\Gscale@box@dd}\marg{dima}\marg{dimb}\marg{text}\\
+% Scale \emph{text} in both directions by a factor
+% \emph{dima}/\emph{dimb}.
+%
+% \DescribeMacro
+% {\Gscale@box@dddd}
+% \marg{dima}\marg{dimb}\marg{dimc}\marg{dimd}\marg{text}\\
+% Scale \emph{text} in horizontally by a factor \emph{dima}/\emph{dimb},
+% and vertically by a factor of \emph{dimc}/\emph{dimd}.
+%
+% \DescribeMacro
+% {\Gscale@div}\marg{cmd}\marg{dima}\marg{dimb}\\
+% Define the macro \emph{cmd} to be the ratio of the lengths
+% \emph{dima}/\emph{dimb}.
+%
+%
+% \section{Interface to the Driver Files}
+%
+% \subsection{Graphics Inclusion}
+%
+% Each driver file must declare that its driver can include graphics of
+% certain \emph{types}. It does this by declaring for each type a
+% command of the form:\\
+% |\Ginclude@|\emph{type}\\
+% The Graphics kernel function will call this driver-defined function
+% with the filename as argument, and certain additional information will
+% be provided as follows.:
+%
+% \noindent\begin{tabular}{p{.4\textwidth}p{.5\textwidth}}
+% |\Gin@llx|, |\Gin@lly|,\newline
+% |\Gin@urx|, |\Gin@ury| &Macros storing the `bounding box'\\
+% |\Gin@nat@width|\newline |\Gin@nat@height| &
+% Registers storing the natural size.\\
+% |\Gin@req@width|\newline |\Gin@req@height| &
+% Registers storing the required size, after scaling.\\
+% |\Gin@scalex|, |\Gin@scaley| & macros with the scale factors. A value
+% of |!| means: Scale by the same amount as the other direction.\\
+% |\ifGin@clip| & |\newif| token, true if the graphic should be
+% `clipped' to the bounding box.
+% \end{tabular}
+%
+% Optionally the driver may define a command of the form:\\
+% |\Gread@|\emph{type}\\
+% This is responsible for reading an external file to find the bounding
+% box information. If such a command is not declared, but a read-file is
+% specified the command |\Gread@eps|, which is defined in the Graphics
+% Kernel will be used.
+%
+% \subsection{Literal Postscript}
+% Drivers that are producing PostScript output may want to define
+% the following macros. They each take one argument which should be
+% passed to an appropriate special. They are not used directly by this
+% package but allow other packages to use the standard configuration
+% file and package options to customise to various drivers:\\
+% |\Gin@PS@raw|, Literal PostScript special.\\
+% |\Gin@PS@restored|, Literal PostScript special, the driver will
+% surround this with a save-restore pair.\\
+% |\Gin@PS@literal@header|, Postscript to be inserted in the header
+% section of the PostScript file.\\
+% |\Gin@PS@file@header|, external file to be inserted in the header
+% section of the PostScript file.
+%
+%
+% \subsection{Rotation}
+%
+% |\Grot@start|, |\Grot@end| These macros must be defined to insert the
+% appropriate |\special| to rotate the text between them by
+% |\Grot@angle| degrees. The kernel function will make sure that the
+% correct \TeX\ spacing is produced, these functions only need insert
+% the |\special|.
+%
+% \subsection{Scaling}
+%
+% |\Gscale@start|, |\Gscale@end|, as for rotation, but here scale the
+% text by |\Gscale@x| and |\Gscale@y|.
+%
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \subsection{Initialisation}
+%
+% \begin{macro}{\Gin@codes}
+% First we save the catcodes of some characters, and set them to
+% fixed values whilst this file is being read.
+% \changes{v0.5a}{1994/07/20}
+% {Save and restore catcodes}
+% \begin{macrocode}
+\edef\Gin@codes{%
+ \catcode`\noexpand\^^A\the\catcode`\^^A\relax
+ \catcode`\noexpand\"\the\catcode`\"\relax
+ \catcode`\noexpand\*\the\catcode`\*\relax
+ \catcode`\noexpand\!\the\catcode`\!\relax
+ \catcode`\noexpand\:\the\catcode`\:\relax}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\catcode`\^^A=\catcode`\%
+\@makeother\"%
+\catcode`\*=11
+\@makeother\!%
+\@makeother\:%
+% \end{macrocode}
+% \end{macro}
+%
+% We will need to have an implementation of the trigonometric
+% functions for the rotation feature. May as well load it now.
+% \begin{macrocode}
+\RequirePackage{trig}
+% \end{macrocode}
+%
+% \begin{macro}{\Grot@start}
+% \begin{macro}{\Grot@end}
+% Initialise the rotation primitives.
+% \begin{macrocode}
+\providecommand\Grot@start{\@latex@error{Rotation not supported}\@ehc
+ \global\let\Grot@start\relax}
+\providecommand\Grot@end{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gscale@start}
+% \begin{macro}{\Gscale@end}
+% Initialise the scaling primitives.
+% \begin{macrocode}
+\providecommand\Gscale@start{\@latex@error{Scaling not supported}\@ehc
+ \global\let\Gscale@start\relax}
+\providecommand\Gscale@end{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gread@BBox}
+% \changes{v1.0b}{1996/10/29}
+% {Moved to initial section, for hiresbb option}
+% |%%BoundingBox| as a macro for testing with |\ifx|.
+% This may be redefined by the hiresbb option.
+% \begin{macrocode}
+\edef\Gread@BBox{\@percentchar\@percentchar BoundingBox}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Options}
+%
+% \begin{option}{draft}
+% \begin{option}{final}
+% \changes{v0.3i}{1994/03/23}
+% {notdraft option added}
+% \changes{v0.4a}{1994/04/13}
+% {Rename option to nodraft}
+% \changes{v0.4d}{1994/05/06}
+% {Rename option to final}
+% \begin{macrocode}
+\DeclareOption{draft}{\Gin@drafttrue}
+\DeclareOption{final}{\Gin@draftfalse}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{macro}{\ifGin@draft}
+% True in draft mode.
+% \begin{macrocode}
+\newif\ifGin@draft
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{option}{hiresbb}
+% \changes{v1.0b}{1996/10/29}
+% {hiresbb option added}
+% If given this option the package will look for bounding box comments
+% of the form |%%HiResBoundingBox| (which typically have real values)
+% instead of the standard |%%BoundingBox| (which should have integer
+% values).
+% \begin{macrocode}
+\DeclareOption{hiresbb}{%
+ \edef\Gread@BBox{\@percentchar\@percentchar HiResBoundingBox}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{demo}
+% \changes{v1.0o}{2006/02/20}{demo option added}
+% If given this option the package will disregard the actual
+% graphics file and insert a black box unless width or height are
+% already specified.
+% \begin{macrocode}
+\DeclareOption{demo}{%
+ \AtBeginDocument{%
+ \def\Ginclude@graphics#1{%
+ \rule{\@ifundefined{Gin@@ewidth}{150pt}{\Gin@@ewidth}}%
+ {\@ifundefined{Gin@@eheight}{100pt}{\Gin@@eheight}}}}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{setpagesize}
+% \begin{option}{nosetpagesize}
+% The |setpagesize| option requests that the driver option sets the page size.
+% (Whichever option is used, the page size is not set by this package if |\mag|
+% has been changed from its default value.)
+% \changes{v1.0s}{2016/06/02}
+% {(no)setpagesize options added}
+% \begin{macrocode}
+\newif\ifGin@setpagesize\Gin@setpagesizetrue
+\DeclareOption{setpagesize}{\Gin@setpagesizetrue}
+\DeclareOption{nosetpagesize}{\Gin@setpagesizefalse}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{macro}{\Gin@driver}
+% Driver in use.
+% \begin{macrocode}
+\providecommand\Gin@driver{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{option}{dvips}
+% \changes{v0.3g}{1994/03/15}
+% {Use dvips def file not development version}
+% \begin{option}{xdvi}
+% Tomas Rockicki's PostScript driver (unix, MSDOS, VMS\ldots).
+% The |X11| previewer |xdvi| supports basically the same set of
+% |\specials|.
+% \begin{macrocode}
+\DeclareOption{dvips}{\def\Gin@driver{dvips.def}}
+\DeclareOption{xdvi}{\ExecuteOptions{dvips}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{dvipdf}
+% \changes{v1.0c}{1996/10/31}
+% {dvipdf added}
+% Sergey Lesenko's dvipdf driver.
+% \begin{macrocode}
+\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvipdfm}
+% \changes{v1.0k}{1999/01/13}
+% {dvipdfm added}
+% \changes{v1.2a}{2017/06/01}
+% {make dvipdfm an alias for dvipdfmx}
+% Mark Wick's dvipdfm driver (now merged with xdvipdfmx).
+% \begin{macrocode}
+\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfmx.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvipdfmx}
+% \changes{v1.0m}{2005/11/14}
+% {dvipdfmx added}
+% The driver for the dvipdfmx project (also supports xdvipdfmx).
+% \begin{macrocode}
+\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{xetex}
+% \changes{v1.0m}{2005/11/14}
+% {xetex added}
+% Jonathan Kew's \TeX\ variant.
+% \begin{macrocode}
+\DeclareOption{xetex}{\def\Gin@driver{xetex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{pdftex}
+% \changes{v1.0d}{1997/06/07}
+% {pdftex added}
+% Han The Thanh's \TeX\ variant.
+% \begin{macrocode}
+\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{luatex}
+% \changes{v1.0q}{2016/01/03}
+% {luatex added}
+% Lua\TeX\ \TeX\ variant.
+% \begin{macrocode}
+\DeclareOption{luatex}{\def\Gin@driver{luatex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{luatex}
+% \changes{v1.0r}{2016/05/09}
+% {dvisvgm added}
+% dvisvgm driver.
+% \begin{macrocode}
+\DeclareOption{dvisvgm}{\def\Gin@driver{dvisvgm.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvipsone}
+% \begin{option}{dviwindo}
+% \changes{v0.3c}{1994/03/04}
+% {dviwindo support.}
+% \changes{v0.7c}{1995/09/07}
+% {Merge dviwindo option with dvipsone}
+% The drivers for the Y\&Y \TeX\ system.
+% \begin{macrocode}
+\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
+\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{emtex}
+% \begin{option}{dviwin}
+% Two freely available sets of drivers for MSDOS, OS/2 and Windows.
+% \begin{macrocode}
+\DeclareOption{emtex}{\def\Gin@driver{emtex.def}}
+\DeclareOption{dviwin}{\def\Gin@driver{dviwin.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{oztex}
+% \changes{v1.0f}{1997/09/09}
+% {Merge dvips and oztex options}
+% Oz\TeX\ (Macintosh).
+% Since release 3 of Oz\TeX, merge with dvips back end.
+% \begin{macrocode}
+\DeclareOption{oztex}{\ExecuteOptions{dvips}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{textures}
+% Textures (Macintosh).
+% \begin{macrocode}
+\DeclareOption{textures}{\def\Gin@driver{textures.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{pctexps}
+% \begin{option}{pctexwin}
+% \begin{option}{pctexhp}
+% \begin{option}{pctex32}
+% \changes{v1.0b}{1996/10/29}
+% {pctex32 option added}
+% PC\TeX\ (MSDOS/Windows) .
+% \begin{macrocode}
+\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
+\DeclareOption{pctexwin}{\def\Gin@driver{pctexwin.def}}
+\DeclareOption{pctexhp}{\def\Gin@driver{pctexhp.def}}
+\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{truetex}
+% \changes{v1.0b}{1996/10/29}
+% {truetex and tcidef options added}
+% \begin{option}{tcidvi}
+% Kinch TrueTeX, and its version with extended special support as
+% shipped by Scientific Word.
+% \begin{macrocode}
+\DeclareOption{truetex}{\def\Gin@driver{truetex.def}}
+\DeclareOption{tcidvi}{\def\Gin@driver{tcidvi.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{vtex}
+% \changes{v1.0h}{1998/05/27}
+% {vtex option added}
+% V\TeX\ driver.
+% \begin{macrocode}
+\DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{dvi2ps}
+% \begin{option}{dvialw}
+% \begin{option}{dvilaser}
+% \begin{option}{dvitops}
+% \begin{option}{psprint}
+% \begin{option}{pubps}
+% \begin{option}{ln}
+% \changes{v0.6b}{1994/12/12}
+% {ln support (untested)}
+% \changes{v1.0b}{1996/10/29}
+% {options for historic drivers depreciated}
+% If \emph{anyone} is using any of these driver options
+% would they let me know. All these are essentially untried
+% and untested as far as I know.
+% \begin{macrocode}
+%\DeclareOption{dvi2ps}{\def\Gin@driver{dvi2ps.def}}
+%\DeclareOption{dvialw}{\def\Gin@driver{dvialw.def}}
+%\DeclareOption{dvilaser}{\def\Gin@driver{dvilaser.def}}
+%\DeclareOption{dvitops}{\def\Gin@driver{dvitops.def}}
+%\DeclareOption{psprint}{\def\Gin@driver{psprint.def}}
+%\DeclareOption{pubps}{\def\Gin@driver{pubps.def}}
+%\DeclareOption{ln}{\def\Gin@driver{ln.def}}
+% \end{macrocode}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+% \end{option}
+%
+% \begin{option}{debugshow}
+% You probably don't want to use this\ldots
+% \begin{macrocode}
+\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
+% \end{macrocode}
+% \end{option}
+%
+% A local configuration file may define more options.
+% It should also make one driver option the default, by calling
+% |\ExecuteOptions| with the appropriate option.
+% \changes{v0.4f}{1994/07/27}
+% {Add missing 3rd argument to \cs{InputIfFileExists}}
+% \begin{macrocode}
+\InputIfFileExists{graphics.cfg}{}{}
+% \end{macrocode}
+%
+% \begin{option}{hiderotate}
+% \changes{v0.4a}{1994/04/13}
+% {Rename option to hiderotate}
+% \begin{macrocode}
+\DeclareOption{hiderotate}{%
+ \def\Grot@start{\begingroup\setbox\z@\hbox\bgroup}
+ \def\Grot@end{\egroup\endgroup}}
+% \end{macrocode}
+% \end{option}
+%
+% \begin{option}{hidescale}
+% \changes{v0.4a}{1994/04/13}
+% {Rename option to hidescale}
+% \begin{macrocode}
+\DeclareOption{hidescale}{%
+ \def\Gscale@start{\begingroup\setbox\z@\hbox\bgroup}
+ \def\Gscale@end{\egroup\endgroup}}
+% \end{macrocode}
+% \end{option}
+%
+% After the options are processed, load the appropriate driver file.
+% If a site wants a default driver (eg |textures|) it just needs to put
+% |\ExecuteOptions{textures}| in a |graphics.cfg| file.
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% Check that a driver has been specified (either as an option, or as a
+% default option in the configuration file). Then load the `def' file
+% for that option, if it has not already been loaded by some other
+% package (for instance the \textsf{color} package).
+% \changes{v0.5c}{1994/10/03}
+% {Error if no driver specified}
+% \begin{macrocode}
+\if!\Gin@driver!
+ \PackageError{graphics}
+ {No driver specified}
+ {You should make a default driver option in a file \MessageBreak
+ graphics.cfg\MessageBreak
+ eg: \protect\ExecuteOptions{textures}%
+ }
+\else
+ \PackageInfo{graphics}{Driver file: \Gin@driver}
+ \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
+\fi
+% \end{macrocode}
+%
+%
+% \subsection{Graphics Inclusion}
+%
+% This Graphics package uses a lot of dimension registers. \TeX\ only
+% has a limited number of registers, so rather than allocate new ones,
+% re-use some existing \LaTeX\ registers. This is safe as long as all
+% uses of the registers are \emph{local}, and that you can be sure
+% that you \emph{never} need to have access to both uses within the
+% same scope.
+%
+% \begin{macro}{\Gin@llx}
+% \begin{macro}{\Gin@lly}
+% \begin{macro}{\Gin@urx}
+% \begin{macro}{\Gin@ury}
+% In fact these four lengths are now stored as macros not as dimen
+% registers, mainly so that integer |bp| lengths may be passed exactly.
+% \changes{v0.7a}{1995/04/11}
+% {Bounding box coords no longer in registers}
+% \begin{macrocode}
+\def\Gin@llx{0}
+\let\Gin@lly\Gin@llx
+\let\Gin@urx\Gin@llx
+\let\Gin@ury\Gin@llx
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gin@nat@width}
+% \begin{macro}{\Gin@nat@height}
+% The `natural' size of the graphic, before any scaling.
+% \begin{macrocode}
+\let\Gin@nat@width\leftmarginv
+\let\Gin@nat@height\leftmarginvi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ifGin@clip}
+% This switch is \meta{true} if any graphics outside the specified
+% bounding box (really viewport) should not be printed.
+% \begin{macrocode}
+\newif\ifGin@clip
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareGraphicsExtensions}
+% \changes{v0.6a}{1994/11/29}
+% {Remove optional argument, ignore spaces in main argument.}
+% Declare a comma separated list of default extensions to be used
+% if the file is specified with no extension.
+% \begin{macrocode}
+\newcommand\DeclareGraphicsExtensions[1]{%
+ \edef\Gin@extensions{\zap@space#1 \@empty}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@extensions}
+% Initialise the list of possible extensions.
+% \changes{v0.4b}{1994/04/20}
+% {Use \cmd{\providecommand} in case a previous def file has
+% already defined it}
+% \begin{macrocode}
+\providecommand\Gin@extensions{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\includegraphics}
+% \changes{v1.1a}{2017/03/17}
+% {\cs{leavevmode} added before the group in \cs{Gin@iii} so that
+% settings in \cs{everypar} are cleared}
+% Top level command for the standard interface, just look for a |*|.
+% \begin{macrocode}
+\def\includegraphics{%
+% \end{macrocode}
+% Clear |\everypar| before starting a group.
+% \begin{macrocode}
+ \leavevmode
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@ifstar
+ {\Gin@cliptrue\Gin@i}%
+ {\Gin@clipfalse\Gin@i}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@i}
+% If an optional argument is present, call |\Gin@ii| to process it,
+% otherwise call |\Ginclude@graphics|.
+% \changes{v0.3e}{1994/03/09}
+% {Now specify ll before ur coordinate}
+% \begin{macrocode}
+\def\Gin@i{%
+ \@ifnextchar[%]
+ \Gin@ii
+ {\Gin@bboxfalse\Ginclude@graphics}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@ii}
+% Look for a second optional argument.
+% \begin{macrocode}
+\def\Gin@ii[#1]{%
+ \@ifnextchar[%]
+ {\Gin@iii[#1]}
+ {\Gin@iii[0,0][#1]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@iii}
+% Set the coordinates of the {\bfseries l}lower {\bfseries l}eft corner,
+% and the coordinates of the {\bfseries u}pper {\bfseries r}ight
+% corner. The coordinates may be any \TeX\ dimension, defaulting to |bp|.
+% \changes{v0.6c}{1994/12/15}
+% {(Denis Roegel) Extra group to keep bb settings local}
+% \begin{macrocode}
+\def\Gin@iii[#1,#2][#3,#4]#5{%
+ \begingroup
+ \Gin@bboxtrue
+ \Gin@defaultbp\Gin@llx{#1}%
+ \Gin@defaultbp\Gin@lly{#2}%
+ \Gin@defaultbp\Gin@urx{#3}%
+ \Gin@defaultbp\Gin@ury{#4}%
+ \Ginclude@graphics{#5}%
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@defaultbp}
+% \changes{v0.7a}{1995/04/11}{Macro added}
+% \begin{macro}{\Gin@def@bp}
+% \changes{v0.7a}{1995/04/11}{Macro added}
+% This macro grabs a length, |#2|, which may or may not have a unit,
+% and if a unit is supplied, converts to `bp' and stores the value in
+% |#1|. If a unit is not supplied `bp' is assumed, and |#2| is directly
+% stored in |#1|. Note that supplying `bp' is not quite the same as
+% supplying no units, as in the former case a conversion via `pt' and
+% back to `bp' takes place which can introduce rounding error. The error
+% is invisibly small but files conforming to Adobe DSC should have
+% \emph{integer} Bounding Box Coordinates, and conceivably some drivers
+% might demand integer values.
+% (Although most seem to accept real values (if they accept bounding box
+% coordinates at all) in the |\special|. This is the reason why the
+% mechanism uses |\def| and not \TeX\ lengths, as in earlier releases of
+% the package.
+% \begin{macrocode}
+\def\Gin@defaultbp#1#2{%
+ \afterassignment\Gin@def@bp\dimen@#2bp\relax{#1}{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\Gin@def@bp#1\relax#2#3{%
+ \if!#1!%
+ \def#2{#3}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareGraphicsRule}
+% Declare what actions should be taken for a particular file
+% extension.
+%
+% |#1| extension, |#2| type, |#3| read-file, |#4| command,
+% \changes{v0.5d}{1994/10/24}
+% {(Arthur Ogawa) Check arg3 is *, not arg2.}
+% \begin{macrocode}
+\def\DeclareGraphicsRule#1#2#3#4{%
+ \edef\@tempa{\string *}\def\@tempb{#3}%
+ \expandafter\edef\csname Gin@rule@#1\endcsname##1%
+ {{#2}%
+ {\ifx\@tempa\@tempb\noexpand\Gin@ext\else#3\fi}%
+ {\ifx\indent#4\indent##1\else#4\fi}}}
+% \end{macrocode}
+% \end{macro}
+%
+% An example rule base.
+%\begin{verbatim}
+% ext type read command
+% \DeclareGraphicsRule{.ps} {eps} {.ps} {}
+% \DeclareGraphicsRule{.eps} {eps} {.eps} {}
+% \DeclareGraphicsRule{.ps.gz}{eps} {.ps.bb} {`zcat #1}
+% \DeclareGraphicsRule{.pcx} {bmp} {} {}
+%\end{verbatim}
+%
+% \begin{macro}{\graphicspath}
+% User level command to set the input path for graphics files.
+% A list of directories, each in a |{}| group.
+% \begin{macrocode}
+\def\graphicspath#1{\def\Ginput@path{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ginput@path}
+% The default graphic path is |\input@path|.
+% \begin{macrocode}
+\ifx\Ginput@path\@undefined
+ \let\Ginput@path\input@path
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@getbase}
+% \changes{v0.6a}{1994/11/29} {remove \cs{Gin@sep}}
+% \changes{v1.3a}{2019/07/01} {Support UTF-8 and spaces}
+% \changes{v1.3b}{2019/07/20} {Delay adding quotes to filename}
+% Given a possible extension, |#1|, check whether the file exists. If
+% it does set |\Gin@base| and |\Gin@ext| to the filename stripped of
+% the extension, and the extension, respectively.
+% \begin{macrocode}
+\def\Gin@getbase#1{%
+ \edef\Gin@tempa{%
+ \def\noexpand\@tempa####1#1\space{%
+ \def\noexpand\Gin@base{####1}}}%
+ \IfFileExists{\filename@area\filename@base#1}%
+ {\Gin@tempa
+ \edef\uq@filef@und{\expandafter\unquote@name
+ \expandafter{\@filef@und}}%
+ \expandafter\@tempa\uq@filef@und
+ \edef\Gin@ext{#1}}{}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@ext}
+% Initialise the macro to hold the extension.
+% \begin{macrocode}
+\let\Gin@ext\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@sepdefault}
+% \changes{v0.6a}{1994/11/29}
+% {remove \cs{Gin@sep}}
+% This must match the token used by |\filename@parse| to delimit the
+% extension.
+% \begin{macrocode}
+\def\Gin@sepdefault{.}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ginclude@graphics}
+% The main internal function implementing graphics file inclusion.
+% |#1| is the file name.
+% \changes{v0.4c}{1994/04/28}
+% {Improve the wording of error messages}
+% \changes{v0.5a}{1994/07/20}
+% {Add default (*) rule possibility}
+% \changes{v0.6a}{1994/11/29}
+% {remove \cs{Gin@sepdefault}}
+% \changes{v1.3a}{2019/07/01} {Support UTF-8 and spaces}
+% The quoting business for graphic files needs further sorting
+% out. This should be handled differently, right now we quote and
+% unquote all over the place as we still use the old code base.
+%
+% This also makes the file name displays weird!
+%
+% Guard |\detokenize| use for plain classic tex.
+% \begin{macrocode}
+\def\Ginclude@graphics#1{%
+ \ifx\detokenize\@undefined\else
+ \edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}%
+ \fi
+ \begingroup
+ \let\input@path\Ginput@path
+% \end{macrocode}
+% A lot of quote juggling going on here (room for improvements).
+% \begin{macrocode}
+ \set@curr@file{#1}%
+ \edef\uq@curr@file{\expandafter\unquote@name\expandafter{\@curr@file}}%
+ \expandafter\filename@parse\expandafter{\uq@curr@file}%
+ \edef\filename@area{\expandafter\quote@name\expandafter{\filename@area}}%
+ \edef\filename@base{\expandafter\quote@name\expandafter{\filename@base}}%
+ \ifx\filename@ext\relax
+ \@for\Gin@temp:=\Gin@extensions\do{%
+ \ifx\Gin@ext\relax
+ \Gin@getbase\Gin@temp
+ \fi}%
+ \else
+ \Gin@getbase{\Gin@sepdefault\filename@ext}%
+% \end{macrocode}
+% \changes{v0.4d}{1994/05/06}
+% {Make file not found a warning not an error}
+% \changes{v0.6a}{1994/11/29}
+% {remove \cs{Gin@sep}}
+% If the user supplied an explicit extension, just give a warning if the
+% file does not exist. (It may be created later.)
+% \begin{macrocode}
+ \ifx\Gin@ext\relax
+ \@warning{File `#1' not found}%
+ \def\Gin@base{\filename@area\filename@base}%
+% \end{macrocode}
+% \changes{v0.6c}{1994/12/15}
+% {(Piet van Oostrum) include `.' in \cs{Gin@ext}}%
+% \begin{macrocode}
+ \edef\Gin@ext{\Gin@sepdefault\filename@ext}%
+ \fi
+ \fi
+% \end{macrocode}
+% If no extension is supplied, it is an error if the file does not
+% exist, as there is no way for the system to know which extension to
+% supply.
+% \begin{macrocode}
+ \ifx\Gin@ext\relax
+ \@latex@error{File `#1' not found}%
+ {I could not locate the file with any of these extensions:^^J%
+ \Gin@extensions^^J\@ehc}%
+ \else
+ \@ifundefined{Gin@rule@\Gin@ext}%
+% \end{macrocode}
+% \changes{v0.5a}{1994/07/20}
+% {Add default (*) rule possibility}
+% Handle default rule.
+% \begin{macrocode}
+ {\ifx\Gin@rule@*\@undefined
+ \@latex@error{Unknown graphics extension: \Gin@ext}\@ehc
+ \else
+ \expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}%
+ \fi}%
+ {\expandafter\expandafter\expandafter\Gin@setfile
+ \csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}}%
+ \fi
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifGread@}
+% True if a file should be read to obtain the natural size.
+% \begin{macrocode}
+\newif\ifGread@\Gread@true
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@setfile}
+% Set a file to the size specified in arguments, or in a `read file'.
+% \changes{v0.5d}{1994/10/24}
+% {(Arthur Ogawa) Add missing \cs{expandafter}}
+% \begin{macrocode}
+\def\Gin@setfile#1#2#3{%
+ \ifx\\#2\\\Gread@false\fi
+ \ifGin@bbox\else
+ \ifGread@
+ \csname Gread@%
+ \expandafter\ifx\csname Gread@#1\endcsname\relax
+ eps%
+ \else
+ #1%
+ \fi
+ \endcsname{\Gin@base#2}%
+ \else
+% \end{macrocode}
+% \changes{v0.5a}{1994/07/20}
+% {New error trap for missing size arguments}
+% \changes{v0.7f}{1995/11/10}
+% {Use \cs{Gin@nosize}}
+% By now the natural size should be known either from arguments or
+% from the file. If not generate an error. (The \textsf{graphicx}
+% interface relaxes this condition slightly.)
+% \begin{macrocode}
+ \Gin@nosize{#3}%
+ \fi
+ \fi
+% \end{macrocode}
+% \changes{v0.7a}{1995/04/11}{\cs{Gin@viewport@code} added.}
+% The following call will modify the `natural size' if the user has
+% supplied a viewport or trim specification. (Not available in the
+% standard interface.)
+% \begin{macrocode}
+ \Gin@viewport@code
+% \end{macrocode}
+% Save the natural size, and then call |\Gin@req@sizes| which (in the
+% key-val interface) will calculate the required size from the natural
+% size, and any scaling info.
+% \begin{macrocode}
+ \Gin@nat@height\Gin@ury bp%
+ \advance\Gin@nat@height-\Gin@lly bp%
+ \Gin@nat@width\Gin@urx bp%
+ \advance\Gin@nat@width-\Gin@llx bp%
+ \Gin@req@sizes
+% \end{macrocode}
+%
+% Call |\Ginclude@|\emph{type} to include the figure unless
+% this is not defined, or draft mode is being used.
+% \changes{v0.7h}{1996/02/20}
+% {missing \texttt{@} added in \texttt{Gread@} csnames}
+% \begin{macrocode}
+ \expandafter\ifx\csname Ginclude@#1\endcsname\relax
+ \Gin@drafttrue
+ \expandafter\ifx\csname Gread@#1\endcsname\relax
+ \@latex@error{Can not include graphics of type: #1}\@ehc
+ \global\expandafter\let\csname Gread@#1\endcsname\@empty
+ \fi
+ \fi
+ \leavevmode
+ \ifGin@draft
+ \hb@xt@\Gin@req@width{%
+ \vrule\hss
+ \vbox to \Gin@req@height{%
+ \hrule \@width \Gin@req@width
+ \vss
+ \edef\@tempa{#3}%
+ \rlap{ \ttfamily\expandafter\strip@prefix\meaning\@tempa}%
+ \vss
+ \hrule}%
+ \hss\vrule}%
+ \else
+% \end{macrocode}
+% \changes{v0.3i}{1994/3/23}
+% {Add file list info}
+% Support |\listfiles| and then set the final box to the required size.
+% \begin{macrocode}
+ \@addtofilelist{#3}%
+ \ProvidesFile{#3}[Graphic file (type #1)]%
+ \setbox\z@\hbox{\csname Ginclude@#1\endcsname{#3}}%
+ \dp\z@\z@
+ \ht\z@\Gin@req@height
+ \wd\z@\Gin@req@width
+ \box\z@
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@decode}
+% \changes{v1.2c}{2017/06/25}
+% {New macro}
+% In the standard interface this is a no-op, but needs to be defined
+% to allow the caching code to be set up.
+% \begin{macrocode}
+\let\Gin@decode\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@exclamation}
+% \changes{v0.7g}{1995/12/06}{Macro added}
+% Catcode 12 |!|, in case of French, or other language styles.
+% \begin{macrocode}
+\def\Gin@exclamation{!}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@page}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard interface this is a no-op, but needs to be defined
+% to allow the caching code to be set up.
+% \begin{macrocode}
+\let\Gin@page\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@pagebox}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard interface always points to the |cropbox|.
+% \begin{macrocode}
+\def\Gin@pagebox{cropbox}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifGin@interpolate}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard setting a no-op.
+% \begin{macrocode}
+\newif\ifGin@interpolate
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@log}
+% \changes{v1.2a}{2017/06/01} {New macro} In the standard interface
+% this prints to the log but can be changed via keys in \textsf{graphicx}.
+% \begin{macrocode}
+\let\Gin@log\wlog
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Gin@req@sizes}
+% \begin{macro}{\Gin@scalex}
+% \begin{macro}{\Gin@scaley}
+% \begin{macro}{\Gin@req@height}
+% \begin{macro}{\Gin@req@width}
+% In the standard interface there is no scaling, so the required size
+% is the same as the natural size. In other interfaces |\Gin@req@sizes|
+% will be responsible for setting these parameters. Here we can set them
+% globally.
+% \changes{v0.3g}{1994/03/15}
+% {Initialise y-scale to !!}
+% \changes{v1.0g}{1998/05/14}
+% {Fix !! usage in changes entries. graphics/2724}
+% \begin{macrocode}
+\let\Gin@req@sizes\relax
+\def\Gin@scalex{1}%
+\let\Gin@scaley\Gin@exclamation
+\let\Gin@req@height\Gin@nat@height
+\let\Gin@req@width\Gin@nat@width
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gin@viewport@code}
+% In the standard interface there is no possibility of specifying
+% a viewport, so this is a no-op.
+% \changes{v0.7a}{1995/04/11}{Macro added}
+% \begin{macrocode}
+\let\Gin@viewport@code\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@nosize}
+% \changes{v1.0p}{2014/10/14}{Fixed typo in error message}
+% \changes{v0.7f}{1995/11/10}
+% {Macro added}
+% This command is called in the case that the graphics type
+% specifies no `read file' and the user supplied no size arguments.
+% In the standard interface can only generate an error.
+% \begin{macrocode}
+\def\Gin@nosize#1{%
+ \@latex@error
+ {Cannot determine size of graphic in #1 (no size specified)}%
+ \@ehc}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Reading the BoundingBox in EPS files}
+%
+% \begin{macro}{\ifGin@bbox}
+% \changes{v0.7a}{1995/04/11}{Name changed from \cs{ifGin@viewport}}
+% This switch should be set \meta{true} once a size has been found,
+% either in an argument, or in an external file.
+% \begin{macrocode}
+\newif\ifGin@bbox
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gread@generic}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% \begin{macro}{\Gread@generic@aux}
+% \begin{macro}{\Gread@eps}
+% Read an EPS file (|#1|) and search for a line
+% starting with |%%BoundingBox| and returns the result
+% by setting four dimension registers
+% |\Gin@llx|, |\Gin@lly|, |\Gin@urx| and |\Gin@ury|.
+% \changes{v0.5e}{1994/1l/02}
+% {Fix the catcodes of \cs{endlinechar} and ctrl-D}
+% \changes{v0.7a}{1995/04/11}
+% {Fix more catcodes, for binary headers of eps files}
+% \changes{v1.2a}{2017/06/01}
+% {Split to allow code reuse by \cs{Gread@extractbb} in
+% \texttt{dvipdfmx.def} driver}
+% \begin{macro}{\Gread@eps@aux}
+% \begin{macrocode}
+\def\Gread@generic#1#2{%
+ \edef\Gread@attr@hash{%
+ \ifx\Gin@pagebox\@empty\else
+ :\Gin@pagebox
+ \fi
+ \ifx\Gin@page\@empty\else
+ :P\Gin@page
+ \fi
+ }%
+ \@ifundefined{#1 bbox\Gread@attr@hash}%
+ {\Gread@generic@aux{#1}{#2}}
+ {%
+ \expandafter\global\expandafter\let\expandafter\@gtempa
+ \csname #1 bbox\Gread@attr@hash\endcsname
+ }%
+ \expandafter\Gread@parse@bb\@gtempa\\%
+}
+\def\Gread@generic@aux#1#2{%
+ \begingroup
+% \end{macrocode}
+% Make it reasonably safe to have binary headers in the EPS file
+% before the bounding box line.
+% \begin{macrocode}
+ \@tempcnta\z@
+ \loop\ifnum\@tempcnta<\@xxxii
+ \catcode\@tempcnta14 %
+ \advance\@tempcnta\@ne
+ \repeat
+ \catcode`\^^?14 %
+ \let\do\@makeother
+ \dospecials
+% \end{macrocode}
+% Make sure tab and space are accepted as white space.
+% \changes{v1.0e}{1997/09/02}
+% {Allow TAB in DSC comments graphics/2587}
+% \changes{v1.0i}{1999/01/07}
+% {Fix catcode of hyphen. graphics/2846}
+% \begin{macrocode}
+ \catcode`\ 10 %
+ \catcode`\^^I10 %
+ \catcode\endlinechar5 %
+ \@makeother\:%
+ \@makeother\-%
+% \end{macrocode}
+% The first thing we need to do is to open the
+% information file, if possible.
+% \changes{v0.4d}{1994/05/06}
+% {Improve the error message if the info file is not there.}
+% \changes{v1.2a}{2017/06/01}
+% {Allow for spaces in name of a file}
+% Due to the space handling code file names are now already quoted
+% so we should not add any quotes around \verb=#1= any more.
+% \changes{v1.3b}{2019/07/20} {add quotes here again}
+% \begin{macrocode}
+ \immediate\openin\@inputcheck\quote@name{#1} %
+ #2{#1}%
+% \end{macrocode}
+% \changes{v0.3i}{1994/03/23}
+% {Wording of error message improved}
+% \changes{v1.0}{1996/05/29}
+% {Use \cs{@gtempa} not \cs{g@tempa} /2090}
+% \changes{v1.2b}{2017/06/13}
+% {Stored bounding box data for reuse}
+% \begin{macrocode}
+ \ifGin@bbox
+ \expandafter\xdef\csname #1 bbox\Gread@attr@hash\endcsname{\@gtempa}%
+ \else
+ \@latex@error
+ {Cannot determine size of graphic in #1 (no BoundingBox)}%
+ \@ehc
+ \gdef\@gtempa{0 0 72 72 }%
+ \fi
+ \endgroup
+}
+\def\Gread@eps#1{%
+ \Gread@generic{#1}\Gread@eps@aux
+}
+\def\Gread@eps@aux#1{%
+ \ifeof\@inputcheck
+ \@latex@error{File `#1' not found}\@ehc
+ \else
+% \end{macrocode}
+% Now we'll scan lines until we find one that starts with
+% |%%BoundingBox:|
+% We need to reset the catcodes to read the file, and so this
+% is done in a group.
+% \begin{macrocode}
+ \Gread@true
+ \let\@tempb\Gread@false
+ \loop
+ \read\@inputcheck to\@tempa
+ \ifeof\@inputcheck
+ \Gread@false
+ \else
+ \expandafter\Gread@find@bb\@tempa:.\\%
+ \fi
+ \ifGread@
+ \repeat
+ \immediate\closein\@inputcheck
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gread@find@bb}
+% If a line in the EPS file starts with a |%%BoundingBox:|, we
+% will examine it more closely. Note using the `extra' argument |#2#3|
+% causes any space after the |:| to be gobbled.
+% \begin{macrocode}
+\long\def\Gread@find@bb#1:#2#3\\{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\Gread@BBox
+ \Gread@test@atend#2#3()\\%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Gread@test@atend}
+% Determine if the stuff following the |%%BoundingBox| is `(atend)',
+% which will involve further reading of the file. This is accomplished
+% by making |\@tempb| into a no-op, so that finding a |%%BoundingBox|
+% does not stop the loop.
+% \begin{macrocode}
+\def\Gread@test@atend#1(#2)#3\\{%
+ \def\@tempa{#2}%
+ \ifx\@tempa\Gread@atend
+ \Gread@true
+ \let\@tempb\relax
+ \else
+ \gdef\@gtempa{#1}%
+ \@tempb
+ \Gin@bboxtrue
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Gread@parse@bb}
+% We have |%%BoundingBox| and what follows is not `(atend)' so we
+% will parse the rest of the line as a BB with four elements.
+% PostScript files should never have units specified in the
+% BoundingBox comment, but we allow arbitrary \TeX\ units in external
+% files, or in other interfaces.
+% \begin{macrocode}
+\def\Gread@parse@bb#1 #2 #3 #4 #5\\{%
+ \Gin@defaultbp\Gin@llx{#1}%
+ \Gin@defaultbp\Gin@lly{#2}%
+ \Gin@defaultbp\Gin@urx{#3}%
+ \Gin@defaultbp\Gin@ury{#4}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gread@atend}
+% |atend| as a macro for testing with |\ifx|.
+% \begin{macrocode}
+\def\Gread@atend{atend}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Rotation}
+%
+% As above, we will re-use some existing local registers.
+%
+% \begin{macro}{\Grot@height}
+% \begin{macro}{\Grot@left}
+% \begin{macro}{\Grot@right}
+% \begin{macro}{\Grot@depth}
+% Final Rotated box dimensions
+% \begin{macrocode}
+\let\Grot@height\@ovxx
+\let\Grot@left\@ovyy
+\let\Grot@right\@ovdx
+\let\Grot@depth\@ovdy
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Grot@h}
+% \begin{macro}{\Grot@l}
+% \begin{macro}{\Grot@r}
+% \begin{macro}{\Grot@d}
+% Original box dimensions
+% \begin{macrocode}
+\let\Grot@l\@ovro
+\let\Grot@r\@ovri
+\let\Grot@h\@xdim
+\let\Grot@d\@ydim
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Grot@x}
+% \begin{macro}{\Grot@y}
+% Coordinates of centre of rotation.
+% \begin{macrocode}
+\let\Grot@x\@linelen
+\let\Grot@y\@dashdim
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rotatebox}
+% The angle is specified by |#1|. The box to be rotated is |#2|.
+% In the standard interface the centre of rotation is $(0,0)$.
+% Then finally call |\Grot@box| to rotate the box.
+% \changes{v0.3f}{1994/03/11}{Remove star form}
+% \changes{v0.3h}{1994/03/17}{Fix Typo}
+% \changes{v0.7a}{1995/04/11}{\cs{leavevmode} added graphics/1521}
+% \changes{v1.0n}{2001/07/07}
+% {Made long (CAR) graphics/2908 and 3345}
+% \begin{macrocode}
+\long\def\rotatebox#1#2{%
+ \leavevmode
+ \Grot@setangle{#1}%
+ \setbox\z@\hbox{{#2}}%
+ \Grot@x\z@
+ \Grot@y\z@
+ \Grot@box}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Grot@setangle}
+% Set the internal macro used by |\Grot@box|. In the standard
+% interface this is trivial, but other interfaces may have more
+% interesting definitions. For example:
+%\begin{verbatim}
+% \def\Grot@setangle#1{%
+% \dimen@#1\p@
+% \dimen@-57.2968\dimen@
+% \edef\Grot@angle{\strip@pt\dimen@}}
+%\end{verbatim}
+% This would cause the argument of |\rotatebox| to be interpreted as
+% an angle specified in \emph{radians}, \emph{clockwise}.
+% \begin{macrocode}
+\def\Grot@setangle#1{\edef\Grot@angle{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Deriving a `bounding box' for rotated object}
+% We want to know the size of a `bounding box' enclosing the rotated
+% box.
+% We define two formulae (as \TeX\ macros) to work out the $x$ and $y$
+% coordinates of vertices of the rotated box
+% in relation to its original coordinates (i.e., its width, height
+% and depth). The box we visualize with vertices $B$, $C$,
+% $D$ and $E$ is illustrated below. The vertex
+% $S$ is the reference point on the baseline. $O$ is the centre of
+% rotation, which in the standard interface is always $S$.
+%
+% \begin{center}
+% \setlength{\unitlength}{3pt}%
+%
+% \begin{picture}(34,36)(12,44)
+% \thicklines
+% \put(20,52){\dashbox{1}(20,21){}}
+% \put(20,80){\line(0,-1){36}}
+% \put(12,58){\line(1, 0){34}}
+% \put(41,59){A}
+% \put(40,74){B}
+% \put(21,74){C}
+% \put(21,49){D}
+% \put(40,49){E}
+% \put(21,59){S}
+% \put(33,65){O}
+% \put(33,65){\circle*{1}}
+% \end{picture}
+% \end{center}
+%
+% The formulae are, for a point $P$ and angle $\alpha$:
+%\[
+% \begin{array}{l}
+% P'_x = P_x - O_x \\
+% P'_y = P_y - O_y \\
+% P''_x = ( P'_x \times \cos(\alpha)) - ( P'_y \times \sin(\alpha) ) \\
+% P''_y = ( P'_x \times \sin(\alpha)) + ( P'_y \times \cos(\alpha) ) \\
+% P'''_x = P''_x + O_x + L_x \\
+% P'''_y = P''_y + O_y
+% \end{array}
+% \]
+% The `extra' horizontal translation $L_x$ at the end is calculated so
+% that the leftmost point of the resulting box has $x$-coordinate $0$.
+% This is desirable as \TeX\ boxes must have the reference point at
+% the left edge of the box.
+%
+% \begin{macro}{\Grot@Px}
+% Work out new $x$ coordinate of point after rotation. The parameters
+% |#2| and |#3| are the original $x$ and $y$ coordinates of the point.
+% The new $x$ coordinate is stored in |#1|.
+% \begin{macrocode}
+\def\Grot@Px#1#2#3{%
+ #1\Grot@cos#2%
+ \advance#1-\Grot@sin#3}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Grot@Py}
+% Work out new $y$ coordinate of point after rotation. The parameters
+% |#2| and |#3| are the original $x$ and $y$ coordinates of the point.
+% The new $y$ coordinate is stored in |#1|.
+% \begin{macrocode}
+\def\Grot@Py#1#2#3{%
+ #1\Grot@sin#2%
+ \advance#1\Grot@cos#3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Grot@box}
+% This is the tricky bit. We can rotate the box, but then need
+% to work out how much space to leave for it on the page.
+%
+% We simplify matters by working out first which quadrant we are in, and
+% then picking just the right values.
+%
+% \begin{macrocode}
+\def\Grot@box{%
+ \begingroup
+% \end{macrocode}
+% We are going to need to know the sine and cosine
+% of the angle; simplest to calculate these now.
+% \begin{macrocode}
+ \CalculateSin\Grot@angle
+ \CalculateCos\Grot@angle
+ \edef\Grot@sin{\UseSin\Grot@angle}%
+ \edef\Grot@cos{\UseCos\Grot@angle}%
+^^A \GDebug{Rotate: angle \Grot@angle, sine is \Grot@sin,
+^^A cosine is \Grot@cos}%
+% \end{macrocode}
+% Save the four extents of the original box.
+% \begin{macrocode}
+ \Grot@r\wd\z@ \advance\Grot@r-\Grot@x
+ \Grot@l\z@ \advance\Grot@l-\Grot@x
+ \Grot@h\ht\z@ \advance\Grot@h-\Grot@y
+ \Grot@d-\dp\z@ \advance\Grot@d-\Grot@y
+% \end{macrocode}
+% Now a straightforward test to see which quadrant we are
+% operating in;
+% \begin{macrocode}
+ \ifdim\Grot@sin\p@>\z@
+ \ifdim\Grot@cos\p@>\z@
+% \end{macrocode}
+% First quadrant:
+% Height=$By$, Right=$Ex$, Left=$Cx$, Depth=$Dy$
+% \begin{macrocode}
+ \Grot@Py\Grot@height \Grot@r\Grot@h%B
+ \Grot@Px\Grot@right \Grot@r\Grot@d%E
+ \Grot@Px\Grot@left \Grot@l\Grot@h%C
+ \Grot@Py\Grot@depth \Grot@l\Grot@d%D
+ \else
+% \end{macrocode}
+% Second quadrant:
+% Height=$Ey$, Right=$Dx$, Left=$Bx$, Depth=$Cy$
+% \begin{macrocode}
+ \Grot@Py\Grot@height \Grot@r\Grot@d%E
+ \Grot@Px\Grot@right \Grot@l\Grot@d%D
+ \Grot@Px\Grot@left \Grot@r\Grot@h%B
+ \Grot@Py\Grot@depth \Grot@l\Grot@h%C
+ \fi
+ \else
+ \ifdim\Grot@cos\p@<\z@
+% \end{macrocode}
+% Third quadrant:
+% Height=$Dy$, Right=$Cx$, Left=$Ex$, Depth=$By$
+% \begin{macrocode}
+ \Grot@Py\Grot@height \Grot@l\Grot@d%D
+ \Grot@Px\Grot@right \Grot@l\Grot@h%C
+ \Grot@Px\Grot@left \Grot@r\Grot@d%E
+ \Grot@Py\Grot@depth \Grot@r\Grot@h%B
+ \else
+% \end{macrocode}
+% Fourth quadrant:
+% Height=$Cy$, Right=$Bx$, Left=$Dx$, Depth=$Ey$
+% \begin{macrocode}
+ \Grot@Py\Grot@height \Grot@l\Grot@h%C
+ \Grot@Px\Grot@right \Grot@r\Grot@h%B
+ \Grot@Px\Grot@left \Grot@l\Grot@d%D
+ \Grot@Py\Grot@depth \Grot@r\Grot@d%E
+ \fi
+ \fi
+% \end{macrocode}
+% Now we should translate back by $(O_x,O_y)$, but \TeX\ can not really
+% deal with boxes that do not have the reference point at the left edge.
+% (Everything with a $-$ve $x$-coordinate would over-print earlier
+% text). So we modify the horizontal translation so that the
+% reference point as understood by \TeX\ \emph{is} at the left edge.
+% This means that the `centre of rotation' is not fixed by |\rotatebox|,
+% but typically moves horizontally. We also need to find the image of
+% the original reference point, $S$, as that is where the rotation
+% specials must be inserted.
+%
+% \begin{macrocode}
+ \advance\Grot@height\Grot@y
+ \advance\Grot@depth\Grot@y
+ \Grot@Px\dimen@ \Grot@x\Grot@y
+ \Grot@Py\dimen@ii \Grot@x\Grot@y
+ \dimen@-\dimen@ \advance\dimen@-\Grot@left
+ \dimen@ii-\dimen@ii \advance\dimen@ii\Grot@y
+% \end{macrocode}
+%
+% \begin{macrocode}
+^^A \GDebug{Rotate: (l,r,h,d)^^J%
+^^A Original \the\Grot@l,\the\Grot@r,\the\Grot@h,\the\Grot@d,^^J%
+^^A New..... \the\Grot@left,\the\Grot@right,%
+^^A \the\Grot@height,\the\Grot@depth}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \setbox\z@\hbox{%
+ \kern\dimen@
+ \raise\dimen@ii\hbox{\Grot@start\box\z@\Grot@end}}%
+ \ht\z@\Grot@height
+ \dp\z@-\Grot@depth
+ \advance\Grot@right-\Grot@left\wd\z@\Grot@right
+ \leavevmode\box\z@
+ \endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Stretching and Scaling}
+%
+%
+% \begin{macro}{\scalebox}
+% The top level |\scalebox|. If the vertical scale factor is omitted it
+% defaults to the horizontal scale factor, |#1|.
+% \changes{v0.3d}{1994/03/06}{Better support for negative arguments.}
+% \begin{macrocode}
+\def\scalebox#1{%
+ \@ifnextchar[{\Gscale@box{#1}}{\Gscale@box{#1}[#1]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gscale@box}
+% Internal version of |\scalebox|.
+% \changes{v0.7a}{1995/04/11}
+% {\cs{leavevmode} moved earlier. graphics/1521}
+% \changes{v1.0j}{1999/01/07}
+% {made long. graphics/2908}
+% \changes{v1.1b}{2017/04/14}
+% {Adjust box resizing for math mode gh issue 6}
+% \begin{macrocode}
+\long\def\Gscale@box#1[#2]#3{%
+ \leavevmode
+ \def\Gscale@x{#1}\def\Gscale@y{#2}%
+ \setbox\z@\hbox{{#3}}%
+ \setbox\tw@\hbox{\Gscale@start\rlap{\copy\z@}\Gscale@end}%
+ \ifdim#2\p@<\z@
+ \ht\tw@-#2\dp\z@
+ \dp\tw@-#2\ht\z@
+ \else
+ \ht\tw@#2\ht\z@
+ \dp\tw@#2\dp\z@
+ \fi
+ \ifdim#1\p@<\z@
+ \hb@xt@-#1\wd\z@{\kern-#1\wd\z@\box\tw@\hss}%
+ \else
+ \hb@xt@#1\wd\z@{\box\tw@\kern#1\wd\z@\hss}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\reflectbox}
+% Just an abbreviation for the appropriate scale to get reflection.
+% \changes{v0.3e}{1994/03/09}{Macro added}
+% \begin{macrocode}
+\def\reflectbox{\Gscale@box-1[1]}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\resizebox}
+% \changes{v0.3b}{1994/03/01}{Recode \cmd\resizebox.}
+% \changes{v0.7b}{1995/04/27}
+% {Add \cs{leavevmode} for graphics/1512}
+% Look for a |*|, which specifies that a final vertical size refers to
+% `height + depth' not just `height'.
+% \begin{macrocode}
+\def\resizebox{%
+ \leavevmode
+ \@ifstar{\Gscale@@box\totalheight}{\Gscale@@box\height}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gscale@@box}
+% Look for the |!| in the arguments.
+% \changes{v0.5a}{1994/07/20}
+% {Support French active !!}
+% \changes{v0.5d}{1994/10/24}
+% {Correct the support for !!}
+% \changes{v0.7g}
+% {1995/12/06}{Use \cs{Gin@exclamation}}
+% \begin{macrocode}
+\def\Gscale@@box#1#2#3{%
+ \let\@tempa\Gin@exclamation
+ \expandafter\def\expandafter\@tempb\expandafter{\string#2}%
+ \expandafter\def\expandafter\@tempc\expandafter{\string#3}%
+ \ifx\@tempb\@tempa
+ \ifx\@tempc\@tempa
+ \toks@{\mbox}%
+ \else
+ \toks@{\Gscale@box@dd{#3}#1}%
+ \fi
+ \else
+ \ifx\@tempc\@tempa
+ \toks@{\Gscale@box@dd{#2}\width}%
+ \else
+ \toks@{\Gscale@box@dddd{#2}\width{#3}#1}%
+ \fi
+ \fi
+ \the\toks@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gscale@box@dd}
+% Scale the text |#3| in both directions by a factor $|#1|/|#2|$.
+% \changes{v0.3i}{1994/03/23}
+% {Missing percent added}
+% \changes{v1.0i}{1999/01/07}
+% {made long. graphics/2908}
+% \begin{macrocode}
+\long\def\Gscale@box@dd#1#2#3{%
+ \@begin@tempboxa\hbox{#3}%
+ \setlength\@tempdima{#1}%
+ \setlength\@tempdimb{#2}%
+ \Gscale@div\@tempa\@tempdima\@tempdimb
+ \Gscale@box\@tempa[\@tempa]{\box\@tempboxa}%
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gscale@box@dddd}
+% Scale the text |#5| horizontally by a factor $|#1|/|#2|$ and
+% vertically by a factor $|#3|/|#4|$.
+% \changes{v0.3i}{1994/03/23}
+% {Missing percent added}
+% \changes{v0.7e}{1995/09/29}
+% {Add \cs{ifGin@iso} code added}
+% \changes{v1.0i}{1999/01/07}
+% {made long. graphics/2908}
+% \begin{macrocode}
+\long\def\Gscale@box@dddd#1#2#3#4#5{%
+ \@begin@tempboxa\hbox{#5}%
+ \setlength\@tempdima{#1}%
+ \setlength\@tempdimb{#2}%
+ \Gscale@div\@tempa\@tempdima\@tempdimb
+ \setlength\@tempdima{#3}%
+ \setlength\@tempdimb{#4}%
+ \Gscale@div\@tempb\@tempdima\@tempdimb
+ \ifGin@iso
+ \ifdim\@tempa\p@>\@tempb\p@
+ \let\@tempa\@tempb
+ \else
+ \let\@tempb\@tempa
+ \fi
+ \fi
+ \Gscale@box\@tempa[\@tempb]{\box\@tempboxa}%
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifGin@iso}
+% If this flag is true, then specifying two lengths to |\resizebox|
+% scales the box by the same factor in either direction, such that
+% neither length \emph{exceeds} the stated amount. No user interface
+% to this flag in the standard package, but it is used by the
+% |keepaspectratio| key to |\includegraphics| in the \textsf{graphicx}
+% package.
+% \changes{v0.7e}{1995/09/29}
+% {Macro added}
+% \begin{macrocode}
+\newif\ifGin@iso
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gscale@div}
+% The macro |#1| is set to the ratio of the lengths |#2| and |#3|.
+% \changes{v0.7a}{1995/04/11}
+% {Add trap for division by 0}
+% \changes{v0.7d}{1995/09/27}
+% {Use \cs{setlength} to support calc package}
+% \changes{v1.0a}{1996/09/16}
+% {Stop infinite loop if 2nd arg zero. graphics/2259}
+% \begin{macrocode}
+\def\Gscale@div#1#2#3{%
+ \setlength\dimen@{#3}%
+ \ifdim\dimen@=\z@
+ \PackageError{graphics}{Division by 0}\@eha
+ \dimen@#2%
+ \fi
+ \edef\@tempd{\the\dimen@}%
+ \setlength\dimen@{#2}%
+ \count@65536\relax
+ \ifdim\dimen@<\z@
+ \dimen@-\dimen@
+ \count@-\count@
+ \fi
+ \ifdim\dimen@>\z@
+ \loop
+% \end{macrocode}
+%
+% \changes{v1.0u}{2016/10/09}
+% {avoid overflow for small lengths eg 5sp divided by 2sp}
+% \begin{macrocode}
+ \ifdim\ifnum\count@<\tw@\maxdimen\else\dimen@\fi<8192\p@
+ \dimen@\tw@\dimen@
+ \divide\count@\tw@
+ \repeat
+ \dimen@ii\@tempd\relax
+ \divide\dimen@ii\count@
+ \divide\dimen@\dimen@ii
+ \fi
+ \edef#1{\strip@pt\dimen@}}
+% \end{macrocode}
+% \end{macro}
+%
+% Restore Catcodes
+% \begin{macrocode}
+\Gin@codes
+\let\Gin@codes\relax
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/required/graphics/graphics.ins b/macros/latex-dev/required/graphics/graphics.ins
new file mode 100644
index 0000000000..95e190c9ec
--- /dev/null
+++ b/macros/latex-dev/required/graphics/graphics.ins
@@ -0,0 +1,43 @@
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%% This file has the LPPL maintenance status "maintained".
+
+\input docstrip
+
+\preamble
+
+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!)
+
+
+\endpreamble
+
+\keepsilent
+\askforoverwritefalse
+
+\usedir{tex/latex/graphics}
+
+% The packages
+
+\generate{\file{graphics.sty}{\from{graphics.dtx}{package}}}
+
+\generate{\file{color.sty}{\from{color.dtx}{package}}}
+
+\generate{\file{graphicx.sty}{\from{graphicx.dtx}{package}}}
+
+\generate{\file{trig.sty}{\from{trig.dtx}{package}}}
+
+\generate{\file{keyval.sty}{\from{keyval.dtx}{package}}}
+
+\generate{\file{epsfig.sty}{\from{epsfig.dtx}{package}}}
+
+\generate{\file{lscape.sty}{\from{lscape.dtx}{package}}}
+
+\generate{\file{rotating.sty}{\from{rotating.dtx}{package}}}
+
+\endbatchfile
diff --git a/macros/latex-dev/required/graphics/graphics.pdf b/macros/latex-dev/required/graphics/graphics.pdf
new file mode 100644
index 0000000000..63a2ed999c
--- /dev/null
+++ b/macros/latex-dev/required/graphics/graphics.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/graphicx.dtx b/macros/latex-dev/required/graphics/graphicx.dtx
new file mode 100644
index 0000000000..aad8460ac5
--- /dev/null
+++ b/macros/latex-dev/required/graphics/graphicx.dtx
@@ -0,0 +1,939 @@
+%
+% \iffalse
+%
+%% graphicx.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
+%% Copyright (C) 1995--2015,2017 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%<*dtx>
+ \ProvidesFile{graphicx.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+%<package>\ProvidesPackage{graphicx}
+%<driver> \ProvidesFile{graphicx.drv}
+% \fi
+% \ProvidesFile{graphicx.dtx}
+ [2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\newenvironment{key}[2]{\expandafter\macro\expandafter{%
+ \csname KV@#1@#2\endcsname}}{\endmacro}
+%
+\begin{document}
+ \DocInput{graphicx.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{graphicx.dtx}
+%
+% \title{The \textsf{graphicx} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{D. P. Carlisle\and S. P. Q. Rahtz}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+%
+% \changes{v0.3}{1994/03/01}
+% {First DPC version (after prototype by SPQR).}
+% \changes{v0.4b}{1994/05/30}
+% {Rename from egraphics. 8+3 name for CDROM}
+% \changes{v1.0}{1996/05/29}
+% {Version 1 at last}
+%
+% \def\star{{\ttfamily*}}
+% \makeatletter
+% \def\Describe@Macro#1{\endgroup
+% \setbox0=\lastbox\llap{\PrintDescribeMacro{#1}}}%
+% \makeatother
+% \marginparsep0pt
+%
+% \section{Introduction}
+%
+% This package provides an alternative interface to the \LaTeXe\
+% graphics functions. The command names provided are the same as in the
+% standard package, and they use the same internal functions. However
+% the meaning of the optional arguments is different. Note \emph{only}
+% the optional arguments have changed: any document which only uses the
+% graphics commands with the mandatory arguments and/or the star-forms
+% will work identically (with essentially identical implementation) with
+% the two packages.
+%
+% \section{Key=Value Interface}
+% When the decision to produce \LaTeXe\ was made, certain `guiding
+% principles' were made (and published in the original announcement).
+% One of these was that all new features would `conform to the
+% conventions of version 2.09'. Specifically this meant that new
+% commands would obey the same basic syntax rules for arguments as the
+% existing commands.
+%
+% Standard \LaTeX\ optional arguments are \emph{positional}. If a
+% command were to take three optional arguments, then there would be no
+% way of specifying only the third, one would have to give all three,
+% even if the first two were repeats of the default values. Basically
+% this means that `standard' optional arguments are not suitable if
+% there is more than one option. Various existing packages (for
+% \LaTeX~2.09) have recognised this, and used `named arguments' in
+% various forms. Perhaps the two most noticeable are |psfig| and
+% |pstricks|. With `named arguments' (sometimes called `attributes')
+% each option is not tied to a particular position, but rather given a
+% name (or key) and any options that must be set are set by explicitly
+% associating this name with the desired value.
+%
+% The members of the \LaTeX3 project do appreciate the importance of
+% this kind of syntax, but felt that rather than extending the syntax of
+% \LaTeX\ in an uncoordinated way, it would be better to keep with
+% `standard arguments' in \LaTeXe, which is intended as a `consolidation
+% of existing \LaTeX\ variants'. The long term planning for an eventual
+% \LaTeX3 release will then be able to consider the whole \LaTeX\
+% user interface, and a suitable syntax for named arguments. It is
+% important that such an interface design is not hampered by having to
+% retain compatibility with earlier attempts at a named argument
+% syntax. For this reason this |graphicx| package, which uses the named
+% argument mechanism from the |keyval| package should be considered `non
+% standard' although it is supported by the same mechanism, and same
+% authors as the `standard' |graphics| package.
+%
+% \section{The User Interface}
+%
+% \DescribeMacro
+% \includegraphics\star\oarg{key-val list}\marg{file}\\
+% \DescribeMacro
+% \includegraphics\star\oarg{llx,lly}\oarg{urx,ury}\marg{file}\\
+% Include a graphics file.
+%
+% The star form is just for
+% compatibility with the standard interface, and essentially just adds
+% |clip| to the keys specified. Similarly the second, two-optional
+% argument form is for increased compatibility with the standard
+% package. The two optional argument form is not needed in the |keyval|
+% interface.
+%
+% Various `keys' or named arguments are supported.
+% \begin{description}
+% \item[bb] Set the bounding box. The argument should be four
+% dimensions, separated by spaces.
+% \item[bbllx,bblly,bburx,bbury] Set the bounding box. Mainly for
+% compatibility with older packages. |bbllx=a,bblly=b,bburx=c,bbury=d|
+% is equivalent to |bb = a b c d|.
+% \item[natwidth,natheight] Again an alternative to |bb|.
+% |natheight=h,natwidth=w| is equivalent to |bb = 0 0 h w|.
+% \item[viewport] Modify the bounding box specified in the file.
+% The four values specify a bounding box \emph{relative} to the
+% |llx|,|lly| coordinate of the original box.
+% \item[trim] Modify the bounding box specified in the file.
+% The four values specify the amounts to remove from
+% the left, bottom, right and top of the original box.
+% \item[hiresbb] Boolean valued key. Defaults to |true|.
+% Causes \TeX\ to look for |%%HiResBoundingBox| comments rather than
+% the standard |%%BoundingBox|. May be set to |false| to override
+% a default setting of true specified by the |hiresbb| package option.
+% \item[angle] Rotation angle.
+% \item[origin] Rotation origin (see |\rotatebox|, below).
+% \item[width] Required width, a dimension (default units |bp|). The
+% graphic will be scaled to make the width the specified dimension.
+% \item[height] Required height. a dimension (default units |bp|).
+% \item[totalheight] Required totalheight (i.e., height $+$ depth). a
+% dimension (default units |bp|). Most useful after a rotation (when the
+% height might be zero).
+% \item[keepaspectratio] Boolean valued key (like |clip|). If it is set
+% to true, modify the meaning of the |width| and |height| (and
+% |totalheight|) keys such that if both are specified then rather than
+% distort the figure the figure is scaled such that neither dimension
+% \emph{exceeds} the stated dimensions.
+% \item[scale] Scale factor.
+% \item[clip] Either `true' or `false' (or no value, which is equivalent
+% to `true'). Clip the graphic to the bounding box (or viewport if one
+% is specified).
+% \item[draft] a boolean valued key, like `clip'. locally switches to
+% draft mode, ie.\ do not include the graphic, but leave the
+% correct space, and print the filename.
+% \item[type] Specify the file type. (Normally determined from the file
+% extension.)
+% \item[ext] Specify the file extension.
+% \emph{Only} for use with |type|.
+% \item[read] Specify the `read file' which is used for determining the
+% size of the graphic. \emph{Only} for use with |type|.
+% \item[command] Specify the file command.
+% \emph{Only} for use with |type|.
+% \item[quiet] Turns off writing information about graphics to the |.log|.
+% \item[page] The page of a multi-page PDF graphic to be used.
+% \item[interpolate] Enables interpolation of bitmap images by viewers.
+% \item[pagebox] Specifies which PDF box should be used for the natural image size, one of
+% mediabox, cropbox, bleedbox, trimbox, artbox. The default is driver-specific.
+% \end{description}
+%
+% The arguments are interpreted left to right. |clip|, |draft|, |bb|,,
+% and |bbllx| etc.\ have the same effect wherever they appear. but the
+% scaling and rotation keys interact.
+%
+% Any scaling that is specified \emph{before} rotation, is handled by
+% the internal graphics inclusion function. Rotation, or any later
+% scaling is handled by implicitly calling |\rotatebox| or |\scalebox|.
+% So |[height=1in,angle=90]| scales the graphic to 1in, then rotates it,
+% so it is one inch wide. |[angle=90,height=1in]| first rotates, then
+% scales the result so that it is 1in high. A driver that can scale
+% included graphics, but not arbitrary text will not be able to support
+% the second form, as it will require a call to |\scalebox|, but the
+% first form should work as there the scaling is handled by
+% |\Ginclude@graphics|.
+%
+% \DescribeMacro
+% \rotatebox\oarg{key-val list}\marg{angle}\marg{text}\\
+% Rotate \emph{text}.
+%
+% The keys supported by |\rotatebox| are:
+% \begin{description}
+% \item[origin] Specify the centre of rotation. |origin=|\meta{label},
+% where the labels are up to two of |lrctbB| (|B| denotes the
+% baseline, as for PSTricks).
+% \item[x,y] An alternative to
+% |origin|. |x=|\meta{dimen}|,y=|\meta{dimen} The $x,y$ coordinate of
+% the centre of rotation. As usual |\height| etc may be used.
+% \item[units] Specify the units used in the main argument. eg
+% |units=-360| would mean that the argument referred to degrees
+% \emph{clockwise} instead of the default anti-clockwise rotation.
+% \end{description}
+%
+% As an example |\rotatebox[origin=c]{180}{text}| will rotate ``text''
+% around its centre, thus creating a final box of the same dimensions as
+% the original box. This is to be contrasted to the default behaviour,
+% which rotates around the reference point on the baseline, thus
+% producing a box that is mainly \emph{below} the baseline.
+%
+% \StopEventually{}
+%
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% One new option is handled by keyval. It suppresses the error
+% normally generated if an unknow keyval key is used.
+% (This helps porting between drivers that use extended interfaces.)
+% \changes{v1.0e}{1999/01/10}{new unknownkeysallowed option}
+% \begin{macrocode}
+\DeclareOption{unknownkeysallowed}
+ {\PassOptionsToPackage\CurrentOption{keyval}}
+% \end{macrocode}
+%
+% All other options are handled by the \textsf{graphics} package.
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+%
+% This package requires these two building blocks.
+% \begin{macrocode}
+\RequirePackage{keyval,graphics}
+% \end{macrocode}
+%
+%
+% \subsection{Graphics Inclusion}
+%
+%
+% First we declare the `bounding box' keys. These all use
+% |\Gin@defaultbp| so that the \meta{value} can be given as a length in
+% the usual \TeX\ units such as |cm| or as an integer, taken as |bp|.
+%
+% \begin{key}{Gin}{bb}
+% \begin{macrocode}
+\define@key{Gin}{bb}
+ {\Gin@bboxtrue\Gread@parse@bb#1 \\}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{bbllx}
+% \begin{key}{Gin}{bblly}
+% \begin{key}{Gin}{bburx}
+% \begin{key}{Gin}{bbury}
+% \changes{v0.3b}{1994/03/11}{use bbllx not llx}
+% \changes{v0.3b}{1994/03/11}{add natheight and natwidth}
+% \changes{v0.6a}{1995/04/11}{New \cs{Gin@defaultbb} code}
+% \changes{v0.6b}{1995/06/26}{typos fixed for graphics/1685}
+% \begin{macrocode}
+\define@key{Gin}{bbllx}
+ {\Gin@bboxtrue\Gin@defaultbp\Gin@llx{#1}}
+\define@key{Gin}{bblly}
+ {\Gin@bboxtrue\Gin@defaultbp\Gin@lly{#1}}
+\define@key{Gin}{bburx}
+ {\Gin@bboxtrue\Gin@defaultbp\Gin@urx{#1}}
+\define@key{Gin}{bbury}
+ {\Gin@bboxtrue\Gin@defaultbp\Gin@ury{#1}}
+% \end{macrocode}
+% \end{key}
+% \end{key}
+% \end{key}
+% \end{key}
+%
+% \begin{key}{Gin}{hiresbb}
+% \changes{v1.0b}{1996/10/29}
+% {hiresbb key added}
+% If set to true (the default) \TeX\ will look for bounding box
+% comments of the form |%%HiResBoundingBox| (which typically have
+% real values) instead of the standard |%%BoundingBox| (which should
+% have integer values).
+% It may be set to false to override a package option of hiresbb.
+% \begin{macrocode}
+\define@key{Gin}{hiresbb}[true]{%
+ \edef\Gread@BBox{%
+ \@percentchar\@percentchar
+ \csname if#1\endcsname HiRes\fi
+ BoundingBox}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{natheight}
+% \begin{key}{Gin}{natheight}
+% \changes{v0.6d}{1995/09/22}
+% {typos fixed in natheight and natwidth keys}
+% \begin{macrocode}
+\let\KV@Gin@natwidth\KV@Gin@bburx
+\let\KV@Gin@natheight\KV@Gin@bbury
+% \end{macrocode}
+% \end{key}
+% \end{key}
+%
+% \begin{key}{Gin}{viewport}
+% \begin{key}{Gin}{trim}
+% \changes{v0.6a}{1995/04/11}{viewport and trim keys added}
+% \changes{v0.6c}{1995/09/07}{arithmetic in viewport key fixed}
+% A `viewport' is a user-specified area of the graphic to be included.
+% It should not be confused with the `Bounding Box' of a PS file.
+% In fact, the origin for a viewport specification is the (llx,lly)
+% lower left coordinate of the bounding box. If a viewport is
+% specified, and clipping is turned on, clipping is based on the
+% viewport, not on the boundingbox.
+%
+% Both `viewport' and `trim' were suggested (and originally, but
+% differently, implemented) by Arthur Ogawa.
+% \begin{macrocode}
+\define@key{Gin}{viewport}
+ {\let\Gin@viewport@code\Gin@viewport\Gread@parse@vp#1 \\}
+\define@key{Gin}{trim}
+ {\let\Gin@viewport@code\Gin@trim\Gread@parse@vp#1 \\}
+% \end{macrocode}
+% \end{key}
+% \end{key}
+%
+% \begin{macro}{\Gread@parse@vp}
+% Grabs four bounding box values like |\Gread@parse@bp| but saves them
+% in alternative macros that are used in the viewport and trim cases to
+% modify the bounding box read from the file.
+% \begin{macrocode}
+\def\Gread@parse@vp#1 #2 #3 #4 #5\\{%
+ \Gin@defaultbp\Gin@vllx{#1}%
+ \Gin@defaultbp\Gin@vlly{#2}%
+ \Gin@defaultbp\Gin@vurx{#3}%
+ \Gin@defaultbp\Gin@vury{#4}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@viewport}
+% \changes{v1.0c}{1996/10/31}{Original bb saved}
+% If a viewport is specified, reset the bounding box coordinates
+% by adding the original origin, |\Gin@llx|, |\Gin@lly| to the new
+% values specified as the viewport. The original Bounding box
+% coordinates are saved in |\Gin@ollx|\ldots\ some drivers
+% might need this information (currently just |tcidvi|).
+% \begin{macrocode}
+\def\Gin@viewport{%
+ \let\Gin@ollx\Gin@llx
+ \let\Gin@olly\Gin@lly
+ \let\Gin@ourx\Gin@urx
+ \let\Gin@oury\Gin@ury
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@
+ \edef\Gin@urx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@
+ \edef\Gin@ury{\strip@pt\dimen@}%
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
+ \edef\Gin@llx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
+ \edef\Gin@lly{\strip@pt\dimen@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@trim}
+% \changes{v1.0c}{1996/10/31}{Original bb saved}
+% If a trim is specified, reset the bounding box coordinates
+% by trimming the four specified values off each side of the
+% graphic.
+% \begin{macrocode}
+\def\Gin@trim{%
+ \let\Gin@ollx\Gin@llx
+ \let\Gin@olly\Gin@lly
+ \let\Gin@ourx\Gin@urx
+ \let\Gin@oury\Gin@ury
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
+ \edef\Gin@llx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
+ \edef\Gin@lly{\strip@pt\dimen@}%
+ \dimen@\Gin@urx\p@\advance\dimen@ -\Gin@vurx\p@
+ \edef\Gin@urx{\strip@pt\dimen@}%
+ \dimen@\Gin@ury\p@\advance\dimen@ -\Gin@vury\p@
+ \edef\Gin@ury{\strip@pt\dimen@}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@vllx}
+% \begin{macro}{\Gin@vlly}
+% \begin{macro}{\Gin@vurx}
+% \begin{macro}{\Gin@vury}
+% Four macros to hold the modifiers for the bounding box for viewport
+% and trim specifications.
+% \begin{macrocode}
+\let\Gin@vllx\Gin@llx\let\Gin@vlly\Gin@llx
+\let\Gin@vurx\Gin@llx\let\Gin@vury\Gin@llx
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{key}{Gin}{angle}
+% Specify a rotation. This is just handled by wrapping the
+% |\includegraphics| command in a call to the internal version of
+% |\rotatebox|. Normally this is the `standard' version but if an
+% |origin| key is used in |\includegraphics| then the \emph{keyval}
+% version of origin is used, and the |origin| key is passed on.
+% \begin{macrocode}
+\define@key{Gin}{angle}
+ {\Gin@esetsize
+ \@tempswatrue
+ \edef\@tempa{\toks@{\noexpand\Gin@erotate{#1}{\the\toks@}}}%
+ \@tempa}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{origin}
+% Pass the origin key value on to |\rotatebox|. |\Gin@erotate| is
+% initialised to |\Grot@box@std| later in the file, after the latter has
+% been defined.
+% \changes{v0.6e}{1995/09/28}
+% {key added}
+% \begin{macrocode}
+\define@key{Gin}{origin}[c]{%
+ \def\Gin@erotate{\Grot@box@kv[origin=#1]}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{width}
+% \begin{key}{Gin}{height}
+% Save the required height and width. The actual scaling is done later.
+% \begin{macrocode}
+\define@key{Gin}{width}{\def\Gin@ewidth{#1}}
+\define@key{Gin}{height}{\def\Gin@eheight{#1}}
+% \end{macrocode}
+% \end{key}
+% \end{key}
+%
+% \begin{key}{Gin}{totalheight}
+% \changes{v0.6a}{1995/04/11}{New totalheight key}
+% The same as |height| key, but locally changes |\Gin@eresize| to
+% |\totalheight| from its default value of |\height|.
+% \begin{macrocode}
+\define@key{Gin}{totalheight}{%
+ \def\Gin@eresize{\totalheight}\def\Gin@eheight{#1}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{keepaspectratio}
+% Boolean valued key (like |clip|). If it is set to true,
+% modify the meaning of the |width| and |height| (and |totalheight|)
+% keys such that if both are specified then rather than distort the
+% figure the figure is scaled such that neither dimension \emph{exceeds}
+% the stated dimensions.
+% \changes{v0.6e}{1995/09/28}
+% {key added}
+% \changes{v0.6h}{1995/12/06}
+% {Name changed to keepaspectratio}
+% \begin{macrocode}
+\define@key{Gin}{keepaspectratio}[true]{%
+ \lowercase{\Gin@boolkey{#1}}{iso}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{scale}
+% \changes{v0.6h}{1995/12/06}
+% {Use \cs{Gin@exclamation}}
+% If the scaling is being handled externally, wrap |\includegraphics| in
+% the internal form of |\scalebox|, otherwise locally define
+% |\Gin@req@sizes| to calculate the required sizes based on
+% scale factor.
+% \begin{macrocode}
+\define@key{Gin}{scale}{%
+ \if@tempswa
+ \edef\@tempa{\toks@{\noexpand\Gscale@box{#1}[#1]{\the\toks@}}}%
+ \@tempa
+ \else
+ \def\Gin@req@sizes{%
+ \def\Gin@scalex{#1}\let\Gin@scaley\Gin@exclamation
+ \Gin@req@height\Gin@scalex\Gin@nat@height
+ \Gin@req@width\Gin@scalex\Gin@nat@width}%
+ \fi
+ \@tempswatrue}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{draft}
+% Locally set the draft switch to true. This is used by the code in
+% \textsf{graphics} package to suppress the file inclusion.
+% \begin{macrocode}
+\define@key{Gin}{draft}[true]{%
+ \lowercase{\Gin@boolkey{#1}}{draft}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{clip}
+% Locally set the clip switch to true. This is used by the code in
+% \textsf{graphics} package to suppress the printing of anything outside
+% the bounding box specified.
+% \begin{macrocode}
+\define@key{Gin}{clip}[true]{%
+ \lowercase{\Gin@boolkey{#1}}{clip}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{type}
+% If you use `type' you must use no extension in the main argument
+% and you must use `ext'. You can also use `read' and `command'.
+% \changes{v0.5a}{1994/11/29}
+% {remove \cs{Gin@sep}}
+% \begin{macrocode}
+\define@key{Gin}{type}{%
+ \def\Ginclude@graphics##1{%
+ \begingroup
+ \def\Gin@base{##1}%
+ \edef\@tempa{{#1}{\Gin@eread}{\Gin@ecom{##1\Gin@eext}}}%
+ \expandafter\Gin@setfile\@tempa
+ \endgroup}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{ext}
+% \changes{v1.0d}{1997/06/09}{initialise ext to empty}
+% Specify an extension, for use with the `type' key.
+% \begin{macrocode}
+\define@key{Gin}{ext}{\def\Gin@eext{#1}}
+\let\Gin@eext\@empty
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{read}
+% Specify a read file, for use with the `type' key.
+% You may want to globally set this to |*| using |\setkeys|.
+% |*| means read the graphic file for size info, as in
+% |\DeclareGraphicsRule|.
+% \changes{v0.5a}{1994/11/29}
+% {Add default * possibility.}
+% \begin{macrocode}
+\define@key{Gin}{read}{%
+ \def\Gin@eread{#1}%
+ \def\@tempa{*}\ifx\@tempa\Gin@eread\def\Gin@eread{\Gin@eext}\fi}
+\let\Gin@eread\@empty
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{command}
+% Specify a command, for use with the `type' key.
+% \begin{macrocode}
+\define@key{Gin}{command}{\def\Gin@ecom##1{#1}}
+\let\Gin@ecom\@firstofone
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{decodearray}
+% \changes{v1.1b}{2017/06/25}{New decodearray key}
+% For manipulating bitmap images.
+% \begin{macrocode}
+\define@key{Gin}{decodearray}{%
+ \def\Gin@decode{#1}%
+}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{quiet}
+% \changes{v1.1a}{2017/06/01}{New quiet key}
+% Skip writing to the log.
+% \begin{macrocode}
+\define@key{Gin}{quiet}{%
+ \let\Gin@log\@gobble
+}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{page}
+% \changes{v1.1a}{2017/06/01}{New page key}
+% Page of a multi-page (PDF) graphic.
+% \begin{macrocode}
+\define@key{Gin}{page}{%
+ \def\Gin@page{#1}%
+ \ifx\Gin@page\@empty
+ \else
+ \edef\Gin@page{\number\Gin@page}%
+ \fi
+}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{interpolate}
+% \changes{v1.1a}{2017/06/01}{New interpolate key}
+% Enable/disable interpolation of bitmap images by the viewer.
+% \begin{macrocode}
+\define@key{Gin}{interpolate}[true]{%
+ \lowercase{\Gin@boolkey{#1}}{interpolate}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{pagebox}
+% \changes{v1.1a}{2017/06/01}{New pagebox key}
+% Specify which PDF box to use for the natural image size in PDF inclusions.
+% \begin{macrocode}
+\define@key{Gin}{pagebox}{%
+ \expandafter\let\expandafter\Gin@pagebox
+ \csname Gin@pagebox@#1\endcsname
+ \ifx\Gin@pagebox\relax
+ \let\Gin@pagebox\Gin@pagebox@cropbox
+ \@warning{%
+ Unknown value `#1' for `pagebox'.\MessageBreak
+ Supported values:\MessageBreak
+ mediabox, cropbox, bleedbox, trimbox, artbox%
+ }%
+ \fi
+ }
+ \def\Gin@pagebox@mediabox{mediabox}%
+ \def\Gin@pagebox@cropbox{cropbox}%
+ \def\Gin@pagebox@bleedbox{bleedbox}%
+ \def\Gin@pagebox@trimbox{trimbox}%
+ \def\Gin@pagebox@artbox{artbox}%
+% \end{macrocode}
+% \end{key}
+%
+% \begin{macro}{\Gin@boolkey}
+% Helper function for defining boolean valued functions. The order of
+% arguments allows |\lowercase| to only act on the user-supplied
+% argument.
+% \changes{v0.4a}{1994/04/14}{Make `empty'!=true so clip!= works}
+% \begin{macrocode}
+\def\Gin@boolkey#1#2{%
+ \csname Gin@#2\ifx\relax#1\relax true\else#1\fi\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@esetsize}
+% \changes{v0.6h}{1995/12/06}
+% {Use \cs{Gin@exclamation}}
+% Arrange for the final size to be set, either by wrapping the include
+% graphics call in |\scalebox|, or by redefining |\Gin@req@sizes|
+% appropriately.
+% \begin{macrocode}
+\def\Gin@eresize{\height}
+\def\Gin@esetsize{%
+ \let\@tempa\Gin@exclamation
+ \if@tempswa
+% \end{macrocode}
+% External. Wrap the |\includegraphics| command in a call to the
+% internal form of |\scalebox| to handle the rotation.
+% \begin{macrocode}
+ \edef\@tempa{\toks@{\noexpand
+ \Gscale@@box\noexpand\Gin@eresize
+ {\Gin@ewidth}{\Gin@eheight}{\the\toks@}}}%
+ \@tempa
+ \else
+% \end{macrocode}
+% Internal. Handle scaling with the |\includegraphics| command directly
+% rather than calling |\scalebox|.
+% \begin{macrocode}
+ \ifx\Gin@ewidth\@tempa
+ \ifx\Gin@eheight\@tempa
+% \end{macrocode}
+% No resizing.
+% \begin{macrocode}
+ \else
+% \end{macrocode}
+% Just height specified.
+% \changes{v0.6e}{1995/09/28}
+% {Use \cs{setlength} to support calc package}
+% \changes{v0.6h}{1995/12/06}
+% {Use \cs{Gin@exclamation}}
+% \begin{macrocode}
+ \let\Gin@@eheight\Gin@eheight
+ \def\Gin@req@sizes{%
+ \Gscale@div\Gin@scaley\Gin@@eheight\Gin@nat@height
+ \let\Gin@scalex\Gin@exclamation
+ \setlength\Gin@req@height\Gin@@eheight
+ \Gin@req@width\Gin@scaley\Gin@nat@width}%
+ \fi
+ \else
+ \ifx\Gin@eheight\@tempa
+% \end{macrocode}
+% Just width specified.
+% \changes{v0.6e}{1995/09/28}
+% {Use \cs{setlength} to support calc package}
+% \changes{v0.6h}{1995/12/06}
+% {Use \cs{Gin@exclamation}}
+% \begin{macrocode}
+ \let\Gin@@ewidth\Gin@ewidth
+ \def\Gin@req@sizes{%
+ \Gscale@div\Gin@scalex\Gin@@ewidth\Gin@nat@width
+ \let\Gin@scaley\Gin@exclamation
+ \setlength\Gin@req@width\Gin@@ewidth
+ \Gin@req@height\Gin@scalex\Gin@nat@height}%
+ \else
+% \end{macrocode}
+% Both height and width specified.
+% \begin{macrocode}
+ \let\Gin@@ewidth\Gin@ewidth
+ \let\Gin@@eheight\Gin@eheight
+% \end{macrocode}
+% \changes{v0.6g}{1995/11/10}
+% {Use \cs{ifGin@iso} to support isoscale key}
+% At this point can locally redefine |\Gin@nosize|. Instead
+% of generating an error, just set the `natural' size to be the
+% `requested size'. Previous versions of this package did not
+% allow the use of |height| and |width| unless the natural size was
+% known as otherwise \LaTeX\ can not calculate the scale factor.
+% However many drivers (especially for bitmap formats) can work this out
+% themselves, so as long as both |height| and |width| are given, so
+% \LaTeX\ knows the size to leave, accept this. This assumes the code in
+% the driver file will use the `required height' information, not the
+% scale factors, which will be set to 1!.
+% \changes{v1.0a}{1996/08/05}
+% {Missing percent added for graphics/2244}
+% \begin{macrocode}
+ \def\Gin@nosize##1{%
+ \KV@Gin@natwidth\Gin@@ewidth
+ \KV@Gin@natheight\Gin@@eheight}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \def\Gin@req@sizes{%
+ \Gscale@div\Gin@scalex\Gin@@ewidth\Gin@nat@width
+ \Gscale@div\Gin@scaley\Gin@@eheight\Gin@nat@height
+% \end{macrocode}
+% \changes{v0.6f}{1995/09/29}
+% {Use \cs{ifGin@iso} to support isoscale key}
+% Donald Arseneau requested this feature. If both |height|
+% and |width| are chosen, choose the smaller scale factor rather than
+% distort the graphic. This mode is turned on with the
+% \textsf{keepaspectratio} key.
+% \begin{macrocode}
+ \ifGin@iso
+ \ifdim\Gin@scaley\p@>\Gin@scalex\p@
+ \let\Gin@scaley\Gin@scalex
+ \else
+ \let\Gin@scalex\Gin@scaley
+ \fi
+ \fi
+ \Gin@req@width\Gin@scalex\Gin@nat@width
+ \Gin@req@height\Gin@scaley\Gin@nat@height}%
+ \fi
+ \fi
+ \fi
+ \let\Gin@ewidth\Gin@exclamation
+ \let\Gin@eheight\Gin@ewidth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@req@height}
+% \begin{macro}{\Gin@req@width}
+% The required final size.
+% \begin{macrocode}
+\newdimen\Gin@req@height
+\newdimen\Gin@req@width
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gin@outer@scalex}
+% \begin{macro}{\Gin@outer@scaley}
+% Scale factors to pass to |\scalebox|.
+% \begin{macrocode}
+\let\Gin@outer@scalex\relax
+\let\Gin@outer@scaley\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gin@angle}
+% Rotation angle.
+% \begin{macrocode}
+\let\Gin@angle\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@ewidth}
+% \changes{v0.6h}{1995/12/06}
+% {Use \cs{Gin@exclamation}}
+% \begin{macro}{\Gin@eheight}
+% Final size, initialised for no scaling.
+% \begin{macrocode}
+\let\Gin@ewidth\Gin@exclamation
+\let\Gin@eheight\Gin@ewidth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gin@scalex}
+% \begin{macro}{\Gin@scaley}
+% \changes{v0.6h}{1995/12/06}
+% {Use \cs{Gin@exclamation}}
+% Scale factors. Initialised for no scaling.
+% \begin{macrocode}
+\def\Gin@scalex{1}
+\let\Gin@scaley\Gin@exclamation
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Gin@i}
+% Use the same top level |\includegraphics| command as the standard
+% interface. This will set the clipping switch, and then call |\Gin@i|.
+% \changes{v0.3c}{1994/03/15}{Dont locally initialise width/height}
+% \changes{v0.3c}{1994/03/15}{Always call \cmd{\Gin@ii}}
+% \changes{v0.4c}{1994/09/12}{Use `standard' version if two opt.\ args.}
+% \begin{macrocode}
+\def\Gin@i{%
+ \def\Gin@req@sizes{%
+ \Gin@req@height\Gin@nat@height
+ \Gin@req@width\Gin@nat@width}%
+ \@ifnextchar[\Gin@ii{\Gin@ii[]}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Gin@ii}
+% Look for a second optional argument.
+% If one optional argument is present, call |\setkeys| to process it,
+% \begin{macrocode}
+\def\Gin@ii[#1]#2{%
+ \def\@tempa{[}\def\@tempb{#2}%
+ \ifx\@tempa\@tempb
+ \def\@tempa{\Gin@iii[#1][}%
+ \expandafter\@tempa
+ \else
+ \begingroup
+ \@tempswafalse
+ \toks@{\Ginclude@graphics{#2}}%
+ \setkeys{Gin}{#1}%
+ \Gin@esetsize
+ \the\toks@
+ \endgroup
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.4b}{1994/05/06}
+% {Remove incorrect initialisation of \cs{Gin@scalex}}
+%
+% \section{Rotation}
+%
+% \begin{macro}{\rotatebox}
+% Look for an optional argument.
+% \changes{v0.3b}{1994/03/11}{Remove star form}
+% \changes{v1.0g}{2014/04/25}{\cs{leavevmode} added graphics/1521}
+% \begin{macrocode}
+\def\rotatebox{%
+ \leavevmode
+ \@ifnextchar[\Grot@box@kv\Grot@box@std}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Grot@box@std}
+% If no KV argument, just repeat the standard definition.
+% \changes{v1.0g}{2014/04/25}{Made long graphics/4296}
+% \begin{macrocode}
+\long\def\Grot@box@std#1#2{%
+ \Grot@setangle{#1}%
+ \setbox\z@\hbox{{#2}}%
+ \Grot@x\z@
+ \Grot@y\z@
+ \Grot@box}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Grot@box@kv}
+% \changes{v1.0g}{2014/04/25}{Made long graphics/4296}
+% \begin{macrocode}
+\long\def\Grot@box@kv[#1]#2#3{%
+ \@begin@tempboxa\hbox{#3}%
+ \Grot@x\width \divide\Grot@x\tw@
+ \Grot@y\height \advance\Grot@y-\depth \divide\Grot@y\tw@
+ \setkeys{Grot}{#1}%
+ \setbox\z@\box\@tempboxa
+ \Grot@setangle{#2}%
+ \Grot@box
+ \@end@tempboxa}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% There are two ways of specifying the centre of rotation.
+%
+% \begin{key}{Grot}{origin}
+% |origin=|\meta{label}, where the labels are up to two of |lrctbB|
+% (|B| denotes the baseline, as for PSTricks).
+% \begin{macrocode}
+\define@key{Grot}{origin}[c]{%
+ \@tfor\@tempa:=#1\do{%
+ \if l\@tempa \Grot@x\z@\else
+ \if r\@tempa \Grot@x\width\else
+ \if t\@tempa \Grot@y\height\else
+ \if b\@tempa \Grot@y-\depth\else
+ \if B\@tempa \Grot@y\z@\fi\fi\fi\fi\fi}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Grot}{x}
+% \begin{key}{Grot}{y}
+% |x=|\meta{dimen}|,y=|\meta{dimen} The $x,y$ coordinate of the centre
+% of rotation. As usual |\height| etc may be used.
+% \begin{macrocode}
+\define@key{Grot}{x}{\setlength\Grot@x{#1}}
+\define@key{Grot}{y}{\setlength\Grot@y{#1}}
+% \end{macrocode}
+% \end{key}
+% \end{key}
+%
+% \begin{key}{Grot}{units}
+% `units' specifies the number or units in one anti-clockwise circle.
+% So the default is $360$. $-360$ gives clockwise rotation, $6.283185$
+% gives radians etc.
+% \begin{macrocode}
+\define@key{Grot}{units}{%
+ \def\Grot@setangle##1{%
+ \dimen@##1\p@
+ \dimen@ii#1\p@
+ \divide\dimen@ii360\relax
+ \divide\dimen@\dimen@ii
+ \edef\Grot@angle{\number\dimen@}}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{macro}{\Gin@erotate}
+% Initialise the rotation command to use in |\includegraphics|.
+% \changes{v0.6e}{1995/09/28}{macro added}
+% \begin{macrocode}
+\let\Gin@erotate\Grot@box@std
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/required/graphics/graphicx.pdf b/macros/latex-dev/required/graphics/graphicx.pdf
new file mode 100644
index 0000000000..6137b786f8
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..cd6d72046e
--- /dev/null
+++ b/macros/latex-dev/required/graphics/grfguide.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/grfguide.tex b/macros/latex-dev/required/graphics/grfguide.tex
new file mode 100644
index 0000000000..b00a86d307
--- /dev/null
+++ b/macros/latex-dev/required/graphics/grfguide.tex
@@ -0,0 +1,1031 @@
+%% grfguide.tex Copyright (C) 1994 1995 1996 1998 1999 David Carlisle
+%% Copyright (C) 2005 2014 2016 2017 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%% This file has the LPPL maintenance status "maintained".
+
+\begin{filecontents*}{a.ps}
+%!
+%%BoundingBox:0 0 72 72
+0 0 moveto
+72 72 rlineto
+72 neg 0 rlineto
+72 72 neg rlineto
+stroke
+0 0 moveto
+/Times-Roman findfont
+72 scalefont
+setfont
+(A) show
+showpage
+\end{filecontents*}
+\begin{filecontents*}{a.pdf}
+%PDF-1.4
+%%%%%
+1 0 obj
+<<
+/Pages 2 0 R
+/Type /Catalog
+>>
+ endobj
+2 0 obj
+<<
+/Kids [3 0 R]
+/Type /Pages
+/Count 1
+>>
+ endobj
+3 0 obj
+<<
+/Rotate 0
+/Parent 2 0 R
+/MediaBox [0 0 72 72]
+ /Resources
+<<
+/ExtGState 4 0 R
+/Font 5 0 R
+/ProcSet [/PDF /Text]
+>>
+/pdftk_PageNum 1
+/Type /Page
+/Contents 6 0 R
+>>
+ endobj
+4 0 obj
+<<
+/R7 7 0 R
+>>
+ endobj
+5 0 obj
+<<
+/R8 8 0 R
+>>
+ endobj
+6 0 obj
+<<
+/Length 135
+>>
+stream
+q 0.1 0 0 0.1 0 0 cm
+/R7 gs
+10 w
+0 G
+0 0 m
+720 720 l
+0 720 l
+720 0 l
+S
+0 g
+q
+10 0 0 10 0 0 cm BT
+/R8 72 Tf
+1 0 0 1 0 0 Tm
+(A)Tj
+ET
+Q
+Q
+
+ endstream
+ endobj
+7 0 obj
+<<
+/Type /ExtGState
+/OPM 1
+>>
+ endobj
+8 0 obj
+<<
+/BaseFont /Times-Roman
+/LastChar 65
+/Subtype /Type1
+/FontDescriptor 9 0 R
+/Widths [722]
+/Type /Font
+/Encoding /WinAnsiEncoding
+/FirstChar 65
+>>
+ endobj
+9 0 obj
+<<
+/FontName /Times-Roman
+/StemV 105
+/CharSet (/A)
+/Ascent 674
+/Flags 65568
+/Descent 0
+/ItalicAngle 0
+/MissingWidth 250
+/FontBBox [0 0 706 674]
+/Type /FontDescriptor
+/CapHeight 674
+>>
+ endobj
+10 0 obj
+<<
+/Producer (GPL Ghostscript 9.06)
+/ModDate (D:20140426202438+01'00')
+/CreationDate (D:20140426202438+01'00')
+>>
+endobj xref
+0 11
+0000000000 65535 f
+0000000015 00000 n
+0000000066 00000 n
+0000000125 00000 n
+0000000308 00000 n
+0000000341 00000 n
+0000000374 00000 n
+0000000563 00000 n
+0000000610 00000 n
+0000000774 00000 n
+0000000975 00000 n
+trailer
+
+<<
+/Info 10 0 R
+/Root 1 0 R
+/Size 11
+/ID [<4ca1370d594acd28b9d948a5e8b925c3> <4ca1370d594acd28b9d948a5e8b925c3>]
+>>
+startxref
+1106
+%%EOF
+\end{filecontents*}
+\documentclass{ltxguide}
+
+%%% No driver option specified
+%%% set up the files color.cfg and graphics.cfg for your site.
+%%% for example:
+%%%
+%%% \ExecuteOptions{dvips}
+%%%
+\usepackage{color,graphicx,shortvrb}
+
+%% Just as an example, and to make sure, in case some
+%% driver option has not declared a default rule for
+%% .ps files:
+%\DeclareGraphicsRule{.ps}{eps}{.ps}{}
+%\DeclareGraphicsExtensions{.pdf,.ps}
+%% Which means:
+%% .ps files are (to be treated as) EncapsulatedPostScript
+%% files. The .ps file is to be read for the BoundingBox.
+%% No `special' commands need to be applied by the driver.
+
+
+\renewcommand\star{{\ttfamily*}}
+
+\let\package\textsf
+
+\newlength{\gxlen}
+\settowidth{\gxlen}{\package{graphicx}: }
+\newcommand\gs{\makebox[\gxlen][l]{\package{graphics}:}}
+\newcommand\gx{\makebox[\gxlen][l]{\package{graphicx}:}}
+
+\MakeShortVerb{\|}
+
+\begin{document}
+\title{Packages in the `graphics' bundle}
+\author{D. P. Carlisle \and The \LaTeX3 Project}
+\date{2017-06-01}
+
+\maketitle
+
+\tableofcontents
+
+\section{Introduction}
+This document serves as a user-manual for the packages \package{color},
+\package{graphics}, and \package{graphicx}. Further documentation may be
+obtained by processing the source (|dtx|) files of the individual
+packages.
+
+\section{Driver support}\label{drivers}
+All these packages rely on features that are not in \TeX\ itself.
+These features must be supplied by the `driver' used to print the
+|dvi| file. Unfortunately not all drivers support the same features, and
+even the internal method of accessing these extensions varies between
+drivers. Consequently all these packages take options such as
+`|dvips|' to specify which driver is being used.
+
+Normally you should \emph{not} specify the driver option explicitly
+in the document, but allow it to be defaulted automatically.
+This allows the document to be portable between different systems.
+
+Your \TeX\ distribution should have included |graphics.cfg| and
+|color.cfg| configuration files to specify these defaults.
+Standard versions of the configuration files are maintained by the
+\LaTeX\ Project and distributed in the CTAN |graphics-cfg| collection.
+
+For special requirements you may edit a copy of these |cfg| files
+to set up a site default for these options. Suppose that you wish
+the \package{color} package to always default to use specials for the
+PostScript driver, |dvisvgm|. In that case, create a file |color.cfg|
+containing the line:\\
+|\ExecuteOptions{dvisvgm}|\\
+Normally you will want an identical file |graphics.cfg| to set a similar
+default for the graphics packages.
+
+The following driver options are declared in the packages.
+The matching definition files (\emph{driver}|.def|)
+are now also maintained by the \LaTeX\ project,
+but distributed separately, in the CTAN |graphics-def| collection.
+\begin{quote}\raggedright
+ |dvipdfmx|, |dvips|, |dvisvgm|, |luatex|, |pdftex|, |xetex|
+\end{quote}
+
+
+The following two options are also supported, they do not correspond
+to separate definition files, but are essentially aliases for the
+|dvips| option (and |monochrome| in the case of |xdvi|).
+\begin{quote}\raggedright
+ |xdvi|, |oztex|
+\end{quote}
+
+The following set of options are supported by these packages
+with associated driver files extracted from the |drivers.dtx|
+documented source in this bundle. These are now, mainly of historic
+interest but the documented sources do contain some useful code
+and advice if you need to produce a new definition file for a new
+driver or \TeX\ system. |drivers.dtx| also contains documented
+sources for older driver files that are no longer extracted.
+\begin{quote}\raggedright
+ |dvipdf|, |dvipdfm|, |dviwin|, |dvipsone|,
+ |emtex|, |pctexps|, |pctexwin|, |pctexhp|, |pctex32|,
+ |truetex|, |tcidvi|, |vtex|
+\end{quote}
+
+The final driver option is an alias for |dvipsone|.
+\begin{quote}\raggedright
+ |dviwindo|
+\end{quote}
+
+
+\section[Colour]{Colour\footnote{%
+The basic \package{color} package functionality described here
+will be enough for many uses, however a much extended version
+is available in the contributed \package{xcolor} package, distributed
+and maintained separately. All the color commands described here are
+also available if you specify \package{xcolor} in your document.}%
+}
+The colour support is built around the idea of a system of
+\emph{Colour Models}. The Colour models supported by a driver vary,
+but typically include
+\begin{description}
+\item[rgb] Red Green Blue: A comma separated list of three numbers
+ between~0 and~1, giving the components of the colour.
+\item[cmyk] Cyan Magenta Yellow [K]Black: A comma separated list of
+ four numbers between~0 and~1, giving the components of the colour
+ according to the additive model used in most printers.
+\item[gray] Grey scale: a single number between~0 and~1.
+\item[named] Colours accessed by name, e.g.\ `JungleGreen'. Not all
+ drivers support this model. The names must either be `known' to the
+ driver or added using commands described in |color.dtx|. Some drivers
+ support an extended form of the named model in which an `intensity' of
+ the colour may also be specified, so `\mbox{JungleGreen, 0.5}' would
+ denote that colour at half strength.
+\end{description}
+Note that the \textbf{named} model is really just given as an example
+of a colour model that takes names rather than a numeric specification.
+Other options may be provided locally that provide different colour
+models, eg \textbf{pantone} (An industry standard set of colours),
+\textbf{x11} (Colour names from the X Window System), etc. The
+standard distribution does not currently have such models, but the
+\textbf{named} model could be used as an example of how to define a new
+colour model. The names used in the \textbf{named} model are those
+suggested by Jim Hafner in his \textsf{colordvi} and \textsf{foiltex}
+packages, and implemented originally in the |color.pro| header file for
+the \texttt{dvips} driver.
+
+\subsection{Package Options}
+Most of the options to the \package{color} package just specify a
+driver, e.g., \ |dvips|, as discussed in section~\ref{drivers}.
+
+One special option for the \package{color} package
+that is of interest is |monochrome.|
+If this option is selected the colour commands are all
+disabled so that they do not generate errors, but do not generate colour
+either. This is useful if previewing with a previewer that can not
+produce colour.
+
+Three other package options control the use of the \textbf{named} model.
+The |dvips| driver (by default) pre-defines 68 colour names. The |dvips|
+option normally makes these names available in the \textbf{named} colour
+model. If you do not want these names to be declared in this model
+(Saving \TeX\ some memory) you may give the |nodvipsnames|
+option. Conversely, if you are using another driver, you may wish to
+add these names to the named model for that driver (especially if you
+are processing a document originally produced on |dvips|). In this case
+you could use the |dvipsnames| option. Lastly the |usenames| option
+makes all names in the \textbf{named} model directly available, as
+described below.
+
+\subsection{Defining Colours}
+
+The colours |black|, |white|, |red|, |green|, |blue|, |cyan|,
+|magenta|, |yellow| should be predefined, but should you wish to mix
+your own colours use the |\definecolor| command.
+
+\begin{decl}
+|\definecolor|\arg{name}\arg{model}\arg{colour specification}
+\end{decl}
+
+
+This defines \m{name} as a colour which can be used in later colour
+commands. For example
+\begin{verbatim}
+\definecolor{light-blue}{rgb}{0.8,0.85,1}
+\definecolor{mygrey}{gray}{0.75}
+\end{verbatim}
+\definecolor{light-blue}{rgb}{0.8,0.85,1}
+\definecolor{mygrey}{gray}{0.75}
+
+Now |light-blue| and |mygrey| may be used in addition to the
+predefined colours above.
+
+\subsection{Using Colours}
+
+\subsubsection{Using predefined colours}
+The syntax for colour changes is designed to mimic font changes.
+The basic syntax is:
+
+\begin{decl}
+|\color|\arg{name}
+\end{decl}
+
+This is a \emph{declaration}, like |\bfseries| It changes the current
+colour to \m{name} until the end of the current group or
+environment.
+
+An alternative command syntax is to use a \emph{command} form that
+takes the text to be coloured as an \emph{argument}. This is similar
+to the font commands such as |\textbf|:
+
+\begin{decl}
+|\textcolor|\arg{name}\arg{text}
+\end{decl}
+
+
+So the above is essentially equivalent to
+|{\color|\arg{name}\emph{text}|}|.
+
+\subsubsection{Using colour specifications directly}
+
+
+\begin{decl}
+|\color|\oarg{model}\arg{specification}\\
+|\textcolor|\oarg{model}\arg{specification}\arg{text}
+\end{decl}
+
+Normally one would predeclare all the colours used in a package, or in
+the document preamble, but sometimes it is convenient to directly use
+a colour without naming it first. To achieve this |\color| (and all
+the other colour commands) take an optional argument specifying the
+model. If this is used then the mandatory argument takes a
+\m{colour specification} instead of a \m{name}. For example:\\
+|\color[rgb]{1,0.2,0.3}|\\
+would directly select that colour.
+
+This is particularly useful for accessing the \textbf{named} model:\\
+|\color[named]{BrickRed}| selects the |dvips| colour BrickRed.
+
+Rather than repeatedly use |[named]| you may use |\definecolor| to
+provide convenient aliases:\\
+|\definecolor{myred}{named}{WildStrawberry}|
+ \ldots\ |\color{myred}|\ \ldots
+
+Alternatively if you are happy to use the existing names from the
+\textbf{named} model, you may use the |usenames| package option, which
+effectively calls |\definecolor| on every colour in the \textbf{named}
+model, thus allowing |\color{WildStrawberry}| in addition to
+|\color[named]{WildStrawbery}|.
+
+\subsection{Named Colours}
+Using the \textbf{named} colour model has certain advantages over
+using other colour models.
+
+Firstly as the |dvi| file contains a request
+for a colour by \emph{name}, the actual mix of primary colours used to
+obtain the requested colour can be tuned to the characteristics of a
+particular printer. In the |dvips| driver the meanings of the colour
+names are defined in the header file |color.pro|. Users are encouraged
+to produce different versions of this file for any printers they use. By
+this means the same dvi file should produce colours of similar
+appearance when printed on printers with different colour
+characteristics.
+
+Secondly, apart from the so called `process colours' that are produced
+by mixing primary colours during the print process, one may want to use
+`spot' or `custom' colours. Here a particular colour name does not
+refer to a mix of primaries, but to a particular ink. The parts of the
+document using this colour will be printed separately using this named
+ink colour.
+
+\subsection{Page Colour}
+
+
+\begin{decl}
+|\pagecolor|\arg{name}\\
+|\pagecolor|\oarg{model}\arg{specification}\\
+|\nopagecolor|
+\end{decl}
+
+The background colour of the whole page can be set using
+|\pagecolor|. This takes the same argument forms as |\color| but sets
+the background colour for the current and all subsequent pages. It is
+a global declaration, so you need to use
+|\nopagecolor|\NEWfeature{2014/04/23}\ to `get back to normal'.
+If that is not supported, you may use |\pagecolor{white}| although that
+will make a white background rather than the default transparent background.
+
+\subsection{Box Backgrounds}
+Two commands similar to |\fbox| produce boxes with the backgrounds
+shaded an appropriate colour.
+
+\begin{decl}
+|\colorbox|\arg{name}\arg{text}\\
+|\colorbox|\oarg{model}\arg{specification}\arg{text}\\
+|\fcolorbox|\arg{name1}\arg{name2}\arg{text}\\
+|\fcolorbox|\oarg{model}%
+ \arg{specification1}\arg{specification2}\arg{text}
+\end{decl}
+
+
+The former produces a box coloured with \emph{name}
+\colorbox{mygrey}{like this}. The latter is similar but puts a frame of
+colour \emph{name1} around the box coloured \emph{name2}.
+
+These commands use the |\fbox| parameters |\fboxrule| and |\fboxsep|
+to determine the thickness of the rule, and the size of the shaded area.
+
+\subsection{Possible Problems}
+
+\TeX\ was not designed with colour in mind, and producing colours
+requires a lot of help from the driver program. Thus, depending on the
+driver, some or all features of the \package{color} package may not be
+available.
+
+Some drivers do not maintain a special `colour stack'. These drivers are
+likely to get confused if you nest colour changes, or use colours in
+floating environments.
+
+Some drivers do not maintain colours over a page break, so that if the
+page breaks in the middle of a coloured paragraph, the last part of the
+text will incorrectly be printed in black.
+
+There is a different type of problem that will occur for all drivers.
+Due to certain technical difficulties\footnote{At least two causes:
+1) The presence of a \texttt{\char`\\special} \m{whatsit} prevents
+\texttt{\char`\\addvspace} `seeing' space on the current vertical list,
+so causing it to incorrectly add extra vertical space. 2) A
+\m{whatsit} as the first item in a \texttt{\char`\\vtop} moves the
+reference point of the box.}%
+, it is possible that at points
+where the colour changes, the \emph{spacing} is affected. For this
+reason the |monochrome| option does not completely disable the colour
+commands, it redefines them to write to the log file. This will have the
+same effects on spacing, so you can produce monochrome drafts of your
+document, at least knowing that the final spacing is being shown.
+\section{The Graphics packages}
+There are two graphics packages:
+\begin{description}
+\item[\package{graphics}] The `standard' graphics package.
+\item[\package{graphicx}] The `extended' or `enhanced' graphics
+ package.
+\end{description}
+The two differ only in the format of optional arguments for the
+commands defined. The command names, and the mandatory arguments are
+the same for the two packages.
+
+\subsection{Package Options}
+As discussed in section~\ref{drivers}, the graphics packages share the
+same `driver' options as the \package{color} package. As for colour
+you should set up a site-default in a file,
+|graphics.cfg|, containing the line (for |dvips|):\\
+|\ExecuteOptions{dvips}|
+
+The graphics packages have some other options for controlling how many
+of the features to enable:
+\begin{description}
+\item[draft] suppress all the `special' features. In particular
+ graphics files are not included (but they are still read for size
+ info) just the filename is printed in a box of the correct size.
+\item[final] The opposite of |draft|. Useful to over-ride a global
+ |draft| option specified in the |\documentclass| command.
+\item[hiderotate] Do not show rotated text (presumably because the
+ previewer can not rotate).
+\item[hidescale] Do not show scaled text (presumably because the
+ previewer can not scale).
+\item[hiresbb] Look for size specifications in |%%HiResBoundingBox|
+ lines rather than standard |%%BoundingBox| lines.%
+ \NEWfeature{1996/10/29}
+\item[demo] Instead of inserting an image file |\includegraphics|
+ draws a 150\,pt by 100\,pt rectangle unless other dimensions are
+ specified manually.\NEWfeature{2006/02/20}
+\end{description}
+\subsection{Rotation}
+
+\begin{decl}
+\gs |\rotatebox|\arg{angle}\arg{text}\\
+\gx |\rotatebox|\oarg{key val list}\arg{angle}\arg{text}
+\end{decl}
+
+This puts \emph{text} in a box, like |\mbox|, but rotates the box
+through \emph{angle} degrees, \rotatebox{15}{like this}.
+
+The standard version always rotates around the reference point of the
+box, but the \package{keyval} version takes the following keys:
+
+\begin{decl}
+|origin|=\m{label}\\
+|x|=\m{dimen}\\
+|y|=\m{dimen}\\
+|units|=\m{number}
+\end{decl}
+
+So you may specify both |x| and |y|, which give the coordinate of
+the centre of rotation relative to the reference point of the box, eg
+|[x=2mm, y=5mm]|. Alternatively, for the most common points, one may use
+|origin| with a \emph{label} containing one or two of the following:
+|lrctbB| (|B| denotes the baseline, as for \package{PSTricks}). For
+example, compare a default rotation of $180^\circ$
+\ldots\rotatebox{180}{Like This}\ldots\ to the effects gained by using
+the |origin| key:\\
+|[origin = c]| rotates about the centre of the box,\ldots
+ \rotatebox[origin=c]{180}{Like This}\ldots\\
+|[origin = tr]| rotates about the top right hand corner\ldots
+ \rotatebox[origin=tr]{180}{Like This}\ldots
+
+The |units| key allows a change from the default units of degrees
+anti-clockwise. Give the number of units in one full anti-clockwise
+rotation. For example:\\
+|[units = -360]| specifies degrees clockwise.\\
+|[units= 6.283185]| specifies radians.
+
+\subsection{Scaling}
+
+\subsubsection{Scaling by scale factor}
+
+\begin{decl}
+|\scalebox|\arg{h-scale}\oarg{v-scale}\arg{text}
+\end{decl}
+
+Again this is basically like |\mbox| but scales the \emph{text}.
+If \emph{v-scale} is not specified it defaults to \emph{h-scale}.
+If it is specified the text is distorted as the horizontal and
+vertical stretches are different, \scalebox{3}[.7]{Like This}.
+
+
+\begin{decl}
+|\reflectbox|\arg{text}
+\end{decl}
+
+An abbreviation for |\scalebox{-1}[1]|\arg{text}.
+
+\subsubsection{Scaling to a requested size}
+
+\begin{decl}
+|\resizebox|\star\arg{h-length}\arg{v-length}\arg{text}
+\end{decl}
+
+ Scale \emph{text} so that the width is \emph{h-length}.
+ If |!| is used as either length argument, the other argument is used
+ to determine a scale factor that is used in both directions.
+ Normally \emph{v-length} refers to the height of the box, but in the
+ star form, it refers to the `height + depth'.
+ As normal for \LaTeXe\ box length arguments, |\height|,
+ |\width|, |\totalheight|, |\depth| may be used to refer to the
+ original size of the box.
+
+|\resizebox{1in}{\height}{Some text}|:
+\resizebox{1in}{\height}{Some text}
+
+|\resizebox{1in}{!}{Some text}|:
+\resizebox{1in}{!}{Some text}
+
+\subsection{Including Graphics Files}
+The functions for graphics inclusion try to give the same user syntax
+for including any kind of graphics file that can be understood by the
+driver. This relies on the file having an extension that identifies
+the file type. The `driver options' will define a collection of file
+extensions that the driver can handle, although this list may be
+extended using the declarations described below.
+
+If the file's extension is unknown to the driver, the system may try a
+default file type. The PostScript driver files set this default to be
+|eps| (PostScript), but this behaviour may be customised if other
+defaults are required.
+
+\begin{decl}
+\gs |\includegraphics|\star\oarg{llx,lly}\oarg{urx,ury}\arg{file}\\
+\gx |\includegraphics|\star\oarg{key val list}\arg{file}
+\end{decl}
+ Include a graphics file.
+
+ If \star\ is present, then the graphic is `clipped' to the size
+ specified. If \star\ is omitted, then any part of the graphic that is
+ outside the specified `bounding box' will over-print the surrounding
+ text.
+
+ If the optional arguments are omitted, then the size of the graphic
+ will be determined by reading an external file as described below.
+
+\paragraph{\package{graphics} version}
+ If \oarg{urx,ury} is present, then it should specify the coordinates
+ of the top right corner of the image, as a pair of \TeX\ dimensions.
+ If the units are omitted they default to |bp|. So |[1in,1in]| and
+ |[72,72]| are equivalent. If only one optional argument appears, the
+ lower left corner of the image is assumed to be at |[0,0]|. Otherwise
+ \oarg{llx,lly} may be used to specify the coordinates of this point.
+
+\paragraph{\package{graphicx} version}
+Here the star form is just for compatibility with the standard
+version. It just adds |clip| to the list of keys specified.
+(Also, for increased compatibility, if \emph{two} optional arguments are
+used, the `standard' version of |\includegraphics| is always used, even
+if the \package{graphicx} package is loaded.)
+
+The allowed keys are listed below.
+\begin{description}
+\item[bb] The argument should be four dimensions, separated by spaces.
+ These denote the `Bounding Box' of the printed region within
+ the file.
+\item[bbllx,bblly,bburx,bbury] Set the bounding box. Mainly for
+ compatibility with older packages.
+ Specifying |bbllx=a,bblly=b,bburx=c,bbury=d|
+ is equivalent to specifying |bb = a b c d|.
+\item[natwidth,natheight] Again an alternative to |bb|.
+ |natheight=h,natwidth=w| is equivalent to |bb = 0 0 h w|.
+\item[hiresbb]\NEWfeature{1996/10/29}
+ Boolean valued key. If set to |true| (just specifying |hiresbb|
+ is equivalent to |hiresbb=true|) then \TeX\ will look for
+ |%%HiResBoundingBox| lines rather than |%%BoundingBox|. It may be set
+ to |false| to overrule a default setting of |true| set by the
+ |hiresbb| package option.
+\item[pagebox]\NEWfeature{2017/06/01}
+PDF files do not have BoundingBox but may specify up to four predefined
+rectangles.
+
+|MediaBox|: the boundaries of the physical medium.
+|CropBox|: the region to which the contents of the page are to be
+ clipped when displayed.
+|BleedBox|: the region to which the contents of the
+ page should be clipped in production.
+|TrimBox|: the intended dimensions of the finished page.
+|ArtBox|: the extent of the page's meaningful content.
+
+The driver will set the image size based on |CropBox| if present,
+otherwise it will not use one of the others,
+with a driver-defined order of preference.
+|MediaBox| is always present.
+
+The |pagebox| key may be used to specify which bounding box specification to use,
+The value should be one of
+|mediabox|, |cropbox|, |bleedbox|, |trimbox|, |artbox|.
+\item[viewport]\NEWfeature{1995/06/01}
+ The |viewport| key takes four arguments, just like
+ |bb|. However in this case the values are taken relative to the
+ origin specified by the bounding box in the file. So to `view' the
+ 1in square in the bottom left hand corner of the area specified by
+ the bounding box, use the argument |viewport=0 0 72 72|.
+\item[trim]\NEWfeature{1995/06/01}
+ Similar to viewport, but here the four lengths specify the
+ amount to remove or add to each side. |trim= 1 2 3 4| `crops' the
+ picture by 1bp at the left, 2bp at the bottom, 3bp on the right and
+ 4bp at the top.
+\item[angle] Rotation angle.
+\item[origin]\NEWfeature{1995/09/28}
+ Origin for rotation. See the documentation of |\rotatebox|.
+\item[width] Required width. The
+ graphic is scaled to this width.
+\item[height] Required height. The
+ graphic is scaled to this height.
+\item[totalheight]\NEWfeature{1995/06/01}
+ Specify the total height (height $+$ depth) of the figure.
+ This will differ from the `height' if rotation has occurred.
+ In particular if the figure has been rotated by $-90^\circ$
+ then it will have zero height but large depth.
+\item[keepaspectratio]\NEWfeature{1995/09/27}
+ Boolean valued key like `clip'.
+ If set to true then specifying both `width' and `height' (or
+ `totalheight') does not distort the figure but scales such that
+ neither of the specified dimensions is \emph{exceeded}.
+\item[scale] Scale factor.
+\item[clip] Either `true' or `false' (or no value, which is equivalent
+ to `true'). Clip the graphic to the bounding box.
+\item[draft] a boolean valued key, like `clip'. Locally switches to
+ draft mode.
+\item[type] Specify the graphics type.
+\item[ext] Specify the file extension. This should \emph{only} be
+ used in conjunction with |type|.
+\item[read] Specify the file extension of the `read file'. This
+ should \emph{only} be used in conjunction with |type|.
+\item[command] Specify any command to be applied to the file. This
+ should \emph{only} be used in conjunction with |type|.
+\item[quiet]\NEWfeature{2017/06/01}
+ Skip writing information to the log.
+\item[page]\NEWfeature{2017/06/01}
+Page of a multi-page PDF file. (by default the first page will be used.)
+\item[interpolate]\NEWfeature{2017/06/01}
+Enable/disable interpolation of bitmap images by the viewer.
+\end{description}
+
+For the keys specifying the original size (i.e,, the bounding box,
+trim and viewport keys) the units can be omitted, in
+which case bp (i.e., PostScript points) are assumed.
+
+The first seven keys specify the original size of the image. This size
+needs to be specified in the case that the file can not be read by
+\TeX, or it contains an incorrect size `BoundingBox' specification.
+
+|bbllx|\ldots\ |\bbury| are mainly for compatibility for older
+packages.\\
+|bbllx=a, bblly=b, bburx=c, bbury=d|\\
+is equivalent to\\
+|bb = a b c d|.
+
+|natheight| and |natwidth| are just shorthands for setting the lower
+left coordinate to 0 0 and the upper right coordinate to the specified
+width and height.
+
+The next few keys specify any scaling or rotation to be applied to the
+image. To get these effects using the standard package, the
+|\includegraphics| call must be placed inside the argument of a
+|\rotatebox| or |\scalebox| command.
+
+The keys are read left-to-right, so |[angle=90, height=1in]| means
+rotate by 90 degrees, and then scale to a height of 1in.
+|[height=1in, angle=90]| would result in a final \emph{width} of 1in.
+
+If the \textsf{calc} package is also loaded the lengths may use
+\textsf{calc} syntax, for instance to specify a width of 2\,cm
+less than the text width: |[width=\textwidth-2cm]|.
+
+\TeX\ leaves the space specified either in the file, or in
+the optional arguments. If any part of the image is actually outside
+this area, it will by default overprint the surrounding text.
+If the star form is used, or |clip| specified, any part of the image
+outside this area will not be printed.
+
+The last four keys suppress the parsing of the filename. If they are
+used, the main \emph{file} argument should not have the file
+extension. They correspond to the arguments of |\DeclareGraphicsRule|
+described below.
+
+To see the effect that the various options have consider the file
+|a.ps|. This file contains the bounding box specification
+\begin{verbatim}
+%%BoundingBox:0 0 72 72
+\end{verbatim}
+That is, the printed region consists of a one-inch square, in
+the bottom left hand corner of the paper.
+
+In all the following examples the input will be of the form
+\begin{verbatim}
+left---\fbox{\includegraphics{a}}---right
+\end{verbatim}
+With different options supplied to |\includegraphics|.
+
+No optional argument.\\
+left---\fbox{\includegraphics{a}}---right
+
+\gs |\scalebox{0.5}{\includegraphics{a}}|\\
+\gx |\includegraphics[scale=.5]{a}|\\
+left---\fbox{\includegraphics[scale=.5]{a}}---right
+
+\gs |\includegraphics[15,10][35,45]{a}}|\\
+\gx |\includegraphics[viewport= 15 10 35 45]{a}|\\
+left---\fbox{\includegraphics[viewport= 15 10 35 45]{a}}---right
+
+\gs |\includegraphics*[15,10][35,45]{a}}|\\
+\gx |\includegraphics[viewport= 15 10 35 45,clip]{a}|\\
+left---\fbox{\includegraphics[viewport= 15 10 35 45,clip]{a}}---right
+
+\gs |\scalebox{0.5}{\includegraphics{a}}|
+ and |draft| option.\\
+\gx |\includegraphics[scale=.5, draft]{a}|\\
+left---\fbox{\includegraphics[scale=.5, draft]{a}}---right
+
+\subsection{Other commands in the \package{graphics} package}
+
+\begin{decl}
+|\graphicspath|\arg{dir-list}
+\end{decl}
+This optional declaration may be used to specify a list of directories
+in which to search for graphics files. The format is the same as for
+the \LaTeXe\ primitive |\input@path|. A list of directories, each in a
+|{}| group (even if there is only one in the list). For example:\\
+ |\graphicspath{{eps/}{tiff/}}|\\
+ would cause the system to look in the subdirectories |eps| and |tiff|
+ of the current directory. (All modern \TeX{} systems use |/|
+ as the directory separator, even on Windows.)
+
+ The default setting of this path is
+ |\input@path| that is: graphics files will be found wherever \TeX\
+ files are found.
+
+\begin{decl}
+|\DeclareGraphicsExtensions|\arg{ext-list}
+\end{decl}
+ \NEWdescription{1994/12/01}
+ This specifies the behaviour of the system when no file extension
+ is specified in the argument to |\includegraphics|.
+ \arg{ext-list} should be a comma separated list of file extensions.
+ (White space is ignored between the entries.)
+ A file name is produced by appending one extension from the list.
+ If a file is found, the system acts as if that extension had been
+ specified. If not, the next extension in \emph{ext-list} is tried.
+
+
+Note that if the extension is not specified in the |\includegraphics|
+command, the graphics file must exist at the time \LaTeX\ is run, as
+the existence of the file is used to determine which extension from
+the list to choose. However if a file extension \emph{is} specified,
+e.g.\ |\includegraphics{a.ps}| instead of |\includegraphics{a}|, then
+the graphics file need not exist at the time \LaTeX\ is used. (In
+particular it may be created on the fly by the \m{command}
+specified in the |\DeclareGraphicsRule| command described below.)
+\LaTeX\ does however need to be able to determine the size of the
+image so this size must be specified in arguments, or the `read file'
+must exist at the time \LaTeX\ is used.
+
+\begin{decl}
+|\DeclareGraphicsRule|\arg{ext}\arg{type}\arg{read-file}\arg{command}
+\end{decl}
+ Any number of these declarations can be made. They determine how the
+ system behaves when a file with extension \emph{ext} is specified.
+ (The extension may be specified explicitly or, if the argument to
+ |\includegraphics| does not have an extension, it may be a default
+ extension from the \emph{ext-list} specified with
+ |\DeclareGraphicsExtensions|.)
+
+\emph{ext} the file extension for which this rule applies. As a special
+case, \emph{ext} may be given as |*| to denote the default behaviour for
+all undeclared extensions (see the example below).
+
+\emph{type} is the `type' of file involved. All files of the same type
+will be input with the same internal command (which must be defined in
+a `driver file'). For example files with extensions |ps|, |eps|,
+|ps.gz| may all be classed as type |eps|.
+
+\emph{read-file} determines the extension of the file that should be
+read to determine size information. It may be the same as \emph{ext}
+but it may be different, for example |.ps.gz| files are not readable
+easily by \TeX, so you may want to put the bounding box information in
+a separate file with extension |.ps.bb|. If \emph{read-file} is empty,
+|{}|, then the system will not try to locate an external file for size
+info, and the size must be specified in the arguments of
+|\includegraphics|. If the driver file specifies a procedure for
+reading size files for \emph{type}, that will be used, otherwise the
+procedure for reading |eps| files will be used. Thus the size of
+bitmap files may be specified in a file with a PostScript style
+|%%BoundingBox| line, if no other specific format is available.
+
+As a special case |*| may be used to denote the
+same extension as the graphic file. This is mainly of use in
+conjunction with using |*| as the extension, as in that case the
+particular graphic extension is not known. For example
+\begin{verbatim}
+ \DeclareGraphicsRule{*}{eps}{*}{}
+\end{verbatim}
+This would declare a default rule, such that all unknown extensions
+would be treated as EPS files, and the graphic file would be read for
+a BoundingBox comment.
+
+\emph{command} is usually empty, but if non empty it is used in place
+of the filename in the |\special|. Within this argument, |#1| may be
+used to denote the filename. Thus using the dvips driver, one may
+use\\
+|\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{`zcat #1}|\\
+the final argument causes dvips to use the |zcat| command to unzip the
+file before inserting it into the PostScript output.
+
+Note that \LaTeX\ will find the graphics file by searching along
+TEXINPUTS (and possibly other places, as specified with
+|\graphicspath|) however it may be that the command you specify
+in this argument can not find such files unless they are in the
+current directory. On some systems it may be possible to modify
+the command so that it will find any files that \LaTeX\ can find.
+For example on newer web2c \TeX\ releases on unix, one may modify the
+above command so that the last argument is:\\
+|{`zcat `kpsewhich -n latex tex #1`}|\\
+which incantation causes the |kpsewhich| program to find the
+file, by searching along \LaTeX's path, and then pass the full path
+name to the |zcat| program so that it can uncompress the file.
+Any such uses are very system dependent, and would best be placed in
+a |graphics.cfg| file, thus keeping the document itself portable.
+
+\subsection{Global setting of keys}
+
+Most of the \package{keyval} keys used in the \package{graphicx} package
+may also be set using the command |\setkeys| provided by the
+\package{keyval} package.%
+\footnote{\texttt{clip}, \texttt{scale} and \texttt{angle} may not be set via
+\texttt{\string\setkeys} prior to calling
+\texttt{\string\includegraphics}.}
+
+For instance, suppose you wanted all the files to be included in the
+current document to be scaled to 75\% of the width of the lines of text,
+then one could issue the following command:\\
+|\setkeys{Gin}{width=0.75\textwidth}|\\
+Here `|Gin|' is the name used for the \package{keyval} keys associated
+with `Graphics inclusion'. All following
+|\includegraphics| commands (within the same group or environment) will
+act as if |[width=0.75\textwidth]| had been specified, in addition to
+any other key settings actually given in the optional argument.
+
+Similarly to make all |\rotatebox| arguments take an argument in
+radians, one just needs to specify:\\
+|\setkeys{Grot}{units=6.28318}|
+
+\subsection{Compatibility between \package{graphics} and
+ \package{graphicx}}
+
+For a document author, there are not really any problems of
+compatibility between the two packages. You just choose the interface
+that you personally prefer, and then use the appropriate package.
+
+For a package or class writer the situation is slightly
+different. Suppose that you are writing a letter class that needs to
+print a company logo as part of the letterhead.
+
+As the author of the class you may want to give the users the
+possibility of using either interface in their letters (should they
+need to include any further graphics into the letter body).
+In this case the class should load the \package{graphics} package (not
+\package{graphicx}, as this would commit any users of the class to the
+\package{keyval} interface). The logo should be included with
+|\includegraphics| either with \emph{no} optional argument (if the
+correct size information is in the file) or \emph{both} optional
+arguments otherwise.
+Do not use the \emph{one} optional argument form, as the meaning of this
+argument would change (and generate errors) if the user were to load
+\package{graphicx} as well as your class.
+
+\section{Remaining packages in the graphics bundle}
+
+\subsection{Epsfig}
+This is a small package essentially a `wrapper' around the
+\package{graphicx} package, defining a command |\psfig| which has the
+syntax\\
+|\psfig{file=xxx,...}| rather than |\includegraphics[...]{xxx}|.\\
+It also has a few more commands to make it slightly more compatible with
+the old \LaTeX~2.09 style of the same name.
+
+\subsection{Rotating}
+An extension package to \package{graphicx}, mainly used for providing
+rotated float environments.
+
+\subsection{Trig}
+The trig package is not intended to be used directly in documents. It
+calculates sine, cosine and tangent trigonometric functions. These
+are used to calculate the space taken up by a rotated box. This
+package is also used by the |fontinst| program which converts
+PostScript files to a form usable by \TeX.
+
+As well as being used as a \LaTeX\ package, the macros may be extracted
+with the \package{docstrip} options \texttt{plain,package}. In this case
+the \LaTeX\ package declarations are omitted from the file, and the
+macros may be directly used as part of another macro file (they work
+with any format based on plain \TeX.)
+
+\subsection{Keyval}
+The \package{keyval} package is intended to be used by other
+packages. It provides a generic way of setting `keys' as used by the
+\package{graphicx} package, and splitting up the comma separated lists
+of \m{key}~=~\m{value} pairs.
+
+Like the \package{trig} package, these macros may be extracted and used
+as part of another macro file, based on plain \TeX, as well as the
+standard use as a \LaTeX\ package.
+
+By default an undeclared key will generate an error.
+If however the option \texttt{unknownkeysallowed} is used, then
+unknown keys will be silently ignored (leaving a message in the log
+file). This option is also accepted by the \textsf{graphicx} package.
+
+\iffalse
+
+\subsection{Pstcol}
+\package{PSTricks}, by Timothy Van Zandt is an immensely powerful
+package that enables a very full featured interface between PostScript
+and \TeX. Unfortunately the colour support in \package{PSTricks} is
+slightly incompatible with the colour mechanism defined in the
+\package{color} package. The \package{pstcol} package is a (hopefully
+temporary) package that modifies a very small number of internal
+PSTricks functions, to remove this incompatibility. If
+\package{pstricks} is loaded via this package, you may use any colours
+defined by \package{color} package commands within \package{pstricks}
+commands, and vice versa.
+
+\fi
+
+\subsection{Lscape}
+The \package{lscape} package requires and takes the same options
+as the \package{graphics} package. It defines a |landscape| environment
+within which page bodies are rotated through 90 degrees. The page head
+and foot are not affected, they appear in the standard (portrait)
+position.
+\end{document}
diff --git a/macros/latex-dev/required/graphics/keyval.dtx b/macros/latex-dev/required/graphics/keyval.dtx
new file mode 100644
index 0000000000..f656961d0b
--- /dev/null
+++ b/macros/latex-dev/required/graphics/keyval.dtx
@@ -0,0 +1,419 @@
+%
+% \iffalse
+%% keyval.dtx Copyright (C) 1993 1994 1995 1997 1998 1999 David Carlisle
+%% Copyright (C) 2000--2015 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%
+%<*dtx>
+ \ProvidesFile{keyval.dtx}
+%</dtx>
+%<*!plain>
+%<package&!plain>\NeedsTeXFormat{LaTeX2e}
+%<package&!plain>\ProvidesPackage{keyval}
+%<driver> \ProvidesFile{keyval.drv}
+% \fi
+% \ProvidesFile{keyval.dtx}
+ [2014/10/28 v1.15 key=value parser (DPC)]
+%
+% \iffalse
+%</!plain>
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{keyval}
+\begin{document}
+ \DocInput{keyval.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{keyval.dtx}
+% \title{The \textsf{keyval} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{David Carlisle}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+% \begin{abstract}
+% A \LaTeX\ package implementing a system allowing the setting
+% of parameters (or `named arguments' with a
+% \meta{key}${}={}$\meta{value} syntax.
+%
+% Eg: |\foo[height=3in, shadow = true ]{bar}|
+% \end{abstract}
+%
+%
+% \changes{v1.03}
+% {1993/10/13}{Initial version}
+% \changes{v1.04}{1993/11/15}
+% {Upgrade after comments from Timothy van Zandt}
+% \changes{v1.05}{1993/11/17}
+% {Further small improvements}
+% \changes{v1.06}{1994/02/01}
+% {Update to LaTeX2e}
+% \changes{v1.07}{1994/03/15}
+% {New style ltxdoc}
+% \changes{v1.08}{1994/09/12}
+% {Improve docstrip handling}
+% \changes{v1.09}{1995/09/21}
+% {Move a comma for graphics/1698}
+% \changes{v1.14}{2014/04/25}
+% {Make most definitions \cs{long} to allow \cs{par} in values: graphics/3446}
+% \changes{v1.14}{2014/04/25}
+% {Only strip a single brace pair from values: graphics/3446}
+% \changes{v1.15}{2014/05/08}
+% {revert this change: Only strip a single brace pair from values: graphics/3446}
+%
+%
+% This package implements a system of defining and using sets of
+% parameters, which are set using the syntax \meta{key}=\meta{value}.
+%
+% For each keyword in such a set, there exists a function which is
+% called whenever the parameter appears in a parameter list. For
+% instance if the set |dpc| is to have the keyword |scale| then I
+% would define.\\
+% | \define@key{dpc}{scale}{scale ({\tt\string#1})\\}|\\
+% The first argument of |\define@key| is the set of keywords being
+% used, the second is the keyword, and the third is the function to
+% call. This function will be given as |#1| the \meta{value} specified
+% by the user.
+%
+% Normally it is an error to omit the `=\meta{value}' however if an
+% optional \meta{value} is supplied when the keyword is defined, then
+% just the keyword need be supplied.\\
+% |\define@key{dpc}{clip}[true]{...}|\\
+% For `|clip|' you can go `|clip = true|' or `|clip = false|' or
+% just `|clip|', which is the same as `|clip = true|'
+%
+% To use these keywords, just call `|\setkeys|' with a comma
+% separated list of settings, each of the form
+% \meta{key}=\meta{value}, or just \meta{key}. Any white space around
+% the `|=|' and `|,|' is ignored.
+%
+% As the \meta{key} is passed as a macro argument, if it consists
+% entirely of a |{ }| group, the outer braces are stripped off. Thus
+% |,key=foo,| and |,key={foo},| are equivalent. This fact enables one to
+% `hide' any commas or equals signs that must appear in the value. i.e.\
+% in |foo={1,2,3},bar=4|, |foo| gets the value |1,2,3|, the comma after
+% |1| does not terminate the keyval pair, as it is `hidden' by the
+% braces.
+%
+% Empty entries, with nothing between the commas, are silently ignored.
+% This means that it is not an error to have a comma after the last
+% term, or before the first.
+%
+% \section{Example}
+%
+% We may extend the examples above to give a `fake' graphics
+% inclusion macro, with a syntax similar to that used in the psfig
+% macros.
+%
+% \makeatletter
+% \def\dpcgraphics{\@ifnextchar[\@dpcgraphics{\@dpcgraphics[]}}
+%
+% |\dpcgraphics| has one optional argument which is passed through
+% |\setkeys|, and one mandatory argument, the filename. It actually
+% just typesets its arguments, for demonstration.
+%
+% \def\@dpcgraphics[#1]#2{{\setkeys{dpc}{#1}INPUT: #2}}%
+%
+% \define@key{dpc}{scale}{scale ({\tt\string#1\relax})\\}
+% \define@key{dpc}{height}{height ({\tt#1})\\}
+% \define@key{dpc}{width}{width ({\tt#1})\\}
+% \define@key{dpc}{bb}{bounding box ({\tt#1})\\}
+% \define@key{dpc}{clip}[true]{clip ({\tt\string#1\relax})\\}
+% \makeatother
+%
+% The declared keys are: |scale|, |height|, |width|, |bb|,
+% and |clip|. Except for the last, they must all be given a value if
+% used.
+%
+% Note how in the following, any white space around |=| or |,| is
+% ignored, as are the `empty' arguments caused by extra commas. Note
+% also that each macro receives \emph{exactly} the tokens that you
+% specify as arguments, no premature expansion is done.
+%
+% \begin{verbatim}
+% \def\dpcgraphics{\@ifnextchar[\@dpcgraphics{\@dpcgraphics[]}}
+% \def\@dpcgraphics[#1]#2{{\setkeys{dpc}{#1}INPUT: #2}}
+%
+% \define@key{dpc}{scale}{scale ({\tt\string#1\relax})\\}
+% \define@key{dpc}{clip}[true]{clip ({\tt\string#1\relax})\\}
+% \end{verbatim}
+%
+% \begin{minipage}{.4\textwidth}
+% \begin{verbatim}
+% \def\scalemacro{9}
+% \dpcgraphics
+% [ height =4in, ,
+% width = 3in,
+% scale = \scalemacro,
+% bb = 20 20 300 400 ,
+% clip,
+% ]{aaa}
+% \end{verbatim}
+% \end{minipage}
+% \hfill
+% \begin{minipage}{.4\textwidth}
+% \def\scalemacro{9}
+%\dpcgraphics
+% [ height =4in, ,
+% width = 3in,
+% scale = \scalemacro ,
+% bb = 20 20 300 400 ,
+% clip ,
+% ]{aaa}
+% \end{minipage}
+%
+%
+% \section{The Internal Interface}
+% A declaration of the form:\\
+% |\define@key{family}{key}{...}|\\
+% Defines a macro |\KV@prefix@key| with one argument. When used in a
+% keyval list, the macro receives the value as its argument.
+%
+% A declaration of the form:\\
+% |\define@key{family}{key}[default]{...}|\\
+% Defines a macro |\KV@family@key| as above, however it also defines the
+% macro |\KV@family@key@default| as a macro with no arguments, and
+% definition\\
+% |\KV@family@key{default}|.
+%
+% Thus if macros are defined using |\define@key|, the use of a key with
+% no value \ldots|,foo,|\ldots\ is always equivalent to the use of the
+% key with some value, \ldots|,foo=default,|\ldots. However a package
+% writer may wish that the `default' behaviour for some key is not
+% directly equivalent to using that key with a value. (In particular, as
+% pointed out to me by Timothy Van Zandt, you may wish to omit error
+% checking on the default value as you know it is correct.) In these
+% cases one simply needs to define the two macros
+% |\KV@|\meta{family}|@key| and |\KV@|\meta{family}|@key@default|
+% directly using |\def| (or |\newcommand|). I do not supply a user
+% interface for this type of definition, but it is supported in the
+% sense that I will try to ensure that any future upgrades of this
+% package do not break styles making use of these `low level'
+% definitions.
+%
+% \StopEventually{}
+%
+% \section{The Macros}
+%
+% From version~1.05, all `internal' macros associated to keys have names
+% of the form:\\
+% |\KV@|\meta{family}|@|\meta{key} or
+% |\KV@|\meta{family}|@|\meta{key}|@|\meta{default}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{macro}{\setkeys}
+% The top level macro. |#2| should be a comma separated values of the
+% form \meta{key} |=| \meta{value} or just simply \meta{key}.
+% The macro associated with this key in the `family' |#1| is called with
+% argument \meta{value}. The second form is only allowed if the key was
+% declared with a default value.
+% \begin{macrocode}
+\long\def\setkeys#1#2{%
+% \end{macrocode}
+% Save the `family' for later. Then begin acting on the comma
+% separated list.
+% \changes{v1.11}{1998/06/05}
+% {Make \cs{@tempc} safe (in case it is an \cs{if}.}
+% \begin{macrocode}
+ \def\KV@prefix{KV@#1@}%
+ \let\@tempc\relax
+ \KV@do#2,\relax,}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\KV@do}
+% Iterate down the list of comma separated argument pairs.
+% \changes{v1.14}{2014/04/25}
+% {Add \cs{@empty} not \cs{empty}}
+% \begin{macrocode}
+\long\def\KV@do#1,{%
+ \ifx\relax#1\@empty\else
+ \KV@split#1==\relax
+ \expandafter\KV@do\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\KV@split}
+% Split up the keyword and value, and call the appropriate command.
+% This macro was slightly reorganised for version 1.04, after some
+% suggestions from Timothy Van Zandt.
+% \begin{macrocode}
+\long\def\KV@split#1=#2=#3\relax{%
+ \KV@@sp@def\@tempa{#1}%
+ \ifx\@tempa\@empty\else
+ \expandafter\let\expandafter\@tempc
+ \csname\KV@prefix\@tempa\endcsname
+ \ifx\@tempc\relax
+%<plain> \KV@err
+%<!plain> \KV@errx
+ {\@tempa\space undefined}%
+ \else
+ \ifx\@empty#3\@empty
+ \KV@default
+ \else
+ \KV@@sp@def\@tempb{#2}%
+ \expandafter\@tempc\expandafter{\@tempb}\relax
+ \fi
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\KV@default}
+% Run the default code, or raise an error.
+% \begin{macrocode}
+\def\KV@default{%
+ \expandafter\let\expandafter\@tempb
+ \csname\KV@prefix\@tempa @default\endcsname
+ \ifx\@tempb\relax
+ \KV@err{No value specified for \@tempa}%
+ \else
+ \@tempb\relax
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\KV@err}
+% \changes{v1.10}{1997/11/10}
+% {Use \cs{PackageError}}
+% \changes{v1.12}{1998/11/18}
+% {Option system added}
+% Error messages.
+% \begin{macrocode}
+%<plain>\def\KV@err#1{\errmessage{key-val: #1}}
+%<*!plain>
+\DeclareOption{unknownkeysallowed}{%
+ \def\KV@errx#1{\PackageInfo{keyval}{#1}}}
+\DeclareOption{unknownkeyserror}{%
+ \def\KV@errx#1{\PackageError{keyval}{#1}\@ehc}}
+\ExecuteOptions{unknownkeyserror}
+\let\KV@err\KV@errx
+\ProcessOptions
+%</!plain>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\KV@@sp@def}
+% \changes{v1.10}{1997/11/10}
+% {Reorganise to not require doubled hash tokens, and to not
+% lose initial brace groups.}
+% \begin{macro}{\KV@@sp@b}
+% \begin{macro}{\KV@@sp@c}
+% \begin{macro}{\KV@@sp@d}
+% |\KV@@sp@def|\meta{cmd}\meta{token list} is like |\def|, except that
+% a space token at the beginning or end of \meta{token list} is
+% removed before making the assignment. \meta{token list} may not
+% contain the token |\@nil|, unless it is within a brace group.
+% The names of these commands were changed at version~1.05 to ensure
+% that they do not clash with `internal' macros in a key family `sp'.
+%
+% Since v1.10, |#| may appear in the second argument without it
+% needing to be doubled as |##|. Also earlier versions would
+% drop any initial brace group, so |{abc}d| would incorrectly
+% be treated as |abcd|. The current version only removes brace
+% groups that surround the entire value, so |{abcd}| \emph{is} treated
+% correctly as |abcd|. Prior to v1.14, two levels of bracing are removed, if
+% you require the entire argument to be a single brace group, you had
+% use |{{{abcd}}}|, from v1.14 exactly one brace group is removed, so to make
+% the entire value be a brace group you need |{{abc}}|.
+%
+% \begin{macrocode}
+\def\@tempa#1{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\KV@@sp@def##1##2{%
+ \futurelet\KV@tempa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
+% \end{macrocode}
+%
+% Early release removed initial space by having an `extra' argument
+% in |\KV@@sp@b| but that removed too many braces, so now make
+% |\KV@@sp@b| explicitly remove a single space token. That unfortunately
+% means we need the new |\KV@@sp@d| command to add a space token if
+% one was not there before.
+% \begin{macrocode}
+\def\KV@@sp@d{%
+ \ifx\KV@tempa\@sptoken
+ \expandafter\KV@@sp@b
+ \else
+ \expandafter\KV@@sp@b\expandafter#1%
+ \fi}%
+% \end{macrocode}
+%
+% \changes{v1.14}{2014/04/25}
+% {Add \cs{@empty} to avoid dropping a brace pair: graphics/3446}
+% \changes{v1.15}{2014/05/08}
+% {revert last change}
+% \begin{macrocode}
+\long\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<plain>\def\@sptoken{#1}%
+% \end{macrocode}
+%
+% Make the above definitions, inserting the space token where needed.
+% \begin{macrocode}
+ }
+\@tempa{ }
+% \end{macrocode}
+%
+% \changes{v1.14}{2014/04/25}
+% {Add \cs{expandafter} to remove the extra \cs{@empty} token: graphics/3446}
+% \changes{v1.15}{2014/05/08}
+% {revert last change}
+% \begin{macrocode}
+\long\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks@{#1}\edef#3{\the\KV@toks@}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\KV@toks@}
+% Macro register used above to prevent |#| doubling.
+% Avoid uding one of the normal scratch registers, as this code
+% is not in a local group.
+% \begin{macrocode}
+\newtoks\KV@toks@
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\define@key}
+% Define the command associated to the key |#2| in the family |#1|.
+% First looks for a default argument (the default value for the
+% key)
+% \begin{macrocode}
+\def\define@key#1#2{%
+ \@ifnextchar[{\KV@def{#1}{#2}}{\long\@namedef{KV@#1@#2}####1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\KV@def}
+% Make the definitions of the command, and the default value.
+% \begin{macrocode}
+\def\KV@def#1#2[#3]{%
+ \long\@namedef{KV@#1@#2@default\expandafter}\expandafter
+ {\csname KV@#1@#2\endcsname{#3}}%
+ \long\@namedef{KV@#1@#2}##1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/required/graphics/keyval.pdf b/macros/latex-dev/required/graphics/keyval.pdf
new file mode 100644
index 0000000000..8790611726
--- /dev/null
+++ b/macros/latex-dev/required/graphics/keyval.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/lscape.dtx b/macros/latex-dev/required/graphics/lscape.dtx
new file mode 100644
index 0000000000..733e183ee6
--- /dev/null
+++ b/macros/latex-dev/required/graphics/lscape.dtx
@@ -0,0 +1,135 @@
+%
+% \iffalse
+%
+%% lscape.dtx Copyright (C) 1994 1999-2000 David Carlisle
+%% Copyright (C) 2000--2015 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%<*dtx>
+ \ProvidesFile{lscape.dtx}
+%</dtx>
+%<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+%<package>\ProvidesPackage{lscape}
+%<driver> \ProvidesFile{lscape.drv}
+% \fi
+% \ProvidesFile{lscape.dtx}
+ [2000/10/22 v3.01 Landscape Pages (DPC)]
+%
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{lscape}
+\begin{document}
+ \DocInput{lscape.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{lscape.dtx}
+%
+% \title{The \textsf{lscape} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{D. P. Carlisle}
+% \date{\filedate}
+%
+%
+% \begin{landscape}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+% All text, within the \texttt{landscape} environment is rotated through
+% 90 degrees. The environment may span several pages. It works well
+% with, and was originally created for, use with \textsf{longtable} to
+% produce long wide tables.
+%
+% All the work is done by the \textsf{graphics} package, the trick is to
+% call it at the right place in the output routine to rotate the current
+% page before the page head and foot are added.
+%
+%
+% \StopEventually{\end{landscape}}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \changes{v1.00}{1992/04/28}{Initial release}
+% \changes{v2.00}{1992/11/18}{Support for footnotes and floats.
+% Special thanks to Sarah J. McQuay for testing this release}
+% \changes{v3.00}{1994/10/05}{Update using LaTeX2e graphics package}
+% \changes{v3.01}{1999/06/22}{Added better pdfTeX support
+% by Scott Pakin, from graphics/3063}
+%
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Here is what Scott Pakin wrote about the pdftex option:
+% \begin{quote}
+% I've made a minor improvement to lscape.dtx that I'd like to share
+% with the world. My addition makes lscape rotate the PDF "paper" --
+% not just the text on the page -- when given the "pdftex" option.
+% (Naturally, this works only with pdfLaTeX.) The result is that the
+% text is viewable online without the reader having to rotate his/her
+% head 90 degrees. The document still prints normally.
+% \end{quote}
+%
+%
+% \begin{macrocode}
+\newif\ifGin@pdftex
+\Gin@pdftexfalse
+\DeclareOption{pdftex}{%
+ \PassOptionsToPackage\CurrentOption{graphics}
+ \Gin@pdftextrue
+}
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
+\ProcessOptions
+\RequirePackage{graphics}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\LS@makecol=\@makecol
+\let\LS@makefcolumn=\@makefcolumn
+\def\LS@rot{%
+ \setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
+% \end{macrocode}
+%
+% First set up the page size for landscape.
+% \begin{macrocode}
+\def\landscape{%
+ \clearpage
+ \begingroup
+ \vsize=\textwidth
+ \hsize=\textheight
+ \linewidth=\hsize
+ \columnwidth=\hsize
+ \@colroom=\vsize
+ \textheight=\vsize
+ \@colht=\vsize
+% \end{macrocode}
+% Rotate the page body (text and float pages).
+% \begin{macrocode}
+ \def\@makecol{\LS@makecol\LS@rot}%
+ \def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}
+% \end{macrocode}
+%
+% Restore everything. This is where the pdftex option makes a
+% difference.
+% \begin{macrocode}
+\def\endlandscape{%
+ \ifGin@pdftex
+ \pdfpageattr{/Rotate 90}
+ \fi
+ \clearpage
+ \endgroup
+ \global\@colht=\textheight
+ \global\vsize=\textheight
+ \global\@colroom=\textheight}
+%</package>
+% \end{macrocode}
+%
+%
+% \Finale
+%
diff --git a/macros/latex-dev/required/graphics/lscape.pdf b/macros/latex-dev/required/graphics/lscape.pdf
new file mode 100644
index 0000000000..bf3d93a04c
--- /dev/null
+++ b/macros/latex-dev/required/graphics/lscape.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/rotating.dtx b/macros/latex-dev/required/graphics/rotating.dtx
new file mode 100644
index 0000000000..41bd399d4e
--- /dev/null
+++ b/macros/latex-dev/required/graphics/rotating.dtx
@@ -0,0 +1,686 @@
+%
+% \iffalse
+%
+%
+% File: rotating.dtx
+%% Copyright 1995--1999 Sebastian Rahtz and Leonor Barroca
+%% Copyright 2001--2003,2007--2009 Robin Fairbairns
+%% Copyright 2016 LaTeX3 Project
+%
+% 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
+% 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'.
+%
+%
+% This work consists of the file rotating.dtx
+% and the derived file rotating.sty, and testing material
+% rotex.tex and cat.eps
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+%<*dtx>
+\ProvidesFile{rotating.dtx}%
+%</dtx>
+%<package>\ProvidesPackage{rotating}%
+ [2016/08/11 v2.16d
+%<package> rotated objects in LaTeX%
+%<*dtx>
+ rotating package source file%
+%</dtx>
+ ]
+%<*dtx>
+\documentclass{ltxdoc}
+\GetFileInfo{rotating.dtx}
+\begin{document}
+ \title{A package for rotated objects in \LaTeX\thanks{This file has
+ version number \fileversion, last revised \filedate}}
+ \author{Robin Fairbairns
+ \and Sebastian Rahtz \and Leonor Barroca}
+ \date{printed \today}
+ \MaintainedByLaTeXTeam{graphics}
+ \maketitle
+ \tableofcontents
+% \listoffigures
+% \listoftables
+ \DocInput{rotating.dtx}
+\end{document}
+%</dtx>
+% \fi
+%
+% \begin{abstract}
+% This article documents a \LaTeX\ package, `rotating.sty',
+% which performs most sorts of
+% rotation one might like, including rotation of complete floating
+% figures and tables.
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% The package provides:
+% \begin{itemize}
+% \item two new environments, \texttt{sidewaystable} and
+% \texttt{sidewaysfigure}, each of which produces a single page-size
+% float with contents rotated $\pm90$\,degrees; and
+% \item a variety of other rotation-related commands and environments.
+% \end{itemize}
+%
+% Note that the package uses rotation facilities from the
+% \textsf{graphicx} package. When generating DVI output, users should
+% note that rotation is typically \emph{not} visible in a DVI viewer:
+% conversion to, and viewing, PostScript or PDF is necessary.
+%
+% \section{Usage}
+%
+% \subsection{Package options}
+%
+% Sideways figures and tables always take up the whole page. In
+% single-sided documents, they may be rotated so that the bottom of
+% the figures is on the left (package option
+% `\texttt{counterclockwise}') or the right (package option
+% `\texttt{clockwise}'). The default is to turn so that the bottom is
+% on the right (option `\texttt{clockwise}').
+%
+% Option `\texttt{anticlockwise}' is an alias for
+% `\texttt{counterclockwise}'.
+%
+% If the `\texttt{twoside}' option has been given to the main document
+% class (either explicitly, or implicitly as in the default for book
+% class), the package will rotate sideways figures according to the
+% page number (this requires at least two passes through \LaTeX{}).
+% If you want the `\texttt{twoside}' option, but want the figures
+% always in one direction, use the `\texttt{figuresright}' or
+% `\texttt{figuresleft}' options to the package.
+%
+% The package can produce a lot of logging information; the
+% amount of information is controlled by the package options
+% `\texttt{quiet}' (fewest messages; default), `\texttt{log}' and
+% `\texttt{chatter}' (most messages).
+%
+% All other options are passed to the \textsf{graphicx} package when
+% it is loaded to provide rotation functions.
+%
+% \subsection{Float environments}
+%
+% The environments \texttt{sidewaystable} and \texttt{sidewaysfigure}
+% introduce landscape-form floating tables and figures, respectively.
+% (Each of the environments has a ``starred'' version, such as
+% \texttt{sidewaystable*}, for a single-column float in a double-column
+% area of the document.)
+%
+% New rotated environments may be declared using the combined
+% facilities of the float and rotfloat packages.
+%
+% \subsection{Other environments and commands}
+% The package provides other \LaTeX\ environments:
+% \begin{description}
+% \item[\mdseries\ttfamily sideways] prints the contents of the
+% environment turned through 90 degrees counterclockwise;
+% \item[\mdseries\ttfamily turn] prints the contents turned through an
+% arbitrary angle (the argument to the environment);
+% \item[\mdseries\ttfamily rotate] prints the contents turned through
+% an arbitrary angle but does \emph{not} leave any space for the result
+% \end{description}
+%
+% The command \cs{turnbox}\marg{angle}\marg{matter to turn} is a macro
+% version of the \texttt{rotate} environment.
+%
+% A set of examples is given in the file \texttt{rotex.tex}
+%
+% \subsection{Positioning}
+%
+% Floats appear one to a page, and are positioned by spacer skips that
+% appear (logically) above and below the floating object. The skips,
+% \cs{rotFPtop} and \cs{rotFPbot}, are initialised from the standard
+% \LaTeX{} (internal) \cs{@fptop} and \cs{@fpbot} skips. As a result,
+% by default, rotated floats appear horizontally centred on their
+% float pages.
+%
+% Some sensible values for the registers are:
+% \par\noindent
+% \begin{tabular}{@{}llp{3in}@{}}
+% \cs{rotFPtop} & \cs{rotFPbot} & Effect \\
+% \hline
+% 0pt plus 1fil & 0pt plus 1fil & figure/table appears in middle
+% (default value) \\
+% 0pt & 0pt plus 1fil & figure/table appears with its top
+% nearest the edge of the page \\
+% 0pt plus 1fil & 0pt plus 2fil & figure/table's bottom appears
+% twice as far from the edge as the
+% top does
+% \end{tabular}
+%
+% \StopEventually{}
+%
+% \section{Setup}
+% Now we present the documented code. First, package options.
+%
+% Note that the \texttt{clockwise} and \texttt{counterclockwise}
+% options are present for compatibility only.
+% \begin{macrocode}
+%<*package>
+\DeclareOption{clockwise}{%
+ \AtBeginDocument{\setkeys{Grot}{units=360}}%
+}
+\DeclareOption{counterclockwise}{%
+ \AtBeginDocument{\setkeys{Grot}{units=-360}}%
+}
+\DeclareOption{anticlockwise}{\ds@counterclockwise}
+% \end{macrocode}
+% Control figure orientation
+% \begin{macrocode}
+\DeclareOption{figuresleft}{%
+ \@rot@twosidefalse
+ \def\rot@LR{0}%
+}
+\DeclareOption{figuresright}{%
+ \@rot@twosidefalse
+ \def\rot@LR{-1}%
+}
+% \end{macrocode}
+%
+% control messages:
+% \begin{macrocode}
+\newif\ifrot@messages
+\DeclareOption{quiet}{%
+ \rot@messagesfalse
+ \let\rot@message\@gobble % pro tem -- should suppress altogether
+}
+\DeclareOption{log}{%
+ \rot@messagestrue
+ \def\rot@message{\PackageInfo{rotating}}%
+}
+\DeclareOption{chatter}{%
+ \rot@messagestrue
+ \def\rot@message{\PackageWarning{rotating}}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\if@rot@twoside}
+% \begin{macro}{\rot@LR}
+% A couple of commands for passing rotation direction around
+% \begin{macrocode}
+\newif\if@rot@twoside
+\if@twoside
+ \@rot@twosidetrue
+\else
+ \@rot@twosidefalse
+\fi
+\def\rot@LR{-1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Pass any unknown options to the \textsf{graphicx} package, and
+% set up defaults and process the options.
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
+\ExecuteOptions{clockwise,quiet}
+\ProcessOptions
+% \end{macrocode}
+%
+% Other initialisation
+% \begin{macrocode}
+\RequirePackage{graphicx}
+\RequirePackage{ifthen}
+% \end{macrocode}
+%
+% \begin{macro}{\rotdriver}
+% The command \cs{rotdriver} allows a user to specify an initialisation file,
+% a sort of non-automatically-loaded driver (in the graphics, hyperref
+% sense).
+% \begin{macrocode}
+\def\rotdriver#1{\makeatletter\input{#1.def}\makeatother}
+% \end{macrocode}
+% \end{macro}
+%
+% The \texttt{r@tfl@t} counter is used when generating `labels' for
+% determining what side of the page the float is on, in twoside mode.
+% \begin{macrocode}
+\newcounter{r@tfl@t}
+\setcounter{r@tfl@t}{0}
+% \end{macrocode}
+%
+% Positioning skips (see above).
+% \begin{macrocode}
+\newskip\rotFPtop \rotFPtop=\@fptop
+\newskip\rotFPbot \rotFPbot=\@fpbot
+% \end{macrocode}
+%
+% \section{Turning and rotation environments}
+% \begin{macro}{sideways}
+% Environment to turn the contents through 90 degrees.
+% \begin{macrocode}
+\def\sideways{%
+ \Grot@setangle{90}%
+ \setbox\z@\color@hbox\ignorespaces}
+\def\endsideways{%
+ \unskip\color@endbox
+ \Grot@x\z@
+ \Grot@y\z@
+ \Grot@box
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{turn}
+% Rotate the contents of the environment, leaving the appropriate space
+% \begin{macrocode}
+\def\turn#1{%
+ \Grot@setangle{#1}%
+ \setbox\z@\color@hbox\ignorespaces}
+\def\endturn{%
+ \unskip\color@endbox
+ \Grot@x\z@
+ \Grot@y\z@
+ \Grot@box
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{rotate}
+% Rotate the contents of the environment, leaving \emph{no space}.
+% \begin{macrocode}
+\def\rotate#1{%
+ \Grot@setangle{#1}%
+ \setbox\z@\color@hbox\ignorespaces}
+\def\endrotate{%
+ \unskip\color@endbox
+ \Grot@x\z@
+ \Grot@y\z@
+ \wd0\z@\dp0\z@\ht0\z@
+ \Grot@box
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\turnbox}
+% A macro version of the `rotate' environment.
+% \begin{macrocode}
+\def\turnbox#1#2{%
+ \Grot@setangle{#1}%
+% \end{macrocode}
+% Note: grouping within the box makes \cs{color@hbox} unnecessary, I think.
+% \begin{macrocode}
+ \setbox\z@\hbox{{#2}}%
+ \Grot@x\z@\Grot@y\z@
+ \wd0\z@\dp0\z@\ht0\z@
+ \Grot@box
+}
+% \end{macrocode}
+% \end{macro}
+% \section{Sideways figures and tables}
+% Now for the macros to provide a complete
+% environment for sideways figures and tables.
+% We define two environments |sidewaysfigure| and
+% |sidewaystable| that
+% fit in with the normal table and figure floats. These are `fixed'
+% environments that just do 90 degree rotation, but it would be easy
+% to parameterize this to do other rotations if needed (the mind
+% boggles\ldots)
+%
+% \begin{macro}{\@rotfloat}
+% \begin{macro}{\@xrotfloat}
+% \begin{macro}{\rot@float@box}
+% First a generalised `rotfloat' environment. We need to intercept
+% \LaTeX's float macros, in order to change the assumed width of a
+% float being |\columnwidth|. We want it to work on a width of
+% |\textheight| so that when we rotate the float, it comes out
+% the right height. This is not actually very satisfactory, since what
+% we \emph{really} want is for rotated floats to occupy the space they
+% actually \emph{use}. The captions are a problem --- since they can
+% precede the figure or table, we cannot set them in a box of the
+% right width (ie the \emph{height} of the forthcoming object), because
+% it has not happened yet. The result of these difficulties is that
+% rotated figures always end up as full page figures.
+% \begin{macrocode}
+\newsavebox\rot@float@box
+\def\@rotfloat#1{%
+ \@ifnextchar[%
+ {\@xrotfloat{#1}}%
+ {\edef\@tempa{\noexpand\@xrotfloat{#1}[\csname fps@#1\endcsname]}\@tempa}%
+}
+\def\@xrotfloat#1[#2]{%
+ \@float{#1}[#2]%
+% \end{macrocode}
+% Set the float contents in
+% a box of width \cs{textheight} instead of \cs{columnwidth}.
+% \begin{macrocode}
+ \begin{lrbox}\rot@float@box
+ \begin{minipage}\textheight
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\end@rotfloat}
+% We call \LaTeX's \cs{end@float} macro having previously rotated
+% the box \cs{@currbox}.
+% The rotation is either clockwise or
+% anti-clockwise, depending on whether the page is odd or even;
+% in oneside mode it is always odd.
+% \begin{macrocode}
+\def\end@rotfloat{%
+% \end{macrocode}
+% If we are going to know whether pages are odd or even,
+% we need to use the a variant \cs{pageref} mechanism and our own
+% specialised labels.
+% \begin{macrocode}
+ \end{minipage}\end{lrbox}%
+ \stepcounter{r@tfl@t}%
+ \rot@label{RF\ther@tfl@t}%
+ \rot@pageref{RF\ther@tfl@t}{\R@@page}%
+ \edef\@tempa{Adding sideways \@captype\space on page \R@@page\space}
+ \rot@mess@toks\expandafter{\@tempa}
+ \wd\rot@float@box\z@
+ \ht\rot@float@box\z@
+ \dp\rot@float@box\z@
+ \vbox to \textheight{%
+% \end{macrocode}
+% We need to know for sure which direction rotation is going to
+% be in, so locally reset the graphics units.
+% \begin{macrocode}
+ \setkeys{Grot}{units=360}%
+ \if@rot@twoside
+ \else
+ \let\R@@page\rot@LR
+ \fi
+ \ifthenelse{\isodd{\R@@page}}{%
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks (right hand page)}%
+ \fi
+ \vfill
+ \@@line{%
+ \hskip\rotFPtop
+ \rotatebox{90}{\box\rot@float@box}%
+ \hskip\rotFPbot
+ }%
+ }{%
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks (left hand page)}%
+ \fi
+ \@@line{%
+ \hskip\rotFPbot
+ \rotatebox{-90}{\box\rot@float@box}%
+ \hskip\rotFPtop
+ }%
+ \vfill
+ }%
+ \rot@message{\the\rot@mess@toks}
+ }%
+ \end@float
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sidewaysfigure}
+% \begin{macro}{\endsidewaysfigure}
+% \begin{macro}{\sidewaystable}
+% \begin{macro}{\endsidewaystable}
+% The following definitions set up two environments,
+% \texttt{sidewaystable} and \texttt{sidewaysfigure}, which uses this
+% type of float. Naturally, users may need to change these to suit
+% their local style. Both contribute to the normal lists of figures
+% and tables.
+% \begin{macrocode}
+\def\sidewaysfigure{\@rotfloat{figure}}
+%
+\let\endsidewaysfigure\end@rotfloat
+%
+\def\sidewaystable{\@rotfloat{table}}
+\let\endsidewaystable\end@rotfloat
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@rotdblfloat}
+% \begin{macro}{\end@rotdblfloat}
+% Handling double column floats
+% \begin{macrocode}
+\def\@rotdblfloat{%
+ \if@twocolumn\expandafter\@rotdbflt\else\expandafter\@rotfloat\fi
+}
+\def\@rotdbflt#1{\@ifnextchar[{\@rotxdblfloat{#1}}{\@rotxdblfloat{#1}[tp]}}
+\def\@rotxdblfloat#1[#2]{%
+ \@float{#1}[#2]%
+ \hsize\textwidth\linewidth\textwidth
+ \begin{lrbox}\rot@float@box
+ \begin{minipage}\textheight
+}
+\def\end@rotdblfloat{%
+% \end{macrocode}
+% If we are going to know whether pages are odd or even,
+% we need to use the \cs{pageref} mechanism, and labels. But
+% Labels won't work \emph{unless} the user has put in a
+% caption. Beware!
+% \begin{macrocode}
+ \end{minipage}\end{lrbox}%
+ \stepcounter{r@tfl@t}%
+ \rot@label{RF\ther@tfl@t}%
+ \rot@pageref{RF\ther@tfl@t}{\R@@page}%
+ \edef\@tempa{Adding sideways \@captype\space on page \R@@page\space}
+ \rot@mess@toks\expandafter{\@tempa}
+ \@tempdima\ht\rot@float@box
+ \advance\@tempdima by \dp\rot@float@box
+% \ifrot@messages
+% \rot@message{BOX wd: \the\wd\rot@float@box,
+% ht: \the\ht\rot@float@box, dp: \the\dp\rot@float@box:
+% so shift by .5 of \the\@tempdima}%
+% \fi
+ \wd\rot@float@box\z@
+ \ht\rot@float@box\z@
+ \dp\rot@float@box\z@
+ \vbox to \textheight{%
+% \end{macrocode}
+% We need to know for sure which direction rotation is going to
+% be in, so locally reset the graphics units.
+% \begin{macrocode}
+ \setkeys{Grot}{units=360}%
+ \if@rot@twoside
+ \else
+ \let\R@@page\rot@LR
+ \fi
+ \ifthenelse{\isodd{\R@@page}}{%
+ \ifrot@messages
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks (right hand page)}%
+ \fi
+ \fi
+ \vfill
+ \@@line{%
+ \hskip\rotFPtop
+ \rotatebox{90}{\box\rot@float@box}%
+ \hskip\rotFPbot
+ }%
+ }{%
+ \ifrot@messages
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks (left hand page)}%
+ \fi
+ \fi%
+ \@@line{%
+ \hskip\rotFPbot
+ \rotatebox{-90}{\box\rot@float@box}%
+ \hskip\rotFPtop
+ }%
+ \vfill
+ }%
+ \rot@message{\the\rot@mess@toks}%
+ }%
+ \end@dblfloat
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{sidewaysfigure*}
+% \begin{environment}{sidewaystable*}
+% \begin{macrocode}
+\newenvironment{sidewaystable*}
+ {\@rotdblfloat{table}}
+ {\end@rotdblfloat}
+\newenvironment{sidewaysfigure*}
+ {\@rotdblfloat{figure}}
+ {\end@rotdblfloat}
+
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+% \begin{macro}{\rot@label}
+% \begin{macro}{\rot@thepage}
+% \begin{macro}{\rot@pageref}
+% \begin{macro}{\rot@protected@write}
+% \begin{macro}{\if@rot@refundefined}
+% Note that we used \cs{rot@label}, not \cs{label}; this
+% variant writes (just) the \emph{true} page number, not the
+% value of \cs{thepage}; this ``true'' value then needs special
+% treatment in \cs{protected@write}, just as
+% \cs{thepage} already has.
+% \cs{rot@pageref}\marg{generated label name}\marg{cs to set to
+% pageno} then returns the labelled page's number (or 0 if label not
+% yet defined). If label not defined, flags using
+% \cs{rot@refundefinedtrue} for end-document to pick up. (later...)
+% \begin{macrocode}
+\def\rot@thepage{\@arabic\c@page}
+\def\rot@label#1{\@bsphack
+ \rot@protected@write{\@auxout}{}%
+ {\string\newlabel{#1}{\rot@thepage}}%
+ \@esphack}
+\def\rot@pageref#1#2{%
+ \expandafter\ifx\csname r@#1\endcsname\relax
+ \global\@rot@refundefinedtrue
+ \def#2{0}%
+ \else
+ \edef#2{\csname r@#1\endcsname}%
+ \fi
+}
+\long\def\rot@protected@write#1#2#3{%
+ \begingroup
+ \let\rot@thepage\relax
+ #2%
+ \let\protect\@unexpandable@protect
+ \edef\reserved@a{\write#1{#3}}%
+ \reserved@a
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi
+}
+\newif\if@rot@refundefined
+\global\@rot@refundefinedfalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rot@mess@toks}
+% A token register to build up debugging messages
+% \begin{macrocode}
+\newtoks\rot@mess@toks
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Rotated captions only}
+%
+% \begin{macro}{\rotcaption}
+% \begin{macro}{\@makerotcaption}
+% Sometimes you may find that the rotation of complete figures does
+% not give quite the right result, since they always take up the whole
+% page. You may prefer to rotate the caption and the float contents
+% separately within a conventional figure. Here we offer a suggestion
+% for a \cs{rotcaption} command, which inserts the caption rotated
+% by 90 degrees. It is essentially a copy of the normal captioning
+% code.
+% Packages which define the \cs{@makecaption} command may also need
+% to define \cs{@makerotcaption}.
+% \begin{macrocode}
+\def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}}
+\long\def\@rotcaption#1[#2]#3{%
+ \addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \par
+ \begingroup
+ \@parboxrestore
+ \normalsize
+ \@makerotcaption{\csname fnum@#1\endcsname}{#3}%
+ \endgroup}
+ \long\def\@makerotcaption#1#2{%
+ \setbox\@tempboxa\color@hbox#1: #2\color@endbox
+ \ifdim \wd\@tempboxa > .8\vsize
+ \rotatebox{90}{%
+ \begin{minipage}{.8\textheight}#1: #2\end{minipage}%
+ }%
+ \else%
+ \rotatebox{90}{\box\@tempboxa}%
+ \fi
+ \nobreak
+ \hspace{12pt}%
+}
+%</package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Last-minute infrastructure}
+%
+% \begin{macro}{\color@hbox}
+% \begin{macro}{\color@endbox}
+% These macros aren't provided in \LaTeX{}, by default (I seem to have
+% assumed that they were\dots)
+% \begin{macrocode}
+\AtBeginDocument{%
+ \providecommand\color@hbox{\hbox\bgroup}%
+ \providecommand\color@vbox{\vbox\bgroup}%
+ \providecommand\color@endbox{\egroup}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{History}
+%
+% Version 2.0 is a complete re-write, with most of the work now
+% being done by the \LaTeXe\ graphics package.
+%
+% Version 2.1 provides a `clockwise' option to reinstate the behaviour
+% described in the `\LaTeX\ Companion'
+%
+% Version 2.2 just intercepts the standard float macros instead
+% of copying and changing the. The `twoside' option is obeyed.
+%
+% Version 2.5 corrects problems in sideways figures.
+%
+% Version 2.6 is a rewrite of the sideways floats via Frank Mittelbach
+% (to whom many thanks for looking at the mangy code).
+%
+% Version 2.7 is checked for \LaTeX\ of December 94, and adds the option
+% of twoside behaviour independent of the general twoside.
+%
+% Version 2.8 cleans up some mistakes pointed out by Harald Axel
+% Sommerfeldt.
+%
+% Version 2.9 cleans up some (more) mistakes pointed out by Harald
+% Axel Sommerfeldt.
+%
+% Version 2.13a permits positioning of rotated floats in the same way
+% as they are positioned in `normal' floats.
+%
+% Version 2.14 is the first to be published anywhere as the outcome of
+% maintenance by Robin Fairbairns.
+%
+% Version 2.15 deals with page-numbering bug for auto-float-rotation,
+% and tidying of messages; published to ctan
+%
+% Version 2.16 uses colour boxes as necessary; published to ctan.
+% Version 2.16a provides the colour box commands \cs{AtBeginDocument}.
+%
+% \Finale
+\endinput
+%
diff --git a/macros/latex-dev/required/graphics/rotating.pdf b/macros/latex-dev/required/graphics/rotating.pdf
new file mode 100644
index 0000000000..bfaa34d0ab
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..1564784475
--- /dev/null
+++ b/macros/latex-dev/required/graphics/rotex.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/rotex.tex b/macros/latex-dev/required/graphics/rotex.tex
new file mode 100644
index 0000000000..9dabfd37f7
--- /dev/null
+++ b/macros/latex-dev/required/graphics/rotex.tex
@@ -0,0 +1,500 @@
+\errorcontextlines32
+\documentclass[twoside]{report}
+\usepackage[chatter]{rotating}
+\usepackage{fancyvrb}
+\makeatletter
+\newsavebox{\@display}
+\newcommand\@@Display[1]{%
+ \sbox\@display{%
+ \begin{minipage}[b]{.45\textwidth}%
+ #1\end{minipage}%
+ }\raisebox{\depth}{\usebox{\@display}}%
+}
+
+\newcommand\@@VDisplay[1]{%
+ \sbox\@display{%
+ \begin{minipage}[b]{.45\textwidth}%
+ \BVerbatimInput[fontsize=\small]{#1}%
+ \end{minipage}}%
+ \usebox{\@display}%
+}
+\newcommand\SideBySide[2]{%
+\bgroup\def\baselinestretch{1}%
+ \trivlist\item[]%
+ \leavevmode
+ \makebox[\textwidth][l]{\@@Display{#1}\hspace{1em}%
+ \@@VDisplay{#2}}%
+ \endtrivlist
+ \egroup
+}
+\newcommand\BeginExample{%
+ \nobreak
+ \VerbatimEnvironment
+ \catcode`\<=12
+ \begin{VerbatimOut}{\jobname.ex}%
+}
+\newcommand{\EndExample}{\end{VerbatimOut}}
+
+\newenvironment{example}
+ {\nobreak
+ \VerbatimEnvironment
+ \catcode`\<=12
+ \begin{VerbatimOut}{\jobname.ex}%
+ }
+ {\end{VerbatimOut}
+ \SideBySide {\input{\jobname.ex}}%
+ {\jobname.ex}}
+\makeatother
+%-------------------------------------------------------
+\def\degrees{{\small$^{\mathrm{o}}$}}
+%-------------------------------------------------------
+
+\begin{document}
+
+\title{Test of `rotating' package}
+\author{Sebastian Rahtz and Leonor Barroca\thanks{Now maintained as part of the \LaTeX\ graphics bundle.}}
+\date{November 19th 1994\thanks{Updated for graphics bundle 2016/05/22}}
+\maketitle
+
+`Rotating' provides a generalised rotation environment, where the text
+will be rotated (anti-clockwise) by the number of degrees specified as
+a parameter to the environment, but no special arrangement is made to
+find space for the result.
+
+\begin{example}
+Start here
+\begin{rotate}{-56}
+Save whales
+\end{rotate}
+End here
+\end{example}
+
+A complete example of rotating text without leaving space
+would the `Save the whale' text
+written at 10 degree intervals round the compass. We use
+`rlap' to ensure that all the texts are printed at the same point.
+Just to show that \TeX\ can handle PostScript muckings-about
+properly\ldots
+\begin{example}
+\newcount\wang
+\newsavebox{\wangtext}
+\newdimen\wangspace
+\def\wheel#1{\savebox{\wangtext}{#1}%
+\wangspace\wd\wangtext
+\advance\wangspace by 1cm%
+\centerline{%
+\rule{0pt}{\wangspace}%
+\rule[-\wangspace]{0pt}{\wangspace}%
+\wang=-180\loop\ifnum\wang<180
+\rlap{\begin{rotate}{\the\wang}%
+\rule{1cm}{0pt}#1\end{rotate}}%
+\advance\wang by 10\repeat}}
+\wheel{Save the whale}
+\end{example}
+
+If the user
+desires \LaTeX\ to leave space for the rotated box, then `turn' is used:
+\begin{example}
+ Start here \begin{turn}{56}%
+ Save the whale
+ \end{turn} end here
+\end{example}
+The environment `Sideways' is a special case, setting the rotation to $-90$,
+and leaving the correct space for the rotated box.
+\begin{example}
+Start here
+\begin{sideways}%
+Save the whale
+\end{sideways}
+End here
+\end{example}
+
+If you deal with whole paragraphs of text, you realize that \TeX\
+boxes are not as simple as they sometimes look: they have a height
+{\em and} a depth. So when you rotate, you rotate about the point on
+the left-hand edge of the box that meets the baseline. The results can
+be unexpected, as shown in the full set of paragraph rotations in
+Figures \ref{angles1} and \ref{angles2}. If you really want to turn a
+paragraph so that it appears to rotate about the {\em real} bottom of
+the \TeX\ box,
+you have to adjust the box in the normal \LaTeX\ way:
+\begin{example}
+\newsavebox{\foo}
+\savebox{\foo}{\parbox{1in}{Save
+the whales Save the whale
+Save the whale
+Save the whale}}%
+Start
+\begin{turn}{45}\usebox{\foo}\end{turn}
+End
+\end{example}
+\begin{example}
+\savebox{\foo}{\parbox[b]{1in}{Save
+the whales Save the whale
+Save the whale
+Save the whale}}%
+Start
+\begin{turn}{45}\usebox{\foo}\end{turn}
+End
+\end{example}
+
+\def\testrot#1{%
+\savebox{\foo}{\parbox{1in}{Save
+the whales Save the whale Save the whale Save the whale}}%
+\framebox{---\begin{turn}{#1}\framebox{\usebox{\foo}}\end{turn}---}}%
+
+\begin{figure*}
+\begin{tabular}{|c|c|c|}
+\hline
+\testrot{0} &\testrot{-40}&\testrot{-80}\\
+0\degrees & -40\degrees & -80\degrees \\
+\hline
+\testrot{-120}&\testrot{-160}&\testrot{-200}\\
+120\degrees & -160\degrees & -200\degrees \\
+\hline
+\testrot{-240}&\testrot{-280}&\testrot{-320}\\
+-240\degrees & -280\degrees & -320\degrees \\
+\hline
+\end{tabular}
+\caption{Rotation of paragraphs between 0 and -320 degrees \label{angles1}}
+\end{figure*}
+
+\begin{figure*}
+\begin{tabular}{|c|c|c|}
+\hline
+\testrot{-180} &\testrot{40}&\testrot{80}\\
+-180\degrees & 40\degrees & 80\degrees \\
+\hline
+\testrot{120}&\testrot{160}&\testrot{200}\\
+120\degrees & 160\degrees & 200\degrees \\
+\hline
+\testrot{240}&\testrot{280}&\testrot{320}\\
+240\degrees & 280\degrees & 320\degrees \\
+\hline
+\end{tabular}
+\caption{Rotation of paragraphs between 0 and 320 degrees\label{angles2}}
+\end{figure*}
+
+
+We can set tabular material in this way; at the same time, we
+demonstrate that the rotation can be nested:
+\begin{example}
+\begin{sideways}
+\rule{1in}{0pt}
+\begin{tabular}{|lr|}
+\em Word & \begin{rotate}{90}%
+Occurrences\end{rotate}
+\\
+\hline
+hello & 33\\
+goodbye & 34\\
+\hline
+\end{tabular}
+\end{sideways}
+\end{example}
+
+\begin{example}
+\begin{quote}
+\rule{0pt}{1.5in}\begin{tabular}{rrr}
+\begin{rotate}{45}Column 1\end{rotate}&
+\begin{rotate}{45}Column 2\end{rotate}&
+\begin{rotate}{45}Column 3\end{rotate}\\
+\hline
+1& 2& 3\\
+4& 5& 6\\
+7& 8& 9\\
+\hline
+\end{tabular}
+\end{quote}
+\end{example}
+
+\begin{example}
+\begin{quote}
+\begin{tabular}{rrr}
+\begin{turn}{45}Column 1\end{turn}&
+\begin{turn}{45}Column 2\end{turn}&
+\begin{turn}{45}Column 3\end{turn}\\
+\hline
+1& 2& 3\\
+4& 5& 6\\
+7& 8& 9\\
+\hline
+\end{tabular}
+\end{quote}
+\end{example}
+
+\begin{example}
+\begin{quote}
+\rule{0pt}{1.5in}\begin{tabular}{rrr}
+\begin{rotate}{45}Column 1\end{rotate}
+\rule{.5cm}{0pt}&
+\begin{rotate}{45}Column 2\end{rotate}
+\rule{.5cm}{0pt}&
+\begin{rotate}{45}Column 3\end{rotate}
+\rule{.5cm}{0pt}\\
+\hline
+1& 2& 3\\
+4& 5& 6\\
+7& 8& 9\\
+\hline
+\end{tabular}
+\end{quote}
+\end{example}
+
+\begin{example}
+\begin{sideways}
+\begin{tabular}{|l|c|c|c|c|c|p{1in}|}
+\hline
+&&\multicolumn{4}{c}{NUMBER OF SITES}\vline &ACCEPT or\\
+\cline{3-6} &STUDY AREA&&\multicolumn{3}{c}{%
+IN BOUNDARY ZONE}\vline&REJECT\\
+\cline{4-6}&&&&\multicolumn{2}{c}{EXPECTED}
+\vline&NULL\\
+\cline{5-6}&&TOT&OBS&FROM&TO&HYPOTH\\
+\cline{2-7}
+&FULL SAMPLE&41&31&10.3&27.0&REJECT\\
+&SAMPLE AREA 1&23&16&4.3&16.7&ACCEPT\\
+&SAMPLE AREA 2&18&15&2.8&13.7&REJECT\\
+&RUSHEN&13&9&1.2&10.4&ACCEPT\\
+&ARBORY&10&7&0.6&8.8&ACCEPT\\
+&MAROWN&10&8&0.4&8.6&ACCEPT\\
+\rule{0.5cm}{0pt}
+\begin{rotate}{90}PRIMARY UNITS%
+\end{rotate}\rule{0.5cm}{0pt}
+&SANTON&8&7&0.0&7.3&ACCEPT\\
+\hline
+\end{tabular}
+\end{sideways}
+\end{example}
+
+If you are interested in setting rotated material in tables or
+figures, this presents no problem. Figure \ref{fig1} shows how
+PostScript files which are being incorporated using can be
+rotated at will, while Figure \ref{fig2} shows, in contrast, how
+`includegraphics' itself handles rotation. It is also possible to rotate the
+whole of the figure environment, including caption,
+by using the `sidewaysfigure' ands `sidewaystable' environments
+in place of `figure' and `table'.
+
+Sideways figures and tables always take up the whole page. They can be
+rotated so that the bottom ot the figures is on the left or the right;
+the default is to always turn to the right. If the `twoside' option
+has been given to the main document class, this package then starts
+rotating sideways figures according to the page number (this requires
+two passes through \LaTeX{} at least). If you want the `twoside'
+option, but want the figures always in one direction, use the
+`figuresright' or `riguresleft' options to `rotating'.
+
+The code used to produce figures
+\ref{rotfloat1}--\ref{rotfloat4} is as follows:
+\begin{description}
+
+\item[Figure \ref{rotfloat1}]
+{\small\begin{verbatim}
+\begin{sidewaystable}
+\centering
+\caption{This is a narrow table, which should be centred vertically
+on the final page.\label{rotfloat1}}
+ \begin{tabular}{|ll|}
+\hline
+ a & b \\
+ c & d \\
+ e & f \\
+ g & h \\
+ i & j \\
+\hline
+ \end{tabular}
+\end{sidewaystable}
+\end{verbatim}
+}
+
+\item[Figure \ref{rotfloat2}]
+{\scriptsize\begin{verbatim}
+\begin{sidewaystable}
+\centering
+\begin{tabular}{|llllllllp{1in}lp{1in}|}
+\hline
+Context &Length &Breadth/ &Depth &Profile &Pottery &Flint &Animal &Stone &Other &C14 Dates \\
+ & &Diameter & & & & &
+Bones&&&\\
+\hline
+&&&&&&&&&&\\
+\multicolumn{10}{|l}{\bf Grooved Ware}&\\
+784 &--- &0.9m &0.18m &Sloping U &P1 &$\times$46 & $\times$8 && $\times$2 bone& 2150$\pm$ 100 BC\\
+785 &--- &1.00m &0.12 &Sloping U &P2--4 &$\times$23 & $\times$21 & Hammerstone &---&---\\
+962 &--- &1.37m &0.20m &Sloping U &P5--6 &$\times$48 & $\times$57* & ---& ---&1990 $\pm$ 80 BC (Layer 4) 1870 $\pm$90 BC (Layer 1)\\
+983 &0.83m &0.73m &0.25m &Stepped U &--- &$\times$18 & $\times$8 & ---& Fired clay&---\\
+&&&&&&&&&&\\
+\multicolumn{10}{|l}{\bf Beaker}&\\
+552 &--- &0.68m &0.12m &Saucer &P7--14 &--- & --- & --- &--- &---\\
+790 &--- &0.60m &0.25m &U &P15 &$\times$12 & --- & Quartzite-lump&--- &---\\
+794 &2.89m &0.75m &0.25m &Irreg. &P16 &$\times$3 & --- & --- &--- &---\\
+\hline
+\end{tabular}
+
+\caption[Grooved Ware and Beaker Features, their Finds and
+Radiocarbon Dates]{Grooved Ware and Beaker Features, their
+Finds and Radiocarbon Dates; For a breakdown of the Pottery
+Assemblages see Tables I and III; for
+the Flints see Tables II and IV; for the
+Animal Bones see Table V.}\label{rotfloat2}
+\end{sidewaystable}
+\end{verbatim}
+}
+
+\item[Figure \ref{rotfloat3}]
+{\small\begin{verbatim}
+\begin{table}
+\centering
+\rotcaption{Minimum number of individuals; effect of rotating table
+and caption separately}\label{rotfloat3}%
+\begin{sideways}
+\begin{tabular}[b]{cccccccccp{1cm}}
+\hline
+Phase&Total&Cattle&Sheep&Pig&Red Deer&Horse&Dog&Goat&Other\\
+\hline
+&1121&54&12&32&1&1&1&1&1 polecat\\
+3&8255&58&6&35&1&1&1&1&1 roe deer, 1 hare, 1 cat, 1 otter\\
+4&543&45&6&45&4&1&1&---&---\\
+\hline
+&9919&157&24&112&6&3&3&2&5\\
+\hline
+\end{tabular}
+\end{sideways}
+\end{table}
+\end{verbatim}
+}
+
+\item[Figure \ref{rotfloat4}]
+{\small\begin{verbatim}
+\begin{sidewaysfigure}
+ \centering
+ \includegraphics[width=.8\textheight,height=.4\textwidth]{cat}
+\caption{A pathetically squashed rotated pussycat}\label{rotfloat4}
+\end{sidewaysfigure}
+\end{verbatim}
+}
+\end{description}
+
+\begin{figure}
+\begin{example}
+---\begin{turn}{156}
+\includegraphics[width=1in]{cat}
+\end{turn}---
+\end{example}
+
+\begin{example}
+---\begin{sideways}
+\includegraphics[width=1in]{cat}
+\end{sideways}---
+\end{example}
+
+\begin{example}
+---\includegraphics[width=1in]{cat}---
+\end{example}
+\caption{A normal, and sideways, pictures within a figure\label{fig1}}
+\end{figure}
+
+\begin{figure}
+\begin{example}
+\includegraphics[width=1in,%
+angle=-56]{cat}
+\end{example}
+
+\caption{Figures rotated with `includegraphics'\label{fig2}}
+\end{figure}
+\begin{sidewaystable}
+\centering
+\caption{This is a narrow table, which should be centred vertically
+on the final page.\label{rotfloat1}}
+ \begin{tabular}{|ll|}
+\hline
+ a & b \\
+ c & d \\
+ e & f \\
+ g & h \\
+ i & j \\
+\hline
+ \end{tabular}
+\end{sidewaystable}
+
+
+
+\begin{sidewaystable}
+\centering
+\begin{tabular}{|llllllllp{1in}lp{1in}|}
+\hline
+Context &Length &Breadth/ &Depth &Profile &Pottery &Flint &Animal &Stone &Other &C14 Dates \\
+ & &Diameter & & & & &
+Bones&&&\\
+\hline
+&&&&&&&&&&\\
+\multicolumn{10}{|l}{\bf Grooved Ware}&\\
+784 &--- &0.9m &0.18m &Sloping U &P1 &$\times$46 & $\times$8 && $\times$2 bone& 2150$\pm$ 100 BC\\
+785 &--- &1.00m &0.12 &Sloping U &P2--4 &$\times$23 & $\times$21 & Hammerstone &---&---\\
+962 &--- &1.37m &0.20m &Sloping U &P5--6 &$\times$48 & $\times$57* & ---& ---&1990 $\pm$ 80 BC (Layer 4) 1870 $\pm$90 BC (Layer 1)\\
+983 &0.83m &0.73m &0.25m &Stepped U &--- &$\times$18 & $\times$8 & ---& Fired clay&---\\
+&&&&&&&&&&\\
+\multicolumn{10}{|l}{\bf Beaker}&\\
+552 &--- &0.68m &0.12m &Saucer &P7--14 &--- & --- & --- &--- &---\\
+790 &--- &0.60m &0.25m &U &P15 &$\times$12 & --- & Quartzite-lump&--- &---\\
+794 &2.89m &0.75m &0.25m &Irreg. &P16 &$\times$3 & --- & --- &--- &---\\
+\hline
+\end{tabular}
+
+\caption[Grooved Ware and Beaker Features, their Finds and
+Radiocarbon Dates]{Grooved Ware and Beaker Features, their
+Finds and Radiocarbon Dates; For a breakdown of the Pottery
+Assemblages see Tables I and III; for
+the Flints see Tables II and IV; for the
+Animal Bones see Table V.}\label{rotfloat2}
+\end{sidewaystable}
+
+\begin{table}
+\centering
+\hbox{
+\rotcaption{Minimum number of individuals; effect of rotating table
+and caption separately}\label{rotfloat3}%
+\begin{sideways}
+\begin{tabular}[t]{cccccccccp{1cm}}
+\hline
+Phase&Total&Cattle&Sheep&Pig&Red Deer&Horse&Dog&Goat&Other\\
+\hline
+&1121&54&12&32&1&1&1&1&1 polecat\\
+3&8255&58&6&35&1&1&1&1&1 roe deer, 1 hare, 1 cat, 1 otter\\
+4&543&45&6&45&4&1&1&---&---\\
+\hline
+&9919&157&24&112&6&3&3&2&5\\
+\hline
+\end{tabular}
+\end{sideways}
+}
+\end{table}
+
+
+\begin{sidewaysfigure}
+ \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
+\caption{A pathetically squashed rotated pussycat (1)}
+\end{sidewaysfigure}
+
+\begin{sidewaysfigure}
+ \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
+\caption{A pathetically squashed rotated pussycat (2)}
+\end{sidewaysfigure}
+
+\begin{sidewaysfigure}
+ \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
+\caption{A pathetically squashed rotated pussycat (3)}
+\end{sidewaysfigure}
+
+\begin{sidewaysfigure}
+ \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
+\caption{A pathetically squashed rotated pussycat (4)}
+\end{sidewaysfigure}
+
+\begin{sidewaysfigure}
+ \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
+\caption{A pathetically squashed rotated pussycat}\label{rotfloat4}
+\end{sidewaysfigure}
+
+\end{document}
diff --git a/macros/latex-dev/required/graphics/trig.dtx b/macros/latex-dev/required/graphics/trig.dtx
new file mode 100644
index 0000000000..712db13ba2
--- /dev/null
+++ b/macros/latex-dev/required/graphics/trig.dtx
@@ -0,0 +1,329 @@
+% \iffalse
+%% File: trig.dtx Copyright (C) 1993 1994 1995 1996 1997 1999 David Carlisle
+%% Copyright (C) 2000--2015 David Carlisle, LaTeX3 Project
+%%
+%% This file is part of the Standard LaTeX `Graphics Bundle'.
+%% It may be distributed under the terms of the LaTeX Project Public
+%% License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.3c or, at your option, any later version.
+%%
+%
+%<*dtx>
+ \ProvidesFile{trig.dtx}
+%</dtx>
+%<*!plain>
+%<package&!plain>\NeedsTeXFormat{LaTeX2e}
+%<package&!plain>\ProvidesPackage{trig}
+%<driver> \ProvidesFile{trig.drv}
+% \fi
+% \ProvidesFile{trig.dtx}
+ [2016/01/03 v1.10 sin cos tan (DPC)]
+%
+% \iffalse
+%</!plain>
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{trig}
+\begin{document}
+ \DocInput{trig.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{trig.dtx}
+% \title{The \textsf{trig} package\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
+% \author{David Carlisle}
+% \date{\filedate}
+% \MaintainedByLaTeXTeam{graphics}
+% \maketitle
+%
+%
+% \changes{v1.00}{1993/00/00}{Undocumented versions}
+% \changes{v1.05}{1993/10/07}{Documented, added tan}
+% \changes{v1.06}{1994/02/01}{Update for LaTeX2e}
+% \changes{v1.07}{1994/03/15}{Use ltxdoc}
+% \changes{v1.08}{1994/10/16}{Change \cs{@xc} to \cs{nin@ty}}
+%
+% \section{Introduction}
+%
+% These macros implement the trigonometric functions, sin, cos and tan.
+% In each case two commands are defined. For instance the command
+% |\CalculateSin{33}| may be issued at some point, and then anywhere
+% later in the document, the command |\UseSin{33}| will return the
+% decimal expansion of $\sin(33^\circ)$.
+%
+% The arguments to these macros do not have to be whole numbers,
+% although in the case of whole numbers, \LaTeX\ or plain \TeX\ counters
+% may be used. In \TeX{}Book syntax, arguments must be of type:
+% \meta{optional signs}\meta{factor}
+%
+% Some other examples are:\\
+% |\CalculateSin{22.5}|, |\UseTan{\value{mycounter}}|,
+% |\UseCos{\count@}|.
+%
+% Note that unlike the psfig macros, these save all previously
+% computed values. This could easily be changed, but I thought that in
+% many applications one would want many instances of the
+% same value. (eg rotating all the headings of a table by the
+% \emph{same} amount).
+%
+% I don't really like this need to pre-calculate the values, I
+% originally implemented |\UseSin| so that it automatically calculated
+% the value if it was not pre-stored. This worked fine in testing, until
+% I remembered why one needs these values. You want to be able to say
+% |\dimen2=\UseSin{30}\dimen0|. Which means that |\UseSin| must
+% \emph{expand} to a \meta{factor}.
+%
+% \StopEventually{}
+%
+% \section{The Macros}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \begin{macro}{\nin@ty}\begin{macro}{\@clxx}
+% \begin{macro}{\@lxxi}\begin{macro}{\@mmmmlxviii}
+% Some useful constants for converting between degrees and radians.
+% $$\frac{\pi}{180}\simeq\frac{355}{113\times180}=\frac{71}{4068}$$
+% \begin{macrocode}
+\chardef\nin@ty=90
+\chardef\@clxx=180
+\chardef\@lxxi=71
+\mathchardef\@mmmmlxviii=4068
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}
+%
+% The approximation to $\sin$. I experimented with various
+% approximations based on Tchebicheff polynomials, and also some
+% approximations from a SIAM handbook `Computer Approximations' However
+% the standard Taylor series seems sufficiently accurate, and used by
+% far the fewest \TeX\ tokens, as the coefficients are all rational.
+% \begin{eqnarray*}
+% \sin(x)& \simeq& x - (1/3!)x^3 + (1/5!)x^5 - (1/7!)x^7 + (1/9!)x^9\\
+% &\simeq&\frac{((((7!/9!x^2-7!/7!)x^2+7!/5!)x^2 +7!/3!)x^2+7!/1!)x}
+% {7!}\\
+% &=&\frac{((((1/72x^2-1)x^2+42)x^2 +840)x^2+5040)x}
+% {5040}
+% \end{eqnarray*}
+% The nested form used above reduces the number of operations required.
+% In order to further reduce the number of operations, and more
+% importantly reduce the number of tokens used, we can precompute the
+% coefficients. Note that we can not use $9!$ as the denominator as
+% this would cause overflow of \TeX's arithmetic.
+% \begin{macro}{\@coeffz}\begin{macro}{\@coeffa}\begin{macro}{\@coeffb}
+% \begin{macro}{\@coeffc}\begin{macro}{\@coeffd}
+% Save the coefficients as |\|(|math|)|char|s.
+% \begin{macrocode}
+\chardef\@coeffz=72
+%\chardef\@coefa=1
+\chardef\@coefb=42
+\mathchardef\@coefc=840
+\mathchardef\@coefd=5040
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+%
+% \begin{macro}{\TG@rem@pt}
+% The standard trick of getting a real number out of a \meta{dimen}.
+% This gives a maximum accuracy of approx.\ 5 decimal places, which
+% should be sufficient. It puts a space after the number, perhaps it
+% shouldn't.
+% \begin{macrocode}
+{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}}
+\def\TG@rem@pt#1{\expandafter\noPT\the#1\space}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TG@term}
+% Compute one term of the above nested series. Multiply the previous sum
+% by $x^2$ (stored in |\@tempb|, then add the next coefficient, |#1|.
+% \begin{macrocode}
+\def\TG@term#1{%
+ \dimen@\@tempb\dimen@
+ \advance\dimen@ #1\p@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TG@series}
+% Compute the above series. the value in degrees will be in |\dimen@|
+% before this is called.
+% \begin{macrocode}
+\def\TG@series{%
+ \dimen@\@lxxi\dimen@
+ \divide \dimen@ \@mmmmlxviii
+% \end{macrocode}
+% |\dimen@| now contains the angle in radians, as a \meta{dimen}. We
+% need to remove the units, so store the same value as a \meta{factor}
+% in |\@tempa|.
+% \begin{macrocode}
+ \edef\@tempa{\TG@rem@pt\dimen@}%
+% \end{macrocode}
+% Now put $x^2$ in |\dimen@| and |\@tempb|.
+% \begin{macrocode}
+ \dimen@\@tempa\dimen@
+ \edef\@tempb{\TG@rem@pt\dimen@}%
+% \end{macrocode}
+% The first coefficient is $1/72$.
+% \begin{macrocode}
+ \divide\dimen@\@coeffz
+ \advance\dimen@\m@ne\p@
+ \TG@term\@coefb
+ \TG@term{-\@coefc}%
+ \TG@term\@coefd
+% \end{macrocode}
+% Now the cubic in $x^2$ is completed, so we need to multiply by $x$ and
+% divide by $7!$.
+% \begin{macrocode}
+ \dimen@\@tempa\dimen@
+ \divide\dimen@ \@coefd}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CalculateSin}
+% If this angle has already been computed, do nothing, else store the
+% angle, and call |\TG@@sin|.
+% \begin{macrocode}
+\def\CalculateSin#1{{%
+ \expandafter\ifx\csname sin(\number#1)\endcsname\relax
+ \dimen@=#1\p@\TG@@sin
+ \expandafter\xdef\csname sin(\number#1)\endcsname
+ {\TG@rem@pt\dimen@}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CalculateCos}
+% As above, but use the relation $\cos(x) = \sin(90-x)$.
+% \begin{macrocode}
+\def\CalculateCos#1{{%
+ \expandafter\ifx\csname cos(\number#1)\endcsname\relax
+ \dimen@=\nin@ty\p@
+ \advance\dimen@-#1\p@
+ \TG@@sin
+ \expandafter\xdef\csname cos(\number#1)\endcsname
+ {\TG@rem@pt\dimen@}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TG@reduce}
+% Repeatedly use one of the the relations
+% $\sin(x)=\sin(180-x)=\sin(-180-x)$ to get $x$ in the range $-90 \leq
+% x\leq 90$. Then call |\TG@series|.
+% \begin{macrocode}
+\def\TG@reduce#1#2{%
+\dimen@#1#2\nin@ty\p@
+ \advance\dimen@#2-\@clxx\p@
+ \dimen@-\dimen@
+ \TG@@sin}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TG@@sin}
+% Slightly cryptic, but it seems to work\ldots
+% \begin{macrocode}
+\def\TG@@sin{%
+ \ifdim\TG@reduce>+%
+ \else\ifdim\TG@reduce<-%
+ \else\TG@series\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UseSin}
+% \begin{macro}{\UseCos}
+% Use a pre-computed value.
+% \begin{macrocode}
+\def\UseSin#1{\csname sin(\number#1)\endcsname}
+\def\UseCos#1{\csname cos(\number#1)\endcsname}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% A few shortcuts to save space.
+% \changes{v1.10}{2016/01/03}{make these expand to digits so safe to use in ctm}
+% \begin{macrocode}
+\def\z@num{0 }
+\def\@tempa{1 }
+\def\@tempb{-1 }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\expandafter\let\csname sin(0)\endcsname\z@num
+\expandafter\let\csname cos(0)\endcsname\@tempa
+\expandafter\let\csname sin(90)\endcsname\@tempa
+\expandafter\let\csname cos(90)\endcsname\z@num
+\expandafter\let\csname sin(-90)\endcsname\@tempb
+\expandafter\let\csname cos(-90)\endcsname\z@num
+\expandafter\let\csname sin(180)\endcsname\z@num
+\expandafter\let\csname cos(180)\endcsname\@tempb
+% \end{macrocode}
+%
+% A few more added in 1.10 (previously in pdftex.def)
+% \begin{macrocode}
+\expandafter\let\csname sin(270)\endcsname\@tempb
+\expandafter\let\csname cos(270)\endcsname\z@num
+\expandafter\let\csname sin(360)\endcsname\z@num
+\expandafter\let\csname cos(360)\endcsname\@tempa
+\expandafter\let\csname sin(-180)\endcsname\z@num
+\expandafter\let\csname cos(-180)\endcsname\@tempb
+\expandafter\let\csname sin(-270)\endcsname\@tempa
+\expandafter\let\csname cos(-270)\endcsname\z@num
+\expandafter\let\csname sin(-360)\endcsname\z@num
+\expandafter\let\csname cos(-360)\endcsname\@tempa
+% \end{macrocode}
+%
+% \begin{macro}{\CalculateTan}
+% Originally I coded the Taylor series for tan, but it seems to be
+% more accurate to just take the ratio of the sine and cosine.
+% This is accurate to 4 decimal places for angles up to
+% $50^\circ$, after that the accuracy tails off, giving
+% 57.47894 instead of 57.2900 for $89^\circ$.
+% \begin{macrocode}
+\def\CalculateTan#1{{%
+ \expandafter\ifx\csname tan(\number#1)\endcsname\relax
+ \CalculateSin{#1}%
+ \CalculateCos{#1}%
+ \@tempdima\UseCos{#1}\p@
+ \divide\@tempdima\@iv
+ \@tempdimb\UseSin{#1}\p@
+ \@tempdimb\two@fourteen\@tempdimb
+ \divide\@tempdimb\@tempdima
+ \expandafter\xdef\csname tan(\number#1)\endcsname
+ {\TG@rem@pt\@tempdimb}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UseTan}
+% Just like |\UseSin|.
+% \begin{macrocode}
+\def\UseTan#1{\csname tan(\number#1)\endcsname}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\two@fourteen}
+% \begin{macro}{\@iv}
+% two constants needed to keep the division within \TeX's range.
+% \begin{macrocode}
+\mathchardef\two@fourteen=16384
+\chardef\@iv=4
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Predefine $\tan(\pm90)$ to be an error.
+% \begin{macrocode}
+\expandafter\def\csname tan(90)\endcsname{\errmessage{Infinite tan !}}
+\expandafter\let\csname tan(-90)\expandafter\endcsname
+ \csname tan(90)\endcsname
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex-dev/required/graphics/trig.pdf b/macros/latex-dev/required/graphics/trig.pdf
new file mode 100644
index 0000000000..2ad8cb7b53
--- /dev/null
+++ b/macros/latex-dev/required/graphics/trig.pdf
Binary files differ