diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty index 9b5e7cabac5..5d1bf6553e0 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty @@ -20,7 +20,7 @@ %% %% File: l3color.dtx Copyright(C) 2017-2018 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3color}{2018/02/21}{} +\ProvidesExplPackage{l3color}{2018/03/05}{} {L3 Experimental color support} \tl_new:N \l__color_tmp_tl \prg_new_conditional:Npnn \__color_if_defined:n #1 { T, F, TF } @@ -86,6 +86,8 @@ \tl_new:N \l__color_next_value_tl \cs_new_protected:Npn \color_parse:nN #1#2 { + \driver_color_pickup:N \l__color_current_tl + \tl_set_eq:cN { l__color_named_ . _tl } \l__color_current_tl \group_begin: \seq_map_inline:Nn \l_char_active_seq { @@ -101,6 +103,7 @@ \tl_if_exist:cTF { l__color_named_ #1 _tl } { \tl_set_eq:Nc #2 { l__color_named_ #1 _tl } } { \__color_parse:Nw #2#1 ! \q_stop } + \__color_check_model:N #2 } \cs_new_protected:Npn \__color_parse:Nw #1#2 ! #3 \q_stop { @@ -228,17 +231,11 @@ \cs_new:Npn \__color_parse_spot_aux:w #1 ! #2 ! #3 \q_stop { #1 ~ \fp_eval:n { #2 / 100 } } \tl_new:N \l_color_fixed_model_tl -\cs_new_protected:Npn \__color_select: - { - \__color_finalise:N \l__color_current_tl - \tl_set_eq:cN { l__color_named_ . _tl } \l__color_current_tl - \__color_select:V \l__color_current_tl - } -\cs_new_protected:Npn \__color_finalise:N #1 +\cs_new_protected:Npn \__color_check_model:N #1 { \tl_if_empty:NF \l_color_fixed_model_tl { - \exp_after:wN \__color_finalise:w #1 \q_stop + \exp_after:wN \__color_check_model:w #1 \q_stop \tl_if_eq:NNF \l__color_model_tl \l_color_fixed_model_tl { \__color_convert:VVN \l__color_model_tl \l_color_fixed_model_tl @@ -248,11 +245,16 @@ { \l_color_fixed_model_tl \c_space_tl \l__color_value_tl } } } -\cs_new_protected:Npn \__color_finalise:w #1 ~ #2 \q_stop +\cs_new_protected:Npn \__color_check_model:w #1 ~ #2 \q_stop { \tl_set:Nn \l__color_model_tl {#1} \tl_set:Nn \l__color_value_tl {#2} } +\cs_new_protected:Npn \__color_select: + { + \tl_set_eq:cN { l__color_named_ . _tl } \l__color_current_tl + \__color_select:V \l__color_current_tl + } \cs_new_protected:Npn \color_select:n #1 { \color_parse:nN {#1} \l__color_current_tl @@ -269,6 +271,7 @@ { \tl_set:Nx #3 { #1 ~ \use:c { __color_parse_ #1 :w } #2 , 0 , 0 , 0 , 0 \q_stop } + \__color_check_model:N #3 } { \__kernel_msg_error:nnn { color } { invalid-model } {#1} @@ -315,6 +318,7 @@ \color_set:nnn { green } { rgb } { 0 , 1 , 0 } \color_set:nnn { blue } { rgb } { 0 , 0 , 1 } \tl_new:c { l__color_named_._tl } +\tl_set_eq:cN { l__color_named_._tl } \l__color_current_tl \cs_new_protected:Npn \color_show:n #1 { \msg_show:nnxxxx { LaTeX / color } { show } |