[latex3-commits] [git/LaTeX3-latex3-latex3] color-multi-model: Re-work color internals (5f004d85d)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Jun 23 08:37:52 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : color-multi-model
Link : https://github.com/latex3/latex3/commit/5f004d85d42c2b9b0ddcea91e66bfffe1c8faa52
>---------------------------------------------------------------
commit 5f004d85d42c2b9b0ddcea91e66bfffe1c8faa52
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Jun 22 11:39:59 2020 +0100
Re-work color internals
As we are storing data for multiple models,
use the prop for this and the tl just for the name
of the standard model. There's a slight performance
hit but the clarify of the flow is improved.
>---------------------------------------------------------------
5f004d85d42c2b9b0ddcea91e66bfffe1c8faa52
l3experimental/l3color/l3color.dtx | 158 +++++++++++----------
.../l3color/testfiles/m3color001.ptex.tlg | 40 +++---
l3experimental/l3color/testfiles/m3color001.tlg | 40 +++---
.../l3color/testfiles/m3color001.uptex.tlg | 40 +++---
.../l3color/testfiles/m3color001.xetex.tlg | 40 +++---
l3experimental/l3color/testfiles/m3color002.tlg | 22 +--
l3experimental/l3color/testfiles/m3color003.tlg | 7 +-
7 files changed, 175 insertions(+), 172 deletions(-)
diff --git a/l3experimental/l3color/l3color.dtx b/l3experimental/l3color/l3color.dtx
index 80481a7c5..2045a2712 100644
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@ -343,8 +343,8 @@
% functions).
%
% Since there is no need to manipulate colors \emph{en masse}, each is stored
-% in a separate token list variable, rather than the alternative of using a
-% single property list for all names.
+% in a two-part structure: a \texttt{prop} for the colors themselves, and a
+% \texttt{tl} for the default model for each color.
%
% \subsection{Setup}
%
@@ -369,37 +369,32 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_if_defined:n #1 { T, F, TF }
{
- \tl_if_exist:cTF { l_@@_named_ #1 _tl }
+ \prop_if_exist:cTF { l_@@_named_ #1 _prop }
\prg_return_true:
\prg_return_false:
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[EXP]{\@@_model:N, \@@_values:N}
+% Simple abstractions.
+% \begin{macrocode}
+\cs_new:Npn \@@_model:N #1 { \exp_after:wN \use_i:nn #1 }
+\cs_new:Npn \@@_values:N #1 { \exp_after:wN \use_ii:nn #1 }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_extract:nNN, \@@_extract:VNN}
-% \begin{macro}{\@@_extract:NNnn}
-% Split the model and color from a named color, and store the two. No test
-% for the existence of the color: that is assumed to be the case (this
-% is internal only). Somewhat \enquote{old-fashioned} but should be quite
-% fast.
+% Recover the values for the standard model for a color.
% \begin{macrocode}
\cs_new_protected:Npn \@@_extract:nNN #1#2#3
{
- \exp_after:wN \exp_after:wN \exp_after:wN
- \@@_extract:NNnn
- \exp_after:wN \exp_after:wN \exp_after:wN #2
- \exp_after:wN \exp_after:wN \exp_after:wN #3
- \cs:w l_@@_named_ #1 _tl \cs_end:
+ \tl_set_eq:Nc #2 { l_@@_named_ #1 _tl }
+ \prop_get:cVN { l_@@_named_ #1 _prop } #2 #3
}
\cs_generate_variant:Nn \@@_extract:nNN { V }
-\cs_new_protected:Npn \@@_extract:NNnn #1#2#3#4
- {
- \tl_set:Nn #1 {#3}
- \tl_set:Nn #2 {#4}
- }
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \subsection{Model conversion}
%
@@ -490,6 +485,7 @@
%
% \begin{macro}{\@@_parse:nN}
% \begin{macro}{\@@_parse_aux:nN}
+% \begin{macro}{\@@_parse_eq:Nn}
% \begin{macro}{\@@_parse:Nw}
% \begin{macro}{\@@_parse_loop_init:Nnn}
% \begin{macro}{\@@_parse_loop:w}
@@ -508,13 +504,18 @@
% otherwise expands, then starts working through the expression itself.
% At the end, we apply the payload.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_parse:nN #1#2
+\cs_new_protected:Npx \@@_parse:nN #1#2
{
%<*package>
- \@@_backend_pickup:N \l_@@_current_tl
- \tl_set_eq:cN { l_@@_named_ . _tl } \l_@@_current_tl
+ \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_args:Ne \@@_parse_aux:nN { \tl_to_str:n {#1} } #2
+ \exp_not:N \exp_args:Ne \exp_not:N \@@_parse_aux:nN
+ { \exp_not:N \tl_to_str:n {#1} } #2
}
% \end{macrocode}
% Before going to all of the effort of parsing an expression, these two
@@ -523,22 +524,33 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_parse_aux:nN #1#2
{
- \tl_if_exist:cTF { l_@@_named_ #1 _tl }
- { \tl_set_eq:Nc #2 { l_@@_named_ #1 _tl } }
+ \tl_if_exist:cTF { l_@@_named_ #1 _prop }
+ { \@@_parse_set_eq:Nn #2 {#1} }
{ \@@_parse:Nw #2#1 ! \s_@@_stop }
\@@_check_model:N #2
}
+\cs_new_protected:Npn \@@_parse_set_eq:Nn #1#2
+ {
+ \prop_get:cvN
+ { l_@@_named_ #2 _prop } { l_@@_named_ #2 _tl }
+ \l_@@_internal_tl
+ \tl_set:Nx #1
+ {
+ { \tl_use:c { l_@@_named_ #2 _tl } }
+ { \l_@@_internal_tl }
+ }
+ }
\cs_new_protected:Npn \@@_parse:Nw #1#2 ! #3 \s_@@_stop
{
\@@_if_defined:nTF {#2}
{
\tl_if_blank:nTF {#3}
- { \tl_set_eq:Nc #1 { l_@@_named_ #2 _tl } }
+ { \@@_parse_set_eq:Nn #1 {#2} }
{ \@@_parse_loop_init:Nnn #1 {#2} {#3} }
}
{
\__kernel_msg_error:nnn { color } { unknown-color } {#2}
- \tl_set_eq:NN \l_@@_current_tl \l_@@_named_black_tl
+ \tl_set:Nn \l_@@_current_tl { { gray } { 0 } }
}
}
% \end{macrocode}
@@ -691,6 +703,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[EXP]
% {
@@ -865,10 +878,14 @@
% will therefore always be available. The finalisation is separate from the
% main function so it can also be applied to \emph{e.g.}~page color.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_select:
+\cs_new_protected:Npx \@@_select:
{
- \tl_set_eq:cN { l_@@_named_ . _tl } \l_@@_current_tl
- \@@_select: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 }
+ \@@_select:N \exp_not:N \l_@@_current_tl
}
% \end{macrocode}
% \end{macro}
@@ -958,7 +975,6 @@
% \begin{macro}{\color_set:nn}
% \begin{macro}{\@@_set:nnw}
% \begin{macro}{\color_set:nnn}
-% \begin{macro}{\@@_set:nw}
% \begin{macro}{\@@_set_loop:nw}
% \begin{macro}{\color_set_eq:nn}
% Defining named colors means working through the model list and saving
@@ -971,8 +987,12 @@
\str_if_eq:nnF {#1} { . }
{
\@@_parse:nN {#2} \l_@@_named_tl
- \exp_args:Nnx \@@_set_store:nn {#1}
- { \exp_after:wN \use_i:nn \l_@@_named_tl }
+ \tl_clear_new:c { l_@@_named_ #1 _tl }
+ \tl_set:cx { l_@@_named_ #1 _tl }
+ { \@@_model:N \l_@@_named_tl }
+ \prop_clear_new:c { l_@@_named_ #1 _prop }
+ \prop_put:cvx { l_@@_named_ #1 _prop } { l_@@_named_ #1 _tl }
+ { \@@_values:N \l_@@_named_tl }
\@@_set:nnw {#1} #2 ! \s_@@_stop
}
}
@@ -988,17 +1008,17 @@
{
\clist_map_inline:nn { cmyk , gray , rgb }
{
- \prop_get:cnNT { l_@@_named_ #2 _prop } {##1} \l_@@_named_tl
+ \prop_get:cnNT { l_@@_named_ #2 _prop } {##1} \l_@@_internal_tl
{
\prop_if_in:cnF { l_@@_named_ #1 _prop } {##1}
{
\group_begin:
- \tl_set_eq:cN { l_@@_named_ #2_ tl } \l_@@_named_tl
- \@@_parse:nN {#2} \l_@@_named_tl
+ \tl_set:cn { l_@@_named_ #2 _tl } {##1}
+ \@@_parse:nN {#2} \l_@@_internal_tl
\exp_args:NNNV \group_end:
- \tl_set:Nn \l_@@_named_tl \l_@@_named_tl
- \prop_put:cnV { l_@@_named_ #1 _prop } {##1}
- \l_@@_named_tl
+ \tl_set:Nn \l_@@_internal_tl \l_@@_internal_tl
+ \prop_put:cnx { l_@@_named_ #1 _prop } {##1}
+ { \@@_values:N \l_@@_internal_tl }
}
}
}
@@ -1006,14 +1026,11 @@
\cs_new_protected:Npn \color_set:nnn #1#2#3
{
\str_if_eq:nnF {#1} { . }
- { \@@_set:nw {#1} #2 / / \s_@@_mark #3 / / \s_@@_stop }
- }
-\cs_new_protected:Npn \@@_set:nw
- #1#2 / #3 / #4 \s_@@_mark #5 / #6 / #7 \s_@@_stop
- {
- \@@_select:nnN {#2} {#5} \l_@@_named_tl
- \@@_set_store:nn {#1} {#2}
- \@@_set_loop:nw {#1} #3 / #4 \s_@@_mark #6 / #7 \s_@@_stop
+ {
+ \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
+ }
}
\cs_new_protected:Npn \@@_set_loop:nw
#1#2 / #3 \s_@@_mark #4 / #5 \s_@@_stop
@@ -1021,19 +1038,14 @@
\tl_if_blank:nF {#2}
{
\@@_select:nnN {#2} {#4} \l_@@_named_tl
- \prop_put:cnx { l_@@_named_ #1 _prop } {#2}
- { \exp_after:wN \use_ii:nn \l_@@_named_tl }
+ \tl_set:Nx \l_@@_internal_tl { \@@_model:N \l_@@_named_tl }
+ \tl_if_empty:cT { l_@@_named_ #1 _tl }
+ { \tl_set_eq:cN { l_@@_named_ #1 _tl } \l_@@_internal_tl }
+ \prop_put:cVx { l_@@_named_ #1 _prop } \l_@@_internal_tl
+ { \@@_values:N \l_@@_named_tl }
\@@_set_loop:nw {#1} #3 \s_@@_mark #5 \s_@@_stop
}
}
-\cs_new_protected:Npn \@@_set_store:nn #1#2
- {
- \tl_clear_new:c { l_@@_named_ #1 _tl }
- \tl_set_eq:cN { l_@@_named_ #1 _tl } \l_@@_named_tl
- \prop_clear_new:c { l_@@_named_ #1 _prop }
- \prop_put:cnx { l_@@_named_ #1 _prop } {#2}
- { \exp_after:wN \use_ii:nn \l_@@_named_tl }
- }
\cs_new_protected:Npn \color_set_eq:nn #1#2
{
\@@_if_defined:nTF {#2}
@@ -1042,10 +1054,10 @@
\prop_clear_new:c { l_@@_named_ #1 _prop }
\str_if_eq:nnTF {#2} { . }
{
- \tl_set_eq:cN { l_@@_named_ #1 _tl } \l_@@_current_tl
- \prop_put:cxx { l_@@_named_ #1 _prop }
- { \exp_after:wN \use_i:nn \l_@@_current_tl }
- { \exp_after:wN \use_ii:nn \l_@@_current_tl }
+ \tl_set:cx { l_@@_named_ #1 _tl }
+ { \@@_model:N \l_@@_current_tl }
+ \prop_put:cvx { l_@@_named_ #1 _prop } { l_@@_named_ #1 _tl }
+ { \@@_values:N \l_@@_current_tl }
}
{
\tl_set_eq:cc { l_@@_named_ #1 _tl } { l_@@_named_ #2 _tl }
@@ -1056,15 +1068,12 @@
\__kernel_msg_error:nnn { color } { unknown-color } {#2}
}
}
-\cs_generate_variant:Nn \prop_put:Nnn { cxx }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% A small set of colors are always defined.
% \begin{macrocode}
@@ -1078,12 +1087,13 @@
\color_set:nnn { blue } { rgb } { 0 , 0 , 1 }
% \end{macrocode}
%
-% \begin{variable}{\l_@@_named_._tl}
+% \begin{variable}{\l_@@_named_._prop, \l_@@_named_._tl}
% A special named color: this is always defined though not fixed in
% definition.
% \begin{macrocode}
+\prop_new:c { l_@@_named_._prop }
\tl_new:c { l_@@_named_._tl }
-\tl_set_eq:cN { l_@@_named_._tl } \l_@@_current_tl
+\tl_set:cx { l_@@_named_._tl } { \@@_model:N \l_@@_current_tl }
% \end{macrocode}
% \end{variable}
%
@@ -1206,7 +1216,7 @@
% \subsection{Diagnostics}
%
% \begin{macro}{\color_show:n}
-% \begin{macro}{\@@_show:nn}
+% \begin{macro}{\@@_show:n}
% Extract the information about a color and format for the user: the approach
% is similar to the keys module here.
% \begin{macrocode}
@@ -1217,22 +1227,18 @@
{
\@@_if_defined:nT {#1}
{
- \exp_last_unbraced:Nv \@@_show:nn { l_@@_named_ #1 _tl }
- \int_compare:nNnT { \prop_count:c { l_@@_named_ #1 _prop } } > 1
- {
- \prop_map_function:cN
- { l_@@_named_ #1 _prop }
- \msg_show_item_unbraced:nn
- }
+ \exp_args:Nv \@@_show:n { l_@@_named_ #1 _tl }
+ \prop_map_function:cN
+ { l_@@_named_ #1 _prop }
+ \msg_show_item_unbraced:nn
}
}
{ }
{ }
}
-\cs_new:Npn \@@_show:nn #1#2
+\cs_new:Npn \@@_show:n #1
{
\msg_show_item_unbraced:nn { model } {#1}
- \msg_show_item_unbraced:nn { value } {#2}
}
% \end{macrocode}
% \end{macro}
diff --git a/l3experimental/l3color/testfiles/m3color001.ptex.tlg b/l3experimental/l3color/testfiles/m3color001.ptex.tlg
index d18d4c461..e5e9bf62f 100644
--- a/l3experimental/l3color/testfiles/m3color001.ptex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.ptex.tlg
@@ -8,21 +8,21 @@ Defining \l__color_named_foo1_tl on line ...
Defining \l__color_named_foo1_prop on line ...
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
Defining \l__color_named_foo2_tl on line ...
Defining \l__color_named_foo2_prop on line ...
The color foo2 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
Defining \l__color_named_foo3_tl on line ...
Defining \l__color_named_foo3_prop on line ...
The color foo3 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -31,17 +31,17 @@ TEST 2: Renaming colors by model
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -50,31 +50,31 @@ TEST 3: Naming colors by expression
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => gray
-> value => 0.5.
+> gray => 0.5.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => rgb
-> value => 1 0.5 0.5.
+> rgb => 1 0.5 0.5.
<recently read> }
l. ... }
Defining \l__color_named_foo4_tl on line ...
Defining \l__color_named_foo4_prop on line ...
The color foo4 has the properties:
> model => rgb
-> value => 0.125 0.125 0.75.
+> rgb => 0.125 0.125 0.75.
<recently read> }
l. ... }
Defining \l__color_named_foo5_tl on line ...
Defining \l__color_named_foo5_prop on line ...
The color foo5 has the properties:
> model => cmyk
-> value => 0.02 0.18 0.8 0.
+> cmyk => 0.02 0.18 0.8 0.
<recently read> }
l. ... }
============================================================
@@ -83,22 +83,22 @@ TEST 4: Naming colors by expression with model conversion
============================================================
The color foo1 has the properties:
> model => rgb
-> value => 0.5 0.5 0.5.
+> rgb => 0.5 0.5 0.5.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => cmyk
-> value => 0.5 0.5 0.5 0.
+> cmyk => 0.5 0.5 0.5 0.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => cmyk
-> value => 0.05 0.05 0.05 0.9.
+> cmyk => 0.05 0.05 0.05 0.9.
<recently read> }
l. ... }
The color foo4 has the properties:
> model => rgb
-> value => 0.1 0 0.
+> rgb => 0.1 0 0.
<recently read> }
l. ... }
============================================================
@@ -107,7 +107,7 @@ TEST 5: Copying named colors
============================================================
The color foo2 has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -118,7 +118,7 @@ Defining \l__color_named_foo_tl on line ...
Defining \l__color_named_foo_prop on line ...
The color foo has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -243,17 +243,17 @@ The color unknown is undefined.
l. ... }
The color black has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color red has the properties:
> model => rgb
-> value => 1.0 0.0 0.0.
+> rgb => 1.0 0.0 0.0.
<recently read> }
l. ... }
The color cyan has the properties:
> model => cmyk
-> value => 1.0 0.0 0.0 0.0.
+> cmyk => 1.0 0.0 0.0 0.0.
<recently read> }
l. ... }
============================================================
diff --git a/l3experimental/l3color/testfiles/m3color001.tlg b/l3experimental/l3color/testfiles/m3color001.tlg
index a53f43b70..9debf4224 100644
--- a/l3experimental/l3color/testfiles/m3color001.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.tlg
@@ -8,21 +8,21 @@ Defining \l__color_named_foo1_tl on line ...
Defining \l__color_named_foo1_prop on line ...
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
Defining \l__color_named_foo2_tl on line ...
Defining \l__color_named_foo2_prop on line ...
The color foo2 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
Defining \l__color_named_foo3_tl on line ...
Defining \l__color_named_foo3_prop on line ...
The color foo3 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -31,17 +31,17 @@ TEST 2: Renaming colors by model
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -50,31 +50,31 @@ TEST 3: Naming colors by expression
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => gray
-> value => 0.5.
+> gray => 0.5.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => rgb
-> value => 1 0.5 0.5.
+> rgb => 1 0.5 0.5.
<recently read> }
l. ... }
Defining \l__color_named_foo4_tl on line ...
Defining \l__color_named_foo4_prop on line ...
The color foo4 has the properties:
> model => rgb
-> value => 0.125 0.125 0.75.
+> rgb => 0.125 0.125 0.75.
<recently read> }
l. ... }
Defining \l__color_named_foo5_tl on line ...
Defining \l__color_named_foo5_prop on line ...
The color foo5 has the properties:
> model => cmyk
-> value => 0.02 0.18 0.8 0.
+> cmyk => 0.02 0.18 0.8 0.
<recently read> }
l. ... }
============================================================
@@ -83,22 +83,22 @@ TEST 4: Naming colors by expression with model conversion
============================================================
The color foo1 has the properties:
> model => rgb
-> value => 0.5 0.5 0.5.
+> rgb => 0.5 0.5 0.5.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => cmyk
-> value => 0.5 0.5 0.5 0.
+> cmyk => 0.5 0.5 0.5 0.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => cmyk
-> value => 0.05 0.05 0.05 0.9.
+> cmyk => 0.05 0.05 0.05 0.9.
<recently read> }
l. ... }
The color foo4 has the properties:
> model => rgb
-> value => 0.1 0 0.
+> rgb => 0.1 0 0.
<recently read> }
l. ... }
============================================================
@@ -107,7 +107,7 @@ TEST 5: Copying named colors
============================================================
The color foo2 has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -118,7 +118,7 @@ Defining \l__color_named_foo_tl on line ...
Defining \l__color_named_foo_prop on line ...
The color foo has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -235,17 +235,17 @@ The color unknown is undefined.
l. ... }
The color black has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color red has the properties:
> model => rgb
-> value => 1.0 0.0 0.0.
+> rgb => 1.0 0.0 0.0.
<recently read> }
l. ... }
The color cyan has the properties:
> model => cmyk
-> value => 1.0 0.0 0.0 0.0.
+> cmyk => 1.0 0.0 0.0 0.0.
<recently read> }
l. ... }
============================================================
diff --git a/l3experimental/l3color/testfiles/m3color001.uptex.tlg b/l3experimental/l3color/testfiles/m3color001.uptex.tlg
index d18d4c461..e5e9bf62f 100644
--- a/l3experimental/l3color/testfiles/m3color001.uptex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.uptex.tlg
@@ -8,21 +8,21 @@ Defining \l__color_named_foo1_tl on line ...
Defining \l__color_named_foo1_prop on line ...
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
Defining \l__color_named_foo2_tl on line ...
Defining \l__color_named_foo2_prop on line ...
The color foo2 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
Defining \l__color_named_foo3_tl on line ...
Defining \l__color_named_foo3_prop on line ...
The color foo3 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -31,17 +31,17 @@ TEST 2: Renaming colors by model
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -50,31 +50,31 @@ TEST 3: Naming colors by expression
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => gray
-> value => 0.5.
+> gray => 0.5.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => rgb
-> value => 1 0.5 0.5.
+> rgb => 1 0.5 0.5.
<recently read> }
l. ... }
Defining \l__color_named_foo4_tl on line ...
Defining \l__color_named_foo4_prop on line ...
The color foo4 has the properties:
> model => rgb
-> value => 0.125 0.125 0.75.
+> rgb => 0.125 0.125 0.75.
<recently read> }
l. ... }
Defining \l__color_named_foo5_tl on line ...
Defining \l__color_named_foo5_prop on line ...
The color foo5 has the properties:
> model => cmyk
-> value => 0.02 0.18 0.8 0.
+> cmyk => 0.02 0.18 0.8 0.
<recently read> }
l. ... }
============================================================
@@ -83,22 +83,22 @@ TEST 4: Naming colors by expression with model conversion
============================================================
The color foo1 has the properties:
> model => rgb
-> value => 0.5 0.5 0.5.
+> rgb => 0.5 0.5 0.5.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => cmyk
-> value => 0.5 0.5 0.5 0.
+> cmyk => 0.5 0.5 0.5 0.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => cmyk
-> value => 0.05 0.05 0.05 0.9.
+> cmyk => 0.05 0.05 0.05 0.9.
<recently read> }
l. ... }
The color foo4 has the properties:
> model => rgb
-> value => 0.1 0 0.
+> rgb => 0.1 0 0.
<recently read> }
l. ... }
============================================================
@@ -107,7 +107,7 @@ TEST 5: Copying named colors
============================================================
The color foo2 has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -118,7 +118,7 @@ Defining \l__color_named_foo_tl on line ...
Defining \l__color_named_foo_prop on line ...
The color foo has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -243,17 +243,17 @@ The color unknown is undefined.
l. ... }
The color black has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color red has the properties:
> model => rgb
-> value => 1.0 0.0 0.0.
+> rgb => 1.0 0.0 0.0.
<recently read> }
l. ... }
The color cyan has the properties:
> model => cmyk
-> value => 1.0 0.0 0.0 0.0.
+> cmyk => 1.0 0.0 0.0 0.0.
<recently read> }
l. ... }
============================================================
diff --git a/l3experimental/l3color/testfiles/m3color001.xetex.tlg b/l3experimental/l3color/testfiles/m3color001.xetex.tlg
index 7276a7f3d..91637d967 100644
--- a/l3experimental/l3color/testfiles/m3color001.xetex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.xetex.tlg
@@ -8,21 +8,21 @@ Defining \l__color_named_foo1_tl on line ...
Defining \l__color_named_foo1_prop on line ...
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
Defining \l__color_named_foo2_tl on line ...
Defining \l__color_named_foo2_prop on line ...
The color foo2 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
Defining \l__color_named_foo3_tl on line ...
Defining \l__color_named_foo3_prop on line ...
The color foo3 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -31,17 +31,17 @@ TEST 2: Renaming colors by model
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.1.
+> gray => 0.1.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.1 0.2 0.3.
+> rgb => 0.1 0.2 0.3.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4.
+> cmyk => 0.1 0.2 0.3 0.4.
<recently read> }
l. ... }
============================================================
@@ -50,31 +50,31 @@ TEST 3: Naming colors by expression
============================================================
The color foo1 has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => gray
-> value => 0.5.
+> gray => 0.5.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => rgb
-> value => 1 0.5 0.5.
+> rgb => 1 0.5 0.5.
<recently read> }
l. ... }
Defining \l__color_named_foo4_tl on line ...
Defining \l__color_named_foo4_prop on line ...
The color foo4 has the properties:
> model => rgb
-> value => 0.125 0.125 0.75.
+> rgb => 0.125 0.125 0.75.
<recently read> }
l. ... }
Defining \l__color_named_foo5_tl on line ...
Defining \l__color_named_foo5_prop on line ...
The color foo5 has the properties:
> model => cmyk
-> value => 0.02 0.18 0.8 0.
+> cmyk => 0.02 0.18 0.8 0.
<recently read> }
l. ... }
============================================================
@@ -83,22 +83,22 @@ TEST 4: Naming colors by expression with model conversion
============================================================
The color foo1 has the properties:
> model => rgb
-> value => 0.5 0.5 0.5.
+> rgb => 0.5 0.5 0.5.
<recently read> }
l. ... }
The color foo2 has the properties:
> model => cmyk
-> value => 0.5 0.5 0.5 0.
+> cmyk => 0.5 0.5 0.5 0.
<recently read> }
l. ... }
The color foo3 has the properties:
> model => cmyk
-> value => 0.05 0.05 0.05 0.9.
+> cmyk => 0.05 0.05 0.05 0.9.
<recently read> }
l. ... }
The color foo4 has the properties:
> model => rgb
-> value => 0.1 0 0.
+> rgb => 0.1 0 0.
<recently read> }
l. ... }
============================================================
@@ -107,7 +107,7 @@ TEST 5: Copying named colors
============================================================
The color foo2 has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -118,7 +118,7 @@ Defining \l__color_named_foo_tl on line ...
Defining \l__color_named_foo_prop on line ...
The color foo has the properties:
> model => cmyk
-> value => 0.25 0.75 0 0.
+> cmyk => 0.25 0.75 0 0.
<recently read> }
l. ... }
============================================================
@@ -235,17 +235,17 @@ The color unknown is undefined.
l. ... }
The color black has the properties:
> model => gray
-> value => 0.0.
+> gray => 0.0.
<recently read> }
l. ... }
The color red has the properties:
> model => rgb
-> value => 1.0 0.0 0.0.
+> rgb => 1.0 0.0 0.0.
<recently read> }
l. ... }
The color cyan has the properties:
> model => cmyk
-> value => 1.0 0.0 0.0 0.0.
+> cmyk => 1.0 0.0 0.0 0.0.
<recently read> }
l. ... }
============================================================
diff --git a/l3experimental/l3color/testfiles/m3color002.tlg b/l3experimental/l3color/testfiles/m3color002.tlg
index b59de9b3f..ad231acdf 100644
--- a/l3experimental/l3color/testfiles/m3color002.tlg
+++ b/l3experimental/l3color/testfiles/m3color002.tlg
@@ -8,42 +8,42 @@ Defining \l__color_named_foo1_tl on line ...
Defining \l__color_named_foo1_prop on line ...
The color foo1 has the properties:
> model => rgb
-> value => 0.7 0.315 0.28.
+> rgb => 0.7 0.315 0.28.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.665 0.7 0.28.
+> rgb => 0.665 0.7 0.28.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.28 0.7 0.315.
+> rgb => 0.28 0.7 0.315.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.28 0.665 0.7.
+> rgb => 0.28 0.665 0.7.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.315 0.28 0.7.
+> rgb => 0.315 0.28 0.7.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.7 0.28 0.665.
+> rgb => 0.7 0.28 0.665.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.7 0.28 0.28.
+> rgb => 0.7 0.28 0.28.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.19833 0.2 0.18.
+> rgb => 0.19833 0.2 0.18.
<recently read> }
l. ... }
============================================================
@@ -52,19 +52,19 @@ TEST 2: Integer/integer-like models
============================================================
The color foo1 has the properties:
> model => rgb
-> value => 0.0392156862745098 0.03845 0.03768.
+> rgb => 0.0392156862745098 0.03845 0.03768.
<recently read> }
l. ... }
The color foo1 has the properties:
> model => rgb
-> value => 0.07843 0.15686 0.23529.
+> rgb => 0.07843 0.15686 0.23529.
<recently read> }
l. ... }
Defining \l__color_named_foo2_tl on line ...
Defining \l__color_named_foo2_prop on line ...
The color foo2 has the properties:
> model => rgb
-> value => 0.07059 0.20392 0.68235.
+> rgb => 0.07059 0.20392 0.68235.
<recently read> }
l. ... }
============================================================
diff --git a/l3experimental/l3color/testfiles/m3color003.tlg b/l3experimental/l3color/testfiles/m3color003.tlg
index 8592e1fc5..d18df2a3a 100644
--- a/l3experimental/l3color/testfiles/m3color003.tlg
+++ b/l3experimental/l3color/testfiles/m3color003.tlg
@@ -74,12 +74,12 @@ Defining \l__color_named_test_tl on line ...
Defining \l__color_named_test_prop on line ...
The color test has the properties:
> model => cmyk
-> value => 0.55 0.1 0.15 0.2.
+> cmyk => 0.55 0.1 0.15 0.2.
<recently read> }
l. ... }
The color test has the properties:
> model => rgb
-> value => 0.05 0.05 0.6.
+> rgb => 0.05 0.05 0.6.
<recently read> }
l. ... }
============================================================
@@ -94,7 +94,6 @@ Defining \l__color_named_myexpr1_tl on line ...
Defining \l__color_named_myexpr1_prop on line ...
The color myexpr1 has the properties:
> model => rgb
-> value => 1 0 1
> rgb => 1 0 1
> cmyk => 1.0 0.0 0.0 1.0.
<recently read> }
@@ -103,7 +102,6 @@ Defining \l__color_named_myexpr2_tl on line ...
Defining \l__color_named_myexpr2_prop on line ...
The color myexpr2 has the properties:
> model => cmyk
-> value => 1 0 0 1
> cmyk => 1 0 0 1
> rgb => 1.0 0.0 1.0.
<recently read> }
@@ -114,7 +112,6 @@ TEST 4: Showing multiple models
============================================================
The color foo1 has the properties:
> model => cmyk
-> value => 0.1 0.2 0.3 0.4
> cmyk => 0.1 0.2 0.3 0.4
> rgb => 0.1 0.1 0.2.
<recently read> }
More information about the latex3-commits
mailing list.