diff options
Diffstat (limited to 'Master/texmf-dist')
113 files changed, 1142 insertions, 112 deletions
diff --git a/Master/texmf-dist/doc/latex/l3experimental/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3experimental/CHANGELOG.md index fd105b2f089..3e1132e2323 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3experimental/CHANGELOG.md @@ -7,7 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] -## [2018-10-17] +## [2018-10-26] + +### Added + +- New module `l3benchmark` ## [2018-08-24] @@ -42,7 +46,8 @@ this project uses date-based 'snapshot' version identifiers. - New `l3color` module using `xcolor`-like expression syntax - New `l3draw` module, based on `pgf` layer of the TikZ system -[Unreleased]: https://github.com/latex3/latex3/compare/2018-10-17...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2018-10-26...HEAD +[2018-10-26]: https://github.com/latex3/latex3/compare/2018-10-17...2018-10-26 [2018-10-17]: https://github.com/latex3/latex3/compare/2018-08-24...2018-10-17 [2018-08-24]: https://github.com/latex3/latex3/compare/2018-08-23...2018-08-24 [2018-08-23]: https://github.com/latex3/latex3/compare/2018-05-12...2018-08-23 diff --git a/Master/texmf-dist/doc/latex/l3experimental/README.md b/Master/texmf-dist/doc/latex/l3experimental/README.md index 70dcebf419b..a4b64f4c480 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/README.md +++ b/Master/texmf-dist/doc/latex/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2018-10-17 +Release 2018-10-26 Overview -------- @@ -21,6 +21,7 @@ updated at the same time. Currently included in the CTAN release of l3experimental are the following bundles: +* `l3benchmark` * `l3color` * `l3draw` * `l3str` @@ -29,6 +30,11 @@ bundles: * `xgalley` * `xmarks` +`l3benchmark` +------------- + +This module provides support for benchmarking the performance of code. + `l3color` --------- diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3benchmark/l3benchmark.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3benchmark/l3benchmark.pdf Binary files differnew file mode 100644 index 00000000000..fdba8a7f326 --- /dev/null +++ b/Master/texmf-dist/doc/latex/l3experimental/l3benchmark/l3benchmark.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3color/l3color.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3color/l3color.pdf Binary files differindex f769c1bde14..f97380f7c0b 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/l3color/l3color.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/l3color/l3color.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw-code.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw-code.pdf Binary files differindex 8787a01703b..a690900ff0b 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw-code.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw-code.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw.pdf Binary files differindex 60fdc0bc9aa..ac1f48b6561 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/l3draw/l3draw.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf Binary files differindex c2937d88641..399813253ea 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf Binary files differindex 5c27bdb510f..9642528d56e 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3sys-shell/l3sys-shell.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3sys-shell/l3sys-shell.pdf Binary files differindex e875e5f10b5..40938a9c4de 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/l3sys-shell/l3sys-shell.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/l3sys-shell/l3sys-shell.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf b/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf Binary files differindex cd43d91743d..a11157ff5ba 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf b/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf Binary files differindex 4c4f6ed7dd7..da434b2672b 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf diff --git a/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf b/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf Binary files differindex ec03883e45f..2762d0537c7 100644 --- a/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf +++ b/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md index 14752a494e5..c3faa024cbb 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md @@ -7,6 +7,8 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2018-10-26] + ## [2018-10-19] ### Fixed @@ -157,7 +159,8 @@ this project uses date-based 'snapshot' version identifiers. - Step funcÂtions have been added for dim variÂables, e.g. `\dim_step_inÂline:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2018-10-19...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2018-10-26...HEAD +[2018-10-26]: https://github.com/latex3/latex3/compare/2018-10-19...2018-10-26 [2018-10-19]: https://github.com/latex3/latex3/compare/2018-10-17...2018-10-19 [2018-10-17]: https://github.com/latex3/latex3/compare/2018-09-24...2018-10-17 [2018-09-24]: https://github.com/latex3/latex3/compare/2018-08-23...2018-09-24 diff --git a/Master/texmf-dist/doc/latex/l3kernel/README.md b/Master/texmf-dist/doc/latex/l3kernel/README.md index 84b551fc97e..052e55ce23e 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/README.md +++ b/Master/texmf-dist/doc/latex/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2018-10-19 +Release 2018-10-26 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf Binary files differindex 8ad31264887..05187d8b10b 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf Binary files differindex 917847d2f06..bd494bd8ccd 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex index fec9920ab08..20ee9f1d925 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex @@ -52,7 +52,7 @@ {latex-team@latex-project.org}% }% } -\date{Released 2018-10-19} +\date{Released 2018-10-26} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf Binary files differindex 0683e4f0446..048bffd507a 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf Binary files differindex a55a66d1f7d..882e92a70df 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex index d46c678187c..7ec4c6dcfd0 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex @@ -30,7 +30,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2018-10-19} +\date{Released 2018-10-26} \begin{document} diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf Binary files differindex 9007e195b13..44ddfa1da60 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex index 6b2d0c9a8f9..f5a8f22237c 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex @@ -30,7 +30,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2018-10-19} +\date{Released 2018-10-26} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf Binary files differindex 014c7c37141..83ab41e5db4 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex index 4dc0ab0a4ca..24fccfcca8a 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3term-glossary.tex @@ -30,7 +30,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2018-10-19} +\date{Released 2018-10-26} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf Binary files differindex 394cd66ebd2..901593e42d6 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.tex b/Master/texmf-dist/doc/latex/l3kernel/source3.tex index 318ead9a324..6a3e22330c1 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.tex @@ -51,7 +51,7 @@ {latex-team@latex-project.org}% }% } -\date{Released 2018-10-19} +\date{Released 2018-10-26} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/source/latex/l3experimental/l3benchmark/l3benchmark.dtx b/Master/texmf-dist/source/latex/l3experimental/l3benchmark/l3benchmark.dtx new file mode 100644 index 00000000000..b8e976677da --- /dev/null +++ b/Master/texmf-dist/source/latex/l3experimental/l3benchmark/l3benchmark.dtx @@ -0,0 +1,583 @@ +% \iffalse meta-comment +% +%% File: l3benchmark.dtx Copyright (C) 2011,2012,2014-2018 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 +% 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 +% +% This file is part of the "l3experimental bundle" (The Work in LPPL) +% and all files in that bundle must be distributed together. +% +% ----------------------------------------------------------------------- +% +% The development version of the bundle can be found at +% +% https://github.com/latex3/latex3 +% +% for those people who are interested. +% +%<*driver|package> +\RequirePackage{expl3} +%</driver|package> +%<*driver> +\documentclass[full]{l3doc} +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +%</driver> +% \fi +% +% \title{^^A +% The \pkg{l3benchmark} package\\ Experimental benchmarking^^A +% } +% +% \author{^^A +% The \LaTeX3 Project\thanks +% {^^A +% E-mail: +% \href{mailto:latex-team@latex-project.org} +% {latex-team@latex-project.org}^^A +% }^^A +% } +% +% \date{Released 2018-10-26} +% +% \maketitle +% +% \begin{documentation} +% +% \section{Additions to \pkg{l3sys}: elapsed time} +% +% \begin{function}{\sys_gzero_timer:} +% \begin{syntax} +% \cs{sys_gzero_timer:} +% \end{syntax} +% Resets the timer to zero. +% \end{function} +% +% \begin{function}[EXP]{\sys_timer:} +% \begin{syntax} +% \cs{sys_timer:} +% \end{syntax} +% Expands to the current value of the engine's timer clock, a +% non-negative integer. In engines without clock support this +% expands to $0$. +% \end{function} +% +% \section{Benchmark} +% +% \begin{variable}{\g_benchmark_duration_target_fp} +% This variable controls roughly for how long \cs{benchmark:n} will +% repeat code to more accurately benchmark it. The actual duration of +% one call to \cs{benchmark:n} typically lasts between half and twice +% \cs{g_benchmark_duration_target_fp} seconds, unless of course +% running the code only once already lasts longer than this. +% \end{variable} +% +% \begin{variable}{\g_benchmark_time_fp, \g_benchmark_ops_fp} +% Functions such as \cs{benchmark:n} store the measured time in +% \cs{g_benchmark_time_fp} (in seconds). Functions such as +% \cs{benchmark_normalized:n} store the estimated number of operations +% in \cs{g_benchmark_ops_fp}. +% \end{variable} +% +% \begin{function}{\benchmark_display:, \benchmark_display_in_ops:} +% \begin{syntax} +% \cs{benchmark_display:} +% \end{syntax} +% Prints the time \cs{g_benchmark_time_fp} (in seconds) or the +% estimated number of operations \cs{g_benchmark_ops_fp} to the +% terminal. These functions are called by functions such as +% \cs{benchmark:n} and can be redefined by the user. +% \end{function} +% +% \begin{function}{\benchmark_once:n, \benchmark_once_in_ops:n, \benchmark_once_silent:n} +% \begin{syntax} +% \cs{benchmark_once:n} \Arg{code} +% \end{syntax} +% Measures the time taken by \TeX{} to run the \meta{code} once, sets +% \cs{g_benchmark_time_fp} and \cs{g_benchmark_ops_fp}, and calls +% \cs{benchmark_display:}. The \meta{code} is run only once so the +% time may be quite inaccurate for fast code. The +% \cs{benchmark_once_silent:n} function omits the call to +% \cs{benchmark_display:}, while \cs{benchmark_once_in_ops:n} calls +% \cs{benchmark_display_in_ops:} instead. +% \end{function} +% +% \begin{function}{\benchmark:n, \benchmark_in_ops:n, \benchmark_silent:n} +% \begin{syntax} +% \cs{benchmark:n} \Arg{code} +% \end{syntax} +% Measures the time taken by \TeX{} to run the \meta{code}, sets +% \cs{g_benchmark_time_fp} and \cs{g_benchmark_ops_fp}, and calls +% \cs{benchmark_display:}. The \meta{code} may be run many times and +% not within a group, thus code with side-effects may cause problems. +% The \cs{benchmark_silent:n} function omits the call to +% \cs{benchmark_display:}, while \cs{benchmark_in_ops:n} calls +% \cs{benchmark_display_in_ops:} instead. +% \end{function} +% +% \begin{function}{\benchmark_tic:, \benchmark_toc:} +% \begin{syntax} +% \cs{benchmark_tic:} \meta{slow code} \cs{benchmark_toc:} +% \end{syntax} +% When it is not possible to run \cs{benchmark:n} (e.g., the code is +% part of the execution of a package which cannot be looped) the +% tic/toc commands can be used instead to time between two points in +% the code. When executed, \cs{benchmark_tic:} will print a line to the +% terminal, and \cs{benchmark_toc:} will print a matching line with a +% time to indicate the duration between them in seconds. Note that +% these commands can be nested. +% \end{function} +% +% \end{documentation} +% +% \begin{implementation} +% +% \section{\pkg{l3benchmark} implementation} +% +% Our working unit is the scaled second, namely $2^{-16}$ seconds. +% +% \begin{macrocode} +%<*initex|package> +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +\ProvidesExplPackage{l3benchmark}{2018-10-26}{} + {L3 Experimental benchmarking} +%</package> +% \end{macrocode} +% +% \subsection{Additions to \pkg{l3sys}: elapsed time} +% +% \begin{macrocode} +%<@@=sys> +% \end{macrocode} +% +% \begin{macro}[EXP]{\sys_timer:} +% \begin{macro}[EXP,pTF]{\sys_if_timer_exist:} +% In \LuaTeX{}, use emulation (see \pkg{l3luatex}), +% otherwise try to locate the primitive. The +% elapsed time will be available if this succeeds or if unrestricted +% shell escape is available. +% \begin{macrocode} +\sys_if_engine_luatex:TF + { + \cs_new:Npn \sys_timer: + { \int_eval:w \lua_now:n { l3kernel.elapsedtime() } \scan_stop: } + } + { + \cs_if_exist:NT \tex_elapsedtime:D + { + \cs_new:Npn \sys_timer: + { \int_eval:w \tex_elapsedtime:D } + } + } +\@@_const:nn { sys_if_timer_exist } + { \cs_if_exist_p:N \sys_timer: } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\sys_gzero_timer:, \@@_timer_fp:} +% \begin{variable}{\g_@@_timer_base_fp} +% Three case, and in each case we define \cs{sys_gzero_timer:}. +% \begin{macrocode} +\cs_if_exist:NTF \sys_timer: + { + \sys_if_engine_luatex:TF + { + \cs_new_protected:Npn \sys_gzero_timer: + { \lua_now:n { l3kernel.resettimer() } } + } + { \cs_new_protected:Npn \sys_gzero_timer: { \tex_resettimer:D } } + } +% \end{macrocode} +% If the elapsed time cannot be accessed then we define user +% commands to produce errors. +% \begin{macrocode} + { + \__kernel_msg_new:nnnn { kernel } { no-elapsed-time } + { No~clock~detected~for~#1. } + { The~current~engine~provides~no~way~to~access~the~system~time. } + \cs_new_protected:Npn \sys_gzero_timer: + { + \__kernel_msg_error:nnn { kernel } { no-elapsed-time } + { \sys_gzero_timer: } + } + \cs_new:Npn \sys_timer: + { + \int_value:w + \__kernel_msg_expandable_error:nnn { kernel } { no-elapsed-time } + { \sys_timer: } + \c_zero_int + } + } +% \end{macrocode} +% \end{variable} +% \end{macro} +% +% \subsection{Benchmarking code} +% +% \begin{macrocode} +%<@@=benchmark> +% \end{macrocode} +% +% \begin{variable}{\g_benchmark_time_fp, \g_benchmark_ops_fp} +% Functions such as \cs{benchmark:n} store the measured time in +% \cs{g_benchmark_time_fp} (in seconds) and the estimated number of +% operations in \cs{g_benchmark_ops_fp}. +% \begin{macrocode} +\fp_new:N \g_benchmark_time_fp +\fp_new:N \g_benchmark_ops_fp +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\benchmark_display:, \benchmark_display_in_ops:} +% Function to display the time that was measured or the estimated +% number of operations. This can be redefined by the user. +% \begin{macrocode} +\cs_new_protected:Npn \benchmark_display: + { \iow_term:x { \fp_to_tl:N \g_benchmark_time_fp \c_space_tl seconds } } +\cs_new_protected:Npn \benchmark_display_in_ops: + { + \iow_term:x + { + \fp_compare:nTF { \g_benchmark_ops_fp > 1e9 } + { \fp_to_tl:n { \g_benchmark_ops_fp * 1e-9 } ~ G~ops } + { + \fp_compare:nTF { \g_benchmark_ops_fp > 1e6 } + { \fp_to_tl:n { \g_benchmark_ops_fp * 1e-6 } ~ M~ops } + { + \fp_compare:nTF { \g_benchmark_ops_fp > 1e3 } + { \fp_to_tl:n { \g_benchmark_ops_fp * 1e-3 } ~ K~ops } + { \fp_to_tl:n { \g_benchmark_ops_fp } ~ ops } + } + } + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\sys_if_timer_exist:F + { + \msg_new:nnnn { benchmark } { no-time } + { The~l3benchmark~package~failed~to~access~a~clock. } + { The~current~engine~provides~no~way~to~access~the~system~time. } + \cs_new_protected:Npn \benchmark_once:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_once_in_ops:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_once_silent:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_in_ops:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_silent:n #1 + { \msg_error:nn { benchmark } { no-time } } + \fp_gset:Nn \g_benchmark_time_fp { nan } + \fp_gset:Nn \g_benchmark_ops_fp { nan } + \msg_critical:nn { benchmark } { no-time } + } +% \end{macrocode} +% +% \begin{variable}{\g_benchmark_duration_target_fp, \g_@@_duration_int} +% The benchmark is constrained to take roughly (from half to twice) +% \cs{g_benchmark_duration_target_fp} seconds, more precisely +% \cs{g_@@_duration_int} scaled seconds, unless one iteration of the +% code takes longer. +% \begin{macrocode} +\fp_new:N \g_benchmark_duration_target_fp +\fp_gset:Nn \g_benchmark_duration_target_fp { 1 } +\int_new:N \g_@@_duration_int +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_time_int, \g_@@_time_a_int, \g_@@_time_b_int, \g_@@_time_c_int, \g_@@_time_d_int} +% These variables hold the time for running a piece of code, as an +% integer in scaled seconds. +% \begin{macrocode} +\int_new:N \g_@@_time_int +\int_new:N \g_@@_time_a_int +\int_new:N \g_@@_time_b_int +\int_new:N \g_@@_time_c_int +\int_new:N \g_@@_time_d_int +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_repeat_int} +% Holds the number of times that the piece of code was +% repeated when timing. +% \begin{macrocode} +\int_new:N \g_@@_repeat_int +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_nesting_int} +% \begin{macro}{\@@_raw:nN, \@@_raw_aux:N, \@@_raw_end:N} +% Store in the given integer variable the time it took to perform a given +% piece of code, in scaled seconds. We call \cs{sys_timer:} as +% close before and after the code as possible. We store the +% intermediate result in a new integer when \cs{@@_raw:nN} is +% nested. +% \begin{macrocode} +\int_new:N \g_@@_nesting_int +\cs_new_protected:Npn \@@_raw:nN #1 + { + \int_gincr:N \g_@@_nesting_int + \exp_args:Nc \@@_raw_aux:N + { g_@@_ \int_use:N \g_@@_nesting_int _int } + \@@_raw_aux: + #1 + \@@_raw_end:N + } +\cs_new_protected:Npn \@@_raw_aux:N #1 + { + \int_gzero_new:N #1 + \cs_gset_protected:Npn \@@_raw_aux: { \int_gset:Nn #1 { \sys_timer: } } + } +\cs_new_protected:Npn \@@_raw_end:N #1 + { + \int_gset:Nn #1 + { + \sys_timer: - + \int_use:c { g_@@_ \int_use:N \g_@@_nesting_int _int } + } + \int_gdecr:N \g_@@_nesting_int + } +% \end{macrocode} +% \end{macro} +% \end{variable} +% +% \begin{macro}{\@@_raw_replicate:nnN, \@@_tmp:w} +% Here, we wish to measure the time it takes for the piece of code +% |#2| to be run |#1| times, and store the result in the +% integer~|#3|. +% +% If the number of copies required is large, defining \cs{@@_tmp:w} +% would exhaust \TeX{}'s main memory. In that case, we replicate +% $|#1|/5000$ times the given code before passing it to the main call +% to \cs{@@_tmp:w}. Of course the division rounds to an integer, so +% that step introduces a relative error of order at most +% $5000/500000$, less than many other sources of variability. +% +% We subtract the time for another call to \cs{@@_tmp:w}, with the +% same arguments (to capture the time it takes to read the argument) +% but empty expansion. +% \begin{macrocode} +\cs_new_eq:NN \@@_tmp:w ? +\cs_new_protected:Npn \@@_raw_replicate:nnN #1 + { + \int_compare:nNnTF {#1} > { 500000 } + { \@@_raw_replicate_large:nnN {#1} } + { \@@_raw_replicate_small:nnN {#1} } + } +\cs_new_protected:Npn \@@_raw_replicate_large:nnN #1#2 + { + \cs_set:Npx \@@_tmp:w ##1 { \prg_replicate:nn { 5000 } {##1} } + \exp_args:Nno \@@_raw_replicate:nnN { #1 / 5000 } + { \@@_tmp:w {#2} } + } +\cs_new_protected:Npn \@@_raw_replicate_small:nnN #1#2 + { + \cs_set:Npx \@@_tmp:w ##1##2 { \prg_replicate:nn {#1} {##1} } + \@@_raw:nN { \@@_tmp:w {#2} { } } \g_@@_time_int + \exp_args:No \@@_raw_replicate_aux:nnN + { \int_use:N \g_@@_time_int } {#2} + } +\cs_new_protected:Npn \@@_raw_replicate_aux:nnN #1#2#3 + { + \@@_raw:nN { \@@_tmp:w { } {#2} } \g_@@_time_int + \int_gset:Nn #3 { #1 - \g_@@_time_int } + \cs_set_eq:NN \@@_tmp:w \prg_do_nothing: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\benchmark:n, \benchmark_silent:n} +% The main timing function. First time the user code once. If that +% took more than a third of a second we're done. If that took much +% less than a second, quadruple the number of copies until it takes a +% reasonable amount of time (this is to avoid division by a possibly +% zero time). Once we reach a reasonable time, compute a number of +% times that can fit in one quarter of a second and measure that four +% times. To save time we reuse the result of the first pass if +% \cs{g_@@_repeat_int} is one. Once we have four results, find the smallest, +% divided by $65536$ and by the number of repetitions, and display that. +% \begin{macrocode} +\fp_new:N \g_@@_one_op_fp +\tl_new:N \g_@@_code_tl +\cs_new_protected:Npn \benchmark:n #1 + { \benchmark_silent:n {#1} \benchmark_display: } +\cs_new_protected:Npn \benchmark_in_ops:n #1 + { \benchmark_silent:n {#1} \benchmark_display_in_ops: } +\cs_new_protected:Npn \@@_measure_op: + { + \int_gset:Nn \g_@@_duration_int { 256 } + \tl_gset:Nn \g_@@_code_tl + { \int_gset:Nn \g_@@_duration_int { 256 } } % arbitrary single operation + \@@_aux: + \fp_gset_eq:NN \g_@@_one_op_fp \g_benchmark_time_fp + \fp_compare:nNnT \g_@@_one_op_fp < { 1e-6 } + { \fp_gset:Nn \g_@@_one_op_fp { 1e-6 } } + } +\cs_new_protected:Npn \benchmark_silent:n #1 + { + \@@_measure_op: + \int_gset:Nn \g_@@_duration_int + { \fp_to_int:n { 65536 * \g_benchmark_duration_target_fp } } + \tl_gset:Nn \g_@@_code_tl {#1} + \@@_aux: + \fp_gset:Nn \g_benchmark_ops_fp + { \g_benchmark_time_fp / \g_@@_one_op_fp } + } +\cs_new_protected:Npn \@@_aux: + { + \int_gset:Nn \g_@@_repeat_int { 1 } + \@@_raw:nN { \g_@@_code_tl } \g_@@_time_int + \int_compare:nNnF \g_@@_time_int < { \g_@@_duration_int / 2 } + { + \int_gset_eq:NN \g_@@_time_a_int \g_@@_time_int + \int_gset_eq:NN \g_@@_time_b_int \g_@@_time_int + \int_gset_eq:NN \g_@@_time_c_int \g_@@_time_int + \int_gset_eq:NN \g_@@_time_d_int \g_@@_time_int + \prg_break: + } + \int_while_do:nNnn \g_@@_time_int < { \g_@@_duration_int / 100 } + { + \int_compare:nNnT \g_@@_repeat_int > { \c_max_int / 4 } + { + \int_gzero:N \g_@@_time_a_int + \int_gzero:N \g_@@_time_b_int + \int_gzero:N \g_@@_time_c_int + \int_gzero:N \g_@@_time_d_int + \prg_break: + } + \int_gset:Nn \g_@@_repeat_int { 4 * \g_@@_repeat_int } + \@@_run:N \g_@@_time_int + } + \int_gset:Nn \g_@@_repeat_int + { + \int_max:nn { 1 } + { + \g_@@_duration_int * \g_@@_repeat_int + / ( \g_@@_time_int * 4 ) + } + } + \int_compare:nNnTF \g_@@_repeat_int = 1 + { \int_gset_eq:NN \g_@@_time_a_int \g_@@_time_int } + { \@@_run:N \g_@@_time_a_int } + \@@_run:N \g_@@_time_b_int + \@@_run:N \g_@@_time_c_int + \@@_run:N \g_@@_time_d_int + \prg_break_point: + \fp_gset:Nn \g_benchmark_time_fp + { + \int_min:nn + { \int_min:nn \g_@@_time_a_int \g_@@_time_b_int } + { \int_min:nn \g_@@_time_c_int \g_@@_time_d_int } + / \g_@@_repeat_int / 65536 + } + } +\cs_new_protected:Npn \@@_run:N + { \exp_args:NNo \@@_raw_replicate:nnN \g_@@_repeat_int { \g_@@_code_tl } } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\benchmark_once:n, \benchmark_once_in_ops:n, \benchmark_once_silent:n} +% Convert from scaled seconds to seconds. +% \begin{macrocode} +\cs_new_protected:Npn \benchmark_once:n #1 + { \benchmark_once_silent:n {#1} \benchmark_display: } +\cs_new_protected:Npn \benchmark_once_in_ops:n #1 + { \benchmark_once_silent:n {#1} \benchmark_display_in_ops: } +\cs_new_protected:Npn \benchmark_once_silent:n #1 + { + \@@_measure_op: + \@@_raw:nN {#1} \g_@@_time_int + \fp_gset:Nn \g_benchmark_time_fp { \g_@@_time_int / 65536 } + \fp_gset:Nn \g_benchmark_ops_fp + { \g_benchmark_time_fp / \g_@@_one_op_fp } + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Benchmark tic toc} +% +% \begin{variable}{\g_@@_tictoc_int, \g_@@_tictoc_seq} +% \begin{macrocode} +\int_new:N \g_@@_tictoc_int +\seq_new:N \g_@@_tictoc_seq +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\benchmark_tic:, \@@_tic:} +% \begin{macrocode} +\cs_new_protected:Npn \benchmark_tic: + { + \int_compare:nTF { \g_@@_tictoc_int == 0 } + { + \sys_gzero_timer: + \@@_tic:n { 0 } + } + { \@@_tic: } + } +\cs_new_protected:Npn \@@_tic: + { + \exp_args:NNf \seq_put_right:Nn \g_@@_tictoc_seq { \sys_timer: } + \int_gincr:N \g_@@_tictoc_int + \iow_term:x + { + \prg_replicate:nn {\g_@@_tictoc_int} {---+} \space + TIC + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\benchmark_toc:, \@@_toc:} +% \begin{macrocode} +\cs_new:Npn \benchmark_toc: + { + \int_compare:nT { \g_@@_tictoc_int == 0 } + { \msg_error:nn {benchmark} {toc-first} } + \seq_pop_right:NN \g_@@_tictoc_seq \l_@@_tictoc_pop_tl + \@@_toc: + } +\cs_new_protected:Npn \@@_toc: + { + \tl_set:Nx \l_@@_tictoc_tl + { + \fp_to_decimal:n + { round( ( \sys_timer: - \l_@@_tictoc_pop_tl) / 65536 , 3 ) } + } + \iow_term:x + { + \prg_replicate:nn {\g_@@_tictoc_int} {---+} \c_space_tl + TOC: \c_space_tl + \l_@@_tictoc_tl \c_space_tl s + } + \int_gdecr:N \g_@@_tictoc_int + } +\msg_new:nnn {benchmark} {toc-first} + { + \token_to_str:N \benchmark_toc: \space without~ + \token_to_str:N \benchmark_tic: \space ! + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</initex|package> +% \end{macrocode} +% +% \end{implementation} +% +% \PrintIndex diff --git a/Master/texmf-dist/source/latex/l3experimental/l3benchmark/l3benchmark.ins b/Master/texmf-dist/source/latex/l3experimental/l3benchmark/l3benchmark.ins new file mode 100644 index 00000000000..befb2bc9c96 --- /dev/null +++ b/Master/texmf-dist/source/latex/l3experimental/l3benchmark/l3benchmark.ins @@ -0,0 +1,56 @@ +\iffalse meta-comment + +File l3benchmark.ins Copyright (C) 2011,2018 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 +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 + +This file is part of the "l3experimental bundle" (The Work in LPPL) +and all files in that bundle must be distributed together. + +----------------------------------------------------------------------- + +The development version of the bundle can be found at + + https://github.com/latex3/latex3 + +for those people who are interested. + +----------------------------------------------------------------------- + +Any modification of this file should ensure that the copyright and +license information is placed in the derived files. + +\fi + +\input l3docstrip.tex +\askforoverwritefalse + +\preamble + +Copyright (C) 2018 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 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 + +This file is part of the "l3experimental bundle" (The Work in LPPL) +and all files in that bundle must be distributed together. + +\endpreamble +% stop docstrip adding \endinput +\postamble +\endpostamble + +\keepsilent + +\generate{\file{l3benchmark.sty}{\from{l3benchmark.dtx}{package}}} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx b/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx index 9b5a8e86d5b..0229f22627a 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3color/l3color.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -263,7 +263,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{l3color}{2018-10-17}{} +\ProvidesExplPackage{l3color}{2018-10-26}{} {L3 Experimental color support} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-boxes.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-boxes.dtx index fe929c7625f..784c6c7c899 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-boxes.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-boxes.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-paths.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-paths.dtx index ba6004c0ff2..3412baa5dae 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-paths.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-paths.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx index e2ad0db7da2..d83c101000e 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx index de9f052b120..c296720aef1 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx index 297d0f5a1de..573d49dde6f 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx index 9c09eb124f8..89cb592f58b 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-transforms.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-transforms.dtx index 1e5081e56bb..d7c8b753af0 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-transforms.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-transforms.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw.dtx index b1d0b8addb6..6df64b2ab61 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw.dtx @@ -109,7 +109,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -1106,7 +1106,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{l3draw}{2018-10-17}{} +\ProvidesExplPackage{l3draw}{2018-10-26}{} {L3 Experimental core drawing support} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx index 8d15309cc9d..fe08d395200 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -234,7 +234,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-convert}{2018-10-17}{} +\ProvidesExplPackage{l3str-convert}{2018-10-26}{} {L3 Experimental string encoding conversions} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx index b5aa091ef8d..de7a66e9acb 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -162,7 +162,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{l3str-format}{2018-10-17}{} +\ProvidesExplPackage{l3str-format}{2018-10-26}{} {L3 Experimental string formatting} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3experimental/l3sys-shell/l3sys-shell.dtx b/Master/texmf-dist/source/latex/l3experimental/l3sys-shell/l3sys-shell.dtx index becaf162e85..1955bfa7ecc 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3sys-shell/l3sys-shell.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3sys-shell/l3sys-shell.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -134,7 +134,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{l3sys-shell}{2018-10-17}{} +\ProvidesExplPackage{l3sys-shell}{2018-10-26}{} {L3 Experimental system shell functions} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx index c22edeb862e..bc16947e21e 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx @@ -54,7 +54,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -673,7 +673,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2018-10-17}{} +\ProvidesExplPackage{xcoffins}{2018-10-26}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx index ced9492972d..0ea16096b1b 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx @@ -59,7 +59,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -685,7 +685,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{l3galley}{2018-10-17}{} +\ProvidesExplPackage{l3galley}{2018-10-26}{} {L3 Experimental galley code} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx index 5bcfe7c13ed..47c72f83a5e 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Released 2018-10-17} +% \date{Released 2018-10-26} % % \maketitle % @@ -732,7 +732,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2018-10-17}{} +\ProvidesExplPackage{xgalley}{2018-10-26}{} {L3 Experimental galley} \RequirePackage{xparse,xtemplate,l3galley} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index 8de9e7c8618..4f27d915f99 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -21,7 +21,7 @@ % for those people who are interested. % %<*driver|generic|package> -\def\ExplFileDate{2018-10-19}% +\def\ExplFileDate{2018-10-26}% %</driver|generic|package> %<*driver> \documentclass[full]{l3doc} @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx index 44180d9dd05..7d3f92ada5b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx index 3479b35d9f0..fd5a8a52a91 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx index a2a4f92f1c0..ec6e8834d32 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx @@ -138,7 +138,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index dc15d8a8849..e1af19577e1 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx index ad22f295381..38783e8c657 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx index c9ac2a584c1..7c93f9b9ffa 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx index 352e478082b..809a4c29363 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx index 536cae344f0..70bfc5eba38 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx index dc0141b99a4..42006c21685 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx index f5760bab702..1b4bd155829 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx @@ -77,7 +77,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % \maketitle % \tableofcontents % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx index b9751f48e09..1fc52d4fb77 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index b77e41aca99..f4f0a10a851 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % @@ -554,23 +554,23 @@ %<*package> \ProvidesExplFile %<*dvipdfmx> - {l3dvidpfmx.def}{2018-10-19}{} + {l3dvidpfmx.def}{2018-10-26}{} {L3 Experimental driver: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3dvips.def}{2018-10-19}{} + {l3dvips.def}{2018-10-26}{} {L3 Experimental driver: dvips} %</dvips> %<*dvisvgm> - {l3dvisvgm.def}{2018-10-19}{} + {l3dvisvgm.def}{2018-10-26}{} {L3 Experimental driver: dvisvgm} %</dvisvgm> %<*pdfmode> - {l3pdfmode.def}{2018-10-19}{} + {l3pdfmode.def}{2018-10-26}{} {L3 Experimental driver: PDF mode} %</pdfmode> %<*xdvipdfmx> - {l3xdvidpfmx.def}{2018-10-19}{} + {l3xdvidpfmx.def}{2018-10-26}{} {L3 Experimental driver: xdvipdfmx} %</xdvipdfmx> %</package> diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx index f4eddf152e4..b38d144d568 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index fcbe47e1fe0..f6b78dac7c2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % @@ -1500,6 +1500,15 @@ \int_set:Nn \l_@@_line_target_int { \l_iow_line_count_int - \str_count:N \l_@@_newline_tl + 1 } % \end{macrocode} +% Sanity check. +% \begin{macrocode} + \int_compare:nNnT { \l_@@_line_target_int } < 0 + { + \tl_set:Nn \l_@@_newline_tl { \iow_newline: } + \int_set:Nn \l_@@_line_target_int + { \l_iow_line_count_int + 1 } + } +% \end{macrocode} % There is then a loop over the input, which stores the wrapped % result in \cs{l_@@_wrap_tl}. After the loop, the resulting text is % passed on to the function which has been given as a post-processor. diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx index e63bda66cae..275f64dd009 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx index 985ad6e12f4..152356926d2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx index ac523282d0d..ef0ad7b42a3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % \maketitle % % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx index f484739e0fd..4214fe71b11 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx index 820a7c8bcf5..1acb5f3f304 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx index e02da0dd216..c30b0364c8c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx index 45a430924c5..39c8d734f98 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx index 99102669fc1..7894139b926 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx index 94732f01511..ca359127f27 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx index 1dea2b1fe40..00744ab0534 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx index 1308e381095..26db168029e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx index b865230987f..4986bb1cb36 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx index 7aa09bdcef1..1bcb9a0ee52 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % \maketitle % % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx index bba6cce1b7f..7683c237fcd 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx index 75fa81f6c26..967926b3894 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx index 17371f94ad7..2a0eefc1365 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx index 4f8d5d1ea54..b8a12bfd0e2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx index 81e1d8256b3..a47cced687f 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx index a8dbe429ddd..da2bf3671dc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index 2bf6e6e96fb..fc84e2590bf 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx index d6f05251cfd..a5e2b797ffa 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % @@ -125,15 +125,23 @@ % % \begin{function}{l3kernel.charcat} % \begin{syntax} -% |l3kernel.charcat||(|\meta{charcode}, \meta{catcode}|)| +% |l3kernel.charcat(|\meta{charcode}, \meta{catcode}|)| % \end{syntax} % Constructs a character of \meta{charcode} and \meta{catcode} and returns % the result to \TeX{}. % \end{function} % +% \begin{function}{l3kernel.elapsedtime} +% \begin{syntax} +% |l3kernel.elapsedtime()| +% \end{syntax} +% Returns the time in \meta{scaled seconds} since the start of the \TeX{} run +% or since |l3kernel.resettimer| was issued. +% \end{function} +% % \begin{function}{l3kernel.filemdfivesum} % \begin{syntax} -% |l3kernel.filemdfivesum||(|\meta{file}|)| +% |l3kernel.filemdfivesum(|\meta{file}|)| % \end{syntax} % Returns the of the MD5 sum of the file contents read as bytes; note that % the result will depend on the nature of the line endings used in the file, @@ -143,7 +151,7 @@ % % \begin{function}{l3kernel.filemoddate} % \begin{syntax} -% |l3kernel.filemoddate||(|\meta{file}|)| +% |l3kernel.filemoddate(|\meta{file}|)| % \end{syntax} % Returns the of the date/time of last modification of the \meta{file} in the % format @@ -158,15 +166,22 @@ % % \begin{function}{l3kernel.filesize} % \begin{syntax} -% |l3kernel.filesize||(|\meta{file}|)| +% |l3kernel.filesize(|\meta{file}|)| % \end{syntax} % Returns the size of the \meta{file} in bytes. If the \meta{file} is not % found, nothing is returned with \emph{no error raised}. % \end{function} % +% \begin{function}{l3kernel.resettimer} +% \begin{syntax} +% |l3kernel.resettimer()| +% \end{syntax} +% Resets the timer used by |l3kernel.elapsetime|. +% \end{function} +% % \begin{function}{l3kernel.strcmp} % \begin{syntax} -% |l3kernel.strcmp||(|\meta{str one}, \meta{str two}|)| +% |l3kernel.strcmp(|\meta{str one}, \meta{str two}|)| % \end{syntax} % Compares the two strings and returns |0| to \TeX{} % if the two are identical. @@ -322,6 +337,7 @@ local kpse_find = kpse.find_file local lfs_attr = lfs.attributes local md5_sum = md5.sum local open = io.open +local os_clock = os.clock local os_date = os.date local setcatcode = tex.setcatcode local str_format = string.format @@ -357,6 +373,26 @@ l3kernel.charcat = charcat % \end{macrocode} % \end{macro} % +% \begin{macro}{l3kernel.elapsedtime, l3kernel.resettimer} +% Simple timing set up: give the result from the system clock in scaled +% seconds. +% \begin{macrocode} +local base_time = 0 +local function elapsedtime() + local val = (os_clock() - base_time) * 65536 + 0.5 + if val > 2147483647 then + val = 2147483647 + end + write(format("%d",val)) +end +l3kernel.elapsedtime = elapsedtime +local function resettimer() + base_time = 0 +end +l3kernel.resettimer = resettimer +% \end{macrocode} +% \end{macro} +% % \begin{macro}{l3kernel.filemdfivesum} % Read an entire file and hash it: the hash function itself is a built-in. % As Lua is byte-based there is no work needed here in terms of UTF-8 diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx index dfa8efc8ef3..bbda3c1be47 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx index 94e33391f22..47d462cd1d6 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % @@ -614,6 +614,7 @@ \@@_primitive:NN \pdfdraftmode \tex_draftmode:D \@@_primitive:NN \pdfeachlinedepth \tex_eachlinedepth:D \@@_primitive:NN \pdfeachlineheight \tex_eachlineheight:D + \@@_primitive:NN \pdfelapsedtime \tex_elapsedtime:D \@@_primitive:NN \pdffilemoddate \tex_filemoddate:D \@@_primitive:NN \pdffilesize \tex_filesize:D \@@_primitive:NN \pdffirstlineheight \tex_firstlineheight:D @@ -637,6 +638,7 @@ \@@_primitive:NN \pdfprotrudechars \tex_protrudechars:D \@@_primitive:NN \pdfpxdimen \tex_pxdimen:D \@@_primitive:NN \pdfrandomseed \tex_randomseed:D + \@@_primitive:NN \pdfresettimer \tex_resettimer:D \@@_primitive:NN \pdfsavepos \tex_savepos:D \@@_primitive:NN \pdfstrcmp \tex_strcmp:D \@@_primitive:NN \pdfsetrandomseed \tex_setrandomseed:D @@ -756,9 +758,11 @@ % Primitives from \pdfTeX{} that \XeTeX{} renames: also helps with % \LuaTeX{}. % \begin{macrocode} + \@@_primitive:NN \elapsedtime \tex_elapsedtime:D \@@_primitive:NN \mdfivesum \tex_mdfivesum:D \@@_primitive:NN \ifprimitive \tex_ifprimitive:D \@@_primitive:NN \primitive \tex_primitive:D + \@@_primitive:NN \resettimer \tex_resettimer:D \@@_primitive:NN \shellescape \tex_shellescape:D % \end{macrocode} % Primitives from \LuaTeX{}, some of which have been ported back to diff --git a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx index 348cc778e64..a8f774260de 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx @@ -42,7 +42,7 @@ % } % % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index b798f26afa6..30d093b7162 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx index 24f4e6fe3c0..4d0acd387ad 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx index cd946950bb1..5c731604ad5 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx index 96b399d3b78..253471bee23 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx index 4d00ff8da14..4c7f28b498c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx index 3fe51f93bf8..ab5073e19dc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx index d7881921381..5600f186c01 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx index da980738bca..33c4e194e6b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx index 85358a862fa..f447e6aaa71 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx index 7d41367b18b..d36cc946cce 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx index 3e6d65222f6..0ee0543c973 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 92bf53b2713..30544cd00c2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx index 64d5cfaa00f..db9a03bc14c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-10-19} +% \date{Released 2018-10-26} % % \maketitle % diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty new file mode 100644 index 00000000000..b761f3c948d --- /dev/null +++ b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty @@ -0,0 +1,304 @@ +%% +%% This is file `l3benchmark.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% l3benchmark.dtx (with options: `package') +%% +%% Copyright (C) 2018 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 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 +%% +%% This file is part of the "l3experimental bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% File: l3benchmark.dtx Copyright (C) 2011,2012,2014-2018 The LaTeX3 Project +\RequirePackage{expl3} +\ProvidesExplPackage{l3benchmark}{2018-10-26}{} + {L3 Experimental benchmarking} +\sys_if_engine_luatex:TF + { + \cs_new:Npn \sys_timer: + { \int_eval:w \lua_now:n { l3kernel.elapsedtime() } \scan_stop: } + } + { + \cs_if_exist:NT \tex_elapsedtime:D + { + \cs_new:Npn \sys_timer: + { \int_eval:w \tex_elapsedtime:D } + } + } +\__sys_const:nn { sys_if_timer_exist } + { \cs_if_exist_p:N \sys_timer: } +\cs_if_exist:NTF \sys_timer: + { + \sys_if_engine_luatex:TF + { + \cs_new_protected:Npn \sys_gzero_timer: + { \lua_now:n { l3kernel.resettimer() } } + } + { \cs_new_protected:Npn \sys_gzero_timer: { \tex_resettimer:D } } + } + { + \__kernel_msg_new:nnnn { kernel } { no-elapsed-time } + { No~clock~detected~for~#1. } + { The~current~engine~provides~no~way~to~access~the~system~time. } + \cs_new_protected:Npn \sys_gzero_timer: + { + \__kernel_msg_error:nnn { kernel } { no-elapsed-time } + { \sys_gzero_timer: } + } + \cs_new:Npn \sys_timer: + { + \int_value:w + \__kernel_msg_expandable_error:nnn { kernel } { no-elapsed-time } + { \sys_timer: } + \c_zero_int + } + } +\fp_new:N \g_benchmark_time_fp +\fp_new:N \g_benchmark_ops_fp +\cs_new_protected:Npn \benchmark_display: + { \iow_term:x { \fp_to_tl:N \g_benchmark_time_fp \c_space_tl seconds } } +\cs_new_protected:Npn \benchmark_display_in_ops: + { + \iow_term:x + { + \fp_compare:nTF { \g_benchmark_ops_fp > 1e9 } + { \fp_to_tl:n { \g_benchmark_ops_fp * 1e-9 } ~ G~ops } + { + \fp_compare:nTF { \g_benchmark_ops_fp > 1e6 } + { \fp_to_tl:n { \g_benchmark_ops_fp * 1e-6 } ~ M~ops } + { + \fp_compare:nTF { \g_benchmark_ops_fp > 1e3 } + { \fp_to_tl:n { \g_benchmark_ops_fp * 1e-3 } ~ K~ops } + { \fp_to_tl:n { \g_benchmark_ops_fp } ~ ops } + } + } + } + } +\sys_if_timer_exist:F + { + \msg_new:nnnn { benchmark } { no-time } + { The~l3benchmark~package~failed~to~access~a~clock. } + { The~current~engine~provides~no~way~to~access~the~system~time. } + \cs_new_protected:Npn \benchmark_once:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_once_in_ops:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_once_silent:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_in_ops:n #1 + { \msg_error:nn { benchmark } { no-time } } + \cs_new_protected:Npn \benchmark_silent:n #1 + { \msg_error:nn { benchmark } { no-time } } + \fp_gset:Nn \g_benchmark_time_fp { nan } + \fp_gset:Nn \g_benchmark_ops_fp { nan } + \msg_critical:nn { benchmark } { no-time } + } +\fp_new:N \g_benchmark_duration_target_fp +\fp_gset:Nn \g_benchmark_duration_target_fp { 1 } +\int_new:N \g__benchmark_duration_int +\int_new:N \g__benchmark_time_int +\int_new:N \g__benchmark_time_a_int +\int_new:N \g__benchmark_time_b_int +\int_new:N \g__benchmark_time_c_int +\int_new:N \g__benchmark_time_d_int +\int_new:N \g__benchmark_repeat_int +\int_new:N \g__benchmark_nesting_int +\cs_new_protected:Npn \__benchmark_raw:nN #1 + { + \int_gincr:N \g__benchmark_nesting_int + \exp_args:Nc \__benchmark_raw_aux:N + { g__benchmark_ \int_use:N \g__benchmark_nesting_int _int } + \__benchmark_raw_aux: + #1 + \__benchmark_raw_end:N + } +\cs_new_protected:Npn \__benchmark_raw_aux:N #1 + { + \int_gzero_new:N #1 + \cs_gset_protected:Npn \__benchmark_raw_aux: { \int_gset:Nn #1 { \sys_timer: } } + } +\cs_new_protected:Npn \__benchmark_raw_end:N #1 + { + \int_gset:Nn #1 + { + \sys_timer: - + \int_use:c { g__benchmark_ \int_use:N \g__benchmark_nesting_int _int } + } + \int_gdecr:N \g__benchmark_nesting_int + } +\cs_new_eq:NN \__benchmark_tmp:w ? +\cs_new_protected:Npn \__benchmark_raw_replicate:nnN #1 + { + \int_compare:nNnTF {#1} > { 500000 } + { \__benchmark_raw_replicate_large:nnN {#1} } + { \__benchmark_raw_replicate_small:nnN {#1} } + } +\cs_new_protected:Npn \__benchmark_raw_replicate_large:nnN #1#2 + { + \cs_set:Npx \__benchmark_tmp:w ##1 { \prg_replicate:nn { 5000 } {##1} } + \exp_args:Nno \__benchmark_raw_replicate:nnN { #1 / 5000 } + { \__benchmark_tmp:w {#2} } + } +\cs_new_protected:Npn \__benchmark_raw_replicate_small:nnN #1#2 + { + \cs_set:Npx \__benchmark_tmp:w ##1##2 { \prg_replicate:nn {#1} {##1} } + \__benchmark_raw:nN { \__benchmark_tmp:w {#2} { } } \g__benchmark_time_int + \exp_args:No \__benchmark_raw_replicate_aux:nnN + { \int_use:N \g__benchmark_time_int } {#2} + } +\cs_new_protected:Npn \__benchmark_raw_replicate_aux:nnN #1#2#3 + { + \__benchmark_raw:nN { \__benchmark_tmp:w { } {#2} } \g__benchmark_time_int + \int_gset:Nn #3 { #1 - \g__benchmark_time_int } + \cs_set_eq:NN \__benchmark_tmp:w \prg_do_nothing: + } +\fp_new:N \g__benchmark_one_op_fp +\tl_new:N \g__benchmark_code_tl +\cs_new_protected:Npn \benchmark:n #1 + { \benchmark_silent:n {#1} \benchmark_display: } +\cs_new_protected:Npn \benchmark_in_ops:n #1 + { \benchmark_silent:n {#1} \benchmark_display_in_ops: } +\cs_new_protected:Npn \__benchmark_measure_op: + { + \int_gset:Nn \g__benchmark_duration_int { 256 } + \tl_gset:Nn \g__benchmark_code_tl + { \int_gset:Nn \g__benchmark_duration_int { 256 } } % arbitrary single operation + \__benchmark_aux: + \fp_gset_eq:NN \g__benchmark_one_op_fp \g_benchmark_time_fp + \fp_compare:nNnT \g__benchmark_one_op_fp < { 1e-6 } + { \fp_gset:Nn \g__benchmark_one_op_fp { 1e-6 } } + } +\cs_new_protected:Npn \benchmark_silent:n #1 + { + \__benchmark_measure_op: + \int_gset:Nn \g__benchmark_duration_int + { \fp_to_int:n { 65536 * \g_benchmark_duration_target_fp } } + \tl_gset:Nn \g__benchmark_code_tl {#1} + \__benchmark_aux: + \fp_gset:Nn \g_benchmark_ops_fp + { \g_benchmark_time_fp / \g__benchmark_one_op_fp } + } +\cs_new_protected:Npn \__benchmark_aux: + { + \int_gset:Nn \g__benchmark_repeat_int { 1 } + \__benchmark_raw:nN { \g__benchmark_code_tl } \g__benchmark_time_int + \int_compare:nNnF \g__benchmark_time_int < { \g__benchmark_duration_int / 2 } + { + \int_gset_eq:NN \g__benchmark_time_a_int \g__benchmark_time_int + \int_gset_eq:NN \g__benchmark_time_b_int \g__benchmark_time_int + \int_gset_eq:NN \g__benchmark_time_c_int \g__benchmark_time_int + \int_gset_eq:NN \g__benchmark_time_d_int \g__benchmark_time_int + \prg_break: + } + \int_while_do:nNnn \g__benchmark_time_int < { \g__benchmark_duration_int / 100 } + { + \int_compare:nNnT \g__benchmark_repeat_int > { \c_max_int / 4 } + { + \int_gzero:N \g__benchmark_time_a_int + \int_gzero:N \g__benchmark_time_b_int + \int_gzero:N \g__benchmark_time_c_int + \int_gzero:N \g__benchmark_time_d_int + \prg_break: + } + \int_gset:Nn \g__benchmark_repeat_int { 4 * \g__benchmark_repeat_int } + \__benchmark_run:N \g__benchmark_time_int + } + \int_gset:Nn \g__benchmark_repeat_int + { + \int_max:nn { 1 } + { + \g__benchmark_duration_int * \g__benchmark_repeat_int + / ( \g__benchmark_time_int * 4 ) + } + } + \int_compare:nNnTF \g__benchmark_repeat_int = 1 + { \int_gset_eq:NN \g__benchmark_time_a_int \g__benchmark_time_int } + { \__benchmark_run:N \g__benchmark_time_a_int } + \__benchmark_run:N \g__benchmark_time_b_int + \__benchmark_run:N \g__benchmark_time_c_int + \__benchmark_run:N \g__benchmark_time_d_int + \prg_break_point: + \fp_gset:Nn \g_benchmark_time_fp + { + \int_min:nn + { \int_min:nn \g__benchmark_time_a_int \g__benchmark_time_b_int } + { \int_min:nn \g__benchmark_time_c_int \g__benchmark_time_d_int } + / \g__benchmark_repeat_int / 65536 + } + } +\cs_new_protected:Npn \__benchmark_run:N + { \exp_args:NNo \__benchmark_raw_replicate:nnN \g__benchmark_repeat_int { \g__benchmark_code_tl } } +\cs_new_protected:Npn \benchmark_once:n #1 + { \benchmark_once_silent:n {#1} \benchmark_display: } +\cs_new_protected:Npn \benchmark_once_in_ops:n #1 + { \benchmark_once_silent:n {#1} \benchmark_display_in_ops: } +\cs_new_protected:Npn \benchmark_once_silent:n #1 + { + \__benchmark_measure_op: + \__benchmark_raw:nN {#1} \g__benchmark_time_int + \fp_gset:Nn \g_benchmark_time_fp { \g__benchmark_time_int / 65536 } + \fp_gset:Nn \g_benchmark_ops_fp + { \g_benchmark_time_fp / \g__benchmark_one_op_fp } + } +\int_new:N \g__benchmark_tictoc_int +\seq_new:N \g__benchmark_tictoc_seq +\cs_new_protected:Npn \benchmark_tic: + { + \int_compare:nTF { \g__benchmark_tictoc_int == 0 } + { + \sys_gzero_timer: + \__benchmark_tic:n { 0 } + } + { \__benchmark_tic: } + } +\cs_new_protected:Npn \__benchmark_tic: + { + \exp_args:NNf \seq_put_right:Nn \g__benchmark_tictoc_seq { \sys_timer: } + \int_gincr:N \g__benchmark_tictoc_int + \iow_term:x + { + \prg_replicate:nn {\g__benchmark_tictoc_int} {---+} \space + TIC + } + } +\cs_new:Npn \benchmark_toc: + { + \int_compare:nT { \g__benchmark_tictoc_int == 0 } + { \msg_error:nn {benchmark} {toc-first} } + \seq_pop_right:NN \g__benchmark_tictoc_seq \l__benchmark_tictoc_pop_tl + \__benchmark_toc: + } +\cs_new_protected:Npn \__benchmark_toc: + { + \tl_set:Nx \l__benchmark_tictoc_tl + { + \fp_to_decimal:n + { round( ( \sys_timer: - \l__benchmark_tictoc_pop_tl) / 65536 , 3 ) } + } + \iow_term:x + { + \prg_replicate:nn {\g__benchmark_tictoc_int} {---+} \c_space_tl + TOC: \c_space_tl + \l__benchmark_tictoc_tl \c_space_tl s + } + \int_gdecr:N \g__benchmark_tictoc_int + } +\msg_new:nnn {benchmark} {toc-first} + { + \token_to_str:N \benchmark_toc: \space without~ + \token_to_str:N \benchmark_tic: \space ! + } +%% +%% +%% End of file `l3benchmark.sty'. diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty index 4754353e190..55ef24e9eaf 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-10-17}{} +\ProvidesExplPackage{l3color}{2018-10-26}{} {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 259c3b24cb9..82cab92359a 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-10-17}{} +\ProvidesExplPackage{l3draw}{2018-10-26}{} {L3 Experimental core drawing support} \RequirePackage { l3color } %% File: l3draw-boxes.dtx Copyright(C) 2018 The LaTeX3 Project 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 d726025fd56..a100d834ab6 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-10-17}{} +\ProvidesExplPackage{l3str-convert}{2018-10-26}{} {L3 Experimental string encoding conversions} \cs_if_exist:NF \use_ii_i:nn { \cs_new:Npn \use_ii_i:nn #1#2 { #2 #1 } } 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 6ef7b439c39..a88088e155e 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-10-17}{} +\ProvidesExplPackage{l3str-format}{2018-10-26}{} {L3 Experimental string formatting} \cs_generate_variant:Nn \use:nn { nf } \cs_generate_variant:Nn \use:nnn { fnf } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty index 2e6fd685666..73b6bae02cd 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty @@ -20,7 +20,7 @@ %% %% File: l3sys-shell.dtx Copyright(C) 2018 The LaTeX3 Project \RequirePackage{expl3} -\ProvidesExplPackage{l3sys-shell}{2018-10-17}{} +\ProvidesExplPackage{l3sys-shell}{2018-10-26}{} {L3 Experimental system shell functions} \cs_new:Npn \__sys_path_to_win:n #1 { diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index ec312d9174f..bdce6ad2aea 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -20,7 +20,7 @@ %% %% File: xcoffins.dtx Copyright(C) 2010-2012,2014,2016-2018 The LaTeX3 Project \RequirePackage{xparse} -\ProvidesExplPackage{xcoffins}{2018-10-17}{} +\ProvidesExplPackage{xcoffins}{2018-10-26}{} {L3 Experimental design level coffins} \keys_define:nn { coffin } { diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty index 9addf19a18d..6cbcab46f2b 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-10-17}{} +\ProvidesExplPackage{l3galley}{2018-10-26}{} {L3 Experimental galley code} \int_new:N \l__galley_tmp_int \seq_new:N \g__galley_tmpa_seq diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty index 79e2bc7cfe2..6c15f5a8548 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-10-17}{} +\ProvidesExplPackage{xgalley}{2018-10-26}{} {L3 Experimental galley} \RequirePackage{xparse,xtemplate,l3galley} \clist_new:N \l__galley_tmpa_clist diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 4e6662a5f8c..cb01bd88271 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-10-19}% +\def\ExplFileDate{2018-10-26}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -836,6 +836,7 @@ \__kernel_primitive:NN \pdfdraftmode \tex_draftmode:D \__kernel_primitive:NN \pdfeachlinedepth \tex_eachlinedepth:D \__kernel_primitive:NN \pdfeachlineheight \tex_eachlineheight:D + \__kernel_primitive:NN \pdfelapsedtime \tex_elapsedtime:D \__kernel_primitive:NN \pdffilemoddate \tex_filemoddate:D \__kernel_primitive:NN \pdffilesize \tex_filesize:D \__kernel_primitive:NN \pdffirstlineheight \tex_firstlineheight:D @@ -859,6 +860,7 @@ \__kernel_primitive:NN \pdfprotrudechars \tex_protrudechars:D \__kernel_primitive:NN \pdfpxdimen \tex_pxdimen:D \__kernel_primitive:NN \pdfrandomseed \tex_randomseed:D + \__kernel_primitive:NN \pdfresettimer \tex_resettimer:D \__kernel_primitive:NN \pdfsavepos \tex_savepos:D \__kernel_primitive:NN \pdfstrcmp \tex_strcmp:D \__kernel_primitive:NN \pdfsetrandomseed \tex_setrandomseed:D @@ -947,9 +949,11 @@ \__kernel_primitive:NN \XeTeXvariationmin \tex_XeTeXvariationmin:D \__kernel_primitive:NN \XeTeXvariationname \tex_XeTeXvariationname:D \__kernel_primitive:NN \XeTeXversion \tex_XeTeXversion:D + \__kernel_primitive:NN \elapsedtime \tex_elapsedtime:D \__kernel_primitive:NN \mdfivesum \tex_mdfivesum:D \__kernel_primitive:NN \ifprimitive \tex_ifprimitive:D \__kernel_primitive:NN \primitive \tex_primitive:D + \__kernel_primitive:NN \resettimer \tex_resettimer:D \__kernel_primitive:NN \shellescape \tex_shellescape:D \__kernel_primitive:NN \alignmark \tex_alignmark:D \__kernel_primitive:NN \aligntab \tex_aligntab:D @@ -10568,6 +10572,12 @@ \tl_set:Nx \l__iow_newline_tl { \tl_to_str:N \l__iow_newline_tl } \int_set:Nn \l__iow_line_target_int { \l_iow_line_count_int - \str_count:N \l__iow_newline_tl + 1 } + \int_compare:nNnT { \l__iow_line_target_int } < 0 + { + \tl_set:Nn \l__iow_newline_tl { \iow_newline: } + \int_set:Nn \l__iow_line_target_int + { \l_iow_line_count_int + 1 } + } \__iow_wrap_do: \exp_args:NNf \group_end: #4 { \tl_to_str:N \l__iow_wrap_tl } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index b7b8cc854a9..2121732fb75 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-10-19}% +\def\ExplFileDate{2018-10-26}% \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 279f3c276ad..640889bf12a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -38,6 +38,7 @@ local kpse_find = kpse.find_file local lfs_attr = lfs.attributes local md5_sum = md5.sum local open = io.open +local os_clock = os.clock local os_date = os.date local setcatcode = tex.setcatcode local str_format = string.format @@ -54,6 +55,19 @@ local function charcat(charcode, catcode) sprint(charcat_table, utf8_char(charcode)) end l3kernel.charcat = charcat +local base_time = 0 +local function elapsedtime() + local val = (os_clock() - base_time) * 65536 + 0.5 + if val > 2147483647 then + val = 2147483647 + end + write(format("%d",val)) +end +l3kernel.elapsedtime = elapsedtime +local function resettimer() + base_time = 0 +end +l3kernel.resettimer = resettimer local function filemdfivesum(name) local file = kpse_find(name, "tex", true) if file then diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 81b874b883d..d1675372af1 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-10-19}% +\def\ExplFileDate{2018-10-26}% \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 bd2206bb9b9..67e35f6f09b 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-10-19}{} + {l3dvidpfmx.def}{2018-10-26}{} {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 a6b17ee604b..7947cf5f5c2 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-10-19}{} + {l3dvips.def}{2018-10-26}{} {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 60613eafbb5..c4d86ecc97a 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-10-19}{} + {l3dvisvgm.def}{2018-10-26}{} {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 67b0dae7db4..b797fbf8230 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-10-19}{} + {l3pdfmode.def}{2018-10-26}{} {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 ab918b7aaf6..718a499bb9d 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-10-19}{} + {l3xdvidpfmx.def}{2018-10-26}{} {L3 Experimental driver: xdvipdfmx} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 |