From 68872ff6a2a91fa0e84763fc9316493d82075c95 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 5 Mar 2019 22:35:14 +0000 Subject: l3 (5mar19) git-svn-id: svn://tug.org/texlive/trunk@50246 c570f23f-e606-0410-a88d-b1316a301751 --- .../l3experimental/l3benchmark/l3benchmark.sty | 2 +- .../tex/latex/l3experimental/l3cctab/l3cctab.sty | 2 +- .../tex/latex/l3experimental/l3color/l3color.sty | 2 +- .../tex/latex/l3experimental/l3draw/l3draw.sty | 259 +- .../latex/l3experimental/l3str/l3str-convert.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 | 3166 +++++++++++--------- .../tex/latex/l3kernel/expl3-generic.tex | 3 +- Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 10 +- Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 60 +- .../texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def | 2 +- Master/texmf-dist/tex/latex/l3kernel/l3dvips.def | 2 +- Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def | 2 +- Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def | 2 +- .../texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def | 2 +- .../tex/latex/l3packages/l3keys2e/l3keys2e.sty | 6 +- Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty | 6 +- .../tex/latex/l3packages/xfrac/xfrac.sty | 7 +- .../tex/latex/l3packages/xparse/xparse.sty | 447 +-- .../tex/latex/l3packages/xtemplate/xtemplate.sty | 10 +- 24 files changed, 2230 insertions(+), 1772 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty index ce3c1e0bd07..307f4075c1d 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}{2019-01-28}{} +\ProvidesExplPackage{l3benchmark}{2019-03-05}{} {L3 Experimental benchmarking} \sys_if_engine_luatex:TF { diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty b/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty index 246a3d4f508..26424b54ff9 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty @@ -20,7 +20,7 @@ %% %% File: l3cctab.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3cctab}{2019-01-28}{} +\ProvidesExplPackage{l3cctab}{2019-03-05}{} {L3 Experimental category code tables} \int_new:N \g__cctab_allocate_int \int_gset:Nn \g__cctab_allocate_int { -1 } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty index ed1644c6a95..89e794d9474 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty @@ -20,7 +20,7 @@ %% %% File: l3color.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3color}{2019-01-28}{} +\ProvidesExplPackage{l3color}{2019-03-05}{} {L3 Experimental color support} \tl_new:N \l__color_tmp_tl \prg_new_conditional:Npnn \__color_if_defined:n #1 { T, F, TF } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty index 484f1ac6dc6..624f7c7be13 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty @@ -6,6 +6,7 @@ %% %% l3draw.dtx (with options: `package') %% l3draw-boxes.dtx (with options: `package') +%% l3draw-layers.dtx (with options: `package') %% l3draw-paths.dtx (with options: `package') %% l3draw-points.dtx (with options: `package') %% l3draw-scopes.dtx (with options: `package') @@ -27,7 +28,7 @@ %% %% File: l3draw.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3draw}{2019-01-28}{} +\ProvidesExplPackage{l3draw}{2019-03-05}{} {L3 Experimental core drawing support} \RequirePackage { l3color } %% File: l3draw-boxes.dtx @@ -90,6 +91,101 @@ { \box_ht:N \l__draw_tmp_box } \group_end: } +%% File: l3draw-layers.dtx +\cs_new_protected:Npn \draw_layer_new:n #1 + { + \str_if_eq:nnTF {#1} { main } + { \msg_error:nnn { draw } { main-reserved } } + { + \box_new:c { g__draw_layer_ #1 _box } + \box_new:c { l__draw_layer_ #1 _box } + } + } +\tl_new:N \l__draw_layer_tl +\tl_set:Nn \l__draw_layer_tl { main } +\bool_new:N \l__draw_layer_close_bool +\clist_new:N \l_draw_layers_clist +\clist_set:Nn \l_draw_layers_clist { main } +\clist_new:N \g__draw_layers_clist +\cs_new_protected:Npn \draw_layer_begin:n #1 + { + \group_begin: + \box_if_exist:cTF { g__draw_layer_ #1 _box } + { + \str_if_eq:VnTF \l__draw_layer_tl {#1} + { \bool_set_false:N \l__draw_layer_close_bool } + { + \bool_set_true:N \l__draw_layer_close_bool + \tl_set:Nn \l__draw_layer_tl {#1} + \box_gset_wd:cn { g__draw_layer_ #1 _box } { 0pt } + \hbox_gset:cw { g__draw_layer_ #1 _box } + \box_use_drop:c { g__draw_layer_ #1 _box } + \group_begin: + } + \draw_linewidth:n { \l_draw_default_linewidth_dim } + } + { + \str_if_eq:nnTF {#1} { main } + { \msg_error:nnn { draw } { unknown-layer } {#1} } + { \msg_error:nnn { draw } { main-layer } } + } + } +\cs_new_protected:Npn \draw_layer_end: + { + \bool_if:NT \l__draw_layer_close_bool + { + \group_end: + \hbox_gset_end: + } + \group_end: + } +\cs_new_protected:Npn \__draw_layers_insert: + { + \clist_map_inline:Nn \l_draw_layers_clist + { + \str_if_eq:nnTF {##1} { main } + { + \box_set_wd:Nn \l__draw_layer_main_box { 0pt } + \box_use_drop:N \l__draw_layer_main_box + } + { + \driver_draw_scope_begin: + \box_gset_wd:cn { g__draw_layer_ ##1 _box } { 0pt } + \box_use_drop:c { g__draw_layer_ ##1 _box } + \driver_draw_scope_end: + } + } + } +\cs_new_protected:Npn \__draw_layers_save: + { + \clist_map_inline:Nn \l_draw_layers_clist + { + \str_if_eq:nnF {##1} { main } + { + \box_set_eq:cc { l__draw_layer_ ##1 _box } + { g__draw_layer_ ##1 _box } + } + } + } +\cs_new_protected:Npn \__draw_layers_restore: + { + \clist_map_inline:Nn \l_draw_layers_clist + { + \str_if_eq:nnF {##1} { main } + { + \box_gset_eq:cc { g__draw_layer_ ##1 _box } + { l__draw_layer_ ##1 _box } + } + } + } +\msg_new:nnnn { draw } { main-layer } + { Material~cannot~be~added~to~'main'~layer. } + { The~main~layer~may~only~be~accessed~at~the~top~level. } +\msg_new:nnn { draw } { main-reserved } + { The~'main'~layer~is~reserved. } +\msg_new:nnnn { draw } { unknown-layer } + { Layer~'#1'~has~not~been~created. } + { You~have~tried~to~use~layer~'#1',~but~it~was~never~set~up. } %% File: l3draw-paths.dtx \tl_new:N \l__draw_path_tmp_tl \fp_new:N \l__draw_path_tmpa_fp @@ -183,15 +279,12 @@ } \cs_new_protected:Npn \draw_path_curveto:nnn #1#2#3 { - \__draw_point_process:nnn + \__draw_point_process:nnnn { - \__draw_point_process:nn - { - \__draw_path_mark_corner: - \__draw_path_curveto:nnnnnn - } - { \draw_point_transform:n {#1} } + \__draw_path_mark_corner: + \__draw_path_curveto:nnnnnn } + { \draw_point_transform:n {#1} } { \draw_point_transform:n {#2} } { \draw_point_transform:n {#3} } } @@ -214,16 +307,12 @@ { \__draw_point_process:nn { \__draw_path_lineto:nn } {#1} } \cs_new_protected:Npn \draw_path_canvas_curveto:nnn #1#2#3 { - \__draw_point_process:nnn + \__draw_point_process:nnnn { - \__draw_point_process:nn - { - \__draw_path_mark_corner: - \__draw_path_curveto:nnnnnn - } - {#1} + \__draw_path_mark_corner: + \__draw_path_curveto:nnnnnn } - {#2} {#3} + {#1} {#2} {#3} } \cs_new_protected:Npn \draw_path_curveto:nn #1#2 { @@ -353,14 +442,11 @@ \__draw_point_transform_noshift:n { \draw_point_polar:nnn { #1 #4 90 } {#7} {#8} } } - \__draw_point_process:nn + \__draw_point_process:nnn + { \__draw_path_arc_auxiv:nnnn } { - \__draw_point_process:nn - { \__draw_path_arc_auxiv:nnnn } - { - \draw_point_transform:n - { \draw_point_polar:nnn {#1} {#5} {#6} } - } + \draw_point_transform:n + { \draw_point_polar:nnn {#1} {#5} {#6} } } { \draw_point_transform:n @@ -417,12 +503,9 @@ } \cs_new_protected:Npn \draw_path_ellipse:nnn #1#2#3 { - \__draw_point_process:nnn - { - \__draw_point_process:nn - { \__draw_path_ellipse:nnnnnn } - { \draw_point_transform:n {#1} } - } + \__draw_point_process:nnnn + { \__draw_path_ellipse:nnnnnn } + { \draw_point_transform:n {#1} } { \__draw_point_transform_noshift:n {#2} } { \__draw_point_transform_noshift:n {#3} } } @@ -706,27 +789,55 @@ %% File: l3draw-points.dtx \cs_new:Npn \__draw_point_process:nn #1#2 { - \__draw_point_process_auxi:fn + \exp_args:Nf \__draw_point_process_auxi:nn { \__draw_point_to_dim:n {#2} } {#1} } \cs_new:Npn \__draw_point_process_auxi:nn #1#2 { \__draw_point_process_auxii:nw {#2} #1 \q_stop } -\cs_generate_variant:Nn \__draw_point_process_auxi:nn { f } \cs_new:Npn \__draw_point_process_auxii:nw #1 #2 , #3 \q_stop { #1 {#2} {#3} } \cs_new:Npn \__draw_point_process:nnn #1#2#3 { - \__draw_point_process_auxiii:ffn + \exp_args:Nff \__draw_point_process_auxiii:nnn { \__draw_point_to_dim:n {#2} } { \__draw_point_to_dim:n {#3} } {#1} } \cs_new:Npn \__draw_point_process_auxiii:nnn #1#2#3 { \__draw_point_process_auxiv:nw {#3} #1 \q_mark #2 \q_stop } -\cs_generate_variant:Nn \__draw_point_process_auxiii:nnn { ff } \cs_new:Npn \__draw_point_process_auxiv:nw #1 #2 , #3 \q_mark #4 , #5 \q_stop { #1 {#2} {#3} {#4} {#5} } +\cs_new:Npn \__draw_point_process:nnnn #1#2#3#4 + { + \exp_args:Nfff \__draw_point_process_auxv:nnnn + { \__draw_point_to_dim:n {#2} } + { \__draw_point_to_dim:n {#3} } + { \__draw_point_to_dim:n {#4} } + {#1} + } +\cs_new:Npn \__draw_point_process_auxv:nnnn #1#2#3#4 + { \__draw_point_process_auxvi:nw {#4} #1 \q_mark #2 \q_mark #3 \q_stop } +\cs_new:Npn \__draw_point_process_auxvi:nw + #1 #2 , #3 \q_mark #4 , #5 \q_mark #6 , #7 \q_stop + { #1 {#2} {#3} {#4} {#5} {#6} {#7} } +\cs_new:Npn \__draw_point_process:nnnnn #1#2#3#4#5 + { + \exp_args:Nffff \__draw_point_process_auxvii:nnnnn + { \__draw_point_to_dim:n {#2} } + { \__draw_point_to_dim:n {#3} } + { \__draw_point_to_dim:n {#4} } + { \__draw_point_to_dim:n {#5} } + {#1} + } +\cs_new:Npn \__draw_point_process_auxvii:nnnnn #1#2#3#4#5 + { + \__draw_point_process_auxviii:nw + {#5} #1 \q_mark #2 \q_mark #3 \q_mark #4 \q_stop + } +\cs_new:Npn \__draw_point_process_auxviii:nw + #1 #2 , #3 \q_mark #4 , #5 \q_mark #6 , #7 \q_mark #8 , #9 \q_stop + { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} } \cs_new:Npn \__draw_point_to_dim:n #1 { \__draw_point_to_dim_aux:f { \fp_eval:n {#1} } } \cs_new:Npn \__draw_point_to_dim_aux:n #1 @@ -749,12 +860,9 @@ } \cs_new:Npn \draw_point_intersect_lines:nnnn #1#2#3#4 { - \__draw_point_process:nnn - { - \__draw_point_process:nnn - { \__draw_point_intersect_lines:nnnnnnnn } {#3} {#4} - } - {#1} {#2} + \__draw_point_process:nnnnn + { \__draw_point_intersect_lines:nnnnnnnn } + {#1} {#2} {#3} {#4} } \cs_new:Npn \__draw_point_intersect_lines:nnnnnnnn #1#2#3#4#5#6#7#8 { @@ -866,18 +974,14 @@ \cs_generate_variant:Nn \__draw_point_interpolate_distance:nnnnn { f } \cs_new:Npn \draw_point_interpolate_arcaxes:nnnnnn #1#2#3#4#5#6 { - \__draw_point_process:nnn - { - \__draw_point_process:nn - { \__draw_point_interpolate_arcaxes_auxi:nnnnnnnnn {#1} {#5} {#6} } - {#4} - } - {#2} {#3} + \__draw_point_process:nnnn + { \__draw_point_interpolate_arcaxes_auxi:nnnnnnnnn {#1} {#5} {#6} } + {#2} {#3} {#4} } \cs_new:Npn \__draw_point_interpolate_arcaxes_auxi:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { \__draw_point_interpolate_arcaxes_auxii:fnnnnnnnn - { \fp_eval:n {#1} } {#2} {#3} {#6} {#7} {#8} {#9} {#4} {#5} + { \fp_eval:n {#1} } {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} } \cs_new:Npn \__draw_point_interpolate_arcaxes_auxii:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { @@ -902,19 +1006,15 @@ \cs_generate_variant:Nn \__draw_point_interpolate_arcaxes_auxiv:nnnnnnnn { ff } \cs_new:Npn \draw_point_interpolate_curve:nnnnnn #1#2#3#4#5 { - \__draw_point_process:nnn - { - \__draw_point_process:nnn - { \__draw_point_interpolate_curve_auxi:nnnnnnnnn {#1} } - {#4} {#5} - } - {#2} {#3} + \__draw_point_process:nnnnn + { \__draw_point_interpolate_curve_auxi:nnnnnnnnn {#1} } + {#2} {#3} {#4} {#5} } \cs_new:Npn \__draw_point_interpolate_curve_auxi:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { \__draw_point_interpolate_curve_auxii:fnnnnnnnn { \fp_eval:n {#1} } - {#6} {#7} {#8} {#9} {#2} {#3} {#4} {#5} + {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} } \cs_new:Npn \__draw_point_interpolate_curve_auxii:nnnnnnnnn #1#2#3#4#5#6#7#8#9 @@ -1095,6 +1195,7 @@ \dim_new:N \g__draw_ymin_dim \bool_new:N \l_draw_bb_update_bool \box_new:N \l__draw_main_box +\box_new:N \l__draw_layer_main_box \int_new:N \g__draw_id_int \cs_new_protected:Npn \__draw_reset_bb: { @@ -1122,9 +1223,13 @@ \draw_join_miter: \draw_miterlimit:n { 10 } \draw_dash_pattern:nn { } { 0cm } + \hbox_set:Nw \l__draw_layer_main_box } \cs_new_protected:Npn \draw_end: { + \exp_args:NNNV \hbox_set_end: + \clist_set:Nn \l_draw_layers_clist \l_draw_layers_clist + \__draw_layers_insert: \driver_draw_end: \hbox_set_end: \dim_compare:nNnT \g__draw_xmin_dim = \c_max_dim @@ -1193,9 +1298,11 @@ \draw_path_scope_begin: \draw_transform_matrix_reset: \draw_transform_shift_reset: + \__draw_layers_save: } \cs_new_protected:Npn \draw_suspend_end: { + \__draw_layers_restore: \draw_path_scope_end: \__draw_scope_bb_end: } @@ -1603,7 +1710,7 @@ } \draw_transform_matrix_reset: \draw_transform_shift_reset: -\cs_new_protected:Npn \draw_transform_matrix:nnnn #1#2#3#4 +\cs_new_protected:Npn \draw_transform_matrix_absolute:nnnn #1#2#3#4 { \fp_set:Nn \l__draw_matrix_a_fp {#1} \fp_set:Nn \l__draw_matrix_b_fp {#2} @@ -1619,44 +1726,44 @@ { \bool_set_false:N \l__draw_matrix_active_bool } { \bool_set_true:N \l__draw_matrix_active_bool } } -\cs_new_protected:Npn \draw_transform_shift:n #1 +\cs_new_protected:Npn \draw_transform_shift_absolute:n #1 { \__draw_point_process:nn - { \__draw_transform_shift:nn } {#1} + { \__draw_transform_shift_absolute:nn } {#1} } -\cs_new_protected:Npn \__draw_transform_shift:nn #1#2 +\cs_new_protected:Npn \__draw_transform_shift_absolute:nn #1#2 { \dim_set:Nn \l__draw_xshift_dim {#1} \dim_set:Nn \l__draw_yshift_dim {#2} } -\cs_new_protected:Npn \draw_transform_matrix_concat:nnnn #1#2#3#4 +\cs_new_protected:Npn \draw_transform_matrix:nnnn #1#2#3#4 { \use:x { - \__draw_transform_concat:nnnn + \__draw_transform:nnnn { \fp_eval:n {#1} } { \fp_eval:n {#2} } { \fp_eval:n {#3} } { \fp_eval:n {#4} } } } -\cs_new_protected:Npn \__draw_transform_concat:nnnn #1#2#3#4 +\cs_new_protected:Npn \__draw_transform:nnnn #1#2#3#4 { \use:x { - \draw_transform_matrix:nnnn + \draw_transform_matrix_absolute:nnnn { #1 * \l__draw_matrix_a_fp + #2 * \l__draw_matrix_c_fp } { #1 * \l__draw_matrix_b_fp + #2 * \l__draw_matrix_d_fp } { #3 * \l__draw_matrix_a_fp + #4 * \l__draw_matrix_c_fp } { #3 * \l__draw_matrix_b_fp + #4 * \l__draw_matrix_d_fp } } } -\cs_new_protected:Npn \draw_transform_shift_concat:n #1 +\cs_new_protected:Npn \draw_transform_shift:n #1 { \__draw_point_process:nn - { \__draw_transform_shift_concat:nn } {#1} + { \__draw_transform_shift:nn } {#1} } -\cs_new_protected:Npn \__draw_transform_shift_concat:nn #1#2 +\cs_new_protected:Npn \__draw_transform_shift:nn #1#2 { \dim_set:Nn \l__draw_xshift_dim { \l__draw_xshift_dim + #1 } \dim_set:Nn \l__draw_yshift_dim { \l__draw_yshift_dim + #2 } @@ -1709,28 +1816,28 @@ { \use:x { - \draw_transform_matrix:nnnn + \draw_transform_matrix_absolute:nnnn { #3 - #1 } { #4 - #2 } { #5 - #1 } { #6 - #2 } - \draw_transform_shift:n { #1 , #2 } + \draw_transform_shift_absolute:n { #1 , #2 } } } \cs_new_protected:Npn \draw_transform_scale:n #1 - { \draw_transform_matrix_concat:nnnn { #1 } { 0 } { 0 } { #1 } } + { \draw_transform_matrix:nnnn { #1 } { 0 } { 0 } { #1 } } \cs_new_protected:Npn \draw_transform_xscale:n #1 - { \draw_transform_matrix_concat:nnnn { #1 } { 0 } { 0 } { 1 } } + { \draw_transform_matrix:nnnn { #1 } { 0 } { 0 } { 1 } } \cs_new_protected:Npn \draw_transform_yscale:n #1 - { \draw_transform_matrix_concat:nnnn { 1 } { 0 } { 0 } { #1 } } + { \draw_transform_matrix:nnnn { 1 } { 0 } { 0 } { #1 } } \cs_new_protected:Npn \draw_transform_xshift:n #1 - { \draw_transform_shift_concat:n { #1 , 0 } } + { \draw_transform_shift:n { #1 , 0pt } } \cs_new_protected:Npn \draw_transform_yshift:n #1 - { \draw_transform_shift_concat:n { 0 , #1 } } + { \draw_transform_shift:n { 0pt , #1 } } \cs_new_protected:Npn \draw_transform_xslant:n #1 - { \draw_transform_matrix_concat:nnnn { 1 } { 0 } { #1 } { 1 } } + { \draw_transform_matrix:nnnn { 1 } { 0 } { #1 } { 1 } } \cs_new_protected:Npn \draw_transform_yslant:n #1 - { \draw_transform_matrix_concat:nnnn { 1 } { #1 } { 0 } { 1 } } + { \draw_transform_matrix:nnnn { 1 } { #1 } { 0 } { 1 } } \cs_new_protected:Npn \draw_transform_rotate:n #1 { \__draw_transform_rotate:f { \fp_eval:n {#1} } } \cs_new_protected:Npn \__draw_transform_rotate:n #1 @@ -1741,7 +1848,7 @@ } \cs_generate_variant:Nn \__draw_transform_rotate:n { f } \cs_new_protected:Npn \__draw_transform_rotate:nn #1#2 - { \draw_transform_matrix_concat:nnnn {#1} {#2} { -#2 } { #1 } } + { \draw_transform_matrix:nnnn {#1} {#2} { -#2 } { #1 } } \cs_generate_variant:Nn \__draw_transform_rotate:nn { ff } %% %% diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty index aee9f535e4d..6fd0b8bc79d 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty @@ -20,7 +20,7 @@ %% %% File: l3str-convert.dtx Copyright (C) 2013-2019 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3str-convert}{2019-01-28}{} +\ProvidesExplPackage{l3str-convert}{2019-03-05}{} {L3 Experimental string encoding conversions} \cs_if_exist:NF \use_ii_i:nn { \cs_new:Npn \use_ii_i:nn #1#2 { #2 #1 } } 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 be29201b572..5e49bbee787 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}{2019-01-28}{} +\ProvidesExplPackage{l3str-format}{2019-03-05}{} {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 6839781c44f..b7834db7c4f 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}{2019-01-28}{} +\ProvidesExplPackage{l3sys-shell}{2019-03-05}{} {L3 Experimental system shell functions} \cs_new:Npn \__sys_path_to_win:n #1 { diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index c496c5c7f82..655ed6f74e5 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -20,7 +20,7 @@ %% %% File: xcoffins.dtx \RequirePackage{xparse} -\ProvidesExplPackage{xcoffins}{2019-01-28}{} +\ProvidesExplPackage{xcoffins}{2019-03-05}{} {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 1e696d7690f..9d19ec1625c 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}{2019-01-28}{} +\ProvidesExplPackage{l3galley}{2019-03-05}{} {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 67eebe67f18..59821660f7e 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty @@ -20,7 +20,7 @@ %% %% File: xgalley.dtx \RequirePackage{xparse} -\ProvidesExplPackage{xgalley}{2019-01-28}{} +\ProvidesExplPackage{xgalley}{2019-03-05}{} {L3 Experimental galley} \RequirePackage{xparse,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 b8e24f7b71a..16f72cdf764 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -63,7 +63,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2019-02-15}% +\def\ExplFileDate{2019-03-05}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -121,65 +121,6 @@ L3 programming layer (code)% }% %% File: l3bootstrap.dtx -\begingroup - \csname protected\endcsname\gdef\GetIdInfo - {% - \begingroup - \catcode 32 = 10 % - \GetIdInfoAuxI - }% - \csname protected\endcsname\gdef\GetIdInfoAuxI$#1$#2% - {% - \def\tempa{#1}% - \def\tempb{Id}% - \ifx\tempa\tempb - \def\tempa - {% - \endgroup - \def\ExplFileDate{0000/00/00}% - \def\ExplFileDescription{#2}% - \def\ExplFileName{[unknown]}% - \def\ExplFileExtension{[unknown extension]}% - \def\ExplFileVersion{-1}% - }% - \else - \def\tempa - {% - \endgroup - \def\ExplFileDescription{#2}% - \GetIdInfoAuxII$#1 $% - }% - \fi - \tempa - }% - \csname protected\endcsname\gdef\GetIdInfoAuxII$#1 #2.#3 #4 #5 #6$% - {% - \def\ExplFileName{#2}% - \def\ExplFileExtension{#3}% - \def\ExplFileVersion{#4}% - \begingroup - \def\tempa{#4}% - \def\tempb{-1}% - \ifx\tempa\tempb - \def\tempa - {% - \endgroup - \def\ExplFileDate{0000/00/00}% - }% - \else - \def\tempa - {% - \endgroup - \GetIdInfoAuxIII$#5$% - }% - \fi - \tempa - }% - \csname protected\endcsname\gdef\GetIdInfoAuxIII$#1-#2-#3$% - {% - \def\ExplFileDate{#1/#2/#3}% - }% -\endgroup \begingroup \expandafter\ifx\csname directlua\endcsname\relax \else @@ -2489,61 +2430,6 @@ { \cs_set_protected:Npn \__kernel_deprecation_code:nn #1#2 { } } -\__kernel_if_debug:TF - { - \cs_set_protected:Npn \__kernel_patch_deprecation:nnNNpn #1#2#3#4#5# - { - \if_meaning:w \cs_new_protected:Npn #3 - \exp_after:wN \use_i:nn - \else: - \if_meaning:w \cs_new:Npn #3 - \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn - \else: - \__kernel_msg_error:nnx { kernel } { debug-unpatchable } - { \token_to_str:N #3 ~(for~deprecation) } - \exp_after:wN \exp_after:wN \exp_after:wN \use_none:nn - \fi: - \fi: - { \__debug_deprecation_aux:nnNnn {#1} {#2} #4 {#5} } - { \__debug_deprecation_expandable:nnNnn {#1} {#2} #4 {#5} } - } - \cs_set_protected:Npn \__debug_deprecation_aux:nnNnn #1#2#3#4#5 - { - \tl_gput_right:Nn \g__debug_deprecation_on_tl - { - \tex_let:D #3 \scan_stop: - \__kernel_deprecation_error:Nnn #3 {#2} {#1} - } - \tl_gput_right:Nn \g__debug_deprecation_off_tl - { - \tex_let:D #3 \scan_stop: - \cs_set_protected:Npn #3 #4 {#5} - } - \cs_new_protected:Npx #3 - { - \exp_not:N \__kernel_msg_warning:nnxxx - { kernel } { deprecated-command } - {#1} { \token_to_str:N #3 } { \tl_to_str:n {#2} } - \exp_not:n { \cs_gset_protected:Npn #3 #4 {#5} } - \exp_not:N #3 - } - } - \cs_set_protected:Npn \__debug_deprecation_expandable:nnNnn #1#2#3#4#5 - { - \tl_gput_right:Nn \g__debug_deprecation_on_tl - { - \tex_let:D #3 \scan_stop: - \__kernel_deprecation_error:Nnn #3 {#2} {#1} - } - \tl_gput_right:Nn \g__debug_deprecation_off_tl - { - \tex_let:D #3 \scan_stop: - \cs_set:Npn #3 #4 {#5} - } - \cs_new:Npn #3 #4 {#5} - } - } - { \cs_set_protected:Npn \__kernel_patch_deprecation:nnNNpn #1#2 { } } \__kernel_if_debug:TF { \cs_set_protected:Npn \__kernel_patch:nnNNpn #1#2#3#4#5# @@ -3208,6 +3094,39 @@ \group_end: #1 { \token_to_str:N #2 = \cs_meaning:N #2 } } +\use:x + { + \exp_not:n { \cs_new:Npn \__kernel_prefix_arg_replacement:wN #1 } + \tl_to_str:n { macro : } \exp_not:n { #2 -> #3 \q_stop #4 } + } + { #4 {#1} {#2} {#3} } +\cs_new:Npn \cs_prefix_spec:N #1 + { + \token_if_macro:NTF #1 + { + \exp_after:wN \__kernel_prefix_arg_replacement:wN + \token_to_meaning:N #1 \q_stop \use_i:nnn + } + { \scan_stop: } + } +\cs_new:Npn \cs_argument_spec:N #1 + { + \token_if_macro:NTF #1 + { + \exp_after:wN \__kernel_prefix_arg_replacement:wN + \token_to_meaning:N #1 \q_stop \use_ii:nnn + } + { \scan_stop: } + } +\cs_new:Npn \cs_replacement_spec:N #1 + { + \token_if_macro:NTF #1 + { + \exp_after:wN \__kernel_prefix_arg_replacement:wN + \token_to_meaning:N #1 \q_stop \use_iii:nnn + } + { \scan_stop: } + } \cs_new:Npn \prg_do_nothing: { } \cs_new_eq:NN \prg_break_point:Nn \use_ii:nn \cs_new:Npn \prg_map_break:Nn #1#2#3 \prg_break_point:Nn #4#5 @@ -3658,11 +3577,52 @@ { \__exp_e:nn {#2} { #3 #1 } } \cs_new:Npn \__exp_e_expandable:Nnn #1#2 { \exp_args:No \__exp_e:nn { #1 #2 } } - \cs_new:Npn \__exp_e_primitive:Nnn #1 + \cs_new:Npn \__exp_e_primitive:Nnn #1#2 + { + \if_false: { \fi: + \tl_if_head_is_N_type:nTF {#2} + { \__exp_e_primitive_aux:NNw #1 } + { + \__kernel_msg_expandable_error:nnn { kernel } { e-type } + { Missing~primitive~name } + \__exp_e_primitive_aux:NNw #1 \c_empty_tl + } + #2 + } + } + \cs_new:Npn \__exp_e_primitive_aux:NNw #1#2 { - \__kernel_msg_expandable_error:nnn { kernel } { e-type } - { \primitive not~implemented } - \__exp_e:nn + \exp_after:wN \__exp_e_primitive_aux:NNnn + \exp_after:wN #1 + \exp_after:wN #2 + \exp_after:wN { \if_false: } \fi: + } + \cs_new:Npn \__exp_e_primitive_aux:NNnn #1#2 + { + \exp_args:Nf \str_case_e:nnTF { \cs_to_str:N #2 } + { + { unexpanded } { \__exp_e_unexpanded:Nnn \exp_not:n } + { noexpand } { \__exp_e_noexpand:Nnn \exp_not:N } + { the } { \__exp_e_the:Nnn \tex_the:D } + { + \sys_if_engine_xetex:T { pdf } + \sys_if_engine_luatex:T { pdf } + primitive + } { \__exp_e_primitive:Nnn #1 } + } + { \__exp_e_primitive_other:NNnn #1 #2 } + } + \cs_new:Npn \__exp_e_primitive_other:NNnn #1#2#3 + { + \exp_args:No \__exp_e_primitive_other_aux:nNNnn + { #1 #2 #3 } + #1 #2 {#3} + } + \cs_new:Npn \__exp_e_primitive_other_aux:nNNnn #1#2#3#4#5 + { + \str_if_eq:nnTF {#1} { #2 #3 #4 } + { \__exp_e:nn {#4} { #5 #2 #3 } } + { \__exp_e:nn {#1} {#5} } } \cs_new:Npn \__exp_e_noexpand:Nnn #1#2 { @@ -3791,9 +3751,12 @@ { #1 \exp_after:wN \__exp_e_the_toks:n + \exp_after:wN { \if_false: } \fi: + } + { + \exp_after:wN ; + \exp_after:wN { \if_false: } \fi: #1 } - { \exp_after:wN ; } - \exp_after:wN { \if_false: } \fi: } \prg_new_conditional:Npnn \__exp_e_if_toks_register:N #1 { TF } { @@ -4306,8 +4269,8 @@ } \cs_new_protected:Npn \__tl_set_rescan:NNnn #1#2#3#4 { - \if_false: { \fi: \group_begin: + \if_false: { \fi: \int_set_eq:NN \tex_tracingnesting:D \c_zero_int \exp_args:No \tex_everyeof:D { \c__tl_rescan_marker_tl } \int_compare:nNnT \tex_endlinechar:D = { 32 } @@ -4538,6 +4501,7 @@ { c } { T , F , TF } \prg_new_protected_conditional:Npnn \tl_if_in:nn #1#2 { T , F , TF } { + \scan_stop: \if_false: { \fi: \cs_set:Npn \__tl_tmp:w ##1 #2 { } \tl_if_empty:oTF { \__tl_tmp:w #1 {} {} #2 } @@ -4681,6 +4645,22 @@ \cs_new:Npn \__tl_count:n #1 { + 1 } \cs_generate_variant:Nn \tl_count:n { V , o } \cs_generate_variant:Nn \tl_count:N { c } +\cs_new:Npn \tl_count_tokens:n #1 + { + \int_eval:n + { + \__tl_act:NNNnn + \__tl_act_count_normal:nN + \__tl_act_count_group:nn + \__tl_act_count_space:n + { } + {#1} + } + } +\cs_new:Npn \__tl_act_count_normal:nN #1 #2 { 1 + } +\cs_new:Npn \__tl_act_count_space:n #1 { 1 + } +\cs_new:Npn \__tl_act_count_group:nn #1 #2 + { 2 + \tl_count_tokens:n {#2} + } \cs_new:Npn \tl_reverse_items:n #1 { \__tl_reverse_items:nwNwn #1 ? @@ -5754,22 +5734,9 @@ \cs_new_eq:NN \str_show:n \tl_show:n \cs_new_eq:NN \str_show:N \tl_show:N \cs_generate_variant:Nn \str_show:N { c } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_case_e:nn } -\cs_new:Npn \str_case_x:nn { \str_case_e:nn } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_case_e:nnT } -\cs_new:Npn \str_case_x:nnT { \str_case_e:nnT } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_case_e:nnF } -\cs_new:Npn \str_case_x:nnF { \str_case_e:nnF } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_case_e:nnTF } -\cs_new:Npn \str_case_x:nnTF { \str_case_e:nnTF } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_if_eq_p:ee } -\cs_new:Npn \str_if_eq_x_p:nn { \str_if_eq_p:ee } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_if_eq:eeT } -\cs_new:Npn \str_if_eq_x:nnT { \str_if_eq:eeT } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_if_eq:eeF } -\cs_new:Npn \str_if_eq_x:nnF { \str_if_eq:eeF } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \str_if_eq:eeTF } -\cs_new:Npn \str_if_eq_x:nnTF { \str_if_eq:eeTF } +\cs_new_eq:NN \str_log:n \tl_log:n +\cs_new_eq:NN \str_log:N \tl_log:N +\cs_generate_variant:Nn \str_log:N { c } %% File: l3quark.dtx \__kernel_patch:nnNNpn { \__kernel_chk_var_scope:NN q #1 } { } \cs_new_protected:Npn \quark_new:N #1 @@ -7311,47 +7278,6 @@ \int_new:N \l_tmpb_int \int_new:N \g_tmpa_int \int_new:N \g_tmpb_int -\cs_new_protected:Npn \__int_deprecated_constants:nn #1#2 - { - #1 \c_zero { 0 } #2 - #1 \c_one { 1 } #2 - #1 \c_two { 2 } #2 - #1 \c_three { 3 } #2 - #1 \c_four { 4 } #2 - #1 \c_five { 5 } #2 - #1 \c_six { 6 } #2 - #1 \c_seven { 7 } #2 - #1 \c_eight { 8 } #2 - #1 \c_nine { 9 } #2 - #1 \c_ten { 10 } #2 - #1 \c_eleven { 11 } #2 - #1 \c_twelve { 12 } #2 - #1 \c_thirteen { 13 } #2 - #1 \c_fourteen { 14 } #2 - #1 \c_fifteen { 15 } #2 - #1 \c_sixteen { 16 } #2 - #1 \c_thirty_two { 32 } #2 - #1 \c_one_hundred { 100 } #2 - #1 \c_two_hundred_fifty_five { 255 } #2 - #1 \c_two_hundred_fifty_six { 256 } #2 - #1 \c_one_thousand { 1000 } #2 - #1 \c_ten_thousand { 10000 } #2 - } -\__int_deprecated_constants:nn { \int_const:Nn } { } -\__kernel_deprecation_code:nn - { - \__int_deprecated_constants:nn - { \__kernel_deprecation_error:Nnn } { { 2019-12-31 } } - } - { - \__int_deprecated_constants:nn - { - \exp_after:wN \use:nnn - \exp_after:wN \__int_constdef:Nw \exp_not:N - } - { \exp_stop_f: } - } -\cs_new_eq:NN \__int_value:w \int_value:w %% File: l3flag.dtx \cs_new_protected:Npn \flag_new:n #1 { @@ -7717,17 +7643,6 @@ \cs_new:Npn \group_align_safe_end: { \if_int_compare:w `{ = \c_zero_int } \fi: } \int_new:N \g__kernel_prg_map_int -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break_point:Nn } -\cs_new:Npn \__prg_break_point:Nn { \prg_break_point:Nn } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break_point: } -\cs_new:Npn \__prg_break_point: { \prg_break_point: } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_map_break:Nn } -\cs_new:Npn \__prg_map_break:Nn #1 \__prg_break_point:Nn - { \prg_map_break:Nn #1 \prg_break_point:Nn } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break: } -\cs_new:Npn \__prg_break: #1 \__prg_break_point: { } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \prg_break:n } -\cs_new:Npn \__prg_break:n #1#2 \__prg_break_point: {#1} %% File: l3sys.dtx \str_const:Nx \c_sys_jobname_str { \tex_jobname:D } \int_const:Nn \c_sys_minute_int @@ -9027,37 +8942,6 @@ { \exp_not:c { peek_#1:NF } ##1 {##2} } } } -\exp_args:Nno \use:nn - { \cs_new:Npn \__peek_get_prefix_arg_replacement:wN #1 } - { \tl_to_str:n { macro : } #2 -> #3 \q_stop #4 } - { #4 {#1} {#2} {#3} } -\cs_new:Npn \token_get_prefix_spec:N #1 - { - \token_if_macro:NTF #1 - { - \exp_after:wN \__peek_get_prefix_arg_replacement:wN - \token_to_meaning:N #1 \q_stop \use_i:nnn - } - { \scan_stop: } - } -\cs_new:Npn \token_get_arg_spec:N #1 - { - \token_if_macro:NTF #1 - { - \exp_after:wN \__peek_get_prefix_arg_replacement:wN - \token_to_meaning:N #1 \q_stop \use_ii:nnn - } - { \scan_stop: } - } -\cs_new:Npn \token_get_replacement_spec:N #1 - { - \token_if_macro:NTF #1 - { - \exp_after:wN \__peek_get_prefix_arg_replacement:wN - \token_to_meaning:N #1 \q_stop \use_iii:nnn - } - { \scan_stop: } - } %% File: l3prop.dtx \scan_new:N \s__prop \cs_new:Npn \__prop_pair:wn #1 \s__prop #2 @@ -9216,6 +9100,16 @@ { \__prop_item_Nn:nwwn {#1} } } \cs_generate_variant:Nn \prop_item:Nn { c } +\cs_new:Npn \prop_count:N #1 + { + \int_eval:n + { + 0 + \prop_map_function:NN #1 \__prop_count:nn + } + } +\cs_new:Npn \__prop_count:nn #1#2 { + 1 } +\cs_generate_variant:Nn \prop_count:N { c } \prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } { \__prop_split:NnTF #1 {#2} @@ -10001,11 +9895,6 @@ LaTeX~has~been~asked~to~use~a~control~sequence~'#1':\\ this~has~not~been~defined~yet. } -\__kernel_msg_new:nnn { kernel } { deprecated-command } - { - The~deprecated~command~'#2'~has~been~or~will~be~removed~on~#1. - \tl_if_empty:nF {#3} { ~Use~instead~'#3'. } - } \__kernel_msg_new:nnnn { kernel } { empty-search-pattern } { Empty~search~pattern. } { @@ -10059,7 +9948,7 @@ Only~expandable~tests~can~have~a~predicate~version. } \__kernel_msg_new:nnn { kernel } { randint-backward-range } - { Bounds~ordered~backwards~in~\int_rand:nn {#1}~{#2}. } + { Bounds~ordered~backwards~in~\iow_char:N\\int_rand:nn~{#1}~{#2}. } \__kernel_msg_new:nnnn { kernel } { conditional-form-unknown } { Conditional~form~'#1'~for~function~'#2'~unknown. } { @@ -10200,7 +10089,7 @@ \__kernel_msg_new:nnn { kernel } { misused-prop } { A~property~list~was~misused. } \__kernel_msg_new:nnn { kernel } { negative-replication } - { Negative~argument~for~\prg_replicate:nn. } + { Negative~argument~for~\iow_char:N\\prg_replicate:nn. } \__kernel_msg_new:nnn { kernel } { prop-keyval } { Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') } \__kernel_msg_new:nnn { kernel } { unknown-comparison } @@ -10263,13 +10152,17 @@ \exp_args:Ncx \__msg_tmp:w { LaTeX3~error: } { \char_generate:nn { `\ } { 7 } } \group_end: +\exp_args_generate:n { oooo } \cs_new:Npn \__kernel_msg_expandable_error:nnnnnn #1#2#3#4#5#6 { - \exp_args:Nf \__msg_expandable_error:n + \exp_args:Ne \__msg_expandable_error:n { - \exp_args:NNc \exp_after:wN \exp_stop_f: + \exp_args:Nc \exp_args:Noooo { \c__msg_text_prefix_tl LaTeX / #1 / #2 } - {#3} {#4} {#5} {#6} + { \tl_to_str:n {#3} } + { \tl_to_str:n {#4} } + { \tl_to_str:n {#5} } + { \tl_to_str:n {#6} } } } \cs_new:Npn \__kernel_msg_expandable_error:nnnnn #1#2#3#4#5 @@ -10296,135 +10189,55 @@ \cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnnn { nnfff } \cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnn { nnff } \cs_generate_variant:Nn \__kernel_msg_expandable_error:nnn { nnf } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \iow_log:n } -\cs_new_protected:Npn \msg_log:n #1 +%% File: l3file.dtx +\tl_new:N \l__ior_internal_tl +\int_const:Nn \c_term_ior { 16 } +\seq_new:N \g__ior_streams_seq +\tl_new:N \l__ior_stream_tl +\prop_new:N \g__ior_streams_prop +\int_step_inline:nnn + { 0 } { - \iow_log:n { ................................................. } - \iow_wrap:nnnN { . ~ #1} { . ~ } { } \iow_log:n - \iow_log:n { ................................................. } + \cs_if_exist:NTF \normalend + { \tex_count:D 38 ~ } + { + \tex_count:D 16 ~ % + \cs_if_exist:NT \loccount { - 1 } + } } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \iow_term:n } -\cs_new_protected:Npn \msg_term:n #1 { - \iow_term:n { ************************************************* } - \iow_wrap:nnnN { * ~ #1} { * ~ } { } \iow_term:n - \iow_term:n { ************************************************* } + \prop_gput:Nnn \g__ior_streams_prop {#1} { Reserved~by~format } } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { [Defined~error~message] } -\cs_new_protected:Npn \msg_interrupt:nnn #1#2#3 +\cs_new_protected:Npn \ior_new:N #1 { \cs_new_eq:NN #1 \c_term_ior } +\cs_generate_variant:Nn \ior_new:N { c } +\ior_new:N \g_tmpa_ior +\ior_new:N \g_tmpb_ior +\cs_new_protected:Npn \ior_open:Nn #1#2 + { \ior_open:NnF #1 {#2} { \__kernel_file_missing:n {#2} } } +\cs_generate_variant:Nn \ior_open:Nn { c } +\tl_new:N \l__ior_file_name_tl +\prg_new_protected_conditional:Npnn \ior_open:Nn #1#2 { T , F , TF } { - \tl_if_empty:nTF {#3} + \file_get_full_name:nNTF {#2} \l__ior_file_name_tl { - \__msg_old_interrupt_wrap:nn { \\ \c__msg_no_info_text_tl } - {#1 \\\\ #2 \\\\ \c__msg_continue_text_tl } + \__kernel_ior_open:No #1 \l__ior_file_name_tl + \prg_return_true: } + { \prg_return_false: } + } +\prg_generate_conditional_variant:Nnn \ior_open:Nn { c } { T , F , TF } +\exp_args:NNf \cs_new_protected:Npn \__ior_new:N + { \exp_args:NNc \exp_after:wN \exp_stop_f: { newread } } +\cs_if_exist:NT \normalend + { + \cs_new_eq:NN \__ior_new_aux:N \__ior_new:N + \cs_set_protected:Npn \__ior_new:N #1 { - \__msg_old_interrupt_wrap:nn { \\ #3 } - {#1 \\\\ #2 \\\\ \c__msg_help_text_tl } + \cs_undefine:N #1 + \__ior_new_aux:N #1 } } -\cs_new_protected:Npn \__msg_old_interrupt_wrap:nn #1#2 - { - \iow_wrap:nnnN {#1} { | ~ } { } \__msg_old_interrupt_more_text:n - \iow_wrap:nnnN {#2} { ! ~ } { } \__msg_old_interrupt_text:n - } -\cs_new_protected:Npn \__msg_old_interrupt_more_text:n #1 - { - \exp_args:Nx \tex_errhelp:D - { - |''''''''''''''''''''''''''''''''''''''''''''''' - #1 \iow_newline: - |............................................... - } - } -\group_begin: - \char_set_lccode:nn {`\{} {`\ } - \char_set_lccode:nn {`\}} {`\ } - \char_set_lccode:nn {`\&} {`\!} - \char_set_catcode_active:N \& -\tex_lowercase:D - { - \group_end: - \cs_new_protected:Npn \__msg_old_interrupt_text:n #1 - { - \iow_term:x - { - \iow_newline: - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - \iow_newline: - ! - } - \__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J } - { - \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 } - { - \group_begin: - \cs_set_protected:Npn & - { - \tex_errmessage:D - { - #1 - \use_none:n - { ............................................ } - } - } - \exp_after:wN - \group_end: - & - } - } - } - } -%% File: l3file.dtx -\tl_new:N \l__ior_internal_tl -\int_const:Nn \c_term_ior { 16 } -\seq_new:N \g__ior_streams_seq -\tl_new:N \l__ior_stream_tl -\prop_new:N \g__ior_streams_prop -\int_step_inline:nnn - { 0 } - { - \cs_if_exist:NTF \normalend - { \tex_count:D 38 ~ } - { - \tex_count:D 16 ~ % - \cs_if_exist:NT \loccount { - 1 } - } - } - { - \prop_gput:Nnn \g__ior_streams_prop {#1} { Reserved~by~format } - } -\cs_new_protected:Npn \ior_new:N #1 { \cs_new_eq:NN #1 \c_term_ior } -\cs_generate_variant:Nn \ior_new:N { c } -\ior_new:N \g_tmpa_ior -\ior_new:N \g_tmpb_ior -\cs_new_protected:Npn \ior_open:Nn #1#2 - { \ior_open:NnF #1 {#2} { \__kernel_file_missing:n {#2} } } -\cs_generate_variant:Nn \ior_open:Nn { c } -\str_new:N \l__ior_file_name_str -\prg_new_protected_conditional:Npnn \ior_open:Nn #1#2 { T , F , TF } - { - \file_get_full_name:nN {#2} \l__ior_file_name_str - \str_if_empty:NTF \l__ior_file_name_str - { \prg_return_false: } - { - \__kernel_ior_open:No #1 \l__ior_file_name_str - \prg_return_true: - } - } -\prg_generate_conditional_variant:Nnn \ior_open:Nn { c } { T , F , TF } -\exp_args:NNf \cs_new_protected:Npn \__ior_new:N - { \exp_args:NNc \exp_after:wN \exp_stop_f: { newread } } -\cs_if_exist:NT \normalend - { - \cs_new_eq:NN \__ior_new_aux:N \__ior_new:N - \cs_set_protected:Npn \__ior_new:N #1 - { - \cs_undefine:N #1 - \__ior_new_aux:N #1 - } - } -\cs_new_protected:Npn \__kernel_ior_open:Nn #1#2 +\cs_new_protected:Npn \__kernel_ior_open:Nn #1#2 { \ior_close:N #1 \seq_gpop:NNTF \g__ior_streams_seq \l__ior_stream_tl @@ -10484,8 +10297,21 @@ { \prg_return_true: } } \cs_new_protected:Npn \ior_get:NN #1#2 + { \ior_get:NNF #1 #2 { \tl_set:Nn #2 { \q_no_value } } } +\cs_new_protected:Npn \__ior_get:NN #1#2 { \tex_read:D #1 to #2 } +\prg_new_protected_conditional:Npnn \ior_get:NN #1#2 { T , F , TF } + { + \ior_if_eof:NTF #1 + { \prg_return_false: } + { + \__ior_get:NN #1 #2 + \prg_return_true: + } + } \cs_new_protected:Npn \ior_str_get:NN #1#2 + { \ior_str_get:NNF #1 #2 { \tl_set:Nn #2 { \q_no_value } } } +\cs_new_protected:Npn \__ior_str_get:NN #1#2 { \exp_args:Nno \use:n { @@ -10494,14 +10320,23 @@ \int_set:Nn \tex_endlinechar:D } { \int_use:N \tex_endlinechar:D } } +\prg_new_protected_conditional:Npnn \ior_str_get:NN #1#2 { T , F , TF } + { + \ior_if_eof:NTF #1 + { \prg_return_false: } + { + \__ior_str_get:NN #1 #2 + \prg_return_true: + } + } \cs_new:Npn \ior_map_break: { \prg_map_break:Nn \ior_map_break: { } } \cs_new:Npn \ior_map_break:n { \prg_map_break:Nn \ior_map_break: } \cs_new_protected:Npn \ior_map_inline:Nn - { \__ior_map_inline:NNn \ior_get:NN } + { \__ior_map_inline:NNn \__ior_get:NN } \cs_new_protected:Npn \ior_str_map_inline:Nn - { \__ior_map_inline:NNn \ior_str_get:NN } + { \__ior_map_inline:NNn \__ior_str_get:NN } \cs_new_protected:Npn \__ior_map_inline:NNn { \int_gincr:N \g__kernel_prg_map_int @@ -10573,17 +10408,17 @@ \iow_new:N \g_tmpb_iow \exp_args:NNf \cs_new_protected:Npn \__iow_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newwrite } } -\str_new:N \l__iow_file_name_str +\tl_new:N \l__iow_file_name_tl \cs_new_protected:Npn \iow_open:Nn #1#2 { - \__kernel_file_name_sanitize:nN {#2} \l__iow_file_name_str + \__kernel_file_name_sanitize:nN {#2} \l__iow_file_name_tl \iow_close:N #1 \seq_gpop:NNTF \g__iow_streams_seq \l__iow_stream_tl - { \__iow_open_stream:NV #1 \l__iow_file_name_str } + { \__iow_open_stream:NV #1 \l__iow_file_name_tl } { \__iow_new:N #1 \tl_set:Nx \l__iow_stream_tl { \int_eval:n {#1} } - \__iow_open_stream:NV #1 \l__iow_file_name_str + \__iow_open_stream:NV #1 \l__iow_file_name_tl } } \cs_generate_variant:Nn \iow_open:Nn { c } @@ -11003,8 +10838,8 @@ { \exp_after:wN \__file_tmp:w \@currnamestack } \group_end: \seq_new:N \g__file_record_seq -\str_new:N \l__file_base_name_str -\str_new:N \l__file_full_name_str +\tl_new:N \l__file_base_name_tl +\tl_new:N \l__file_full_name_tl \str_new:N \l__file_dir_str \str_new:N \l__file_ext_str \str_new:N \l__file_name_str @@ -11019,8 +10854,6 @@ \char_set_active_eq:NN ##1 \l__file_internal_tl } \tl_set:Nx \l__file_internal_tl {#1} - \tl_set:Nx \l__file_internal_tl - { \tl_to_str:N \l__file_internal_tl } \exp_args:NNNV \group_end: \str_set:Nn #2 \l__file_internal_tl } @@ -11043,19 +10876,18 @@ \cs_new_protected:Npn \file_get:nnN #1#2#3 { \file_get:nnNF {#1} {#2} #3 - { \__kernel_file_missing:n {#1} } + { \tl_set:Nn #3 { \q_no_value } } } \prg_new_protected_conditional:Npnn \file_get:nnN #1#2#3 { T , F , TF } { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str - { \prg_return_false: } + \file_get_full_name:nNTF {#1} \l__file_full_name_tl { \exp_args:NV \__file_get_aux:nnN - \l__file_full_name_str + \l__file_full_name_tl {#2} #3 \prg_return_true: } + { \prg_return_false: } } \cs_new_protected:Npn \__file_get_aux:nnN #1#2#3 { @@ -11079,7 +10911,13 @@ } \cs_new_protected:Npn \file_get_full_name:nN #1#2 { - \__kernel_file_name_sanitize:nN {#1} \l__file_base_name_str + \file_get_full_name:nNF {#1} #2 + { \tl_set:Nn #2 { \q_no_value } } + } +\cs_generate_variant:Nn \file_get_full_name:nN { V } +\prg_new_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF } + { + \__kernel_file_name_sanitize:nN {#1} \l__file_base_name_tl \__file_get_full_name_search:nN { } \use:n \seq_map_inline:Nn \l_file_search_path_seq { \__file_get_full_name_search:nN { ##1 / } \seq_map_break:n } @@ -11088,51 +10926,56 @@ \tl_map_inline:Nn \input@path { \__file_get_full_name_search:nN { ##1 } \tl_map_break:n } } - \str_clear:N \l__file_full_name_str + \tl_set:Nn \l__file_full_name_tl { \q_no_value } \prg_break_point: - \str_if_empty:NF \l__file_full_name_str + \quark_if_no_value:NTF \l__file_full_name_tl + { + \ior_close:N \g__file_internal_ior + \prg_return_false: + } { - \exp_args:NV \file_parse_full_name:nNNN \l__file_full_name_str + \exp_args:NV \file_parse_full_name:nNNN \l__file_full_name_tl \l__file_dir_str \l__file_name_str \l__file_ext_str \str_if_empty:NT \l__file_ext_str { \__kernel_ior_open:No \g__file_internal_ior - { \l__file_full_name_str .tex } + { \l__file_full_name_tl .tex } \ior_if_eof:NF \g__file_internal_ior - { \str_put_right:Nn \l__file_full_name_str { .tex } } + { \tl_put_right:Nn \l__file_full_name_tl { .tex } } } + \ior_close:N \g__file_internal_ior + \tl_set_eq:NN #2 \l__file_full_name_tl + \prg_return_true: } - \str_set_eq:NN #2 \l__file_full_name_str - \ior_close:N \g__file_internal_ior } -\cs_generate_variant:Nn \file_get_full_name:nN { V } +\cs_generate_variant:Nn \file_get_full_name:nNT { V } +\cs_generate_variant:Nn \file_get_full_name:nNF { V } +\cs_generate_variant:Nn \file_get_full_name:nNTF { V } \cs_new_protected:Npn \__file_get_full_name_search:nN #1#2 { \__file_name_quote:nN - { \tl_to_str:n {#1} \l__file_base_name_str } - \l__file_full_name_str - \__kernel_ior_open:No \g__file_internal_ior \l__file_full_name_str + { \tl_to_str:n {#1} \l__file_base_name_tl } + \l__file_full_name_tl + \__kernel_ior_open:No \g__file_internal_ior \l__file_full_name_tl \ior_if_eof:NF \g__file_internal_ior { #2 { \prg_break: } } } \prg_new_protected_conditional:Npnn \file_if_exist:n #1 { T , F , TF } { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str - { \prg_return_false: } + \file_get_full_name:nNTF {#1} \l__file_full_name_tl { \prg_return_true: } + { \prg_return_false: } } \cs_new_protected:Npn \__kernel_file_missing:n #1 { - \__kernel_file_name_sanitize:nN {#1} \l__file_base_name_str + \__kernel_file_name_sanitize:nN {#1} \l__file_base_name_tl \__kernel_msg_error:nnx { kernel } { file-not-found } - { \l__file_base_name_str } + { \l__file_base_name_tl } } \cs_new_protected:Npn \file_input:n #1 { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str + \file_get_full_name:nNTF {#1} \l__file_full_name_tl + { \__file_input:V \l__file_full_name_tl } { \__kernel_file_missing:n {#1} } - { \__file_input:V \l__file_full_name_str } } \cs_new_protected:Npn \__file_input:n #1 { @@ -11236,6 +11079,38 @@ \g__file_record_seq \l__file_tmp_seq } +\cs_new_protected:Npn \GetIdInfo + { + \group_begin: + \char_set_catcode_space:n { 32 } + \exp_after:wN + \group_end: + \__file_id_info_auxi:w + } +\cs_new_protected:Npn \__file_id_info_auxi:w $ #1 $ #2 + { + \tl_set:Nn \ExplFileDescription {#2} + \str_if_eq:nnTF {#1} { Id } + { + \tl_set:Nn \ExplFileDate { 0000/00/00 } + \tl_set:Nn \ExplFileName { [unknown] } + \tl_set:Nn \ExplFileExtension { [unknown~extension] } + \tl_set:Nn \ExplFileVersion {-1} + } + { \__file_id_info_auxii:w #1 ~ \q_stop } + } +\cs_new_protected:Npn \__file_id_info_auxii:w + #1 ~ #2.#3 ~ #4 ~ #5 ~ #6 \q_stop + { + \tl_set:Nn \ExplFileName {#2} + \tl_set:Nn \ExplFileExtension {#3} + \tl_set:Nn \ExplFileVersion {#4} + \str_if_eq:nnTF {#4} {-1} + { \tl_set:Nn \ExplFileDate { 0000/00/00 } } + { \__file_id_info_auxiii:w #5 - 0 - 0 - \q_stop } + } +\cs_new_protected:Npn \__file_id_info_auxiii:w #1 - #2 - #3 - #4 \q_stop + { \tl_set:Nn \ExplFileDate { #1/#2/#3 } } \__kernel_msg_new:nnnn { kernel } { file-not-found } { File~'#1'~not~found. } { @@ -12779,14 +12654,10 @@ \exp_after:wN { \l_keys_value_tl } } { - \bool_if:NTF \l__keys_only_known_bool - { \__keys_store_unused: } - { - \cs_if_exist:cTF - { \c__keys_inherit_root_tl \__keys_parent:o \l_keys_path_tl } - { \__keys_execute_inherit: } - { \__keys_execute_unknown: } - } + \cs_if_exist:cTF + { \c__keys_inherit_root_tl \__keys_parent:o \l_keys_path_tl } + { \__keys_execute_inherit: } + { \__keys_execute_unknown: } } } \cs_new_protected:Npn \__keys_execute_inherit: @@ -12808,15 +12679,19 @@ } \cs_new_protected:Npn \__keys_execute_unknown: { - \cs_if_exist:cTF - { \c__keys_code_root_tl \l__keys_module_tl / unknown } + \bool_if:NTF \l__keys_only_known_bool + { \__keys_store_unused: } { - \cs:w \c__keys_code_root_tl \l__keys_module_tl / unknown - \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } - } - { - \__kernel_msg_error:nnxx { kernel } { key-unknown } - { \l_keys_path_tl } { \l__keys_module_tl } + \cs_if_exist:cTF + { \c__keys_code_root_tl \l__keys_module_tl / unknown } + { + \cs:w \c__keys_code_root_tl \l__keys_module_tl / unknown + \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } + } + { + \__kernel_msg_error:nnxx { kernel } { key-unknown } + { \l_keys_path_tl } { \l__keys_module_tl } + } } } \cs_new:Npn \__keys_execute:nn #1#2 @@ -12946,7 +12821,7 @@ { \exp_args:Nnf \msg_show_item_unbraced:nn { code } { - \exp_args:Nc \token_get_replacement_spec:N + \exp_args:Nc \cs_replacement_spec:N { \c__keys_code_root_tl \__keys_trim_spaces:n { #2 / #3 } @@ -13595,23 +13470,9 @@ \exp_after:wN \use_ii:nn \fi: } -\cs_new:Npn \__fp_expand:n #1 - { - \__fp_expand_loop:nwnN { } - #1 \prg_do_nothing: - \s__fp_mark { } \__fp_expand_loop:nwnN - \s__fp_mark { } \__fp_use_i_until_s:nw ; - } -\cs_new:Npn \__fp_expand_loop:nwnN #1#2 \s__fp_mark #3 #4 - { - \exp_after:wN #4 \exp:w \exp_end_continue_f:w - #2 - \s__fp_mark { #3 #1 } #4 - } -\cs_new:Npn \__fp_str_if_eq:nn #1#2 { \tex_strcmp:D {#1} {#2} } -\sys_if_engine_luatex:T +\sys_if_engine_luatex:TF { - \cs_set:Npn \__fp_str_if_eq:nn #1#2 + \cs_new:Npn \__fp_str_if_eq:nn #1#2 { \tex_directlua:D { @@ -13623,6 +13484,7 @@ } } } + { \cs_new_eq:NN \__fp_str_if_eq:nn \tex_strcmp:D } \cs_new:Npn \__fp_func_to_name:N #1 { \exp_last_unbraced:Nf @@ -17152,6 +17014,8 @@ { \__fp_parse_unary_function:NNN \__fp_exp_o:w ? } \cs_new:Npn \__fp_parse_word_ln:N { \__fp_parse_unary_function:NNN \__fp_ln_o:w ? } +\cs_new:Npn \__fp_parse_word_fact:N + { \__fp_parse_unary_function:NNN \__fp_fact_o:w ? } \tl_const:Nn \c__fp_ln_i_fixed_tl { {0000}{0000}{0000}{0000}{0000}{0000};} \tl_const:Nn \c__fp_ln_ii_fixed_tl { {6931}{4718}{0559}{9453}{0941}{7232};} \tl_const:Nn \c__fp_ln_iii_fixed_tl {{10986}{1228}{8668}{1096}{9139}{5245};} @@ -17820,6 +17684,76 @@ 1 \fi: } +\int_const:Nn \c__fp_fact_max_arg_int { 3248 } +\cs_new:Npn \__fp_fact_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ + { + \if_case:w #2 \exp_stop_f: + \__fp_case_return_o:Nw \c_one_fp + \or: + \or: + \if_meaning:w 0 #3 + \exp_after:wN \__fp_case_return_same_o:w + \fi: + \or: + \__fp_case_return_same_o:w + \fi: + \if_meaning:w 2 #3 + \__fp_case_use:nw { \__fp_invalid_operation_o:fw { fact } } + \fi: + \__fp_fact_pos_o:w + \s__fp \__fp_chk:w #2 #3 #4 ; + } +\cs_new:Npn \__fp_fact_pos_o:w #1; + { + \__fp_small_int:wTF #1; + { \__fp_fact_int_o:n } + { \__fp_invalid_operation_o:fw { fact } #1; } + } +\cs_new:Npn \__fp_fact_int_o:n #1 + { + \if_int_compare:w #1 > \c__fp_fact_max_arg_int + \__fp_case_return:nw + { + \exp_after:wN \exp_after:wN \exp_after:wN \__fp_overflow:w + \exp_after:wN \c_inf_fp + } + \fi: + \exp_after:wN \__fp_sanitize:Nw + \exp_after:wN 0 + \int_value:w \__fp_int_eval:w + \__fp_fact_loop_o:w #1 . 4 , { 1 } { } { } { } { } { } ; + } +\cs_new:Npn \__fp_fact_loop_o:w #1 . #2 ; + { + \if_int_compare:w #1 < 12 \exp_stop_f: + \__fp_fact_small_o:w #1 + \fi: + \exp_after:wN \__fp_ep_mul:wwwwn + \exp_after:wN 4 \exp_after:wN , + \exp_after:wN { \int_value:w \__fp_int_eval:w #1 * (#1 - 1) } + { } { } { } { } { } ; + #2 ; + { + \exp_after:wN \__fp_fact_loop_o:w + \int_value:w \__fp_int_eval:w #1 - 2 . + } + } +\cs_new:Npn \__fp_fact_small_o:w #1 \fi: #2 ; #3 ; #4 + { + \fi: + \exp_after:wN \__fp_ep_mul:wwwwn + \exp_after:wN 4 \exp_after:wN , + \exp_after:wN + { + \int_value:w + \if_case:w #1 \exp_stop_f: + 1 \or: 1 \or: 2 \or: 6 \or: 24 \or: 120 \or: 720 \or: 5040 + \or: 40320 \or: 362880 \or: 3628800 \or: 39916800 + \fi: + } { } { } { } { } { } ; + #3 ; + \__fp_ep_to_float_o:wwN 0 + } %% File: l3fp-trig.dtx \tl_map_inline:nn { @@ -18987,26 +18921,19 @@ { \tl_if_empty:nF {#1} { - \__fp_expand:n + \exp_last_unbraced:Ne \use_ii:nn { - { \use_ii:nn } \__fp_array_to_clist_loop:Nw #1 { ? \prg_break: } ; \prg_break_point: } } } -\cs_new:Npx \__fp_array_to_clist_loop:Nw #1#2; +\cs_new:Npn \__fp_array_to_clist_loop:Nw #1#2; { - \exp_not:N \use_none:n #1 - \exp_not:N \exp_after:wN - { - \exp_not:N \exp_after:wN , - \exp_not:N \exp_after:wN \c_space_tl - \exp_not:N \exp:w - \exp_not:N \exp_end_continue_f:w - \exp_not:N \__fp_to_tl_dispatch:w #1 #2 ; - } - \exp_not:N \__fp_array_to_clist_loop:Nw + \use_none:n #1 + , ~ + \exp_not:f { \__fp_to_tl_dispatch:w #1 #2 ; } + \__fp_array_to_clist_loop:Nw } %% File: l3fp-random.dtx \cs_new:Npn \__fp_parse_word_rand:N @@ -20314,14 +20241,6 @@ { is~empty } { contains~the~tokens: #2 } } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } - { \tl_analysis_show:N } -\cs_new_protected:Npn \tl_show_analysis:N #1 - { \tl_analysis_show:N #1 } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } - { \tl_analysis_show:n } -\cs_new_protected:Npn \tl_show_analysis:n #1 - { \tl_analysis_show:n {#1} } %% File: l3regex.dtx \cs_new_eq:NN \__regex_int_eval:w \tex_numexpr:D \cs_new_protected:Npn \__regex_standard_escapechar: @@ -24300,22 +24219,6 @@ } } } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \box_set_eq_drop:N } -\cs_new_protected:Npn \box_set_eq_clear:NN #1#2 - { \tex_setbox:D #1 \tex_box:D #2 } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \box_gset_eq_drop:N } -\cs_new_protected:Npn \box_gset_eq_clear:NN #1#2 - { \tex_global:D \tex_setbox:D #1 \tex_box:D #2 } -\cs_generate_variant:Nn \box_set_eq_clear:NN { c , Nc , cc } -\cs_generate_variant:Nn \box_gset_eq_clear:NN { c , Nc , cc } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \hbox_unpack_drop:N } -\cs_new_protected:Npn \hbox_unpack_clear:N - { \hbox_unpack_drop:N } -\cs_generate_variant:Nn \hbox_unpack_clear:N { c } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \vbox_unpack_drop:N } -\cs_new_protected:Npn \vbox_unpack_clear:N - { \vbox_unpack_drop:N } -\cs_generate_variant:Nn \vbox_unpack_clear:N { c } %% File: l3color-base.dtx \cs_new_eq:NN \color_group_begin: \group_begin: \cs_new_eq:NN \color_group_end: \group_end: @@ -24863,503 +24766,776 @@ } } } -\cs_new_protected:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 - { - \__coffin_join:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} - \coffin_set_eq:NN - } -\cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc } -\cs_new_protected:Npn \coffin_gjoin:NnnNnnnn #1#2#3#4#5#6#7#8 - { - \__coffin_join:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} - \coffin_gset_eq:NN - } -\cs_generate_variant:Nn \coffin_gjoin:NnnNnnnn { c , Nnnc , cnnc } -\cs_new_protected:Npn \__coffin_join:NnnNnnnnN #1#2#3#4#5#6#7#8#9 +\fp_new:N \l__coffin_sin_fp +\fp_new:N \l__coffin_cos_fp +\prop_new:N \l__coffin_bounding_prop +\prop_new:N \l__coffin_corners_prop +\prop_new:N \l__coffin_poles_prop +\dim_new:N \l__coffin_bounding_shift_dim +\dim_new:N \l__coffin_left_corner_dim +\dim_new:N \l__coffin_right_corner_dim +\dim_new:N \l__coffin_bottom_corner_dim +\dim_new:N \l__coffin_top_corner_dim +\cs_new_protected:Npn \coffin_rotate:Nn #1#2 + { \__coffin_rotate:NnNNN #1 {#2} \box_rotate:Nn \prop_set_eq:cN \hbox_set:Nn } +\cs_generate_variant:Nn \coffin_rotate:Nn { c } +\cs_new_protected:Npn \coffin_grotate:Nn #1#2 + { \__coffin_rotate:NnNNN #1 {#2} \box_grotate:Nn \prop_gset_eq:cN \hbox_gset:Nn } +\cs_generate_variant:Nn \coffin_grotate:Nn { c } +\cs_new_protected:Npn \__coffin_rotate:NnNNN #1#2#3#4#5 { - \__coffin_align:NnnNnnnnN - #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l__coffin_aligned_coffin - \hbox_set:Nn \l__coffin_aligned_coffin + \fp_set:Nn \l__coffin_sin_fp { sind ( #2 ) } + \fp_set:Nn \l__coffin_cos_fp { cosd ( #2 ) } + \prop_set_eq:Nc \l__coffin_corners_prop + { coffin ~ \__coffin_to_value:N #1 ~ corners } + \prop_set_eq:Nc \l__coffin_poles_prop + { coffin ~ \__coffin_to_value:N #1 ~ poles } + \prop_map_inline:Nn \l__coffin_corners_prop + { \__coffin_rotate_corner:Nnnn #1 {##1} ##2 } + \prop_map_inline:Nn \l__coffin_poles_prop + { \__coffin_rotate_pole:Nnnnnn #1 {##1} ##2 } + \__coffin_set_bounding:N #1 + \prop_map_inline:Nn \l__coffin_bounding_prop + { \__coffin_rotate_bounding:nnn {##1} ##2 } + \__coffin_find_corner_maxima:N #1 + \__coffin_find_bounding_shift: + #3 #1 {#2} + \hbox_set:Nn \l__coffin_internal_box { - \dim_compare:nNnT { \l__coffin_offset_x_dim } < \c_zero_dim - { \tex_kern:D -\l__coffin_offset_x_dim } - \hbox_unpack:N \l__coffin_aligned_coffin - \dim_set:Nn \l__coffin_internal_dim - { \l__coffin_offset_x_dim - \box_wd:N #1 + \box_wd:N #4 } - \dim_compare:nNnT \l__coffin_internal_dim < \c_zero_dim - { \tex_kern:D -\l__coffin_internal_dim } - } - \__coffin_reset_structure:N \l__coffin_aligned_coffin - \prop_clear:c - { - coffin ~ \__coffin_to_value:N \l__coffin_aligned_coffin - \c_space_tl corners - } - \__coffin_update_poles:N \l__coffin_aligned_coffin - \dim_compare:nNnTF \l__coffin_offset_x_dim < \c_zero_dim + \tex_kern:D + \dim_eval:n + { \l__coffin_bounding_shift_dim - \l__coffin_left_corner_dim } + \exp_stop_f: + \box_move_down:nn { \l__coffin_bottom_corner_dim } + { \box_use:N #1 } + } + \box_set_ht:Nn \l__coffin_internal_box + { \l__coffin_top_corner_dim - \l__coffin_bottom_corner_dim } + \box_set_dp:Nn \l__coffin_internal_box { 0pt } + \box_set_wd:Nn \l__coffin_internal_box + { \l__coffin_right_corner_dim - \l__coffin_left_corner_dim } + #5 #1 { \box_use_drop:N \l__coffin_internal_box } + \prop_map_inline:Nn \l__coffin_corners_prop + { \__coffin_shift_corner:Nnnn #1 {##1} ##2 } + \prop_map_inline:Nn \l__coffin_poles_prop + { \__coffin_shift_pole:Nnnnnn #1 {##1} ##2 } + #4 { coffin ~ \__coffin_to_value:N #1 ~ corners } + \l__coffin_corners_prop + #4 { coffin ~ \__coffin_to_value:N #1 ~ poles } + \l__coffin_poles_prop + } +\cs_new_protected:Npn \__coffin_set_bounding:N #1 + { + \prop_put:Nnx \l__coffin_bounding_prop { tl } + { { 0pt } { \dim_eval:n { \box_ht:N #1 } } } + \prop_put:Nnx \l__coffin_bounding_prop { tr } { - \__coffin_offset_poles:Nnn #1 { -\l__coffin_offset_x_dim } { 0pt } - \__coffin_offset_poles:Nnn #4 { 0pt } { \l__coffin_offset_y_dim } - \__coffin_offset_corners:Nnn #1 { -\l__coffin_offset_x_dim } { 0pt } - \__coffin_offset_corners:Nnn #4 { 0pt } { \l__coffin_offset_y_dim } + { \dim_eval:n { \box_wd:N #1 } } + { \dim_eval:n { \box_ht:N #1 } } } + \dim_set:Nn \l__coffin_internal_dim { -\box_dp:N #1 } + \prop_put:Nnx \l__coffin_bounding_prop { bl } + { { 0pt } { \dim_use:N \l__coffin_internal_dim } } + \prop_put:Nnx \l__coffin_bounding_prop { br } { - \__coffin_offset_poles:Nnn #1 { 0pt } { 0pt } - \__coffin_offset_poles:Nnn #4 - { \l__coffin_offset_x_dim } { \l__coffin_offset_y_dim } - \__coffin_offset_corners:Nnn #1 { 0pt } { 0pt } - \__coffin_offset_corners:Nnn #4 - { \l__coffin_offset_x_dim } { \l__coffin_offset_y_dim } + { \dim_eval:n { \box_wd:N #1 } } + { \dim_use:N \l__coffin_internal_dim } } - \__coffin_update_vertical_poles:NNN #1 #4 \l__coffin_aligned_coffin - #9 #1 \l__coffin_aligned_coffin } -\cs_new_protected:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \__coffin_rotate_bounding:nnn #1#2#3 { - \__coffin_attach:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} - \coffin_set_eq:NN + \__coffin_rotate_vector:nnNN {#2} {#3} \l__coffin_x_dim \l__coffin_y_dim + \prop_put:Nnx \l__coffin_bounding_prop {#1} + { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } } -\cs_generate_variant:Nn \coffin_attach:NnnNnnnn { c , Nnnc , cnnc } -\cs_new_protected:Npn \coffin_gattach:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \__coffin_rotate_corner:Nnnn #1#2#3#4 { - \__coffin_gattach:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} - \coffin_gset_eq:NN + \__coffin_rotate_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim + \prop_put:Nnx \l__coffin_corners_prop {#2} + { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } } -\cs_generate_variant:Nn \coffin_gattach:NnnNnnnn { c , Nnnc , cnnc } -\cs_new_protected:Npn \__coffin_attach:NnnNnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \__coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 { - \__coffin_align:NnnNnnnnN - #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l__coffin_aligned_coffin - \box_set_ht:Nn \l__coffin_aligned_coffin { \box_ht:N #1 } - \box_set_dp:Nn \l__coffin_aligned_coffin { \box_dp:N #1 } - \box_set_wd:Nn \l__coffin_aligned_coffin { \box_wd:N #1 } - \__coffin_reset_structure:N \l__coffin_aligned_coffin - \prop_set_eq:cc + \__coffin_rotate_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim + \__coffin_rotate_vector:nnNN {#5} {#6} + \l__coffin_x_prime_dim \l__coffin_y_prime_dim + \prop_put:Nnx \l__coffin_poles_prop {#2} { - coffin ~ \__coffin_to_value:N \l__coffin_aligned_coffin - \c_space_tl corners + { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } + { \dim_use:N \l__coffin_x_prime_dim } + { \dim_use:N \l__coffin_y_prime_dim } } - { coffin ~ \__coffin_to_value:N #1 ~ corners } - \__coffin_update_poles:N \l__coffin_aligned_coffin - \__coffin_offset_poles:Nnn #1 { 0pt } { 0pt } - \__coffin_offset_poles:Nnn #4 - { \l__coffin_offset_x_dim } { \l__coffin_offset_y_dim } - \__coffin_update_vertical_poles:NNN #1 #4 \l__coffin_aligned_coffin - \coffin_set_eq:NN #1 \l__coffin_aligned_coffin - } -\cs_new_protected:Npn \__coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 - { - \__coffin_align:NnnNnnnnN - #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l__coffin_aligned_coffin - \box_set_ht:Nn \l__coffin_aligned_coffin { \box_ht:N #1 } - \box_set_dp:Nn \l__coffin_aligned_coffin { \box_dp:N #1 } - \box_set_wd:Nn \l__coffin_aligned_coffin { \box_wd:N #1 } - \box_set_eq:NN #1 \l__coffin_aligned_coffin } -\cs_new_protected:Npn \__coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \__coffin_rotate_vector:nnNN #1#2#3#4 { - \__coffin_calculate_intersection:Nnn #4 {#5} {#6} - \dim_set:Nn \l__coffin_x_prime_dim { \l__coffin_x_dim } - \dim_set:Nn \l__coffin_y_prime_dim { \l__coffin_y_dim } - \__coffin_calculate_intersection:Nnn #1 {#2} {#3} - \dim_set:Nn \l__coffin_offset_x_dim - { \l__coffin_x_dim - \l__coffin_x_prime_dim + #7 } - \dim_set:Nn \l__coffin_offset_y_dim - { \l__coffin_y_dim - \l__coffin_y_prime_dim + #8 } - \hbox_set:Nn \l__coffin_aligned_internal_coffin + \dim_set:Nn #3 { - \box_use:N #1 - \tex_kern:D -\box_wd:N #1 - \tex_kern:D \l__coffin_offset_x_dim - \box_move_up:nn { \l__coffin_offset_y_dim } { \box_use:N #4 } + \fp_to_dim:n + { + \dim_to_fp:n {#1} * \l__coffin_cos_fp + - \dim_to_fp:n {#2} * \l__coffin_sin_fp + } + } + \dim_set:Nn #4 + { + \fp_to_dim:n + { + \dim_to_fp:n {#1} * \l__coffin_sin_fp + + \dim_to_fp:n {#2} * \l__coffin_cos_fp + } } - \coffin_set_eq:NN #9 \l__coffin_aligned_internal_coffin } -\cs_new_protected:Npn \__coffin_offset_poles:Nnn #1#2#3 +\cs_new_protected:Npn \__coffin_find_corner_maxima:N #1 { - \prop_map_inline:cn { coffin ~ \__coffin_to_value:N #1 ~ poles } - { \__coffin_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} } + \dim_set:Nn \l__coffin_top_corner_dim { -\c_max_dim } + \dim_set:Nn \l__coffin_right_corner_dim { -\c_max_dim } + \dim_set:Nn \l__coffin_bottom_corner_dim { \c_max_dim } + \dim_set:Nn \l__coffin_left_corner_dim { \c_max_dim } + \prop_map_inline:Nn \l__coffin_corners_prop + { \__coffin_find_corner_maxima_aux:nn ##2 } } -\cs_new_protected:Npn \__coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \__coffin_find_corner_maxima_aux:nn #1#2 { - \dim_set:Nn \l__coffin_x_dim { #3 + #7 } - \dim_set:Nn \l__coffin_y_dim { #4 + #8 } - \tl_if_in:nnTF {#2} { - } - { \tl_set:Nn \l__coffin_internal_tl { {#2} } } - { \tl_set:Nn \l__coffin_internal_tl { { #1 - #2 } } } - \exp_last_unbraced:NNo \__coffin_set_pole:Nnx \l__coffin_aligned_coffin - { \l__coffin_internal_tl } - { - { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } - {#5} {#6} - } + \dim_set:Nn \l__coffin_left_corner_dim + { \dim_min:nn { \l__coffin_left_corner_dim } {#1} } + \dim_set:Nn \l__coffin_right_corner_dim + { \dim_max:nn { \l__coffin_right_corner_dim } {#1} } + \dim_set:Nn \l__coffin_bottom_corner_dim + { \dim_min:nn { \l__coffin_bottom_corner_dim } {#2} } + \dim_set:Nn \l__coffin_top_corner_dim + { \dim_max:nn { \l__coffin_top_corner_dim } {#2} } } -\cs_new_protected:Npn \__coffin_offset_corners:Nnn #1#2#3 +\cs_new_protected:Npn \__coffin_find_bounding_shift: { - \prop_map_inline:cn { coffin ~ \__coffin_to_value:N #1 ~ corners } - { \__coffin_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} } + \dim_set:Nn \l__coffin_bounding_shift_dim { \c_max_dim } + \prop_map_inline:Nn \l__coffin_bounding_prop + { \__coffin_find_bounding_shift_aux:nn ##2 } } -\cs_new_protected:Npn \__coffin_offset_corner:Nnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \__coffin_find_bounding_shift_aux:nn #1#2 { - \prop_put:cnx + \dim_set:Nn \l__coffin_bounding_shift_dim + { \dim_min:nn { \l__coffin_bounding_shift_dim } {#1} } + } +\cs_new_protected:Npn \__coffin_shift_corner:Nnnn #1#2#3#4 + { + \prop_put:Nnx \l__coffin_corners_prop {#2} { - coffin ~ \__coffin_to_value:N \l__coffin_aligned_coffin - \c_space_tl corners + { \dim_eval:n { #3 - \l__coffin_left_corner_dim } } + { \dim_eval:n { #4 - \l__coffin_bottom_corner_dim } } } - { #1 - #2 } + } +\cs_new_protected:Npn \__coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 + { + \prop_put:Nnx \l__coffin_poles_prop {#2} { - { \dim_eval:n { #3 + #5 } } - { \dim_eval:n { #4 + #6 } } + { \dim_eval:n { #3 - \l__coffin_left_corner_dim } } + { \dim_eval:n { #4 - \l__coffin_bottom_corner_dim } } + {#5} {#6} } } -\cs_new_protected:Npn \__coffin_update_vertical_poles:NNN #1#2#3 +\fp_new:N \l__coffin_scale_x_fp +\fp_new:N \l__coffin_scale_y_fp +\dim_new:N \l__coffin_scaled_total_height_dim +\dim_new:N \l__coffin_scaled_width_dim +\cs_new_protected:Npn \coffin_resize:Nnn #1#2#3 { - \__coffin_get_pole:NnN #3 { #1 -T } \l__coffin_pole_a_tl - \__coffin_get_pole:NnN #3 { #2 -T } \l__coffin_pole_b_tl - \exp_last_two_unbraced:Noo \__coffin_update_T:nnnnnnnnN - \l__coffin_pole_a_tl \l__coffin_pole_b_tl #3 - \__coffin_get_pole:NnN #3 { #1 -B } \l__coffin_pole_a_tl - \__coffin_get_pole:NnN #3 { #2 -B } \l__coffin_pole_b_tl - \exp_last_two_unbraced:Noo \__coffin_update_B:nnnnnnnnN - \l__coffin_pole_a_tl \l__coffin_pole_b_tl #3 + \__coffin_resize:NnnNN #1 {#2} {#3} + \box_resize_to_wd_and_ht_plus_dp:Nnn + \prop_set_eq:cN } -\cs_new_protected:Npn \__coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 +\cs_generate_variant:Nn \coffin_resize:Nnn { c } +\cs_new_protected:Npn \coffin_gresize:Nnn #1#2#3 { - \dim_compare:nNnTF {#2} < {#6} - { - \__coffin_set_pole:Nnx #9 { T } - { { 0pt } {#6} { 1000pt } { 0pt } } - } - { - \__coffin_set_pole:Nnx #9 { T } - { { 0pt } {#2} { 1000pt } { 0pt } } - } + \__coffin_resize:NnnNN #1 {#2} {#3} + \box_gresize_to_wd_and_ht_plus_dp:Nnn + \prop_gset_eq:cN } -\cs_new_protected:Npn \__coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 +\cs_generate_variant:Nn \coffin_gresize:Nnn { c } +\cs_new_protected:Npn \__coffin_resize:NnnNN #1#2#3#4#5 { - \dim_compare:nNnTF {#2} < {#6} - { - \__coffin_set_pole:Nnx #9 { B } - { { 0pt } {#2} { 1000pt } { 0pt } } - } + \fp_set:Nn \l__coffin_scale_x_fp + { \dim_to_fp:n {#2} / \dim_to_fp:n { \coffin_wd:N #1 } } + \fp_set:Nn \l__coffin_scale_y_fp { - \__coffin_set_pole:Nnx #9 { B } - { { 0pt } {#6} { 1000pt } { 0pt } } + \dim_to_fp:n {#3} + / \dim_to_fp:n { \coffin_ht:N #1 + \coffin_dp:N #1 } } + #4 #1 {#2} {#3} + \__coffin_resize_common:NnnN #1 {#2} {#3} #5 } -\coffin_new:N \c__coffin_empty_coffin -\tex_setbox:D \c__coffin_empty_coffin = \tex_hbox:D { } -\cs_new_protected:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 +\cs_new_protected:Npn \__coffin_resize_common:NnnN #1#2#3#4 { - \mode_leave_vertical: - \__coffin_align:NnnNnnnnN \c__coffin_empty_coffin { H } { l } - #1 {#2} {#3} {#4} {#5} \l__coffin_aligned_coffin - \box_use_drop:N \l__coffin_aligned_coffin - } -\cs_generate_variant:Nn \coffin_typeset:Nnnnn { c } -\coffin_new:N \l__coffin_display_coffin -\coffin_new:N \l__coffin_display_coord_coffin -\coffin_new:N \l__coffin_display_pole_coffin -\prop_new:N \l__coffin_display_handles_prop -\prop_put:Nnn \l__coffin_display_handles_prop { tl } - { { b } { r } { -1 } { 1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { thc } - { { b } { hc } { 0 } { 1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { tr } - { { b } { l } { 1 } { 1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { vcl } - { { vc } { r } { -1 } { 0 } } -\prop_put:Nnn \l__coffin_display_handles_prop { vchc } - { { vc } { hc } { 0 } { 0 } } -\prop_put:Nnn \l__coffin_display_handles_prop { vcr } - { { vc } { l } { 1 } { 0 } } -\prop_put:Nnn \l__coffin_display_handles_prop { bl } - { { t } { r } { -1 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { bhc } - { { t } { hc } { 0 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { br } - { { t } { l } { 1 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Tl } - { { t } { r } { -1 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Thc } - { { t } { hc } { 0 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Tr } - { { t } { l } { 1 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Hl } - { { vc } { r } { -1 } { 1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Hhc } - { { vc } { hc } { 0 } { 1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Hr } - { { vc } { l } { 1 } { 1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Bl } - { { b } { r } { -1 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Bhc } - { { b } { hc } { 0 } { -1 } } -\prop_put:Nnn \l__coffin_display_handles_prop { Br } - { { b } { l } { 1 } { -1 } } -\dim_new:N \l__coffin_display_offset_dim -\dim_set:Nn \l__coffin_display_offset_dim { 2pt } -\dim_new:N \l__coffin_display_x_dim -\dim_new:N \l__coffin_display_y_dim -\prop_new:N \l__coffin_display_poles_prop -\tl_new:N \l__coffin_display_font_tl -\tl_set:Nn \l__coffin_display_font_tl { \sffamily \tiny } -\cs_new_protected:Npn \coffin_mark_handle:Nnnn #1#2#3#4 - { - \hcoffin_set:Nn \l__coffin_display_pole_coffin + \prop_set_eq:Nc \l__coffin_corners_prop + { coffin ~ \__coffin_to_value:N #1 ~ corners } + \prop_set_eq:Nc \l__coffin_poles_prop + { coffin ~ \__coffin_to_value:N #1 ~ poles } + \prop_map_inline:Nn \l__coffin_corners_prop + { \__coffin_scale_corner:Nnnn #1 {##1} ##2 } + \prop_map_inline:Nn \l__coffin_poles_prop + { \__coffin_scale_pole:Nnnnnn #1 {##1} ##2 } + \fp_compare:nNnT \l__coffin_scale_x_fp < \c_zero_fp { - \color {#4} - \rule { 1pt } { 1pt } + \prop_map_inline:Nn \l__coffin_corners_prop + { \__coffin_x_shift_corner:Nnnn #1 {##1} ##2 } + \prop_map_inline:Nn \l__coffin_poles_prop + { \__coffin_x_shift_pole:Nnnnnn #1 {##1} ##2 } } - \__coffin_attach_mark:NnnNnnnn #1 {#2} {#3} - \l__coffin_display_pole_coffin { hc } { vc } { 0pt } { 0pt } - \hcoffin_set:Nn \l__coffin_display_coord_coffin + #4 { coffin ~ \__coffin_to_value:N #1 ~ corners } + \l__coffin_corners_prop + #4 { coffin ~ \__coffin_to_value:N #1 ~ poles } + \l__coffin_poles_prop + } +\cs_new_protected:Npn \coffin_scale:Nnn #1#2#3 + { \__coffin_scale:NnnNN #1 {#2} {#3} \box_scale:Nnn \prop_set_eq:cN } +\cs_generate_variant:Nn \coffin_scale:Nnn { c } +\cs_new_protected:Npn \coffin_gscale:Nnn #1#2#3 + { \__coffin_scale:NnnNN #1 {#2} {#3} \box_gscale:Nnn \prop_gset_eq:cN } +\cs_generate_variant:Nn \coffin_gscale:Nnn { c } +\cs_new_protected:Npn \__coffin_scale:NnnNN #1#2#3#4#5 + { + \fp_set:Nn \l__coffin_scale_x_fp {#2} + \fp_set:Nn \l__coffin_scale_y_fp {#3} + #4 #1 { \l__coffin_scale_x_fp } { \l__coffin_scale_y_fp } + \dim_set:Nn \l__coffin_internal_dim + { \coffin_ht:N #1 + \coffin_dp:N #1 } + \dim_set:Nn \l__coffin_scaled_total_height_dim + { \fp_abs:n { \l__coffin_scale_y_fp } \l__coffin_internal_dim } + \dim_set:Nn \l__coffin_scaled_width_dim + { -\fp_abs:n { \l__coffin_scale_x_fp } \coffin_wd:N #1 } + \__coffin_resize_common:NnnN #1 + { \l__coffin_scaled_width_dim } { \l__coffin_scaled_total_height_dim } + #5 + } +\cs_new_protected:Npn \__coffin_scale_vector:nnNN #1#2#3#4 + { + \dim_set:Nn #3 + { \fp_to_dim:n { \dim_to_fp:n {#1} * \l__coffin_scale_x_fp } } + \dim_set:Nn #4 + { \fp_to_dim:n { \dim_to_fp:n {#2} * \l__coffin_scale_y_fp } } + } +\cs_new_protected:Npn \__coffin_scale_corner:Nnnn #1#2#3#4 + { + \__coffin_scale_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim + \prop_put:Nnx \l__coffin_corners_prop {#2} + { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } + } +\cs_new_protected:Npn \__coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 + { + \__coffin_scale_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim + \prop_put:Nnx \l__coffin_poles_prop {#2} { - \color {#4} - \l__coffin_display_font_tl - ( \tl_to_str:n { #2 , #3 } ) + { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } + {#5} {#6} } - \prop_get:NnN \l__coffin_display_handles_prop - { #2 #3 } \l__coffin_internal_tl - \quark_if_no_value:NTF \l__coffin_internal_tl + } +\cs_new_protected:Npn \__coffin_x_shift_corner:Nnnn #1#2#3#4 + { + \prop_put:Nnx \l__coffin_corners_prop {#2} { - \prop_get:NnN \l__coffin_display_handles_prop - { #3 #2 } \l__coffin_internal_tl - \quark_if_no_value:NTF \l__coffin_internal_tl - { - \__coffin_attach_mark:NnnNnnnn #1 {#2} {#3} - \l__coffin_display_coord_coffin { l } { vc } - { 1pt } { 0pt } - } - { - \exp_last_unbraced:No \__coffin_mark_handle_aux:nnnnNnn - \l__coffin_internal_tl #1 {#2} {#3} - } + { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} } + } +\cs_new_protected:Npn \__coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 + { + \prop_put:Nnx \l__coffin_poles_prop {#2} { - \exp_last_unbraced:No \__coffin_mark_handle_aux:nnnnNnn - \l__coffin_internal_tl #1 {#2} {#3} + { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} + {#5} {#6} } } -\cs_new_protected:Npn \__coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 +\cs_new_protected:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 { - \__coffin_attach_mark:NnnNnnnn #5 {#6} {#7} - \l__coffin_display_coord_coffin {#1} {#2} - { #3 \l__coffin_display_offset_dim } - { #4 \l__coffin_display_offset_dim } + \__coffin_join:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} + \coffin_set_eq:NN } -\cs_generate_variant:Nn \coffin_mark_handle:Nnnn { c } -\cs_new_protected:Npn \coffin_display_handles:Nn #1#2 +\cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc } +\cs_new_protected:Npn \coffin_gjoin:NnnNnnnn #1#2#3#4#5#6#7#8 { - \hcoffin_set:Nn \l__coffin_display_pole_coffin + \__coffin_join:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} + \coffin_gset_eq:NN + } +\cs_generate_variant:Nn \coffin_gjoin:NnnNnnnn { c , Nnnc , cnnc } +\cs_new_protected:Npn \__coffin_join:NnnNnnnnN #1#2#3#4#5#6#7#8#9 + { + \__coffin_align:NnnNnnnnN + #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l__coffin_aligned_coffin + \hbox_set:Nn \l__coffin_aligned_coffin { - \color {#2} - \rule { 1pt } { 1pt } + \dim_compare:nNnT { \l__coffin_offset_x_dim } < \c_zero_dim + { \tex_kern:D -\l__coffin_offset_x_dim } + \hbox_unpack:N \l__coffin_aligned_coffin + \dim_set:Nn \l__coffin_internal_dim + { \l__coffin_offset_x_dim - \box_wd:N #1 + \box_wd:N #4 } + \dim_compare:nNnT \l__coffin_internal_dim < \c_zero_dim + { \tex_kern:D -\l__coffin_internal_dim } } - \prop_set_eq:Nc \l__coffin_display_poles_prop - { coffin ~ \__coffin_to_value:N #1 ~ poles } - \__coffin_get_pole:NnN #1 { H } \l__coffin_pole_a_tl - \__coffin_get_pole:NnN #1 { T } \l__coffin_pole_b_tl - \tl_if_eq:NNT \l__coffin_pole_a_tl \l__coffin_pole_b_tl - { \prop_remove:Nn \l__coffin_display_poles_prop { T } } - \__coffin_get_pole:NnN #1 { B } \l__coffin_pole_b_tl - \tl_if_eq:NNT \l__coffin_pole_a_tl \l__coffin_pole_b_tl - { \prop_remove:Nn \l__coffin_display_poles_prop { B } } - \coffin_set_eq:NN \l__coffin_display_coffin #1 - \prop_map_inline:Nn \l__coffin_display_poles_prop + \__coffin_reset_structure:N \l__coffin_aligned_coffin + \prop_clear:c + { + coffin ~ \__coffin_to_value:N \l__coffin_aligned_coffin + \c_space_tl corners + } + \__coffin_update_poles:N \l__coffin_aligned_coffin + \dim_compare:nNnTF \l__coffin_offset_x_dim < \c_zero_dim { - \prop_remove:Nn \l__coffin_display_poles_prop {##1} - \__coffin_display_handles_aux:nnnnnn {##1} ##2 {#2} + \__coffin_offset_poles:Nnn #1 { -\l__coffin_offset_x_dim } { 0pt } + \__coffin_offset_poles:Nnn #4 { 0pt } { \l__coffin_offset_y_dim } + \__coffin_offset_corners:Nnn #1 { -\l__coffin_offset_x_dim } { 0pt } + \__coffin_offset_corners:Nnn #4 { 0pt } { \l__coffin_offset_y_dim } } - \box_use_drop:N \l__coffin_display_coffin - } -\cs_new_protected:Npn \__coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 - { - \prop_map_inline:Nn \l__coffin_display_poles_prop { - \bool_set_false:N \l__coffin_error_bool - \__coffin_calculate_intersection:nnnnnnnn {#2} {#3} {#4} {#5} ##2 - \bool_if:NF \l__coffin_error_bool - { - \dim_set:Nn \l__coffin_display_x_dim { \l__coffin_x_dim } - \dim_set:Nn \l__coffin_display_y_dim { \l__coffin_y_dim } - \__coffin_display_attach:Nnnnn - \l__coffin_display_pole_coffin { hc } { vc } - { 0pt } { 0pt } - \hcoffin_set:Nn \l__coffin_display_coord_coffin - { - \color {#6} - \l__coffin_display_font_tl - ( \tl_to_str:n { #1 , ##1 } ) - } - \prop_get:NnN \l__coffin_display_handles_prop - { #1 ##1 } \l__coffin_internal_tl - \quark_if_no_value:NTF \l__coffin_internal_tl - { - \prop_get:NnN \l__coffin_display_handles_prop - { ##1 #1 } \l__coffin_internal_tl - \quark_if_no_value:NTF \l__coffin_internal_tl - { - \__coffin_display_attach:Nnnnn - \l__coffin_display_coord_coffin { l } { vc } - { 1pt } { 0pt } - } - { - \exp_last_unbraced:No - \__coffin_display_handles_aux:nnnn - \l__coffin_internal_tl - } - } - { - \exp_last_unbraced:No \__coffin_display_handles_aux:nnnn - \l__coffin_internal_tl - } - } + \__coffin_offset_poles:Nnn #1 { 0pt } { 0pt } + \__coffin_offset_poles:Nnn #4 + { \l__coffin_offset_x_dim } { \l__coffin_offset_y_dim } + \__coffin_offset_corners:Nnn #1 { 0pt } { 0pt } + \__coffin_offset_corners:Nnn #4 + { \l__coffin_offset_x_dim } { \l__coffin_offset_y_dim } } + \__coffin_update_vertical_poles:NNN #1 #4 \l__coffin_aligned_coffin + #9 #1 \l__coffin_aligned_coffin } -\cs_new_protected:Npn \__coffin_display_handles_aux:nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 { - \__coffin_display_attach:Nnnnn - \l__coffin_display_coord_coffin {#1} {#2} - { #3 \l__coffin_display_offset_dim } - { #4 \l__coffin_display_offset_dim } + \__coffin_attach:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} + \coffin_set_eq:NN } -\cs_generate_variant:Nn \coffin_display_handles:Nn { c } -\cs_new_protected:Npn \__coffin_display_attach:Nnnnn #1#2#3#4#5 +\cs_generate_variant:Nn \coffin_attach:NnnNnnnn { c , Nnnc , cnnc } +\cs_new_protected:Npn \coffin_gattach:NnnNnnnn #1#2#3#4#5#6#7#8 { - \__coffin_calculate_intersection:Nnn #1 {#2} {#3} - \dim_set:Nn \l__coffin_x_prime_dim { \l__coffin_x_dim } + \__coffin_gattach:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} + \coffin_gset_eq:NN + } +\cs_generate_variant:Nn \coffin_gattach:NnnNnnnn { c , Nnnc , cnnc } +\cs_new_protected:Npn \__coffin_attach:NnnNnnnnN #1#2#3#4#5#6#7#8#9 + { + \__coffin_align:NnnNnnnnN + #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l__coffin_aligned_coffin + \box_set_ht:Nn \l__coffin_aligned_coffin { \box_ht:N #1 } + \box_set_dp:Nn \l__coffin_aligned_coffin { \box_dp:N #1 } + \box_set_wd:Nn \l__coffin_aligned_coffin { \box_wd:N #1 } + \__coffin_reset_structure:N \l__coffin_aligned_coffin + \prop_set_eq:cc + { + coffin ~ \__coffin_to_value:N \l__coffin_aligned_coffin + \c_space_tl corners + } + { coffin ~ \__coffin_to_value:N #1 ~ corners } + \__coffin_update_poles:N \l__coffin_aligned_coffin + \__coffin_offset_poles:Nnn #1 { 0pt } { 0pt } + \__coffin_offset_poles:Nnn #4 + { \l__coffin_offset_x_dim } { \l__coffin_offset_y_dim } + \__coffin_update_vertical_poles:NNN #1 #4 \l__coffin_aligned_coffin + \coffin_set_eq:NN #1 \l__coffin_aligned_coffin + } +\cs_new_protected:Npn \__coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 + { + \__coffin_align:NnnNnnnnN + #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l__coffin_aligned_coffin + \box_set_ht:Nn \l__coffin_aligned_coffin { \box_ht:N #1 } + \box_set_dp:Nn \l__coffin_aligned_coffin { \box_dp:N #1 } + \box_set_wd:Nn \l__coffin_aligned_coffin { \box_wd:N #1 } + \box_set_eq:NN #1 \l__coffin_aligned_coffin + } +\cs_new_protected:Npn \__coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 + { + \__coffin_calculate_intersection:Nnn #4 {#5} {#6} + \dim_set:Nn \l__coffin_x_prime_dim { \l__coffin_x_dim } \dim_set:Nn \l__coffin_y_prime_dim { \l__coffin_y_dim } + \__coffin_calculate_intersection:Nnn #1 {#2} {#3} \dim_set:Nn \l__coffin_offset_x_dim - { \l__coffin_display_x_dim - \l__coffin_x_prime_dim + #4 } + { \l__coffin_x_dim - \l__coffin_x_prime_dim + #7 } \dim_set:Nn \l__coffin_offset_y_dim - { \l__coffin_display_y_dim - \l__coffin_y_prime_dim + #5 } - \hbox_set:Nn \l__coffin_aligned_coffin + { \l__coffin_y_dim - \l__coffin_y_prime_dim + #8 } + \hbox_set:Nn \l__coffin_aligned_internal_coffin { - \box_use:N \l__coffin_display_coffin - \tex_kern:D -\box_wd:N \l__coffin_display_coffin + \box_use:N #1 + \tex_kern:D -\box_wd:N #1 \tex_kern:D \l__coffin_offset_x_dim - \box_move_up:nn { \l__coffin_offset_y_dim } { \box_use:N #1 } + \box_move_up:nn { \l__coffin_offset_y_dim } { \box_use:N #4 } } - \box_set_ht:Nn \l__coffin_aligned_coffin - { \box_ht:N \l__coffin_display_coffin } - \box_set_dp:Nn \l__coffin_aligned_coffin - { \box_dp:N \l__coffin_display_coffin } - \box_set_wd:Nn \l__coffin_aligned_coffin - { \box_wd:N \l__coffin_display_coffin } - \box_set_eq:NN \l__coffin_display_coffin \l__coffin_aligned_coffin + \coffin_set_eq:NN #9 \l__coffin_aligned_internal_coffin } -\cs_new_protected:Npn \coffin_show_structure:N - { \__coffin_show_structure:NN \msg_show:nnxxxx } -\cs_generate_variant:Nn \coffin_show_structure:N { c } -\cs_new_protected:Npn \coffin_log_structure:N - { \__coffin_show_structure:NN \msg_log:nnxxxx } -\cs_generate_variant:Nn \coffin_log_structure:N { c } -\cs_new_protected:Npn \__coffin_show_structure:NN #1#2 +\cs_new_protected:Npn \__coffin_offset_poles:Nnn #1#2#3 { - \__coffin_if_exist:NT #2 + \prop_map_inline:cn { coffin ~ \__coffin_to_value:N #1 ~ poles } + { \__coffin_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} } + } +\cs_new_protected:Npn \__coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 + { + \dim_set:Nn \l__coffin_x_dim { #3 + #7 } + \dim_set:Nn \l__coffin_y_dim { #4 + #8 } + \tl_if_in:nnTF {#2} { - } + { \tl_set:Nn \l__coffin_internal_tl { {#2} } } + { \tl_set:Nn \l__coffin_internal_tl { { #1 - #2 } } } + \exp_last_unbraced:NNo \__coffin_set_pole:Nnx \l__coffin_aligned_coffin + { \l__coffin_internal_tl } { - #1 { LaTeX / kernel } { show-coffin } - { \token_to_str:N #2 } - { - \iow_newline: >~ ht ~=~ \dim_eval:n { \coffin_ht:N #2 } - \iow_newline: >~ dp ~=~ \dim_eval:n { \coffin_dp:N #2 } - \iow_newline: >~ wd ~=~ \dim_eval:n { \coffin_wd:N #2 } - } - { - \prop_map_function:cN - { coffin ~ \__coffin_to_value:N #2 ~ poles } - \msg_show_item_unbraced:nn - } - { } + { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } + {#5} {#6} } } -\__kernel_msg_new:nnnn { kernel } { no-pole-intersection } - { No~intersection~between~coffin~poles. } +\cs_new_protected:Npn \__coffin_offset_corners:Nnn #1#2#3 { - LaTeX~was~asked~to~find~the~intersection~between~two~poles,~ - but~they~do~not~have~a~unique~meeting~point:~ - the~value~(0pt,~0pt)~will~be~used. + \prop_map_inline:cn { coffin ~ \__coffin_to_value:N #1 ~ corners } + { \__coffin_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} } } -\__kernel_msg_new:nnnn { kernel } { unknown-coffin } - { Unknown~coffin~'#1'. } - { The~coffin~'#1'~was~never~defined. } -\__kernel_msg_new:nnnn { kernel } { unknown-coffin-pole } - { Pole~'#1'~unknown~for~coffin~'#2'. } +\cs_new_protected:Npn \__coffin_offset_corner:Nnnnn #1#2#3#4#5#6 { - LaTeX~was~asked~to~find~a~typesetting~pole~for~a~coffin,~ - but~either~the~coffin~does~not~exist~or~the~pole~name~is~wrong. + \prop_put:cnx + { + coffin ~ \__coffin_to_value:N \l__coffin_aligned_coffin + \c_space_tl corners + } + { #1 - #2 } + { + { \dim_eval:n { #3 + #5 } } + { \dim_eval:n { #4 + #6 } } + } } -\__kernel_msg_new:nnn { kernel } { show-coffin } +\cs_new_protected:Npn \__coffin_update_vertical_poles:NNN #1#2#3 { - Size~of~coffin~#1 : #2 \\ - Poles~of~coffin~#1 : #3 . + \__coffin_get_pole:NnN #3 { #1 -T } \l__coffin_pole_a_tl + \__coffin_get_pole:NnN #3 { #2 -T } \l__coffin_pole_b_tl + \exp_last_two_unbraced:Noo \__coffin_update_T:nnnnnnnnN + \l__coffin_pole_a_tl \l__coffin_pole_b_tl #3 + \__coffin_get_pole:NnN #3 { #1 -B } \l__coffin_pole_a_tl + \__coffin_get_pole:NnN #3 { #2 -B } \l__coffin_pole_b_tl + \exp_last_two_unbraced:Noo \__coffin_update_B:nnnnnnnnN + \l__coffin_pole_a_tl \l__coffin_pole_b_tl #3 } -%% File: l3luatex.dtx -\cs_new_eq:NN \__lua_escape:n \tex_luaescapestring:D -\cs_new_eq:NN \__lua_now:n \tex_directlua:D -\cs_new_eq:NN \__lua_shipout:n \tex_latelua:D -\cs_undefine:N \lua_escape:e -\cs_undefine:N \lua_now:e -\cs_new:Npn \lua_now:e #1 { \__lua_now:n {#1} } -\cs_new:Npn \lua_now:n #1 { \lua_now:e { \exp_not:n {#1} } } -\cs_new_protected:Npn \lua_shipout_e:n #1 { \__lua_shipout:n {#1} } -\cs_new_protected:Npn \lua_shipout:n #1 - { \lua_shipout_e:n { \exp_not:n {#1} } } -\cs_new:Npn \lua_escape:e #1 { \__lua_escape:n {#1} } -\cs_new:Npn \lua_escape:n #1 { \lua_escape:e { \exp_not:n {#1} } } -\sys_if_engine_luatex:F +\cs_new_protected:Npn \__coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 { - \clist_map_inline:nn + \dim_compare:nNnTF {#2} < {#6} { - \lua_escape:n , \lua_escape:e , - \lua_now:n , \lua_now:e + \__coffin_set_pole:Nnx #9 { T } + { { 0pt } {#6} { 1000pt } { 0pt } } } { - \cs_set:Npn #1 ##1 - { - \__kernel_msg_expandable_error:nnn - { kernel } { luatex-required } { #1 } - } + \__coffin_set_pole:Nnx #9 { T } + { { 0pt } {#2} { 1000pt } { 0pt } } } - \clist_map_inline:nn - { \lua_shipout_e:n , \lua_shipout:n } + } +\cs_new_protected:Npn \__coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 + { + \dim_compare:nNnTF {#2} < {#6} { - \cs_set_protected:Npn #1 ##1 - { - \__kernel_msg_error:nnn - { kernel } { luatex-required } { #1 } - } + \__coffin_set_pole:Nnx #9 { B } + { { 0pt } {#2} { 1000pt } { 0pt } } + } + { + \__coffin_set_pole:Nnx #9 { B } + { { 0pt } {#6} { 1000pt } { 0pt } } } } -\__kernel_msg_new:nnnn { kernel } { luatex-required } - { LuaTeX~engine~not~in~use!~Ignoring~#1. } +\coffin_new:N \c__coffin_empty_coffin +\tex_setbox:D \c__coffin_empty_coffin = \tex_hbox:D { } +\cs_new_protected:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 { - The~feature~you~are~using~is~only~available~ - with~the~LuaTeX~engine.~LaTeX3~ignored~'#1'. + \mode_leave_vertical: + \__coffin_align:NnnNnnnnN \c__coffin_empty_coffin { H } { l } + #1 {#2} {#3} {#4} {#5} \l__coffin_aligned_coffin + \box_use_drop:N \l__coffin_aligned_coffin } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \lua_now:e } -\cs_new:Npn \lua_now_x:n #1 { \__lua_now:n {#1} } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \lua_escape:e } -\cs_new:Npn \lua_escape_x:n #1 { \__lua_escape:n {#1} } -\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \lua_shipout_e:n } -\cs_new_protected:Npn \lua_shipout_x:n #1 { \__lua_shipout:n {#1} } -%% File: l3unicode.dtx -\ior_new:N \g__char_data_ior -\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } +\cs_generate_variant:Nn \coffin_typeset:Nnnnn { c } +\coffin_new:N \l__coffin_display_coffin +\coffin_new:N \l__coffin_display_coord_coffin +\coffin_new:N \l__coffin_display_pole_coffin +\prop_new:N \l__coffin_display_handles_prop +\prop_put:Nnn \l__coffin_display_handles_prop { tl } + { { b } { r } { -1 } { 1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { thc } + { { b } { hc } { 0 } { 1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { tr } + { { b } { l } { 1 } { 1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { vcl } + { { vc } { r } { -1 } { 0 } } +\prop_put:Nnn \l__coffin_display_handles_prop { vchc } + { { vc } { hc } { 0 } { 0 } } +\prop_put:Nnn \l__coffin_display_handles_prop { vcr } + { { vc } { l } { 1 } { 0 } } +\prop_put:Nnn \l__coffin_display_handles_prop { bl } + { { t } { r } { -1 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { bhc } + { { t } { hc } { 0 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { br } + { { t } { l } { 1 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Tl } + { { t } { r } { -1 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Thc } + { { t } { hc } { 0 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Tr } + { { t } { l } { 1 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Hl } + { { vc } { r } { -1 } { 1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Hhc } + { { vc } { hc } { 0 } { 1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Hr } + { { vc } { l } { 1 } { 1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Bl } + { { b } { r } { -1 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Bhc } + { { b } { hc } { 0 } { -1 } } +\prop_put:Nnn \l__coffin_display_handles_prop { Br } + { { b } { l } { 1 } { -1 } } +\dim_new:N \l__coffin_display_offset_dim +\dim_set:Nn \l__coffin_display_offset_dim { 2pt } +\dim_new:N \l__coffin_display_x_dim +\dim_new:N \l__coffin_display_y_dim +\prop_new:N \l__coffin_display_poles_prop +\tl_new:N \l__coffin_display_font_tl +\tl_set:Nn \l__coffin_display_font_tl { \sffamily \tiny } +\cs_new_protected:Npn \__coffin_color:n #1 + { \cs_if_exist:NT \color { \color {#1} } } +\cs_new_protected:Npn \coffin_mark_handle:Nnnn #1#2#3#4 { - \group_begin: - \cs_set_eq:NN \__char_generate:w \tex_Uchar:D - \cs_set:Npx \__char_generate:n #1 - { - \sys_if_engine_luatex:TF - { - \exp_not:N \lua_now:e - { - l3kernel.charcat - ( - \exp_not:N \tex_number:D #1 , - \exp_not:N \tex_the:D \tex_catcode:D #1 + \hcoffin_set:Nn \l__coffin_display_pole_coffin + { + \__coffin_color:n {#4} + \rule { 1pt } { 1pt } + } + \__coffin_attach_mark:NnnNnnnn #1 {#2} {#3} + \l__coffin_display_pole_coffin { hc } { vc } { 0pt } { 0pt } + \hcoffin_set:Nn \l__coffin_display_coord_coffin + { + \__coffin_color:n {#4} + \l__coffin_display_font_tl + ( \tl_to_str:n { #2 , #3 } ) + } + \prop_get:NnN \l__coffin_display_handles_prop + { #2 #3 } \l__coffin_internal_tl + \quark_if_no_value:NTF \l__coffin_internal_tl + { + \prop_get:NnN \l__coffin_display_handles_prop + { #3 #2 } \l__coffin_internal_tl + \quark_if_no_value:NTF \l__coffin_internal_tl + { + \__coffin_attach_mark:NnnNnnnn #1 {#2} {#3} + \l__coffin_display_coord_coffin { l } { vc } + { 1pt } { 0pt } + } + { + \exp_last_unbraced:No \__coffin_mark_handle_aux:nnnnNnn + \l__coffin_internal_tl #1 {#2} {#3} + } + } + { + \exp_last_unbraced:No \__coffin_mark_handle_aux:nnnnNnn + \l__coffin_internal_tl #1 {#2} {#3} + } + } +\cs_new_protected:Npn \__coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 + { + \__coffin_attach_mark:NnnNnnnn #5 {#6} {#7} + \l__coffin_display_coord_coffin {#1} {#2} + { #3 \l__coffin_display_offset_dim } + { #4 \l__coffin_display_offset_dim } + } +\cs_generate_variant:Nn \coffin_mark_handle:Nnnn { c } +\cs_new_protected:Npn \coffin_display_handles:Nn #1#2 + { + \hcoffin_set:Nn \l__coffin_display_pole_coffin + { + \__coffin_color:n {#2} + \rule { 1pt } { 1pt } + } + \prop_set_eq:Nc \l__coffin_display_poles_prop + { coffin ~ \__coffin_to_value:N #1 ~ poles } + \__coffin_get_pole:NnN #1 { H } \l__coffin_pole_a_tl + \__coffin_get_pole:NnN #1 { T } \l__coffin_pole_b_tl + \tl_if_eq:NNT \l__coffin_pole_a_tl \l__coffin_pole_b_tl + { \prop_remove:Nn \l__coffin_display_poles_prop { T } } + \__coffin_get_pole:NnN #1 { B } \l__coffin_pole_b_tl + \tl_if_eq:NNT \l__coffin_pole_a_tl \l__coffin_pole_b_tl + { \prop_remove:Nn \l__coffin_display_poles_prop { B } } + \coffin_set_eq:NN \l__coffin_display_coffin #1 + \prop_map_inline:Nn \l__coffin_display_poles_prop + { + \prop_remove:Nn \l__coffin_display_poles_prop {##1} + \__coffin_display_handles_aux:nnnnnn {##1} ##2 {#2} + } + \box_use_drop:N \l__coffin_display_coffin + } +\cs_new_protected:Npn \__coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 + { + \prop_map_inline:Nn \l__coffin_display_poles_prop + { + \bool_set_false:N \l__coffin_error_bool + \__coffin_calculate_intersection:nnnnnnnn {#2} {#3} {#4} {#5} ##2 + \bool_if:NF \l__coffin_error_bool + { + \dim_set:Nn \l__coffin_display_x_dim { \l__coffin_x_dim } + \dim_set:Nn \l__coffin_display_y_dim { \l__coffin_y_dim } + \__coffin_display_attach:Nnnnn + \l__coffin_display_pole_coffin { hc } { vc } + { 0pt } { 0pt } + \hcoffin_set:Nn \l__coffin_display_coord_coffin + { + \__coffin_color:n {#6} + \l__coffin_display_font_tl + ( \tl_to_str:n { #1 , ##1 } ) + } + \prop_get:NnN \l__coffin_display_handles_prop + { #1 ##1 } \l__coffin_internal_tl + \quark_if_no_value:NTF \l__coffin_internal_tl + { + \prop_get:NnN \l__coffin_display_handles_prop + { ##1 #1 } \l__coffin_internal_tl + \quark_if_no_value:NTF \l__coffin_internal_tl + { + \__coffin_display_attach:Nnnnn + \l__coffin_display_coord_coffin { l } { vc } + { 1pt } { 0pt } + } + { + \exp_last_unbraced:No + \__coffin_display_handles_aux:nnnn + \l__coffin_internal_tl + } + } + { + \exp_last_unbraced:No \__coffin_display_handles_aux:nnnn + \l__coffin_internal_tl + } + } + } + } +\cs_new_protected:Npn \__coffin_display_handles_aux:nnnn #1#2#3#4 + { + \__coffin_display_attach:Nnnnn + \l__coffin_display_coord_coffin {#1} {#2} + { #3 \l__coffin_display_offset_dim } + { #4 \l__coffin_display_offset_dim } + } +\cs_generate_variant:Nn \coffin_display_handles:Nn { c } +\cs_new_protected:Npn \__coffin_display_attach:Nnnnn #1#2#3#4#5 + { + \__coffin_calculate_intersection:Nnn #1 {#2} {#3} + \dim_set:Nn \l__coffin_x_prime_dim { \l__coffin_x_dim } + \dim_set:Nn \l__coffin_y_prime_dim { \l__coffin_y_dim } + \dim_set:Nn \l__coffin_offset_x_dim + { \l__coffin_display_x_dim - \l__coffin_x_prime_dim + #4 } + \dim_set:Nn \l__coffin_offset_y_dim + { \l__coffin_display_y_dim - \l__coffin_y_prime_dim + #5 } + \hbox_set:Nn \l__coffin_aligned_coffin + { + \box_use:N \l__coffin_display_coffin + \tex_kern:D -\box_wd:N \l__coffin_display_coffin + \tex_kern:D \l__coffin_offset_x_dim + \box_move_up:nn { \l__coffin_offset_y_dim } { \box_use:N #1 } + } + \box_set_ht:Nn \l__coffin_aligned_coffin + { \box_ht:N \l__coffin_display_coffin } + \box_set_dp:Nn \l__coffin_aligned_coffin + { \box_dp:N \l__coffin_display_coffin } + \box_set_wd:Nn \l__coffin_aligned_coffin + { \box_wd:N \l__coffin_display_coffin } + \box_set_eq:NN \l__coffin_display_coffin \l__coffin_aligned_coffin + } +\cs_new_protected:Npn \coffin_show_structure:N + { \__coffin_show_structure:NN \msg_show:nnxxxx } +\cs_generate_variant:Nn \coffin_show_structure:N { c } +\cs_new_protected:Npn \coffin_log_structure:N + { \__coffin_show_structure:NN \msg_log:nnxxxx } +\cs_generate_variant:Nn \coffin_log_structure:N { c } +\cs_new_protected:Npn \__coffin_show_structure:NN #1#2 + { + \__coffin_if_exist:NT #2 + { + #1 { LaTeX / kernel } { show-coffin } + { \token_to_str:N #2 } + { + \iow_newline: >~ ht ~=~ \dim_eval:n { \coffin_ht:N #2 } + \iow_newline: >~ dp ~=~ \dim_eval:n { \coffin_dp:N #2 } + \iow_newline: >~ wd ~=~ \dim_eval:n { \coffin_wd:N #2 } + } + { + \prop_map_function:cN + { coffin ~ \__coffin_to_value:N #2 ~ poles } + \msg_show_item_unbraced:nn + } + { } + } + } +\__kernel_msg_new:nnnn { kernel } { no-pole-intersection } + { No~intersection~between~coffin~poles. } + { + LaTeX~was~asked~to~find~the~intersection~between~two~poles,~ + but~they~do~not~have~a~unique~meeting~point:~ + the~value~(0pt,~0pt)~will~be~used. + } +\__kernel_msg_new:nnnn { kernel } { unknown-coffin } + { Unknown~coffin~'#1'. } + { The~coffin~'#1'~was~never~defined. } +\__kernel_msg_new:nnnn { kernel } { unknown-coffin-pole } + { Pole~'#1'~unknown~for~coffin~'#2'. } + { + LaTeX~was~asked~to~find~a~typesetting~pole~for~a~coffin,~ + but~either~the~coffin~does~not~exist~or~the~pole~name~is~wrong. + } +\__kernel_msg_new:nnn { kernel } { show-coffin } + { + Size~of~coffin~#1 : #2 \\ + Poles~of~coffin~#1 : #3 . + } +%% File: l3luatex.dtx +\cs_new_eq:NN \__lua_escape:n \tex_luaescapestring:D +\cs_new_eq:NN \__lua_now:n \tex_directlua:D +\cs_new_eq:NN \__lua_shipout:n \tex_latelua:D +\cs_undefine:N \lua_escape:e +\cs_undefine:N \lua_now:e +\cs_new:Npn \lua_now:e #1 { \__lua_now:n {#1} } +\cs_new:Npn \lua_now:n #1 { \lua_now:e { \exp_not:n {#1} } } +\cs_new_protected:Npn \lua_shipout_e:n #1 { \__lua_shipout:n {#1} } +\cs_new_protected:Npn \lua_shipout:n #1 + { \lua_shipout_e:n { \exp_not:n {#1} } } +\cs_new:Npn \lua_escape:e #1 { \__lua_escape:n {#1} } +\cs_new:Npn \lua_escape:n #1 { \lua_escape:e { \exp_not:n {#1} } } +\sys_if_engine_luatex:F + { + \clist_map_inline:nn + { + \lua_escape:n , \lua_escape:e , + \lua_now:n , \lua_now:e + } + { + \cs_set:Npn #1 ##1 + { + \__kernel_msg_expandable_error:nnn + { kernel } { luatex-required } { #1 } + } + } + \clist_map_inline:nn + { \lua_shipout_e:n , \lua_shipout:n } + { + \cs_set_protected:Npn #1 ##1 + { + \__kernel_msg_error:nnn + { kernel } { luatex-required } { #1 } + } + } + } +\__kernel_msg_new:nnnn { kernel } { luatex-required } + { LuaTeX~engine~not~in~use!~Ignoring~#1. } + { + The~feature~you~are~using~is~only~available~ + with~the~LuaTeX~engine.~LaTeX3~ignored~'#1'. + } +%% File: l3unicode.dtx +\ior_new:N \g__char_data_ior +\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } + { + \group_begin: + \cs_set_eq:NN \__char_generate:w \tex_Uchar:D + \cs_set:Npx \__char_generate:n #1 + { + \sys_if_engine_luatex:TF + { + \exp_not:N \lua_now:e + { + l3kernel.charcat + ( + \exp_not:N \tex_number:D #1 , + \exp_not:N \tex_the:D \tex_catcode:D #1 ) } } @@ -25456,466 +25632,209 @@ { \tl_head:w #1 \c_hash_str \q_stop } { \c_hash_str } { - \str_if_eq:eeT - {#1} - { \c_hash_str \c_space_tl Conditional~Mappings } - { \ior_map_break: } - } - { \__char_data_auxi:w #1 \q_stop } - } - \ior_close:N \g__char_data_ior - \group_end: - } - { - \group_begin: - \cs_set_protected:Npn \__char_tmp:NN #1#2 - { - \quark_if_recursion_tail_stop:N #2 - \tl_const:cn { c__char_upper_case_ #2 _tl } {#1} - \tl_const:cn { c__char_lower_case_ #1 _tl } {#2} - \tl_const:cn { c__char_fold_case_ #1 _tl } {#2} - \__char_tmp:NN - } - \__char_tmp:NN - AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz - ? \q_recursion_tail \q_recursion_stop - \ior_open:Nn \g__char_data_ior { UnicodeData.txt } - \ior_close:N \g__char_data_ior - \group_end: - } -%% File: l3candidates.dtx -\cs_new_protected:Npn \mode_leave_vertical: - { - \if_mode_vertical: - \exp_after:wN \tex_indent:D - \fi: - } -\cs_new_protected:Npn \box_clip:N #1 - { \hbox_set:Nn #1 { \driver_box_use_clip:N #1 } } -\cs_generate_variant:Nn \box_clip:N { c } -\cs_new_protected:Npn \box_gclip:N #1 - { \hbox_gset:Nn #1 { \driver_box_use_clip:N #1 } } -\cs_generate_variant:Nn \box_gclip:N { c } -\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5 - { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } -\cs_generate_variant:Nn \box_set_trim:Nnnnn { c } -\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5 - { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } -\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c } -\cs_new_protected:Npn \__box_set_trim:NnnnnN #1#2#3#4#5#6 - { - \hbox_set:Nn \l__box_internal_box - { - \tex_kern:D - \__box_dim_eval:n {#2} - \box_use:N #1 - \tex_kern:D - \__box_dim_eval:n {#4} - } - \dim_compare:nNnTF { \box_dp:N #1 } > {#3} - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_down:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_dp:Nn \l__box_internal_box { \box_dp:N #1 - (#3) } - } - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_down:nn { (#3) - \box_dp:N #1 } - { \box_use_drop:N \l__box_internal_box } - } - \box_set_dp:Nn \l__box_internal_box \c_zero_dim - } - \dim_compare:nNnTF { \box_ht:N \l__box_internal_box } > {#5} - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box - { \box_ht:N \l__box_internal_box - (#5) } - } - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn { (#5) - \box_ht:N \l__box_internal_box } - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box \c_zero_dim - } - #6 #1 \l__box_internal_box - } -\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5 - { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } -\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c } -\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5 - { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } -\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c } -\cs_new_protected:Npn \__box_set_viewport:NnnnnN #1#2#3#4#5#6 - { - \hbox_set:Nn \l__box_internal_box - { - \tex_kern:D - \__box_dim_eval:n {#2} - \box_use:N #1 - \tex_kern:D \__box_dim_eval:n { #4 - \box_wd:N #1 } - } - \dim_compare:nNnTF {#3} < \c_zero_dim - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_down:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_dp:Nn \l__box_internal_box { - \__box_dim_eval:n {#3} } - } - { - \hbox_set:Nn \l__box_internal_box - { \box_move_down:nn {#3} { \box_use_drop:N \l__box_internal_box } } - \box_set_dp:Nn \l__box_internal_box \c_zero_dim - } - \dim_compare:nNnTF {#5} > \c_zero_dim - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box - { - (#5) - \dim_compare:nNnT {#3} > \c_zero_dim - { - (#3) } - } - } - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn { - \__box_dim_eval:n {#5} } - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box \c_zero_dim - } - #6 #1 \l__box_internal_box - } -\fp_new:N \l__coffin_sin_fp -\fp_new:N \l__coffin_cos_fp -\prop_new:N \l__coffin_bounding_prop -\prop_new:N \l__coffin_corners_prop -\prop_new:N \l__coffin_poles_prop -\dim_new:N \l__coffin_bounding_shift_dim -\dim_new:N \l__coffin_left_corner_dim -\dim_new:N \l__coffin_right_corner_dim -\dim_new:N \l__coffin_bottom_corner_dim -\dim_new:N \l__coffin_top_corner_dim -\cs_new_protected:Npn \coffin_rotate:Nn #1#2 - { \__coffin_rotate:NnNN #1 {#2} \box_rotate:Nn \prop_set_eq:cN } -\cs_new_protected:Npn \coffin_grotate:Nn #1#2 - { \__coffin_rotate:NnNN #1 {#2} \box_grotate:Nn \prop_gset_eq:cN } -\cs_new_protected:Npn \__coffin_rotate:NnNN #1#2#3#4 - { - \fp_set:Nn \l__coffin_sin_fp { sind ( #2 ) } - \fp_set:Nn \l__coffin_cos_fp { cosd ( #2 ) } - \prop_set_eq:Nc \l__coffin_corners_prop - { coffin ~ \__coffin_to_value:N #1 ~ corners } - \prop_set_eq:Nc \l__coffin_poles_prop - { coffin ~ \__coffin_to_value:N #1 ~ poles } - \prop_map_inline:Nn \l__coffin_corners_prop - { \__coffin_rotate_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:Nn \l__coffin_poles_prop - { \__coffin_rotate_pole:Nnnnnn #1 {##1} ##2 } - \__coffin_set_bounding:N #1 - \prop_map_inline:Nn \l__coffin_bounding_prop - { \__coffin_rotate_bounding:nnn {##1} ##2 } - \__coffin_find_corner_maxima:N #1 - \__coffin_find_bounding_shift: - #3 #1 {#2} - \hbox_set:Nn \l__coffin_internal_box - { - \tex_kern:D - \dim_eval:n - { \l__coffin_bounding_shift_dim - \l__coffin_left_corner_dim } - \exp_stop_f: - \box_move_down:nn { \l__coffin_bottom_corner_dim } - { \box_use:N #1 } - } - \box_set_ht:Nn \l__coffin_internal_box - { \l__coffin_top_corner_dim - \l__coffin_bottom_corner_dim } - \box_set_dp:Nn \l__coffin_internal_box { 0 pt } - \box_set_wd:Nn \l__coffin_internal_box - { \l__coffin_right_corner_dim - \l__coffin_left_corner_dim } - \hbox_set:Nn #1 { \box_use_drop:N \l__coffin_internal_box } - \prop_map_inline:Nn \l__coffin_corners_prop - { \__coffin_shift_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:Nn \l__coffin_poles_prop - { \__coffin_shift_pole:Nnnnnn #1 {##1} ##2 } - #4 { coffin ~ \__coffin_to_value:N #1 ~ corners } - \l__coffin_corners_prop - #4 { coffin ~ \__coffin_to_value:N #1 ~ poles } - \l__coffin_poles_prop - } -\cs_generate_variant:Nn \coffin_rotate:Nn { c } -\cs_new_protected:Npn \__coffin_set_bounding:N #1 - { - \prop_put:Nnx \l__coffin_bounding_prop { tl } - { { 0 pt } { \dim_eval:n { \box_ht:N #1 } } } - \prop_put:Nnx \l__coffin_bounding_prop { tr } - { - { \dim_eval:n { \box_wd:N #1 } } - { \dim_eval:n { \box_ht:N #1 } } - } - \dim_set:Nn \l__coffin_internal_dim { -\box_dp:N #1 } - \prop_put:Nnx \l__coffin_bounding_prop { bl } - { { 0 pt } { \dim_use:N \l__coffin_internal_dim } } - \prop_put:Nnx \l__coffin_bounding_prop { br } - { - { \dim_eval:n { \box_wd:N #1 } } - { \dim_use:N \l__coffin_internal_dim } - } - } -\cs_new_protected:Npn \__coffin_rotate_bounding:nnn #1#2#3 - { - \__coffin_rotate_vector:nnNN {#2} {#3} \l__coffin_x_dim \l__coffin_y_dim - \prop_put:Nnx \l__coffin_bounding_prop {#1} - { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } - } -\cs_new_protected:Npn \__coffin_rotate_corner:Nnnn #1#2#3#4 - { - \__coffin_rotate_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim - \prop_put:Nnx \l__coffin_corners_prop {#2} - { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } - } -\cs_new_protected:Npn \__coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 - { - \__coffin_rotate_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim - \__coffin_rotate_vector:nnNN {#5} {#6} - \l__coffin_x_prime_dim \l__coffin_y_prime_dim - \prop_put:Nnx \l__coffin_poles_prop {#2} - { - { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } - { \dim_use:N \l__coffin_x_prime_dim } - { \dim_use:N \l__coffin_y_prime_dim } - } - } -\cs_new_protected:Npn \__coffin_rotate_vector:nnNN #1#2#3#4 - { - \dim_set:Nn #3 - { - \fp_to_dim:n - { - \dim_to_fp:n {#1} * \l__coffin_cos_fp - - \dim_to_fp:n {#2} * \l__coffin_sin_fp - } - } - \dim_set:Nn #4 - { - \fp_to_dim:n - { - \dim_to_fp:n {#1} * \l__coffin_sin_fp - + \dim_to_fp:n {#2} * \l__coffin_cos_fp - } - } - } -\cs_new_protected:Npn \__coffin_find_corner_maxima:N #1 - { - \dim_set:Nn \l__coffin_top_corner_dim { -\c_max_dim } - \dim_set:Nn \l__coffin_right_corner_dim { -\c_max_dim } - \dim_set:Nn \l__coffin_bottom_corner_dim { \c_max_dim } - \dim_set:Nn \l__coffin_left_corner_dim { \c_max_dim } - \prop_map_inline:Nn \l__coffin_corners_prop - { \__coffin_find_corner_maxima_aux:nn ##2 } - } -\cs_new_protected:Npn \__coffin_find_corner_maxima_aux:nn #1#2 - { - \dim_set:Nn \l__coffin_left_corner_dim - { \dim_min:nn { \l__coffin_left_corner_dim } {#1} } - \dim_set:Nn \l__coffin_right_corner_dim - { \dim_max:nn { \l__coffin_right_corner_dim } {#1} } - \dim_set:Nn \l__coffin_bottom_corner_dim - { \dim_min:nn { \l__coffin_bottom_corner_dim } {#2} } - \dim_set:Nn \l__coffin_top_corner_dim - { \dim_max:nn { \l__coffin_top_corner_dim } {#2} } - } -\cs_new_protected:Npn \__coffin_find_bounding_shift: - { - \dim_set:Nn \l__coffin_bounding_shift_dim { \c_max_dim } - \prop_map_inline:Nn \l__coffin_bounding_prop - { \__coffin_find_bounding_shift_aux:nn ##2 } - } -\cs_new_protected:Npn \__coffin_find_bounding_shift_aux:nn #1#2 - { - \dim_set:Nn \l__coffin_bounding_shift_dim - { \dim_min:nn { \l__coffin_bounding_shift_dim } {#1} } - } -\cs_new_protected:Npn \__coffin_shift_corner:Nnnn #1#2#3#4 - { - \prop_put:Nnx \l__coffin_corners_prop {#2} - { - { \dim_eval:n { #3 - \l__coffin_left_corner_dim } } - { \dim_eval:n { #4 - \l__coffin_bottom_corner_dim } } - } - } -\cs_new_protected:Npn \__coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 - { - \prop_put:Nnx \l__coffin_poles_prop {#2} - { - { \dim_eval:n { #3 - \l__coffin_left_corner_dim } } - { \dim_eval:n { #4 - \l__coffin_bottom_corner_dim } } - {#5} {#6} - } - } -\fp_new:N \l__coffin_scale_x_fp -\fp_new:N \l__coffin_scale_y_fp -\dim_new:N \l__coffin_scaled_total_height_dim -\dim_new:N \l__coffin_scaled_width_dim -\cs_new_protected:Npn \coffin_resize:Nnn #1#2#3 - { - \__coffin_resize:NnnNN #1 {#2} {#3} - \box_resize_to_wd_and_ht_plus_dp:Nnn - \prop_set_eq:cN - } -\cs_generate_variant:Nn \coffin_resize:Nnn { c } -\cs_new_protected:Npn \coffin_gresize:Nnn #1#2#3 - { - \__coffin_resize:NnnNN #1 {#2} {#3} - \box_gresize_to_wd_and_ht_plus_dp:Nnn - \prop_gset_eq:cN - } -\cs_generate_variant:Nn \coffin_gresize:Nnn { c } -\cs_new_protected:Npn \__coffin_resize:NnnNN #1#2#3#4#5 - { - \fp_set:Nn \l__coffin_scale_x_fp - { \dim_to_fp:n {#2} / \dim_to_fp:n { \coffin_wd:N #1 } } - \fp_set:Nn \l__coffin_scale_y_fp - { - \dim_to_fp:n {#3} - / \dim_to_fp:n { \coffin_ht:N #1 + \coffin_dp:N #1 } - } - #4 #1 {#2} {#3} - \__coffin_resize_common:NnnN #1 {#2} {#3} #5 - } -\cs_new_protected:Npn \__coffin_resize_common:NnnN #1#2#3#4 - { - \prop_set_eq:Nc \l__coffin_corners_prop - { coffin ~ \__coffin_to_value:N #1 ~ corners } - \prop_set_eq:Nc \l__coffin_poles_prop - { coffin ~ \__coffin_to_value:N #1 ~ poles } - \prop_map_inline:Nn \l__coffin_corners_prop - { \__coffin_scale_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:Nn \l__coffin_poles_prop - { \__coffin_scale_pole:Nnnnnn #1 {##1} ##2 } - \fp_compare:nNnT \l__coffin_scale_x_fp < \c_zero_fp - { - \prop_map_inline:Nn \l__coffin_corners_prop - { \__coffin_x_shift_corner:Nnnn #1 {##1} ##2 } - \prop_map_inline:Nn \l__coffin_poles_prop - { \__coffin_x_shift_pole:Nnnnnn #1 {##1} ##2 } - } - #4 { coffin ~ \__coffin_to_value:N #1 ~ corners } - \l__coffin_corners_prop - #4 { coffin ~ \__coffin_to_value:N #1 ~ poles } - \l__coffin_poles_prop - } -\cs_new_protected:Npn \coffin_scale:Nnn #1#2#3 - { \__coffin_scale:NnnNN #1 {#2} {#3} \box_scale:Nnn \prop_set_eq:cN } -\cs_generate_variant:Nn \coffin_scale:Nnn { c } -\cs_new_protected:Npn \coffin_gscale:Nnn #1#2#3 - { \__coffin_scale:NnnNN #1 {#2} {#3} \box_gscale:Nnn \prop_gset_eq:cN } -\cs_generate_variant:Nn \coffin_gscale:Nnn { c } -\cs_new_protected:Npn \__coffin_scale:NnnNN #1#2#3#4#5 - { - \fp_set:Nn \l__coffin_scale_x_fp {#2} - \fp_set:Nn \l__coffin_scale_y_fp {#3} - #4 #1 { \l__coffin_scale_x_fp } { \l__coffin_scale_y_fp } - \dim_set:Nn \l__coffin_internal_dim - { \coffin_ht:N #1 + \coffin_dp:N #1 } - \dim_set:Nn \l__coffin_scaled_total_height_dim - { \fp_abs:n { \l__coffin_scale_y_fp } \l__coffin_internal_dim } - \dim_set:Nn \l__coffin_scaled_width_dim - { -\fp_abs:n { \l__coffin_scale_x_fp } \coffin_wd:N #1 } - \__coffin_resize_common:NnnN #1 - { \l__coffin_scaled_width_dim } { \l__coffin_scaled_total_height_dim } - #5 + \str_if_eq:eeT + {#1} + { \c_hash_str \c_space_tl Conditional~Mappings } + { \ior_map_break: } + } + { \__char_data_auxi:w #1 \q_stop } + } + \ior_close:N \g__char_data_ior + \group_end: } -\cs_new_protected:Npn \__coffin_scale_vector:nnNN #1#2#3#4 { - \dim_set:Nn #3 - { \fp_to_dim:n { \dim_to_fp:n {#1} * \l__coffin_scale_x_fp } } - \dim_set:Nn #4 - { \fp_to_dim:n { \dim_to_fp:n {#2} * \l__coffin_scale_y_fp } } + \group_begin: + \cs_set_protected:Npn \__char_tmp:NN #1#2 + { + \quark_if_recursion_tail_stop:N #2 + \tl_const:cn { c__char_upper_case_ #2 _tl } {#1} + \tl_const:cn { c__char_lower_case_ #1 _tl } {#2} + \tl_const:cn { c__char_fold_case_ #1 _tl } {#2} + \__char_tmp:NN + } + \__char_tmp:NN + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz + ? \q_recursion_tail \q_recursion_stop + \ior_open:Nn \g__char_data_ior { UnicodeData.txt } + \ior_close:N \g__char_data_ior + \group_end: } -\cs_new_protected:Npn \__coffin_scale_corner:Nnnn #1#2#3#4 +%% File: l3candidates.dtx +\cs_new_protected:Npn \mode_leave_vertical: { - \__coffin_scale_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim - \prop_put:Nnx \l__coffin_corners_prop {#2} - { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } } + \if_mode_vertical: + \exp_after:wN \tex_indent:D + \fi: } -\cs_new_protected:Npn \__coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \box_clip:N #1 + { \hbox_set:Nn #1 { \driver_box_use_clip:N #1 } } +\cs_generate_variant:Nn \box_clip:N { c } +\cs_new_protected:Npn \box_gclip:N #1 + { \hbox_gset:Nn #1 { \driver_box_use_clip:N #1 } } +\cs_generate_variant:Nn \box_gclip:N { c } +\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5 + { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } +\cs_generate_variant:Nn \box_set_trim:Nnnnn { c } +\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5 + { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } +\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c } +\cs_new_protected:Npn \__box_set_trim:NnnnnN #1#2#3#4#5#6 { - \__coffin_scale_vector:nnNN {#3} {#4} \l__coffin_x_dim \l__coffin_y_dim - \prop_put:Nnx \l__coffin_poles_prop {#2} + \hbox_set:Nn \l__box_internal_box { - { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } - {#5} {#6} + \tex_kern:D - \__box_dim_eval:n {#2} + \box_use:N #1 + \tex_kern:D - \__box_dim_eval:n {#4} } - } -\cs_new_protected:Npn \__coffin_x_shift_corner:Nnnn #1#2#3#4 - { - \prop_put:Nnx \l__coffin_corners_prop {#2} + \dim_compare:nNnTF { \box_dp:N #1 } > {#3} { - { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} + \hbox_set:Nn \l__box_internal_box + { + \box_move_down:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_dp:Nn \l__box_internal_box { \box_dp:N #1 - (#3) } + } + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_down:nn { (#3) - \box_dp:N #1 } + { \box_use_drop:N \l__box_internal_box } + } + \box_set_dp:Nn \l__box_internal_box \c_zero_dim + } + \dim_compare:nNnTF { \box_ht:N \l__box_internal_box } > {#5} + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box + { \box_ht:N \l__box_internal_box - (#5) } + } + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn { (#5) - \box_ht:N \l__box_internal_box } + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box \c_zero_dim } + #6 #1 \l__box_internal_box } -\cs_new_protected:Npn \__coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5 + { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } +\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c } +\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5 + { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } +\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c } +\cs_new_protected:Npn \__box_set_viewport:NnnnnN #1#2#3#4#5#6 { - \prop_put:Nnx \l__coffin_poles_prop {#2} + \hbox_set:Nn \l__box_internal_box { - { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} - {#5} {#6} + \tex_kern:D - \__box_dim_eval:n {#2} + \box_use:N #1 + \tex_kern:D \__box_dim_eval:n { #4 - \box_wd:N #1 } + } + \dim_compare:nNnTF {#3} < \c_zero_dim + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_down:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_dp:Nn \l__box_internal_box { - \__box_dim_eval:n {#3} } + } + { + \hbox_set:Nn \l__box_internal_box + { \box_move_down:nn {#3} { \box_use_drop:N \l__box_internal_box } } + \box_set_dp:Nn \l__box_internal_box \c_zero_dim } + \dim_compare:nNnTF {#5} > \c_zero_dim + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box + { + (#5) + \dim_compare:nNnT {#3} > \c_zero_dim + { - (#3) } + } + } + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn { - \__box_dim_eval:n {#5} } + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box \c_zero_dim + } + #6 #1 \l__box_internal_box } \cs_new:Npn \fp_sign:n #1 { \fp_to_decimal:n { sign \__fp_parse:n {#1} } } \cs_new_protected:Npn \file_get_mdfive_hash:nN #1#2 - { \__file_get_details:nnN {#1} { mdfivesum } {#2} } + { \file_get_mdfive_hash:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } \cs_new_protected:Npn \file_get_size:nN #1#2 - { \__file_get_details:nnN {#1} { size } {#2} } + { \file_get_size:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } \cs_new_protected:Npn \file_get_timestamp:nN #1#2 + { \file_get_timestamp:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } +\prg_new_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 { T , F , TF } + { \__file_get_details:nnN {#1} { mdfivesum } {#2} } +\prg_new_protected_conditional:Npnn \file_get_size:nN #1#2 { T , F , TF } + { \__file_get_details:nnN {#1} { size } {#2} } +\prg_new_protected_conditional:Npnn \file_get_timestamp:nN #1#2 { T , F , TF } { \__file_get_details:nnN {#1} { moddate } {#2} } \cs_new_protected:Npn \__file_get_details:nnN #1#2#3 { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_set:Nx #3 + \file_get_full_name:nNTF {#1} \l__file_full_name_tl { - \use:c { tex_file #2 :D } \exp_after:wN - { \l__file_full_name_str } + \tl_set:Nx #3 + { + \use:c { tex_file #2 :D } \exp_after:wN + { \l__file_full_name_tl } + } + \prg_return_true: } + { \prg_return_false: } } \sys_if_engine_luatex:TF { \cs_set_protected:Npn \__file_get_details:nnN #1#2#3 { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_set:Nx #3 + \file_get_full_name:nNTF {#1} \l__file_full_name_tl { - \lua_now:e + \tl_set:Nx #3 { - l3kernel.file#2 - ( " \lua_escape:e { \l__file_full_name_str } " ) + \lua_now:e + { + l3kernel.file#2 + ( " \lua_escape:e { \l__file_full_name_tl } " ) + } } + \prg_return_true: } - } + { \prg_return_false: } + } } { - \cs_set_protected:Npn \file_get_mdfive_hash:nN #1#2 + \prg_set_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 + { T , F , TF } { - \file_get_full_name:nN {#1} \l__file_full_name_str - \tl_set:Nx #2 + \file_get_full_name:nNTF {#1} \l__file_full_name_tl { - \tex_mdfivesum:D file \exp_after:wN - { \l__file_full_name_str } + \tl_set:Nx #2 + { + \tex_mdfivesum:D file \exp_after:wN + { \l__file_full_name_tl } + } + \prg_return_true: } + { \prg_return_false: } } \cs_if_exist:NF \tex_filesize:D { @@ -25925,6 +25844,7 @@ \__kernel_msg_error:nnx { kernel } { primitive-not-available } { \exp_not:c { (pdf)file #2 } } + \prg_return_false: } } } @@ -25936,16 +25856,14 @@ } \cs_new_protected:Npn \file_if_exist_input:n #1 { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NF \l__file_full_name_str - { \__file_input:V \l__file_full_name_str } + \file_get_full_name:nNT {#1} \l__file_full_name_tl + { \__file_input:V \l__file_full_name_tl } } \cs_new_protected:Npn \file_if_exist_input:nF #1#2 { - \file_get_full_name:nN {#1} \l__file_full_name_str - \str_if_empty:NTF \l__file_full_name_str + \file_get_full_name:nNTF {#1} \l__file_full_name_tl + { \__file_input:V \l__file_full_name_tl } {#2} - { \__file_input:V \l__file_full_name_str } } \cs_new_protected:Npn \file_input_stop: { \tex_endinput:D } \__kernel_patch:nnNNpn { \__flag_chk_exist:n {#1} } { } @@ -25974,10 +25892,14 @@ } \cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6 { - \exp_args:Nf \__msg_expandable_error_module:nn + \exp_args:Ne \__msg_expandable_error_module:nn { - \exp_args:Nf \tl_to_str:n - { \use:c { \c__msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} } + \exp_args:Nc \exp_args:Noooo + { \c__msg_text_prefix_tl #1 / #2 } + { \tl_to_str:n {#3} } + { \tl_to_str:n {#4} } + { \tl_to_str:n {#5} } + { \tl_to_str:n {#6} } } {#1} } @@ -26035,16 +25957,6 @@ \cs_new_protected:Npn \bool_gset_inverse:N #1 { \bool_if:NTF #1 { \bool_gset_false:N } { \bool_gset_true:N } #1 } \cs_generate_variant:Nn \bool_gset_inverse:N { c } -\cs_new:Npn \prop_count:N #1 - { - \int_eval:n - { - 0 - \prop_map_function:NN #1 \__prop_count:nn - } - } -\cs_new:Npn \__prop_count:nn #1#2 { + 1 } -\cs_generate_variant:Nn \prop_count:N { c } \cs_new:Npn \prop_map_tokens:Nn #1#2 { \exp_last_unbraced:Nno @@ -26244,19 +26156,6 @@ \fi: \fi: } -\cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4 - { - \skip_if_finite:nTF {#1} - { - #3 = \tex_gluestretch:D #1 \scan_stop: - #4 = \tex_glueshrink:D #1 \scan_stop: - } - { - #3 = \c_zero_skip - #4 = \c_zero_skip - #2 - } - } \str_const:Nx \c_sys_engine_version_str { \str_case:on \c_sys_engine_str @@ -26347,7 +26246,7 @@ \cs_new_protected:Npn \sys_shell_get:nnN #1#2#3 { \sys_shell_get:nnNF {#1} {#2} #3 - { \tl_clear:N #3 } + { \tl_set:Nn #3 { \q_no_value } } } \prg_new_protected_conditional:Npnn \sys_shell_get:nnN #1#2#3 { T , F , TF } { @@ -26364,8 +26263,8 @@ \prg_return_false: } { - \if_false: { \fi: \group_begin: + \if_false: { \fi: \int_set_eq:NN \tex_tracingnesting:D \c_zero_int \exp_args:No \tex_everyeof:D { \c__sys_marker_tl } #2 \scan_stop: @@ -26448,90 +26347,16 @@ { \tl_if_head_is_N_type:nTF {#1} { \__tl_if_empty_if:o { \use_none:n #1 } } - { - \tl_if_empty:nTF {#1} - { \if_false: } - { \__tl_if_empty_if:o { \exp:w \exp_end_continue_f:w #1 } } - } - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_new:Npn \tl_reverse_tokens:n #1 - { - \__kernel_exp_not:w \exp_after:wN - { - \exp:w - \__tl_act:NNNnn - \__tl_reverse_normal:nN - \__tl_reverse_group:nn - \__tl_reverse_space:n - { } - {#1} - } - } -\cs_new:Npn \__tl_reverse_group:nn #1 - { - \__tl_act_group_recurse:Nnn - \__tl_act_reverse_output:n - { \tl_reverse_tokens:n } - } -\cs_new:Npn \__tl_act_group_recurse:Nnn #1#2#3 - { - \exp_args:Nf #1 - { \exp_after:wN \exp_after:wN \exp_after:wN { #2 {#3} } } - } -\cs_new:Npn \tl_count_tokens:n #1 - { - \int_eval:n - { - \__tl_act:NNNnn - \__tl_act_count_normal:nN - \__tl_act_count_group:nn - \__tl_act_count_space:n - { } - {#1} - } - } -\cs_new:Npn \__tl_act_count_normal:nN #1 #2 { 1 + } -\cs_new:Npn \__tl_act_count_space:n #1 { 1 + } -\cs_new:Npn \__tl_act_count_group:nn #1 #2 - { 2 + \tl_count_tokens:n {#2} + } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN } -\cs_new_protected:Npn \tl_set_from_file:Nnn #1#2#3 - { \file_get:nnN {#3} {#2} #1 } -\cs_generate_variant:Nn \tl_set_from_file:Nnn { c } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN } -\cs_new_protected:Npn \tl_gset_from_file:Nnn #1#2#3 - { - \group_begin: - \file_get:nnN {#3} {#2} \l__tl_internal_a_tl - \tl_gset_eq:NN #1 \l__tl_internal_a_tl - \group_end: - } -\cs_generate_variant:Nn \tl_gset_from_file:Nnn { c } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN } -\cs_new_protected:Npn \tl_set_from_file_x:Nnn #1#2#3 - { - \group_begin: - \file_get:nnN {#3} {#2} \l__tl_internal_a_tl - #2 \scan_stop: - \tl_set:Nx \l__tl_internal_a_tl { \l__tl_internal_a_tl } - \exp_args:NNNo \group_end: - \tl_set:Nn #1 \l__tl_internal_a_tl - } -\cs_generate_variant:Nn \tl_set_from_file_x:Nnn { c } -\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN } -\cs_new_protected:Npn \tl_gset_from_file_x:Nnn #1#2#3 - { - \group_begin: - \file_get:nnN {#3} {#2} \l__tl_internal_a_tl - #2 \scan_stop: - \tl_gset:Nx #1 { \l__tl_internal_a_tl } - \group_end: + { + \tl_if_empty:nTF {#1} + { \if_false: } + { \__tl_if_empty_if:o { \exp:w \exp_end_continue_f:w #1 } } + } + \prg_return_true: + \else: + \prg_return_false: + \fi: } -\cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c } \cs_new:Npn \char_lower_case:N #1 { \__char_change_case:nNN { lower } \char_value_lccode:n #1 } \cs_new:Npn \char_upper_case:N #1 @@ -27774,6 +27599,110 @@ \exp_after:wN \__peek_true_remove:w } %% File: l3deprecation.dtx +\bool_new:N \l__deprecation_grace_period_bool +\cs_new:Npn \__deprecation_date_compare:nNnTF #1#2#3 + { \__deprecation_date_compare_aux:w #1 -0-0- \q_mark #2 #3 -0-0- \q_stop } +\cs_new:Npn \__deprecation_date_compare_aux:w + #1 - #2 - #3 - #4 \q_mark #5 #6 - #7 - #8 - #9 \q_stop + { + \int_compare:nNnTF {#1} = {#6} + { + \int_compare:nNnTF {#2} = {#7} + { \int_compare:nNnTF {#3} #5 {#8} } + { \int_compare:nNnTF {#2} #5 {#7} } + } + { \int_compare:nNnTF {#1} #5 {#6} } + } +\cs_new_protected:Npn \__deprecation_not_yet_deprecated:nTF #1 + { + \bool_set_false:N \l__deprecation_grace_period_bool + \exp_args:No \__deprecation_date_compare:nNnTF { \ExplLoaderFileDate } < {#1} + { \use_i:nn } + { + \exp_args:Nf \__deprecation_date_compare:nNnTF + { + \exp_after:wN \__deprecation_minus_six_months:w + \ExplLoaderFileDate -0-0- \q_stop + } < {#1} + { + \bool_set_true:N \l__deprecation_grace_period_bool + \bool_if:NTF \l@expl@undo@recent@deprecations@bool + } + { \use_ii:nn } + } + } +\cs_new:Npn \__deprecation_minus_six_months:w #1 - #2 - #3 - #4 \q_stop + { + \int_compare:nNnTF {#2} > 6 + { #1 - \int_eval:n { #2 - 6 } - #3 } + { \int_eval:n { #1 - 1 } - \int_eval:n { #2 + 6 } - #3 } + } +\cs_new_protected:Npn \__kernel_patch_deprecation:nnNNpn #1#2#3#4#5# + { \__deprecation_patch_aux:nnNNnn {#1} {#2} #3 #4 {#5} } +\cs_new_protected:Npn \__deprecation_patch_aux:nnNNnn #1#2#3#4#5#6 + { + \__kernel_deprecation_code:nn + { + \tex_let:D #4 \scan_stop: + \__kernel_deprecation_error:Nnn #4 {#2} {#1} + } + { \tex_let:D #4 \scan_stop: } + \__deprecation_not_yet_deprecated:nTF {#1} + { + \bool_if:nTF + { + \cs_if_eq_p:NN #3 \cs_new_protected:Npn && + \__kernel_if_debug:TF + { \c_true_bool } { \l@expl@undo@recent@deprecations@bool } + } + { \__deprecation_warn_once:nnNnn {#1} {#2} #4 {#5} {#6} } + { \__deprecation_patch_aux:Nn #3 { #4 #5 {#6} } } + } + { \__deprecation_just_error:nnNN {#1} {#2} #3 #4 } + } +\cs_new_protected:Npn \__deprecation_warn_once:nnNnn #1#2#3#4#5 + { + \cs_new_protected:Npx #3 + { + \__kernel_if_debug:TF + { + \exp_not:N \__kernel_msg_warning:nnxxx + { kernel } { deprecated-command } + {#1} + { \token_to_str:N #3 } + { \tl_to_str:n {#2} } + } + { } + \exp_not:n { \cs_gset_protected:Npn #3 #4 {#5} } + \exp_not:N #3 + } + \__kernel_deprecation_code:nn { } + { \cs_set_protected:Npn #3 #4 {#5} } + } +\cs_new_protected:Npn \__deprecation_patch_aux:Nn #1#2 + { + #1 #2 + \cs_if_eq:NNTF #1 \cs_new_protected:Npn + { \__kernel_deprecation_code:nn { } { \cs_set_protected:Npn #2 } } + { \__kernel_deprecation_code:nn { } { \cs_set:Npn #2 } } + } +\cs_new_protected:Npn \__deprecation_just_error:nnNN #1#2#3#4 + { + \exp_args:NNx \__deprecation_patch_aux:Nn #3 + { + \exp_not:N #4 + { + \cs_if_eq:NNTF #3 \cs_new_protected:Npn + { \exp_not:N \__kernel_msg_error:nnnnnn } + { \exp_not:N \__kernel_msg_expandable_error:nnnnnn } + { kernel } { deprecated-command } + {#1} + { \token_to_str:N #4 } + { \tl_to_str:n {#2} } + { \bool_if:NT \l__deprecation_grace_period_bool { grace } } + } + } + } \cs_new_protected:Npn \__kernel_deprecation_error:Nnn #1#2#3 { \tex_protected:D \tex_outer:D \tex_edef:D #1 @@ -27786,107 +27715,99 @@ { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } } } -\__kernel_deprecation_error:Nnn \box_resize:cnn - { \box_resize_to_wd_and_ht_plus_dp:cnn } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \box_resize:Nnn - { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \box_use_clear:c - { \box_use_drop:c } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \box_use_clear:N - { \box_use_drop:N } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \c_job_name_tl +\__kernel_msg_new:nnn { kernel } { deprecated-command } + { + '#2'~deprecated~on~#1. + \tl_if_empty:nF {#3} { ~Use~'#3'. } + \str_if_eq:nnT {#4} { grace } + { + \c_space_tl + For~6~months~after~that~date~one~can~restore~a~deprecated~ + command~by~loading~the~expl3~package~with~the~option~ + 'undo-recent-deprecations'. + } + } +\cs_new_protected:Npn \__deprecation_old_protected:Nnn #1#2#3 + { + \__kernel_patch_deprecation:nnNNpn {#3} {#2} + \cs_new_protected:Npn #1 { } + } +\cs_new_protected:Npn \__deprecation_old:Nnn #1#2#3 + { + \__kernel_patch_deprecation:nnNNpn {#3} {#2} + \cs_new:Npn #1 { } + } +\__deprecation_old:Nnn \c_job_name_tl { \c_sys_jobname_str } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \c_minus_one - { -1 } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \dim_case:nnn +\__deprecation_old:Nnn \dim_case:nnn { \dim_case:nnF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \file_add_path:nN - { \file_get_full_name:nN } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \file_if_exist_input:nT +\__deprecation_old_protected:Nnn \file_if_exist_input:nT { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 } -\__kernel_deprecation_error:Nnn \file_if_exist_input:nTF +\__deprecation_old_protected:Nnn \file_if_exist_input:nTF { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 } -\__kernel_deprecation_error:Nnn \file_list: - { \file_log_list: } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \file_path_include:n - { \seq_put_right:Nn \l_file_search_path_seq } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \file_path_remove:n - { \seq_remove_all:Nn \l_file_search_path_seq } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \g_file_current_name_tl - { \g_file_current_name_str } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \int_case:nnn +\__deprecation_old:Nnn \int_case:nnn { \int_case:nnF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \int_from_binary:n +\__deprecation_old:Nnn \int_from_binary:n { \int_from_bin:n } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \int_from_hexadecimal:n +\__deprecation_old:Nnn \int_from_hexadecimal:n { \int_from_hex:n } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \int_from_octal:n +\__deprecation_old:Nnn \int_from_octal:n { \int_from_oct:n } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \int_to_binary:n +\__deprecation_old:Nnn \int_to_binary:n { \int_to_bin:n } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \int_to_hexadecimal:n +\__deprecation_old:Nnn \int_to_hexadecimal:n { \int_to_hex:n } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \int_to_octal:n +\__deprecation_old:Nnn \int_to_octal:n { \int_to_oct:n } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \ior_get_str:NN +\__deprecation_old_protected:Nnn \ior_get_str:NN { \ior_str_get:NN } { 2018-03-05 } -\__kernel_deprecation_error:Nnn \ior_list_streams: - { \ior_show_list: } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \ior_log_streams: - { \ior_log_list: } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \luatex_if_engine_p: +\__deprecation_old:Nnn \luatex_if_engine_p: { \sys_if_engine_luatex_p: } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \luatex_if_engine:F +\__deprecation_old:Nnn \luatex_if_engine:F { \sys_if_engine_luatex:F } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \luatex_if_engine:T +\__deprecation_old:Nnn \luatex_if_engine:T { \sys_if_engine_luatex:T } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \luatex_if_engine:TF +\__deprecation_old:Nnn \luatex_if_engine:TF { \sys_if_engine_luatex:TF } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \pdftex_if_engine_p: +\__deprecation_old:Nnn \pdftex_if_engine_p: { \sys_if_engine_pdftex_p: } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \pdftex_if_engine:F +\__deprecation_old:Nnn \pdftex_if_engine:F { \sys_if_engine_pdftex:F } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \pdftex_if_engine:T +\__deprecation_old:Nnn \pdftex_if_engine:T { \sys_if_engine_pdftex:T } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \pdftex_if_engine:TF +\__deprecation_old:Nnn \pdftex_if_engine:TF { \sys_if_engine_pdftex:TF } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \prop_get:cn +\__deprecation_old:Nnn \prop_get:cn { \prop_item:cn } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \prop_get:Nn +\__deprecation_old:Nnn \prop_get:Nn { \prop_item:Nn } { 2016-01-05 } -\__kernel_deprecation_error:Nnn \quark_if_recursion_tail_break:N +\__deprecation_old:Nnn \quark_if_recursion_tail_break:N { } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \quark_if_recursion_tail_break:n +\__deprecation_old:Nnn \quark_if_recursion_tail_break:n { } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \scan_align_safe_stop: +\__deprecation_old:Nnn \scan_align_safe_stop: { protected~commands } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \sort_ordered: - { \sort_return_same: } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \sort_reversed: - { \sort_return_swapped: } { 2018-12-27 } -\__kernel_deprecation_error:Nnn \str_case:nnn +\__deprecation_old:Nnn \str_case:nnn { \str_case:nnF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \str_case:onn +\__deprecation_old:Nnn \str_case:onn { \str_case:onF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \str_case_x:nnn +\__deprecation_old:Nnn \str_case_x:nnn { \str_case_e:nnF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \tl_case:cnn +\__deprecation_old:Nnn \tl_case:cnn { \tl_case:cnF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \tl_case:Nnn +\__deprecation_old:Nnn \tl_case:Nnn { \tl_case:NnF } { 2015-07-14 } -\__kernel_deprecation_error:Nnn \tl_to_lowercase:n +\__deprecation_old_protected:Nnn \tl_to_lowercase:n { \tex_lowercase:D } { 2018-03-05 } -\__kernel_deprecation_error:Nnn \tl_to_uppercase:n +\__deprecation_old_protected:Nnn \tl_to_uppercase:n { \tex_uppercase:D } { 2018-03-05 } -\__kernel_deprecation_error:Nnn \token_new:Nn - { \cs_new_eq:NN } { 2018-12-29 } -\__kernel_deprecation_error:Nnn \xetex_if_engine_p: +\__deprecation_old:Nnn \xetex_if_engine_p: { \sys_if_engine_xetex_p: } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \xetex_if_engine:F +\__deprecation_old:Nnn \xetex_if_engine:F { \sys_if_engine_xetex:F } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \xetex_if_engine:T +\__deprecation_old:Nnn \xetex_if_engine:T { \sys_if_engine_xetex:T } { 2017-01-01 } -\__kernel_deprecation_error:Nnn \xetex_if_engine:TF +\__deprecation_old:Nnn \xetex_if_engine:TF { \sys_if_engine_xetex:TF } { 2017-01-01 } \cs_new_protected:Npn \__deprecation_primitive:NN #1#2 { } \exp_last_unbraced:NNNNo @@ -27913,7 +27834,7 @@ \__deprecation_primitive:w { \cs_to_str:N #2 } } } - { 2019-12-31 } + { 2020-01-01 } } \__kernel_primitives: } @@ -27928,13 +27849,318 @@ { \tex_let:D #2 #1 \cs_if_exist:cT { tex_ \cs_to_str:N #1 :D } + { \cs_set_eq:Nc #2 { tex_ \cs_to_str:N #1 :D } } + } + \__kernel_primitives: + } +\__kernel_patch_deprecation:nnNNpn + { 2019-01-01 } { \box_resize_to_wd_and_ht_plus_dp:Nnn } +\cs_new_protected:Npn \box_resize:Nnn + { \box_resize_to_wd_and_ht_plus_dp:Nnn } +\__kernel_patch_deprecation:nnNNpn + { 2019-01-01 } { \box_resize_to_wd_and_ht_plus_dp:cnn } +\cs_new_protected:Npn \box_resize:cnn + { \box_resize_to_wd_and_ht_plus_dp:cnn } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \box_use_drop:N } +\cs_new_protected:Npn \box_use_clear:N { \box_use_drop:N } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \box_use_drop:c } +\cs_new_protected:Npn \box_use_clear:c { \box_use_drop:c } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \box_set_eq_drop:N } +\cs_new_protected:Npn \box_set_eq_clear:NN #1#2 + { \tex_setbox:D #1 \tex_box:D #2 } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \box_gset_eq_drop:N } +\cs_new_protected:Npn \box_gset_eq_clear:NN #1#2 + { \tex_global:D \tex_setbox:D #1 \tex_box:D #2 } +\cs_generate_variant:Nn \box_set_eq_clear:NN { c , Nc , cc } +\cs_generate_variant:Nn \box_gset_eq_clear:NN { c , Nc , cc } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \hbox_unpack_drop:N } +\cs_new_protected:Npn \hbox_unpack_clear:N + { \hbox_unpack_drop:N } +\cs_generate_variant:Nn \hbox_unpack_clear:N { c } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \vbox_unpack_drop:N } +\cs_new_protected:Npn \vbox_unpack_clear:N + { \vbox_unpack_drop:N } +\cs_generate_variant:Nn \vbox_unpack_clear:N { c } +\__kernel_deprecation_code:nn + { + \tex_let:D \g_file_current_name_tl \scan_stop: + \__kernel_deprecation_error:Nnn \g_file_current_name_tl + { \g_file_curr_name_str } { 2019-01-01 } + } + { + \tex_let:D \g_file_current_name_tl \scan_stop: + \cs_set_nopar:Npn \g_file_current_name_tl { \g_file_curr_name_str } + } +\__deprecation_not_yet_deprecated:nTF { 2019-01-01 } + { + \tl_new:N \g_file_current_name_tl + \tl_gset:Nn \g_file_current_name_tl { \g_file_curr_name_str } + } + { + \cs_gset_nopar:Npn \g_file_current_name_tl + { + \__kernel_msg_expandable_error:nnnnn + { kernel } { deprecated-command } + { 2019-01-01 } { \g_file_current_name_tl } { \g_file_curr_name_str } + } + } +\__kernel_patch_deprecation:nnNNpn + { 2019-01-01 } { \seq_put_right:Nn \l_file_search_path_seq } +\cs_new_protected:Npn \file_path_include:n #1 + { + \__kernel_file_name_sanitize:nN {#1} \l__file_full_name_str + \seq_if_in:NVF \l_file_search_path_seq \l__file_full_name_str + { \seq_put_right:NV \l_file_search_path_seq \l__file_full_name_str } + } +\__kernel_patch_deprecation:nnNNpn + { 2019-01-01 } { \seq_remove_all:Nn \l_file_search_path_seq } +\cs_new_protected:Npn \file_path_remove:n #1 + { + \__kernel_file_name_sanitize:nN {#1} \l__file_full_name_str + \seq_remove_all:NV \l_file_search_path_seq \l__file_full_name_str + } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \file_get_full_name:nN } +\cs_new_protected:Npn \file_add_path:nN #1#2 + { + \file_get_full_name:nN {#1} #2 + \str_if_empty:NT #2 + { \tl_set:Nn #2 { \q_no_value } } + } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \file_log_list: } +\cs_new_protected:Npn \file_list: { \file_log_list: } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \ior_show_list: } +\cs_new_protected:Npn \ior_list_streams: { \ior_show_list: } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \ior_log_list: } +\cs_new_protected:Npn \ior_log_streams: { \ior_log_list: } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \iow_show_list: } +\cs_new_protected:Npn \iow_list_streams: { \iow_show_list: } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \iow_log_list: } +\cs_new_protected:Npn \iow_log_streams: { \iow_log_list: } +\int_const:Nn \c__deprecation_minus_one { -1 } +\__kernel_deprecation_code:nn + { + \tex_let:D \c_minus_one \scan_stop: + \__kernel_deprecation_error:Nnn \c_minus_one { -1 } { 2019-01-01 } + } + { + \tex_let:D \c_minus_one \scan_stop: + \cs_set_eq:NN \c_minus_one \c__deprecation_minus_one + } +\__deprecation_not_yet_deprecated:nTF { 2019-01-01 } + { \cs_new_eq:NN \c_minus_one \c__deprecation_minus_one } + { + \cs_gset_nopar:Npn \c_minus_one + { + \__kernel_msg_expandable_error:nnnnn + { kernel } { deprecated-command } + { 2019-01-01 } { \c_minus_one } { -1 } + \c__deprecation_minus_one + } + } +\cs_new_protected:Npn \__int_deprecated_constants:nn #1#2 + { + #1 \c_zero { 0 } #2 + #1 \c_one { 1 } #2 + #1 \c_two { 2 } #2 + #1 \c_three { 3 } #2 + #1 \c_four { 4 } #2 + #1 \c_five { 5 } #2 + #1 \c_six { 6 } #2 + #1 \c_seven { 7 } #2 + #1 \c_eight { 8 } #2 + #1 \c_nine { 9 } #2 + #1 \c_ten { 10 } #2 + #1 \c_eleven { 11 } #2 + #1 \c_twelve { 12 } #2 + #1 \c_thirteen { 13 } #2 + #1 \c_fourteen { 14 } #2 + #1 \c_fifteen { 15 } #2 + #1 \c_sixteen { 16 } #2 + #1 \c_thirty_two { 32 } #2 + #1 \c_one_hundred { 100 } #2 + #1 \c_two_hundred_fifty_five { 255 } #2 + #1 \c_two_hundred_fifty_six { 256 } #2 + #1 \c_one_thousand { 1000 } #2 + #1 \c_ten_thousand { 10000 } #2 + } +\__int_deprecated_constants:nn { \int_const:Nn } { } +\__kernel_deprecation_code:nn + { + \__int_deprecated_constants:nn + { \exp_after:wN \__kernel_deprecation_error:Nnn \exp_not:N } + { { 2020-01-01 } } + } + { + \__int_deprecated_constants:nn + { + \exp_after:wN \use:nnn + \exp_after:wN \__int_constdef:Nw \exp_not:N + } + { \exp_stop_f: } + } +\cs_new_eq:NN \__int_value:w \int_value:w +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \lua_now:e } +\cs_new:Npn \lua_now_x:n #1 { \__lua_now:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \lua_escape:e } +\cs_new:Npn \lua_escape_x:n #1 { \__lua_escape:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \lua_shipout_e:n } +\cs_new_protected:Npn \lua_shipout_x:n #1 { \__lua_shipout:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \iow_log:n } +\cs_new_protected:Npn \msg_log:n #1 + { + \iow_log:n { ................................................. } + \iow_wrap:nnnN { . ~ #1} { . ~ } { } \iow_log:n + \iow_log:n { ................................................. } + } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \iow_term:n } +\cs_new_protected:Npn \msg_term:n #1 + { + \iow_term:n { ************************************************* } + \iow_wrap:nnnN { * ~ #1} { * ~ } { } \iow_term:n + \iow_term:n { ************************************************* } + } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { [Defined~error~message] } +\cs_new_protected:Npn \msg_interrupt:nnn #1#2#3 + { + \tl_if_empty:nTF {#3} + { + \__msg_old_interrupt_wrap:nn { \\ \c__msg_no_info_text_tl } + {#1 \\\\ #2 \\\\ \c__msg_continue_text_tl } + } + { + \__msg_old_interrupt_wrap:nn { \\ #3 } + {#1 \\\\ #2 \\\\ \c__msg_help_text_tl } + } + } +\cs_new_protected:Npn \__msg_old_interrupt_wrap:nn #1#2 + { + \iow_wrap:nnnN {#1} { | ~ } { } \__msg_old_interrupt_more_text:n + \iow_wrap:nnnN {#2} { ! ~ } { } \__msg_old_interrupt_text:n + } +\cs_new_protected:Npn \__msg_old_interrupt_more_text:n #1 + { + \exp_args:Nx \tex_errhelp:D + { + |''''''''''''''''''''''''''''''''''''''''''''''' + #1 \iow_newline: + |............................................... + } + } +\group_begin: + \char_set_lccode:nn {`\{} {`\ } + \char_set_lccode:nn {`\}} {`\ } + \char_set_lccode:nn {`\&} {`\!} + \char_set_catcode_active:N \& +\tex_lowercase:D + { + \group_end: + \cs_new_protected:Npn \__msg_old_interrupt_text:n #1 + { + \iow_term:x + { + \iow_newline: + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + \iow_newline: + ! + } + \__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J } { - \exp_args:NNc \cs_set_eq:NN #2 - { tex_ \cs_to_str:N #1 :D } + \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 } + { + \group_begin: + \cs_set_protected:Npn & + { + \tex_errmessage:D + { + #1 + \use_none:n + { ............................................ } + } + } + \exp_after:wN + \group_end: + & + } } } - \__kernel_primitives: } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \prg_break_point:Nn } +\cs_new:Npn \__prg_break_point:Nn { \prg_break_point:Nn } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \prg_break_point: } +\cs_new:Npn \__prg_break_point: { \prg_break_point: } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \prg_map_break:Nn } +\cs_new:Npn \__prg_map_break:Nn #1 \__prg_break_point:Nn + { \prg_map_break:Nn #1 \prg_break_point:Nn } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \prg_break: } +\cs_new:Npn \__prg_break: #1 \__prg_break_point: { } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \prg_break:n } +\cs_new:Npn \__prg_break:n #1#2 \__prg_break_point: {#1} +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \sort_return_same: } +\cs_new_protected:Npn \sort_ordered: { \sort_return_same: } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \sort_return_swapped: } +\cs_new_protected:Npn \sort_reversed: { \sort_return_swapped: } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_case_e:nn } +\cs_new:Npn \str_case_x:nn { \str_case_e:nn } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_case_e:nnT } +\cs_new:Npn \str_case_x:nnT { \str_case_e:nnT } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_case_e:nnF } +\cs_new:Npn \str_case_x:nnF { \str_case_e:nnF } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_case_e:nnTF } +\cs_new:Npn \str_case_x:nnTF { \str_case_e:nnTF } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_if_eq_p:ee } +\cs_new:Npn \str_if_eq_x_p:nn { \str_if_eq_p:ee } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_if_eq:eeT } +\cs_new:Npn \str_if_eq_x:nnT { \str_if_eq:eeT } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_if_eq:eeF } +\cs_new:Npn \str_if_eq_x:nnF { \str_if_eq:eeF } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_if_eq:eeTF } +\cs_new:Npn \str_if_eq_x:nnTF { \str_if_eq:eeTF } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \file_get:nnN } +\cs_new_protected:Npn \tl_set_from_file:Nnn #1#2#3 + { \file_get:nnN {#3} {#2} #1 } +\cs_generate_variant:Nn \tl_set_from_file:Nnn { c } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \file_get:nnN } +\cs_new_protected:Npn \tl_gset_from_file:Nnn #1#2#3 + { + \group_begin: + \file_get:nnN {#3} {#2} \l__tl_internal_a_tl + \tl_gset_eq:NN #1 \l__tl_internal_a_tl + \group_end: + } +\cs_generate_variant:Nn \tl_gset_from_file:Nnn { c } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \file_get:nnN } +\cs_new_protected:Npn \tl_set_from_file_x:Nnn #1#2#3 + { + \group_begin: + \file_get:nnN {#3} {#2} \l__tl_internal_a_tl + #2 \scan_stop: + \tl_set:Nx \l__tl_internal_a_tl { \l__tl_internal_a_tl } + \exp_args:NNNo \group_end: + \tl_set:Nn #1 \l__tl_internal_a_tl + } +\cs_generate_variant:Nn \tl_set_from_file_x:Nnn { c } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \file_get:nnN } +\cs_new_protected:Npn \tl_gset_from_file_x:Nnn #1#2#3 + { + \group_begin: + \file_get:nnN {#3} {#2} \l__tl_internal_a_tl + #2 \scan_stop: + \tl_gset:Nx #1 { \l__tl_internal_a_tl } + \group_end: + } +\cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \tl_analysis_show:N } +\cs_new_protected:Npn \tl_show_analysis:N { \tl_analysis_show:N } +\__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \tl_analysis_show:n } +\cs_new_protected:Npn \tl_show_analysis:n { \tl_analysis_show:n } +\__kernel_patch_deprecation:nnNNpn { 2019-01-01 } { \cs_new_eq:NN } +\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \cs_prefix_spec:N } +\cs_new:Npn \token_get_prefix_spec:N { \cs_prefix_spec:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \cs_argument_spec:N } +\cs_new:Npn \token_get_arg_spec:N { \cs_argument_spec:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \cs_replacement_spec:N } +\cs_new:Npn \token_get_replacement_spec:N { \cs_replacement_spec:N } %% %% %% End of file `expl3-code.tex'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index e7d654d6a8a..ee02f8c923b 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{2019-02-15}% +\def\ExplFileDate{2019-03-05}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \def\tempa{LaTeX2e}% @@ -57,6 +57,7 @@ \noexpand\undefined }% \catcode64=11 % +\chardef \l@expl@undo@recent@deprecations@bool = 0 % \chardef \l@expl@check@declarations@bool = 0 % \chardef \l@expl@log@functions@bool = 0 % \chardef \l@expl@enable@debug@bool = 0 % diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index d769fe86182..d6a741242d5 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{2019-02-15}% +\def\ExplFileDate{2019-03-05}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% @@ -34,6 +34,8 @@ \newcommand*#2{}% \chardef #2=0 % }% +\expl@create@bool@option + {undo-recent-deprecations}\l@expl@undo@recent@deprecations@bool \expl@create@bool@option{check-declarations}\l@expl@check@declarations@bool \expl@create@bool@option{log-functions}\l@expl@log@functions@bool \expl@create@bool@option{enable-debug}\l@expl@enable@debug@bool @@ -78,11 +80,6 @@ \expandafter\ifx\csname tex\string _let:D\endcsname\relax \expandafter\endinput \fi -\AtBeginDocument - { - \cs_if_exist:NF \color - { \DeclareRobustCommand \color [2] [ ] { } } - } \__kernel_msg_new:nnnn { expl } { wrong-driver } { Driver~request~inconsistent~with~engine:~using~'#2'~driver. } { @@ -212,6 +209,7 @@ } \keys_define:nn { expl } { + undo-recent-deprecations .bool_set:N = \l@expl@undo@recent@deprecations@bool, check-declarations .bool_set:N = \l@expl@check@declarations@bool, log-functions .bool_set:N = \l@expl@log@functions@bool } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index cf71077feaf..ed111045fbf 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -58,6 +58,7 @@ \bool_new:N \g__codedoc_checktest_bool \bool_new:N \g__codedoc_kernel_bool \bool_new:N \g__codedoc_cs_break_bool +\bool_new:N \g__codedoc_show_notes_bool \bool_gset_true:N \g__codedoc_cs_break_bool \tl_new:N \l__codedoc_tmpa_tl \tl_new:N \l__codedoc_tmpb_tl @@ -424,6 +425,10 @@ { \bool_gset_false:N \g__codedoc_cs_break_bool } \DeclareOption { cs-break-nohyphen } { \PassOptionsToPackage{nohyphen}{underscore} } +\DeclareOption { show-notes } + { \bool_gset_true:N \g__codedoc_show_notes_bool } +\DeclareOption { hide-notes } + { \bool_gset_false:N \g__codedoc_show_notes_bool } \DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } } \ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default } \PassOptionsToClass { a4paper } { article } @@ -650,6 +655,7 @@ \NewDocumentCommand { \CodedocExplainEXP } { } { \raisebox{\baselineskip}[0pt][0pt]{\hypertarget{expstar}{}}% + \write \@auxout { \def \string \Codedoc@expstar { } } \__codedoc_typeset_exp:\ indicates~fully~expandable~functions,~which~ can~be~used~within~an~\texttt{x}-type~argument~(in~plain~ \TeX{}~terms,~inside~an~\cs{edef}),~as~well~as~within~an~ @@ -658,6 +664,7 @@ \NewDocumentCommand { \CodedocExplainREXP } { } { \raisebox{\baselineskip}[0pt][0pt]{\hypertarget{rexpstar}{}}% + \write \@auxout { \def \string \Codedoc@rexpstar { } } \__codedoc_typeset_rexp:\ indicates~ restricted~expandable~functions,~which~can~be~used~within~an~ \texttt{x}-type~argument~but~cannot~be~fully~expanded~within~an~ @@ -666,6 +673,7 @@ \NewDocumentCommand { \CodedocExplainTF } { } { \raisebox{\baselineskip}[0pt][0pt]{\hypertarget{explTF}{}}% + \write \@auxout { \def \string \Codedoc@explTF { } } \__codedoc_typeset_TF:\ indicates~conditional~(\texttt{if})~functions~ whose~variants~with~\texttt{T},~\texttt{F}~and~\texttt{TF}~ argument~specifiers~expect~different~ @@ -765,18 +773,30 @@ \ensuremath \rangle } \cs_new_protected:Npn \__codedoc_typeset_exp: - { \hyperlink{expstar} {$\star$} } + { + \cs_if_exist:NTF \Codedoc@expstar + { \hyperlink { expstar } } + { \mbox } + {$\star$} + } \cs_new_protected:Npn \__codedoc_typeset_rexp: - { \hyperlink{rexpstar} {\ding{73}} } % hollow star + { + \cs_if_exist:NTF \Codedoc@rexpstar + { \hyperlink { rexpstar } } + { \mbox } + { \ding { 73 } } % hollow star + } \cs_new_protected:Npn \__codedoc_typeset_TF: { - \hyperlink{explTF} + \cs_if_exist:NTF \Codedoc@explTF + { \hyperlink { explTF } } + { \mbox } { \color{black} \itshape TF \makebox[0pt][r] { - \color{red} + \cs_if_exist:NT \Codedoc@explTF { \color{red} } \underline { \phantom{\itshape TF} \kern-0.1em } } } @@ -997,7 +1017,7 @@ { \__codedoc_date_set:Nn #1 {#2} \exp_args:No \__codedoc_date_compare:nNnT - {#1} > { \tex_year:D - \tex_month:D - \tex_day:D } + {#1} > { \c_sys_year_int - \c_sys_month_int - \c_sys_day_int } { \msg_error:nnxx { l3doc } { future-date } { \tl_to_str:N \l__codedoc_macro_argument_tl } @@ -1008,7 +1028,7 @@ { \__codedoc_date_set:Nn \l__codedoc_tmpa_tl {#1} \exp_args:No \__codedoc_date_compare:nNnT - { \l__codedoc_tmpa_tl } < { \tex_year:D - \tex_month:D - \tex_day:D } + { \l__codedoc_tmpa_tl } < { \c_sys_year_int - \c_sys_month_int - \c_sys_day_int } { \msg_error:nnxx { l3doc } { deprecated-function } { \tl_to_str:N \l__codedoc_macro_argument_tl } @@ -1042,6 +1062,7 @@ \cs_new_protected:Npn \__codedoc_function_typeset_stop: { \par + \dim_set:Nn \prevdepth { \box_dp:N \l__codedoc_descr_coffin } \allowbreak } \cs_new_protected:Npn \__codedoc_function_init: @@ -1670,6 +1691,31 @@ }{ \par\end{trivlist} } +\bool_if:NTF \g__codedoc_show_notes_bool + { + \NewDocumentCommand\NB{mm} + { + (\emph{Note}\footnote{\ttfamily [#1]:~\detokenize{#2}}) + } + } + { + \NewDocumentCommand\NB{mm}{} + } +\bool_if:NTF \g__codedoc_show_notes_bool + { + \NewDocumentEnvironment{NOTE}{m} + { + \par\noindent (\emph{Note}~[\texttt{#1}]:\par + \verbatim + } + { + \endverbatim + \par\noindent \emph{Note~end})\par + } + } + { + \NewDocumentEnvironment{NOTE}{m}{\comment}{\endcomment} + } \newenvironment{TemplateInterfaceDescription}[1] { \subsection{The~object~type~`#1'} @@ -1891,7 +1937,7 @@ \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl \tl_gset:Nn \g__codedoc_module_name_tl {#2} - \tl_put_right:Nn \l__codedoc_tmpa_tl { < @ @ = #2 > } + \tl_put_right:Nn \l__codedoc_tmpa_tl { < \text { \verbatim@font @ @ = #2 } > } \tl_set:Nn \l__codedoc_tmpb_tl {#3} \__codedoc_detect_internals:N \l__codedoc_tmpb_tl diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index 9c6af22ed72..f0b91117adb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx \ProvidesExplFile - {l3dvipdfmx.def}{2019-02-15}{} + {l3dvipdfmx.def}{2019-03-05}{} {L3 Experimental driver: dvipdfmx} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index dd10a02d9f9..a8719c0ded7 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx \ProvidesExplFile - {l3dvips.def}{2019-02-15}{} + {l3dvips.def}{2019-03-05}{} {L3 Experimental driver: dvips} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def index b6abca2dd71..c5f50b3138c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx \ProvidesExplFile - {l3dvisvgm.def}{2019-02-15}{} + {l3dvisvgm.def}{2019-03-05}{} {L3 Experimental driver: dvisvgm} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index 997a498f6f6..5e92232db36 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx \ProvidesExplFile - {l3pdfmode.def}{2019-02-15}{} + {l3pdfmode.def}{2019-03-05}{} {L3 Experimental driver: PDF mode} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def index 2684228d0c7..e27e4235ea5 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx \ProvidesExplFile - {l3xdvipdfmx.def}{2019-02-15}{} + {l3xdvipdfmx.def}{2019-03-05}{} {L3 Experimental driver: xdvipdfmx} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty index 313a87f39e9..f1b0e45e22b 100644 --- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty @@ -6,7 +6,7 @@ %% %% l3keys2e.dtx (with options: `package') %% -%% Copyright (C) 2009-2017 The LaTeX3 Project +%% Copyright (C) 2009-2019 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,7 +18,7 @@ %% This file is part of the "l3packages bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: l3keys2e.dtx (C) Copyright 2009,2011-2018 The LaTeX3 Project +%% File: l3keys2e.dtx \RequirePackage{expl3}[2018/02/21] \@ifpackagelater{expl3}{2018/02/21} {} @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{l3keys2e}{2018-10-17}{} +\ProvidesExplPackage{l3keys2e}{2019-03-05}{} {LaTeX2e option processing using LaTeX3 keys} \cs_generate_variant:Nn \clist_put_right:Nn { Nv } \cs_generate_variant:Nn \keys_if_exist:nnT { nx } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty index a7d23a886ac..4d6e3a626a4 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty @@ -6,7 +6,7 @@ %% %% xfp.dtx (with options: `package') %% -%% Copyright (C) 2017 The LaTeX3 Project +%% Copyright (C) 2017-2019 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,7 +18,7 @@ %% This file is part of the "l3packages bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: xfp.dtx (C) Copyright 2017-2018 The LaTeX3 Project +%% File: xfp.dtx \RequirePackage{expl3}[2018/02/21] \@ifpackagelater{expl3}{2018/02/21} {} @@ -33,7 +33,7 @@ \endinput } \RequirePackage{xparse} -\ProvidesExplPackage{xfp}{2018-10-17}{} +\ProvidesExplPackage{xfp}{2019-03-05}{} {L3 Floating point unit} \NewExpandableDocumentCommand \fpeval { m } { \fp_eval:n {#1} } \NewExpandableDocumentCommand \inteval { m } { \int_eval:n {#1} } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty index 3d9c05410ca..baa729d56af 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty @@ -6,7 +6,7 @@ %% %% xfrac.dtx (with options: `package') %% -%% Copyright (C) 2011-2017 The LaTeX3 Project +%% Copyright (C) 2011-2019 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,8 +18,7 @@ %% This file is part of the "l3packages bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: xfrac.dtx Copyright (C) 2004, 2008-2010 Morten Hoegholm -%% (C) 2011,2012,2014-2018 The LaTeX3 Project +%% File: xfrac.dtx \RequirePackage{expl3}[2018/02/21] \@ifpackagelater{expl3}{2018/02/21} {} @@ -34,7 +33,7 @@ \endinput } \RequirePackage{amstext,graphicx,l3keys2e,textcomp,xparse,xtemplate} -\ProvidesExplPackage{xfrac}{2018-10-17}{} +\ProvidesExplPackage{xfrac}{2019-03-05}{} {L3 Experimental split-level fractions} \keys_define:nn { xfrac } { diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index df25d3823f7..91b35fd7c7b 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty @@ -6,7 +6,7 @@ %% %% xparse.dtx (with options: `package') %% -%% Copyright (C) 2009-2017 The LaTeX3 Project +%% Copyright (C) 2009-2019 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,11 +18,7 @@ %% This file is part of the "l3packages bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: xparse.dtx (C) Copyright 1999 Frank Mittelbach, Chris Rowley, -%% David Carlisle -%% (C) Copyright 2004-2008 Frank Mittelbach, -%% The LaTeX3 Project -%% (C) Copyright 2009-2018 The LaTeX3 Project +%% File: xparse.dtx \RequirePackage{expl3}[2018-04-12] \@ifpackagelater{expl3}{2018-04-12} {} @@ -36,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{xparse}{2018-10-17}{} +\ProvidesExplPackage{xparse}{2019-03-05}{} {L3 Experimental document command parser} \tl_new:N \l__xparse_arg_spec_tl \tl_new:N \l__xparse_args_tl @@ -46,6 +42,7 @@ \bool_new:N \l__xparse_defaults_bool \tl_new:N \l__xparse_defaults_tl \bool_new:N \l__xparse_environment_bool +\str_new:N \l__xparse_environment_str \bool_new:N \l__xparse_expandable_bool \tl_new:N \l__xparse_expandable_aux_name_tl \tl_set:Nn \l__xparse_expandable_aux_name_tl @@ -62,11 +59,11 @@ \tl_new:N \l__xparse_last_delimiters_tl \bool_new:N \l__xparse_long_bool \int_new:N \l__xparse_m_args_int -\int_new:N \l__xparse_mandatory_args_int \bool_new:N \l__xparse_prefixed_bool \tl_new:N \l__xparse_process_all_tl \tl_new:N \l__xparse_process_one_tl \bool_new:N \l__xparse_process_some_bool +\tl_new:N \l__xparse_saved_args_tl \tl_new:N \l__xparse_signature_tl \bool_new:N \l__xparse_some_obey_spaces_bool \bool_new:N \l__xparse_some_long_bool @@ -85,7 +82,7 @@ \bool_set_true:N \l__xparse_expandable_bool \__xparse_declare_cmd_aux:Nnn } -\cs_new_protected:Npn \__xparse_declare_cmd_aux:Nnn #1#2 +\cs_new_protected:Npn \__xparse_declare_cmd_aux:Nnn #1#2#3 { \cs_if_exist:NTF #1 { @@ -104,17 +101,20 @@ { \token_to_str:N #1 } { \tl_to_str:n {#2} } } \bool_set_false:N \l__xparse_environment_bool - \__xparse_declare_cmd_internal:Nnn #1 {#2} + \__xparse_declare_cmd_internal:Nnnn #1 {#2} {#3} { } } -\cs_new_protected:Npn \__xparse_declare_cmd_internal:Nnn #1#2#3 +\cs_new_protected:Npn \__xparse_declare_cmd_internal:Nnnn #1#2#3#4 { \tl_set:Nx \l__xparse_function_tl { \cs_to_str:N #1 } + \tl_set:Nx \l__xparse_fn_tl + { \exp_not:c { \l__xparse_function_tl \c_space_tl } } \__xparse_normalize_arg_spec:n {#2} \exp_args:No \__xparse_prepare_signature:n \l__xparse_arg_spec_tl \__xparse_declare_cmd_code:Nnn #1 {#2} {#3} + #4 \__xparse_break_point:n {#2} } -\cs_generate_variant:Nn \__xparse_declare_cmd_internal:Nnn { cnx } +\cs_generate_variant:Nn \__xparse_declare_cmd_internal:Nnnn { cnx } \cs_new_eq:NN \__xparse_break_point:n \use_none:n \cs_new_protected:Npn \__xparse_declare_cmd_code:Nnn { @@ -129,10 +129,16 @@ \cs_set_protected:Npn \l__xparse_current_arg_int {#3} \cs_set_protected_nopar:Npx #1 { - \__xparse_start:nNNnnn - { \exp_not:n {#2} } - \exp_not:c { \l__xparse_function_tl \c_space_tl } - \exp_not:c { \l__xparse_function_tl \c_space_tl code } + \bool_if:NTF \l__xparse_environment_bool + { + \__xparse_start_env:nnnnn { \exp_not:n {#2} } + { \l__xparse_environment_str } + } + { + \__xparse_start:nNNnnn { \exp_not:n {#2} } + \exp_not:c { \l__xparse_function_tl \c_space_tl } + \exp_not:c { \l__xparse_function_tl \c_space_tl code } + } { \exp_not:o \l__xparse_signature_tl } { \bool_if:NT \l__xparse_defaults_bool @@ -192,22 +198,26 @@ } \cs_new_protected:Npn \__xparse_declare_env:nnnn #1#2 { - \cs_if_exist:cTF {#1} + \str_set:Nx \l__xparse_environment_str {#1} + \str_set:Nx \l__xparse_environment_str + { \tl_trim_spaces:o { \l__xparse_environment_str } } + \cs_if_exist:cTF { \l__xparse_environment_str } { \__kernel_msg_info:nnxx { xparse } { redefine-environment } - {#1} { \tl_to_str:n {#2} } + { \l__xparse_environment_str } { \tl_to_str:n {#2} } } { \__kernel_msg_info:nnxx { xparse } { define-environment } - {#1} { \tl_to_str:n {#2} } + { \l__xparse_environment_str } { \tl_to_str:n {#2} } } \bool_set_false:N \l__xparse_expandable_bool \bool_set_true:N \l__xparse_environment_bool - \__xparse_declare_env_internal:nnnn {#1} {#2} + \exp_args:NV \__xparse_declare_env_internal:nnnn + \l__xparse_environment_str {#2} } \cs_new_protected:Npn \__xparse_declare_env_internal:nnnn #1#2#3#4 { - \__xparse_declare_cmd_internal:cnx { environment~ #1 } {#2} + \__xparse_declare_cmd_internal:cnxn { environment~ #1 } {#2} { \cs_set_nopar:Npx \exp_not:c { environment~ #1 ~end~aux } { @@ -216,28 +226,42 @@ } \exp_not:n {#3} } - \cs_set_nopar:cpx { environment~ #1 ~end } - { \exp_not:c { environment~ #1 ~end~aux } } - \cs_generate_from_arg_count:cNnn - { environment~ #1 ~end~aux~ } \cs_set:Npn - \l__xparse_current_arg_int {#4} - \cs_set_eq:cc {#1} { environment~ #1 } - \cs_set_eq:cc { end #1 } { environment~ #1 ~end } + { + \cs_set_nopar:cpx { environment~ #1 ~end } + { \exp_not:c { environment~ #1 ~end~aux } } + \cs_generate_from_arg_count:cNnn + { environment~ #1 ~end~aux~ } \cs_set:Npn + \l__xparse_current_arg_int {#4} + \cs_set_eq:cc {#1} { environment~ #1 } + \cs_set_eq:cc { end #1 } { environment~ #1 ~end } + } + } +\cs_new_protected:Npn \__xparse_start_env:nnnnn #1#2 + { + \str_set:Nn \l__xparse_environment_str {#2} + \bool_set_true:N \l__xparse_environment_bool + \__xparse_start_aux:ccnnnn + { environment~ \l__xparse_environment_str \c_space_tl } + { environment~ \l__xparse_environment_str \c_space_tl code } + {#1} } -\cs_new_protected:Npx \__xparse_start:nNNnnn +\cs_new_protected:Npx \__xparse_start:nNNnnn #1#2#3 { \exp_not:c { xparse~function~is~not~expandable } - \exp_not:N \__xparse_start_aux:nNNnnn + \exp_not:n { \bool_set_false:N \l__xparse_environment_bool } + \exp_not:N \__xparse_start_aux:NNnnnn + #2 #3 {#1} } -\cs_new_protected:Npn \__xparse_start_aux:nNNnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \__xparse_start_aux:NNnnnn #1#2#3#4#5#6 { \tl_clear:N \l__xparse_args_tl - \tl_set:Nn \l__xparse_fn_tl {#2} - \tl_set:Nn \l__xparse_fn_code_tl {#3} + \tl_set:Nn \l__xparse_fn_tl {#1} + \tl_set:Nn \l__xparse_fn_code_tl {#2} \tl_set:Nn \l__xparse_defaults_tl {#5} \tl_set:Nn \l__xparse_process_all_tl {#6} #4 \__xparse_run_code: } +\cs_generate_variant:Nn \__xparse_start_aux:NNnnnn { cc } \cs_new_protected:Npn \__xparse_run_code: { \tl_if_empty:NF \l__xparse_defaults_tl { \__xparse_defaults: } @@ -266,7 +290,7 @@ \cs_new_protected:Npn \__xparse_defaults_error:w \q_recursion_stop { \__kernel_msg_error:nnx { xparse } { loop-in-defaults } - { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } + { \__xparse_environment_or_command: } } \cs_new_protected:Npn \__xparse_defaults_def: { @@ -329,8 +353,9 @@ \__xparse_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3 { } { } { } { } { } { } { } { } { } { } { - \__kernel_msg_expandable_error:nnn - { xparse } { loop-in-defaults } {#4} + \__kernel_msg_expandable_error:nnf + { xparse } { loop-in-defaults } + { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } } \use_iv:nnnn } \q_stop @@ -358,7 +383,6 @@ { #2 \__xparse_end_expandable_defaults:nnnNNn { #3 {#1} } } \cs_new_protected:Npn \__xparse_normalize_arg_spec:n #1 { - \int_zero:N \l__xparse_mandatory_args_int \int_zero:N \l__xparse_current_arg_int \tl_clear:N \l__xparse_last_delimiters_tl \tl_clear:N \l__xparse_arg_spec_tl @@ -373,7 +397,7 @@ \int_compare:nNnT \l__xparse_current_arg_int > 9 { \__kernel_msg_error:nnxx { xparse } { too-many-arguments } - { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} } + { \__xparse_environment_or_command: } { \tl_to_str:n {#1} } \__xparse_bad_def:wn } \bool_if:NT \l__xparse_expandable_bool @@ -397,7 +421,7 @@ \cs_if_exist_use:cF { __xparse_normalize_type_ \tl_to_str:n {#1} :w } { \__kernel_msg_error:nnxx { xparse } { unknown-argument-type } - { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} } + { \__xparse_environment_or_command: } { \tl_to_str:n {#1} } \__xparse_bad_def:wn } } @@ -448,7 +472,7 @@ \bool_if:NT \l__xparse_long_bool { \__kernel_msg_error:nnxx { xparse } { two-markers } - { \iow_char:N \\ \l__xparse_function_tl } { + } + { \__xparse_environment_or_command: } { + } \__xparse_bad_def:wn } \bool_set_true:N \l__xparse_long_bool @@ -461,7 +485,7 @@ \bool_if:NT \l__xparse_obey_spaces_bool { \__kernel_msg_error:nnxx { xparse } { two-markers } - { \iow_char:N \\ \l__xparse_function_tl } { ! } + { \__xparse_environment_or_command: } { ! } \__xparse_bad_def:wn } \bool_set_true:N \l__xparse_obey_spaces_bool @@ -559,6 +583,23 @@ \__xparse_add_arg_spec_mandatory:n { v } \__xparse_normalize_arg_spec_loop:n } +\cs_new_protected:Npn \__xparse_normalize_type_b:w #1 + { + \bool_if:NF \l__xparse_environment_bool + { + \__kernel_msg_error:nnxx + { xparse } { invalid-command-arg } + { \__xparse_environment_or_command: } { b } + \__xparse_bad_def:wn + } + \tl_clear:N \l__xparse_last_delimiters_tl + \__xparse_add_arg_spec:n { b } + \quark_if_recursion_tail_stop:n {#1} + \__kernel_msg_error:nnxx { xparse } { arg-after-body } + { \__xparse_environment_or_command: } + { \tl_to_str:n {#1} } + \__xparse_bad_def:wn + } \cs_new_protected:Npn \__xparse_single_char_check:n #1 { \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nTF @@ -569,13 +610,13 @@ { \exp_args:No \tl_to_str:n { \use:nn #1 { } } } { \__kernel_msg_warning:nnxx { xparse } { not-single-char } - { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} } + { \__xparse_environment_or_command: } { \tl_to_str:n {#1} } } \group_end: } { \__kernel_msg_error:nnxx { xparse } { not-single-char } - { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} } + { \__xparse_environment_or_command: } { \tl_to_str:n {#1} } \__xparse_bad_def:wn } } @@ -617,7 +658,7 @@ \cs_new_protected:Npn \__xparse_bad_arg_spec:wn #1 \__xparse_break_point:n #2 { \__kernel_msg_error:nnxx { xparse } { bad-arg-spec } - { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#2} } + { \__xparse_environment_or_command: } { \tl_to_str:n {#2} } } \cs_new_protected:Npn \__xparse_bad_def:wn #1 \__xparse_break_point:n #2 { } \cs_new_protected:Npn \__xparse_add_arg_spec:n #1 @@ -651,10 +692,9 @@ \bool_if:NT \l__xparse_some_obey_spaces_bool { \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces } - { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} } + { \__xparse_environment_or_command: } { \tl_to_str:n {#1} } \__xparse_bad_def:wn } - \int_incr:N \l__xparse_mandatory_args_int \tl_clear:N \l__xparse_last_delimiters_tl \__xparse_add_arg_spec:n {#1} } @@ -710,11 +750,18 @@ \tl_put_left:Nn \l__xparse_process_one_tl { {#1} } \__xparse_prepare_signature_bypass:N } +\cs_new_protected:Npn \__xparse_add_type_b:w + { + \__xparse_flush_m_args: + \__xparse_add_default: + \__xparse_add_grabber:N b + \__xparse_prepare_signature:N + } \cs_new_protected:Npn \__xparse_add_type_D:w #1#2#3 { \__xparse_flush_m_args: \__xparse_add_default:n {#3} - \__xparse_add_grabber_optional:N D + \__xparse_add_grabber:N D \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 } \__xparse_prepare_signature:N } @@ -722,7 +769,7 @@ { \__xparse_flush_m_args: \__xparse_add_default_E:nn {#1} {#2} - \__xparse_add_grabber_optional:N E + \__xparse_add_grabber:N E \tl_put_right:Nn \l__xparse_signature_tl { {#1} } \__xparse_prepare_signature:N } @@ -730,21 +777,21 @@ { \__xparse_flush_m_args: \__xparse_add_default:n {#1} - \__xparse_add_grabber_optional:N G + \__xparse_add_grabber:N G \__xparse_prepare_signature:N } \cs_new_protected:Npn \__xparse_add_type_l:w { \__xparse_flush_m_args: \__xparse_add_default: - \__xparse_add_grabber_mandatory:N l + \__xparse_add_grabber:N l \__xparse_prepare_signature:N } \cs_new_protected:Npn \__xparse_add_type_m:w { \__xparse_add_default: \bool_if:NTF \l__xparse_prefixed_bool - { \__xparse_add_grabber_mandatory:N m } + { \__xparse_add_grabber:N m } { \int_incr:N \l__xparse_m_args_int } \__xparse_prepare_signature:N } @@ -752,7 +799,7 @@ { \__xparse_flush_m_args: \__xparse_add_default:n {#3} - \__xparse_add_grabber_mandatory:N R + \__xparse_add_grabber:N R \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 } \__xparse_prepare_signature:N } @@ -760,7 +807,7 @@ { \__xparse_flush_m_args: \__xparse_add_default: - \__xparse_add_grabber_optional:N t + \__xparse_add_grabber:N t \tl_put_right:Nn \l__xparse_signature_tl {#1} \__xparse_prepare_signature:N } @@ -768,7 +815,7 @@ { \__xparse_flush_m_args: \__xparse_add_default: - \__xparse_add_grabber_mandatory:N u + \__xparse_add_grabber:N u \tl_put_right:Nn \l__xparse_signature_tl { {#1} } \__xparse_prepare_signature:N } @@ -776,7 +823,7 @@ { \__xparse_flush_m_args: \exp_args:No \__xparse_add_default:n \c_novalue_tl - \__xparse_add_grabber_mandatory:N v + \__xparse_add_grabber:N v \__xparse_prepare_signature:N } \cs_new_protected:Npn \__xparse_flush_m_args: @@ -785,18 +832,12 @@ { \tl_put_right:Nx \l__xparse_signature_tl { \exp_not:c { __xparse_grab_m_ \int_use:N \l__xparse_m_args_int :w } } - \int_sub:Nn \l__xparse_mandatory_args_int { \l__xparse_m_args_int } \tl_put_right:Nx \l__xparse_process_all_tl { \prg_replicate:nn { \l__xparse_m_args_int } { { } } } } \int_zero:N \l__xparse_m_args_int } -\cs_new_protected:Npn \__xparse_add_grabber_mandatory:N #1 - { - \__xparse_add_grabber_optional:N #1 - \int_decr:N \l__xparse_mandatory_args_int - } -\cs_new_protected:Npn \__xparse_add_grabber_optional:N #1 +\cs_new_protected:Npn \__xparse_add_grabber:N #1 { \tl_put_right:Nx \l__xparse_signature_tl { @@ -967,6 +1008,33 @@ \cs_set_eq:NN #1 \__xparse_tmp:w \tl_set:Nn #2 {#1} } +\cs_new_protected:Npn \__xparse_grab_b:w + { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n } +\cs_new_protected:Npn \__xparse_grab_b_long:w + { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n } +\cs_new_protected:Npn \__xparse_grab_b_obey_spaces:w + { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n } +\cs_new_protected:Npn \__xparse_grab_b_long_obey_spaces:w + { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n } +\cs_new_protected:Npn \__xparse_grab_b_aux:NNw #1#2#3 \__xparse_run_code: + { + \__xparse_grab_D_aux:NNnN \begin \end {#3} #1 + \tl_put_left:Nn \l__xparse_signature_tl { \__xparse_grab_b_end:Nw #2 } + \tl_set_eq:NN \l__xparse_saved_args_tl \l__xparse_args_tl + \tl_clear:N \l__xparse_args_tl + \exp_args:Nc \l__xparse_fn_tl { begin ~ } + } +\cs_new_protected:Npn \__xparse_grab_b_end:Nw #1#2 \__xparse_run_code: + { + \tl_set:Nx \l__xparse_args_tl + { + \exp_not:V \l__xparse_saved_args_tl + { \exp_after:wN #1 \l__xparse_args_tl } + } + #2 + \__xparse_run_code: + \end + } \cs_new_protected:Npn \__xparse_grab_D:w #1#2#3 \__xparse_run_code: { \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn @@ -1244,7 +1312,7 @@ { \__xparse_grab_D_call:Nw #1 } { \__kernel_msg_error:nnxx { xparse } { missing-required } - { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } + { \__xparse_environment_or_command: } { \token_to_str:N #1 } \__xparse_add_arg:o \c_novalue_tl } @@ -1401,14 +1469,14 @@ \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 } { \__kernel_msg_error:nnxxx { xparse } { verbatim-newline } - { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } + { \__xparse_environment_or_command: } { \tl_to_str:N \l__xparse_v_arg_tl } { \tl_to_str:n {#1} } \__xparse_add_arg:o \c_novalue_tl } { \__kernel_msg_error:nnxxx { xparse } { verbatim-tokenized } - { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } + { \__xparse_environment_or_command: } { \tl_to_str:N \l__xparse_v_arg_tl } { \tl_to_str:n {#1} } \__xparse_add_arg:o \c_novalue_tl @@ -1577,8 +1645,10 @@ \q_nil { } ##2 \ERROR \q__xparse \ERROR } { - \__kernel_msg_expandable_error:nnnn - { xparse } { missing-required } {##5} {##2} + \__kernel_msg_expandable_error:nnff + { xparse } { missing-required } + { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } } + { \tl_to_str:n {##2} } ##4 {#1} \q__xparse ##5 ##6 {##7} } } @@ -1603,8 +1673,10 @@ ##6 \ERROR } { - \__kernel_msg_expandable_error:nnnn - { xparse } { missing-required } {##4} {##2} + \__kernel_msg_expandable_error:nnff + { xparse } { missing-required } + { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } } + { \tl_to_str:n {##2} } ##3 {#1} \q__xparse ##4 ##5 {##6} } } @@ -1709,26 +1781,27 @@ { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } } \cs_new_protected:Npn \__xparse_get_arg_spec_error:N #1 { - \cs_if_exist:NTF #1 - { - \__kernel_msg_error:nnx { xparse } { non-xparse-command } - { \token_to_str:N #1 } - } - { - \__kernel_msg_error:nnx { xparse } { unknown-command } - { \token_to_str:N #1 } - } + \bool_set_false:N \l__xparse_environment_bool + \tl_set:Nn \l__xparse_fn_tl {#1} + \__xparse_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 } } \cs_new_protected:Npn \__xparse_get_arg_spec_error:n #1 { - \cs_if_exist:cTF {#1} + \bool_set_true:N \l__xparse_environment_bool + \str_set:Nx \l__xparse_environment_str {#1} + \__xparse_get_arg_spec_error_aux:n + { \cs_if_exist:cTF { \l__xparse_environment_str } } + } +\cs_new_protected:Npn \__xparse_get_arg_spec_error_aux:n #1 + { + #1 { - \__kernel_msg_error:nnx { xparse } { non-xparse-environment } - { \tl_to_str:n {#1} } + \__kernel_msg_error:nnx { xparse } { non-xparse } + { \__xparse_environment_or_command: } } { - \__kernel_msg_error:nnx { xparse } { unknown-environment } - { \tl_to_str:n {#1} } + \__kernel_msg_error:nnx { xparse } { unknown } + { \__xparse_environment_or_command: } } } \cs_new_protected:Npn \__xparse_get_arg_spec:NTF #1#2#3 @@ -1828,15 +1901,16 @@ { \exp_args:Nf \str_case_e:nnTF { - \exp_args:Nf \tl_if_empty:nT { \token_get_arg_spec:N #1 } + \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 } { \exp_last_unbraced:Nf \__xparse_cmd_if_xparse_aux:w - { \token_get_replacement_spec:N #1 } ~ \q_stop + { \cs_replacement_spec:N #1 } ~ \q_stop } } { { \token_to_str:N \__xparse_start:nNNnnn } { } { \token_to_str:N \__xparse_start_expandable:nNNNNn } { } + { \token_to_str:N \__xparse_start_env:nnnnn } { } } } \cs_new:Npn \__xparse_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1} @@ -1850,40 +1924,60 @@ { \__xparse_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} } { #2 #3 { #4 } { #5 #1 } } } +\cs_new:Npn \__xparse_environment_or_command: + { + \bool_if:NTF \l__xparse_environment_bool + { environment ~ ' \l__xparse_environment_str ' } + { + command ~ ' + \exp_args:Nf \tl_trim_spaces:n + { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } + ' + } + } +\tl_const:Nn \c__xparse_ignore_def_tl + { \\ \\ LaTeX~will~ignore~this~entire~definition. } +\__kernel_msg_new:nnnn { xparse } { arg-after-body } + { In~the~definition~of~#1,~b~(body)~argument~must~be~last. } + { + The~'body'~argument~type~is~followed~by~'#2'~in~the~argument~ + specification~of~the~#1.~This~is~not~allowed. + \c__xparse_ignore_def_tl + } \__kernel_msg_new:nnnn { xparse } { bad-arg-spec } - { Bad~argument~specification~'#2'~for~command~'#1'. } + { Bad~argument~specification~'#2'~for~#1. } { The~argument~specification~provided~was~not~valid:~ - one~or~more~mandatory~pieces~of~information~were~missing. \\ \\ - LaTeX~will~ignore~this~entire~definition. + one~or~more~mandatory~pieces~of~information~were~missing. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { command-already-defined } { Command~'#1'~already~defined! } { You~have~used~#2~ - with~a~command~that~already~has~a~definition. \\ + with~a~command~that~already~has~a~definition. \\ \\ The~existing~definition~of~'#1'~will~not~be~altered. } \__kernel_msg_new:nnnn { xparse } { command-not-yet-defined } { Command ~'#1'~not~yet~defined! } { You~have~used~#2~ - with~a~command~that~was~never~defined. \\ - LaTeX~will~ignore~this~entire~definition. + with~a~command~that~was~never~defined. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { environment-already-defined } { Environment~'#1'~already~defined! } { You~have~used~\NewDocumentEnvironment - with~an~environment~that~already~has~a~definition. \\ - The~existing~definition~of~'#1'~will~be~overwritten. + with~an~environment~that~already~has~a~definition. \\ \\ + The~existing~definition~of~'#1'~will~not~be~altered. } \__kernel_msg_new:nnnn { xparse } { environment-not-yet-defined } { Environment~'#1'~not~yet~defined! } { You~have~used~\RenewDocumentEnvironment - with~an~environment~that~was~never~defined. \\ - LaTeX~will~ignore~this~entire~definition. + with~an~environment~that~was~never~defined. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { expandable-ending-optional } { @@ -1895,25 +1989,26 @@ (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~ argument~with~expandable~commands. } -\__kernel_msg_new:nnnn { xparse } { if-boolean } - { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} } - { - The~first~argument~of~\iow_char:N\\IfBoolean(TF/T/F)~must~be~ - a~boolean~argument~obtained~from~parsing~'s'~or~'t'~arguments. - } \__kernel_msg_new:nnnn { xparse } { inconsistent-long } { Inconsistent~long~arguments~for~expandable~command~'#1'. } { The~arguments~for~an~expandable~command~must~not~involve~short~ arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types. } +\__kernel_msg_new:nnnn { xparse } { invalid-command-arg } + { Argument~type~'#2'~not~available~for~#1. } + { + The~letter~'#2'~can~only~be~used~in~environment~argument~ + specifications,~not~for~commands. + \\ \\ + LaTeX~will~ignore~this~entire~definition. + } \__kernel_msg_new:nnnn { xparse } { invalid-expandable-argument-type } { Argument~type~'#2'~not~available~for~expandable~command~'#1'. } { - The~letter~'#2'~does~not~specify~an~argument~type~which~can~be~used~ + The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~ in~an~expandable~command. - \\ \\ - LaTeX~will~ignore~this~entire~definition. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { invalid-after-optional-expandably } { @@ -1921,41 +2016,15 @@ for~expandable~command~'#1'. } { - The~letter~'#2'~does~not~specify~an~argument~type~which~can~be~used~ + The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~ in~an~expandable~command~after~an~optional~argument. - \\ \\ - LaTeX~will~ignore~this~entire~definition. - } -\__kernel_msg_new:nnnn { xparse } { loop-in-defaults } - { Circular~dependency~in~defaults~of~'#1'. } - { - The~default~values~of~two~or~more~arguments~of~'#1'~depend~on~each~ - other~in~a~way~that~cannot~be~resolved. - } -\__kernel_msg_new:nnnn { xparse } { missing-required } - { Failed~to~find~required~argument~starting~with~'#2'~for~command~'#1'. } - { - The~current~command~'#1'~expects~an~argument~starting~with~'#2'.~ - LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces } - { Prefix~'!'~used~before~mandatory~argument~'#2'~of~command~'#1'. } + { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. } { The~prefix~'!'~can~only~apply~to~trailing~optional~arguments. - \\ \\ - LaTeX~will~ignore~this~entire~definition. - } -\__kernel_msg_new:nnnn { xparse } { non-xparse-command } - { Command~'#1'~not~defined~using~xparse. } - { - You~have~asked~for~the~argument~specification~for~a~command~'#1',~ - but~this~is~not~a~command~defined~using~xparse. - } -\__kernel_msg_new:nnnn { xparse } { non-xparse-environment } - { Environment~'#1'~not~defined~using~xparse. } - { - You~have~asked~for~the~argument~specification~for~an~environment~'#1',~ - but~this~is~not~an~environment~defined~using~xparse. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { not-definable } { First~argument~of~'#2'~must~be~a~command. } @@ -1963,89 +2032,99 @@ The~first~argument~of~'#2'~should~be~the~document~command~that~will~ be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~ backslash~is~missing? - \\ \\ - LaTeX~will~ignore~this~entire~definition. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { not-one-token } { First~argument~of~'#2'~must~be~a~command. } { The~first~argument~of~'#2'~should~be~the~document~command~that~will~ be~defined.~The~provided~argument~'#1'~contains~more~than~one~ - token. - \\ \\ - LaTeX~will~ignore~this~entire~definition. + token.~Perhaps~a~backslash~is~missing? + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { not-single-char } { - Argument~delimiter~'#2'~for~the~command~'#1'~should~be~ + Argument~delimiter~'#2'~for~the~#1~should~be~ a~single~character. } { The~argument~specification~provided~was~not~valid:~in~a~place~ - where~a~single~character~is~required,~LaTeX~found~'#2'. \\ \\ - LaTeX~will~ignore~this~entire~definition. + where~a~single~character~is~required,~LaTeX~found~'#2'. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { processor-in-expandable } { Argument~processor~'>{#2}'~cannot~be~used~for~the~expandable~command~'#1'. } { The~argument~specification~for~#1~contains~a~processor~function:~ - this~is~only~supported~for~standard~robust~commands. \\ \\ - LaTeX~will~ignore~this~entire~definition. - } -\__kernel_msg_new:nnnn { xparse } { split-excess-tokens } - { Too~many~'#1'~tokens~when~trying~to~split~argument. } - { - LaTeX~was~asked~to~split~the~input~'#3'~ - at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~ - There~were~too~many~'#1'~tokens. + this~is~only~supported~for~standard~robust~commands. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { too-many-arguments } - { Too~many~arguments~in~argument~specification~'#2'~of~command~'#1'. } + { Too~many~arguments~in~argument~specification~'#2'~of~#1. } { The~argument~specification~provided~has~more~than~9~arguments.~ - This~cannot~be~implemented. \\ \\ - LaTeX~will~ignore~this~entire~definition. + This~cannot~be~implemented. + \c__xparse_ignore_def_tl } \__kernel_msg_new:nnnn { xparse } { two-markers } - { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~command~'#1'. } + { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~#1. } { The~argument~specification~provided~has~two~markers~'#2'~applying~ to~the~same~argument;~these~are~redundant. } \__kernel_msg_new:nnnn { xparse } { unknown-argument-type } - { Unknown~argument~type~'#2'~for~the~command~'#1'. } + { Unknown~argument~type~'#2'~for~the~#1. } { - The~letter~'#2'~does~not~specify~a~known~argument~type.~ - LaTeX~will~ignore~this~entire~definition. + The~letter~'#2'~does~not~specify~a~known~argument~type. + \c__xparse_ignore_def_tl } -\__kernel_msg_new:nnnn { xparse } { unknown-command } - { Unknown~document~command~'#1'. } +\__kernel_msg_new:nnn { xparse } { if-boolean } + { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} } +\__kernel_msg_new:nnnn { xparse } { loop-in-defaults } + { Defaults~of~#1~have~circular~dependency. } { - You~have~asked~for~the~argument~specification~for~a~command~'#1',~ - but~it~is~not~defined. + The~default~values~of~two~or~more~arguments~of~the~#1~ + depend~on~each~other~in~a~way~that~cannot~be~resolved. + } +\__kernel_msg_new:nnnn { xparse } { missing-required } + { Missing~required~argument~for~#1. } + { + The~current~#1~expects~an~argument~starting~with~'#2'.~ + LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed. } -\__kernel_msg_new:nnnn { xparse } { unknown-environment } - { Unknown~document~environment~'#1'. } +\__kernel_msg_new:nnnn { xparse } { non-xparse } + { \str_upper_case:n #1~not~defined~using~xparse. } { - You~have~asked~for~the~argument~specification~for~an~environment~'#1',~ + You~have~asked~for~the~argument~specification~for~the~#1,~ + but~this~was~not~defined~using~xparse. + } +\__kernel_msg_new:nnnn { xparse } { split-excess-tokens } + { Too~many~'#1'~tokens~when~trying~to~split~argument. } + { + LaTeX~was~asked~to~split~the~input~'#3'~ + at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~ + There~were~too~many~'#1'~tokens. + } +\__kernel_msg_new:nnnn { xparse } { unknown } + { Unknown~document~#1. } + { + You~have~asked~for~the~argument~specification~for~the~#1,~ but~it~is~not~defined. } \__kernel_msg_new:nnnn { xparse } { verbatim-newline } - { Verbatim~argument~of~'#1'~ended~by~end~of~line. } + { Verbatim~argument~of~#1~ended~by~end~of~line. } { - The~verbatim~argument~of~'#1'~cannot~contain~more~than~one~line,~ + The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~ but~the~end~ - of~the~current~line~has~been~reached.~You~have~probably~forgotten~the~ + of~the~current~line~has~been~reached.~You~may~have~forgotten~the~ closing~delimiter. \\ \\ LaTeX~will~ignore~'#2'. } \__kernel_msg_new:nnnn { xparse } { verbatim-tokenized } + { The~verbatim~#1~cannot~be~used~inside~an~argument. } { - The~verbatim~command~'#1'~cannot~be~used~inside~an~argument.~ - } - { - The~command~'#1'~takes~a~verbatim~argument.~ + The~#1~takes~a~verbatim~argument.~ It~may~not~appear~within~the~argument~of~another~function.~ It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } . \\ \\ @@ -2126,7 +2205,7 @@ \cs_if_exist:cTF {#1} { \__kernel_msg_error:nnx { xparse } { environment-already-defined } {#1} } { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} } -} + } \cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4 { \cs_if_exist:cTF {#1} @@ -2178,14 +2257,20 @@ } \cs_new:Npn \IfBooleanTF #1 { - \bool_lazy_and:nnTF - { \tl_if_single_p:n {#1} } - { \tl_if_single_token_p:n #1 } - { \bool_if:NTF #1 } - { - \__kernel_msg_error:nnn { xparse } { if-boolean } {#1} - \use_ii:nn - } + \tl_if_single:nF {#1} + { \prg_break:n { \use:n } } + \tl_if_single_token:nF #1 + { \prg_break:n { \use:n } } + \token_if_eq_meaning:NNT #1 \c_true_bool + { \prg_break:n { \use_ii:nnn } } + \token_if_eq_meaning:NNT #1 \c_false_bool + { \prg_break:n { \use_iii:nnn } } + \prg_break:n { \use:n } + \prg_break_point: + { + \__kernel_msg_expandable_error:nnn { xparse } { if-boolean } {#1} + \use_ii:nn + } } \cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } } \cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } } diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty index b6fa39fa49d..2d812c53b7e 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty @@ -6,7 +6,7 @@ %% %% xtemplate.dtx (with options: `package') %% -%% Copyright (C) 2011-2017 The LaTeX3 Project +%% Copyright (C) 2011-2019 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,11 +18,7 @@ %% This file is part of the "l3packages bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: xtemplate.dtx (C) Copyright 1999 Frank Mittelbach, Chris Rowley, -%% David Carlisle -%% (C) Copyright 2004-2010 Frank Mittelbach, -%% The LaTeX3 Project -%% (C) Copyright 2011-2018 The LaTeX3 Project +%% File: xtemplate.dtx \RequirePackage{expl3}[2018/02/21] \@ifpackagelater{expl3}{2018/02/21} {} @@ -36,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{xtemplate}{2018-10-17}{} +\ProvidesExplPackage{xtemplate}{2019-03-05}{} {L3 Experimental prototype document functions} \tl_const:Nn \c__xtemplate_code_root_tl { template~code~>~ } \tl_const:Nn \c__xtemplate_defaults_root_tl { template~defaults~>~ } -- cgit v1.2.3