From 905323115107c182a860bca6a036889f4fc7f36f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 6 May 2018 21:49:18 +0000 Subject: l3experimental git-svn-id: svn://tug.org/texlive/trunk@47633 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/l3experimental/l3color/l3color.sty | 2 +- .../tex/latex/l3experimental/l3draw/l3draw.sty | 106 +++++---------- .../latex/l3experimental/l3str/l3str-convert.sty | 146 +++++++++------------ .../latex/l3experimental/l3str/l3str-enc-utf16.def | 25 ++-- .../latex/l3experimental/l3str/l3str-enc-utf32.def | 27 ++-- .../latex/l3experimental/l3str/l3str-enc-utf8.def | 31 ++--- .../latex/l3experimental/l3str/l3str-esc-hex.def | 4 +- .../latex/l3experimental/l3str/l3str-esc-name.def | 4 +- .../l3experimental/l3str/l3str-esc-string.def | 8 +- .../latex/l3experimental/l3str/l3str-esc-url.def | 4 +- .../latex/l3experimental/l3str/l3str-format.sty | 44 ++++--- .../tex/latex/l3experimental/xcoffins/xcoffins.sty | 12 +- .../tex/latex/l3experimental/xgalley/l3galley.sty | 71 +++++----- .../tex/latex/l3experimental/xgalley/xgalley.sty | 2 +- 14 files changed, 221 insertions(+), 265 deletions(-) (limited to 'Master/texmf-dist/tex/latex/l3experimental') diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty index 5d1bf6553e0..f7dbbcc9d9c 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 Copyright(C) 2017-2018 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3color}{2018/03/05}{} +\ProvidesExplPackage{l3color}{2018-04-30}{} {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 7375cf33197..f991619ccc9 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty @@ -27,7 +27,7 @@ %% %% File: l3draw.dtx Copyright(C) 2018 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3draw}{2018/03/05}{} +\ProvidesExplPackage{l3draw}{2018-04-30}{} {L3 Experimental core drawing support} \RequirePackage { l3color } %% File: l3draw-boxes.dtx Copyright(C) 2018 The LaTeX3 Project @@ -680,8 +680,7 @@ \dim_set_eq:NN \l__draw_softpath_lastx_dim \g__draw_softpath_lastx_dim \dim_set_eq:NN \l__draw_softpath_lasty_dim \g__draw_softpath_lasty_dim \__draw_path_reset_limits: - \__draw_softpath_concat:n { } - \tl_set_eq:NN \l__draw_softpath_main_tl \g__draw_softpath_main_tl + \tl_build_get:NN \g__draw_softpath_main_tl \l__draw_softpath_main_tl \bool_set_eq:NN \l__draw_softpath_corners_bool \g__draw_softpath_corners_bool @@ -689,11 +688,11 @@ } \cs_new_protected:Npn \draw_path_scope_end: { + \__draw_softpath_clear: \bool_gset_eq:NN \g__draw_softpath_corners_bool \l__draw_softpath_corners_bool - \__draw_softpath_clear: - \tl_gset_eq:NN \g__draw_softpath_main_tl \l__draw_softpath_main_tl + \__draw_softpath_add:o \l__draw_softpath_main_tl \dim_gset_eq:NN \g__draw_softpath_lastx_dim \l__draw_softpath_lastx_dim \dim_gset_eq:NN \g__draw_softpath_lasty_dim \l__draw_softpath_lasty_dim \dim_gset_eq:NN \g__draw_path_xmax_dim \l__draw_path_xmax_dim @@ -734,8 +733,6 @@ { \__draw_point_to_dim_aux:w #1 } \cs_generate_variant:Nn \__draw_point_to_dim_aux:n { f } \cs_new:Npn \__draw_point_to_dim_aux:w ( #1 , ~ #2 ) { #1pt , #2pt } -\cs_new:Npn \draw_point:nn #1#2 - { \__draw_point_to_dim:n { #1 , #2 } } \cs_new:Npn \draw_point_polar:nn #1#2 { \draw_point_polar:nnn {#1} {#2} {#2} } \cs_new:Npn \draw_point_polar:nnn #1#2#3 @@ -743,12 +740,6 @@ \cs_new:Npn \__draw_draw_polar:nnn #1#2#3 { \__draw_point_to_dim:n { cosd(#1) * (#2) , sind(#1) * (#3) } } \cs_generate_variant:Nn \__draw_draw_polar:nnn { f } -\cs_new:Npn \draw_point_add:nn #1#2 - { \__draw_point_to_dim:n { (#1) + (#2) } } -\cs_new:Npn \draw_point_diff:nn #1#2 - { \__draw_point_to_dim:n { (#2) - (#1) } } -\cs_new:Npn \draw_point_scale:nn #1#2 - { \__draw_point_to_dim:n { #1 * (#2) } } \cs_new:Npn \draw_point_unit_vector:n #1 { \__draw_point_process:nn { \__draw_point_unit_vector:nn } {#1} } \cs_new:Npn \__draw_point_unit_vector:nn #1#2 @@ -1126,6 +1117,11 @@ \__draw_softpath_clear: \draw_linewidth:n { \l_draw_default_linewidth_dim } \draw_color:n { . } + \draw_nonzero_rule: + \draw_cap_butt: + \draw_join_miter: + \draw_miterlimit:n { 10 } + \draw_dash_pattern:nn { } { 0cm } } \cs_new_protected:Npn \draw_end: { @@ -1205,64 +1201,19 @@ } %% File: l3draw-softpath.dtx Copyright(C) 2018 The LaTeX3 Project \tl_new:N \g__draw_softpath_main_tl -\tl_new:N \g__draw_softpath_buffer_a_tl -\tl_new:N \g__draw_softpath_buffer_b_tl -\int_new:N \g__draw_softpath_buffer_a_int -\int_new:N \g__draw_softpath_buffer_b_int +\tl_new:N \l__draw_softpath_internal_tl \bool_new:N \g__draw_softpath_corners_bool -\cs_new_protected:Npn \__draw_softpath_add:n #1 - { - \int_compare:nNnTF \g__draw_softpath_buffer_a_int < { 40 } - { - \int_gincr:N \g__draw_softpath_buffer_a_int - \tl_gput_right:Nn \g__draw_softpath_buffer_a_tl {#1} - } - { - \int_compare:nNnTF \g__draw_softpath_buffer_b_int < { 40 } - { - \int_gincr:N \g__draw_softpath_buffer_b_int - \tl_gset:Nx \g__draw_softpath_buffer_b_tl - { - \exp_not:V \g__draw_softpath_buffer_b_tl - \exp_not:V \g__draw_softpath_buffer_a_tl - \exp_not:n {#1} - } - \int_gzero:N \g__draw_softpath_buffer_a_int - \tl_gclear:N \g__draw_softpath_buffer_a_tl - } - { \__draw_softpath_concat:n {#1} } - } - } -\cs_generate_variant:Nn \__draw_softpath_add:n { x } -\cs_new_protected:Npn \__draw_softpath_concat:n #1 - { - \tl_gset:Nx \g__draw_softpath_main_tl - { - \exp_not:V \g__draw_softpath_main_tl - \exp_not:V \g__draw_softpath_buffer_b_tl - \exp_not:V \g__draw_softpath_buffer_a_tl - \exp_not:n {#1} - } - \__draw_softpath_reset_buffers: - } -\cs_new_protected:Npn \__draw_softpath_reset_buffers: - { - \int_gzero:N \g__draw_softpath_buffer_a_int - \tl_gclear:N \g__draw_softpath_buffer_a_tl - \int_gzero:N \g__draw_softpath_buffer_b_int - \tl_gclear:N \g__draw_softpath_buffer_b_tl - } +\cs_new_protected:Npn \__draw_softpath_add:n + { \tl_build_gput_right:Nn \g__draw_softpath_main_tl } +\cs_generate_variant:Nn \__draw_softpath_add:n { o, x } \cs_new_protected:Npn \__draw_softpath_use: { - \g__draw_softpath_main_tl - \g__draw_softpath_buffer_b_tl - \g__draw_softpath_buffer_a_tl + \tl_build_get:NN \g__draw_softpath_main_tl \l__draw_softpath_internal_tl + \l__draw_softpath_internal_tl } \cs_new_protected:Npn \__draw_softpath_clear: { - \tl_gclear:N \g__draw_softpath_main_tl - \tl_gclear:N \g__draw_softpath_buffer_a_tl - \tl_gclear:N \g__draw_softpath_buffer_b_tl + \tl_build_gclear:N \g__draw_softpath_main_tl \bool_gset_false:N \g__draw_softpath_corners_bool } \cs_new_protected:Npn \__draw_softpath_use_clear: @@ -1363,9 +1314,9 @@ \fp_zero:N \l__draw_softpath_lasty_fp \tl_clear:N \l__draw_softpath_first_tl \tl_clear:N \l__draw_softpath_move_tl - \__draw_softpath_concat:n { } + \tl_build_get:NN \g__draw_softpath_main_tl \l__draw_softpath_internal_tl \exp_after:wN \__draw_softpath_round_loop:Nnn - \g__draw_softpath_main_tl + \l__draw_softpath_internal_tl \q_recursion_tail ? ? \q_recursion_stop \group_end: @@ -1569,11 +1520,11 @@ \l__draw_softpath_move_tl \tl_put_right:No \l__draw_softpath_main_tl \l__draw_softpath_part_tl - \tl_gset_eq:NN \g__draw_softpath_main_tl \l__draw_softpath_main_tl + \tl_build_gclear:N \g__draw_softpath_main_tl + \__draw_softpath_add:o \l__draw_softpath_main_tl } %% File: l3draw-state.dtx Copyright(C) 2018 The LaTeX3 Project \dim_new:N \g__draw_linewidth_dim -\dim_new:N \g__draw_inner_linewidth_dim \dim_new:N \l_draw_default_linewidth_dim \dim_set:Nn \l_draw_default_linewidth_dim { 0.4pt } \cs_new_protected:Npn \draw_linewidth:n #1 @@ -1581,8 +1532,21 @@ \dim_gset:Nn \g__draw_linewidth_dim { \fp_to_dim:n {#1} } \driver_draw_linewidth:n \g__draw_linewidth_dim } -\cs_new_protected:Npn \draw_inner_linewidth:n #1 - { \dim_gset:Nn \g__draw_inner_linewidth_dim { \fp_to_dim:n {#1} } } +\cs_new_protected:Npn \draw_dash_pattern:nn #1#2 + { + \group_begin: + \seq_set_from_clist:Nn \l__draw_tmp_seq {#1} + \seq_set_map:NNn \l__draw_tmp_seq \l__draw_tmp_seq + { \fp_to_dim:n {##1} } + \use:x + { + \driver_draw_dash_pattern:nn + { \seq_use:Nn \l__draw_tmp_seq { , } } + { \fp_to_dim:n {#2} } + } + \group_end: + } +\seq_new:N \l__draw_tmp_seq \cs_new_protected:Npn \draw_miterlimit:n #1 { \driver_draw_miterlimit:n { \fp_eval:n {#1} } } \cs_new_protected:Npn \draw_cap_butt: { \driver_draw_cap_butt: } 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 711e7bcd2d2..e2a1f762f08 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-2018 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3str-convert}{2018/03/05}{} +\ProvidesExplPackage{l3str-convert}{2018-04-30}{} {L3 Experimental string encoding conversions} \cs_if_exist:NF \use_ii_i:nn { \cs_new:Npn \use_ii_i:nn #1#2 { #2 #1 } } @@ -52,14 +52,14 @@ \prg_new_conditional:Npnn \__str_if_contains_char:NN #1#2 { T , TF } { \exp_after:wN \__str_if_contains_char_aux:NN \exp_after:wN #2 - #1 { \__prg_break:n { ? \fi: } } - \__prg_break_point: + #1 { \prg_break:n { ? \fi: } } + \prg_break_point: \prg_return_false: } \prg_new_conditional:Npnn \__str_if_contains_char:nN #1#2 { TF } { - \__str_if_contains_char_aux:NN #2 #1 { \__prg_break:n { ? \fi: } } - \__prg_break_point: + \__str_if_contains_char_aux:NN #2 #1 { \prg_break:n { ? \fi: } } + \prg_break_point: \prg_return_false: } \cs_new:Npn \__str_if_contains_char_aux:NN #1#2 @@ -70,7 +70,7 @@ \__str_if_contains_char_aux:NN #1 } \cs_new:Npn \__str_if_contains_char_true: - { \__prg_break:n { \prg_return_true: \use_none:n } } + { \prg_break:n { \prg_return_true: \use_none:n } } \prg_new_conditional:Npnn \__str_octal_use:N #1 { TF } { \if_int_compare:w 1 < '1 \token_to_str:N #1 \exp_stop_f: @@ -84,9 +84,7 @@ \if_int_compare:w 1 < "1 \token_to_str:N #1 \exp_stop_f: #1 \prg_return_true: \else: - \if_case:w \__int_eval:w - \exp_after:wN ` \token_to_str:N #1 - `a - \__int_eval_end: + \if_case:w \int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a } A \or: B \or: C @@ -118,18 +116,16 @@ { \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nnn - \cs:w c__str_byte_ \__int_value:w \__int_eval:w + \cs:w c__str_byte_ \int_eval:w } \cs_new:Npn \__str_output_hexadecimal:n #1 - { \__str_output_hexadecimal:w #1 \__str_output_end: } -\cs_new:Npn \__str_output_hexadecimal:w { \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n - \cs:w c__str_byte_ \__int_value:w \__int_eval:w + \cs:w c__str_byte_ \int_eval:n {#1} _tl \cs_end: } \cs_new:Npn \__str_output_end: - { \__int_eval_end: _tl \cs_end: } + { \scan_stop: _tl \cs_end: } \cs_new:Npn \__str_output_byte_pair_be:n #1 { \exp_args:Nf \__str_output_byte_pair:nnN @@ -152,8 +148,8 @@ { \exp_after:wN \__str_convert_gmap_loop:NN \exp_after:wN #1 - \g__str_result_tl { ? \__prg_break: } - \__prg_break_point: + \g__str_result_tl { ? \prg_break: } + \prg_break_point: } } \cs_new:Npn \__str_convert_gmap_loop:NN #1#2 @@ -168,8 +164,8 @@ { \exp_after:wN \__str_convert_gmap_internal_loop:Nww \exp_after:wN #1 - \g__str_result_tl \s__tl \q_stop \__prg_break: \s__tl - \__prg_break_point: + \g__str_result_tl \s__tl \q_stop \prg_break: \s__tl + \prg_break_point: } } \cs_new:Npn \__str_convert_gmap_internal_loop:Nww #1 #2 \s__tl #3 \s__tl @@ -214,7 +210,7 @@ { \group_begin: #1 - \tl_gset:Nx \g__str_result_tl { \__str_to_other_fast:n {#4} } + \tl_gset:Nx \g__str_result_tl { \__kernel_str_to_other_fast:n {#4} } \exp_after:wN \__str_convert:wwwnn \tl_to_str:n {#5} /// \q_stop { decode } { unescape } @@ -286,8 +282,8 @@ \cs_new:Npn \__str_convert_lowercase_alphanum:n #1 { \exp_after:wN \__str_convert_lowercase_alphanum_loop:N - \tl_to_str:n {#1} { ? \__prg_break: } - \__prg_break_point: + \tl_to_str:n {#1} { ? \prg_break: } + \prg_break_point: } \cs_new:Npn \__str_convert_lowercase_alphanum_loop:N #1 { @@ -336,8 +332,8 @@ \cs_new:Npn \__str_filter_bytes:n #1 { \__str_filter_bytes_aux:N #1 - { ? \__prg_break: } - \__prg_break_point: + { ? \prg_break: } + \prg_break_point: } \cs_new:Npn \__str_filter_bytes_aux:N #1 { @@ -372,57 +368,43 @@ \cs_new_protected:Npn \__str_convert_decode_: { \__str_convert_gmap:N \__str_decode_native_char:N } \cs_new:Npn \__str_decode_native_char:N #1 - { #1 \s__tl \__int_value:w `#1 \s__tl } -\group_begin: - \char_set_catcode_other:n { 0 } - \bool_lazy_any:nTF - { - \sys_if_engine_luatex_p: - \sys_if_engine_xetex_p: - } - { - \cs_new_protected:Npn \__str_convert_encode_: - { - \__tl_gbuild_x:Nw \g__str_result_tl - \exp_after:wN \__str_encode_native_loop:w - \g__str_result_tl \s__tl { \q_stop \__prg_break: } \s__tl - \__prg_break_point: - \__tl_build_end: - } - \cs_new_protected:Npn \__str_encode_native_loop:w #1 \s__tl #2 \s__tl - { - \use_none_delimit_by_q_stop:w #2 \q_stop - \exp_args:Nx \__tl_build_one:n - { \char_generate:nn {#2} {12} } - \__str_encode_native_loop:w - } - } - { - \cs_new_protected:Npn \__str_convert_encode_: - { - \flag_clear:n { str_error } - \__str_convert_gmap_internal:N \__str_encode_native_char:n - \__str_if_flag_error:nnx { str_error } - { pdfTeX-native-overflow } { } - } - \cs_new:Npn \__str_encode_native_char:n #1 - { - \if_int_compare:w #1 > \c__str_max_byte_int - \flag_raise:n { str_error } - ? - \else: - \__str_output_byte:n {#1} - \fi: - } - \__kernel_msg_new:nnnn { str } { pdfTeX-native-overflow } - { Character~code~too~large~for~pdfTeX. } - { - The~pdfTeX~engine~only~supports~8-bit~characters:~ - valid~character~codes~are~in~the~range~[0,255].~ - To~manipulate~arbitrary~Unicode,~use~LuaTeX~or~XeTeX. - } - } -\group_end: + { #1 \s__tl \int_value:w `#1 \s__tl } +\bool_lazy_any:nTF + { + \sys_if_engine_luatex_p: + \sys_if_engine_xetex_p: + } + { + \cs_new_protected:Npn \__str_convert_encode_: + { \__str_convert_gmap_internal:N \__str_encode_native_char:n } + \cs_new:Npn \__str_encode_native_char:n #1 + { \char_generate:nn {#1} {12} } + } + { + \cs_new_protected:Npn \__str_convert_encode_: + { + \flag_clear:n { str_error } + \__str_convert_gmap_internal:N \__str_encode_native_char:n + \__str_if_flag_error:nnx { str_error } + { native-overflow } { } + } + \cs_new:Npn \__str_encode_native_char:n #1 + { + \if_int_compare:w #1 > \c__str_max_byte_int + \flag_raise:n { str_error } + ? + \else: + \char_generate:nn {#1} {12} + \fi: + } + \__kernel_msg_new:nnnn { str } { native-overflow } + { Character~code~too~large~for~this~engine. } + { + This~engine~only~support~8-bit~characters:~ + valid~character~codes~are~in~the~range~[0,255].~ + To~manipulate~arbitrary~Unicode,~use~LuaTeX~or~XeTeX. + } + } \cs_new_protected:Npn \__str_convert_decode_clist: { \clist_gset:No \g__str_result_tl \g__str_result_tl @@ -456,12 +438,12 @@ \int_zero:N \l__str_internal_int \exp_last_unbraced:Nx \__str_decode_eight_bit_load:nn { \tl_use:c { c__str_encoding_#1_tl } } - { \q_stop \__prg_break: } { } - \__prg_break_point: + { \q_stop \prg_break: } { } + \prg_break_point: \exp_last_unbraced:Nx \__str_decode_eight_bit_load_missing:n { \tl_use:c { c__str_encoding_#1_missing_tl } } - { \q_stop \__prg_break: } - \__prg_break_point: + { \q_stop \prg_break: } + \prg_break_point: \flag_clear:n { str_error } \__str_convert_gmap:N \__str_decode_eight_bit_char:N \__str_if_flag_error:nnx { str_error } { decode-8-bit } {#1} @@ -472,7 +454,7 @@ \use_none_delimit_by_q_stop:w #1 \q_stop \tex_dimen:D "#1 = \l__str_internal_int sp \scan_stop: \tex_skip:D \l__str_internal_int = "#1 sp \scan_stop: - \tex_toks:D \l__str_internal_int \exp_after:wN { \__int_value:w "#2 } + \tex_toks:D \l__str_internal_int \exp_after:wN { \int_value:w "#2 } \int_incr:N \l__str_internal_int \__str_decode_eight_bit_load:nn } @@ -494,7 +476,7 @@ \tex_the:D \tex_toks:D \tex_dimen:D \fi: \fi: - \__int_value:w `#1 \s__tl + \int_value:w `#1 \s__tl } \cs_new_protected:Npn \__str_convert_encode_eight_bit:n #1 { @@ -502,8 +484,8 @@ \int_zero:N \l__str_internal_int \exp_last_unbraced:Nx \__str_encode_eight_bit_load:nn { \tl_use:c { c__str_encoding_#1_tl } } - { \q_stop \__prg_break: } { } - \__prg_break_point: + { \q_stop \prg_break: } { } + \prg_break_point: \flag_clear:n { str_error } \__str_convert_gmap_internal:N \__str_encode_eight_bit_char:n \__str_if_flag_error:nnx { str_error } { encode-8-bit } {#1} diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def index 66d5ec7a527..83f53a20f49 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf16.def @@ -68,10 +68,13 @@ } \__kernel_msg_new:nnnn { str } { utf16-decode } { - Invalid~UTF-16~string: \exp_last_unbraced:Nf \use_none:n - \__str_if_flag_times:nT { str_missing } { ,~missing~trail~surrogate } - \__str_if_flag_times:nT { str_extra } { ,~extra~trail~surrogate } - \__str_if_flag_times:nT { str_end } { ,~odd~number~of~bytes } + Invalid~UTF-16~string: + \exp_last_unbraced:Nf \use_none:n + { + \__str_if_flag_times:nT { str_missing } { ,~missing~trail~surrogate } + \__str_if_flag_times:nT { str_extra } { ,~extra~trail~surrogate } + \__str_if_flag_times:nT { str_end } { ,~odd~number~of~bytes } + } . } { @@ -105,13 +108,13 @@ } } \cs_new_protected:cpn { __str_convert_decode_utf16be: } - { \__str_decode_utf_xvi:Nw 1 \g__str_result_tl \s__stop } + { \__str_decode_utf_xvi:Nw 1 \g__str_result_tl \s_stop } \cs_new_protected:cpn { __str_convert_decode_utf16le: } - { \__str_decode_utf_xvi:Nw 2 \g__str_result_tl \s__stop } + { \__str_decode_utf_xvi:Nw 2 \g__str_result_tl \s_stop } \cs_new_protected:cpn { __str_convert_decode_utf16: } { \exp_after:wN \__str_decode_utf_xvi_bom:NN - \g__str_result_tl \s__stop \s__stop \s__stop + \g__str_result_tl \s_stop \s_stop \s_stop } \cs_new_protected:Npn \__str_decode_utf_xvi_bom:NN #1#2 { @@ -123,7 +126,7 @@ { \__str_decode_utf_xvi:Nw 1 #1#2 } } } - \cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s__stop + \cs_new_protected:Npn \__str_decode_utf_xvi:Nw #1#2 \s_stop { \flag_clear:n { str_error } \flag_clear:n { str_missing } @@ -134,7 +137,7 @@ { \exp_after:wN \__str_decode_utf_xvi_pair:NN #2 \q_nil \q_nil - \__prg_break_point: + \prg_break_point: } \__str_if_flag_error:nnx { str_error } { utf16-decode } { } } @@ -144,7 +147,7 @@ \__str_decode_utf_xvi_pair_end:Nw #1 \fi: \if_case:w - \__int_eval:w ( \__str_tmp:w #1#2 - "D6 ) / 4 \__int_eval_end: + \int_eval:n { ( \__str_tmp:w #1#2 - "D6 ) / 4 } \scan_stop: \or: \exp_after:wN \__str_decode_utf_xvi_quad:NNwNN \or: \exp_after:wN \__str_decode_utf_xvi_extra:NNw \fi: @@ -186,7 +189,7 @@ \else: \__str_decode_utf_xvi_error:nNN { end } #1 \prg_do_nothing: \fi: - \__prg_break: + \prg_break: } \cs_new:Npn \__str_decode_utf_xvi_extra:NNw #1#2 \s__tl #3 \s__tl { \__str_decode_utf_xvi_error:nNN { extra } #1#2 } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf32.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf32.def index 3c37226eebc..992ee7ce19a 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf32.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf32.def @@ -58,9 +58,12 @@ \flag_clear_new:n { str_end } \__kernel_msg_new:nnnn { str } { utf32-decode } { - Invalid~UTF-32~string: \exp_last_unbraced:Nf \use_none:n - \__str_if_flag_times:nT { str_overflow } { ,~code~point~too~large } - \__str_if_flag_times:nT { str_end } { ,~truncated~string } + Invalid~UTF-32~string: + \exp_last_unbraced:Nf \use_none:n + { + \__str_if_flag_times:nT { str_overflow } { ,~code~point~too~large } + \__str_if_flag_times:nT { str_end } { ,~truncated~string } + } . } { @@ -81,13 +84,13 @@ } } \cs_new_protected:cpn { __str_convert_decode_utf32be: } - { \__str_decode_utf_xxxii:Nw 1 \g__str_result_tl \s__stop } + { \__str_decode_utf_xxxii:Nw 1 \g__str_result_tl \s_stop } \cs_new_protected:cpn { __str_convert_decode_utf32le: } - { \__str_decode_utf_xxxii:Nw 2 \g__str_result_tl \s__stop } + { \__str_decode_utf_xxxii:Nw 2 \g__str_result_tl \s_stop } \cs_new_protected:cpn { __str_convert_decode_utf32: } { \exp_after:wN \__str_decode_utf_xxxii_bom:NNNN \g__str_result_tl - \s__stop \s__stop \s__stop \s__stop \s__stop + \s_stop \s_stop \s_stop \s_stop \s_stop } \cs_new_protected:Npn \__str_decode_utf_xxxii_bom:NNNN #1#2#3#4 { @@ -99,7 +102,7 @@ { \__str_decode_utf_xxxii:Nw 1 #1#2#3#4 } } } - \cs_new_protected:Npn \__str_decode_utf_xxxii:Nw #1#2 \s__stop + \cs_new_protected:Npn \__str_decode_utf_xxxii:Nw #1#2 \s_stop { \flag_clear:n { str_overflow } \flag_clear:n { str_end } @@ -108,14 +111,14 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_decode_utf_xxxii_loop:NNNN - #2 \s__stop \s__stop \s__stop \s__stop - \__prg_break_point: + #2 \s_stop \s_stop \s_stop \s_stop + \prg_break_point: } \__str_if_flag_error:nnx { str_error } { utf32-decode } { } } \cs_new:Npn \__str_decode_utf_xxxii_loop:NNNN #1#2#3#4 { - \if_meaning:w \s__stop #4 + \if_meaning:w \s_stop #4 \exp_after:wN \__str_decode_utf_xxxii_end:w \fi: #1#2#3#4 \s__tl @@ -136,7 +139,7 @@ \s__tl \__str_decode_utf_xxxii_loop:NNNN } - \cs_new:Npn \__str_decode_utf_xxxii_end:w #1 \s__stop + \cs_new:Npn \__str_decode_utf_xxxii_end:w #1 \s_stop { \tl_if_empty:nF {#1} { @@ -145,7 +148,7 @@ #1 \s__tl \int_use:N \c__str_replacement_char_int \s__tl } - \__prg_break: + \prg_break: } \group_end: %% diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf8.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf8.def index 486b12974a6..ac07909cf81 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf8.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-enc-utf8.def @@ -37,7 +37,7 @@ \exp_after:wN \use_none_delimit_by_q_stop:w \fi: \exp_after:wN \__str_encode_utf_viii_loop:wwnnw - \__int_value:w \int_div_truncate:nn {#1} {64} ; #1 ; + \int_value:w \int_div_truncate:nn {#1} {64} ; #1 ; #5 \q_stop \__str_output_byte:n { #2 - 64 * ( #1 - 2 ) } } @@ -47,11 +47,14 @@ \flag_clear_new:n { str_overflow } \__kernel_msg_new:nnnn { str } { utf8-decode } { - Invalid~UTF-8~string: \exp_last_unbraced:Nf \use_none:n - \__str_if_flag_times:nT { str_missing } { ,~missing~continuation~byte } - \__str_if_flag_times:nT { str_extra } { ,~extra~continuation~byte } - \__str_if_flag_times:nT { str_overlong } { ,~overlong~form } - \__str_if_flag_times:nT { str_overflow } { ,~code~point~too~large } + Invalid~UTF-8~string: + \exp_last_unbraced:Nf \use_none:n + { + \__str_if_flag_times:nT { str_missing } { ,~missing~continuation~byte } + \__str_if_flag_times:nT { str_extra } { ,~extra~continuation~byte } + \__str_if_flag_times:nT { str_overlong } { ,~overlong~form } + \__str_if_flag_times:nT { str_overflow } { ,~code~point~too~large } + } . } { @@ -99,8 +102,8 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_decode_utf_viii_start:N \g__str_result_tl - { \__prg_break: \__str_decode_utf_viii_end: } - \__prg_break_point: + { \prg_break: \__str_decode_utf_viii_end: } + \prg_break_point: } \__str_if_flag_error:nnx { str_error } { utf8-decode } { } } @@ -110,7 +113,7 @@ \if_int_compare:w `#1 < "C0 \exp_stop_f: \s__tl \if_int_compare:w `#1 < "80 \exp_stop_f: - \__int_value:w `#1 + \int_value:w `#1 \else: \flag_raise:n { str_extra } \flag_raise:n { str_error } @@ -118,7 +121,7 @@ \fi: \else: \exp_after:wN \__str_decode_utf_viii_continuation:wwN - \__int_value:w \__int_eval:w `#1 - "C0 \exp_after:wN \__int_eval_end: + \int_value:w \int_eval:n { `#1 - "C0 } \exp_after:wN \fi: \s__tl \use_none_delimit_by_q_stop:w {"80} {"800} {"10000} {"110000} \q_stop @@ -133,9 +136,7 @@ "C0 \exp_stop_f: #3 \exp_after:wN \__str_decode_utf_viii_aux:wNnnwN - \__int_value:w \__int_eval:w - #1 * "40 + `#3 - "80 - \exp_after:wN \__int_eval_end: + \int_value:w \int_eval:n { #1 * "40 + `#3 - "80 } \exp_after:wN \else: \s__tl \flag_raise:n { str_missing } @@ -163,7 +164,7 @@ \__str_decode_utf_viii_overflow:w #1 \fi: \exp_after:wN \__str_decode_utf_viii_continuation:wwN - \__int_value:w \__int_eval:w #1 - #4 \exp_after:wN \__int_eval_end: + \int_value:w \int_eval:n { #1 - #4 } \exp_after:wN \fi: \s__tl #2 {#4} #5 @@ -182,7 +183,7 @@ \flag_raise:n { str_missing } \flag_raise:n { str_error } \int_use:N \c__str_replacement_char_int \s__tl - \__prg_break: + \prg_break: } %% %% diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-hex.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-hex.def index 98932ef5521..5d8c5972cd5 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-hex.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-hex.def @@ -29,8 +29,8 @@ \__str_output_byte:w " \exp_last_unbraced:Nf \__str_unescape_hex_auxi:N { \tl_to_str:N \g__str_result_tl } - 0 { ? 0 - 1 \__prg_break: } - \__prg_break_point: + 0 { ? 0 - 1 \prg_break: } + \prg_break_point: \__str_output_end: } \__str_if_flag_error:nnx { str_error } { unescape-hex } { } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-name.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-name.def index f22018c7357..625bcdc4feb 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-name.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-name.def @@ -30,8 +30,8 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN #3 \g__str_result_tl - #1 ? { ? \__prg_break: } - \__prg_break_point: + #1 ? { ? \prg_break: } + \prg_break_point: } \__str_if_flag_error:nnx { str_byte } { non-byte } { #2 } \__str_if_flag_error:nnx { str_error } { unescape-#2 } { } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-string.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-string.def index 133f06d086e..d290b2f0f91 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-string.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-string.def @@ -33,14 +33,14 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_unescape_string_newlines:wN - \g__str_result_tl \__prg_break: ^^M ? - \__prg_break_point: + \g__str_result_tl \prg_break: ^^M ? + \prg_break_point: } \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_unescape_string_loop:wNNN - \g__str_result_tl #1 ?? { ? \__prg_break: } - \__prg_break_point: + \g__str_result_tl #1 ?? { ? \prg_break: } + \prg_break_point: } \__str_if_flag_error:nnx { str_byte } { non-byte } { string } \__str_if_flag_error:nnx { str_error } { unescape-string } { } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-url.def b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-url.def index eeff559146d..94db0c22f09 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-url.def +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-esc-url.def @@ -30,8 +30,8 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN #3 \g__str_result_tl - #1 ? { ? \__prg_break: } - \__prg_break_point: + #1 ? { ? \prg_break: } + \prg_break_point: } \__str_if_flag_error:nnx { str_byte } { non-byte } { #2 } \__str_if_flag_error:nnx { str_error } { unescape-#2 } { } 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 855c67ce144..d23bafdc9a2 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 Copyright (C) 2012-2018 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3str-format}{2018/03/05}{} +\ProvidesExplPackage{l3str-format}{2018-04-30}{} {L3 Experimental string formatting} \cs_generate_variant:Nn \use:nn { nf } \cs_generate_variant:Nn \use:nnn { fnf } @@ -30,26 +30,26 @@ \if_int_compare:w 9 < 1 #1 \exp_stop_f: \prg_return_true: \else: \prg_return_false: \fi: } -\cs_new:Npn \__str_format_put:nw #1 #2 \s__stop { #2 \s__stop #1 } +\cs_new:Npn \__str_format_put:nw #1 #2 \s_stop { #2 \s_stop #1 } \cs_generate_variant:Nn \__str_format_put:nw { o , f } \prg_new_conditional:Npnn \__str_format_if_in:nN #1#2 { TF } { \__str_format_if_in_aux:NN #2 #1 - { #2 \prg_return_false: \exp_after:wN \__prg_break: \else: } - \__prg_break_point: + { #2 \prg_return_false: \exp_after:wN \prg_break: \else: } + \prg_break_point: } \cs_new:Npn \__str_format_if_in_aux:NN #1#2 { \if_charcode:w #1 #2 \prg_return_true: - \exp_after:wN \__prg_break: + \exp_after:wN \prg_break: \fi: \__str_format_if_in_aux:NN #1 } \cs_new:Npn \__str_format_parse:n #1 { \exp_last_unbraced:Nf \__str_format_parse_auxi:NN - \__str_to_other:n {#1} \s__stop \s__stop {#1} + { \__kernel_str_to_other:n {#1} } \s_stop \s_stop {#1} } \cs_new:Npx \__str_format_parse_auxi:NN #1#2 { @@ -94,11 +94,11 @@ } \cs_new:Npn \__str_format_parse_auxvii:nN #1#2 { - \token_if_eq_meaning:NNTF \s__stop #2 + \token_if_eq_meaning:NNTF \s_stop #2 { \__str_format_parse_end:nwn { #1 ? } #2 } { \__str_format_parse_end:nwn { #1 #2 } } } -\cs_new:Npn \__str_format_parse_end:nwn #1 #2 \s__stop \s__stop #3 +\cs_new:Npn \__str_format_parse_end:nwn #1 #2 \s_stop \s_stop #3 { \tl_if_empty:nF {#2} { \__kernel_msg_expandable_error:nnn { str } { invalid-format } {#3} } @@ -195,13 +195,13 @@ } } \__str_format_tl_s:NNnnNNn - \s__stop + \s_stop } \cs_new:Npn \__str_format_tl_s:NNnnNNn #1#2#3#4#5#6#7 { \exp_args:Nc \exp_args:Nf { __str_format_align_#6:nnnN } - { \exp_args:Nf #2 { \__str_to_other:n {#7} } #3 } + { \exp_args:Nf #2 { \__kernel_str_to_other:n {#7} } #3 } { } {#4} #5 } @@ -275,9 +275,9 @@ { str } { invalid-style-format } {#6} { int } \__str_format_int:NwnnNNn \use:n } - \s__stop {#7} + \s_stop {#7} } -\cs_new:Npn \__str_format_int:NwnnNNn #1#2 \s__stop #3#4#5#6#7 +\cs_new:Npn \__str_format_int:NwnnNNn #1#2 \s_stop #3#4#5#6#7 { \exp_args:Nc \exp_args:Nf { __str_format_align_#6:nnnN } @@ -328,11 +328,11 @@ { str } { invalid-style-format } {#6} { fp } \__str_format_fp:wnnnNNw \__str_format_fp_g:wn } - \s__stop + \s_stop \s__fp \__fp_chk:w #7 #8 } \cs_new:Npn \__str_format_fp:wnnnNNw - #1 \s__stop #2 #3 #4 #5#6 #7 ; + #1 \s_stop #2 #3 #4 #5#6 #7 ; { \exp_args:Nc \exp_args:Nf { __str_format_align_#6:nnnN } @@ -352,7 +352,7 @@ } { \exp_last_unbraced:Nf \__str_format_fp_e_aux:wn - \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2#3 ; { #4 + 1 } + { \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2#3 ; { #4 + 1 } } {#4} } } @@ -371,7 +371,7 @@ { \str_range:nnn { #4#5#6#7 0 } { 2 } { #8 + 1 } } } \__str_format_put:fw { \use_i:nnnn #4 . } - \use_none:n \s__stop + \use_none:n \s_stop } \cs_new:Npn \__str_format_fp_f:wn \s__fp \__fp_chk:w #1#2#3 ; #4 { @@ -383,8 +383,10 @@ } { \exp_last_unbraced:Nf \__str_format_fp_f_aux:wwwn - \fp_to_decimal:n - { abs ( round ( \s__fp \__fp_chk:w #1#2#3 ; , #4 ) ) } + { + \fp_to_decimal:n + { abs ( round ( \s__fp \__fp_chk:w #1#2#3 ; , #4 ) ) } + } . . ; {#4} } @@ -405,8 +407,10 @@ } { \exp_last_unbraced:Nf \__str_format_fp_g_aux:wn - \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2 ; - { \int_max:nn {1} {#3} } + { + \__str_format_fp_round:wn \s__fp \__fp_chk:w #1#2 ; + { \int_max:nn {1} {#3} } + } { \int_max:nn {1} {#3} } } } diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index b09b2eb70fa..55155b60800 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -18,9 +18,9 @@ %% This file is part of the "l3experimental bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: xcoffins.dtx Copyright(C) 2010-2012,2014,2016,2017 The LaTeX3 Project +%% File: xcoffins.dtx Copyright(C) 2010-2012,2014,2016-2018 The LaTeX3 Project \RequirePackage{xparse} -\ProvidesExplPackage{xcoffins}{2018/03/05}{} +\ProvidesExplPackage{xcoffins}{2018-04-30}{} {L3 Experimental design level coffins} \keys_define:nn { coffin } { @@ -145,13 +145,13 @@ \NewDocumentCommand \ScaleCoffin { m m m } { \coffin_scale:Nnn #1 {#2} {#3} } \NewDocumentCommand \CoffinDepth { m } - { \coffin_dp:N #1 } + { \dim_eval:n { \coffin_dp:N #1 } } \NewDocumentCommand \CoffinHeight { m } - { \coffin_ht:N #1 } + { \dim_eval:n { \coffin_ht:N #1 } } \NewDocumentCommand \CoffinTotalHeight { m } - { \__dim_eval:n { \coffin_ht:N #1 + \coffin_dp:N #1 } } + { \dim_eval:n { \coffin_ht:N #1 + \coffin_dp:N #1 } } \NewDocumentCommand \CoffinWidth { m } - { \coffin_wd:N #1 } + { \dim_eval:n { \coffin_wd:N #1 } } \NewDocumentCommand \DisplayCoffinHandles { m m } { \coffin_if_exist:NT #1 { \coffin_display_handles:Nn #1 {#2} } } \NewDocumentCommand \MarkCoffinHandle diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty index 8eda49a62f0..5b7b539bd92 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty @@ -33,7 +33,7 @@ }% \endinput } -\ProvidesExplPackage{l3galley}{2018/03/05}{} +\ProvidesExplPackage{l3galley}{2018-04-30}{} {L3 Experimental galley code} \int_new:N \l__galley_tmp_int \seq_new:N \g__galley_tmpa_seq @@ -199,21 +199,21 @@ \__galley_restore_parameters: \group_end: } -\__scan_new:N \s__par_omit +\scan_new:N \s__galley_par_omit \cs_new_protected:Npn \galley_par: { - \s__par_omit + \s__galley_par_omit \exp_after:wN \__galley_par_auxi: \exp:w \exp_end_continue_f:w } \cs_new_protected:Npn \__galley_par_auxi: { - \peek_meaning:NTF \s__par_omit + \peek_meaning:NTF \s__galley_par_omit { \__galley_par_aux:N } { \__galley_par_auxii: } } \cs_new_protected:Npn \__galley_par_aux:N #1 { - \str_if_eq_x:nnF {#1} { \s__par_omit } + \str_if_eq_x:nnF {#1} { \s__galley_par_omit } { \__galley_par_auxii: #1 @@ -273,7 +273,7 @@ } \cs_new_protected:Npn \galley_par:n #1 { - \s__par_omit + \s__galley_par_omit \bool_if:NF \g__galley_begin_level_bool { #1 @@ -410,7 +410,7 @@ } { \tex_penalty:D - \__int_eval:n { \g__galley_interpar_penalty_user_tl } + \int_eval:n { \g__galley_interpar_penalty_user_tl } \exp_stop_f: \tl_gclear:N \g__galley_interpar_penalty_user_tl } \bool_gset_false:N \g_galley_no_break_next_bool @@ -560,15 +560,15 @@ \cs_new_protected:Npn \__galley_parshape_set_indents:NN #1#2 { \tex_parshape:D - \__int_eval:n - { \int_min:nn { \seq_count:N #1 } { \seq_count:N #2 } } + \int_min:nn { \seq_count:N #1 } { \seq_count:N #2 } + \exp_stop_f: \seq_mapthread_function:NNN #1 #2 \__galley_parshape_set_indents:nn } \cs_new:Npn \__galley_parshape_set_indents:nn #1#2 { - \__dim_eval:n { \l_galley_total_left_margin_dim + #1 } - \__dim_eval:n { \l_galley_text_width_dim - ( #1 + #2 ) } + \dim_eval:n { \l_galley_total_left_margin_dim + #1 } \exp_stop_f: + \dim_eval:n { \l_galley_text_width_dim - ( #1 + #2 ) } \exp_stop_f: } \cs_new_protected:Npn \__galley_parshape_set_cutouts: { @@ -728,7 +728,7 @@ \cs_new_protected:Npn \galley_display_widow_penalties_set:n #1 { \etex_displaywidowpenalties:D - \__int_eval:n { \clist_count:n {#1} + 1 } + \int_eval:n { \clist_count:n {#1} + 1 } \exp_stop_f: \clist_map_function:nN {#1} \__galley_set_aux:n 0 \exp_stop_f: } @@ -736,7 +736,7 @@ \cs_new_protected:Npn \galley_widow_penalties_set:n #1 { \etex_widowpenalties:D - \__int_eval:n { \clist_count:n {#1} + 1 } + \int_eval:n { \clist_count:n {#1} + 1 } \exp_stop_f: \clist_map_function:nN {#1} \__galley_set_aux:n 0 \exp_stop_f: } @@ -757,7 +757,7 @@ \cs_new_protected:Npn \galley_display_club_penalties_set:n #1 { \etex_clubpenalties:D - \__int_eval:n { \clist_count:n {#1} + 1 } + \int_eval:n { \clist_count:n {#1} + 1 } \exp_stop_f: \clist_map_function:nN {#1} \__galley_set_aux:n 0 \exp_stop_f: \__galley_calc_interline_penalties: @@ -767,18 +767,19 @@ { \int_compare:nNnTF { \etex_interlinepenalties:D 0 } = 0 { - \etex_interlinepenalties:D 1 = \__int_eval:n {#1} + \etex_interlinepenalties:D 1 = \int_eval:n {#1} \exp_stop_f: \__galley_calc_interline_penalties: } { \cs_set:Npn \__galley_set_interline_penalty_auxii:n ##1 { - \__int_eval:n + \int_eval:n { \etex_interlinepenalties:D ##1 - \etex_interlinepenalties:D \etex_interlinepenalties:D 0 + #1 } + \exp_stop_f: } \exp_args:Nf \__galley_set_interline_penalty:nn { \clist_count:N \l_galley_line_penalties_clist } {#1} @@ -788,15 +789,14 @@ { \etex_interlinepenalties:D \etex_interlinepenalties:D 0 \exp_stop_f: - \int_step_function:nnnN { 1 } { 1 } {#1} + \int_step_function:nN {#1} \__galley_set_interline_penalty_auxi:n - \int_step_function:nnnN { #1 + 1 } { 1 } - { \etex_interlinepenalties:D 0 - 1 } + \int_step_function:nnN { #1 + 1 } { \etex_interlinepenalties:D 0 - 1 } \__galley_set_interline_penalty_auxii:n - \__int_eval:n {#2} + \int_eval:n {#2} \exp_stop_f: } \cs_new:Npn \__galley_set_interline_penalty_auxi:n #1 - { \etex_interlinepenalties:D \__int_eval:n {#1} } + { \etex_interlinepenalties:D \int_eval:n {#1} \exp_stop_f: } \cs_new:Npn \__galley_set_interline_penalty_auxii:n #1 { } \cs_new_protected:Npn \__galley_calc_interline_penalties: { @@ -815,29 +815,31 @@ \cs_new_protected:Npn \__galley_calc_interline_penalties:nn #1#2 { \etex_interlinepenalties:D #1 ~ - \int_step_function:nnnN { 1 } { 1 } {#2} + \int_step_function:nN {#2} \__galley_calc_interline_penalties_auxi:n - \int_step_function:nnnN { #2 + 1 } { 1 } { #1 - 1 } + \int_step_function:nnN { #2 + 1 } { #1 - 1 } \__galley_calc_interline_penalties_auxii:n \etex_interlinepenalties:D \etex_interlinepenalties:D 0 \exp_stop_f: } \cs_new:Npn \__galley_calc_interline_penalties_auxi:n #1 { - \__int_eval:n + \int_eval:n { \clist_item:Nn \l_galley_line_penalties_clist {#1} + 0 \clist_item:Nn \l_galley_club_penalties_clist {#1} - \etex_clubpenalties:D #1 ~ } + \exp_stop_f: } \cs_new:Npn \__galley_calc_interline_penalties_auxii:n #1 { - \__int_eval:n + \int_eval:n { \etex_interlinepenalties:D \etex_interlinepenalties:D 0 \exp_stop_f: + 0 \clist_item:Nn \l_galley_club_penalties_clist {#1} - \etex_clubpenalties:D #1 ~ } + \exp_stop_f: } \cs_new_protected:Npn \galley_save_club_penalties:N #1 { \clist_set_eq:NN #1 \l_galley_club_penalties_clist } @@ -847,40 +849,37 @@ { \clist_set:Nx #1 { - \int_step_function:nnnN { 1 } { 1 } - { \etex_clubpenalties:D 0 - 1 } + \int_step_function:nN { \etex_clubpenalties:D 0 - 1 } \__galley_save_display_club_penalties:n } } \cs_new:Npn \__galley_save_display_club_penalties:n #1 - { \__int_value:w \etex_clubpenalties:D \__int_eval:n {#1} , } + { \int_value:w \etex_clubpenalties:D \int_eval:n {#1} , } \cs_new_protected:Npn \galley_save_display_widow_penalties:N #1 { \clist_set:Nx #1 { - \int_step_function:nnnN { 1 } { 1 } - { \etex_displaywidowpenalties:D 0 - 1 } + \int_step_function:nN { \etex_displaywidowpenalties:D 0 - 1 } \__galley_save_display_widow_penalties:n } } \cs_new:Npn \__galley_save_display_widow_penalties:n #1 { - \__int_value:w \etex_displaywidowpenalties:D - \__int_eval:n {#1} , + \int_value:w \etex_displaywidowpenalties:D + \int_eval:n {#1} , } \cs_new_protected:Npn \galley_save_widow_penalties:N #1 { \clist_set:Nx #1 { - \int_step_function:nnnN { 1 } { 1 } - { \etex_widowpenalties:D 0 - 1 } + \int_step_function:nN { \etex_widowpenalties:D 0 - 1 } \__galley_save_widow_penalties:n } } \cs_new:Npn \__galley_save_widow_penalties:n #1 - { \__int_value:w \etex_widowpenalties:D \__int_eval:n {#1} , } + { \int_value:w \etex_widowpenalties:D \int_eval:n {#1} , } \cs_new_protected:Npn \galley_interline_penalty: - { \__int_value:w \etex_interlinepenalties:D \etex_interlinepenalties:D 0 \exp_stop_f: } + { \int_value:w \etex_interlinepenalties:D \etex_interlinepenalties:D 0 \exp_stop_f: } \__kernel_msg_new:nnn { galley } { no-line-to-end } { There's~no~line~here~to~end. } \cs_set:Npn \clearpage diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty index c7ca5f1732a..2f7a529d783 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty @@ -21,7 +21,7 @@ %% File: xgalley.dtx Copyright (C) 1999-2001, 2004-2009 Frank Mittelbach %% (C) 2010-2012,2014,2016-2018 The LaTeX3 Project \RequirePackage{xparse} -\ProvidesExplPackage{xgalley}{2018/03/05}{} +\ProvidesExplPackage{xgalley}{2018-04-30}{} {L3 Experimental galley} \RequirePackage{xparse,xtemplate,l3galley} \clist_new:N \l__galley_tmpa_clist -- cgit v1.2.3