summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-03 03:01:14 +0000
committerNorbert Preining <norbert@preining.info>2020-09-03 03:01:14 +0000
commitfc732340b62b41cedbe82bcb3675a86c65343a21 (patch)
treec490d1d57d300b1024517118f6e494d68eae5bcd /macros/latex
parent66aedee32b96d68acc7b854602552c75ef261973 (diff)
CTAN sync 202009030301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/caption/README2
-rw-r--r--macros/latex/contrib/caption/caption.dtx51
-rw-r--r--macros/latex/contrib/changelog/changelog.pdfbin46126 -> 46523 bytes
-rw-r--r--macros/latex/contrib/changelog/changelog.sty13
-rw-r--r--macros/latex/contrib/changelog/changelog.tex13
-rw-r--r--macros/latex/contrib/changelog/example.pdfbin16775 -> 16679 bytes
-rw-r--r--macros/latex/contrib/l3backend/CHANGELOG.md11
-rw-r--r--macros/latex/contrib/l3backend/README.md2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-basics.dtx165
-rw-r--r--macros/latex/contrib/l3backend/l3backend-box.dtx14
-rw-r--r--macros/latex/contrib/l3backend/l3backend-color.dtx325
-rw-r--r--macros/latex/contrib/l3backend/l3backend-draw.dtx46
-rw-r--r--macros/latex/contrib/l3backend/l3backend-graphics.dtx24
-rw-r--r--macros/latex/contrib/l3backend/l3backend-header.dtx12
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx419
-rw-r--r--macros/latex/contrib/l3backend/l3backend.ins40
-rw-r--r--macros/latex/contrib/l3experimental/CHANGELOG.md16
-rw-r--r--macros/latex/contrib/l3experimental/README.md2
-rw-r--r--macros/latex/contrib/l3experimental/l3benchmark.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3benchmark.pdfbin314321 -> 314255 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3color.dtx246
-rw-r--r--macros/latex/contrib/l3experimental/l3color.pdfbin367377 -> 367535 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-boxes.dtx2
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-code.pdfbin606221 -> 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.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3draw.pdfbin489876 -> 489817 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3galley.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3galley.pdfbin385812 -> 385764 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.pdfbin363180 -> 363123 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf-code.pdfbin276917 -> 276730 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.pdfbin350863 -> 350795 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3str-format.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3str-format.pdfbin344948 -> 344898 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3sys-shell.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/l3sys-shell.pdfbin311773 -> 311734 bytes
-rw-r--r--macros/latex/contrib/l3experimental/xcoffins.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/xcoffins.pdfbin372941 -> 372890 bytes
-rw-r--r--macros/latex/contrib/l3experimental/xgalley.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/xgalley.pdfbin285732 -> 285681 bytes
-rw-r--r--macros/latex/contrib/l3kernel/CHANGELOG.md24
-rw-r--r--macros/latex/contrib/l3kernel/README.md2
-rw-r--r--macros/latex/contrib/l3kernel/expl3.dtx121
-rw-r--r--macros/latex/contrib/l3kernel/expl3.pdfbin585053 -> 585131 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.pdfbin1555681 -> 1556010 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3bootstrap.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3box.dtx14
-rw-r--r--macros/latex/contrib/l3kernel/l3candidates.dtx4
-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.dtx3
-rw-r--r--macros/latex/contrib/l3kernel/l3debug.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3deprecation.dtx18
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.dtx13
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.pdfbin263337 -> 263273 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx13
-rw-r--r--macros/latex/contrib/l3kernel/l3file.dtx139
-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.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-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.dtx20
-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.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3msg.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3names.dtx2
-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.dtx318
-rw-r--r--macros/latex/contrib/l3kernel/l3str.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.pdfbin280064 -> 279972 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.pdfbin228354 -> 228265 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3sys.dtx115
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.pdfbin217736 -> 217636 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-case.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text.dtx4
-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.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3unicode.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/source3.pdfbin5844782 -> 5862842 bytes
-rw-r--r--macros/latex/contrib/l3kernel/source3.tex2
-rw-r--r--macros/latex/contrib/metastr/README.txt2
-rw-r--r--macros/latex/contrib/metastr/metastr.dtx51
-rw-r--r--macros/latex/contrib/metastr/metastr.pdfbin340489 -> 340901 bytes
-rw-r--r--macros/latex/contrib/newverbs/README4
-rw-r--r--macros/latex/contrib/newverbs/newverbs.dtx10
-rw-r--r--macros/latex/contrib/newverbs/newverbs.pdfbin220993 -> 221177 bytes
137 files changed, 1595 insertions, 835 deletions
diff --git a/macros/latex/contrib/caption/README b/macros/latex/contrib/caption/README
index 76c478b98f..ca3df1b169 100644
--- a/macros/latex/contrib/caption/README
+++ b/macros/latex/contrib/caption/README
@@ -1,7 +1,7 @@
==========================================================================
The `caption' package bundle
-Release 2020-08-30
+Release 2020-09-02
Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
License: LPPL = LaTeX Project Public Licence
diff --git a/macros/latex/contrib/caption/caption.dtx b/macros/latex/contrib/caption/caption.dtx
index 0a029f8d38..1068796a87 100644
--- a/macros/latex/contrib/caption/caption.dtx
+++ b/macros/latex/contrib/caption/caption.dtx
@@ -32,7 +32,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{2715}
+% \CheckSum{2690}
%
% \iffalse
%<*driver>
@@ -217,13 +217,13 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2020/08/30 v3.5 Customizing captions (AR)]
+\ProvidesPackage{caption}[2020/09/02 v3.5a Customizing captions (AR)]
% \end{macrocode}
%
% \section{Loading the kernel}
%
% \begin{macrocode}
-\RequirePackage{caption3}[2020/08/23] % needs v2.0 or newer
+\RequirePackage{caption3}[2020/08/30] % needs v2.0 or newer
% \end{macrocode}
%
% \section{Check against unknown document classes}
@@ -355,6 +355,7 @@
% \changes{v3.1}{2007/07/21}{Option `compatibility' added}
% \changes{v3.1}{2007/09/01}{caption v1.x compatibility options revised}
% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v1.x$ compatibility options}
+% \changes{v3.5a}{2020/09/02}{caption v1.x compatibility options fixed}
%
% Currently we support |v1| and |v3| as values for the |compatibility=| option.
% But since this used to be a boolean option is the past we still support any boolean value
@@ -405,20 +406,15 @@
%
% \begin{macrocode}
\DeclareCaptionOptionNoValue*{normal}{%
- \caption@setformat{plain}%
- \caption@setjustification{justified}}
+ \caption@setup{format=plain,justification=justified}}
\DeclareCaptionOptionNoValue*{isu}{%
- \caption@setformat{hang}%
- \caption@setjustification{justified}}
+ \caption@setup{format=hang,justification=justified}}
\DeclareCaptionOptionNoValue*{hang}{%
- \caption@setformat{hang}%
- \caption@setjustification{justified}}
+ \caption@setup{format=hang,justification=justified}}
\DeclareCaptionOptionNoValue*{center}{%
- \caption@setformat{plain}%
- \caption@setjustification{centering}}
+ \caption@setup{format=plain,justification=centering}}
\DeclareCaptionOptionNoValue*{centerlast}{%
- \caption@setformat{plain}%
- \caption@setjustification{centerlast}}
+ \caption@setup{format=plain,justification=centerlast}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -431,19 +427,19 @@
% \end{macrocode}
%
% \begin{macrocode}
-\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape}
-\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape}
-\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape}
-\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape}
-\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries}
-\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries}
-\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily}
-\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily}
-\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily}
+\DeclareCaptionOptionNoValue*{up}{\caption@setup{labelfont+=up}}
+\DeclareCaptionOptionNoValue*{it}{\caption@setup{labelfont+=it}}
+\DeclareCaptionOptionNoValue*{sl}{\caption@setup{labelfont+=sl}}
+\DeclareCaptionOptionNoValue*{sc}{\caption@setup{labelfont+=sc}}
+\DeclareCaptionOptionNoValue*{md}{\caption@setup{labelfont+=md}}
+\DeclareCaptionOptionNoValue*{bf}{\caption@setup{labelfont+=bf}}
+\DeclareCaptionOptionNoValue*{rm}{\caption@setup{labelfont+=rm}}
+\DeclareCaptionOptionNoValue*{sf}{\caption@setup{labelfont+=sf}}
+\DeclareCaptionOptionNoValue*{tt}{\caption@setup{labelfont+=tt}}
% \end{macrocode}
%
% \begin{macrocode}
-\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}}
+\DeclareCaptionOptionNoValue*{nooneline}{\caption@setup{slc=0}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -455,17 +451,16 @@
% \changes{v3.0h}{2005/07/08}{caption2 \version{2.x} compatibility options added}
% \changes{v3.1}{2007/09/01}{caption2 v2.x compatibility options revised}
% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v2.x$ compatibility options}
+% \changes{v3.5a}{2020/09/02}{caption v2.x compatibility options fixed}
%
% \begin{macrocode}
\DeclareCaptionOptionNoValue*{flushleft}{%
- \caption@setformat{plain}%
- \caption@setjustification{raggedright}}
+ \caption@setup{format=plain,justification=raggedright}}
\DeclareCaptionOptionNoValue*{flushright}{%
- \caption@setformat{plain}%
- \caption@setjustification{raggedleft}}
+ \caption@setup{format=plain,justification=raggedleft}}
% \end{macrocode}
% \begin{macrocode}
-\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}}
+\DeclareCaptionOptionNoValue*{oneline}{\caption@setup{slc=1}}
% \end{macrocode}
% \begin{macrocode}
\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{%
diff --git a/macros/latex/contrib/changelog/changelog.pdf b/macros/latex/contrib/changelog/changelog.pdf
index d74e29c378..800b2ac365 100644
--- a/macros/latex/contrib/changelog/changelog.pdf
+++ b/macros/latex/contrib/changelog/changelog.pdf
Binary files differ
diff --git a/macros/latex/contrib/changelog/changelog.sty b/macros/latex/contrib/changelog/changelog.sty
index b217acb048..6c329e9a18 100644
--- a/macros/latex/contrib/changelog/changelog.sty
+++ b/macros/latex/contrib/changelog/changelog.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{changelog}[2020/08/26 2.3.0 Typesetting changelogs]
+\ProvidesPackage{changelog}[2020/08/26 2.4.0 Typesetting changelogs]
% Description: Provides the changelog environment for typesetting changelogs
% License: LPPL 1.3c
% Homepage: https://github.com/9999years/latex-changelog
@@ -83,6 +83,17 @@
\DeclareTranslation{French}{changelog-Miscellaneous}{Divers}
\DeclareTranslation{French}{changelog-Unreleased}{Non publié}
\DeclareTranslation{French}{changelog-Yanked}{Annulé}
+% Japanese translations by cmplstofB <github.com/cmplstofB>
+\DeclareTranslation{Japanese}{changelog}{変更履歴}
+\DeclareTranslation{Japanese}{changelog-Added}{追加}
+\DeclareTranslation{Japanese}{changelog-Changed}{変更}
+\DeclareTranslation{Japanese}{changelog-Deprecated}{非推奨}
+\DeclareTranslation{Japanese}{changelog-Removed}{削除}
+\DeclareTranslation{Japanese}{changelog-Fixed}{修正}
+\DeclareTranslation{Japanese}{changelog-Security}{安全性}
+\DeclareTranslation{Japanese}{changelog-Miscellaneous}{雑題}
+\DeclareTranslation{Japanese}{changelog-Unreleased}{未公開}
+\DeclareTranslation{Japanese}{changelog-Yanked}{緊急変更}
\newif\ifchangelog@versionfirst
\newcommand{\changelog@item}[1]{%
diff --git a/macros/latex/contrib/changelog/changelog.tex b/macros/latex/contrib/changelog/changelog.tex
index 32a699eee6..3e5611dd5d 100644
--- a/macros/latex/contrib/changelog/changelog.tex
+++ b/macros/latex/contrib/changelog/changelog.tex
@@ -37,7 +37,7 @@
\author{Rebecca Turner\thanks{Brandeis University; \email{rbt@sent.as}}}
\title{The \cl\ Package}
-\date{2020/08/26 2.3.0}
+\date{2020/08/26 2.4.0}
\begin{document}
\maketitle
@@ -260,8 +260,8 @@ Prints the ``revoked release'' notice:
\section{Translations}
Want to use \cl\ in a non-English document? Great! \cl\ comes with
-translations for English, German, Spanish, and French, as well as support
-for adding new translations (see section~\ref{s:contrib} below for
+translations for English, German, Spanish, French, and Japanese, as well as
+support for adding new translations (see section~\ref{s:contrib} below for
translation credits). To use built-in translations, simply load \ctan{babel}
with the desired language:
\begin{otherlanguage}{german}
@@ -319,6 +319,7 @@ an email} and I'll incorporate the translation into \cl's next release!
Support for translating the changelog's section title and Spanish
translations.
\item[Damien Calesse <\https{github.com/kranack}>] French translations.
+ \item[cmplstofB <\https{github.com/cmplstofB}>] Japanese translations.
\end{description}
\section{Changelog}
@@ -326,6 +327,12 @@ an email} and I'll incorporate the translation into \cl's next release!
This is this package's actual changelog --- not an example!
\begin{changelog}[author=Rebecca Turner <\email{rbt@sent.as}>, section=false]
+\begin{version}[v=2.4.0, date=2020-09-02,
+ author={cmplstofB <\https{github.com/cmplstofB}>}]
+\added
+ \item Japanese translations.
+\end{version}
+
\begin{version}[v=2.3.0, date=2020-08-26,
author={Damien Calesse <\https{github.com/kranack}>}]
\added
diff --git a/macros/latex/contrib/changelog/example.pdf b/macros/latex/contrib/changelog/example.pdf
index 138b097680..6cb7383b02 100644
--- a/macros/latex/contrib/changelog/example.pdf
+++ b/macros/latex/contrib/changelog/example.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md
index 6d9dbaab14..5937d8be02 100644
--- a/macros/latex/contrib/l3backend/CHANGELOG.md
+++ b/macros/latex/contrib/l3backend/CHANGELOG.md
@@ -6,6 +6,14 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-01]
+
+### Changed
+- Improved support for Separation colors
+- Updated approach to `dvipdfmx`/XeTeX color support
+- Split `pdfmode` driver into pdfTeX- and LuaTeX-specific files
+- Renamed `xdvipdfmx` backend files to `xetex`
+
## [2020-08-07]
### Changed
@@ -102,7 +110,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-08-07...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-01...HEAD
+[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
[2020-06-29]: https://github.com/latex3/latex3/compare/2020-06-23...2020-06-29
[2020-06-23]: https://github.com/latex3/latex3/compare/2020-06-18...2020-06-23
diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md
index a0ebb98003..86d0912e2c 100644
--- a/macros/latex/contrib/l3backend/README.md
+++ b/macros/latex/contrib/l3backend/README.md
@@ -1,7 +1,7 @@
LaTeX3 Backend Drivers
======================
-Release 2020-08-07
+Release 2020-09-01
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 209b2a648f..a90cd6bb05 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -68,29 +68,59 @@
% All the file identifiers are up-front so that they come out in the right
% place in the files.
% \begin{macrocode}
-%<*package>
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2020-08-07}{}
+ {l3backend-dvipdfmx.def}{2020-09-01}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2020-08-07}{}
+ {l3backend-dvips.def}{2020-09-01}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2020-08-07}{}
+ {l3backend-dvisvgm.def}{2020-09-01}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
-%<*pdfmode>
- {l3backend-pdfmode.def}{2020-08-07}{}
- {L3 backend support: PDF mode}
-%</pdfmode>
-%<*xdvipdfmx>
- {l3backend-xdvipdfmx.def}{2020-08-07}{}
- {L3 backend support: xdvipdfmx}
-%</xdvipdfmx>
-%</package>
+%<*luatex>
+ {l3backend-luatex.def}{2020-09-01}{}
+ {L3 backend support: PDF output (LuaTeX)}
+%</luatex>
+%<*pdftex>
+ {l3backend-pdftex.def}{2020-09-01}{}
+ {L3 backend support: PDF output (pdfTeX)}
+%</pdftex>
+%<*xetex>
+ {l3backend-xetex.def}{2020-09-01}{}
+ {L3 backend support: XeTeX}
+%</xetex>
+% \end{macrocode}
+%
+% Check if the loaded kernel is at least enough to load this file.
+% The kernel date has to be at least equal to \cs{ExplBackendFileDate}
+% or later. If \cs{__kernel_dependency_version_check:Nn} doesn't
+% exist we're loading in an older kernel, so it's an error anyway.
+% With time, this test should vanish and only the dependency check
+% should remain.
+% \begin{macrocode}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+%<dvipdfmx> {l3backend-dvipdfmx.def}
+%<dvips> {l3backend-dvips.def}
+%<dvisvgm> {l3backend-dvisvgm.def}
+%<luatex> {l3backend-luatex.def}
+%<pdftex> {l3backend-pdftex.def}
+%<xetex> {l3backend-xetex.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
% \end{macrocode}
%
% The order of the backend code here is such that we get somewhat logical
@@ -98,10 +128,10 @@
% mix all of the code by concept is almost unmanageable.) The key parts which
% are shared are
% \begin{itemize}
-% \item Color support is either \texttt{dvips}-like or \texttt{pdfmode}-like.
-% \item \texttt{pdfmode} and \texttt{(x)dvipdfmx} share drawing routines.
-% \item \texttt{xdvipdfmx} is largely the same as \texttt{dvipdfmx} so
-% takes most of the same code.
+% \item Color support is either \texttt{dvips}-like or \LuaTeX{}/pdfTeX{}-like.
+% \item \LuaTeX{}/pdfTeX{} and \texttt{dvipdfmx}/\XeTeX{} share drawing routines.
+% \item \XeTeX{} is the same as \texttt{dvipdfmx} other than image size
+% extraction so takes most of the same code.
% \end{itemize}
%
% \begin{macro}
@@ -155,15 +185,13 @@
% This is held until the start of shipout such that a document with no
% actual output does not write anything.
% \begin{macrocode}
-\cs_if_exist:NTF \AtBeginDvi
- { \AtBeginDvi }
- { \use:n }
- {
- \bool_lazy_and:nnT
- { \cs_if_exist_p:N \g__kernel_backend_header_bool }
- { \g__kernel_backend_header_bool }
+\bool_if:NT \g__kernel_backend_header_bool
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \AtBeginDvi }
+ { \use:n }
{ \__kernel_backend_literal:n { header = l3backend-dvips.pro } }
- }
+ }
% \end{macrocode}
%
% \begin{macro}
@@ -211,17 +239,16 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backends}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
-% The direct PDF backend covers both \pdfTeX{} and \LuaTeX{}. The latter
-% renames and restructures the backend primitives but this can be handled
-% at one level of abstraction. As such, we avoid using two separate backends
-% for this material at the cost of some \texttt{x}-type definitions to get
-% everything expanded up-front.
+% Both \LuaTeX{} and \pdfTeX{} write PDFs directly rather than via an
+% intermediate file. Although there are similarities, the move of \LuaTeX{}
+% to have more code in Lua means we create two independent files using
+% shared DocStrip code.
%
% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:x}
% This is equivalent to \verb|\special{pdf:}| but the engine can
@@ -230,12 +257,15 @@
% Note that this is still inside the text (\texttt{BT} \dots \texttt{ET}
% block).
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_literal_pdf:n #1
+\cs_new_protected:Npn \__kernel_backend_literal_pdf:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D literal }
- { \tex_pdfliteral:D }
- { \exp_not:N \exp_not:n {#1} }
+%<*luatex>
+ \tex_pdfextension:D literal
+%</luatex>
+%<*pdftex>
+ \tex_pdfliteral:D
+%</pdftex>
+ { \exp_not:n {#1} }
}
\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x }
% \end{macrocode}
@@ -245,13 +275,15 @@
% Page literals are pretty simple. To avoid an expansion, we write out
% by hand.
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_literal_page:n #1
+\cs_new_protected:Npn \__kernel_backend_literal_page:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D literal ~ }
- { \tex_pdfliteral:D }
- page
- { \exp_not:N \exp_not:n {#1} }
+%<*luatex>
+ \tex_pdfextension:D literal ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfliteral:D
+%</pdftex>
+ page { \exp_not:n {#1} }
}
% \end{macrocode}
% \end{macro}
@@ -259,17 +291,23 @@
% \begin{macro}{\__kernel_backend_scope_begin:, \__kernel_backend_scope_end:}
% Higher-level interfaces for saving and restoring the graphic state.
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_scope_begin:
+\cs_new_protected:Npn \__kernel_backend_scope_begin:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D save \scan_stop: }
- { \tex_pdfsave:D }
+%<*luatex>
+ \tex_pdfextension:D save \scan_stop:
+%</luatex>
+%<*pdftex>
+ \tex_pdfsave:D
+%</pdftex>
}
-\cs_new_protected:Npx \__kernel_backend_scope_end:
+\cs_new_protected:Npn \__kernel_backend_scope_end:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D restore \scan_stop: }
- { \tex_pdfrestore:D }
+%<*luatex>
+ \tex_pdfextension:D restore \scan_stop:
+%</luatex>
+%<*pdftex>
+ \tex_pdfrestore:D
+%</pdftex>
}
% \end{macrocode}
% \end{macro}
@@ -279,31 +317,34 @@
% into the PDF. With \pdfTeX{} and \LuaTeX{} in direct PDF output mode there
% is a primitive for this, which only needs the rotation/scaling/skew part.
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_matrix:n #1
+\cs_new_protected:Npn \__kernel_backend_matrix:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D setmatrix }
- { \tex_pdfsetmatrix:D }
- { \exp_not:N \exp_not:n {#1} }
+%<*luatex>
+ \tex_pdfextension:D setmatrix
+%</luatex>
+%<*pdftex>
+ \tex_pdfsetmatrix:D
+%</pdftex>
+ { \exp_not:n {#1} }
}
\cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% The \texttt{dvipdfmx} shares code with the PDF mode one (using the common
-% section to this file) but also with \texttt{xdvipdfmx}. The latter is close
+% section to this file) but also with \XeTeX{}. The latter is close
% to identical to \texttt{dvipdfmx} and so all of the code here is extracted
-% for both backends, with some \texttt{clean up} for \texttt{xdvipdfmx} as
+% for both backends, with some \texttt{clean up} for \XeTeX{} as
% required.
%
% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:x}
@@ -336,7 +377,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx
index c5ef445658..78cf2d9ebb 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -151,10 +151,10 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backends}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_clip:N}
@@ -247,17 +247,17 @@
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_clip:N}
-% The code here is identical to that for \texttt{pdfmode}: unlike rotation and
+% The code here is identical to that for \LuaTeX{}/\pdfTeX{}: unlike rotation and
% scaling, there is no higher-level support in the backend for clipping.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_clip:N #1
@@ -327,7 +327,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx
index 6defac4817..165313c04b 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -60,18 +60,62 @@
%<@@=color>
% \end{macrocode}
%
-% Color support is split into two parts: a \enquote{general} concept and
-% one directly linked to drawings (or rather the split between filling
-% and stroking). General color is relatively easy to handle: we have a color
-% stack available with all modern drivers, and can use that.
-% Whilst \texttt{(x)dvipdfmx} does have its own approach to color specials,
-% it is easier to use \texttt{dvips}-like ones for all cases except direct
-% PDF output.
+% Color support is split into parts: general color, separations, and color for
+% drawings. We have different approaches in each backend, and have some choices
+% to make about \texttt{dvipdfmx}/\XeTeX{} in particular. Whilst it is in some ways
+% convenient to use the same approach in multiple backends, the fact that
+% \texttt{dvipdfmx}/\XeTeX{} is PDF-based means it (largely) sticks closer to
+% direct PDF output.
+%
+% \subsection{\texttt{dvipmdfx}/\XeTeX{}}
+%
+% \begin{macrocode}
+%<*dvipdfmx|xetex>
+% \end{macrocode}
+%
+% These backends have the most possible approaches: it recognises both
+% \texttt{dvips}-based color specials and it's own format, plus one can
+% include PDF statements directly. The latter are not subject to the stack,
+% so are not suitable for general use. Of the two stack methods, the dedicated
+% one has been extended to cover color spaces, so it is used in preference to
+% the \texttt{dvips} one.
+%
+% The \LaTeXe{} backend code uses \texttt{dvips}-based code with
+% \texttt{dvipmdfx}/\XeTeX{}, and so we leave getting color from \LaTeXe{} to
+% a shared code path below.
+%
+% \begin{macro}
+% {
+% \@@_backend_select_cmyk:n ,
+% \@@_backend_select_gray:n ,
+% \@@_backend_select_rgb:n
+% }
+% \begin{macro}{\@@_backend_reset:}
+% \begin{macro}{color.sc, color.fc}
+% Push the data to the stack.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ [#1] }
+ \group_insert_after:N \@@_backend_reset:
+ }
+\cs_new_eq:NN \@@_backend_select_gray:n \@@_backend_select_cmyk:n
+\cs_new_eq:NN \@@_backend_select_rgb:n \@@_backend_select_cmyk:n
+\cs_new_protected:Npn \@@_backend_reset:
+ { \__kernel_backend_literal:n { pdf: ec } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</dvipdfmx|xetex>
+% \end{macrocode}
%
% \subsection{\texttt{dvips}-style}
%
% \begin{macrocode}
-%<*dvisvgm|dvipdfmx|dvips|xdvipdfmx>
+%<*dvisvgm|dvipdfmx|dvips|xetex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_pickup:N}
@@ -106,6 +150,14 @@
% \end{macro}
% \end{macro}
%
+% \begin{macrocode}
+%</dvisvgm|dvipdfmx|dvips|xetex>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvisvgm|dvips>
+% \end{macrocode}
+%
% \begin{macro}
% {
% \@@_backend_select_cmyk:n ,
@@ -140,21 +192,14 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_backend_select_separation:nn}
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
- { \@@_backend_select:n {#1} }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
-%</dvisvgm|dvipdfmx|dvips|xdvipdfmx>
+%</dvisvgm|dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode}}
+% \subsection{\LuaTeX{} and \pdfTeX{}}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_pickup:N}
@@ -225,44 +270,252 @@
{ \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
\cs_new_protected:Npn \@@_backend_select_rgb:n #1
{ \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
-\cs_new_protected:Npx \@@_backend_select:n #1
+\cs_new_protected:Npn \@@_backend_select:n #1
+ {
+%<*luatex>
+ \tex_pdfextension:D colorstack
+%</luatex>
+%<*pdftex>
+ \tex_pdfcolorstack:D
+%</pdftex>
+ \l__kernel_color_stack_int push {#1}
+ \group_insert_after:N \@@_backend_reset:
+ }
+\cs_new_protected:Npn \@@_backend_reset:
+ {
+%<*luatex>
+ \tex_pdfextension:D colorstack
+%</luatex>
+%<*pdftex>
+ \tex_pdfcolorstack:D
+%</pdftex>
+ \l__kernel_color_stack_int pop \scan_stop:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</luatex|pdftex>
+% \end{macrocode}
+%
+% \subsection{Separations}
+%
+% Here, life gets interesting and we need essentially one approach per
+% backend.
+%
+% \begin{macrocode}
+%<*dvips>
+% \end{macrocode}
+%
+% \begin{macro}{\@@_backend_select_separation:nn}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
+ { \@@_backend_select:n { setspotcolor ~ #1 ~ #2 } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_separation_init:nnnnn}
+% \begin{macro}{\@@_backend_separation_init:nnn}
+% \begin{macro}[EXP]{\@@_backend_separation_init:n}
+% \begin{macro}[EXP]{\@@_backend_separation_init:w}
+% \begin{macro}{\@@_backend_separation_init_cielab:nnnnn}
+% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% Initialising here means creating a small header set up plus massaging
+% some data. This comes about as we have to deal with PDF-focussed data,
+% which makes most sense \enquote{higher-up}. The approach is based on
+% ideas from \url{https://tex.stackexchange.com/q/560093}.
+% \begin{macrocode}
+\cs_new_protected:Npx \@@_backend_separation_init:nnnnn #1#2#3#4#5
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D colorstack }
- { \tex_pdfcolorstack:D }
- \exp_not:N \l__kernel_color_stack_int push {#1}
- \group_insert_after:N \exp_not:N \@@_backend_reset:
+ \bool_if:NT \g__kernel_backend_header_bool
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \AtBeginDvi }
+ { \use:n }
+ {
+ \exp_not:N \@@_backend_separation_init:nnn
+ {#1} {#2} {#5}
+ }
+ }
}
-\cs_new_protected:Npx \@@_backend_reset:
+\cs_new_protected:Npn \@@_backend_separation_init:nnn #1#2#3
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D colorstack }
- { \tex_pdfcolorstack:D }
- \exp_not:N \l__kernel_color_stack_int pop \scan_stop:
+ \__kernel_backend_literal:e
+ {
+ !
+ TeXDict ~ begin ~
+ /color \int_use:N \g_@@_separation_int \c_space_tl
+ [#3] ~ aload ~ pop ~ ( \str_convert_pdfname:n {#1} ) ~
+ find \@@_backend_separation_init:n {#2} customcolor ~ def ~
+ end
+ }
+ }
+\cs_new:Npn \@@_backend_separation_init:n #1
+ {
+ \@@_backend_separation_init:w #1 /Device #1 /Device \s_@@_stop
}
+\cs_new:Npn \@@_backend_separation_init:w #1 /Device #2 /Device #3 \s_@@_stop
+ { \str_lowercase:n {#2} }
% \end{macrocode}
+% Currently no CIELAB support.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { }
+\cs_new_protected:Npn \@@_backend_separation_init_cielab:n #1 { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
% \end{macro}
%
+% \begin{macrocode}
+%</dvips>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvisvgm>
+% \end{macrocode}
+%
% \begin{macro}{\@@_backend_select_separation:nn}
+% No support at present.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2 { }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}
+% {\@@_backend_separation_init:nnnnn, \@@_backend_separation_init_cielab:nnnnn}
+% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% No support at present.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5 { }
+\cs_new_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { }
+\cs_new_protected:Npn \@@_backend_separation_init_cielab:n #1 { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</dvisvgm>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvipdfmx|luatex|pdftex|xetex>
+% \end{macrocode}
+%
+% \begin{macro}{\@@_backend_select_separation:nn}
+% Different syntaxes here as the stacks are accessed very differently.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
+%<*dvipdfmx|xetex>
+ { \@@_backend_select:n { @#1 ~ [#2] } }
+%</dvipdfmx|xetex>
+%<*luatex|pdftex>
{ \@@_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
+%</luatex|pdftex>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_separation_init:nnnnn}
+% \begin{macro}{\@@_backend_separation_init:n}
+% \begin{macro}{\@@_backend_separation_init_cielab:nnnnn}
+% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% Initialising the PDF structures needs two parts: creating an object
+% containing the \enquote{real} name of the Separation, then adding a reference
+% to that to each page. The latter uses the internal name of the \texttt{cs}.
+% For \texttt{dvipdfmx}/\XeTeX{}, the backend does most of the work so we need a
+% simplified version.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \@@_backend_separation_init:n
+ {
+ /Separation
+ / \str_convert_pdfname:n {#1} ~ #2 ~
+ <<
+ /FunctionType ~ 2
+ /Domain ~ [0 ~ 1]
+ \tl_if_blank:nF {#3} { /Range ~ [#3] }
+ /C0 ~ [#4] ~
+ /C1 ~ [#5] /N ~ 1
+ >>
+ }
+%<*luatex|pdftex>
+ \use:x
+ {
+ \pdfcoredict_gput:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g_@@_separation_int }
+ { \pdf_object_last: }
+ }
+%</luatex|pdftex>
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \@@_backend_separation_init:n #1
+ {
+%<*dvipdfmx|xetex>
+ \__kernel_backend_literal:x
+ {
+ pdf:obj ~ @ color \int_use:N \g_@@_separation_int \c_space_tl
+ [#1]
+ }
+%</dvipdfmx|xetex>
+%<*luatex|pdftex>
+ \pdf_object_now:nx { array } {#1}
+%</luatex|pdftex>
+ }
+% \end{macrocode}
+% For CIELAB colors, we need one object per document for the illuminant,
+% plus initialisation of the color space referencing that object.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5
+ {
+ \@@_backend_separation_init:nnnnn
+ {#2}
+ { \pdf_object_ref:n { @@_illuminant_cielab_ #1 } }
+ { \c_@@_model_range_lab_tl }
+ { 100 ~ 0 ~ 0 }
+ { #3 ~ #4 ~ #5 }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \@@_backend_separation_init_cielab:n #1
+ {
+ \pdf_object_new:nn { @@_illuminant_cielab_ #1 } { array }
+ \pdf_object_write:nx { @@_illuminant_cielab_ #1 }
+ {
+ /Lab ~
+ <<
+ /WhitePoint ~
+ [ \tl_use:c { c_@@_model_whitepoint_cielab_ #1 _tl } ]
+ /Range ~ [ \c_@@_model_range_lab_tl ]
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_new:nn
+ { \cs_gset_protected:Npn \@@_backend_separation_init_cielab:n #1 { } }
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsection{Fill and stroke color}
%
-% Here, \texttt{(x)dvipdfmx} follows \texttt{pdfmode}, while for \texttt{dvips}
+% Here, \texttt{dvipdfmx}/\XeTeX{} follows \LuaTeX{} and \pdfTeX{},
+% while for \texttt{dvips}
% we have to manage fill and stroke color ourselves. We also handle
% \texttt{dvisvgm} independently, as there we can create SVG directly.
%
% \begin{macrocode}
-%<*dvipdfmx|pdfmode|xdvipdfmx>
+%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \begin{macro}
@@ -274,8 +527,8 @@
% \@@_backend_stroke_gray:n ,
% \@@_backend_stroke_rgb:n
% }
-% Drawing (fill/stroke) color is handled in \texttt{(x)dvipdfmx} in the
-% same way as \texttt{pdfmode}. We use the same approach as earlier, except the
+% Drawing (fill/stroke) color is handled in \texttt{dvipdfmx}/\XeTeX{} in the
+% same way as \LuaTeX{}/\pdfTeX{}. We use the same approach as earlier, except the
% color stack is not involved so the generic direct PDF operation is used.
% There is no worry about the nature of strokes: everything is handled
% automatically.
@@ -309,7 +562,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|pdfmode|xdvipdfmx>
+%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx
index 7f0f4cfb4a..00e9144e4a 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -339,7 +339,7 @@
% In \texttt{dvips}, keeping the transformations in line with the engine
% is unfortunately not possible for scaling and rotations: even if we
% decompose the matrix into those operations, there is still no backend
-% tracking (\emph{cf.}~\texttt{(x)dvipdfmx}). Thus we take the shortest
+% tracking (\emph{cf.}~\texttt{dvipdfmx}/\XeTeX{}). Thus we take the shortest
% path available and simply dump the matrix as given.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
@@ -393,13 +393,13 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} and \texttt{(x)dvipdfmx}}
+% \subsection{\LuaTeX{}, \pdfTeX{}, \texttt{dvipdfmx} and \XeTeX{}}
%
-% Both \texttt{pdfmode} and \texttt{(x)dvipdfmx} directly produce PDF output
+% \LuaTeX{}, \pdfTeX{}, \texttt{dvipdfmx} and \XeTeX{} directly produce PDF output
% and understand a shared set of specials for drawing commands.
%
% \begin{macrocode}
-%<*dvipdfmx|pdfmode|xdvipdfmx>
+%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsubsection{Drawing}
@@ -575,25 +575,25 @@
%
% \begin{macro}{\@@_backend_cm:nnnn}
% \begin{macro}{\@@_backend_cm_aux:nnnn}
-% Another split here between \texttt{pdfmode} and \texttt{(x)dvipdfmx}.
+% Another split here between \LuaTeX{}/pdfTeX{} and \texttt{dvipdfmx}/\XeTeX{}.
% In the former, we have a direct method to maintain alignment: the backend
-% can use a matrix itself. For \texttt{(x)dvipdfmx}, we can to decompose the
+% can use a matrix itself. For \texttt{dvipdfmx}/\XeTeX{}, we can to decompose the
% matrix into rotations and a scaling, then use those operations as they
% are handled by the backend. (There is backend support for matrix operations in
-% \texttt{(x)dvipdfmx}, but as a matched pair so not suitable for the
+% \texttt{dvipdfmx}/\XeTeX{}, but as a matched pair so not suitable for the
% \enquote{stand alone} transformation set up here.)
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
{
-%<*pdfmode>
+%<*luatex|pdftex>
\__kernel_backend_matrix:n { #1 ~ #2 ~ #3 ~ #4 }
-%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
+%</luatex|pdftex>
+%<*dvipdfmx|xetex>
\@@_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4}
\@@_backend_cm_aux:nnnn
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
\cs_new_protected:Npn \@@_backend_cm_aux:nnnn #1#2#3#4
{
\__kernel_backend_literal:x
@@ -617,7 +617,7 @@
{ \fp_eval:n { round ( -#4 , 5 ) } }
}
}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -677,7 +677,7 @@
% way of specifying a transformation matrix exchanges where one would
% normally expect $B$ and $C$ to be.
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
\cs_new_protected:Npn \@@_backend_cm_decompose:nnnnN #1#2#3#4#5
{
\use:x
@@ -720,7 +720,7 @@
{ #5 {#1} {#2} {#3} {#4} }
{ #5 {#1} {#3} {#2} {#4} }
}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -736,24 +736,24 @@
\cs_new_protected:Npn \@@_backend_box_use:Nnnnn #1#2#3#4#5
{
\__kernel_backend_scope_begin:
-%<*pdfmode>
+%<*luatex|pdftex>
\@@_backend_cm:nnnn {#2} {#3} {#4} {#5}
-%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
+%</luatex|pdftex>
+%<*dvipdfmx|xetex>
\__kernel_backend_literal:n
{ pdf:btrans~matrix~ #2 ~ #3 ~ #4 ~ #5 ~ 0 ~ 0 }
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
\hbox_overlap_right:n { \box_use:N #1 }
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
\__kernel_backend_literal:n { pdf:etrans }
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
\__kernel_backend_scope_end:
}
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|pdfmode|xdvipdfmx>
+%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
index ba3b2ed5e9..f4eeebbfcb 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -95,10 +95,10 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backends}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \begin{variable}{\l_@@_graphics_attr_tl}
@@ -223,7 +223,7 @@
% \begin{macro}{\@@_backend_include_eps:n}
% \begin{variable}
% {\l_@@_backend_dir_str, \l_@@_backend_name_str, \l_@@_backend_ext_str}
-% EPS graphics may be included in \texttt{pdfmode} by conversion to
+% EPS graphics may be included in \LuaTeX{}/pdfTeX{} by conversion to
% PDF: this requires restricted shell escape. Modelled on the \pkg{epstopdf}
% \LaTeXe{} package, but simplified, conversion takes place here if we have
% shell access.
@@ -274,13 +274,13 @@
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% \begin{macro}
@@ -326,7 +326,7 @@
% \begin{macro}{\@@_backend_include_auxii:nnn, \@@_backend_include_auxii:xnn}
% \begin{macro}{\@@_backend_include_auxiii:nnn}
% The special syntax depends on the file type. There is a difference in
-% how PDF graphics are best handled between |dvipdfmx| and |xdvipdfmx|: for
+% how PDF graphics are best handled between |dvipdfmx| and \XeTeX{}: for
% the latter it is better to use the primitive route. The relevant code for
% that is included later in this file.
% \begin{macrocode}
@@ -425,13 +425,13 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
-% \subsection{\texttt{xdvipdfmx} backend}
+% \subsection{\XeTeX{} backend}
%
% \begin{macrocode}
-%<*xdvipdfmx>
+%<*xetex>
% \end{macrocode}
%
% \subsubsection{Images}
@@ -448,7 +448,7 @@
% \begin{macro}{\@@_backend_getbb_auxiv:nnNnn, \@@_backend_getbb_auxiv:VnNnn}
% \begin{macro}{\@@_backend_getbb_auxv:nNnn, \@@_backend_getbb_auxv:nNnn}
% \begin{macro}[EXP]{\@@_backend_getbb_pagebox:w}
-% For \texttt{xdvipdfmx}, there are two primitives that allow us to obtain
+% For \XeTeX{}, there are two primitives that allow us to obtain
% the bounding box without needing \texttt{extractbb}. The only complexity
% is passing the various minor variations to a common core process. The
% \XeTeX{} primitive omits the text |box| from the page box specification,
@@ -536,7 +536,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</xdvipdfmx>
+%</xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx
index 24e7ee2cfa..c2d0f87452 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -67,6 +67,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{TeXcolorsetspotcolor, setspotcolor}
+% Support for separation/spot colors: this strange naming is so
+% things work with the color stack.
+% \begin{macrocode}
+TeXDict begin
+/TeXcolorsetspotcolor { setcustomcolor } def
+end
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{pdf.globaldict}
% A small global dictionary for backend use.
% \begin{macrocode}
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
index fb569f2c24..f0f20e1b9a 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -744,10 +744,10 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backend}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \subsubsection{Annotations}
@@ -755,28 +755,35 @@
% \begin{macro}{\@@_backend_annotation:nnnn}
% Simply pass the raw data through, just dealing with evaluation of dimensions.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_annotation:nnnn #1#2#3#4
+\cs_new_protected:Npn \@@_backend_annotation:nnnn #1#2#3#4
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D annot ~ }
- { \tex_pdfannot:D }
- width ~ \exp_not:N \dim_eval:n {#1} ~
- height ~ \exp_not:N \dim_eval:n {#2} ~
- depth ~ \exp_not:N \dim_eval:n {#3} ~
+%<*luatex>
+ \tex_pdfextension:D annot ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfannot:D
+%</pdftex>
+ width ~ \dim_eval:n {#1} ~
+ height ~ \dim_eval:n {#2} ~
+ depth ~ \dim_eval:n {#3} ~
{#4}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_annotation_last:}
-% A tiny amount of extra data gets added here.
+% A tiny amount of extra data gets added here; we use \texttt{x}-type
+% expansion to get the space in the right place and form.
% \begin{macrocode}
\cs_new:Npx \@@_backend_annotation_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastannot ~ }
- { \exp_not:N \tex_pdflastannot:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D lastannot
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdfannot:D
+%</pdftex>
\c_space_tl 0 ~ R
}
% \end{macrocode}
@@ -792,19 +799,25 @@
{ \@@_backend_link_begin:nnnw {#1} { goto~name } {#2} }
\cs_new_protected:Npn \@@_backend_link_begin_user:nnw #1#2
{ \@@_backend_link_begin:nnnw {#1} { user } {#2} }
-\cs_new_protected:Npx \@@_backend_link_begin:nnnw #1#2#3
+\cs_new_protected:Npn \@@_backend_link_begin:nnnw #1#2#3
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D startlink ~ }
- { \tex_pdfstartlink:D }
- attr {#1}
- #2 {#3}
+%<*luatex>
+ \tex_pdfextension:D startlink ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfstartlink:D
+%</pdftex>
+ attr {#1}
+ #2 {#3}
}
-\cs_new_protected:Npx \@@_backend_link_end:
+\cs_new_protected:Npn \@@_backend_link_end:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D endlink \scan_stop: }
- { \tex_pdfendlink:D }
+%<*luatex>
+ \tex_pdfextension:D endlink \scan_stop:
+%</luatex>
+%<*pdftex>
+ \tex_pdfendlink:D
+%</pdftex>
}
% \end{macrocode}
% \end{macro}
@@ -817,9 +830,12 @@
\cs_new:Npx \@@_backend_link_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastlink ~ }
- { \exp_not:N \tex_pdflastlink:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D lastlink
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdflastlink:D
+%</pdftex>
\c_space_tl 0 ~ R
}
% \end{macrocode}
@@ -828,12 +844,15 @@
% \begin{macro}{\@@_backend_link_margin:n}
% A simple task: pass the data to the primitive.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_link_margin:n #1
+\cs_new_protected:Npn \@@_backend_link_margin:n #1
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- { \exp_not:N \tex_pdfvariable:D linkmargin }
- { \exp_not:N \tex_pdflinkmargin:D }
- \exp_not:N \dim_eval:n {#1} \scan_stop:
+%<*luatex>
+ \tex_pdfvariable:D linkmargin
+%</luatex>
+%<*pdftex>
+ \tex_pdflinkmargin:D
+%</pdftex>
+ \dim_eval:n {#1} \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -844,13 +863,16 @@
% percentage, but we need to pass it as \emph{per mille}. The rectangle
% version is also easy as everything is build in.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_destination:nn #1#2
+\cs_new_protected:Npn \@@_backend_destination:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \exp_not:N \tex_pdfextension:D dest ~ }
- { \exp_not:N \tex_pdfdest:D }
+%<*luatex>
+ \tex_pdfextension:D dest ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfdest:D
+%</pdftex>
name {#1}
- \exp_not:N \str_case:nnF {#2}
+ \str_case:nnF {#2}
{
{ xyz } { xyz }
{ fit } { fit }
@@ -860,21 +882,24 @@
{ fith } { fith }
{ fitv } { fitv }
}
- { xyz ~ zoom \exp_not:N \fp_eval:n { #2 * 10 } }
+ { xyz ~ zoom \fp_eval:n { #2 * 10 } }
\scan_stop:
}
-\cs_new_protected:Npx \@@_backend_destination_box:nn #1#2
+\cs_new_protected:Npn \@@_backend_destination_box:nn #1#2
{
\group_begin:
\hbox_set:Nn \l_@@_internal_box {#2}
- \cs_if_exist:NTF \tex_pdfextension:D
- { \exp_not:N \tex_pdfextension:D dest ~ }
- { \exp_not:N \tex_pdfdest:D }
+%<*luatex>
+ \tex_pdfextension:D dest ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfdest:D
+%</pdftex>
name {#1}
fitr ~
- width \exp_not:N \box_wd:N \l_@@_internal_box
- height \exp_not:N \box_ht:N \l_@@_internal_box
- depth \exp_not:N \box_dp:N \l_@@_internal_box
+ width \box_wd:N \l_@@_internal_box
+ height \box_ht:N \l_@@_internal_box
+ depth \box_dp:N \l_@@_internal_box
\box_use:N \l_@@_internal_box
\group_end:
}
@@ -885,19 +910,25 @@
%
% \begin{macro}{\@@_backend_catalog_gput:nn, \@@_backend_info_gput:nn}
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_catalog_gput:nn #1#2
+\cs_new_protected:Npn \@@_backend_catalog_gput:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D catalog }
- { \tex_pdfcatalog:D }
- { / #1 ~ #2 }
+%<*luatex>
+ \tex_pdfextension:D catalog
+%</luatex>
+%<*pdftex>
+ \tex_pdfcatalog:D
+%</pdftex>
+ { / #1 ~ #2 }
}
-\cs_new_protected:Npx \@@_backend_info_gput:nn #1#2
+\cs_new_protected:Npn \@@_backend_info_gput:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D info }
- { \tex_pdfinfo:D }
- { / #1 ~ #2 }
+%<*luatex>
+ \tex_pdfextension:D info
+%</luatex>
+%<*pdftex>
+ \tex_pdfinfo:D
+%</pdftex>
+ { / #1 ~ #2 }
}
% \end{macrocode}
% \end{macro}
@@ -916,26 +947,25 @@
% Declaring objects means reserving at the PDF level plus starting
% tracking.
% \begin{macrocode}
-\group_begin:
- \cs_set_protected:Npn \@@_tmp:w #1#2
- {
- \cs_new_protected:Npx \@@_backend_object_new:nn ##1##2
- {
- #1 reserveobjnum ~
- \int_const:cn
- { c_@@_backend_object_ \exp_not:N \tl_to_str:n {##1} _int }
- {#2}
- \prop_gput:Nnn \exp_not:N \g_@@_backend_object_prop {##1} {##2}
- }
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- {
- \@@_tmp:w
- { \tex_pdfextension:D obj ~ }
- { \exp_not:N \tex_pdffeedback:D lastobj }
- }
- { \@@_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } }
-\group_end:
+\cs_new_protected:Npn \@@_backend_object_new:nn #1#2
+ {
+%<*luatex>
+ \tex_pdfextension:D obj ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfobj:D
+%</pdftex>
+ reserveobjnum ~
+ \int_const:cn
+ { c_@@_backend_object_ \tl_to_str:n {#1} _int }
+%<*luatex>
+ { \tex_pdffeedback:D lastobj }
+%</luatex>
+%<*pdftex>
+ { \tex_pdflastobj:D }
+%</pdftex>
+ \prop_gput:Nnn \exp_not:N \g_@@_backend_object_prop {#1} {#2}
+ }
\cs_new:Npn \@@_backend_object_ref:n #1
{ \int_use:c { c_@@_backend_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
% \end{macrocode}
@@ -947,36 +977,34 @@
% Writing the data needs a little information about the structure of the
% object.
% \begin{macrocode}
-\group_begin:
- \cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new_protected:Npn \@@_backend_object_write:nn ##1##2
+\cs_new_protected:Npn \@@_backend_object_write:nn #1#2
+ {
+%<*luatex>
+ \tex_immediate:D \tex_pdfextension:D obj ~
+%</luatex>
+%<*pdftex>
+ \tex_immediate:D \tex_pdfobj:D
+%</pdftex>
+ useobjnum ~
+ \int_use:c
+ { c_@@_backend_object_ \tl_to_str:n {#1} _int }
+ \str_case_e:nn
+ { \prop_item:Nn \g_@@_backend_object_prop {#1} }
{
- \tex_immediate:D #1 useobjnum ~
- \int_use:c
- { c_@@_backend_object_ \tl_to_str:n {##1} _int }
- \str_case_e:nn
- { \prop_item:Nn \g_@@_backend_object_prop {##1} }
- {
- { array } { { [ ~ \exp_not:n {##2} ~ ] } }
- { dict } { { << ~ \exp_not:n {##2} ~ >> } }
- { fstream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- file ~ { \@@_exp_not_ii:nn ##2 }
- }
- { stream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- { \@@_exp_not_ii:nn ##2 }
- }
- }
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ file ~ { \@@_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ { \@@_exp_not_ii:nn #2 }
+ }
}
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- { \@@_tmp:w { \tex_pdfextension:D obj ~ } }
- { \@@_tmp:w { \tex_pdfobj:D } }
-\group_end:
+ }
\cs_generate_variant:Nn \@@_backend_object_write:nn { nx }
\cs_new:Npn \@@_exp_not_i:nn #1#2 { \exp_not:n {#1} }
\cs_new:Npn \@@_exp_not_ii:nn #1#2 { \exp_not:n {#2} }
@@ -987,34 +1015,31 @@
% \begin{macro}{\@@_backend_object_now:nn, \@@_backend_object_now:nx}
% Much like writing, but direct creation.
% \begin{macrocode}
-\group_begin:
- \cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new_protected:Npn \@@_backend_object_now:nn ##1##2
+\cs_new_protected:Npn \@@_backend_object_now:nn #1#2
+ {
+%<*luatex>
+ \tex_immediate:D \tex_pdfextension:D obj ~
+%</luatex>
+%<*pdftex>
+ \tex_immediate:D \tex_pdfobj:D
+%</pdftex>
+ \str_case:nn
+ {#1}
{
- \tex_immediate:D #1
- \str_case:nn
- {##1}
- {
- { array } { { [ ~ \exp_not:n {##2} ~ ] } }
- { dict } { { << ~ \exp_not:n {##2} ~ >> } }
- { fstream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- file ~ { \@@_exp_not_ii:nn ##2 }
- }
- { stream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- { \@@_exp_not_ii:nn ##2 }
- }
- }
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ file ~ { \@@_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ { \@@_exp_not_ii:nn #2 }
+ }
}
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- { \@@_tmp:w { \tex_pdfextension:D obj ~ } }
- { \@@_tmp:w { \tex_pdfobj:D } }
-\group_end:
+ }
\cs_generate_variant:Nn \@@_backend_object_now:nn { nx }
% \end{macrocode}
% \end{macro}
@@ -1025,23 +1050,29 @@
\cs_new:Npx \@@_backend_object_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastobj ~ }
- { \exp_not:N \tex_pdflastobj:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D lastobj ~
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdflastobj:D
+%</pdftex>
\c_space_tl 0 ~ R
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n}
-% The usual wrapper situation.
+% The usual wrapper situation; the three spaces here are essential.
% \begin{macrocode}
\cs_new:Npx \@@_backend_pageobject_ref:n #1
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D pageref }
- { \exp_not:N \tex_pdfpageref:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D pageref
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdfpageref:D
+%</pdftex>
\c_space_tl #1 \c_space_tl \c_space_tl \c_space_tl 0 ~ R
}
% \end{macrocode}
@@ -1054,13 +1085,16 @@
% \begin{macro}{\@@_backend_objcompresslevel:n}
% Simply pass data to the engine.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_compresslevel:n #1
+\cs_new_protected:Npn \@@_backend_compresslevel:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfcompresslevel:D
- { \tex_pdfcompresslevel:D }
- { \tex_pdfvariable:D compresslevel }
- \exp_not:N \int_value:w \exp_not:N \int_eval:n {#1} \scan_stop:
+ \tex_global:D
+%<*luatex>
+ \tex_pdfvariable:D compresslevel
+%</luatex>
+%<*pdftex>
+ \tex_pdfcompresslevel:D
+%</pdftex>
+ \int_value:w \int_eval:n {#1} \scan_stop:
}
\cs_new_protected:Npn \@@_backend_compress_objects:n #1
{
@@ -1068,13 +1102,16 @@
{ \@@_backend_objcompresslevel:n { 2 } }
{ \@@_backend_objcompresslevel:n { 0 } }
}
-\cs_new_protected:Npx \@@_backend_objcompresslevel:n #1
+\cs_new_protected:Npn \@@_backend_objcompresslevel:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfobjcompresslevel:D
- { \tex_pdfobjcompresslevel:D }
- { \tex_pdfvariable:D objcompresslevel }
- #1 \scan_stop:
+ \tex_global:D
+%<*luatex>
+ \tex_pdfvariable:D objcompresslevel
+%</luatex>
+%<*pdftex>
+ \tex_pdfobjcompresslevel:D
+%</pdftex>
+ #1 \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -1083,61 +1120,65 @@
%
% \begin{macro}
% {\@@_backend_version_major_gset:n, \@@_backend_version_minor_gset:n}
-% At present, we don't have a primitive for the major version in \pdfTeX{},
-% but we anticipate one \ldots
+% The availability of the primitive is not universal, so we have to test
+% at load time.
% \begin{macrocode}
\cs_new_protected:Npx \@@_backend_version_major_gset:n #1
{
- \cs_if_exist:NTF \tex_pdfvariable:D
+%<*luatex>
+ \int_compare:nNnT \tex_luatexversion:D > { 106 }
{
- \int_compare:nNnT \tex_luatexversion:D > { 106 }
- {
- \exp_not:N \tex_global:D \tex_pdfvariable:D majorversion
- \exp_not:N \int_eval:n {#1} \scan_stop:
- }
+ \exp_not:N \tex_global:D \tex_pdfvariable:D majorversion
+ \exp_not:N \int_eval:n {#1} \scan_stop:
}
+%</luatex>
+%<*pdftex>
+ \cs_if_exist:NT \tex_pdfmajorversion:D
{
- \cs_if_exist:NT \tex_pdfmajorversion:D
- {
- \exp_not:N \tex_global:D \tex_pdfmajorversion:D
- \exp_not:N \int_eval:n {#1} \scan_stop:
- }
+ \exp_not:N \tex_global:D \tex_pdfmajorversion:D
+ \exp_not:N \int_eval:n {#1} \scan_stop:
}
+%</pdftex>
}
-\cs_new_protected:Npx \@@_backend_version_minor_gset:n #1
+\cs_new_protected:Npn \@@_backend_version_minor_gset:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfminorversion:D
- { \exp_not:N \tex_pdfminorversion:D }
- { \tex_pdfvariable:D minorversion }
- \exp_not:N \int_eval:n {#1} \scan_stop:
+ \tex_global:D
+%<*luatex>
+ \tex_pdfvariable:D minorversion
+%</luatex>
+%<*pdftex>
+ \tex_pdfminorversion:D
+%</pdftex>
+ \int_eval:n {#1} \scan_stop:
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_version_major:, \@@_backend_version_minor:}
-% At present, we don't have a primitive for the major version!
+% As above.
% \begin{macrocode}
\cs_new:Npx \@@_backend_version_major:
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- {
- \int_compare:nNnTF \tex_luatexversion:D > { 106 }
- { \exp_not:N \tex_the:D \tex_pdfvariable:D majorversion }
- { 1 }
- }
- {
- \cs_if_exist:NTF \tex_pdfmajorversion:D
- { \exp_not:N \tex_the:D \tex_pdfmajorversion:D }
- { 1 }
- }
+%<*luatex>
+ \int_compare:nNnTF \tex_luatexversion:D > { 106 }
+ { \exp_not:N \tex_the:D \tex_pdfvariable:D majorversion }
+ { 1 }
+%</luatex>
+%<*pdftex>
+ \cs_if_exist:NTF \tex_pdfmajorversion:D
+ { \exp_not:N \tex_the:D \tex_pdfmajorversion:D }
+ { 1 }
+%</pdftex>
}
-\cs_new:Npx \@@_backend_version_minor:
+\cs_new:Npn \@@_backend_version_minor:
{
- \exp_not:N \tex_the:D
- \cs_if_exist:NTF \tex_pdfminorversion:D
- { \exp_not:N \tex_pdfminorversion:D }
- { \tex_pdfvariable:D minorversion }
+ \tex_the:D
+%<*luatex>
+ \tex_pdfvariable:D minorversion
+%</luatex>
+%<*pdftex>
+ \tex_pdfminorversion:D
+%</pdftex>
}
% \end{macrocode}
% \end{macro}
@@ -1158,13 +1199,13 @@
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend:n, \@@_backend:x}
@@ -1290,7 +1331,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n}
-% Page references are easy in \texttt{(x)dvipdfmx}.
+% Page references are easy in \texttt{dvipdfmx}/\XeTeX{}.
% \begin{macrocode}
\cs_new:Npn \@@_backend_pageobject_ref:n #1
{ @page #1 }
@@ -1300,7 +1341,7 @@
% \subsubsection{Annotations}
%
% \begin{variable}{\g_@@_landscape_bool}
-% There is a bug in \texttt{(x)dvipdfmx} which means annotations do
+% There is a bug in \texttt{dvipdfmx}/\XeTeX{} which means annotations do
% not rotate. As such, we need to know if landscape is active.
% \begin{macrocode}
\bool_new:N \g_@@_landscape_bool
@@ -1524,7 +1565,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/macros/latex/contrib/l3backend/l3backend.ins b/macros/latex/contrib/l3backend/l3backend.ins
index 1c5289b116..3babb97da1 100644
--- a/macros/latex/contrib/l3backend/l3backend.ins
+++ b/macros/latex/contrib/l3backend/l3backend.ins
@@ -96,26 +96,38 @@ and all files in that bundle must be distributed together.
}
\generate
{
- \file{l3backend-pdfmode.def}
+ \file{l3backend-luatex.def}
{
- \from{l3backend-basics.dtx} {package,pdfmode}
- \from{l3backend-color.dtx} {package,pdfmode}
- \from{l3backend-box.dtx} {package,pdfmode}
- \from{l3backend-draw.dtx} {package,pdfmode}
- \from{l3backend-graphics.dtx}{package,pdfmode}
- \from{l3backend-pdf.dtx} {package,pdfmode}
+ \from{l3backend-basics.dtx} {package,luatex}
+ \from{l3backend-color.dtx} {package,luatex}
+ \from{l3backend-box.dtx} {package,luatex}
+ \from{l3backend-draw.dtx} {package,luatex}
+ \from{l3backend-graphics.dtx}{package,luatex}
+ \from{l3backend-pdf.dtx} {package,luatex}
}
}
\generate
{
- \file{l3backend-xdvipdfmx.def}
+ \file{l3backend-pdftex.def}
{
- \from{l3backend-basics.dtx} {package,xdvipdfmx}
- \from{l3backend-color.dtx} {package,xdvipdfmx}
- \from{l3backend-box.dtx} {package,xdvipdfmx}
- \from{l3backend-draw.dtx} {package,xdvipdfmx}
- \from{l3backend-graphics.dtx}{package,xdvipdfmx}
- \from{l3backend-pdf.dtx} {package,xdvipdfmx}
+ \from{l3backend-basics.dtx} {package,pdftex}
+ \from{l3backend-color.dtx} {package,pdftex}
+ \from{l3backend-box.dtx} {package,pdftex}
+ \from{l3backend-draw.dtx} {package,pdftex}
+ \from{l3backend-graphics.dtx}{package,pdftex}
+ \from{l3backend-pdf.dtx} {package,pdftex}
+ }
+ }
+\generate
+ {
+ \file{l3backend-xetex.def}
+ {
+ \from{l3backend-basics.dtx} {package,xetex}
+ \from{l3backend-color.dtx} {package,xetex}
+ \from{l3backend-box.dtx} {package,xetex}
+ \from{l3backend-draw.dtx} {package,xetex}
+ \from{l3backend-graphics.dtx}{package,xetex}
+ \from{l3backend-pdf.dtx} {package,xetex}
}
}
diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md
index bf4577912b..4a8085effb 100644
--- a/macros/latex/contrib/l3experimental/CHANGELOG.md
+++ b/macros/latex/contrib/l3experimental/CHANGELOG.md
@@ -7,6 +7,19 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-01]
+
+### Added
+- Support for `Gray` color model
+- Support for `hsb` color model
+- Support for `wave` color model
+
+### Changed
+- Better support for color separations
+
+### Fixed
+- Integer range for `HSB` color model
+
## [2020-08-07]
### Changed
@@ -155,7 +168,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-08-07...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-01...HEAD
+[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
[2020-07-17]: https://github.com/latex3/latex3/compare/2020-06-18...2020-07-17
[2020-06-18]: https://github.com/latex3/latex3/compare/2020-06-03...2020-06-18
diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md
index 9831aaadf0..a84954d21f 100644
--- a/macros/latex/contrib/l3experimental/README.md
+++ b/macros/latex/contrib/l3experimental/README.md
@@ -1,7 +1,7 @@
Experimental LaTeX3 Concepts
============================
-Release 2020-08-07
+Release 2020-09-01
Overview
--------
diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx
index 05058bdef6..80079c1c41 100644
--- a/macros/latex/contrib/l3experimental/l3benchmark.dtx
+++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -129,7 +129,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3benchmark}{2020-08-07}{}
+\ProvidesExplPackage{l3benchmark}{2020-09-01}{}
{L3 Experimental benchmarking}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf
index adfca31546..f16030cee7 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 42151e2a41..ec8266d06f 100644
--- a/macros/latex/contrib/l3experimental/l3color.dtx
+++ b/macros/latex/contrib/l3experimental/l3color.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -59,7 +59,7 @@
% or print. Parameter-based models can describe a very large number of unique
% colors, and have a varying number of \emph{axes} which define a color
% space. In contrast, various proprietary models are available which define
-% \emph{spot} colors.
+% \emph{spot} colors (more formally separations).
%
% Core models are used to pass color information to output; these are
% \enquote{native} to \pkg{l3color}. Core models use real numbers in the range
@@ -71,31 +71,38 @@
% the components
% \item \texttt{cmyk} Cyan-magenta-yellow-black color, with four axes, one for
% each of the components
-% \item \texttt{spot} Spot color, with one value, the name of the color
-% (see \url{https://helpx.adobe.com/indesign/using/spot-process-colors.html}
-% for details of the use of spot colors in print)
% \end{itemize}
% There are also interface models: these are convenient for users but have
% to be manipulated before storing/passing to the backend. Interface models
% are primarily integer-based: see below for more detail. The supported
% interface models are
% \begin{itemize}
+% \item \texttt{Gray} Grayscale color, with a single axis running from
+% $0$ (fully black) to $15$ (fully white)
+% \item \texttt{hsb} Hue-saturation-brightness color, with three axes,all
+% real values in the range $[0,1]$ for hue saturation and brightness
% \item \texttt{Hsb} Hue-saturation-brightness color, with three axes, integer
% in the range $[0,360]$ for hue, real values in the range $[0,1]$ for
% saturation and brightness
-% \item \texttt{HSB} Hue-saturation-brightness color, with three axes, integer
-% in the range $[0,360]$ for hue, integer values in the range $[0,255]$ for
-% saturation and brightness
+% \item \texttt{HSB} Hue-saturation-brightness color, with three axes, integers
+% in the range $[0,240]$ for hue, saturation and brightness
% \item \texttt{HTML} HTML format representation of RGB color given as a
% single six-digit hexadecimal number
% \item \texttt{RGB} Red-green-blue color, with three axes, one for each of
% the components, values as integers from $0$ to $255$
+% \item \texttt{wave} Light wavelength, a real number in the range
+% $380$ to $780$ (nanometres)
% \end{itemize}
% All interface models are internally stored as |rgb|.
%
-% Additional models may be created to allow mixing of spot colors
+% To allow parsing of data from \pkg{xcolor}, any leading model up the first
+% \texttt{:} will be discarded; the approach of selecting an internal form
+% for data is \emph{not} used in \pkg{l3color}.
+%
+% Additional models may be created to allow mixing of separation colors
% with each other or with those from other models. See
-% Section~\ref{l3color:sec:new-models} for more detail of spot color support.
+% Section~\ref{l3color:sec:new-models} for more detail of color support
+% for additional models.
%
% When color is selected by model, the \meta{values} given are specified as
% a comma-separated list. The length of the list will therefore be determined
@@ -327,7 +334,7 @@
% \meta{tl}.
% \end{function}
%
-% \begin{function}{\color_export:nnN}
+% \begin{function}{\color_export:nnnN}
% \begin{syntax}
% \cs{color_export:nnnN} \Arg{model} \Arg{value(s)} \Arg{format} \Arg{tl}
% \end{syntax}
@@ -405,7 +412,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3color}{2020-08-07}{}
+\ProvidesExplPackage{l3color}{2020-09-01}{}
{L3 Experimental color support}
% \end{macrocode}
%
@@ -593,14 +600,12 @@
% \begin{macrocode}
\cs_new_protected:Npx \@@_parse:nN #1#2
{
-%<*package>
\exp_not:N \@@_backend_pickup:N \exp_not:N \l_@@_current_tl
\tl_set:Nx \exp_not:c { l_@@_named_ . _tl }
{ \exp_not:N \@@_model:N \exp_not:N \l_@@_current_tl }
\prop_put:NVx \exp_not:c { l_@@_named_ . _prop }
\exp_not:c { l_@@_named_ . _tl }
{ \exp_not:N \@@_values:N \exp_not:N \l_@@_current_tl }
-%</package>
\exp_not:N \exp_args:Ne \exp_not:N \@@_parse_aux:nN
{ \exp_not:N \tl_to_str:n {#1} } #2
}
@@ -822,11 +827,10 @@
% \begin{macro}[EXP]
% {
% \@@_parse_model_gray:w, \@@_parse_model_rgb:w,
-% \@@_parse_model_cmyk:w, \@@_parse_model_spot:w
+% \@@_parse_model_cmyk:w
% }
% \begin{macro}[EXP]{\@@_parse_number:n}
% \begin{macro}[EXP]{\@@_parse_number:w}
-% \begin{macro}[EXP]{\@@_parse_spot_aux:w}
% Turn the input into internal form, also tidying up the number quickly.
% \begin{macrocode}
\cs_new:Npn \@@_parse_model_gray:w #1 , #2 \s_@@_stop
@@ -850,13 +854,6 @@
\@@_parse_number:n {#4}
}
}
-\cs_new:Npn \@@_parse_model_spot:w #1 , #2 \s_@@_stop
- {
- { spot }
- { \@@_parse_spot_aux:w #1 ! 100 ! \s_@@_stop }
- }
-\cs_new:Npn \@@_parse_spot_aux:w #1 ! #2 ! #3 \s_@@_stop
- { #1 ~ \fp_eval:n { #2 / 100 } }
\cs_new:Npn \@@_parse_number:n #1
{ \@@_parse_number:w #1 . 0 . \s_@@_stop }
\cs_new:Npn \@@_parse_number:w #1 . #2 . #3 \s_@@_stop
@@ -865,14 +862,34 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[EXP]
% {
+% \@@_parse_model_Gray:w, \@@_parse_model_hsb:w,
% \@@_parse_model_Hsb:w, \@@_parse_model_HSB:w,
% \@@_parse_model_HTML:w, \@@_parse_model_RGB:w
% }
+% \begin{macro}[EXP]{\@@_parse_model_hsb:nnn, \@@_parse_model_hsb_aux:nnn}
+% \begin{macro}[EXP]{\@@_parse_model_hsb:nnnn}
+% \begin{macro}[EXP]{\@@_parse_model_hsb:nnnnn}
+% \begin{macro}[EXP]
+% {
+% \@@_parse_model_hsb_0:nnnn ,
+% \@@_parse_model_hsb_1:nnnn ,
+% \@@_parse_model_hsb_2:nnnn ,
+% \@@_parse_model_hsb_3:nnnn ,
+% \@@_parse_model_hsb_4:nnnn ,
+% \@@_parse_model_hsb_5:nnnn
+% }
+% \begin{macro}[EXP]{\@@_parse_model_wave:w}
+% \begin{macro}[EXP]
+% {\@@_parse_model_wave_auxi:nn, \@@_parse_model_wave_auxii:nn}
+% \begin{macro}[EXP]{\@@_parse_model_wave_rho:n}
% \begin{macrocode}
+\cs_new:Npn \@@_parse_model_Gray:w #1 , #2 \s_@@_stop
+ { { gray } { \fp_eval:n { #1 / 15 } } }
+\cs_new:Npn \@@_parse_model_hsb:w #1 , #2 , #3 , #4 \s_@@_stop
+ { \@@_parse_model_hsb:nnn {#1} {#2} {#3} }
\cs_new:Npn \@@_parse_model_Hsb:w #1 , #2 , #3 , #4 \s_@@_stop
{
\exp_args:Ne \@@_parse_model_hsb:nnn { \fp_eval:n { #1 / 360 } }
@@ -923,9 +940,9 @@
\cs_new:Npn \@@_parse_model_HSB:w #1 , #2 , #3 , #4 \s_@@_stop
{
\exp_args:Neee \@@_parse_model_hsb:nnn
- { \fp_eval:n {#1 / 360} }
- { \fp_eval:n {#2 / 255} }
- { \fp_eval:n {#3 / 255} }
+ { \fp_eval:n {#1 / 240} }
+ { \fp_eval:n {#2 / 240} }
+ { \fp_eval:n {#3 / 240} }
}
\cs_new:Npn \@@_parse_model_HTML:w #1 , #2 \s_@@_stop
{ \@@_parse_model_HTML_aux:w #1 0 0 0 0 0 0 \s_@@_stop }
@@ -948,6 +965,83 @@
}
}
% \end{macrocode}
+% Following the description in the \pkg{xcolor} manual. As we always use |rgb|,
+% there is no need to find the sixth, we just pas the information straight
+% to the |hsb| auxiliary defined earlier.
+% \begin{macrocode}
+\cs_new:Npn \@@_parse_model_wave:w #1 , #2 \s_@@_stop
+ {
+ { rgb }
+ {
+ \fp_compare:nNnTF {#1} < { 420 }
+ { \@@_parse_model_wave_auxi:nn {#1} { 0.3 + 0.7 * (#1 - 380) / 40 }
+ }
+ {
+ \fp_compare:nNnTF {#1} > { 700 }
+ { \@@_parse_model_wave_auxi:nn {#1} { 0.3 + 0.7 * (#1 - 780) / -80 } }
+ { \@@_parse_model_wave_auxi:nn {#1} { 1 } }
+ }
+ }
+ }
+\cs_new:Npn \@@_parse_model_wave_auxi:nn #1#2
+ {
+ \fp_compare:nNnTF {#1} < { 440 }
+ {
+ \@@_parse_model_wave_auxii:nn
+ { 4 + \@@_parse_model_wave_rho:n { (#1 - 440) / -60 } }
+ {#2}
+ }
+ {
+ \fp_compare:nNnTF {#1} < { 490 }
+ {
+ \@@_parse_model_wave_auxii:nn
+ { 4 - \@@_parse_model_wave_rho:n { (#1 - 440) / 50 } }
+ {#2}
+ }
+ {
+ \fp_compare:nNnTF {#1} < { 510 }
+ {
+ \@@_parse_model_wave_auxii:nn
+ { 2 + \@@_parse_model_wave_rho:n { (#1 - 510) / -20 } }
+ {#2}
+ }
+ {
+ \fp_compare:nNnTF {#1} < { 580 }
+ {
+ \@@_parse_model_wave_auxii:nn
+ { 2 - \@@_parse_model_wave_rho:n { (#1 - 510) / 70 } }
+ {#2}
+ }
+ {
+ \fp_compare:nNnTF {#1} < { 645 }
+ {
+ \@@_parse_model_wave_auxii:nn
+ { \@@_parse_model_wave_rho:n { (#1 - 645) / -65 } }
+ {#2}
+ }
+ { \@@_parse_model_wave_auxii:nn { 0 } {#2} }
+ }
+ }
+ }
+ }
+ }
+\cs_new:Npn \@@_parse_model_wave_auxii:nn #1#2
+ {
+ \exp_args:Neee \@@_parse_model_hsb_aux:nnn
+ { \fp_eval:n {#1} }
+ { 1 }
+ { \@@_parse_model_wave_rho:n {#2} }
+ }
+\cs_new:Npn \@@_parse_model_wave_rho:n #1
+ { \fp_eval:n { min(1, max(0,#1) ) } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \subsection{Selecting colors (and color models)}
@@ -1127,6 +1221,7 @@
% \begin{macro}{\@@_set:nn}
% \begin{macro}{\@@_set:nnw}
% \begin{macro}{\color_set:nnn}
+% \begin{macro}{\@@_set_colon:nnw}
% \begin{macro}{\@@_set_loop:nw}
% \begin{macro}{\color_set_eq:nn}
% Defining named colors means working through the model list and saving
@@ -1189,15 +1284,28 @@
}
}
}
-\cs_new_protected:Npn \color_set:nnn #1#2#3
+\cs_new_protected:Npx \color_set:nnn #1#2#3
{
- \str_if_eq:nnF {#1} { . }
+ \exp_not:N \str_if_eq:nnF {#1} { . }
{
\tl_clear_new:c { l_@@_named_ #1 _tl }
\prop_clear_new:c { l_@@_named_ #1 _prop }
- \@@_set_loop:nw {#1} #2 / / \s_@@_mark #3 / / \s_@@_stop
+ \exp_not:N \@@_set_colon:nnw {#1} {#3}
+ #2 \c_colon_str \c_colon_str \exp_not:N \s_@@_stop
}
}
+\use:x
+ {
+ \cs_new_protected:Npn \exp_not:N \@@_set_colon:nnw
+ ##1##2 ##3 \c_colon_str ##4 \c_colon_str
+ ##5 \exp_not:N \s_@@_stop
+ }
+ {
+ \tl_if_blank:nTF {#4}
+ { \@@_set_loop:nw {#1} #3 }
+ { \@@_set_loop:nw {#1} #4 }
+ / / \s_@@_mark #2 / / \s_@@_stop
+ }
\cs_new_protected:Npn \@@_set_loop:nw
#1#2 / #3 \s_@@_mark #4 / #5 \s_@@_stop
{
@@ -1242,9 +1350,10 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% A small set of colors are always defined.
-% \begin{macrocode}
+% \begin{macrocode}
\color_set:nnn { black } { gray } { 0 }
\color_set:nnn { white } { gray } { 1 }
\color_set:nnn { cyan } { cmyk } { 1 , 0 , 0 , 0 }
@@ -1253,7 +1362,7 @@
\color_set:nnn { red } { rgb } { 1 , 0 , 0 }
\color_set:nnn { green } { rgb } { 0 , 1 , 0 }
\color_set:nnn { blue } { rgb } { 0 , 0 , 1 }
-% \end{macrocode}
+% \end{macrocode}
%
% \begin{variable}{\l_@@_named_._prop, \l_@@_named_._tl}
% A special named color: this is always defined though not fixed in
@@ -1457,9 +1566,6 @@
% \begin{macro}{\@@_model_convert:nnn}
% \begin{macro}{\@@_model_separation_cielab:nnnnnn}
% \begin{macro}{\@@_model_separation_cielab:nnnnnnn}
-% \begin{macro}{\@@_model_separation_init:nnnnn}
-% \begin{macro}{\@@_model_separation_init_cielab:n}
-% \begin{macro}{\@@_model_separation_init_cielab:nnnnn}
% 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
% fold the case of the family name. The key--value list should always be
@@ -1590,7 +1696,7 @@
}
\@@_model_convert:nnn {#1} { cmyk } { rgb }
\@@_model_convert:nnn {#1} { cmyk } { gray }
- \@@_model_separation_init:nnnnn {#2} { /DeviceCMYK } { }
+ \@@_backend_separation_init:nnnnn {#2} { /DeviceCMYK } { }
{ 0 ~ 0 ~ 0 ~ 0 } { #3 ~ #4 ~ #5 ~ #6 }
}
\cs_new_protected:Npn \@@_model_separation_rgb:nnnnnn #1#2#3#4#5#6
@@ -1603,7 +1709,7 @@
}
\@@_model_convert:nnn {#1} { rgb } { cmyk }
\@@_model_convert:nnn {#1} { rgb } { gray }
- \@@_model_separation_init:nnnnn {#2} { /DeviceRGB } { }
+ \@@_backend_separation_init:nnnnn {#2} { /DeviceRGB } { }
{ 0 ~ 0 ~ 0 } { #3 ~ #4 ~ #5 }
}
\cs_new_protected:Npn \@@_model_separation_gray:nnnnnn #1#2#3#4#5#6
@@ -1623,7 +1729,7 @@
\fp_eval:n {##1 * #3} ~
\fp_eval:n {##1 * #3}
}
- \@@_model_separation_init:nnnnn {#2} { /DeviceGray } { } { 0 } {#3}
+ \@@_backend_separation_init:nnnnn {#2} { /DeviceGray } { } { 0 } {#3}
}
% \end{macrocode}
% Generic model conversion \emph{via} an alternative intermediate.
@@ -1665,8 +1771,8 @@
{
\tl_if_exist:cTF { c_@@_model_whitepoint_cielab_ #1 _tl }
{
- \@@_model_separation_init_cielab:n {#1}
- \@@_model_separation_init_cielab:nnnnn {#2} {#3} {#4} {#5} {#6}
+ \@@_backend_separation_init_cielab:n {#1}
+ \@@_backend_separation_init_cielab:nnnnn {#2} {#3} {#4} {#5} {#6}
\cs_new:cpn { @@_convert_ #2 _cmyk:w } ##1 ~ ##2 \s_@@_stop
{ 0 ~ 0 ~ 0 ~ 1 }
\cs_new:cpn { @@_convert_ #2 _rgb:w } ##1 ~ ##2 \s_@@_stop
@@ -1680,66 +1786,6 @@
}
}
% \end{macrocode}
-% Initialising the PDF structures needs two parts: creating an object
-% containing the \enquote{real} name of the Separation, then adding a reference
-% to that to each page. The latter uses the internal name of the \texttt{cs}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_model_separation_init:nnnnn #1#2#3#4#5
- {
- \pdf_object_now:nx { array }
- {
- /Separation
- / \str_convert_pdfname:n {#1} ~ #2 ~
- <<
- /FunctionType ~ 2
- /Domain ~ [0 ~ 1]
- \tl_if_blank:nF {#3} { /Range ~ [#3] }
- /C0 ~ [#4] ~
- /C1 ~ [#5] /N ~ 1
- >>
- }
- \use:x
- {
- \pdfcoredict_gput:nnn
- { Page / Resources / ColorSpace }
- { color \int_use:N \g_@@_separation_int }
- { \pdf_object_last: }
- }
- }
-\cs_if_exist:NF \pdf_object_now:nn
- { \cs_gset_protected:Npn \@@_model_separation_init:nnnnn #1#2#3#4#5 { } }
-% \end{macrocode}
-% For CIELAB colors, we need one object per document for the illuminant,
-% plus initialisation of the color space referencing that object.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_model_separation_init_cielab:n #1
- {
- \pdf_object_new:nn { @@_illuminant_cielab_ #1 } { array }
- \pdf_object_write:nx { @@_illuminant_cielab_ #1 }
- {
- /Lab ~
- <<
- /WhitePoint ~
- [ \tl_use:c { c_@@_model_whitepoint_cielab_ #1 _tl } ]
- /Range ~ [ \c_@@_model_range_lab_tl ]
- >>
- }
- }
-\cs_if_exist:NF \pdf_object_new:nn
- { \cs_gset_protected:Npn \@@_model_separation_init_cielab:n #1 { } }
-\cs_new_protected:Npn \@@_model_separation_init_cielab:nnnnn #1#2#3#4#5
- {
- \@@_model_separation_init:nnnnn
- {#2}
- { \pdf_object_ref:n { @@_illuminant_cielab_ #1 } }
- { \c_@@_model_range_lab_tl }
- { 100 ~ 0 ~ 0 }
- { #3 ~ #4 ~ #5 }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/contrib/l3experimental/l3color.pdf b/macros/latex/contrib/l3experimental/l3color.pdf
index 321bc7cc28..304b1941e3 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 8ab5d0c59c..940dd8c31d 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf
index d66a262ce7..196604bf26 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 ad1238cd2f..50a8fd81c1 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx
index 5da166a75d..cba6efdb76 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx
index 3c2b8395a9..b6d9ba0837 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx
index 7ecb49df28..88d0888884 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx
index e232869980..0ca26af807 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx
index 6701026948..4b3298e0d1 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx
index e9a06f67d0..6329c05fb9 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -70,8 +70,12 @@
% these to fully understand them.
% \item \cs{pgftransformarrow}: Likely to be done when other arrow functions
% are added.
+% \item \cs{pgftransformationadjustments}: Used mainly by CircuiTi\textit{k}Z
+% although also for shapes, likely needs more use cases before addressing.
% \item \cs{pgflowlevelsynccm}, \cs{pgflowlevel}: Likely to be added when
% use cases are encountered in other parts of the code.
+% \item \cs{pgfviewboxscope}: Seems very speicalied, need to understand the
+% requirements here.
% \end{itemize}
%
% \begin{variable}{\l_@@_matrix_active_bool}
diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx
index 11ed7487c1..841eae28c0 100644
--- a/macros/latex/contrib/l3experimental/l3draw.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw.dtx
@@ -110,7 +110,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -1136,7 +1136,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3draw}{2020-08-07}{}
+\ProvidesExplPackage{l3draw}{2020-09-01}{}
{L3 Experimental core drawing support}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf
index 9a2f1341e0..e094bdd4ad 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 8ed82bcce4..73779d70a3 100644
--- a/macros/latex/contrib/l3experimental/l3galley.dtx
+++ b/macros/latex/contrib/l3experimental/l3galley.dtx
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -686,7 +686,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3galley}{2020-08-07}{}
+\ProvidesExplPackage{l3galley}{2020-09-01}{}
{L3 Experimental galley code}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf
index 4dbe5eae6a..0987073e2b 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 fd030ce643..15f963e60d 100644
--- a/macros/latex/contrib/l3experimental/l3graphics.dtx
+++ b/macros/latex/contrib/l3experimental/l3graphics.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -240,7 +240,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3graphics}{2020-08-07}{}
+\ProvidesExplPackage{l3graphics}{2020-09-01}{}
{L3 Experimental graphics inclusion support}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf
index 82fda2baf3..2faf2c17dc 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 5b479c4e2f..7f78070720 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 403410f99d..7be0907d0b 100644
--- a/macros/latex/contrib/l3experimental/l3pdf.dtx
+++ b/macros/latex/contrib/l3experimental/l3pdf.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -190,7 +190,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3pdf}{2020-08-07}{}
+\ProvidesExplPackage{l3pdf}{2020-09-01}{}
{L3 Experimental core PDF support}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/l3pdf.pdf b/macros/latex/contrib/l3experimental/l3pdf.pdf
index 572423103f..c52018c46a 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 e44bde9dff..8264409fb4 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -166,7 +166,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3str-format}{2020-08-07}{}
+\ProvidesExplPackage{l3str-format}{2020-09-01}{}
{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 d3c96701b0..d245bb68bc 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 e368a92582..f3a06c643b 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -135,7 +135,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3sys-shell}{2020-08-07}{}
+\ProvidesExplPackage{l3sys-shell}{2020-09-01}{}
{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 ebb8a0f9c6..98c66b8421 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 7e030c8e3b..d890d28428 100644
--- a/macros/latex/contrib/l3experimental/xcoffins.dtx
+++ b/macros/latex/contrib/l3experimental/xcoffins.dtx
@@ -56,7 +56,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -675,7 +675,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xcoffins}{2020-08-07}{}
+\ProvidesExplPackage{xcoffins}{2020-09-01}{}
{L3 Experimental design level coffins}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf
index 91e71514d8..b13cdfe00c 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 0d9bf34149..77557731ad 100644
--- a/macros/latex/contrib/l3experimental/xgalley.dtx
+++ b/macros/latex/contrib/l3experimental/xgalley.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -734,7 +734,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xgalley}{2020-08-07}{}
+\ProvidesExplPackage{xgalley}{2020-09-01}{}
{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 47f63bdd6d..4935f6eded 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 8a40579449..e388a2f941 100644
--- a/macros/latex/contrib/l3kernel/CHANGELOG.md
+++ b/macros/latex/contrib/l3kernel/CHANGELOG.md
@@ -7,6 +7,23 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-01]
+
+### Added
+- `\hbox_overlap_center:n`
+
+### Changed
+- Backend setting for direct PDF output
+- Backend setting for XeTeX support
+
+### Deprecated
+- Backend setting `pdfmode`
+
+### Fixed
+- `\file_compare_timestamp:nNn(TF)` in LuaTeX (issue #792)
+- Text case changing and expansion where an excluded command is equivalent
+ to `\use:n`
+
## [2020-08-07]
### Changed
@@ -27,6 +44,7 @@ this project uses date-based 'snapshot' version identifiers.
### Fixed
- File lookup with `\input@path`
+- 8-bit encodings in `\str_set_convert:Nnnn`
### Changed
- Implementation of `\file_parse_full_name:nNNN` now uses
@@ -37,6 +55,9 @@ this project uses date-based 'snapshot' version identifiers.
### Removed
- Functions deprecated at end of 2019
+### Deprecated
+- `\str_declare_eight_bit_encoding:nnn`
+
## [2020-06-18]
### Changed
@@ -734,7 +755,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-08-07...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-01...HEAD
+[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
[2020-07-17]: https://github.com/latex3/latex3/compare/2020-06-18...2020-07-17
[2020-06-18]: https://github.com/latex3/latex3/compare/2020-06-03...2020-06-18
diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md
index d239d38035..f63e3bc73a 100644
--- a/macros/latex/contrib/l3kernel/README.md
+++ b/macros/latex/contrib/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2020-08-07
+Release 2020-09-01
Overview
--------
diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx
index 85284e594a..9e38bfb6db 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-08-07}%
+\def\ExplFileDate{2020-09-01}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -924,10 +924,13 @@
% \item[dvips] Use the \texttt{dvips} driver.
% \item[dvipdfmx] Use the \texttt{dvipdfmx} driver.
% \item[dvisvgm] Use the \texttt{dvisvgm} driver.
-% \item[pdfmode] Use the \texttt{pdfmode} driver (direct PDF output from
-% \pdfTeX{} or \LuaTeX{}).
-% \item[xdvipdfmx] Use the \texttt{xdvipdfmx} driver (\XeTeX{} only).
+% \item[luatex] Use the direct PDF output mode of \LuaTeX{}
+% \item[pdftex] Use the direct PDF output mode of \pdfTeX{}
+% \item[xetex] Use the \XeTeX{} version of the \texttt{dvipdfmx} driver.
% \end{itemize}
+% For historical reasons, there is also \texttt{pdfmode} as an equivalent of
+% \texttt{luatex} or \texttt{pdftex}, and \texttt{xdvipdfmx} as
+% an equivalent to \texttt{xetex}, but these are deprecated
%
% \DescribeOption{suppress-backend-headers}
% The \texttt{suppress-backend-headers} option suppresses loading of
@@ -1064,8 +1067,10 @@
% \url{https://github.com/latex3/latex3/issues/781}).
% \begin{macrocode}
%<*2ekernel>
-\global\expandafter\let\csname\detokenize
- {c__kernel_expl_date_tl}\endcsname\ExplFileDate
+\unless\ifcsname\detokenize{c__kernel_expl_date_tl}\endcsname
+ \global\expandafter\let\csname\detokenize
+ {c__kernel_expl_date_tl}\endcsname\ExplFileDate
+\fi
%</2ekernel>
% \end{macrocode}
% \end{macro}
@@ -1243,86 +1248,50 @@
%<@@=expl>
% \end{macrocode}
%
-% Several times users reported this error when loading \pkg{expl3}:
-% \begin{verbatim}
-% ! Undefined control sequence.
-% l.67 \bool
-% _new:N \g__expl_reload_bool
-% \end{verbatim}
-% raised in the reload block below. This happens because the reload
-% check below assumes that if the boolean \cs{g_@@_reload_bool} doesn't
-% exist, this file is being loaded for the first time, and \pkg{expl3}
-% syntax is on. This is a bit of a stretch for assumptions, but it's
-% valid as long as everything's in sync. However the problem reported
-% happened because of a stray format file in the user tree which didn't
-% have the reload code defined here (commit \texttt{1d16336}), so the
-% \cs{g_@@_reload_bool} doesn't exist, but \pkg{expl3} syntax is off,
-% thus the error.
-%
-% At this point, if we have \cs{c__kernel_expl_date_tl} defined, the
-% situation is straightforward: if it matches \cs{ExplLoaderFileDate},
-% then everything's as expected, so no need to worry. If it doesn't,
-% then the current version of \pkg{expl3} differs from the one in the
-% format, so raise a fatal error: the bahaviour is too unpredictable to
-% continue safely. Also, if the error is to be raised, then we're
-% reloading, which means that \pkg{expl3} syntax is off, so we turn it
-% on for the message.
+% At this point, if we have \cs{c__kernel_expl_date_tl} defined, just
+% call the \cs{__kernel_dependency_version_check:Nn} auxiliary to check
+% if it matches \cs{ExplLoaderFileDate}. Here the test is performed
+% only if \cs{c__kernel_expl_date_tl} exists because this file can be
+% loaded in a \LaTeXe{} format without \pkg{expl3} preloaded, where that
+% token list doesn't exist.
+%
+% This is all done in the \texttt{package} \pkg{docstrip} guard because
+% it doesn't apply to \pkg{expl3.ltx}.
% \begin{macrocode}
+%<*package>
\ifcsname\detokenize{c__kernel_expl_date_tl}\endcsname
- \expandafter\ifx\csname\detokenize
- {c__kernel_expl_date_tl}\endcsname\ExplLoaderFileDate
- \else
- \ExplSyntaxOn
- \__kernel_msg_set:nnn { kernel } { mismatched-expl3 }
- {
- Mismatched~expl3~detected!~Loading~expl3~will~abort.
- \\ \\
- The~version~of~expl3~preloaded~in~LaTeX~is~
- \c__kernel_expl_date_tl,~but~the~version~of~expl3~you~are~
- trying~to~load~is~dated~\ExplLoaderFileDate.~This~is~most~
- likely~due~to~a~stray~format~file~in~the~user~tree.~Please~
- make~sure~that~your~LaTeX~format~is~updated.
- }
- \exp_after:wN \ExplSyntaxOff \use:n
- {
- \__kernel_msg_critical:nn { kernel } { mismatched-expl3 }
- \use:c { fi: } \use:c { fi: }
- }
- \fi
+ \expandafter\@firstofone
+\else
% \end{macrocode}
-% If \cs{c__kernel_expl_date_tl} does \emph{not} exist, then we're on
-% uncharted lands (that is, any time prior to the version that
-% introduced this token list :-). Two cases might be here, depending
-% whether \pkg{expl3} is loaded into the kernel or not. If we're loading
-% \pkg{expl3} \enquote{normally} as a package, \pkg{expl3} syntax is on.
-% Otherwise it's already loaded in the kernel and we're reloading
-% \file{expl3.sty} so (\file{expl3-code.tex} doesn't load again and)
-% \pkg{expl3} syntax is off.
+% If \cs{c__kernel_expl_date_tl} does \emph{not} exist we may be loading
+% in a format without \pkg{expl3} preloaded or in the earlier (although
+% still compatible) version in which the error mentioned above showed
+% up. If loading as a package, \file{expl3-code.tex} got read and here
+% the \pkg{expl3} syntax is on. Otherwise it was already loaded in a
+% sligtly older kernel, so we fire the incompatibility error message and
+% abort loading.
% \begin{macrocode}
-\else
\ifodd\csname\detokenize{l__kernel_expl_bool}\endcsname
% \end{macrocode}
-% Package mode; all should be fine, since \file{expl3.sty} and
-% \file{expl3-code.tex} are both loaded in one go, so versions should
-% match (if they don't, it's detected above).
-% Also, we've just tested that \pkg{expl3} syntax is on, so the reload
-% test below will return false and \cs{bool_new:N} will run correctly.
+% In package mode all files are loaded in one go, so versions will
+% match. We just have to set \cs{c__kernel_expl_date_tl} so that
+% further dependencies don't break:
% \begin{macrocode}
+ \global\expandafter\let\csname\detokenize
+ {c__kernel_expl_date_tl}\endcsname\ExplLoaderFileDate
+ \expandafter\expandafter
+ \expandafter\@gobble
\else
% \end{macrocode}
-% In this branch we're reloading, but there are still two cases to
-% consider (sigh\ldots); whether the version preloaded in the format
-% is recent enough to have \cs{g_@@_reload_bool} (2020-06-18 and
-% later) or not. If the boolean is there, we have to do nothing
-% because right ahead we deal with this case.
-% If it is not, we just have to create it:
+% And reloading in an incompatible version is an error:
% \begin{macrocode}
- \ExplSyntaxOn
- \bool_if_exist:NF \g_@@_reload_bool
- { \bool_new:N \g_@@_reload_bool }
- \ExplSyntaxOff
+ \expandafter\expandafter
+ \expandafter\@firstofone
\fi
\fi
+ {\csname\detokenize{__kernel_dependency_version_check:Nn}\endcsname
+ \ExplLoaderFileDate{expl3.sty}}%
+%</package>
% \end{macrocode}
%
% Here we can also detect whether we're reloading. This code goes into
@@ -1403,7 +1372,7 @@
\keys_define:nn { sys }
{
backend .choices:nn =
- { dvipdfmx , dvips , dvisvgm , pdfmode , xdvipdfmx }
+ { dvipdfmx , dvips , dvisvgm , luatex , pdftex , pdfmode , xdvipdfmx , xetex }
{ \sys_load_backend:n {#1} } ,
check-declarations .code:n =
{
diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf
index 34f0d20a6b..dc73326538 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 57ea709c8e..8d8514f9a7 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 268de9b805..7015a2fc69 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-08-07}
+\date{Released 2020-09-01}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index ba422a7961..c6559136c1 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
index cf749116d6..bcb2f71562 100644
--- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx
index 8adeb3fb6d..30ba3c7553 100644
--- a/macros/latex/contrib/l3kernel/l3box.dtx
+++ b/macros/latex/contrib/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -370,6 +370,14 @@
% and then stores the result inside the \meta{box}.
% \end{function}
%
+% \begin{function}[added = 2020-08-25]{\hbox_overlap_center:n}
+% \begin{syntax}
+% \cs{hbox_overlap_center:n} \Arg{contents}
+% \end{syntax}
+% Typesets the \meta{contents} into a horizontal box of zero width
+% such that material protrudes equally to both sides of the insertion point.
+% \end{function}
+%
% \begin{function}[updated = 2017-04-05]{\hbox_overlap_right:n}
% \begin{syntax}
% \cs{hbox_overlap_right:n} \Arg{contents}
@@ -1381,10 +1389,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\hbox_overlap_left:n, \hbox_overlap_right:n}
+% \begin{macro}{\hbox_overlap_center:n, \hbox_overlap_left:n, \hbox_overlap_right:n}
% Put a zero-sized box with the contents pushed against one side (which
% makes it stick out on the other) directly into the input stream.
% \begin{macrocode}
+\cs_new_protected:Npn \hbox_overlap_center:n #1
+ { \hbox_to_zero:n { \tex_hss:D #1 \tex_hss:D } }
\cs_new_protected:Npn \hbox_overlap_left:n #1
{ \hbox_to_zero:n { \tex_hss:D #1 } }
\cs_new_protected:Npn \hbox_overlap_right:n #1
diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx
index 7e2cf8df90..fc5d83dcd5 100644
--- a/macros/latex/contrib/l3kernel/l3candidates.dtx
+++ b/macros/latex/contrib/l3kernel/l3candidates.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -206,7 +206,7 @@
%
% \begin{function}[added = 2019-05-08]{\ior_shell_open:Nn}
% \begin{syntax}
-% \cs{ior_shell_open:nN} \meta{stream} \Arg{shell~command}
+% \cs{ior_shell_open:Nn} \meta{stream} \Arg{shell~command}
% \end{syntax}
% Opens the \emph{pseudo}-file created by the output of the
% \meta{shell command} for reading using \meta{stream} as the
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx
index a8c063b944..2d908820f7 100644
--- a/macros/latex/contrib/l3kernel/l3cctab.dtx
+++ b/macros/latex/contrib/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx
index f32ad49748..e050d06553 100644
--- a/macros/latex/contrib/l3kernel/l3clist.dtx
+++ b/macros/latex/contrib/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx
index f828834daf..b9f73a8f1c 100644
--- a/macros/latex/contrib/l3kernel/l3coffins.dtx
+++ b/macros/latex/contrib/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3color-base.dtx b/macros/latex/contrib/l3kernel/l3color-base.dtx
index 628a4c6f23..10199c298e 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -66,6 +66,7 @@
% \cs{color_group_end:}
% \end{syntax}
% Creates a color group: one used to \enquote{trap} color settings.
+% This grouping is built in to for example \cs{hbox_set:Nn}.
% \end{function}
%
% \begin{function}[added = 2011-09-03]{\color_ensure_current:}
diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx
index 5f8f0b93e9..c7c0f70058 100644
--- a/macros/latex/contrib/l3kernel/l3debug.dtx
+++ b/macros/latex/contrib/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx
index 10dae76668..6eebef3b6b 100644
--- a/macros/latex/contrib/l3kernel/l3deprecation.dtx
+++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -662,6 +662,10 @@
%
% \subsection{Deprecated \pkg{l3str} functions}
%
+% \begin{macrocode}
+%<@@=str>
+% \end{macrocode}
+%
% \begin{macro}[EXP, deprecated = 2022-07-01]
% {
% \str_lower_case:n, \str_lower_case:f,
@@ -684,6 +688,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[EXP, deprecated = 2022-07-01]
+% {\str_declare_eight_bit_encoding:nnn}
+% This command was made internal, with one more argument. There is no
+% easy way to compute a reasonable value for that extra argument so we
+% take a value that is big enough to accomodate all of Unicode.
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { }
+\cs_gset_protected:Npn \str_declare_eight_bit_encoding:nnn #1
+ { \@@_declare_eight_bit_encoding:nnnn {#1} { 1114112 } }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Deprecated \pkg{l3seq} functions}
%
% \begin{macro}[EXP, deprecated = 2023-01-01]
diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx
index 9e7498e265..8721d50f4b 100644
--- a/macros/latex/contrib/l3kernel/l3doc.dtx
+++ b/macros/latex/contrib/l3kernel/l3doc.dtx
@@ -61,7 +61,7 @@ and all files in that bundle must be distributed together.
%</driver|class>
%
%<*driver>
-\ProvidesFile{l3doc.dtx}[2017/03/18 L3 Experimental documentation class]
+\ProvidesFile{l3doc.dtx}[2020/08/21 L3 Experimental documentation class]
\documentclass{l3doc}
\usepackage{framed,lipsum}
\begin{document}
@@ -79,7 +79,7 @@ and all files in that bundle must be distributed together.
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
% \maketitle
% \tableofcontents
%
@@ -3154,7 +3154,10 @@ and all files in that bundle must be distributed together.
\vbox_set:Nn \l_@@_macro_box
{
\vbox_unpack_drop:N \l_@@_macro_box
- \hbox { \llap { \@@_print_macroname:nN {#1} #2 \ } }
+ \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2
+ \MacroFont % <----- without it the \ is in lmr10 if a link is made
+ \
+ } }
}
\int_incr:N \l_@@_macro_int
}
@@ -3716,7 +3719,7 @@ and all files in that bundle must be distributed together.
{ \cs_set:Npn \currentfile{#1.dtx} }
\int_compare:nNnTF \@auxout = \@partaux
{ \@latexerr{\string\include\space cannot~be~nested}\@eha }
- { \@docinclude #1 }
+ { \@docinclude {#1} }
}
% \end{macrocode}
%
@@ -3750,7 +3753,7 @@ and all files in that bundle must be distributed together.
{
\cs_set_eq:NN \ttfamily\relax
\cs_gset:Npx \filekey
- { \filekey, \thepart = { \ttfamily \currentfile } }
+ { \filekey,~ \thepart = { \ttfamily \currentfile } }
}
\DocInput{\currentfile}
\cs_set_eq:NN \PrintIndex \@ltxdoc@PrintIndex
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx
index 24a061d192..e8a835dfb6 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.dtx
+++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf
index c5e42ecbc2..dea9eac6bc 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 d2ef71dac4..df3b71d9a8 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -504,6 +504,7 @@
% {
% \exp_args:NNNo,
% \exp_args:NNNV,
+% \exp_args:NNNv,
% \exp_args:Nccc,
% \exp_args:NcNc,
% \exp_args:NcNo,
@@ -1365,7 +1366,8 @@
%
% \begin{macro}[EXP]
% {
-% \exp_args:NNNV, \exp_args:NcNc, \exp_args:NcNo,
+% \exp_args:NNNV, \exp_args:NNNv,
+% \exp_args:NcNc, \exp_args:NcNo,
% \exp_args:Ncco,
% }
% A few more that we can hand-tune.
@@ -1377,6 +1379,13 @@
\exp_after:wN #3
\exp_after:wN { \exp:w \@@_eval_register:N #4 }
}
+\cs_new:Npn \exp_args:NNNv #1#2#3#4
+ {
+ \exp_after:wN #1
+ \exp_after:wN #2
+ \exp_after:wN #3
+ \exp_after:wN { \exp:w \@@_eval_register:c {#4} }
+ }
\cs_new:Npn \exp_args:NcNc #1#2#3#4
{
\exp_after:wN #1
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx
index 553c5419cb..81e509bcbc 100644
--- a/macros/latex/contrib/l3kernel/l3file.dtx
+++ b/macros/latex/contrib/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -2868,12 +2868,10 @@
% \end{macro}
% \end{macro}
% \begin{variable}{\g_@@_internal_ior}
-% A reserved stream to test for file existence, if required.
+% A reserved stream to test for file existence (if required), and for
+% opening a shell.
% \begin{macrocode}
-\bool_lazy_or:nnF
- { \cs_if_exist_p:N \tex_filesize:D }
- { \sys_if_engine_luatex_p: }
- { \ior_new:N \g_@@_internal_ior }
+\ior_new:N \g_@@_internal_ior
% \end{macrocode}
% \end{variable}
%
@@ -3180,7 +3178,7 @@
}
}
{ \cs_new_eq:NN \@@_timestamp:n \tex_filemoddate:D }
-\cs_if_exist:NF \tex_filemoddate:D
+\cs_if_exist:NF \@@_timestamp:n
{
\prg_set_conditional:Npnn \file_compare_timestamp:nNn #1#2#3
{ p , T , F , TF }
@@ -3471,7 +3469,7 @@
}
% \end{macrocode}
%
-% \subsection{GetIfInfo}
+% \subsection{GetIdInfo}
%
% \begin{macro}{\GetIdInfo}
% \begin{macro}{\@@_id_info_auxi:w, \@@_id_info_auxii:w, \@@_id_info_auxiii:w}
@@ -3545,6 +3543,131 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Checking the version of kernel dependencies}
+%
+% \begin{macro}{\__kernel_dependency_version_check:Nn}
+% \begin{macro}{\__kernel_dependency_version_check:nn}
+% \begin{macro}{\@@_kernel_dependency_compare:nnn,\@@_parse_version:w}
+% This function is responsible for checking if dependencies of the
+% \LaTeX3 kernel match the version preloaded in the \LaTeXe{} kernel.
+% If versions don't match, the function attempts to tell why by
+% searching for a possible stray format file.
+%
+% The function starts by checking that the kernel date is defined, and
+% if not zero is used to force the error route. The kernel date is
+% then compared with the argument requested date (ususally the
+% packaging date of the dependency). If the kernel date is less than
+% the required date, it's an error and the loading should abort.
+% \begin{macrocode}
+\cs_new_protected:Npn \__kernel_dependency_version_check:Nn #1
+ { \exp_args:NV \__kernel_dependency_version_check:nn #1 }
+\cs_new_protected:Npn \__kernel_dependency_version_check:nn #1
+ {
+ \cs_if_exist:NTF \c__kernel_expl_date_tl
+ {
+ \exp_args:NV \@@_kernel_dependency_compare:nnn
+ \c__kernel_expl_date_tl {#1}
+ }
+ { \@@_kernel_dependency_compare:nnn { 0000-00-00 } {#1} }
+ }
+\cs_new_protected:Npn \@@_kernel_dependency_compare:nnn #1 #2 #3
+ {
+ \int_compare:nNnT
+ { \@@_parse_version:w #1 \s_@@_stop } <
+ { \@@_parse_version:w #2 \s_@@_stop }
+ { \@@_mismatched_dependency_error:nn {#2} {#3} }
+ }
+\cs_new:Npn \@@_parse_version:w #1 - #2 - #3 \s_@@_stop {#1#2#3}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_mismatched_dependency_error:nn}
+% If the versions differ, then we try to give the user some guidance.
+% This function starts by taking the engine name \cs{c_sys_engine_str}
+% and replacing |tex| by |latex|, then building a command of the form:
+% \begin{texttt}
+% kpsewhich --all --engine=\meta{engine} \meta{format}[-dev].fmt
+% \end{texttt}
+% to query the format files available. A shell is opened and each
+% line is read into a sequence.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_mismatched_dependency_error:nn #1 #2
+ {
+ \exp_args:NNx \ior_shell_open:Nn \g_@@_internal_ior
+ {
+ kpsewhich ~ --all ~
+ --engine = \c_sys_engine_exec_str
+ \c_space_tl \c_sys_engine_format_str
+ \tl_if_empty:NF \development@branch@name { -dev } .fmt
+ }
+ \seq_clear:N \l_@@_tmp_seq
+ \ior_map_inline:Nn \g_@@_internal_ior
+ { \seq_put_right:Nn \l_@@_tmp_seq {##1} }
+ \ior_close:N \g_@@_internal_ior
+% \end{macrocode}
+% Now define a some shorthands so that we can use \cs{@latex@error}
+% (almost) easily:
+% \begin{macrocode}
+ \group_begin:
+ \cs_set:Npn \\ { \MessageBreak }
+ \cs_set_eq:NN \ \c_space_tl
+ \@latex@error
+ {
+ Mismatched~LaTeX~support~files~detected. \\
+ Loading~'#2'~aborted!
+% \end{macrocode}
+% \cs{c__kernel_expl_date_tl} may not exist, due to an older format,
+% so only print the dates when the sentinel token list exists:
+% \begin{macrocode}
+ \tl_if_exist:NT \c__kernel_expl_date_tl
+ {
+ \\ \\
+ The~L3~programming~layer~in~the~LaTeX~format \\
+ is~dated~\c__kernel_expl_date_tl,~but~in~your~TeX~
+ tree~the~files~require \\ at~least~#1.
+ }
+ \use_none:n
+ }
+ {
+% \end{macrocode}
+% The sequence containing the format files should have exactly one
+% item: the format file currently being run. If that's the case, the
+% cause of the error is not that, so print a generic help with some
+% possible causes. If more than one format file was found, then print
+% the list to the user, with appropriate indications of what's in the
+% system and what's in the user tree.
+% \begin{macrocode}
+ \int_compare:nNnTF { \seq_count:N \l_@@_tmp_seq } > 1
+ {
+ The~cause~seems~to~be~an~old~format~file~in~the~user~tree. \\
+ LaTeX~found~these~files:
+ \seq_map_tokens:Nn \l_@@_tmp_seq { \\~-~\use:n } \\
+ Try~deleting~the~file~in~the~user~tree~then~run~LaTeX~again.
+ }
+ {
+ The~most~likely~causes~are:
+ \\~-~A~recent~format~generation~failed;
+ \\~-~A~stray~format~file~in~the~user~tree~which~needs~
+ to~be~removed~or~rebuilt;
+ \\~-~You~are~running~a~manually~installed~version~of~#2 \\
+ \ \ \ which~is~incompatible~with~the~version~in~LaTeX. \\
+ }
+ \\
+ LaTeX~will~abort~loading~the~incompatible~support~files~
+ but~this~may~lead~to \\ later~errors.~Please~ensure~that~
+ your~LaTeX~format~is~correctly~regenerated.
+ }
+ \group_end:
+% \end{macrocode}
+% And finish by ending the current file.
+% \begin{macrocode}
+ \tex_endinput:D
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Messages}
%
% \begin{macrocode}
diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx
index 9bc6f9de6f..a45167ea89 100644
--- a/macros/latex/contrib/l3kernel/l3flag.dtx
+++ b/macros/latex/contrib/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
index 8f06b76ea4..3476c0349c 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-08-07}
+% \date{Released 2020-09-01}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
index 38fd8b1366..82b4dad329 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
index ae77fc4be2..9cfc1c0bd0 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
index e16a947e6c..252ecb7ce0 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
index fc8789101d..13ee5ed192 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
index f7566ff062..f6e24d3074 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
index d36cbb3003..45712a48b5 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
index e56abc6bb1..5d6f46a238 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx
index 6dd9a63d70..458575e3dc 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx
index 487f48fa7c..21892fcb94 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
index 8f7ef9afdc..8b748ed363 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-08-07}
+% \date{Released 2020-09-01}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
index c5c85d20a3..3fd98aeb8e 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index f1743be720..0f9a1c301a 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx
index 1a2775935b..3dafd98881 100644
--- a/macros/latex/contrib/l3kernel/l3fparray.dtx
+++ b/macros/latex/contrib/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index ac08971cd0..e9e1503644 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx
index 208ec1cfe5..b80aee9039 100644
--- a/macros/latex/contrib/l3kernel/l3intarray.dtx
+++ b/macros/latex/contrib/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
index 793ea28031..b28b06a307 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -101,6 +101,19 @@
% the \meta{follow-on}.
% \end{function}
%
+% \begin{function}{
+% \__kernel_dependency_version_check:Nn,
+% \__kernel_dependency_version_check:nn,
+% }
+% \begin{syntax}
+% \cs{__kernel_dependency_version_check:Nn} \Arg{\cs{date}} \Arg{file}
+% \cs{__kernel_dependency_version_check:nn} \Arg{date} \Arg{file}
+% \end{syntax}
+% Checks if the loaded version of the \pkg{expl3} kernel is at least \meta{date},
+% required by \meta{file}. If the kernel date is older than \meta{date}, the
+% loading of \meta{file} is aborted and an error is raised.
+% \end{function}
+%
% \begin{function}{\__kernel_deprecation_code:nn}
% \begin{syntax}
% \cs{__kernel_deprecation_code:nn} \Arg{error code} \Arg{working code}
@@ -125,6 +138,11 @@
% set by \cs{ExplSyntaxOn}/\cs{ExplSyntaxOff}.
% \end{variable}
%
+% \begin{variable}{\c__kernel_expl_date_tl}
+% A token list containing the release date of the \pkg{l3kernel} preloaded
+% in \LaTeXe{} used to check if dependencies match.
+% \end{variable}
+%
% \begin{function}{\__kernel_file_missing:n}
% \begin{syntax}
% \cs{__kernel_file_missing:n} \Arg{name}
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index 9c5216ceb6..fcbee8893d 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx
index 33d3749515..f3ca1a1af8 100644
--- a/macros/latex/contrib/l3kernel/l3legacy.dtx
+++ b/macros/latex/contrib/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx
index 01686ced0d..deb78363d0 100644
--- a/macros/latex/contrib/l3kernel/l3luatex.dtx
+++ b/macros/latex/contrib/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx
index f95f4ddabd..fa5c81c7da 100644
--- a/macros/latex/contrib/l3kernel/l3msg.dtx
+++ b/macros/latex/contrib/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx
index d070bb2952..9b53598aca 100644
--- a/macros/latex/contrib/l3kernel/l3names.dtx
+++ b/macros/latex/contrib/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf
index f37b45a703..8603809e6e 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 03f8ad6669..4235ff9765 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 1495f21dcd..7967d775a9 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 d18a6f04fb..7113bfe72b 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 717b0aa96b..c0cb2eb4e1 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 fc12886e94..28b76bc9c7 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 858b05d977..add439aefc 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 58479d7dc1..a2f62f8b78 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 3d8c621445..fb2cd9e8c4 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 1ae9972b0e..16ffff9d6b 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 4b5e51d743..26b83ebaea 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 7170e1db61..dced90194c 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 a1f3d50fef..616e208760 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 ed6fc27f00..9ad063187f 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 c993560bf7..2b65561400 100644
--- a/macros/latex/contrib/l3kernel/l3prg.dtx
+++ b/macros/latex/contrib/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index d8923d2177..79f5eaa2dc 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx
index d0adf2a00c..b03af55b49 100644
--- a/macros/latex/contrib/l3kernel/l3quark.dtx
+++ b/macros/latex/contrib/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx
index dcc408e48b..1987116693 100644
--- a/macros/latex/contrib/l3kernel/l3regex.dtx
+++ b/macros/latex/contrib/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx
index b0a1638170..337fd89183 100644
--- a/macros/latex/contrib/l3kernel/l3seq.dtx
+++ b/macros/latex/contrib/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx
index 9987d4f57c..7aad033c33 100644
--- a/macros/latex/contrib/l3kernel/l3skip.dtx
+++ b/macros/latex/contrib/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx
index 808d6214d0..fdfe7dc3ad 100644
--- a/macros/latex/contrib/l3kernel/l3sort.dtx
+++ b/macros/latex/contrib/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx
index 324066cd41..fed3e38c49 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -199,19 +199,6 @@
% basis with non-ASCII codepoints escaped using hashes.
% \end{function}
%
-% \section[Creating 8-bit mappings]{Creating $8$-bit mappings}
-%
-% \begin{function}{\str_declare_eight_bit_encoding:nnn}
-% \begin{syntax}
-% \cs{str_declare_eight_bit_encoding:nnn} \Arg{name} \Arg{mapping} \Arg{missing}
-% \end{syntax}
-% Declares the encoding \meta{name} to map bytes to Unicode
-% characters according to the \meta{mapping}, and map those bytes
-% which are not mentioned in the \meta{mapping} either to the
-% replacement character (if they appear in \meta{missing}), or to
-% themselves.
-% \end{function}
-%
% \section{Possibilities, and things to do}
%
% Encoding/escaping-related tasks.
@@ -261,16 +248,13 @@
% \subsubsection{Variables and constants}
%
% \begin{macro}{\@@_tmp:w}
-% \begin{variable}{\l_@@_internal_int}
% \begin{variable}{\l_@@_internal_tl}
% Internal scratch space for some functions.
% \begin{macrocode}
\cs_new_protected:Npn \@@_tmp:w { }
\tl_new:N \l_@@_internal_tl
-\int_new:N \l_@@_internal_int
% \end{macrocode}
% \end{variable}
-% \end{variable}
% \end{macro}
%
% \begin{variable}{\g_@@_result_tl}
@@ -1093,159 +1077,193 @@
%
% \subsubsection{8-bit encodings}
%
-% This section will be entirely rewritten: it is not yet clear in what
-% situations 8-bit encodings are used, hence I don't know what exactly
-% should be optimized. The current approach is reasonably efficient to
-% convert long strings, and it scales well when using many different
-% encodings. An approach based on csnames would have a smaller constant
-% load time for each individual conversion, but has a large hash table
-% cost. Using a range of \tn{count} registers works for decoding, but
-% not for encoding: one possibility there would be to use a binary tree
-% for the mapping of Unicode characters to bytes, stored as a box, one
-% per encoding.
-%
-% Since the section is going to be rewritten, documentation lacks.
-%
-% All the 8-bit encodings which \pkg{l3str} supports rely on the same
-% internal functions.
-%
-% \begin{macro}{\str_declare_eight_bit_encoding:nnn}
-% All the 8-bit encoding definition file start with
-% \cs{str_declare_eight_bit_encoding:nnn} \Arg{encoding name}
-% \Arg{mapping} \Arg{missing bytes}. The \meta{mapping} argument is a
-% token list of pairs \Arg{byte} \Arg{Unicode} expressed in uppercase
-% hexadecimal notation. The \meta{missing} argument is a token list
-% of \Arg{byte}. Every \meta{byte} which does not appear in the
-% \meta{mapping} nor the \meta{missing} lists maps to the same code
-% point in Unicode.
-% \begin{macrocode}
-\cs_new_protected:Npn \str_declare_eight_bit_encoding:nnn #1#2#3
+% It is not clear in what situations 8-bit encodings are used, hence it
+% is not clear what should be optimized. The current approach is
+% reasonably efficient to convert long strings, and it scales well when
+% using many different encodings.
+%
+% The data needed to support a given 8-bit encoding is stored in a file
+% that consists of a single function call
+% \begin{quote}\ttfamily
+% \cs{@@_declare_eight_bit_encoding:nnnn} \Arg{name} \Arg{modulo}
+% \Arg{mapping} \Arg{missing}
+% \end{quote}
+% This declares the encoding \meta{name} to map bytes to Unicode
+% characters according to the \meta{mapping}, and map those bytes which
+% are not mentioned in the \meta{mapping} either to the replacement
+% character (if they appear in \meta{missing}), or to themselves. The
+% \meta{mapping} argument is a token list of pairs \Arg{byte}
+% \Arg{Unicode} expressed in uppercase hexadecimal notation. The
+% \meta{missing} argument is a token list of \Arg{byte}. Every
+% \meta{byte} which does not appear in the \meta{mapping} nor the
+% \meta{missing} lists maps to itself in Unicode, so for instance the
+% \texttt{latin1} encoding has empty \meta{mapping} and \meta{missing}
+% lists. The \meta{modulo} is a (decimal) integer between $256$ and
+% $558$ inclusive, modulo which all Unicode code points supported by the
+% encodings must be different.
+%
+% We use two integer arrays per encoding. When decoding we only use the
+% \texttt{decode} integer array, with entry $n+1$ (offset needed because
+% integer array indices start at~$1$) equal to the Unicode code point
+% that corresponds to the $n$-th byte in the encoding under
+% consideration, or $-1$ if the given byte is invalid in this encoding.
+% When encoding we use both arrays: upon seeing a code point~$n$, we
+% look up the entry ($1$~plus) $n$ modulo some number $M$ in the
+% \texttt{encode} array, which tells us the byte that might encode the
+% given Unicode code point, then we check in the \texttt{decode} array
+% that indeed this byte encodes the Unicode code point we want. Here,
+% $M$ is an encoding-dependent integer between $256$ and $558$ (it turns
+% out), chosen so that among the Unicode code points that can be validly
+% represented in the given encoding, no pair of code points have the
+% same value modulo~$M$.
+%
+% \begin{macro}
+% {
+% \@@_declare_eight_bit_encoding:nnnn,
+% \@@_declare_eight_bit_aux:NNnnn,
+% \@@_declare_eight_bit_loop:Nnn,
+% \@@_declare_eight_bit_loop:Nn
+% }
+% Loop through both lists of bytes to fill in the \texttt{decode}
+% integer array, then fill the \texttt{encode} array accordingly.
+% For bytes that are invalid in the given encoding, store $-1$ in the
+% \texttt{decode} array.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_declare_eight_bit_encoding:nnnn #1
{
\tl_set:Nn \l_@@_internal_tl {#1}
\cs_new_protected:cpn { @@_convert_decode_#1: }
{ \@@_convert_decode_eight_bit:n {#1} }
\cs_new_protected:cpn { @@_convert_encode_#1: }
{ \@@_convert_encode_eight_bit:n {#1} }
- \tl_const:cn { c_@@_encoding_#1_tl } {#2}
- \tl_const:cn { c_@@_encoding_#1_missing_tl } {#3}
+ \exp_args:Ncc \@@_declare_eight_bit_aux:NNnnn
+ { g_@@_decode_#1_intarray } { g_@@_encode_#1_intarray }
+ }
+\cs_new_protected:Npn \@@_declare_eight_bit_aux:NNnnn #1#2#3#4#5
+ {
+ \intarray_new:Nn #1 { 256 }
+ \int_step_inline:nnn { 0 } { 255 }
+ { \intarray_gset:Nnn #1 { 1 + ##1 } {##1} }
+ \@@_declare_eight_bit_loop:Nnn #1
+ #4 { \s_@@_stop \prg_break: } { }
+ \prg_break_point:
+ \@@_declare_eight_bit_loop:Nn #1
+ #5 { \s_@@_stop \prg_break: }
+ \prg_break_point:
+ \intarray_new:Nn #2 {#3}
+ \int_step_inline:nnn { 0 } { 255 }
+ {
+ \int_compare:nNnF { \intarray_item:Nn #1 { 1 + ##1 } } = { -1 }
+ {
+ \intarray_gset:Nnn #2
+ {
+ 1 +
+ \int_mod:nn { \intarray_item:Nn #1 { 1 + ##1 } }
+ { \intarray_count:N #2 }
+ }
+ {##1}
+ }
+ }
+ }
+\cs_new_protected:Npn \@@_declare_eight_bit_loop:Nnn #1#2#3
+ {
+ \@@_use_none_delimit_by_s_stop:w #2 \s_@@_stop
+ \intarray_gset:Nnn #1 { 1 + "#2 } { "#3 }
+ \@@_declare_eight_bit_loop:Nnn #1
+ }
+\cs_new_protected:Npn \@@_declare_eight_bit_loop:Nn #1#2
+ {
+ \@@_use_none_delimit_by_s_stop:w #2 \s_@@_stop
+ \intarray_gset:Nnn #1 { 1 + "#2 } { -1 }
+ \@@_declare_eight_bit_loop:Nn #1
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_convert_decode_eight_bit:n}
-% \begin{macro}{\@@_decode_eight_bit_load:nn}
-% \begin{macro}{\@@_decode_eight_bit_load_missing:n}
-% \begin{macro}[EXP]{\@@_decode_eight_bit_char:N}
-%^^A todo: document
+% \begin{macro}[rEXP]{\@@_decode_eight_bit_aux:n, \@@_decode_eight_bit_aux:Nn}
+% The map from bytes to Unicode code points is in the \texttt{decode}
+% array corresponding to the given encoding. Define \cs{@@_tmp:w} and
+% pass it successively all bytes in the string. It produces an
+% internal representation with suitable \cs{s_@@} inserted, and the
+% corresponding code point is obtained by looking it up in the integer
+% array. If the entry is $-1$ then issue a replacement character and
+% raise the flag indicating that there was an error.
% \begin{macrocode}
\cs_new_protected:Npn \@@_convert_decode_eight_bit:n #1
{
- \group_begin:
- \int_zero:N \l_@@_internal_int
- \exp_last_unbraced:Nx \@@_decode_eight_bit_load:nn
- { \tl_use:c { c_@@_encoding_#1_tl } }
- { \s_@@_stop \prg_break: } { }
- \prg_break_point:
- \exp_last_unbraced:Nx \@@_decode_eight_bit_load_missing:n
- { \tl_use:c { c_@@_encoding_#1_missing_tl } }
- { \s_@@_stop \prg_break: }
- \prg_break_point:
- \flag_clear:n { str_error }
- \@@_convert_gmap:N \@@_decode_eight_bit_char:N
- \@@_if_flag_error:nnx { str_error } { decode-8-bit } {#1}
- \group_end:
- }
-\cs_new_protected:Npn \@@_decode_eight_bit_load:nn #1#2
- {
- \@@_use_none_delimit_by_s_stop:w #1 \s_@@_stop
- \tex_dimen:D "#1 = \l_@@_internal_int sp \scan_stop:
- \tex_skip:D \l_@@_internal_int = "#1 sp \scan_stop:
- \tex_toks:D \l_@@_internal_int \exp_after:wN { \int_value:w "#2 }
- \int_incr:N \l_@@_internal_int
- \@@_decode_eight_bit_load:nn
+ \cs_set:Npx \@@_tmp:w
+ {
+ \exp_not:N \@@_decode_eight_bit_aux:Nn
+ \exp_not:c { g_@@_decode_#1_intarray }
+ }
+ \flag_clear:n { str_error }
+ \@@_convert_gmap:N \@@_tmp:w
+ \@@_if_flag_error:nnx { str_error } { decode-8-bit } {#1}
}
-\cs_new_protected:Npn \@@_decode_eight_bit_load_missing:n #1
+\cs_new:Npn \@@_decode_eight_bit_aux:Nn #1#2
{
- \@@_use_none_delimit_by_s_stop:w #1 \s_@@_stop
- \tex_dimen:D "#1 = \l_@@_internal_int sp \scan_stop:
- \tex_skip:D \l_@@_internal_int = "#1 sp \scan_stop:
- \tex_toks:D \l_@@_internal_int \exp_after:wN
- { \int_use:N \c_@@_replacement_char_int }
- \int_incr:N \l_@@_internal_int
- \@@_decode_eight_bit_load_missing:n
+ #2 \s_@@
+ \exp_args:Nf \@@_decode_eight_bit_aux:n
+ { \intarray_item:Nn #1 { 1 + `#2 } }
+ \s_@@
}
-\cs_new:Npn \@@_decode_eight_bit_char:N #1
+\cs_new:Npn \@@_decode_eight_bit_aux:n #1
{
- #1 \s_@@
- \if_int_compare:w \tex_dimen:D `#1 < \l_@@_internal_int
- \if_int_compare:w \tex_skip:D \tex_dimen:D `#1 = `#1 \exp_stop_f:
- \tex_the:D \tex_toks:D \tex_dimen:D
- \fi:
+ \if_int_compare:w #1 < \c_zero_int
+ \flag_raise:n { str_error }
+ \int_value:w \c_@@_replacement_char_int
+ \else:
+ #1
\fi:
- \int_value:w `#1 \s_@@
}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\@@_convert_encode_eight_bit:n}
-% \begin{macro}{\@@_encode_eight_bit_load:nn}
-% \begin{macro}[rEXP]{\@@_encode_eight_bit_char:n}
-% \begin{macro}[rEXP]{\@@_encode_eight_bit_char_aux:n}
-%^^A todo: document
-% \begin{macrocode}
+% \begin{macro}[rEXP]{\@@_encode_eight_bit_aux:nnN, \@@_encode_eight_bit_aux:NNn}
+% It is not practical to make an integer array with indices in the
+% full Unicode range, so we work modulo some number, which is simply
+% the size of the \texttt{encode} integer array for the given
+% encoding. This gives us a candidate byte for representing a given
+% Unicode code point. Of course taking the modulo leads to collisions
+% so we check in the \texttt{decode} array that the byte we got is
+% indeed correct. Otherwise the Unicode code point we started from is
+% simply not representable in the given encoding.
+% \begin{macrocode}
+\int_new:N \l_@@_modulo_int
\cs_new_protected:Npn \@@_convert_encode_eight_bit:n #1
{
- \group_begin:
- \int_zero:N \l_@@_internal_int
- \exp_last_unbraced:Nx \@@_encode_eight_bit_load:nn
- { \tl_use:c { c_@@_encoding_#1_tl } }
- { \s_@@_stop \prg_break: } { }
- \prg_break_point:
- \flag_clear:n { str_error }
- \@@_convert_gmap_internal:N \@@_encode_eight_bit_char:n
- \@@_if_flag_error:nnx { str_error } { encode-8-bit } {#1}
- \group_end:
- }
-\cs_new_protected:Npn \@@_encode_eight_bit_load:nn #1#2
- {
- \@@_use_none_delimit_by_s_stop:w #1 \s_@@_stop
- \tex_dimen:D "#2 = \l_@@_internal_int sp \scan_stop:
- \tex_skip:D \l_@@_internal_int = "#2 sp \scan_stop:
- \exp_args:NNf \tex_toks:D \l_@@_internal_int
- { \@@_output_byte:n { "#1 } }
- \int_incr:N \l_@@_internal_int
- \@@_encode_eight_bit_load:nn
+ \cs_set:Npx \@@_tmp:w
+ {
+ \exp_not:N \@@_encode_eight_bit_aux:NNn
+ \exp_not:c { g_@@_encode_#1_intarray }
+ \exp_not:c { g_@@_decode_#1_intarray }
+ }
+ \flag_clear:n { str_error }
+ \@@_convert_gmap_internal:N \@@_tmp:w
+ \@@_if_flag_error:nnx { str_error } { encode-8-bit } {#1}
}
-\cs_new:Npn \@@_encode_eight_bit_char:n #1
+\cs_new:Npn \@@_encode_eight_bit_aux:NNn #1#2#3
{
- \if_int_compare:w #1 > \c_max_register_int
- \flag_raise:n { str_error }
- \else:
- \if_int_compare:w \tex_dimen:D #1 < \l_@@_internal_int
- \if_int_compare:w \tex_skip:D \tex_dimen:D #1 = #1 \exp_stop_f:
- \tex_the:D \tex_toks:D \tex_dimen:D #1 \exp_stop_f:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:nn
- \fi:
- \fi:
- \@@_encode_eight_bit_char_aux:n {#1}
- \fi:
+ \exp_args:Nf \@@_encode_eight_bit_aux:nnN
+ {
+ \intarray_item:Nn #1
+ { 1 + \int_mod:nn {#3} { \intarray_count:N #1 } }
+ }
+ {#3}
+ #2
}
-\cs_new:Npn \@@_encode_eight_bit_char_aux:n #1
+\cs_new:Npn \@@_encode_eight_bit_aux:nnN #1#2#3
{
- \if_int_compare:w #1 > \c_@@_max_byte_int
- \flag_raise:n { str_error }
- \else:
- \@@_output_byte:n {#1}
- \fi:
+ \int_compare:nNnTF { \intarray_item:Nn #3 { 1 + #1 } } = {#2}
+ { \@@_output_byte:n {#1} }
+ { \flag_raise:n { str_error } }
}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \subsection{Messages}
%
@@ -2664,7 +2682,7 @@
% family, we keep track only of differences, and of unassigned bytes.
% \begin{macrocode}
%<*iso88591>
-\str_declare_eight_bit_encoding:nnn { iso88591 }
+\@@_declare_eight_bit_encoding:nnnn { iso88591 } { 256 }
{
}
{
@@ -2674,7 +2692,7 @@
%
% \begin{macrocode}
%<*iso88592>
-\str_declare_eight_bit_encoding:nnn { iso88592 }
+\@@_declare_eight_bit_encoding:nnnn { iso88592 } { 399 }
{
{ A1 } { 0104 }
{ A2 } { 02D8 }
@@ -2741,7 +2759,7 @@
%
% \begin{macrocode}
%<*iso88593>
-\str_declare_eight_bit_encoding:nnn { iso88593 }
+\@@_declare_eight_bit_encoding:nnnn { iso88593 } { 384 }
{
{ A1 } { 0126 }
{ A2 } { 02D8 }
@@ -2786,7 +2804,7 @@
%
% \begin{macrocode}
%<*iso88594>
-\str_declare_eight_bit_encoding:nnn { iso88594 }
+\@@_declare_eight_bit_encoding:nnnn { iso88594 } { 383 }
{
{ A1 } { 0104 }
{ A2 } { 0138 }
@@ -2846,7 +2864,7 @@
%
% \begin{macrocode}
%<*iso88595>
-\str_declare_eight_bit_encoding:nnn { iso88595 }
+\@@_declare_eight_bit_encoding:nnnn { iso88595 } { 374 }
{
{ A1 } { 0401 }
{ A2 } { 0402 }
@@ -2950,7 +2968,7 @@
%
% \begin{macrocode}
%<*iso88596>
-\str_declare_eight_bit_encoding:nnn { iso88596 }
+\@@_declare_eight_bit_encoding:nnnn { iso88596 } { 344 }
{
{ AC } { 060C }
{ BB } { 061B }
@@ -3040,7 +3058,7 @@
%
% \begin{macrocode}
%<*iso88597>
-\str_declare_eight_bit_encoding:nnn { iso88597 }
+\@@_declare_eight_bit_encoding:nnnn { iso88597 } { 498 }
{
{ A1 } { 2018 }
{ A2 } { 2019 }
@@ -3129,7 +3147,7 @@
%
% \begin{macrocode}
%<*iso88598>
-\str_declare_eight_bit_encoding:nnn { iso88598 }
+\@@_declare_eight_bit_encoding:nnnn { iso88598 } { 308 }
{
{ AA } { 00D7 }
{ BA } { 00F7 }
@@ -3206,7 +3224,7 @@
%
% \begin{macrocode}
%<*iso88599>
-\str_declare_eight_bit_encoding:nnn { iso88599 }
+\@@_declare_eight_bit_encoding:nnnn { iso88599 } { 352 }
{
{ D0 } { 011E }
{ DD } { 0130 }
@@ -3222,7 +3240,7 @@
%
% \begin{macrocode}
%<*iso885910>
-\str_declare_eight_bit_encoding:nnn { iso885910 }
+\@@_declare_eight_bit_encoding:nnnn { iso885910 } { 383 }
{
{ A1 } { 0104 }
{ A2 } { 0112 }
@@ -3278,7 +3296,7 @@
%
% \begin{macrocode}
%<*iso885911>
-\str_declare_eight_bit_encoding:nnn { iso885911 }
+\@@_declare_eight_bit_encoding:nnnn { iso885911 } { 369 }
{
{ A1 } { 0E01 }
{ A2 } { 0E02 }
@@ -3379,7 +3397,7 @@
%
% \begin{macrocode}
%<*iso885913>
-\str_declare_eight_bit_encoding:nnn { iso885913 }
+\@@_declare_eight_bit_encoding:nnnn { iso885913 } { 399 }
{
{ A1 } { 201D }
{ A5 } { 201E }
@@ -3445,7 +3463,7 @@
%
% \begin{macrocode}
%<*iso885914>
-\str_declare_eight_bit_encoding:nnn { iso885914 }
+\@@_declare_eight_bit_encoding:nnnn { iso885914 } { 529 }
{
{ A1 } { 1E02 }
{ A2 } { 1E03 }
@@ -3486,7 +3504,7 @@
%
% \begin{macrocode}
%<*iso885915>
-\str_declare_eight_bit_encoding:nnn { iso885915 }
+\@@_declare_eight_bit_encoding:nnnn { iso885915 } { 383 }
{
{ A4 } { 20AC }
{ A6 } { 0160 }
@@ -3504,7 +3522,7 @@
%
% \begin{macrocode}
%<*iso885916>
-\str_declare_eight_bit_encoding:nnn { iso885916 }
+\@@_declare_eight_bit_encoding:nnnn { iso885916 } { 558 }
{
{ A1 } { 0104 }
{ A2 } { 0105 }
diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx
index 466519ac8c..9685c6d40f 100644
--- a/macros/latex/contrib/l3kernel/l3str.dtx
+++ b/macros/latex/contrib/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf
index 271e8e5916..b05698dd65 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 9124a30577..8bed24ebce 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-08-07}
+\date{Released 2020-09-01}
\begin{document}
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
index 1c33b67b33..f4d44d9738 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 4c8fe53915..c5bacf26a2 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-08-07}
+\date{Released 2020-09-01}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx
index 16cdfe6f3d..b7dd54d2e8 100644
--- a/macros/latex/contrib/l3kernel/l3sys.dtx
+++ b/macros/latex/contrib/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -105,6 +105,22 @@
% |luatex|, |pdftex|, |ptex|, |uptex| or |xetex|.
% \end{variable}
%
+% \begin{variable}[added = 2020-08-20]{\c_sys_engine_exec_str}
+% The name of the standard executable for the current \TeX{} engine given
+% as a lower case string: one of |luatex|,
+% |luahbtex|, |pdftex|, |eptex|, |euptex| or |xetex|.
+% \end{variable}
+%
+% \begin{variable}[added = 2020-08-20]{\c_sys_engine_format_str}
+% The name of the preloaded format for the current \TeX{} run given
+% as a lower case string: one of
+% |lualatex| (or |dvilualatex|),
+% |pdflatex| (or |latex|), |platex|, |uplatex| or |xelatex| for \LaTeX{},
+% similar names for plain \TeX{} (except \pdfTeX{} in DVI mode yields
+% |etex|), and |cont-en| for Con\TeX{}t (i.e.~the
+% \tn{fmtname}).
+% \end{variable}
+%
% \section{Output format}
%
% \begin{function}[added = 2015-09-19, EXP, pTF]
@@ -252,7 +268,7 @@
% Execute \meta{tokens} through shell escape at shipout.
% \end{function}
%
-% \subsection{Loading configuration data}
+% \section{Loading configuration data}
%
% \begin{function}[added = 2019-09-12]{\sys_load_backend:n}
% \begin{syntax}
@@ -277,7 +293,7 @@
% back deprecations, respectively.
% \end{function}
%
-% \subsection{Final settins}
+% \subsection{Final settings}
%
% \begin{function}[added = 2019-10-06]{\sys_finalise:}
% \begin{syntax}
@@ -361,6 +377,72 @@
% \end{variable}
% \end{macro}
%
+% \begin{variable}{\c_sys_engine_exec_str,\c_sys_engine_format_str}
+% Take the functions defined above, and set up the engine and format
+% names. \cs{c_sys_engine_exec_str} differs from \cs{c_sys_engine_str}
+% as it is the \emph{actual} engine name, not a \enquote{filtered}
+% version. It differs for |ptex| and |uptex|, which have a leading
+% |e|, and for |luatex|, because \LaTeX{} uses the \Lua HB\TeX{}
+% engine.
+%
+% \cs{c_sys_engine_format_str} is quite similar to
+% \cs{c_sys_engine_str}, except that it differentiates |pdflatex| from
+% |latex| (which is \pdfTeX{} in DVI mode). This differentiation,
+% 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
+ }
+\str_const:Nx \c_sys_engine_format_str
+ {
+ \cs_if_exist:NTF \fmtname
+ {
+ \bool_lazy_or:nnTF
+ { \str_if_eq_p:Vn \fmtname { plain } }
+ { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
+ {
+ \sys_if_engine_pdftex:T
+ { \int_compare:nNnT { \tex_pdfoutput:D } = { 1 } { pdf } }
+ \sys_if_engine_xetex:T { xe }
+ \sys_if_engine_ptex:T { p }
+ \sys_if_engine_uptex:T { up }
+ \sys_if_engine_luatex:T
+ {
+ \int_compare:nNnT { \tex_pdfoutput:D } = { 0 } { dvi }
+ lua
+ }
+ \str_if_eq:VnTF \fmtname { LaTeX2e }
+ { latex }
+ {
+ \bool_lazy_and:nnT
+ { \sys_if_engine_pdftex_p: }
+ { \int_compare_p:nNn { \tex_pdfoutput:D } = { 0 } }
+ { e }
+ tex
+ }
+ }
+ { \fmtname }
+ }
+ { unknown }
+ }
+% \end{macrocode}
+% \end{variable}
+%
% \subsubsection{Randomness}
%
% This candidate function is placed there because
@@ -415,22 +497,35 @@
\str_case:VnF #1
{
{ dvisvgm } { }
- { xdvipdfmx } { }
+ { xdvipdfmx } { \tl_gset:Nn #1 { xetex } }
+ { xetex } { }
}
{
\__kernel_msg_error:nnxx { sys } { wrong-backend }
- #1 { xdvipdfmx }
- \tl_gset:Nn #1 { xdvipdfmx }
+ #1 { xetex }
+ \tl_gset:Nn #1 { xetex }
}
}
{
\sys_if_output_pdf:TF
{
- \str_if_eq:VnF #1 { pdfmode }
+ \str_if_eq:VnTF #1 { pdfmode }
{
- \__kernel_msg_error:nnxx { sys } { wrong-backend }
- #1 { pdfmode }
- \tl_gset:Nn #1 { pdfmode }
+ \sys_if_engine_luatex:TF
+ { \tl_gset:Nn #1 { luatex } }
+ { \tl_gset:Nn #1 { pdftex } }
+ }
+ {
+ \bool_lazy_or:nnF
+ { \str_if_eq_p:Vn #1 { luatex } }
+ { \str_if_eq_p:Vn #1 { pdftex } }
+ {
+ \__kernel_msg_error:nnxx { sys } { wrong-backend }
+ #1 { \sys_if_engine_luatex:TF { luatex } { pdftex } }
+ \sys_if_engine_luatex:TF
+ { \tl_gset:Nn #1 { luatex } }
+ { \tl_gset:Nn #1 { pdftex } }
+ }
}
}
{
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
index 3b214dcca7..0d5e144605 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 3ac84ac64e..6bbadb3300 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-08-07}
+\date{Released 2020-09-01}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index 0f56576b23..23d0b331f0 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -408,7 +408,7 @@
{
\@@_if_recursion_tail_stop_do:Nn #4
{ \use:c { @@_change_case_letterlike_ #1 :nnN } {#1} {#2} #3 }
- \cs_if_eq:NNTF #3 #4
+ \str_if_eq:nnTF {#3} {#4}
{
\@@_use_i_delimit_by_q_recursion_stop:nw
{ \@@_change_case_exclude:nnNn {#1} {#2} #3 }
diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx
index 9978eb3cc0..3dfb06a8a3 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx
index b1246336da..a8774c069b 100644
--- a/macros/latex/contrib/l3kernel/l3text.dtx
+++ b/macros/latex/contrib/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -875,7 +875,7 @@
{
\@@_if_recursion_tail_stop_do:Nn #2
{ \@@_expand_letterlike:N #1 }
- \cs_if_eq:NNTF #2 #1
+ \str_if_eq:nnTF {#1} {#2}
{
\@@_use_i_delimit_by_q_recursion_stop:nw
{ \@@_expand_exclude:Nn #1 }
diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
index 14af0c466e..5636086567 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-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index 5e088e4558..315db1ace0 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index 11f4fc4bcd..544a721886 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx
index 3c55fdfc85..35f71b70ca 100644
--- a/macros/latex/contrib/l3kernel/l3unicode.dtx
+++ b/macros/latex/contrib/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf
index 18b0ab1e9b..9e4fc4fc28 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 4bc27dfc38..6c19a94176 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-08-07}
+\date{Released 2020-09-01}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/metastr/README.txt b/macros/latex/contrib/metastr/README.txt
index f91ab5a62d..fcdaecdd3e 100644
--- a/macros/latex/contrib/metastr/README.txt
+++ b/macros/latex/contrib/metastr/README.txt
@@ -1,4 +1,4 @@
-metastr v1.1.1
+metastr v1.1.2
Copyright 2020 Niklas Beisert
metastr is a LaTeX2e package
diff --git a/macros/latex/contrib/metastr/metastr.dtx b/macros/latex/contrib/metastr/metastr.dtx
index 6f70de93a5..4a68d29a96 100644
--- a/macros/latex/contrib/metastr/metastr.dtx
+++ b/macros/latex/contrib/metastr/metastr.dtx
@@ -18,10 +18,10 @@
% and the derived files metastr.sty and metasamp.tex.
%
%<package|sample>\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-%<package>\ProvidesPackage{metastr}[2020/08/27 v1.1.1 Metadata Strings Storage]
-%<sample>\ProvidesFile{metasamp.tex}[2020/08/27 v1.1.1 sample for metastr]
+%<package>\ProvidesPackage{metastr}[2020/09/02 v1.1.2 Metadata Strings Storage]
+%<sample>\ProvidesFile{metasamp.tex}[2020/09/02 v1.1.2 sample for metastr]
%<*driver>
-\def\thedate#1{2020/08/27}\def\theversion#1{v1.1.1}
+\def\thedate#1{2020/09/02}\def\theversion#1{v1.1.2}
\ProvidesFile{metastr.dtx}[\thedate{} \theversion{} metastr reference manual file]
\PassOptionsToClass{10pt,a4paper}{article}
\documentclass{ltxdoc}
@@ -1398,6 +1398,26 @@ Make use of the \textsf{babel} package for translations of basic terms.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Revision History}
+\iffalse
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{vXXX+:} YYYY/MM/DD+
+
+\begin{itemize}
+\item
+\ldots
+\end{itemize}
+
+\fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{v1.1.2:} 2020/09/02
+
+\begin{itemize}
+\item
+improve hook processing to set |pdflang| at the right moment
+\end{itemize}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\paragraph{v1.1.1:} 2020/08/27
@@ -2099,27 +2119,38 @@ some representations of the selected license:
% \end{macrocode}
% \macro{\mstr@begindoc}
+% \macro{\mstr@begindocpreamble}
% Hook for writing data to PDF file;
-% this is the last chance to write the preamble set of data to the PDF:
+% this is the last chance to write the preamble set of data to the PDF
+% (|pdflang| must be declared before \textsf{hyperxmp}
+% detects languages at the end of the preamble
+% and before \textsf{hyperref} sets it at the beginning of the document):
% \begin{macrocode}
\newcommand{\mstr@begindoc}{%
- \mstr@ifwritepdf[preamble]{\metawritepdfpreamble}%
- \mstr@ifwritepdf[auto]{\metawritepdf}%
-}
+ \mstr@ifwritepdf[auto]{\metawritepdf}}
+\newcommand{\mstr@begindocpreamble}{%
+ \mstr@ifwritepdf[preamble]{\metawritepdfpreamble}}
% \end{macrocode}
% Hook |\mstr@begindoc| to begining of |document| block
-% before hooks by \textsf{hyperref} are called;
+% (before hooks by \textsf{hyperref} and \textsf{hyperxmp} are called,
+% just in case);
+% hook |\mstr@begindocpreamble| to begining of |document| block
+% before hooks by \textsf{hyperxmp} are called;
% legacy code for latex releases earlier than 2020-10
% to add hook before all other hooks are called:
% \begin{macrocode}
\ifdefined\AddToHook
\DeclareHookRule{begindocument}{metastr}{before}{hyperref}
+\DeclareHookRule{begindocument}{metastr}{before}{hyperxmp}
\AddToHook{begindocument}{\mstr@begindoc}
+\DeclareHookRule{begindocument/before}{metastr}{before}{hyperxmp}
+\AddToHook{begindocument/before}{\mstr@begindocpreamble}
\else
+\AtBeginDocument{\mstr@begindoc}
\begingroup
-\toks@\expandafter{\expandafter\mstr@begindoc\@begindocumenthook}%
-\xdef\@begindocumenthook{\the\toks@}%
+\toks@\expandafter{\expandafter\mstr@begindocpreamble\@begindocumenthook}
+\xdef\@begindocumenthook{\the\toks@}
\endgroup
\fi
% \end{macrocode}
diff --git a/macros/latex/contrib/metastr/metastr.pdf b/macros/latex/contrib/metastr/metastr.pdf
index fa578dc143..5301e90930 100644
--- a/macros/latex/contrib/metastr/metastr.pdf
+++ b/macros/latex/contrib/metastr/metastr.pdf
Binary files differ
diff --git a/macros/latex/contrib/newverbs/README b/macros/latex/contrib/newverbs/README
index 3012c3c67d..09968f8584 100644
--- a/macros/latex/contrib/newverbs/README
+++ b/macros/latex/contrib/newverbs/README
@@ -1,7 +1,7 @@
The 'newverbs' LaTeX package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2010-2019 by Martin Scharrer <martin@scharrer-online.de>
-Code repository: https://bitbucket.org/martin_scharrer/newverbs
+Copyright (c) 2010-2020 by Martin Scharrer <martin@scharrer-online.de>
+Code repository: https://sourceforge.net/projects/newfloat/
This package allows the definition of \verb variants which add TeX code before
and after the verbatim text (e.g. quotes or \fbox{}). When used together with
diff --git a/macros/latex/contrib/newverbs/newverbs.dtx b/macros/latex/contrib/newverbs/newverbs.dtx
index f2a79d35fd..efc74a3981 100644
--- a/macros/latex/contrib/newverbs/newverbs.dtx
+++ b/macros/latex/contrib/newverbs/newverbs.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%<=*COPYRIGHT>
-%% Copyright (C) 2012-2019 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2012-2020 by Martin Scharrer <martin@scharrer-online.de>
%% --------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -23,10 +23,10 @@
%<*driver>
\ProvidesFile{newverbs.dtx}[%
%<=*DATE>
- 2019/09/09
+ 2010/09/02
%<=/DATE>
%<=*VERSION>
- v1.4
+ v1.5
%<=/VERSION>
newverbs DTX file]
\documentclass{ydoc}
@@ -44,7 +44,7 @@
%</driver>
% \fi
%
-% \CheckSum{458}
+% \CheckSum{465}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -69,6 +69,7 @@
% \changes{v1.2a}{2011/03/19}{Removed spurious spaces.}
% \changes{v1.3}{2011/07/24}{Added macros to collect verbatim arguments.}
% \changes{v1.4}{2019/09/09}{Added several suggested changes.}
+% \changes{v1.5}{2020/09/02}{Added support for mathmode.}
%
% \DoNotIndex{\newcommand,\newenvironment,\providecommand}
%
@@ -294,6 +295,7 @@
\let\newverbs@end\@empty
\def\new@@verbcommand#1#2[#3]#4#5{%
#1*#2{%
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
\bgroup
\newverbcommand@settings
\ifx\newverbs@end\@empty
diff --git a/macros/latex/contrib/newverbs/newverbs.pdf b/macros/latex/contrib/newverbs/newverbs.pdf
index 017a5c7ef6..6d914fab80 100644
--- a/macros/latex/contrib/newverbs/newverbs.pdf
+++ b/macros/latex/contrib/newverbs/newverbs.pdf
Binary files differ