[latex3-commits] [l3svn] 01/02: Make 'colour finalisation' available as a separate function

noreply at latex-project.org noreply at latex-project.org
Tue Oct 24 15:18:16 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 073bab5708a84c263430be3b68abd6cd972c9169
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Oct 24 14:08:02 2017 +0100

    Make 'colour finalisation' available as a separate function
    
    This will be used in the next phase of the work: adding support for
    page/box colours.
---
 l3trial/l3color-extras/l3color-extras.dtx |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/l3trial/l3color-extras/l3color-extras.dtx b/l3trial/l3color-extras/l3color-extras.dtx
index b4bb82c..69ec3b6 100644
--- a/l3trial/l3color-extras/l3color-extras.dtx
+++ b/l3trial/l3color-extras/l3color-extras.dtx
@@ -623,29 +623,34 @@
 % \end{variable}
 %
 % \begin{macro}[int]{\@@_select:}
-% \begin{macro}[aux]{\@@_select:w}
+% \begin{macro}[int]{\@@_finalise:N}
+% \begin{macro}[aux]{\@@_finalise:w}
 %   A driver-neutral location for \enquote{last minute} manipulations before
 %   handing off to the driver code.  We set the special |.| syntax here: this
-%   will therefore always be available.
+%   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:
   {
+    \@@_finalise:N \l__color_current_tl
+    \tl_set_eq:cN { l_@@_named_ . _tl } \l__color_current_tl
+    \__driver_color_select:
+  }
+\cs_new_protected:Npn \@@_finalise:N #1
+  {
     \tl_if_empty:NF \l_color_fixed_model_tl
       {
-        \exp_after:wN \@@_select:w
-          \l__color_current_tl \q_stop
+        \exp_after:wN \@@_finalise:w #1 \q_stop
         \tl_if_eq:NNF \l_@@_model_tl \l_color_fixed_model_tl
           {
             \@@_convert:VVN \l_@@_model_tl \l_color_fixed_model_tl
               \l_@@_value_tl
           }
-        \tl_set:Nx \l__color_current_tl
+        \tl_set:Nx #1
           { \l_color_fixed_model_tl \c_space_tl \l_@@_value_tl }
       }
-    \tl_set_eq:cN { l_@@_named_ . _tl } \l__color_current_tl
-    \__driver_color_select:
   }
-\cs_new_protected:Npn \@@_select:w #1 ~ #2 \q_stop
+\cs_new_protected:Npn \@@_finalise:w #1 ~ #2 \q_stop
   {
     \tl_set:Nn \l_@@_model_tl {#1}
     \tl_set:Nn \l_@@_value_tl {#2}

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


More information about the latex3-commits mailing list