[latex3-commits] [l3svn] 02/02: Basic colour expressions working

noreply at latex-project.org noreply at latex-project.org
Wed Oct 11 22:21:00 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit 979eb5d6ca7ef86ce7eda63bb89b3c212fc6e85b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Oct 11 21:20:44 2017 +0100

    Basic colour expressions working
---
 l3trial/l3color-extra/l3color-extra.dtx              |   15 ++++++++-------
 l3trial/l3color-extra/testfiles/m3color-extra001.lvt |    2 ++
 l3trial/l3color-extra/testfiles/m3color-extra001.tlg |    5 +++++
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/l3trial/l3color-extra/l3color-extra.dtx b/l3trial/l3color-extra/l3color-extra.dtx
index abdb97f..3a0774a 100644
--- a/l3trial/l3color-extra/l3color-extra.dtx
+++ b/l3trial/l3color-extra/l3color-extra.dtx
@@ -275,7 +275,7 @@
 % \begin{macro}[aux]{\@@_parse_loop:nn}
 % \begin{macro}[aux]{\@@_parse_break:w}
 % \begin{macro}[aux]{\@@_parse_end:}
-% \begin{macro}[aux, EXP]{\@@_parse_mix:Nnnn}
+% \begin{macro}[aux, EXP]{\@@_parse_mix:Nnnn, \@@_parse_mix:NVVn}
 % \begin{macro}[aux, EXP]{\@@_parse_mix:nNnn}
 % \begin{macro}[aux, EXP]
 %   {
@@ -354,7 +354,7 @@
   {
     \bool_lazy_or:nnF
       { \tl_if_blank_p:n {#1} }
-      { ! \int_compare_p:nNn {#1} = { 100 } }
+      { \int_compare_p:nNn {#1} = { 100 } }
       {
         \int_compare:nNnTF {#1} = { 0 }
           {
@@ -385,9 +385,9 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_parse_loop:nn #1#2
   {
-    \@@_if_defined:nTF {#1}
+    \@@_if_defined:nTF {#2}
       {
-        \@@_extract:nNN {#1} \l_@@_next_model_tl \l_@@_next_value_tl
+        \@@_extract:nNN {#2} \l_@@_next_model_tl \l_@@_next_value_tl
         \tl_if_eq:NNF \l_@@_model_tl \l_@@_next_model_tl
           {
             \str_if_eq_x:nnT { \l_@@_model_tl } { gray }
@@ -412,7 +412,7 @@
         \tl_set:Nx \l_@@_value_tl
           {
             \@@_parse_mix:NVVn
-              \l_@@_model_tl \l_@@_value_tl \l_@@_next_value_tl {#2}
+              \l_@@_model_tl \l_@@_value_tl \l_@@_next_value_tl {#1}
           }
       }
       {
@@ -433,9 +433,10 @@
       { \fp_eval:n { #4 / 100 } }
       #1 {#2} {#3}
   }
+\cs_generate_variant:Nn \@@_parse_mix:Nnnn { NVV }
 \cs_new:Npn \@@_parse_mix:nNnn #1#2#3#4
   {
-    \use:c { @@_parse_mix_ #2 :nnw } {#1}
+    \use:c { @@_parse_mix_ #2 :nw } {#1}
       #3 \q_mark #4 \q_stop
   }
 \cs_new:Npn \@@_parse_mix_gray:nw #1#2 \q_mark #3 \q_stop
@@ -588,7 +589,7 @@
 % A small set of colors are always defined.
 % \begin{macrocode}
 \color_set:nnn { black } { gray } { 0 }
-\color_set:nnn { white } { gray } { 0 }
+\color_set:nnn { white } { gray } { 1 }
 \color_set:nnn { cyan }    { cmyk } { 1 , 0 , 0 , 0 }
 \color_set:nnn { magenta } { cmyk } { 0 , 1 , 0 , 0 }
 \color_set:nnn { yellow }  { cmyk } { 0 , 0 , 1 , 0 }
diff --git a/l3trial/l3color-extra/testfiles/m3color-extra001.lvt b/l3trial/l3color-extra/testfiles/m3color-extra001.lvt
index 1f6fe5d..56b724d 100644
--- a/l3trial/l3color-extra/testfiles/m3color-extra001.lvt
+++ b/l3trial/l3color-extra/testfiles/m3color-extra001.lvt
@@ -29,6 +29,8 @@
   {
     \color_set:nn { foo1 } { black }
     \color_show:n { foo1 }
+    \color_set:nn { foo2 } { black!50!white }
+    \color_show:n { foo2 }
   }
 
 \TEST { Showing~colors }
diff --git a/l3trial/l3color-extra/testfiles/m3color-extra001.tlg b/l3trial/l3color-extra/testfiles/m3color-extra001.tlg
index fc9a01e..f55d56c 100644
--- a/l3trial/l3color-extra/testfiles/m3color-extra001.tlg
+++ b/l3trial/l3color-extra/testfiles/m3color-extra001.tlg
@@ -31,6 +31,11 @@ The color foo1 has the properties:
 >  value  =>  0.
 <recently read> }
 l. ...  }
+The color foo2 has the properties:
+>  model  =>  gray
+>  value  =>  0.5.
+<recently read> }
+l. ...  }
 ============================================================
 ============================================================
 TEST 3: Showing colors

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list