From 1fed4553e07e0372e12d6a1ac32f29b3c7a2a538 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 7 Dec 2017 23:16:26 +0000 Subject: l3experimental+l3build (7dec17) git-svn-id: svn://tug.org/texlive/trunk@46013 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/l3experimental/xgalley/l3galley.dtx | 129 ++++++++++----------- .../latex/l3experimental/xgalley/xgalley.dtx | 31 ++--- .../latex/l3experimental/xgalley/xgalley.ins | 4 +- 3 files changed, 84 insertions(+), 80 deletions(-) (limited to 'Master/texmf-dist/source/latex/l3experimental/xgalley') diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx index 643347818cf..dea566a0c17 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx @@ -8,7 +8,7 @@ % license or (at your option) any later version. The latest version % of this license is in the file % -% http://www.latex-project.org/lppl.txt +% https://www.latex-project.org/lppl.txt % % This file is part of the "l3experimental bundle" (The Work in LPPL) % and all files in that bundle must be distributed together. @@ -24,8 +24,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/11/14] -%\@ifpackagelater{expl3}{2017/11/14} +\RequirePackage{expl3}[2017/12/05] +%\@ifpackagelater{expl3}{2017/12/05} % {} % {% % \PackageError{l3galley}{Support package l3kernel too old} @@ -59,7 +59,7 @@ % }^^A % } % -% \date{Released 2017/11/14} +% \date{Released 2017/12/05} % % \maketitle % @@ -685,7 +685,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{l3galley}{2017/11/14}{} +\ProvidesExplPackage{l3galley}{2017/12/05}{} {L3 Experimental galley code} % % \end{macrocode} @@ -1111,7 +1111,7 @@ % \end{macro} % % \begin{macro}{\galley_level:} -% \begin{macro}[aux]{\@@_level_end:} +% \begin{macro}{\@@_level_end:} % Galley levels are created by saving all of the current global % settings, starting a group then initialising both the local and global % variables. @@ -1152,9 +1152,9 @@ % \end{variable} % % \begin{macro}{\galley_par:} -% \begin{macro}[aux]{\@@_par_auxi:, \@@_par_auxii:, \@@_par_auxiii:} -% \begin{macro}[aux]{\@@_par_aux:N} -% \begin{macro}[int]{\@@_par_update_cutout:} +% \begin{macro}{\@@_par_auxi:, \@@_par_auxii:, \@@_par_auxiii:} +% \begin{macro}{\@@_par_aux:N} +% \begin{macro}{\@@_par_update_cutout:} % The idea here is to expand the next token in exactly the same way as \TeX{} % would do anyway. The \texttt{f}-type expansion will ignore any protection, % but will stop at a scan marker. Thus the code can test for an @@ -1315,8 +1315,8 @@ % \subsection{Display levels} % % \begin{macro}{\galley_display_begin:, \galley_display_end:} -% \begin{macro}[aux]{\@@_display_penalty:N, \@@_display_vspace:N} -% \begin{macro}[aux]{\@@_display_par_setup:, \@@_display_par:} +% \begin{macro}{\@@_display_penalty:N, \@@_display_vspace:N} +% \begin{macro}{\@@_display_par_setup:, \@@_display_par:} % Display items within the galley are a bit like galley levels: they % may have different paragraph settings to the main part of the galley. % On the other hand, unlike independent galleys they should inherit the @@ -1497,7 +1497,7 @@ % \end{verbatim} % and so anything applied here must be done globally. % -% \begin{macro}[int]{\@@_start_paragraph_common:N} +% \begin{macro}{\@@_start_paragraph_common:N} % Share some code between all types of paragraph start. % The routine at the start of a paragraph starts by removing any % (empty) indent box from the vertical list. As there may be vertical @@ -1520,7 +1520,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\@@_start_paragraph_std:} +% \begin{macro}{\@@_start_paragraph_std:} % After dealign with the common items, the horizontal mode items can be % tidied up before sorting out any items which have been set on a % single-paragraph basis. @@ -1534,8 +1534,8 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\@@_start_paragraph_first:} -% \begin{macro}[aux]{\@@_insert_vspace_first:} +% \begin{macro}{\@@_start_paragraph_first:} +% \begin{macro}{\@@_insert_vspace_first:} % For the very first paragraph in a galley, the code needs to avoid % adding any unnecessary vertical items at the top as it will interfere with % vertical positioning in \cs{tex_vtop:D}. That requirement also means we @@ -1560,7 +1560,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}[int]{\@@_insert_vertical_items} +% \begin{macro}{\@@_insert_vertical_items} % The aim here is to insert the vertical items such that they attach to % the correct place. This function is used as part of the \cs{tex_everypar:D} % mechanism, meaning that the immediately-preceding item on the vertical @@ -1584,7 +1584,7 @@ } { \tex_penalty:D - \__int_eval:w \g_@@_interpar_penalty_user_tl \__int_eval_end: + \__int_eval:n { \g_@@_interpar_penalty_user_tl } \tl_gclear:N \g_@@_interpar_penalty_user_tl } \bool_gset_false:N \g_galley_no_break_next_bool @@ -1598,7 +1598,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\@@_insert_horizontal_items:} +% \begin{macro}{\@@_insert_horizontal_items:} % Horizontal mode objects start with the whatsits for the next paragraph. An % indent is then included if the removed box was not void. % \begin{macrocode} @@ -1618,7 +1618,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\@@_restore_running_parameters:} +% \begin{macro}{\@@_restore_running_parameters:} % Restoring the ongoing parameters just means using the token list % variable in which the appropriate assignments are stored. The % list can then be cleared. @@ -1703,7 +1703,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\@@_parshape_set:nnnN} +% \begin{macro}{\@@_parshape_set:nnnN} % Setting the paragraph shape starts by converting the two input lists into % sequences. The shape is then set using a mapping with allowance for the % unaltered lines and the possibility of resuming the measure. The unaltered @@ -1738,8 +1738,8 @@ % handling from the measure and shape. % % \begin{macro}{\galley_cutout_left:nn, \galley_cutout_right:nn} -% \begin{macro}[aux]{\@@_cutout:nnn} -% \begin{macro}[int]{\@@_cutout:NN, \@@_cutout:cN, \@@_cutout:Nc} +% \begin{macro}{\@@_cutout:nnn} +% \begin{macro}{\@@_cutout:NN, \@@_cutout:cN, \@@_cutout:Nc} % Setting up cutouts on the two sides of the paragraph is more or less % the same idea with one or two very specific points of difference. As such, % the two interface functions both use the same implementation. @@ -1798,17 +1798,17 @@ % % \subsection{Setting the primitive paragraph shape} % -% \begin{macro}[int]{\@@_parshape_set:} -% \begin{macro}[aux] +% \begin{macro}{\@@_parshape_set:} +% \begin{macro} % { % \@@_parshape_set_margins:, % \@@_parshape_set_indents:, % \@@_parshape_set_cutouts: % } -% \begin{macro}[aux]{\@@_parshape_set_indents:NN} -% \begin{macro}[aux, rEXP]{\@@_parshape_set_indents:nn} -% \begin{macro}[aux]{\@@_parshape_set_cutouts:n} -% \begin{macro}[aux]{\@@_parshape_set_cutouts:N} +% \begin{macro}{\@@_parshape_set_indents:NN} +% \begin{macro}[rEXP]{\@@_parshape_set_indents:nn} +% \begin{macro}{\@@_parshape_set_cutouts:n} +% \begin{macro}{\@@_parshape_set_cutouts:N} % The real paragraph shape (\cs{tex_parshape:D}) is set whenever any % of the conceptual elements (margins, measure, cutouts) are set and % potentially at the end of a paragraph in the cases where a single-paragraph @@ -1863,18 +1863,15 @@ \cs_new_protected:Npn \@@_parshape_set_indents:NN #1#2 { \tex_parshape:D - \__int_eval:w - \int_min:nn { \seq_count:N #1 } { \seq_count:N #2 } - \__int_eval_end: + \__int_eval:n + { \int_min:nn { \seq_count:N #1 } { \seq_count:N #2 } } \seq_mapthread_function:NNN #1 #2 \@@_parshape_set_indents:nn } \cs_new:Npn \@@_parshape_set_indents:nn #1#2 { - \__dim_eval:w \l_galley_total_left_margin_dim + ( #1 ) \__dim_eval_end: - \__dim_eval:w - \l_galley_text_width_dim - ( ( #1 ) + ( #2 ) ) - \__dim_eval_end: + \__dim_eval:n { \l_galley_total_left_margin_dim + #1 } + \__dim_eval:n { \l_galley_text_width_dim - ( #1 + #2 ) } } % \end{macrocode} % Calculating cutouts is by far the most complex operation here. The @@ -2217,7 +2214,7 @@ % \galley_widow_penalties_set:V, % \galley_widow_penalties_set:v % } -% \begin{macro}[aux]{\@@_set_aux:n} +% \begin{macro}{\@@_set_aux:n} % By far the easiest penalties to deal with are those for widows. These % work exactly as the names imply, with the display version only used % immediately before display math, and the standard penalty used at the end @@ -2228,7 +2225,7 @@ \cs_new_protected:Npn \galley_display_widow_penalties_set:n #1 { \etex_displaywidowpenalties:D - \__int_eval:w \clist_count:n {#1} + 1 \__int_eval_end: + \__int_eval:n { \clist_count:n {#1} + 1 } \clist_map_function:nN {#1} \@@_set_aux:n 0 \exp_stop_f: } @@ -2236,7 +2233,7 @@ \cs_new_protected:Npn \galley_widow_penalties_set:n #1 { \etex_widowpenalties:D - \__int_eval:w \clist_count:n {#1} + 1 \__int_eval_end: + \__int_eval:n { \clist_count:n {#1} + 1 } \clist_map_function:nN {#1} \@@_set_aux:n 0 \exp_stop_f: } @@ -2287,7 +2284,7 @@ \cs_new_protected:Npn \galley_display_club_penalties_set:n #1 { \etex_clubpenalties:D - \__int_eval:w \clist_count:n {#1} + 1 \__int_eval_end: + \__int_eval:n { \clist_count:n {#1} + 1 } \clist_map_function:nN {#1} \@@_set_aux:n 0 \exp_stop_f: \@@_calc_interline_penalties: @@ -2297,8 +2294,8 @@ % \end{macro} % % \begin{macro}{\galley_interline_penalty_set:n} -% \begin{macro}[aux]{\@@_set_interline_penalty:nn} -% \begin{macro}[aux] +% \begin{macro}{\@@_set_interline_penalty:nn} +% \begin{macro} % { % \@@_set_interline_penalty_auxi:n, % \@@_set_interline_penalty_auxii:n @@ -2310,22 +2307,22 @@ % generic build system is invoked (in case the % \cs{etex_interlinepenalties:D} has accidentally been cleared). % \begin{macrocode} -\__debug_patch_args:nNNpn { { (#1) } } \cs_new_protected:Npn \galley_interline_penalty_set:n #1 { \int_compare:nNnTF { \etex_interlinepenalties:D 0 } = 0 { - \etex_interlinepenalties:D 1 = \__int_eval:w #1 \__int_eval_end: + \etex_interlinepenalties:D 1 = \__int_eval:n {#1} \@@_calc_interline_penalties: } { \cs_set:Npn \@@_set_interline_penalty_auxii:n ##1 { - \__int_eval:w - \etex_interlinepenalties:D ##1 - - \etex_interlinepenalties:D \etex_interlinepenalties:D 0 - + #1 - \__int_eval_end: + \__int_eval:n + { + \etex_interlinepenalties:D ##1 + - \etex_interlinepenalties:D \etex_interlinepenalties:D 0 + + #1 + } } \exp_args:Nf \@@_set_interline_penalty:nn { \clist_count:N \l_galley_line_penalties_clist } {#1} @@ -2340,19 +2337,19 @@ \int_step_function:nnnN { #1 + 1 } { 1 } { \etex_interlinepenalties:D 0 - 1 } \@@_set_interline_penalty_auxii:n - \__int_eval:w #2 \__int_eval_end: + \__int_eval:n {#2} } \cs_new:Npn \@@_set_interline_penalty_auxi:n #1 - { \etex_interlinepenalties:D \__int_eval:w #1 \__int_eval_end: } + { \etex_interlinepenalties:D \__int_eval:n {#1} } \cs_new:Npn \@@_set_interline_penalty_auxii:n #1 { } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % -% \begin{macro}[int]{\@@_calc_interline_penalties:} -% \begin{macro}[aux]{\@@_calc_interline_penalties:nn} -% \begin{macro}[aux] +% \begin{macro}{\@@_calc_interline_penalties:} +% \begin{macro}{\@@_calc_interline_penalties:nn} +% \begin{macro} % { % \@@_calc_interline_penalties_auxi:n, % \@@_calc_interline_penalties_auxii:n @@ -2395,19 +2392,21 @@ } \cs_new:Npn \@@_calc_interline_penalties_auxi:n #1 { - \__int_eval:w + \__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 ~ - \__int_eval_end: + + 0 \clist_item:Nn \l_galley_club_penalties_clist {#1} + - \etex_clubpenalties:D #1 ~ + } } \cs_new:Npn \@@_calc_interline_penalties_auxii:n #1 { - \__int_eval:w + \__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 ~ - \__int_eval_end: + + 0 \clist_item:Nn \l_galley_club_penalties_clist {#1} + - \etex_clubpenalties:D #1 ~ + } } % \end{macrocode} % \end{macro} @@ -2422,7 +2421,7 @@ % \galley_save_display_widow_penalties:N, % \galley_save_widow_penalties:N % } -% \begin{macro}[aux] +% \begin{macro} % { % \@@_save_display_club_penalties:n, % \@@_save_display_widow_penalties:n, @@ -2450,7 +2449,7 @@ } } \cs_new:Npn \@@_save_display_club_penalties:n #1 - { \__int_value:w \etex_clubpenalties:D \__int_eval:w #1 \__int_eval_end: , } + { \__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 @@ -2463,7 +2462,7 @@ \cs_new:Npn \@@_save_display_widow_penalties:n #1 { \__int_value:w \etex_displaywidowpenalties:D - \__int_eval:w #1 \__int_eval_end: , + \__int_eval:n {#1} , } \cs_new_protected:Npn \galley_save_widow_penalties:N #1 { @@ -2475,7 +2474,7 @@ } } \cs_new:Npn \@@_save_widow_penalties:n #1 - { \__int_value:w \etex_widowpenalties:D \__int_eval:w #1 \__int_eval_end: , } + { \__int_value:w \etex_widowpenalties:D \__int_eval:n {#1} , } % \end{macrocode} % This one is not an array, but is stored in a primitive, so there is % a simple conversion. The general interline penalty is always the diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx index 8f4344592fd..b8b07b405b5 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx @@ -8,7 +8,7 @@ % license or (at your option) any later version. The latest version % of this license is in the file % -% http://www.latex-project.org/lppl.txt +% https://www.latex-project.org/lppl.txt % % This file is part of the "l3experimental bundle" (The Work in LPPL) % and all files in that bundle must be distributed together. @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Released 2017/11/14} +% \date{Released 2017/12/05} % % \maketitle % @@ -732,7 +732,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2017/11/14}{} +\ProvidesExplPackage{xgalley}{2017/12/05}{} {L3 Experimental galley} \RequirePackage{xparse,xtemplate,l3galley} % \end{macrocode} @@ -1402,6 +1402,7 @@ % \end{macrocode} % A bit more complex for the array penalties. Although the interface here % does not expose the arrays, it is necessary to correctly save them. +% We suspend debugging to allow an assignment to a constant. % \begin{macrocode} \seq_map_inline:Nn \c_@@_parbreak_multi_seq { @@ -1417,16 +1418,20 @@ } } } -\seq_new:N \c_@@_parbreak_multi_seq -\seq_gput_right:Nn \c_@@_parbreak_multi_seq { club_penalties } -\seq_gput_right:Nn \c_@@_parbreak_multi_seq { display_club_penalties } -\seq_gput_right:Nn \c_@@_parbreak_multi_seq { display_widow_penalties } -\seq_gput_right:Nn \c_@@_parbreak_multi_seq { widow_penalties } -\seq_new:N \c_@@_parbreak_single_seq -\seq_gput_right:Nn \c_@@_parbreak_single_seq { parbreak_badness } -\seq_gput_right:Nn \c_@@_parbreak_single_seq { broken_penalty } -\seq_gput_right:Nn \c_@@_parbreak_single_seq { post_display_penalty } -\seq_gput_right:Nn \c_@@_parbreak_single_seq { pre_display_penalty } +\seq_const_from_clist:Nn \c_@@_parbreak_multi_seq + { + club_penalties , + display_club_penalties , + display_widow_penalties , + widow_penalties , + } +\seq_const_from_clist:Nn \c_@@_parbreak_single_seq + { + parbreak_badness , + broken_penalty , + post_display_penalty , + pre_display_penalty , + } % \end{macrocode} % \end{variable} % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.ins b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.ins index 1d10cd47277..5ef421779d4 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.ins +++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.ins @@ -1,6 +1,6 @@ \iffalse meta-comment -File xgalley.ins Copyright (C) 2010-2012,2016 The LaTeX3 Project +File xgalley.ins Copyright (C) 2010-2012,2016,2017 The LaTeX3 Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -32,7 +32,7 @@ license information is placed in the derived files. \preamble -Copyright (C) 2010-2016 The LaTeX3 Project +Copyright (C) 2010-2017 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 -- cgit v1.2.3