[latex3-commits] [git/LaTeX3-latex3-latex3] luaintarray: Add comment for luadata mechanism (7c1f2cabf)

Marcel Fabian Krüger tex at 2krueger.de
Sat Nov 13 14:59:59 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : luaintarray
Link       : https://github.com/latex3/latex3/commit/7c1f2cabf390fd3b442e1a0532186d019e66fbd2

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

commit 7c1f2cabf390fd3b442e1a0532186d019e66fbd2
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Nov 13 14:59:59 2021 +0100

    Add comment for luadata mechanism


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

7c1f2cabf390fd3b442e1a0532186d019e66fbd2
 l3kernel/l3intarray.dtx | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/l3kernel/l3intarray.dtx b/l3kernel/l3intarray.dtx
index 07ed85419..083e79a0d 100644
--- a/l3kernel/l3intarray.dtx
+++ b/l3kernel/l3intarray.dtx
@@ -306,6 +306,15 @@ local @@_table do
     tables[i] = table
     return table
   end
+%    \end{macrocode}
+% Since in \LaTeX{} this is loaded in the format, we want to preserve any intarrays
+% which are created while format building for the actual run.
+%
+% To do this, we use the \texttt{register_luadata} mechanism from \pkg{l3luatex}:
+% Directly before the format get dumped, the following function gets invoked and serializes
+% all existing tables into a string. This string gets compiled and dumped into the format and
+% is made available at the beginning of regular runs as \texttt{get_luadata'@@'}.
+%    \begin{macrocode}
   if register_luadata then
     register_luadata('@@', function()
       local t = "{[0]={},"





More information about the latex3-commits mailing list.