diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-28 21:24:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-28 21:24:36 +0000 |
commit | 0411921af7908fa9daf388b67db154e9fc51caca (patch) | |
tree | f5405f2fef2bc7b0ae9eb9c8809377b88d70c760 /Master/texmf-dist/tex/latex/l3kernel | |
parent | c55b67ba30f320ddfc93fbdca08cab7512704011 (diff) |
l3 (28may19)
git-svn-id: svn://tug.org/texlive/trunk@51248 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
8 files changed, 183 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index cd2f1013847..dbdc37c17f5 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -64,7 +64,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2019-05-09}% +\def\ExplFileDate{2019-05-28}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -14156,6 +14156,7 @@ \int_const:Nn \c__fp_prec_hatii_int { 14 } \int_const:Nn \c__fp_prec_hat_int { 13 } \int_const:Nn \c__fp_prec_not_int { 12 } +\int_const:Nn \c__fp_prec_juxt_int { 11 } \int_const:Nn \c__fp_prec_times_int { 10 } \int_const:Nn \c__fp_prec_plus_int { 9 } \int_const:Nn \c__fp_prec_comp_int { 7 } @@ -14874,7 +14875,7 @@ { \exp_not:N \__fp_exp_after_array_f:w #2 \s__fp_stop \exp_not:N \exp_after:wN - \exp_not:N \__fp_parse_infix:NN + \exp_not:N \__fp_parse_infix_after_paren:NN \exp_not:N \exp_after:wN #1 \exp_not:N \exp:w \exp_not:N \__fp_parse_expand:w @@ -14900,7 +14901,7 @@ \fi: \exp_end_continue_f:w \fi: - \__fp_parse_infix:NN #1 ) + \__fp_parse_infix_after_paren:NN #1 ) } \cs_set_protected:Npn \__fp_tmp:w #1 #2 { @@ -15071,7 +15072,7 @@ \exp_after:wN \__fp_parse_infix_mark:NNN \else: \exp_after:wN \exp_after:wN - \exp_after:wN \__fp_parse_infix_mul:N + \exp_after:wN \__fp_parse_infix_juxt:N \fi: \else: \if_int_compare:w @@ -15079,7 +15080,7 @@ ( `#2 \if_int_compare:w `#2 > `Z - 32 \fi: ) / 26 = 3 \exp_stop_f: \exp_after:wN \exp_after:wN - \exp_after:wN \__fp_parse_infix_mul:N + \exp_after:wN \__fp_parse_infix_juxt:N \else: \exp_after:wN \__fp_parse_infix_check:NNN \cs:w @@ -15091,22 +15092,49 @@ #1 #2 } -\cs_new:Npx \__fp_parse_infix_check:NNN #1#2#3 +\cs_new:Npn \__fp_parse_infix_check:NNN #1#2#3 { - \exp_not:N \if_meaning:w \scan_stop: #1 - \exp_not:N \__kernel_msg_expandable_error:nnn + \if_meaning:w \scan_stop: #1 + \__kernel_msg_expandable_error:nnn { kernel } { fp-missing } { * } - \exp_not:N \exp_after:wN - \exp_not:c { __fp_parse_infix_*:N } - \exp_not:N \exp_after:wN #2 - \exp_not:N \exp_after:wN #3 - \exp_not:N \else: - \exp_not:N \exp_after:wN #1 - \exp_not:N \exp_after:wN #2 - \exp_not:N \exp:w - \exp_not:N \exp_after:wN - \exp_not:N \__fp_parse_expand:w - \exp_not:N \fi: + \exp_after:wN \__fp_parse_infix_mul:N + \exp_after:wN #2 + \exp_after:wN #3 + \else: + \exp_after:wN #1 + \exp_after:wN #2 + \exp:w \exp_after:wN \__fp_parse_expand:w + \fi: + } +\cs_new:Npn \__fp_parse_infix_after_paren:NN #1 #2 + { + \if_catcode:w \scan_stop: \exp_not:N #2 + \if_int_compare:w + \__fp_str_if_eq:nn { \s__fp_mark } { \exp_not:N #2 } + = 0 \exp_stop_f: + \exp_after:wN \exp_after:wN + \exp_after:wN \__fp_parse_infix_mark:NNN + \else: + \exp_after:wN \exp_after:wN + \exp_after:wN \__fp_parse_infix_mul:N + \fi: + \else: + \if_int_compare:w + \__fp_int_eval:w + ( `#2 \if_int_compare:w `#2 > `Z - 32 \fi: ) / 26 + = 3 \exp_stop_f: + \exp_after:wN \exp_after:wN + \exp_after:wN \__fp_parse_infix_mul:N + \else: + \exp_after:wN \__fp_parse_infix_check:NNN + \cs:w + __fp_parse_infix_ \token_to_str:N #2 :N + \exp_after:wN \exp_after:wN \exp_after:wN + \cs_end: + \fi: + \fi: + #1 + #2 } \cs_new:Npn \__fp_parse_infix_mark:NNN #1#2#3 { #3 #1 } \cs_new:Npn \__fp_parse_infix_end:N #1 @@ -15183,6 +15211,8 @@ } \exp_args:Nc \__fp_tmp:w { __fp_parse_infix_^:N } ^ \c__fp_prec_hatii_int \c__fp_prec_hat_int +\exp_args:Nc \__fp_tmp:w { __fp_parse_infix_juxt:N } * + \c__fp_prec_juxt_int \c__fp_prec_juxt_int \exp_args:Nc \__fp_tmp:w { __fp_parse_infix_/:N } / \c__fp_prec_times_int \c__fp_prec_times_int \exp_args:Nc \__fp_tmp:w { __fp_parse_infix_mul:N } * @@ -26454,6 +26484,75 @@ { \iow_shipout:Nn \c__sys_shell_stream_int {#1} } } \cs_generate_variant:Nn \sys_shell_shipout:n { x } +\cs_new:Npn \__file_str_cmp:nn #1#2 { \tex_strcmp:D {#1} {#2} } +\sys_if_engine_luatex:T + { + \cs_set:Npn \__file_str_cmp:nn #1#2 + { + \lua_now:e + { + l3kernel.strcmp + ( + " \__file_str_escape:n {#1}", + " \__file_str_escape:n {#2}" + ) + } + } + \cs_new:Npn \__file_str_escape:n #1 + { + \lua_escape:e + { \__kernel_tl_to_str:w \use:e { {#1} } } + } + } +\tl_new:N \l__file_first_tl +\tl_new:N \l__file_second_tl +\prg_new_protected_conditional:Npnn \file_compare_timestamp:nNn #1#2#3 + { T , F , TF } + { + \group_begin: + \file_get_full_name:nNTF {#1} \l__file_first_tl + { + \file_get_full_name:nNTF {#3} \l__file_second_tl + { + \if_int_compare:w + \__file_str_cmp:nn + { \__file_timestamp:n \exp_after:wN { \l__file_first_tl } } + { \__file_timestamp:n \exp_after:wN { \l__file_second_tl } } + #2 0 \exp_stop_f: + \group_end: + \prg_return_true: + \else: + \group_end: + \prg_return_false: + \fi: + } + { + \group_end: + \if_charcode:w #2 > + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + } + { + \group_end: + \if_charcode:w #2 < + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + } +\sys_if_engine_luatex:TF + { + \cs_new:Npn \__file_timestamp:n #1 + { + \lua_now:e + { l3kernel.filemoddate ( " \lua_escape:e {#1} " ) } + } + } + { \cs_new_eq:NN \__file_timestamp:n \tex_filemoddate:D } \cs_new_protected:Npn \ior_shell_open:Nn #1#2 { \sys_if_shell:TF diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 6d8a56abcaa..8014aa50960 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-05-09}% +\def\ExplFileDate{2019-05-28}% \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 48b4a266506..e81e52a591a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -64,7 +64,7 @@ local function elapsedtime() end l3kernel.elapsedtime = elapsedtime local function resettimer() - base_time = 0 + base_time = os_clock() end l3kernel.resettimer = resettimer local function filemdfivesum(name) diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index b8aaca40a4c..41b84801c47 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-05-09}% +\def\ExplFileDate{2019-05-28}% \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 3bdc8505acb..20789461412 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -405,7 +405,7 @@ \int_if_exist:cTF { c__driver_graphics_ #2#1 _int } { \__driver_literal:x - { pdf:usexobj~@image \int_use:c { c__driver_graphics_ #2#1 _int } } + { pdf:usexobj~@graphic \int_use:c { c__driver_graphics_ #2#1 _int } } } { \__driver_graphics_include_auxiii:nnn {#2} {#1} {#3} } } @@ -417,7 +417,7 @@ \__driver_literal:x { pdf:#3~ - @image \int_use:c { c__driver_graphics_ #1#2 _int } ~ + @graphic \int_use:c { c__driver_graphics_ #1#2 _int } ~ \int_compare:nNnT \l_graphics_page_int > 1 { page ~ \int_use:N \l_graphics_page_int \c_space_tl } \tl_if_empty:NF \l_graphics_pagebox_tl diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 23675e1c0a1..f51166f9231 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -823,6 +823,19 @@ def /driver.breaklink.write { + counttomark ~ 1 ~ sub ~ + index /_objdef ~ eq + { + counttomark ~ -2 ~ roll ~ + dup ~ wcheck ~ + { + readonly ~ + counttomark ~ 2 ~ roll + } + { pop ~ pop } + ifelse + } + if ~ counttomark ~ 1 ~ add ~ copy ~ pop ~ driver.currentrect /ANN ~ pdfmark @@ -850,11 +863,9 @@ Rect ~ 1 ~ get ~ sub ~ driver.baselineskip ~ div ~ round ~ cvi ~ 0 ~ gt { driver.breaklink } - { driver.pdfmark.obj } - ifelse + if } - { driver.pdfmark.obj } - ifelse ~ + if ~ end ~ SDict /driver.outerbox ~ undef ~ SDict /driver.baselineskip ~ undef ~ @@ -887,8 +898,6 @@ loop } def - /driver.pdfmark.obj - { /_objdef ~ exch ~ driver.link.obj ~ exch } def } \box_new:N \l__driver_pdf_content_box \box_new:N \l__driver_pdf_model_box @@ -936,13 +945,9 @@ \int_new:N \g__driver_pdf_link_sf_int \bool_new:N \g__driver_pdf_link_math_bool \bool_new:N \g__driver_pdf_link_bool -\tl_new:N \l__driver_breaklink_obj_tl -\tl_set:Nn \l__driver_breaklink_obj_tl - { /_objdef ~ { driver.obj \int_use:N \g__driver_pdf_link_int } } \tl_new:N \l__driver_breaklink_pdfmark_tl \tl_set:Nn \l__driver_breaklink_pdfmark_tl { pdfmark } \cs_new_protected:Npn \__driver_breaklink_postscript:n #1 { } -\cs_generate_variant:Nn \__driver_breaklink_postscript:n { x } \cs_new_eq:NN \__driver_breaklink_usebox:N \box_use:N \cs_new_protected:Npn \driver_pdf_link_begin_goto:nnw #1#2 { \__driver_pdf_link_begin:nw { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } } @@ -956,7 +961,6 @@ \cs_new_protected:Npn \__driver_pdf_link_begin_aux:nw #1 { \bool_gset_true:N \g__driver_pdf_link_bool - \__driver_pdf_annotation:nnnn { 3pt } { 3pt } { 0pt } { } \__driver_postscript:n { /driver.link.dict ( #1 ) def } \tl_gset:Nn \g__driver_pdf_link_dict_tl {#1} @@ -1000,18 +1004,10 @@ } \int_gincr:N \g__driver_pdf_object_int \int_gset_eq:NN \g__driver_pdf_link_int \g__driver_pdf_object_int - \__driver_breaklink_postscript:x - { - /driver.link.obj - { - { driver.obj \int_use:N \g__driver_pdf_link_int \c_space_tl driver.cvs } - } - def - } \__driver_postscript:x { mark - \l__driver_breaklink_obj_tl + /_objdef { driver.obj \int_use:N \g__driver_pdf_link_int } \g__driver_pdf_link_dict_tl \c_space_tl driver.rect /ANN ~ \l__driver_breaklink_pdfmark_tl @@ -1106,7 +1102,6 @@ } } } - \tl_clear:N \l__driver_breaklink_obj_tl \tl_set:Nn \l__driver_breaklink_pdfmark_tl { driver.pdfmark } \cs_set_eq:NN \__driver_breaklink_postscript:n \__driver_postscript:n \cs_set_eq:NN \__driver_breaklink_usebox:N \hbox_unpack:N diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index 25c63471e8f..3afb54a6b05 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -422,6 +422,45 @@ } \cs_new_eq:NN \driver_graphics_include_pdf:n \driver_graphics_include_jpg:n \cs_new_eq:NN \driver_graphics_include_png:n \driver_graphics_include_jpg:n +\sys_if_shell:T + { + \str_new:N \l__driver_dir_str + \str_new:N \l__driver_name_str + \str_new:N \l__driver_ext_str + \cs_new_protected:Npn \driver_graphics_getbb_eps:n #1 + { + \file_parse_full_name:nNNN {#1} + \l__driver_dir_str + \l__driver_name_str + \l__driver_ext_str + \exp_args:Nx \__driver_graphics_getbb_eps:nn + { + \l__driver_name_str - \str_tail:N \l__driver_ext_str + -converted-to.pdf + } + {#1} + } + \cs_new_protected:Npn \__driver_graphics_getbb_eps:nn #1#2 + { + \file_compare_timestamp:nNnT {#2} > {#1} + { + \sys_shell_now:n + { repstopdf ~ #2 ~ #1 } + } + \tl_set:Nn \l_graphics_name_tl {#1} + \driver_graphics_getbb_pdf:n {#1} + } + \cs_new_protected:Npn \driver_graphics_include_eps:n #1 + { + \file_parse_full_name:nNNN {#1} + \l__driver_dir_str \l__driver_name_str \l__driver_ext_str + \exp_args:Nx \driver_graphics_include_pdf:n + { + \l__driver_name_str - \str_tail:N \l__driver_ext_str + -converted-to.pdf + } + } + } %% File: l3drivers-pdf.dtx \cs_new_protected:Npx \driver_pdf_annotation:nnnn #1#2#3#4 { @@ -539,7 +578,7 @@ { \__driver_tmp:w { \tex_pdfextension:D obj ~ } - { \exp_not:N \tex_pdffeedback:D lastobj \scan_stop: } + { \exp_not:N \tex_pdffeedback:D lastobj } } { \__driver_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } } \group_end: @@ -579,6 +618,7 @@ \cs_new:Npn \__driver_exp_not_ii:nn #1#2 { \exp_not:n {#2} } \cs_new_protected:Npx \driver_pdf_compresslevel:n #1 { + \exp_not:N \tex_global:D \cs_if_exist:NTF \tex_pdfcompresslevel:D { \tex_pdfcompresslevel:D } { \tex_pdfvariable:D compresslevel } @@ -592,6 +632,7 @@ } \cs_new_protected:Npx \__driver_pdf_objcompresslevel:n #1 { + \exp_not:N \tex_global:D \cs_if_exist:NTF \tex_pdfobjcompresslevel:D { \tex_pdfobjcompresslevel:D } { \tex_pdfvariable:D objcompresslevel } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def index 111087f7509..49ee9115e3a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def @@ -390,7 +390,7 @@ \int_if_exist:cTF { c__driver_graphics_ #2#1 _int } { \__driver_literal:x - { pdf:usexobj~@image \int_use:c { c__driver_graphics_ #2#1 _int } } + { pdf:usexobj~@graphic \int_use:c { c__driver_graphics_ #2#1 _int } } } { \__driver_graphics_include_auxiii:nnn {#2} {#1} {#3} } } @@ -402,7 +402,7 @@ \__driver_literal:x { pdf:#3~ - @image \int_use:c { c__driver_graphics_ #1#2 _int } ~ + @graphic \int_use:c { c__driver_graphics_ #1#2 _int } ~ \int_compare:nNnT \l_graphics_page_int > 1 { page ~ \int_use:N \l_graphics_page_int \c_space_tl } \tl_if_empty:NF \l_graphics_pagebox_tl |