diff options
Diffstat (limited to 'Master/texmf-dist/tex')
7 files changed, 112 insertions, 79 deletions
diff --git a/Master/texmf-dist/tex/latex/l3build/l3build.lua b/Master/texmf-dist/tex/latex/l3build/l3build.lua index 9fd1faa3f40..5c5469375b9 100644 --- a/Master/texmf-dist/tex/latex/l3build/l3build.lua +++ b/Master/texmf-dist/tex/latex/l3build/l3build.lua @@ -23,7 +23,7 @@ for those people who are interested. --]] -- Version information -release_date = "2017/11/25" +release_date = "2017/12/06" -- "module" is a deprecated function in Lua 5.2: as we want the name -- for other purposes, and it should eventually be 'free', simply @@ -61,24 +61,25 @@ end -- Directory structure for the build system -- Use Unix-style path separators -maindir = maindir or "." +maindir = maindir or "." --- Substructure for tests and support files +-- Substructure for file locations +docfiledir = docfiledir or maindir +supportdir = supportdir or maindir .. "/support" testfiledir = testfiledir or "testfiles" testsuppdir = testsuppdir or testfiledir .. "/support" -supportdir = supportdir or maindir .. "/support" -- Structure within a development area -distribdir = distribdir or maindir .. "/build/distrib" -localdir = localdir or maindir .. "/build/local" -testdir = testdir or maindir .. "/build/test" -typesetdir = typesetdir or maindir .. "/build/doc" -unpackdir = unpackdir or maindir .. "/build/unpacked" +distribdir = distribdir or maindir .. "/build/distrib" +localdir = localdir or maindir .. "/build/local" +testdir = testdir or maindir .. "/build/test" +typesetdir = typesetdir or maindir .. "/build/doc" +unpackdir = unpackdir or maindir .. "/build/unpacked" -- Substructure for CTAN release material -ctandir = ctandir or distribdir .. "/ctan" -tdsdir = tdsdir or distribdir .. "/tds" -tdsroot = tdsroot or "latex" +ctandir = ctandir or distribdir .. "/ctan" +tdsdir = tdsdir or distribdir .. "/tds" +tdsroot = tdsroot or "latex" -- Location for installation on CTAN or in TEXMFHOME if bundle == "" then @@ -108,7 +109,6 @@ sourcefiles = sourcefiles or {"*.dtx", "*.ins"} textfiles = textfiles or {"*.md", "*.txt"} typesetdemofiles = typesetdemofiles or { } typesetfiles = typesetfiles or {"*.dtx"} -docfiledir = docfiledir or maindir typesetsuppfiles = typesetsuppfiles or { } typesetsourcefiles = typesetsourcefiles or { } unpackfiles = unpackfiles or {"*.ins"} @@ -176,6 +176,7 @@ maxprintline = maxprintline or 79 packtdszip = packtdszip or false scriptname = scriptname or "build.lua" typesetcmds = typesetcmds or "" +typesetruns = typesetruns or 2 versionform = versionform or "" recordstatus = recordstatus or false @@ -681,9 +682,9 @@ function tree(path, glob) return true end function is_dir(file) - return lfs.attributes(file)["mode"] == "directory" + return lfs_attributes(file)["mode"] == "directory" end - local dirs = {["."]=cropdots(path)} + local dirs = {["."] = cropdots(path)} for pattern, critereon in gmatch(cropdots(glob), "([^/]+)(/?)") do local critereon = critereon == "/" and is_dir or always_true function fill(path, dir, table) @@ -691,8 +692,8 @@ function tree(path, glob) local fullpath = path .. "/" .. file if file ~= "." and file ~= ".." and fullpath ~= maindir .. "/build" and - (string.sub(pattern, 1, 1) == "." - or string.sub(file, 1, 1) ~= ".") + (sub(pattern, 1, 1) == "." + or sub(file, 1, 1) ~= ".") then local fulldir = dir .. "/" .. file if critereon(fulldir) then @@ -1011,6 +1012,36 @@ local function formatlog(logfile, newfile, engine, errlevels) for i = 0, 31 do line = gsub(line, char(i), "^^" .. char(64 + i)) end + -- Normalise register allocation to hard-coded numbers + -- No regex, so use a pattern plus lookup approach + local register_types = { + attribute = true, + box = true, + bytecode = true, + catcodetable = true, + count = true, + dimen = true, + insert = true, + language = true, + luabytecode = true, + luachunk = true, + luafunction = true, + marks = true, + muskip = true, + read = true, + skip = true, + toks = true, + whatsit = true, + write = true, + XeTeXcharclass = true + } + if register_types[match(line, "^\\[^%]]+=\\([a-z]+)%d+$")] then + line = gsub(line, "%d+$", "...") + end + -- Also deal with showing boxes + if match(line, "^> \\box%d+=$") or match(line, "^> \\box%d+=(void)$") then + line = gsub(line, "%d+=", "...=") + end -- Remove 'normal' direction information on boxes with (u)pTeX line = gsub(line, ",? yoko direction,?", "") line = gsub(line, ",? yoko%(math%) direction,?", "") @@ -1738,9 +1769,9 @@ typeset = typeset or function(file, dir) tex(file, dir) ) end - errorlevel = cycle(name, dir) - if errorlevel == 0 then + for i = 1, typesetruns do errorlevel = cycle(name, dir) + if errorlevel ~= 0 then break end end end return errorlevel 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 4edbc93f067..a21d8bb3936 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-2017 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3str-convert}{2017/11/14}{} +\ProvidesExplPackage{l3str-convert}{2017/12/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 } } @@ -425,7 +425,7 @@ \group_end: \cs_new_protected:Npn \__str_convert_decode_clist: { - \clist_set:No \g__str_result_tl \g__str_result_tl + \clist_gset:No \g__str_result_tl \g__str_result_tl \tl_gset:Nx \g__str_result_tl { \exp_args:No \clist_map_function:nN 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 b2c8c75fbd0..34fc37267e9 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 @@ -20,10 +20,9 @@ %% %% File: l3str-convert.dtx Copyright (C) 2013-2017 The LaTeX3 Project \group_begin: - \char_set_lccode:nn {`\*} {`\\} \char_set_catcode_other:N \^^J \char_set_catcode_other:N \^^M - \tex_lowercase:D + \cs_set_protected:Npn \__str_tmp:w #1 { \cs_new_protected:Npn \__str_convert_unescape_string: { @@ -40,15 +39,17 @@ \tl_gset:Nx \g__str_result_tl { \exp_after:wN \__str_unescape_string_loop:wNNN - \g__str_result_tl * ?? { ? \__prg_break: } + \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 } { } \group_end: } - \cs_new:Npn \__str_unescape_string_loop:wNNN #1 *#2#3#4 } + \exp_args:No \__str_tmp:w { \c_backslash_str } + \exp_last_unbraced:NNNNo + \cs_new:Npn \__str_unescape_string_loop:wNNN #1 \c_backslash_str #2#3#4 { \__str_filter_bytes:n {#1} \use_none:n #4 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 aa80b2781e1..8b645158d2a 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty @@ -18,11 +18,10 @@ %% This file is part of the "l3experimental bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: l3str-format.dtx Copyright (C) 2012-2013,2015-2017 The LaTeX3 Project +%% File: l3str-format.dtx Copyright (C) 2012-2017 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3str-format}{2017/11/14}{} +\ProvidesExplPackage{l3str-format}{2017/12/05}{} {L3 Experimental string formatting} -\RequirePackage{l3str} \cs_generate_variant:Nn \use:nn { nf } \cs_generate_variant:Nn \use:nnn { fnf } \cs_generate_variant:Nn \tl_to_str:n { f } @@ -374,7 +373,6 @@ \__str_format_put:fw { \use_i:nnnn #4 . } \use_none:n \s__stop } - } \cs_new:Npn \__str_format_fp_f:wn \s__fp \__fp_chk:w #1#2#3 ; #4 { \int_case:nnF {#1} diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index 3865ba55a5b..c89aae0aa45 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -6,7 +6,7 @@ %% %% xcoffins.dtx (with options: `package') %% -%% 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 @@ -20,7 +20,7 @@ %% %% File: xcoffins.dtx Copyright(C) 2010-2012,2014,2016,2017 The LaTeX3 Project \RequirePackage{xparse} -\ProvidesExplPackage{xcoffins}{2017/11/14}{} +\ProvidesExplPackage{xcoffins}{2017/12/05}{} {L3 Experimental design level coffins} \keys_define:nn { coffin } { @@ -149,7 +149,7 @@ \NewDocumentCommand \CoffinHeight { m } { \coffin_ht:N #1 } \NewDocumentCommand \CoffinTotalHeight { m } - { \__dim_eval:w \coffin_ht:N #1 + \coffin_dp:N #1 \__dim_eval_end: } + { \__dim_eval:n { \coffin_ht:N #1 + \coffin_dp:N #1 } } \NewDocumentCommand \CoffinWidth { m } { \coffin_wd:N #1 } \NewDocumentCommand \DisplayCoffinHandles { m m } diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty index b85be4e7390..4793d610dfa 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty @@ -6,7 +6,7 @@ %% %% l3galley.dtx (with options: `package') %% -%% 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 @@ -20,8 +20,8 @@ %% %% File: l3galley.dtx Copyright (C) 1999-2001, 2004-2009 Frank Mittelbach %% (C) 2010-2017 The LaTeX3 Project -\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} @@ -33,7 +33,7 @@ }% \endinput } -\ProvidesExplPackage{l3galley}{2017/11/14}{} +\ProvidesExplPackage{l3galley}{2017/12/05}{} {L3 Experimental galley code} \int_new:N \l__galley_tmp_int \seq_new:N \g__galley_tmpa_seq @@ -410,7 +410,7 @@ } { \tex_penalty:D - \__int_eval:w \g__galley_interpar_penalty_user_tl \__int_eval_end: + \__int_eval:n { \g__galley_interpar_penalty_user_tl } \tl_gclear:N \g__galley_interpar_penalty_user_tl } \bool_gset_false:N \g_galley_no_break_next_bool @@ -560,18 +560,15 @@ \cs_new_protected:Npn \__galley_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 \__galley_parshape_set_indents:nn } \cs_new:Npn \__galley_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 ) } } \cs_new_protected:Npn \__galley_parshape_set_cutouts: { @@ -731,7 +728,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} \__galley_set_aux:n 0 \exp_stop_f: } @@ -739,7 +736,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} \__galley_set_aux:n 0 \exp_stop_f: } @@ -760,28 +757,28 @@ \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} \__galley_set_aux:n 0 \exp_stop_f: \__galley_calc_interline_penalties: } \cs_generate_variant:Nn \galley_display_club_penalties_set:n { V , v } -\__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} \__galley_calc_interline_penalties: } { \cs_set:Npn \__galley_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 \__galley_set_interline_penalty:nn { \clist_count:N \l_galley_line_penalties_clist } {#1} @@ -796,10 +793,10 @@ \int_step_function:nnnN { #1 + 1 } { 1 } { \etex_interlinepenalties:D 0 - 1 } \__galley_set_interline_penalty_auxii:n - \__int_eval:w #2 \__int_eval_end: + \__int_eval:n {#2} } \cs_new:Npn \__galley_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 \__galley_set_interline_penalty_auxii:n #1 { } \cs_new_protected:Npn \__galley_calc_interline_penalties: { @@ -826,19 +823,21 @@ } \cs_new:Npn \__galley_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 \__galley_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 ~ + } } \cs_new_protected:Npn \galley_save_club_penalties:N #1 { \clist_set_eq:NN #1 \l_galley_club_penalties_clist } @@ -854,7 +853,7 @@ } } \cs_new:Npn \__galley_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 @@ -867,7 +866,7 @@ \cs_new:Npn \__galley_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 { @@ -879,7 +878,7 @@ } } \cs_new:Npn \__galley_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} , } \cs_new_protected:Npn \galley_interline_penalty: { \__int_value:w \etex_interlinepenalties:D \etex_interlinepenalties:D 0 \exp_stop_f: } \__msg_kernel_new:nnn { galley } { no-line-to-end } diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty index ba0ffc06718..6704e6375ad 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty @@ -6,7 +6,7 @@ %% %% xgalley.dtx (with options: `package') %% -%% 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 @@ -21,7 +21,7 @@ %% File: xgalley.dtx Copyright (C) 1999-2001, 2004-2009 Frank Mittelbach %% (C) 2010-2012,2014,2016-2017 The LaTeX3 Project \RequirePackage{xparse} -\ProvidesExplPackage{xgalley}{2017/11/14}{} +\ProvidesExplPackage{xgalley}{2017/12/05}{} {L3 Experimental galley} \RequirePackage{xparse,xtemplate,l3galley} \clist_new:N \l__galley_tmpa_clist @@ -466,16 +466,20 @@ } } } -\seq_new:N \c__galley_parbreak_multi_seq -\seq_gput_right:Nn \c__galley_parbreak_multi_seq { club_penalties } -\seq_gput_right:Nn \c__galley_parbreak_multi_seq { display_club_penalties } -\seq_gput_right:Nn \c__galley_parbreak_multi_seq { display_widow_penalties } -\seq_gput_right:Nn \c__galley_parbreak_multi_seq { widow_penalties } -\seq_new:N \c__galley_parbreak_single_seq -\seq_gput_right:Nn \c__galley_parbreak_single_seq { parbreak_badness } -\seq_gput_right:Nn \c__galley_parbreak_single_seq { broken_penalty } -\seq_gput_right:Nn \c__galley_parbreak_single_seq { post_display_penalty } -\seq_gput_right:Nn \c__galley_parbreak_single_seq { pre_display_penalty } +\seq_const_from_clist:Nn \c__galley_parbreak_multi_seq + { + club_penalties , + display_club_penalties , + display_widow_penalties , + widow_penalties , + } +\seq_const_from_clist:Nn \c__galley_parbreak_single_seq + { + parbreak_badness , + broken_penalty , + post_display_penalty , + pre_display_penalty , + } \DeclareInstance { paragraph-breaking } { single-std } { single } { } \DeclareInstance { paragraph-breaking } { single-nobreak } { single } { |