Debian Codegraph @

texmf-dist/tex/latex/base/ltluatex.tex

raw
1 %%
2 %% This is file `ltluatex.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ltluatex.dtx (with options: `tex,plain')
8 %%
9 %% This is a generated file.
10 %%
11 %% The source is maintained by the LaTeX Project team and bug
12 %% reports for it can be opened at https://latex-project.org/bugs.html
13 %% (but please observe conditions on bug reports sent to that address!)
14 %%
15 %%
16 %% Copyright (C) 1993-2025
17 %% The LaTeX Project and any individual authors listed elsewhere
18 %% in this file.
19 %%
20 %% This file was generated from file(s) of the LaTeX base system.
21 %% --------------------------------------------------------------
22 %%
23 %% It may be distributed and/or modified under the
24 %% conditions of the LaTeX Project Public License, either version 1.3c
25 %% of this license or (at your option) any later version.
26 %% The latest version of this license is in
27 %% https://www.latex-project.org/lppl.txt
28 %% and version 1.3c or later is part of all distributions of LaTeX
29 %% version 2008 or later.
30 %%
31 %% This file has the LPPL maintenance status "maintained".
32 %%
33 %% This file may only be distributed together with a copy of the LaTeX
34 %% base system. You may however distribute the LaTeX base system without
35 %% such generated files.
36 %%
37 %% The list of all files belonging to the LaTeX base distribution is
38 %% given in the file `manifest.txt'. See also `legal.txt' for additional
39 %% information.
40 %%
41 %% The list of derived (unpacked) files belonging to the distribution
42 %% and covered by LPPL is defined by the unpacking scripts (with
43 %% extension .ins) which are part of the distribution.
44 \ifx\newluafunction\undefined\else\expandafter\endinput\fi
45 \ifx
46 \ProvidesFile\undefined\begingroup\def\ProvidesFile
47 #1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}}
48 \fi
49 \ProvidesFile{ltluatex.tex}
50 [2025/01/11 v1.2e
51 LuaTeX support for plain TeX (core)%
52 ]
53 \edef\etatcatcode{\the\catcode`\@}
54 \catcode`\@=11
55 \ifnum\luatexversion<60 %
56 \wlog{***************************************************}
57 \wlog{* LuaTeX version too old for ltluatex support *}
58 \wlog{***************************************************}
59 \expandafter\endinput
60 \fi
61 \long\def\@gobble#1{}
62 \long\def\@firstofone#1{#1}
63 \directlua{tex.enableprimitives("",tex.extraprimitives("luatex"))}
64 \ifx\e@alloc\@undefined
65 \ifx\documentclass\@undefined
66 \ifx\loccount\@undefined
67 \input{etex.src}%
68 \fi
69 \catcode`\@=11 %
70 \outer\expandafter\def\csname newfam\endcsname
71 {\alloc@8\fam\chardef\et@xmaxfam}
72 \else
73 \RequirePackage{etex}
74 \expandafter\def\csname newfam\endcsname
75 {\alloc@8\fam\chardef\et@xmaxfam}
76 \expandafter\let\expandafter\new@mathgroup\csname newfam\endcsname
77 \fi
78 \edef \et@xmaxregs {\ifx\directlua\@undefined 32768\else 65536\fi}
79 \edef \et@xmaxfam {\ifx\Umathcode\@undefined\sixt@@n\else\@cclvi\fi}
80 \count 270=\et@xmaxregs % locally allocates \count registers
81 \count 271=\et@xmaxregs % ditto for \dimen registers
82 \count 272=\et@xmaxregs % ditto for \skip registers
83 \count 273=\et@xmaxregs % ditto for \muskip registers
84 \count 274=\et@xmaxregs % ditto for \box registers
85 \count 275=\et@xmaxregs % ditto for \toks registers
86 \count 276=\et@xmaxregs % ditto for \marks classes
87 \expandafter\let\csname newcount\expandafter\expandafter\endcsname
88 \csname globcount\endcsname
89 \expandafter\let\csname newdimen\expandafter\expandafter\endcsname
90 \csname globdimen\endcsname
91 \expandafter\let\csname newskip\expandafter\expandafter\endcsname
92 \csname globskip\endcsname
93 \expandafter\let\csname newbox\expandafter\expandafter\endcsname
94 \csname globbox\endcsname
95 \chardef\e@alloc@top=65535
96 \let\e@alloc@chardef\chardef
97 \def\e@alloc#1#2#3#4#5#6{%
98 \global\advance#3\@ne
99 \e@ch@ck{#3}{#4}{#5}#1%
100 \allocationnumber#3\relax
101 \global#2#6\allocationnumber
102 \wlog{\string#6=\string#1\the\allocationnumber}}%
103 \gdef\e@ch@ck#1#2#3#4{%
104 \ifnum#1<#2\else
105 \ifnum#1=#2\relax
106 #1\@cclvi
107 \ifx\count#4\advance#1 10 \fi
108 \fi
109 \ifnum#1<#3\relax
110 \else
111 \errmessage{No room for a new \string#4}%
112 \fi
113 \fi}%
114 \expandafter\csname newcount\endcsname\e@alloc@attribute@count
115 \expandafter\csname newcount\endcsname\e@alloc@ccodetable@count
116 \expandafter\csname newcount\endcsname\e@alloc@luafunction@count
117 \expandafter\csname newcount\endcsname\e@alloc@whatsit@count
118 \expandafter\csname newcount\endcsname\e@alloc@bytecode@count
119 \expandafter\csname newcount\endcsname\e@alloc@luachunk@count
120 \fi
121 \ifx\e@alloc@attribute@count\@undefined
122 \countdef\e@alloc@attribute@count=258
123 \e@alloc@attribute@count=\z@
124 \fi
125 \def\newattribute#1{%
126 \e@alloc\attribute\attributedef
127 \e@alloc@attribute@count\m@ne\e@alloc@top#1%
128 }
129 \def\setattribute#1#2{#1=\numexpr#2\relax}
130 \def\unsetattribute#1{#1=-"7FFFFFFF\relax}
131 \ifx\e@alloc@ccodetable@count\@undefined
132 \countdef\e@alloc@ccodetable@count=259
133 \e@alloc@ccodetable@count=\z@
134 \fi
135 \def\newcatcodetable#1{%
136 \e@alloc\catcodetable\chardef
137 \e@alloc@ccodetable@count\m@ne{"8000}#1%
138 \initcatcodetable\allocationnumber
139 }
140 \newcatcodetable\catcodetable@initex
141 \newcatcodetable\catcodetable@string
142 \begingroup
143 \def\setrangecatcode#1#2#3{%
144 \ifnum#1>#2 %
145 \expandafter\@gobble
146 \else
147 \expandafter\@firstofone
148 \fi
149 {%
150 \catcode#1=#3 %
151 \expandafter\setrangecatcode\expandafter
152 {\number\numexpr#1 + 1\relax}{#2}{#3}
153 }%
154 }
155 \@firstofone{%
156 \catcodetable\catcodetable@initex
157 \catcode0=12 %
158 \catcode13=12 %
159 \catcode37=12 %
160 \setrangecatcode{65}{90}{12}%
161 \setrangecatcode{97}{122}{12}%
162 \catcode92=12 %
163 \catcode127=12 %
164 \savecatcodetable\catcodetable@string
165 \endgroup
166 }%
167 \newcatcodetable\catcodetable@latex
168 \newcatcodetable\catcodetable@atletter
169 \begingroup
170 \def\parseunicodedataI#1;#2;#3;#4\relax{%
171 \parseunicodedataII#1;#3;#2 First>\relax
172 }%
173 \def\parseunicodedataII#1;#2;#3 First>#4\relax{%
174 \ifx\relax#4\relax
175 \expandafter\parseunicodedataIII
176 \else
177 \expandafter\parseunicodedataIV
178 \fi
179 {#1}#2\relax%
180 }%
181 \def\parseunicodedataIII#1#2#3\relax{%
182 \ifnum 0%
183 \if L#21\fi
184 \if M#21\fi
185 >0 %
186 \catcode"#1=11 %
187 \fi
188 }%
189 \def\parseunicodedataIV#1#2#3\relax{%
190 \read\unicoderead to \unicodedataline
191 \if L#2%
192 \count0="#1 %
193 \expandafter\parseunicodedataV\unicodedataline\relax
194 \fi
195 }%
196 \def\parseunicodedataV#1;#2\relax{%
197 \loop
198 \unless\ifnum\count0>"#1 %
199 \catcode\count0=11 %
200 \advance\count0 by 1 %
201 \repeat
202 }%
203 \def\storedpar{\par}%
204 \chardef\unicoderead=\numexpr\count16 + 1\relax
205 \openin\unicoderead=UnicodeData.txt %
206 \loop\unless\ifeof\unicoderead %
207 \read\unicoderead to \unicodedataline
208 \unless\ifx\unicodedataline\storedpar
209 \expandafter\parseunicodedataI\unicodedataline\relax
210 \fi
211 \repeat
212 \closein\unicoderead
213 \@firstofone{%
214 \catcode64=12 %
215 \savecatcodetable\catcodetable@latex
216 \catcode64=11 %
217 \savecatcodetable\catcodetable@atletter
218 }
219 \endgroup
220 \ifx\e@alloc@luafunction@count\@undefined
221 \countdef\e@alloc@luafunction@count=260
222 \e@alloc@luafunction@count=\z@
223 \fi
224 \def\newluafunction{%
225 \e@alloc\luafunction\e@alloc@chardef
226 \e@alloc@luafunction@count\m@ne\e@alloc@top
227 }
228 \def\newluacmd{%
229 \e@alloc\luafunction\luadef
230 \e@alloc@luafunction@count\m@ne\e@alloc@top
231 }
232 \def\newprotectedluacmd{%
233 \e@alloc\luafunction{\protected\luadef}
234 \e@alloc@luafunction@count\m@ne\e@alloc@top
235 }
236 \ifx\e@alloc@whatsit@count\@undefined
237 \countdef\e@alloc@whatsit@count=261
238 \e@alloc@whatsit@count=\z@
239 \fi
240 \def\newwhatsit#1{%
241 \e@alloc\whatsit\e@alloc@chardef
242 \e@alloc@whatsit@count\m@ne\e@alloc@top#1%
243 }
244 \ifx\e@alloc@bytecode@count\@undefined
245 \countdef\e@alloc@bytecode@count=262
246 \e@alloc@bytecode@count=\z@
247 \fi
248 \def\newluabytecode#1{%
249 \e@alloc\luabytecode\e@alloc@chardef
250 \e@alloc@bytecode@count\m@ne\e@alloc@top#1%
251 }
252
253 \ifx\e@alloc@luachunk@count\@undefined
254 \countdef\e@alloc@luachunk@count=263
255 \e@alloc@luachunk@count=\z@
256 \fi
257 \def\newluachunkname#1{%
258 \e@alloc\luachunk\e@alloc@chardef
259 \e@alloc@luachunk@count\m@ne\e@alloc@top#1%
260 {\escapechar\m@ne
261 \directlua{lua.name[\the\allocationnumber]="\string#1"}}%
262 }
263 \def\now@and@everyjob#1{%
264 \everyjob\expandafter{\the\everyjob
265 #1%
266 }%
267 #1%
268 }
269 \begingroup
270 \attributedef\attributezero=0 %
271 \chardef \charzero =0 %
272 \countdef \CountZero =0 %
273 \dimendef \dimenzero =0 %
274 \mathchardef \mathcharzero =0 %
275 \muskipdef \muskipzero =0 %
276 \skipdef \skipzero =0 %
277 \toksdef \tokszero =0 %
278 \directlua{require("ltluatex")}
279 \endgroup
280 \catcode`\@=\etatcatcode\relax
281 \endinput
282 %%
283 %% End of file `ltluatex.tex'.