From 3768cf87942daac44d14a6bd2cb2d2ede497b8d0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 30 Mar 2023 20:05:05 +0000 Subject: l3 (30mar23) git-svn-id: svn://tug.org/texlive/trunk@66710 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/l3backend/l3backend-dvipdfmx.def | 17 +-- .../tex/latex/l3backend/l3backend-dvips.def | 17 +-- .../tex/latex/l3backend/l3backend-dvisvgm.def | 17 +-- .../tex/latex/l3backend/l3backend-luatex.def | 29 +--- .../tex/latex/l3backend/l3backend-luatex.lua | 116 +++++++++++++++ .../tex/latex/l3backend/l3backend-pdftex.def | 28 +--- .../tex/latex/l3backend/l3backend-xetex.def | 17 +-- .../l3experimental/l3benchmark/l3benchmark.sty | 4 +- .../tex/latex/l3experimental/l3bitset/l3bitset.sty | 2 +- .../tex/latex/l3experimental/l3draw/l3draw.sty | 2 +- .../latex/l3experimental/l3graphics/l3graphics.sty | 2 +- .../latex/l3experimental/l3opacity/l3opacity.sty | 2 +- .../latex/l3experimental/l3str/l3str-format.sty | 2 +- .../l3experimental/l3sys-shell/l3sys-shell.sty | 2 +- .../tex/latex/l3experimental/xcoffins/xcoffins.sty | 2 +- .../tex/latex/l3experimental/xgalley/l3galley.sty | 2 +- .../tex/latex/l3experimental/xgalley/xgalley.sty | 2 +- .../texmf-dist/tex/latex/l3kernel/expl3-code.tex | 164 ++++++++++++++++++--- .../tex/latex/l3kernel/expl3-generic.tex | 2 +- Master/texmf-dist/tex/latex/l3kernel/expl3.ltx | 2 +- Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 2 +- 21 files changed, 281 insertions(+), 152 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.lua (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def index 36a61dece26..1605e579e34 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}{2023-01-16}{} + {l3backend-dvipdfmx.def}{2023-03-30}{} {L3 backend support: dvipdfmx} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -66,21 +66,6 @@ \cs_new_protected:Npn \__kernel_backend_scope_end: { \__kernel_backend_literal:n { x:grestore } } %% File: l3backend-color.dtx -\cs_new_protected:Npn \__color_backend_pickup:N #1 - { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nn #1 { { gray } { 0 } } - \msg_warning:nnx { color } { unhandled } - { \current@color } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } - } -\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3 - { \tl_set:Nn #3 { {#1} {#2} } } \cs_new_protected:Npn \__color_backend_select:n #1 { \__kernel_backend_literal:n { pdf : bc ~ [ #1 ] } } \cs_new_eq:NN \__color_backend_select_cmyk:n \__color_backend_select:n diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def index ff1c6cd599c..330811ca4e6 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}{2023-01-16}{} + {l3backend-dvips.def}{2023-03-30}{} {L3 backend support: dvips} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -83,21 +83,6 @@ \cs_new_protected:Npn \__kernel_backend_scope_end: { \__kernel_backend_literal:n { ps:grestore } } %% File: l3backend-color.dtx -\cs_new_protected:Npn \__color_backend_pickup:N #1 - { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nn #1 { { gray } { 0 } } - \msg_warning:nnx { color } { unhandled } - { \current@color } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } - } -\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3 - { \tl_set:Nn #3 { {#1} {#2} } } \cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { cmyk ~ #1 } } \cs_new_protected:Npn \__color_backend_select_gray: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 4d83257e203..07a699aa05b 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}{2023-01-16}{} + {l3backend-dvisvgm.def}{2023-03-30}{} {L3 backend support: dvisvgm} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -97,21 +97,6 @@ } \cs_generate_variant:Nn \__kernel_backend_scope:n { x } %% File: l3backend-color.dtx -\cs_new_protected:Npn \__color_backend_pickup:N #1 - { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nn #1 { { gray } { 0 } } - \msg_warning:nnx { color } { unhandled } - { \current@color } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } - } -\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3 - { \tl_set:Nn #3 { {#1} {#2} } } \cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { cmyk ~ #1 } } \cs_new_protected:Npn \__color_backend_select_gray:n #1 diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def index e5b6258642b..6ca51746e32 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}{2023-01-16}{} + {l3backend-luatex.def}{2023-03-30}{} {L3 backend support: PDF output (LuaTeX)} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -82,30 +82,6 @@ } \cs_generate_variant:Nn \__kernel_backend_matrix:n { x } %% File: l3backend-color.dtx -\cs_new_protected:Npn \__color_backend_pickup:N #1 - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } ~ 0 ~ 0 ~ 0 \s__color_stop #1 - } -\cs_new_protected:Npn \__color_backend_pickup:w - #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7 - { - \str_if_eq:nnTF {#2} { g } - { \tl_set:Nn #7 { { gray } {#1} } } - { - \str_if_eq:nnTF {#4} { rg } - { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } } - { - \str_if_eq:nnTF {#5} { k } - { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } } - { - \tl_set:Nn #1 { { gray } { 0 } } - \msg_warning:nnx { color } { unhandled } - { \current@color } - } - } - } - } \int_new:N \l__color_backend_stack_int \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3 { @@ -128,6 +104,8 @@ } \tl_new:N \l__color_backend_fill_tl \tl_new:N \l__color_backend_stroke_tl +\tl_set:Nn \l__color_backend_fill_tl { 0 ~ g } +\tl_set:Nn \l__color_backend_stroke_tl { 0 ~ G } \cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:nn { #1 ~ k } { #1 ~ K } } \cs_new_protected:Npn \__color_backend_select_gray:n #1 @@ -343,6 +321,7 @@ \cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn \cs_new_eq:NN \__color_backend_fill_reset: \__color_backend_reset: \cs_new_eq:NN \__color_backend_stroke_reset: \__color_backend_reset: +\lua_load_module:n {l3backend-luatex} %% File: l3backend-box.dtx \cs_new_protected:Npn \__box_backend_clip:N #1 { diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.lua b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.lua new file mode 100644 index 00000000000..d784e77c2a1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.lua @@ -0,0 +1,116 @@ +-- +-- This is file `l3backend-luatex.lua', +-- generated with the docstrip utility. +-- +-- The original source files were: +-- +-- l3backend-color.dtx (with options: `lua') +-- l3backend-opacity.dtx (with options: `lua') +-- +-- Copyright (C) 2023 The LaTeX Project +-- +-- It may be distributed and/or modified under the conditions of +-- the LaTeX Project Public License (LPPL), either version 1.3c of +-- this license or (at your option) any later version. The latest +-- version of this license is in the file: +-- +-- https://www.latex-project.org/lppl.txt +-- +-- This file is part of the "l3backend bundle" (The Work in LPPL) +-- and all files in that bundle must be distributed together. +-- +-- File: l3backend-color.dtx +local l = lpeg +local spaces = l.P' '^0 +local digit16 = l.R('09', 'af', 'AF') + +local octet = digit16 * digit16 / function(s) + return string.format('%.3g ', tonumber(s, 16) / 255) +end + +if luaotfload and luaotfload.set_transparent_colorstack then + local htmlcolor = l.Cs(octet * octet * octet * -1 * l.Cc'rg') + local color_export = { + token.create'tex_endlocalcontrol:D', + token.create'tex_hpack:D', + token.new(0, 1), + token.create'color_export:nnN', + token.new(0, 1), + '', + token.new(0, 2), + token.new(0, 1), + 'backend', + token.new(0, 2), + token.create'l_tmpa_tl', + token.create'exp_after:wN', + token.create'__color_select:nn', + token.create'l_tmpa_tl', + token.new(0, 2), + } + local group_end = token.create'group_end:' + local value = (1 - l.P'}')^0 + luatexbase.add_to_callback('luaotfload.parse_color', function (value) + local html = htmlcolor:match(value) + if html then return html end + + tex.runtoks(function() + token.get_next() + color_export[6] = value + tex.sprint(-2, color_export) + end) + local list = token.scan_list() + if not list.head or list.head.next + or list.head.subtype ~= node.subtype'pdf_colorstack' then + error'Unexpected backend behavior' + end + local cmd = list.head.data + node.free(list) + return cmd + end, 'l3color') +end +-- File: l3backend-opacity.dtx +local pdfmanagement_active do + local pdfmanagement_if_active_p = token.create'pdfmanagement_if_active_p:' + local cmd = pdfmanagement_if_active_p.cmdname + if cmd == 'undefined_cs' then + pdfmanagement_active = false + else + token.put_next(pdfmanagement_if_active_p) + pdfmanagement_active = token.scan_int() ~= 0 + end +end + +if pdfmanagement_active and luaotfload and luaotfload.set_transparent_colorstack then + luaotfload.set_transparent_colorstack(token.create'c__opacity_backend_stack_int'.index) + + local transparent_register = { + token.create'pdfmanagement_add:nnn', + token.new(0, 1), + 'Page/Resources/ExtGState', + token.new(0, 2), + token.new(0, 1), + '', + token.new(0, 2), + token.new(0, 1), + '<>', + token.new(0, 2), + } + luatexbase.add_to_callback('luaotfload.parse_transparent', function(value) + value = (octet * -1):match(value) + if not value then + tex.error'Invalid transparency value' + return + end + value = value:sub(1, -2) + local result = 'opacity' .. value + tex.runtoks(function() + transparent_register[6], transparent_register[10], transparent_register[12] = result, value, value + tex.sprint(-2, transparent_register) + end) + return '/' .. result .. ' gs' + end, 'l3opacity') +end diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def index 174146e288e..4e63907755c 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}{2023-01-16}{} + {l3backend-pdftex.def}{2023-03-30}{} {L3 backend support: PDF output (pdfTeX)} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -82,30 +82,6 @@ } \cs_generate_variant:Nn \__kernel_backend_matrix:n { x } %% File: l3backend-color.dtx -\cs_new_protected:Npn \__color_backend_pickup:N #1 - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } ~ 0 ~ 0 ~ 0 \s__color_stop #1 - } -\cs_new_protected:Npn \__color_backend_pickup:w - #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7 - { - \str_if_eq:nnTF {#2} { g } - { \tl_set:Nn #7 { { gray } {#1} } } - { - \str_if_eq:nnTF {#4} { rg } - { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } } - { - \str_if_eq:nnTF {#5} { k } - { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } } - { - \tl_set:Nn #1 { { gray } { 0 } } - \msg_warning:nnx { color } { unhandled } - { \current@color } - } - } - } - } \int_new:N \l__color_backend_stack_int \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3 { @@ -128,6 +104,8 @@ } \tl_new:N \l__color_backend_fill_tl \tl_new:N \l__color_backend_stroke_tl +\tl_set:Nn \l__color_backend_fill_tl { 0 ~ g } +\tl_set:Nn \l__color_backend_stroke_tl { 0 ~ G } \cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:nn { #1 ~ k } { #1 ~ K } } \cs_new_protected:Npn \__color_backend_select_gray:n #1 diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def index 3a37d457409..8948cec19de 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}{2023-01-16}{} + {l3backend-xetex.def}{2023-03-30}{} {L3 backend support: XeTeX} \cs_if_exist:NTF \__kernel_dependency_version_check:nn { @@ -66,21 +66,6 @@ \cs_new_protected:Npn \__kernel_backend_scope_end: { \__kernel_backend_literal:n { x:grestore } } %% File: l3backend-color.dtx -\cs_new_protected:Npn \__color_backend_pickup:N #1 - { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nn #1 { { gray } { 0 } } - \msg_warning:nnx { color } { unhandled } - { \current@color } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } - } -\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3 - { \tl_set:Nn #3 { {#1} {#2} } } \cs_new_protected:Npn \__color_backend_select:n #1 { \__kernel_backend_literal:n { pdf : bc ~ [ #1 ] } } \cs_new_eq:NN \__color_backend_select_cmyk:n \__color_backend_select:n diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty index 2a132de77bd..6134995a38c 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}{2023-01-24}{} +\ProvidesExplPackage{l3benchmark}{2023-03-30}{} {L3 Experimental benchmarking} \fp_new:N \g_benchmark_duration_target_fp \fp_gset:Nn \g_benchmark_duration_target_fp { 1 } @@ -175,7 +175,7 @@ \tl_gset:Nn \g__benchmark_code_tl { \int_gadd:Nn \g__benchmark_duration_int { 0 } } \__benchmark_aux: - \fp_gset:Nn \g__benchmark_one_op_fp { max(\g_benchmark_time_fp, 1e-16) } + \fp_gset:Nn \g__benchmark_one_op_fp { max(\g_benchmark_time_fp, 1e-8) } \int_gset:Nn \g__benchmark_duration_int { \fp_to_int:n { 65536 * \g_benchmark_duration_target_fp } } } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty b/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty index aecf4abe358..20e5ef0b314 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}{2023-01-24}{} +\ProvidesExplPackage{l3bitset}{2023-03-30}{} {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 2b1532bc292..b5038dbf77d 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}{2023-01-24}{} +\ProvidesExplPackage{l3draw}{2023-03-30}{} {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 f06c2331848..6fc957e3890 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty @@ -20,7 +20,7 @@ %% %% File: l3graphics.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3graphics}{2023-01-24}{} +\ProvidesExplPackage{l3graphics}{2023-03-30}{} {L3 Experimental graphics inclusion support} \dim_new:N \l__graphics_internal_dim \ior_new:N \l__graphics_internal_ior diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3opacity/l3opacity.sty b/Master/texmf-dist/tex/latex/l3experimental/l3opacity/l3opacity.sty index 57bf269f89b..ec9ddace1aa 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}{2023-01-24}{} +\ProvidesExplPackage{l3opacity}{2023-03-30}{} {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 c7b82cff755..6f58e2c75ec 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}{2023-01-24}{} +\ProvidesExplPackage{l3str-format}{2023-03-30}{} {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 9c199ba96e7..83bc04ad27c 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}{2023-01-24}{} +\ProvidesExplPackage{l3sys-shell}{2023-03-30}{} {L3 Experimental system shell functions} \scan_new:N \s__sys_stop \quark_new:N \q__sys_nil diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index 6062028597c..431af7ba1f7 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}{2023-01-24}{} +\ProvidesExplPackage{xcoffins}{2023-03-30}{} {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 b615afa58a9..80b7911e9d2 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}{2023-01-24}{} +\ProvidesExplPackage{l3galley}{2023-03-30}{} {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 39ade3ffa33..0153d1d876b 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}{2023-01-24}{} +\ProvidesExplPackage{xgalley}{2023-03-30}{} {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 8f2c6f05dd8..a163950e5ff 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -71,7 +71,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-02-22}% +\def\ExplFileDate{2023-03-30}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -957,6 +957,7 @@ Type H for immediate help}\def~{\errmessage{% \__kernel_primitive:NN \dvivariable \tex_dvivariable:D \__kernel_primitive:NN \eTeXglueshrinkorder \tex_eTeXglueshrinkorder:D \__kernel_primitive:NN \eTeXgluestretchorder \tex_eTeXgluestretchorder:D + \__kernel_primitive:NN \endlocalcontrol \tex_endlocalcontrol:D \__kernel_primitive:NN \etoksapp \tex_etoksapp:D \__kernel_primitive:NN \etokspre \tex_etokspre:D \__kernel_primitive:NN \exceptionpenalty \tex_exceptionpenalty:D @@ -28485,6 +28486,7 @@ Type H for immediate help}\def~{\errmessage{% \int_new:N \l__color_internal_int \tl_new:N \l__color_internal_tl \scan_new:N \s__color_mark +\bool_new:N \l__color_ignore_error_bool \prg_new_conditional:Npnn \color_if_exist:n #1 { p , T, F, TF } { \prop_if_exist:cTF { l__color_named_ #1 _prop } @@ -28651,17 +28653,11 @@ Type H for immediate help}\def~{\errmessage{% } \cs_new_protected:Npn \__color_parse_loop:w #1 ! #2 ! #3 ! #4 ! #5 \s__color_stop { - \bool_lazy_or:nnF - { \tl_if_blank_p:n {#1} } - { \int_compare_p:nNn {#1} = { 100 } } + \tl_if_blank:nF {#1} { - \int_compare:nNnTF {#1} = { 0 } - { - \tl_if_blank:nTF {#2} - { \__color_extract:nNN { white } } - { \__color_extract:nNN {#2} } - \l__color_model_tl \l__color_value_tl - } + \bool_lazy_and:nnTF + { \fp_compare_p:nNn {#1} > { 0 } } + { \fp_compare_p:nNn {#1} < { 100 } } { \use:x { @@ -28669,11 +28665,29 @@ Type H for immediate help}\def~{\errmessage{% { \tl_if_blank:nTF {#2} { white } {#2} } } } + { \__color_parse_loop_check:nn {#1} {#2} } } \tl_if_blank:nF {#3} { \__color_parse_loop:w #3 ! #4 ! #5 \s__color_stop } \__color_parse_end: } +\cs_new_protected:Npn \__color_parse_loop_check:nn #1#2 + { + \bool_if:NF \l__color_ignore_error_bool + { + \bool_lazy_or:nnT + { \fp_compare_p:nNn {#1} < { 0 } } + { \fp_compare_p:nNn {#1} > { 100 } } + { \msg_error:nnnnn { color } { out-of-range } {#1} { 0 } { 100 } } + } + \fp_compare:nNnF {#1} > \c_zero_fp + { + \tl_if_blank:nTF {#2} + { \__color_extract:nNN { white } } + { \__color_extract:nNN {#2} } + \l__color_model_tl \l__color_value_tl + } + } \cs_new_protected:Npn \__color_parse_loop:nn #1#2 { \color_if_exist:nTF {#2} @@ -29184,6 +29198,7 @@ Type H for immediate help}\def~{\errmessage{% \prop_if_in:cnF { l__color_named_ #1 _prop } {##1} { \group_begin: + \bool_set_true:N \l__color_ignore_error_bool \tl_set:cn { l__color_named_ #3 _tl } {##1} \__color_parse:nN {#2} \l__color_internal_tl \exp_args:NNNV \group_end: @@ -30109,6 +30124,13 @@ Type H for immediate help}\def~{\errmessage{% LaTeX~was~asked~to~define~a~new~color~model~called~'#1',~but~ this~color~model~already~exists. } +\msg_new:nnnn { color } { out-of-range } + { Input~value~#1~out~of~range~[#2,~#3]. } + { + LaTeX~was~expecting~a~value~in~the~range~[#2,~#3]~as~part~of~a~color,~ + but~you~gave~#1.~LaTeX~will~assume~you~meant~the~limit~of~the~range~ + and~continue. + } \msg_new:nnnn { color } { separation-alternative-model } { Separation~color~space~'#1'~require~an~alternative~model. } { @@ -33503,11 +33525,23 @@ Type H for immediate help}\def~{\errmessage{% { \bool_lazy_and:nnTF { \__text_change_case_if_greek_p:n {#4} } - { ! \__text_codepoint_compare_p:nNn {#4} = { "0374 } } { - \exp_args:Ne \__text_change_case_upper_el:nnn + ! \bool_lazy_or_p:nn + { \__text_codepoint_compare_p:nNn {#4} = { "0374 } } + { \__text_codepoint_compare_p:nNn {#4} = { "037E } } + } + { + \__text_change_case_if_greek_spacing_diacritic:nTF {#4} { - \codepoint_to_nfd:n { \__text_codepoint_from_chars:Nw #4 } + \__text_change_case_store:n {#4} + \__text_change_case_loop:nnw + } + { + \exp_args:Ne \__text_change_case_upper_el:nnn + { + \codepoint_to_nfd:n + { \__text_codepoint_from_chars:Nw #4 } + } } {#2} {#3} } @@ -33805,6 +33839,84 @@ Type H for immediate help}\def~{\errmessage{% \fi: \fi: } +\prg_new_conditional:Npnn \__text_change_case_if_greek_spacing_diacritic:n + #1 { TF } + { + \exp_args:Nf \__text_change_case_if_greek_spacing_diacritic:n + { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } + } +\cs_new:Npn \__text_change_case_if_greek_spacing_diacritic:n #1 + { + \if_int_compare:w #1 < "1FBD \exp_stop_f: + \if_int_compare:w #1 = "037A \exp_stop_f: + \prg_return_true: + \else: + \prg_return_false: + \fi: + \else: + \if_int_compare:w #1 = "1FBD \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FBF \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FC0 \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FC1 \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FCD \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FCE \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FCF \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FDD \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FDE \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FDF \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FED \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FEE \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FEF \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FFD \exp_stop_f: + \prg_return_true: + \else: + \if_int_compare:w #1 = "1FFE \exp_stop_f: + \prg_return_true: + \else: + \prg_return_false: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + } \prg_new_conditional:Npnn \__text_change_case_if_greek_diacritic:n #1 { TF , p } { @@ -33825,11 +33937,7 @@ Type H for immediate help}\def~{\errmessage{% \if_int_compare:w #1 = "0314 \exp_stop_f: \prg_return_true: \else: - \if_int_compare:w #1 = "0343 \exp_stop_f: - \prg_return_true: - \else: - \prg_return_false: - \fi: + \prg_return_false: \fi: \fi: \fi: @@ -33903,9 +34011,13 @@ Type H for immediate help}\def~{\errmessage{% } \cs_new:Npn \__text_change_case_boundary_upper_el:nnn #1#2#3 { - \bool_lazy_or:nnTF - { \__text_codepoint_compare_p:nNn {#3} = { "03AE } } - { \__text_codepoint_compare_p:nNn {#3} = { "1F22 } } + \bool_lazy_any:nTF + { + { \__text_codepoint_compare_p:nNn {#3} = { "0389 } } + { \__text_codepoint_compare_p:nNn {#3} = { "03AE } } + { \__text_codepoint_compare_p:nNn {#3} = { "1F22 } } + { \__text_codepoint_compare_p:nNn {#3} = { "1F2A } } + } { \__text_change_case_boundary_upper_el:nnnw {#1} {#2} {#3} } { \__text_change_case_loop:nnw {#1} {#2} #3 } } @@ -35605,7 +35717,9 @@ Type H for immediate help}\def~{\errmessage{% { { pdftex } { - \fp_eval:n { round(\int_use:N \tex_pdftexversion:D / 100 , 2) } + \int_div_truncate:nn { \tex_pdftexversion:D } { 100 } + . + \int_mod:nn { \tex_pdftexversion:D } { 100 } . \tex_pdftexrevision:D } @@ -35624,7 +35738,9 @@ Type H for immediate help}\def~{\errmessage{% } { luatex } { - \fp_eval:n { round(\int_use:N \tex_luatexversion:D / 100, 2) } + \int_div_truncate:nn { \tex_luatexversion:D } { 100 } + . + \int_mod:nn { \tex_luatexversion:D } { 100 } . \tex_luatexrevision:D } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 336d9a99481..198d834f086 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{2023-02-22}% +\def\ExplFileDate{2023-03-30}% \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 e94af3111e7..2dd58eebb4f 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{2023-02-22}% +\def\ExplFileDate{2023-03-30}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 84451c96975..787ffb3187b 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{2023-02-22}% +\def\ExplFileDate{2023-03-30}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% -- cgit v1.2.3