From ff5439d00ba53d3e4b82d79f78ce65524f3684fd Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 15 May 2021 03:01:02 +0000 Subject: CTAN sync 202105150301 --- .../xcolor-patches-tmp-ltx.sty | 54 ++++++++++++++-------- 1 file changed, 36 insertions(+), 18 deletions(-) (limited to 'macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty') diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index aec0fbb632..76aee08fef 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty @@ -1,26 +1,44 @@ %% LaTeX2e file `xcolor-patches.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-03-17 v0.95c patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-05-14 v0.95d patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn -\cs_gset_protected:Npn \@expl@xcolor@set@@nnn #1 #2 #3 +% #1 is the color name +% #2: model or models +% #3: value: either numbers or a color name +% #4 is the type: named or ps +\cs_gset_protected:Npn \@expl@xcolor@set@@nnnn #1 #2 #3 #4 { - \cs_if_exist:cTF { __color_parse_model_ #2 :w } - { - \color_set:nnn {#1}{#2}{#3} - } - { - \tl_if_eq:nnTF{#2}{named} - { - \color_set:nn{#1}{#3} - } - { - %this is for multi models, it will break if there is model - %l3 doesn't know, but the case is rare, so accept it for now. - \color_set:nnn{#1}{#2}{#3} - } - } + \str_case:nnF {#4} + { + % we ignore the ps type for now. + {ps}{} + {named} + { + \cs_if_exist:cT { __color_parse_model_ #2 :w } + { + \color_set:nnn {#1}{#2}{#3} + } + } + } + { + \cs_if_exist:cTF { __color_parse_model_ #2 :w } + { + \color_set:nnn {#1}{#2}{#3} + } + { + \tl_if_eq:nnTF{#2}{named}%this the model not the type! + { + \color_set:nn{#1}{#3} + } + { + %this is for multi models, it will break if there is model + %l3 doesn't know, but the case is rare, so accept it for now. + \color_set:nnn{#1}{#2}{#3} + } + } + } } \cs_generate_variant:Nn \color_set:nn {ne} \cs_new_protected:Npn \@expl@xcolor@set@@ne #1 #2 @@ -58,7 +76,7 @@ %\pretocmd{\XC@definec@lor}{\@expl@color@set@@nnn{#2}{#4}{#5}}{}{\fail} \def\XC@definec@lor[#1]#2[#3]#4#5% - {\@expl@xcolor@set@@nnn{#2}{#4}{#5}% + {\@expl@xcolor@set@@nnnn{#2}{#4}{#5}{#1}% \begingroup \XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}\edef\colornameprefix{#3}% \XC@logdef\@@nam -- cgit v1.2.3