[latex3-commits] [git/LaTeX3-latex3-latex2e] loadlua: Load Lua module during format building (da4fc233)

Marcel Fabian Krüger tex at 2krueger.de
Mon Aug 10 12:58:58 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : loadlua
Link       : https://github.com/latex3/latex2e/commit/da4fc233927db044c345c4cf5e5b7fb0b9c75ea1

>---------------------------------------------------------------

commit da4fc233927db044c345c4cf5e5b7fb0b9c75ea1
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon Aug 10 12:58:58 2020 +0200

    Load Lua module during format building


>---------------------------------------------------------------

da4fc233927db044c345c4cf5e5b7fb0b9c75ea1
 base/changes.txt  |  8 ++++++++
 base/ltluatex.dtx | 19 ++++++++++++++++---
 base/ltoutenc.dtx | 10 ++--------
 3 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 6978eb7d..a6e0c557 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -7,6 +7,14 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2020-08-10  Marcel Krüger     <Marcel.Krueger at latex-project.org>
+
+	* ltoutenc.dtx, ltluatex.dtx:
+	Moved \now at and@everyjob to ltluatex and load luatexbase during format building.
+
+	* ltluatex.dtx:
+	new_graf callback type changed to exclusive
+
 2020-08-03  Joseph Wright <joseph.wright at latex-project.org>
 
 	* ltluatex.dtx:
diff --git a/base/ltluatex.dtx b/base/ltluatex.dtx
index a7bb1bfe..ec1031cc 100644
--- a/base/ltluatex.dtx
+++ b/base/ltluatex.dtx
@@ -28,7 +28,7 @@
 \ProvidesFile{ltluatex.dtx}
 %</driver>
 %<*tex>
-[2020/08/03 v1.1q
+[2020/08/10 v1.1r
 %</tex>
 %<plain>  LuaTeX support for plain TeX (core)
 %<*tex>
@@ -777,14 +777,27 @@
 % \end{macro}
 %
 % \subsection{Lua loader}
+% \changes{v1.1r}{2020/08/10}{Load ltluatex Lua module during format building}
+%
+% Lua code loaded in the format often has to to be loaded again at the
+% beginning of every job, so we define a helper whch allows us to avoid
+% duplicated code:
+%
+%    \begin{macrocode}
+\def\now at and@everyjob#1{%
+  \everyjob\expandafter{\the\everyjob
+    #1%
+  }%
+  #1%
+}
+%    \end{macrocode}
 %
 % Load the Lua code at the start of every job.
 % For the conversion of \TeX{} into numbers at the Lua side we need some
 % known registers: for convenience we use a set of systematic names, which
 % means using a group around the Lua loader.
 %    \begin{macrocode}
-%<2ekernel>\everyjob\expandafter{%
-%<2ekernel>  \the\everyjob
+%<2ekernel>\now at and@everyjob{%
   \begingroup
     \attributedef\attributezero=0 %
     \chardef     \charzero     =0 %
diff --git a/base/ltoutenc.dtx b/base/ltoutenc.dtx
index 986e40b5..c6bfc149 100644
--- a/base/ltoutenc.dtx
+++ b/base/ltoutenc.dtx
@@ -37,14 +37,14 @@
 %<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
 %<TU>\ProvidesFile{tuenc.def}
 %<package>\ProvidesPackage{fontenc}
-%<OT1|T1|OMS|OML|OT4|TU|package> [2020/04/22 v2.0p
+%<OT1|T1|OMS|OML|OT4|TU|package> [2020/08/10 v2.0s
 %<OT1|T1|OMS|OML|OT4|TS1|TU>      Standard LaTeX file]
 %<package>                        Standard LaTeX package]
 %
 %<*driver>
 % \fi
 \ProvidesFile{ltoutenc.dtx}
-             [2020/07/21 v2.0r LaTeX Kernel (font encodings)]
+             [2020/08/10 v2.0s LaTeX Kernel (font encodings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltoutenc.dtx}
@@ -2901,12 +2901,6 @@
     \else
       \newluafunction\@remove at tlig@@@@
 %    \end{macrocode}
-% We are in the format and Lua functions can not be dumped, so we have to repeat
-% the code during |\everyjob|. Therefore we first define a helper to both execute
-% some code and same it for |\everyjob|:
-%    \begin{macrocode}
-      \def\now at and@everyjob#1{\toksapp\everyjob{#1}#1}
-%    \end{macrocode}
 % Now we can define the function. Mostly we just have to insert a protected glyph
 % node, which is a glyph node with subtype 256. But we have to keep track of the
 % current mode to avoid inserting the glyph into a vlist.





More information about the latex3-commits mailing list.