diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
9 files changed, 121 insertions, 108 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index ba488f19c58..dddac0128ed 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 Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018-12-11}% +\def\ExplFileDate{2018-12-12}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -4988,6 +4988,104 @@ } \cs_new:Npn \tl_rand_item:N { \exp_args:No \tl_rand_item:n } \cs_generate_variant:Nn \tl_rand_item:N { c } +\cs_new:Npn \tl_range:Nnn { \exp_args:No \tl_range:nnn } +\cs_generate_variant:Nn \tl_range:Nnn { c } +\cs_new:Npn \tl_range:nnn { \__tl_range:Nnnn \__tl_range:w } +\cs_new:Npn \__tl_range:Nnnn #1#2#3#4 + { + \tl_head:f + { + \exp_args:Nf \__tl_range:nnnNn + { \tl_count:n {#2} } {#3} {#4} #1 {#2} + } + } +\cs_new:Npn \__tl_range:nnnNn #1#2#3 + { + \exp_args:Nff \__tl_range:nnNn + { + \exp_args:Nf \__tl_range_normalize:nn + { \int_eval:n { #2 - 1 } } {#1} + } + { + \exp_args:Nf \__tl_range_normalize:nn + { \int_eval:n {#3} } {#1} + } + } +\cs_new:Npn \__tl_range:nnNn #1#2#3#4 + { + \if_int_compare:w #2 > #1 \exp_stop_f: \else: + \exp_after:wN { \exp_after:wN } + \fi: + \exp_after:wN #3 + \int_value:w \int_eval:n { #2 - #1 } \exp_after:wN ; + \exp_after:wN { \exp:w \__tl_range_skip:w #1 ; { } #4 } + } +\cs_new:Npn \__tl_range_skip:w #1 ; #2 + { + \if_int_compare:w #1 > 0 \exp_stop_f: + \exp_after:wN \__tl_range_skip:w + \int_value:w \int_eval:n { #1 - 1 } \exp_after:wN ; + \else: + \exp_after:wN \exp_end: + \fi: + } +\cs_new:Npn \__tl_range:w #1 ; #2 + { + \exp_args:Nf \__tl_range_collect:nn + { \__tl_range_skip_spaces:n {#2} } {#1} + } +\cs_new:Npn \__tl_range_skip_spaces:n #1 + { + \tl_if_head_is_space:nTF {#1} + { \exp_args:Nf \__tl_range_skip_spaces:n {#1} } + { { } #1 } + } +\cs_new:Npn \__tl_range_collect:nn #1#2 + { + \int_compare:nNnTF {#2} = 0 + {#1} + { + \exp_args:No \tl_if_head_is_space:nTF { \use_none:n #1 } + { + \exp_args:Nf \__tl_range_collect:nn + { \__tl_range_collect_space:nw #1 } + {#2} + } + { + \__tl_range_collect:ff + { + \exp_args:No \tl_if_head_is_N_type:nTF { \use_none:n #1 } + { \__tl_range_collect_N:nN } + { \__tl_range_collect_group:nn } + #1 + } + { \int_eval:n { #2 - 1 } } + } + } + } +\cs_new:Npn \__tl_range_collect_space:nw #1 ~ { { #1 ~ } } +\cs_new:Npn \__tl_range_collect_N:nN #1#2 { { #1 #2 } } +\cs_new:Npn \__tl_range_collect_group:nn #1#2 { { #1 {#2} } } +\cs_generate_variant:Nn \__tl_range_collect:nn { ff } +\cs_new:Npn \__tl_range_normalize:nn #1#2 + { + \int_eval:n + { + \if_int_compare:w #1 < 0 \exp_stop_f: + \if_int_compare:w #1 < -#2 \exp_stop_f: + 0 + \else: + #1 + #2 + 1 + \fi: + \else: + \if_int_compare:w #1 < #2 \exp_stop_f: + #1 + \else: + #2 + \fi: + \fi: + } + } \cs_new_protected:Npn \tl_show:N { \__tl_show:NN \tl_show:n } \cs_generate_variant:Nn \tl_show:N { c } \cs_new_protected:Npn \tl_log:N { \__tl_show:NN \tl_log:n } @@ -10322,6 +10420,15 @@ \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 { \ior_close:N #1 @@ -24958,7 +25065,6 @@ \group_end: } %% File: l3candidates.dtx Copyright (C) 2012-2018 The LaTeX3 Project - \cs_new_protected:Npn \mode_leave_vertical: { \if_mode_vertical: @@ -27069,9 +27175,6 @@ #2 #1 \exp_args:Nc \__tl_build_end_loop:NN { \cs_to_str:N #1 ' } #2 } -\cs_new:Npn \tl_range:Nnn { \exp_args:No \tl_range:nnn } -\cs_generate_variant:Nn \tl_range:Nnn { c } -\cs_new:Npn \tl_range:nnn { \__tl_range:Nnnn \__tl_range:w } \cs_new:Npn \tl_range_braced:Nnn { \exp_args:No \tl_range_braced:nnn } \cs_generate_variant:Nn \tl_range_braced:Nnn { c } \cs_new:Npn \tl_range_braced:nnn { \__tl_range:Nnnn \__tl_range_braced:w } @@ -27080,44 +27183,6 @@ \cs_generate_variant:Nn \tl_range_unbraced:Nnn { c } \cs_new:Npn \tl_range_unbraced:nnn { \__tl_range:Nnnn \__tl_range_unbraced:w } -\cs_new:Npn \__tl_range:Nnnn #1#2#3#4 - { - \tl_head:f - { - \exp_args:Nf \__tl_range:nnnNn - { \tl_count:n {#2} } {#3} {#4} #1 {#2} - } - } -\cs_new:Npn \__tl_range:nnnNn #1#2#3 - { - \exp_args:Nff \__tl_range:nnNn - { - \exp_args:Nf \__tl_range_normalize:nn - { \int_eval:n { #2 - 1 } } {#1} - } - { - \exp_args:Nf \__tl_range_normalize:nn - { \int_eval:n {#3} } {#1} - } - } -\cs_new:Npn \__tl_range:nnNn #1#2#3#4 - { - \if_int_compare:w #2 > #1 \exp_stop_f: \else: - \exp_after:wN { \exp_after:wN } - \fi: - \exp_after:wN #3 - \int_value:w \int_eval:n { #2 - #1 } \exp_after:wN ; - \exp_after:wN { \exp:w \__tl_range_skip:w #1 ; { } #4 } - } -\cs_new:Npn \__tl_range_skip:w #1 ; #2 - { - \if_int_compare:w #1 > 0 \exp_stop_f: - \exp_after:wN \__tl_range_skip:w - \int_value:w \int_eval:n { #1 - 1 } \exp_after:wN ; - \else: - \exp_after:wN \exp_end: - \fi: - } \cs_new:Npn \__tl_range_braced:w #1 ; #2 { \__tl_range_collect_braced:w #1 ; { } #2 } \cs_new:Npn \__tl_range_unbraced:w #1 ; #2 @@ -27138,63 +27203,6 @@ \fi: { #2 #3 } } -\cs_new:Npn \__tl_range:w #1 ; #2 - { - \exp_args:Nf \__tl_range_collect:nn - { \__tl_range_skip_spaces:n {#2} } {#1} - } -\cs_new:Npn \__tl_range_skip_spaces:n #1 - { - \tl_if_head_is_space:nTF {#1} - { \exp_args:Nf \__tl_range_skip_spaces:n {#1} } - { { } #1 } - } -\cs_new:Npn \__tl_range_collect:nn #1#2 - { - \int_compare:nNnTF {#2} = 0 - {#1} - { - \exp_args:No \tl_if_head_is_space:nTF { \use_none:n #1 } - { - \exp_args:Nf \__tl_range_collect:nn - { \__tl_range_collect_space:nw #1 } - {#2} - } - { - \__tl_range_collect:ff - { - \exp_args:No \tl_if_head_is_N_type:nTF { \use_none:n #1 } - { \__tl_range_collect_N:nN } - { \__tl_range_collect_group:nn } - #1 - } - { \int_eval:n { #2 - 1 } } - } - } - } -\cs_new:Npn \__tl_range_collect_space:nw #1 ~ { { #1 ~ } } -\cs_new:Npn \__tl_range_collect_N:nN #1#2 { { #1 #2 } } -\cs_new:Npn \__tl_range_collect_group:nn #1#2 { { #1 {#2} } } -\cs_generate_variant:Nn \__tl_range_collect:nn { ff } -\cs_new:Npn \__tl_range_normalize:nn #1#2 - { - \int_eval:n - { - \if_int_compare:w #1 < 0 \exp_stop_f: - \if_int_compare:w #1 < -#2 \exp_stop_f: - 0 - \else: - #1 + #2 + 1 - \fi: - \else: - \if_int_compare:w #1 < #2 \exp_stop_f: - #1 - \else: - #2 - \fi: - \fi: - } - } \group_begin: \char_set_catcode_active:N * \char_set_lccode:nn { `* } { `\ } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index c4ea2bf7ceb..72b02297075 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 Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018-12-11}% +\def\ExplFileDate{2018-12-12}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \def\tempa{LaTeX2e}% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua index 36b5f631f31..be9b741ca6c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -34,7 +34,9 @@ local byte = string.byte local floor = math.floor local format = string.format local gsub = string.gsub -local kpse_find = kpse.find_file +if not resolvers then + local kpse_find = kpse.find_file +end local lfs_attr = lfs.attributes local md5_sum = md5.sum local open = io.open @@ -44,6 +46,9 @@ local setcatcode = tex.setcatcode local sprint = tex.sprint local write = tex.write local utf8_char = unicode.utf8.char +if resolvers then + kpse_find = resolvers.findfile +end local function escapehex(str) write((gsub(str, ".", function (ch) return format("%02X", byte(ch)) end))) diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index f7b148c2e86..0913dd3c2c2 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 Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018-12-11}% +\def\ExplFileDate{2018-12-12}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index 788d4e7af17..58a71114065 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 Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvidpfmx.def}{2018-12-11}{} + {l3dvidpfmx.def}{2018-12-12}{} {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 7eca794eb53..24109c6cbf9 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 Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvips.def}{2018-12-11}{} + {l3dvips.def}{2018-12-12}{} {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 669fff8398c..24236fac527 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 Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvisvgm.def}{2018-12-11}{} + {l3dvisvgm.def}{2018-12-12}{} {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 aff9a0e06bb..1b3ab9ce6b6 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 Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3pdfmode.def}{2018-12-11}{} + {l3pdfmode.def}{2018-12-12}{} {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 a6920092432..7593a064a27 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 Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3xdvidpfmx.def}{2018-12-11}{} + {l3xdvidpfmx.def}{2018-12-12}{} {L3 Experimental driver: xdvipdfmx} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 |