diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-19 20:43:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-19 20:43:43 +0000 |
commit | d9eeb5b88792852d7c1c8269da7dc61a80cd87de (patch) | |
tree | 19fe62763b512146cb55737c48d92449135b4515 /Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | |
parent | d9708fcdbce4fd58921f746a388a8563e8e5ab48 (diff) |
l3 (19oct21)
git-svn-id: svn://tug.org/texlive/trunk@60803 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 112 |
1 files changed, 107 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index d22ab6a2120..65bd533c8b8 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -70,7 +70,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2021-10-17}% +\def\ExplFileDate{2021-10-18}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -28698,11 +28698,10 @@ } } } -\cs_new_protected:Npn \__color_model_init:nnn #1#2#3 +\cs_new_protected:Npn \__color_model_init:nnnnn #1#2#3#4#5 { \int_gincr:N \g__color_model_int - \tl_const:cx { c__color_fallback_ #1 _tl } - { 1 \prg_replicate:nn { #2 - 1 } { ~ 1 } } + \tl_const:cn { c__color_fallback_ #1 _tl } { #4 } \clist_map_inline:nn { fill , stroke , select } { \cs_new_protected:cpx { __color_backend_ ##1 _ #1 :n } ####1 @@ -28714,12 +28713,23 @@ \cs_new_protected:cpx { __color_model_ #1 _white: } { \prop_put:Nnn \exp_not:N \l__color_named_white_prop {#1} - { 0 \prg_replicate:nn { #2 - 1 } { ~ 0 } } + { \exp_not:n {#5} } \exp_not:N \int_compare:nNnF { \tex_currentgrouplevel:D } = 0 { \group_insert_after:N \exp_not:c { __color_model_ #1 _ white: } } } \use:c { __color_model_ #1 _white: } } +\cs_generate_variant:Nn \__color_model_init:nnnnn { nnnxx } +\cs_new_protected:Npn \__color_model_init:nnn #1#2#3 + { + \__color_model_init:nnnxx { #1 } { #2 } { #3 } + { + 1 \prg_replicate:nn { #2 - 1 } { ~ 1 } + } + { + 0 \prg_replicate:nn { #2 - 1 } { ~ 0 } + } + } \cs_new_protected:Npn \__color_model_separation:n #1 { \prop_get:NnNTF \l__color_internal_prop { name } @@ -29237,6 +29247,75 @@ #4 \s__color_mark #5 \s__color_stop } } +\prop_const_from_keyval:Nn \c__color_icc_colorspace_signatures_prop + { + 47524159 = {1} {1} {0} {}, + 52474220 = {3} {0~0~0} {1~1~1} {}, + 434D594B = {4} {0~0~0~1} {0~0~0~0} {}, + 4C616220 = {3} {0~0~0} {100~0~0} {0~100~-128~127~-128~127} + } +\cs_new_protected:Npn \__color_model_iccbased:n #1 + { + \prop_get:NnNTF \l__color_internal_prop { file } + \l__color_internal_tl + { + \exp_args:NV \__color_model_iccbased:nn + \l__color_internal_tl {#1} + } + { + \msg_error:nnn { color } + { ICCBased-requires-file } {#1} + } + } +\cs_new_protected:Npn \__color_model_iccbased:nn #1#2 + { + \exp_args:NNx \prop_get:NnNTF \c__color_icc_colorspace_signatures_prop + { \file_hex_dump:nnn { #1 } { 17 } { 20 } } \l__color_internal_tl + { + \exp_last_unbraced:NV \__color_model_iccbased_aux:nnnnnn + \l__color_internal_tl { #2 } { #1 } + } + { + \msg_error:nnn { color } + { ICCBased-unsupported-colorspace } {#2} + } + } +\cs_new_protected:Npn \__color_model_iccbased_aux:nnnnnn #1#2#3#4#5#6 + { + \__color_model_init:nnnnn {#5} {#1} { iccbased } {#2} {#3} + \use:c { __color_model_devicen_parse_ #1 :nn } {#5} {#1} + \exp_args:Nx \__color_backend_iccbased_init:nnn + { \file_full_name:n {#6} } {#1} {#4} + } +\cs_new_protected:Npn \color_profile_apply:nn #1#2 + { + \exp_args:Ne \__color_profile_apply:nn + { \file_full_name:n {#1} } {#2} + } +\cs_new_protected:Npn \__color_profile_apply:nn #1#2 + { + \cs_if_exist_use:cF { __color_profile_apply_ \tl_to_str:n {#2} :n } + { + \msg_error:nnn { color } { ICC-Device-unknown } {#2} + \use_none:n + } + {#1} + } +\cs_new_protected:Npn \__color_profile_apply_gray:n #1 + { + \int_gincr:N \g__color_model_int + \__color_backend_iccbased_device:nnn {#1} { Gray } { 1 } + } +\cs_new_protected:Npn \__color_profile_apply_rgb:n #1 + { + \int_gincr:N \g__color_model_int + \__color_backend_iccbased_device:nnn {#1} { RGB } { 3 } + } +\cs_new_protected:Npn \__color_profile_apply_cmyk:n #1 + { + \int_gincr:N \g__color_model_int + \__color_backend_iccbased_device:nnn {#1} { CMYK } { 4 } + } \cs_new_protected:Npn \color_show:n { \__color_show:Nn \msg_show:nnxxxx } \cs_new_protected:Npn \color_log:n @@ -29299,6 +29378,29 @@ \\ \\ key~was~given~with~the~correct~information. } +\msg_new:nnnn { color } { ICC-Device-unknown } + { Unknown~device~color~space~'#1'. } + { + LaTeX~has~been~asked~to~apply~an~ICC~profile~but~the~device~color~space~ + '#1'~is~unknown. + } +\msg_new:nnnn { color } { ICCBased-unsupported-colorspace } + { ICCBased~color~space~'#1'~uses~an~unsupported~data~color~space. } + { + LaTeX~has~been~asked~to~create~a~ICCBased~colorspace,~but~the~ + used~data~colorspace~is~not~supported.~ICC~profiles~used~for~ + defining~a~ICCBased~colorspace~should~use~a~Lab,~RGB,~or~ + CMYK~data~colorspace.~LaTeX~will~ignore~this~request. + } +\msg_new:nnnn { color } { ICCBased-requires-file } + { ICCBased~color~space~'#1'~require~an~file. } + { + LaTeX~has~been~asked~to~create~an~ICCBased~color~space,~but~no~\\ \\ + \iow_indent:n { file~=~<name> } + \\ \\ + key~was~given~with~the~correct~information.~LaTeX~will~ignore~this~ + request. + } \msg_new:nnnn { color } { model-already-defined } { Color~model~'#1'~already~defined. } { |