[latex3-commits] [git/LaTeX3-latex3-latex3] color-models: Use an internal name for Separation CS data (796441929)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Jul 9 18:29:21 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : color-models
Link : https://github.com/latex3/latex3/commit/796441929c46d1bdcf50d66c7f3ce0f8afade0c4
>---------------------------------------------------------------
commit 796441929c46d1bdcf50d66c7f3ce0f8afade0c4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Jul 9 17:29:21 2020 +0100
Use an internal name for Separation CS data
>---------------------------------------------------------------
796441929c46d1bdcf50d66c7f3ce0f8afade0c4
l3experimental/l3color/l3color.dtx | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/l3experimental/l3color/l3color.dtx b/l3experimental/l3color/l3color.dtx
index bec8b128c..20a4521b9 100644
--- a/l3experimental/l3color/l3color.dtx
+++ b/l3experimental/l3color/l3color.dtx
@@ -1357,6 +1357,13 @@
% \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{macro}{\color_model_new:nnn, \@@_model_new:nnn}
% \begin{macro}{\@@_model_separation:n}
% \begin{macro}{\@@_model_separation:nn}
@@ -1458,19 +1465,25 @@
% 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.
+% 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:nnnw
#1#2#3 #4 , #5 , #6 , #7 , #8 \s_@@_stop
{
\cs_if_exist:cTF { @@_model_separation_ #3 :nnnnn }
{
+ \int_gincr:N \g_@@_separation_int
\tl_const:cn { c_@@_fallback_ #1 _tl } { 1 }
\cs_new_eq:cN { @@_parse_mix_ #1 :nw } \@@_parse_mix_gray:nw
\cs_new:cpn { @@_parse_model_ #1 :w } ##1 , ##2 \s_@@_stop
{ {#1} { \@@_parse_number:n {##1} } }
- \cs_new_protected:cpn { @@_backend_ #1 :n } ##1
- { \@@_backend_family_separation:nn {#1} {##1} }
+ \cs_new_protected:cpx { @@_backend_ #1 :n } ##1
+ {
+ \@@_backend_family_separation:nn
+ { l3color \int_use:N \g_@@_separation_int } {##1}
+ }
\use:c { @@_model_separation_ #3 :nnnnn }
{#1} {#4} {#5} {#6} {#7}
\cs_new_protected:cpx { @@_model_ #1 _ white: }
More information about the latex3-commits
mailing list.