[latex3-commits] [git/LaTeX3-latex3-latex3] color-multi-model: Store only one model for current color (27519cc91)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Jul 1 13:51:16 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : color-multi-model
Link       : https://github.com/latex3/latex3/commit/27519cc91f3bcdd08857b5b355a18a6980b2e032

>---------------------------------------------------------------

commit 27519cc91f3bcdd08857b5b355a18a6980b2e032
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jul 1 12:51:16 2020 +0100

    Store only one model for current color


>---------------------------------------------------------------

27519cc91f3bcdd08857b5b355a18a6980b2e032
 l3experimental/l3color/l3color.dtx                    |  1 +
 l3experimental/l3color/testfiles/m3color001.lvt       | 17 +++++++++++++++++
 l3experimental/l3color/testfiles/m3color001.ptex.tlg  | 14 ++++++++++++++
 l3experimental/l3color/testfiles/m3color001.tlg       | 14 ++++++++++++++
 l3experimental/l3color/testfiles/m3color001.uptex.tlg | 14 ++++++++++++++
 l3experimental/l3color/testfiles/m3color001.xetex.tlg | 14 ++++++++++++++
 6 files changed, 74 insertions(+)

diff --git a/l3experimental/l3color/l3color.dtx b/l3experimental/l3color/l3color.dtx
index a6a59bd3e..22a2f1872 100644
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@ -910,6 +910,7 @@
   {
     \tl_set:Nx \exp_not:c { l_@@_named_ . _tl }
       { \exp_not:N \@@_model:N \exp_not:N \l_@@_current_tl }
+    \prop_clear:N \exp_not:c { l_@@_named_ . _prop }
     \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 }
diff --git a/l3experimental/l3color/testfiles/m3color001.lvt b/l3experimental/l3color/testfiles/m3color001.lvt
index ae5ab8d90..0430d250b 100644
--- a/l3experimental/l3color/testfiles/m3color001.lvt
+++ b/l3experimental/l3color/testfiles/m3color001.lvt
@@ -135,4 +135,21 @@
     \color_show:n { cyan }
   }
 
+\TEST { Managing~the~current~color }
+  {
+     \OMIT
+     \color_set:nnn { myc } { cmyk } { 0 , 1 , 0.5 , 0 }
+     \color_select:n { myc } abc
+     \TIMO
+     \color_show:n { . }
+     \color_select:n { . } abc
+     \OMIT
+     \color_set:nnn { myrc } { rgb / cmyk }
+       { 1 , 0 , 0 / 0 , 1 , 0 , 0 }
+     \color_select:n { myrc } abc
+     \TIMO
+     \color_show:n { . }
+     \color_select:n { . } abc
+  }
+
 \END
diff --git a/l3experimental/l3color/testfiles/m3color001.ptex.tlg b/l3experimental/l3color/testfiles/m3color001.ptex.tlg
index 23c161318..a3e30286c 100644
--- a/l3experimental/l3color/testfiles/m3color001.ptex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.ptex.tlg
@@ -275,3 +275,17 @@ The color cyan has the properties:
 <recently read> }
 l. ...  }
 ============================================================
+============================================================
+TEST 11: Managing the current color
+============================================================
+The color . has the properties:
+>  model  =>  cmyk
+>  cmyk  =>  0.0 1.0 0.5 0.0.
+<recently read> }
+l. ...  }
+The color . has the properties:
+>  model  =>  rgb
+>  rgb  =>  1.0 0.0 0.0.
+<recently read> }
+l. ...  }
+============================================================
diff --git a/l3experimental/l3color/testfiles/m3color001.tlg b/l3experimental/l3color/testfiles/m3color001.tlg
index b04f747cd..14c9d0930 100644
--- a/l3experimental/l3color/testfiles/m3color001.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.tlg
@@ -267,3 +267,17 @@ The color cyan has the properties:
 <recently read> }
 l. ...  }
 ============================================================
+============================================================
+TEST 11: Managing the current color
+============================================================
+The color . has the properties:
+>  model  =>  cmyk
+>  cmyk  =>  0.0 1.0 0.5 0.0.
+<recently read> }
+l. ...  }
+The color . has the properties:
+>  model  =>  rgb
+>  rgb  =>  1.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 23c161318..a3e30286c 100644
--- a/l3experimental/l3color/testfiles/m3color001.uptex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.uptex.tlg
@@ -275,3 +275,17 @@ The color cyan has the properties:
 <recently read> }
 l. ...  }
 ============================================================
+============================================================
+TEST 11: Managing the current color
+============================================================
+The color . has the properties:
+>  model  =>  cmyk
+>  cmyk  =>  0.0 1.0 0.5 0.0.
+<recently read> }
+l. ...  }
+The color . has the properties:
+>  model  =>  rgb
+>  rgb  =>  1.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 29e5c4941..1a2d66c14 100644
--- a/l3experimental/l3color/testfiles/m3color001.xetex.tlg
+++ b/l3experimental/l3color/testfiles/m3color001.xetex.tlg
@@ -267,3 +267,17 @@ The color cyan has the properties:
 <recently read> }
 l. ...  }
 ============================================================
+============================================================
+TEST 11: Managing the current color
+============================================================
+The color . has the properties:
+>  model  =>  cmyk
+>  cmyk  =>  0.0 1.0 0.5 0.0.
+<recently read> }
+l. ...  }
+The color . has the properties:
+>  model  =>  rgb
+>  rgb  =>  1.0 0.0 0.0.
+<recently read> }
+l. ...  }
+============================================================





More information about the latex3-commits mailing list.