summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-07-17 21:45:53 +0000
committerKarl Berry <karl@freefriends.org>2020-07-17 21:45:53 +0000
commit522964b40afca63660485cdcfc577b25bdf02e35 (patch)
treea49bd7b714409b6b06338b793d7c9921f0398f8f /Master/texmf-dist/tex/latex/l3experimental
parent7f75afca3aa3d645c67ee84efeb01c08482d71ac (diff)
l3 (17jul20)
git-svn-id: svn://tug.org/texlive/trunk@55860 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty266
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty336
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty4
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty2
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty2
11 files changed, 279 insertions, 343 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty
index 8cfd64a9f3c..7c9d604ad24 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty
@@ -20,7 +20,7 @@
%%
%% File: l3benchmark.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3benchmark}{2020-06-18}{}
+\ProvidesExplPackage{l3benchmark}{2020-07-17}{}
{L3 Experimental benchmarking}
\sys_if_engine_luatex:TF
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty b/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty
deleted file mode 100644
index 05010d629cf..00000000000
--- a/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty
+++ /dev/null
@@ -1,266 +0,0 @@
-%%
-%% This is file `l3cctab.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% l3cctab.dtx (with options: `package')
-%%
-%% Copyright (C) 2018-2020 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License (LPPL), either version 1.3c of
-%% this license or (at your option) any later version. The latest
-%% version of this license is in the file:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3experimental bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% File: l3cctab.dtx
-\RequirePackage{expl3}
-\ProvidesExplPackage{l3cctab}{2020-06-18}{}
- {L3 Experimental category code tables}
-\int_new:N \g__cctab_allocate_int
-\int_gset:Nn \g__cctab_allocate_int { -1 }
-\int_new:N \g__cctab_stack_int
-\seq_new:N \g__cctab_stack_seq
-\tl_new:N \l__cctab_tmp_tl
-\sys_if_engine_luatex:TF
- {
- \cs_new_protected:Npn \cctab_new:N #1
- {
- \__kernel_chk_if_free_cs:N #1
- \newcatcodetable #1
- }
- \cs_new_protected:Npn \__cctab_begin:N #1
- {
- \seq_gpush:Nx \g__cctab_stack_seq { \tex_the:D \tex_catcodetable:D }
- \tex_catcodetable:D #1
- \int_gadd:Nn \g__cctab_stack_int { 2 }
- \int_compare:nNnT \g__cctab_stack_int > \c_max_register_int
- { \__kernel_msg_fatal:nn { kernel } { cctab-stack-full } }
- \tex_savecatcodetable:D \g__cctab_stack_int
- \tex_catcodetable:D \g__cctab_stack_int
- }
- \cs_new_protected:Npn \__cctab_end:
- {
- \int_gsub:Nn \g__cctab_stack_int { 2 }
- \seq_if_empty:NTF \g__cctab_stack_seq
- { \tl_set:Nn \l__cctab_tmp_tl { 0 } }
- { \seq_gpop:NN \g__cctab_stack_seq \l__cctab_tmp_tl }
- \tex_catcodetable:D \l__cctab_tmp_tl \scan_stop:
- }
- \cs_new_protected:Npn \cctab_gset:Nn #1#2
- {
- \group_begin:
- #2 \scan_stop:
- \tex_savecatcodetable:D #1
- \group_end:
- }
- }
- {
- \cs_new_protected:Npn \__cctab_gstore:Nnn #1#2#3
- {
- \intarray_gset:cnn
- { g__cctab_ \int_use:N #1 _cctab } { #2 + 1 } {#3}
- }
- \cs_new_protected:Npn \cctab_new:N #1
- {
- \int_gadd:Nn \g__cctab_allocate_int { 2 }
- \int_const:Nn #1 { \g__cctab_allocate_int }
- \intarray_new:cn { g__cctab_ \int_use:N #1 _cctab } { 256 }
- \int_step_inline:nn { 256 }
- {
- \intarray_gset:cnn
- { g__cctab_ \int_use:N #1 _cctab } {##1} { 12 }
- }
- \__cctab_gstore:Nnn #1 { 0 } { 9 }
- \__cctab_gstore:Nnn #1 { 13 } { 5 }
- \__cctab_gstore:Nnn #1 { 32 } { 10 }
- \__cctab_gstore:Nnn #1 { 37 } { 14 }
- \int_step_inline:nnn { 65 } { 90 }
- { \__cctab_gstore:Nnn #1 {##1} { 11 } }
- \__cctab_gstore:Nnn #1 { 92 } { 0 }
- \int_step_inline:nnn { 97 } { 122 }
- { \__cctab_gstore:Nnn #1 {##1} { 11 } }
- \__cctab_gstore:Nnn #1 { 127 } { 15 }
- }
- \cs_new_protected:Npn \__cctab_begin:N #1
- {
- \int_gadd:Nn \g__cctab_stack_int { 2 }
- \int_compare:nNnT \g__cctab_stack_int > \c_max_register_int
- { \__kernel_msg_fatal:nn { kernel } { cctab-stack-full } }
- \cs_if_exist:cF { g__cctab_ \int_use:N \g__cctab_stack_int _cctab }
- {
- \intarray_new:cn
- { g__cctab_ \int_use:N \g__cctab_stack_int _cctab }
- { 256 }
- }
- \int_step_inline:nn { 256 }
- {
- \intarray_gset:cnn
- { g__cctab_ \int_use:N \g__cctab_stack_int _cctab }
- {##1}
- { \char_value_catcode:n { ##1 - 1 } }
- }
- \int_step_inline:nn { 256 }
- {
- \char_set_catcode:nn { ##1 - 1 }
- {
- \intarray_item:cn
- { g__cctab_ \int_use:N #1 _cctab } {##1}
- }
- }
- }
- \cs_generate_variant:Nn \intarray_new:Nn { c }
- \cs_generate_variant:Nn \intarray_gset:Nnn { c }
- \cs_new_protected:Npn \__cctab_end:
- {
- \int_step_inline:nn { 256 }
- {
- \char_set_catcode:nn { ##1 - 1 }
- {
- \intarray_item:cn
- { g__cctab_ \int_use:N \g__cctab_stack_int _cctab }
- {##1}
- }
- }
- \int_gsub:Nn \g__cctab_stack_int { 2 }
- }
- \cs_generate_variant:Nn \intarray_item:Nn { c }
- \cs_new_protected:Npn \cctab_gset:Nn #1#2
- {
- \group_begin:
- #2 \scan_stop:
- \int_step_inline:nn { 256 }
- {
- \intarray_gset:cnn { g__cctab_ \int_use:N #1 _cctab } {##1}
- { \char_value_catcode:n { ##1 - 1 } }
- }
- \group_end:
- }
- }
-\cs_generate_variant:Nn \cctab_new:N { c }
-\cs_generate_variant:Nn \cctab_gset:Nn { c }
-\cs_new_protected:Npn \cctab_begin:N #1
- { \__cctab_chk_if_valid:NT #1 { \__cctab_begin:N #1 } }
-\cs_generate_variant:Nn \cctab_begin:N { c }
-\cs_new_protected:Npn \cctab_end:
- {
- \int_compare:nNnTF { \g__cctab_stack_int } = { \c_zero_int }
- { \__kernel_msg_error:nn { kernel } { cctab-extra-end } }
- { \__cctab_end: }
- }
-\cs_new_protected:Npn \cctab_select:N #1
- {
- \__cctab_chk_if_valid:NT #1
- {
- \__cctab_begin:N #1
- \group_insert_after:N \__cctab_end_fast:
- }
- }
-\cs_generate_variant:Nn \cctab_select:N { c }
-\cs_new_protected:Npx \__cctab_end_fast:
- {
- \int_gsub:Nn \exp_not:N \g__cctab_stack_int { 2 }
- \sys_if_engine_luatex:T
- { \seq_gpop:NN \exp_not:N \g__cctab_stack_seq \exp_not:N \l__cctab_tmp_tl }
- }
-\prg_new_eq_conditional:NNn \cctab_if_exist:N \cs_if_exist:N
- { TF , T , F , p }
-\prg_new_eq_conditional:NNn \cctab_if_exist:c \cs_if_exist:c
- { TF , T , F , p }
-\sys_if_engine_luatex:TF
- {
- \prg_new_protected_conditional:Npnn \__cctab_chk_if_valid:N #1
- { TF , T , F }
- {
- \cctab_if_exist:NTF #1
- {
- \int_compare:nNnTF {#1-1} < { \e@alloc@ccodetable@count }
- { \prg_return_true: }
- {
- \__kernel_msg_error:nnx { kernel } { invalid-cctab }
- { \token_to_str:N #1 }
- \prg_return_false:
- }
- }
- {
- \__kernel_msg_error:nnx { kernel } { command-not-defined }
- { \token_to_str:N #1 }
- \prg_return_false:
- }
- }
- }
- {
- \prg_new_protected_conditional:Npnn \__cctab_chk_if_valid:N #1
- { TF , T , F }
- {
- \cctab_if_exist:NTF #1
- {
- \cs_if_exist:cTF { g__cctab_ \int_use:N #1 _cctab }
- { \prg_return_true: }
- {
- \__kernel_msg_error:nnx { kernel } { invalid-cctab }
- { \token_to_str:N #1 }
- \prg_return_false:
- }
- }
- {
- \__kernel_msg_error:nnx { kernel } { command-not-defined }
- { \token_to_str:N #1 }
- \prg_return_false:
- }
- }
- }
-\cs_new_protected:Npn \cctab_const:Nn #1#2
- {
- \cctab_new:N #1
- \cctab_gset:Nn #1 {#2}
- }
-\cs_generate_variant:Nn \cctab_const:Nn { c }
-\cctab_new:N \c_initex_cctab
-\cctab_const:Nn \c_code_cctab { }
-\cctab_const:Nn \c_document_cctab
- {
- \char_set_catcode_space:n { 9 }
- \char_set_catcode_space:n { 32 }
- \char_set_catcode_other:n { 58 }
- \char_set_catcode_math_subscript:n { 95 }
- \char_set_catcode_active:n { 126 }
- }
-\cctab_const:Nn \c_other_cctab
- {
- \int_step_inline:nnn { 0 } { 127 }
- { \char_set_catcode_other:n {#1} }
- }
-\cctab_const:Nn \c_str_cctab
- {
- \int_step_inline:nnn { 0 } { 127 }
- { \char_set_catcode_other:n {#1} }
- \char_set_catcode_space:n { 32 }
- }
-\__kernel_msg_new:nnnn { kernel } { cctab-stack-full }
- { The~category~code~table~stack~is~exhausted. }
- {
- LaTeX~has~been~asked~to~switch~to~a~new~category~code~table,~
- but~there~is~no~more~space~to~do~this!
- }
-\__kernel_msg_new:nnnn { kernel } { cctab-extra-end }
- { Extra~\iow_char:N\\cctab_end:~ignored~\msg_line_context:. }
- {
- LaTeX~came~across~a~\iow_char:N\\cctab_end:~without~a~matching~
- \iow_char:N\\cctab_begin:N.~This~command~will~be~ignored.
- }
-\__kernel_msg_new:nnnn { kernel } { invalid-cctab }
- { Invalid~\iow_char:N\\catcode~table. }
- {
- You~can~only~switch~to~a~\iow_char:N\\catcode~table~that~is~
- initialized~using~\iow_char:N\\cctab_new:N~or~
- \iow_char:N\\cctab_const:Nn.
- }
-%%
-%%
-%% End of file `l3cctab.sty'.
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty
index 5020a57c4dd..3a81714bff8 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty
@@ -20,30 +20,24 @@
%%
%% File: l3color.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3color}{2020-06-18}{}
+\ProvidesExplPackage{l3color}{2020-07-17}{}
{L3 Experimental color support}
\tl_new:N \l__color_internal_tl
\scan_new:N \s__color_mark
\prg_new_conditional:Npnn \__color_if_defined:n #1 { T, F, TF }
{
- \tl_if_exist:cTF { l__color_named_ #1 _tl }
+ \prop_if_exist:cTF { l__color_named_ #1 _prop }
\prg_return_true:
\prg_return_false:
}
+\cs_new:Npn \__color_model:N #1 { \exp_after:wN \use_i:nn #1 }
+\cs_new:Npn \__color_values:N #1 { \exp_after:wN \use_ii:nn #1 }
\cs_new_protected:Npn \__color_extract:nNN #1#2#3
{
- \exp_after:wN \exp_after:wN \exp_after:wN
- \__color_extract:NNnn
- \exp_after:wN \exp_after:wN \exp_after:wN #2
- \exp_after:wN \exp_after:wN \exp_after:wN #3
- \cs:w l__color_named_ #1 _tl \cs_end:
+ \tl_set_eq:Nc #2 { l__color_named_ #1 _tl }
+ \prop_get:cVN { l__color_named_ #1 _prop } #2 #3
}
\cs_generate_variant:Nn \__color_extract:nNN { V }
-\cs_new_protected:Npn \__color_extract:NNnn #1#2#3#4
- {
- \tl_set:Nn #1 {#3}
- \tl_set:Nn #2 {#4}
- }
\cs_new_protected:Npn \__color_convert:nnN #1#2#3
{ \__color_convert:nnVN {#1} {#2} #3 #3 }
\cs_generate_variant:Nn \__color_convert:nnN { VV }
@@ -54,7 +48,7 @@
\tl_set:Nx #4
{ \use:c { __color_convert_ #1 _ #2 :w } #3 ~ 0 ~ 0 ~ 0 \s__color_stop }
}
-\cs_generate_variant:Nn \__color_convert:nnnN { nnV }
+\cs_generate_variant:Nn \__color_convert:nnnN { nV , nnV }
\cs_new:Npn \__color_convert_gray_rgb:w #1 ~ #2 \s__color_stop
{ #1 ~ #1 ~ #1 }
\cs_new:Npn \__color_convert_gray_cmyk:w #1 ~ #2 \s__color_stop
@@ -85,30 +79,61 @@
\tl_new:N \l__color_value_tl
\tl_new:N \l__color_next_model_tl
\tl_new:N \l__color_next_value_tl
-\cs_new_protected:Npn \color_parse:nN #1#2
+\cs_new_protected:Npx \__color_parse:nN #1#2
{
- \__color_backend_pickup:N \l__color_current_tl
- \tl_set_eq:cN { l__color_named_ . _tl } \l__color_current_tl
- \exp_args:Ne \__color_parse:nN { \tl_to_str:n {#1} } #2
+ \exp_not:N \__color_backend_pickup:N \exp_not:N \l__color_current_tl
+ \tl_set:Nx \exp_not:c { l__color_named_ . _tl }
+ { \exp_not:N \__color_model:N \exp_not:N \l__color_current_tl }
+ \prop_put:NVx \exp_not:c { l__color_named_ . _prop }
+ \exp_not:c { l__color_named_ . _tl }
+ { \exp_not:N \__color_values:N \exp_not:N \l__color_current_tl }
+ \exp_not:N \exp_args:Ne \exp_not:N \__color_parse_aux:nN
+ { \exp_not:N \tl_to_str:n {#1} } #2
}
-\cs_new_protected:Npn \__color_parse:nN #1#2
+\cs_new_protected:Npn \__color_parse_aux:nN #1#2
{
- \tl_if_exist:cTF { l__color_named_ #1 _tl }
- { \tl_set_eq:Nc #2 { l__color_named_ #1 _tl } }
+ \tl_if_exist:cTF { l__color_named_ #1 _prop }
+ { \__color_parse_set_eq:Nn #2 {#1} }
{ \__color_parse:Nw #2#1 ! \s__color_stop }
\__color_check_model:N #2
}
+\cs_new_protected:Npn \__color_parse_set_eq:Nn #1#2
+ {
+ \tl_if_empty:NTF \l_color_fixed_model_tl
+ { \exp_args:Nv \__color_parse_set_eq:nNn { l__color_named_ #2 _tl } }
+ { \exp_args:NV \__color_parse_set_eq:nNn \l_color_fixed_model_tl }
+ #1 {#2}
+ }
+\cs_new_protected:Npn \__color_parse_set_eq:nNn #1#2#3
+ {
+ \prop_get:cnNTF
+ { l__color_named_ #3 _prop } {#1}
+ \l__color_value_tl
+ { \tl_set:Nx #2 { {#1} { \l__color_value_tl } } }
+ {
+ \tl_set_eq:Nc \l__color_model_tl { l__color_named_ #3 _tl }
+ \prop_get:cVN { l__color_named_ #3 _prop } \l__color_model_tl
+ \l__color_value_tl
+ \__color_convert:nnN
+ \l__color_model_tl {#1} \l__color_value_tl
+ \tl_set:Nx #2
+ {
+ {#1}
+ { \l__color_value_tl }
+ }
+ }
+ }
\cs_new_protected:Npn \__color_parse:Nw #1#2 ! #3 \s__color_stop
{
\__color_if_defined:nTF {#2}
{
\tl_if_blank:nTF {#3}
- { \tl_set_eq:Nc #1 { l__color_named_ #2 _tl } }
+ { \__color_parse_set_eq:Nn #1 {#2} }
{ \__color_parse_loop_init:Nnn #1 {#2} {#3} }
}
{
\__kernel_msg_error:nnn { color } { unknown-color } {#2}
- \tl_set_eq:NN \l__color_current_tl \l__color_named_black_tl
+ \tl_set:Nn \l__color_current_tl { { gray } { 0 } }
}
}
\cs_new_protected:Npn \__color_parse_loop_init:Nnn #1#2#3
@@ -153,24 +178,9 @@
\__color_extract:nNN {#2} \l__color_next_model_tl \l__color_next_value_tl
\tl_if_eq:NNF \l__color_model_tl \l__color_next_model_tl
{
- \str_if_eq:VnT \l__color_model_tl { gray }
- {
- \use:x
- {
- \tl_set:Nn \exp_not:N \l__color_model_tl
- { \l__color_next_model_tl }
- \tl_set:Nn \exp_not:N \l__color_value_tl
- { \l__color_next_value_tl }
- \tl_set:Nn \exp_not:N \l_next__color_model_tl
- { \l__color_model_tl }
- \tl_set:Nn \exp_not:N \l_next__color_value_tl
- { \l__color_value_tl }
- }
- }
- \__color_convert:VVN
- \l__color_next_model_tl
- \l__color_model_tl
- \l__color_next_value_tl
+ \str_if_eq:VnTF \l__color_model_tl { gray }
+ { \__color_parse_gray:n {#2} }
+ { \__color_parse_std:n {#2} }
}
\tl_set:Nx \l__color_value_tl
{
@@ -184,6 +194,27 @@
\__color_parse_break:w
}
}
+\cs_new_protected:Npn \__color_parse_gray:n #1
+ {
+ \tl_set_eq:NN \l__color_model_tl \l__color_next_model_tl
+ \tl_set:Nn \l__color_next_model_tl { gray }
+ \exp_args:NnV \__color_convert:nnN { gray } \l__color_model_tl
+ \l__color_value_tl
+ \prop_get:cVN { l__color_named_ #1 _prop } \l__color_model_tl
+ \l__color_next_value_tl
+ }
+\cs_new_protected:Npn \__color_parse_std:n #1
+ {
+ \prop_get:cVNF { l__color_named_ #1 _prop }
+ \l__color_model_tl
+ \l__color_next_value_tl
+ {
+ \__color_convert:VVN
+ \l__color_next_model_tl
+ \l__color_model_tl
+ \l__color_next_value_tl
+ }
+ }
\cs_new_protected:Npn \__color_parse_break:w #1 \__color_parse_end: { }
\cs_new_protected:Npn \__color_parse_end: { }
\cs_new:Npn \__color_parse_mix:Nnnn #1#2#3#4
@@ -334,60 +365,148 @@
\tl_set:Nn \l__color_model_tl {#1}
\tl_set:Nn \l__color_value_tl {#2}
}
-\cs_new_protected:Npn \__color_select:
+\cs_new_protected:Npx \__color_select:
{
- \tl_set_eq:cN { l__color_named_ . _tl } \l__color_current_tl
- \__color_select:N \l__color_current_tl
+ \tl_set:Nx \exp_not:c { l__color_named_ . _tl }
+ { \exp_not:N \__color_model:N \exp_not:N \l__color_current_tl }
+ \prop_clear:N \exp_not:c { l__color_named_ . _prop }
+ \prop_put:NVx \exp_not:c { l__color_named_ . _prop }
+ \exp_not:c { l__color_named_ . _tl }
+ { \exp_not:N \__color_values:N \exp_not:N \l__color_current_tl }
+ \__color_select:N \exp_not:N \l__color_current_tl
}
\cs_new_protected:Npn \color_select:n #1
{
- \color_parse:nN {#1} \l__color_current_tl
+ \__color_parse:nN {#1} \l__color_current_tl
\__color_select:
}
\cs_new_protected:Npn \color_select:nn #1#2
{
- \__color_direct:nnN {#1} {#2} \l__color_current_tl
+ \__color_select_main:Nw \l__color_current_tl
+ #1 / / \s__color_mark #2 / / \s__color_stop
\__color_select:
}
-\cs_new_protected:Npn \__color_direct:nnN #1#2#3
+\cs_new_protected:Npn \__color_select_main:Nw
+ #1 #2 / #3 / #4 \s__color_mark #5 / #6 / #7 \s__color_stop
+ {
+ \__color_select:nnN {#2} {#5} #1
+ \bool_lazy_or:nnF
+ { \tl_if_empty_p:N \l_color_fixed_model_tl }
+ { \str_if_eq_p:nV {#2} \l_color_fixed_model_tl }
+ { \__color_select_loop:Nw #1 #3 / #4 \s__color_mark #6 / #7 \s__color_stop }
+ }
+\cs_new_protected:Npn \__color_select_loop:Nw
+ #1 #2 / #3 \s__color_mark #4 / #5 \s__color_stop
+ {
+ \str_if_eq:nVTF {#2} \l_color_fixed_model_tl
+ { \__color_select:nnN {#2} {#4} #1 }
+ {
+ \tl_if_blank:nTF {#2}
+ { \exp_after:wN \__color_select_swap:Nnn \exp_after:wN #1 #1 }
+ { \__color_select_loop:Nw #1 #3 \s__color_mark #5 \s__color_stop }
+ }
+ }
+\cs_new_protected:Npn \__color_select:nnN #1#2#3
{
\cs_if_exist:cTF { __color_parse_model_ #1 :w }
{
\tl_set:Nx #3
{ \use:c { __color_parse_model_ #1 :w } #2 , 0 , 0 , 0 , 0 \s__color_stop }
- \__color_check_model:N #3
- }
- {
- \__kernel_msg_error:nnn { color } { unknown-model } {#1}
}
+ { \__kernel_msg_error:nnn { color } { unknown-model } {#1} }
+ }
+\cs_new_protected:Npn \__color_select_swap:Nnn #1#2#3
+ {
+ \__color_convert:nVnN {#2} \l_color_fixed_model_tl {#3} \l__color_value_tl
+ \tl_set:Nx #1
+ { { \l_color_fixed_model_tl } { \l__color_value_tl } }
}
\tl_new:N \l__color_named_tl
-\cs_new_protected:Npn \__color_store:Nn #1#2
+\cs_new_protected:Npn \color_set:nn #1#2
+ {
+ \exp_args:NV \__color_set:nnn
+ \l_color_fixed_model_tl {#1} {#2}
+ }
+\cs_new_protected:Npn \__color_set:nnn #1#2#3
{
- \str_if_eq:nnF {#2} { . }
+ \tl_clear:N \l_color_fixed_model_tl
+ \__color_set:nn {#2} {#3}
+ \tl_set:Nn \l_color_fixed_model_tl {#1}
+ }
+\cs_new_protected:Npn \__color_set:nn #1#2
+ {
+ \str_if_eq:nnF {#1} { . }
{
- \tl_clear_new:c { l__color_named_ #2 _tl }
- \tl_set_eq:cN { l__color_named_ #2 _tl } #1
+ \__color_parse:nN {#2} \l__color_named_tl
+ \tl_clear_new:c { l__color_named_ #1 _tl }
+ \tl_set:cx { l__color_named_ #1 _tl }
+ { \__color_model:N \l__color_named_tl }
+ \prop_clear_new:c { l__color_named_ #1 _prop }
+ \prop_put:cvx { l__color_named_ #1 _prop } { l__color_named_ #1 _tl }
+ { \__color_values:N \l__color_named_tl }
+ \__color_set:nnw {#1} {#2} #2 ! \s__color_stop
}
}
-\cs_new_protected:Npn \color_set:nn #1#2
+\cs_new_protected:Npn \__color_set:nnw #1#2#3 ! #4 \s__color_stop
{
- \color_parse:nN {#2} \l__color_named_tl
- \__color_store:Nn \l__color_named_tl {#1}
+ \clist_map_inline:nn { cmyk , gray , rgb }
+ {
+ \prop_get:cnNT { l__color_named_ #3 _prop } {##1} \l__color_internal_tl
+ {
+ \prop_if_in:cnF { l__color_named_ #1 _prop } {##1}
+ {
+ \group_begin:
+ \tl_set:cn { l__color_named_ #3 _tl } {##1}
+ \__color_parse:nN {#2} \l__color_internal_tl
+ \exp_args:NNNV \group_end:
+ \tl_set:Nn \l__color_internal_tl \l__color_internal_tl
+ \prop_put:cxx { l__color_named_ #1 _prop }
+ { \__color_model:N \l__color_internal_tl }
+ { \__color_values:N \l__color_internal_tl }
+ }
+ }
+ }
}
\cs_new_protected:Npn \color_set:nnn #1#2#3
{
- \__color_direct:nnN {#2} {#3} \l__color_named_tl
- \__color_store:Nn \l__color_named_tl {#1}
+ \str_if_eq:nnF {#1} { . }
+ {
+ \tl_clear_new:c { l__color_named_ #1 _tl }
+ \prop_clear_new:c { l__color_named_ #1 _prop }
+ \__color_set_loop:nw {#1} #2 / / \s__color_mark #3 / / \s__color_stop
+ }
+ }
+\cs_new_protected:Npn \__color_set_loop:nw
+ #1#2 / #3 \s__color_mark #4 / #5 \s__color_stop
+ {
+ \tl_if_blank:nF {#2}
+ {
+ \__color_select:nnN {#2} {#4} \l__color_named_tl
+ \tl_set:Nx \l__color_internal_tl { \__color_model:N \l__color_named_tl }
+ \tl_if_empty:cT { l__color_named_ #1 _tl }
+ { \tl_set_eq:cN { l__color_named_ #1 _tl } \l__color_internal_tl }
+ \prop_put:cVx { l__color_named_ #1 _prop } \l__color_internal_tl
+ { \__color_values:N \l__color_named_tl }
+ \__color_set_loop:nw {#1} #3 \s__color_mark #5 \s__color_stop
+ }
}
\cs_new_protected:Npn \color_set_eq:nn #1#2
{
\__color_if_defined:nTF {#2}
{
\tl_clear_new:c { l__color_named_ #1 _tl }
+ \prop_clear_new:c { l__color_named_ #1 _prop }
\str_if_eq:nnTF {#2} { . }
- { \tl_set_eq:cN { l__color_named_ #1 _tl } \l__color_current_tl }
- { \tl_set_eq:cc { l__color_named_ #1 _tl } { l__color_named_ #2 _tl } }
+ {
+ \tl_set:cx { l__color_named_ #1 _tl }
+ { \__color_model:N \l__color_current_tl }
+ \prop_put:cvx { l__color_named_ #1 _prop } { l__color_named_ #1 _tl }
+ { \__color_values:N \l__color_current_tl }
+ }
+ {
+ \tl_set_eq:cc { l__color_named_ #1 _tl } { l__color_named_ #2 _tl }
+ \prop_set_eq:cc { l__color_named_ #1 _prop } { l__color_named_ #2 _prop }
+ }
}
{
\__kernel_msg_error:nnn { color } { unknown-color } {#2}
@@ -401,24 +520,101 @@
\color_set:nnn { red } { rgb } { 1 , 0 , 0 }
\color_set:nnn { green } { rgb } { 0 , 1 , 0 }
\color_set:nnn { blue } { rgb } { 0 , 0 , 1 }
+\prop_new:c { l__color_named_._prop }
\tl_new:c { l__color_named_._tl }
-\tl_set_eq:cN { l__color_named_._tl } \l__color_current_tl
+\tl_set:cx { l__color_named_._tl } { \__color_model:N \l__color_current_tl }
+\cs_new_protected:Npn \color_export:nnN #1#2#3
+ {
+ \group_begin:
+ \tl_if_exist:cT { c__color_export_ #2 _tl }
+ { \tl_set_eq:Nc \l_color_fixed_model_tl { c__color_export_ #2 _tl } }
+ \__color_parse:nN {#1} #3
+ \__color_export:nN {#2} #3
+ \exp_args:NNNV \group_end:
+ \tl_set:Nn #3 #3
+ }
+\cs_new_protected:Npn \color_export:nnnN #1#2#3#4
+ {
+ \__color_select_main:Nw #4
+ #1 / / \s__color_mark #2 / / \s__color_stop
+ \__color_export:nN {#3} #4
+ }
+\cs_new_protected:Npn \__color_export:nN #1#2
+ { \exp_after:wN \__color_export:nnnN #2 {#1} #2 }
+\cs_new:Npn \__color_export:nnnN #1#2#3#4
+ {
+ \cs_if_exist_use:cF { __color_export_format_ #3 :nnN }
+ {
+ \__kernel_msg_error:nnn { color } { unknown-export-format } {#3}
+ \use_none:nnn
+ }
+ {#1} {#2} #4
+ }
+\cs_new_protected:Npn \__color_export_format_backend:nnN #1#2#3
+ { \tl_set:Nn #3 { {#1} {#2} } }
+\cs_new_protected:Npn \__color_export:nnnNN #1#2#3#4#5
+ {
+ \str_if_eq:nnTF {#2} {#1}
+ { #5 #4 #3 \s__color_stop }
+ {
+ \__color_convert:nnnN {#2} {#1} {#3} #4
+ \exp_after:wN #5 \exp_after:wN #4
+ #4 \s__color_stop
+ }
+ }
+\tl_const:Nn \c__color_export_HTML_tl { rgb }
+\tl_const:cn { c__color_export_space-sep-cmyk_tl } { cmyk }
+\tl_const:cn { c__color_export_space-sep-rgb_tl } { rgb }
+\cs_new_protected:cpx { __color_export_format_space-sep-cmyk:nnN } #1#2#3
+ {
+ \exp_not:N \__color_export:nnnNN { cmyk } {#1} {#2} #3
+ \exp_not:c { __color_export_space-sep-cmyk:Nw }
+ }
+\cs_new_protected:cpn { __color_export_space-sep-cmyk:Nw } #1#2 \s__color_stop
+ { \tl_set:Nx #1 {#2} }
+\cs_new_protected:Npn \__color_export_format_HTML:nnN #1#2#3
+ { \__color_export:nnnNN { rgb } {#1} {#2}#3 \__color_export_HTML:Nw }
+\cs_new_protected:cpx { __color_export_format_space-sep-rgb:nnN } #1#2#3
+ {
+ \exp_not:N \__color_export:nnnNN { rgb } {#1} {#2} #3
+ \exp_not:c { __color_export_space-sep-rgb:Nw }
+ }
+\cs_new_protected:Npn \__color_export_HTML:Nw #1#2 ~ #3 ~ #4 \s__color_stop
+ {
+ \tl_set:Nx #1
+ {
+ \__color_export_HTML:n {#2}
+ \__color_export_HTML:n {#3}
+ \__color_export_HTML:n {#4}
+ }
+ }
+\cs_new:Npn \__color_export_HTML:n #1
+ {
+ \fp_compare:nNnTF {#1} = { 0 }
+ { 00 }
+ { \int_to_Hex:n { \fp_to_int:n { #1 * 255 } } }
+ }
+\cs_new_protected:cpn { __color_export_space-sep-rgb:Nw } #1#2 \s__color_stop
+ { \tl_set:Nx #1 {#2} }
\cs_new_protected:Npn \color_show:n #1
{
\msg_show:nnxxxx { LaTeX / color } { show }
{#1}
{
- \__color_if_defined:nTF {#1}
- { \exp_last_unbraced:Nv \__color_show:nn { l__color_named_ #1 _tl } }
- { }
+ \__color_if_defined:nT {#1}
+ {
+ \exp_args:Nv \__color_show:n { l__color_named_ #1 _tl }
+ \prop_map_function:cN
+ { l__color_named_ #1 _prop }
+ \msg_show_item_unbraced:nn
+ }
}
{ }
{ }
}
-\cs_new:Npn \__color_show:nn #1#2
+\cs_new:Npn \__color_show:n #1
{
\msg_show_item_unbraced:nn { model } {#1}
- \msg_show_item_unbraced:nn { value } {#2}
}
\__kernel_msg_new:nnnn { color } { unknown-color }
{ Unknown~color~'#1'. }
@@ -426,6 +622,12 @@
LaTeX~has~been~asked~to~use~a~color~named~'#1',~
but~this~has~never~been~defined.
}
+\__kernel_msg_new:nnnn { color } { unknown-export-format }
+ { Unknown~export~format~'#1'. }
+ {
+ LaTeX~has~been~asked~to~export~a~color~in~format~'#1',~
+ but~this~has~never~been~defined.
+ }
\__kernel_msg_new:nnnn { color } { unknown-model }
{ Unknown~color~model~'#1'. }
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty
index 8c812a5529c..44b5e3b83c9 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty
@@ -28,7 +28,7 @@
%%
%% File: l3draw.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3draw}{2020-06-18}{}
+\ProvidesExplPackage{l3draw}{2020-07-17}{}
{L3 Experimental core drawing support}
\RequirePackage { l3color }
\scan_new:N \s__draw_mark
@@ -1694,7 +1694,7 @@
{ \__draw_color:nn { stroke } {#1} }
\cs_new_protected:Npn \__draw_color:nn #1#2
{
- \color_parse:nN {#2} \l__draw_color_tmp_tl
+ \color_export:nnN {#2} { backend } \l__draw_color_tmp_tl
\exp_after:wN \__draw_color:nnn \l__draw_color_tmp_tl {#1}
}
\cs_new_protected:Npn \__draw_color:nnn #1#2#3
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty
index 1b43f2d5701..159aa00c175 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty
@@ -20,7 +20,7 @@
%%
%% File: l3graphics.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3graphics}{2020-06-18}{}
+\ProvidesExplPackage{l3graphics}{2020-07-17}{}
{L3 Experimental graphics inclusion support}
\ior_new:N \l__graphics_tmp_ior
\tl_new:N \l__graphics_tmp_tl
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty b/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty
index 937f0a65c35..d73a05c7a17 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty
@@ -20,7 +20,7 @@
%%
%% File: l3pdf.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3pdf}{2020-06-18}{}
+\ProvidesExplPackage{l3pdf}{2020-07-17}{}
{L3 Experimental core PDF support}
\scan_new:N \s__pdf_stop
\bool_new:N \g__pdf_init_bool
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
index 444c8280fcd..3137cb8f981 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
@@ -20,7 +20,7 @@
%%
%% File: l3str-format.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3str-format}{2020-06-18}{}
+\ProvidesExplPackage{l3str-format}{2020-07-17}{}
{L3 Experimental string formatting}
\cs_generate_variant:Nn \use:nn { nf }
\cs_generate_variant:Nn \use:nnn { fnf }
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty
index 53e0ebf675b..6270bb99cf8 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty
@@ -20,7 +20,7 @@
%%
%% File: l3sys-shell.dtx
\RequirePackage{expl3}
-\ProvidesExplPackage{l3sys-shell}{2020-06-18}{}
+\ProvidesExplPackage{l3sys-shell}{2020-07-17}{}
{L3 Experimental system shell functions}
\scan_new:N \s__sys_stop
\quark_new:N \q__sys_nil
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty
index d87a6c8fc7e..bdcbd292634 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty
@@ -20,7 +20,7 @@
%%
%% File: xcoffins.dtx
\RequirePackage{xparse}
-\ProvidesExplPackage{xcoffins}{2020-06-18}{}
+\ProvidesExplPackage{xcoffins}{2020-07-17}{}
{L3 Experimental design level coffins}
\keys_define:nn { coffin }
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
index 00729fb634f..007cd6febd6 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
@@ -32,7 +32,7 @@
}%
\endinput
}
-\ProvidesExplPackage{l3galley}{2020-06-18}{}
+\ProvidesExplPackage{l3galley}{2020-07-17}{}
{L3 Experimental galley code}
\int_new:N \l__galley_tmp_int
\seq_new:N \g__galley_tmpa_seq
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty
index ef965f138dd..cfdab78c975 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty
@@ -20,7 +20,7 @@
%%
%% File: xgalley.dtx
\RequirePackage{xparse}
-\ProvidesExplPackage{xgalley}{2020-06-18}{}
+\ProvidesExplPackage{xgalley}{2020-07-17}{}
{L3 Experimental galley}
\RequirePackage{xparse,xtemplate,l3galley}
\clist_new:N \l__galley_tmpa_clist