summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3experimental
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-08 03:01:09 +0000
committerNorbert Preining <norbert@preining.info>2020-08-08 03:01:09 +0000
commit1c9455caf30309c8b8ba69afdc5a16a83d9f9a58 (patch)
tree0bc3971e599005a7420c53782539e789de57b40d /macros/latex/contrib/l3experimental
parent3710c23789342d9d88783cbe9ad23eb5263a7c33 (diff)
CTAN sync 202008080301
Diffstat (limited to 'macros/latex/contrib/l3experimental')
-rw-r--r--macros/latex/contrib/l3experimental/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/l3experimental/README.md2
-rw-r--r--macros/latex/contrib/l3experimental/l3benchmark.dtx10
-rw-r--r--macros/latex/contrib/l3experimental/l3benchmark.pdfbin314158 -> 314321 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3color.dtx565
-rw-r--r--macros/latex/contrib/l3experimental/l3color.pdfbin356022 -> 367377 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-boxes.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-code.pdfbin625002 -> 606221 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-layers.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-paths.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-points.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-scopes.dtx8
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-softpath.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-state.dtx36
-rw-r--r--macros/latex/contrib/l3experimental/l3draw-transforms.dtx6
-rw-r--r--macros/latex/contrib/l3experimental/l3draw.dtx29
-rw-r--r--macros/latex/contrib/l3experimental/l3draw.pdfbin491247 -> 489876 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3galley.dtx53
-rw-r--r--macros/latex/contrib/l3experimental/l3galley.pdfbin385667 -> 385812 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.dtx10
-rw-r--r--macros/latex/contrib/l3experimental/l3graphics.pdfbin363017 -> 363180 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf-code.pdfbin278541 -> 276917 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.dtx10
-rw-r--r--macros/latex/contrib/l3experimental/l3pdf.pdfbin350700 -> 350863 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3str-format.dtx10
-rw-r--r--macros/latex/contrib/l3experimental/l3str-format.pdfbin344797 -> 344948 bytes
-rw-r--r--macros/latex/contrib/l3experimental/l3sys-shell.dtx10
-rw-r--r--macros/latex/contrib/l3experimental/l3sys-shell.pdfbin311621 -> 311773 bytes
-rw-r--r--macros/latex/contrib/l3experimental/xcoffins.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/xcoffins.pdfbin372787 -> 372941 bytes
-rw-r--r--macros/latex/contrib/l3experimental/xgalley.dtx4
-rw-r--r--macros/latex/contrib/l3experimental/xgalley.pdfbin285577 -> 285732 bytes
32 files changed, 626 insertions, 170 deletions
diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md
index b66593198b..bf4577912b 100644
--- a/macros/latex/contrib/l3experimental/CHANGELOG.md
+++ b/macros/latex/contrib/l3experimental/CHANGELOG.md
@@ -7,6 +7,12 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-08-07]
+
+### Changed
+- Move drawing color functions to `l3color`, generalising the approach
+ with better `dvips` support
+
## [2020-07-17]
### Added
@@ -149,7 +155,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-07-17...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-08-07...HEAD
+[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
[2020-06-03]: https://github.com/latex3/latex3/compare/2020-05-18...2020-06-03
diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md
index 413d946314..9831aaadf0 100644
--- a/macros/latex/contrib/l3experimental/README.md
+++ b/macros/latex/contrib/l3experimental/README.md
@@ -1,7 +1,7 @@
Experimental LaTeX3 Concepts
============================
-Release 2020-07-17
+Release 2020-08-07
Overview
--------
diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx
index bd5fa245a9..05058bdef6 100644
--- a/macros/latex/contrib/l3experimental/l3benchmark.dtx
+++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -125,14 +125,12 @@
% Our working unit is the scaled second, namely $2^{-16}$ seconds.
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3benchmark}{2020-07-17}{}
+\ProvidesExplPackage{l3benchmark}{2020-08-07}{}
{L3 Experimental benchmarking}
-%</package>
% \end{macrocode}
%
% \subsection{Additions to \pkg{l3sys}: elapsed time}
@@ -576,7 +574,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf
index 7b2598f0d5..adfca31546 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 91cb13e0b4..42151e2a41 100644
--- a/macros/latex/contrib/l3experimental/l3color.dtx
+++ b/macros/latex/contrib/l3experimental/l3color.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -95,7 +95,7 @@
%
% Additional models may be created to allow mixing of spot colors
% with each other or with those from other models. See
-% Section~\ref{l3color:sec:spot} for more detail of spot color support.
+% Section~\ref{l3color:sec:new-models} for more detail of spot color support.
%
% 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
@@ -215,6 +215,9 @@
%
% \section{Selecting colors}
%
+% General selection of color is safe when split across pages: a stack is
+% used to ensure that the correct color is re-selected on the new page.
+%
% \begin{function}{\color_select:n}
% \begin{syntax}
% \cs{color_select:n} \Arg{color expression}
@@ -237,6 +240,37 @@
% and similar are not influenced by this setting.
% \end{variable}
%
+% \section{Colors for drawing: fills and strokes}
+%
+% Colors for drawing operations and so forth are split into strokes and fills
+% (the latter may also be referred to as non-stroke color). These operations
+% \emph{may} apply to text, but this is backend-depended and the general
+% \cs{color_select:n(n)} should be used for typeset text. In contrast to
+% general color, these operations are \emph{not} stacked and thus must
+% \emph{not} split across pages. Also, an appropriate scope must be applied
+% to the color change, for example \cs{draw_begin:}/\cs{draw_end:}.
+%
+% \begin{function}{\color_fill:n, \color_stroke:n}
+% \begin{syntax}
+% \cs{color_fill:n} \Arg{color expression}
+% \end{syntax}
+% Parses the \meta{color expression} and then activates the resulting
+% color specification for filling or stroking.
+% \end{function}
+%
+% \begin{function}{\color_fill:nn, \color_stroke:nn}
+% \begin{syntax}
+% \cs{color_fill:nn} \Arg{model(s)} \Arg{value(s)}
+% \end{syntax}
+% Activates the color specification equivalent to the \meta{model(s)} and
+% \meta{value(s)} for filling or stroking.
+% \end{function}
+%
+% \begin{variable}{color.fc, color.sc}
+% When using \texttt{dvips}, these PostScript variables hold the fill and
+% stroke color, respectively.
+% \end{variable}
+%
% \section{Multiple color models}
%
% When selecting or setting a color with an explicit model, it is possible
@@ -302,8 +336,59 @@
% assigns the data to the \meta{tl}.
% \end{function}
%
-% \section{Spot colors}
-% \label{l3color:sec:spot}
+% \section{Creating new color models}
+% \label{l3color:sec:new-models}
+%
+% Additional color models are required to support specialist workflows, for
+% example those involving separations (see
+% \url{https://helpx.adobe.com/indesign/using/spot-process-colors.html}
+% for details of the use of separations in print). Color models may be split
+% into families; in the case of the basic \texttt{cmyk}, \texttt{gray}
+% and \texttt{rgb} models, the family and the model itself are synonymous. This
+% is not generally the case: see the PDF reference for more details.
+%
+% \begin{function}{\color_model_new:nnn}
+% \begin{syntax}
+% \cs{color_model_new:nnn} \Arg{model} \Arg{family} \Arg{params}
+% \end{syntax}
+% Creates a new \meta{model} which is derived from the color model \meta{family}.
+% The latter should be one of
+% \begin{itemize}
+% \item \texttt{Separation}
+% \end{itemize}
+% (The \meta{family} may be given in mixed case as-in the PDF reference:
+% internally, case of these strings is folded.)
+% Depending on the \meta{family}, one or more \meta{params} are mandatory or
+% optional.
+% \end{function}
+%
+% For a \texttt{Separation} space, there are three \emph{compulsory} keys.
+% \begin{itemize}
+% \item \texttt{name} The name of the Separation, for example the formal
+% name of a spot color ink. Such a \meta{name} may contain spaces, etc.,
+% which are not permitted in the \meta{model}.
+% \item \texttt{alternative-model} An alternative device colorspace, one of
+% \texttt{cmyk}, \texttt{rgb}, \texttt{gray} or \texttt{cielab}. The three
+% parameter-based models work as described above; see below for
+% details of CIELAB colors.
+% \item \texttt{alternative-values} A comma-separated list of values
+% appropriate to the \texttt{alternative-model}. This information is used by
+% the PDF application if the \texttt{Separation} is not available.
+% \end{itemize}
+%
+% CIELAB color separations are created using the
+% \texttt{alternative-model = cielab} setting. These colors must also have an
+% \texttt{illuminant} key, one of \texttt{a}, \texttt{c}, \texttt{e},
+% \texttt{d50}, \texttt{d55}, \texttt{d65} or \texttt{d75}. The
+% \texttt{alternative-values} in this case are the three parameters $L*$, $a*$
+% and $b*$ of the CIELAB model. Full details of this device-independent color
+% approach are given in the documentation to the \pkg{colorspace} package.
+%
+% CIELAB colors \emph{cannot} be converted into other device-dependent color
+% spaces, and as such, mixing can only occur if colors set up using the CIELAB
+% model are also given with an alternative parameter-based model. If that is
+% not the case, \pkg{l3color} will fallback to using black as the colorant in
+% any mixing.
%
% \end{documentation}
%
@@ -312,7 +397,7 @@
% \section{\pkg{l3color} Implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -320,10 +405,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3color}{2020-07-17}{}
+\ProvidesExplPackage{l3color}{2020-08-07}{}
{L3 Experimental color support}
-%</package>
% \end{macrocode}
%
% \subsection{Predefined color names}
@@ -419,10 +502,12 @@
\cs_generate_variant:Nn \@@_convert:nnN { VV }
\cs_new_protected:Npn \@@_convert:nnnN #1#2#3#4
{
- \str_if_eq:nnT {#1} { spot } % TO DO!!!
- { }
\tl_set:Nx #4
- { \use:c { @@_convert_ #1 _ #2 :w } #3 ~ 0 ~ 0 ~ 0 \s_@@_stop }
+ {
+ \cs_if_exist:cTF { @@_convert_ #1 _ #2 :w }
+ { \use:c { @@_convert_ #1 _ #2 :w } #3 ~ 0 ~ 0 ~ 0 \s_@@_stop }
+ { \use:c { c_@@_fallback_ #2 _tl } }
+ }
}
\cs_generate_variant:Nn \@@_convert:nnnN { nV , nnV }
\cs_new:Npn \@@_convert_gray_rgb:w #1 ~ #2 \s_@@_stop
@@ -993,6 +1078,41 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Fill and stroke color}
+%
+% \begin{macro}{\color_fill:n, \color_stroke:n}
+% \begin{macro}{\color_fill:nn, \color_stroke:nn}
+% \begin{macro}{\@@_draw:nnn}
+% \begin{macrocode}
+\cs_new_protected:Npn \color_fill:n #1
+ {
+ \@@_parse:nN {#1} \l_@@_current_tl
+ \exp_after:wN \@@_draw:nnn \l_@@_current_tl { fill }
+ }
+\cs_new_protected:Npn \color_stroke:n #1
+ {
+ \@@_parse:nN {#1} \l_@@_current_tl
+ \exp_after:wN \@@_draw:nnn \l_@@_current_tl { stroke }
+ }
+\cs_new_protected:Npn \color_fill:nn #1#2
+ {
+ \@@_select_main:Nw \l_@@_current_tl
+ #1 / / \s_@@_mark #2 / / \s_@@_stop
+ \exp_after:wN \@@_draw:nnn \l_@@_current_tl { fill }
+ }
+\cs_new_protected:Npn \color_stroke:nn #1#2
+ {
+ \@@_select_main:Nw \l_@@_current_tl
+ #1 / / \s_@@_mark #2 / / \s_@@_stop
+ \exp_after:wN \@@_draw:nnn \l_@@_current_tl { stroke }
+ }
+\cs_new_protected:Npn \@@_draw:nnn #1#2#3
+ { \use:c { @@_backend_ #3 _ #1 :n } {#2} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Defining named colors}
%
% \begin{variable}{\l_@@_named_tl}
@@ -1279,6 +1399,357 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Additional color models}
+%
+% \begin{variable}{\l_@@_internal_prop}
+% \begin{macrocode}
+\prop_new:N \l_@@_internal_prop
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_separation_int}
+% A tracker for the total number of separations.
+% \begin{macrocode}
+\int_new:N \g_@@_separation_int
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}
+% {
+% \c_@@_model_whitepoint_cielab_a_tl ,
+% \c_@@_model_whitepoint_cielab_b_tl ,
+% \c_@@_model_whitepoint_cielab_e_tl ,
+% \c_@@_model_whitepoint_cielab_d50_tl ,
+% \c_@@_model_whitepoint_cielab_d55_tl ,
+% \c_@@_model_whitepoint_cielab_d65_tl ,
+% \c_@@_model_whitepoint_cielab_d75_tl
+% }
+% Whitepoint data for the CIELAB profiles.
+% \begin{macrocode}
+\tl_const:Nn \c_@@_model_whitepoint_cielab_a_tl { 1.0985 ~ 1 ~ 0.3558 }
+\tl_const:Nn \c_@@_model_whitepoint_cielab_b_tl { 0.9807~ 1 ~ 1.1822 }
+\tl_const:Nn \c_@@_model_whitepoint_cielab_e_tl { 1 ~ 1 ~ 1 }
+\tl_const:cn { c_@@_model_whitepoint_cielab_d50_tl } { 0.9642 ~, 1 ~ 0.8251 }
+\tl_const:cn { c_@@_model_whitepoint_cielab_d55_tl } { 0.9568 ~ 1 ~ 0.9214 }
+\tl_const:cn { c_@@_model_whitepoint_cielab_d65_tl } { 0.9504 ~ 1 ~ 1.0888 }
+\tl_const:cn { c_@@_model_whitepoint_cielab_d75_tl } { 0.9497 ~ 1 ~ 1.2261 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_model_range_cielab_tl}
+% The range for CIELAB color spaces.
+% \begin{macrocode}
+\tl_const:Nn \c_@@_model_range_cielab_tl { -128 ~ 127 ~ -128 ~ 127 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\color_model_new:nnn, \@@_model_new:nnn}
+% \begin{macro}{\@@_model_separation:n}
+% \begin{macro}{\@@_model_separation:nn}
+% \begin{macro}{\@@_model_separation:nnn}
+% \begin{macro}{\@@_model_separation:w}
+% \begin{macro}
+% {
+% \@@_model_separation_cmyk:nnnnnn ,
+% \@@_model_separation_gray:nnnnnn ,
+% \@@_model_separation_rgb:nnnnnn
+% }
+% \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
+% present, so we convert it up-front to a |prop|, then deal with the detail
+% on a per-family basis.
+% \begin{macrocode}
+\cs_new_protected:Npn \color_model_new:nnn #1#2#3
+ {
+ \exp_args:Nee \@@_model_new:nnn
+ { \tl_to_str:n {#1} }
+ { \str_foldcase:n {#2} } {#3}
+ }
+\cs_new_protected:Npn \@@_model_new:nnn #1#2#3
+ {
+ \cs_if_exist:cTF { @@_parse_model_ #1 :w }
+ {
+ \__kernel_msg_error:nnn { color } { model-already-defined } {#1}
+ }
+ {
+ \cs_if_exist:cTF { @@_model_ #2 :n }
+ {
+ \prop_set_from_keyval:Nn \l_@@_internal_prop {#3}
+ \use:c { @@_model_ #2 :n } {#1}
+ }
+ {
+ \__kernel_msg_error:nnn { color } { unknown-model-type } {#2}
+ }
+ }
+ }
+% \end{macrocode}
+% Separations must have a \enquote{real} name, which is pretty easy to find.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_separation:n #1
+ {
+ \prop_get:NnNTF \l_@@_internal_prop { name }
+ \l_@@_internal_tl
+ {
+ \exp_args:NV \@@_model_separation:nn
+ \l_@@_internal_tl {#1}
+ }
+ {
+ \__kernel_msg_error:nnn { color }
+ { separation-requires-name } {#1}
+ }
+ }
+% \end{macrocode}
+% We have two keys to find at this stage: the alternative space model
+% and linked values.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_separation:nn #1#2
+ {
+ \prop_get:NnNTF \l_@@_internal_prop { alternative-model }
+ \l_@@_internal_tl
+ {
+ \exp_args:NV \@@_model_separation:nnn
+ \l_@@_internal_tl {#2} {#1}
+ }
+ {
+ \__kernel_msg_error:nnn { color }
+ { separation-alternative-model } {#2}
+ }
+ }
+\cs_new_protected:Npn \@@_model_separation:nnn #1#2#3
+ {
+ \cs_if_exist:cTF { @@_model_separation_ #1 :nnnnnn }
+ {
+ \prop_get:NnNTF \l_@@_internal_prop { alternative-values }
+ \l_@@_internal_tl
+ {
+ \exp_after:wN \@@_model_separation:w \l_@@_internal_tl
+ , 0 , 0 , 0 , 0 \s_@@_stop {#2} {#3} {#1}
+ }
+ {
+ \__kernel_msg_error:nnn { color }
+ { separation-alternative-values } {#2}
+ }
+ }
+ {
+ \__kernel_msg_error:nnn { color }
+ { unknown-alternative-model } {#1}
+ }
+ }
+% \end{macrocode}
+% As each alternative space leads to a different requirement for conversion,
+% and as there are only a small number of choices, we manually split the data
+% and then set up. Notice that mixing tints is really just the same
+% as mixing \texttt{gray}. The \texttt{white} color is special, as it allows
+% tints to be adjusted without an additional color space. To make sure the
+% data is set for that at all group levels, we need to work on a per-level
+% basis. Within the output, only the set-up needs the \enquote{real} name
+% of the colorspace: we use a simple tracking number for general usage
+% as this is a clear namespace without issues of escaping chars.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_separation:w
+ #1 , #2 , #3 , #4 , #5 \s_@@_stop #6#7#8
+ {
+ \int_gincr:N \g_@@_separation_int
+ \tl_const:cn { c_@@_fallback_ #6 _tl } { 1 }
+ \cs_new_eq:cN { @@_parse_mix_ #6 :nw } \@@_parse_mix_gray:nw
+ \cs_new:cpn { @@_parse_model_ #6 :w } ##1 , ##2 \s_@@_stop
+ { {#6} { \@@_parse_number:n {##1} } }
+ \clist_map_inline:nn { fill , stroke , select }
+ {
+ \cs_new_protected:cpx { @@_backend_ ##1 _ #6 :n } ####1
+ {
+ \exp_not:c { @@_backend_ ##1 _ separation:nn }
+ { color \int_use:N \g_@@_separation_int } {####1}
+ }
+ }
+ \use:c { @@_model_separation_ #8 :nnnnnn }
+ {#6} {#7} {#1} {#2} {#3} {#4}
+ \cs_new_protected:cpx { @@_model_ #6 _white: }
+ {
+ \prop_put:Nnn \exp_not:N \l_@@_named_white_prop {#6} { 0 }
+ \exp_not:N \int_compare:nNnF { \tex_currentgrouplevel:D } = 0
+ { \group_insert_after:N \exp_not:c { @@_model_ #6 _ white: } }
+ }
+ \use:c { @@_model_ #6 _white: }
+ }
+\cs_new_protected:Npn \@@_model_separation_cmyk:nnnnnn #1#2#3#4#5#6
+ {
+ \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 ~ ##2 \s_@@_stop
+ {
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #4} ~
+ \fp_eval:n {##1 * #5} ~
+ \fp_eval:n {##1 * #6}
+ }
+ \@@_model_convert:nnn {#1} { cmyk } { rgb }
+ \@@_model_convert:nnn {#1} { cmyk } { gray }
+ \@@_model_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
+ {
+ \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 ~ ##2 \s_@@_stop
+ {
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #4} ~
+ \fp_eval:n {##1 * #5}
+ }
+ \@@_model_convert:nnn {#1} { rgb } { cmyk }
+ \@@_model_convert:nnn {#1} { rgb } { gray }
+ \@@_model_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
+ {
+ \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 ~ ##2 \s_@@_stop
+ {
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #3}
+ }
+ \cs_new:cpn { @@_convert_ #1 _gray:w } ##1 ~ ##2 \s_@@_stop
+ { \fp_eval:n {##1 * #3} }
+ \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 ~ ##2 \s_@@_stop
+ {
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #3} ~
+ \fp_eval:n {##1 * #3}
+ }
+ \@@_model_separation_init:nnnnn {#2} { /DeviceGray } { } { 0 } {#3}
+ }
+% \end{macrocode}
+% Generic model conversion \emph{via} an alternative intermediate.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_convert:nnn #1#2#3
+ {
+ \cs_new:cpx { @@_convert_ #1 _ #3 :w } ##1 ~ ##2 \s_@@_stop
+ {
+ \exp_not:N \exp_args:NNe \exp_not:N \use:nn
+ \exp_not:c { @@_convert_ #2 _ #3 :w }
+ { \exp_not:c { @@_convert_ #1 _ #2 :w } ##1 ~ ##2 \s_@@_stop }
+ \c_space_tl \exp_not:N \s_@@_stop
+ }
+ }
+% \end{macrocode}
+% Setting up for CIELAB needs a bit more work: there is the illuminant and
+% the need for an appropriate object.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_separation_cielab:nnnnnn #1#2#3#4#5#6
+ {
+ \prop_get:NnNF \l_@@_internal_prop { illuminant }
+ \l_@@_internal_tl
+ {
+ \__kernel_msg_error:nnn { color }
+ { cielab-requires-illuminant } {#1}
+ \tl_set:Nn \l_@@_internal_tl { d50 }
+ }
+ \exp_args:NV \@@_model_separation_cielab:nnnnnnn
+ \l_@@_internal_tl {#1} {#2} {#3} {#4} {#5} {#6}
+ }
+% \end{macrocode}
+% If a CIELAB space is being set up, we need the illuminant, then create
+% the appropriate set up. At present, this doesn't include \texttt{BlackPoint}
+% or \texttt{Range} data, but that may be added later. As CIELAB colors
+% cannot be converted to anything else, we fallback to producing black: the
+% user should set up a second model for colors set up this way.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_model_separation_cielab:nnnnnnn #1#2#3#4#5#6#7
+ {
+ \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}
+ \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
+ { 1 ~ 1 ~ 1 }
+ \cs_new:cpn { @@_convert_ #2 _gray:w } ##1 ~ ##2 \s_@@_stop
+ { 1 }
+ }
+ {
+ \__kernel_msg_error:nnn { color }
+ { unknown-cielab-illuminant } {#1}
+ }
+ }
+% \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}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Diagnostics}
%
% \begin{macro}{\color_show:n}
@@ -1313,24 +1784,94 @@
% \subsection{Messages}
%
% \begin{macrocode}
+\__kernel_msg_new:nnnn { color } { cielab-requires-illuminant }
+ { CIELAB~color~space~'#1'~require~an~illuminant. }
+ {
+ LaTeX~has~been~asked~to~create~a~separation~color~space~using~
+ CIELAB~specifications,~but~no~\\ \\
+ \iow_indent:n { illuminant = <basis> }
+ \\ \\
+ key~was~given~with~the~correct~information.~LaTeX~will~use~illuminant~
+ 'd50'~for~recovery.
+ }
+\__kernel_msg_new:nnnn { color } { conversion-not-available }
+ { No~model~conversion~available~from~'#1'~to~'#2'. }
+ {
+ LaTeX~has~been~asked~to~convert~a~color~from~model~'#1'~
+ to~model'#2',~but~there~is~no~method~available~to~do~that.
+ }
+\__kernel_msg_new:nnnn { color } { model-already-defined }
+ { Color~model~'#1'~already~defined. }
+ {
+ LaTeX~was~asked~to~define~a~new~color~model~called~'#1',~but~
+ this~color~model~already~exists.
+ }
+\__kernel_msg_new:nnnn { color } { separation-alternative-model }
+ { Separation~color~space~'#1'~require~an~alternative~model. }
+ {
+ LaTeX~has~been~asked~to~create~a~separation~color~space,~
+ but~no~\\ \\
+ \iow_indent:n { alternative-model = <model> }
+ \\ \\
+ key~was~given~with~the~correct~information.
+ }
+\__kernel_msg_new:nnnn { color } { separation-alternative-values }
+ { Separation~color~space~'#1'~require~values~for~the~alternative~space. }
+ {
+ LaTeX~has~been~asked~to~create~a~separation~color~space,~
+ but~no~\\ \\
+ \iow_indent:n { alternative-values = <model> }
+ \\ \\
+ key~was~given~with~the~correct~information.
+ }
+\__kernel_msg_new:nnnn { color } { separation-requires-name }
+ { Separation~color~space~'#1'~require~a~formal~name. }
+ {
+ LaTeX~has~been~asked~to~create~a~separation~color~space,~
+ but~no~\\ \\
+ \iow_indent:n { name = <formal~name> }
+ \\ \\
+ key~was~given~with~the~correct~information.
+ }
\__kernel_msg_new:nnnn { color } { unknown-color }
{ Unknown~color~'#1'. }
{
LaTeX~has~been~asked~to~use~a~color~named~'#1',~
but~this~has~never~been~defined.
}
+\__kernel_msg_new:nnnn { color } { unknown-alternative-model }
+ { Separation~color~space~'#1'~require~an~valid~alternative~space. }
+ {
+ LaTeX~has~been~asked~to~create~a~separation~color~space,~
+ but~the~model~given~as\\ \\
+ \iow_indent:n { alternative-model = <model> }
+ \\ \\
+ is~unknown.
+ }
\__kernel_msg_new:nnnn { color } { unknown-export-format }
{ Unknown~export~format~'#1'. }
{
LaTeX~has~been~asked~to~export~a~color~in~format~'#1',~
but~this~has~never~been~defined.
}
+\__kernel_msg_new:nnnn { color } { unknown-cielab-illuminant }
+ { Unknown~illuminant~model~'#1'. }
+ {
+ LaTeX~has~been~asked~to~use~create~a~color~space~using~CIELAB~
+ illuminant~'#1',~but~this~does~not~exist.
+ }
\__kernel_msg_new:nnnn { color } { unknown-model }
{ Unknown~color~model~'#1'. }
{
LaTeX~has~been~asked~to~use~a~color~model~called~'#1',~
but~this~model~is~not~set~up.
}
+\__kernel_msg_new:nnnn { color } { unknown-model-type }
+ { Unknown~color~model~type~'#1'. }
+ {
+ LaTeX~has~been~asked~to~create~a~new~color~model~called~'#1',~
+ but~this~type~of~model~was~never~set~up.
+ }
% \end{macrocode}
%
% \begin{macrocode}
@@ -1344,7 +1885,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3color.pdf b/macros/latex/contrib/l3experimental/l3color.pdf
index 80ecd21fe5..321bc7cc28 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 a39bd99f30..8ab5d0c59c 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-boxes} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -147,7 +147,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf
index 9536595edc..d66a262ce7 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 43d699b64b..ad1238cd2f 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-layers} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -208,7 +208,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx
index 847ade5f44..5da166a75d 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-paths} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -1030,7 +1030,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx
index 15ad9e1f17..3c2b8395a9 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-points} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -963,7 +963,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx
index 038c93dbf6..7ecb49df28 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-scopes} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -132,7 +132,7 @@
\draw_transform_shift_reset:
\@@_softpath_clear:
\draw_linewidth:n { \l_draw_default_linewidth_dim }
- \draw_color:n { . }
+ \color_select:n { . }
\draw_nonzero_rule:
\draw_cap_butt:
\draw_join_miter:
@@ -262,7 +262,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx
index 75af8516ae..e232869980 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-softpath} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -607,7 +607,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx
index cfced7e0d5..6701026948 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-state} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -147,38 +147,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\l_@@_color_tmp_tl}
-% Scratch space.
% \begin{macrocode}
-\tl_new:N \l_@@_color_tmp_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}{\draw_color:n, \draw_color_fill:n, \draw_color_stroke:n}
-% \begin{macro}{\@@_color:nn}
-% \begin{macro}{\@@_color:nnn}
-% Much the same as for core color support but calling the relevant
-% driver-level function.
-% \begin{macrocode}
-\cs_new_eq:NN \draw_color:n \color_select:n
-\cs_new_protected:Npn \draw_color_fill:n #1
- { \@@_color:nn { fill } {#1} }
-\cs_new_protected:Npn \draw_color_stroke:n #1
- { \@@_color:nn { stroke } {#1} }
-\cs_new_protected:Npn \@@_color:nn #1#2
- {
- \color_export:nnN {#2} { backend } \l_@@_color_tmp_tl
- \exp_after:wN \@@_color:nnn \l_@@_color_tmp_tl {#1}
- }
-\cs_new_protected:Npn \@@_color:nnn #1#2#3
- { \use:c { @@_backend_color_ #3 _ #1 :n } {#2} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx
index dcdfc783b7..e9a06f67d0 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -53,7 +53,7 @@
% \section{\pkg{l3draw-transforms} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -331,7 +331,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx
index 081d42e7f3..11ed7487c1 100644
--- a/macros/latex/contrib/l3experimental/l3draw.dtx
+++ b/macros/latex/contrib/l3experimental/l3draw.dtx
@@ -110,7 +110,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -650,7 +650,7 @@
% \draw_path_lineto:n { 2cm , 1cm }
% \draw_path_lineto:n { 3cm , 0.5cm }
% \draw_path_lineto:n { 3cm , 0cm }
-% \draw_color_fill:n { yellow!80!black }
+% \color_fill:n { yellow!80!black }
% \draw_path_use_clear:n { fill , stroke }
% \draw_end:
% \end{demo}
@@ -662,7 +662,7 @@
% \draw_path_moveto:n { 2cm , 1cm } % Begins a new part
% \draw_path_lineto:n { 3cm , 0.5cm }
% \draw_path_lineto:n { 3cm , 0cm }
-% \draw_color_fill:n { yellow!80!black }
+% \color_fill:n { yellow!80!black }
% \draw_path_use_clear:n { fill , stroke }
% \draw_end:
% \end{demo}
@@ -684,7 +684,7 @@
% { 1cm , 1cm } % First control
% { 2cm , 1cm } % Second control
% { 3cm , 0cm } % End
-% \draw_color_fill:n { yellow!80!black }
+% \color_fill:n { yellow!80!black }
% \draw_path_use_clear:n { fill , stroke }
% \draw_end:
% \end{demo}
@@ -705,7 +705,7 @@
% \draw_path_curveto:nn
% { 1cm , 1cm }
% { 2cm , 0cm }
-% \draw_color_fill:n { yellow!80!black }
+% \color_fill:n { yellow!80!black }
% \draw_path_use_clear:n { fill , stroke }
% \draw_end:
% \end{demo}
@@ -778,7 +778,7 @@
% { 1.5cm , 0cm }
% { 0cm , 1cm }
% \draw_path_use_clear:n { stroke }
-% \draw_color:n { red }
+% \color_select:n { red }
% \draw_path_ellipse:nnn
% { 1cm , 0cm }
% { 1cm , 1cm }
@@ -977,15 +977,6 @@
% \end{demo}
% \end{function}
%
-% \subsection{Color}
-%
-% \begin{function}{\draw_color:n, \draw_color_fill:n, \draw_color_stroke:n}
-% \begin{syntax}
-% \cs{draw_color:n} \Arg{color expression}
-% \end{syntax}
-% Evaluates the \meta{color expression} as described for \pkg{l3color}.
-% \end{function}
-%
% \subsection{Transformations}
%
% Points are normally used unchanged relative to the canvas axes. This can
@@ -1137,7 +1128,7 @@
% \section{\pkg{l3draw} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -1145,10 +1136,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3draw}{2020-07-17}{}
+\ProvidesExplPackage{l3draw}{2020-08-07}{}
{L3 Experimental core drawing support}
-%</package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -1183,7 +1172,7 @@
% Everything else is in the sub-files!
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf
index a8cb1a14dc..9a2f1341e0 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 7865c39b7f..8ed82bcce4 100644
--- a/macros/latex/contrib/l3experimental/l3galley.dtx
+++ b/macros/latex/contrib/l3experimental/l3galley.dtx
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -678,7 +678,7 @@
% level both of these need to be correctly saved.
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -686,23 +686,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3galley}{2020-07-17}{}
+\ProvidesExplPackage{l3galley}{2020-08-07}{}
{L3 Experimental galley code}
-%</package>
-% \end{macrocode}
-%
-% \subsection{Support items}
-%
-% Functions or settings which are needed by the galley but perhaps also
-% elsewhere.
-%
-% The default hyphenation character should be set and hyphenation should be
-% enabled.
-% \begin{macrocode}
-%<*initex>
-\tex_defaulthyphenchar:D 45 \scan_stop:
-%</initex>
% \end{macrocode}
%
% \subsection{Scratch variables}
@@ -767,12 +752,7 @@
% The width of the current measure: the \enquote{running} setting can be
% inherited from \LaTeXe{}.
% \begin{macrocode}
-%<*initex>
-\dim_new:N \l_galley_text_width_dim
-%</initex>
-%<*package>
\cs_new_eq:NN \l_galley_text_width_dim \linewidth
-%</package>
% \end{macrocode}
% \end{variable}
%
@@ -782,12 +762,7 @@
% width are one way to define the measure width. See also the text width,
% which is an alternative view (and should be in sync with this one!).
% \begin{macrocode}
-%<*initex>
-\dim_new:N \l_galley_total_left_margin_dim
-%</initex>
-%<*package>
\cs_new_eq:NN \l_galley_total_left_margin_dim \@totalleftmargin
-%</package>
\dim_new:N \l_galley_total_right_margin_dim
% \end{macrocode}
% \end{variable}
@@ -1453,18 +1428,11 @@
% \LaTeXe{} \cs{@nodocument} is never removed from the register.
% This precaution is not be needed for a stand-alone format.
% \begin{macrocode}
-%<*initex>
-\tex_everypar:D % TEMP
- {
- \bool_if:NTF \g_@@_begin_level_bool
- { \@@_start_paragraph_first: }
- { \@@_start_paragraph_std: }
- }
-%</initex>
-%<*package>
\cs_undefine:N \everypar
\newtoks \everypar
-\AtBeginDocument
+\cs_if_exist:NTF \AtBeginDocument
+ { \AtBeginDocument }
+ { \use:n }
{
\tex_everypar:D
{
@@ -1474,7 +1442,6 @@
\tex_the:D \everypar
}
}
-%</package>
% \end{macrocode}
% \end{macro}
%
@@ -2497,10 +2464,6 @@
%
% \subsection{\LaTeXe{} functions}
%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
% \begin{macro}{\clearpage}
% The \tn{clearpage} macro needs to place material into the correct
% structures rather than directly onto the main vertical list. Other
@@ -2653,10 +2616,6 @@
%</package>
% \end{macrocode}
%
-% \begin{macrocode}
-%</initex|package>
-% \end{macrocode}
-%
% \end{implementation}
%
% \PrintIndex
diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf
index 568e913fd2..4dbe5eae6a 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 9908f59c34..fd030ce643 100644
--- a/macros/latex/contrib/l3experimental/l3graphics.dtx
+++ b/macros/latex/contrib/l3experimental/l3graphics.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -232,7 +232,7 @@
% \section{\pkg{l3graphics} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -240,10 +240,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3graphics}{2020-07-17}{}
+\ProvidesExplPackage{l3graphics}{2020-08-07}{}
{L3 Experimental graphics inclusion support}
-%</package>
% \end{macrocode}
%
% \begin{variable}{\l_@@_tmp_ior, \l_@@_tmp_tl}
@@ -715,7 +713,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf
index 80f61fa228..82fda2baf3 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 d74c199483..5b479c4e2f 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 984336443e..403410f99d 100644
--- a/macros/latex/contrib/l3experimental/l3pdf.dtx
+++ b/macros/latex/contrib/l3experimental/l3pdf.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -182,7 +182,7 @@
% \section{\pkg{l3pdf} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -190,10 +190,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3pdf}{2020-07-17}{}
+\ProvidesExplPackage{l3pdf}{2020-08-07}{}
{L3 Experimental core PDF support}
-%</package>
% \end{macrocode}
%
% \begin{variable}{\s_@@_stop}
@@ -350,7 +348,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3pdf.pdf b/macros/latex/contrib/l3experimental/l3pdf.pdf
index c51a2055be..572423103f 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 3c4fbc6336..e44bde9dff 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -158,7 +158,7 @@
% \section{\pkg{l3str-format} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -166,10 +166,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3str-format}{2020-07-17}{}
+\ProvidesExplPackage{l3str-format}{2020-08-07}{}
{L3 Experimental string formatting}
-%</package>
% \end{macrocode}
%
% \subsection{Helpers}
@@ -974,7 +972,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf
index fe0b1e71cb..d3c96701b0 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 466a4d4107..e368a92582 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -127,7 +127,7 @@
% \section{\pkg{l3sys-shell} implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -135,10 +135,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{l3sys-shell}{2020-07-17}{}
+\ProvidesExplPackage{l3sys-shell}{2020-08-07}{}
{L3 Experimental system shell functions}
-%</package>
% \end{macrocode}
%
% \begin{variable}{\s_@@_stop}
@@ -385,7 +383,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf
index a455433a5c..ebb8a0f9c6 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 65c1872645..7e030c8e3b 100644
--- a/macros/latex/contrib/l3experimental/xcoffins.dtx
+++ b/macros/latex/contrib/l3experimental/xcoffins.dtx
@@ -56,7 +56,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -675,7 +675,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xcoffins}{2020-07-17}{}
+\ProvidesExplPackage{xcoffins}{2020-08-07}{}
{L3 Experimental design level coffins}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf
index ff560afb71..91e71514d8 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 d917bdecff..0d9bf34149 100644
--- a/macros/latex/contrib/l3experimental/xgalley.dtx
+++ b/macros/latex/contrib/l3experimental/xgalley.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -734,7 +734,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xgalley}{2020-07-17}{}
+\ProvidesExplPackage{xgalley}{2020-08-07}{}
{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 e5c6e5ee48..47f63bdd6d 100644
--- a/macros/latex/contrib/l3experimental/xgalley.pdf
+++ b/macros/latex/contrib/l3experimental/xgalley.pdf
Binary files differ