summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-25 03:01:58 +0000
committerNorbert Preining <norbert@preining.info>2020-09-25 03:01:58 +0000
commit56c9134f4aa02292ed17e726efd8e493b90e6011 (patch)
tree9452a2e5c356e19640c070996f3ed92dfb9817e8 /macros/latex/contrib
parent486c71c11d7b17935ee153f1eb3fac44dea5a7db (diff)
CTAN sync 202009250301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/README4
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdfbin109781 -> 107065 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex66
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx12
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx4
-rw-r--r--macros/latex/contrib/breqn/CHANGES.md5
-rw-r--r--macros/latex/contrib/breqn/breqn.dtx7
-rw-r--r--macros/latex/contrib/breqn/breqn.pdfbin662197 -> 661840 bytes
-rw-r--r--macros/latex/contrib/breqn/breqnbundle.ins3
-rw-r--r--macros/latex/contrib/breqn/flexisym.dtx53
-rw-r--r--macros/latex/contrib/breqn/flexisym.pdfbin286432 -> 285950 bytes
-rw-r--r--macros/latex/contrib/breqn/mathstyle.dtx9
-rw-r--r--macros/latex/contrib/breqn/mathstyle.pdfbin187035 -> 186678 bytes
-rw-r--r--macros/latex/contrib/l3backend/CHANGELOG.md8
-rw-r--r--macros/latex/contrib/l3backend/README.md2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-basics.dtx14
-rw-r--r--macros/latex/contrib/l3backend/l3backend-box.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-code.pdfbin0 -> 773062 bytes
-rw-r--r--macros/latex/contrib/l3backend/l3backend-color.dtx128
-rw-r--r--macros/latex/contrib/l3backend/l3backend-draw.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-graphics.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-header.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/CHANGELOG.md19
-rw-r--r--macros/latex/contrib/l3experimental/README.md2
-rw-r--r--macros/latex/contrib/l3experimental/l3benchmark.dtx33
-rw-r--r--macros/latex/contrib/l3experimental/l3benchmark.pdfbin314255 -> 314283 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3color.dtx635
-rw-r--r--macros/latex/contrib/l3experimental/l3color.pdfbin368703 -> 369239 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-boxes.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-code.pdfbin606606 -> 606612 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-layers.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-paths.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-points.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-scopes.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-softpath.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-state.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-transforms.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3draw.pdfbin489817 -> 489845 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3galley.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3galley.pdfbin385762 -> 385778 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.pdfbin363123 -> 363142 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf-code.pdfbin276730 -> 276912 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.pdfbin350792 -> 350809 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3str-format.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3str-format.pdfbin344898 -> 344919 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3sys-shell.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3sys-shell.pdfbin311734 -> 311752 bytes
-rw-r--r--macros/latex/contrib/l3experimental/xcoffins.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/xcoffins.pdfbin372890 -> 372906 bytes
-rw-r--r--macros/latex/contrib/l3experimental/xgalley.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/xgalley.pdfbin285679 -> 285694 bytes
-rw-r--r--macros/latex/contrib/l3kernel/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/l3kernel/README.md4
-rw-r--r--macros/latex/contrib/l3kernel/expl3.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/expl3.pdfbin585393 -> 585194 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.pdfbin1556273 -> 1558261 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3.ins13
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3bootstrap.dtx18
-rw-r--r--macros/latex/contrib/l3kernel/l3box.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3candidates.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3cctab.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3clist.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3coffins.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3color-base.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3debug.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3deprecation.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.pdfbin263496 -> 263299 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3file.dtx109
-rw-r--r--macros/latex/contrib/l3kernel/l3flag.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-assign.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-aux.dtx24
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-logic.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-parse.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-random.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-round.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-traps.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-trig.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fparray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3int.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3intarray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3kernel-functions.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3keys.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3legacy.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3luatex.dtx309
-rw-r--r--macros/latex/contrib/l3kernel/l3msg.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3names.dtx140
-rw-r--r--macros/latex/contrib/l3kernel/l3news.pdfbin379235 -> 379235 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news01.pdfbin113527 -> 113527 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news02.pdfbin140776 -> 140776 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news03.pdfbin144785 -> 144785 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news04.pdfbin107115 -> 107115 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news05.pdfbin105090 -> 105090 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news06.pdfbin140795 -> 140795 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news07.pdfbin119094 -> 119094 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news08.pdfbin152413 -> 152413 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news09.pdfbin235322 -> 235322 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news10.pdfbin147097 -> 147097 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news11.pdfbin165946 -> 165946 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news12.pdfbin199139 -> 199139 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.pdfbin75889 -> 75889 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prg.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3prop.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3quark.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3regex.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3seq.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3skip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3sort.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3str-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3str.dtx40
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.pdfbin280233 -> 280036 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.pdfbin228529 -> 228324 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3sys.dtx102
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.pdfbin217900 -> 217704 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-case.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3tl-analysis.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3token.dtx250
-rw-r--r--macros/latex/contrib/l3kernel/l3unicode.dtx21
-rw-r--r--macros/latex/contrib/l3kernel/source3.pdfbin5860559 -> 5873517 bytes
-rw-r--r--macros/latex/contrib/l3kernel/source3.tex2
-rw-r--r--macros/latex/contrib/ltxcmds/README.md14
-rw-r--r--macros/latex/contrib/ltxcmds/ltxcmds.dtx2356
-rw-r--r--macros/latex/contrib/ltxcmds/ltxcmds.pdfbin397106 -> 0 bytes
-rw-r--r--macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdfbin40829 -> 40832 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdfbin175600 -> 175600 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/1-criticalnotes.pdfbin119720 -> 119720 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/1-sidenotes.pdfbin145283 -> 145283 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/1-tabular.pdfbin187373 -> 187373 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdfbin121150 -> 121150 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/1-verses.pdfbin121318 -> 121318 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-antilabe.pdfbin128416 -> 128416 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-cross_referencing.pdfbin120386 -> 120386 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdfbin123574 -> 123574 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-glossaries.pdfbin132844 -> 132844 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-indexing.pdfbin185822 -> 185822 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdfbin122378 -> 122378 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdfbin142433 -> 142433 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-linespacing.pdfbin136296 -> 136296 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdfbin156021 -> 156021 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-notes-width.pdfbin126635 -> 126635 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdfbin131284 -> 131284 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-performances.pdfbin133738 -> 133738 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdfbin31056 -> 31060 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdfbin212782 -> 212782 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdfbin188331 -> 188331 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdfbin173338 -> 173338 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdfbin23271 -> 23275 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdfbin93085 -> 93085 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdfbin37801 -> 37801 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdfbin135907 -> 135907 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdfbin190058 -> 190058 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdfbin189289 -> 189289 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdfbin168067 -> 168067 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdfbin189695 -> 189695 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdfbin188621 -> 188621 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdfbin188677 -> 188677 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdfbin188808 -> 188808 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdfbin187768 -> 187768 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdfbin132837 -> 132837 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdfbin173906 -> 173906 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdfbin199864 -> 199864 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdfbin123230 -> 123230 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdfbin144326 -> 144326 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdfbin226079 -> 226079 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdfbin124679 -> 124679 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdfbin120874 -> 120874 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdfbin260966 -> 260966 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdfbin180904 -> 180904 bytes
-rw-r--r--macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdfbin116963 -> 116963 bytes
-rw-r--r--macros/latex/contrib/reledmac/migration.pdfbin356983 -> 356983 bytes
-rw-r--r--macros/latex/contrib/reledmac/reledmac.dtx14
-rw-r--r--macros/latex/contrib/reledmac/reledmac.pdfbin2007517 -> 2007984 bytes
-rw-r--r--macros/latex/contrib/reledmac/reledpar.pdfbin988567 -> 988567 bytes
193 files changed, 1612 insertions, 2979 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes
index 0cb055b0f6..821434949e 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes
@@ -1,4 +1,6 @@
+0.22 2020-09-24 - do not use \mkbibemph for the the style firstnamefont=italic to prevent
+ \emph \emph, hich is like normal font. (hv)
0.21 2020-03-24 - do not use a biber.conf file, definition now in *.bbx (hv)
0.2 2020-03-17 - updated all macros for using with biblatex 3.7 (hv)
0.1g 2013-02-28 - Aktualisierung der readme wg. Einstellung der weiteren Entwicklung
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/README b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/README
index 0b4909c10d..d8d9653bb8 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/README
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/README
@@ -1,5 +1,5 @@
-Copyright (c) 2012 Tobias Schwan <tobias.schwan(aat)gmx.de>
- 2020 Herbert Voß hvoss@tug.org
+Copyright (c) 2012-2019 Tobias Schwan <tobias.schwan(aat)gmx.de>
+ 2020- Herbert Voß hvoss@tug.org
****************************************************************
This is biblatex-juradiss,
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf
index 78e240bd20..22173d9003 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex
index 65aafc97f8..027537a032 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex
@@ -224,7 +224,7 @@
\DeclareBibliographyCategory{10}
\addtocategory{10}{Hirte2009}
-\def\b-j{\texttt{biblatex-juradiss}\xspace}
+\def\bibj{\texttt{biblatex-juradiss}\xspace}
\def\bib{\texttt{biblatex}\xspace}
\def\cs#1{\texttt{\textbackslash#1}}
@@ -249,7 +249,7 @@
%%%%%
\title{biblatex-juradiss}
-\subtitle{Ver. 0.21}
+\subtitle{Ver. 0.22}
\author{Tobias Schwan \and Herbert Voß}
\maketitle
@@ -260,20 +260,17 @@
\section{Einleitung}
-Diese Dokumentation erklärt in kurzen Worten die Anpassungen des Stils \b-j und wie man sie
+Diese Dokumentation erklärt in kurzen Worten die Anpassungen des Stils \bibj und wie man sie
nutzen kann. Indirekt werden dabei auch einige Funktionen von \bib erläutert, auf das
aufsetzt. Grundsätzlich sollte man bei Fragen zu den Funktionen von \bib die sehr gute und
ausführliche Dokumentation von \bib konsultieren. Ohne zumindest das Überfliegen des
-User-Guide in der \bib"=Dokumentation lässt sich \bib und \b-j nicht sinnvoll verwenden.
+User-Guide in der Dokumentation zu \bib\ lässt sich \bib und \bibj nicht sinnvoll verwenden.
Inzwischen gibt es auch eine deutsche Fassung.
-Zum Schnelleinstieg werden im folgenden Abschnitt »Kurzanleitung« die Voraussetzungen zur Verwendung von \b-j
+Zum Schnelleinstieg werden im folgenden Abschnitt »Kurzanleitung« die Voraussetzungen zur Verwendung von \bibj
kurz erläutert. Danach erfolgt die Darstellung der Zitierstile der unterschiedlichen Dokumentenarten
mit Beispielen.
-Dieser Dokumentation füge ich meinem Paket auch als \texttt{.tex}-Datei an, damit die Funktionsweise des Stils
-anhand eines konkreten Beispiels besser nachvollzogen werden kann.
-
\section{Kurzanleitung}
@@ -296,22 +293,22 @@ Installation von \MiKTeX oder \TeXLive hat; dann wäre ohnehin alles vorhanden:
\section{Installation}
-\b-j setzt auf den Paketen \bib und biblatex-dw auf. Grund hierfür ist, dass \bib alle
+\bibj setzt auf den Paketen \bib und biblatex-dw auf. Grund hierfür ist, dass \bib alle
Funktionen erst bereitstellt, die es ermöglichen individuelle Zitierstile zu entwickeln. Die Zitierweise
deutscher Juristen ist allerdings so speziell im Vergleich zu dem sonst üblichen, dass es noch
zusätzlich weiterer Funktionen bedarf, diese vollständig abzubilden. Diese finden sich in
\texttt{biblatex-dw}.
-Zwar hätte man diese auch aus dem Paket herausnehmen und in \b-j integrieren können, aber der
+Zwar hätte man diese auch aus dem Paket herausnehmen und in \bibj integrieren können, aber der
Aufwand hierfür erschien mir zu groß. Zudem ist mit dem gut gepflegten Paket \texttt{biblatex-dw}
sichergestellt, dass die von diesem bereitgestellten Funktionen auch trotz der sehr schnellen
Entwicklung von \bib zuverlässig erhalten und kompatibel bleiben.
-Dies führt dazu, dass zur Verwendung von \b-j auch das Paket \texttt{biblatex-dw} vorhanden sein
+Dies führt dazu, dass zur Verwendung von \bibj auch das Paket \texttt{biblatex-dw} vorhanden sein
muss.
-Dessen Funktionen werden über \b-j direkt eingebunden, es muss nicht erst per Paketoption über
+Dessen Funktionen werden über \bibj direkt eingebunden, es muss nicht erst per Paketoption über
\bib geladen werden.
-Um \b-j zu verwenden muss dieses als Paketoption von \bib eingebunden werden. Dies geschieht
+Um \bibj zu verwenden muss dieses als Paketoption von \bib eingebunden werden. Dies geschieht
durch die Anweisung
\cs{usepackage[style=biblatex-juradiss]\{biblatex\}}
@@ -331,7 +328,7 @@ aktualisieren.
\section{Dokumentenklasse}
-Ich habe für die Erstellung meiner Doktorarbeit die Dokumentenklasse \texttt{jurabook} aus dem
+Für die Erstellung einer Doktorarbeit wurde die Dokumentenklasse \texttt{jurabook} aus dem
Paket \texttt{juramisc} verwendet. Das Paket bietet viele nützliche Optionen und integriert bereits die
von Juristen verwendete Bezeichnung der Gliederungsebenen (A., I., 1., a), aa), aaa), (1), (a)).
@@ -343,9 +340,9 @@ Kunst. Will man seine Doktorarbeit später in einem Verlag veröffentlichen empf
Denn dieser hat oftmals seine eigene LaTeX-Vorlage, die Fragen wie Fußnotenumbruch und
Formatierung der Kopfzeilen selbst regelt. Hier kann die Umstellung von \texttt{jurabook} auf die
verlagsspezifische Vorlage umständlicher sein, als wenn man das zuvor selbst angepasst hat (so war
-es jedenfalls bei mir), denn dann kann man die eigenen Anpassungen durch die des Verlags ersetzen,
-bei \texttt{jurabook} wusste ich im Nachhinein nicht mehr, welche Anpassung auf \texttt{jurabook}
-abzielte und welche auf generelle Dinge, wie den Fußnotenumbruch.
+es jedenfalls bei mir), denn dann kann man die eigenen Anpassungen durch die des Verlags ersetzen.
+%bei \texttt{jurabook} wusste ich im Nachhinein nicht mehr, welche Anpassung auf \texttt{jurabook}
+%abzielte und welche auf generelle Dinge, wie den Fußnotenumbruch.
\section{Verhältnis zu \texttt{biblatex-jura}}
@@ -353,27 +350,28 @@ abzielte und welche auf generelle Dinge, wie den Fußnotenumbruch.
\texttt{biblatex-jura} hat ebenso wie dieses Paket das Ziel das Schreiben juristischer Texte mit
\LaTeX{} zu
-ermöglichen. Dementsprechend hatte ich zu Beginn auch dieses Paket verwendet und versucht, es für
-meine Bedürfnisse anzupassen. Mit der Zeit musste ich allerdings feststellen, dass es mit der
-weiteren Entwicklung von \bib nicht Schritt hält. Irgendwann hatte ich es soweit modifiziert, dass es
-sinnvoller wurde, die eigenen Anpassungen direkt auf Basis von \bib zu schreiben.
-
-Eine Mithilfe bei \texttt{biblatex-jura} schien ebenfalls nicht sinnvoll, da dieses sich an den
-Zitiervorgaben
-des Nomos-Verlags orientiert, mein Stil aber meinen Vorstellungen einer Doktorarbeit entsprechen
-sollte. Außerdem verwendet \texttt{biblatex-jura} teilweise interne Funktionen von \bib, die nicht
-dafür
-da sind, durch externe Pakete verwendet oder geändert zu werden. Das führte in der Vergangenheit
-zu Inkompatibilitäten von \texttt{biblatex-jura} zu neueren Versionen von \bib. Bei meinem Stil setze
-ich
-(nahezu) ausschließlich auf Funktionen von \bib auf, die dieses hierfür anbietet, was die
-Kompatibilität langfristig erhalten sollte.
+ermöglichen.
+%Dementsprechend hatte ich zu Beginn auch dieses Paket verwendet und versucht, es für
+%meine Bedürfnisse anzupassen. Mit der Zeit musste ich allerdings feststellen, dass es mit der
+%weiteren Entwicklung von \bib nicht Schritt hält. Irgendwann hatte ich es soweit modifiziert, dass es
+%sinnvoller wurde, die eigenen Anpassungen direkt auf Basis von \bib zu schreiben.
+
+%Eine Mithilfe bei \texttt{biblatex-jura} schien ebenfalls nicht sinnvoll, da dieses sich an den
+%Zitiervorgaben
+%des Nomos-Verlags orientiert, mein Stil aber meinen Vorstellungen einer Doktorarbeit entsprechen
+%sollte. Außerdem verwendet \texttt{biblatex-jura} teilweise interne Funktionen von \bib, die nicht
+%dafür
+%da sind, durch externe Pakete verwendet oder geändert zu werden. Das führte in der Vergangenheit
+%zu Inkompatibilitäten von \texttt{biblatex-jura} zu neueren Versionen von \bib. Bei meinem Stil setze
+%ich
+%(nahezu) ausschließlich auf Funktionen von \bib auf, die dieses hierfür anbietet, was die
+%Kompatibilität langfristig erhalten sollte.
\section{Einzelne Eintragstypen}
-Hier stelle ich anhand von Beispielen die einzelnen Eintragstypen vor, die ich für meinen Stil angepasst habe:
+%Hier stelle ich anhand von Beispielen die einzelnen Eintragstypen vor, die ich für meinen Stil angepasst habe:
\subsection{Eintragstyp \texttt{article}}
@@ -403,7 +401,7 @@ Der Literaturverzeichniseintrag sieht so aus:
Teilweise wird inzwischen empfohlen im Literaturverzeichnis nicht nur die Anfangs-, sondern auch
die Endseite eines Beitrags anzugeben, um zu zeigen, dass man nicht lediglich blind zitiert hat,
sondern den Beitrag zumindest mal selbst in der Hand hatte. Im naturwissenschaftlichen Bereich ist
-das wohl üblicher. Ich finde die Idee nicht schlecht, jedenfalls unterstützt \b-j das auch seit Version
+das wohl üblicher. Ich finde die Idee nicht schlecht, jedenfalls unterstützt \bibj das auch seit Version
0.1f.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx
index 9a87cf98fa..e8efc47772 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx
@@ -1,6 +1,6 @@
% biblatex-juradiss.bbx, Tobias Schwan 2012
-% Änderungen von Herbert Voß -- 2020-03-17
-\ProvidesFile{biblatex-juradiss.bbx}[2020/03/24 v0.21 biblatex bibliography style]
+% Änderungen von Herbert Voß -- 2020
+\ProvidesFile{biblatex-juradiss.bbx}[2020/09/24 v0.22 biblatex bibliography style]
% Release Notes can be found in the README
\RequireBibliographyStyle{authortitle-dw}%
@@ -15,6 +15,8 @@
% Zusätzlicher Abstand zwischen den LitVerz-Einträgen
\setlength{\bibitemsep}{3pt}%
+\def\bbx@opt@firstnamefont@italic{\renewcommand{\bbx@firstnamefont}{\textit}}% to prevent \emph \emph
+
% Trennzeichen hinter dem Namen im LitVerz
\renewcommand*{\labelnamepunct}{\addcomma\space}
@@ -36,7 +38,7 @@
\usebibmacro{title}%
\newunit\newblock
\printfield{journaltitle}%
- \addspace%
+ \addspace
\iffieldequalstr{entrysubtype}{newspaper}%
{%
v.\space
@@ -45,8 +47,8 @@
\newunit\newblock%
Nr.\space
\printfield{volume}
- \newunit\newblock%
- \newunit\newblock%
+ \newunit\newblock
+ \newunit\newblock
\pno\ppspace\printfield{pages}%
}%
{\iffieldequalstr{entrysubtype}{other}%(ohne S.)
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx
index 737b49b001..9636b1af52 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx
@@ -1,7 +1,7 @@
% biblatex-juradiss.cbx, Tobias Schwan 2012
-% Änderungen von Herbert Voß -- 2020-03-24
+% Änderungen von Herbert Voß -- 2020
-\ProvidesFile{biblatex-juradiss.cbx}[2020/03/24 v0.21 biblatex citation style]
+\ProvidesFile{biblatex-juradiss.cbx}[2020/09/24 v0.22 biblatex citation style]
% Release Notes can be found in the README.txt
\RequireCitationStyle{authortitle-dw}
diff --git a/macros/latex/contrib/breqn/CHANGES.md b/macros/latex/contrib/breqn/CHANGES.md
index c3d8781a5d..26d5849594 100644
--- a/macros/latex/contrib/breqn/CHANGES.md
+++ b/macros/latex/contrib/breqn/CHANGES.md
@@ -1,5 +1,9 @@
# Release notes for the `breqn` packages
+## v0.98k (2020/09/24)
+
+ * Update patch code for new 2e kernel (thanks Ulrike)
+
## v0.98j (2020/04/19)
@@ -12,6 +16,7 @@
(This was originally just a quick fix of the value of `\\mathstyle` within double
subscripts or superscripts)
+
## v0.98i (2020/02/18)
* Fix clash with new version of `babel` around use of the generic `\\@elt` command.
diff --git a/macros/latex/contrib/breqn/breqn.dtx b/macros/latex/contrib/breqn/breqn.dtx
index 10b584bd83..ce68c555b6 100644
--- a/macros/latex/contrib/breqn/breqn.dtx
+++ b/macros/latex/contrib/breqn/breqn.dtx
@@ -5,6 +5,7 @@
% Copyright (C) 2007-2014 by Lars Madsen
% Copyright (C) 2007-2020 by Will Robertson
% Copyright (C) 2010-2017 by Joseph Wright
+% Copyright (C) 2020-2020 by Ulrike Fischer
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -150,8 +151,8 @@
%
%
% \title{The \pkg{breqn} package}
-% \def\fileversion{0.98j}
-% \def\filedate{2020/04/19}
+% \def\fileversion{0.98k}
+% \def\filedate{2020/09/24}
% \date{\pkg{breqn} bundle: \filedate\space\fileversion}
% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
@@ -1376,7 +1377,7 @@
% Declare package name and date.
% \begin{macrocode}
\RequirePackage{expl3}
-\ProvidesExplPackage{breqn}{2020/04/19}{0.98j}{Breaking equations}
+\ProvidesExplPackage{breqn}{2020/09/24}{0.98k}{Breaking equations}
% \end{macrocode}
% Regrettably, \pkg{breqn} is internally a mess, so we have to take
% some odd steps.
diff --git a/macros/latex/contrib/breqn/breqn.pdf b/macros/latex/contrib/breqn/breqn.pdf
index 7f4ccad37c..5db6488b0b 100644
--- a/macros/latex/contrib/breqn/breqn.pdf
+++ b/macros/latex/contrib/breqn/breqn.pdf
Binary files differ
diff --git a/macros/latex/contrib/breqn/breqnbundle.ins b/macros/latex/contrib/breqn/breqnbundle.ins
index 69b303c5e5..de5c485786 100644
--- a/macros/latex/contrib/breqn/breqnbundle.ins
+++ b/macros/latex/contrib/breqn/breqnbundle.ins
@@ -13,8 +13,9 @@ This is a generated file.
Copyright (C) 1997-2003 by Michael J. Downes
Copyright (C) 2007-2008 by Morten Hoegholm
Copyright (C) 2007-2014 by Lars Madsen
+Copyright (C) 2007-2020 by Will Robertson
Copyright (C) 2010-2017 by Joseph Wright
-Copyright (C) 2007-2019 by Will Robertson
+Copyright (C) 2020-2020 by Ulrike Fischer
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
diff --git a/macros/latex/contrib/breqn/flexisym.dtx b/macros/latex/contrib/breqn/flexisym.dtx
index 571ec4a20d..b827447fc6 100644
--- a/macros/latex/contrib/breqn/flexisym.dtx
+++ b/macros/latex/contrib/breqn/flexisym.dtx
@@ -3,8 +3,9 @@
% Copyright (C) 1997-2003 by Michael J. Downes
% Copyright (C) 2007-2008 by Morten Hoegholm
% Copyright (C) 2007-2014 by Lars Madsen
+% Copyright (C) 2007-2020 by Will Robertson
% Copyright (C) 2010-2017 by Joseph Wright
-% Copyright (C) 2007-2019 by Will Robertson
+% Copyright (C) 2020-2020 by Ulrike Fischer
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -78,8 +79,8 @@
% \fi
%
% \title{The \textsf{flexisym} package}
-% \def\fileversion{0.98j}
-% \def\filedate{2020/04/19}
+% \def\fileversion{0.98k}
+% \def\filedate{2020/09/24}
% \date{\filedate\space\fileversion}
% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
@@ -97,7 +98,7 @@
% \begin{macrocode}
%<*package>
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2020/04/19}{0.98j}{Make math characters macros}
+\ProvidesExplPackage{flexisym}{2020/09/24}{0.98k}{Make math characters macros}
\edef\do{%
\noexpand\AtEndOfPackage{%
@@ -628,9 +629,10 @@
%
% We have to remove the assignments from the \cs{AtBeginDocument} hook
% as they will cause an error there.
+% \changes{v0.98k}{2020/08/24}{Removed the patch as it will break with new LaTeX. Instead
+% the mathcodes are set later.}
% \begin{macrocode}
\@ifpackageloaded{amsmath}{%
- \begingroup
% \end{macrocode}
% Split the contents of \cs{@begindocumenthook} by reading what we
% search for as a delimited argument and ensure these two assignments
@@ -645,13 +647,6 @@
% needed. We need those additional files anyway for things like
% \cs{joinord}.
% \begin{macrocode}
- \long\def\next#1\mathchardef\std@minus\mathcode`\-\relax
- \mathchardef\std@equal\mathcode`\=\relax#2\flexi@stop{%
- \toks@{#1#2}%
- \xdef\@begindocumenthook{\the\toks@}%
- }%
- \expandafter\next\@begindocumenthook\flexi@stop
- \endgroup
}{}
% \end{macrocode}
%
@@ -660,26 +655,34 @@
% mathcode of \texttt{-} being less than 32768. We delay the
% definition \cs{AtBeginDocument} in case \pkg{amssymb} hasn't been
% loaded yet.
+% \changes{v0.98k}{2020/08/24}{Adapted to unicode engines (using definition in amsopn)}
% \begin{macrocode}
\AtBeginDocument{%
-\def\newmcodes@{%
- \mathcode `\'39\space
- \mathcode `\*42\space
- \mathcode `\."613A\space
- \ifnum\mathcode`\-=45\space
- \else
+\ifx\Umathcode\@undefined
+\gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A%
+ \ifnum\mathcode`\-=45 \else
% \end{macrocode}
% The extra check. Don't do anything if \texttt{-} is math active.
% \begin{macrocode}
\ifnum\mathcode`\-=32768\space
\else
- \mathchardef \std@minus \mathcode `\-\relax
+ \mathchardef\std@minus\mathcode`\-\relax
+ \fi
+ \fi
+ \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax}
+\else
+\gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A%
+ \ifnum\Umathcodenum`\-=45 \else
+% \end{macrocode}
+% The extra check. Don't do anything if \texttt{-} is math active.
+% \begin{macrocode}
+ \ifnum\Umathcodenum`\-=16777216\space
+ \else
+ \Umathcharnumdef\std@minus\Umathcodenum`\-\relax
\fi
\fi
- \mathcode `\-45\space
- \mathcode `\/47\space
- \mathcode `\:"603A\space\relax
-}%
+ \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax}
+\fi
}
% \end{macrocode}
%
@@ -776,7 +779,7 @@
\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
\DeclareFlexSymbol{\colon}{Pun}{OT1}{3A}
\DeclareFlexSymbol{;} {Pun}{OT1}{3B}
-\DeclareFlexSymbol{=} {Rel}{OT1}{3D}
+\AtBeginDocument{\DeclareFlexSymbol{=} {Rel}{OT1}{3D}}
\DeclareFlexSymbol{?} {Pun}{OT1}{3F}
% \end{macrocode}
% \AmS\TeX, and therefore the \pkg{amsmath} package, make the
@@ -942,7 +945,7 @@
% Symbols from the 128-character \fn{cmsy} encoding.
% \begin{macrocode}
\DeclareFlexSymbol{*} {Bin}{bin}{03} % \ast
-\DeclareFlexSymbol{-} {Bin}{bin}{00}
+\AtBeginDocument{\DeclareFlexSymbol{-} {Bin}{bin}{00}}
\DeclareFlexSymbol{|} {Ord}{OMS}{6A}
\DeclareFlexSymbol{\aleph} {Ord}{ord}{40}
\DeclareFlexSymbol{\Re} {Ord}{ord}{3C}
diff --git a/macros/latex/contrib/breqn/flexisym.pdf b/macros/latex/contrib/breqn/flexisym.pdf
index 69009a85d8..f48961bd2a 100644
--- a/macros/latex/contrib/breqn/flexisym.pdf
+++ b/macros/latex/contrib/breqn/flexisym.pdf
Binary files differ
diff --git a/macros/latex/contrib/breqn/mathstyle.dtx b/macros/latex/contrib/breqn/mathstyle.dtx
index 94aad71329..479b95b91d 100644
--- a/macros/latex/contrib/breqn/mathstyle.dtx
+++ b/macros/latex/contrib/breqn/mathstyle.dtx
@@ -3,8 +3,9 @@
% Copyright (C) 1997-2003 by Michael J. Downes
% Copyright (C) 2007-2008 by Morten Hoegholm
% Copyright (C) 2007-2014 by Lars Madsen
+% Copyright (C) 2007-2020 by Will Robertson
% Copyright (C) 2010-2017 by Joseph Wright
-% Copyright (C) 2007-2019 by Will Robertson
+% Copyright (C) 2020-2020 by Ulrike Fischer
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -57,8 +58,8 @@
% \fi
%
% \title{The \textsf{mathstyle} package}
-% \def\fileversion{0.98j}
-% \def\filedate{2020/04/19}
+% \def\fileversion{0.98k}
+% \def\filedate{2020/09/24}
% \date{\filedate\quad\fileversion}
% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
@@ -151,7 +152,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{mathstyle}{2020/04/19}{0.98j}{Tracking mathstyle implicitly}
+\ProvidesExplPackage{mathstyle}{2020/09/24}{0.98k}{Tracking mathstyle implicitly}
\ExplSyntaxOff
% \end{macrocode}
%
diff --git a/macros/latex/contrib/breqn/mathstyle.pdf b/macros/latex/contrib/breqn/mathstyle.pdf
index 3400c7a99c..62fe0c3bd7 100644
--- a/macros/latex/contrib/breqn/mathstyle.pdf
+++ b/macros/latex/contrib/breqn/mathstyle.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md
index 959212901a..61b75641de 100644
--- a/macros/latex/contrib/l3backend/CHANGELOG.md
+++ b/macros/latex/contrib/l3backend/CHANGELOG.md
@@ -6,6 +6,11 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-24]
+
+### Fixed
+- Documented source as PDF
+
## [2020-09-11]
### Added
@@ -120,7 +125,8 @@ this project uses date-based 'snapshot' version identifiers.
- Include `l3backend` in file names
- Moved backend code to internal for each 'parent' module
-[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-11...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-24...HEAD
+[2020-09-24]: https://github.com/latex3/latex3/compare/2020-09-11...2020-09-24
[2020-09-11]: https://github.com/latex3/latex3/compare/2020-09-01...2020-09-11
[2020-09-01]: https://github.com/latex3/latex3/compare/2020-08-07...2020-09-01
[2020-08-07]: https://github.com/latex3/latex3/compare/2020-06-29...2020-08-07
diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md
index 20a0301cf2..0d40ed996b 100644
--- a/macros/latex/contrib/l3backend/README.md
+++ b/macros/latex/contrib/l3backend/README.md
@@ -1,7 +1,7 @@
LaTeX3 Backend Drivers
======================
-Release 2020-09-11
+Release 2020-09-24
This package forms parts of `expl3`, and contains the code used to interface
with backends (drivers) across the `expl3` codebase. The functions here are
diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx
index abd972dca0..8b01e543ce 100644
--- a/macros/latex/contrib/l3backend/l3backend-basics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -70,27 +70,27 @@
% \begin{macrocode}
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2020-09-11}{}
+ {l3backend-dvipdfmx.def}{2020-09-24}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2020-09-11}{}
+ {l3backend-dvips.def}{2020-09-24}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2020-09-11}{}
+ {l3backend-dvisvgm.def}{2020-09-24}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-luatex.def}{2020-09-11}{}
+ {l3backend-luatex.def}{2020-09-24}{}
{L3 backend support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-pdftex.def}{2020-09-11}{}
+ {l3backend-pdftex.def}{2020-09-24}{}
{L3 backend support: PDF output (pdfTeX)}
%</pdftex>
%<*xetex>
- {l3backend-xetex.def}{2020-09-11}{}
+ {l3backend-xetex.def}{2020-09-24}{}
{L3 backend support: XeTeX}
%</xetex>
% \end{macrocode}
diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx
index 039fa38c85..e233c729f3 100644
--- a/macros/latex/contrib/l3backend/l3backend-box.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-code.pdf b/macros/latex/contrib/l3backend/l3backend-code.pdf
new file mode 100644
index 0000000000..0be885472a
--- /dev/null
+++ b/macros/latex/contrib/l3backend/l3backend-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx
index a9a86daebb..baefde5d3c 100644
--- a/macros/latex/contrib/l3backend/l3backend-color.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -308,10 +308,11 @@
%<*dvips>
% \end{macrocode}
%
-% \begin{macro}{\@@_backend_select_separation:nn}
+% \begin{macro}{\@@_backend_select_separation:nn, \@@_backend_select_devicen:nn}
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
{ \@@_backend_select:n { separation ~ #1 ~ #2 } }
+\cs_new_eq:NN \@@_backend_select_devicen:nn \@@_backend_select_separation:nn
% \end{macrocode}
% \end{macro}
%
@@ -362,7 +363,7 @@
{
!
TeXDict ~ begin ~
- /color \int_use:N \g_@@_separation_int
+ /color \int_use:N \g_@@_model_int
{
[ ~
/Separation ~ ( \str_convert_pdfname:n {#1} ) ~
@@ -541,6 +542,30 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_backend_devicen_init:nnn}
+% Trivial as almost all of the work occurs in the shared code.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_devicen_init:nnn #1#2#3
+ {
+ \__kernel_backend_literal:e
+ {
+ !
+ TeXDict ~ begin ~
+ /color \int_use:N \g_@@_model_int
+ {
+ [ ~
+ /DeviceN ~
+ [ ~ #1 ~ ] ~
+ #2 ~
+ { ~ #3 ~ } ~
+ ] ~ setcolorspace
+ } ~ def ~
+ end
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</dvips>
% \end{macrocode}
@@ -549,10 +574,11 @@
%<*dvisvgm>
% \end{macrocode}
%
-% \begin{macro}{\@@_backend_select_separation:nn}
+% \begin{macro}{\@@_backend_select_separation:nn, \@@_backend_select_devicen:nn}
% No support at present.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2 { }
+\cs_new_protected:Npn \@@_backend_select_devicen:nn #1#2 { }
% \end{macrocode}
% \end{macro}
%
@@ -573,7 +599,7 @@
%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
-% \begin{macro}{\@@_backend_select_separation:nn}
+% \begin{macro}{\@@_backend_select_separation:nn, \@@_backend_select_devicen:nn}
% \begin{macro}{\@@_backend_select:n}
% Different syntaxes here as the stacks are accessed very differently.
% \begin{macrocode}
@@ -591,6 +617,7 @@
\group_insert_after:N \@@_backend_reset:
}
%</dvipdfmx|xetex>
+\cs_new_eq:NN \@@_backend_select_devicen:nn \@@_backend_select_separation:nn
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -617,7 +644,7 @@
}
\@@_backend_separation_init:n
{
- /Separation
+ /Separation ~
/ \str_convert_pdfname:n {#1} ~ #2 ~
\pdf_object_last:
}
@@ -626,7 +653,7 @@
{
\pdfcoredict_gput:nnn
{ Page / Resources / ColorSpace }
- { color \int_use:N \g_@@_separation_int }
+ { color \int_use:N \g_@@_model_int }
{ \pdf_object_last: }
}
%</luatex|pdftex>
@@ -638,7 +665,7 @@
%<*dvipdfmx|xetex>
\__kernel_backend_literal:x
{
- pdf:obj ~ @color \int_use:N \g_@@_separation_int \c_space_tl
+ pdf:obj ~ @color \int_use:N \g_@@_model_int \c_space_tl
[#1]
}
%</dvipdfmx|xetex>
@@ -682,6 +709,67 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_backend_devicen_init:nnn}
+% \begin{macro}[EXP]{\@@_backend_devicen_init:w}
+% \begin{macro}{\@@_backend_devicen_init:n}
+% Similar to the Separations case, but with an arbitrary function for
+% the alternative space work.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_devicen_init:nnn #1#2#3
+ {
+ \pdf_object_now:nx { stream }
+ {
+ {
+ /FunctionType ~ 4 ~
+ /Domain ~
+ [ ~
+ \prg_replicate:nn
+ { 0 \@@_backend_devicen_init:w #1 ~ \s_@@_stop }
+ { 0 ~ 1 ~ } ~
+ ] ~
+ /Range ~
+ [ ~
+ \str_case:nn {#2}
+ {
+ { /DeviceCMYK } { 0 ~ 1 ~ 0 ~ 1 ~ 0 ~ 1 ~ 0 ~ 1 }
+ { /DeviceGray } { 0 ~ 1 }
+ { /DeviceRGB } { 0 ~ 1 ~ 0 ~ 1 ~ 0 ~ 1 }
+ } ~
+ ]
+ }
+ {#3}
+ }
+ \@@_backend_separation_init:n
+ {
+ /DeviceN ~
+ [ ~ #1 ~ ] ~
+ #2 ~
+ \pdf_object_last:
+ }
+%<*luatex|pdftex>
+ \use:x
+ {
+ \pdfcoredict_gput:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g_@@_model_int }
+ { \pdf_object_last: }
+ }
+%</luatex|pdftex>
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \@@_backend_devicen_init:nnn #1#2#3 { } }
+\cs_new:Npn \@@_backend_devicen_init:w #1 ~ #2 \s_@@_stop
+ {
+ + 1
+ \tl_if_blank:nF {#2}
+ { \@@_backend_devicen_init:w #2 \s_@@_stop }
+ }
+\cs_new_eq:NN \@@_backend_devicen_init:n \@@_backend_separation_init:n
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macrocode}
%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
@@ -730,13 +818,17 @@
% \begin{macro}
% {
% \@@_backend_fill_separation:nn,
-% \@@_backend_stroke_separation:nn
+% \@@_backend_stroke_separation:nn,
+% \@@_backend_fill_devicen:nn,
+% \@@_backend_stroke_devicen:nn
% }
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_fill_separation:nn #1#2
{ \__kernel_backend_literal_pdf:n { /#1 ~ cs ~ #2 ~ scn } }
\cs_new_protected:Npn \@@_backend_stroke_separation:nn #1#2
{ \__kernel_backend_literal_pdf:n { /#1 ~ CS ~ #2 ~ SCN } }
+\cs_new_eq:NN \@@_backend_fill_devicen:nn \@@_backend_fill_separation:nn
+\cs_new_eq:NN \@@_backend_stroke_devicen:nn \@@_backend_stroke_separation:nn
% \end{macrocode}
% \end{macro}
%
@@ -777,13 +869,17 @@
% \begin{macro}
% {
% \@@_backend_fill_separation:nn,
-% \@@_backend_stroke_separation:nn
+% \@@_backend_stroke_separation:nn,
+% \@@_backend_fill_devicen:nn,
+% \@@_backend_stroke_devicen:nn
% }
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_fill_separation:nn #1#2
{ \__kernel_backend_postscript:n { /color.fc { #1 } def } }
\cs_new_protected:Npn \@@_backend_stroke_separation:nn #1#2
{ \__kernel_backend_postscript:n { /color.sc { #1 } def } }
+\cs_new_eq:NN \@@_backend_fill_devicen:nn \@@_backend_fill_separation:nn
+\cs_new_eq:NN \@@_backend_stroke_devicen:nn \@@_backend_stroke_separation:nn
% \end{macrocode}
% \end{macro}
%
@@ -892,14 +988,16 @@
% \begin{macro}
% {
% \@@_backend_fill_separation:nn,
-% \@@_backend_stroke_separation:nn
+% \@@_backend_stroke_separation:nn,
+% \@@_backend_fill_devicen:nn,
+% \@@_backend_stroke_devicen:nn
% }
% At present, these are no-ops.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_fill_separation:nn #1#2
- { }
-\cs_new_protected:Npn \@@_backend_stroke_separation:nn #1#2
- { }
+\cs_new_protected:Npn \@@_backend_fill_separation:nn #1#2 { }
+\cs_new_protected:Npn \@@_backend_stroke_separation:nn #1#2 { }
+\cs_new_eq:NN \@@_backend_fill_devicen:nn \@@_backend_fill_separation:nn
+\cs_new_eq:NN \@@_backend_stroke_devicen:nn \@@_backend_stroke_separation:nn
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx
index f28bfd13bf..8de6910edf 100644
--- a/macros/latex/contrib/l3backend/l3backend-draw.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
index bac80fa884..e72bbe9a58 100644
--- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx
index 73cf1bc5ad..e158491688 100644
--- a/macros/latex/contrib/l3backend/l3backend-header.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-header.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
index 0763c411eb..58c7da7f08 100644
--- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md
index 362059210b..a5931d997c 100644
--- a/macros/latex/contrib/l3experimental/CHANGELOG.md
+++ b/macros/latex/contrib/l3experimental/CHANGELOG.md
@@ -7,6 +7,14 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Use Lua pseudo-primitives instead of `\directlua`
+
+## [2020-09-24]
+
+### Added
+- Support for DeviceN color spaces
+
## [2020-09-11]
### Fixed
@@ -154,14 +162,14 @@ this project uses date-based 'snapshot' version identifiers.
## [2018-05-12]
-### Changed
-- Track changes in primitive naming in `l3kernel`
+### Changed
+- Track changes in primitive naming in `l3kernel`
## [2018-04-30]
### Changed
-- Switch to ISO date format
-- Improve cross-module use of internal functions
+- Switch to ISO date format
+- Improve cross-module use of internal functions
## [2018-03-05]
@@ -174,7 +182,8 @@ this project uses date-based 'snapshot' version identifiers.
- New `l3color` module using `xcolor`-like expression syntax
- New `l3draw` module, based on `pgf` layer of the TikZ system
-[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-11...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-24...HEAD
+[2020-09-24]: https://github.com/latex3/latex3/compare/2020-09-11...2020-09-24
[2020-09-11]: https://github.com/latex3/latex3/compare/2020-09-01...2020-09-11
[2020-09-01]: https://github.com/latex3/latex3/compare/2020-08-07...2020-09-01
[2020-08-07]: https://github.com/latex3/latex3/compare/2020-07-17...2020-08-07
diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md
index 7f96887610..ec0cabe502 100644
--- a/macros/latex/contrib/l3experimental/README.md
+++ b/macros/latex/contrib/l3experimental/README.md
@@ -1,7 +1,7 @@
Experimental LaTeX3 Concepts
============================
-Release 2020-09-11
+Release 2020-09-24
Overview
--------
diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx
index 370723ec90..eb67ec9876 100644
--- a/macros/latex/contrib/l3experimental/l3benchmark.dtx
+++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -129,7 +129,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3benchmark}{2020-09-11}{}
+\ProvidesExplPackage{l3benchmark}{2020-09-24}{}
{L3 Experimental benchmarking}
% \end{macrocode}
%
@@ -139,7 +139,7 @@
%<@@=sys>
% \end{macrocode}
%
-% \begin{macro}[EXP]{\sys_timer:}
+% \begin{macro}[EXP]{\sys_timer:, \@@_elapsedtime:, \@@_resettimer:}
% \begin{macro}[EXP,pTF]{\sys_if_timer_exist:}
% In \LuaTeX{}, use emulation (see \pkg{l3luatex}),
% otherwise try to locate the primitive. The
@@ -147,8 +147,27 @@
% \begin{macrocode}
\sys_if_engine_luatex:TF
{
+ \cs_new:Npn \@@_elapsedtime: { }
+ \cs_new:Npn \@@_resettimer: { }
+ \lua_now:n
+ {
+ local~gettimeofday = os.gettimeofday~
+ local~epoch = gettimeofday() - os.clock()~
+ local~write = tex.write~
+ local~tointeger = math.tointeger~
+ local~id = luatexbase.new_luafunction'@@_elapsedtime:'
+ lua.get_functions_table()[id] = function()
+ write(tointeger((gettimeofday() - epoch)*65536 // 1))
+ end~
+ token.set_lua('@@_elapsedtime:', id, 'global')
+ id = luatexbase.new_luafunction'@@_resettimer:'
+ lua.get_functions_table()[id] = function()
+ epoch = gettimeofday()
+ end~
+ token.set_lua('@@_resettimer:', id, 'global', 'protected')
+ }
\cs_new:Npn \sys_timer:
- { \lua_now:n { l3kernel.elapsedtime() } }
+ { \@@_elapsedtime: }
}
{
\cs_if_exist:NT \tex_elapsedtime:D
@@ -163,8 +182,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\sys_gzero_timer:, \@@_timer_fp:}
-% \begin{variable}{\g_@@_timer_base_fp}
+% \begin{macro}{\sys_gzero_timer:}
% Three case, and in each case we define \cs{sys_gzero_timer:}.
% \begin{macrocode}
\cs_if_exist:NTF \sys_timer:
@@ -172,7 +190,7 @@
\sys_if_engine_luatex:TF
{
\cs_new_protected:Npn \sys_gzero_timer:
- { \lua_now:n { l3kernel.resettimer() } }
+ { \@@_resettimer: }
}
{ \cs_new_protected:Npn \sys_gzero_timer: { \tex_resettimer:D } }
}
@@ -198,7 +216,6 @@
}
}
% \end{macrocode}
-% \end{variable}
% \end{macro}
%
% \subsection{Benchmarking code}
diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf
index 197eb04aa1..277dab2a22 100644
--- a/macros/latex/contrib/l3experimental/l3benchmark.pdf
+++ b/macros/latex/contrib/l3experimental/l3benchmark.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3color.dtx b/macros/latex/contrib/l3experimental/l3color.dtx
index f644bf5fde..88129ca31e 100644
--- a/macros/latex/contrib/l3experimental/l3color.dtx
+++ b/macros/latex/contrib/l3experimental/l3color.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -362,6 +362,7 @@
% Creates a new \meta{model} which is derived from the color model \meta{family}.
% The latter should be one of
% \begin{itemize}
+% \item \texttt{DeviceN}
% \item \texttt{Separation}
% \end{itemize}
% (The \meta{family} may be given in mixed case as-in the PDF reference:
@@ -398,6 +399,13 @@
% not the case, \pkg{l3color} will fallback to using black as the colorant in
% any mixing.
%
+% For a \texttt{DeviceN} space, there is one \emph{compulsory} key.
+% \begin{itemize}
+% \item \texttt{names} The names of the components of the \texttt{DeviceN}
+% space. Each should be either the \meta{name} of a \texttt{Separation} model,
+% a process color name (\texttt{cyan}, etc.) or the special name \texttt{none}.
+% \end{itemize}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -413,7 +421,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3color}{2020-09-11}{}
+\ProvidesExplPackage{l3color}{2020-09-24}{}
{L3 Experimental color support}
% \end{macrocode}
%
@@ -439,8 +447,9 @@
%
% \subsection{Setup}
%
-% \begin{variable}{\l_@@_internal_tl}
+% \begin{variable}{\l_@@_internal_int, \l_@@_internal_tl}
% \begin{macrocode}
+\int_new:N \l_@@_internal_int
\tl_new:N \l_@@_internal_tl
% \end{macrocode}
% \end{variable}
@@ -1517,10 +1526,36 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\g_@@_separation_int}
-% A tracker for the total number of separations.
+% \begin{variable}{\g_@@_model_int}
+% A tracker for the total number of new models.
+% \begin{macrocode}
+\int_new:N \g_@@_model_int
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}
+% {\c_@@_fallback_cmyk_tl, \c_@@_fallback_gray_tl, \c_@@_fallback_rgb_tl}
+% Conversion from Separation or DeviceN spaces may not be possible; have
+% a fallback to black.
+% \begin{macrocode}
+\tl_const:Nn \c_@@_fallback_cmyk_tl { 0 ~ 0 ~ 0 ~ 1 }
+\tl_const:Nn \c_@@_fallback_gray_tl { 1 }
+\tl_const:Nn \c_@@_fallback_rgb_tl { 1 ~ 1 ~ 1 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_colorants_prop}
+% Mapping from names to colorants.
% \begin{macrocode}
-\int_new:N \g_@@_separation_int
+\prop_new:N \g_@@_colorants_prop
+\prop_gput:Nnn \g_@@_colorants_prop { black } { Black }
+\prop_gput:Nnn \g_@@_colorants_prop { blue } { Blue }
+\prop_gput:Nnn \g_@@_colorants_prop { cyan } { Cyan }
+\prop_gput:Nnn \g_@@_colorants_prop { green } { Green }
+\prop_gput:Nnn \g_@@_colorants_prop { magenta } { Magenta }
+\prop_gput:Nnn \g_@@_colorants_prop { none } { None }
+\prop_gput:Nnn \g_@@_colorants_prop { red } { Red }
+\prop_gput:Nnn \g_@@_colorants_prop { yellow } { Yellow }
% \end{macrocode}
% \end{variable}
%
@@ -1553,6 +1588,31 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_alternative_model_prop}
+% For tracking the alternative model set up for separations, etc.
+% \begin{macrocode}
+\prop_new:N \g_@@_alternative_model_prop
+\clist_map_inline:nn { cyan , magenta , yellow , black }
+ { \prop_gput:Nnn \g_@@_alternative_model_prop {#1} { cmyk } }
+\clist_map_inline:nn { red , green , blue }
+ { \prop_gput:Nnn \g_@@_alternative_model_prop {#1} { rgb } }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_alternative_values_prop}
+% Same for the values: a bit more involved.
+% \begin{macrocode}
+\prop_new:N \g_@@_alternative_values_prop
+\prop_gput:Nnn \g_@@_alternative_values_prop { cyan } { 1 , 0 , 0 , 0 }
+\prop_gput:Nnn \g_@@_alternative_values_prop { magenta } { 0 , 1 , 0 , 0 }
+\prop_gput:Nnn \g_@@_alternative_values_prop { yellow } { 0 , 0 , 1 , 0 }
+\prop_gput:Nnn \g_@@_alternative_values_prop { black } { 0 , 0 , 0 , 1 }
+\prop_gput:Nnn \g_@@_alternative_values_prop { red } { 1 , 0 , 0 }
+\prop_gput:Nnn \g_@@_alternative_values_prop { green } { 0 , 1 , 0 }
+\prop_gput:Nnn \g_@@_alternative_values_prop { blue } { 0 , 0 , 1 }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\color_model_new:nnn, \@@_model_new:nnn}
% Set up a new model: in general this has to be handled by a family-dependent
% function. To avoid some \enquote{interesting} questions with casing, we
@@ -1665,7 +1725,7 @@
\cs_new_protected:Npn \@@_model_separation:w
#1 , #2 , #3 , #4 , #5 \s_@@_stop #6#7#8
{
- \int_gincr:N \g_@@_separation_int
+ \int_gincr:N \g_@@_model_int
\tl_const:cn { c_@@_fallback_ #6 _tl } { 1 }
\cs_new_eq:cN { @@_parse_mix_ #6 :nw } \@@_parse_mix_gray:nw
\cs_new:cpn { @@_parse_model_ #6 :w } ##1 , ##2 \s_@@_stop
@@ -1675,11 +1735,14 @@
\cs_new_protected:cpx { @@_backend_ ##1 _ #6 :n } ####1
{
\exp_not:c { @@_backend_ ##1 _ separation:nn }
- { color \int_use:N \g_@@_separation_int } {####1}
+ { color \int_use:N \g_@@_model_int } {####1}
}
}
\use:c { @@_model_separation_ #8 :nnnnnn }
{#6} {#7} {#1} {#2} {#3} {#4}
+ \prop_gput:Nnn \g_@@_alternative_model_prop {#6} {#8}
+ \prop_gput:Nnx \g_@@_colorants_prop {#6}
+ { \str_convert_pdfname:n {#7} }
\cs_new_protected:cpx { @@_model_ #6 _white: }
{
\prop_put:Nnn \exp_not:N \l_@@_named_white_prop {#6} { 0 }
@@ -1699,6 +1762,7 @@
}
\@@_model_convert:nnn {#1} { cmyk } { rgb }
\@@_model_convert:nnn {#1} { cmyk } { gray }
+ \prop_gput:Nnn \g_@@_alternative_values_prop {#1} { #3 , #4 , #5 , #6 }
\@@_backend_separation_init:nnnnn {#2} { /DeviceCMYK } { }
{ 0 ~ 0 ~ 0 ~ 0 } { #3 ~ #4 ~ #5 ~ #6 }
}
@@ -1712,6 +1776,7 @@
}
\@@_model_convert:nnn {#1} { rgb } { cmyk }
\@@_model_convert:nnn {#1} { rgb } { gray }
+ \prop_gput:Nnn \g_@@_alternative_values_prop {#1} { #3 , #4 , #5 }
\@@_backend_separation_init:nnnnn {#2} { /DeviceRGB } { }
{ 0 ~ 0 ~ 0 } { #3 ~ #4 ~ #5 }
}
@@ -1732,6 +1797,7 @@
\fp_eval:n {##1 * #3} ~
\fp_eval:n {##1 * #3}
}
+ \prop_gput:Nnn \g_@@_alternative_values_prop {#1} {#3}
\@@_backend_separation_init:nnnnn {#2} { /DeviceGray } { } { 0 } {#3}
}
% \end{macrocode}
@@ -1797,6 +1863,529 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_model_devicen:n}
+% \begin{macro}{\@@_model_devicen:nn}
+% \begin{macro}{\@@_model_devicen:nnn}
+% \begin{macro}{\@@_model_devicen:nnnn}
+% \begin{macro}
+% {
+% \@@_model_devicen_parse_1:nn ,
+% \@@_model_devicen_parse_2:nn ,
+% \@@_model_devicen_parse_3:nn ,
+% \@@_model_devicen_parse_4:nn ,
+% \@@_model_devicen_parse_generic:nn
+% }
+% \begin{macro}[EXP]{\@@_model_devicen_parse:nw}
+% \begin{macro}[EXP]{\@@_model_devicen_mix:nw}
+% \begin{macro}{\@@_model_devicen_init:nnn}
+% \begin{macro}{\@@_model_devicen_init:nnnn}
+% \begin{macro}{\@@_model_devicen_tranform:w}
+% \begin{macro}
+% {
+% \@@_model_devicen_tranform_1:nnnnn ,
+% \@@_model_devicen_tranform_3:nnnnn ,
+% \@@_model_devicen_tranform_4:nnnnn ,
+% }
+% \begin{macro}{\@@_model_devicen_tranform:nnn}
+% \begin{macro}[EXP]{\@@_model_devicen_colorant:n}
+% \begin{macro}{\@@_model_devicen_convert:nnn}
+% \begin{macro}
+% {
+% \@@_model_devicen_convert_cmyk:n ,
+% \@@_model_devicen_convert_gray:n ,
+% \@@_model_devicen_convert_rgb:n
+% }
+% \begin{macro}{\@@_model_devicen_convert:nnnn}
+% \begin{macro}[EXP]{\@@_model_devicen_convert:n, \@@_model_devicen_convert_aux:n}
+% \begin{macro}[EXP]{\@@_model_devicen_convert:w}
+% \begin{macro}[EXP]{\@@_convert_devicen_cmyk:nnnnw}
+% \begin{macro}[EXP]{\@@_convert_devicen_cmyk:nnnnnnnnn}
+% \begin{macro}[EXP]{\@@_convert_devicen_cmyk_aux:nnnnw}
+% \begin{macro}[EXP]{\@@_convert_devicen_gray:nw}
+% \begin{macro}[EXP]{\@@_convert_devicen_gray:nnn}
+% \begin{macro}[EXP]{\@@_convert_devicen_gray_aux:nw}
+% \begin{macro}[EXP]{\@@_convert_devicen_rgb:nnnw}
+% \begin{macro}[EXP]{\@@_convert_devicen_rgb:nnnnnnn}
+% \begin{macro}[EXP]{\@@_convert_devicen_rgb_aux:nnnw}
+% We require a list of component names here: one might call them colorants,
+% but it's convenient to use \TeX{} names instead so we slightly adjust the
+% terminology.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen:n #1
+ {
+ \prop_get:NnNTF \l_@@_internal_prop { names }
+ \l_@@_internal_tl
+ {
+ \exp_args:NV \@@_model_devicen:nn
+ \l_@@_internal_tl {#1}
+ }
+ {
+ \__kernel_msg_error:nnn { color }
+ { DeviceN-requires-names } {#1}
+ }
+ }
+% \end{macrocode}
+% All valid models will have an alternative listed, either hard-coded for
+% the core device ones, or dynamically added for Separations, etc.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen:nn #1#2
+ {
+ \tl_clear:N \l_@@_model_tl
+ \clist_map_inline:nn {#1}
+ {
+ \prop_get:NnNTF \g_@@_alternative_model_prop {##1}
+ \l_@@_internal_tl
+ {
+ \tl_if_empty:NTF \l_@@_model_tl
+ { \tl_set_eq:NN \l_@@_model_tl \l_@@_internal_tl }
+ {
+ \str_if_eq:VVF \l_@@_model_tl \l_@@_internal_tl
+ {
+ \__kernel_msg_error:nnn { color }
+ { DeviceN-inconsistent-alternative }
+ {#2}
+ \clist_map_break:n { \use_none:nnnn }
+ }
+ }
+ }
+ {
+ \str_if_eq:nnF {##1} { none }
+ {
+ \__kernel_msg_error:nnn { color }
+ { DeviceN-no-alternative }
+ {#2}
+ }
+ }
+ }
+ \tl_if_empty:NTF \l_@@_model_tl
+ {
+ \__kernel_msg_error:nnn { color }
+ { DeviceN-no-alternative } {#2}
+ }
+ { \exp_args:NV \@@_model_devicen:nnn \l_@@_model_tl {#1} {#2} }
+ }
+% \end{macrocode}
+% We now complete the data we require by first finding out how many
+% colorants there are, then moving on to begin constructing the function
+% required to map to the alternative color space.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen:nnn #1#2#3
+ {
+ \exp_args:Nx \@@_model_devicen:nnnn
+ { \clist_count:n {#2} } {#1} {#2} {#3}
+ }
+% \end{macrocode}
+% At this stage, we have checked everything is in place, so we can set up
+% the \TeX{} and backend data structures. As for separations, it's not really
+% possible in general to have a fallback, so we simply provide
+% \enquote{black} for each element.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen:nnnn #1#2#3#4
+ {
+ \int_gincr:N \g_@@_model_int
+ \tl_const:cx { c_@@_fallback_ #4 _tl }
+ { \prg_replicate:nn {#1} { 1 ~ } }
+ \cs_if_exist_use:cF { @@_model_devicen_parse_ #1 :nn }
+ { \@@_model_devicen_parse_generic:nn }
+ {#4} {#1}
+ \clist_map_inline:nn { fill , stroke , select }
+ {
+ \cs_new_protected:cpx { @@_backend_ ##1 _ #4 :n } ####1
+ {
+ \exp_not:c { @@_backend_ ##1 _ devicen:nn }
+ { color \int_use:N \g_@@_model_int } {####1}
+ }
+ }
+ \cs_new_protected:cpx { @@_model_ #4 _white: }
+ {
+ \prop_put:Nnn \exp_not:N \l_@@_named_white_prop {#4}
+ { \prg_replicate:nn {#1} { 0 ~ } }
+ \exp_not:N \int_compare:nNnF { \tex_currentgrouplevel:D } = 0
+ { \group_insert_after:N \exp_not:c { @@_model_ #4 _ white: } }
+ }
+ \use:c { @@_model_ #4 _white: }
+ \@@_model_devicen_init:nnn {#1} {#2} {#3}
+ \@@_model_devicen_convert:nnn {#4} {#2} {#3}
+ }
+% \end{macrocode}
+% For short lists of DeviceN colors, wee can use hand-tuned parsing. This
+% lines up with other models, where we allow for up to four components. For
+% larger spaces,. rather than limit artificially, we use a somewhat slow
+% approach based on open-ended commas-lists.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_model_devicen_parse_1:nn } #1#2
+ {
+ \cs_new:cpn { @@_parse_model_ #1 :w } ##1 , ##2 \s_@@_stop
+ { {#1} { \@@_parse_number:n {##1} } }
+ \cs_new_eq:cN { @@_parse_mix_ #1 :nw } \@@_parse_mix_gray:nw
+ }
+\cs_new_protected:cpn { @@_model_devicen_parse_2:nn } #1#2
+ {
+ \cs_new:cpn { @@_parse_model_ #1 :w } ##1 , ##2 , ##3 \s_@@_stop
+ { {#1} { \@@_parse_number:n {##1} ~ \@@_parse_number:n {##2} } }
+ \cs_new:cpn { @@_parse_mix_ #1 :nw }
+ ##1##2 ~ ##3 \s_@@_mark ##4 ~ ##5 \s_@@_stop
+ {
+ \fp_eval:n { ##2 * ##1 + ##4 * ( 1 - ##1 ) } \c_space_tl
+ \fp_eval:n { ##3 * ##1 + ##5 * ( 1 - ##1 ) }
+ }
+ }
+\cs_new_protected:cpn { @@_model_devicen_parse_3:nn } #1#2
+ {
+ \cs_new:cpn { @@_parse_model_ #1 :w } ##1 , ##2 , ##3 , ##4 \s_@@_stop
+ {
+ {#1}
+ {
+ \@@_parse_number:n {##1} ~
+ \@@_parse_number:n {##2} ~
+ \@@_parse_number:n {##3}
+ }
+ }
+ \cs_new_eq:cN { @@_parse_mix_ #1 :nw } \@@_parse_mix_rgb:nw
+ }
+\cs_new_protected:cpn { @@_model_devicen_parse_4:nn } #1#2
+ {
+ \cs_new:cpn { @@_parse_model_ #1 :w }
+ ##1 , ##2 , ##3 , ##4 , ##5 \s_@@_stop
+ {
+ {#1}
+ {
+ \@@_parse_number:n {##1} ~
+ \@@_parse_number:n {##2} ~
+ \@@_parse_number:n {##3} ~
+ \@@_parse_number:n {##4}
+ }
+ }
+ \cs_new_eq:cN { @@_parse_mix_ #1 :nw } \@@_parse_mix_cmyk:nw
+ }
+\cs_new_protected:Npn \@@_model_devicen_parse_generic:nn #1#2
+ {
+ \cs_new:cpn { @@_parse_model_ #1 :w } ##1 , ##2 \s_@@_stop
+ {
+ {#1}
+ { \@@_model_devicen_parse:nw {#2} ##1 , ##2 , \q_nil , \s_@@_stop }
+ }
+ \cs_new:cpx { @@_parse_mix_ #1 :nw }
+ ##1 ##2 \s_@@_mark ##3 \s_@@_stop
+ {
+ \exp_not:N \@@_model_devicen_mix:nw {##1}
+ ##2 \c_space_tl \exp_not:N \q_nil \c_space_tl \exp_not:N \s_@@_mark
+ ##3 \c_space_tl \exp_not:N \q_nil \c_space_tl \exp_not:N \s_@@_stop
+ }
+ }
+\cs_new:Npn \@@_model_devicen_parse:nw #1#2 , #3 \s_@@_stop
+ {
+ \int_compare:nNnT {#1} > 0
+ {
+ \quark_if_nil:nTF {#2}
+ { \prg_replicate:nn {#1} { 0 ~ } }
+ {
+ \@@_parse_number:n {#2}
+ \int_compare:nNnT {#1} > 1 { ~ }
+ \exp_args:Nf \@@_model_devicen_parse:nw
+ { \int_eval:n { #1 - 1 } } #3 \s_@@_stop
+ }
+ }
+ }
+\cs_new:Npn \@@_model_devicen_mix:nw #1#2 ~ #3 \s_@@_mark #4 ~ #5 \s_@@_stop
+ {
+ \fp_eval:n { #2 * #1 + #4 * ( 1 - #1 ) }
+ \quark_if_nil:oF { \tl_head:w #3 \q_stop }
+ {
+ \c_space_tl
+ \@@_model_devicen_mix:nw {#1} #3 \s_@@_mark #5 \s_@@_stop
+ }
+ }
+% \end{macrocode}
+% To construct the tint transformation, we have to use PostScript. The
+% aim is to have the final tint for each device colorant as
+% \[
+% 1 - \prod_{n} (1 - X_{n} D_{X_{n}})
+% \]
+% where $X$ is a DeviceN colorant and $D$ is the amount of device colorant
+% that the DeviceN colorant maps to. At the start of the process, the
+% PostScript stack will contain the $X_{n}$ values, whilst we have the
+% $D$ values on a per-DeviceN colorant basis. The more convenient approach
+% for us is therefore to take each DeviceN colorant in turn and find the
+% value $1 - X_{n} D_{X_{n}}$, multiplying as we go, and finalise with the
+% subtraction. That contrasts to \pkg{colorspace}: it splits the process
+% up by process color, which works better when you have a fixed list
+% of colorants. (\pkg{colorspace} only supports up to $4$ DeviceN colors,
+% and only \texttt{cmyk} as the alternative space.) To set this up,
+% we first need to know the number of values in the target color space:
+% this is easily handled as there are a very small range of possibles.
+% Once we have that information, it's relatively easy to build the required
+% PostScript using some generic code.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen_init:nnn #1#2#3
+ {
+ \exp_args:Ne \@@_model_devicen_init:nnnn
+ {
+ \str_case:nn {#2}
+ {
+ { cmyk } { 4 }
+ { gray } { 1 }
+ { rgb } { 3 }
+ }
+ }
+ {#1} {#2} {#3}
+ }
+% \end{macrocode}
+% As we always need to split the alternative values into parts, we use a
+% shared auxiliary and only use a minimal difference between code paths.
+% Construction of the tint transformation is as far as possible done using
+% loops, which means there are some inefficiencies for device colors in
+% the \texttt{DeviceN} space: we roll the stack one-at-a-time even if there
+% is a potential shortcut. However, that way there is nothing to special-case.
+% Once this is sorted, we can write the tint transform object, which will
+% remain as the last object until we sort out the final step: the colorant
+% list.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen_init:nnnn #1#2#3#4
+ {
+ \tl_set:Nx \l_@@_internal_tl
+ { \prg_replicate:nn {#1} { 1.0 ~ } }
+ \int_zero:N \l_@@_internal_int
+ \clist_map_inline:nn {#4}
+ {
+ \int_incr:N \l_@@_internal_int
+ \prop_get:NnN \g_@@_alternative_values_prop {##1}
+ \l_@@_value_tl
+ \exp_after:wN \@@_model_devicen_transform:w
+ \l_@@_value_tl , 0 , 0 , 0 \s_@@_stop {#1} {#2}
+ }
+ \tl_put_right:Nx \l_@@_internal_tl
+ {
+ \prg_replicate:nn {#1}
+ { neg ~ 1.0 ~ add ~ #1 ~ -1 ~ roll ~ }
+ \int_eval:n { #2 + 4 } ~ 4 ~ roll
+ \prg_replicate:nn {#2} { ~ pop }
+ }
+ \use:x
+ {
+ \@@_backend_devicen_init:nnn
+ {
+ \clist_map_function:nN {#4}
+ \@@_model_devicen_colorant:n
+ }
+ {
+ \str_case:nn {#3}
+ {
+ { cmyk } { /DeviceCMYK }
+ { gray } { /DeviceGray }
+ { rgb } { /DeviceRGB }
+ }
+ }
+ { \exp_not:V \l_@@_internal_tl }
+ }
+ }
+\cs_new_protected:Npn \@@_model_devicen_transform:w
+ #1 , #2 , #3 , #4 , #5 \s_@@_stop #6#7
+ {
+ \use:c { @@_model_devicen_transform_ #6 :nnnnn }
+ {#1} {#2} {#3} {#4} {#7}
+ }
+\cs_new_protected:cpn { @@_model_devicen_transform_1:nnnnn } #1#2#3#4#5
+ { \@@_model_devicen_transform:nnn {#5} { 1 } {#1} }
+\cs_new_protected:cpn { @@_model_devicen_transform_3:nnnnn } #1#2#3#4#5
+ {
+ \clist_map_inline { #1 , #2 , #3 }
+ { \@@_model_devicen_transform:nnn {#5} { 3 } {##1} }
+ }
+\cs_new_protected:cpn { @@_model_devicen_transform_4:nnnnn } #1#2#3#4#5
+ {
+ \clist_map_inline:nn { #1 , #2 , #3 , #4 }
+ { \@@_model_devicen_transform:nnn {#5} { 4 } {##1} }
+ }
+\cs_new_protected:Npn \@@_model_devicen_transform:nnn #1#2#3
+ {
+ \tl_put_right:Nx \l_@@_internal_tl
+ {
+ \fp_compare:nNnF {#3} = \c_zero_fp
+ {
+ \int_eval:n { #1 - \l_@@_internal_int + #2 } ~ index ~
+ #3 ~ neg ~ mul ~ 1.0 ~ add ~ mul ~
+ }
+ #2 ~ -1 ~ roll ~
+ }
+ }
+\cs_new:Npn \@@_model_devicen_colorant:n #1
+ {
+ / \prop_item:Nn \g_@@_colorants_prop {#1} ~
+ }
+% \end{macrocode}
+% Here we need to set up conversion from the DeviceN space to the alternative
+% at the \TeX{} level. This also means supplying methods for inter-converting
+% to other parameter-based spaces. Essentially the approach is exactly the same
+% as the PostScript, just expressed in \TeX{} terms.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_devicen_convert:nnn #1#2#3
+ {
+ \use:c { @@_model_devicen_convert_ #2 :nn } {#1} {#3}
+ }
+\cs_new_protected:Npn \@@_model_devicen_convert_cmyk:nn #1#2
+ {
+ \@@_model_convert:nnn {#1} { cmyk } { gray }
+ \@@_model_convert:nnn {#1} { cmyk } { rgb }
+ \@@_model_devicen_convert:nnnn {#1} { cmyk } { 4 } {#2}
+ }
+\cs_new_protected:Npn \@@_model_devicen_convert_gray:nn #1#2
+ {
+ \@@_model_convert:nnn {#1} { gray } { cmyk }
+ \@@_model_convert:nnn {#1} { gray } { rgb }
+ \@@_model_devicen_convert:nnnn {#1} { gray } { 1 } {#2}
+ }
+\cs_new_protected:Npn \@@_model_devicen_convert_rgb:nn #1#2
+ {
+ \@@_model_convert:nnn {#1} { rgb } { cmyk }
+ \@@_model_convert:nnn {#1} { rgb } { gray }
+ \@@_model_devicen_convert:nnnn {#1} { rgb } { 3 } {#2}
+ }
+\cs_new_protected:Npn \@@_model_devicen_convert:nnnn #1#2#3#4
+ {
+ \cs_new:cpx { @@_convert_ #1 _ #2 :w } ##1 \s_@@_stop
+ {
+ \exp_not:c { @@_convert_devicen_ #2 : \prg_replicate:nn {#3} { n } w }
+ \prg_replicate:nn {#3} { { 1 } }
+ ##1 \exp_not:N \s_@@_mark
+ \clist_map_function:nN {#4} \@@_model_devicen_convert:n
+ \exp_not:N \s_@@_stop
+ }
+ }
+\cs_new:Npn \@@_model_devicen_convert:n #1
+ {
+ {
+ \exp_args:Ne \@@_model_devicen_convert_aux:n
+ { \prop_item:Nn \g_@@_alternative_values_prop {#1} }
+ }
+ }
+\cs_new:Npn \@@_model_devicen_convert_aux:n #1
+ { \@@_model_devicen_convert_aux:w #1 , , , , \s_@@_stop }
+\cs_new:Npn \@@_model_devicen_convert_aux:w #1 , #2 , #3 , #4 , #5 \s_@@_stop
+ {
+ {#1}
+ \tl_if_blank:nF {#2}
+ {
+ {#2}
+ \tl_if_blank:nF {#3}
+ {
+ {#3}
+ \tl_if_blank:nF {#4} { {#4} }
+ }
+ }
+ }
+\cs_new:Npn \@@_convert_devicen_cmyk:nnnnw
+ #1#2#3#4#5 ~ #6 \s_@@_mark #7#8 \s_@@_stop
+ {
+ \@@_convert_devicen_cmyk:nnnnnnnnn {#5} {#1} {#2} {#3} {#4} #7
+ #6 \s_@@_mark #8 \s_@@_stop
+ }
+\cs_new:Npn \@@_convert_devicen_cmyk:nnnnnnnnn #1#2#3#4#5#6#7#8#9
+ {
+ \use:e
+ {
+ \exp_not:N \@@_convert_devicen_cmyk_aux:nnnnw
+ { \fp_eval:n { #2 * (1 - (#1 * #6)) } }
+ { \fp_eval:n { #3 * (1 - (#1 * #7)) } }
+ { \fp_eval:n { #4 * (1 - (#1 * #8)) } }
+ { \fp_eval:n { #5 * (1 - (#1 * #9)) } }
+ }
+ }
+\cs_new:Npn \@@_convert_devicen_cmyk_aux:nnnnw
+ #1#2#3#4 #5 \s_@@_mark #6 \s_@@_stop
+ {
+ \tl_if_blank:nTF {#5}
+ {
+ \fp_eval:n { 1 - #1 } ~
+ \fp_eval:n { 1 - #2 } ~
+ \fp_eval:n { 1 - #3 } ~
+ \fp_eval:n { 1 - #4 }
+ }
+ {
+ \@@_convert_devicen_cmyk:nnnnw {#1} {#2} {#3} {#4}
+ #5 \s_@@_mark #6 \s_@@_stop
+ }
+ }
+\cs_new:Npn \@@_convert_devicen_gray:nw
+ #1#2 ~ #3 \s_@@_mark #4#5 \s_@@_stop
+ {
+ \@@_convert_devicen_gray:nnn {#2} {#1} #4
+ #3 \s_@@_mark #5 \s_@@_stop
+ }
+\cs_new:Npn \@@_convert_devicen_gray:nnn #1#2#3
+ {
+ \exp_arsgs:Ne \@@_convert_devicen_gray_aux:nw
+ { \fp_eval:n { #2 * (1 - (#1 * #3)) } }
+ }
+\cs_new:Npn \@@_convert_devicen_gray_aux:nw
+ #1 #2 \s_@@_mark #3 \s_@@_stop
+ {
+ \tl_if_blank:nTF {#2}
+ { \fp_eval:n { 1 - #1 } }
+ {
+ \@@_convert_devicen_gray:nw {#1}
+ #2 \s_@@_mark #3 \s_@@_stop
+ }
+ }
+\cs_new:Npn \@@_convert_devicen_rgb:nnnw
+ #1#2#3#4 ~ #5 \s_@@_mark #6#7 \s_@@_stop
+ {
+ \@@_convert_devicen_cmyk:nnnnnn {#4} {#1} {#2} {#3} #6
+ #5 \s_@@_mark #7 \s_@@_stop
+ }
+\cs_new:Npn \@@_convert_devicen_rgb:nnnnnnn #1#2#3#4#5#6#7
+ {
+ \use:e
+ {
+ \exp_not:N \@@_convert_devicen_rgb_aux:nnnw
+ { \fp_eval:n { #2 * (1 - (#1 * #5)) } }
+ { \fp_eval:n { #3 * (1 - (#1 * #6)) } }
+ { \fp_eval:n { #4 * (1 - (#1 * #7)) } }
+ }
+ }
+\cs_new:Npn \@@_convert_devicen_rgb_aux:nnnw
+ #1#2#3 #4 \s_@@_mark #5 \s_@@_stop
+ {
+ \tl_if_blank:nTF {#4}
+ {
+ \fp_eval:n { 1 - #1 } ~
+ \fp_eval:n { 1 - #2 } ~
+ \fp_eval:n { 1 - #3 }
+ }
+ {
+ \@@_convert_devicen_rgb:nnnw {#1} {#2} {#3}
+ #4 \s_@@_mark #5 \s_@@_stop
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Diagnostics}
%
% \begin{macro}{\color_show:n}
@@ -1830,7 +2419,7 @@
%
% \subsection{Messages}
%
-% \begin{macrocode}
+% \begin{macrocode}
\__kernel_msg_new:nnnn { color } { CIELAB-requires-illuminant }
{ CIELAB~color~space~'#1'~require~an~illuminant. }
{
@@ -1847,6 +2436,28 @@
LaTeX~has~been~asked~to~convert~a~color~from~model~'#1'~
to~model'#2',~but~there~is~no~method~available~to~do~that.
}
+\__kernel_msg_new:nnnn { color } { DeviceN-inconsistent-alternative }
+ { DeviceN~color~spaces~require~a~single~alternative~space. }
+ {
+ LaTeX~has~been~asked~to~create~a~DeviceN~color~space~'#1',~
+ but~the~constituent~colors~do~not~have~a~common~alternative~
+ color.
+ }
+\__kernel_msg_new:nnnn { color } { DeviceN-no-alternative }
+ { DeviceN~color~spaces~require~an~alternative~space. }
+ {
+ LaTeX~has~been~asked~to~create~a~DeviceN~color~space~'#1',~
+ but~the~constituent~colors~do~not~all~have~a~device-based~alternative.
+ }
+\__kernel_msg_new:nnnn { color } { DeviceN-requires-names }
+ { DeviceN~color~space~'#1'~require~a~list~of~names. }
+ {
+ LaTeX~has~been~asked~to~create~a~DeviceN~color~space,~
+ but~no~\\ \\
+ \iow_indent:n { names~=~<names> }
+ \\ \\
+ key~was~given~with~the~correct~information.
+ }
\__kernel_msg_new:nnnn { color } { model-already-defined }
{ Color~model~'#1'~already~defined. }
{
@@ -1919,9 +2530,9 @@
LaTeX~has~been~asked~to~create~a~new~color~model~called~'#1',~
but~this~type~of~model~was~never~set~up.
}
-% \end{macrocode}
+% \end{macrocode}
%
-% \begin{macrocode}
+% \begin{macrocode}
\__kernel_msg_new:nnn { color } { show }
{
The~color~#1~
@@ -1929,7 +2540,7 @@
{ is~undefined. }
{ has~the~properties: #2 }
}
-% \end{macrocode}
+% \end{macrocode}
%
% \begin{macrocode}
%</package>
diff --git a/macros/latex/contrib/l3experimental/l3color.pdf b/macros/latex/contrib/l3experimental/l3color.pdf
index f2a6933a84..e670402832 100644
--- a/macros/latex/contrib/l3experimental/l3color.pdf
+++ b/macros/latex/contrib/l3experimental/l3color.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx
index afc4616dfb..029f791813 100644
--- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf
index 2226678a0e..95ef0c0c73 100644
--- a/macros/latex/contrib/l3experimental/l3draw-code.pdf
+++ b/macros/latex/contrib/l3experimental/l3draw-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx
index ffe0cd9588..19898aee89 100644
--- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx
index 9f87bf357c..5ca8e42688 100644
--- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx
index aafe12bcc2..7537ffb85a 100644
--- a/macros/latex/contrib/l3experimental/l3draw-points.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx
index 99edbf1992..c35149facb 100644
--- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx
index e6b35bf790..b0e003b844 100644
--- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx
index 53cc03b98e..1af7a525b9 100644
--- a/macros/latex/contrib/l3experimental/l3draw-state.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx
index e30bcf6d19..6bb90111e1 100644
--- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx
index 6d1e5e96aa..69f322a0fa 100644
--- a/macros/latex/contrib/l3experimental/l3draw.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw.dtx
@@ -110,7 +110,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -1136,7 +1136,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3draw}{2020-09-11}{}
+\ProvidesExplPackage{l3draw}{2020-09-24}{}
{L3 Experimental core drawing support}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf
index ea0c2c3cd2..6e4e62367e 100644
--- a/macros/latex/contrib/l3experimental/l3draw.pdf
+++ b/macros/latex/contrib/l3experimental/l3draw.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx
index 5de6c7c4aa..212d9e6320 100644
--- a/macros/latex/contrib/l3experimental/l3galley.dtx
+++ b/macros/latex/contrib/l3experimental/l3galley.dtx
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -686,7 +686,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3galley}{2020-09-11}{}
+\ProvidesExplPackage{l3galley}{2020-09-24}{}
{L3 Experimental galley code}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf
index aeb2cb074f..d23ea467fc 100644
--- a/macros/latex/contrib/l3experimental/l3galley.pdf
+++ b/macros/latex/contrib/l3experimental/l3galley.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx
index 6d74ceebb9..9a44973417 100644
--- a/macros/latex/contrib/l3experimental/l3graphics.dtx
+++ b/macros/latex/contrib/l3experimental/l3graphics.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -240,7 +240,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3graphics}{2020-09-11}{}
+\ProvidesExplPackage{l3graphics}{2020-09-24}{}
{L3 Experimental graphics inclusion support}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf
index 824722260e..74a9c73077 100644
--- a/macros/latex/contrib/l3experimental/l3graphics.pdf
+++ b/macros/latex/contrib/l3experimental/l3graphics.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3pdf-code.pdf b/macros/latex/contrib/l3experimental/l3pdf-code.pdf
index b9936cc61e..e73f7fb464 100644
--- a/macros/latex/contrib/l3experimental/l3pdf-code.pdf
+++ b/macros/latex/contrib/l3experimental/l3pdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3pdf.dtx b/macros/latex/contrib/l3experimental/l3pdf.dtx
index e5af45a9b8..4eec458dce 100644
--- a/macros/latex/contrib/l3experimental/l3pdf.dtx
+++ b/macros/latex/contrib/l3experimental/l3pdf.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -190,7 +190,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3pdf}{2020-09-11}{}
+\ProvidesExplPackage{l3pdf}{2020-09-24}{}
{L3 Experimental core PDF support}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3pdf.pdf b/macros/latex/contrib/l3experimental/l3pdf.pdf
index 50f9afafa4..cede734c74 100644
--- a/macros/latex/contrib/l3experimental/l3pdf.pdf
+++ b/macros/latex/contrib/l3experimental/l3pdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx
index 775e5d809f..da524edf58 100644
--- a/macros/latex/contrib/l3experimental/l3str-format.dtx
+++ b/macros/latex/contrib/l3experimental/l3str-format.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -166,7 +166,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3str-format}{2020-09-11}{}
+\ProvidesExplPackage{l3str-format}{2020-09-24}{}
{L3 Experimental string formatting}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf
index 9cde8e0e97..75bdb6272d 100644
--- a/macros/latex/contrib/l3experimental/l3str-format.pdf
+++ b/macros/latex/contrib/l3experimental/l3str-format.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx
index 807e7383d3..40b5201767 100644
--- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx
+++ b/macros/latex/contrib/l3experimental/l3sys-shell.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -135,7 +135,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3sys-shell}{2020-09-11}{}
+\ProvidesExplPackage{l3sys-shell}{2020-09-24}{}
{L3 Experimental system shell functions}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf
index 6939e5e38e..a01691cf7e 100644
--- a/macros/latex/contrib/l3experimental/l3sys-shell.pdf
+++ b/macros/latex/contrib/l3experimental/l3sys-shell.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx
index 4286442045..9985fbb393 100644
--- a/macros/latex/contrib/l3experimental/xcoffins.dtx
+++ b/macros/latex/contrib/l3experimental/xcoffins.dtx
@@ -56,7 +56,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -675,7 +675,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xcoffins}{2020-09-11}{}
+\ProvidesExplPackage{xcoffins}{2020-09-24}{}
{L3 Experimental design level coffins}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf
index 3872ed532b..6843289a1b 100644
--- a/macros/latex/contrib/l3experimental/xcoffins.pdf
+++ b/macros/latex/contrib/l3experimental/xcoffins.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx
index 52667441b6..06c7f3c371 100644
--- a/macros/latex/contrib/l3experimental/xgalley.dtx
+++ b/macros/latex/contrib/l3experimental/xgalley.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-11}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -734,7 +734,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xgalley}{2020-09-11}{}
+\ProvidesExplPackage{xgalley}{2020-09-24}{}
{L3 Experimental galley}
\RequirePackage{xparse,xtemplate,l3galley}
% \end{macrocode}
diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf
index 9a3af8e4dc..1bd85f608d 100644
--- a/macros/latex/contrib/l3experimental/xgalley.pdf
+++ b/macros/latex/contrib/l3experimental/xgalley.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md
index 1c8206f28f..b3ccf0b773 100644
--- a/macros/latex/contrib/l3kernel/CHANGELOG.md
+++ b/macros/latex/contrib/l3kernel/CHANGELOG.md
@@ -7,6 +7,12 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-24]
+
+### Changed
+- Use Lua pseudo-primitives instead of `\directlua`
+- `\token_if_primitive:N(TF)` now reports pseudo-primitives as primitives in LuaTeX
+
## [2020-09-06]
### Fixed
@@ -765,7 +771,8 @@ this project uses date-based 'snapshot' version identifiers.
- Step func­tions have been added for dim vari­ables,
e.g. `\dim_step_in­line:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-06...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-24...HEAD
+[2020-09-24]: https://github.com/latex3/latex3/compare/2020-09-06...2020-09-24
[2020-09-06]: https://github.com/latex3/latex3/compare/2020-09-03...2020-09-06
[2020-09-03]: https://github.com/latex3/latex3/compare/2020-09-01...2020-09-03
[2020-09-01]: https://github.com/latex3/latex3/compare/2020-08-07...2020-09-01
diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md
index d90d237fe6..9f52369eb7 100644
--- a/macros/latex/contrib/l3kernel/README.md
+++ b/macros/latex/contrib/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2020-09-06
+Release 2020-09-24
Overview
--------
@@ -33,7 +33,7 @@ category codes (for Unicode engines) and PDF support primitives (where direct
PDF generation is used). The bundle only works with the following engines:
* pdfTeX v1.40 or later
* XeTeX v0.99992 or later
-* LuaTeX v0.76 or later
+* LuaTeX v1.10 or later
* e-(u)pTeX from mid-2012 onward
pdfTeX v1.40 was released in 2007, and so any recent TeX distribution
diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx
index 140e507b63..003502090e 100644
--- a/macros/latex/contrib/l3kernel/expl3.dtx
+++ b/macros/latex/contrib/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2020-09-06}%
+\def\ExplFileDate{2020-09-24}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf
index b48b54946a..dbe8f29701 100644
--- a/macros/latex/contrib/l3kernel/expl3.pdf
+++ b/macros/latex/contrib/l3kernel/expl3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf
index 79ba503768..a19a9a94ad 100644
--- a/macros/latex/contrib/l3kernel/interface3.pdf
+++ b/macros/latex/contrib/l3kernel/interface3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex
index 8a163631f1..020a23120a 100644
--- a/macros/latex/contrib/l3kernel/interface3.tex
+++ b/macros/latex/contrib/l3kernel/interface3.tex
@@ -54,7 +54,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2020-09-06}
+\date{Released 2020-09-24}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/l3.ins b/macros/latex/contrib/l3kernel/l3.ins
index 5e7d1bfff9..ad3b5267dd 100644
--- a/macros/latex/contrib/l3kernel/l3.ins
+++ b/macros/latex/contrib/l3kernel/l3.ins
@@ -60,7 +60,7 @@ and all files in that bundle must be distributed together.
{
\from{expl3.dtx} {package}
\from{l3bootstrap.dtx} {package}
- \from{l3names.dtx} {package}
+ \from{l3names.dtx} {package,tex}
\from{l3basics.dtx} {package}
\from{l3expan.dtx} {package}
\from{l3quark.dtx} {package}
@@ -70,9 +70,9 @@ and all files in that bundle must be distributed together.
\from{l3int.dtx} {package}
\from{l3flag.dtx} {package}
\from{l3prg.dtx} {package}
- \from{l3sys.dtx} {package}
+ \from{l3sys.dtx} {package,tex}
\from{l3clist.dtx} {package}
- \from{l3token.dtx} {package}
+ \from{l3token.dtx} {package,tex}
\from{l3prop.dtx} {package}
\from{l3msg.dtx} {package}
\from{l3file.dtx} {package}
@@ -165,6 +165,11 @@ and all files in that bundle must be distributed together.
\endpreamble
\nopostamble
-\generate{\file{expl3.lua}{\from{l3luatex.dtx}{package,lua}}}
+\generate{\file{expl3.lua}{
+ \from{l3luatex.dtx}{package,lua}
+ \from{l3names.dtx}{package,lua}
+ \from{l3sys.dtx}{package,lua}
+ \from{l3token.dtx}{package,lua}
+}}
\endbatchfile
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index b167eb6dcf..0d2594ca74 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
index 810de9812c..c3b597031a 100644
--- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -176,16 +176,23 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\else
- \ifnum\luatexversion<95 %
+ \ifnum\luatexversion<110 %
\else
% \end{macrocode}
% For \LuaTeX{} we make sure the basic support is loaded:
% this is only necessary in plain.
+%
+% Additionally we just ensure that \TeX{} has seen the csnames \cs{prg_return_true:}
+% and \cs{prg_return_false:} before the Lua code builds these tokens.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname newcatcodetable\endcsname\relax
\input{ltluatex}%
\fi
+ \begingroup\edef\ignored{%
+ \expandafter\noexpand\csname prg_return_true:\endcsname
+ \expandafter\noexpand\csname prg_return_false:\endcsname
+ }\endgroup
\directlua{require("expl3")}%
% \end{macrocode}
% As the user might be making a custom format, no assumption is made about
@@ -212,6 +219,9 @@
% The code currently requires \eTeX{} and functionality equivalent to
% \tn{pdfstrcmp}, and also driver and Unicode character support. This is
% available in a reasonably-wide range of engines.
+%
+% For \LuaTeX, we require at least Lua 5.3 and the |token.set_lua| function.
+% This is available at least since \LuaTeX{} 1.10.
% \begin{macrocode}
\begingroup
\def\next{\endgroup}%
@@ -224,7 +234,7 @@
These are available in the engines\LineBreak
- pdfTeX v1.40\LineBreak
- XeTeX v0.99992\LineBreak
- - LuaTeX v0.95\LineBreak
+ - LuaTeX v1.10\LineBreak
- e-(u)pTeX mid-2012\LineBreak
or later.\LineBreak
\LineBreak
@@ -247,7 +257,7 @@
\fi
\expandafter\ifx\csname directlua\endcsname\relax
\else
- \ifnum\luatexversion<76 \else 1\fi
+ \ifnum\luatexversion<110 \else 1\fi
\fi
=0 %
\newlinechar`\^^J %
diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx
index d3a00d00f3..dbf1619275 100644
--- a/macros/latex/contrib/l3kernel/l3box.dtx
+++ b/macros/latex/contrib/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx
index 7c745269ec..3014f8a118 100644
--- a/macros/latex/contrib/l3kernel/l3candidates.dtx
+++ b/macros/latex/contrib/l3kernel/l3candidates.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx
index 79f1f45fcd..f07f1a1b6d 100644
--- a/macros/latex/contrib/l3kernel/l3cctab.dtx
+++ b/macros/latex/contrib/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx
index b125b7f2f8..e2931f26de 100644
--- a/macros/latex/contrib/l3kernel/l3clist.dtx
+++ b/macros/latex/contrib/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx
index 849eddaaea..3ec8d95ff9 100644
--- a/macros/latex/contrib/l3kernel/l3coffins.dtx
+++ b/macros/latex/contrib/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3color-base.dtx b/macros/latex/contrib/l3kernel/l3color-base.dtx
index f34fab4020..47515cd30e 100644
--- a/macros/latex/contrib/l3kernel/l3color-base.dtx
+++ b/macros/latex/contrib/l3kernel/l3color-base.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx
index 5a214de133..72cd83ed35 100644
--- a/macros/latex/contrib/l3kernel/l3debug.dtx
+++ b/macros/latex/contrib/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx
index be0f204446..fff81d47ad 100644
--- a/macros/latex/contrib/l3kernel/l3deprecation.dtx
+++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx
index 60f5e465c3..db015fd372 100644
--- a/macros/latex/contrib/l3kernel/l3doc.dtx
+++ b/macros/latex/contrib/l3kernel/l3doc.dtx
@@ -79,7 +79,7 @@ and all files in that bundle must be distributed together.
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
% \maketitle
% \tableofcontents
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx
index c0e139cb3b..171d20f694 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.dtx
+++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf
index 6eaac9700b..057b880d3f 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.pdf
+++ b/macros/latex/contrib/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx
index 41af274e8b..4c2039f911 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx
index 67d708da28..d96d9c7e31 100644
--- a/macros/latex/contrib/l3kernel/l3file.dtx
+++ b/macros/latex/contrib/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -2636,18 +2636,9 @@
% \end{macro}
%
% \begin{macro}{\@@_size:n}
-% A copy of the primitive where it's available, or the \LuaTeX{}
-% equivalent if relevant.
+% A copy of the primitive where it's available.
% \begin{macrocode}
\cs_new_eq:NN \@@_size:n \tex_filesize:D
-\sys_if_engine_luatex:T
- {
- \cs_gset:Npn \@@_size:n #1
- {
- \lua_now:e
- { l3kernel.filesize ( " \lua_escape:e {#1} " ) }
- }
- }
% \end{macrocode}
% \end{macro}
%
@@ -2753,9 +2744,7 @@
% \end{macrocode}
% Deal with the fact that the primitive might not be available.
% \begin{macrocode}
-\bool_lazy_or:nnF
- { \cs_if_exist_p:N \tex_filesize:D }
- { \sys_if_engine_luatex_p: }
+\cs_if_exist:NF \tex_filesize:D
{
\cs_gset:Npn \file_full_name:n #1
{
@@ -2817,9 +2806,7 @@
% existence of the file with |.tex| extension in that directory, and
% if it exists we include the |.tex| extension in the result.
% \begin{macrocode}
-\bool_lazy_or:nnF
- { \cs_if_exist_p:N \tex_filesize:D }
- { \sys_if_engine_luatex_p: }
+\cs_if_exist:NF \tex_filesize:D
{
\prg_set_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF }
{
@@ -2882,8 +2869,6 @@
% As the MD5 function has a slightly different syntax from the other commands,
% there is a little cleaning up to do.
% \begin{macrocode}
-\cs_new:Npn \file_mdfive_hash:n #1
- { \@@_details:nn {#1} { mdfivesum } }
\cs_new:Npn \file_size:n #1
{ \@@_details:nn {#1} { size } }
\cs_new:Npn \file_timestamp:n #1
@@ -2898,20 +2883,10 @@
\tl_if_blank:nF {#1}
{ \use:c { tex_file #2 :D } {#1} }
}
-\sys_if_engine_luatex:TF
- {
- \cs_gset:Npn \@@_details_aux:nn #1#2
- {
- \lua_now:e
- { l3kernel.file#2 ( " \lua_escape:e { #1 } " ) }
- }
- }
- {
- \cs_gset:Npn \file_mdfive_hash:n #1
- { \exp_args:Ne \@@_mdfive_hash:n { \file_full_name:n {#1} } }
- \cs_new:Npn \@@_mdfive_hash:n #1
- { \tex_mdfivesum:D file {#1} }
- }
+\cs_new:Npn \file_mdfive_hash:n #1
+ { \exp_args:Ne \@@_mdfive_hash:n { \file_full_name:n {#1} } }
+\cs_new:Npn \@@_mdfive_hash:n #1
+ { \tex_mdfivesum:D file {#1} }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2973,34 +2948,21 @@
length ~ \int_eval:n { #1 - #2 + 1 }
{#3}
}
-\sys_if_engine_luatex:T
- {
- \cs_gset:Npn \@@_hex_dump_auxiv:nnn #1#2#3
- {
- \lua_now:e
- {
- l3kernel.filedump
- (
- " \lua_escape:e {#3} " ,
- \int_eval:n { #2 - 1 } ,
- \int_eval:n { #1 - #2 + 1 }
- )
- }
- }
- }
\cs_new:Npn \file_hex_dump:n #1
{ \exp_args:Ne \@@_hex_dump:n { \file_full_name:n {#1} } }
-\cs_new:Npn \@@_hex_dump:n #1
+\sys_if_engine_luatex:TF
{
- \tl_if_blank:nF {#1}
- { \tex_filedump:D length \tex_filesize:D {#1} {#1} }
+ \cs_new:Npn \@@_hex_dump:n #1
+ {
+ \tl_if_blank:nF {#1}
+ { \tex_filedump:D whole {#1} {#1} }
+ }
}
-\sys_if_engine_luatex:T
{
- \cs_gset:Npn \@@_hex_dump:n #1
+ \cs_new:Npn \@@_hex_dump:n #1
{
- \lua_now:e
- { l3kernel.filedump ( " \lua_escape:e { #1 } " ) }
+ \tl_if_blank:nF {#1}
+ { \tex_filedump:D length \tex_filesize:D {#1} {#1} }
}
}
% \end{macrocode}
@@ -3048,9 +3010,7 @@
% Where the primitive is not available, issue an error: this is a little
% more conservative than absolutely needed, but does work.
% \begin{macrocode}
-\bool_lazy_or:nnF
- { \cs_if_exist_p:N \tex_filesize:D }
- { \sys_if_engine_luatex_p: }
+\cs_if_exist:NF \tex_filesize:D
{
\cs_set_protected:Npn \@@_get_details:nnN #1#2#3
{
@@ -3095,33 +3055,12 @@
% \end{macro}
%
% \begin{macro}[EXP]{\@@_str_cmp:nn}
-% \begin{macro}[EXP]{\@@_str_escape:n}
% As we are doing a fixed-length \enquote{big} integer comparison, it
% is easiest to use the low-level behavior of string comparisons.
% \begin{macrocode}
-\cs_new:Npn \@@_str_cmp:nn #1#2 { \tex_strcmp:D {#1} {#2} }
-\sys_if_engine_luatex:T
- {
- \cs_set:Npn \@@_str_cmp:nn #1#2
- {
- \lua_now:e
- {
- l3kernel.strcmp
- (
- " \@@_str_escape:n {#1}",
- " \@@_str_escape:n {#2}"
- )
- }
- }
- \cs_new:Npn \@@_str_escape:n #1
- {
- \lua_escape:e
- { \__kernel_tl_to_str:w \use:e { {#1} } }
- }
- }
+\cs_new_eq:NN \@@_str_cmp:nn \tex_strcmp:D
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[EXP, pTF]{\file_compare_timestamp:nNn}
% \begin{macro}[EXP]{\@@_compare_timestamp:nnN}
@@ -3169,15 +3108,7 @@
}
}
}
-\sys_if_engine_luatex:TF
- {
- \cs_new:Npn \@@_timestamp:n #1
- {
- \lua_now:e
- { l3kernel.filemoddate ( " \lua_escape:e {#1} " ) }
- }
- }
- { \cs_new_eq:NN \@@_timestamp:n \tex_filemoddate:D }
+\cs_new_eq:NN \@@_timestamp:n \tex_filemoddate:D
\cs_if_exist:NF \@@_timestamp:n
{
\prg_set_conditional:Npnn \file_compare_timestamp:nNn #1#2#3
diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx
index 697a9bd0de..66c065a0e7 100644
--- a/macros/latex/contrib/l3kernel/l3flag.dtx
+++ b/macros/latex/contrib/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
index 4635d8a5af..cddaff1eba 100644
--- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
index a01a2aa3a3..9e917ddb9d 100644
--- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -1239,27 +1239,9 @@
% \subsection{Fast string comparison}
%
% \begin{macro}{\@@_str_if_eq:nn}
-% A private version of the low-level string comparison function. As
-% the nature of the arguments is restricted and as speed is of the essence,
-% this version does not seek to deal with |#| tokens.
-% No \pkg{l3sys} or \pkg{l3luatex} just yet so we have to define in terms of
-% primitives.
+% A private version of the low-level string comparison function.
% \begin{macrocode}
-\sys_if_engine_luatex:TF
- {
- \cs_new:Npn \@@_str_if_eq:nn #1#2
- {
- \tex_directlua:D
- {
- l3kernel.strcmp
- (
- " \tex_luaescapestring:D {#1}",
- " \tex_luaescapestring:D {#2}"
- )
- }
- }
- }
- { \cs_new_eq:NN \@@_str_if_eq:nn \tex_strcmp:D }
+\cs_new_eq:NN \@@_str_if_eq:nn \tex_strcmp:D
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
index e0a2b26b1a..29e30ecc1f 100644
--- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
index a18213f911..3b0dd3360e 100644
--- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
index b7e4e1bb29..c86808203c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
index f801c860b5..7ed1e42736 100644
--- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
index daf38c1a39..8c0a215652 100644
--- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
index 0753398abc..7d43b526ea 100644
--- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx
index 4b86d9aa07..7a125bc22f 100644
--- a/macros/latex/contrib/l3kernel/l3fp-random.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx
index 76400b3bac..551902b58b 100644
--- a/macros/latex/contrib/l3kernel/l3fp-round.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
index 6948b7104a..89f47bfafc 100644
--- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
index 3719dd113d..319e825bd0 100644
--- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index f19f21c1c3..144a59bb7e 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx
index 449f786201..41824d7478 100644
--- a/macros/latex/contrib/l3kernel/l3fparray.dtx
+++ b/macros/latex/contrib/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index 02c29627da..175a9e07dd 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx
index e41a839d39..dbeddb1ca1 100644
--- a/macros/latex/contrib/l3kernel/l3intarray.dtx
+++ b/macros/latex/contrib/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
index e73b8d6c55..c7a577d8ba 100644
--- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index 812b0941e1..3e79e8c464 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx
index 0dcb0a5cb6..f5453f5fe1 100644
--- a/macros/latex/contrib/l3kernel/l3legacy.dtx
+++ b/macros/latex/contrib/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx
index b8f00b1187..ca26662658 100644
--- a/macros/latex/contrib/l3kernel/l3luatex.dtx
+++ b/macros/latex/contrib/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -120,9 +120,15 @@
% As well as interfaces for \TeX{}, there are a small number of Lua functions
% provided here.
%
-% \begin{function}{l3kernel}
-% All public interfaces provided by the module are stored within the
-% |l3kernel| table.
+% \begin{function}{ltx.utils}
+% Most public interfaces provided by the module are stored within the
+% |ltx.utils| table.
+% \end{function}
+%
+% \begin{function}[deprecated = 2021-12-31]{l3kernel}
+% For compatibility reasons, there are also some deprecated interfaces provided
+% in the |l3kernel| table. These do not return their result as Lua values but
+% instead print them to \TeX.
% \end{function}
%
% \begin{function}{l3kernel.charcat}
@@ -143,8 +149,9 @@
% for user input.
% \end{function}
%
-% \begin{function}{l3kernel.filedump}
+% \begin{function}{ltx.utils.filedump, l3kernel.filedump}
% \begin{syntax}
+% \meta{dump}| = ltx.utils.filedump(|\meta{file}|,|\meta{offset}|,|\meta{length}|)| \\
% |l3kernel.filedump(|\meta{file}|,|\meta{offset}|,|\meta{length}|)|
% \end{syntax}
% Returns the uppercase hexadecimal representation of the content of the
@@ -154,8 +161,9 @@
% is read starting at the \meta{offset}.
% \end{function}
%
-% \begin{function}{l3kernel.filemdfivesum}
+% \begin{function}{ltx.utils.filemd5sum, l3kernel.filemdfivesum}
% \begin{syntax}
+% \meta{hash}| = ltx.utils.filemd5sum(|\meta{file}|)| \\
% |l3kernel.filemdfivesum(|\meta{file}|)|
% \end{syntax}
% Returns the MD5 sum of the file contents read as bytes; note that
@@ -164,8 +172,9 @@
% nothing is returned with \emph{no error raised}.
% \end{function}
%
-% \begin{function}{l3kernel.filemoddate}
+% \begin{function}{ltx.utils.filemoddate, l3kernel.filemoddate}
% \begin{syntax}
+% \meta{date}| = ltx.utils.filemoddate(|\meta{file}|)| \\
% |l3kernel.filemoddate(|\meta{file}|)|
% \end{syntax}
% Returns the date/time of last modification of the \meta{file} in the
@@ -179,8 +188,9 @@
% not found, nothing is returned with \emph{no error raised}.
% \end{function}
%
-% \begin{function}{l3kernel.filesize}
+% \begin{function}{ltx.utils.filesize, l3kernel.filesize}
% \begin{syntax}
+% |size = ltx.utils.filesize(|\meta{file}|)| \\
% |l3kernel.filesize(|\meta{file}|)|
% \end{syntax}
% Returns the size of the \meta{file} in bytes. If the \meta{file} is not
@@ -313,11 +323,17 @@
% \pkg{pdftexcmds} package.
%
% \begin{macro}{l3kernel}
+% \begin{macro}{ltx.utils}
% Create a table for the kernel's own use.
% \begin{macrocode}
l3kernel = l3kernel or { }
+local l3kernel = l3kernel
+ltx = ltx or {utils={}}
+ltx.utils = ltx.utils or { }
+local ltxutils = ltx.utils
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% Local copies of global tables.
% \begin{macrocode}
@@ -331,7 +347,6 @@ local string = string
local tex = tex
local texio = texio
local tonumber = tonumber
-local unicode = unicode
% \end{macrocode}
%
% Local copies of standard functions.
@@ -342,23 +357,33 @@ local floor = math.floor
local format = string.format
local gsub = string.gsub
local lfs_attr = lfs.attributes
-local md5_sum = md5.sum
local open = io.open
-local os_clock = os.clock
local os_date = os.date
-local os_exec = os.execute
local setcatcode = tex.setcatcode
local sprint = tex.sprint
local cprint = tex.cprint
local write = tex.write
local write_nl = texio.write_nl
+local utf8_char = utf8.char
+
+local scan_int = token.scan_int or token.scan_integer
+local scan_string = token.scan_string
+local scan_keyword = token.scan_keyword
+local put_next = token.put_next
+
+local true_tok = token.create'prg_return_true:'
+local false_tok = token.create'prg_return_false:'
% \end{macrocode}
%
-% Newer Con\TeX{}t releases replace the |unicode| library by |utf| and
-% since Lua 5.3 we can even use the Lua standard |utf8| library.
% \begin{macrocode}
-local utf8_char = (utf8 and utf8.char) or (utf and utf.char) or unicode.utf8.char
-% \end{macrocode}
+local function deprecated(table, name, func)
+ table[name] = function(...)
+ write_nl(format("Calling deprecated Lua function %s", name))
+ table[name] = func
+ return func(...)
+ end
+end
+% \end{macrocode
%
% Deal with Con\TeX{}t: doesn't use |kpse| library.
% \begin{macrocode}
@@ -371,20 +396,20 @@ local kpse_find = (resolvers and resolvers.findfile) or kpse.find_file
% covered in \pkg{pdftexcmds} but is not currently required here.
% \begin{macrocode}
local function escapehex(str)
- write((gsub(str, ".",
- function (ch) return format("%02X", byte(ch)) end)))
+ return (gsub(str, ".",
+ function (ch) return format("%02X", byte(ch)) end))
end
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{l3kernel.charcat}
% Creating arbitrary chars using |tex.cprint|.
+% The alternative approach using |token.put_next(token.create(...))|
+% would be about 10\% slower.
% \begin{macrocode}
-local charcat
-function charcat(charcode, catcode)
+deprecated(l3kernel, 'charcat', function(charcode, catcode)
cprint(catcode, utf8_char(charcode))
-end
-l3kernel.charcat = charcat
+end)
% \end{macrocode}
% \end{macro}
%
@@ -392,9 +417,10 @@ l3kernel.charcat = charcat
% Simple timing set up: give the result from the system clock in scaled
% seconds.
% \begin{macrocode}
-local base_time = 0
+local os_clock = os.clock
+local base_clock_time = 0
local function elapsedtime()
- local val = (os_clock() - base_time) * 65536 + 0.5
+ local val = (os_clock() - base_clock_time) * 65536 + 0.5
if val > 2147483647 then
val = 2147483647
end
@@ -402,36 +428,56 @@ local function elapsedtime()
end
l3kernel.elapsedtime = elapsedtime
local function resettimer()
- base_time = os_clock()
+ base_clock_time = os_clock()
end
l3kernel.resettimer = resettimer
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{ltx.utils.filedump}
% \begin{macro}{l3kernel.filedump}
% Similar comments here to the next function: read the file in binary mode
% to avoid any line-end weirdness.
% \begin{macrocode}
local function filedump(name,offset,length)
local file = kpse_find(name,"tex",true)
- if file then
- local length = tonumber(length) or lfs_attr(file,"size")
- local offset = tonumber(offset) or 0
- local f = open(file,"rb")
- if f then
- if offset > 0 then
- f:seek("set",offset)
- end
- local data = f:read(length)
- escapehex(data)
- f:close()
- end
+ if not file then return end
+ local f = open(file,"rb")
+ if not f then return end
+ if offset and offset > 0 then
+ f:seek("set", offset)
end
+ local data = f:read(length or 'a')
+ f:close()
+ return escapehex(data)
end
-l3kernel.filedump = filedump
+ltxutils.filedump = filedump
+deprecated(l3kernel, "filedump", function(name, offset, length)
+ local dump = filedump(name, tonumber(offset), tonumber(length))
+ if dump then
+ write(dump)
+ end
+end)
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
+% \begin{macro}{md5.HEX}
+% Hash a string and return the hash in uppercase hexadecimal format.
+% In some engines, this is build-in. For traditional \LuaTeX{}, the conversion
+% to hexadecimal has to be done by us.
+% \begin{macrocode}
+local md5_HEX = md5.HEX
+if not md5_HEX then
+ local md5_sum = md5.sum
+ function md5_HEX(data)
+ return escapehex(md5_sum(data))
+ end
+ md5.HEX = md5_HEX
+end
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{ltx.utils.filemd5sum}
% \begin{macro}{l3kernel.filemdfivesum}
% Read an entire file and hash it: the hash function itself is a built-in.
% As Lua is byte-based there is no work needed here in terms of UTF-8
@@ -439,94 +485,129 @@ l3kernel.filedump = filedump
% \LuaTeX{}). The file is read in binary mode so that no line ending
% normalisation occurs.
% \begin{macrocode}
-local function filemdfivesum(name)
- local file = kpse_find(name, "tex", true)
- if file then
- local f = open(file, "rb")
- if f then
- local data = f:read("*a")
- escapehex(md5_sum(data))
- f:close()
- end
- end
+local function filemd5sum(name)
+ local file = kpse_find(name, "tex", true) if not file then return end
+ local f = open(file, "rb") if not f then return end
+
+ local data = f:read("*a")
+ f:close()
+ return md5_HEX(data)
end
-l3kernel.filemdfivesum = filemdfivesum
+ltxutils.filemd5sum = filemd5sum
+deprecated(l3kernel, "filemdfivesum", function(name)
+ local hash = filemd5sum(name)
+ if hash then
+ write(hash)
+ end
+end)
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
+% \begin{macro}{ltx.utils.filemoddate}
% \begin{macro}{l3kernel.filemoddate}
+% There are two cases: If the C standard library is C99 compliant,
+% we can use |%z| to get the timezone in almost the right format.
+% We only have to add primes and replace a zero or missing offset
+% with |Z|.
+%
+% Of course this would be boring, so Windows does things differently.
+% There we have to manually calculate the offset.
% See procedure \texttt{makepdftime} in \texttt{utils.c} of
% \pdfTeX{}.
% \begin{macrocode}
-local function filemoddate(name)
- local file = kpse_find(name, "tex", true)
- if file then
+local filemoddate
+if os_date'%z':match'^[+-]%d%d%d%d$' then
+ local pattern = lpeg.Cs(16 *
+ (lpeg.Cg(lpeg.S'+-' * '0000' * lpeg.Cc'Z')
+ + 3 * lpeg.Cc"'" * 2 * lpeg.Cc"'"
+ + lpeg.Cc'Z')
+ * -1)
+ function filemoddate(name)
+ local file = kpse_find(name, "tex", true)
+ if not file then return end
+ local date = lfs_attr(file, "modification")
+ if not date then return end
+ return pattern:match(os_date("D:%Y%m%d%H%M%S%z", date))
+ end
+else
+ local function filemoddate(name)
+ local file = kpse_find(name, "tex", true)
+ if not file then return end
local date = lfs_attr(file, "modification")
- if date then
- local d = os_date("*t", date)
- if d.sec >= 60 then
- d.sec = 59
+ if not date then return end
+ local d = os_date("*t", date)
+ local u = os_date("!*t", date)
+ local off = 60 * (d.hour - u.hour) + d.min - u.min
+ if d.year ~= u.year then
+ if d.year > u.year then
+ off = off + 1440
+ else
+ off = off - 1440
end
- local u = os_date("!*t", date)
- local off = 60 * (d.hour - u.hour) + d.min - u.min
- if d.year ~= u.year then
- if d.year > u.year then
- off = off + 1440
- else
- off = off - 1440
- end
- elseif d.yday ~= u.yday then
- if d.yday > u.yday then
- off = off + 1440
- else
- off = off - 1440
- end
+ elseif d.yday ~= u.yday then
+ if d.yday > u.yday then
+ off = off + 1440
+ else
+ off = off - 1440
end
- local timezone
- if off == 0 then
- timezone = "Z"
+ end
+ local timezone
+ if off == 0 then
+ timezone = "Z"
+ else
+ if off < 0 then
+ timezone = "-"
+ off = -off
else
- local hours = floor(off / 60)
- local mins = abs(off - hours * 60)
- timezone = format("%+03d", hours)
- .. "'" .. format("%02d", mins) .. "'"
+ timezone = "+"
end
- write("D:"
- .. format("%04d", d.year)
- .. format("%02d", d.month)
- .. format("%02d", d.day)
- .. format("%02d", d.hour)
- .. format("%02d", d.min)
- .. format("%02d", d.sec)
- .. timezone)
+ timezone = format("%s%02d'%02d'", timezone, hours // 60, hours % 60)
end
+ return format("D:%04d%02d%02d%02d%02d%02d%s",
+ d.year, d.month, d.day, d.hour, d.min, d.sec, timezone)
end
end
-l3kernel.filemoddate = filemoddate
+ltxutils.filemoddate = filemoddate
+deprecated(l3kernel, "filemoddate", function(name)
+ local hash = filemoddate(name)
+ if hash then
+ write(hash)
+ end
+end)
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
+% \begin{macro}{ltx.utils.filesize}
% \begin{macro}{l3kernel.filesize}
% A simple disk lookup.
% \begin{macrocode}
local function filesize(name)
- local file = kpse_find(name, "tex", true)
+ local file = kpse_find(name, "tex", true)
if file then
local size = lfs_attr(file, "size")
if size then
- write(size)
+ return size
end
end
end
-l3kernel.filesize = filesize
+ltxutils.filesize = filesize
+deprecated(l3kernel, "filesize", function(name)
+ local size = filesize(name)
+ if size then
+ write(size)
+ end
+end)
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{l3kernel.strcmp}
% String comparison which gives the same results as \pdfTeX{}'s
% \tn{pdfstrcmp}, although the ordering should likely not be relied upon!
% \begin{macrocode}
-local function strcmp(A, B)
+deprecated(l3kernel, "strcmp", function (A, B)
if A == B then
write("0")
elseif A < B then
@@ -534,15 +615,15 @@ local function strcmp(A, B)
else
write("1")
end
-end
-l3kernel.strcmp = strcmp
+end)
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{l3kernel.shellescape}
% Replicating the \pdfTeX{} log interaction for shell escape.
% \begin{macrocode}
-local function shellescape(cmd)
+local os_exec = os.execute
+deprecated(l3kernel, "shellescape", function(cmd)
local status,msg = os_exec(cmd)
if status == nil then
write_nl("log","runsystem(" .. cmd .. ")...(" .. msg .. ")\n")
@@ -551,8 +632,48 @@ local function shellescape(cmd)
else
write_nl("log","runsystem(" .. cmd .. ")...failed " .. (msg or "") .. "\n")
end
+end)
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{luadef}
+% An internal function for defining control sequences form Lua which behave
+% like primitives. This acts as a wrapper around |token.set_lua| which accepts
+% a function instead of an index into the functions table.
+% \begin{macrocode}
+local luacmd do
+ local token_create = token.create
+ local set_lua = token.set_lua
+ local undefined_cs = token.command_id'undefined_cs'
+
+ if not context and not luatexbase then require'ltluatex' end
+ if luatexbase then
+ local new_luafunction = luatexbase.new_luafunction
+ local functions = lua.get_functions_table()
+ function luacmd(name, func, ...)
+ local id
+ local tok = token_create(name)
+ if tok.command == undefined_cs then
+ id = new_luafunction(name)
+ set_lua(name, id, ...)
+ else
+ id = tok.index or tok.mode
+ end
+ functions[id] = func
+ end
+ elseif context then
+ local register = context.functions.register
+ local functions = context.functions.known
+ function luacmd(name, func, ...)
+ local tok = token.create(name)
+ if tok.command == undefined_cs then
+ token.set_lua(name, register(func), ...)
+ else
+ functions[tok.index or tok.mode] = func
+ end
+ end
+ end
end
-l3kernel.shellescape = shellescape
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx
index 748aa87885..56040ef207 100644
--- a/macros/latex/contrib/l3kernel/l3msg.dtx
+++ b/macros/latex/contrib/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx
index 08dad0f48d..e7b7a0e50a 100644
--- a/macros/latex/contrib/l3kernel/l3names.dtx
+++ b/macros/latex/contrib/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -55,18 +55,19 @@
% performs the following tasks:
% \begin{itemize}
% \item defines new names for all \TeX{} primitives;
+% \item emulate required primitives not provided by default in \LuaTeX;
% \item switches to the category code r{\'e}gime for programming;
% \end{itemize}
%
-% This module is entirely dedicated to primitives, which should not be
-% used directly within \LaTeX3 code (outside of \enquote{kernel-level}
-% code). As such, the primitives are not documented here: \emph{The
-% \TeX{}book}, \emph{\TeX{} by Topic} and the manuals for \pdfTeX{},
-% \XeTeX{}, \LuaTeX{}, \pTeX{} and \upTeX{} should be consulted for
-% details of the primitives. These are named
-% \cs[no-index]{tex_\meta{name}:D}, typically based on the primitive's
-% \meta{name} in \pdfTeX{} and omitting a leading |pdf| when the
-% primitive is not related to pdf output.
+% This module is entirely dedicated to primitives (and emulations of
+% these), which should not be used directly within \LaTeX3 code
+% (outside of \enquote{kernel-level} code). As such, the primitives
+% are not documented here: \emph{The \TeX{}book}, \emph{\TeX{} by
+% Topic} and the manuals for \pdfTeX{}, \XeTeX{}, \LuaTeX{}, \pTeX{}
+% and \upTeX{} should be consulted for details of the primitives.
+% These are named \cs[no-index]{tex_\meta{name}:D}, typically based
+% on the primitive's \meta{name} in \pdfTeX{} and omitting a leading
+% |pdf| when the primitive is not related to pdf output.
%
% \end{documentation}
%
@@ -75,7 +76,7 @@
% \section{\pkg{l3names} implementation}
%
% \begin{macrocode}
-%<*package>
+%<*package&tex>
% \end{macrocode}
%
% The prefix here is \texttt{kernel}. A few places need |@@| to be left
@@ -111,7 +112,8 @@
%
% To allow extracting \enquote{just the names}, a bit of DocStrip fiddling.
% \begin{macrocode}
-%</package>
+%</package&tex>
+%<*names|tex>
%<*names|package>
% \end{macrocode}
%
@@ -609,9 +611,6 @@
\@@_primitive:NN \pdfeachlinedepth \tex_eachlinedepth:D
\@@_primitive:NN \pdfeachlineheight \tex_eachlineheight:D
\@@_primitive:NN \pdfelapsedtime \tex_elapsedtime:D
- \@@_primitive:NN \pdffiledump \tex_filedump:D
- \@@_primitive:NN \pdffilemoddate \tex_filemoddate:D
- \@@_primitive:NN \pdffilesize \tex_filesize:D
\@@_primitive:NN \pdffirstlineheight \tex_firstlineheight:D
\@@_primitive:NN \pdffontexpand \tex_fontexpand:D
\@@_primitive:NN \pdffontsize \tex_fontsize:D
@@ -622,7 +621,6 @@
\@@_primitive:NN \pdflastypos \tex_lastypos:D
\@@_primitive:NN \pdfmapfile \tex_mapfile:D
\@@_primitive:NN \pdfmapline \tex_mapline:D
- \@@_primitive:NN \pdfmdfivesum \tex_mdfivesum:D
\@@_primitive:NN \pdfnoligatures \tex_noligatures:D
\@@_primitive:NN \pdfnormaldeviate \tex_normaldeviate:D
\@@_primitive:NN \pdfpageheight \tex_pageheight:D
@@ -635,7 +633,6 @@
\@@_primitive:NN \pdfrandomseed \tex_randomseed:D
\@@_primitive:NN \pdfresettimer \tex_resettimer:D
\@@_primitive:NN \pdfsavepos \tex_savepos:D
- \@@_primitive:NN \pdfstrcmp \tex_strcmp:D
\@@_primitive:NN \pdfsetrandomseed \tex_setrandomseed:D
\@@_primitive:NN \pdfshellescape \tex_shellescape:D
\@@_primitive:NN \pdftracingfonts \tex_tracingfonts:D
@@ -681,6 +678,16 @@
%</package>
%<*names|package>
% \end{macrocode}
+% Some \pdfTeX{} primitives are handled here because they got dropped in
+% \LuaTeX{} but the corresponding internal names are emulated later. The
+% Lua code is already loaded at this point, so we shouldn't overwrite them.
+% \begin{macrocode}
+ \@@_primitive:NN \pdfstrcmp \tex_strcmp:D
+ \@@_primitive:NN \pdffilesize \tex_filesize:D
+ \@@_primitive:NN \pdfmdfivesum \tex_mdfivesum:D
+ \@@_primitive:NN \pdffilemoddate \tex_filemoddate:D
+ \@@_primitive:NN \pdffiledump \tex_filedump:D
+% \end{macrocode}
% \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is
% handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}.
% A few cross-compatibility names which lack
@@ -1187,7 +1194,9 @@
% End of the \enquote{just the names} part of the source.
% \begin{macrocode}
%</names|package>
+%</names|tex>
%<*package>
+%<*tex>
% \end{macrocode}
%
% The job is done: close the group (using the primitive renamed!).
@@ -1441,6 +1450,103 @@
% \end{macrocode}
%
% \begin{macrocode}
+%</tex>
+% \end{macrocode}
+%
+% In \LuaTeX{}, we additionally emulate some primitives using Lua code.
+% \begin{macrocode}
+%<*lua>
+% \end{macrocode}
+%
+% \begin{macro}{\tex_strcmp:D}
+% Compare two strings, expanding to |0| if they are equal,
+% |-1| if the first one is smaller and |1| if the second one is smaller.
+% Here \enquote{smaller} refers to codepoint order which does not correspond to
+% the user expected order for most non-ASCII strings.
+% \begin{macrocode}
+luacmd('tex_strcmp:D', function()
+ local first = scan_string()
+ local second = scan_string()
+ write(first == second and '0'
+ or first < second and '-1'
+ or '1')
+end, 'global')
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tex_Ucharcat:D}
+% Creating arbitrary chars using |tex.cprint|.
+% The alternative approach using |token.put_next(token.create(...))|
+% would be about 10\% slower.
+% \begin{macrocode}
+local cprint = tex.cprint
+luacmd('tex_Ucharcat:D', function()
+ local charcode = scan_int()
+ local catcode = scan_int()
+ cprint(catcode, utf8_char(charcode))
+end, 'global')
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tex_filesize:D}
+% Wrap the function from |ltxutils|.
+% \begin{macrocode}
+luacmd('tex_filesize:D', function()
+ local size = filesize(scan_string())
+ if size then write(size) end
+end, 'global')
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tex_mdfivesum:D}
+% There are two cases: Either hash a file or a string.
+% Both are already implemented in l3luatex or built-in.
+% \begin{macrocode}
+luacmd('tex_mdfivesum:D', function()
+ local hash
+ if scan_keyword"file" then
+ hash = filemd5sum(scan_string())
+ else
+ hash = md5_HEX(scan_string())
+ end
+ if hash then write(hash) end
+end, 'global')
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tex_filemoddate:D}
+% A primitive for getting the modification date of a file.
+% \begin{macrocode}
+luacmd('tex_filemoddate:D', function()
+ local date = filemoddate(scan_string())
+ if date then write(date) end
+end, 'global')
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tex_filedump:D}
+% An emulated primitive for getting a hexdump from a (partial) file.
+% The length has a default of |0|. This is consistent with
+% \pdfTeX, but it effectivly makes the primitive useless without an
+% explicit |length|. Therefore we allow the keyword |whole| to be used
+% instead of a length, indicating that the whole remaining file should
+% be read.
+% \begin{macrocode}
+luacmd('tex_filedump:D', function()
+ local offset = scan_keyword'offset' and scan_int() or nil
+ local length = scan_keyword'length' and scan_int()
+ or not scan_keyword'whole' and 0 or nil
+ local data = filedump(scan_string(), offset, length)
+ if data then write(data) end
+end, 'global')
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</lua>
+% \end{macrocode}
+%
+% \begin{macrocode}
%</package>
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf
index c33a4eeb9b..85d68ca396 100644
--- a/macros/latex/contrib/l3kernel/l3news.pdf
+++ b/macros/latex/contrib/l3kernel/l3news.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf
index 3c03c1e8aa..24fabf8f76 100644
--- a/macros/latex/contrib/l3kernel/l3news01.pdf
+++ b/macros/latex/contrib/l3kernel/l3news01.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf
index 837f5d75a7..291ac8d6e2 100644
--- a/macros/latex/contrib/l3kernel/l3news02.pdf
+++ b/macros/latex/contrib/l3kernel/l3news02.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf
index 1ff9ae5d1d..9e7dd26e24 100644
--- a/macros/latex/contrib/l3kernel/l3news03.pdf
+++ b/macros/latex/contrib/l3kernel/l3news03.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf
index b1338bc9b7..bfb74bced2 100644
--- a/macros/latex/contrib/l3kernel/l3news04.pdf
+++ b/macros/latex/contrib/l3kernel/l3news04.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf
index c23deb667e..afcd4e9d36 100644
--- a/macros/latex/contrib/l3kernel/l3news05.pdf
+++ b/macros/latex/contrib/l3kernel/l3news05.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf
index 3baec319d1..20cba420c3 100644
--- a/macros/latex/contrib/l3kernel/l3news06.pdf
+++ b/macros/latex/contrib/l3kernel/l3news06.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf
index 95a233af7a..09b667c8f3 100644
--- a/macros/latex/contrib/l3kernel/l3news07.pdf
+++ b/macros/latex/contrib/l3kernel/l3news07.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf
index b7c4726818..90598b9c33 100644
--- a/macros/latex/contrib/l3kernel/l3news08.pdf
+++ b/macros/latex/contrib/l3kernel/l3news08.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf
index ae6753d976..f49ebc28ba 100644
--- a/macros/latex/contrib/l3kernel/l3news09.pdf
+++ b/macros/latex/contrib/l3kernel/l3news09.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf
index 2891b8cbf2..636cf07342 100644
--- a/macros/latex/contrib/l3kernel/l3news10.pdf
+++ b/macros/latex/contrib/l3kernel/l3news10.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf
index 92eeb57981..62c41629d9 100644
--- a/macros/latex/contrib/l3kernel/l3news11.pdf
+++ b/macros/latex/contrib/l3kernel/l3news11.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf
index e71980d1cf..fe33650fcf 100644
--- a/macros/latex/contrib/l3kernel/l3news12.pdf
+++ b/macros/latex/contrib/l3kernel/l3news12.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf
index 2e60fc555c..5a97242228 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.pdf
+++ b/macros/latex/contrib/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx
index 6003f49343..882e0367af 100644
--- a/macros/latex/contrib/l3kernel/l3prg.dtx
+++ b/macros/latex/contrib/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index 9125c5ec8e..0f10a77def 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx
index 8361fa47f2..0251fc2e82 100644
--- a/macros/latex/contrib/l3kernel/l3quark.dtx
+++ b/macros/latex/contrib/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx
index faa41bc68a..4d63d5bd80 100644
--- a/macros/latex/contrib/l3kernel/l3regex.dtx
+++ b/macros/latex/contrib/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx
index 0201692ebb..63156f66da 100644
--- a/macros/latex/contrib/l3kernel/l3seq.dtx
+++ b/macros/latex/contrib/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx
index 3ecd3004d0..d9ea8d1e20 100644
--- a/macros/latex/contrib/l3kernel/l3skip.dtx
+++ b/macros/latex/contrib/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx
index 4c981becf9..55471855e0 100644
--- a/macros/latex/contrib/l3kernel/l3sort.dtx
+++ b/macros/latex/contrib/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx
index 324f9f8b92..805a3ebeb3 100644
--- a/macros/latex/contrib/l3kernel/l3str-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx
index 84d2e2d7ae..a7731373d2 100644
--- a/macros/latex/contrib/l3kernel/l3str.dtx
+++ b/macros/latex/contrib/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -1121,44 +1121,12 @@
% \end{macro}
%
% \begin{macro}[EXP]{\@@_if_eq:nn}
-% \begin{macro}[EXP]{\@@_escape:n}
-% String comparisons rely on the primitive \cs[index=pdfstrcmp]{(pdf)strcmp} if available:
-% \LuaTeX{} does not have it, so emulation is required. As the net result
-% is that we do not \emph{always} use the primitive, the correct approach
-% is to wrap up in a function with defined behaviour. That's done by
-% providing a wrapper and then redefining in the \LuaTeX{} case. Note that
-% the necessary Lua code is loaded in \pkg{l3boostrap}.
-% The need to detokenize and force
-% expansion of input arises from the case where a |#| token is used in the
-% input, \emph{e.g.}~|\__str_if_eq:nn {#} { \tl_to_str:n {#} }|, which
-% otherwise would fail as \cs{tex_luaescapestring:D} does not double
-% such tokens.
+% String comparisons rely on the primitive \cs[index=pdfstrcmp]{(pdf)strcmp},
+% so we define a new name for it.
% \begin{macrocode}
-\cs_new:Npn \@@_if_eq:nn #1#2 { \tex_strcmp:D {#1} {#2} }
-\cs_if_exist:NT \tex_luatexversion:D
- {
- \cs_set_eq:NN \lua_escape:e \tex_luaescapestring:D
- \cs_set_eq:NN \lua_now:e \tex_directlua:D
- \cs_set:Npn \@@_if_eq:nn #1#2
- {
- \lua_now:e
- {
- l3kernel.strcmp
- (
- " \@@_escape:n {#1} " ,
- " \@@_escape:n {#2} "
- )
- }
- }
- \cs_new:Npn \@@_escape:n #1
- {
- \lua_escape:e
- { \__kernel_tl_to_str:w \use:e { {#1} } }
- }
- }
+\cs_new_eq:NN \@@_if_eq:nn \tex_strcmp:D
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[pTF, EXP]
% {
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf
index 75a93c51d5..b8ac3f7d17 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.pdf
+++ b/macros/latex/contrib/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex
index 096b29e3e7..1a16ec70a3 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.tex
+++ b/macros/latex/contrib/l3kernel/l3styleguide.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2020-09-06}
+\date{Released 2020-09-24}
\begin{document}
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
index c86eef33d3..6ebb091dee 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
index ee8f8abed3..f9a7680bf8 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2020-09-06}
+\date{Released 2020-09-24}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx
index 9c9b8fa84b..6ca5313c50 100644
--- a/macros/latex/contrib/l3kernel/l3sys.dtx
+++ b/macros/latex/contrib/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -317,6 +317,7 @@
%
% \begin{macrocode}
%<*package>
+%<*tex>
% \end{macrocode}
%
% \subsubsection{Detecting the engine}
@@ -391,23 +392,26 @@
% however, is reliable only if the user doesn't change
% \cs{tex_pdfoutput:D} before loading this code.
% \begin{macrocode}
-\str_const:Nx \c_sys_engine_exec_str
- {
- \sys_if_engine_pdftex:T { pdf }
- \sys_if_engine_xetex:T { xe }
- \sys_if_engine_ptex:T { ep }
- \sys_if_engine_uptex:T { eup }
- \sys_if_engine_luatex:T
- {
- lua \lua_now:e
- {
- if (pcall(require, 'luaharfbuzz')) then ~
- tex.print("hb") ~
- end
- }
- }
- tex
- }
+\group_begin:
+ \cs_set_eq:NN \lua_now:e \tex_directlua:D
+ \str_const:Nx \c_sys_engine_exec_str
+ {
+ \sys_if_engine_pdftex:T { pdf }
+ \sys_if_engine_xetex:T { xe }
+ \sys_if_engine_ptex:T { ep }
+ \sys_if_engine_uptex:T { eup }
+ \sys_if_engine_luatex:T
+ {
+ lua \lua_now:e
+ {
+ if (pcall(require, 'luaharfbuzz')) then ~
+ tex.print("hb") ~
+ end
+ }
+ }
+ tex
+ }
+\group_end:
\str_const:Nx \c_sys_engine_format_str
{
\cs_if_exist:NTF \fmtname
@@ -647,34 +651,78 @@
% \end{variable}
%
% \begin{macro}{\sys_shell_now:n}
+% \begin{macro}{\@@_shell_now:e}
% Execute commands through shell escape immediately.
+%
+% For \LuaTeX{}, we use a pseudo-primitive to do the actual work.
+% \begin{macrocode}
+%</tex>
+%<*lua>
+do
+ local os_exec = os.execute
+
+ local function shellescape(cmd)
+ local status,msg = os_exec(cmd)
+ if status == nil then
+ write_nl("log","runsystem(" .. cmd .. ")...(" .. msg .. ")\n")
+ elseif status == 0 then
+ write_nl("log","runsystem(" .. cmd .. ")...executed\n")
+ else
+ write_nl("log","runsystem(" .. cmd .. ")...failed " .. (msg or "") .. "\n")
+ end
+ end
+ luacmd("@@_shell_now:e", function()
+ shellescape(scan_string())
+ end, "global", "protected")
+%</lua>
+% \end{macrocode}
+%
% \begin{macrocode}
+%<*tex>
\sys_if_engine_luatex:TF
{
\cs_new_protected:Npn \sys_shell_now:n #1
- {
- \lua_now:e
- { l3kernel.shellescape(" \lua_escape:e { \tl_to_str:n {#1} } ") }
- }
+ { \@@_shell_now:e { \exp_not:n {#1} } }
}
{
\cs_new_protected:Npn \sys_shell_now:n #1
{ \iow_now:Nn \c_@@_shell_stream_int {#1} }
}
\cs_generate_variant:Nn \sys_shell_now:n { x }
+%</tex>
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\sys_shell_shipout:n}
+% \begin{macro}{\@@_shell_shipout:e}
% Execute commands through shell escape at shipout.
+%
+% For \LuaTeX, we use the same helper as above but delayed to using a late_lua whatsit.
% \begin{macrocode}
+%<*lua>
+ local whatsit_id = node.id'whatsit'
+ local latelua_sub = node.subtype'late_lua'
+ local node_new = node.direct.new
+ local setfield = node.direct.setwhatsitfield or node.direct.setfield
+ local node_write = node.direct.write
+
+ luacmd("@@_shell_shipout:e", function()
+ local cmd = scan_string()
+ local n = node_new(whatsit_id, latelua_sub)
+ setfield(n, 'data', function() shellescape(cmd) end)
+ node_write(n)
+ end, "global", "protected")
+end
+%</lua>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*tex>
\sys_if_engine_luatex:TF
{
\cs_new_protected:Npn \sys_shell_shipout:n #1
- {
- \lua_shipout_e:n
- { l3kernel.shellescape(" \lua_escape:e { \tl_to_str:n {#1} } ") }
- }
+ { \@@_shell_shipout:e { \exp_not:n {#1} } }
}
{
\cs_new_protected:Npn \sys_shell_shipout:n #1
@@ -683,6 +731,7 @@
\cs_generate_variant:Nn \sys_shell_shipout:n { x }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \subsection{Dynamic (every job) code}
%
@@ -969,6 +1018,7 @@
% \end{variable}
%
% \begin{macrocode}
+%</tex>
%</package>
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
index 10cb4d25f8..85f5bc67fd 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.pdf
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex
index 59b3a89bbe..140525f76e 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.tex
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2020-09-06}
+\date{Released 2020-09-24}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index c44bede9f7..b89de90efd 100644
--- a/macros/latex/contrib/l3kernel/l3text-case.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx
index 5b0770e6f3..4833e91f41 100644
--- a/macros/latex/contrib/l3kernel/l3text-purify.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx
index e062326286..325b7f2763 100644
--- a/macros/latex/contrib/l3kernel/l3text.dtx
+++ b/macros/latex/contrib/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
index 532c514263..55559abdbb 100644
--- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index 095a51d948..7ac12bb127 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index 473cd48a82..6d3f13581f 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -737,12 +737,13 @@
% (not used by \LaTeX3).
% \end{function}
%
-% \begin{function}[updated = 2011-05-23, EXP,pTF]{\token_if_primitive:N}
+% \begin{function}[updated = 2020-09-11, EXP,pTF]{\token_if_primitive:N}
% \begin{syntax}
% \cs{token_if_primitive_p:N} \meta{token} \\
% \cs{token_if_primitive:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token} is an engine primitive.
+% Tests if the \meta{token} is an engine primitive. In \LuaTeX{}
+% this includes primitive-like commands defined using |{token.set_lua}|.
% \end{function}
%
% \section{Peeking ahead at the next token}
@@ -1112,6 +1113,10 @@
% \end{macrocode}
%
% \begin{macrocode}
+%<*tex>
+% \end{macrocode}
+%
+% \begin{macrocode}
%<@@=char>
% \end{macrocode}
%
@@ -1454,37 +1459,26 @@
\if_int_odd:w 0
\sys_if_engine_luatex:T { 1 }
\sys_if_engine_xetex:T { 1 } \exp_stop_f:
- \sys_if_engine_luatex:TF
- {
- \cs_new:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
- {
- #3
- \exp_after:wN \exp_after:wN \exp_after:wN \exp_end:
- \lua_now:e { l3kernel.charcat(#1, #2) }
- }
- }
- {
- \cs_new:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
- {
- #3
- \exp_after:wN \exp_end:
- \tex_Ucharcat:D #1 \exp_stop_f: #2 \exp_stop_f:
- }
- \cs_if_exist:NF \tex_expanded:D
- {
- \cs_new_eq:NN \@@_generate_auxii:nnw \@@_generate_aux:nnw
- \cs_gset:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
- {
- #3
- \if_int_compare:w #2 = 13 \exp_stop_f:
- \__kernel_msg_expandable_error:nn { kernel } { char-active }
- \else:
- \@@_generate_auxii:nnw {#1} {#2}
- \fi:
- \exp_end:
- }
- }
- }
+ \cs_new:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
+ {
+ #3
+ \exp_after:wN \exp_end:
+ \tex_Ucharcat:D #1 \exp_stop_f: #2 \exp_stop_f:
+ }
+ \cs_if_exist:NF \tex_expanded:D
+ {
+ \cs_new_eq:NN \@@_generate_auxii:nnw \@@_generate_aux:nnw
+ \cs_gset:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
+ {
+ #3
+ \if_int_compare:w #2 = 13 \exp_stop_f:
+ \__kernel_msg_expandable_error:nn { kernel } { char-active }
+ \else:
+ \@@_generate_auxii:nnw {#1} {#2}
+ \fi:
+ \exp_end:
+ }
+ }
\else:
% \end{macrocode}
% For engines where \tn{Ucharcat} isn't available or emulated, we have
@@ -2369,7 +2363,8 @@
% \@@_if_primitive_nullfont:N,
% \@@_if_primitive_loop:N,
% \@@_if_primitive:Nw,
-% \@@_if_primitive_undefined:N}
+% \@@_if_primitive_undefined:N,
+% \@@_if_primitive_lua:N}
%^^A See http://groups.google.com/group/comp.text.tex/browse_thread/thread/0a72666873f8753d#
%
% We filter out macros first, because they cause endless trouble later
@@ -2414,67 +2409,142 @@
% \cs{tex_undefined:D}, and if it is |"| or a digit, then the token
% is not a primitive.
%
+% For \LuaTeX{} we use a different implementation which just looks at the
+% command code for the token and compaes it to a list of non-primitives.
+% Again, \tn{nullfont} is a special case because it is the only primitive
+% with the normally non-primitive |set_font| command code.
+%
% \begin{macrocode}
-\tex_chardef:D \c_@@_A_int = `A ~ %
-\use:x
+\sys_if_engine_luatex:TF
{
- \prg_new_conditional:Npnn \exp_not:N \token_if_primitive:N ##1
- { p , T , F , TF }
+%</tex>
+%<*lua>
+do
+ local get_next = token.get_next
+ local get_command = token.get_command
+ local get_index = token.get_index
+ local get_mode = token.get_mode or token.get_index
+ local cmd = token.command_id
+ local set_font = cmd'get_font'
+ local biggest_char = token.biggest_char()
+
+ local mode_below_biggest_char = {}
+ local index_not_nil = {}
+ local mode_not_null = {}
+ local non_primitive = {
+ [cmd'left_brace'] = true,
+ [cmd'right_brace'] = true,
+ [cmd'math_shift'] = true,
+ [cmd'mac_param'] = mode_below_biggest_char,
+ [cmd'sup_mark'] = true,
+ [cmd'sub_mark'] = true,
+ [cmd'endv'] = true,
+ [cmd'spacer'] = true,
+ [cmd'letter'] = true,
+ [cmd'other_char'] = true,
+ [cmd'tab_mark'] = mode_below_biggest_char,
+ [cmd'char_given'] = true,
+ [cmd'math_given'] = true,
+ [cmd'xmath_given'] = true,
+ [cmd'set_font'] = mode_not_null,
+ [cmd'undefined_cs'] = true,
+ [cmd'call'] = true,
+ [cmd'long_call'] = true,
+ [cmd'outer_call'] = true,
+ [cmd'long_outer_call'] = true,
+ [cmd'assign_glue'] = index_not_nil,
+ [cmd'assign_mu_glue'] = index_not_nil,
+ [cmd'assign_toks'] = index_not_nil,
+ [cmd'assign_int'] = index_not_nil,
+ [cmd'assign_attr'] = true,
+ [cmd'assign_dimen'] = index_not_nil,
+ }
+
+ luacmd("@@_if_primitive_lua:N", function()
+ local tok = get_next()
+ local is_non_primitive = non_primitive[get_command(tok)]
+ return put_next(
+ is_non_primitive == true
+ and false_tok
+ or is_non_primitive == nil
+ and true_tok
+ or is_non_primitive == mode_not_null
+ and (get_mode(tok) == 0 and true_tok or false_tok)
+ or is_non_primitive == index_not_nil
+ and (get_index(tok) and false_tok or true_tok)
+ or is_non_primitive == mode_below_biggest_char
+ and (get_mode(tok) > biggest_char and true_tok or false_tok))
+ end, "global")
+end
+%</lua>
+%<*tex>
+ \prg_new_conditional:Npnn \token_if_primitive:N #1 { p , T , F , TF }
{
- \exp_not:N \token_if_macro:NTF ##1
- \exp_not:N \prg_return_false:
- {
- \exp_not:N \exp_after:wN \exp_not:N \@@_if_primitive:NNw
- \exp_not:N \token_to_meaning:N ##1
- \tl_to_str:n { : : : } \s_@@_stop ##1
- }
+ \@@_if_primitive_lua:N #1
}
- \cs_new:Npn \exp_not:N \@@_if_primitive:NNw
- ##1##2 ##3 \c_colon_str ##4 \s_@@_stop
+ }
+ {
+ \tex_chardef:D \c_@@_A_int = `A ~ %
+ \use:x
{
- \exp_not:N \tl_if_empty:oTF
- { \exp_not:N \@@_if_primitive_space:w ##3 ~ }
+ \prg_new_conditional:Npnn \exp_not:N \token_if_primitive:N ##1
+ { p , T , F , TF }
{
- \exp_not:N \@@_if_primitive_loop:N ##3
- \c_colon_str \s_@@_stop
+ \exp_not:N \token_if_macro:NTF ##1
+ \exp_not:N \prg_return_false:
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \@@_if_primitive:NNw
+ \exp_not:N \token_to_meaning:N ##1
+ \tl_to_str:n { : : : } \s_@@_stop ##1
+ }
+ }
+ \cs_new:Npn \exp_not:N \@@_if_primitive:NNw
+ ##1##2 ##3 \c_colon_str ##4 \s_@@_stop
+ {
+ \exp_not:N \tl_if_empty:oTF
+ { \exp_not:N \@@_if_primitive_space:w ##3 ~ }
+ {
+ \exp_not:N \@@_if_primitive_loop:N ##3
+ \c_colon_str \s_@@_stop
+ }
+ { \exp_not:N \@@_if_primitive_nullfont:N }
}
- { \exp_not:N \@@_if_primitive_nullfont:N }
}
- }
-\cs_new:Npn \@@_if_primitive_space:w #1 ~ { }
-\cs_new:Npn \@@_if_primitive_nullfont:N #1
- {
- \if_meaning:w \tex_nullfont:D #1
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-\cs_new:Npn \@@_if_primitive_loop:N #1
- {
- \if_int_compare:w `#1 < \c_@@_A_int %
- \exp_after:wN \@@_if_primitive:Nw
- \exp_after:wN #1
- \else:
- \exp_after:wN \@@_if_primitive_loop:N
- \fi:
- }
-\cs_new:Npn \@@_if_primitive:Nw #1 #2 \s_@@_stop
- {
- \if:w : #1
- \exp_after:wN \@@_if_primitive_undefined:N
- \else:
- \prg_return_false:
- \exp_after:wN \use_none:n
- \fi:
- }
-\cs_new:Npn \@@_if_primitive_undefined:N #1
- {
- \if_cs_exist:N #1
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
+ \cs_new:Npn \@@_if_primitive_space:w #1 ~ { }
+ \cs_new:Npn \@@_if_primitive_nullfont:N #1
+ {
+ \if_meaning:w \tex_nullfont:D #1
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+ \cs_new:Npn \@@_if_primitive_loop:N #1
+ {
+ \if_int_compare:w `#1 < \c_@@_A_int %
+ \exp_after:wN \@@_if_primitive:Nw
+ \exp_after:wN #1
+ \else:
+ \exp_after:wN \@@_if_primitive_loop:N
+ \fi:
+ }
+ \cs_new:Npn \@@_if_primitive:Nw #1 #2 \s_@@_stop
+ {
+ \if:w : #1
+ \exp_after:wN \@@_if_primitive_undefined:N
+ \else:
+ \prg_return_false:
+ \exp_after:wN \use_none:n
+ \fi:
+ }
+ \cs_new:Npn \@@_if_primitive_undefined:N #1
+ {
+ \if_cs_exist:N #1
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2869,6 +2939,10 @@
% \end{macro}
%
% \begin{macrocode}
+%</tex>
+% \end{macrocode}
+%
+% \begin{macrocode}
%</package>
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx
index 4b024350af..3cc420f68f 100644
--- a/macros/latex/contrib/l3kernel/l3unicode.dtx
+++ b/macros/latex/contrib/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-06}
+% \date{Released 2020-09-24}
%
% \maketitle
%
@@ -97,22 +97,9 @@
{
\exp_not:N \tex_unexpanded:D \exp_not:N \exp_after:wN
{
- \sys_if_engine_luatex:TF
- {
- \exp_not:N \tex_directlua:D
- {
- l3kernel.charcat
- (
- \exp_not:N \tex_number:D #1 ,
- \exp_not:N \tex_the:D \tex_catcode:D #1
- )
- }
- }
- {
- \exp_not:N \tex_Ucharcat:D
- #1 ~
- \tex_catcode:D #1 ~
- }
+ \exp_not:N \tex_Ucharcat:D
+ #1 ~
+ \tex_catcode:D #1 ~
}
}
% \end{macrocode}
diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf
index cf1f926b77..7994f7f8cf 100644
--- a/macros/latex/contrib/l3kernel/source3.pdf
+++ b/macros/latex/contrib/l3kernel/source3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex
index 33b5ecbb45..9ae358c63f 100644
--- a/macros/latex/contrib/l3kernel/source3.tex
+++ b/macros/latex/contrib/l3kernel/source3.tex
@@ -53,7 +53,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2020-09-06}
+\date{Released 2020-09-24}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/ltxcmds/README.md b/macros/latex/contrib/ltxcmds/README.md
deleted file mode 100644
index 2aef65aa3a..0000000000
--- a/macros/latex/contrib/ltxcmds/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# ltxcmds package for latex
-
-Version: 2020-05-10 v1.25
-
-The package ltxcmds exports some utility macros
-from the LaTeX kernel into a separate namespace and
-also provides them for other formats such as plain-TeX.
-
-## Copyright (C)
-* 2007, 2009-2011 Heiko Oberdiek
-* 2016-2020 Oberdiek Package Support Group
-
-## License
-LATEX Project Public License, version 1.3c or later.
diff --git a/macros/latex/contrib/ltxcmds/ltxcmds.dtx b/macros/latex/contrib/ltxcmds/ltxcmds.dtx
deleted file mode 100644
index 9940671d4d..0000000000
--- a/macros/latex/contrib/ltxcmds/ltxcmds.dtx
+++ /dev/null
@@ -1,2356 +0,0 @@
-% \iffalse meta-comment
-%
-% File: ltxcmds.dtx
-% Version: 2020-05-10 v1.25
-% Info: LaTeX kernel commands for general use
-%
-% Copyright (C)
-% 2009-2011 Heiko Oberdiek
-% 2016-2020 Oberdiek Package Support Group
-% https://github.com/ho-tex/ltxcmds/issues
-%
-% 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. This version of this license is in
-% https://www.latex-project.org/lppl/lppl-1-3c.txt
-% and 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 Maintainers of this work are
-% Heiko Oberdiek and the Oberdiek Package Support Group
-% https://github.com/ho-tex/ltxcmds/issues
-%
-% The Base Interpreter refers to any `TeX-Format',
-% because some files are installed in TDS:tex/generic//.
-%
-% This work consists of the main source file ltxcmds.dtx
-% and the derived files
-% ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv,
-% ltxcmds-test1.tex, ltxcmds-test-gobble.tex,
-% ltxcmds-test-ifempty.tex, ltxcmds-test-zapspace.tex,
-% ltxcmds-test-ifboxempty.tex, ltxcmds-test-nextchar.tex,
-% ltxcmds-test-carcdr.tex.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/ltxcmds/ltxcmds.dtx
-% CTAN:macros/latex/contrib/ltxcmds/ltxcmds.pdf
-%
-% Unpacking:
-% (a) If ltxcmds.ins is present:
-% tex ltxcmds.ins
-% (b) Without ltxcmds.ins:
-% tex ltxcmds.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{ltxcmds.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If ltxcmds.drv is present:
-% latex ltxcmds.drv
-% (b) Without ltxcmds.drv:
-% latex ltxcmds.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex ltxcmds.dtx
-% makeindex -s gind.ist ltxcmds.idx
-% pdflatex ltxcmds.dtx
-% makeindex -s gind.ist ltxcmds.idx
-% pdflatex ltxcmds.dtx
-%
-% Installation:
-% TDS:tex/generic/ltxcmds/ltxcmds.sty
-% TDS:doc/latex/ltxcmds/ltxcmds.pdf
-% TDS:source/latex/ltxcmds/ltxcmds.dtx
-%
-%<*ignore>
-\begingroup
- \catcode123=1 %
- \catcode125=2 %
- \def\x{LaTeX2e}%
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\let\MetaPrefix\relax
-\preamble
-
-This is a generated file.
-
-Project: ltxcmds
-Version: 2020-05-10 v1.25
-
-Copyright (C)
- 2009-2011 Heiko Oberdiek
- 2016-2020 Oberdiek Package Support Group
-
-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. This version of this license is in
- https://www.latex-project.org/lppl/lppl-1-3c.txt
-and 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 Maintainers of this work are
-Heiko Oberdiek and the Oberdiek Package Support Group
-https://github.com/ho-tex/ltxcmds/issues
-
-
-The Base Interpreter refers to any `TeX-Format',
-because some files are installed in TDS:tex/generic//.
-
-This work consists of the main source file ltxcmds.dtx
-and the derived files
- ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv,
- ltxcmds-test1.tex, ltxcmds-test-gobble.tex,
- ltxcmds-test-ifempty.tex, ltxcmds-test-zapspace.tex,
- ltxcmds-test-ifboxempty.tex, ltxcmds-test-nextchar.tex,
- ltxcmds-test-carcdr.tex.
-
-\endpreamble
-\let\MetaPrefix\DoubleperCent
-
-\generate{%
- \file{ltxcmds.ins}{\from{ltxcmds.dtx}{install}}%
- \file{ltxcmds.drv}{\from{ltxcmds.dtx}{driver}}%
- \usedir{tex/generic/ltxcmds}%
- \file{ltxcmds.sty}{\from{ltxcmds.dtx}{package}}%
-}
-
-\catcode32=13\relax% active space
-\let =\space%
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* ltxcmds.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `ltxcmds.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{ltxcmds.drv}%
- [2020-05-10 v1.25 LaTeX kernel commands for general use (HO)]%
-\documentclass{ltxdoc}
-\usepackage{holtxdoc}[2011/11/22]
-\usepackage{zref-savepos}
-\usepackage{paralist}
-\hfuzz=1pt
-\begin{document}
- \DocInput{ltxcmds.dtx}%
-\end{document}
-%</driver>
-% \fi
-%
-%
-%
-% \GetFileInfo{ltxcmds.drv}
-%
-% \title{The \xpackage{ltxcmds} package}
-% \date{2020-05-10 v1.25}
-% \author{Heiko Oberdiek\thanks
-% {Please report any issues at \url{https://github.com/ho-tex/ltxcmds/issues}}}
-%
-% \maketitle
-%
-% \begin{abstract}
-% The package \xpackage{ltxcmds} exports some utility macros
-% from the \LaTeX\ kernel into a separate namespace and
-% also provides them for other formats such as plain-\TeX.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \newcounter{to}
-% \renewcommand*{\theto}{to\arabic{to}}
-% \newlength\tolength
-% \tolength=\dimexpr .5\linewidth+\oddsidemargin+1in+15mm\relax
-% \newcommand*{\TO}{^^A
-% \quad
-% \stepcounter{to}^^A
-% \zsavepos\theto
-% \ifdim\zposx\theto sp>0pt
-% \ifdim\zposx\theto sp<\tolength
-% \kern\dimexpr\tolength-\zposx\theto sp\relax
-% \fi
-% \fi
-% $\rightarrow$\quad
-% \ignorespaces
-% }
-%
-% \section{Documentation}
-%
-% \subsection{Introduction}
-%
-% Many of my packages also support other formats such as plain-\TeX.
-% Because I am rather familiar with the utility macros from
-% \LaTeX's kernel (e.g. \cs{@gobble}, \cs{@firstoftwo}), I found
-% myself rewriting them again and again, because they are lacking
-% in plain-\TeX.
-%
-% Therefore this package provides often used macros and similar
-% ones with the name prefix \cs{ltx@}. This avoids also faulty
-% redefinitions. I remember an example where a package redefined
-% \cs{@firstoftwo} with forgetting \cs{long}.
-%
-% \subsection{Numbers}
-%
-% \begin{declcs}{ltx@zero} \TO 0\\
-% \cs{ltx@one} \TO 1\\
-% \cs{ltx@two} \TO 2\\
-% \cs{ltx@cclv} \TO 255\\
-% \cs{ltx@minusone} \TO -1
-% \end{declcs}
-% These commands are numbers 0, 1, 2, 255 and -1. They are not digits
-% and a space is not gobbled afterwards. Macro \cs{ltx@minusone}
-% is available since version 2010/12/12 v1.15.
-%
-% \subsection{Scratch registers}
-%
-% Following the conventions of \hologo{plainTeX} and \hologo{LaTeX}
-% the first ten registers are free to use. Even numbered registers
-% are for local, odd numbered for global use.
-%
-% \begin{declcs}{ltx@(Loc,Glob)(Toks,Dimen,Skip)(A,B,C,D,E)}
-% \end{declcs}
-% The name consists of the prefix \cs{ltx@}, then
-% \texttt{Loc} or \texttt{Glob} for local or global usage follows.
-% The register type is given by \texttt{Toks} for token register,
-% \texttt{Dimen} for dimen register and \texttt{Skip} for skip
-% register. As last part the registers are numbered from \texttt{A}
-% to \texttt{E}. Example: \cs{ltx@LocToksA}.
-%
-% Since 2011/04/14 v1.19.
-%
-% \subsection{Argument killers}
-%
-% \begin{declcs}{ltx@gobble} \M{1} \TO\\
-% \cs{ltx@gobbletwo} \M{1} \M{2} \TO\\
-% \cs{ltx@gobblethree} \M{1} \M{2} \M{3} \TO\\
-% \cs{ltx@gobblefour} \M{1} \M{2} \M{3} \M{4} \TO
-% \end{declcs}
-%
-% \begin{declcs}{ltx@GobbleNum} \M{num} \M{1} \M{2} \dots\space
-% \M{\meta{num}} \TO
-% \end{declcs}
-% The first argument \meta{num} of macro \cs{ltx@GobbleNum} specifies,
-% how many following arguments are eaten. Macro \cs{ltx@GobbleNum}
-% is expandable in exact two expansion steps.
-%
-% \subsection{Argument grabbers}
-%
-% \begin{declcs}{ltx@firstofone} \M{1} \TO \meta{1}\\[1ex]
-% \cs{ltx@firstoftwo} \M{1} \M{2} \TO \meta{1}\\
-% \cs{ltx@secondoftwo} \M{1} \M{2} \TO \meta{2}\\[1ex]
-% \cs{ltx@firstofthree} \M{1} \M{2} \M{3} \TO \meta{1}\\
-% \cs{ltx@secondofthree} \M{1} \M{2} \M{3} \TO \meta{2}\\
-% \cs{ltx@thirdofthree} \M{1} \M{2} \M{3} \TO \meta{3}\\
-% \cs{ltx@firstoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{1}\\
-% \cs{ltx@secondoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{2}\\
-% \cs{ltx@thirdoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{3}\\
-% \cs{ltx@fourthoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{4}
-% \end{declcs}
-% Macros \cs{ltx@firstofthree}, \cs{ltx@secondofthree}
-% and \cs{ltx@thirdofthree} were added in version
-% 2010/11/12 v1.11.
-% Macros \cs{ltx@firstoffour}, \dots, \cs{ltx@fourthoffour}
-% were added in version 2011/02/04 v1.16.
-%
-% \subsection{List helpers}
-%
-% \begin{declcs}{ltx@carzero} \dots\ \cs{@nil} \TO\\
-% \cs{ltx@cdrzero} \dots\ \cs{@nil} \TO \dots
-% \end{declcs}
-%
-% \begin{declcs}{ltx@car} \M{1} \dots\ \cs{@nil} \TO \meta{1}\\
-% \cs{ltx@cdr} \M{1} \dots\ \cs{@nil} \TO \dots
-% \end{declcs}
-%
-% \begin{declcs}{ltx@cartwo} \M{1} \M{2} \dots\ \cs{@nil}
-% \TO \meta{1}\meta{2}\\
-% \cs{ltx@carsecond} \M{1} \M{2} \dots\ \cs{@nil} \TO \meta{2}\\
-% \cs{ltx@cdrtwo} \M{1} \M{2} \dots\ \cs{@nil} \TO \dots
-% \end{declcs}
-%
-% \begin{declcs}{ltx@carthree} \M{1} \M{2} \M{3} \dots\ \cs{@nil}
-% \TO \meta{1}\meta{2}\meta{3}\\
-% \cs{ltx@carthird} \M{1} \M{2} \M{3} \dots\ \cs{@nil}
-% \TO \meta{3}\\
-% \cs{ltx@cdrthree} \M{1} \M{2} \M{3} \dots\ \cs{@nil} \TO \dots
-% \end{declcs}
-%
-% \begin{declcs}{ltx@carfour} \M{1} \M{2} \M{3} \M{4} \dots\ \cs{@nil}
-% \TO \meta{1}\meta{2}\meta{3}\meta{4}\\
-% \cs{ltx@carfourth} \M{1} \M{2} \M{3} \M{4} \dots\ \cs{@nil}
-% \TO \meta{4}\\
-% \cs{ltx@cdrfour} \M{1} \M{2} \M{3} \M{4} \dots\ \cs{@nil} \TO \dots
-% \end{declcs}
-%
-% \begin{declcs}{ltx@CarNum} \M{num} \M{1} \dots\ \M{\meta{num}}
-% \M{\meta{num}+1} \dots\ \cs{@nil}\\
-% \TO \M{1} \dots\ \M{\meta{num}} \dots\\
-% \cs{ltx@CarNumth} \M{num} \M{1} \dots\ \M{\meta{num}}
-% \M{\meta{num}+1} \dots\ \cs{@nil}\\
-% \TO \M{\meta{num}} \dots\\
-% \cs{ltx@CdrNum} \M{num} \M{1} \dots\ \M{\meta{num}}
-% \M{\meta{num}+1} \dots\ \cs{@nil}\\
-% \TO \M{\meta{num}+1} \dots
-% \end{declcs}
-%
-% Macros with uppercase letters are expandable in two expansion steps.
-% Changes in version 2020-05-10 v1.25:
-% \begin{itemize}
-% \item
-% Macros \cs{ltx@carsecond}, \cs{ltx@carthird}, \cs{ltx@carfourth},
-% \cs{ltx@CarNumth} added.
-% \item
-% Macros \cs{ltx@cdr}, \cs{ltx@cdrtwo}, \cs{ltx@cdrthree}, \cs{ltx@cdrfour},
-% \cs{ltx@CdrNum} are expandable in two expansion steps and retain
-% spaces and braces after the first gobbled arguments.
-% \end{itemize}
-%
-% \subsection{Tail recursion}
-%
-% \begin{declcs}{ltx@ReturnAfterFi} \M{1} \cs{fi} \TO \cs{fi} \meta{1}\\
-% \cs{ltx@ReturnAfterElseFi} \M{1} \cs{else} \M{2} \cs{fi}
-% \TO \cs{fi} \meta{1}
-% \end{declcs}
-%
-% \subsection{Empty macro}
-%
-% \begin{declcs}{ltx@empty} \TO
-% \end{declcs}
-%
-% \subsection{Characters}
-%
-% \begin{declcs}{ltx@space} \TO \verb*| |\\
-% \cs{ltx@percentchar} \TO \texttt{\%}\\
-% \cs{ltx@backslashchar} \TO
-% \makeatletter\texttt{\@backslashchar}\\
-% \cs{ltx@hashchar} \TO \texttt{\#}\qquad(since v1.7)\\
-% \cs{ltx@leftbracechar} \TO \texttt{\textbraceleft}\qquad(since v1.8)\\
-% \cs{ltx@rightbracechar} \TO \texttt{\textbraceright}\qquad(since v1.8)
-% \end{declcs}
-%
-% \subsection{Boolean switch}
-%
-% \begin{declcs}{ltx@newif} \M{cmd}
-% \end{declcs}
-% \cs{ltx@newif} defines a new boolean switch \meta{cmd} like \cs{newif}.
-% Unlike \plainTeX's \cs{newif}, \cs{ltx@newif} is not \cs{outer}.
-% The command \meta{cmd} must start with the two characters |if|.
-%
-% \begin{declcs}{ltx@newglobalif} \M{cmd}
-% \end{declcs}
-% \cs{ltx@newglobalif} defines a new boolean switch \meta{cmd}
-% like \cs{ltx@newif}. However the switch setting commands,
-% \meta{cmd} without the prefix |if| and followed by |true| or |false|
-% are acting globally.
-%
-% \subsection{Command definitions}
-%
-% \begin{declcs}{ltx@ifundefined} \M{cmd} \M{yes} \M{no}
-% \end{declcs}
-% If \eTeX\ is available, \cs{ifcsname} is used that does
-% not have the side effect of defining undefined commands
-% with meaning of \cs{relax}. This command is always expandable.
-% Change in version 1.1: Also the meaning \cs{relax} is
-% always considered ``undefined''.
-%
-% \begin{declcs}{ltx@IfUndefined} \M{cmd} \M{yes} \M{no}
-% \end{declcs}
-% If \eTeX\ is available, \cs{ifcsname} is used that does
-% not have the side effect of defining undefined commands
-% with meaning of \cs{relax}. Also it always checks for
-% the meaning of \cs{relax} and considers this as undefined.
-% This macro is not expandable without \eTeX.
-%
-% \begin{declcs}{ltx@LocalExpandAfter}
-% \end{declcs}
-% It expands the token after the next token but in a local
-% context. That is the difference to \cs{expandafter}.
-% The local context discards the side effect of \cs{csname}
-% and let the command undefined after the expansion step.
-%
-% \subsection{Stripping}
-%
-% \begin{declcs}{ltx@RemovePrefix}\\
-% \cs{ltx@StripPrefix}
-% \end{declcs}
-% All tokens up to and including the next available character
-% `\textgreater' are thrown away. Usually it is used to strip
-% the first part of the output of the commands \cs{meaning}
-% or \cs{pdflastmatch}. Macro \cs{ltx@RemovePrefix}
-% has the same meaning as \LaTeX's \cs{strip@prefix}, whereas
-% macro \cs{ltx@StripPrefix} expands the next token
-% once before stripping the prefix.
-%
-% \begin{declcs}{ltx@onelevel@sanitize} \M{macro}
-% \end{declcs}
-% Macro \cs{ltx@onelevel@sanitize} provides \hologo{LaTeX}'s
-% \cs{@onelevel@sanitize}. The macro is expanded once and
-% the contents is converted to characters with catcode 12 (other)
-% and space tokens with catcode 10 (space). Then then sanitized
-% contents is stored into the macro again. Since version 1.12.
-%
-% \subsection{File management}
-%
-% All macros in this section are expandable like
-% the counterparts of the \LaTeX\ kernel. Also they
-% can be used after the preamble.
-%
-% \subsubsection{File extensions}
-%
-% \begin{declcs}{ltx@clsextension}\\
-% \cs{ltx@pkgextension}
-% \end{declcs}
-% Macros \cs{ltx@clsextension} and \cs{ltx@styextension}
-% stores the strings |cls| and |sty|. In opposite to \hologo{LaTeX}'s
-% \cs{@clsextension} and \cs{@styextension} they can also be
-% used after |\begin{document}|.
-%
-% \subsubsection{Load check}
-%
-% \begin{declcs}{ltx@ifclassloaded} \M{class} \M{yes} \M{no}\\
-% \cs{ltx@ifpackageloaded} \M{package} \M{yes} \M{no}
-% \end{declcs}
-% Macros \cs{ltx@ifclassloaded}\slash\cs{ltx@ifpackageloaded}
-% execute \meta{yes}, if the \meta{class} or \meta{package} is loaded,
-% otherwise \meta{no} is called.
-% Both \meta{class} and \meta{package} are specified without
-% extension. The macros can also be used after |\begin{document}|.
-%
-% \begin{declcs}{ltx@iffileloaded} \M{file} \M{yes} \M{no}
-% \end{declcs}
-% If \LaTeX's \cs{ProvidesFile} macro was called before
-% using \meta{file} as argument, then \cs{ltx@iffileloaded}
-% calls \meta{yes}, otherwise \meta{no}.
-% Therefore it is possible
-% that the \meta{file} is loaded, but \meta{no} is executed because
-% of a missing \cs{ProvidesFile}. The \LaTeX\ kernel does not have
-% a counterpart of \cs{ltx@iffileloaded}.
-%
-% Note that the file name used in \cs{ProvidesFile} and
-% \cs{ltx@iffileloaded} must match. For example, if \TeX's
-% default extension \xext{tex} was given in the first command,
-% then it must also specified in the latter command and vice versa.
-%
-% \subsubsection{Version date check}
-%
-% \begin{declcs}{ltx@ifclasslater} \M{class} \M{date} \M{yes} \M{no}\\
-% \cs{ltx@ifpackagelater} \M{package} \M{date} \M{yes} \M{no}\\
-% \cs{ltx@iffilelater} \M{file} \M{date} \M{yes} \M{no}
-% \end{declcs}
-% If a \cs{ProvidesClass}\slash\cs{ProvidesPackage}\slash
-% \cs{ProvidesFile} command with exact the same class\slash package\slash
-% file was executed before with an optional
-% argument that starts with a \LaTeX\ version date, then
-% this version date is compared with the argument \meta{date}.
-% If they are equal or if the version date is the later date,
-% then \meta{yes} is called. In all other cases \meta{no} is executed.
-%
-% A \LaTeX\ date has the format |YYYY/MM/DD| with |YYYY| as year
-% with four digits, |MM| as month with two digits and |DD| as day
-% with two digits. If \pdfTeX's \cs{pdfmatch} is available, then
-% it is used to detect the version date, to reject invalid
-% date formats and to reject some invalid dates.
-% Dates before 1994/01/01 are always invalid, because version
-% dates are introduced with \LaTeXe\ in 1994.
-%
-% \subsection{Macro additions}
-%
-% \begin{declcs}{ltx@GlobalAppendToMacro} \M{cmd} \M{addition}\\
-% \cs{ltx@LocalAppendToMacro} \M{cmd} \M{addition}
-% \end{declcs}
-% The \meta{addition} is appended to the parameterless macro \meta{cmd}.
-% If \meta{cmd} is undefined or has the meaning \cs{relax}, then
-% it will be initialized as empty macro beforehand. Due to a bug \meta{addition}
-% must not contain \cs{par} before version 2010/10/25 v1.9.
-%
-% \begin{declcs}{ltx@GlobalPrependToMacro} \M{cmd} \M{addition}\\
-% \cs{ltx@LocalPrependToMacro} \M{cmd} \M{addition}
-% \end{declcs}
-% The \meta{addition} is prepended to the parameterless macro \meta{cmd}.
-% If \meta{cmd} is undefined or has the meaning \cs{relax}, then
-% it will be initialized as empty macro beforehand. The macros
-% were added in version 2011/08/22 v1.21.
-%
-% \subsection{Next character detection}
-%
-% \begin{declcs}{ltx@ifnextchar} \M{char} \M{yes} \M{no}
-% \end{declcs}
-% If next character is \meta{char} then \meta{yes} is called,
-% otherwise \meta{no}. The character is not removed.
-% Spaces are silently removed when looking for \meta{char}
-% as \hologo{LaTeX}'s version \cs{kernel@ifnextchar} does.
-% But there are also small differences:
-% \begin{itemize}
-% \item The space can be used as \meta{char}. In this case
-% optional spaces before \meta{char} are not supported of course.
-% \item If the optional space is a command that is a character
-% (defined by \cs{let} or \cs{futurelet}), then
-% \cs{kernel@ifnextchar} breaks with an \hologo{TeX} error.
-% \cs{ltx@ifnextchar} silently removes this token as
-% optional space.
-% \end{itemize}
-% Since 2010/03/01 v1.3.
-%
-% \begin{declcs}{ltx@ifnextchar@nospace} \M{char} \M{yes} \M{no}
-% \end{declcs}
-% Macro \cs{ltx@ifnextchar@nospace} behaves like
-% macro \cs{ltx@ifnextchar} with the exception that
-% optional spaces are not supported before \meta{char}.
-% Since 2011/04/14 v1.19.
-%
-% \subsection{\cs{ltx@leavevmode}, \cs{ltx@mbox}}
-%
-% \begin{declcs}{ltx@leavevmode}
-% \end{declcs}
-% Macro \cs{ltx@leavevmode} calls \hologo{pdfTeX}'s \cs{quitvmode}.
-% Otherwise \cs{leavevmode} is used and defined if it is necessary.
-%
-% \begin{declcs}{ltx@mbox}
-% \end{declcs}
-% Macro \cs{ltx@mbox} reimplements \cs{mbox} with two changes.
-% Instead of \cs{leavevmode} it uses \cs{ltx@leavevmode} and
-% stops right after \cs{hbox}. Especially it does not grab
-% the argument and allows the extended syntax of \cs{hbox}.
-%
-% \subsection{Expandable test for emptiness}
-%
-% \begin{declcs}{ltx@ifempty} \M{stuff} \M{yes} \M{no}
-% \end{declcs}
-% Macro \cs{ltx@ifempty} checks in exact two expansion steps
-% whether \meta{stuff}
-% is empty or contains token. Depending on the result
-% \meta{yes} or \meta{no} is executed. The token in \meta{stuff}
-% may contain \cs{par} and unmatched conditionals (\cs{if}, \cs{else},
-% \cs{fi}, \dots). Since version 2010/11/12 v1.11.
-%
-% \begin{declcs}{ltx@ifblank} \M{stuff} \M{yes} \M{no}
-% \end{declcs}
-% Macro \cs{ltx@ifblank} tests in exact two expansion steps
-% if \meta{stuff} is empty or contain only blank spaces.
-% In this case argument \meta{yes} is called. If \meta{stuff}
-% contains other tokens than spaces then \meta{no} is executed.
-% Since version 2010/12/04 v1.13.
-%
-% \subsection{Stripping spaces}
-%
-% \begin{declcs}{ltx@zapspace} \M{stuff}
-% \end{declcs}
-% Macro \cs{ltx@zapspace} strips spaces from \meta{stuff}
-% that are not hidden inside curly braces. Like \hologo{LaTeX}'s
-% \cs{zap@space} it is expandable. Differences:
-% \begin{itemize}
-% \item
-% Syntax: \cs{zap@space} also expects a space token
-% and \cs{@empty} after \meta{stuff}.
-% \item
-% Macro \cs{ltx@zapspace} is expandable in exact two
-% expansion steps.
-% \item
-% Macro \cs{ltx@zapspace} always retains curly braces.
-% \item
-% Macro \cs{zap@space} has a bug. It stops stripping spaces
-% after a token group in curly braces if the first two tokens
-% inside the group are equal.
-% \item
-% Macro \cs{ltx@zapspace} also works with \cs{par}
-% and conditionals (\cs{if}, \cs{else}, \cs{fi}, \dots).
-% \end{itemize}
-% Macro \cs{ltx@zapspace} is available since version
-% 2010/12/07 v1.14.
-%
-% \subsection{Check for emptiness of boxes}
-%
-% \begin{declcs}{ltx@IfBoxEmpty} \M{box register number}
-% \M{yes} \M{no}
-% \end{declcs}
-% Macro \cs{ltx@IfBoxEmpty} calls \meta{yes} if
-% the box exists (\cs{ifvoid} returns false) and the box
-% does not contain any content. Otherwise if the box
-% is void or contains something, then \meta{no} is executed.
-% Thus being empty means that the box exists and is either
-% an \cs{hbox} or a \cs{vbox} and may even have dimensions other than
-% 0.0\,pt, but the box does not contain anything.
-% Macro \cs{ltx@IfBoxEmpty} is available since 2010/02/04 v1.16.
-%
-% \begin{declcs}{ltx@IfBoxVoidOrEmpty} \M{box register number}
-% \M{yes} \M{no}
-% \end{declcs}
-% Macro \cs{ltx@IfBoxVoidOrEmpty} calls \meta{yes} if
-% the box is either void or does not contain any content.
-% Otherwise \meta{no} is executed.
-% Macro \cs{ltx@IfBoxVoidOrEmpty} is available since 2010/02/04 v1.16.
-%
-% \StopEventually{
-% }
-%
-% \section{Implementation}
-%
-% \subsection{Identification}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-% Reload check, especially if the package is not used with \LaTeX.
-% \begin{macrocode}
-\begingroup\catcode61\catcode48\catcode32=10\relax%
- \catcode13=5 % ^^M
- \endlinechar=13 %
- \catcode35=6 % #
- \catcode39=12 % '
- \catcode44=12 % ,
- \catcode45=12 % -
- \catcode46=12 % .
- \catcode58=12 % :
- \catcode64=11 % @
- \catcode123=1 % {
- \catcode125=2 % }
- \expandafter\let\expandafter\x\csname ver@ltxcmds.sty\endcsname
- \ifx\x\relax % plain-TeX, first loading
- \else
- \def\empty{}%
- \ifx\x\empty % LaTeX, first loading,
- % variable is initialized, but \ProvidesPackage not yet seen
- \else
- \expandafter\ifx\csname PackageInfo\endcsname\relax
- \def\x#1#2{%
- \immediate\write-1{Package #1 Info: #2.}%
- }%
- \else
- \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
- \fi
- \x{ltxcmds}{The package is already loaded}%
- \aftergroup\endinput
- \fi
- \fi
-\endgroup%
-% \end{macrocode}
-% Package identification:
-% \begin{macrocode}
-\begingroup\catcode61\catcode48\catcode32=10\relax%
- \catcode13=5 % ^^M
- \endlinechar=13 %
- \catcode35=6 % #
- \catcode39=12 % '
- \catcode40=12 % (
- \catcode41=12 % )
- \catcode44=12 % ,
- \catcode45=12 % -
- \catcode46=12 % .
- \catcode47=12 % /
- \catcode58=12 % :
- \catcode64=11 % @
- \catcode91=12 % [
- \catcode93=12 % ]
- \catcode123=1 % {
- \catcode125=2 % }
- \expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \def\x#1#2#3[#4]{\endgroup
- \immediate\write-1{Package: #3 #4}%
- \xdef#1{#4}%
- }%
- \else
- \def\x#1#2[#3]{\endgroup
- #2[{#3}]%
- \ifx#1\@undefined
- \xdef#1{#3}%
- \fi
- \ifx#1\relax
- \xdef#1{#3}%
- \fi
- }%
- \fi
-\expandafter\x\csname ver@ltxcmds.sty\endcsname
-\ProvidesPackage{ltxcmds}%
- [2020-05-10 v1.25 LaTeX kernel commands for general use (HO)]%
-% \end{macrocode}
-%
-% \begin{macrocode}
-\begingroup\catcode61\catcode48\catcode32=10\relax%
- \catcode13=5 % ^^M
- \endlinechar=13 %
- \catcode123=1 % {
- \catcode125=2 % }
- \catcode64=11 % @
- \def\x{\endgroup
- \expandafter\edef\csname LTXcmds@AtEnd\endcsname{%
- \endlinechar=\the\endlinechar\relax
- \catcode13=\the\catcode13\relax
- \catcode32=\the\catcode32\relax
- \catcode35=\the\catcode35\relax
- \catcode61=\the\catcode61\relax
- \catcode64=\the\catcode64\relax
- \catcode123=\the\catcode123\relax
- \catcode125=\the\catcode125\relax
- }%
- }%
-\x\catcode61\catcode48\catcode32=10\relax%
-\catcode13=5 % ^^M
-\endlinechar=13 %
-\catcode35=6 % #
-\catcode64=11 % @
-\catcode123=1 % {
-\catcode125=2 % }
-\def\TMP@EnsureCode#1#2{%
- \edef\LTXcmds@AtEnd{%
- \LTXcmds@AtEnd
- \catcode#1=\the\catcode#1\relax
- }%
- \catcode#1=#2\relax
-}
-\TMP@EnsureCode{36}{3}% $
-\TMP@EnsureCode{38}{4}% &
-\TMP@EnsureCode{40}{12}% (
-\TMP@EnsureCode{41}{12}% )
-\TMP@EnsureCode{45}{12}% -
-\TMP@EnsureCode{46}{12}% .
-\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{62}{12}% >
-\TMP@EnsureCode{91}{12}% [
-\TMP@EnsureCode{96}{12}% `
-\TMP@EnsureCode{93}{12}% ]
-\TMP@EnsureCode{94}{12}% ^ (superscript) (!)
-\TMP@EnsureCode{124}{12}% |
-\edef\LTXcmds@AtEnd{\LTXcmds@AtEnd\noexpand\endinput}
-% \end{macrocode}
-%
-% \subsection{Numbers}
-%
-% \begin{macro}{\ltx@zero}
-% \begin{macrocode}
-\chardef\ltx@zero=0 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@one}
-% \begin{macrocode}
-\chardef\ltx@one=1 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@two}
-% \begin{macrocode}
-\chardef\ltx@two=2 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@active}
-% \begin{macrocode}
-\chardef\ltx@active=13 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@cclv}
-% \begin{macrocode}
-\chardef\ltx@cclv=255 %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@minusone}
-% \begin{macrocode}
-\def\ltx@minusone{%
- -\ltx@one
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Scratch registers}
-%
-% \begin{macro}{\ltx@LocToksA}
-% \begin{macrocode}
-\toksdef\ltx@LocToksA=0 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocToksB}
-% \begin{macrocode}
-\toksdef\ltx@LocToksB=2 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocToksC}
-% \begin{macrocode}
-\toksdef\ltx@LocToksC=4 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocToksD}
-% \begin{macrocode}
-\toksdef\ltx@LocToksD=6 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocToksE}
-% \begin{macrocode}
-\toksdef\ltx@LocToksE=8 %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@GlobToksA}
-% \begin{macrocode}
-\toksdef\ltx@GlobToksA=1 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobToksB}
-% \begin{macrocode}
-\toksdef\ltx@GlobToksB=3 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobToksC}
-% \begin{macrocode}
-\toksdef\ltx@GlobToksC=5 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobToksD}
-% \begin{macrocode}
-\toksdef\ltx@GlobToksD=7 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobToksE}
-% \begin{macrocode}
-\toksdef\ltx@GlobToksE=9 %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@LocDimenA}
-% \begin{macrocode}
-\dimendef\ltx@LocDimenA=0 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocDimenB}
-% \begin{macrocode}
-\dimendef\ltx@LocDimenB=2 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocDimenC}
-% \begin{macrocode}
-\dimendef\ltx@LocDimenC=4 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocDimenD}
-% \begin{macrocode}
-\dimendef\ltx@LocDimenD=6 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocDimenE}
-% \begin{macrocode}
-\dimendef\ltx@LocDimenE=8 %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@GlobDimenA}
-% \begin{macrocode}
-\dimendef\ltx@GlobDimenA=1 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobDimenB}
-% \begin{macrocode}
-\dimendef\ltx@GlobDimenB=3 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobDimenC}
-% \begin{macrocode}
-\dimendef\ltx@GlobDimenC=5 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobDimenD}
-% \begin{macrocode}
-\dimendef\ltx@GlobDimenD=7 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobDimenE}
-% \begin{macrocode}
-\dimendef\ltx@GlobDimenE=9 %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@LocSkipA}
-% \begin{macrocode}
-\skipdef\ltx@LocSkipA=0 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocSkipB}
-% \begin{macrocode}
-\skipdef\ltx@LocSkipB=2 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocSkipC}
-% \begin{macrocode}
-\skipdef\ltx@LocSkipC=4 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocSkipD}
-% \begin{macrocode}
-\skipdef\ltx@LocSkipD=6 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocSkipE}
-% \begin{macrocode}
-\skipdef\ltx@LocSkipE=8 %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@GlobSkipA}
-% \begin{macrocode}
-\skipdef\ltx@GlobSkipA=1 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobSkipB}
-% \begin{macrocode}
-\skipdef\ltx@GlobSkipB=3 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobSkipC}
-% \begin{macrocode}
-\skipdef\ltx@GlobSkipC=5 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobSkipD}
-% \begin{macrocode}
-\skipdef\ltx@GlobSkipD=7 %
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@GlobSkipE}
-% \begin{macrocode}
-\skipdef\ltx@GlobSkipE=9 %
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Argument killers}
-%
-% \begin{macro}{\ltx@gobble}
-% \begin{macrocode}
-\long\def\ltx@gobble#1{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@gobbletwo}
-% \begin{macrocode}
-\long\def\ltx@gobbletwo#1#2{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@gobblethree}
-% \begin{macrocode}
-\long\def\ltx@gobblethree#1#2#3{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@gobblefour}
-% \begin{macrocode}
-\long\def\ltx@gobblefour#1#2#3#4{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@GobbleNum}
-% \begin{macrocode}
-\def\ltx@GobbleNum#1{%
- \romannumeral
- \csname ltx@zero%
- \expandafter\LTXcmds@GobbleNum
- \romannumeral\LTXcmds@num{#1}000{m\endcsname}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@GobbleNum}
-% \begin{macrocode}
-\def\LTXcmds@GobbleNum#1{%
- \csname LTXcmds@G#1\LTXcmds@GobbleNum
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@Gm}
-% \begin{macrocode}
-\long\def\LTXcmds@Gm#1{%
- \endcsname
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Argument grabbers}
-%
-% \begin{macro}{\ltx@firstofone}
-% \begin{macrocode}
-\long\def\ltx@firstofone#1{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@firstoftwo}
-% \begin{macrocode}
-\long\def\ltx@firstoftwo#1#2{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@secondoftwo}
-% \begin{macrocode}
-\long\def\ltx@secondoftwo#1#2{#2}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@firstofthree}
-% \begin{macrocode}
-\long\def\ltx@firstofthree#1#2#3{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@secondofthree}
-% \begin{macrocode}
-\long\def\ltx@secondofthree#1#2#3{#2}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@thirdofthree}
-% \begin{macrocode}
-\long\def\ltx@thirdofthree#1#2#3{#3}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@firstoffour}
-% \begin{macrocode}
-\long\def\ltx@firstoffour#1#2#3#4{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@secondoffour}
-% \begin{macrocode}
-\long\def\ltx@secondoffour#1#2#3#4{#2}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@thirdoffour}
-% \begin{macrocode}
-\long\def\ltx@thirdoffour#1#2#3#4{#3}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@fourthoffour}
-% \begin{macrocode}
-\long\def\ltx@fourthoffour#1#2#3#4{#4}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{List helpers}
-%
-% \begin{macro}{\ltx@carzero}
-% \begin{macrocode}
-\long\def\ltx@carzero#1\@nil{}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@cdrzero}
-% \begin{macrocode}
-\long\def\LTXcmds@cdrzero#1\@nil{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@cdrzero}
-% \begin{macrocode}
-\def\ltx@cdrzero{%
- \romannumeral\LTXcmds@cdrzero\ltx@zero
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@car}
-% \begin{macrocode}
-\long\def\ltx@car#1#2\@nil{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@cdr}
-% \begin{macrocode}
-\long\def\ltx@cdr#1{%
- \romannumeral\LTXcmds@cdrzero\ltx@zero
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@cartwo}
-% \begin{macrocode}
-\long\def\ltx@cartwo#1#2#3\@nil{#1#2}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@carsecond}
-% \begin{macrocode}
-\long\def\ltx@carsecond#1#2#3\@nil{#2}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@cdrtwo}
-% \begin{macrocode}
-\long\def\ltx@cdrtwo#1#2{%
- \romannumeral\LTXcmds@cdrzero\ltx@zero
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@carthree}
-% \begin{macrocode}
-\long\def\ltx@carthree#1#2#3#4\@nil{#1#2#3}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@carthird}
-% \begin{macrocode}
-\long\def\ltx@carthird#1#2#3#4\@nil{#3}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@cdrthree}
-% \begin{macrocode}
-\long\def\ltx@cdrthree#1#2#3{%
- \romannumeral\LTXcmds@cdrzero\ltx@zero
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@carfour}
-% \begin{macrocode}
-\long\def\ltx@carfour#1#2#3#4#5\@nil{#1#2#3#4}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@carfourth}
-% \begin{macrocode}
-\long\def\ltx@carfourth#1#2#3#4#5\@nil{#4}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@cdrfour}
-% \begin{macrocode}
-\long\def\ltx@cdrfour#1#2#3#4{%
- \romannumeral\LTXcmds@cdrzero\ltx@zero
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@CarNum}
-% \begin{macrocode}
-\def\ltx@CarNum#1{%
- \romannumeral
- \csname LTXcmds@CarNumFinish%
- \expandafter\LTXcmds@CarNum
- \romannumeral\LTXcmds@num{#1}000{x\endcsname}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@CarNum}
-% \begin{macrocode}
-\def\LTXcmds@CarNum#1{%
- \csname LTXcmds@C#1\LTXcmds@CarNum
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@Cm}
-% \begin{macrocode}
-\long\def\LTXcmds@Cm#1#2{%
- \endcsname{#1#2}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@Cx}
-% \begin{macrocode}
-\def\LTXcmds@Cx#1{%
- \endcsname{}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@CarNumFinish}
-% \begin{macrocode}
-\long\def\LTXcmds@CarNumFinish#1#2\@nil{%
- \ltx@zero
- #1%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@CarNumth}
-% \begin{macrocode}
-\def\ltx@CarNumth#1{%
- \romannumeral
- \expandafter\expandafter\expandafter
- \LTXcmds@CarNumth
- \ltx@GobbleNum{#1}{}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@CarNumth}
-% \begin{macrocode}
-\long\def\LTXcmds@CarNumth#1#2\@nil{%
- \ltx@zero
- #1%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@CdrNum}
-% \begin{macrocode}
-\def\ltx@CdrNum#1{%
- \romannumeral%
- \expandafter\expandafter\expandafter\ltx@cdrzero
- \expandafter\expandafter\expandafter\ltx@zero
- \ltx@GobbleNum{#1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Tail recursion}
-%
-% \begin{macro}{\ltx@ReturnAfterFi}
-% \begin{macrocode}
-\long\def\ltx@ReturnAfterFi#1\fi{\fi#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@ReturnAfterElseFi}
-% \begin{macrocode}
-\long\def\ltx@ReturnAfterElseFi#1\else#2\fi{\fi#1}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Empty macro}
-%
-% \begin{macro}{\ltx@empty}
-% \begin{macrocode}
-\def\ltx@empty{}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Characters}
-%
-% \begin{macro}{\ltx@space}
-% \begin{macrocode}
-\def\ltx@space{ }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@percentchar}
-% \begin{macrocode}
-\begingroup
- \lccode`0=`\%\relax
-\lowercase{\endgroup
- \def\ltx@percentchar{0}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@backslashchar}
-% \begin{macrocode}
-\begingroup
- \lccode`0=`\\\relax
-\lowercase{\endgroup
- \def\ltx@backslashchar{0}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@hashchar}
-% \begin{macrocode}
-\begingroup
- \lccode`0=`\#\relax
-\lowercase{\endgroup
- \def\ltx@hashchar{0}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@leftbracechar}
-% \begin{macrocode}
-\begingroup
- \lccode`0=`\{\relax
-\lowercase{\endgroup
- \def\ltx@leftbracechar{0}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@rightbracechar}
-% \begin{macrocode}
-\begingroup
- \lccode`0=`\}\relax
-\lowercase{\endgroup
- \def\ltx@rightbracechar{0}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Boolean switch}
-%
-% \begin{macro}{\ltx@newif}
-% \begin{macrocode}
-\def\ltx@newif#1{%
- \begingroup
- \escapechar=-1 %
- \expandafter\endgroup
- \expandafter\LTXcmds@newif\string#1\@nil
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@newif}
-% \begin{macrocode}
-\begingroup
- \escapechar=-1 %
-\expandafter\endgroup
-\expandafter\def\expandafter\LTXcmds@newif\string\if#1\@nil{%
- \expandafter\edef\csname#1true\endcsname{%
- \let
- \expandafter\noexpand\csname if#1\endcsname
- \noexpand\iftrue
- }%
- \expandafter\edef\csname#1false\endcsname{%
- \let
- \expandafter\noexpand\csname if#1\endcsname
- \noexpand\iffalse
- }%
- \csname#1false\endcsname
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@newglobalif}
-% \begin{macrocode}
-\def\ltx@newglobalif#1{%
- \begingroup
- \escapechar=-1 %
- \expandafter\endgroup
- \expandafter\LTXcmds@newglobalif\string#1\@nil
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@newglobalif}
-% \begin{macrocode}
-\begingroup
- \escapechar=-1 %
-\expandafter\endgroup
-\expandafter
-\def\expandafter\LTXcmds@newglobalif\string\if#1\@nil{%
- \expandafter\edef\csname#1true\endcsname{%
- \global\let
- \expandafter\noexpand\csname if#1\endcsname
- \noexpand\iftrue
- }%
- \expandafter\edef\csname#1false\endcsname{%
- \global\let
- \expandafter\noexpand\csname if#1\endcsname
- \noexpand\iffalse
- }%
- \csname#1false\endcsname
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Command definitions}
-%
-% \begin{macro}{\ltx@LocalExpandAfter}
-% \begin{macrocode}
-\def\ltx@LocalExpandAfter{%
- \begingroup
- \expandafter\expandafter\expandafter
- \endgroup
- \expandafter
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\ltx@LocalExpandAfter
-\ifx\csname ifcsname\endcsname\relax
-% \end{macrocode}
-% \begin{macro}{\ltx@ifundefined}
-% \begin{macrocode}
- \def\ltx@ifundefined#1{%
- \expandafter\ifx\csname #1\endcsname\relax
- \expandafter\ltx@firstoftwo
- \else
- \expandafter\ltx@secondoftwo
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@IfUndefined}
-% \begin{macrocode}
- \def\ltx@IfUndefined#1{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1\endcsname\relax
- \expandafter\ltx@firstoftwo
- \else
- \expandafter\ltx@secondoftwo
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
- \expandafter\ltx@gobble
-\else
- \expandafter\ltx@firstofone
-\fi
-{%
-% \end{macrocode}
-% \begin{macro}{\ltx@ifundefined}
-% \begin{macrocode}
- \def\ltx@ifundefined#1{%
- \ifcsname #1\endcsname
- \expandafter\ifx\csname #1\endcsname\relax
- \expandafter\expandafter\expandafter\ltx@firstoftwo
- \else
- \expandafter\expandafter\expandafter\ltx@secondoftwo
- \fi
- \else
- \expandafter\ltx@firstoftwo
- \fi
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@IfUndefined}
-% \begin{macrocode}
- \let\ltx@IfUndefined\ltx@ifundefined
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
-% \subsection{Stripping}
-%
-% \begin{macro}{\ltx@RemovePrefix}
-% \begin{macrocode}
-\def\ltx@RemovePrefix#1>{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@StripPrefix}
-% \begin{macrocode}
-\def\ltx@StripPrefix{%
- \expandafter\ltx@RemovePrefix
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@onelevel@sanitize}
-% \begin{macrocode}
-\def\ltx@onelevel@sanitize#1{%
- \edef#1{%
- \expandafter
- \ltx@RemovePrefix\meaning#1%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{File management}
-%
-% \subsubsection{File extensions}
-%
-% \begin{macro}{\ltx@clsextension}
-% \begin{macrocode}
-\def\ltx@clsextension{cls}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@pkgextension}
-% \begin{macrocode}
-\def\ltx@pkgextension{sty}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Load check}
-%
-% \begin{macro}{\ltx@iffileloaded}
-% \begin{macrocode}
-\def\ltx@iffileloaded#1{%
- \ltx@ifundefined{ver@#1}\ltx@secondoftwo\ltx@firstoftwo
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@ifclassloaded}
-% \begin{macrocode}
-\def\ltx@ifclassloaded#1{%
- \ltx@iffileloaded{#1.\ltx@clsextension}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@ifpackageloaded}
-% \begin{macrocode}
-\def\ltx@ifpackageloaded#1{%
- \ltx@iffileloaded{#1.\ltx@pkgextension}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Version date check}
-% changed 2020-05-10 to adapt to dates with dashes (ISO)
-% The core of the commands are copies from the latex commands.
-% \begin{macro}{\ltx@ifl@ter}
-% \begin{macro}{\ltx@parse@version@}
-% \begin{macrocode}
-\def\ltx@ifl@ter#1#2{%
- \expandafter\ltx@ifl@t@r
- \csname ver@#2.#1\endcsname}
-\def\ltx@ifl@t@r#1#2{%
- \ifnum\expandafter\ltx@parse@version@#1//00\@nil<%
- \expandafter\ltx@parse@version@#2//00\@nil
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi}
-\def\ltx@parse@version@#1{\ltx@parse@version0#1}
-\def\ltx@parse@version#1/#2/#3#4#5\@nil{%
-\ltx@parse@version@dash#1-#2-#3#4\@nil
-}
-\def\ltx@parse@version@dash#1-#2-#3#4#5\@nil{%
- \if\relax#2\relax\else#1\fi#2#3#4 }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\ltx@iffilelater}
-% \begin{macrocode}
-\def\ltx@iffilelater#1{\expandafter\ltx@ifl@t@r\csname ver@#1\endcsname}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@ifclasslater}
-% \begin{macrocode}
-\def\ltx@ifclasslater{\ltx@ifl@ter\ltx@clsextension}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@ifpackagelater}
-% \begin{macrocode}
-\def\ltx@ifpackagelater{\ltx@ifl@ter\ltx@pkgextension}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Macro additions}
-%
-% \begin{macro}{\ltx@GlobalAppendToMacro}
-% \begin{macrocode}
-\long\def\ltx@GlobalAppendToMacro#1#2{%
- \ifx\ltx@undefined#1%
- \let#1\ltx@empty
- \else
- \ifx\relax#1%
- \let#1\ltx@empty
- \fi
- \fi
- \begingroup
- \ltx@LocToksA\expandafter{#1#2}%
- \xdef#1{\the\ltx@LocToksA}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocalAppendToMacro}
-% \begin{macrocode}
-\long\def\ltx@LocalAppendToMacro#1#2{%
- \global\let\LTXcmds@gtemp#1%
- \ifx\ltx@undefined\LTXcmds@gtemp
- \global\let\LTXcmds@gtemp\ltx@empty
- \else
- \ifx\relax\LTXcmds@gtemp
- \global\letLTXcmds@gtemp\ltx@empty
- \fi
- \fi
- \begingroup
- \ltx@LocToksA\expandafter{\LTXcmds@gtemp#2}%
- \xdef\LTXcmds@gtemp{\the\ltx@LocToksA}%
- \endgroup
- \let#1\LTXcmds@gtemp
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@GlobalPrependToMacro}
-% \begin{macrocode}
-\long\def\ltx@GlobalPrependToMacro#1#2{%
- \ifx\ltx@undefined#1%
- \let#1\ltx@empty
- \else
- \ifx\relax#1%
- \let#1\ltx@empty
- \fi
- \fi
- \begingroup
- \ltx@LocToksA{#2}%
- \ltx@LocToksB\expandafter{#1}%
- \xdef#1{\the\ltx@LocToksA\the\ltx@LocToksB}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@LocalPrependToMacro}
-% \begin{macrocode}
-\long\def\ltx@LocalPrependToMacro#1#2{%
- \global\let\LTXcmds@gtemp#1%
- \ifx\ltx@undefined\LTXcmds@gtemp
- \global\let\LTXcmds@gtemp\ltx@empty
- \else
- \ifx\relax\LTXcmds@gtemp
- \global\letLTXcmds@gtemp\ltx@empty
- \fi
- \fi
- \begingroup
- \ltx@LocToksA{#2}%
- \ltx@LocToksB\expandafter{\LTXcmds@gtemp}%
- \xdef\LTXcmds@gtemp{\the\ltx@LocToksA\the\ltx@LocToksB}%
- \endgroup
- \let#1\LTXcmds@gtemp
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Next character detection}
-%
-% \begin{macro}{\ltx@ifnextchar}
-% \begin{macrocode}
-\long\def\ltx@ifnextchar#1#2#3{%
- \begingroup
- \let\LTXcmds@CharToken= #1\relax
- \ltx@LocToksA{\endgroup#2}%
- \ltx@LocToksB{\endgroup#3}%
- \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@ifnextchar}
-% \begin{macrocode}
-\def\LTXcmds@ifnextchar{%
- \ifx\LTXcmds@LetToken\LTXcmds@CharToken
- \the\expandafter\ltx@LocToksA
- \else
- \expandafter
- \ifx\csname LTXcmds@LetToken\endcsname\LTXcmds@SpaceToken
- \expandafter\expandafter\expandafter\LTXcmds@@ifnextchar
- \else
- \the\expandafter\expandafter\expandafter\ltx@LocToksB
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@@ifnextchar}
-% \cs{futurelet} does not distinguish between a
-% character and a command that is a character
-% (defined by using \cs{let} or \cs{futurelet}).
-% Therefore the space is catched by \cs{romannumeral}
-% with negative character constant that gobbles one
-% optional space.
-% \begin{macrocode}
-\def\LTXcmds@@ifnextchar{%
- \expandafter\futurelet
- \expandafter\LTXcmds@LetToken
- \expandafter\LTXcmds@ifnextchar
- \romannumeral-`\.%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@SpaceToken}
-% \begin{macrocode}
-\ltx@firstofone{\let\LTXcmds@SpaceToken= } %
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@ifnextchar@nospace}
-% \begin{macrocode}
-\long\def\ltx@ifnextchar@nospace#1#2#3{%
- \begingroup
- \let\LTXcmds@CharToken= #1\relax
- \ltx@LocToksA{\endgroup#2}%
- \ltx@LocToksB{\endgroup#3}%
- \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar@nospace
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@ifnextchar@nospace}
-% \begin{macrocode}
-\def\LTXcmds@ifnextchar@nospace{%
- \the
- \ifx\LTXcmds@LetToken\LTXcmds@CharToken
- \expandafter\ltx@LocToksA
- \else
- \expandafter\ltx@LocToksB
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \subsection{\cs{ltx@leavevmode}, \cs{ltx@mbox}}
-%
-% \begin{macro}{\ltx@leavevmode}
-% \begin{macrocode}
-\ltx@IfUndefined{quitvmode}{%
- \ltx@IfUndefined{leavevmode}{%
- \ltx@IfUndefined{voidb@x}{%
- \ltx@IfUndefined{newbox}{%
- \def\ltx@leavevmode{%
- \begingroup
- \setbox\ltx@zero=\hbox{}%
- \begingroup
- \setbox\ltx@zero=\hbox{\box\ltx@zero}%
- \endgroup
- \unhbox\ltx@zero
- \endgroup
- }%
- }{%
- \csname newbox\endcsname\LTXcmds@VoidBox
- \ifvoid\LTXcmds@VoidBox
- \else
- \setbox\LTXcmds@VoidBox=\hbox{}%
- \begingroup
- \setbox\LTXcmds@VoidBox=\hbox{\box\LTXcmds@VoidBox}%
- \endgroup
- \fi
- \def\ltx@leavevmode{\unhbox\LTXcmds@VoidBox}%
- }%
- }{%
- \def\ltx@leavevmode{\unhbox\voidb@x}%
- }%
- }{%
- \let\ltx@leavevmode\leavevmode
- }%
-}{%
- \let\ltx@leavevmode\quitvmode
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@mbox}
-% \begin{macrocode}
-\def\ltx@mbox{%
- \ltx@leavevmode
- \hbox
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Help macros}
-%
-% \begin{macro}{\LTXcmds@num}
-% \begin{macrocode}
-\ltx@IfUndefined{numexpr}{%
- \def\LTXcmds@num#1{%
- \expandafter\ltx@firstofone\expandafter{%
- \number#1%
- }%
- }%
-}{%
- \def\LTXcmds@num#1{%
- \expandafter\ltx@firstofone\expandafter{%
- \the\numexpr#1%
- }%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Expandable test for emptiness}
-%
-% \begin{macrocode}
-\ltx@IfUndefined{detokenize}{%
-% \end{macrocode}
-%
-% \subsubsection{Vanilla \hologo{TeX}}
-%
-% \begin{macro}{\ltx@ifempty}
-% The macro is based on \cs{@ifempty} of Robert R. Schneck
-% \cite{ifempty:schneck}
-% and \cs{@ifnull} of Ulrich Diez \cite{ifnull:diez}.
-% There are three cases to consider:
-% \begin{compactenum}
-% \item |#1| is empty,
-% \item |#1| is not empty and the first token
-% is not a begingroup character,
-% \item |#1| starts with a begingroup character (catcode 1).
-% \end{compactenum}
-% \begin{macrocode}
- \def\LTXcmds@temp#1{%
- \long\def\ltx@ifempty##1{%
- \romannumeral0%
- \iffalse{\fi
- \expandafter\ltx@gobble\expandafter{%
- \expandafter{\string##1}%
- \expandafter\ltx@gobble\string
- }%
- \expandafter\ltx@firstofthree\expandafter
- {\iffalse}\fi
- \expandafter#1\ltx@secondoftwo
- }%
- \expandafter#1\ltx@firstoftwo
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ltx@ifblank}
-% \begin{macrocode}
- \long\def\ltx@ifblank##1{%
- \romannumeral0%
- \iffalse{\fi
- \expandafter\expandafter\expandafter\ltx@gobble
- \expandafter\expandafter\expandafter{%
- \expandafter\expandafter\expandafter{%
- \expandafter\string\ltx@gobble##1.%
- }%
- \expandafter\ltx@gobble\string
- }%
- \expandafter\ltx@firstofthree\expandafter
- {\iffalse}\fi
- \expandafter#1\ltx@secondoftwo
- }%
- \expandafter#1\ltx@firstoftwo
- }%
- }%
- \LTXcmds@temp{ }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-}{%
-% \end{macrocode}
-%
-% \subsubsection{With \cs{detokenize}}
-%
-% Ahmed Musa provided \cs{ifstrempty} using \cs{detokenize}
-% and \cs{pdfstrcmp} \cite{ifstrempty:musa}. Ulrich Diez, GL,
-% Heiko Oberdiek
-% improved it further by removing \cs{pdfstrcmp} and
-% taking three arguments
-% \cite{ifstrempty:diez1,ifstrempty:diez2,ifstrempty:diez3,^^A
-% ifstrempty:gl,ifstrempty:ho}.
-%
-% \begin{macro}{\ltx@ifempty}
-% \begin{macrocode}
- \long\def\ltx@ifempty#1{%
- \romannumeral%
- \csname
- LTXcmds@ifempty%
- \ifcat$\detokenize{#1}$%
- @%
- \fi
- \endcsname
- }%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@ifempty@}
-% \begin{macrocode}
- \long\def\LTXcmds@ifempty@#1#2{0 #1}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@ifempty}
-% \begin{macrocode}
- \long\def\LTXcmds@ifempty#1#2{0 #2}%
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{\cs{ltx@ifblank}}
-%
-% \begin{macro}{\ltx@ifblank}
-% \begin{macrocode}
- \long\def\ltx@ifblank#1{%
- \romannumeral%
- \csname
- LTXcmds@ifempty%
- \ifcat$\detokenize\expandafter{\ltx@gobble#1.}$%
- @%
- \fi
- \endcsname
- }%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
-% \subsection{\cs{ltx@zapspace}}
-%
-% \begin{macro}{\ltx@zapspace}
-% \begin{macrocode}
-\long\def\ltx@zapspace#1{%
- \romannumeral
- \LTXcmds@zapspace\ltx@zero#1 \@nil
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\LTXcmds@zapspace}
-% \begin{macrocode}
-\long\def\LTXcmds@zapspace#1 #2\@nil{%
- \ltx@ifempty{#2}{%
- #1%
- }{%
- \LTXcmds@zapspace#1#2\@nil
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{\cs{ltx@IfBoxEmpty}}
-%
-% In case of \hologo{eTeX} the test for an empty box
-% is done via \cs{lastnodetype} as suggested
-% by David Kastrup \cite{ifboxempty:dak}.
-% \begin{macrocode}
-\ltx@IfUndefined{lastnodetype}{%
- \catcode`\$=9 %
- \catcode`\&=14 %
-}{%
- \catcode`\$=14 %
- \catcode`\&=9 %
-}
-% \end{macrocode}
-% \begin{macro}{\ltx@IfBoxEmpty}
-% \begin{macrocode}
-\def\ltx@IfBoxEmpty#1{%
- \ifvoid#1\relax
- \expandafter\ltx@secondoftwo
- \else
-% \end{macrocode}
-% Implementation using \hologo{eTeX}'s \cs{lastnodetype}.
-% \begin{macrocode}
-& \begingroup
-& \setbox\ltx@zero=\ifhbox#1\hbox\else\vbox\fi{%
-& \ifhmode\unhcopy\else\unvcopy\fi#1\relax
-& \expandafter
-& }%
-& \expandafter\endgroup
-& \ifnum\lastnodetype<\ltx@zero
-& \expandafter\expandafter\expandafter\ltx@firstoftwo
-& \else
-& \expandafter\expandafter\expandafter\ltx@secondoftwo
-& \fi
-% \end{macrocode}
-% Implementation without \hologo{eTeX} using a signature
-% at the beginning of the test box.
-% \begin{macrocode}
-$ \begingroup
-$ \setbox\ltx@zero=\ifhbox#1\hbox\else\vbox\fi{%
-$ \penalty\ltx@one
-$ \ifhmode\unhcopy\else\unvcopy\fi#1\relax
-$ \expandafter
-$ }%
-$ \ifnum\lastpenalty=\ltx@one
-% \end{macrocode}
-% Box 0 has been changed and is restored by
-% closing the group.
-% \begin{macrocode}
-$ \endgroup
-$ \begingroup
-$ \setbox\ltx@zero=\ifhbox#1\hbox\else\vbox\fi{%
-$ \penalty\ltx@two
-$ \ifhmode\unhcopy\else\unvcopy\fi#1\relax
-$ \expandafter
-$ }%
-$ \ifnum\lastpenalty=\ltx@two
-$ \def\next{\endgroup\expandafter\ltx@firstoftwo}%
-$ \else
-$ \def\next{\endgroup\expandafter\ltx@secondoftwo}%
-$ \fi
-$ \else
-$ \def\next{\endgroup\expandafter\ltx@secondoftwo}%
-$ \fi
-$ \next
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ltx@IfBoxVoidOrEmpty}
-% \begin{macrocode}
-\def\ltx@IfBoxVoidOrEmpty#1{%
- \ifvoid#1\relax
- \expandafter\ltx@thirdoffour
- \fi
- \ltx@IfBoxEmpty{#1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\LTXcmds@AtEnd%
-%</package>
-% \end{macrocode}
-%% \section{Installation}
-%
-% \subsection{Download}
-%
-% \paragraph{Package.} This package is available on
-% CTAN\footnote{\CTANpkg{ltxcmds}}:
-% \begin{description}
-% \item[\CTAN{macros/latex/contrib/ltxcmds/ltxcmds.dtx}] The source file.
-% \item[\CTAN{macros/latex/contrib/ltxcmds/ltxcmds.pdf}] Documentation.
-% \end{description}
-%
-%
-% \subsection{Package installation}
-% The package is at best installed with the package manager of the \TeX~system.
-% Manual installation is possible too:
-% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
-% \docstrip\ archive. The files are extracted by running the
-% \xfile{.dtx} through \plainTeX:
-% \begin{quote}
-% \verb|tex ltxcmds.dtx|
-% \end{quote}
-%
-% \paragraph{TDS.} Now the different files must be moved into
-% the different directories in your installation TDS tree
-% (also known as \xfile{texmf} tree):
-% \begin{quote}
-% \def\t{^^A
-% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% ltxcmds.sty & tex/generic/ltxcmds/ltxcmds.sty\\
-% ltxcmds.pdf & doc/latex/ltxcmds/ltxcmds.pdf\\
-% ltxcmds.dtx & source/latex/ltxcmds/ltxcmds.dtx\\
-% \end{tabular}^^A
-% }^^A
-% \sbox0{\t}^^A
-% \ifdim\wd0>\linewidth
-% \begingroup
-% \advance\linewidth by\leftmargin
-% \advance\linewidth by\rightmargin
-% \edef\x{\endgroup
-% \def\noexpand\lw{\the\linewidth}^^A
-% }\x
-% \def\lwbox{^^A
-% \leavevmode
-% \hbox to \linewidth{^^A
-% \kern-\leftmargin\relax
-% \hss
-% \usebox0
-% \hss
-% \kern-\rightmargin\relax
-% }^^A
-% }^^A
-% \ifdim\wd0>\lw
-% \sbox0{\small\t}^^A
-% \ifdim\wd0>\linewidth
-% \ifdim\wd0>\lw
-% \sbox0{\footnotesize\t}^^A
-% \ifdim\wd0>\linewidth
-% \ifdim\wd0>\lw
-% \sbox0{\scriptsize\t}^^A
-% \ifdim\wd0>\linewidth
-% \ifdim\wd0>\lw
-% \sbox0{\tiny\t}^^A
-% \ifdim\wd0>\linewidth
-% \lwbox
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \else
-% \lwbox
-% \fi
-% \else
-% \usebox0
-% \fi
-% \end{quote}
-% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
-% TDS installing feature, then some files can already be in the right
-% place, see the documentation of \docstrip.
-%
-% \subsection{Refresh file name databases}
-%
-% If your \TeX~distribution
-% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
-% these. For example, \TeX\,Live\ users run \verb|texhash| or
-% \verb|mktexlsr|.
-%
-% \subsection{Some details for the interested}
-%
-% \paragraph{Unpacking with \LaTeX.}
-% The \xfile{.dtx} chooses its action depending on the format:
-% \begin{description}
-% \item[\plainTeX:] Run \docstrip\ and extract the files.
-% \item[\LaTeX:] Generate the documentation.
-% \end{description}
-% If you insist on using \LaTeX\ for \docstrip\ (really,
-% \docstrip\ does not need \LaTeX), then inform the autodetect routine
-% about your intention:
-% \begin{quote}
-% \verb|latex \let\install=y\input{ltxcmds.dtx}|
-% \end{quote}
-% Do not forget to quote the argument according to the demands
-% of your shell.
-%
-% \paragraph{Generating the documentation.}
-% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
-% the documentation. The process can be configured by the
-% configuration file \xfile{ltxdoc.cfg}. For instance, put this
-% line into this file, if you want to have A4 as paper format:
-% \begin{quote}
-% \verb|\PassOptionsToClass{a4paper}{article}|
-% \end{quote}
-% An example follows how to generate the
-% documentation with pdf\LaTeX:
-% \begin{quote}
-%\begin{verbatim}
-%pdflatex ltxcmds.dtx
-%makeindex -s gind.ist ltxcmds.idx
-%pdflatex ltxcmds.dtx
-%makeindex -s gind.ist ltxcmds.idx
-%pdflatex ltxcmds.dtx
-%\end{verbatim}
-% \end{quote}
-%
-% \begin{thebibliography}{9}
-% \raggedright
-%
-% \bibitem{ifempty:schneck}
-% Robert R. Schneck:
-% \textit{Re: \cs{ifempty} solution %
-% (was Macro puzzle: maximally general \cs{ifempty})};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:3eef1ada_6@corp.newsgroups.com},
-% 2003-06-17.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/be03a159ec374895}}
-%
-% \bibitem{ifnull:diez}
-% Ulrich Diez:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:ibk3t8$ee7$1@news.albasani.net},
-% 2010-11-12.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/803bd57221a04996}}
-%
-% \bibitem{ifstrempty:musa}
-% Ahmed Musa:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:f5496afe-40ed-42bd-b629-a2419ecf7c0d@o14g2000prn.googlegroups.com},
-% 2010-12-03.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/fbf7d61a0c3a807d}}
-%
-% \bibitem{ifstrempty:diez1}
-% Ulrich Diez:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:idbo94$uka$1@four.albasani.net},
-% 2010-12-03.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/0c230ee479487962}}
-%
-% \bibitem{ifstrempty:diez2}
-% Ulrich Diez:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:idbpu4$cg1$1@news.albasani.net},
-% 2010-12-03.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/bbef4263390d647b}}
-%
-% \bibitem{ifstrempty:diez3}
-% Ulrich Diez:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:idd4ga$r83$1@four.albasani.net},
-% 2010-12-04.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/00dfd1ec103cd272}}
-%
-% \bibitem{ifstrempty:gl}
-% GL:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:4cfa2e27$0$7389$426a74cc@news.free.fr},
-% 2010-12-04.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/d3a75995c1cf267e}}
-%
-% \bibitem{ifstrempty:ho}
-% Heiko Oberdiek:
-% \textit{Re: TeX refuses to strip outer braces in argument};
-% newsgroup \xnewsgroup{comp.text.tex},
-% \url{news:iddhq1$3kj$1@news.eternal-september.org},
-% 2010-12-04.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/5f7a23e3ab70e347}}
-%
-% \bibitem{ifboxempty:dak}
-% David Kastrup:
-% \textit{How to detect if \cs{vbox} is empty};
-% newsgroup \xnewsgroup{comp.text.tex},
-% 2011-02-04.\\
-% {\small
-% \url{https://groups.google.com/group/comp.text.tex/msg/8d3cb89496a4d86d}}
-%
-% \end{thebibliography}
-%
-% \begin{History}
-% \begin{Version}{2009/08/05 v1.0}
-% \item
-% First version.
-% \end{Version}
-% \begin{Version}{2009/12/12 v1.1}
-% \item
-% Short title shortened.
-% \item
-% \cs{ltx@IfUndefined} added.
-% \end{Version}
-% \begin{Version}{2010/01/28 v1.2}
-% \item
-% \cs{ltx@RemovePrefix} and \cs{ltx@StripPrefix} added.
-% \item
-% \cs{ltx@ifclassloaded}, \cs{ltx@ifpackageloaded},
-% \cs{ltx@iffileloaded},
-% \cs{ltx@ifclasslater}, \cs{ltx@ifpackagelater},
-% \cs{ltx@iffilelater},
-% \cs{ltx@clsextension}, \cs{ltx@pkgextension} added.
-% \item
-% \cs{ltx@GlobalAppendToMacro}, \cs{ltx@LocalAppendToMacro} added.
-% \end{Version}
-% \begin{Version}{2010/03/01 v1.3}
-% \item
-% \cs{ltx@newif} added.
-% \item
-% \cs{ltx@ifnextchar} added.
-% \item
-% Numbers \cs{ltx@zero}, \cs{ltx@one}, \cs{ltx@two}, \cs{ltx@cclv} added.
-% \end{Version}
-% \begin{Version}{2010/03/09 v1.4}
-% \item
-% \cs{ltx@pkgextension} and \cs{ltx@clsextension} are hardcoded to
-% avoid trouble with \cs{@onlypreamble}.
-% \end{Version}
-% \begin{Version}{2010/04/08 v1.5}
-% \item
-% \cs{ltx@cartwo}, \cs{ltx@cdrtwo},
-% \cs{ltx@carthree}, \cs{ltx@cdrthree},
-% \cs{ltx@carfour}, \cs{ltx@cdrfour} added.
-% \item
-% \cs{ltx@ReturnAfterFi} and \cs{ltx@ReturnAfterElseFi} fixed.
-% \end{Version}
-% \begin{Version}{2010/04/16 v1.6}
-% \item
-% \cs{ltx@leavevmode}, \cs{ltx@mbox} added.
-% \end{Version}
-% \begin{Version}{2010/04/26 v1.7}
-% \item
-% \cs{ltx@GobbleNum}, \cs{ltx@CdrNum}, \cs{ltx@CarNum} added.
-% \item
-% \cs{ltx@carzero}, \cs{ltx@cdrzero} added.
-% \item
-% \cs{ltx@hashchar} added.
-% \end{Version}
-% \begin{Version}{2010/09/11 v1.8}
-% \item
-% \cs{ltx@leftbracechar}, \cs{ltx@rightbracechar} added.
-% \end{Version}
-% \begin{Version}{2010/10/25 v1.9}
-% \item
-% \cs{ltx@LocalAppendToMacro} and \cs{ltx@GlobalAppendToMacro} are
-% now \cs{long}.
-% \end{Version}
-% \begin{Version}{2010/10/31 v1.10}
-% \item
-% \cs{ltx@newglobalif} added.
-% \end{Version}
-% \begin{Version}{2010/11/12 v1.11}
-% \item
-% \cs{ltx@ifempty} added.
-% \item
-% \cs{ltx@firstofthree}, \cs{ltx@secondofthree}, \cs{ltx@thirdofthree}
-% added.
-% \end{Version}
-% \begin{Version}{2010/12/02 v1.12}
-% \item
-% \cs{ltx@onelevel@sanitize} added.
-% \item
-% \cs{LTXcmds@num} fixed for the case with \cs{numexpr}
-% (bug found by GL).
-% \end{Version}
-% \begin{Version}{2010/12/04 v1.13}
-% \item
-% \cs{ltx@ifblank} added.
-% \item
-% Optimization for \cs{ltx@ifempty}.
-% \end{Version}
-% \begin{Version}{2010/12/07 v1.14}
-% \item
-% \cs{ltx@zapspace} added.
-% \end{Version}
-% \begin{Version}{2010/12/12 v1.15}
-% \item
-% \cs{ltx@minusone} added.
-% \end{Version}
-% \begin{Version}{2011/02/04 v1.16}
-% \item
-% \cs{ltx@IfBoxEmpty} and \cs{ltx@IfBoxVoidOrEmpty} added.
-% \item
-% \cs{ltx@firstoffour}, \dots, \cs{ltx@fourthoffour} added.
-% \end{Version}
-% \begin{Version}{2011/02/05 v1.17}
-% \item
-% \cs{ltx@IfBoxEmpty}: an empty box may have non-zero dimensions.
-% \end{Version}
-% \begin{Version}{2011/03/16 v1.18}
-% \item
-% \cs{ltx@ifclasslater} fixed.
-% \end{Version}
-% \begin{Version}{2011/04/14 v1.19}
-% \item
-% \cs{ltx@ifnextchar}: detection of optional spaces modified.
-% \item
-% \cs{ltx(Loc,Glob)(Toks,Dimen,Skip)(A,B,C,D,E)} added.
-% \end{Version}
-% \begin{Version}{2011/04/18 v1.20}
-% \item
-% \cs{ltx@ifnextchar} with conditional support (thanks GL for
-% bug report).
-% \end{Version}
-% \begin{Version}{2011/08/22 v1.21}
-% \item
-% \cs{ltx@GlobalPrependToMacro}, \cs{ltx@LocalPrependToMacro} added
-% (feature request of Martin M\"unch).
-% \end{Version}
-% \begin{Version}{2011/11/09 v1.22}
-% \item
-% \cs{ltx@carsecond}, \cs{ltx@carthird}, \cs{ltx@carfourth},
-% \cs{ltx@CarNumth} added.
-% \item
-% \cs{ltx@cdrzero}, \cs{ltx@cdr}, \cs{ltx@cdrtwo}, cs{ltx@cdrthree},
-% \cs{ltx@cdrfour}, \cs{ltx@CdrNum} modified to retain braces and spaces.
-% They are expandable in two expansion steps.
-% \end{Version}
-% \begin{Version}{2016/05/16 v1.23}
-% \item
-% Documentation updates.
-% \end{Version}
-% \begin{Version}{2019/12/15 v1.24}
-% \item
-% Documentation updates.
-% \end{Version}
-% \begin{Version}{2020-05-10 v1.25}
-% \item Changed the definitions of \cs{ltx@iffilelater}, \cs{ltx@ifpackagelater}
-% and \cs{ltx@ifclasslater} to support dates in ISO format in same way as the
-% LaTeX kernel does it since 2017. The commands now use the same test as the
-% LaTeX kernel. \cs{pdfmatch} is no longer used with pdftex, and the tests for dates before
-% 1994 have been removed
-% \end{Version}
-% \end{History}
-%
-% \PrintIndex
-%
-% \Finale
-\endinput
diff --git a/macros/latex/contrib/ltxcmds/ltxcmds.pdf b/macros/latex/contrib/ltxcmds/ltxcmds.pdf
deleted file mode 100644
index 1dfb9104f3..0000000000
--- a/macros/latex/contrib/ltxcmds/ltxcmds.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf b/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf
index 6b85070222..f3a0e2f7b8 100644
--- a/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf
+++ b/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf b/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf
index 1942baa608..d1596dc811 100644
--- a/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf
+++ b/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf b/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf
index 9db09d2ec3..5e2a4a5760 100644
--- a/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf
+++ b/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf b/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf
index 6019fc3887..ac57d3f117 100644
--- a/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf
+++ b/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/1-tabular.pdf b/macros/latex/contrib/reledmac/examples/1-tabular.pdf
index de09baa4a8..807eed9b3f 100644
--- a/macros/latex/contrib/reledmac/examples/1-tabular.pdf
+++ b/macros/latex/contrib/reledmac/examples/1-tabular.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf b/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf
index f00a59297c..f15a346e37 100644
--- a/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf
+++ b/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/1-verses.pdf b/macros/latex/contrib/reledmac/examples/1-verses.pdf
index d5099f50f9..b2ceb2a40c 100644
--- a/macros/latex/contrib/reledmac/examples/1-verses.pdf
+++ b/macros/latex/contrib/reledmac/examples/1-verses.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-antilabe.pdf b/macros/latex/contrib/reledmac/examples/2-antilabe.pdf
index 601ba99085..dd35be84bf 100644
--- a/macros/latex/contrib/reledmac/examples/2-antilabe.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-antilabe.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf b/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf
index 5b3675f773..2d7e20cf09 100644
--- a/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf b/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf
index 9c90f6014a..452237da2e 100644
--- a/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-glossaries.pdf b/macros/latex/contrib/reledmac/examples/2-glossaries.pdf
index cb3bee719f..ac5f99ee3f 100644
--- a/macros/latex/contrib/reledmac/examples/2-glossaries.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-glossaries.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-indexing.pdf b/macros/latex/contrib/reledmac/examples/2-indexing.pdf
index 6c2f8ca732..e27ec9ad9b 100644
--- a/macros/latex/contrib/reledmac/examples/2-indexing.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-indexing.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf b/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf
index 342b351d70..02cddde88f 100644
--- a/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf b/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf
index 68fbebaa30..2ead331ff6 100644
--- a/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-linespacing.pdf b/macros/latex/contrib/reledmac/examples/2-linespacing.pdf
index 20e27869b9..b3f703a708 100644
--- a/macros/latex/contrib/reledmac/examples/2-linespacing.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-linespacing.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf b/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf
index 54b76efd42..899c73e0cb 100644
--- a/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-notes-width.pdf b/macros/latex/contrib/reledmac/examples/2-notes-width.pdf
index d94d0ba534..6729f21c12 100644
--- a/macros/latex/contrib/reledmac/examples/2-notes-width.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-notes-width.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf b/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf
index dcff23b484..d1cbc77bb3 100644
--- a/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-performances.pdf b/macros/latex/contrib/reledmac/examples/2-performances.pdf
index 6291ae5384..6b45cd5ba8 100644
--- a/macros/latex/contrib/reledmac/examples/2-performances.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-performances.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf
index 30adfc18b5..9fe6fddf58 100644
--- a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf b/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf
index 70d1483715..61ccac8dce 100644
--- a/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
index 38e1031ebb..0f6ae4dae2 100644
--- a/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf b/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf
index 17405a91ba..92b6229cac 100644
--- a/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf
+++ b/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf
index a532213cf8..f2b6ee1c7a 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf
index 2d458ccfa6..268fd1468e 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
index 21967907a9..0d8864408b 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
index bec9689f96..39ca247aa0 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
index e5e4c2019c..c3a643d486 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
index a5e01c83fb..59e2af4868 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf
index fbaaed66e0..7d3654143b 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
index c6ac1b4777..06f2a19a5a 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
index 04df30bd97..4dadb2ab1b 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
index 23cd6eb9a3..4f2e3e02ba 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
index 6f10539ca2..6caa79d4fb 100644
--- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
+++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
index ebe85f0eb6..5dc2f6609f 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
index d37969d5b2..eb55f87205 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf
index a4a083725b..e3d066a336 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
index 5df84527d4..066672132b 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf
index cccd9f5a8b..8f4e7e578c 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
index 9802b9af80..ab4d8d79d7 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf
index 1e25b68962..9e4354a45c 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
index 9267d7dad3..fb4fc9e6eb 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
index 17a8918dac..12c76ef43f 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
index 9247d62980..e9285204b4 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
index c659eaa383..017949e363 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf
index bc3d4513f6..aab86d692e 100644
--- a/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf
+++ b/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/migration.pdf b/macros/latex/contrib/reledmac/migration.pdf
index 93b51e7d46..a4ba1b2694 100644
--- a/macros/latex/contrib/reledmac/migration.pdf
+++ b/macros/latex/contrib/reledmac/migration.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/reledmac.dtx b/macros/latex/contrib/reledmac/reledmac.dtx
index cf01998334..2ce385c8e2 100644
--- a/macros/latex/contrib/reledmac/reledmac.dtx
+++ b/macros/latex/contrib/reledmac/reledmac.dtx
@@ -565,6 +565,7 @@
% \changes{v2.34.3}{2020/08/19}{Makes command like \protect\cs{hidenumbering} working at the very beginning of a verse when the first argument of \protect\cs{setstanzaindents} is equal to 0.}
% \changes{v2.34.4}{2020/09/16}{Fix some bugs with lineation by page, when a numbered section starts at the very beginning of page.}
% \changes{v2.34.4}{2020/09/16}{Fix bugs with \protect\cs{parafootsepX} outside of numbered section.}
+% \changes{v2.34.5}{2020/09/23}{Fix incompatibility between \protect\cs{apprefwithpage} / \protect\cs{SErefwithpage} and line number annotation mechanism.}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -4405,7 +4406,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2020/09/16 v2.34.4 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2020/09/23 v2.34.5 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -16955,8 +16956,8 @@
\toggletrue{Xendlineflag@SErefwithpage}%Here, exception
-\newtoggle{Xendlinenumannotationonlyfirst@SEref}%Never changed, just for the test in \setprintendlines
-\newtoggle{Xendlinenumannotationonlyfirst@appref}%Idem
+\def\Xendlinenumannotationposition@apprefwithpage{after}%
+\def\Xendlinenumannotationposition@SErefwithpage{after}%
\def\Xendlinenumannotationposition@apprefwithpage{after}%
\def\Xendlinenumannotationposition@apprefwithpage@SErefwithpage{after}%
@@ -16970,6 +16971,11 @@
% Note that some of these hooks are declared but no user command can change their values. Such hooks are not pertinent for \verb+appref+ and \verb+apprefwithpage+ pseudo-series, but their values are nonetheless tested in some macros.
% \begin{macrocode}
+\newtoggle{Xendlinenumannotationonlyfirst@SEref}%Never changed, just for the test in \setprintendlines
+\newtoggle{Xendlinenumannotationonlyfirst@SErefwithpage}%Idem
+\newtoggle{Xendlinenumannotationonlyfirst@appref}%Idem
+\newtoggle{Xendlinenumannotationonlyfirst@apprefwithpage}%Idem
+
\gdef\Xboxstartlinenum@appref{0pt}
\gdef\Xboxstartlinenum@SEref{0pt}
@@ -17095,6 +17101,8 @@
{%
\def\@this@crossref@start{#2:start}%
\def\@this@crossref@end{#2:end}%
+ \xdef\annot@start{\xannotationref{#2:start}}%
+ \xdef\annot@end{\xannotationref{#2:end}}%
\printendlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|%
}%
\def\do##1{%
diff --git a/macros/latex/contrib/reledmac/reledmac.pdf b/macros/latex/contrib/reledmac/reledmac.pdf
index f60cdc1a7a..af374f3c86 100644
--- a/macros/latex/contrib/reledmac/reledmac.pdf
+++ b/macros/latex/contrib/reledmac/reledmac.pdf
Binary files differ
diff --git a/macros/latex/contrib/reledmac/reledpar.pdf b/macros/latex/contrib/reledmac/reledpar.pdf
index 1e642d7990..b2755adbda 100644
--- a/macros/latex/contrib/reledmac/reledpar.pdf
+++ b/macros/latex/contrib/reledmac/reledpar.pdf
Binary files differ