summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-03-07 21:50:56 +0000
committerKarl Berry <karl@freefriends.org>2018-03-07 21:50:56 +0000
commitf11f49763fc33ac8427d8c175d98a8d1275e4c5c (patch)
tree79aacd4b6ab168db69112977f42c2c99204e1621 /Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx
parentfb72b3560bdc8a98d78bf919da56c3316fa7723d (diff)
l3 (6mar18)
git-svn-id: svn://tug.org/texlive/trunk@46875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx47
1 files changed, 29 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx b/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx
index f00c047afff..68eaa14452d 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2018/02/21}
+% \date{Released 2018/03/05}
%
% \maketitle
%
@@ -263,7 +263,7 @@
%
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{l3color}{2018/02/21}{}
+\ProvidesExplPackage{l3color}{2018/03/05}{}
{L3 Experimental color support}
%</package>
% \end{macrocode}
@@ -445,6 +445,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \color_parse:nN #1#2
{
+%<*package>
+ \driver_color_pickup:N \l_@@_current_tl
+ \tl_set_eq:cN { l_@@_named_ . _tl } \l_@@_current_tl
+%</package>
\group_begin:
\seq_map_inline:Nn \l_char_active_seq
{
@@ -465,6 +469,7 @@
\tl_if_exist:cTF { l_@@_named_ #1 _tl }
{ \tl_set_eq:Nc #2 { l_@@_named_ #1 _tl } }
{ \@@_parse:Nw #2#1 ! \q_stop }
+ \@@_check_model:N #2
}
\cs_new_protected:Npn \@@_parse:Nw #1#2 ! #3 \q_stop
{
@@ -651,25 +656,15 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_select:}
-% \begin{macro}{\@@_finalise:N}
-% \begin{macro}{\@@_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. The finalisation is separate from the
-% main function so it can also be applied to \emph{e.g.}~page color.
+% \begin{macro}{\@@_check_model:N}
+% \begin{macro}{\@@_check_model:w}
+% Check that the model in use is the one required.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_select:
- {
- \@@_finalise:N \l_@@_current_tl
- \tl_set_eq:cN { l_@@_named_ . _tl } \l_@@_current_tl
- \@@_select:V \l_@@_current_tl
- }
-\cs_new_protected:Npn \@@_finalise:N #1
+\cs_new_protected:Npn \@@_check_model:N #1
{
\tl_if_empty:NF \l_color_fixed_model_tl
{
- \exp_after:wN \@@_finalise:w #1 \q_stop
+ \exp_after:wN \@@_check_model: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
@@ -679,7 +674,7 @@
{ \l_color_fixed_model_tl \c_space_tl \l_@@_value_tl }
}
}
-\cs_new_protected:Npn \@@_finalise:w #1 ~ #2 \q_stop
+\cs_new_protected:Npn \@@_check_model:w #1 ~ #2 \q_stop
{
\tl_set:Nn \l_@@_model_tl {#1}
\tl_set:Nn \l_@@_value_tl {#2}
@@ -688,6 +683,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_select:}
+% 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. 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:
+ {
+ \tl_set_eq:cN { l_@@_named_ . _tl } \l_@@_current_tl
+ \@@_select:V \l_@@_current_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\color_select:n}
% \begin{macro}{\color_select:nn}
% Parse the input expressions then get the driver to actually activate
@@ -718,6 +727,7 @@
{
\tl_set:Nx #3
{ #1 ~ \use:c { @@_parse_ #1 :w } #2 , 0 , 0 , 0 , 0 \q_stop }
+ \@@_check_model:N #3
}
{
\__kernel_msg_error:nnn { color } { invalid-model } {#1}
@@ -803,6 +813,7 @@
% definition.
% \begin{macrocode}
\tl_new:c { l_@@_named_._tl }
+\tl_set_eq:cN { l_@@_named_._tl } \l_@@_current_tl
% \end{macrocode}
% \end{variable}
%