diff options
Diffstat (limited to 'Master/texmf-dist/tex')
22 files changed, 922 insertions, 626 deletions
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def index 9ae3d70b015..4d45954567f 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def @@ -26,7 +26,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-dvipdfmx.def}{2022-02-07}{} + {l3backend-dvipdfmx.def}{2022-04-10}{} {L3 backend support: dvipdfmx} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -65,20 +65,6 @@ { \__kernel_backend_literal:n { x:gsave } } \cs_new_protected:Npn \__kernel_backend_scope_end: { \__kernel_backend_literal:n { x:grestore } } -\group_begin: - \cs_set:Npn \__sys_tmp:w #1 Version ~ #2 ~ #3 \q_stop {#2} - \sys_get_shell:nnNTF { extractbb~--version } - { \char_set_catcode_space:n { `\ } } - \l__sys_internal_tl - { - \int_const:Nn \c__kernel_sys_dvipdfmx_version_int - { - \exp_after:wN \__sys_tmp:w \l__sys_internal_tl - \q_stop - } - } - { \int_const:Nn \c__kernel_sys_dvipdfmx_version_int { 0 } } -\group_end: %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } \cs_if_exist:cT { ver@color.sty } @@ -102,71 +88,64 @@ { \tl_set:Nn #3 { {#1} {#2} } } } \int_new:N \l__color_backend_stack_int -\int_compare:nNnTF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3 { } } +\int_new:N \g__color_backend_stack_int +\cs_new_protected:Npx \__kernel_color_backend_stack_init:Nnn #1#2#3 { - \int_new:N \g__color_backend_stack_int - \cs_new_protected:Npx \__kernel_color_backend_stack_init:Nnn #1#2#3 + \int_gincr:N \exp_not:N \g__color_backend_stack_int + \int_const:Nn #1 { \exp_not:N \g__color_backend_stack_int } + \use:x { - \int_gincr:N \exp_not:N \g__color_backend_stack_int - \int_const:Nn #1 { \exp_not:N \g__color_backend_stack_int } - \use:x + \__kernel_backend_first_shipout:n { - \__kernel_backend_first_shipout:n + \__kernel_backend_literal:n { - \__kernel_backend_literal:n - { - pdfcolorstackinit ~ - \exp_not:N \int_use:N \exp_not:N \g__color_backend_stack_int - \c_space_tl - \exp_not:N \tl_if_blank:nF {#2} { #2 ~ } - (#3) - } + pdfcolorstackinit ~ + \exp_not:N \int_use:N \exp_not:N \g__color_backend_stack_int + \c_space_tl + \exp_not:N \tl_if_blank:nF {#2} { #2 ~ } + (#3) } - } - } - \cs_if_exist:cTF { main@pdfcolorstack } - { - \int_set:Nn \l__color_backend_stack_int - { \int_use:c { main@pdfcolorstack } } - } - { - \__kernel_color_backend_stack_init:Nnn \c__color_backend_main_stack_int - { page ~ direct } { 0 ~ g ~ 0 ~ G } - \int_set_eq:NN \l__color_backend_stack_int - \c__color_backend_main_stack_int - \int_const:cn { main@pdfcolorstack } { \c__color_backend_main_stack_int } + } } - \cs_gset_protected:Npn \__kernel_backend_scope_end: + } +\cs_if_exist:cTF { main@pdfcolorstack } + { + \int_set:Nn \l__color_backend_stack_int + { \int_use:c { main@pdfcolorstack } } + } + { + \__kernel_color_backend_stack_init:Nnn \c__color_backend_main_stack_int + { page ~ direct } { 0 ~ g ~ 0 ~ G } + \int_set_eq:NN \l__color_backend_stack_int + \c__color_backend_main_stack_int + \int_const:cn { main@pdfcolorstack } { \c__color_backend_main_stack_int } + } +\cs_gset_protected:Npn \__kernel_backend_scope_end: + { + \__kernel_backend_literal:n { x:grestore } + \__kernel_backend_literal:x { - \__kernel_backend_literal:n { x:grestore } - \__kernel_backend_literal:x - { - pdfcolorstack ~ - \int_use:N \g__color_backend_stack_int \c_space_tl current - } + pdfcolorstack ~ + \int_use:N \g__color_backend_stack_int \c_space_tl current } } -\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } +\cs_new_protected:Npn \__kernel_color_backend_stack_push:nn #1#2 { - \cs_new_protected:Npn \__kernel_color_backend_stack_push:nn #1#2 + \__kernel_backend_literal:x { - \__kernel_backend_literal:x - { - pdfcolorstack ~ - \int_eval:n {#1} ~ - push ~ (#2) - } + pdfcolorstack ~ + \int_eval:n {#1} ~ + push ~ (#2) } - \cs_generate_variant:Nn \__kernel_color_backend_stack_push:nn { nx } - \cs_new_protected:Npn \__kernel_color_backend_stack_pop:n #1 + } +\cs_generate_variant:Nn \__kernel_color_backend_stack_push:nn { nx } +\cs_new_protected:Npn \__kernel_color_backend_stack_pop:n #1 + { + \__kernel_backend_literal:x { - \__kernel_backend_literal:x - { - pdfcolorstack ~ - \int_eval:n {#1} ~ - pop - } + pdfcolorstack ~ + \int_eval:n {#1} ~ + pop } } \tl_new:N \l__color_backend_fill_tl @@ -185,15 +164,6 @@ } \cs_new_protected:Npn \__color_backend_reset: { \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int } -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__color_backend_select_cmyk:n #1 - { \__kernel_backend_literal:n { pdf: bc ~ [#1] } } - \cs_gset_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n - \cs_gset_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n - \cs_gset_protected:Npn \__color_backend_reset: - { \__kernel_backend_literal:n { pdf: ec } } - } \prop_new:N \g__color_backend_colorant_prop \cs_new:Npx \__color_backend_devicen_colorants:n #1 { @@ -380,12 +350,6 @@ } } } -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__color_backend_select_separation:nn #1#2 { } - \cs_gset_eq:NN \__color_backend_select_devicen:nn - \__color_backend_select_separation:nn - } \cs_new_protected:Npn \__color_backend_fill_cmyk:n #1 { \__color_backend_fill:n { #1 ~ k } } \cs_new_protected:Npn \__color_backend_fill_gray:n #1 @@ -418,27 +382,6 @@ { \__color_backend_stroke:n { /#1 ~ CS ~ #2 ~ SCN } } \cs_new_eq:NN \__color_backend_fill_devicen:nn \__color_backend_fill_separation:nn \cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__color_backend_fill_cmyk:n #1 - { - \__kernel_backend_literal:n { pdf: bc ~ [#1] } - \group_insert_after:N \__color_backend_reset: - } - \cs_gset_eq:NN \__color_backend_fill_gray:n \__color_backend_fill_cmyk:n - \cs_gset_eq:NN \__color_backend_fill_rgb:n \__color_backend_fill_cmyk:n - \cs_gset_protected:Npn \__color_backend_reset: - { \__kernel_backend_literal:n { pdf: ec } } - \cs_gset_protected:Npn \__color_backend_stroke:n #1 - { \__kernel_backend_literal:n {#1} } - \cs_gset_protected:Npn \__color_backend_fill_separation:nn #1#2 { } - \cs_gset_eq:NN \__color_backend_fill_devicen:nn - \__color_backend_fill_separation:nn - \cs_gset_eq:NN \__color_backend_stroke_separation:nn - \__color_backend_fill_separation:nn - \cs_gset_eq:NN \__color_backend_stroke_devicen:nn - \__color_backend_stroke_separation:nn - } %% File: l3backend-box.dtx \cs_new_protected:Npn \__box_backend_clip:N #1 { @@ -660,19 +603,41 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx -\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n +\cs_new_protected:Npn \__graphics_backend_loaded:n #1 + { + \cs_if_exist:NTF \hook_gput_code:nnn + { + \hook_gput_code:nnn + { file / l3graphics.sty / after } + { backend } + {#1} + } + {#1} + } +\__graphics_backend_loaded:n + { + \seq_set_from_clist:Nn \l_graphics_search_ext_seq + { .pdf , .eps , .ps , .png , .jpg ., jpeg , .bmp } + } +\__graphics_backend_loaded:n + { + \cs_new_eq:NN \__graphics_backend_getbb_eps:n \__graphics_read_bb:n + \cs_new_eq:NN \__graphics_backend_getbb_ps:n \__graphics_read_bb:n + } \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1 { - \int_zero:N \l_graphics_page_int - \tl_clear:N \l_graphics_pagebox_tl - \graphics_extract_bb:n {#1} + \int_zero:N \l__graphics_page_int + \tl_clear:N \l__graphics_pagebox_tl + \__graphics_extract_bb:n {#1} } +\cs_new_eq:NN \__graphics_backend_getbb_jpeg:n \__graphics_backend_getbb_jpg:n \cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n +\cs_new_eq:NN \__graphics_backend_getbb_bmp:n \__graphics_backend_getbb_jpg:n \cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1 { - \tl_clear:N \l_graphics_decodearray_tl - \bool_set_false:N \l_graphics_interpolate_bool - \graphics_extract_bb:n {#1} + \tl_clear:N \l__graphics_decodearray_str + \bool_set_false:N \l__graphics_interpolate_bool + \__graphics_extract_bb:n {#1} } \int_new:N \g__graphics_track_int \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 @@ -680,38 +645,41 @@ \__kernel_backend_literal:x { PSfile = #1 \c_space_tl - llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl - lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl - urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl - ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim + llx = \dim_to_decimal_in_bp:n \l__graphics_llx_dim \c_space_tl + lly = \dim_to_decimal_in_bp:n \l__graphics_lly_dim \c_space_tl + urx = \dim_to_decimal_in_bp:n \l__graphics_urx_dim \c_space_tl + ury = \dim_to_decimal_in_bp:n \l__graphics_ury_dim } } +\cs_new_eq:NN \__graphics_backend_include_ps:n \__graphics_backend_include_eps:n \cs_new_protected:Npn \__graphics_backend_include_jpg:n #1 { \__graphics_backend_include_auxi:nn {#1} { image } } +\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_jpg:n \cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n +\cs_new_eq:NN \__graphics_backend_include_bmp:n \__graphics_backend_include_jpg:n \cs_new_protected:Npn \__graphics_backend_include_pdf:n #1 { \__graphics_backend_include_auxi:nn {#1} { epdf } } \cs_new_protected:Npn \__graphics_backend_include_auxi:nn #1#2 { \__graphics_backend_include_auxii:xnn { - \tl_if_empty:NF \l_graphics_pagebox_tl - { : \l_graphics_pagebox_tl } - \int_compare:nNnT \l_graphics_page_int > 1 - { :P \int_use:N \l_graphics_page_int } - \tl_if_empty:NF \l_graphics_decodearray_tl - { :D \l_graphics_decodearray_tl } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_pagebox_tl + { : \l__graphics_pagebox_tl } + \int_compare:nNnT \l__graphics_page_int > 1 + { :P \int_use:N \l__graphics_page_int } + \tl_if_empty:NF \l__graphics_decodearray_str + { :D \l__graphics_decodearray_str } + \bool_if:NT \l__graphics_interpolate_bool { :I } } {#1} {#2} } \cs_new_protected:Npn \__graphics_backend_include_auxii:nnn #1#2#3 { - \int_if_exist:cTF { c__graphics_graphics_ #2#1 _int } + \int_if_exist:cTF { c__graphics_ #2#1 _int } { \__kernel_backend_literal:x - { pdf:usexobj~@graphic \int_use:c { c__graphics_graphics_ #2#1 _int } } + { pdf:usexobj~@graphic \int_use:c { c__graphics_ #2#1 _int } } } { \__graphics_backend_include_auxiii:nnn {#2} {#1} {#3} } } @@ -719,36 +687,38 @@ \cs_new_protected:Npn \__graphics_backend_include_auxiii:nnn #1#2#3 { \int_gincr:N \g__graphics_track_int - \int_const:cn { c__graphics_graphics_ #1#2 _int } { \g__graphics_track_int } + \int_const:cn { c__graphics_ #1#2 _int } { \g__graphics_track_int } \__kernel_backend_literal:x { pdf:#3~ - @graphic \int_use:c { c__graphics_graphics_ #1#2 _int } ~ - \int_compare:nNnT \l_graphics_page_int > 1 - { page ~ \int_use:N \l_graphics_page_int \c_space_tl } - \tl_if_empty:NF \l_graphics_pagebox_tl + @graphic \int_use:c { c__graphics_ #1#2 _int } ~ + \int_compare:nNnT \l__graphics_page_int > 1 + { page ~ \int_use:N \l__graphics_page_int \c_space_tl } + \tl_if_empty:NF \l__graphics_pagebox_tl { - pagebox ~ \l_graphics_pagebox_tl \c_space_tl + pagebox ~ \l__graphics_pagebox_tl \c_space_tl bbox ~ - \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl - \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl - \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl - \dim_to_decimal_in_bp:n \l_graphics_ury_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_llx_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_lly_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_urx_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_ury_dim \c_space_tl } (#1) \bool_lazy_or:nnT - { \l_graphics_interpolate_bool } - { ! \tl_if_empty_p:N \l_graphics_decodearray_tl } + { \l__graphics_interpolate_bool } + { ! \tl_if_empty_p:N \l__graphics_decodearray_str } { << - \tl_if_empty:NF \l_graphics_decodearray_tl - { /Decode~[ \l_graphics_decodearray_tl ] } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_decodearray_str + { /Decode~[ \l__graphics_decodearray_str ] } + \bool_if:NT \l__graphics_interpolate_bool { /Interpolate~true> } >> } } } +\__graphics_backend_loaded:n + { \cs_new_eq:NN \__graphics_backend_get_pagecount:n \__graphics_get_pagecount:n } %% File: l3backend-pdf.dtx \box_new:N \l__pdf_internal_box \cs_new_protected:Npx \__pdf_backend:n #1 @@ -838,19 +808,13 @@ { \__pdf_backend_link_begin:n {#1#2} } \cs_new_protected:Npx \__pdf_backend_link_begin:n #1 { - \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \exp_not:N \int_gincr:N \exp_not:N \g__pdf_backend_link_int - } + \exp_not:N \int_gincr:N \exp_not:N \g__pdf_backend_link_int \__pdf_backend:x { bann ~ - \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - @pdf.lnk - \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int - \c_space_tl - } + @pdf.lnk + \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int + \c_space_tl << /Type /Annot #1 @@ -859,14 +823,8 @@ } \cs_new_protected:Npn \__pdf_backend_link_end: { \__pdf_backend:n { eann } } -\cs_new:Npx \__pdf_backend_link_last: - { - \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - @pdf.lnk - \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int - } - } +\cs_new:Npn \__pdf_backend_link_last: + { @pdf.lnk \int_use:N \g__pdf_backend_link_int } \cs_new_protected:Npn \__pdf_backend_link_margin:n #1 { \__kernel_backend_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } } \cs_new_protected:Npn \__pdf_backend_destination:nn #1#2 @@ -1019,35 +977,6 @@ } } \cs_generate_variant:Nn \__opacity_backend_fill_stroke:nn { xx } -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__opacity_backend_select_aux:n #1 - { - \tl_set:Nn \l__opacity_backend_fill_tl {#1} - \tl_set:Nn \l__opacity_backend_stroke_tl {#1} - \pdfmanagement_add:nnn { Page / Resources / ExtGState } - { opacity #1 } - { << /ca ~ #1 /CA ~ #1 >> } - \__kernel_backend_literal_pdf:n { /opacity #1 ~ gs } - } - \cs_gset_protected:Npn \__opacity_backend_fill_stroke:nn #1#2 - { - \str_if_eq:nnTF {#1} {#2} - { \__opacity_backend_select_aux:n {#1} } - { - \tl_set:Nn \l__opacity_backend_fill_tl {#1} - \tl_set:Nn \l__opacity_backend_stroke_tl {#2} - \pdfmanagement_add:nnn { Page / Resources / ExtGState } - { opacity.fill #1 } - { << /ca ~ #1 >> } - \pdfmanagement_add:nnn { Page / Resources / ExtGState } - { opacity.stroke #1 } - { << /CA ~ #2 >> } - \__kernel_backend_literal_pdf:n - { /opacity.fill #1 ~ gs /opacity.stroke #2 ~ gs } - } - } - } %% %% %% End of file `l3backend-dvipdfmx.def'. diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def index b391ee739f1..e63d882e34b 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def @@ -26,7 +26,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-dvips.def}{2022-02-07}{} + {l3backend-dvips.def}{2022-04-10}{} {L3 backend support: dvips} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -597,18 +597,38 @@ \__draw_backend_literal:n { @beginspecial } } %% File: l3backend-graphics.dtx -\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n +\cs_new_protected:Npn \__graphics_backend_loaded:n #1 + { + \cs_if_exist:NTF \hook_gput_code:nnn + { + \hook_gput_code:nnn + { file / l3graphics.sty / after } + { backend } + {#1} + } + {#1} + } +\__graphics_backend_loaded:n + { \seq_set_from_clist:Nn \l_graphics_search_ext_seq { .eps , .ps } } +\__graphics_backend_loaded:n + { + \cs_new_eq:NN \__graphics_backend_getbb_eps:n \__graphics_read_bb:n + \cs_new_eq:NN \__graphics_backend_getbb_ps:n \__graphics_read_bb:n + } \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 { \__kernel_backend_literal:x { PSfile = #1 \c_space_tl - llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl - lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl - urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl - ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim + llx = \dim_to_decimal_in_bp:n \l__graphics_llx_dim \c_space_tl + lly = \dim_to_decimal_in_bp:n \l__graphics_lly_dim \c_space_tl + urx = \dim_to_decimal_in_bp:n \l__graphics_urx_dim \c_space_tl + ury = \dim_to_decimal_in_bp:n \l__graphics_ury_dim } } +\cs_new_eq:NN \__graphics_backend_include_ps:n \__graphics_backend_include_eps:n +\__graphics_backend_loaded:n + { \cs_new_eq:NN \__graphics_backend_get_pagecount:n \__graphics_get_pagecount:n } %% File: l3backend-pdf.dtx \box_new:N \l__pdf_internal_box \cs_new_protected:Npn \__pdf_backend_pdfmark:n #1 diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def index b50af595321..61c275d697b 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def @@ -26,7 +26,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-dvisvgm.def}{2022-02-07}{} + {l3backend-dvisvgm.def}{2022-04-10}{} {L3 backend support: dvisvgm} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -216,6 +216,8 @@ \cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2 { } \cs_new_eq:NN \__color_backend_fill_devicen:nn \__color_backend_fill_separation:nn \cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn +\cs_new_protected:Npn \__color_backend_devicen_init:nnn #1#2#3 { } +\cs_new_protected:Npn \__color_backend_iccbased_init:nnn #1#2#3 { } %% File: l3backend-box.dtx \cs_new_protected:Npn \__box_backend_clip:N #1 { @@ -490,33 +492,52 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx -\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n +\cs_new_protected:Npn \__graphics_backend_loaded:n #1 + { + \cs_if_exist:NTF \hook_gput_code:nnn + { + \hook_gput_code:nnn + { file / l3graphics.sty / after } + { backend } + {#1} + } + {#1} + } +\__graphics_backend_loaded:n + { + \seq_set_from_clist:Nn + \l_graphics_search_ext_seq + { .pdf , .eps , .png , .jpg , .jpeg } + } +\__graphics_backend_loaded:n + { \cs_new_eq:NN \__graphics_backend_getbb_eps:n \__graphics_read_bb:n } \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1 { - \int_zero:N \l_graphics_page_int - \tl_clear:N \l_graphics_pagebox_tl - \graphics_extract_bb:n {#1} + \int_zero:N \l__graphics_page_int + \tl_clear:N \l__graphics_pagebox_tl + \__graphics_extract_bb:n {#1} } +\cs_new_eq:NN \__graphics_backend_getbb_jpeg:n \__graphics_backend_getbb_jpg:n \cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n \cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1 { - \tl_clear:N \l_graphics_decodearray_tl - \bool_set_false:N \l_graphics_interpolate_bool - \graphics_extract_bb:n {#1} + \tl_clear:N \l__graphics_decodearray_str + \bool_set_false:N \l__graphics_interpolate_bool + \__graphics_extract_bb:n {#1} } \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 - { __graphics_backend_include:nn { PSfile } {#1} } + { \__graphics_backend_include:nn { PSfile } {#1} } \cs_new_protected:Npn \__graphics_backend_include_pdf:n #1 - { __graphics_backend_include:nn { pdffile } {#1} } + { \__graphics_backend_include:nn { pdffile } {#1} } \cs_new_protected:Npn \__graphics_backend_include:nn #1#2 { \__kernel_backend_literal:x { #1 = #2 \c_space_tl - llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl - lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl - urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl - ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim + llx = \dim_to_decimal_in_bp:n \l__graphics_llx_dim \c_space_tl + lly = \dim_to_decimal_in_bp:n \l__graphics_lly_dim \c_space_tl + urx = \dim_to_decimal_in_bp:n \l__graphics_urx_dim \c_space_tl + ury = \dim_to_decimal_in_bp:n \l__graphics_ury_dim } } \cs_new_protected:Npn \__graphics_backend_include_png:n #1 @@ -524,14 +545,17 @@ \__kernel_backend_literal:x { dvisvgm:img~ - \dim_to_decimal:n { \l_graphics_ury_dim } ~ - \dim_to_decimal:n { \l_graphics_ury_dim } ~ + \dim_to_decimal:n { \l__graphics_ury_dim } ~ + \dim_to_decimal:n { \l__graphics_ury_dim } ~ \__graphics_backend_include_bitmap_quote:w #1 " #1 " \s__graphics_stop } } +\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_png:n \cs_new_eq:NN \__graphics_backend_include_jpg:n \__graphics_backend_include_png:n \cs_new:Npn \__graphics_backend_include_bitmap_quote:w #1 " #2 " #3 \s__graphics_stop { " #2 " } +\__graphics_backend_loaded:n + { \cs_new_eq:NN \__graphics_backend_get_pagecount:n \__graphics_get_pagecount:n } %% File: l3backend-pdf.dtx \box_new:N \l__pdf_internal_box \cs_new_protected:Npn \__pdf_backend_catalog_gput:nn #1#2 { } diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def index 9ef6db2e4ef..c98a097818a 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def @@ -26,7 +26,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-luatex.def}{2022-02-07}{} + {l3backend-luatex.def}{2022-04-10}{} {L3 backend support: PDF output (LuaTeX)} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -535,72 +535,97 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx +\cs_new_protected:Npn \__graphics_backend_loaded:n #1 + { + \cs_if_exist:NTF \hook_gput_code:nnn + { + \hook_gput_code:nnn + { file / l3graphics.sty / after } + { backend } + {#1} + } + {#1} + } +\__graphics_backend_loaded:n + { + \seq_set_from_clist:Nn + \l_graphics_search_ext_seq + { .pdf , .eps , .png , .jpg , .jpeg } + } \tl_new:N \l__graphics_graphics_attr_tl \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1 { - \int_zero:N \l_graphics_page_int - \tl_clear:N \l_graphics_pagebox_tl + \int_zero:N \l__graphics_page_int + \tl_clear:N \l__graphics_pagebox_tl \tl_set:Nx \l__graphics_graphics_attr_tl { - \tl_if_empty:NF \l_graphics_decodearray_tl - { :D \l_graphics_decodearray_tl } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_decodearray_str + { :D \l__graphics_decodearray_str } + \bool_if:NT \l__graphics_interpolate_bool { :I } } \tl_clear:N \l__graphics_graphics_attr_tl \__graphics_backend_getbb_auxi:n {#1} } +\cs_new_eq:NN \__graphics_backend_getbb_jpeg:n \__graphics_backend_getbb_jpg:n \cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n \cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1 { - \tl_clear:N \l_graphics_decodearray_tl - \bool_set_false:N \l_graphics_interpolate_bool + \tl_clear:N \l__graphics_decodearray_str + \bool_set_false:N \l__graphics_interpolate_bool \tl_set:Nx \l__graphics_graphics_attr_tl { - : \l_graphics_pagebox_tl - \int_compare:nNnT \l_graphics_page_int > 1 - { :P \int_use:N \l_graphics_page_int } + : \l__graphics_pagebox_tl + \int_compare:nNnT \l__graphics_page_int > 1 + { :P \int_use:N \l__graphics_page_int } } \__graphics_backend_getbb_auxi:n {#1} } \cs_new_protected:Npn \__graphics_backend_getbb_auxi:n #1 { - \graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl } + \__graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl } { \__graphics_backend_getbb_auxii:n {#1} } } \cs_new_protected:Npn \__graphics_backend_getbb_auxii:n #1 { + \exp_args:Ne \__graphics_backend_getbb_auxiii:n + { \__graphics_backend_dequote:w #1 " #1 " \s__graphics_stop } + \int_const:cn { c__graphics_ #1 \l__graphics_graphics_attr_tl _int } + { \tex_the:D \tex_pdflastximage:D } + \__graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl } + } +\cs_new_protected:Npn \__graphics_backend_getbb_auxiii:n #1 + { \tex_immediate:D \tex_pdfximage:D \bool_lazy_or:nnT - { \l_graphics_interpolate_bool } - { ! \tl_if_empty_p:N \l_graphics_decodearray_tl } + { \l__graphics_interpolate_bool } + { ! \tl_if_empty_p:N \l__graphics_decodearray_str } { attr ~ { - \tl_if_empty:NF \l_graphics_decodearray_tl - { /Decode~[ \l_graphics_decodearray_tl ] } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_decodearray_str + { /Decode~[ \l__graphics_decodearray_str ] } + \bool_if:NT \l__graphics_interpolate_bool { /Interpolate~true } } } - \int_compare:nNnT \l_graphics_page_int > 0 - { page ~ \int_use:N \l_graphics_page_int } - \tl_if_empty:NF \l_graphics_pagebox_tl - { \l_graphics_pagebox_tl } + \int_compare:nNnT \l__graphics_page_int > 0 + { page ~ \int_use:N \l__graphics_page_int } + \tl_if_empty:NF \l__graphics_pagebox_tl + { \l__graphics_pagebox_tl } {#1} \hbox_set:Nn \l__graphics_internal_box { \tex_pdfrefximage:D \tex_pdflastximage:D } - \dim_set:Nn \l_graphics_urx_dim { \box_wd:N \l__graphics_internal_box } - \dim_set:Nn \l_graphics_ury_dim { \box_ht:N \l__graphics_internal_box } - \int_const:cn { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int } - { \tex_the:D \tex_pdflastximage:D } - \graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl } + \dim_set:Nn \l__graphics_urx_dim { \box_wd:N \l__graphics_internal_box } + \dim_set:Nn \l__graphics_ury_dim { \box_ht:N \l__graphics_internal_box } } +\cs_new:Npn \__graphics_backend_dequote:w #1 " #2 " #3 \s__graphics_stop {#2} \cs_new_protected:Npn \__graphics_backend_include_jpg:n #1 { \tex_pdfrefximage:D - \int_use:c { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int } + \int_use:c { c__graphics_ #1 \l__graphics_graphics_attr_tl _int } } +\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_jpg:n \cs_new_eq:NN \__graphics_backend_include_pdf:n \__graphics_backend_include_jpg:n \cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n \sys_if_shell:T @@ -616,8 +641,12 @@ \l__graphics_backend_ext_str \exp_args:Nx \__graphics_backend_getbb_eps:nn { - \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str - -converted-to.pdf + \exp_args:Ne \__kernel_file_name_quote:n + { + \l__graphics_backend_name_str + - \str_tail:N \l__graphics_backend_ext_str + -converted-to.pdf + } } {#1} } @@ -628,7 +657,7 @@ \sys_shell_now:n { repstopdf ~ #2 ~ #1 } } - \tl_set:Nn \l_graphics_name_tl {#1} + \tl_set:Nn \l__graphics_final_name_str {#1} \__graphics_backend_getbb_pdf:n {#1} } \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 @@ -637,11 +666,21 @@ \l__graphics_backend_dir_str \l__graphics_backend_name_str \l__graphics_backend_ext_str \exp_args:Nx \__graphics_backend_include_pdf:n { - \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str - -converted-to.pdf + \exp_args:Ne \__kernel_file_name_quote:n + { + \l__graphics_backend_name_str + - \str_tail:N \l__graphics_backend_ext_str + -converted-to.pdf + } } } } +\cs_new_protected:Npn \__graphics_backend_get_pagecount:n #1 + { + \tex_immediate:D \tex_pdfximage:D {#1} + \int_const:cn { c__graphics_ #1 _pages_int } + { \int_use:N \tex_pdflastximagepages:D } + } %% File: l3backend-pdf.dtx \box_new:N \l__pdf_internal_box \cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4 diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def index 15552593892..17d944aeb09 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def @@ -26,7 +26,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-pdftex.def}{2022-02-07}{} + {l3backend-pdftex.def}{2022-04-10}{} {L3 backend support: PDF output (pdfTeX)} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -535,72 +535,97 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx +\cs_new_protected:Npn \__graphics_backend_loaded:n #1 + { + \cs_if_exist:NTF \hook_gput_code:nnn + { + \hook_gput_code:nnn + { file / l3graphics.sty / after } + { backend } + {#1} + } + {#1} + } +\__graphics_backend_loaded:n + { + \seq_set_from_clist:Nn + \l_graphics_search_ext_seq + { .pdf , .eps , .png , .jpg , .jpeg } + } \tl_new:N \l__graphics_graphics_attr_tl \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1 { - \int_zero:N \l_graphics_page_int - \tl_clear:N \l_graphics_pagebox_tl + \int_zero:N \l__graphics_page_int + \tl_clear:N \l__graphics_pagebox_tl \tl_set:Nx \l__graphics_graphics_attr_tl { - \tl_if_empty:NF \l_graphics_decodearray_tl - { :D \l_graphics_decodearray_tl } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_decodearray_str + { :D \l__graphics_decodearray_str } + \bool_if:NT \l__graphics_interpolate_bool { :I } } \tl_clear:N \l__graphics_graphics_attr_tl \__graphics_backend_getbb_auxi:n {#1} } +\cs_new_eq:NN \__graphics_backend_getbb_jpeg:n \__graphics_backend_getbb_jpg:n \cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n \cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1 { - \tl_clear:N \l_graphics_decodearray_tl - \bool_set_false:N \l_graphics_interpolate_bool + \tl_clear:N \l__graphics_decodearray_str + \bool_set_false:N \l__graphics_interpolate_bool \tl_set:Nx \l__graphics_graphics_attr_tl { - : \l_graphics_pagebox_tl - \int_compare:nNnT \l_graphics_page_int > 1 - { :P \int_use:N \l_graphics_page_int } + : \l__graphics_pagebox_tl + \int_compare:nNnT \l__graphics_page_int > 1 + { :P \int_use:N \l__graphics_page_int } } \__graphics_backend_getbb_auxi:n {#1} } \cs_new_protected:Npn \__graphics_backend_getbb_auxi:n #1 { - \graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl } + \__graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl } { \__graphics_backend_getbb_auxii:n {#1} } } \cs_new_protected:Npn \__graphics_backend_getbb_auxii:n #1 { + \exp_args:Ne \__graphics_backend_getbb_auxiii:n + { \__graphics_backend_dequote:w #1 " #1 " \s__graphics_stop } + \int_const:cn { c__graphics_ #1 \l__graphics_graphics_attr_tl _int } + { \tex_the:D \tex_pdflastximage:D } + \__graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl } + } +\cs_new_protected:Npn \__graphics_backend_getbb_auxiii:n #1 + { \tex_immediate:D \tex_pdfximage:D \bool_lazy_or:nnT - { \l_graphics_interpolate_bool } - { ! \tl_if_empty_p:N \l_graphics_decodearray_tl } + { \l__graphics_interpolate_bool } + { ! \tl_if_empty_p:N \l__graphics_decodearray_str } { attr ~ { - \tl_if_empty:NF \l_graphics_decodearray_tl - { /Decode~[ \l_graphics_decodearray_tl ] } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_decodearray_str + { /Decode~[ \l__graphics_decodearray_str ] } + \bool_if:NT \l__graphics_interpolate_bool { /Interpolate~true } } } - \int_compare:nNnT \l_graphics_page_int > 0 - { page ~ \int_use:N \l_graphics_page_int } - \tl_if_empty:NF \l_graphics_pagebox_tl - { \l_graphics_pagebox_tl } + \int_compare:nNnT \l__graphics_page_int > 0 + { page ~ \int_use:N \l__graphics_page_int } + \tl_if_empty:NF \l__graphics_pagebox_tl + { \l__graphics_pagebox_tl } {#1} \hbox_set:Nn \l__graphics_internal_box { \tex_pdfrefximage:D \tex_pdflastximage:D } - \dim_set:Nn \l_graphics_urx_dim { \box_wd:N \l__graphics_internal_box } - \dim_set:Nn \l_graphics_ury_dim { \box_ht:N \l__graphics_internal_box } - \int_const:cn { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int } - { \tex_the:D \tex_pdflastximage:D } - \graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl } + \dim_set:Nn \l__graphics_urx_dim { \box_wd:N \l__graphics_internal_box } + \dim_set:Nn \l__graphics_ury_dim { \box_ht:N \l__graphics_internal_box } } +\cs_new:Npn \__graphics_backend_dequote:w #1 " #2 " #3 \s__graphics_stop {#2} \cs_new_protected:Npn \__graphics_backend_include_jpg:n #1 { \tex_pdfrefximage:D - \int_use:c { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int } + \int_use:c { c__graphics_ #1 \l__graphics_graphics_attr_tl _int } } +\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_jpg:n \cs_new_eq:NN \__graphics_backend_include_pdf:n \__graphics_backend_include_jpg:n \cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n \sys_if_shell:T @@ -616,8 +641,12 @@ \l__graphics_backend_ext_str \exp_args:Nx \__graphics_backend_getbb_eps:nn { - \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str - -converted-to.pdf + \exp_args:Ne \__kernel_file_name_quote:n + { + \l__graphics_backend_name_str + - \str_tail:N \l__graphics_backend_ext_str + -converted-to.pdf + } } {#1} } @@ -628,7 +657,7 @@ \sys_shell_now:n { repstopdf ~ #2 ~ #1 } } - \tl_set:Nn \l_graphics_name_tl {#1} + \tl_set:Nn \l__graphics_final_name_str {#1} \__graphics_backend_getbb_pdf:n {#1} } \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 @@ -637,11 +666,21 @@ \l__graphics_backend_dir_str \l__graphics_backend_name_str \l__graphics_backend_ext_str \exp_args:Nx \__graphics_backend_include_pdf:n { - \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str - -converted-to.pdf + \exp_args:Ne \__kernel_file_name_quote:n + { + \l__graphics_backend_name_str + - \str_tail:N \l__graphics_backend_ext_str + -converted-to.pdf + } } } } +\cs_new_protected:Npn \__graphics_backend_get_pagecount:n #1 + { + \tex_immediate:D \tex_pdfximage:D {#1} + \int_const:cn { c__graphics_ #1 _pages_int } + { \int_use:N \tex_pdflastximagepages:D } + } %% File: l3backend-pdf.dtx \box_new:N \l__pdf_internal_box \cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4 diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def index d6de9539313..dd69cc589db 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def @@ -26,7 +26,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-xetex.def}{2022-02-07}{} + {l3backend-xetex.def}{2022-04-10}{} {L3 backend support: XeTeX} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -65,20 +65,6 @@ { \__kernel_backend_literal:n { x:gsave } } \cs_new_protected:Npn \__kernel_backend_scope_end: { \__kernel_backend_literal:n { x:grestore } } -\group_begin: - \cs_set:Npn \__sys_tmp:w #1 Version ~ #2 ~ #3 \q_stop {#2} - \sys_get_shell:nnNTF { extractbb~--version } - { \char_set_catcode_space:n { `\ } } - \l__sys_internal_tl - { - \int_const:Nn \c__kernel_sys_dvipdfmx_version_int - { - \exp_after:wN \__sys_tmp:w \l__sys_internal_tl - \q_stop - } - } - { \int_const:Nn \c__kernel_sys_dvipdfmx_version_int { 0 } } -\group_end: %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } \cs_if_exist:cT { ver@color.sty } @@ -102,71 +88,64 @@ { \tl_set:Nn #3 { {#1} {#2} } } } \int_new:N \l__color_backend_stack_int -\int_compare:nNnTF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3 { } } +\int_new:N \g__color_backend_stack_int +\cs_new_protected:Npx \__kernel_color_backend_stack_init:Nnn #1#2#3 { - \int_new:N \g__color_backend_stack_int - \cs_new_protected:Npx \__kernel_color_backend_stack_init:Nnn #1#2#3 + \int_gincr:N \exp_not:N \g__color_backend_stack_int + \int_const:Nn #1 { \exp_not:N \g__color_backend_stack_int } + \use:x { - \int_gincr:N \exp_not:N \g__color_backend_stack_int - \int_const:Nn #1 { \exp_not:N \g__color_backend_stack_int } - \use:x + \__kernel_backend_first_shipout:n { - \__kernel_backend_first_shipout:n + \__kernel_backend_literal:n { - \__kernel_backend_literal:n - { - pdfcolorstackinit ~ - \exp_not:N \int_use:N \exp_not:N \g__color_backend_stack_int - \c_space_tl - \exp_not:N \tl_if_blank:nF {#2} { #2 ~ } - (#3) - } + pdfcolorstackinit ~ + \exp_not:N \int_use:N \exp_not:N \g__color_backend_stack_int + \c_space_tl + \exp_not:N \tl_if_blank:nF {#2} { #2 ~ } + (#3) } - } - } - \cs_if_exist:cTF { main@pdfcolorstack } - { - \int_set:Nn \l__color_backend_stack_int - { \int_use:c { main@pdfcolorstack } } + } } + } +\cs_if_exist:cTF { main@pdfcolorstack } + { + \int_set:Nn \l__color_backend_stack_int + { \int_use:c { main@pdfcolorstack } } + } + { + \__kernel_color_backend_stack_init:Nnn \c__color_backend_main_stack_int + { page ~ direct } { 0 ~ g ~ 0 ~ G } + \int_set_eq:NN \l__color_backend_stack_int + \c__color_backend_main_stack_int + \int_const:cn { main@pdfcolorstack } { \c__color_backend_main_stack_int } + } +\cs_gset_protected:Npn \__kernel_backend_scope_end: + { + \__kernel_backend_literal:n { x:grestore } + \__kernel_backend_literal:x { - \__kernel_color_backend_stack_init:Nnn \c__color_backend_main_stack_int - { page ~ direct } { 0 ~ g ~ 0 ~ G } - \int_set_eq:NN \l__color_backend_stack_int - \c__color_backend_main_stack_int - \int_const:cn { main@pdfcolorstack } { \c__color_backend_main_stack_int } + pdfcolorstack ~ + \int_use:N \g__color_backend_stack_int \c_space_tl current } - \cs_gset_protected:Npn \__kernel_backend_scope_end: + } +\cs_new_protected:Npn \__kernel_color_backend_stack_push:nn #1#2 + { + \__kernel_backend_literal:x { - \__kernel_backend_literal:n { x:grestore } - \__kernel_backend_literal:x - { - pdfcolorstack ~ - \int_use:N \g__color_backend_stack_int \c_space_tl current - } + pdfcolorstack ~ + \int_eval:n {#1} ~ + push ~ (#2) } } -\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } +\cs_generate_variant:Nn \__kernel_color_backend_stack_push:nn { nx } +\cs_new_protected:Npn \__kernel_color_backend_stack_pop:n #1 { - \cs_new_protected:Npn \__kernel_color_backend_stack_push:nn #1#2 + \__kernel_backend_literal:x { - \__kernel_backend_literal:x - { - pdfcolorstack ~ - \int_eval:n {#1} ~ - push ~ (#2) - } - } - \cs_generate_variant:Nn \__kernel_color_backend_stack_push:nn { nx } - \cs_new_protected:Npn \__kernel_color_backend_stack_pop:n #1 - { - \__kernel_backend_literal:x - { - pdfcolorstack ~ - \int_eval:n {#1} ~ - pop - } + pdfcolorstack ~ + \int_eval:n {#1} ~ + pop } } \tl_new:N \l__color_backend_fill_tl @@ -185,15 +164,6 @@ } \cs_new_protected:Npn \__color_backend_reset: { \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int } -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__color_backend_select_cmyk:n #1 - { \__kernel_backend_literal:n { pdf: bc ~ [#1] } } - \cs_gset_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n - \cs_gset_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n - \cs_gset_protected:Npn \__color_backend_reset: - { \__kernel_backend_literal:n { pdf: ec } } - } \prop_new:N \g__color_backend_colorant_prop \cs_new:Npx \__color_backend_devicen_colorants:n #1 { @@ -380,12 +350,6 @@ } } } -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__color_backend_select_separation:nn #1#2 { } - \cs_gset_eq:NN \__color_backend_select_devicen:nn - \__color_backend_select_separation:nn - } \cs_new_protected:Npn \__color_backend_fill_cmyk:n #1 { \__color_backend_fill:n { #1 ~ k } } \cs_new_protected:Npn \__color_backend_fill_gray:n #1 @@ -418,27 +382,6 @@ { \__color_backend_stroke:n { /#1 ~ CS ~ #2 ~ SCN } } \cs_new_eq:NN \__color_backend_fill_devicen:nn \__color_backend_fill_separation:nn \cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn -\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \cs_gset_protected:Npn \__color_backend_fill_cmyk:n #1 - { - \__kernel_backend_literal:n { pdf: bc ~ [#1] } - \group_insert_after:N \__color_backend_reset: - } - \cs_gset_eq:NN \__color_backend_fill_gray:n \__color_backend_fill_cmyk:n - \cs_gset_eq:NN \__color_backend_fill_rgb:n \__color_backend_fill_cmyk:n - \cs_gset_protected:Npn \__color_backend_reset: - { \__kernel_backend_literal:n { pdf: ec } } - \cs_gset_protected:Npn \__color_backend_stroke:n #1 - { \__kernel_backend_literal:n {#1} } - \cs_gset_protected:Npn \__color_backend_fill_separation:nn #1#2 { } - \cs_gset_eq:NN \__color_backend_fill_devicen:nn - \__color_backend_fill_separation:nn - \cs_gset_eq:NN \__color_backend_stroke_separation:nn - \__color_backend_fill_separation:nn - \cs_gset_eq:NN \__color_backend_stroke_devicen:nn - \__color_backend_stroke_separation:nn - } %% File: l3backend-box.dtx \cs_new_protected:Npn \__box_backend_clip:N #1 { @@ -660,43 +603,66 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx -\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n +\cs_new_protected:Npn \__graphics_backend_loaded:n #1 + { + \cs_if_exist:NTF \hook_gput_code:nnn + { + \hook_gput_code:nnn + { file / l3graphics.sty / after } + { backend } + {#1} + } + {#1} + } +\__graphics_backend_loaded:n + { + \seq_set_from_clist:Nn \l_graphics_search_ext_seq + { .pdf , .eps , .ps , .png , .jpg ., jpeg , .bmp } + } +\__graphics_backend_loaded:n + { + \cs_new_eq:NN \__graphics_backend_getbb_eps:n \__graphics_read_bb:n + \cs_new_eq:NN \__graphics_backend_getbb_ps:n \__graphics_read_bb:n + } \int_new:N \g__graphics_track_int \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 { \__kernel_backend_literal:x { PSfile = #1 \c_space_tl - llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl - lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl - urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl - ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim + llx = \dim_to_decimal_in_bp:n \l__graphics_llx_dim \c_space_tl + lly = \dim_to_decimal_in_bp:n \l__graphics_lly_dim \c_space_tl + urx = \dim_to_decimal_in_bp:n \l__graphics_urx_dim \c_space_tl + ury = \dim_to_decimal_in_bp:n \l__graphics_ury_dim } } +\cs_new_eq:NN \__graphics_backend_include_ps:n \__graphics_backend_include_eps:n \cs_new_protected:Npn \__graphics_backend_include_jpg:n #1 { \__graphics_backend_include_auxi:nn {#1} { image } } +\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_jpg:n \cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n +\cs_new_eq:NN \__graphics_backend_include_bmp:n \__graphics_backend_include_jpg:n \cs_new_protected:Npn \__graphics_backend_include_auxi:nn #1#2 { \__graphics_backend_include_auxii:xnn { - \tl_if_empty:NF \l_graphics_pagebox_tl - { : \l_graphics_pagebox_tl } - \int_compare:nNnT \l_graphics_page_int > 1 - { :P \int_use:N \l_graphics_page_int } - \tl_if_empty:NF \l_graphics_decodearray_tl - { :D \l_graphics_decodearray_tl } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_pagebox_tl + { : \l__graphics_pagebox_tl } + \int_compare:nNnT \l__graphics_page_int > 1 + { :P \int_use:N \l__graphics_page_int } + \tl_if_empty:NF \l__graphics_decodearray_str + { :D \l__graphics_decodearray_str } + \bool_if:NT \l__graphics_interpolate_bool { :I } } {#1} {#2} } \cs_new_protected:Npn \__graphics_backend_include_auxii:nnn #1#2#3 { - \int_if_exist:cTF { c__graphics_graphics_ #2#1 _int } + \int_if_exist:cTF { c__graphics_ #2#1 _int } { \__kernel_backend_literal:x - { pdf:usexobj~@graphic \int_use:c { c__graphics_graphics_ #2#1 _int } } + { pdf:usexobj~@graphic \int_use:c { c__graphics_ #2#1 _int } } } { \__graphics_backend_include_auxiii:nnn {#2} {#1} {#3} } } @@ -704,31 +670,31 @@ \cs_new_protected:Npn \__graphics_backend_include_auxiii:nnn #1#2#3 { \int_gincr:N \g__graphics_track_int - \int_const:cn { c__graphics_graphics_ #1#2 _int } { \g__graphics_track_int } + \int_const:cn { c__graphics_ #1#2 _int } { \g__graphics_track_int } \__kernel_backend_literal:x { pdf:#3~ - @graphic \int_use:c { c__graphics_graphics_ #1#2 _int } ~ - \int_compare:nNnT \l_graphics_page_int > 1 - { page ~ \int_use:N \l_graphics_page_int \c_space_tl } - \tl_if_empty:NF \l_graphics_pagebox_tl + @graphic \int_use:c { c__graphics_ #1#2 _int } ~ + \int_compare:nNnT \l__graphics_page_int > 1 + { page ~ \int_use:N \l__graphics_page_int \c_space_tl } + \tl_if_empty:NF \l__graphics_pagebox_tl { - pagebox ~ \l_graphics_pagebox_tl \c_space_tl + pagebox ~ \l__graphics_pagebox_tl \c_space_tl bbox ~ - \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl - \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl - \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl - \dim_to_decimal_in_bp:n \l_graphics_ury_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_llx_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_lly_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_urx_dim \c_space_tl + \dim_to_decimal_in_bp:n \l__graphics_ury_dim \c_space_tl } (#1) \bool_lazy_or:nnT - { \l_graphics_interpolate_bool } - { ! \tl_if_empty_p:N \l_graphics_decodearray_tl } + { \l__graphics_interpolate_bool } + { ! \tl_if_empty_p:N \l__graphics_decodearray_str } { << - \tl_if_empty:NF \l_graphics_decodearray_tl - { /Decode~[ \l_graphics_decodearray_tl ] } - \bool_if:NT \l_graphics_interpolate_bool + \tl_if_empty:NF \l__graphics_decodearray_str + { /Decode~[ \l__graphics_decodearray_str ] } + \bool_if:NT \l__graphics_interpolate_bool { /Interpolate~true> } >> } @@ -736,21 +702,23 @@ } \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1 { - \int_zero:N \l_graphics_page_int - \tl_clear:N \l_graphics_pagebox_tl + \int_zero:N \l__graphics_page_int + \tl_clear:N \l__graphics_pagebox_tl \__graphics_backend_getbb_auxi:nN {#1} \tex_XeTeXpicfile:D } +\cs_new_eq:NN \__graphics_backend_getbb_jpeg:n \__graphics_backend_getbb_jpg:n \cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n +\cs_new_eq:NN \__graphics_backend_getbb_bmp:n \__graphics_backend_getbb_jpg:n \cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1 { - \tl_clear:N \l_graphics_decodearray_tl - \bool_set_false:N \l_graphics_interpolate_bool + \tl_clear:N \l__graphics_decodearray_str + \bool_set_false:N \l__graphics_interpolate_bool \__graphics_backend_getbb_auxi:nN {#1} \tex_XeTeXpdffile:D } \cs_new_protected:Npn \__graphics_backend_getbb_auxi:nN #1#2 { - \int_compare:nNnTF \l_graphics_page_int > 1 - { \__graphics_backend_getbb_auxii:VnN \l_graphics_page_int {#1} #2 } + \int_compare:nNnTF \l__graphics_page_int > 1 + { \__graphics_backend_getbb_auxii:VnN \l__graphics_page_int {#1} #2 } { \__graphics_backend_getbb_auxiii:nNnn {#1} #2 { :P 1 } { page 1 } } } \cs_new_protected:Npn \__graphics_backend_getbb_auxii:nnN #1#2#3 @@ -758,8 +726,8 @@ \cs_generate_variant:Nn \__graphics_backend_getbb_auxii:nnN { V } \cs_new_protected:Npn \__graphics_backend_getbb_auxiii:nNnn #1#2#3#4 { - \tl_if_empty:NTF \l_graphics_pagebox_tl - { \__graphics_backend_getbb_auxiv:VnNnn \l_graphics_pagebox_tl } + \tl_if_empty:NTF \l__graphics_pagebox_tl + { \__graphics_backend_getbb_auxiv:VnNnn \l__graphics_pagebox_tl } { \__graphics_backend_getbb_auxv:nNnn } {#1} #2 {#3} {#4} } @@ -768,33 +736,43 @@ \use:x { \__graphics_backend_getbb_auxv:nNnn {#2} #3 { : #1 #4 } - { #5 ~ \__graphics_backend_getbb_pagebox:w #1 } + { + #5 + \tl_if_blank:nF {#1} + { \c_space_tl \__graphics_backend_getbb_pagebox:w #1 } + } } } \cs_generate_variant:Nn \__graphics_backend_getbb_auxiv:nnNnn { V } \cs_new_protected:Npn \__graphics_backend_getbb_auxv:nNnn #1#2#3#4 { - \graphics_bb_restore:nF {#1#3} + \__graphics_bb_restore:nF {#1#3} { \__graphics_backend_getbb_auxvi:nNnn {#1} #2 {#3} {#4} } } \cs_new_protected:Npn \__graphics_backend_getbb_auxvi:nNnn #1#2#3#4 { \hbox_set:Nn \l__graphics_internal_box { #2 #1 ~ #4 } - \dim_set:Nn \l_graphics_urx_dim { \box_wd:N \l__graphics_internal_box } - \dim_set:Nn \l_graphics_ury_dim { \box_ht:N \l__graphics_internal_box } - \graphics_bb_save:n {#1#3} + \dim_set:Nn \l__graphics_urx_dim { \box_wd:N \l__graphics_internal_box } + \dim_set:Nn \l__graphics_ury_dim { \box_ht:N \l__graphics_internal_box } + \__graphics_bb_save:n {#1#3} } \cs_new:Npn \__graphics_backend_getbb_pagebox:w #1 box {#1} \cs_new_protected:Npn \__graphics_backend_include_pdf:n #1 { - \tex_XeTeXpdffile:D - \__graphics_backend_include_pdf_quote:w #1 "#1" \s__graphics_stop \c_space_tl - \int_compare:nNnT \l_graphics_page_int > 0 - { page ~ \int_use:N \l_graphics_page_int \c_space_tl } - \exp_after:wN \__graphics_backend_getbb_pagebox:w \l_graphics_pagebox_tl + \tex_XeTeXpdffile:D #1 ~ + \int_compare:nNnT \l__graphics_page_int > 0 + { page ~ \int_use:N \l__graphics_page_int \c_space_tl } + \exp_after:wN \__graphics_backend_getbb_pagebox:w \l__graphics_pagebox_tl + } +\cs_new_protected:Npn \__graphics_backend_get_pagecount:n #1 + { + \int_const:cn { c__graphics_ #1 _pages_int } + { + \int_max:nn + { \int_use:N \tex_XeTeXpdfpagecount:D #1 ~ } + { 1 } + } } -\cs_new:Npn \__graphics_backend_include_pdf_quote:w #1 " #2 " #3 \s__graphics_stop - { " #2 " } %% File: l3backend-pdf.dtx \box_new:N \l__pdf_internal_box \cs_new_protected:Npx \__pdf_backend:n #1 @@ -884,19 +862,13 @@ { \__pdf_backend_link_begin:n {#1#2} } \cs_new_protected:Npx \__pdf_backend_link_begin:n #1 { - \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - \exp_not:N \int_gincr:N \exp_not:N \g__pdf_backend_link_int - } + \exp_not:N \int_gincr:N \exp_not:N \g__pdf_backend_link_int \__pdf_backend:x { bann ~ - \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - @pdf.lnk - \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int - \c_space_tl - } + @pdf.lnk + \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int + \c_space_tl << /Type /Annot #1 @@ -905,14 +877,8 @@ } \cs_new_protected:Npn \__pdf_backend_link_end: { \__pdf_backend:n { eann } } -\cs_new:Npx \__pdf_backend_link_last: - { - \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 } - { - @pdf.lnk - \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int - } - } +\cs_new:Npn \__pdf_backend_link_last: + { @pdf.lnk \int_use:N \g__pdf_backend_link_int } \cs_new_protected:Npn \__pdf_backend_link_margin:n #1 { \__kernel_backend_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } } \cs_new_protected:Npn \__pdf_backend_destination:nn #1#2 diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty index 7b54fcc0c1f..4c7b9e96214 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}{2022-02-05}{} +\ProvidesExplPackage{l3benchmark}{2022-04-10}{} {L3 Experimental benchmarking} \fp_new:N \g_benchmark_duration_target_fp \fp_gset:Nn \g_benchmark_duration_target_fp { 1 } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty b/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty index 4432b33d208..4fa73bedaa7 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: l3bitset.dtx -\ProvidesExplPackage{l3bitset}{2022-02-05}{} +\ProvidesExplPackage{l3bitset}{2022-04-10}{} {L3 Experimental bitset support} \cs_new_protected:Npn \bitset_new:N #1 { diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty index fbfe2908518..58e1769f88d 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}{2022-02-05}{} +\ProvidesExplPackage{l3draw}{2022-04-10}{} {L3 Experimental core drawing support} \scan_new:N \s__draw_mark \scan_new:N \s__draw_stop diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty index a052de7518d..3b4f473f480 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty @@ -20,54 +20,71 @@ %% %% File: l3graphics.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3graphics}{2022-02-05}{} +\ProvidesExplPackage{l3graphics}{2022-04-10}{} {L3 Experimental graphics inclusion support} -\ior_new:N \l__graphics_tmp_ior -\tl_new:N \l__graphics_tmp_tl +\ior_new:N \l__graphics_internal_ior +\tl_new:N \l__graphics_internal_tl \scan_new:N \s__graphics_stop -\tl_new:N \l_graphics_decodearray_tl -\tl_new:N \l_graphics_pagebox_tl -\bool_new:N \l_graphics_interpolate_bool -\tl_set:Nn \l_graphics_pagebox_tl { cropbox } -\int_new:N \l_graphics_page_int -\dim_new:N \l_graphics_llx_dim -\dim_new:N \l_graphics_lly_dim -\dim_new:N \l_graphics_urx_dim -\dim_new:N \l_graphics_ury_dim -\cs_new_protected:Npn \graphics_bb_save:n #1 +\tl_new:N \l__graphics_pagebox_tl +\keys_define:nn { graphics } + { + decodearray .str_set:N = + \l__graphics_decodearray_str , + draft .bool_set:N = + \l__graphics_draft_bool , + interpolate .bool_set:N = + \l__graphics_interpolate_bool , + pagebox .choices:nn = + { art , bleed , crop , media , trim } + { + \tl_set:Nx \l__graphics_pagebox_tl + { \tl_use:N \l_keys_choice_tl box } + } , + pagebox .initial:n = + crop , + page .int_set:N = + \l__graphics_page_int , + type . str_set:N = + \l__graphics_type_str + } +\dim_new:N \l__graphics_llx_dim +\dim_new:N \l__graphics_lly_dim +\dim_new:N \l__graphics_urx_dim +\dim_new:N \l__graphics_ury_dim +\cs_new_protected:Npn \__graphics_bb_save:n #1 { \dim_if_exist:cTF { c__graphics_ #1 _urx_dim } { \msg_error:nnn { graphic } { bb-already-cached } {#1} } { - \dim_compare:nNnF \l_graphics_llx_dim = { 0pt } - { \dim_const:cn { c__graphics_ #1 _llx_dim } { \l_graphics_llx_dim } } - \dim_compare:nNnF \l_graphics_lly_dim = { 0pt } - { \dim_const:cn { c__graphics_ #1 _lly_dim } { \l_graphics_lly_dim } } - \dim_const:cn { c__graphics_ #1 _urx_dim } { \l_graphics_urx_dim } - \dim_const:cn { c__graphics_ #1 _ury_dim } { \l_graphics_ury_dim } + \dim_compare:nNnF \l__graphics_llx_dim = { 0pt } + { \dim_const:cn { c__graphics_ #1 _llx_dim } { \l__graphics_llx_dim } } + \dim_compare:nNnF \l__graphics_lly_dim = { 0pt } + { \dim_const:cn { c__graphics_ #1 _lly_dim } { \l__graphics_lly_dim } } + \dim_const:cn { c__graphics_ #1 _urx_dim } { \l__graphics_urx_dim } + \dim_const:cn { c__graphics_ #1 _ury_dim } { \l__graphics_ury_dim } } } -\cs_generate_variant:Nn \graphics_bb_save:n { x } -\cs_new_protected:Npn \graphics_bb_restore:nF #1#2 +\cs_generate_variant:Nn \__graphics_bb_save:n { x } +\cs_new_protected:Npn \__graphics_bb_restore:nF #1#2 { \dim_if_exist:cTF { c__graphics_ #1 _urx_dim } { - \dim_set_eq:Nc \l_graphics_urx_dim { c__graphics_ #1 _urx_dim } - \dim_set_eq:Nc \l_graphics_ury_dim { c__graphics_ #1 _ury_dim } + \dim_set_eq:Nc \l__graphics_urx_dim { c__graphics_ #1 _urx_dim } + \dim_set_eq:Nc \l__graphics_ury_dim { c__graphics_ #1 _ury_dim } \dim_if_exist:cTF { c__graphics_ #1 _llx_dim } - { \dim_set_eq:Nc \l_graphics_llx_dim { c__graphics_ #1 _llx_dim } } - { \dim_zero:N \l_graphics_llx_dim } + { \dim_set_eq:Nc \l__graphics_llx_dim { c__graphics_ #1 _llx_dim } } + { \dim_zero:N \l__graphics_llx_dim } \dim_if_exist:cTF { c__graphics_ #1 _lly_dim } - { \dim_set_eq:Nc \l_graphics_lly_dim { c__graphics_ #1 _lly_dim } } - { \dim_zero:N \l_graphics_lly_dim } + { \dim_set_eq:Nc \l__graphics_lly_dim { c__graphics_ #1 _lly_dim } } + { \dim_zero:N \l__graphics_lly_dim } } {#2} } -\cs_generate_variant:Nn \graphics_bb_restore:nF { x } -\cs_new_protected:Npn \graphics_extract_bb:n #1 +\cs_generate_variant:Nn \__graphics_bb_restore:nF { x } +\cs_new_protected:Npn \__graphics_extract_bb:n #1 { - \int_compare:nNnTF \l_graphics_page_int > 0 - { \__graphics_extract_bb_auxi:Vn \l_graphics_page_int {#1} } + \int_compare:nNnTF \l__graphics_page_int > 0 + { \__graphics_extract_bb_auxi:Vn \l__graphics_page_int {#1} } { \__graphics_extract_bb_auxii:nnn {#1} { } { } } } \cs_new_protected:Npn \__graphics_extract_bb_auxi:nn #1#2 @@ -75,9 +92,9 @@ \cs_generate_variant:Nn \__graphics_extract_bb_auxi:nn { Vn } \cs_new_protected:Npn \__graphics_extract_bb_auxii:nnn #1#2#3 { - \tl_if_empty:NTF \l_graphics_pagebox_tl + \tl_if_empty:NTF \l__graphics_pagebox_tl { \__graphics_extract_bb_auxiv:nnn } - { \__graphics_extract_bb_auxiii:Vnnn \l_graphics_pagebox_tl } + { \__graphics_extract_bb_auxiii:Vnnn \l__graphics_pagebox_tl } {#1} {#2} {#3} } \cs_new_protected:Npn \__graphics_extract_bb_auxiii:nnnn #1#2#3#4 @@ -86,42 +103,34 @@ \cs_new_protected:Npn \__graphics_extract_bb_auxiv:nnn #1#2#3 { \__graphics_read_bb_auxi:nnnn {#1} {#2} - { \ior_shell_open:Nn \l__graphics_tmp_ior { extractbb~#3-O~#1 } } + { \ior_shell_open:Nn \l__graphics_internal_ior { extractbb~#3-O~#1 } } { pipe-failed } } -\cs_new_protected:Npn \graphics_read_bb:n #1 +\cs_new_protected:Npn \__graphics_read_bb:n #1 { \__graphics_read_bb_auxi:nnnn {#1} { } - { \ior_open:Nn \l__graphics_tmp_ior {#1} } + { \ior_open:Nn \l__graphics_internal_ior {#1} } { graphic-not-found } } \cs_new_protected:Npn \__graphics_read_bb_auxi:nnnn #1#2#3#4 { - \graphics_bb_restore:nF {#1#2} + \__graphics_bb_restore:nF {#1#2} { \__graphics_read_bb_auxii:nnnn {#3} {#4} {#1} {#2} } } \cs_new_protected:Npx \__graphics_read_bb_auxii:nnnn #1#2#3#4 { #1 - \exp_not:N \ior_if_eof:NTF \exp_not:N \l__graphics_tmp_ior + \exp_not:N \ior_if_eof:NTF \exp_not:N \l__graphics_internal_ior { \msg_error:nnn { graphics } {#2} {#3} } { - \ior_str_map_inline:Nn \exp_not:N \l__graphics_tmp_ior + \ior_str_map_inline:Nn \exp_not:N \l__graphics_internal_ior { \exp_not:N \__graphics_read_bb_auxiii:w ##1 ~ \c_colon_str \s__graphics_stop } + \__graphics_bb_save:n {#3#4} } - \exp_not:n - { - \ior_close:N \l__graphics_tmp_ior - \dim_compare:nNnF \l_graphics_llx_dim = { 0pt } - { \dim_const:cn { c__graphics_ #3#4 _llx_dim } { \l_graphics_llx_dim } } - \dim_compare:nNnF \l_graphics_lly_dim = { 0pt } - { \dim_const:cn { c__graphics_ #3#4 _lly_dim } { \l_graphics_lly_dim } } - \dim_const:cn { c__graphics_ #3#4 _urx_dim } { \l_graphics_urx_dim } - \dim_const:cn { c__graphics_ #3#4 _ury_dim } { \l_graphics_ury_dim } - } + \ior_close:N \exp_not:N \l__graphics_internal_ior } \use:x { @@ -138,26 +147,25 @@ { \str_if_eq:nnF {#2} { atend } { - \tl_set_rescan:Nnx \l__graphics_tmp_tl + \tl_set_rescan:Nnx \l__graphics_internal_tl { \char_set_catcode_space:n { 9 } \char_set_catcode_space:n { 32 } } { \use:n #1 } - \exp_after:wN \__graphics_read_bb_auxv:w \l__graphics_tmp_tl \s__graphics_stop + \exp_after:wN \__graphics_read_bb_auxv:w \l__graphics_internal_tl \s__graphics_stop } } \cs_new_protected:Npn \__graphics_read_bb_auxv:w #1~#2~#3~#4~#5 \s__graphics_stop { - \dim_set:Nn \l_graphics_llx_dim { #1 bp } - \dim_set:Nn \l_graphics_lly_dim { #2 bp } - \dim_set:Nn \l_graphics_urx_dim { #3 bp } - \dim_set:Nn \l_graphics_ury_dim { #4 bp } + \dim_set:Nn \l__graphics_llx_dim { #1 bp } + \dim_set:Nn \l__graphics_lly_dim { #2 bp } + \dim_set:Nn \l__graphics_urx_dim { #3 bp } + \dim_set:Nn \l__graphics_ury_dim { #4 bp } \ior_map_break: } -\bool_new:N \l_graphics_draft_bool -\tl_new:N \l_graphics_name_tl -\tl_new:N \l__graphics_name_tl +\str_new:N \l__graphics_final_name_str +\str_new:N \l__graphics_full_name_str \box_new:N \l__graphics_internal_box \str_new:N \l__graphics_dir_str \str_new:N \l__graphics_name_str @@ -167,50 +175,34 @@ \prop_new:N \l_graphics_ext_type_prop \prop_put:Nnn \l_graphics_ext_type_prop { .ps } { eps } \seq_new:N \g__graphics_record_seq -\cs_new_protected:Npn \graphics_include:n #1 +\cs_new_protected:Npn \graphics_include:nn #1#2 { \group_begin: + \keys_set:nn { graphics } {#1} \seq_set_eq:NN \l_file_search_path_seq \l_graphics_search_path_seq - \file_get_full_name:nNTF {#1} \l__graphics_name_tl + \file_get_full_name:nNTF {#2} \l__graphics_full_name_str { - \str_if_eq:eeTF { \l__graphics_name_tl } { #1 .tex } - { \__graphics_include_search:n {#1} } + \str_if_eq:eeTF { \l__graphics_full_name_str } { #2 .tex } + { \msg_error:nnn { graphics } { graphic-not-found } {#2} } { \__graphics_include: } } - { \__graphics_include_search:n {#1} } + { \msg_error:nnn { graphics } { graphic-not-found } {#2} } \group_end: } -\cs_new_protected:Npn \__graphics_include_search:n #1 - { - \seq_map_inline:Nn \l_graphics_search_ext_seq - { - \file_get_full_name:nNT { #1 . ##1 } \l__graphics_name_tl - { \seq_map_break:n { \use_i:nnn \__graphics_include: } } - } - \use:n - { \msg_error:nnn { graphics } { graphic-not-found } {#1} } - } +\cs_generate_variant:Nn \graphics_include:nn { nV } \cs_new_protected:Npn \__graphics_include: { - \file_parse_full_name:VNNN \l__graphics_name_tl - \l__graphics_dir_str \l__graphics_name_str \l__graphics_ext_str - \exp_args:Ne \__graphics_include_auxi:n + \str_if_empty:NTF \l__graphics_type_str { - \exp_args:Ne \str_tail:n - { \str_foldcase:V \l__graphics_ext_str } - } - } -\cs_new_protected:Npn \graphics_include:nn #1#2 - { - \group_begin: - \seq_set_eq:NN \l_file_search_path_seq \l_graphics_search_path_seq - \file_get_full_name:nNTF {#1} \l__graphics_name_tl - { - \exp_args:Ne \__graphics_include_auxi:n - { \str_foldcase:n {#1} } - } - { \msg_error:nnn { graphics } { graphic-not-found } {#1} } - \group_end: + \file_parse_full_name:VNNN \l__graphics_full_name_str + \l__graphics_dir_str \l__graphics_name_str \l__graphics_ext_str + \__graphics_include_auxi:e + { + \exp_args:Ne \str_tail:n + { \str_foldcase:V \l__graphics_ext_str } + } + } + { \__graphics_include_auxi:e { \l__graphics_type_str } } } \cs_new_protected:Npn \__graphics_include_auxi:n #1 { @@ -218,18 +210,21 @@ { \tl_set:Nn \l__graphics_internal_tl {#1} } \exp_args:NV \__graphics_include_auxii:n \l__graphics_internal_tl } +\cs_generate_variant:Nn \__graphics_include_auxi:n { e } \cs_new_protected:Npn \__graphics_include_auxii:n #1 { \mode_leave_vertical: \cs_if_exist:cTF { __graphics_backend_include_ #1 :n } { - \tl_set_eq:NN \l_graphics_name_tl \l__graphics_name_tl + \tl_set_eq:NN \l__graphics_final_name_str \l__graphics_full_name_str + \str_set:Nx \l__graphics_full_name_str + { \exp_args:NV \__kernel_file_name_quote:n \l__graphics_full_name_str } \exp_args:NnV \use:c { __graphics_backend_getbb_ #1 :n } - \l__graphics_name_tl - \seq_gput_right:NV \g__graphics_record_seq \l_graphics_name_tl + \l__graphics_full_name_str + \seq_gput_right:NV \g__graphics_record_seq \l__graphics_final_name_str \clist_if_exist:NT \@filelist - { \exp_args:NV \@addtofilelist \l_graphics_name_tl } - \bool_if:NTF \l_graphics_draft_bool + { \exp_args:NV \@addtofilelist \l__graphics_final_name_str } + \bool_if:NTF \l__graphics_draft_bool { \__graphics_include_auxiii:n } { \__graphics_include_auxiv:n } {#1} @@ -238,21 +233,21 @@ } \cs_new_protected:Npn \__graphics_include_auxiii:n #1 { - \hbox_to_wd:nn { \l_graphics_urx_dim - \l_graphics_llx_dim } + \hbox_to_wd:nn { \l__graphics_urx_dim - \l__graphics_llx_dim } { \tex_vrule:D \tex_hss:D \vbox_to_ht:nn - { \l_graphics_ury_dim - \l_graphics_lly_dim } + { \l__graphics_ury_dim - \l__graphics_lly_dim } { \tex_hrule:D width - \dim_eval:n { \l_graphics_urx_dim - \l_graphics_llx_dim } + \dim_eval:n { \l__graphics_urx_dim - \l__graphics_llx_dim } \tex_vss:D \hbox_to_wd:nn - { \l_graphics_urx_dim - \l_graphics_llx_dim } + { \l__graphics_urx_dim - \l__graphics_llx_dim } { \ttfamily - \tex_hss:D \l__graphics_name_tl \tex_hss:D + \tex_hss:D \l__graphics_full_name_str \tex_hss:D } \tex_vss:D \tex_hrule:D @@ -266,13 +261,13 @@ \hbox_set:Nn \l__graphics_internal_box { \exp_args:NnV \use:c { __graphics_backend_include_ #1 :n } - \l__graphics_name_tl + \l__graphics_full_name_str } \box_set_dp:Nn \l__graphics_internal_box { 0pt } \box_set_ht:Nn \l__graphics_internal_box - { \l_graphics_ury_dim - \l_graphics_lly_dim } + { \l__graphics_ury_dim - \l__graphics_lly_dim } \box_set_wd:Nn \l__graphics_internal_box - { \l_graphics_urx_dim - \l_graphics_llx_dim } + { \l__graphics_urx_dim - \l__graphics_llx_dim } \box_use_drop:N \l__graphics_internal_box } \cs_new_protected:Npn \graphics_show_list: { \__graphics_list:N \msg_show:nnxxxx } @@ -280,16 +275,100 @@ \cs_new_protected:Npn \__graphics_list:N #1 { \seq_remove_duplicates:N \g__graphics_record_seq - #1 { LaTeX/kernel } { file-list } + #1 { kernel } { file-list } { \seq_map_function:NN \g__graphics_record_seq \__graphics_list_aux:n } { } { } { } } \cs_new:Npn \__graphics_list_aux:n #1 { \iow_newline: #1 } +\cs_new_protected:Npn \graphics_get_full_name:nN #1#2 + { + \graphics_get_full_name:nNF {#1} #2 + { \tl_set:Nn #2 { \q_no_value } } + } +\prg_new_protected_conditional:Npnn \graphics_get_full_name:nN #1#2 + { T , F , TF } + { + \group_begin: + \seq_set_eq:NN \l_file_search_path_seq \l_graphics_search_path_seq + \file_get_full_name:nNTF {#1} \l__graphics_full_name_str + { + \str_if_eq:eeT { \l__graphics_full_name_str } { #1 .tex } + { \__graphics_get_full_name:n {#1} } + } + { \__graphics_get_full_name:n {#1} } + \exp_args:NNNV \group_end: + \tl_set:Nn #2 \l__graphics_full_name_str + \tl_if_empty:NTF #2 + { \prg_return_false: } + { \prg_return_true: } + } +\cs_new_protected:Npn \__graphics_get_full_name:n #1 + { + \str_clear:N \l__graphics_full_name_str + \seq_map_inline:Nn \l_graphics_search_ext_seq + { + \file_get_full_name:nNT { #1 ##1 } \l__graphics_full_name_str + { \seq_map_break:n { \use_none:nn } } + } + \use:n + { \str_clear:N \l__graphics_full_name_str } + } +\cs_new_protected:Npn \graphics_get_pagecount:nN #1#2 + { + \group_begin: + \seq_set_eq:NN \l_file_search_path_seq \l_graphics_search_path_seq + \file_get_full_name:nNTF {#1} \l__graphics_full_name_str + { + \int_if_exist:cF { c__graphics_ \l__graphics_full_name_str _pages_int } + { + \exp_args:NV \__graphics_backend_get_pagecount:n + \l__graphics_full_name_str + } + \tl_set:Nv #2 { c__graphics_ \l__graphics_full_name_str _pages_int } + } + { + \tl_set:Nn #2 { 0 } + \msg_error:nnn { graphics } { graphic-not-found } {#1} + } + \exp_args:NNNV \group_end: + \tl_set:Nn #2 #2 + } +\cs_new_protected:Npx \__graphics_get_pagecount:n #1 + { + \ior_shell_open:Nn \exp_not:N \l__graphics_internal_ior + { extractbb~-O~#1 } + \exp_not:N \ior_if_eof:NTF \exp_not:N \l__graphics_internal_ior + { \msg_error:nnn { graphics } { pipe-failed } } + { + \ior_str_map_inline:Nn \exp_not:N \l__graphics_internal_ior + { + \exp_not:N \__graphics_get_pagecount:nw {#1} + ##1 ~ \c_colon_str \c_colon_str \s__graphics_stop + } + \exp_not:N \int_if_exist:cF { c__graphics_ #1 _pages_int } + { \int_const:cn { c__graphics_ #1 _pages_int } { 1 } } + } + \ior_close:N \exp_not:N \l__graphics_internal_ior + } +\use:x + { + \cs_new_protected:Npn \exp_not:N \__graphics_get_pagecount:nw + ##1##2 \c_colon_str ##3 \c_colon_str ##4 \s__graphics_stop + { + \exp_not:N \str_if_eq:nnT + { \c_percent_str \c_percent_str Pages } + {##2} + { + \int_const:cn { c__graphics_ ##1 _pages_int } {##3} + \exp_not:N \ior_map_break: + } + } + } \msg_new:nnnn { graphics } { graphic-not-found } { Image~file~'#1'~not~found. } { - LaTeX~tried~to~open~graphic~file~'#1', - ~but~the~file~could~not~be~read. + LaTeX~tried~to~open~graphic~file~'#1',~ + but~the~file~could~not~be~read. } \msg_new:nnnn { graphics } { pipe-failed } { Cannot~run~piped~system~commands. } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3opacity/l3opacity.sty b/Master/texmf-dist/tex/latex/l3experimental/l3opacity/l3opacity.sty index df90c3478c3..2bc5ff3b45d 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3opacity/l3opacity.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3opacity/l3opacity.sty @@ -20,7 +20,7 @@ %% %% File: l3opacity.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3opacity}{2022-02-05}{} +\ProvidesExplPackage{l3opacity}{2022-04-10}{} {L3 Experimental opacity support} \cs_new_protected:Npn \opacity_select:n #1 { \__opacity_select:nN {#1} \__opacity_backend_select:n } 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 9ca33411af2..9d3a1cec381 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}{2022-02-05}{} +\ProvidesExplPackage{l3str-format}{2022-04-10}{} {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 3584a776156..82c3e44bad9 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}{2022-02-05}{} +\ProvidesExplPackage{l3sys-shell}{2022-04-10}{} {L3 Experimental system shell functions} \scan_new:N \s__sys_stop \quark_new:N \q__sys_nil @@ -176,6 +176,8 @@ \seq_set_split:NnV #2 { \char_generate:nn { `\^^M } { 12 } } \exp_not:N \l__sys_tmp_tl \seq_pop_right:NN #2 \exp_not:N \l__sys_tmp_tl + \exp_not:N \tl_if_blank:eTF { \exp_not:N \seq_item:Nn #2 { 1 } } + { \seq_clear:N #2 } } } %% diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index f3ccc5818ce..4c3d6d531a0 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: xcoffins.dtx -\ProvidesExplPackage{xcoffins}{2022-02-05}{} +\ProvidesExplPackage{xcoffins}{2022-04-10}{} {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 20faae1e90f..8d52f950685 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}{2022-02-05}{} +\ProvidesExplPackage{l3galley}{2022-04-10}{} {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 a741b024460..d65e9bf4ece 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: xgalley.dtx -\ProvidesExplPackage{xgalley}{2022-02-05}{} +\ProvidesExplPackage{xgalley}{2022-04-10}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} \clist_new:N \l__galley_tmpa_clist diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 3904ec54d93..8d286c95e9a 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{2022-02-24}% +\def\ExplFileDate{2022-04-10}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -1256,12 +1256,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_primitive:NN \kcatcode \tex_kcatcode:D \__kernel_primitive:NN \kuten \tex_kuten:D \__kernel_primitive:NN \lastnodechar \tex_lastnodechar:D + \__kernel_primitive:NN \lastnodefont \tex_lastnodefont:D \__kernel_primitive:NN \lastnodesubtype \tex_lastnodesubtype:D \__kernel_primitive:NN \noautospacing \tex_noautospacing:D \__kernel_primitive:NN \noautoxspacing \tex_noautoxspacing:D \__kernel_primitive:NN \pagefistretch \tex_pagefistretch:D \__kernel_primitive:NN \postbreakpenalty \tex_postbreakpenalty:D \__kernel_primitive:NN \prebreakpenalty \tex_prebreakpenalty:D + \__kernel_primitive:NN \ptexlineendmode \tex_lineendmode:D \__kernel_primitive:NN \ptexminorversion \tex_ptexminorversion:D \__kernel_primitive:NN \ptexrevision \tex_ptexrevision:D \__kernel_primitive:NN \ptexversion \tex_ptexversion:D @@ -1277,6 +1279,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_primitive:NN \textbaselineshiftfactor \tex_textbaselineshiftfactor:D \__kernel_primitive:NN \tfont \tex_tfont:D + \__kernel_primitive:NN \toucs \tex_toucs:D + \__kernel_primitive:NN \ucs \tex_ucs:D \__kernel_primitive:NN \xkanjiskip \tex_xkanjiskip:D \__kernel_primitive:NN \xspcode \tex_xspcode:D \__kernel_primitive:NN \ybaselineshift \tex_ybaselineshift:D @@ -1289,7 +1293,6 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_primitive:NN \kchar \tex_kchar:D \__kernel_primitive:NN \kchardef \tex_kchardef:D \__kernel_primitive:NN \kuten \tex_kuten:D - \__kernel_primitive:NN \ucs \tex_ucs:D \__kernel_primitive:NN \uptexrevision \tex_uptexrevision:D \__kernel_primitive:NN \uptexversion \tex_uptexversion:D \__kernel_primitive:NN \odelcode \tex_odelcode:D @@ -1301,6 +1304,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_primitive:NN \oradical \tex_oradical:D \__kernel_primitive:NN \partokencontext \tex_partokencontext:D \__kernel_primitive:NN \partokenname \tex_partokenname:D + \__kernel_primitive:NN \showstream \tex_showstream:D \__kernel_primitive:NN \tracingstacklevels \tex_tracingstacklevels:D \tex_endgroup:D \tex_ifdefined:D \@@end @@ -4943,6 +4947,8 @@ Type H <return> for immediate help}\def~{\errmessage{% { p , T , F , TF } \prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c { p , T , F , TF } +\prg_new_eq_conditional:NNn \str_if_empty:n \tl_if_empty:n + { p , T , F , TF } \cs_new_eq:NN \__str_if_eq:nn \tex_strcmp:D \prg_new_conditional:Npnn \str_compare:nNn #1#2#3 { p , T , F , TF } { @@ -5012,6 +5018,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__str_case:nnTF #1#2#3#4 { \__str_case:nw {#1} #2 {#1} { } \s__str_mark {#3} \s__str_mark {#4} \s__str_stop } \cs_generate_variant:Nn \str_case:nn { V , o , nV , nv } +\cs_new_eq:NN \str_case:Nn \str_case:Vn +\cs_new_eq:NN \str_case:NnT \str_case:VnT +\cs_new_eq:NN \str_case:NnF \str_case:VnF +\cs_new_eq:NN \str_case:NnTF \str_case:VnTF \prg_generate_conditional_variant:Nnn \str_case:nn { V , o , nV , nv } { T , F , TF } \cs_new:Npn \__str_case:nw #1#2#3 @@ -5441,6 +5451,92 @@ Type H <return> for immediate help}\def~{\errmessage{% { \use:c { char_str_ #1 case:N } #2 } \__str_change_case_loop:nw {#1} } +\if_int_compare:w 0 + \cs_if_exist:NT \tex_XeTeXversion:D { 1 } + \cs_if_exist:NT \tex_luatexversion:D { 1 } + > 0 \exp_stop_f: +\else: + \cs_gset:Npn \__str_change_case_char:nN #1#2 + { + \__str_if_recursion_tail_stop_do:Nn #2 + { \__str_change_case_end:wn } + \int_compare:nNnTF { `#2 } > { "80 } + { + \int_compare:nNnTF { `#2 } < { "E0 } + { \__str_change_case_char_UTFviii:nNN } + { + \int_compare:nNnTF { `#2 } < { "F0 } + { \__str_change_case_char_UTFviii:nNNN } + { \__str_change_case_char_UTFviii:nNNNN } + } + {#1} #2 + } + { + \__str_change_case_output:fw + { \use:c { char_str_ #1 case:N } #2 } + \__str_change_case_loop:nw {#1} + } + } + \cs_new:Npn \__str_change_case_char_UTFviii:nNN #1#2#3 + { \__str_change_case_char_UTFviii:nn {#1} {#2#3} } + \cs_new:Npn \__str_change_case_char_UTFviii:nNNN #1#2#3#4 + { \__str_change_case_char_UTFviii:nn {#1} {#2#3#4} } + \cs_new:Npn \__str_change_case_char_UTFviii:nNNNN #1#2#3#4#5 + { \__str_change_case_char_UTFviii:nn {#1} {#2#3#4#5} } + \cs_if_exist:NF \tex_pdftexversion:D + { + \cs_gset:Npn \__str_change_case_char_UTFviii:nNNN #1#2#3#4 + { + \__str_change_case_output:nw {#2#3#4} + \__str_change_case_loop:nw {#1} + } + \cs_gset:Npn \__str_change_case_char_UTFviii:nNNNN #1#2#3#4#5 + { + \__str_change_case_output:nw {#2#3#4#5} + \__str_change_case_loop:nw {#1} + } + } + \cs_new:Npn \__str_change_case_char_UTFviii:nn #1#2 + { + \use:c { __str_change_case_char_UTFviii_ #1 :nn } {#1} {#2} + } + \cs_new:Npn \__str_change_case_char_UTFviii_upper:nn #1#2 + { + \__str_change_case_output:fw + { + \cs_if_exist:cTF { c__kernel_ #1 case_ #2 _tl } + { + \__kernel_tl_to_str:w \exp_after:wN \exp_after:wN \exp_after:wN + { \cs:w c__kernel_ #1 case_ #2 _tl \cs_end: } + } + {#2} + } + \__str_change_case_loop:nw {#1} + } + \cs_new_eq:NN \__str_change_case_char_UTFviii_lower:nn + \__str_change_case_char_UTFviii_upper:nn + \cs_new:Npn \__str_change_case_char_UTFviii_fold:nn #1#2 + { + \__str_change_case_output:fw + { + \cs_if_exist:cTF { c__kernel_ #1 case_ #2 _tl } + { + \__kernel_tl_to_str:w \exp_after:wN \exp_after:wN \exp_after:wN + { \cs:w c__kernel_ #1 case_ #2 _tl \cs_end: } + } + { + \cs_if_exist:cTF { c__kernel_lowercase_ #2 _tl } + { + \__kernel_tl_to_str:w + \exp_after:wN \exp_after:wN \exp_after:wN + { \cs:w c__kernel_lowercase_ #2 _tl \cs_end: } + } + {#2} + } + } + \__str_change_case_loop:nw {#1} + } +\fi: \str_const:Nx \c_ampersand_str { \cs_to_str:N \& } \str_const:Nx \c_atsign_str { \cs_to_str:N \@ } \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } @@ -8598,26 +8694,22 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npn \__char_generate_aux:w #1 ; #2 ; { - \if_int_compare:w #2 = 10 \exp_stop_f: - \if_int_compare:w #1 = \c_zero_int - \msg_expandable_error:nn { char } { null-space } - \else: - \msg_expandable_error:nn { char } { space } - \fi: + \if_int_odd:w 0 + \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi: + \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi: + \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi: + \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f: + \msg_expandable_error:nn { char } + { invalid-catcode } \else: \if_int_odd:w 0 - \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi: - \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi: - \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi: - \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f: + \if_int_compare:w #1 < \c_zero_int 1 \fi: + \if_int_compare:w #1 > \c_max_char_int 1 \fi: \exp_stop_f: \msg_expandable_error:nn { char } - { invalid-catcode } + { out-of-range } \else: - \if_int_odd:w 0 - \if_int_compare:w #1 < \c_zero_int 1 \fi: - \if_int_compare:w #1 > \c_max_char_int 1 \fi: \exp_stop_f: - \msg_expandable_error:nn { char } - { out-of-range } + \if_int_compare:w #2#1 = 100 \exp_stop_f: + \msg_expandable_error:nn { char } { null-space } \else: \__char_generate_aux:nnw {#1} {#2} \fi: @@ -10533,9 +10625,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { Cannot~generate~null~char~as~a~space. } \msg_new:nnn { char } { out-of-range } { Charcode~requested~out~of~engine~range. } -\msg_new:nnn { char } { space } - { Cannot~generate~space~chars. } -\msg_new:nnnn { ior } { quote-in-shell } +\msg_new:nnnn { kernel } { quote-in-shell } { Quotes~in~shell~command~'#1'. } { Shell~commands~cannot~contain~quotes~("). } \msg_new:nnnn { keys } { no-property } @@ -13036,6 +13126,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \bool_new:N \l__keys_tmp_bool \tl_new:N \l__keys_tmpa_tl \tl_new:N \l__keys_tmpb_tl +\bool_new:N \l__keys_precompile_bool +\tl_new:N \l__keys_precompile_tl \prop_new:N \l_keys_usage_load_prop \prop_new:N \l_keys_usage_preamble_prop \scan_new:N \s__keys_nil @@ -13043,6 +13135,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \scan_new:N \s__keys_stop \quark_new:N \q__keys_no_value \__kernel_quark_new_conditional:Nn \__keys_quark_if_no_value:N { TF } +\cs_new_protected:Npn \__keys_precompile:n #1 + { + \bool_if:NTF \l__keys_precompile_bool + { \tl_put_right:Nn \l__keys_precompile_tl } + { \use:n } + {#1} + } \cs_new_protected:Npn \keys_define:nn { \__keys_define:onn \l__keys_module_str } \cs_new_protected:Npn \__keys_define:nnn #1#2#3 @@ -13146,7 +13245,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_not:c { bool_ #2 set_ #3 :N } \exp_not:N #1 } \__keys_cmd_set:nx { \l_keys_path_str / false } { \exp_not:c { bool_ #2 set_ #4 :N } \exp_not:N #1 } - \__keys_cmd_set:nn { \l_keys_path_str / unknown } + \__keys_cmd_set_direct:nn { \l_keys_path_str / unknown } { \msg_error:nnx { keys } { boolean-values-only } \l_keys_key_str @@ -13178,8 +13277,8 @@ Type H <return> for immediate help}\def~{\errmessage{% { \cs_set_nopar:cpn { \c__keys_type_root_str \l_keys_path_str } { choice } - \__keys_cmd_set:nn \l_keys_path_str { #1 {##1} } - \__keys_cmd_set:nn { \l_keys_path_str / unknown } + \__keys_cmd_set_direct:nn \l_keys_path_str { #1 {##1} } + \__keys_cmd_set_direct:nn { \l_keys_path_str / unknown } { \msg_error:nnxx { keys } { choice-unknown } \l_keys_path_str {##1} @@ -13207,12 +13306,17 @@ Type H <return> for immediate help}\def~{\errmessage{% } } \cs_new_protected:Npn \__keys_cmd_set:nn #1#2 - { \cs_set_protected:cpn { \c__keys_code_root_str #1 } ##1 {#2} } + { \__keys_cmd_set_direct:nn {#1} { \__keys_precompile:n {#2} } } \cs_generate_variant:Nn \__keys_cmd_set:nn { nx , Vn , Vo } +\cs_new_protected:Npn \__keys_cmd_set_direct:nn #1#2 + { \cs_set_protected:cpn { \c__keys_code_root_str #1 } ##1 {#2} } \cs_new_protected:Npn \__keys_cs_set:NNpn #1#2#3# { \cs_set_protected:cpx { \c__keys_code_root_str \l_keys_path_str } ##1 - { #1 \exp_not:N #2 \exp_not:n {#3} {##1} } + { + \__keys_precompile:n + { #1 \exp_not:N #2 \exp_not:n {#3} {##1} } + } \use_none:n } \cs_generate_variant:Nn \__keys_cs_set:NNpn { Nc } @@ -13285,13 +13389,17 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new_protected:Npn \__keys_meta_make:n #1 { - \__keys_cmd_set:Vo \l_keys_path_str + \exp_args:NVo \__keys_cmd_set_direct:nn \l_keys_path_str { - \exp_after:wN \keys_set:nn \exp_after:wN { \l__keys_module_str } {#1} + \exp_after:wN \keys_set:nn \exp_after:wN + { \l__keys_module_str } {#1} } } \cs_new_protected:Npn \__keys_meta_make:nn #1#2 - { \__keys_cmd_set:Vn \l_keys_path_str { \keys_set:nn {#1} {#2} } } + { + \exp_args:NV \__keys_cmd_set_direct:nn + \l_keys_path_str { \keys_set:nn {#1} {#2} } + } \cs_new_protected:Npn \__keys_prop_put:Nn #1#2 { \prop_if_exist:NF #1 { \prop_new:N #1 } @@ -13748,6 +13856,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \__keys_set:nn {#2} {#4} \tl_set:Nn \l__keys_selective_seq {#1} } +\cs_new_protected:Npn \keys_precompile:nnN #1#2#3 + { + \bool_set_true:N \l__keys_precompile_bool + \tl_clear:N \l__keys_precompile_tl + \keys_set:nn {#1} {#2} + \bool_set_false:N \l__keys_precompile_bool + \tl_set_eq:NN #3 \l__keys_precompile_tl + } \cs_new_protected:Npn \__keys_set_keyval:n #1 { \bool_set_true:N \l__keys_no_value_bool @@ -14088,16 +14204,46 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_args:Nnf \msg_show_item_unbraced:nn { code } { - \exp_args:Nc \cs_replacement_spec:N + \exp_args:Ne \__keys_show:n { - \c__keys_code_root_str - \__keys_trim_spaces:n { #2 / #3 } + \exp_args:Nc \cs_replacement_spec:N + { + \c__keys_code_root_str + \__keys_trim_spaces:n { #2 / #3 } + } } } } } { } { } } +\cs_new:Npx \__keys_show:n #1 + { + \exp_not:N \__keys_show:w + #1 + \tl_to_str:n { \__keys_precompile:n } + #1 + \tl_to_str:n { \__keys_precompile:n } + \exp_not:N \s__keys_stop + } +\use:x + { + \cs_new:Npn \exp_not:N \__keys_show:w + ##1 \tl_to_str:n { \__keys_precompile:n } + ##2 \tl_to_str:n { \__keys_precompile:n } + ##3 \exp_not:N \s__keys_stop + } + { + \tl_if_blank:nTF {#2} + {#1} + { \__keys_show:Nw #2 \s__keys_stop } + } +\use:x + { + \cs_new:Npn \exp_not:N \__keys_show:Nw ##1##2 + \c_right_brace_str \exp_not:N \s__keys_stop + } + {#2} \msg_new:nnnn { keys } { bad-relative-key-path } { The~key~'#1'~is~not~inside~the~'#2'~path. } { The~key~'#1'~cannot~be~expressed~relative~to~path~'#2'. } @@ -23296,33 +23442,30 @@ Type H <return> for immediate help}\def~{\errmessage{% 32 \s__tl \__tl_analysis_b_loop:w #1 ; } +\cs_new_protected:Npn \tl_analysis_map_inline:Nn #1 + { \exp_args:No \tl_analysis_map_inline:nn #1 } \cs_new_protected:Npn \tl_analysis_map_inline:nn #1 { \__tl_analysis:n {#1} \int_gincr:N \g__kernel_prg_map_int - \exp_args:Nc \__tl_analysis_map_inline_aux:Nn + \exp_args:Nc \__tl_analysis_map:Nn { __tl_analysis_map_inline_ \int_use:N \g__kernel_prg_map_int :wNw } } -\cs_new_protected:Npn \tl_analysis_map_inline:Nn #1 - { \exp_args:No \tl_analysis_map_inline:nn #1 } -\cs_new_protected:Npn \__tl_analysis_map_inline_aux:Nn #1#2 +\cs_new_protected:Npn \__tl_analysis_map:Nn #1#2 { - \cs_gset_protected:Npn #1 ##1 \s__tl ##2 ##3 \s__tl - { - \use_none:n ##2 - \__tl_analysis_map_inline_aux:nnn {##1} {##3} {##2} - } - \cs_gset_protected:Npn \__tl_analysis_map_inline_aux:nnn ##1##2##3 - { - #2 - #1 - } - \exp_after:wN #1 + \cs_gset_protected:Npn #1 ##1##2##3 {#2} + \exp_after:wN \__tl_analysis_map:NwNw \exp_after:wN #1 \g__tl_analysis_result_tl \s__tl { ? \tl_map_break: } \s__tl \prg_break_point:Nn \tl_map_break: { \int_gdecr:N \g__kernel_prg_map_int } } +\cs_new_protected:Npn \__tl_analysis_map:NwNw #1 #2 \s__tl #3 #4 \s__tl + { + \use_none:n #3 + #1 {#2} {#4} {#3} + \__tl_analysis_map:NwNw #1 + } \cs_new_protected:Npn \tl_analysis_show:N { \__tl_analysis_show:NNN \msg_show:nnxxxx \tl_show:N } \cs_new_protected:Npn \tl_analysis_log:N @@ -31694,6 +31837,39 @@ Type H <return> for immediate help}\def~{\errmessage{% \tl_new:N \l_text_expand_exclude_tl \tl_set:Nn \l_text_expand_exclude_tl { \begin \cite \end \label \ref } +\bool_lazy_and:nnT + { \str_if_eq_p:Vn \fmtname { LaTeX2e } } + { \tl_if_exist_p:N \@expl@finalise@setup@@ } + { + \tl_gput_right:Nn \@expl@finalise@setup@@ + { + \tl_gput_right:Nn \@kernel@after@begindocument + { + \group_begin: + \cs_set_protected:Npn \__text_tmp:w #1 + { + \tl_clear:N \l_text_expand_exclude_tl + \tl_map_inline:nn {#1} + { + \bool_lazy_any:nF + { + { \token_if_protected_macro_p:N ##1 } + { \token_if_protected_long_macro_p:N ##1 } + { + \str_if_eq_p:ee + { \cs_replacement_spec:N ##1 } + { \exp_not:n { \protect ##1 } \c_space_tl } + } + } + { \tl_put_right:Nn \l_text_expand_exclude_tl {##1} } + } + } + \exp_args:NV \__text_tmp:w \l_text_expand_exclude_tl + \exp_args:NNNV \group_end: + \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl + } + } + } \tl_new:N \l__text_math_mode_tl \tex_chardef:D \c__text_chardef_space_token = `\ % \tex_mathchardef:D \c__text_mathchardef_space_token = `\ % @@ -31946,7 +32122,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npx \__text_expand_cs:N #1 { \exp_not:N \str_if_eq:nnTF {#1} { \exp_not:N \protect } - { \exp_not:N \__text_expand_protect:N } + { \exp_not:N \__text_expand_protect:w } { \bool_lazy_and:nnTF { \cs_if_exist_p:N \fmtname } @@ -31955,8 +32131,23 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_not:N \__text_expand_replace:N #1 } } } +\cs_new:Npn \__text_expand_protect:w #1 \q__text_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__text_expand_protect:N } + { + \__text_expand_store:n { \protect } + \__text_expand_loop:w + } + #1 \q__text_recursion_stop + } \cs_new:Npn \__text_expand_protect:N #1 { + \__text_if_recursion_tail_stop_do:Nn #1 + { + \__text_expand_store:n { \protect } + \__text_expand_end:w + } \exp_args:Ne \__text_expand_protect:nN { \cs_to_str:N #1 } #1 } @@ -32466,10 +32657,10 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__text_change_case_char_UTFviii:nnnn {#1} {#2} {#3} {#4#5#6#7} } \cs_new:Npn \__text_change_case_char_UTFviii:nnnn #1#2#3#4 { - \cs_if_exist:cTF { c__text_ #1 case_ \tl_to_str:n {#4} _tl } + \cs_if_exist:cTF { c__kernel_ #1 case_ \tl_to_str:n {#4} _tl } { \__text_change_case_store:v - { c__text_ #1 case_ \tl_to_str:n {#4} _tl } + { c__kernel_ #1 case_ \tl_to_str:n {#4} _tl } } { \__text_change_case_store:n {#4} } \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} @@ -33094,7 +33285,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cx { - c__text_ #1 case_ + c__kernel_ #1 case_ \char_generate:nn {#2} { 12 } \char_generate:nn {#3} { 12 } _tl @@ -33110,7 +33301,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cx { - c__text_lowercase_ + c__kernel_lowercase_ \char_generate:nn {#1} { 12 } \char_generate:nn {#2} { 12 } _tl @@ -33338,7 +33529,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cx { - c__text_ #3 case_ + c__kernel_ #3 case_ \char_generate:nn {##1} { 12 } \char_generate:nn {##2} { 12 } _tl @@ -33375,7 +33566,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cn { - c__text_ #3 case_ + c__kernel_ #3 case_ \char_generate:nn {##1} { 12 } \char_generate:nn {##2} { 12 } _tl @@ -33393,7 +33584,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cx { - c__text_ #1 case_ + c__kernel_ #1 case_ \char_generate:nn {#2} { 12 } \char_generate:nn {#3} { 12 } \char_generate:nn {#4} { 12 } @@ -33412,7 +33603,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cx { - c__text_lowercase_ + c__kernel_lowercase_ \char_generate:nn {#1} { 12 } \char_generate:nn {#2} { 12 } \char_generate:nn {#3} { 12 } @@ -33535,7 +33726,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_const:cx { - c__text_ #3 case_ + c__kernel_ #3 case_ \char_generate:nn {##1} { 12 } \char_generate:nn {##2} { 12 } \char_generate:nn {##3} { 12 } @@ -34658,7 +34849,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \tl_if_in:nnTF {#1} { " } { \msg_error:nnx - { ior } { quote-in-shell } {#1} + { kernel } { quote-in-shell } {#1} } { \__kernel_ior_open:Nn #2 { |#1 } } } @@ -34857,10 +35048,11 @@ Type H <return> for immediate help}\def~{\errmessage{% %% File: l3legacy.dtx \prg_new_conditional:Npnn \legacy_if:n #1 { p , T , F , TF } { - \exp_args:Nc \if_meaning:w { if#1 } \iftrue - \prg_return_true: - \else: + \exp_after:wN \reverse_if:N + \cs:w if#1 \cs_end: \prg_return_false: + \else: + \prg_return_true: \fi: } \cs_new_protected:Npn \legacy_if_set_true:n #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 20618550113..a7a2ac6dbfd 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2022-02-24}% +\def\ExplFileDate{2022-04-10}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx index 6a41fe6b6dc..08875b5a725 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2022-02-24}% +\def\ExplFileDate{2022-04-10}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua index 773079c944b..10cec935888 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -56,6 +56,7 @@ local scan_string = token.scan_string local scan_keyword = token.scan_keyword local put_next = token.put_next local token_create = token.create +local token_new = token.new local token_create_safe do local is_defined = token.is_defined @@ -255,9 +256,9 @@ if luatexbase then end end -- File: l3names.dtx -local minus_tok = token.new(string.byte'-', 12) -local zero_tok = token.new(string.byte'0', 12) -local one_tok = token.new(string.byte'1', 12) +local minus_tok = token_new(string.byte'-', 12) +local zero_tok = token_new(string.byte'0', 12) +local one_tok = token_new(string.byte'1', 12) luacmd('tex_strcmp:D', function() local first = scan_string() local second = scan_string() @@ -267,11 +268,16 @@ luacmd('tex_strcmp:D', function() put_next(first == second and zero_tok or one_tok) end end, 'global') +local sprint = tex.sprint local cprint = tex.cprint luacmd('tex_Ucharcat:D', function() local charcode = scan_int() local catcode = scan_int() - cprint(catcode, utf8_char(charcode)) + if catcode == 10 then + sprint(token_new(charcode, 10)) + else + cprint(catcode, utf8_char(charcode)) + end end, 'global') luacmd('tex_filesize:D', function() local size = filesize(scan_string()) diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 9bd22f958f6..b4b85ce414d 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2022-02-24}% +\def\ExplFileDate{2022-04-10}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def index 7f90a7f9940..864ce5a0952 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def @@ -624,7 +624,7 @@ { \__kernel_debug_log:x { Defining~key~#1~\msg_line_context: } } } { } - { \__keys_cmd_set:nn } + { \__keys_cmd_set_direct:nn } \__kernel_patch:nnn { } { |