Debian Codegraph @

texmf-dist/tex/luatex/luatex-type-definitions/luatex-type-definitions.lua

raw
1 ---Copyright (C) 2022-2025 by Josef Friedrich <[email protected]>
2 ------------------------------------------------------------------------
3 ---
4 ---This program is free software: you can redistribute it and/or modify it
5 ---under the terms of the GNU General Public License as published by the
6 ---Free Software Foundation, either version 2 of the License, or (at your
7 ---option) any later version.
8 ---
9 ---This program is distributed in the hope that it will be useful, but
10 ---WITHOUT ANY WARRANTY; without even the implied warranty of
11 ---MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
12 ---Public License for more details.
13 ---
14 ---You should have received a copy of the GNU General Public License along
15 ---with this program. If not, see <https://www.gnu.org/licenses/>.
16 ---@meta
17 ---
18 ---The token library provides means to intercept the input and deal with it at the
19 ---Lua level. The library provides a basic scanner infrastructure that can be used
20 ---to write macros that accept a wide range of arguments. This interface is on
21 ---purpose kept general and as performance is quite ok. One can build additional
22 ---parsers without too much overhead. It's up to macro package writers to see how
23 ---they can benefit from this as the main principle behind LuaTeX is to provide a
24 ---minimal set of tools and no solutions. The scanner functions are probably the
25 ---most intriguing.
26 ---
27 ---__Reference:__
28 ---
29 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L2091-L2098](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L2091-L2098)
30 ---
31 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
32 token = {}
33
34 ---
35 ---10.6 The token library
36
37 ---
38 ---Scan and gobble a given keyword.
39 ---
40 ---As with the regular *TeX* keyword scanner this is case insensitive (and ASCII based).
41 ---
42 ---__Example:__
43 ---
44 ---```latex
45 ---\def\scanner{\directlua{
46 --- print(token.scan_keyword('keyword'))
47 ---}}
48 ---\scanner keyword % true
49 ---\scanner KEYWORD % true
50 ---\scanner not the keyword % false
51 ---```
52 ---
53 ---__Reference:__
54 ---
55 ---* Corresponding C source code: [lnewtokenlib.c#L339-L353](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L339-L353)
56 ---
57 ---@param keyword string # An ASCII based keyword to scan for.
58 ---
59 ---@return boolean # True if the keyword could be gobbled up otherwise false.
60 ---
61 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
62 function token.scan_keyword(keyword) end
63
64 ---
65 --- Scan and gobble a given case sensitive and *UTF-8* based keyword.
66 ---
67 ---__Example:__
68 ---
69 ---```tex
70 ---\def\scanner{\directlua{
71 --- print(token.scan_keyword_cs('Keyword'))
72 ---}}
73 ---\scanner Keyword % true
74 ---\scanner keyword % false
75 ---```
76 ---
77 ---__Reference:__
78 ---
79 ---* Corresponding C source code: [lnewtokenlib.c#L355-L369](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L355-L369)
80 ---
81 ---@param keyword string # A case sensitive and *UTF-8* based keyword
82 ---
83 ---@return boolean # True if the case sensitive and *UTF-8* based keyword could be gobbled up otherwise false.
84 ---
85 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
86 function token.scan_keyword_cs(keyword) end
87
88 ---
89 ---Scan and gobble a given integer.
90 ---
91 ---__Example:__
92 ---
93 ---```latex
94 ---\def\scanner{\directlua{
95 --- print(token.scan_int())
96 ---}}
97 ---\scanner 1 % 1
98 ---\scanner 1.1 % 1 (Scans only 1 not 1.1)
99 ---\scanner -1 % -1
100 ---\scanner 1234567890 % 1234567890
101 ---\scanner string % Missing number, treated as zero
102 ---\scanner 12345678901 % Number to big
103 ---```
104 ---
105 ---__Reference:__
106 ---
107 ---* Corresponding C source code: [lnewtokenlib.c#L391-L401](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L391-L401)
108 ---
109 ---@return integer
110 ---
111 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
112 function token.scan_int() end
113
114 ---
115 ---Scan and gobble a floating point number that cannot have an exponent (`1E10` is scanned as `1.0`).
116 ---
117 ---__Example:__
118 ---
119 ---```tex
120 ---\def\scan{\directlua{
121 --- print(token.scan_real())
122 ---}}
123 ---\scan 1E10 % 1.0 Does not scan “E10“
124 ---\scan 1 % 1.0
125 ---\scan 1.1 % 1.1
126 ---\scan .1 % 0.1
127 ---\scan - .1 % -0.1
128 ---\scan -1 % -1.0
129 ---\scan - 1 % -1.0
130 ---\scan 1234567890 % 1234567890.0
131 ---```
132 ---
133 ---__Reference:__
134 ---
135 ---* Corresponding C source code: [lnewtokenlib.c#L530-L533](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L530-L533)
136 ---
137 ---@return number
138 ---
139 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
140 function token.scan_real() end
141
142 ---
143 ---Scan and gobble a floating point number that can be provided with an exponent (e. g. `1E10`).
144 ---
145 ---__Example:__
146 ---
147 ---```tex
148 ---\def\scan{\directlua{
149 --- print(token.scan_float())
150 ---}}
151 ---\scan 1E10 % 10000000000.0
152 ---\scan .1e-10 % 1e-11
153 ---\scan 1 % 1.0
154 ---\scan 1.1 % 1.1
155 ---\scan .1 % 0.1
156 ---\scan - .1 % -0.1
157 ---\scan -1 % -1.0
158 ---\scan - 1 % -1.0
159 ---```
160 ---
161 ---__Reference:__
162 ---
163 ---* Corresponding C source code: [lnewtokenlib.c#L525-L528](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L525-L528)
164 ---
165 ---@return number
166 ---
167 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
168 function token.scan_float() end
169
170 ---
171 ---Returns a number representing a dimension and or two numbers being the filler and order
172 ---
173 ---__Example:__
174 ---
175 ---Parameter `inf`:
176 ---
177 ---```tex
178 ---\directlua{token.scan_dimen(true)}1fi % 1
179 ---\directlua{token.scan_dimen(true)}1fil % 2
180 ---\directlua{token.scan_dimen(true)}1fill % 3
181 ---\directlua{token.scan_dimen(true)}1filll % 4
182 ---
183 ---```
184 ---
185 ---Parameter `mu`:
186 ---
187 ---```tex
188 ---\directlua{token.scan_dimen(false, true)}1mu % 65536
189 ---\directlua{token.scan_dimen(false, true)}1cm % Illegal unit of measure (mu inserted).
190 ---```
191 ---__Reference:__
192 ---
193 ---* Corresponding C source code: [lnewtokenlib.c#L535-L557](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L535-L557)
194 ---
195 ---@param inf? boolean # inf values allowed
196 ---@param mu? boolean # mu (math units) units required
197 ---
198 ---@return integer
199 ---
200 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
201 function token.scan_dimen(inf, mu) end
202
203 ---
204 ---returns a glue spec node
205 ---
206 ---__Example:__
207 ---
208 ---```tex
209 ---\def\scan{\directlua{
210 --- local node = token.scan_glue()
211 --- print(node.width, node.stretch, node.stretch_order, node.shrink, node.shrink_order)
212 ---}}
213 ---\def\scanMu{\directlua{
214 --- local node = token.scan_glue(true)
215 --- print(node.width, node.stretch, node.stretch_order, node.shrink, node.shrink_order)
216 ---}}
217 ---\scan 1pt % 65536 0 0 0 0
218 ---\scan 1pt plus 2pt % 65536 131072 0 0 0
219 ---\scan 1pt minus 3pt % 65536 0 0 196608 0
220 ---\scan 1pt plus 2pt minus 3pt % 65536 131072 0 196608 0
221 ---\scan 1pt plus 2fi minus 3fi % 65536 131072 1 196608 1
222 ---\scan 1pt plus 2fil minus 3fil % 65536 131072 2 196608 2
223 ---\scan 1pt plus 2fill minus 3fill % 65536 131072 3 196608 3
224 ---\scan 1pt plus 2filll minus 3filll % 65536 131072 4 196608 4
225 ---\scan string % Missing number, treated as zero.
226 ---\scanMu 3mu % 196608 0 0 0 0
227 ---```
228 ---
229 ---__Reference:__
230 ---
231 ---* Corresponding C source code: [lnewtokenlib.c#L559-L573](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L559-L573)
232 ---
233 ---@param mu_units? boolean
234 ---
235 ---@return GlueSpecNode
236 ---
237 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
238 function token.scan_glue(mu_units) end
239
240 ---
241 ---Scan a list of tokens delimited by balanced braces.
242 ---
243 ---__Example:__
244 ---
245 ---```tex
246 ---\directlua{
247 --- local t = token.scan_toks()
248 --- for id, tok in ipairs(t) do
249 --- print(id, tok, tok.command, tok.cmdname, tok.csname)
250 --- end
251 ---}{Some text}
252 ---```
253 ---
254 ---__Reference:__
255 ---
256 ---* Corresponding C source code: [lnewtokenlib.c#L575-L602](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L575-L602)
257 ---
258 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)-
259 ---
260 ---@param definer? boolean `macro_def`, `\def`
261 ---@param expand? boolean
262 ---
263 ---@return Token[]
264 function token.scan_toks(definer, expand) end
265
266 ---
267 ---Return a character if its category is in the given bitset (representing catcodes)
268 ---
269 ---__Reference:__
270 ---
271 ---* Corresponding C source code: [lnewtokenlib.c#L730-L756](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L730-L756)
272 ---
273 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
274 function token.scan_code(bitset) end
275
276 ---
277 ---Scan and gobble a string.
278 ---
279 ---The string scanner scans for something between curly braces and expands on the
280 ---way, or when it sees a control sequence it will return its meaning. Otherwise it
281 ---will scan characters with catcode `letter` or `other`.
282 ---
283 ---__Example:__
284 ---
285 ---```tex
286 ---\def\scan{\directlua{
287 --- print(token.scan_string())
288 ---}}
289 ---\def\bar{bar}
290 ---\def\foo{\bar}
291 ---\scan \foo % bar
292 ---\scan {\foo} % bar
293 ---\scan {A string} % A string
294 ---\scan A string % A
295 ---\scan Word1 Word2 % Word1
296 ---```
297 ---
298 ---__Reference:__
299 ---
300 ---* Corresponding C source code: [lnewtokenlib.c#L604-L641](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L604-L641)
301 ---
302 ---@return string # A string given between `{` `}`, as `\macro` or as sequence of characters with catcode 11 or 12
303 ---
304 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
305 function token.scan_string() end
306
307 ---
308 ---Scan and gobble an argument.
309 ---
310 ---This function is simular to `token.scan_string` but also accepts a `\cs`.
311 ---It expands the given argument. When a braced
312 ---argument is scanned, expansion can be prohibited by passing `false`
313 ---(default is `true`). In case of a control sequence passing `false`
314 ---will result in a one-level expansion (the meaning of the macro).
315 ---
316 ---__Example:__
317 ---
318 ---```latex
319 ---\def\scan{\directlua{
320 --- print(token.scan_argument(true))
321 ---}}
322 ---\def\scanNoExpand{\directlua{
323 --- print(token.scan_argument(false))
324 ---}}
325 ---\def\foo{bar}
326 ---\scan \foo % bar
327 ---\scan { {\bf text} } % {\fam \bffam \tenbf text}
328 ---\scanNoExpand { {\bf text} } % {\bf text}
329 ---\scan c % c
330 ---\scan \bf % \fam \bffam \tenbf
331 ---```
332 ---
333 ---__Reference:__
334 ---
335 ---* Corresponding C source code: [lnewtokenlib.c#L643-L702](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L643-L702)
336 ---
337 ---@param expand? boolean # When a braced argument is scanned, expansion can be prohibited by passing `false` (default is `true`)
338 ---
339 ---@return string
340 ---
341 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
342 function token.scan_argument(expand) end
343
344 ---
345 ---Return a sequence of characters with catcode `11` or `12` as a string.
346 ---
347 ---__Reference:__
348 ---
349 ---* Corresponding C source code: [lnewtokenlib.c#L704-L728](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L704-L728)
350 ---
351 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
352 function token.scan_word() end
353
354 ---
355 ---Return `foo` after scanning `\foo`.
356 ---
357 ---__Reference:__
358 ---
359 ---* Corresponding C source code: [lnewtokenlib.c#L371-L389](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L371-L389)
360 ---
361 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
362 function token.scan_csname() end
363
364 ---
365 ---Pick up a box specification and return a `[h|v]list` node.
366 ---
367 ---__Reference:__
368 ---
369 ---* Corresponding C source code: [lnewtokenlib.c#L1100-L1111](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1100-L1111)
370 ---
371 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
372 function token.scan_list() end
373
374 ---
375 ---Scan and gobble the next token.
376 ---
377 ---The different scanner functions of the `token` library look for a
378 ---sequence of tokens. This function scans just the next token.
379 ---
380 ---__Reference:__
381 ---
382 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L2237-L2239](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L2237-L2239)
383 ---* Corresponding C source code: [lnewtokenlib.c#L231-L239](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L231-L239)
384 ---
385 ---@return Token
386 ---
387 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
388 function token.get_next() end
389
390 ---
391 ---Use `scan_token`
392 ---if you want to
393 ---enforce expansion first you can.
394 ---
395 ---__Reference:__
396 ---
397 ---* Corresponding C source code: [lnewtokenlib.c#L1090-L1098](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1090-L1098)
398 ---
399 ---@return Token
400 ---
401 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
402 function token.scan_token() end
403
404 ---
405 ---Trigger expansion of the next token in the
406 ---input.
407 ---
408 ---This can be quite unpredictable but when you call it you probably know
409 ---enough about *TeX* not to be too worried about that. It basically is a call to
410 ---the internal expand related function.
411 ---
412 ---__Reference:__
413 ---
414 ---* Corresponding C source code: [lnewtokenlib.c#L764-L769](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L764-L769)
415 ---
416 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
417 function token.expand() end
418
419 ---
420 ---__Reference:__
421 ---
422 ---* Corresponding C source code: [luatoken.c#L192-L351](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luatoken.c#L192-L351)
423 ---
424 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
425 ---@alias TokenCommandName
426 ---| 'relax'
427 ---| 'left_brace'
428 ---| 'right_brace'
429 ---| 'math_shift'
430 ---| 'tab_mark'
431 ---| 'car_ret'
432 ---| 'mac_param'
433 ---| 'sup_mark'
434 ---| 'sub_mark'
435 ---| 'endv'
436 ---| 'spacer'
437 ---| 'letter'
438 ---| 'other_char'
439 ---| 'par_end'
440 ---| 'stop'
441 ---| 'delim_num'
442 ---| 'char_num'
443 ---| 'math_char_num'
444 ---| 'mark'
445 ---| 'node'
446 ---| 'xray'
447 ---| 'make_box'
448 ---| 'hmove'
449 ---| 'vmove'
450 ---| 'un_hbox'
451 ---| 'un_vbox'
452 ---| 'remove_item'
453 ---| 'hskip'
454 ---| 'vskip'
455 ---| 'mskip'
456 ---| 'kern'
457 ---| 'mkern'
458 ---| 'leader_ship'
459 ---| 'halign'
460 ---| 'valign'
461 ---| 'no_align'
462 ---| 'vrule'
463 ---| 'hrule'
464 ---| 'novrule'
465 ---| 'nohrule'
466 ---| 'insert'
467 ---| 'vadjust'
468 ---| 'ignore_spaces'
469 ---| 'after_assignment'
470 ---| 'after_group'
471 ---| 'partoken_name'
472 ---| 'break_penalty'
473 ---| 'start_par'
474 ---| 'ital_corr'
475 ---| 'accent'
476 ---| 'math_accent'
477 ---| 'discretionary'
478 ---| 'eq_no'
479 ---| 'left_right'
480 ---| 'math_comp'
481 ---| 'limit_switch'
482 ---| 'above'
483 ---| 'math_style'
484 ---| 'math_choice'
485 ---| 'non_script'
486 ---| 'vcenter'
487 ---| 'case_shift'
488 ---| 'message'
489 ---| 'normal'
490 ---| 'extension'
491 ---| 'option'
492 ---| 'lua_function_call'
493 ---| 'lua_bytecode_call'
494 ---| 'lua_call'
495 ---| 'in_stream'
496 ---| 'begin_group'
497 ---| 'end_group'
498 ---| 'omit'
499 ---| 'ex_space'
500 ---| 'boundary'
501 ---| 'radical'
502 ---| 'super_sub_script'
503 ---| 'no_super_sub_script'
504 ---| 'math_shift_cs'
505 ---| 'end_cs_name'
506 ---| 'char_ghost'
507 ---| 'assign_local_box'
508 ---| 'char_given'
509 ---| 'math_given'
510 ---| 'xmath_given'
511 ---| 'last_item'
512 ---| 'toks_register'
513 ---| 'assign_toks'
514 ---| 'assign_int'
515 ---| 'assign_attr'
516 ---| 'assign_dimen'
517 ---| 'assign_glue'
518 ---| 'assign_mu_glue'
519 ---| 'assign_font_dimen'
520 ---| 'assign_font_int'
521 ---| 'assign_hang_indent'
522 ---| 'set_aux'
523 ---| 'set_prev_graf'
524 ---| 'set_page_dimen'
525 ---| 'set_page_int'
526 ---| 'set_box_dimen'
527 ---| 'set_tex_shape'
528 ---| 'set_etex_shape'
529 ---| 'def_char_code'
530 ---| 'def_del_code'
531 ---| 'extdef_math_code'
532 ---| 'extdef_del_code'
533 ---| 'def_family'
534 ---| 'set_math_param'
535 ---| 'set_font'
536 ---| 'def_font'
537 ---| 'def_lua_call'
538 ---| 'register'
539 ---| 'assign_box_direction'
540 ---| 'assign_box_dir'
541 ---| 'assign_direction'
542 ---| 'assign_dir'
543 ---| 'combinetoks'
544 ---| 'advance'
545 ---| 'multiply'
546 ---| 'divide'
547 ---| 'prefix'
548 ---| 'let'
549 ---| 'shorthand_def'
550 ---| 'read_to_cs'
551 ---| 'def'
552 ---| 'set_box'
553 ---| 'hyph_data'
554 ---| 'set_interaction'
555 ---| 'letterspace_font'
556 ---| 'expand_font'
557 ---| 'copy_font'
558 ---| 'set_font_id'
559 ---| 'undefined_cs'
560 ---| 'expand_after'
561 ---| 'no_expand'
562 ---| 'input'
563 ---| 'lua_expandable_call'
564 ---| 'lua_local_call'
565 ---| 'if_test'
566 ---| 'fi_or_else'
567 ---| 'cs_name'
568 ---| 'convert'
569 ---| 'variable'
570 ---| 'feedback'
571 ---| 'the'
572 ---| 'top_bot_mark'
573 ---| 'call'
574 ---| 'long_call'
575 ---| 'outer_call'
576 ---| 'long_outer_call'
577 ---| 'end_template'
578 ---| 'dont_expand'
579 ---| 'glue_ref'
580 ---| 'shape_ref'
581 ---| 'box_ref'
582 ---| 'data'
583
584 ---
585 ---A token object has the properties of the `relax`
586 ---primitive.
587 ---
588 ---Alternatively you can use a getter `get_<fieldname>` to access a property
589 ---of a token.
590 ---
591 ---The numbers that represent a catcode are the same as in *TeX* itself, so using
592 ---this information assumes that you know a bit about *TeX*'s internals. The other
593 ---numbers and names are used consistently but are not frozen. So, when you use them
594 ---for comparing you can best query a known primitive or character first to see the
595 ---values.
596 ---
597 ---__Reference:__
598 ---
599 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L2285-L2310](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L2285-L2310)
600 ---
601 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
602 ---@class Token
603 ---@field command integer # A number representing the internal command number (catcode in case of a character), for example: `1` (`left_brace`), `2` (`right_brace`), `3` (`math_shift`), `4` (`tab_mark`), `6` (`mac_param`), `7` (`sup_mark`), `8` (`sub_mark`), `10 ` (`spacer`), `11 ` (`letter`), `12 ` (`other`), `147` (`call`).
604 ---@field cmdname TokenCommandName # The type of the command, for example `letter`.
605 ---@field csname string|nil # The associated control sequence (if applicable), for example `bigskip`.
606 ---@field id integer # The unique id of the token, for example `6876`.
607 ---@field tok integer # The full token number as stored in TeX, for example `536883863`.
608 ---@field active boolean # A boolean indicating the active state of the token, for example `true`.
609 ---@field expandable boolean # A boolean indicating if the token (macro) is expandable, for example `true`.
610 ---@field public protected boolean # A boolean indicating if the token (macro) is protected, for example `false`.
611 ---@field mode integer # A number either representing a character or another entity, for example `1007`.
612 ---@field index integer|nil # A number running from 0x0000 upto 0xFFFF indicating a `TeX` register index. In case of letters the unicode code point, for example `398` = `Ǝ`.
613
614 ---
615 ---Return the internal command number.
616 ---
617 ---__Reference:__
618 ---
619 ---* Corresponding C source code: [lnewtokenlib.c#L870-L880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L870-L880)
620 ---
621 ---@param t Token
622 ---
623 ---@return integer command # A number representing the internal command number, for example `147`.
624 ---
625 ---@see Token.command
626 ---
627 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
628 function token.get_command(t) end
629
630 ---
631 ---Return the type of the command (for instance the catcode in case of a character or the classifier that determines the internal treatment, for example `letter`.
632 ---
633 ---__Reference:__
634 ---
635 ---* Corresponding C source code: [lnewtokenlib.c#L936-L943](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L936-L943)
636 ---
637 ---@param t Token
638 ---
639 ---@return TokenCommandName cmdname # The type of the command (for instance the catcode in case of a character or the classifier that determines the internal treatment, for example `letter`.
640 ---
641 ---@see Token.cmdname
642 ---
643 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
644 function token.get_cmdname(t) end
645
646 ---
647 ---Return the associated control sequence (if applicable), for example `bigskip`.
648 ---
649 ---__Reference:__
650 ---
651 ---* Corresponding C source code: [lnewtokenlib.c#L945-L959](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L945-L959)
652 ---
653 ---@param t Token
654 ---
655 ---@return string|nil csname # The associated control sequence (if applicable), for example `bigskip`.
656 ---
657 ---@see Token.csname
658 ---
659 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
660 function token.get_csname(t) end
661
662 ---
663 ---Return the unique id of the token.
664 ---
665 ---__Reference:__
666 ---
667 ---* Corresponding C source code: [lnewtokenlib.c#L961-L966](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L961-L966)
668 ---
669 ---@param t Token
670 ---
671 ---@return integer id # The unique id of the token, for example `6876`.
672 ---
673 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
674 function token.get_id(t) end
675
676 ---
677 ---Return the full token number as stored in TeX.
678 ---
679 ---__Reference:__
680 ---
681 ---* Corresponding C source code: [lnewtokenlib.c#L968-L974](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L968-L974)
682 ---
683 ---@see Token.tok
684 ---
685 ---@param t Token
686 ---
687 ---@return integer tok # The full token number as stored in TeX, for example `536883863`.
688 ---
689 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
690 function token.get_tok(t) end
691
692 ---
693 ---Return a boolean indicating the active state of the token, for example `true`.
694 ---
695 ---__Reference:__
696 ---
697 ---* Corresponding C source code: [lnewtokenlib.c#L976-L991](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L976-L991)
698 ---
699 ---@param t Token
700 ---
701 ---@return boolean active # A boolean indicating the active state of the token, for example `true`.
702 ---
703 ---@see Token.active
704 ---
705 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
706 function token.get_active(t) end
707
708 ---
709 ---Return a boolean indicating if the token (macro) is expandable.
710 ---
711 ---__Reference:__
712 ---
713 ---* Corresponding C source code: [lnewtokenlib.c#L993-L1004](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L993-L1004)
714 ---
715 ---@param t Token
716 ---
717 ---@return boolean expandable # A boolean indicating if the token (macro) is expandable, for example `true`.
718 ---
719 ---@see Token.expandable
720 ---
721 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
722 function token.get_expandable(t) end
723
724 ---
725 ---Return a boolean indicating if the token (macro) is protected.
726 ---
727 ---__Reference:__
728 ---
729 ---* Corresponding C source code: [lnewtokenlib.c#L1006-L1022](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1006-L1022)
730 ---
731 ---@param t Token
732 ---
733 ---@return boolean protected # A boolean indicating if the token (macro) is protected, for example `false`.
734 ---
735 ---@see Token.protected
736 ---
737 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
738 function token.get_protected(t) end
739
740 ---
741 ---Return a number either representing a character or another entity.
742 ---
743 ---__Reference:__
744 ---
745 ---* Corresponding C source code: [lnewtokenlib.c#L924-L934](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L924-L934)
746 ---
747 ---@param t Token
748 ---
749 ---@return integer mode # A number either representing a character or another entity, for example `1007`.
750 ---
751 ---@see Token.mode
752 ---
753 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
754 function token.get_mode(t) end
755
756 ---
757 ---Return a number running from `0x0000` upto `0xFFFF` indicating a TeX register index.
758 ---
759 ---__Reference:__
760 ---
761 ---* Corresponding C source code: [lnewtokenlib.c#L882-L922](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L882-L922)
762 ---
763 ---@param t Token
764 ---
765 ---@return integer index # A number running from 0x0000 upto 0xFFFF indicating a TeX register index, for example `1007`.
766 ---
767 ---@see Token.index
768 ---
769 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
770 function token.get_index(t) end
771
772 ---
773 ---Get the content of a macro.
774 ---
775 ---__Reference:__
776 ---
777 ---* Corresponding C source code: [lnewtokenlib.c#L1141-L1166](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1141-L1166)
778 ---
779 ---@param name string # The name of the macro without the leading backslash.
780 ---
781 ---@return string # for example `foo #1 bar`.
782 ---
783 ---@see token.set_macro
784 ---
785 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
786 function token.get_macro(name) end
787
788 ---
789 ---Get the meaning of a macro including the argument
790 ---specification (as usual in *TeX* separated by `->`).
791 ---
792 ---__Reference:__
793 ---
794 ---* Corresponding C source code: [lnewtokenlib.c#L1121-L1139](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1121-L1139)
795 ---
796 ---@param name string # The name of the macro without the leading backslash.
797 ---
798 ---@return string # for example `->foo #1 bar`.
799 ---
800 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
801 function token.get_meaning(name) end
802
803 ---
804 ---Ask for a list of commands.
805 ---
806 ---__Reference:__
807 ---
808 ---* Corresponding C source code: [lnewtokenlib.c#L1373-L1382](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1373-L1382)
809 ---
810 ---@return table
811 ---
812 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
813 function token.commands() end
814
815 ---
816 ---Return the id of a token class.
817 ---
818 ---@param cmdname TokenCommandName # for example `letter`
819 ---
820 ---@return integer|nil
821 ---
822 ---__Reference:__
823 ---
824 ---* Corresponding C source code: [lnewtokenlib.c#L201-L213](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L201-L213)
825 function token.command_id(cmdname) end
826
827 ---
828 ---Create a token.
829 ---
830 ---__Reference:__
831 ---
832 ---* Corresponding C source code: [lnewtokenlib.c#L826-L845](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L826-L845)
833 ---
834 ---@param chr integer
835 ---@param cmd? integer
836 ---
837 ---@return Token
838 ---
839 ---@see token.new
840 ---
841 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
842 function token.create(chr, cmd) end
843
844 ---
845 --- A variant that ignores the current catcode table is:
846 ---
847 ---__Reference:__
848 ---
849 ---* Corresponding C source code: [lnewtokenlib.c#L847-L854](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L847-L854)
850 ---
851 ---@param chr integer
852 ---@param cmd integer
853 ---
854 ---@return Token
855 ---
856 ---@see token.create
857 ---
858 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
859 function token.new(chr, cmd) end
860
861 ---
862 ---__Example:__
863 ---
864 ---```tex
865 ---\def\foo{bar}
866 ---\directlua{
867 --- print(token.is_defined('foo')) % true
868 --- print(token.is_defined('nofoo')) % false
869 --- print(token.is_defined('bf')) % true
870 ---}
871 ---```
872 ---
873 ---__Reference:__
874 ---
875 ---* Corresponding C source code: [lnewtokenlib.c#L807-L824](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L807-L824)
876 ---
877 ---@param cs string
878 ---
879 ---@return boolean
880 ---
881 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
882 function token.is_defined(cs) end
883
884 ---
885 ---__Example:__
886 ---
887 ---```lua
888 ---print(token.biggest_char()) % 1114111
889 ---```
890 ---
891 ---__Reference:__
892 ---
893 ---* Corresponding C source code: [lnewtokenlib.c#L185-L189](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L185-L189)
894 ---
895 ---@return integer
896 ---
897 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
898 function token.biggest_char() end
899
900 ---
901 ---Create a macro.
902 ---
903 ---__Example:__
904 ---
905 ---```tex
906 ---\directlua{
907 --- token.set_macro("test", "content")
908 ---}
909 ---\test
910 ---```
911 ---
912 ---__Reference:__
913 ---
914 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L2368-L2382](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L2368-L2382)
915 ---* Corresponding C source code: [lnewtokenlib.c#L1218-L1342](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1218-L1342)
916 ---
917 ---@param csname string
918 ---@param content? string
919 ---@param global? 'global'
920 ---
921 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
922 function token.set_macro(csname, content, global) end
923
924 ---
925 ---Create a macro.
926 ---
927 ---__Example:__
928 ---
929 ---```tex
930 ---\directlua{
931 --- token.set_macro("test", "content")
932 ---}
933 ---\test
934 ---```
935 ---
936 ---__Reference:__
937 ---
938 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L2368-L2382](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L2368-L2382)
939 ---* Corresponding C source code: [lnewtokenlib.c#L1218-L1342](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1218-L1342)
940 ---
941 ---@param catcodetable integer # A catcodetable identifier.
942 ---@param csname string
943 ---@param content? string
944 ---@param global? 'global'
945 ---
946 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
947 function token.set_macro(catcodetable, csname, content, global) end
948
949 ---
950 ---Do a `chardef` at the
951 ---*Lua* end, where invalid assignments are silently ignored.
952 ---
953 ---__Example:__
954 ---
955 ---```tex
956 ---\directlua{
957 --- token.set_char('myT', 84)
958 --- token.set_char('mye', 101)
959 --- token.set_char('myX', 88)
960 ---}
961 ---\myT\mye\myX % TeX
962 ---```
963 ---
964 ---__Reference:__
965 ---
966 ---* Corresponding C source code: [lnewtokenlib.c#L1344-L1371](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1344-L1371)
967 ---
968 ---@param csname string
969 ---@param number integer
970 ---@param global? 'global'
971 ---
972 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
973 function token.set_char(csname, number, global) end
974
975 ---
976 ---Create a token that refers to a *Lua* function with an entry in the table
977 ---that you can access with `lua.get_functions_table`. It is the companion
978 ---to `luadef`.
979 ---
980 ---__Example:__
981 ---
982 ---```tex
983 ---\directlua{
984 --- local t = lua.get_functions_table()
985 ---
986 --- t[1] = function () end
987
988 ---
989 --- local index = 1
990 --- while t[index] do
991 --- index = index + 1
992 --- end
993 ---
994 --- t[index] = function(slot)
995 --- print(slot)
996 --- end
997 --- token.set_lua('mycode', index, 'protected', 'global')
998 ---}
999 ---
1000 ---\mycode
1001 ---
1002 ---\bye
1003 ---```
1004 ---
1005 ---__Reference:__
1006 ---
1007 ---* Corresponding C source code: [lnewtokenlib.c#L1168-L1216](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1168-L1216)
1008 ---
1009 ---@param name string
1010 ---@param id integer
1011 ---@param ... 'global'|'protected'
1012 ---
1013 ---@see lua.get_functions_table
1014 ---
1015 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
1016 function token.set_lua(name, id, ...) end
1017
1018 ---
1019 ---Put the next token back in the input.
1020 ---
1021 ---__Example:__
1022 ---
1023 ---```lua
1024 ---local t1 = token.get_next()
1025 ---local t2 = token.get_next()
1026 ---local t3 = token.get_next()
1027 ---local t4 = token.get_next()
1028 ----- watch out, we flush in sequence
1029 ---token.put_next { t1, t2 }
1030 ----- but this one gets pushed in front
1031 ---token.put_next ( t3, t4 )
1032 ----- so when we get wxyz we put yzwx!
1033 ---```
1034 ---
1035 ---__Reference:__
1036 ---
1037 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L2422-L2433](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L2422-L2433)
1038 ---* Corresponding C source code: [lnewtokenlib.c#L262-L337](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L262-L337)
1039 ---
1040 ---@param ... Token
1041 ---
1042 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
1043 function token.put_next(...) end
1044
1045 ---
1046 ---Check if the given argument is a token.
1047 ---
1048 ---__Example:__
1049 ---
1050 ---```tex
1051 ---\directlua{
1052 --- local t = token.get_next()
1053 --- print(token.is_token(t)) % true
1054 --- print(token.is_token('text')) % false
1055 --- print(token.is_token(true)) % false
1056 ---}Token
1057 ---```
1058 ---
1059 ---__Reference:__
1060 ---
1061 ---* Corresponding C source code: [lnewtokenlib.c#L758-L762](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L758-L762)
1062 ---
1063 ---@param t any
1064 ---
1065 ---@return boolean
1066 ---
1067 ---@see token.type
1068 ---
1069 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
1070 function token.is_token(t) end
1071
1072 ---
1073 ---Return the string `token` if the given parameter is a token else `nil`.
1074 ---
1075 ---__Example:__
1076 ---
1077 ---```tex
1078 ---\directlua{
1079 --- local t = token.get_next()
1080 --- print(token.type(t)) % 'token'
1081 --- print(token.type('text')) % nil
1082 --- print(token.type(true)) % nil
1083 ---}Token
1084 ---```
1085 ---
1086 ---__Reference:__
1087 ---
1088 ---* Corresponding C source code: [lnewtokenlib.c#L1080-L1088](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnewtokenlib.c#L1080-L1088)
1089 ---
1090 ---@param t any
1091 ---
1092 ---@return 'token'|nil
1093 ---
1094 ---@see token.is_token
1095 ---
1096 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/token.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
1097 function token.type(t) end
1098
1099 ---
1100 ---https://github.com/TeX-Live/luatex/tree/master/source/texk/web2c/luatexdir/luasocket/src/socket.lua
1101 ---Changes to upstream: global socket table
1102
1103 ---
1104 ---The definitions are developed in this repository: https://github.com/LuaCATS/luasocket
1105
1106 ---
1107 ---https://lunarmodules.github.io/luasocket/socket.html
1108 ---
1109 ---The socket namespace
1110 ---
1111 ---The `socket` namespace contains the core functionality of LuaSocket.
1112 ---
1113 ---To obtain the `socket` namespace, run:
1114 ---
1115 ---```lua
1116 ----- loads the socket module
1117 ---local socket = require("socket")
1118 ---```
1119 ---
1120 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1121 ---@class Socket
1122 socket = {}
1123
1124 ---
1125 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1126 socket.headers = {}
1127
1128 ---
1129 ---The `socket.headers.canonic` table
1130 ---is used by the HTTP and SMTP modules to translate from
1131 ---lowercase field names back into their canonic
1132 ---capitalization. When a lowercase field name exists as a key
1133 ---in this table, the associated value is substituted in
1134 ---whenever the field name is sent out.
1135 ---```
1136 ---
1137 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1138 socket.headers.canonic = {}
1139
1140 ---
1141 ---This constant is set to `true` if the library was compiled
1142 ---with debug support.
1143 ---
1144 ---@type boolean
1145 ---
1146 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1147 socket._DEBUG = true
1148
1149 ---
1150 ---Default datagram size used by calls to
1151 ---`receive`and
1152 ---`receivefrom`.
1153 ---(Unless changed in compile time, the value is 8192.)
1154 ---
1155 ---@type integer
1156 ---
1157 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1158 socket._DATAGRAMSIZE = 8192
1159
1160 ---
1161 ---Return the UNIX time in seconds.
1162 ---
1163 ---You should subtract the values returned by this function
1164 ---to get meaningful values.
1165 ---
1166 ---__Example:__
1167 ---
1168 ---```lua
1169 ---t = socket.gettime()
1170 ----- do stuff
1171 ---print(socket.gettime() - t .. " seconds elapsed")
1172 ---```
1173 ---
1174 ---__Reference:__
1175 ---
1176 ---* Corresponding C source code: [timeout.c#L190-L194](https://github.com/lunarmodules/luasocket/blob/8c2ff7217e2a205eb107a6f48b04ff1b2b3090a1/src/timeout.c#L190-L194)
1177 ---
1178 ---@return number time # for example `1683526723.1653`
1179 ---
1180 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1181 function socket.gettime() end
1182
1183 ---
1184 ---Creates and returns a clean
1185 ---`try`
1186 ---function that allows for cleanup before the exception
1187 ---is raised.
1188 ---
1189 ---Note: This idea saved a lotof work with the
1190 ---implementation of protocols in LuaSocket:
1191 ---
1192 ---```lua
1193 ---foo = socket.protect(function()
1194 --- -- connect somewhere
1195 --- local c = socket.try(socket.connect("somewhere", 42))
1196 --- -- create a try function that closes 'c' on error
1197 --- local try = socket.newtry(function() c:close() end)
1198 --- -- do everything reassured c will be closed
1199 --- try(c:send("hello there?\r\n"))
1200 --- local answer = try(c:receive())
1201 --- ...
1202 --- try(c:send("good bye\r\n"))
1203 --- c:close()
1204 ---end)
1205 ---```
1206 ---
1207 ---@param finalizer function # -`Finalizer` is a function that will be called before `try` throws the exception.
1208 ---
1209 ---@return function # The function returns your customized `try` function.
1210 ---
1211 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1212 function socket.newtry(finalizer) end
1213
1214 ---
1215 ---Converts a function that throws exceptions into a safe function. This
1216 ---function only catches exceptions thrown by the `try`
1217 ---and `newtry`functions. It does not catch normal
1218 ---Lua errors.
1219 ---
1220 ---@param func function # `func` is a function that calls `try` (or `assert`, or `error`) to throw exceptions.
1221 ---
1222 ---@return function # Returns an equivalent function that instead of throwing exceptions in case of a failed `try`call, returns `nil` followed by an error message.
1223 ---
1224 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1225 function socket.protect(func) end
1226
1227 ---
1228 ---Waits for a number of sockets to change status.
1229 ---
1230 --- `Recvt` and `sendt` can also
1231 ---be empty tables or `nil`. Non-socket values (or values with
1232 ---non-numeric indices) in the arrays will be silently ignored.
1233 ---
1234 ---The function returns a list with the sockets ready for
1235 ---reading, a list with the sockets ready for writing and an error message.
1236 ---The error message is "`timeout`" if a timeout
1237 ---condition was met, "`select failed`" if the call
1238 ---to `select` failed, and
1239 ---`nil` otherwise. The returned tables are
1240 ---doubly keyed both by integers and also by the sockets
1241 ---themselves, to simplify the test if a specific socket has
1242 ---changed status.
1243 ---
1244 ---Note:`select` can monitor a limited number
1245 ---of sockets, as defined by the constant
1246 ---`socket._SETSIZE`. This
1247 ---number may be as high as 1024 or as low as 64 by default,
1248 ---depending on the system. It is usually possible to change this
1249 ---at compile time. Invoking `select` with a larger
1250 ---number of sockets will raise an error.
1251 ---
1252 ---Important note: a known bug in WinSock causes `select` to fail
1253 ---on non-blocking TCP sockets. The function may return a socket as
1254 ---writable even though the socket is notready for sending.
1255 ---
1256 ---Another important note: calling select with a server socket in the receive parameter before a call to accept does notguarantee
1257 ---`accept`will return immediately.
1258 ---Use the `settimeout`
1259 ---method or `accept` might block forever.
1260 ---
1261 ---Yet another note: If you close a socket and pass
1262 ---it to `select`, it will be ignored.
1263 ---
1264 ---Using select with non-socket objects: Any object that implements `getfd` and `dirty` can be used with `select`, allowing objects from other libraries to be used within a `socket.select` driven loop.
1265 ---
1266 ---@param recvt table|nil # `recvt` is an array with the sockets to test for characters available for reading.
1267 ---@param sendt table|nil # Sockets in the `sendt` array are watched to see if it is OK to immediately write on them.
1268 ---@param timeout? integer # `timeout` is the
1269 ---maximum amount of time (in seconds) to wait for a change in status. A
1270 ---`nil`, negative or omitted `timeout` value allows the
1271 ---function to block indefinitely.
1272 ---
1273 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1274 function socket.select(recvt, sendt, timeout) end
1275
1276 ---
1277 ---The maximum number of sockets that the select function can handle.
1278 ---
1279 ---@type integer
1280 ---
1281 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1282 socket._SETSIZE = 0
1283
1284 ---
1285 ---Creates an
1286 ---LTN12
1287 ---sink from a stream socket object.
1288 ---
1289 ---`Mode` defines the behavior of the sink. The following
1290 ---options are available:
1291 ---
1292 ---* `"http-chunked"`: sends data through socket after applying the
1293 ---chunked transfer coding, closing the socket when done;
1294 ---* `"close-when-done"`: sends all received data through the
1295 ---socket, closing the socket when done;
1296 ---* `"keep-open"`: sends all received data through the
1297 ---socket, leaving it open when done.
1298 ---
1299 ---`Socket` is the stream socket object used to send the data.
1300 ---
1301 ---The function returns a sink with the appropriate behavior.
1302 ---
1303 ---@param mode 'http-chunked'|'close-when-done'|'keep-open'
1304 ---@param socket any
1305 ---
1306 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1307 function socket.sink(mode, socket) end
1308
1309 ---
1310 ---Drops a number of arguments and returns the remaining.
1311 ---
1312 ---`D` is the number of arguments to drop. `Ret1` to
1313 ---`retN` are the arguments.
1314 ---
1315 ---The function returns `retd+1` to `retN`.
1316 ---
1317 ---Note: This function is useful to avoid creation of dummy variables:
1318 ---
1319 ---```
1320 ----- get the status code and separator from SMTP server reply
1321 ---local code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)"))
1322 ---```
1323 ---
1324 ---@param d integer
1325 ---@param ... any
1326 ---
1327 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1328 function socket.skip(d, ...) end
1329
1330 ---
1331 ---Freeze the program execution during a given amount of time.
1332 ---
1333 ---__Reference:__
1334 ---
1335 ---* Corresponding C source code: [timeout.c#L196-L226](https://github.com/lunarmodules/luasocket/blob/8c2ff7217e2a205eb107a6f48b04ff1b2b3090a1/src/timeout.c#L196-L226)
1336 ---
1337 ---@param time integer # `time` is the number of seconds to sleep for. If `time` is negative, the function returns immediately.
1338 ---
1339 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1340 function socket.sleep(time) end
1341
1342 ---
1343 ---Creates an
1344 ---LTN12
1345 ---source from a stream socket object.
1346 ---
1347 ---`Mode` defines the behavior of the source. The following
1348 ---options are available:
1349 ---
1350 ---* `"http-chunked"`: receives data from socket and removes the
1351 ---chunked transfer codingbefore returning the data;
1352 ---* `"by-length"`: receives a fixed number of bytes from the
1353 ---socket. This mode requires the extra argument `length`;
1354 ---* `"until-closed"`: receives data from a socket until the other
1355 ---side closes the connection.
1356 ---
1357 ---`Socket` is the stream socket object used to receive the data.
1358 ---
1359 ---The function returns a source with the appropriate behavior.
1360 ---
1361 ---@param mode 'http-chunked'|'by-length'|'until-closed'
1362 ---@param socket any
1363 ---@param timeout integer
1364 ---
1365 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1366 function socket.source(mode, socket, timeout) end
1367
1368 ---
1369 ---The OS value for an invalid socket. This can be used with
1370 ---`tcp:getfd`and `tcp:setfd`methods.
1371 ---@type any
1372 ---
1373 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1374 socket._SOCKETINVALID = nil
1375
1376 ---
1377 ---Throws an exception in case `ret1` is falsy, using
1378 ---`ret2` as the error message. The exception is supposed to be caught
1379 ---by a `protect`ed function only.
1380 ---
1381 ---`Ret1` to `retN` can be arbitrary
1382 ---arguments, but are usually the return values of a function call
1383 ---nested with `try`.
1384 ---
1385 ---The function returns `ret`1 to `ret`N if
1386 ---`ret`1 is not `nil` or `false`.
1387 ---Otherwise, it calls `error` passing `ret`2 wrapped
1388 ---in a table with metatable used by `protect`to
1389 ---distinguish exceptions from runtime errors.
1390 ---
1391 ---```lua
1392 ----- connects or throws an exception with the appropriate error message
1393 ---c = socket.try(socket.connect("localhost", 80))
1394 ---```
1395 ---
1396 ---@param ... any
1397 ---
1398 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1399 function socket.try(...) end
1400
1401 ---
1402 ---This constant has a string describing the current LuaSocket version.
1403 ---
1404 ---@type string
1405 ---
1406 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1407 socket._VERSION = ""
1408
1409 ---
1410 ---{{{ Common Types
1411 --#region Common Types
1412
1413 ---
1414 ---A string representing a datagram
1415 ---
1416 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1417 ---@alias Datagram string
1418
1419 --> Note: In some functions, there could be more results than just a 1,
1420 --> but the documentation has no information as to what each of them are.
1421 --> Check: https://github.com/lunarmodules/luasocket/blob/master/src/udp.c#L253
1422 --> Sometimes its 1 and 2, others up to 3.
1423
1424 ---
1425 ---A 1 in case of success
1426 ---
1427 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1428 ---@alias SocketReturnResult 1?
1429
1430 ---
1431 ---Error message in case of failure
1432 ---
1433 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1434 ---@alias SocketReturnError string?
1435
1436 ---
1437 ---A string with the family ("inet" or "inet6")
1438 ---
1439 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1440 ---@alias SocketFamily
1441 ---| "inet" IPv4
1442 ---| "inet6" IPv6
1443 ---| "unspec" Unspecified
1444 ---| "unknown" Unknown
1445
1446 --#endregion Common Types
1447 ---}}}
1448
1449 --{{{ TCP
1450 --#region TCP
1451
1452 ---
1453 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1454 ---@class TCPSocketMaster
1455 local tcp_master = {}
1456
1457 ---
1458 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1459 ---@class TCPSocketServer : TCPSocketMaster
1460 local tcp_server = {}
1461
1462 ---
1463 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1464 ---@class TCPSocketClient : TCPSocketMaster
1465 local tcp_client = {}
1466
1467 ---
1468 ---Waits for a remote connection on the server object and returns a client object representing that connection.
1469 ---
1470 ---If a connection is successfully initiated, a client object is returned. If a timeout condition is met, the method returns `nil` followed by the error string 'timeout'. Other errors are reported by `nil` followed by a message describing the error.
1471 ---
1472 ---Note: calling `socket.select` with a server object in the recvt parameter before a call to accept does not guarantee accept will return immediately. Use the `settimeout` method or accept might block until another client shows up.
1473 ---
1474 ---@return TCPSocketClient | nil, "timeout" | string
1475 ---
1476 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1477 function tcp_server:accept() end
1478
1479 ---
1480 ---Binds a master object to address and port on the local host.
1481 ---
1482 ---Address can be an IP address or a host name. Port must be an integer number in the range [0..64K). If address is `'*'`, the system binds to all local interfaces using the `INADDR_ANY` constant or `IN6ADDR_ANY_INIT`, according to the family. If `port` is `0`, the system automatically chooses an ephemeral port.
1483 ---
1484 ---In case of success, the method returns `1`. In case of error, the method returns `nil` followed by an error message.
1485 ---
1486 ---On success, the type changes to `TCPSocketServer`, and you should cast it as such.
1487 ---
1488 ---Note: The function `socket.bind` is available and is a shortcut for the creation of server sockets.
1489 ---
1490 ---@param address string
1491 ---@param port integer
1492 ---
1493 ---@return 1|nil, nil|string
1494 ---
1495 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1496 function tcp_master:bind(address, port) end
1497
1498 ---
1499 ---Closes a TCP object.
1500 ---The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications.
1501 ---No further operations (except for further calls to the close method) are allowed on a closed socket.
1502 ---
1503 ---Note: It is important to close all used sockets once they are not needed, since, in many systems,
1504 ---each socket uses a file descriptor, which are limited system resources.
1505 ---Garbage-collected objects are automatically closed before destruction, though.
1506 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1507 function tcp_master:close() end
1508
1509 ---
1510 ---Attempts to connect a master object to a remote host, transforming it into a client object.
1511 ---Client objects support methods `send`, `receive`, `getsockname`, `getpeername`, `settimeout`, and `close`.
1512 ---
1513 ---On success, the type changes to `TCPClient`, and you should cast it as such.
1514 ---
1515 ---Note: The function `socket.connect` is available and is a shortcut for the creation of client sockets.
1516 ---Note: Starting with LuaSocket 2.0, the `settimeout` method affects the behavior of connect, causing it to return with an error in case of a timeout. If that happens, you can still call socket.select with the socket in the sendt table. The socket will be writable when the connection is established.
1517 ---Note: Starting with LuaSocket 3.0, the host name resolution depends on whether the socket was created by socket.tcp, socket.tcp4 or socket.tcp6. Addresses from the appropriate family (or both) are tried in the order returned by the resolver until the first success or until the last failure. If the timeout was set to zero, only the first address is tried.
1518 ---
1519 ---@param address string # IP address or a host name
1520 ---@param port integer # TCP port, in the range [1..64K)
1521 ---
1522 ---@return nil | 1, nil | string # In case of error, the method returns nil followed by a string describing the error. In case of success, the method returns 1.
1523 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1524 function tcp_master:connect(address, port) end
1525
1526 ---
1527 ---Check the read buffer status.
1528 ---
1529 ---**Note: This is an internal method, use at your own risk.**
1530 ---
1531 ---@return boolean # `true` if there is any data in the read buffer, `false` otherwise.
1532 ---
1533 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1534 function tcp_master:dirty() end
1535
1536 ---
1537 ---Get the underling socket descriptor or handle associated to the object.
1538 ---
1539 ---**Note: This is an internal method. Unlikely to be portable. use at your own risk.**
1540 ---
1541 ---@return integer # The descriptor or handle. `-1` if the object has been closed. `_SOCKETINVALID` if it is an invalid socket.
1542 ---
1543 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1544 function tcp_master:getfd() end
1545
1546 ---
1547 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1548 ---@alias TCPOption
1549 ---| "keepalive" Setting this option to `true` enables the periodic transmission of messages on a connected socket. Should the connected party fail to respond to these messages, the connection is considered broken and processes using the socket are notified;
1550 ---| "linger" Controls the action taken when unsent data are queued on a socket and a close is performed. The value is a table with a boolean entry `on` and a numeric entry for the time interval `timeout` in seconds. If the `on` field is set to `true`, the system will block the process on the close attempt until it is able to transmit the data or until `timeout` has passed. If `on` is `false` and a `close` is issued, the system will process the `close` in a manner that allows the process to continue as quickly as possible. I do not advise you to set this to anything other than zero;
1551 ---| "reuseaddr" Setting this option indicates that the rules used in validating addresses supplied in a call to bind should allow reuse of local addresses;
1552 ---| "tcp-nodelay" Setting this option to `true` disables the Nagle's algorithm for the connection;
1553 ---| "tcp-keepidle" value in seconds for `TCP_KEEPIDLE` **Linux only!!**
1554 ---| "tcp-keepcnt" value for `TCP_KEEPCNT` **Linux only!!**
1555 ---| "tcp-keepintvl" value for `TCP_KEEPINTVL` **Linux only!!**
1556 ---| "tcp-defer-accept" value for `TCP_DEFER_ACCEPT` **Linux only!!**
1557 ---| "tcp-fastopen" value for `TCP_FASTOPEN` **Linux only!!**
1558 ---| "tcp-fastopen-connect" value for `TCP_FASTOPEN_CONNECT` **Linux only!!**
1559 ---| "ipv6-v6only" Setting this option to `true` restricts an inet6 socket to sending and receiving only IPv6 packets.
1560 --- The descriptions above come from the man pages.
1561
1562 ---
1563 ---Gets options for the TCP object. See `setoption` for description of the option names and values.
1564 ---@param option TCPOption
1565 ---
1566 ---@return any | nil, nil | string # The option value in case of success, or nil followed by an error message otherwise.
1567 ---
1568 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1569 function tcp_client:getoption(option) end
1570
1571 ---
1572 ---Gets options for the TCP object. See `setoption` for description of the option names and values.
1573 ---@param option TCPOption
1574 ---
1575 ---@return any | nil, nil | string # The option value in case of success, or nil followed by an error message otherwise.
1576 ---
1577 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1578 function tcp_server:getoption(option) end
1579
1580 ---
1581 ---Returns information about the remote side of a connected client object.
1582 ---
1583 ---Note: It makes no sense to call this method on server objects.
1584 ---
1585 ---@return string | nil, integer | nil, SocketFamily | nil # The IP address of the peer, the port number that the peer is using for the connection, and the family. In case of error, returns `nil`.
1586 ---
1587 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1588 function tcp_client:getpeername() end
1589
1590 ---
1591 ---Returns the local address information associated to the object.
1592 ---
1593 ---@return string | nil, integer | nil, SocketFamily | nil # The IP address of the peer, the port number that the peer is using for the connection, and the family. In case of error, returns `nil`.
1594 ---
1595 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1596 function tcp_master:getsockname() end
1597
1598 ---
1599 ---Returns the current block timeout followed by the current total timeout.
1600 ---
1601 ---@return number, number # Current block timeout, current total timeout.
1602 ---
1603 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1604 function tcp_master:gettimeout() end
1605
1606 ---
1607 ---Specifies the socket is willing to receive connections, transforming the object into a server object. Server objects support the `accept`, `getsockname`, `setoption`, `settimeout`, and `close` methods.
1608 ---
1609 ---On success, the type changes to `TCPSocketServer`, and you should cast it as such.
1610 ---
1611 ---@param backlog integer The number number of client connections that can be queued waiting for service. If the queue is full and another client attempts connection, the connection is refused.
1612 ---
1613 ---@return 1 | nil, nil | string # Returns 1 on success, nil and an error on failure.
1614 ---
1615 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1616 function tcp_master:listen(backlog) end
1617
1618 ---
1619 ---@alias SocketError
1620 ---| "timeout" If there was a timeout during the operation.
1621 ---| "closed" If the connection was closed before the transmission was completed.
1622
1623 -- HACK: For some reason number doesn't show up in the completion if it's
1624 -- defined as part of this union. It should be defined in-place.
1625
1626 ---
1627 ---@alias ReceivePatternMode
1628 ---| '*a' # Reads from the socket until the connection is closed. No end-of-line translation is performed
1629 ---| '*l' # Reads a line of text from the socket. The line is terminated by a LF character (ASCII 10), optionally preceded by a CR character (ASCII 13). The CR and LF characters are not included in the returned line. In fact, all CR characters are ignored by the pattern.
1630
1631 ---
1632 ---Reads data from a client object, according to the specified read pattern. Patterns follow the Lua file I/O format, and the difference in performance between all patterns is negligible.
1633 ---
1634 ---**Important note:** This function was changed severely. It used to support multiple patterns (but I have never seen this feature used) and now it doesn't anymore. Partial results used to be returned in the same way as successful results. This last feature violated the idea that all functions should return nil on error. Thus it was changed too.
1635 ---
1636 ---@param pattern? ReceivePatternMode | number The default is "*l"
1637 ---@param prefix? string Optional string to be concatenated to the beginning of any received data before return.
1638 ---
1639 ---@return string | nil, SocketError | string | nil # Returns the received pattern when successful, otherwise nil and an error message.
1640 ---
1641 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1642 function tcp_client:receive(pattern, prefix) end
1643
1644 ---
1645 ---Sends data through client object.
1646 ---
1647 ---The optional arguments `i` and `j` work exactly like the standard `string.sub` Lua function to allow the selection of a substring to be sent.
1648 ---
1649 ---**Note:** Output is not buffered. For small strings, it is always better to concatenate them in Lua (with the '..' operator) and send the result in one call instead of calling the method several times.
1650 ---
1651 ---@param data string The string to be sent.
1652 ---@param i? integer
1653 ---@param j? integer
1654 ---
1655 ---@return integer | nil, SocketError | string | nil, integer | nil # On success the number of bytes sent, otherwise nil followed by an error message, followed by the index of the last byte within `[i, j]` that has been sent. You might want to try again from the byte following that.
1656 ---
1657 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1658 function tcp_client:send(data, i, j) end
1659
1660 ---
1661 ---Sets options for the TCP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it.
1662 ---
1663 ---@param option TCPOption A string with the option name
1664 ---@param value? any Depends on the option being set
1665 ---@return 1 | nil, string | nil # 1 on success, nil and an error message otherwise.
1666 function tcp_client:setoption(option, value) end
1667
1668 ---
1669 ---Sets options for the TCP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it.
1670 ---
1671 ---@param option TCPOption A string with the option name
1672 ---@param value? any Depends on the option being set
1673 ---
1674 ---@return 1 | nil, string | nil # 1 on success, nil and an error message otherwise.
1675 ---
1676 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1677 function tcp_server:setoption(option, value) end
1678
1679 ---
1680 ---Resets accounting information on the socket, useful for throttling of bandwidth.
1681 ---
1682 ---@param received number Bytes received
1683 ---@param sent number Byte sent
1684 ---@param age number Age in seconds
1685 ---@return 1 | nil # 1 on success, nil otherwise.
1686 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1687 function tcp_master:setstats(received, sent, age) end
1688
1689 ---
1690 ---@alias TCPTimeoutMode
1691 ---| "b" block timeout. Specifies the upper limit on the amount of time LuaSocket can be blocked by the operating system while waiting for completion of any single I/O operation.
1692 ---| "t" total timeout. Specifies the upper limit on the amount of time LuaSocket can block a Lua script before returning from a call.
1693
1694 ---
1695 ---Changes the timeout values for the object. By default, all I/O operations are blocking. That is, any call to the methods `send`, `receive`, and `accept` will block indefinitely, until the operation completes. The `settimeout` method defines a limit on the amount of time the I/O methods can block. When a timeout is set and the specified amount of time has elapsed, the affected methods give up and fail with an error code.
1696 ---
1697 ---**Note:** although timeout values have millisecond precision in LuaSocket, large blocks can cause I/O functions not to respect timeout values due to the time the library takes to transfer blocks to and from the OS and to and from the Lua interpreter. Also, function that accept host names and perform automatic name resolution might be blocked by the resolver for longer than the specified timeout value.
1698 ---
1699 ---**Note:** The old timeout method is deprecated. The name has been changed for sake of uniformity, since all other method names already contained verbs making their imperative nature obvious.
1700 ---
1701 ---@param value number | nil Time to wait, in seconds. Use `nil` or negative to block indefinitely.
1702 ---@param mode? TCPTimeoutMode The default mode is "b"
1703 ---
1704 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1705 function tcp_master:settimeout(value, mode) end
1706
1707 ---
1708 ---@alias TCPShutdownMode
1709 ---| "both" Disallow further sends and receives on the object.
1710 ---| "send" Disallow further sends on the object.
1711 ---| "receive" Disallow further receives on the object.
1712
1713 ---
1714 ---Shuts down part of a full-duplex connection.
1715 ---@param mode TCPShutdownMode Determines which way of the connection should be shut down.
1716 ---
1717 ---@return 1 # Always returns 1.
1718 ---
1719 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1720 function tcp_client:shutdown(mode) end
1721
1722 ---
1723 ---Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made. To set it as invalid use `_SOCKETINVALID`.
1724 ---
1725 ---**Note: This is an internal method. Unlikely to be portable. Use at your own risk.**
1726 ---
1727 ---@param fd integer
1728 ---
1729 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1730 function tcp_master:setfd(fd) end
1731
1732 -- The following are in the socket namespace --
1733
1734 ---
1735 ---This function is a shortcut that creates and returns a TCP server object bound to a local `address` and `port`, ready to accept client connections. Optionally, user can also specify the `backlog` argument to the `listen` method.
1736 ---
1737 ---Note: The server object returned will have the option `reuseaddr` set to `true`.
1738 ---
1739 ---@param address string
1740 ---@param port integer
1741 ---@param backlog? integer Defaults to 32.
1742 ---
1743 ---@return TCPSocketServer
1744 ---
1745 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1746 function socket.bind(address, port, backlog) end
1747
1748 ---
1749 ---This function is a shortcut that creates and returns a TCP client object connected to a remote `address` at a given `port`. Optionally, the user can also specify the local address and port to bind (`locaddr` and `locport`), or restrict the socket family to "`inet`" or "`inet6`".
1750 ---
1751 ---Two variations of connect are defined as simple helper functions that restrict the `family`, `socket.connect4` and `socket.connect6`.
1752 ---
1753 ---@param address string
1754 ---@param port integer
1755 ---@param locaddr? string The local address
1756 ---@param locport? integer The local port
1757 ---@param family? 'inet'|'inet6' If not specified, the family depends on your system configuration.
1758 ---
1759 ---@return TCPSocketClient | nil, nil | string # Returns the client on success, or `nil` and an error message on failure.
1760 ---
1761 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1762 function socket.connect(address, port, locaddr, locport, family) end
1763
1764 ---
1765 ---This function is a shortcut that creates and returns an IPv4 TCP client object connected to a remote `address` at a given `port`. Optionally, the user can also specify the local address and port to bind (`locaddr` and `locport`)
1766 ---
1767 ---@param address string
1768 ---@param port integer
1769 ---@param locaddr? string The local address
1770 ---@param locport? integer The local port
1771 ---
1772 ---@return TCPSocketClient | nil, nil | string # Returns the client on success, or `nil` and an error message on failure.
1773 ---
1774 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1775 function socket.connect4(address, port, locaddr, locport) end
1776
1777 ---
1778 ---This function is a shortcut that creates and returns an IPv6 TCP client object connected to a remote `address` at a given `port`. Optionally, the user can also specify the local address and port to bind (`locaddr` and `locport`)
1779 ---
1780 ---@param address string
1781 ---@param port integer
1782 ---@param locaddr? string The local address
1783 ---@param locport? integer The local port
1784 ---
1785 ---@return TCPSocketClient | nil, nil | string # Returns the client on success, or `nil` and an error message on failure.
1786 ---
1787 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1788 function socket.connect6(address, port, locaddr, locport) end
1789
1790 ---
1791 ---Creates and returns an TCP master object. A master object can be transformed into a server object with the method `listen` (after a call to `bind`) or into a client object with the method `connect`. The only other method supported by a master object is the close method.
1792 ---
1793 ---Note: The choice between IPv4 and IPv6 happens during a call to `bind` or `connect`, depending on the address family obtained from the resolver.
1794 ---
1795 ---Note: Before the choice between IPv4 and IPv6 happens, the internal socket object is invalid and therefore `setoption` will fail.
1796 ---
1797 ---@return TCPSocketMaster | nil, nil | string # New master object if successful, otherwise `nil` followed by an error message.
1798 ---
1799 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1800 function socket.tcp() end
1801
1802 ---
1803 ---Creates and returns an IPv4 TCP master object. A master object can be transformed into a server object with the method `listen` (after a call to `bind`) or into a client object with the method connect. The only other method supported by a master object is the `close` method.
1804 ---
1805 ---@return TCPSocketMaster | nil, nil | string # New master object if successful, otherwise `nil` followed by an error message.
1806 ---
1807 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1808 function socket.tcp4() end
1809
1810 ---
1811 ---Creates and returns an IPv6 TCP master object. A master object can be transformed into a server object with the method `listen` (after a call to `bind`) or into a client object with the method `connect`. The only other method supported by a master object is the `close` method.
1812 ---
1813 ---Note: The TCP object returned will have the option "ipv6-v6only" set to `true`.
1814 ---
1815 ---@return TCPSocketMaster | nil, nil | string # New master object if successful, otherwise `nil` followed by an error message.
1816 ---
1817 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1818 function socket.tcp6() end
1819
1820 --#endregion
1821 --}}}
1822
1823 --{{{ UDP
1824 --#region UDP
1825
1826 --> Generic is my way to avoid stating the same thing twice.
1827 --> Means that both connected and unconnected have it.
1828
1829 ---
1830 ---@class UDPSocketGeneric
1831 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1832 local udp_generic = {}
1833
1834 ---
1835 ---@class UDPSocketConnected : UDPSocketGeneric
1836 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1837 local udp_connected = {}
1838
1839 ---
1840 ---@class UDPSocketUnconnected : UDPSocketGeneric
1841 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1842 local udp_unconnected = {}
1843
1844 ---
1845 ---Closes a UDP object. The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications. No further operations (except for further calls to the close method) are allowed on a closed socket.
1846 ---
1847 ---Note: It is important to close all used sockets once they are not needed, since, in many systems, each socket uses a file descriptor, which are limited system resources. Garbage-collected objects are automatically closed before destruction, though.
1848 ---
1849 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1850 function udp_generic:close() end
1851
1852 ---
1853 ---The option descriptions come from the official documentation, which come from the man pages.
1854 ---@alias UDPOption
1855 ---| 'dontroute': Indicates that outgoing messages should bypass the standard routing facilities. Receives a boolean value;
1856 ---| 'broadcast': Requests permission to send broadcast datagrams on the socket. Receives a boolean value;
1857 ---| 'reuseaddr': Indicates that the rules used in validating addresses supplied in a bind() call should allow reuse of local addresses. Receives a boolean value;
1858 ---| 'reuseport': Allows completely duplicate bindings by multiple processes if they all set 'reuseport' before binding the port. Receives a boolean value;
1859 ---| 'ip-multicast-loop': Specifies whether or not a copy of an outgoing multicast datagram is delivered to the sending host as long as it is a member of the multicast group. Receives a boolean value;
1860 ---| 'ipv6-v6only': Specifies whether to restrict inet6 sockets to sending and receiving only IPv6 packets. Receive a boolean value;
1861 ---| 'ip-multicast-if': Sets the interface over which outgoing multicast datagrams are sent. Receives an IP address;
1862 ---| 'ip-multicast-ttl': Sets the Time To Live in the IP header for outgoing multicast datagrams. Receives a number;
1863 ---| 'ip-add-membership': Joins the multicast group specified. Receives a table with fields multiaddr and interface, each containing an IP address;
1864 ---| 'ip-drop-membership': Leaves the multicast group specified. Receives a table with fields multiaddr and interface, each containing an IP address.
1865
1866 ---
1867 ---Gets an option value from the UDP object.
1868 ---
1869 ---Option is a string with the option name.
1870 ---
1871 ---The method returns the option value in case of success, or nil followed by an error message otherwise.
1872 ---
1873 ---@param option UDPOption
1874 ---
1875 ---@return any?, SocketReturnError
1876 ---
1877 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1878 function udp_generic:getoption(option) end
1879
1880 --> Note: This is not very satisfying, since one could check
1881 --> if the first argument is nil. But LuaLS will want to
1882 --> check the rest of the arguments anyway.
1883
1884 ---
1885 ---Retrieves information about the peer associated with a connected UDP object.
1886 ---
1887 ---Returns a string with the IP address of the peer, the port number that peer is using for the connection, and a string with the family ("inet" or "inet6"). In case of error, the method returns nil.
1888 ---
1889 ---Note: It makes no sense to call this method on unconnected objects.
1890 ---
1891 ---@return string?, number?, SocketFamily?
1892 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1893 function udp_connected:getpeername() end
1894
1895 ---
1896 ---Returns the local address information associated to the object.
1897 ---
1898 ---The method returns a string with local IP address, a number with the local port, and a string with the family ("inet" or "inet6"). In case of error, the method returns nil.
1899 ---
1900 ---Note: UDP sockets are not bound to any address until the `setsockname` or the `sendto` method is called for the first time (in which case it is bound to an ephemeral port and the wild-card address).
1901 ---
1902 ---@return string?, number?, SocketFamily?
1903 ---
1904 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1905 function udp_generic:getsockname() end
1906
1907 ---
1908 ---Returns the current timeout value.
1909 ---
1910 ---@return number timeout
1911 ---
1912 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1913 function udp_generic:gettimeout() end
1914
1915 ---
1916 ---Receives a datagram from the UDP object. If the UDP object is connected, only datagrams coming from the peer are accepted. Otherwise, the returned datagram can come from any host.
1917 ---
1918 ---The optional size parameter specifies the maximum size of the datagram to be retrieved. If there are more than size bytes available in the datagram, the excess bytes are **discarded**.
1919 ---If there are less then size bytes available in the current datagram, the available bytes are returned. If size is omitted, the compile-time constant `socket._DATAGRAMSIZE` is used
1920 ---(it defaults to 8192 bytes). Larger sizes will cause a temporary buffer to be allocated for the operation.
1921 ---
1922 ---In case of success, the method returns the received datagram. In case of timeout, the method returns nil followed by the string `'timeout'`.
1923 ---
1924 ---Note: don't call this from unconnected sockets. Since you wont be able to know where it came from. Use `receivefrom` instead.
1925 ---
1926 ---@param size number?
1927 ---
1928 ---@return Datagram? datagram
1929 ---
1930 ---@return 'timeout'? err # `'timeout'` in case of timeout
1931 ---
1932 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1933 function udp_generic:receive(size) end
1934
1935 ---
1936 ---Works exactly as the `receive` method, except it returns the IP address and port as extra return values (and is therefore slightly less efficient)
1937 ---@param size number?
1938 ---
1939 ---@return Datagram? datagram
1940 ---@return string | 'timeout' ip_or_err # IP address or `'timeout'` error string
1941 ---@return number port
1942 ---
1943 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1944 function udp_unconnected:receivefrom(size) end
1945
1946 ---
1947 ---Sends a datagram to the UDP peer of a connected object.
1948 ---
1949 ---Datagram is a string with the datagram contents. The maximum datagram size for UDP is 64K minus IP layer overhead. However datagrams larger than the link layer packet size will be fragmented, which may deteriorate performance and/or reliability.
1950 ---
1951 ---If successful, the method returns `1`. In case of error, the method returns `nil` followed by an `error message`.
1952 ---
1953 ---Note: In UDP, the send method never blocks and the only way it can fail is if the underlying transport layer refuses to send a message to the specified address (i.e. no interface accepts the address).
1954 ---@param datagram Datagram
1955 ---
1956 ---@return SocketReturnResult, SocketReturnError
1957 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1958 function udp_connected:send(datagram) end
1959
1960 ---
1961 ---Sends a datagram to the specified IP address and port number.
1962 ---
1963 ---Datagram is a string with the datagram contents. The maximum datagram size for UDP is 64K minus IP layer overhead. However datagrams larger than the link layer packet size will be fragmented, which may deteriorate performance and/or reliability. Ip is the IP address of the recipient. Host names are not allowed for performance reasons. Port is the port number at the recipient.
1964 ---
1965 ---If successful, the method returns 1. In case of error, the method returns nil followed by an error message.
1966 ---
1967 ---Note: In UDP, the send method never blocks and the only way it can fail is if the underlying transport layer refuses to send a message to the specified address (i.e. no interface accepts the address).
1968 ---
1969 ---@param datagram Datagram
1970 ---@param ip string
1971 ---@param port number
1972 ---
1973 ---@return SocketReturnResult, SocketReturnError
1974 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1975 function udp_unconnected:sendto(datagram, ip, port) end
1976
1977 ---
1978 ---Sets options for the UDP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it.
1979 ---
1980 ---Option is a string with the option name, and value depends on the option being set
1981 ---
1982 ---The method returns 1 in case of success, or nil followed by an error message otherwise.
1983 ---
1984 ---@param option UDPOption
1985 ---@param value any?
1986 ---
1987 ---@return SocketReturnResult, SocketReturnError
1988 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
1989 function udp_generic:setoption(option, value) end
1990
1991 --> `setpeername` sets the peer for an unconnected socket
1992 --> when it's connected, only a `'*'` can be set. Which will make it unconnected again
1993
1994 ---
1995 ---Changes the peer of a UDP object. This method turns an unconnected UDP object into a connected UDP object or vice versa.
1996 ---
1997 ---For connected objects, outgoing datagrams will be sent to the specified peer, and datagrams received from other peers will be discarded by the OS. Connected UDP objects must use the send and receive methods instead of sendto and receivefrom.
1998 ---
1999 ---Address can be an IP address or a host name. Port is the port number. If address is '*' and the object is connected, the peer association is removed and the object becomes an unconnected object again. In that case, the port argument is ignored.
2000 ---
2001 ---In case of error the method returns nil followed by an error message. In case of success, the method returns 1.
2002 ---
2003 ---Note: Since the address of the peer does not have to be passed to and from the OS, the use of connected UDP objects is recommended when the same peer is used for several transmissions and can result in up to 30% performance gains.
2004 ---
2005 ---Note: Starting with LuaSocket 3.0, the host name resolution depends on whether the socket was created by socket.udp or socket.udp6. Addresses from the appropriate family are tried in succession until the first success or until the last failure.
2006 ---
2007 ---@param address string # can be a host name
2008 ---@param port number
2009 ---
2010 ---@return SocketReturnResult, SocketReturnError
2011 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2012 function udp_generic:setpeername(address, port) end
2013
2014 ---
2015 ---Changes the peer of a UDP object. This method turns an unconnected UDP object into a connected UDP object or vice versa.
2016 ---
2017 ---For connected objects, outgoing datagrams will be sent to the specified peer, and datagrams received from other peers will be discarded by the OS. Connected UDP objects must use the send and receive methods instead of sendto and receivefrom.
2018 ---
2019 ---Address can be an IP address or a host name. Port is the port number. If address is '*' and the object is connected, the peer association is removed and the object becomes an unconnected object again. In that case, the port argument is ignored.
2020 ---
2021 ---In case of error the method returns nil followed by an error message. In case of success, the method returns 1.
2022 ---
2023 ---Note: Since the address of the peer does not have to be passed to and from the OS, the use of connected UDP objects is recommended when the same peer is used for several transmissions and can result in up to 30% performance gains.
2024 ---
2025 ---Note: Starting with LuaSocket 3.0, the host name resolution depends on whether the socket was created by socket.udp or socket.udp6. Addresses from the appropriate family are tried in succession until the first success or until the last failure.
2026 ---
2027 ---@param address "*" # will turn it unconnected
2028 ---
2029 ---@return SocketReturnResult, SocketReturnError
2030 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2031 function udp_generic:setpeername(address) end
2032
2033 ---
2034 ---Binds the UDP object to a local address.
2035 ---
2036 ---Address can be an IP address or a host name. If address is '*' the system binds to all local interfaces using the constant INADDR_ANY. If port is 0, the system chooses an ephemeral port.
2037 ---
2038 ---If successful, the method returns 1. In case of error, the method returns nil followed by an error message.
2039 ---
2040 ---Note: This method can only be called before any datagram is sent through the UDP object, and only once. Otherwise, the system automatically binds the object to all local interfaces and chooses an ephemeral port as soon as the first datagram is sent. After the local address is set, either automatically by the system or explicitly by setsockname, it cannot be changed.
2041 ---
2042 ---@return SocketReturnResult, SocketReturnError
2043 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2044 function udp_generic:setsockname(address, port) end
2045
2046 ---
2047 ---Sets the timeout value for the socket
2048 ---
2049 ---Sets the time to blocks the process when calling `receive` and `receivefrom`
2050 ---until the timeout is reached or a packet arrives.
2051 ---
2052 ---@param timeout number
2053 ---
2054 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2055 function udp_generic:settimeout(timeout) end
2056
2057 ---
2058 ---Creates and returns an unconnected UDP object. Unconnected objects support the sendto, receive, receivefrom, getoption, getsockname, setoption, settimeout, setpeername, setsockname, and close. The setpeername is used to connect the object.
2059 ---
2060 ---In case of success, a new unconnected UDP object returned. In case of error, nil is returned, followed by an error message.
2061 ---
2062 ---Note: The choice between IPv4 and IPv6 happens during a call to sendto, setpeername, or sockname, depending on the address family obtained from the resolver.
2063 ---
2064 ---Note: Before the choice between IPv4 and IPv6 happens, the internal socket object is invalid and therefore setoption will fail.
2065 ---
2066 ---### To mark a socket as connected or unconnected use `---@cast`. Example:
2067 ---```lua
2068 ---local server, err = socket.udp()
2069 ---local client, err = socket.udp()
2070 ------@cast server UDPSocketUnconnected
2071 ---server:setsockname("127.0.0.1", 12345)
2072 ------@cast client UDPSocketConnected
2073 ---client:setpeername("127.0.0.1", 12345)
2074 ---```
2075 ---
2076 ---@return (UDPSocketConnected | UDPSocketUnconnected)?, SocketReturnError
2077 ---
2078 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2079 function socket.udp() end
2080
2081 ---
2082 ---Creates and returns an unconnected IPv4 UDP object. Unconnected objects support the sendto, receive, receivefrom, getoption, getsockname, setoption, settimeout, setpeername, setsockname, and close. The setpeername is used to connect the object.
2083 ---
2084 ---In case of success, a new unconnected UDP object returned. In case of error, nil is returned, followed by an error message.
2085 ---
2086 ---### To mark a socket as connected or unconnected use `---@cast`. Example:
2087 ---```lua
2088 ---local server, err = socket.udp4()
2089 ---local client, err = socket.udp4()
2090 ------@cast server UDPSocketUnconnected
2091 ---server:setsockname("127.0.0.1", 12345)
2092 ------@cast client UDPSocketConnected
2093 ---client:setpeername("127.0.0.1", 12345)
2094 ---```
2095 ---
2096 ---@return (UDPSocketConnected | UDPSocketUnconnected)?, SocketReturnError
2097 ---
2098 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2099 function socket.udp4() end
2100
2101 ---
2102 ---Creates and returns an unconnected IPv6 UDP object. Unconnected objects support the sendto,
2103 ---
2104 ---In case of success, a new unconnected UDP object returned. In case of error, nil is returned, followed by an error message.
2105 ---
2106 ---Note: The UDP object returned will have the option "ipv6-v6only" set to true.
2107 ---
2108 ---### To mark a socket as connected or unconnected use `---@cast`. Example:
2109 ---```lua
2110 ---local server, err = socket.udp6()
2111 ---local client, err = socket.udp6()
2112 ------@cast server UDPSocketUnconnected
2113 ---server:setsockname("127.0.0.1", 12345)
2114 ------@cast client UDPSocketConnected
2115 ---client:setpeername("127.0.0.1", 12345)
2116 ---```
2117 ---
2118 ---@return (UDPSocketConnected | UDPSocketUnconnected)?, SocketReturnError
2119 ---
2120 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/socket.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
2121 function socket.udp6() end
2122
2123 --#endregion
2124 --}}}
2125
2126 ---
2127 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2128 tex = {}
2129
2130 ---
2131 ---The integer parameters accept and return Lua numbers. These are read-write:
2132 ---
2133 ---__Reference:__
2134 ---
2135 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L284-350](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L284-350)
2136 ---@alias ReadWriteIntegerParameter
2137 ---| 'adjdemerits' # Penalty for adjacent visually incompatible lines. Default: `10000`.
2138 ---| 'binoppenalty' # Penalty for breaking after a binary operator not enclosed in a subformula. Default: `700`.
2139 ---| 'brokenpenalty' # Additional penalty for breaking a page after a hyphenated line. Default: `100`
2140 ---| 'catcodetable' # Catcode tables are a new feature that allows you to switch to a predefined catcode regime in a single statement.
2141 ---| 'clubpenalty' # Extra penalty for breaking a page after the first line of a paragraph. In Plain TeX this is `150`. This amount, and the following penalties, are added to the `\interlinepenalty`, and a penalty of the resulting size is inserted after the `\hbox` containing the first line of a paragraph instead of the `\interlinepenalty`.
2142 ---| 'day' # The day of the current job.
2143 ---| 'defaulthyphenchar' # Value of `\hyphenchar` when a font is loaded. Default: `‘\-`.
2144 ---| 'defaultskewchar' # Value of `\skewchar` when a font is loaded.
2145 ---| 'delimiterfactor' # `1000` times the fraction of a delimited formula that should be covered by a delimiter. Default: `901`.
2146 ---| 'displaywidowpenalty' # Extra penalty for breaking a page before the last line above a display formula. The default value in Plain TeX is `50`.
2147 ---| 'doublehyphendemerits' # Penalty for consecutive lines ending with a hyphen. Default: `10000`.
2148 ---| 'endlinechar' # The character code of the end-of-line character appended to input lines. IniTEX default: `13`.
2149 ---| 'errorcontextlines' # (TeX3 only) Number of additional context lines shown in error messages.
2150 ---| 'escapechar' # Number of the character that is to be used for the escape character when control sequences are being converted into character tokens. IniTEX default: `92` (`\`).
2151 ---| 'exhyphenpenalty' # Penalty for breaking a horizontal line at a discretionary item in the special case where the prebreak text is empty. Default: `50`.
2152 ---| 'fam' # The number of the current font family.
2153 ---| 'finalhyphendemerits' # Penalty added when the penultimate line of a paragraph ends with a hyphen. Default: `5000`.
2154 ---| 'floatingpenalty' # Penalty added when an insertion is split.
2155 ---| 'globaldefs' # Parameter for overriding \global prefixes. IniTEX default: `0`.
2156 ---| 'hangafter' # If positive, this denotes the number of lines before indenting starts; if negative, the absolute value of this is the number of indented lines starting with the first line of the paragraph. Default: `1`.
2157 ---| 'hbadness' # Amount of tolerance before TEX reports an underfull or overfull horizontal box.
2158 ---| 'holdinginserts' # (TeX3 only) If this is positive, insertions are not placed in their boxes at output time.
2159 ---| 'hyphenpenalty' # Penalty associated with break at a discretionary item in the general case. Default: `50`.
2160 ---| 'interlinepenalty' # Penalty for breaking a page between lines of a paragraph. Default: `0`
2161 ---| 'language' # Choose a set of hyphenation patterns and exceptions.
2162 ---| 'lastlinefit' # A readable and writable integer parameter that accepts and returns Lua numbers.
2163 ---| 'lefthyphenmin' # (TeX3 only) Minimal number of characters before a hyphenation. Default: `2`.
2164 ---| 'linepenalty' # Penalty value associated with each line break. Default: `10`.
2165 ---| 'localbrokenpenalty' # Local broken penalty (from `\localbrokenpenalty`).
2166 ---| 'localinterlinepenalty' # Local interline penalty (from `\localinterlinepenalty`).
2167 ---| 'looseness' # Number of lines by which this paragraph has to be made longer than it would be ideally.
2168 ---| 'mag' # `1000` times the magnification of the document.
2169 ---| 'maxdeadcycles' # The maximum number of times that the output routine is allowed to be called without a `\shipout` occurring. IniTEX default: `25`.
2170 ---| 'month' # The month of the current job.
2171 ---| 'newlinechar' # Number of the character that triggers a new line in `\write` statements.
2172 ---| 'outputpenalty' # Value of the penalty at the current page break, or `10000` if the break was not at a penalty.
2173 ---| 'pausing' # Specify that TEX should pause after each line that is read from a file.
2174 ---| 'postdisplaypenalty' # Penalty placed in the vertical list below a display. Default: `0`.
2175 ---| 'predisplaydirection' # An internal read/write integer, to indicate the direction of the last partial paragraph before a display; it is used to control the placement of elements such as equation numbers, and can be explictly set to affect this placement.
2176 ---| 'predisplaypenalty' # Penalty placed in the vertical list above a display. Default: `10000`.
2177 ---| 'pretolerance' # Tolerance value for a paragraph without hyphenation. Default: `100`.
2178 ---| 'relpenalty' # Penalty for breaking after a binary relation not enclosed in a subformula. Default: `500`.
2179 ---| 'righthyphenmin' # (TeX3 only) Minimum number of characters after a hyphenation. Default: `3`.
2180 ---| 'savinghyphcodes' # When a `\patterns` command is executed and \savinghyphcodes has a positive value, the current `\lccode` values are saved as hyphenation codes for the current language.
2181 ---| 'savingvdiscards' # When ε-TEX’s parameter `\savingvdiscards` has been assigned a positive value, these ‘discarded items’ are saved in two lists and can be recovered by the commands `\pagediscards` and `\splitdiscards` that act like ‘unvboxing’ hypothetical box registers containing a vbox with the discarded items.
2182 ---| 'showboxbreadth' # Number of successive elements on each level that are shown when boxes are displayed.
2183 ---| 'showboxdepth' # The number of levels of box dump that are shown when boxes are displayed.
2184 ---| 'time' # Number of minutes after midnight that the current job started.
2185 ---| 'tolerance' # Tolerance value for lines in a paragraph with hyphenation. Default: `200`.
2186 ---| 'tracingassigns' # When the program is compiled with the code for collecting statistics and `\tracingassigns` has a value of `1` or more, all assignments subject to TeX’s grouping mechanism are traced.
2187 ---| 'tracingcommands' # If this is `1` TEX displays primitive commands executed; if this is `2` or more the outcome of conditionals is also recorded.
2188 ---| 'tracinggroups' # When `\tracinggroups` has a value of `1` or more, the start and end of each save group is traced, together with the starting line and grouping level.
2189 ---| 'tracingifs' # When `\tracingifs` has a value of `1` or more, all conditionals (including `\unless`, `\or`, `\else`, and `\fi`) are traced, together with the starting line and nesting level.
2190 ---| 'tracinglostchars' # If this parameter is positive, TeX gives diagnostic messages whenever a character is accessed that is not present in a font. Plain default: `1`.
2191 ---| 'tracingmacros' # If this is `1`, the log file shows expansion of macros that are performed and the actual values of the arguments; if this is `2` or more token parameters such as `\output` and `\everypar` are also traced.
2192 ---| 'tracingnesting' # When `\tracingnesting` has a value of `1` or more, these anomalies are shown; when `\tracingnesting` has a value of `2` or more, the current context (traceback) is shown as well.
2193 ---| 'tracingonline' # If this parameter is positive, TeX will write trace information to the terminal in addition to the log file.
2194 ---| 'tracingoutput' # If this is positive, the log file shows a dump of boxes that are shipped to the dvi file.
2195 ---| 'tracingpages' # If this parameter is positive, TeX generates a trace of the page breaking algorithm.
2196 ---| 'tracingparagraphs' # If this parameter is positive, TeX generates a trace of the line breaking algorithm.
2197 ---| 'tracingrestores' # If this parameter is positive, TEX will report all values that are restored when a group ends.
2198 ---| 'tracingscantokens' # When `\tracingscantokens` has a value of `1` or more, the opening and closing of pseudo-files (generated by `\scantokens`) is recorded as for any other file, with ‘␣’ as filename.
2199 ---| 'tracingstats' # If this parameter is `1`, TeX reports at the end of the job the usage of various internal arrays; if it is `2`, the memory demands are given whenever a page is shipped out.
2200 ---| 'uchyph' # Positive to allow hyphenation of words starting with a capital letter. Default: `1`.
2201 ---| 'vbadness' # Amount of tolerance before TEX reports an underfull or overfull vertical box.
2202 ---| 'widowpenalty' # Additional penalty for breaking a page before the last line of a paragraph. Default: `150`.
2203 ---| 'year' # The year of the current job.
2204
2205 ---
2206 ---The integer parameters accept and return Lua numbers. These are read-only:
2207 ---
2208 ---__Reference:__
2209 ---
2210 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L358-366](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L358-366)
2211 ---@alias ReadOnlyIntegerParameter
2212 ---| 'deadcycles' # Counter that keeps track of how many times the output routine has been called without a `\shipout` taking place.
2213 ---| 'insertpenalties' # Total of penalties for split insertions. Inside the output routine, the number of held-over insertions.
2214 ---| 'parshape' # Command for general paragraph shapes.
2215 ---| 'interlinepenalties' # An extension to `\interlinepenalty` that allows different penalties to be added after each line. It takes a space separated list of numbers as value. If `n` is positive interlinepenalties `n i_1 ... i_n` specifies the penalty to be used after each of the lines in a paragraph, with the last value being repeated as often as needed if the paragraph has more then `n` lines.
2216 ---| 'clubpenalties' # An extension to `\clubpenalty` that allows different penalties to be added after each line. It takes a space separated list of numbers as value. If `n` is positive clubpenalties `n i_1 ... i_n` specifies the penalty to be used after each of the lines in a paragraph, with the last value being repeated as often as needed if the paragraph has more then `n` lines.
2217 ---| 'widowpenalties' # An extension to `\widowpenalty` that allows different penalties to be added after each line. It takes a space separated list of numbers as value. If `n` is positive widowpenalties `n i_1 ... i_n` specifies the penalty to be used after each of the lines in a paragraph, with the last value being repeated as often as needed if the paragraph has more then `n` lines. Lines are counted backwards from the last line in this case.
2218 ---| 'displaywidowpenalties' # An extension to `\widowpenalty` that allows different penalties to be added after each line. It takes a space separated list of numbers as value. If `n` is positive displaywidowpenalties `n i_1 ... i_n` specifies the penalty to be used after each of the lines in a paragraph, with the last value being repeated as often as needed if the paragraph has more then `n` lines. Lines counted backwards from each display math within a paragraph.
2219 ---| 'prevgraf' # The number of lines in the paragraph last added to the vertical list.
2220 ---| 'spacefactor' # `1000` times the ratio by which the stretch (shrink) component of the interword glue should be multiplied (divided).
2221
2222 ---
2223 ---The dimension parameters accept Lua numbers (signifying scaled points) or
2224 ---strings (with included dimension). The result is always a number in scaled
2225 ---points. These are read-write:
2226 ---
2227 ---__Reference:__
2228 ---
2229 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L378-407](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L378-407)
2230 ---@alias ReadWriteDimensionParameter
2231 ---| 'boxmaxdepth' # Maximum allowed depth of boxes. Default: `\maxdimen`.
2232 ---| 'delimitershortfall' # Size of the part of a delimited formula that is allowed to go uncovered by a delimiter. Default: `5pt`.
2233 ---| 'displayindent' # Distance by which the box, in which the display is centred, is indented owing to hanging indentation.
2234 ---| 'displaywidth' # Width of the box in which the display is centred.
2235 ---| 'emergencystretch' # (TeX3 only) Assumed extra stretchability in lines of a paragraph.
2236 ---| 'hangindent' # If positive, this indicates indentation from the left margin; if negative, this is the negative of the indentation from the right margin.
2237 ---| 'hfuzz' # Excess size that TeX tolerates before it considers a horizontal box overfull.
2238 ---| 'hoffset' # Distance by which the page is shifted right with respect to the reference point.
2239 ---| 'hsize' # Line width used for typesetting a paragraph. Default: `6.5in`.
2240 ---| 'lineskiplimit' # Distance to be maintained between the bottom and top of neighbouring boxes on a vertical list. Default: `0pt`.
2241 ---| 'mathsurround' # Kern amount placed before and after in-line formulas.
2242 ---| 'maxdepth' # Maximum depth of the page box. Default: `4pt`.
2243 ---| 'nulldelimiterspace' # Width taken for empty delimiters. Default: `1.2pt`.
2244 ---| 'overfullrule' # Width of the rule that is printed to indicate overfull horizontal boxes.
2245 ---| 'pagebottomoffset' # To set the bottom margin in non-TLT text.
2246 ---| 'pageheight' # The page height of the PDF output (the screen, the paper, etc.).
2247 ---| 'pageleftoffset' # To set the left margin in non-TLT text.
2248 ---| 'pagerightoffset' # To set the right margin in non-TLT text.
2249 ---| 'pagetopoffset' # To set the top margin in non-TLT text.
2250 ---| 'pagewidth' # The page width of the PDF output (the screen, the paper, etc.).
2251 ---| 'parindent' # Width of the indentation box added in front of a paragraph. Default: `20pt`.
2252 ---| 'predisplaysize' # Effective width of the line preceding the display.
2253 ---| 'scriptspace' # Extra space after subscripts and superscripts. Default: `0.5pt`.
2254 ---| 'splitmaxdepth' # Maximum depth of a box split off by a `\vsplit` operation. Default: `\maxdimen`.
2255 ---| 'vfuzz' # Excess size that TeX tolerates before it considers a vertical box overfull.
2256 ---| 'voffset' # Distance by which the page is shifted right/down with respect to the reference point.
2257 ---| 'vsize' # Height of the page box. Default: `8.9in`.
2258 ---| 'prevdepth' # Depth of the last box added to a vertical list as it is perceived by TeX.
2259 ---| 'prevgraf' # The number of lines in the paragraph last added to the vertical list.
2260 ---| 'spacefactor' # `1000` times the ratio by which the stretch (shrink) component of the interword glue should be multiplied (divided).
2261
2262 ---
2263 ---The dimension parameters accept Lua numbers (signifying scaled points) or
2264 ---strings (with included dimension). The result is always a number in scaled
2265 ---points. These are read-only:
2266 ---
2267 ---__Reference:__
2268 ---
2269 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L415-422](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L415-422)
2270 ---@alias ReadOnlyDimensionParameter
2271 ---| 'pagedepth' # Depth of the current page.
2272 ---| 'pagefilllstretch' # Accumulated third-order stretch of the current page.
2273 ---| 'pagefillstretch' # Accumulated second-order stretch of the current page.
2274 ---| 'pagefilstretch' # Accumulated first-order stretch of the current page.
2275 ---| 'pagegoal' # Goal height of the page box. This starts at `\vsize`, and is diminished by heights of insertion items.
2276 ---| 'pageshrink' # Accumulated shrink of the current page.
2277 ---| 'pagestretch' # Accumulated zeroth-order stretch of the current page.
2278 ---| 'pagetotal' # Accumulated natural height of the current page.
2279
2280 ---
2281 ---The direction parameters are read-only and return a Lua string.
2282 ---
2283 ---__Reference:__
2284 ---
2285 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L465-469](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L465-469)
2286 ---@alias DirectionParameter
2287 ---| 'bodydir' # The direction for vboxes, including the main body of text. Default: `TLT`.
2288 ---| 'mathdir' # The direction for mathematics. Default: `TLT`.
2289 ---| 'pagedir' # The direction for pages (`\shipout`). Default: `TLT`.
2290 ---| 'pardir' # The direction for paragraphs. Default: `TLT`.
2291 ---| 'textdir' # The direction for text and hboxes. Default: `TLT`.
2292
2293 ---
2294 ---The glue parameters accept and return a userdata object that
2295 ---represents a `glue_spec` node.
2296 ---
2297 ---__Reference:__
2298 ---
2299 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L479-493](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L479-493)
2300 ---@alias GlueParameter
2301 ---| 'abovedisplayshortskip' # Glue above a display if the line preceding the display was short. Default: `0pt plus 3pt`.
2302 ---| 'abovedisplayskip' # Glue above a display. Default: `12pt plus 3pt minus 9pt`.
2303 ---| 'baselineskip' # The ‘ideal’ baseline distance between neighbouring boxes on a vertical list. Default: `12pt`.
2304 ---| 'belowdisplayshortskip' # Glue above/below a display if the line preceding the display was short. Default: `0pt plus 3pt` and `7pt plus 3pt minus 4pt` respectively.
2305 ---| 'belowdisplayskip' # Glue below a display. Default: `12pt plus 3pt minus 9pt`.
2306 ---| 'leftskip' # Glue that is placed to the left of all lines of a paragraph.
2307 ---| 'lineskip' # Glue added if the distance between bottom and top of neighbouring boxes is less than `\lineskiplimit`. Default: `1pt`.
2308 ---| 'parfillskip' # Glue that is placed between the last element of the paragraph and the line end. Default: `0pt plus 1fil`.
2309 ---| 'parskip' # Amount of glue added to the surrounding vertical list when a paragraph starts. Default: `0pt plus 1pt`.
2310 ---| 'rightskip' # Glue that is placed to the right of all lines of a paragraph.
2311 ---| 'spaceskip' # Interword glue if non-zero.
2312 ---| 'splittopskip' # Minimum distance between the top of what remains after a `\vsplit` operation, and the first item in that box. Default: `10pt`.
2313 ---| 'tabskip' # Amount of glue in between columns (rows) of an `\halign` (`\valign`).
2314 ---| 'topskip' # Minimum distance between the top of the page box and the baseline of the first box on the page. Default: `10pt`.
2315 ---| 'xspaceskip' # Interword glue if non-zero and `\spacefactor` ≥ 2000.
2316
2317 ---
2318 ---All muglue (math units) parameters are to be used read-only and return a Lua string.
2319 ---
2320 ---__Reference:__
2321 ---
2322 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L503-505](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L503-505)
2323 ---@alias MuglueParameter
2324 ---| 'medmuskip' # Medium amount of mu (math units) glue.
2325 ---| 'thickmuskip' # Large amount of mu (math units) glue.
2326 ---| 'thinmuskip' # Small amount of mu (math units) glue.
2327
2328 ---
2329 ---The tokenlist parameters accept and return Lua strings. Lua strings are
2330 ---converted to and from token lists using `\the\toks` style expansion:
2331 ---all category codes are either space (10) or other (12). It follows that assigning
2332 ---to some of these, like `tex.output`, is actually useless, but it feels bad
2333 ---to make exceptions in view of a coming extension that will accept full-blown
2334 ---token strings.
2335 ---
2336 ---__Reference:__
2337 ---
2338 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L520-529](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L520-529)
2339 ---@alias TokenlistParameter
2340 ---| 'errhelp' # Tokens that will be displayed if the user asks further help after an `\errmessage`.
2341 ---| 'everycr' # Token list inserted after every `\cr` or non-redundant `\crcr`.
2342 ---| 'everydisplay' # Token list inserted at the start of a display.
2343 ---| 'everyeof' # The content of this token list is injected when a file ends.
2344 ---| 'everyhbox' # Token list inserted at the start of a horizontal box.
2345 ---| 'everyjob' # Token list that is inserted at the start of each new job.
2346 ---| 'everymath' # Token list inserted at the start of non-display math.
2347 ---| 'everypar' # Token list inserted in front of paragraph text.
2348 ---| 'everyvbox' # Token list inserted at the start of a vertical box.
2349 ---| 'output' # Token list with instructions for shipping out pages.
2350
2351 ---
2352 ---@alias InternalParameter
2353 ---| ReadWriteIntegerParameter
2354 ---| ReadOnlyIntegerParameter
2355 ---| ReadWriteDimensionParameter
2356 ---| ReadOnlyDimensionParameter
2357 ---| DirectionParameter
2358 ---| GlueParameter
2359 ---| MuglueParameter
2360 ---| TokenlistParameter
2361
2362 ---
2363 ---Set the given TeX parameter globally.
2364 ---
2365 ---__Reference:__
2366 ---
2367 ---* Corresponding C source code: [ltexlib.c#L1714-1813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/80a00d7131ae569d4a49f374e988226fe20de0d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1714-1813)
2368 ---
2369 ---@param global 'global' # It is possible to use `global` as the first argument to `tex.set`; this makes the assignment global instead of local.
2370 ---@param parameter InternalParameter # The name of the TeX parameter.
2371 ---@param ... any
2372 function tex.set(global, parameter, ...) end
2373
2374 ---
2375 ---Set the given TeX parameter.
2376 ---
2377 ---When you set a glue quantity you can either pass a `glue_spec` or upto five numbers.
2378 ---
2379 ---__Reference:__
2380 ---
2381 ---* Corresponding C source code: [ltexlib.c#L1714-1813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/80a00d7131ae569d4a49f374e988226fe20de0d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1714-1813)
2382 ---
2383 ---@param parameter InternalParameter # The name of the TeX parameter.
2384 ---@param ... any
2385 function tex.set(parameter, ...) end
2386
2387 ---
2388 ---Set the given glue parameter globally by specifying the `width`, `stretch`,
2389 ---`stretch_order`, `shrink` and `shrink_order` of the glue.
2390 ---
2391 ---__Reference:__
2392 ---
2393 ---* Corresponding C source code: [ltexlib.c#L1714-1813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/80a00d7131ae569d4a49f374e988226fe20de0d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1714-1813)
2394 ---
2395 ---@param global 'global' # It is possible to use `global` as the first argument to `tex.set`; this makes the assignment global instead of local.
2396 ---@param parameter GlueParameter # The name of the glue parameter.
2397 ---@param width integer # The horizontal or vertical displacement.
2398 ---@param stretch? integer # An extra (positive) displacement or stretch amount.
2399 ---@param stretch_order? integer # Factor applied to stretch amount.
2400 ---@param shrink? integer # An extra (negative) displacement or shrink amount.
2401 ---@param shrink_order? integer # Factor applied to shrink amount.
2402 function tex.set(global, parameter, width, stretch, stretch_order, shrink, shrink_order) end
2403
2404 ---
2405 ---Set the given glue parameter by specifying the `width`, `stretch`,
2406 ---`stretch_order`, `shrink` and `shrink_order` of the glue.
2407 ---
2408 ---__Reference:__
2409 ---
2410 ---* Corresponding C source code: [ltexlib.c#L1714-1813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/80a00d7131ae569d4a49f374e988226fe20de0d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1714-1813)
2411 ---
2412 ---@param parameter GlueParameter # The name of the glue parameter.
2413 ---@param width integer # The horizontal or vertical displacement.
2414 ---@param stretch? integer # An extra (positive) displacement or stretch amount.
2415 ---@param stretch_order? integer # Factor applied to stretch amount.
2416 ---@param shrink? integer # An extra (negative) displacement or shrink amount.
2417 ---@param shrink_order? integer # Factor applied to shrink amount.
2418 function tex.set(parameter, width, stretch, stretch_order, shrink, shrink_order) end
2419
2420 ---
2421 ---Set the given glue parameter globally using a `glue_spec` node.
2422 ---
2423 ---__Reference:__
2424 ---
2425 ---* Corresponding C source code: [ltexlib.c#L1714-1813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/80a00d7131ae569d4a49f374e988226fe20de0d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1714-1813)
2426 ---
2427 ---@param global 'global' # It is possible to use `global` as the first argument to `tex.set`; this makes the assignment global instead of local.
2428 ---@param parameter GlueParameter # The name of the glue parameter.
2429 ---@param glue_spec GlueSpecNode # A glue spec node.
2430 function tex.set(global, parameter, glue_spec) end
2431
2432 ---
2433 ---Set the given glue parameter using a `glue_spec` node.
2434 ---
2435 ---__Reference:__
2436 ---
2437 ---* Corresponding C source code: [ltexlib.c#L1714-1813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/80a00d7131ae569d4a49f374e988226fe20de0d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1714-1813)
2438 ---
2439 ---@param parameter GlueParameter # The name of the glue parameter.
2440 ---@param glue_spec GlueSpecNode # A glue spec node.
2441 function tex.set(parameter, glue_spec) end
2442
2443 ---
2444 ---Query the given TeX parameter.
2445 ---
2446 ---The exact return values differ depending on the actual parameter.
2447 ---
2448 ---__Reference:__
2449 ---
2450 ---* Corresponding C source code: [ltexlib.c#L2120-L2200](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2120-L2200)
2451 ---@param parameter InternalParameter
2452 ---@param opts? boolean
2453 ---
2454 ---@return any ...
2455 function tex.get(parameter, opts) end
2456
2457 ---
2458 ---Query the given glue parameter.
2459 ---
2460 ---The exact return values differ depending on the actual parameter.
2461 ---
2462 ---Glue is kind of special:
2463 ---The return value
2464 ---is a `glue_spec` node but when you pass `false` as last argument to
2465 ---`tex.get` you get the width of the glue and when you pass `true` you
2466 ---get all five values. Otherwise you get a node which is a copy of the internal
2467 ---value so you are responsible for its freeing at the *Lua* end.
2468 ---
2469 ---If
2470 ---you pass `true` to `get` you get 5 values returned for a glue and
2471 ---when you pass `false` you only get the width returned.
2472 ---
2473 ---__Reference:__
2474 ---
2475 ---* Corresponding C source code: [ltexlib.c#L2120-L2200](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2120-L2200)
2476
2477 ---
2478 ---@param parameter GlueParameter
2479 ---
2480 ---@return GlueSpecNode
2481 function tex.get(parameter) end
2482
2483 ---
2484 ---Query the given glue parameter.
2485 ---
2486 ---The exact return values differ depending on the actual parameter.
2487 ---
2488 ---Glue is kind of special:
2489 ---The return value
2490 ---is a `glue_spec` node but when you pass `false` as last argument to
2491 ---`tex.get` you get the width of the glue and when you pass `true` you
2492 ---get all five values. Otherwise you get a node which is a copy of the internal
2493 ---value so you are responsible for its freeing at the *Lua* end.
2494 ---
2495 ---If
2496 ---you pass `true` to `get` you get 5 values returned for a glue and
2497 ---when you pass `false` you only get the width returned.
2498 ---
2499 ---__Reference:__
2500 ---
2501 ---* Corresponding C source code: [ltexlib.c#L2120-L2200](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2120-L2200)
2502 ---@param parameter GlueParameter
2503 ---@param all true
2504 ---
2505 ---@return integer width # The horizontal or vertical displacement.
2506 ---@return integer stretch # An extra (positive) displacement or stretch amount.
2507 ---@return integer stretch_order # Factor applied to stretch amount.
2508 ---@return integer shrink # An extra (negative) displacement or shrink amount.
2509 ---@return integer shrink_order # Factor applied to shrink amount.
2510 function tex.get(parameter, all) end
2511
2512 ---
2513 ---Query the given glue parameter.
2514 ---
2515 ---The exact return values differ depending on the actual parameter.
2516 ---
2517 ---Glue is kind of special:
2518 ---The return value
2519 ---is a `glue_spec` node but when you pass `false` as last argument to
2520 ---`tex.get` you get the width of the glue and when you pass `true` you
2521 ---get all five values. Otherwise you get a node which is a copy of the internal
2522 ---value so you are responsible for its freeing at the *Lua* end.
2523 ---
2524 ---If
2525 ---you pass `true` to `get` you get 5 values returned for a glue and
2526 ---when you pass `false` you only get the width returned.
2527 ---
2528 ---__Reference:__
2529 ---
2530 ---* Corresponding C source code: [ltexlib.c#L2120-L2200](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2120-L2200)
2531 ---@param parameter GlueParameter
2532 ---@param all false
2533 ---
2534 ---@return integer width # The horizontal or vertical displacement.
2535 function tex.get(parameter, all) end
2536
2537 ---
2538 ---`\adjdemerits`: Penalty for adjacent visually incompatible lines.
2539 ---Default: `10000`.
2540 ---
2541 ---__Reference:__
2542 ---
2543 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2544 ---
2545 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2546 ---
2547 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2548 tex.adjdemerits = 0
2549
2550 ---
2551 ---`\binoppenalty`: Penalty for breaking after a binary operator not
2552 ---enclosed in a subformula. Default: `700`
2553 ---
2554 ---__Reference:__
2555 ---
2556 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2557 ---
2558 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2559 ---
2560 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2561 tex.binoppenalty = 0
2562
2563 ---
2564 ---`\brokenpenalty`: Additional penalty for breaking a page after a
2565 ---hyphenated line. Default: `100`.
2566 ---
2567 ---__Reference:__
2568 ---
2569 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2570 ---
2571 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2572 ---
2573 ---😱 [Type definition and documentation](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 💁🏻 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2574 tex.brokenpenalty = 0
2575
2576 ---
2577 ---Catcode tables are a new feature that allows you to switch to a
2578 ---predefined catcode regime in a single statement.
2579 ---
2580 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2581 ---
2582 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2583 tex.catcodetable = 0
2584
2585 ---
2586 ---`\clubpenalty`: Extra penalty for breaking a page after the first
2587 ---line of a paragraph. In Plain TeX this is `150`. This amount, and the
2588 ---following penalties, are added to the `\interlinepenalty`, and a
2589 ---penalty of the resulting size is inserted after the `\hbox`
2590 ---containing the first line of a paragraph instead of the
2591 ---`\interlinepenalty`.
2592 ---
2593 ---__Reference:__
2594 ---
2595 ---* [TeX by Topic, page 227](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2596 ---
2597 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2598 ---
2599 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2600 tex.clubpenalty = 0
2601
2602 ---
2603 ---`\day`: The day of the current job.
2604 ---
2605 ---__Reference:__
2606 ---
2607 ---* [TeX by Topic, page 257](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2608 ---
2609 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2610 ---
2611 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2612 tex.day = 0
2613
2614 ---
2615 ---`\defaulthyphenchar`: Value of `\hyphenchar` when a font is loaded.
2616 ---Default: `‘\-`.
2617 ---
2618 ---__Reference:__
2619 ---
2620 ---* [TeX by Topic, page 52](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2621 ---
2622 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2623 ---
2624 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2625 tex.defaulthyphenchar = 0
2626
2627 ---
2628 ---`\defaultskewchar`: Value of `\skewchar` when a font is loaded.
2629 ---
2630 ---__Reference:__
2631 ---
2632 ---* [TeX by Topic, page 190](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2633 ---
2634 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2635 ---
2636 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2637 tex.defaultskewchar = 0
2638
2639 ---
2640 ---`\delimiterfactor`: `1000` times the fraction of a delimited formula
2641 ---that should be covered by a delimiter. Default: `901`.
2642 ---
2643 ---__Reference:__
2644 ---
2645 ---* [TeX by Topic, page 190](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2646 ---
2647 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2648 ---
2649 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2650 tex.delimiterfactor = 0
2651
2652 ---
2653 ---`\displaywidowpenalty`: Extra penalty for breaking a page before the
2654 ---last line above a display formula. The default value in Plain TeX
2655 ---is `50`.
2656 ---
2657 ---__Reference:__
2658 ---
2659 ---* [TeX by Topic, page 229](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2660 ---
2661 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2662 ---
2663 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2664 tex.displaywidowpenalty = 0
2665
2666 ---
2667 ---`\doublehyphendemerits`: Penalty for consecutive lines ending with a
2668 ---hyphen. Default: `10000`.
2669 ---
2670 ---__Reference:__
2671 ---
2672 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2673 ---
2674 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2675 ---
2676 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2677 tex.doublehyphendemerits = 0
2678
2679 ---
2680 ---`\endlinechar`: The character code of the end-of-line character
2681 ---appended to input lines. IniTEX default: `13`.
2682 ---
2683 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2684 ---
2685 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2686 tex.endlinechar = 0
2687
2688 ---
2689 ---`\errorcontextlines`: (TeX3 only) Number of additional context lines
2690 ---shown in error messages.
2691 ---
2692 ---__Reference:__
2693 ---
2694 ---* [TeX by Topic, page 272](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2695 ---
2696 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2697 ---
2698 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2699 tex.errorcontextlines = 0
2700
2701 ---
2702 ---`\escapechar`: Number of the character that is to be used for the
2703 ---escape character when control sequences are being converted into
2704 ---character tokens. IniTEX default: `92` (`\`).
2705 ---
2706 ---__Reference:__
2707 ---
2708 ---* [TeX by Topic, page 43](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2709 ---
2710 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2711 ---
2712 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2713 tex.escapechar = 0
2714
2715 ---
2716 ---`\exhyphenpenalty`: Penalty for breaking a horizontal line at a
2717 ---discretionary item in the special case where the prebreak text is
2718 ---empty. Default: `50`.
2719 ---
2720 ---__Reference:__
2721 ---
2722 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2723 ---
2724 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2725 ---
2726 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2727 tex.exhyphenpenalty = 0
2728
2729 ---
2730 ---`\fam`: The number of the current font family.
2731 ---
2732 ---__Reference:__
2733 ---
2734 ---* [TeX by Topic, page 196](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2735 ---
2736 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2737 ---
2738 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2739 tex.fam = 0
2740
2741 ---
2742 ---`\finalhyphendemerits`: Penalty added when the penultimate line of a
2743 ---paragraph ends with a hyphen. Default: `5000`.
2744 ---
2745 ---__Reference:__
2746 ---
2747 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2748 ---
2749 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2750 ---
2751 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2752 tex.finalhyphendemerits = 0
2753
2754 ---
2755 ---`\floatingpenalty`: Penalty added when an insertion is split.
2756 ---
2757 ---__Reference:__
2758 ---
2759 ---* [TeX by Topic, page 240](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2760 ---
2761 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2762 ---
2763 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2764 tex.floatingpenalty = 0
2765
2766 ---
2767 ---`\globaldefs`: Parameter for overriding \global prefixes.
2768 ---IniTEX default: `0`.
2769 ---
2770 ---`\globaldefs` is a TeX internal parameter. Normally set to `0`. If
2771 ---set equal to a positive number, all following definitions and
2772 ---assignments are treated as if preceded by `\global`. If set equal to
2773 ---a negative number, none of the following definitions or assignments
2774 ---are global, meaning that an explicit `\global` is ignored. This
2775 ---remains in effect until `\globaldefs` is explicitly set to `0`
2776 ---again, or the group containing the `\globaldefs` reassignment ends
2777 ---(assuming it was not made global as well).
2778 ---
2779 ---__Reference:__
2780 ---
2781 ---* [TeX by Topic, page 105](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2782 ---* [Wikibook/TeX](https://en.wikibooks.org/wiki/TeX/globaldefs)
2783 ---
2784 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2785 ---
2786 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2787 tex.globaldefs = 0
2788
2789 ---
2790 ---`\hangafter`: If positive, this denotes the number of lines before
2791 ---indenting starts; if negative, the absolute value of this is the
2792 ---number of indented lines starting with the first line of the
2793 ---paragraph. Default: `1`.
2794 ---
2795 ---__Reference:__
2796 ---
2797 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2798 ---
2799 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2800 ---
2801 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2802 tex.hangafter = 0
2803
2804 ---
2805 ---`\hbadness`: Amount of tolerance before TEX reports an underfull or
2806 ---overfull horizontal box.
2807 ---
2808 ---__Reference:__
2809 ---
2810 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2811 ---
2812 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2813 ---
2814 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2815 tex.hbadness = 0
2816
2817 ---
2818 ---`\holdinginserts` (TeX3 only) If this is positive, insertions are
2819 ---not placed in their boxes at output time.
2820 ---
2821 ---__Reference:__
2822 ---
2823 ---* [TeX by Topic, page 240](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2824 ---
2825 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2826 ---
2827 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2828 tex.holdinginserts = 0
2829
2830 ---
2831 ---`\hyphenpenalty`: Penalty associated with break at a discretionary
2832 ---item in the general case. Default: `50`.
2833 ---
2834 ---__Reference:__
2835 ---
2836 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2837 ---
2838 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2839 ---
2840 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2841 tex.hyphenpenalty = 0
2842
2843 ---
2844 ---`\interlinepenalty`: Penalty for breaking a page between lines of a
2845 ---paragraph. Default: `0`.
2846 ---
2847 ---__Reference:__
2848 ---
2849 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2850 ---
2851 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2852 ---
2853 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2854 tex.interlinepenalty = 0
2855
2856 ---
2857 ---`\language`: Choose a set of hyphenation patterns and exceptions.
2858 ---
2859 ---__Reference:__
2860 ---
2861 ---* [TeX by Topic, page 176](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2862 ---
2863 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2864 ---
2865 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2866 tex.language = 0
2867
2868 ---
2869 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2870 ---
2871 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2872 tex.lastlinefit = 0
2873
2874 ---
2875 ---`\lefthyphenmin` (TeX3 only) Minimal number of characters before a
2876 ---hyphenation. Default: `2`.
2877 ---
2878 ---__Reference:__
2879 ---
2880 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2881 ---
2882 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2883 ---
2884 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2885 tex.lefthyphenmin = 0
2886
2887 ---
2888 ---`\linepenalty`: Penalty value associated with each line break.
2889 ---Default: `10`.
2890 ---
2891 ---__Reference:__
2892 ---
2893 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2894 ---
2895 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2896 ---
2897 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2898 tex.linepenalty = 0
2899
2900 ---
2901 ---Local broken penalty (from `\localbrokenpenalty`)
2902 ---
2903 ------@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2904 ---
2905 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2906 tex.localbrokenpenalty = 0
2907
2908 ---
2909 ---Local interline penalty (from `\localinterlinepenalty`)
2910 ---
2911 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2912 ---
2913 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2914 tex.localinterlinepenalty = 0
2915
2916 ---
2917 ---`\looseness`: Number of lines by which this paragraph has to be made
2918 ---longer than it would be ideally.
2919 ---
2920 ---__Reference:__
2921 ---
2922 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2923 ---
2924 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2925 ---
2926 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2927 tex.looseness = 0
2928
2929 ---
2930 ---`\mag`: `1000` times the magnification of the document.
2931 ---
2932 ---__Reference:__
2933 ---
2934 ---* [TeX by Topic, page 257](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2935 ---
2936 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2937 ---
2938 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2939 tex.mag = 0
2940
2941 ---
2942 ---`\maxdeadcycles`: The maximum number of times that the output
2943 ---routine is allowed to be called without a `\shipout` occurring.
2944 ---IniTEX default: `25`.
2945 ---
2946 ---__Reference:__
2947 ---
2948 ---* [TeX by Topic, page 288](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2949 ---
2950 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2951 ---
2952 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2953 tex.maxdeadcycles = 0
2954
2955 ---
2956 ---`\month`: The month of the current job.
2957 ---
2958 ---__Reference:__
2959 ---
2960 ---* [TeX by Topic, page 257](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2961 ---
2962 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2963 ---
2964 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2965 tex.month = 0
2966
2967 ---
2968 ---`\newlinechar`: Number of the character that triggers a new line
2969 ---in `\write` statements.
2970 ---
2971 ---__Reference:__
2972 ---
2973 ---* [TeX by Topic, page 246](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2974 ---
2975 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2976 ---
2977 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2978 tex.newlinechar = 0
2979
2980 ---
2981 ---`\outputpenalty`: Value of the penalty at the current page break,
2982 ---or `10000` if the break was not at a penalty.
2983 ---
2984 ---__Reference:__
2985 ---
2986 ---* [TeX by Topic, page 289](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
2987 ---
2988 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
2989 ---
2990 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
2991 tex.outputpenalty = 0
2992
2993 ---
2994 ---`\pausing`: Specify that TEX should pause after each line that is
2995 ---read from a file.
2996 ---
2997 ---__Reference:__
2998 ---
2999 ---* [TeX by Topic, page 246](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3000 ---
3001 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3002 ---
3003 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3004 tex.pausing = 0
3005
3006 ---
3007 ---`\postdisplaypenalty`: Penalty placed in the vertical list below a
3008 ---display. Default: `0`
3009 ---
3010 ---__Reference:__
3011 ---
3012 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3013 ---
3014 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3015 ---
3016 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3017 tex.postdisplaypenalty = 0
3018
3019 ---
3020 ---`\predisplaydirection`: An internal read/write integer, to indicate
3021 ---the direction of the last partial paragraph before a display; it is
3022 ---used to control the placement of elements such as equation numbers,
3023 ---and can be explictly set to affect this placement.
3024 ---
3025 ---__Reference:__
3026 ---
3027 ---* [The e-TeX Short Reference Manual](https://ftp.fau.de/ctan/systems/doc/etex/etex_ref.html#predisplaydirection)
3028 ---
3029 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3030
3031 ---
3032 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3033 tex.predisplaydirection = 0
3034
3035 ---
3036 ---`\predisplaypenalty`: Penalty placed in the vertical list above a
3037 ---display. Default: `10000`.
3038 ---
3039 ---__Reference:__
3040 ---
3041 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3042 ---
3043 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3044 ---
3045 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3046 tex.predisplaypenalty = 0
3047
3048 ---
3049 ---`\pretolerance`: Tolerance value for a paragraph without
3050 ---hyphenation. Default: `100`.
3051 ---
3052 ---__Reference:__
3053 ---
3054 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3055 ---
3056 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3057 ---
3058 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3059 tex.pretolerance = 0
3060
3061 ---
3062 ---`\relpenalty`: Penalty for breaking after a binary relation not
3063 ---enclosed in a subformula. Default: `500`
3064 ---
3065 ---__Reference:__
3066 ---
3067 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3068 ---
3069 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3070 ---
3071 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3072 tex.relpenalty = 0
3073
3074 ---
3075 ---`\righthyphenmin`: (TeX3 only) Minimum number of characters after a
3076 ---hyphenation. Default: `3`.
3077 ---
3078 ---__Reference:__
3079 ---
3080 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3081 ---
3082 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3083 ---
3084 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3085 tex.righthyphenmin = 0
3086
3087 ---
3088 ---When a `\patterns` command is executed and \savinghyphcodes has a
3089 ---positive value, the current `\lccode` values are saved as
3090 ---hyphenation codes for the current language.
3091 ---
3092 ---__Reference:__
3093 ---
3094 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 11
3095 ---
3096 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3097 ---
3098 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3099 tex.savinghyphcodes = 0
3100
3101 ---
3102 ---When ε-TEX’s parameter `\savingvdiscards` has been assigned a
3103 ---positive value, these ‘discarded items’ are saved in two lists and
3104 ---can be recovered by the commands `\pagediscards` and `\splitdiscards`
3105 ---that act like ‘unvboxing’ hypothetical box registers containing a
3106 ---vbox with the discarded items.
3107 ---
3108 ---__Reference:__
3109 ---
3110 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 12
3111 ---
3112 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3113 ---
3114 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3115 tex.savingvdiscards = 0
3116
3117 ---
3118 ---`\showboxbreadth`: Number of successive elements on each level that
3119 ---are shown when boxes are displayed.
3120 ---
3121 ---__Reference:__
3122 ---
3123 ---* [TeX by Topic, page 267](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3124 ---
3125 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3126 ---
3127 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3128 tex.showboxbreadth = 0
3129
3130 ---
3131 ---`\showboxdepth`: The number of levels of box dump that are shown when
3132 ---boxes are displayed.
3133 ---
3134 ---__Reference:__
3135 ---
3136 ---* [TeX by Topic, page 267](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3137 ---
3138 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3139 ---
3140 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3141 tex.showboxdepth = 0
3142
3143 ---
3144 ---`\time`: Number of minutes after midnight that the current job
3145 ---started.
3146 ---
3147 ---__Reference:__
3148 ---
3149 ---* [TeX by Topic, page 257](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3150 ---
3151 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3152 ---
3153 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3154 tex.time = 0
3155
3156 ---
3157 ---`\tolerance`: Tolerance value for lines in a paragraph with
3158 ---hyphenation. Default: `200`.
3159 ---
3160 ---__Reference:__
3161 ---
3162 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3163 ---
3164 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3165 ---
3166 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3167 tex.tolerance = 0
3168
3169 ---
3170 ---When the program is compiled with the code for collecting statistics and `\tracingassigns` has a value of `1` or more, all assignments subject to TeX’s grouping mechanism are traced.
3171 ---
3172 ---__Reference:__
3173 ---
3174 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 4
3175 ---
3176 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3177 ---
3178 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3179 tex.tracingassigns = 0
3180
3181 ---
3182 ---`\tracingcommands`: If this is `1` TEX displays primitive commands
3183 ---executed; if this is `2` or more the outcome of conditionals is also
3184 ---recorded.
3185 ---
3186 ---__Reference:__
3187 ---
3188 ---* [TeX by Topic, page 267](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3189 ---
3190 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3191 ---
3192 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3193 tex.tracingcommands = 0
3194
3195 ---
3196 ---When `\tracinggroups` has a value of `1` or more, the start and end
3197 ---of each save group is traced, together with the starting line and
3198 ---grouping level.
3199 ---
3200 ---__Reference:__
3201 ---
3202 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 4
3203 ---
3204 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3205 ---
3206 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3207 tex.tracinggroups = 0
3208
3209 ---
3210 ---When `\tracingifs` has a value of `1` or more, all conditionals
3211 ---(including `\unless`, `\or`, `\else`, and `\fi`) are traced,
3212 ---together with the starting line and nesting level.
3213 ---
3214 ---__Reference:__
3215 ---
3216 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 4
3217 ---
3218 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3219 ---
3220 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3221 tex.tracingifs = 0
3222
3223 ---
3224 ---`\tracinglostchars`: If this parameter is positive, TeX gives
3225 ---diagnostic messages whenever a character is accessed that is not
3226 ---present in a font. Plain default: `1`.
3227 ---
3228 ---__Reference:__
3229 ---
3230 ---* [TeX by Topic, page 268](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3231 ---
3232 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3233 ---
3234 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3235 tex.tracinglostchars = 0
3236
3237 ---
3238 ---`\tracingmacros`: If this is `1`, the log file shows expansion of
3239 ---macros that are performed and the actual values of the arguments;
3240 ---if this is `2` or more token parameters such as `\output` and
3241 ---`\everypar` are also traced.
3242 ---
3243 ---__Reference:__
3244 ---
3245 ---* [TeX by Topic, page 293](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3246 ---
3247 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3248 ---
3249 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3250 tex.tracingmacros = 0
3251
3252 ---
3253 ---When `\tracingnesting` has a value of `1` or more, these anomalies
3254 ---are shown; when `\tracingnesting` has a value of `2` or more, the
3255 ---current context (traceback) is shown as well.
3256 ---
3257 ---__Reference:__
3258 ---
3259 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 5
3260 ---
3261 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3262 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3263 tex.tracingnesting = 0
3264
3265 ---
3266 ---`\tracingonline`: If this parameter is positive, TeX will write
3267 ---trace information to the terminal in addition to the log file.
3268 ---
3269 ---__Reference:__
3270 ---
3271 ---* [TeX by Topic, page 267](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3272 ---
3273 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3274 ---
3275 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3276 tex.tracingonline = 0
3277
3278 ---
3279 ---`\tracingoutput`: If this is positive, the log file shows a dump of
3280 ---boxes that are shipped to the dvi file.
3281 ---
3282 ---__Reference:__
3283 ---
3284 ---* [TeX by Topic, page 267](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3285 ---
3286 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3287 ---
3288 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3289 tex.tracingoutput = 0
3290
3291 ---
3292 ---`\tracingpages`: If this parameter is positive, TeX generates a
3293 ---trace of the page breaking algorithm.
3294 ---
3295 ---__Reference:__
3296 ---
3297 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3298 ---
3299 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3300 ---
3301 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3302 tex.tracingpages = 0
3303
3304 ---
3305 ---`\tracingparagraphs`: If this parameter is positive, TeX
3306 ---generates a trace of the line breaking algorithm.
3307 ---
3308 ---__Reference:__
3309 ---
3310 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3311 ---
3312 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3313 ---
3314 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3315 tex.tracingparagraphs = 0
3316
3317 ---
3318 ---`\tracingrestores`: If this parameter is positive, TeX will report
3319 ---all values that are restored when a group ends.
3320 ---
3321 ---__Reference:__
3322 ---
3323 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3324 ---
3325 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3326 ---
3327 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3328 tex.tracingrestores = 0
3329
3330 ---
3331 ---When `\tracingscantokens` has a value of `1` or more, the opening
3332 ---and closing of pseudo-files (generated by `\scantokens`) is recorded
3333 ---as for any other file, with ‘␣’ as filename.
3334 ---
3335 ---__Reference:__
3336 ---
3337 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 5
3338 ---
3339 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3340 ---
3341 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3342 tex.tracingscantokens = 0
3343
3344 ---
3345 ---`\tracingstats`: If this parameter is `1`, TeX reports at the end
3346 ---of the job the usage of various internal arrays; if it is `2`, the
3347 ---memory demands are given whenever a page is shipped out.
3348 ---
3349 ---__Reference:__
3350 ---
3351 ---* [TeX by Topic, page 268](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3352 ---
3353 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3354 ---
3355 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3356 tex.tracingstats = 0
3357
3358 ---
3359 ---`\uchyph`: Positive to allow hyphenation of words starting with a
3360 ---capital letter. Default: `1`.
3361 ---
3362 ---__Reference:__
3363 ---
3364 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3365 ---
3366 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3367 ---
3368 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3369 tex.uchyph = 0
3370
3371 ---
3372 ---`\vbadness`: Amount of tolerance before TeX reports an underfull or
3373 ---overfull vertical box.
3374 ---
3375 ---__Reference:__
3376 ---
3377 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3378 ---
3379 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3380 ---
3381 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3382 tex.vbadness = 0
3383
3384 ---
3385 ---`\widowpenalty`: Additional penalty for breaking a page before the
3386 ---last line of a paragraph. Default: `150`
3387 ---
3388 ---__Reference:__
3389 ---
3390 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3391 ---
3392 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3393 ---
3394 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3395 tex.widowpenalty = 0
3396
3397 ---
3398 ---`\year`: The year of the current job.
3399 ---
3400 ---__Reference:__
3401 ---
3402 ---* [TeX by Topic, page 257](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3403 ---
3404 ---@type integer # A readable and writable integer parameter that accepts and returns Lua numbers.
3405 ---
3406 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3407 tex.year = 0
3408
3409 ---
3410 ---`\deadcycles`: Counter that keeps track of how many times the output
3411 ---routine has been called without a `\shipout` taking place.
3412 ---
3413 ---__Reference:__
3414 ---
3415 ---* [TeX by Topic, page 234](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3416 ---
3417 ---@type integer # A read-only integer parameter that returns a Lua number.
3418 ---
3419 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3420 tex.deadcycles = 0
3421
3422 ---
3423 ---`\insertpenalties`: Total of penalties for split insertions.
3424 ---Inside the output routine, the number of held-over insertions.
3425 ---
3426 ---__Reference:__
3427 ---
3428 ---* [TeX by Topic, page 240](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3429 ---
3430 ---@type integer # A read-only integer parameter that returns a Lua number.
3431 ---
3432 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3433 tex.insertpenalties = 0
3434
3435 ---
3436 ---`\parshape`: Command for general paragraph shapes.
3437 ---
3438 ---__Reference:__
3439 ---
3440 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3441 ---
3442 ---@type integer # A read-only integer parameter that returns a Lua number.
3443 ---
3444 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3445 tex.parshape = 0
3446
3447 ---
3448 ---An extension to `\interlinepenalty` that allows different penalties
3449 ---to be added after each line. It takes a space separated list of
3450 ---numbers as value. If `n` is positive interlinepenalties
3451 ---`n i_1 ... i_n` specifies the penalty to be used after each of the
3452 ---lines in a paragraph, with the last value being repeated as often as
3453 ---needed if the paragraph has more then `n` lines.
3454 ---
3455 ---__Reference:__
3456 ---
3457 ---* [Stackoverflow: What are penalties and which ones are defined?](https://tex.stackexchange.com/a/51264)
3458 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 10
3459 ---
3460 ---@type integer # A read-only integer parameter that returns a Lua number.
3461 ---
3462 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3463 tex.interlinepenalties = 0
3464
3465 ---
3466 ---An extension to `\clubpenalty` that allows different penalties to be
3467 ---added after each line. It takes a space separated list of numbers as
3468 ---value. If `n` is positive clubpenalties `n i_1 ... i_n` specifies the
3469 ---penalty to be used after each of the lines in a paragraph, with the
3470 ---last value being repeated as often as needed if the paragraph has
3471 ---more then `n` lines.
3472 ---
3473 ---__Reference:__
3474 ---
3475 ---* [Stackoverflow: What are penalties and which ones are defined?](https://tex.stackexchange.com/a/51264)
3476 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 10
3477 ---
3478 ---@type integer # A read-only integer parameter that returns a Lua number.
3479 ---
3480 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3481 tex.clubpenalties = 0
3482
3483 ---
3484 ---An extension to `\widowpenalty` that allows different penalties to be
3485 ---added after each line. It takes a space separated list of numbers as
3486 ---value. If `n` is positive widowpenalties `n i_1 ... i_n` specifies
3487 ---the penalty to be used after each of the lines in a paragraph, with
3488 ---the last value being repeated as often as needed if the paragraph
3489 ---has more then `n` lines. Lines are counted backwards from the last
3490 ---line in this case.
3491 ---
3492 ---__Reference:__
3493 ---
3494 ---* [Stackoverflow: What are penalties and which ones are defined?](https://tex.stackexchange.com/a/51264)
3495 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 10
3496 ---
3497 ---@type integer # A read-only integer parameter that returns a Lua number.
3498 ---
3499 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3500 tex.widowpenalties = 0
3501
3502 ---
3503 ---An extension to `\widowpenalty` that allows different penalties to be
3504 ---added after each line. It takes a space separated list of numbers as
3505 ---value. If `n` is positive displaywidowpenalties `n i_1 ... i_n`
3506 ---specifies the penalty to be used after each of the lines in a
3507 ---paragraph, with the last value being repeated as often as needed if
3508 ---the paragraph has more then `n` lines. Lines counted backwards from
3509 ---each display math within a paragraph.
3510 ---
3511 ---__Reference:__
3512 ---
3513 ---* [Stackoverflow: What are penalties and which ones are defined?](https://tex.stackexchange.com/a/51264)
3514 ---* The ε-TEX manual Version 2, February 1998 (updated March 2024), page 10
3515 ---
3516 ---@type integer # A read-only integer parameter that returns a Lua number.
3517 ---
3518 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3519 tex.displaywidowpenalties = 0
3520
3521 ---
3522 ---`\prevgraf`: The number of lines in the paragraph last added to the
3523 ---vertical list.
3524 ---
3525 ---__Reference:__
3526 ---
3527 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3528 ---
3529 ---@type integer # A read-only integer parameter that returns a Lua number.
3530 ---
3531 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3532 tex.prevgraf = 0
3533
3534 ---
3535 ---`\spacefactor`: `1000` times the ratio by which the stretch (shrink)
3536 ---component of the interword glue should be multiplied (divided).
3537 ---
3538 ---__Reference:__
3539 ---
3540 ---* [TeX by Topic, page 185](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3541 ---
3542 ---@type integer # A read-only integer parameter that returns a Lua number.
3543 ---
3544 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3545 tex.spacefactor = 0
3546
3547 ---
3548 ---`\boxmaxdepth`: Maximum allowed depth of boxes. Default: `\maxdimen`.
3549 ---
3550 ---__Reference:__
3551 ---
3552 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3553 ---
3554 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3555 ---
3556 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3557 tex.boxmaxdepth = 0
3558
3559 ---
3560 ---`\delimitershortfall`: Size of the part of a delimited formula that
3561 ---is allowed to go uncovered by a delimiter. Default: `5pt`.
3562 ---
3563 ---__Reference:__
3564 ---
3565 ---* [TeX by Topic, page 190](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3566 ---
3567 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3568 ---
3569 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3570 tex.delimitershortfall = 0
3571
3572 ---
3573 ---`\displayindent`: Distance by which the box, in which the display is
3574 ---centred, is indented owing to hanging indentation.
3575 ---
3576 ---__Reference:__
3577 ---
3578 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3579 ---
3580 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3581 ---
3582 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3583 tex.displayindent = 0
3584
3585 ---
3586 ---`\displaywidth`: Width of the box in which the display is centred.
3587 ---
3588 ---__Reference:__
3589 ---
3590 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3591 ---
3592 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3593 ---
3594 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3595 tex.displaywidth = 0
3596
3597 ---
3598 ---`\emergencystretch` (TeX3 only) Assumed extra stretchability in
3599 ---lines of a paragraph.
3600 ---
3601 ---__Reference:__
3602 ---
3603 ---* [TeX by Topic, page 175](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3604 ---
3605 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3606 ---
3607 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3608 tex.emergencystretch = 0
3609
3610 ---
3611 ---`\hangindent`: If positive, this indicates indentation from the
3612 ---left margin; if negative, this is the negative of the indentation
3613 ---from the right margin.
3614 ---
3615 ---__Reference:__
3616 ---
3617 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3618 ---
3619 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3620 ---
3621 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3622 tex.hangindent = 0
3623
3624 ---
3625 ---`\hfuzz`: Excess size that TeX tolerates before it considers a
3626 ---horizontal box overfull.
3627 ---
3628 ---__Reference:__
3629 ---
3630 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3631 ---
3632 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3633 ---
3634 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3635 tex.hfuzz = 0
3636
3637 ---
3638 ---`\hoffset`: Distance by which the page is shifted right with respect
3639 ---to the reference point.
3640 ---
3641 ---__Reference:__
3642 ---
3643 ---* [TeX by Topic, page 224](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3644 ---
3645 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3646 ---
3647 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3648 tex.hoffset = 0
3649
3650 ---
3651 ---`\hsize`: Line width used for typesetting a paragraph.
3652 ---Default: `6.5in`.
3653 ---
3654 ---__Reference:__
3655 ---
3656 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3657 ---
3658 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3659 ---
3660 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3661 tex.hsize = 0
3662
3663 ---
3664 ---`\lineskiplimit`: Distance to be maintained between the bottom and
3665 ---top of neighbouring boxes on a vertical list. Default: `0pt`.
3666 ---
3667 ---__Reference:__
3668 ---
3669 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3670 ---
3671 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3672 ---
3673 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3674 tex.lineskiplimit = 0
3675
3676 ---
3677 ---`\mathsurround`: Kern amount placed before and after in-line
3678 ---formulas.
3679 ---
3680 ---__Reference:__
3681 ---
3682 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3683 ---
3684 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3685 ---
3686 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3687 tex.mathsurround = 0
3688
3689 ---
3690 ---`\maxdepth`: Maximum depth of the page box. Default: `4pt`.
3691 ---
3692 ---__Reference:__
3693 ---
3694 ---* [TeX by Topic, page 224](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3695 ---
3696 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3697 ---
3698 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3699 tex.maxdepth = 0
3700
3701 ---
3702 ---`\nulldelimiterspace`: Width taken for empty delimiters.
3703 ---Default: `1.2pt`.
3704 ---
3705 ---__Reference:__
3706 ---
3707 ---* [TeX by Topic, page 190](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3708 ---
3709 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3710 ---
3711 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3712 tex.nulldelimiterspace = 0
3713
3714 ---
3715 ---`\overfullrule`: Width of the rule that is printed to indicate
3716 ---overfull horizontal boxes.
3717 ---
3718 ---__Reference:__
3719 ---
3720 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3721 ---
3722 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3723 ---
3724 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3725 tex.overfullrule = 0
3726
3727 ---
3728 ---`\pagebottomoffset`: To set the bottom margin in non-TLT text.
3729 ---
3730 ---__Reference:__
3731 ---
3732 ---* https://mirrors.aliyun.com/CTAN/systems/doc/aleph/News
3733 ---
3734 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3735 ---
3736 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3737 tex.pagebottomoffset = 0
3738
3739 ---
3740 ---`\pageheight`: The page height of the PDF output (the screen, the
3741 ---paper, etc.).
3742 ---
3743 ---__Reference:__
3744 ---
3745 ---* pdfTeX-Manual, page 25
3746 ---
3747 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3748 ---
3749 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3750 tex.pageheight = 0
3751
3752 ---
3753 ---`\pageleftoffset`: To set the left margin in non-TLT text.
3754 ---
3755 ---__Reference:__
3756 ---
3757 ---* https://mirrors.aliyun.com/CTAN/systems/doc/aleph/News
3758 ---
3759 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3760 ---
3761 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3762 tex.pageleftoffset = 0
3763
3764 ---
3765 ---`\pagerightoffset`: To set the right margin in non-TLT text.
3766 ---
3767 ---__Reference:__
3768 ---
3769 ---* https://mirrors.aliyun.com/CTAN/systems/doc/aleph/News
3770 ---
3771 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3772 ---
3773 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3774 tex.pagerightoffset = 0
3775
3776 ---
3777 ---`\pagetopoffset`: To set the top margin in non-TLT text.
3778 ---
3779 ---__Reference:__
3780 ---
3781 ---* https://mirrors.aliyun.com/CTAN/systems/doc/aleph/News
3782 ---
3783 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3784 ---
3785 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3786 tex.pagetopoffset = 0
3787
3788 ---
3789 ---`\pagewidth`: The page width of the PDF output (the screen,
3790 ---the paper, etc.).
3791 ---
3792 ---__Reference:__
3793 ---
3794 ---* pdfTeX-Manual, page 25
3795 ---
3796 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3797 ---
3798 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3799 tex.pagewidth = 0
3800
3801 ---
3802 ---`\parindent`: Width of the indentation box added in front of a
3803 ---paragraph. Default: `20pt`.
3804 ---
3805 ---__Reference:__
3806 ---
3807 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3808 ---
3809 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3810 ---
3811 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3812 tex.parindent = 0
3813
3814 ---
3815 ---`\predisplaysize`: Effective width of the line preceding the display.
3816 ---
3817 ---__Reference:__
3818 ---
3819 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3820 ---
3821 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3822 ---
3823 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3824 tex.predisplaysize = 0
3825
3826 ---
3827 ---`\scriptspace`: Extra space after subscripts and superscripts.
3828 ---Default: `0.5pt`.
3829 ---
3830 ---__Reference:__
3831 ---
3832 ---* [TeX by Topic, page 200](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3833 ---
3834 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3835 ---
3836 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3837 tex.scriptspace = 0
3838
3839 ---
3840 ---`\splitmaxdepth`: Maximum depth of a box split off by a `\vsplit`
3841 ---operation. Default: `\maxdimen`.
3842 ---
3843 ---__Reference:__
3844 ---
3845 ---* [TeX by Topic, page 224](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3846 ---
3847 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3848 ---
3849 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3850 tex.splitmaxdepth = 0
3851
3852 ---
3853 ---`\vfuzz`: Excess size that TeX tolerates before it considers a
3854 ---vertical box overfull.
3855 ---
3856 ---__Reference:__
3857 ---
3858 ---* [TeX by Topic, page 57](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3859 ---
3860 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3861 ---
3862 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3863 tex.vfuzz = 0
3864
3865 ---
3866 ---`\voffset`: Distance by which the page is shifted right/down with
3867 ---respect to the reference point.
3868 ---
3869 ---__Reference:__
3870 ---
3871 ---* [TeX by Topic, page 224](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3872 ---
3873 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3874 ---
3875 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3876 tex.voffset = 0
3877
3878 ---
3879 ---`\vsize`: Height of the page box. Default: `8.9in`.
3880 ---
3881 ---__Reference:__
3882 ---
3883 ---* [TeX by Topic, page 224](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3884 ---
3885 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3886 ---
3887 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3888 tex.vsize = 0
3889
3890 ---
3891 ---`\prevdepth`: Depth of the last box added to a vertical list as
3892 ---it is perceived by TeX.
3893 ---
3894 ---__Reference:__
3895 ---
3896 ---* [TeX by Topic, page 157](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3897 ---
3898 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3899 ---
3900 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3901 tex.prevdepth = 0
3902
3903 ---
3904 ---`\prevgraf`: The number of lines in the paragraph last added to the
3905 ---vertical list.
3906 ---
3907 ---__Reference:__
3908 ---
3909 ---* [TeX by Topic, page 290](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3910 ---
3911 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3912 ---
3913 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3914 tex.prevgraf = 0
3915
3916 ---
3917 ---`\spacefactor`: `1000` times the ratio by which the stretch (shrink)
3918 ---component of the interword glue should be multiplied (divided).
3919 ---
3920 ---__Reference:__
3921 ---
3922 ---* [TeX by Topic, page 185](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3923 ---* [The TexBook: page 76. Also: 76, 271, 285, 363, 433.](https://ctan.org/tex-archive/systems/knuth/dist/tex/texbook.tex)
3924 ---
3925 ---@type integer # A readable and writable dimension parameter that accepts a Lua number (signifying scaled points) or a string (with included dimension). The result is always a number in scaled points.
3926 ---
3927 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3928 tex.spacefactor = 0
3929
3930 ---
3931 ---`\pagedepth`: Depth of the current page.
3932 ---
3933 ---__Reference:__
3934 ---
3935 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3936 ---
3937 ---A read only dimension parameter. The result is always a number in scaled points.
3938 ---@type integer
3939 ---
3940 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3941 tex.pagedepth = 0
3942
3943 ---
3944 ---`\pagefilllstretch`: Accumulated third-order stretch of the current
3945 ---page.
3946 ---
3947 ---__Reference:__
3948 ---
3949 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3950 ---
3951 ---A read only dimension parameter. The result is always a number in scaled points.
3952 ---@type integer
3953 ---
3954 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3955 tex.pagefilllstretch = 0
3956
3957 ---
3958 ---`\pagefillstretch`: Accumulated second-order stretch of the current
3959 ---page.
3960 ---
3961 ---__Reference:__
3962 ---
3963 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3964 ---
3965 ---A read only dimension parameter. The result is always a number in scaled points.
3966 ---@type integer
3967 ---
3968 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3969 tex.pagefillstretch = 0
3970
3971 ---
3972 ---`\pagefilstretch`: Accumulated first-order stretch of the current
3973 ---page.
3974 ---
3975 ---__Reference:__
3976 ---
3977 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3978 ---
3979 ---A read only dimension parameter. The result is always a number in scaled points.
3980 ---@type integer
3981 ---
3982 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3983 tex.pagefilstretch = 0
3984
3985 ---
3986 ---`\pagegoal`: Goal height of the page box. This starts at `\vsize`,
3987 ---and is diminished by heights of insertion items.
3988 ---
3989 ---__Reference:__
3990 ---
3991 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
3992 ---
3993 ---A read only dimension parameter. The result is always a number in scaled points.
3994 ---@type integer
3995 ---
3996 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
3997 tex.pagegoal = 0
3998
3999 ---
4000 ---`\pageshrink`: Accumulated shrink of the current page.
4001 ---
4002 ---__Reference:__
4003 ---
4004 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4005 ------
4006 ---A read only dimension parameter. The result is always a number in scaled points.
4007 ---@type integer
4008 ---
4009 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4010 tex.pageshrink = 0
4011
4012 ---
4013 ---`\pagestretch`: Accumulated zeroth-order stretch of the current page.
4014 ---
4015 ---__Reference:__
4016 ---
4017 ---* [TeX by Topic, page ](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4018 ---
4019 ---A read only dimension parameter. The result is always a number in scaled points.
4020 ---@type integer
4021 ---
4022 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4023 tex.pagestretch = 0
4024
4025 ---
4026 ---`\pagetotal`: Accumulated natural height of the current page.
4027 ---
4028 ---__Reference:__
4029 ---
4030 ---* [TeX by Topic, page ](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4031 ---
4032 ---A read only dimension parameter. The result is always a number in scaled points.
4033 ---@type integer
4034 ---
4035 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4036 tex.pagetotal = 0
4037
4038 ---
4039 ---The direction for vboxes, including the main body of text.
4040 ---Default: `TLT`.
4041 ---
4042 ---__Reference:__
4043 ---
4044 ---* [README of the Omega engine](https://mirrors.ctan.org/obsolete/systems/omega/README)
4045 ---
4046 ---@type DirectionSpecifier A read-only direction parameter that returns a *Lua* string.
4047 ---
4048 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4049 tex.bodydir = "TLT"
4050
4051 ---
4052 ---The direction for mathematics. Default: `TLT`.
4053 ---
4054 ---__Reference:__
4055 ---
4056 ---* [README of the Omega engine](https://mirrors.ctan.org/obsolete/systems/omega/README)
4057 ---
4058 ---@type DirectionSpecifier A read-only direction parameter that returns a *Lua* string.
4059 ---
4060 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4061 tex.mathdir = "TLT"
4062
4063 ---
4064 ---The direction for pages (`\shipout`). Default: `TLT`.
4065 ---
4066 ---__Reference:__
4067 ---
4068 ---* [README of the Omega engine](https://mirrors.ctan.org/obsolete/systems/omega/README)
4069 ---
4070 ---@type DirectionSpecifier A read-only direction parameter that returns a *Lua* string.
4071 ---
4072 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4073 tex.pagedir = "TLT"
4074
4075 ---
4076 ---The direction for paragraphs. Default: `TLT`.
4077 ---
4078 ---__Reference:__
4079 ---
4080 ---* [README of the Omega engine](https://mirrors.ctan.org/obsolete/systems/omega/README)
4081 ---
4082 ---@type DirectionSpecifier A read-only direction parameter that returns a *Lua* string.
4083 ---
4084 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4085 tex.pardir = "TLT"
4086
4087 ---
4088 ---The direction for text and hboxes. Default: `TLT`.
4089 ---
4090 ---__Reference:__
4091 ---
4092 ---* [README of the Omega engine](https://mirrors.ctan.org/obsolete/systems/omega/README)
4093 ---
4094 ---@type DirectionSpecifier A read-only direction parameter that returns a *Lua* string.
4095 ---
4096 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4097 tex.textdir = "TLT"
4098
4099 ---
4100 ---`\abovedisplayshortskip`: Glue above a display if the line preceding
4101 ---the display was short. Default: `0pt plus 3pt`.
4102 ---
4103 ---__Reference:__
4104 ---
4105 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4106 ---
4107 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4108 ---
4109 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4110 tex.abovedisplayshortskip = nil
4111
4112 ---
4113 ---`\abovedisplayskip`: Glue above a display.
4114 ---Default: `12pt plus 3pt minus 9pt`.
4115 ---
4116 ---__Reference:__
4117 ---
4118 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4119 ---
4120 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4121 ---
4122 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4123 tex.abovedisplayskip = nil
4124
4125 ---
4126 ---`\baselineskip`: The ‘ideal’ baseline distance between neighbouring
4127 ---boxes on a vertical list. Default: `12pt`.
4128 ---
4129 ---__Reference:__
4130 ---
4131 ---* [TeX by Topic, page 157](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4132 ---
4133 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4134 ---
4135 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4136 tex.baselineskip = nil
4137
4138 ---
4139 ---`\belowdisplayshortskip`: Glue above/below a display if the line
4140 ---preceding the display was short. Default: `0pt plus 3pt` and
4141 ---`7pt plus 3pt minus 4pt` respectively.
4142 ---
4143 ---__Reference:__
4144 ---
4145 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4146 ---
4147 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4148 ---
4149 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4150 tex.belowdisplayshortskip = nil
4151
4152 ---
4153 ---`\belowdisplayskip`: Glue below a display.
4154 ---Default: `12pt plus 3pt minus 9pt`.
4155 ---
4156 ---__Reference:__
4157 ---
4158 ---* [TeX by Topic, page ](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4159 ---
4160 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4161 ---
4162 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4163 tex.belowdisplayskip = nil
4164
4165 ---
4166 ---`\leftskip`: Glue that is placed to the left of all lines of a
4167 ---paragraph.
4168 ---
4169 ---__Reference:__
4170 ---
4171 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4172 ---
4173 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4174 ---
4175 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4176 tex.leftskip = nil
4177
4178 ---
4179 ---`\lineskip`: Glue added if the distance between bottom and top of
4180 ---neighbouring boxes is less than `\lineskiplimit`. Default: `1pt`.
4181 ---
4182 ---__Reference:__
4183 ---
4184 ---* [TeX by Topic, page 157](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4185 ---
4186 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4187 ---
4188 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4189 tex.lineskip = nil
4190
4191 ---
4192 ---`\parfillskip`: Glue that is placed between the last element of the
4193 ---paragraph and the line end. Default: `0pt plus 1fil`.
4194 ---
4195 ---__Reference:__
4196 ---
4197 ---* [TeX by Topic, page 166](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4198 ---
4199 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4200 ---
4201 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4202 tex.parfillskip = nil
4203
4204 ---
4205 ---`\parskip`: Amount of glue added to the surrounding vertical list
4206 ---when a paragraph starts. Default: `0pt plus 1pt`.
4207 ---
4208 ---__Reference:__
4209 ---
4210 ---* [TeX by Topic, page 161](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4211 ---
4212 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4213 ---
4214 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4215 tex.parskip = nil
4216
4217 ---
4218 ---`\rightskip`: Glue that is placed to the right of all lines of a
4219 ---paragraph.
4220 ---
4221 ---__Reference:__
4222 ---
4223 ---* [TeX by Topic, page 170](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4224 ---
4225 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4226 ---
4227 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4228 tex.rightskip = nil
4229
4230 ---
4231 ---`\spaceskip`: Interword glue if non-zero.
4232 ---
4233 ---__Reference:__
4234 ---
4235 ---* [TeX by Topic, page 185](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4236 ---
4237 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4238 ---
4239 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4240 tex.spaceskip = nil
4241
4242 ---
4243 ---`\splittopskip`: Minimum distance between the top of what remains
4244 ---after a `\vsplit` operation, and the first item in that box.
4245 ---Default: `10pt`.
4246 ---
4247 ---__Reference:__
4248 ---
4249 ---* [TeX by Topic, page 226](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4250 ---
4251 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4252 ---
4253 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4254 tex.splittopskip = nil
4255
4256 ---
4257 ---`\tabskip`: Amount of glue in between columns (rows) of an
4258 ---`\halign` (`\valign`).
4259 ---
4260 ---__Reference:__
4261 ---
4262 ---* [TeX by Topic, page 215](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4263 ---
4264 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4265 ---
4266 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4267 tex.tabskip = nil
4268
4269 ---
4270 ---`\topskip`: Minimum distance between the top of the page box and the
4271 ---baseline of the first box on the page. Default: `10pt`.
4272 ---
4273 ---__Reference:__
4274 ---
4275 ---* [TeX by Topic, page 224](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4276 ---
4277 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4278 ---
4279 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4280 tex.topskip = nil
4281
4282 ---
4283 ---`\xspaceskip`: Interword glue if non-zero and `\spacefactor` ≥ 2000.
4284 ---
4285 ---__Reference:__
4286 ---
4287 ---* [TeX by Topic, page 185](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4288 ---
4289 ---@type GlueSpecNode # A readable and writeable glue parameter that accepts and returns a userdata object which in turn represents a `glue_spec` node.
4290 ---
4291 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4292 tex.xspaceskip = nil
4293
4294 ---
4295 ---`\medmuskip`: Medium amount of mu (math units) glue.
4296 ---
4297 ---__Reference:__
4298 ---
4299 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4300 ---
4301 ---@type string # A read-only `muglue` parameter that returns a *Lua* string.
4302 ---
4303 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4304 tex.medmuskip = ""
4305
4306 ---
4307 ---`\thickmuskip`: Large amount of mu (math units) glue.
4308 ---
4309 ---__Reference:__
4310 ---
4311 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4312 ---
4313 ---@type string # A read-only `muglue` parameter that returns a *Lua* string.
4314 ---
4315 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4316 tex.thickmuskip = ""
4317
4318 ---
4319 ---`\thinmuskip`: Small amount of mu (math units) glue.
4320 ---
4321 ---__Reference:__
4322 ---
4323 ---* [TeX by Topic, page 201](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4324 ---
4325 ---@type string # A read-only `muglue` parameter that returns a *Lua* string.
4326 ---
4327 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4328 tex.thinmuskip = ""
4329
4330 ---
4331 ---`\errhelp`: Tokens that will be displayed if the user asks further
4332 ---help after an `\errmessage`.
4333 ---
4334 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4335 ---
4336 ---The *Lua* string is
4337 ---converted to and from a token list using `\the` `\toks` style expansion:
4338 ---all category codes are either space (10) or other (12).
4339 ---
4340 ---__Reference:__
4341 ---
4342 ---* [TeX by Topic, page 272](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4343 ---
4344 ---@type string
4345 ---
4346 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4347 tex.errhelp = ""
4348
4349 ---
4350 ---`\everycr`: Token list inserted after every `\cr` or
4351 ---non-redundant `\crcr`.
4352 ---
4353 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4354 ---
4355 ---The *Lua* string is
4356 ---converted to and from a token list using `\the` `\toks` style expansion:
4357 ---all category codes are either space (10) or other (12).
4358 ---
4359 ---__Reference:__
4360 ---
4361 ---* [TeX by Topic, page 215](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4362 -----
4363 ---@type string
4364 ---
4365 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4366 tex.everycr = ""
4367
4368 ---
4369 ---`\everydisplay`: Token list inserted at the start of a display.
4370 ---
4371 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4372 ---
4373 ---The *Lua* string is
4374 ---converted to and from a token list using `\the` `\toks` style expansion:
4375 ---all category codes are either space (10) or other (12).
4376 ---
4377 ---__Reference:__
4378 ---
4379 ---* [TeX by Topic, page 210](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4380 -----
4381 ---
4382 ---@type string
4383 ---
4384 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4385 tex.everydisplay = ""
4386
4387 ---
4388 ---`\everyeof`: The content of this token list is injected when a
4389 ---file ends.
4390 ---
4391 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4392 ---
4393 ---The *Lua* string is
4394 ---converted to and from a token list using `\the` `\toks` style expansion:
4395 ---all category codes are either space (10) or other (12).
4396 ---
4397 ---__Reference:__
4398 ---
4399 ---* LuaMetaTeX-Manual, page 115
4400 ---
4401 ---@type string
4402 ---
4403 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4404 tex.everyeof = ""
4405
4406 ---
4407 ---`\everyhbox`: Token list inserted at the start of a horizontal box.
4408 ---
4409 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4410 ---
4411 ---The *Lua* string is
4412 ---converted to and from a token list using `\the` `\toks` style expansion:
4413 ---all category codes are either space (10) or other (12).
4414 ---
4415 ---__Reference:__
4416 ---
4417 ---* [TeX by Topic, page 284](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4418 ---
4419 ---@type string
4420 ---
4421 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4422 tex.everyhbox = ""
4423
4424 ---
4425 ---`\everyjob`: Token list that is inserted at the start of each new
4426 ---job.
4427 ---
4428 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4429 ---
4430 ---The *Lua* string is
4431 ---converted to and from a token list using `\the` `\toks` style expansion:
4432 ---all category codes are either space (10) or other (12).
4433 ---
4434 ---__Reference:__
4435 ---
4436 ---* [TeX by Topic, page 254](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4437 ---
4438 ---@type string
4439 ---
4440 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4441 tex.everyjob = ""
4442
4443 ---
4444 ---`\everymath`: Token list inserted at the start of non-display math.
4445 ---
4446 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4447 ---
4448 ---The *Lua* string is
4449 ---converted to and from a token list using `\the` `\toks` style expansion:
4450 ---all category codes are either space (10) or other (12).
4451 ---
4452 ---__Reference:__
4453 ---
4454 ---* [TeX by Topic, page 284](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4455 ---
4456 ---@type string
4457 ---
4458 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4459 tex.everymath = ""
4460
4461 ---
4462 ---`\everypar`: Token list inserted in front of paragraph text.
4463 ---
4464 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4465 ---
4466 ---The *Lua* string is
4467 ---converted to and from a token list using `\the` `\toks` style expansion:
4468 ---all category codes are either space (10) or other (12).
4469 ---
4470 ---__Reference:__
4471 ---
4472 ---* [TeX by Topic, page 284](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4473 ---
4474 ---@type string
4475 ---
4476 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4477 tex.everypar = ""
4478
4479 ---
4480 ---`\everyvbox`: Token list inserted at the start of a vertical box.
4481 ---
4482 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4483 ---
4484 ---The *Lua* string is
4485 ---converted to and from a token list using `\the` `\toks` style expansion:
4486 ---all category codes are either space (10) or other (12).
4487 ---
4488 ---__Reference:__
4489 ---
4490 ---* [TeX by Topic, page 284](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4491 ---
4492 ---@type string
4493 ---
4494 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4495 tex.everyvbox = ""
4496
4497 ---
4498 ---`\output`: Token list with instructions for shipping out pages.
4499 ---
4500 ---A `tokenlist` parameters that accepts and returns a *Lua* string.
4501 ---
4502 ---The *Lua* string is
4503 ---converted to and from a token list using `\the` `\toks` style expansion:
4504 ---all category codes are either space (10) or other (12).
4505 ---
4506 ---__Reference:__
4507 ---
4508 ---* [TeX by Topic, page 289](http://mirrors.ctan.org/info/texbytopic/TeXbyTopic.pdf)
4509 ---
4510 ---@type string
4511 ---
4512 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4513 tex.output = ""
4514
4515 ---
4516 ---@type string # for example `2.2`.
4517 ---
4518 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4519 tex.eTeXVersion = ""
4520
4521 ---
4522 ---@type string # for example `2.2`.
4523 ---
4524 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4525 tex.eTeXrevision = ""
4526
4527 ---
4528 ---@type string # for example `luatex`.
4529 ---
4530 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4531 tex.formatname = ""
4532
4533 ---
4534 ---@type string
4535 ---
4536 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4537 tex.jobname = ""
4538
4539 ---
4540 ---@type string # for example `This is LuaTeX, Version 1.15.1 (TeX Live 2023/dev)`.
4541 ---
4542 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4543 tex.luatexbanner = ""
4544
4545 ---
4546 ---@type string # for example `1`.
4547 ---
4548 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4549 tex.luatexrevision = ""
4550
4551 ---
4552 ---All “last item” commands are read-only and return a number.
4553 ---@type integer
4554 ---
4555 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4556 tex.lastpenalty = 0
4557
4558 ---
4559 ---All “last item” commands are read-only and return a number.
4560 ---@type integer
4561 ---
4562 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4563 tex.lastkern = 0
4564
4565 ---
4566 ---All “last item” commands are read-only and return a number.
4567 ---@type integer
4568 ---
4569 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4570 tex.lastskip = 0
4571
4572 ---
4573 ---All “last item” commands are read-only and return a number.
4574 ---@type integer
4575 ---
4576 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4577 tex.lastnodetype = 0
4578
4579 ---
4580 ---All “last item” commands are read-only and return a number.
4581 ---@type integer
4582 ---
4583 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4584 tex.inputlineno = 0
4585
4586 ---
4587 ---All “last item” commands are read-only and return a number.
4588 ---@type integer
4589 ---
4590 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4591 tex.lastxpos = 0
4592
4593 ---
4594 ---All “last item” commands are read-only and return a number.
4595 ---@type integer
4596 ---
4597 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4598 tex.lastypos = 0
4599
4600 ---
4601 ---All “last item” commands are read-only and return a number.
4602 ---@type integer
4603 ---
4604 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4605 tex.randomseed = 0
4606
4607 ---
4608 ---All “last item” commands are read-only and return a number.
4609 ---@type integer
4610 ---
4611 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4612 tex.luatexversion = 0
4613
4614 ---
4615 ---All “last item” commands are read-only and return a number.
4616 ---@type integer
4617 ---
4618 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4619 tex.eTeXminorversion = 0
4620
4621 ---
4622 ---All “last item” commands are read-only and return a number.
4623 ---@type integer
4624 ---
4625 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4626 tex.eTeXversion = 0
4627
4628 ---
4629 ---All “last item” commands are read-only and return a number.
4630 ---@type integer
4631 ---
4632 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4633 tex.currentgrouplevel = 0
4634
4635 ---
4636 ---All “last item” commands are read-only and return a number.
4637 ---@type integer
4638 ---
4639 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4640 tex.currentgrouptype = 0
4641
4642 ---
4643 ---All “last item” commands are read-only and return a number.
4644 ---@type integer
4645 ---
4646 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4647 tex.currentiflevel = 0
4648
4649 ---
4650 ---All “last item” commands are read-only and return a number.
4651 ---@type integer
4652 ---
4653 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4654 tex.currentiftype = 0
4655
4656 ---
4657 ---All “last item” commands are read-only and return a number.
4658 ---@type integer
4659 ---
4660 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4661 tex.currentifbranch = 0
4662
4663 ---
4664 ---The attribute registers accept and return Lua numbers.
4665 ---
4666 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
4667 ---
4668 ---__Reference:__
4669 ---
4670 ---* Corresponding C source code: [ltexlib.c#L3698](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3698)
4671 ---
4672 ---@type table
4673 ---
4674 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4675 tex.attribute = {}
4676
4677 ---
4678 ---* Corresponding C source code: [ltexlib.c#L1087-L1102](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1087-L1102)
4679 ---
4680 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
4681 ---@param register string|integer # A register number or a predefined csname string from `\attributedef`.
4682 ---@param value integer
4683 ---
4684 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4685 function tex.setattribute(global, register, value) end
4686
4687 ---
4688 ---* Corresponding C source code: [ltexlib.c#L1087-L1102](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1087-L1102)
4689 ---
4690 ---@param register string|integer # A register number or a predefined csname string from `\attributedef`.
4691 ---@param value integer
4692 ---
4693 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4694 function tex.setattribute(register, value) end
4695
4696 ---
4697 ---* Corresponding C source code: [ltexlib.c#L1104-L1114](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1104-L1114)
4698 ---
4699 ---@param register string|integer # A register number or a predefined csname string from `\attributedef`.
4700 ---
4701 ---@return integer value
4702 ---
4703 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4704 function tex.getattribute(register) end
4705
4706 ---
4707 ---* Corresponding C source code: [ltexlib.c#L1080-L1083](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1080-L1083)
4708 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
4709 ---
4710 ---@param register string|integer # A register number or a predefined csname string from `\attributedef`.
4711 ---
4712 ---@return false|integer
4713 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4714 function tex.isattribute(register) end
4715
4716 ---
4717 ---The count registers accept and return *Lua* numbers.
4718 ---
4719 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
4720 ---
4721 ---__Reference:__
4722 ---
4723 ---* Corresponding C source code: [ltexlib.c#L3704](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3704)
4724 ---
4725 ---@type table
4726 ---
4727 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4728 tex.count = {}
4729
4730 ---
4731 ---* Corresponding C source code: [ltexlib.c#L1051-L1066](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1051-L1066)
4732 ---
4733 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
4734 ---@param register string|integer # A register number or a predefined csname string from `\countdef`.
4735 ---@param value integer
4736 ---
4737 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4738 function tex.setcount(global, register, value) end
4739
4740 ---
4741 ---* Corresponding C source code: [ltexlib.c#L1051-L1066](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1051-L1066)
4742 ---
4743 ---@param register string|integer # A register number or a predefined csname string from `\countdef`.
4744 ---@param value integer
4745 ---
4746 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4747 function tex.setcount(register, value) end
4748
4749 ---
4750 ---* Corresponding C source code: [ltexlib.c#L1068-L1078](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1068-L1078)
4751 ---
4752 ---@param register string|integer # A register number or a predefined csname string from `\countdef`.
4753 ---
4754 ---@return integer value
4755 ---
4756 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4757 function tex.getcount(register) end
4758
4759 ---
4760 ---* Corresponding C source code: [ltexlib.c#L1046-L1049](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1046-L1049)
4761 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
4762 ---
4763 ---@param register string|integer # A register number or a predefined csname string from `\countdef`.
4764 ---
4765 ---@return false|integer
4766 ---
4767 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4768 function tex.iscount(register) end
4769
4770 ---
4771 ---The dimension registers accept *Lua* numbers (in scaled points) or
4772 ---strings (with an included absolute dimension; `em` and `ex`
4773 ---and `px` are forbidden). The result is always a number in scaled
4774 ---points.
4775 ---
4776 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
4777 ---
4778 ---__Reference:__
4779 ---
4780 ---* Corresponding C source code: [ltexlib.c#L3703](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3703)
4781 ---
4782 ---@type table
4783 ---
4784 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4785 tex.dimen = {}
4786
4787 ---
4788 ---* Corresponding C source code: [ltexlib.c#L818-L834](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L818-L834)
4789 ---
4790 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
4791 ---@param register string|integer # A register number or a predefined csname string from `\dimendef`.
4792 ---@param value integer|string
4793 ---
4794 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4795 function tex.setdimen(global, register, value) end
4796
4797 ---
4798 ---* Corresponding C source code: [ltexlib.c#L836-L846](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L836-L846)
4799 ---
4800 ---@param register string|integer # A register number or a predefined csname string from `\dimendef`.
4801 ---
4802 ---@return integer value
4803 ---
4804 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4805 function tex.getdimen(register) end
4806
4807 ---
4808 ---* Corresponding C source code: [ltexlib.c#L813-L816](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L813-L816)
4809 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
4810 ---
4811 ---@param register string|integer # A register number or a predefined csname string from `\dimendef`.
4812 ---
4813 ---@return false|integer
4814 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4815 function tex.isdimen(register) end
4816
4817 ---
4818 ---The glue registers are just skip registers but instead of userdata
4819 ---are verbose.
4820 ---
4821 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
4822 ---
4823 ---__Reference:__
4824 ---
4825 ---* Corresponding C source code: [ltexlib.c#L3700](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3700)
4826 ---
4827 ---@type table
4828 ---
4829 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4830 tex.glue = {}
4831
4832 ---
4833 ---* Corresponding C source code: [ltexlib.c#L884-L903](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L884-L903)
4834 ---
4835 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
4836 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
4837 ---@param width? number
4838 ---@param stretch? number
4839 ---@param shrink? number
4840 ---@param stretch_order? integer
4841 ---@param shrink_order? integer
4842 ---
4843 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4844 function tex.setglue(global, register, width, stretch, shrink, stretch_order, shrink_order) end
4845
4846 ---
4847 ---* Corresponding C source code: [ltexlib.c#L884-L903](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L884-L903)
4848 ---
4849 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
4850 ---@param width? number
4851 ---@param stretch? number
4852 ---@param shrink? number
4853 ---@param stretch_order? integer
4854 ---@param shrink_order? integer
4855 ---
4856 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4857 function tex.setglue(register, width, stretch, shrink, stretch_order, shrink_order) end
4858
4859 ---
4860 ---* Corresponding C source code: [ltexlib.c#L905-L949](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L905-L949)
4861 ---
4862 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
4863 ---
4864 ---@return integer width
4865 ---@return integer stretch
4866 ---@return integer shrink
4867 ---@return integer stretch_order
4868 ---@return integer shrink_order
4869 ---
4870 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4871 function tex.getglue(register) end
4872
4873 ---
4874 ---Alias of tex.isskip()
4875 ---
4876 ---* Corresponding C source code: [ltexlib.c#L848-L851](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L848-L851)
4877 ---
4878 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
4879 ---
4880 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
4881 ---
4882 ---@return false|integer
4883 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4884 function tex.isglue(register) end
4885
4886 ---
4887 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
4888 ---
4889 ---__Reference:__
4890 ---
4891 ---* Corresponding C source code: [ltexlib.c#L3702](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3702)
4892 ---
4893 ---@type table
4894 ---
4895 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4896 tex.muglue = {}
4897
4898 ---
4899 ---* Corresponding C source code: [ltexlib.c#L979-L998](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L979-L998)
4900 ---
4901 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
4902 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4903 ---@param width? number
4904 ---@param stretch? number
4905 ---@param shrink? number
4906 ---@param stretch_order? integer
4907 ---@param shrink_order? integer
4908 ---
4909 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4910 function tex.setmuglue(global, register, width, stretch, shrink, stretch_order, shrink_order) end
4911
4912 ---
4913 ---* Corresponding C source code: [ltexlib.c#L979-L998](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L979-L998)
4914 ---
4915 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4916 ---@param width? number
4917 ---@param stretch? number
4918 ---@param shrink? number
4919 ---@param stretch_order? integer
4920 ---@param shrink_order? integer
4921 ---
4922 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4923 function tex.setmuglue(register, width, stretch, shrink, stretch_order, shrink_order) end
4924
4925 ---
4926 ---* Corresponding C source code: [ltexlib.c#L1000-L1044](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1000-L1044)
4927 ---
4928 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4929 ---
4930 ---@return integer width
4931 ---@return integer stretch
4932 ---@return integer shrink
4933 ---@return integer stretch_order
4934 ---@return integer shrink_order
4935 ---
4936 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4937 function tex.getmuglue(register) end
4938
4939 ---
4940 ---Alias of tex.ismuskip()
4941 ---
4942 ---* Corresponding C source code: [ltexlib.c#L951-L954](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L951-L954)
4943 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
4944 ---
4945 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4946 ---
4947 ---@return false|integer
4948 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4949 function tex.ismuglue(register) end
4950
4951 ---
4952 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
4953 ---
4954 ---__Reference:__
4955 ---
4956 ---* Corresponding C source code: [ltexlib.c#L3701](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3701)
4957 ---
4958 ---@type table
4959 ---
4960 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4961 tex.muskip = {}
4962
4963 ---
4964 ---* Corresponding C source code: [ltexlib.c#L956-L965](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L956-L965)
4965 ---
4966 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
4967 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4968 ---@param value Node
4969 ---
4970 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4971 function tex.setmuskip(global, register, value) end
4972
4973 ---
4974 ---* Corresponding C source code: [ltexlib.c#L956-L965](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L956-L965)
4975 ---
4976 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4977 ---@param value Node
4978 ---
4979 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4980 function tex.setmuskip(register, value) end
4981
4982 ---
4983 ---* Corresponding C source code: [ltexlib.c#L967-L977](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L967-L977)
4984 ---
4985 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4986 ---
4987 ---@return Node value
4988 ---
4989 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
4990 function tex.getmuskip(register) end
4991
4992 ---
4993 ---* Corresponding C source code: [ltexlib.c#L951-L954](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L951-L954)
4994 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
4995 ---
4996 ---@param register string|integer # A register number or a predefined csname string from `\muskipdef`.
4997 ---
4998 ---@return false|integer
4999 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5000 function tex.ismuskip(register) end
5001
5002 ---
5003 ---The skip registers accept and return `glue_spec` userdata node
5004 ---objects.
5005 ---
5006 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
5007 ---
5008 ---__Reference:__
5009 ---
5010 ---* Corresponding C source code: [ltexlib.c#L3699](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3699)
5011 ---
5012 ---@type table
5013 ---
5014 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5015 tex.skip = {}
5016
5017 ---
5018 ---* Corresponding C source code: [ltexlib.c#L853-L866](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L853-L866)
5019 ---
5020 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5021 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
5022 ---@param skip GlueSpecNode
5023 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5024 function tex.setskip(global, register, skip) end
5025
5026 ---
5027 ---* Corresponding C source code: [ltexlib.c#L853-L866](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L853-L866)
5028 ---
5029 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
5030 ---@param skip GlueSpecNode
5031 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5032 function tex.setskip(register, skip) end
5033
5034 ---
5035 ---* Corresponding C source code: [ltexlib.c#L868-L882](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L868-L882)
5036 ---
5037 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
5038 ---
5039 ---@return GlueSpecNode
5040 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5041 function tex.getskip(register) end
5042
5043 ---
5044 ---* Corresponding C source code: [ltexlib.c#L848-L851](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L848-L851)
5045 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
5046 ---
5047 ---@param register string|integer # A register number or a predefined csname string from `\skipdef`.
5048 ---
5049 ---@return false|integer
5050 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5051 function tex.isskip(register) end
5052
5053 ---
5054 ---The token registers accept and return *Lua* strings. *Lua* strings are
5055 ---converted to and from token lists using `\the` `\toks` style
5056 ---expansion: all category codes are either space (10) or other (12).
5057 ---
5058 ---see `LuaTeX` manual: 10.3.5 Accessing registers: `set*`, `get*` and `is*`
5059 ---
5060 ---__Reference:__
5061 ---
5062 ---* Corresponding C source code: [ltexlib.c#L3705](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3705)
5063 ---
5064 ---@type table
5065 ---
5066 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5067 tex.toks = {}
5068
5069 ---
5070 ---Set a toks register. Also accepts a predefined csname string.
5071 ---
5072 ---* Corresponding C source code: [ltexlib.c#L1125-L1158](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1125-L1158)
5073 ---
5074 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5075 ---@param register string|integer # A register number or a predefined csname string from `\toksdef`.
5076 ---@param toks string
5077 ---
5078 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5079 function tex.settoks(global, register, toks) end
5080
5081 ---
5082 ---Get a toks register. Also accepts a predefined csname string.
5083 ---
5084 ---* Corresponding C source code: [ltexlib.c#L1197-L1209](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1197-L1209)
5085 ---
5086 ---@param register string|integer # A register number or a predefined csname string from `\toksdef`.
5087 ---
5088 ---@return string toks
5089 ---
5090 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5091 function tex.gettoks(register) end
5092
5093 ---
5094 ---* Corresponding C source code: [ltexlib.c#L1120-L1123](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1120-L1123)
5095 ---* Corresponding C source code: [ltexlib.c#L350-L358](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L350-L358)
5096 ---
5097 ---@param register string|integer # A register number or a predefined csname string from `\toksdef`.
5098 ---
5099 ---@return false|integer
5100 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5101 function tex.istoks(register) end
5102
5103 ---
5104 ---For tokens registers we have an alternative where a catcode table is specified:
5105 ---
5106 ---```lua
5107 ---tex.scantoks(0,3,"$e=mc^2$")
5108 ---tex.scantoks("global",0,"$\\int\\limits^1_2$")
5109 ---```
5110 ---
5111 ---* Corresponding C source code: [ltexlib.c#L1160-L1195](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1160-L1195)
5112 ---
5113 ---@param global 'global'
5114 ---@param register integer
5115 ---@param catcodetable integer
5116 ---@param toks string
5117 ---
5118 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5119 function tex.scantoks(global, register, catcodetable, toks) end
5120
5121 ---
5122 ---When no arguments are given the current maximum number of classes is returned.
5123 ---
5124 ---* Corresponding C source code: [ltexlib.c#L1211-L1242](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1211-L1242)
5125 ---
5126 ---@param position? 'top'|'bottom'|'first'|'splitbottom'|'splitfirst' # one of top, bottom, first, splitbottom or splitfirst
5127 ---@param class? integer marks class number.
5128 ---
5129 ---@return integer|string
5130 ---
5131 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5132 function tex.getmark(position, class) end
5133
5134 ---
5135 ---The *TeX*'s character code table `lccode` (lower case code) can be accessed and written to using
5136 ---a virtual subtable of the `tex` table.
5137 ---
5138 ---```lua
5139 ---for i = 0, 1024 do
5140 --- -- Exclude C0 and C1 control codes
5141 --- if i > 31 and not (i >= 127 and i <= 159) then
5142 --- print(i, utf8.char(i), tex.lccode[i], utf8.char(tex.lccode[i]))
5143 --- end
5144 ---end
5145 ---```
5146 ---
5147 ---Output:
5148 ---
5149 ---```
5150 ---...
5151 ---65 A 97 a
5152 ---66 B 98 b
5153 ---67 C 99 c
5154 ---...
5155 ---90 Z 122 z
5156 ---...
5157 ---97 a 97 a
5158 ---98 b 98 b
5159 ---99 c 99 c
5160 ---...
5161 ---122 z 122 z
5162 ---...
5163 ---```
5164 ---
5165 ---__Reference:__
5166 ---
5167 ---* Corresponding C source code: [ltexlib.c#L3708](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3708)
5168 ---* Corresponding plain TeX control sequence: [\lccode](https://www.tug.org/utilities/plain/cseq.html#lccode-rp)
5169 ---
5170 ---@type table<integer, integer>
5171 tex.lccode = {}
5172
5173 ---
5174 ---Set the `lccode` (lower case code) and additionally
5175 ---the associated sibling for a character code at the same time.
5176 ---
5177 ---__Reference:__
5178 ---
5179 ---* Corresponding C source code: [ltexlib.c#L1369-L1397](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1369-L1397)
5180 ---* Corresponding plain TeX control sequence: [\lccode](https://www.tug.org/utilities/plain/cseq.html#lccode-rp)
5181 ---
5182 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5183 ---@param char_code integer # A Unicode code point for which a lowercase variant of the character is to be set, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5184 ---@param lower_case integer # The Unicode code point for the lowercase variant of the character.
5185 ---@param upper_case? integer # The Unicode code point for the uppercase variant of the character.
5186 ---
5187 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5188 function tex.setlccode(global, char_code, lower_case, upper_case) end
5189
5190 ---
5191 ---Set the `lccode` (lower case code) and additionally
5192 ---the associated sibling for a character code at the same time.
5193 ---
5194 ---__Reference:__
5195 ---
5196 ---* Corresponding C source code: [ltexlib.c#L1369-L1397](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1369-L1397)
5197 ---* Corresponding plain TeX control sequence: [\lccode](https://www.tug.org/utilities/plain/cseq.html#lccode-rp)
5198 ---
5199 ---@param char_code integer # A Unicode code point for which a lowercase variant of the character is to be set, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5200 ---@param lower_case integer # The Unicode code point for the lowercase variant of the character.
5201 ---@param upper_case? integer # The Unicode code point for the uppercase variant of the character.
5202 ---
5203 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5204 function tex.setlccode(char_code, lower_case, upper_case) end
5205
5206 ---
5207 ---__Reference:__
5208 ---
5209 ---* Corresponding C source code: [ltexlib.c#L1404-L1410](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1404-L1410)
5210 ---* Corresponding plain TeX control sequence: [\lccode](https://www.tug.org/utilities/plain/cseq.html#lccode-rp)
5211 ---
5212 ---@param char_code integer # A Unicode code point for which a lowercase variant of the character should be returned, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5213 ---
5214 ---@return integer lower_case # The Unicode code point for the lowercase variant of the character.
5215 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5216 function tex.getlccode(char_code) end
5217
5218 ---
5219 ---*TeX*'s character code table `uccode` (upper case code) can be accessed and written to using
5220 ---a virtual subtable of the `tex` table.
5221 ---
5222 ---```lua
5223 ---for i = 0, 1024 do
5224 --- -- Exclude C0 and C1 control codes
5225 --- if i > 31 and not (i >= 127 and i <= 159) then
5226 --- print(i, utf8.char(i), tex.uccode[i], utf8.char(tex.uccode[i]))
5227 --- end
5228 ---end
5229 ---```
5230 ---
5231 ---Output:
5232 ---
5233 ---```
5234 ---...
5235 ---65 A 65 A
5236 ---66 B 66 B
5237 ---67 C 67 C
5238 ---...
5239 ---90 Z 90 Z
5240 ---...
5241 ---97 a 65 A
5242 ---98 b 66 B
5243 ---99 c 67 C
5244 ---...
5245 ---122 z 90 Z
5246 ---...
5247 ---```
5248 ---
5249 ---__Reference:__
5250 ---
5251 ---* Corresponding C source code: [ltexlib.c#L3709](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3709)
5252 ---* Corresponding plain TeX control sequence: [\uccode](https://www.tug.org/utilities/plain/cseq.html#uccode-rp)
5253 ---
5254 ---@type table<integer, integer>
5255 tex.uccode = {}
5256
5257 ---
5258 ---The function call interface for `uccode` (upper case code) additionally
5259 ---allows you to set the associated sibling at the same time.
5260 ---
5261 ---__Reference:__
5262 ---
5263 ---* Corresponding C source code: [ltexlib.c#L1369-L1397](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1369-L1397)
5264 ---* Corresponding plain TeX control sequence: [\uccode](https://www.tug.org/utilities/plain/cseq.html#uccode-rp)
5265 ---
5266 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5267 ---@param char_code integer # A Unicode code point for which a uppercase variant of the character is to be set, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5268 ---@param upper_case integer # The Unicode code point for the uppercase variant of the character.
5269 ---@param lower_case? integer # The Unicode code point for the lowercase variant of the character.
5270 ---
5271 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5272 function tex.setuccode(global, char_code, upper_case, lower_case) end
5273
5274 ---
5275 ---The function call interface for `uccode` (upper case code) additionally
5276 ---allows you to set the associated sibling at the same time.
5277 ---
5278 ---__Reference:__
5279 ---
5280 ---* Corresponding C source code: [ltexlib.c#L1369-L1397](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1369-L1397)
5281 ---* Corresponding plain TeX control sequence: [\uccode](https://www.tug.org/utilities/plain/cseq.html#uccode-rp)
5282 ---
5283 ---@param char_code integer # A Unicode code point for which a uppercase variant of the character is to be set, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5284 ---@param upper_case integer # The Unicode code point for the uppercase variant of the character.
5285 ---@param lower_case? integer # The Unicode code point for the lowercase variant of the character.
5286 ---
5287 ---@see tex.getuccode
5288 ---@see tex.setlccode
5289 ---
5290 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5291 function tex.setuccode(char_code, upper_case, lower_case) end
5292
5293 ---
5294 ---Corresponding plain TeX control sequence: [\uccode](https://www.tug.org/utilities/plain/cseq.html#uccode-rp)
5295 ---
5296 ---__Reference:__
5297 ---
5298 ---* Corresponding C source code: [ltexlib.c#L1417-L1423](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1417-L1423)
5299 ---* Corresponding plain TeX control sequence: [\uccode](https://www.tug.org/utilities/plain/cseq.html#uccode-rp)
5300 ---
5301 ---@param char_code integer # A Unicode code point for which a uppercase variant of the character should be returned, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5302 ---
5303 ---@return integer upper_case # The Unicode code point for the uppercase variant of the character.
5304 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5305 function tex.getuccode(char_code) end
5306
5307 ---
5308 ---Each character in a font has a space factor code that is an integer
5309 ---between `0` and `32767`. The code is used to adjust the space factor
5310 ---in a horizontal list. The uppercase letters `A-Z` have space factor
5311 ---code `999`. Most other characters have code `1000` [Donald E. Knuth, The TeXbook, page 76]. However,
5312 ---Plain TeX makes `)', `'', and `]' have space factor code `0`.
5313 ---Also, the `\frenchspacing` and `\nonfrenchspacing` modes in Plain
5314 ---TeX work by changing the `\sfcode` for: `.`, `?`, `!`, `:`, `;`,
5315 ---and `,` [Donald E. Knuth, The TeXbook, 351].
5316 ---
5317 ---*TeX*'s character code table `sfcode` (space factor code) can be
5318 ---accessed and written to using a virtual subtable of the `tex` table.
5319 ---
5320 ---```lua
5321 ---for i = 0, 1024 do
5322 --- -- Exclude C0 and C1 control codes
5323 --- if i > 31 and not (i >= 127 and i <= 159) then
5324 --- print(i, utf8.char(i), tex.sfcode[i])
5325 --- end
5326 ---end
5327 ---```
5328 ---
5329 ---Output:
5330 ---
5331 ---```
5332 ---32 1000
5333 ---33 ! 3000
5334 ---34 " 1000
5335 ---35 # 1000
5336 ---36 $ 1000
5337 ---37 % 1000
5338 ---38 & 1000
5339 ---39 ' 0
5340 ---40 ( 1000
5341 ---41 ) 0
5342 ---42 * 1000
5343 ---43 + 1000
5344 ---44 , 1250
5345 ---45 - 1000
5346 ---46 . 3000
5347 ---47 / 1000
5348 ---48 0 1000
5349 ---49 1 1000
5350 ---50 2 1000
5351 ---51 3 1000
5352 ---52 4 1000
5353 ---53 5 1000
5354 ---54 6 1000
5355 ---55 7 1000
5356 ---56 8 1000
5357 ---57 9 1000
5358 ---58 : 2000
5359 ---59 ; 1500
5360 ---60 < 1000
5361 ---61 = 1000
5362 ---62 > 1000
5363 ---63 ? 3000
5364 ---64 @ 1000
5365 ---65 A 999
5366 ---...
5367 ---```
5368 ---
5369 ---__Reference:__
5370 ---
5371 ---* Corresponding C source code: [ltexlib.c#L3707](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3707)
5372 ---* Corresponding plain TeX control sequence: [\sfcode](https://www.tug.org/utilities/plain/cseq.html#sfcode-rp)
5373 ---
5374 ---@type table<integer, integer>
5375 tex.sfcode = {}
5376
5377 ---
5378 ---Set the space factor code for a character globally.
5379 ---
5380 ---__Reference:__
5381 ---
5382 ---* Corresponding C source code: [ltexlib.c#L1425-L1428](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1425-L1428)
5383 ---* Corresponding plain TeX control sequence: [\sfcode](https://www.tug.org/utilities/plain/cseq.html#sfcode-rp)
5384 ---
5385 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5386 ---@param char_code integer # A Unicode code point, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5387 ---@param space_factor integer # The code (between `0` and `32767`) to adjust the space factor in a horizontal list. The uppercase letters `A-Z` have space factor code `999`. Most other characters have code `1000`.
5388 ---
5389 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5390 function tex.setsfcode(global, char_code, space_factor) end
5391
5392 ---
5393 ---Set the space factor code for a character.
5394 ---
5395 ---__Reference:__
5396 ---
5397 ---* Corresponding C source code: [ltexlib.c#L1425-L1428](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1425-L1428)
5398 ---* Corresponding plain TeX control sequence: [\sfcode](https://www.tug.org/utilities/plain/cseq.html#sfcode-rp)
5399 ---
5400 ---@param char_code integer # A Unicode code point, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5401 ---@param space_factor integer # The code (between `0` and `32767`) to adjust the space factor in a horizontal list. The uppercase letters `A-Z` have space factor code `999`. Most other characters have code `1000`.
5402 ---
5403 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5404 function tex.setsfcode(char_code, space_factor) end
5405
5406 ---
5407 ---Get the space factor code of a character.
5408 ---
5409 ---__Reference:__
5410 ---
5411 ---* Corresponding C source code: [ltexlib.c#L1430-L1436](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1430-L1436)
5412 ---* Corresponding plain TeX control sequence: [\sfcode](https://www.tug.org/utilities/plain/cseq.html#sfcode-rp)
5413 ---
5414 ---@param char_code integer # A Unicode code point, for example `65` stands for an uppercase `A` and `97` for a lowercase `a`.
5415 ---
5416 ---@return integer space_factor # The code (between `0` and `32767`) to adjust the space factor in a horizontal list. The uppercase letters `A-Z` have space factor code `999`. Most other characters have code `1000`.
5417 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5418 function tex.getsfcode(char_code) end
5419
5420 ---
5421 ---A virtual subtable of the `tex` table called `catcode` (category code) can be used to access and write to TeX's character code table.
5422 ---
5423 ---The category codes are indexed by the character code.
5424 ---
5425 ---```lua
5426 ---for i=33,126 do
5427 --- print(i, utf8.char(i), tex.catcode[i])
5428 ---end
5429 ---```
5430 ---
5431 ---## Output:
5432 ---
5433 ---```
5434 ---33 ! 12
5435 ---34 " 12
5436 ---35 # 6
5437 ---36 $ 3
5438 ---37 % 14
5439 ---38 & 4
5440 ---39 ' 12
5441 ---40 ( 12
5442 ---41 ) 12
5443 ---42 * 12
5444 ---43 + 12
5445 ---44 , 12
5446 ---45 - 12
5447 ---46 . 12
5448 ---47 / 12
5449 ---48 0 12
5450 ---49 1 12
5451 ---50 2 12
5452 ---51 3 12
5453 ---52 4 12
5454 ---53 5 12
5455 ---54 6 12
5456 ---55 7 12
5457 ---56 8 12
5458 ---57 9 12
5459 ---58 : 12
5460 ---59 ; 12
5461 ---60 < 12
5462 ---61 = 12
5463 ---62 > 12
5464 ---63 ? 12
5465 ---64 @ 12
5466 ---65 A 11
5467 ---66 B 11
5468 ---67 C 11
5469 ---68 D 11
5470 ---69 E 11
5471 ---70 F 11
5472 ---71 G 11
5473 ---72 H 11
5474 ---73 I 11
5475 ---74 J 11
5476 ---75 K 11
5477 ---76 L 11
5478 ---77 M 11
5479 ---78 N 11
5480 ---79 O 11
5481 ---80 P 11
5482 ---81 Q 11
5483 ---82 R 11
5484 ---83 S 11
5485 ---84 T 11
5486 ---85 U 11
5487 ---86 V 11
5488 ---87 W 11
5489 ---88 X 11
5490 ---89 Y 11
5491 ---90 Z 11
5492 ---91 [ 12
5493 ---92 \ 0
5494 ---93 ] 12
5495 ---94 ^ 7
5496 ---95 _ 8
5497 ---96 ` 12
5498 ---97 a 11
5499 ---98 b 11
5500 ---99 c 11
5501 ---100 d 11
5502 ---101 e 11
5503 ---102 f 11
5504 ---103 g 11
5505 ---104 h 11
5506 ---105 i 11
5507 ---106 j 11
5508 ---107 k 11
5509 ---108 l 11
5510 ---109 m 11
5511 ---110 n 11
5512 ---111 o 11
5513 ---112 p 11
5514 ---113 q 11
5515 ---114 r 11
5516 ---115 s 11
5517 ---116 t 11
5518 ---117 u 11
5519 ---118 v 11
5520 ---119 w 11
5521 ---120 x 11
5522 ---121 y 11
5523 ---122 z 11
5524 ---123 { 1
5525 ---124 | 12
5526 ---125 } 2
5527 ---126 ~ 13
5528 ---```
5529 ---
5530 ---## Category codes:
5531 ---
5532 ---* `0`: Escape character, normally `\`
5533 ---* `1`: Begin grouping, normally `{`
5534 ---* `2`: End grouping, normally `}`
5535 ---* `3`: Math shift, normally `$`
5536 ---* `4`: Alignment tab, normally `&`
5537 ---* `5`: End of line, normally `<return>`
5538 ---* `6`: Parameter, normally `#`
5539 ---* `7`: Superscript, normally `^`
5540 ---* `8`: Subscript, normally `_`
5541 ---* `9`: Ignored character, normally `<null>`
5542 ---* `10`: Space, normally `<space>` and `<tab>`
5543 ---* `11`: Letter, normally only contains the letters `a,...,z` and `A,...,Z`. These characters can be used in command names
5544 ---* `12`: Other, normally everything else not listed in the other categories
5545 ---* `13`: Active character, for example `~`
5546 ---* `14`: Comment character, normally `%`
5547 ---* `15`: Invalid character, normally `<delete>`
5548 ---
5549 ---* Corresponding C source code: [ltexlib.c#L3710](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3710)
5550 ---
5551 ---@type table<integer, integer>
5552 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5553 tex.catcode = {}
5554
5555 ---
5556 ---Specify a
5557 ---category table to use on assignment or on query (default in both cases is the
5558 ---current one).
5559 ---
5560 ---* Corresponding C source code: [ltexlib.c#L1438-L1464](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1438-L1464)
5561 ---
5562 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5563 ---@param char_code integer # The character code, for example ASCII or UNICODE character code.
5564 ---@param cat_code integer # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
5565 ---
5566 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5567 function tex.setcatcode(global, char_code, cat_code) end
5568
5569 ---
5570 ---Specify a
5571 ---category table to use on assignment or on query (default in both cases is the
5572 ---current one).
5573 ---
5574 ---## Category codes:
5575 ---
5576 ---* `0`: Escape character, normally `\`
5577 ---* `1`: Begin grouping, normally `{`
5578 ---* `2`: End grouping, normally `}`
5579 ---* `3`: Math shift, normally `$`
5580 ---* `4`: Alignment tab, normally `&`
5581 ---* `5`: End of line, normally `<return>`
5582 ---* `6`: Parameter, normally `#`
5583 ---* `7`: Superscript, normally `^`
5584 ---* `8`: Subscript, normally `_`
5585 ---* `9`: Ignored character, normally `<null>`
5586 ---* `10`: Space, normally `<space>` and `<tab>`
5587 ---* `11`: Letter, normally only contains the letters `a,...,z` and `A,...,Z`. These characters can be used in command names
5588 ---* `12`: Other, normally everything else not listed in the other categories
5589 ---* `13`: Active character, for example `~`
5590 ---* `14`: Comment character, normally `%`
5591 ---* `15`: Invalid character, normally `<delete>`
5592 ---
5593 ---__Reference:__
5594 ---
5595 ---* Corresponding C source code: [ltexlib.c#L1438-L1464](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1438-L1464)
5596 ---
5597 ---@param char_code integer # The character code, for example ASCII or UNICODE character code.
5598 ---@param cat_code integer # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
5599 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5600 function tex.setcatcode(char_code, cat_code) end
5601
5602 ---
5603 ---Specify a
5604 ---category table to use on assignment or on query (default in both cases is the
5605 ---current one).
5606 ---
5607 ---## Category codes:
5608 ---
5609 ---* `0`: Escape character, normally `\`
5610 ---* `1`: Begin grouping, normally `{`
5611 ---* `2`: End grouping, normally `}`
5612 ---* `3`: Math shift, normally `$`
5613 ---* `4`: Alignment tab, normally `&`
5614 ---* `5`: End of line, normally `<return>`
5615 ---* `6`: Parameter, normally `#`
5616 ---* `7`: Superscript, normally `^`
5617 ---* `8`: Subscript, normally `_`
5618 ---* `9`: Ignored character, normally `<null>`
5619 ---* `10`: Space, normally `<space>` and `<tab>`
5620 ---* `11`: Letter, normally only contains the letters `a,...,z` and `A,...,Z`. These characters can be used in command names
5621 ---* `12`: Other, normally everything else not listed in the other categories
5622 ---* `13`: Active character, for example `~`
5623 ---* `14`: Comment character, normally `%`
5624 ---* `15`: Invalid character, normally `<delete>`
5625 ---
5626 ---__Reference:__
5627 ---
5628 ---* Corresponding C source code: [ltexlib.c#L1438-L1464](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1438-L1464)
5629 ---
5630 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
5631 ---@param cat_table integer
5632 ---@param char_code integer # The character code, for example ASCII or UNICODE character code.
5633 ---@param cat_code integer # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
5634 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5635 function tex.setcatcode(global, cat_table, char_code, cat_code) end
5636
5637 ---
5638 ---Specify a
5639 ---category table to use on assignment or on query (default in both cases is the
5640 ---current one).
5641 ---
5642 ---## Category codes:
5643 ---
5644 ---* `0`: Escape character, normally `\`
5645 ---* `1`: Begin grouping, normally `{`
5646 ---* `2`: End grouping, normally `}`
5647 ---* `3`: Math shift, normally `$`
5648 ---* `4`: Alignment tab, normally `&`
5649 ---* `5`: End of line, normally `<return>`
5650 ---* `6`: Parameter, normally `#`
5651 ---* `7`: Superscript, normally `^`
5652 ---* `8`: Subscript, normally `_`
5653 ---* `9`: Ignored character, normally `<null>`
5654 ---* `10`: Space, normally `<space>` and `<tab>`
5655 ---* `11`: Letter, normally only contains the letters `a,...,z` and `A,...,Z`. These characters can be used in command names
5656 ---* `12`: Other, normally everything else not listed in the other categories
5657 ---* `13`: Active character, for example `~`
5658 ---* `14`: Comment character, normally `%`
5659 ---* `15`: Invalid character, normally `<delete>`
5660 ---
5661 ---__Reference:__
5662 ---
5663 ---* Corresponding C source code: [ltexlib.c#L1438-L1464](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1438-L1464)
5664 ---
5665 ---@param cat_table integer
5666 ---@param char_code integer # The character code, for example ASCII or UNICODE character code.
5667 ---@param cat_code integer # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
5668 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5669 function tex.setcatcode(global, cat_table, char_code, cat_code) end
5670
5671 ---
5672 ---The function call interface for `catcode` (category code) also allows you to specify a
5673 ---category table to use on assignment or on query (default in both cases is the
5674 ---current one):
5675 ---
5676 ---## Category codes:
5677 ---
5678 ---* `0`: Escape character, normally `\`
5679 ---* `1`: Begin grouping, normally `{`
5680 ---* `2`: End grouping, normally `}`
5681 ---* `3`: Math shift, normally `$`
5682 ---* `4`: Alignment tab, normally `&`
5683 ---* `5`: End of line, normally `<return>`
5684 ---* `6`: Parameter, normally `#`
5685 ---* `7`: Superscript, normally `^`
5686 ---* `8`: Subscript, normally `_`
5687 ---* `9`: Ignored character, normally `<null>`
5688 ---* `10`: Space, normally `<space>` and `<tab>`
5689 ---* `11`: Letter, normally only contains the letters `a,...,z` and `A,...,Z`. These characters can be used in command names
5690 ---* `12`: Other, normally everything else not listed in the other categories
5691 ---* `13`: Active character, for example `~`
5692 ---* `14`: Comment character, normally `%`
5693 ---* `15`: Invalid character, normally `<delete>`
5694 ---
5695 ---@param cat_table integer
5696 ---@param char_code integer # The character code, for example ASCII or UNICODE character code.
5697 ---
5698 ---@return integer cat_code # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
5699 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5700 function tex.getcatcode(cat_table, char_code) end
5701
5702 ---
5703 ---The *TeX*'s character code table `mathcode` can be accessed and written to using
5704 ---a virtual subtable of the `tex` table.
5705 ---
5706 ---```lua
5707 ---for i = 1, 128 do
5708 --- local mathcode = tex.mathcode[i]
5709 --- print(i, utf8.char(i), mathcode[1], mathcode[2], mathcode[3])
5710 ---end
5711 ---```
5712 ---
5713 ---__Output:__
5714 ---
5715 ---```
5716 ---1 3 2 35
5717 ---2 0 1 11
5718 ---3 0 1 12
5719 ---4 2 2 94
5720 ---5 0 2 58
5721 ---6 3 2 50
5722 ---7 0 1 25
5723 ---8 0 1 21
5724 ---9 0 1 13
5725 ---10 0 1 14
5726 ---11 3 2 34
5727 ---12 2 2 6
5728 ---1 2 2 8
5729 ---14 0 2 49
5730 ---15 0 1 64
5731 ---16 3 2 26
5732 ---17 3 2 27
5733 ---18 2 2 92
5734 ---19 2 2 91
5735 ---20 0 2 56
5736 ---21 0 2 57
5737 ---22 2 2 10
5738 ---23 3 2 36
5739 ---24 3 2 32
5740 ---25 3 2 33
5741 ---26 � 8 0 0
5742 ---27 2 5
5743 ---28 3 2 20
5744 ---29 3 2 21
5745 ---30 3 2 17
5746 ---31 2 2 95
5747 ---32 8 0 0
5748 ---33 ! 5 0 33
5749 ---34 " 0 0 34
5750 ---35 # 0 0 35
5751 ---36 $ 0 0 36
5752 ---37 % 0 0 37
5753 ---38 & 0 0 38
5754 ---39 ' 8 0 0
5755 ---40 ( 4 0 40
5756 ---41 ) 5 0 41
5757 ---42 * 2 2 3
5758 ---43 + 2 0 43
5759 ---44 , 6 1 59
5760 ---45 - 2 2 0
5761 ---46 . 0 1 58
5762 ---47 / 0 1 61
5763 ---48 0 7 0 48
5764 ---49 1 7 0 49
5765 ---50 2 7 0 50
5766 ---51 3 7 0 51
5767 ---52 4 7 0 52
5768 ---53 5 7 0 53
5769 ---54 6 7 0 54
5770 ---55 7 7 0 55
5771 ---56 8 7 0 56
5772 ---57 9 7 0 57
5773 ---58 : 3 0 58
5774 ---59 ; 6 0 59
5775 ---60 < 3 1 60
5776 ---61 = 3 0 61
5777 ---62 > 3 1 62
5778 ---63 ? 5 0 63
5779 ---64 @ 0 0 64
5780 ---65 A 7 1 65
5781 ---66 B 7 1 66
5782 ---67 C 7 1 67
5783 ---68 D 7 1 68
5784 ---69 E 7 1 69
5785 ---70 F 7 1 70
5786 ---71 G 7 1 71
5787 ---72 H 7 1 72
5788 ---73 I 7 1 73
5789 ---74 J 7 1 74
5790 ---75 K 7 1 75
5791 ---76 L 7 1 76
5792 ---77 M 7 1 77
5793 ---78 N 7 1 78
5794 ---79 O 7 1 79
5795 ---80 P 7 1 80
5796 ---81 Q 7 1 81
5797 ---82 R 7 1 82
5798 ---83 S 7 1 83
5799 ---84 T 7 1 84
5800 ---85 U 7 1 85
5801 ---86 V 7 1 86
5802 ---87 W 7 1 87
5803 ---88 X 7 1 88
5804 ---89 Y 7 1 89
5805 ---90 Z 7 1 90
5806 ---91 [ 4 0 91
5807 ---92 \ 0 2 110
5808 ---93 ] 5 0 93
5809 ---94 ^ 0 0 94
5810 ---95 _ 8 0 0
5811 ---96 ` 0 0 96
5812 ---97 a 7 1 97
5813 ---98 b 7 1 98
5814 ---99 c 7 1 99
5815 ---100 d 7 1 100
5816 ---101 e 7 1 101
5817 ---102 f 7 1 102
5818 ---103 g 7 1 103
5819 ---104 h 7 1 104
5820 ---105 i 7 1 105
5821 ---106 j 7 1 106
5822 ---107 k 7 1 107
5823 ---108 l 7 1 108
5824 ---109 m 7 1 109
5825 ---110 n 7 1 110
5826 ---111 o 7 1 111
5827 ---112 p 7 1 112
5828 ---113 q 7 1 113
5829 ---114 r 7 1 114
5830 ---115 s 7 1 115
5831 ---116 t 7 1 116
5832 ---117 u 7 1 117
5833 ---118 v 7 1 118
5834 ---119 w 7 1 119
5835 ---120 x 7 1 120
5836 ---121 y 7 1 121
5837 ---122 z 7 1 122
5838 ---123 { 4 2 102
5839 ---124 | 0 2 106
5840 ---125 } 5 2 103
5841 ---126 ~ 0 0 126
5842 ---127 1 2 115
5843 ---128 0 0 128
5844 ---```
5845 ---
5846 ---In math mode, the math atoms require more structure. Each symbol
5847 ---originates from a different font and receives different spacing
5848 ---based on its class (operator, binary infix, relation, etc.).
5849 ---Following the typical style of the 1970s, these properties are
5850 ---compactly packed into bit fields within a single integer called a
5851 ---mathcode. The mathcode is usually expressed in hexadecimal so
5852 ---that the fields can easily be pulled apart. The mathcode of `+` in
5853 ---plain TeX is set as:
5854 ---
5855 ---```tex
5856 ---\mathcode`\+="202B
5857 ---```
5858 ---
5859 ---This means it is class 2 (binary infix) and fam0 (the Roman font).
5860 ---The character hex is `2B`, which is the decimal `43`, the character
5861 ---code for `+` in the Roman font encoding.
5862 ---
5863 ---The `mathcode` section in the
5864 ---[plain.tex](https://mirrors.ctan.org/macros/plain/base/plain.tex)
5865 ---format file:
5866 ---
5867 ---```tex
5868 ---\mathcode`\^^?="1273 % \smallint
5869 ---% INITEX sets up \mathcode x=x, for x=0..255, except that
5870 ---% \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
5871 ---% \mathcode x=x+"7000, for x = `0 to `9.
5872 ---% The following changes define internal codes as recommended
5873 ---% in Appendix C of The TeXbook:
5874 ---\mathcode`\^^@="2201 % \cdot
5875 ---\mathcode`\^^A="3223 % \downarrow
5876 ---\mathcode`\^^B="010B % \alpha
5877 ---\mathcode`\^^C="010C % \beta
5878 ---\mathcode`\^^D="225E % \land
5879 ---\mathcode`\^^E="023A % \lnot
5880 ---\mathcode`\^^F="3232 % \in
5881 ---\mathcode`\^^G="0119 % \pi
5882 ---\mathcode`\^^H="0115 % \lambda
5883 ---\mathcode`\^^I="010D % \gamma
5884 ---\mathcode`\^^J="010E % \delta
5885 ---\mathcode`\^^K="3222 % \uparrow
5886 ---\mathcode`\^^L="2206 % \pm
5887 ---\mathcode`\^^M="2208 % \oplus
5888 ---\mathcode`\^^N="0231 % \infty
5889 ---\mathcode`\^^O="0140 % \partial
5890 ---\mathcode`\^^P="321A % \subset
5891 ---\mathcode`\^^Q="321B % \supset
5892 ---\mathcode`\^^R="225C % \cap
5893 ---\mathcode`\^^S="225B % \cup
5894 ---\mathcode`\^^T="0238 % \forall
5895 ---\mathcode`\^^U="0239 % \exists
5896 ---\mathcode`\^^V="220A % \otimes
5897 ---\mathcode`\^^W="3224 % \leftrightarrow
5898 ---\mathcode`\^^X="3220 % \leftarrow
5899 ---\mathcode`\^^Y="3221 % \rightarrow
5900 ---\mathcode`\^^Z="8000 % \ne
5901 ---\mathcode`\^^[="2205 % \diamond
5902 ---\mathcode`\^^\="3214 % \le
5903 ---\mathcode`\^^]="3215 % \ge
5904 ---\mathcode`\^^^="3211 % \equiv
5905 ---\mathcode`\^^_="225F % \lor
5906 ---\mathcode`\ ="8000 % \space
5907 ---\mathcode`\!="5021
5908 ---\mathcode`\'="8000 % ^\prime
5909 ---\mathcode`\(="4028
5910 ---\mathcode`\)="5029
5911 ---\mathcode`\*="2203 % \ast
5912 ---\mathcode`\+="202B
5913 ---\mathcode`\,="613B
5914 ---\mathcode`\-="2200
5915 ---\mathcode`\.="013A
5916 ---\mathcode`\/="013D
5917 ---\mathcode`\:="303A
5918 ---\mathcode`\;="603B
5919 ---\mathcode`\<="313C
5920 ---\mathcode`\=="303D
5921 ---\mathcode`\>="313E
5922 ---\mathcode`\?="503F
5923 ---\mathcode`\[="405B
5924 ---\mathcode`\\="026E % \backslash
5925 ---\mathcode`\]="505D
5926 ---\mathcode`\_="8000 % \_
5927 ---\mathcode`\{="4266
5928 ---\mathcode`\|="026A
5929 ---\mathcode`\}="5267
5930 ---```
5931 ---
5932 ---__Reference:__
5933 ---
5934 ---* Corresponding C source code: [ltexlib.c#L3711](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3711)
5935 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
5936 ---* [tex.stackexchange.com](https://tex.stackexchange.com/a/109440)
5937 ---
5938 ---@type table<integer, MathCode>
5939 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
5940 tex.mathcode = {}
5941
5942 ---
5943 ---The table for `mathcode` is an array of 3 integers, like this:
5944 ---
5945 ---```lua
5946 ---{
5947 --- -- class
5948 --- -- family
5949 --- -- character
5950 ---}
5951 ---```
5952 ---
5953 ---@alias MathCode integer[]
5954
5955 ---
5956 ---__class__:
5957 ---
5958 ---| Class | Meaning | Example |
5959 ---|-------|------------------|---------|
5960 ---| 0 | Ordinary | `/` |
5961 ---| 1 | Large operator | `\sum` |
5962 ---| 2 | Binary operation | `+` |
5963 ---| 3 | Relation | `=` |
5964 ---| 4 | Opening | `(` |
5965 ---| 5 | Closing | `)` |
5966 ---| 6 | Punctuation | `,` |
5967 ---| 7 | Variable family | `x` |
5968 ---
5969 ---__family__:
5970 ---
5971 ---```tex
5972 ---% Family 0 (Roman)
5973 ---\font\tenrm=mdbchr7t at10pt
5974 ---\font\sevenrm=mdbchr7t at7pt
5975 ---\font\fiverm=mdbchr7t at5pt
5976 ---\textfont0=\tenrm
5977 ---\scriptfont0=\sevenrm
5978 ---27
5979 ---\scriptscriptfont0=\fiverm
5980 ---\def\rm{\fam=0 \tenrm}
5981 ---%
5982 ---% Family 1 (Math italic)
5983 ---\font\teni=mdbchri7m at10pt
5984 ---\font\seveni=mdbchri7m at7pt
5985 ---\font\fivei=mdbchri7m at5pt
5986 ---\textfont1=\teni
5987 ---\scriptfont1=\seveni
5988 ---\scriptscriptfont1=\fivei
5989 ---\def\mit{\fam=1}
5990 ---%
5991 ---% Family 2 (Math symbols)
5992 ---\font\tensy=md-chr7y at10pt
5993 ---\font\sevensy=md-chr7y at7pt
5994 ---\font\fivesy=md-chr7y at5pt
5995 ---\textfont2=\tensy
5996 ---\scriptfont2=\
5997 ---% Family 3 (Math extension)
5998 ---\font\tenex=mdbchr7v at10pt
5999 ---\font\sevenex=mdbchr7v at7pt
6000 ---\font\fiveex=mdbchr7v at5pt
6001 ---\textfont3=\tenex
6002 ---\scriptfont3=\sevenex
6003 ---\scriptscriptfont3=\fiveex
6004 ---%
6005 ---% Family 4 (Italic text)
6006 ---\font\tenit=mdbchri7t at10pt
6007 ---\font\sevenit=mdbchri7t at7pt
6008 ---\font\fiveit=mdbchri7t at5pt
6009 ---\textfont\itfam=\tenit
6010 ---\scriptfont\itfam=\sevenit
6011 ---\scriptscriptfont\itfam=\fiveit
6012 ---\def\it{\fam=\itfam \tenit}
6013 ---%
6014 ---% Family 5 (Slanted text)
6015 ---\font\tensl=mdbchro7t at10pt
6016 ---\font\sevensl=mdbchro7t at7pt
6017 ---\font\fivesl=mdbchro7t at5pt
6018 ---\textfont\slfam=\tensl
6019 ---\scriptfont\slfam=\sevensl
6020 ---\scriptscriptfont\slfam=\fivesl
6021 ---\def\sl{\fam=\slfam \tensl}
6022 ---%
6023 ---% Family 6 (Bold text)
6024 ---\font\tenbf=mdbchb7t at10pt
6025 ---\font\sevenbf=mdbchb7t at7pt
6026 ---\font\fivebf=mdbchb7t at5pt
6027 ---\textfont\bffam=\tenbf
6028 ---\scriptfont\bffam=\sevenbf
6029 ---\scriptscriptfont\bffam=\fivebf
6030 ---\def\bf{\fam=\bffam \tenbf}
6031 ---%
6032 ---% Family 7 (Typewriter)
6033 ---\font\tentt=cmtt10---%
6034 ---\rm
6035 ---% Sets normal roman font
6036 ---\font\seventt=cmtt10 at7pt
6037 ---\font\fivett=cmtt10 at5pt
6038 ---\textfont\ttfam=\tentt
6039 ---\scriptfont\ttfam=\seventt
6040 ---\scriptscriptfont\ttfam=\fivett
6041 ---\def\tt{\fam=\ttfam \tentt}
6042 ---```sevensy
6043 ---\scriptscriptfont2=\fivesy
6044 ---\def\cal{\fam=2}
6045 ---%
6046 ---% Family 3 (Math extension)
6047 ---\font\tenex=mdbchr7v at10pt
6048 ---\font\sevenex=mdbchr7v at7pt
6049 ---\font\fiveex=mdbchr7v at5pt
6050 ---\textfont3=\tenex
6051 ---\scriptfont3=\sevenex
6052 ---\scriptscriptfont3=\fiveex
6053 ---%
6054 ---% Family 4 (Italic text)
6055 ---\font\tenit=mdbchri7t at10pt
6056 ---\font\sevenit=mdbchri7t at7pt
6057 ---\font\fiveit=mdbchri7t at5pt
6058 ---\textfont\itfam=\tenit
6059 ---\scriptfont\itfam=\sevenit
6060 ---\scriptscriptfont\itfam=\fiveit
6061 ---\def\it{\fam=\itfam \tenit}
6062 ---%
6063 ---% Family 5 (Slanted text)
6064 ---\font\tensl=mdbchro7t at10pt
6065 ---\font\sevensl=mdbchro7t at7pt
6066 ---\font\fivesl=mdbchro7t at5pt
6067 ---\textfont\slfam=\tensl
6068 ---\scriptfont\slfam=\sevensl
6069 ---\scriptscriptfont\slfam=\fivesl
6070 ---\def\sl{\fam=\slfam \tensl}
6071 ---%
6072 ---% Family 6 (Bold text)
6073 ---\font\tenbf=mdbchb7t at10pt
6074 ---\font\sevenbf=mdbchb7t at7pt
6075 ---\font\fivebf=mdbchb7t at5pt
6076 ---\textfont\bffam=\tenbf
6077 ---\scriptfont\bffam=\sevenbf
6078 ---\scriptscriptfont\bffam=\fivebf
6079 ---\def\bf{\fam=\bffam \tenbf}
6080 ---%
6081 ---% Family 7 (Typewriter)
6082 ---\font\tentt=cmtt10---%
6083 ---\rm
6084 ---% Sets normal roman font
6085 ---\font\seventt=cmtt10 at7pt
6086 ---\font\fivett=cmtt10 at5pt
6087 ---\textfont\ttfam=\tentt
6088 ---\scriptfont\ttfam=\seventt
6089 ---\scriptscriptfont\ttfam=\fivett
6090 ---\def\tt{\fam=\ttfam \tentt}
6091 ---```
6092 ---
6093 ---__Reference:__
6094 ---
6095 ---* Corresponding C source code: [ltexlib.c#L1524-1561](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1524-1561)
6096 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
6097 ---* Donald E. Knuth: The TeXbook, Page 154
6098 ---* TUGboat, Volume 31 (2010), No. 1, Mathematical typefaces in TEX documents, Amit Raj Dhawan
6099 ---
6100 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
6101 ---@param char_code integer # The ASCII or UNICODE charcater code point.
6102 ---@param class integer # The class to which a math character belongs (`0`: Ordinary, `1`: Large operator, `2`: Binary operation, `3`: Relation, `4`: Opening, `5`: Closing, `6`: Punctuation, `7`: Variable family).
6103 ---@param family integer # TeX uses fonts from one or more of the sixteen font families to typeset mathematical characters. Each font family consists of three fonts — textfont, scriptfont, and scriptscriptfont. (`0`: Roman, `1`: Math italic, `2`: Math symbol, `3`: Math extension, `4`: Italic text, `5`: Slanted text, `6`: Bold text, `7`: Typewriter)
6104 ---@param character integer # The character position
6105 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6106 function tex.setmathcode(global, char_code, class, family, character) end
6107
6108 ---
6109 ---__class__:
6110 ---
6111 ---| Class | Meaning | Example |
6112 ---|-------|------------------|---------|
6113 ---| 0 | Ordinary | `/` |
6114 ---| 1 | Large operator | `\sum` |
6115 ---| 2 | Binary operation | `+` |
6116 ---| 3 | Relation | `=` |
6117 ---| 4 | Opening | `(` |
6118 ---| 5 | Closing | `)` |
6119 ---| 6 | Punctuation | `,` |
6120 ---| 7 | Variable family | `x` |
6121 ---
6122 ---__family__:
6123 ---
6124 ---```tex
6125 ---% Family 0 (Roman)
6126 ---\font\tenrm=mdbchr7t at10pt
6127 ---\font\sevenrm=mdbchr7t at7pt
6128 ---\font\fiverm=mdbchr7t at5pt
6129 ---\textfont0=\tenrm
6130 ---\scriptfont0=\sevenrm
6131 ---27
6132 ---\scriptscriptfont0=\fiverm
6133 ---\def\rm{\fam=0 \tenrm}
6134 ---%
6135 ---% Family 1 (Math italic)
6136 ---\font\teni=mdbchri7m at10pt
6137 ---\font\seveni=mdbchri7m at7pt
6138 ---\font\fivei=mdbchri7m at5pt
6139 ---\textfont1=\teni
6140 ---\scriptfont1=\seveni
6141 ---\scriptscriptfont1=\fivei
6142 ---\def\mit{\fam=1}
6143 ---%
6144 ---% Family 2 (Math symbols)
6145 ---\font\tensy=md-chr7y at10pt
6146 ---\font\sevensy=md-chr7y at7pt
6147 ---\font\fivesy=md-chr7y at5pt
6148 ---\textfont2=\tensy
6149 ---\scriptfont2=\
6150 ---% Family 3 (Math extension)
6151 ---\font\tenex=mdbchr7v at10pt
6152 ---\font\sevenex=mdbchr7v at7pt
6153 ---\font\fiveex=mdbchr7v at5pt
6154 ---\textfont3=\tenex
6155 ---\scriptfont3=\sevenex
6156 ---\scriptscriptfont3=\fiveex
6157 ---%
6158 ---% Family 4 (Italic text)
6159 ---\font\tenit=mdbchri7t at10pt
6160 ---\font\sevenit=mdbchri7t at7pt
6161 ---\font\fiveit=mdbchri7t at5pt
6162 ---\textfont\itfam=\tenit
6163 ---\scriptfont\itfam=\sevenit
6164 ---\scriptscriptfont\itfam=\fiveit
6165 ---\def\it{\fam=\itfam \tenit}
6166 ---%
6167 ---% Family 5 (Slanted text)
6168 ---\font\tensl=mdbchro7t at10pt
6169 ---\font\sevensl=mdbchro7t at7pt
6170 ---\font\fivesl=mdbchro7t at5pt
6171 ---\textfont\slfam=\tensl
6172 ---\scriptfont\slfam=\sevensl
6173 ---\scriptscriptfont\slfam=\fivesl
6174 ---\def\sl{\fam=\slfam \tensl}
6175 ---%
6176 ---% Family 6 (Bold text)
6177 ---\font\tenbf=mdbchb7t at10pt
6178 ---\font\sevenbf=mdbchb7t at7pt
6179 ---\font\fivebf=mdbchb7t at5pt
6180 ---\textfont\bffam=\tenbf
6181 ---\scriptfont\bffam=\sevenbf
6182 ---\scriptscriptfont\bffam=\fivebf
6183 ---\def\bf{\fam=\bffam \tenbf}
6184 ---%
6185 ---% Family 7 (Typewriter)
6186 ---\font\tentt=cmtt10---%
6187 ---\rm
6188 ---% Sets normal roman font
6189 ---\font\seventt=cmtt10 at7pt
6190 ---\font\fivett=cmtt10 at5pt
6191 ---\textfont\ttfam=\tentt
6192 ---\scriptfont\ttfam=\seventt
6193 ---\scriptscriptfont\ttfam=\fivett
6194 ---\def\tt{\fam=\ttfam \tentt}
6195 ---```sevensy
6196 ---\scriptscriptfont2=\fivesy
6197 ---\def\cal{\fam=2}
6198 ---%
6199 ---% Family 3 (Math extension)
6200 ---\font\tenex=mdbchr7v at10pt
6201 ---\font\sevenex=mdbchr7v at7pt
6202 ---\font\fiveex=mdbchr7v at5pt
6203 ---\textfont3=\tenex
6204 ---\scriptfont3=\sevenex
6205 ---\scriptscriptfont3=\fiveex
6206 ---%
6207 ---% Family 4 (Italic text)
6208 ---\font\tenit=mdbchri7t at10pt
6209 ---\font\sevenit=mdbchri7t at7pt
6210 ---\font\fiveit=mdbchri7t at5pt
6211 ---\textfont\itfam=\tenit
6212 ---\scriptfont\itfam=\sevenit
6213 ---\scriptscriptfont\itfam=\fiveit
6214 ---\def\it{\fam=\itfam \tenit}
6215 ---%
6216 ---% Family 5 (Slanted text)
6217 ---\font\tensl=mdbchro7t at10pt
6218 ---\font\sevensl=mdbchro7t at7pt
6219 ---\font\fivesl=mdbchro7t at5pt
6220 ---\textfont\slfam=\tensl
6221 ---\scriptfont\slfam=\sevensl
6222 ---\scriptscriptfont\slfam=\fivesl
6223 ---\def\sl{\fam=\slfam \tensl}
6224 ---%
6225 ---% Family 6 (Bold text)
6226 ---\font\tenbf=mdbchb7t at10pt
6227 ---\font\sevenbf=mdbchb7t at7pt
6228 ---\font\fivebf=mdbchb7t at5pt
6229 ---\textfont\bffam=\tenbf
6230 ---\scriptfont\bffam=\sevenbf
6231 ---\scriptscriptfont\bffam=\fivebf
6232 ---\def\bf{\fam=\bffam \tenbf}
6233 ---%
6234 ---% Family 7 (Typewriter)
6235 ---\font\tentt=cmtt10---%
6236 ---\rm
6237 ---% Sets normal roman font
6238 ---\font\seventt=cmtt10 at7pt
6239 ---\font\fivett=cmtt10 at5pt
6240 ---\textfont\ttfam=\tentt
6241 ---\scriptfont\ttfam=\seventt
6242 ---\scriptscriptfont\ttfam=\fivett
6243 ---\def\tt{\fam=\ttfam \tentt}
6244 ---```
6245 ---
6246 ---__Reference:__
6247 ---
6248 ---* Corresponding C source code: [ltexlib.c#L1524-L1561](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1524-L1561)
6249 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
6250 ---* Donald E. Knuth: The TeXbook, Page 154
6251 ---* TUGboat, Volume 31 (2010), No. 1, Mathematical typefaces in TEX documents, Amit Raj Dhawan
6252 ---
6253 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
6254 ---@param char_code integer # The ASCII or UNICODE charcater code point.
6255 ---@param class integer # The class to which a math character belongs (`0`: Ordinary, `1`: Large operator, `2`: Binary operation, `3`: Relation, `4`: Opening, `5`: Closing, `6`: Punctuation, `7`: Variable family).
6256 ---@param family integer # TeX uses fonts from one or more of the sixteen font families to typeset mathematical characters. Each font family consists of three fonts — textfont, scriptfont, and scriptscriptfont. (`0`: Roman, `1`: Math italic, `2`: Math symbol, `3`: Math extension, `4`: Italic text, `5`: Slanted text, `6`: Bold text, `7`: Typewriter)
6257 ---@param character integer # The character position
6258 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6259 function tex.setmathcode(global, char_code, class, family, character) end
6260
6261 ---
6262 ---__Reference:__
6263 ---
6264 ---* Corresponding C source code: [ltexlib.c#L1524-L1561](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1524-L1561)
6265 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
6266 ---
6267 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
6268 ---@param char_code integer # The ASCII or UNICODE charcater code point.
6269 ---@param math_code MathCode # A table with three integers (class, family, character).
6270 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6271 function tex.setmathcode(global, char_code, math_code) end
6272
6273 ---
6274 ---__Reference:__
6275 ---
6276 ---* Corresponding C source code: [ltexlib.c#L1524-L1561](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1524-L1561)
6277 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
6278 ---
6279 ---@param char_code integer # The ASCII or UNICODE charcater code point.
6280 ---@param math_code MathCode # A table with three integers (class, family, character).
6281 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6282 function tex.setmathcode(char_code, math_code) end
6283
6284 ---
6285 ---Retrieve the math code of a character as a table with three integers (class, family, character).
6286 ---
6287 ---__Examples from The TeXBook, page 154__:
6288 ---
6289 ---`\mathcode‘<="313C`
6290 ---
6291 ---* ASCII `<`: 60 (decimal) 3C (hexadecimal)
6292 ---* class: 3
6293 ---* family: 1
6294 ---* character: 60
6295 ---
6296 ---```lua
6297 ---local mathcode = tex.getmathcode(60)
6298 ---print(mathcode[1], mathcode[2], mathcode[3]) -- 3 1 60
6299 ---```
6300 ---
6301 ---`\mathcode‘*="2203`
6302 ---
6303 ---* ASCII `*`: 42 (decimal) 2A (hexadecimal)
6304 ---* class: 2
6305 ---* family: 2
6306 ---* character: 3
6307 ---
6308 ---```lua
6309 ---local mathcode = tex.getmathcode(42)
6310 ---print(mathcode[1], mathcode[2], mathcode[3]) -- 2 2 3
6311 ---```
6312 ---
6313 ---__Reference:__
6314 ---
6315 ---* Corresponding C source code: [ltexlib.c#L1563-L1577](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1563-L1577)
6316 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
6317 ---
6318 ---@param char_code integer
6319 ---
6320 ---@return MathCode math_code # A table with three integers (class, family, character).
6321 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6322 function tex.getmathcode(char_code) end
6323
6324 ---
6325 ---Retrieve the math code of a character as three integers (class, family, character).
6326 ---
6327 ---__Examples from The TeXBook, page 154__:
6328 ---
6329 ---`\mathcode‘<="313C`
6330 ---
6331 ---* ASCII `<`: 60 (decimal) 3C (hexadecimal)
6332 ---* class: 3
6333 ---* family: 1
6334 ---* character: 60
6335 ---
6336 ---```lua
6337 ---print(tex.getmathcodes(60)) -- 3 1 60
6338 ---```
6339 ---
6340 ---`\mathcode‘*="2203`
6341 ---
6342 ---* ASCII `*`: 42 (decimal) 2A (hexadecimal)
6343 ---* class: 2
6344 ---* family: 2
6345 ---* character: 3
6346 ---
6347 ---```lua
6348 ---print(tex.getmathcodes(42)) -- 2 2 3
6349 ---```
6350 ---
6351 ---__class__:
6352 ---
6353 ---| Class | Meaning | Example |
6354 ---|-------|------------------|---------|
6355 ---| 0 | Ordinary | `/` |
6356 ---| 1 | Large operator | `\sum` |
6357 ---| 2 | Binary operation | `+` |
6358 ---| 3 | Relation | `=` |
6359 ---| 4 | Opening | `(` |
6360 ---| 5 | Closing | `)` |
6361 ---| 6 | Punctuation | `,` |
6362 ---| 7 | Variable family | `x` |
6363 ---
6364 ---__family__:
6365 ---
6366 ---```tex
6367 ---% Family 0 (Roman)
6368 ---\font\tenrm=mdbchr7t at10pt
6369 ---\font\sevenrm=mdbchr7t at7pt
6370 ---\font\fiverm=mdbchr7t at5pt
6371 ---\textfont0=\tenrm
6372 ---\scriptfont0=\sevenrm
6373 ---27
6374 ---\scriptscriptfont0=\fiverm
6375 ---\def\rm{\fam=0 \tenrm}
6376 ---%
6377 ---% Family 1 (Math italic)
6378 ---\font\teni=mdbchri7m at10pt
6379 ---\font\seveni=mdbchri7m at7pt
6380 ---\font\fivei=mdbchri7m at5pt
6381 ---\textfont1=\teni
6382 ---\scriptfont1=\seveni
6383 ---\scriptscriptfont1=\fivei
6384 ---\def\mit{\fam=1}
6385 ---%
6386 ---% Family 2 (Math symbols)
6387 ---\font\tensy=md-chr7y at10pt
6388 ---\font\sevensy=md-chr7y at7pt
6389 ---\font\fivesy=md-chr7y at5pt
6390 ---\textfont2=\tensy
6391 ---\scriptfont2=\
6392 ---% Family 3 (Math extension)
6393 ---\font\tenex=mdbchr7v at10pt
6394 ---\font\sevenex=mdbchr7v at7pt
6395 ---\font\fiveex=mdbchr7v at5pt
6396 ---\textfont3=\tenex
6397 ---\scriptfont3=\sevenex
6398 ---\scriptscriptfont3=\fiveex
6399 ---%
6400 ---% Family 4 (Italic text)
6401 ---\font\tenit=mdbchri7t at10pt
6402 ---\font\sevenit=mdbchri7t at7pt
6403 ---\font\fiveit=mdbchri7t at5pt
6404 ---\textfont\itfam=\tenit
6405 ---\scriptfont\itfam=\sevenit
6406 ---\scriptscriptfont\itfam=\fiveit
6407 ---\def\it{\fam=\itfam \tenit}
6408 ---%
6409 ---% Family 5 (Slanted text)
6410 ---\font\tensl=mdbchro7t at10pt
6411 ---\font\sevensl=mdbchro7t at7pt
6412 ---\font\fivesl=mdbchro7t at5pt
6413 ---\textfont\slfam=\tensl
6414 ---\scriptfont\slfam=\sevensl
6415 ---\scriptscriptfont\slfam=\fivesl
6416 ---\def\sl{\fam=\slfam \tensl}
6417 ---%
6418 ---% Family 6 (Bold text)
6419 ---\font\tenbf=mdbchb7t at10pt
6420 ---\font\sevenbf=mdbchb7t at7pt
6421 ---\font\fivebf=mdbchb7t at5pt
6422 ---\textfont\bffam=\tenbf
6423 ---\scriptfont\bffam=\sevenbf
6424 ---\scriptscriptfont\bffam=\fivebf
6425 ---\def\bf{\fam=\bffam \tenbf}
6426 ---%
6427 ---% Family 7 (Typewriter)
6428 ---\font\tentt=cmtt10---%
6429 ---\rm
6430 ---% Sets normal roman font
6431 ---\font\seventt=cmtt10 at7pt
6432 ---\font\fivett=cmtt10 at5pt
6433 ---\textfont\ttfam=\tentt
6434 ---\scriptfont\ttfam=\seventt
6435 ---\scriptscriptfont\ttfam=\fivett
6436 ---\def\tt{\fam=\ttfam \tentt}
6437 ---```sevensy
6438 ---\scriptscriptfont2=\fivesy
6439 ---\def\cal{\fam=2}
6440 ---%
6441 ---% Family 3 (Math extension)
6442 ---\font\tenex=mdbchr7v at10pt
6443 ---\font\sevenex=mdbchr7v at7pt
6444 ---\font\fiveex=mdbchr7v at5pt
6445 ---\textfont3=\tenex
6446 ---\scriptfont3=\sevenex
6447 ---\scriptscriptfont3=\fiveex
6448 ---%
6449 ---% Family 4 (Italic text)
6450 ---\font\tenit=mdbchri7t at10pt
6451 ---\font\sevenit=mdbchri7t at7pt
6452 ---\font\fiveit=mdbchri7t at5pt
6453 ---\textfont\itfam=\tenit
6454 ---\scriptfont\itfam=\sevenit
6455 ---\scriptscriptfont\itfam=\fiveit
6456 ---\def\it{\fam=\itfam \tenit}
6457 ---%
6458 ---% Family 5 (Slanted text)
6459 ---\font\tensl=mdbchro7t at10pt
6460 ---\font\sevensl=mdbchro7t at7pt
6461 ---\font\fivesl=mdbchro7t at5pt
6462 ---\textfont\slfam=\tensl
6463 ---\scriptfont\slfam=\sevensl
6464 ---\scriptscriptfont\slfam=\fivesl
6465 ---\def\sl{\fam=\slfam \tensl}
6466 ---%
6467 ---% Family 6 (Bold text)
6468 ---\font\tenbf=mdbchb7t at10pt
6469 ---\font\sevenbf=mdbchb7t at7pt
6470 ---\font\fivebf=mdbchb7t at5pt
6471 ---\textfont\bffam=\tenbf
6472 ---\scriptfont\bffam=\sevenbf
6473 ---\scriptscriptfont\bffam=\fivebf
6474 ---\def\bf{\fam=\bffam \tenbf}
6475 ---%
6476 ---% Family 7 (Typewriter)
6477 ---\font\tentt=cmtt10---%
6478 ---\rm
6479 ---% Sets normal roman font
6480 ---\font\seventt=cmtt10 at7pt
6481 ---\font\fivett=cmtt10 at5pt
6482 ---\textfont\ttfam=\tentt
6483 ---\scriptfont\ttfam=\seventt
6484 ---\scriptscriptfont\ttfam=\fivett
6485 ---\def\tt{\fam=\ttfam \tentt}
6486 ---```
6487 ---
6488 ---__Reference:__
6489 ---
6490 ---* Corresponding C source code: [ltexlib.c#L1579-L1589](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1579-L1589)
6491 ---* Corresponding plain TeX control sequence: [\mathcode](https://www.tug.org/utilities/plain/cseq.html#mathcode-rp)
6492 ---* Donald E. Knuth: The TeXbook, Page 154
6493 ---* TUGboat, Volume 31 (2010), No. 1, Mathematical typefaces in TEX documents, Amit Raj Dhawan
6494 ---
6495 ---@param char_code integer
6496 ---
6497 ---@return integer class # The class to which a math character belongs (`0`: Ordinary, `1`: Large operator, `2`: Binary operation, `3`: Relation, `4`: Opening, `5`: Closing, `6`: Punctuation, `7`: Variable family).
6498 ---@return integer family # TeX uses fonts from one or more of the sixteen font families to typeset mathematical characters. Each font family consists of three fonts — textfont, scriptfont, and scriptscriptfont. (`0`: Roman, `1`: Math italic, `2`: Math symbol, `3`: Math extension, `4`: Italic text, `5`: Slanted text, `6`: Bold text, `7`: Typewriter)
6499 ---@return integer character # The character position
6500 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6501 function tex.getmathcodes(char_code) end
6502
6503 ---
6504 ---The *TeX*'s character code tables `delcode` (delimiter code) can be accessed and written to using
6505 ---a virtual subtable of the `tex` table.
6506 ---
6507
6508 ---
6509 ---```lua
6510 ---for i=1,128 do
6511 --- local delcode = tex.delcode[i]
6512 --- print(i, utf8.char(i), delcode[1], delcode[2], delcode[3], delcode[4])
6513 ---end
6514 ---```
6515 ---
6516 ---Output:
6517 ---
6518 ---```
6519 ---1 -1 0 0 0
6520 ---...
6521 ---40 ( 0 40 3 0
6522 ---41 ) 0 41 3 1
6523 ---...
6524 ---47 / 0 47 3 14
6525 ---...
6526 ---60 < 2 104 3 10
6527 ---61 = -1 0 0 0
6528 ---62 > 2 105 3 11
6529 ---...
6530 ---91 [ 0 91 3 2
6531 ---92 \ 2 110 3 15
6532 ---93 ] 0 93 3 3
6533 ---...
6534 ---124 | 2 106 3 12
6535 ---...
6536 ---```
6537 ---
6538 ---The `delcode` section in the
6539 ---[plain.tex](https://mirrors.ctan.org/macros/plain/base/plain.tex)
6540 ---format file:
6541 ---
6542 ---```tex
6543 ---% Finally, INITEX sets all \delcode values to -1, except \delcode`.=0
6544 ---\delcode`\(="028300
6545 ---\delcode`\)="029301
6546 ---\delcode`\[="05B302
6547 ---\delcode`\]="05D303
6548 ---\delcode`\<="26830A
6549 ---\delcode`\>="26930B
6550 ---\delcode`\/="02F30E
6551 ---\delcode`\|="26A30C
6552 ---\delcode`\\="26E30F
6553 ---% N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!
6554 ---```
6555 ---
6556 ---__Reference:__
6557 ---
6558 ---* Corresponding C source code: [ltexlib.c#L3712](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3712)
6559 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6560 ---
6561 ---@type table<integer, DelCode>
6562 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6563 tex.delcode = {}
6564
6565 ---
6566 ---The table for `delcode` (delimiter code) is an array with 4 numbers, like this:
6567 ---
6568 ---```lua
6569 ---{
6570 --- -- small_family
6571 --- -- small_character
6572 --- -- large_family
6573 --- -- large_character
6574 ---}
6575 ---```
6576 ---
6577 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6578 ---@alias DelCode integer[]
6579
6580 ---
6581 ----__Reference:__
6582 ---
6583 ---* Corresponding C source code: [ltexlib.c#L1640-L1681](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1640-L1681)
6584 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6585 ---
6586 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
6587 ---@param char_code integer
6588 ---@param small_family integer
6589 ---@param small_character integer
6590 ---@param large_family integer
6591 ---@param large_character integer
6592 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6593 function tex.setdelcode(global, char_code, small_family, small_character, large_family, large_character) end
6594
6595 ---
6596 ----__Reference:__
6597 ---
6598 ---* Corresponding C source code: [ltexlib.c#L1640-L1681](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1640-L1681)
6599 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6600 ---
6601 ---@param char_code integer
6602 ---@param small_family integer
6603 ---@param small_character integer
6604 ---@param large_family integer
6605 ---@param large_character integer
6606 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6607 function tex.setdelcode(char_code, small_family, small_character, large_family, large_character) end
6608
6609 ---
6610 ---* Corresponding C source code: [ltexlib.c#L1640-L1681](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1640-L1681)
6611 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6612 ---
6613 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
6614 ---@param char_code integer
6615 ---@param del_code DelCode
6616 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6617 function tex.setdelcode(global, char_code, del_code) end
6618
6619 ---
6620 ----__Reference:__
6621 ---
6622 ---* Corresponding C source code: [ltexlib.c#L1640-L1681](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1640-L1681)
6623 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6624 ---
6625 ---@param char_code integer
6626 ---@param del_code DelCode
6627 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6628 function tex.setdelcode(char_code, del_code) end
6629
6630 ---
6631 ---* Corresponding C source code: [ltexlib.c#L1701-L1712](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1701-L1712)
6632 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6633 ---
6634 ---@param char_code integer
6635 ---
6636 ---@return integer small_family
6637 ---@return integer small_character
6638 ---@return integer large_family
6639 ---@return integer large_character
6640 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6641 function tex.getdelcodes(char_code) end
6642
6643 ---
6644 ----__Reference:__
6645 ---
6646 ---* Corresponding C source code: [ltexlib.c#L1683-L1699](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1683-L1699)
6647 ---* Corresponding plain TeX control sequence: [\delcode](https://www.tug.org/utilities/plain/cseq.html#delcode-rp)
6648 ---
6649 ---@param char_code integer
6650 ---
6651 ---@return DelCode
6652 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6653 function tex.getdelcode(char_code) end
6654
6655 ---
6656 ---__Reference:__
6657 ---
6658 ---* Corresponding C source code: [ltexlib.c#L3706](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3706)
6659 ---* Corresponding plain TeX control sequence: [\box](https://www.tug.org/utilities/plain/cseq.html#box-rp)
6660 ---
6661 ---@type table<integer, Node>
6662 tex.box = {}
6663
6664 ---
6665 ---Set a box, coming for instance from `hbox`, `vbox` or `vtop`.
6666 ---
6667 ---__Reference:__
6668 ---
6669 ---* Corresponding C source code: [ltexlib.c#L1352-L1362](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1352-L1362)
6670 ---* Corresponding plain TeX control sequence: [\setbox](https://www.tug.org/utilities/plain/cseq.html#setbox-rp)
6671 ---
6672 ---@param global 'global' # It is possible to define values globally by using the string `global` as the first function argument.
6673 ---@param register integer # A box register number (0 to 65535).
6674 ---@param head Node # A `hlist` or `vlist` node.
6675 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6676 function tex.setbox(global, register, head) end
6677
6678 ---
6679 ---Set a box, coming for instance from `hbox`, `vbox` or `vtop`.
6680 ---
6681 ---__Reference:__
6682 ---
6683 ---* Corresponding C source code: [ltexlib.c#L1352-L1362](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1352-L1362)
6684 ---* Corresponding plain TeX control sequence: [\setbox](https://www.tug.org/utilities/plain/cseq.html#setbox-rp)
6685 ---
6686 ---@param register integer # A box register number (0 to 65535).
6687 ---@param head Node # A `hlist` or `vlist` node.
6688 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6689 function tex.setbox(register, head) end
6690
6691 ---
6692 ---Query an actual box, coming for instance from `hbox`, `vbox` or `vtop`.
6693 ---
6694 ---__Reference:__
6695 ---
6696 ---* Corresponding C source code: [ltexlib.c#L1272-L1280](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1272-L1280)
6697 ---* Corresponding plain TeX control sequence: [\box](https://www.tug.org/utilities/plain/cseq.html#box-rp)
6698 ---
6699 ---@param register integer|string # A box register number (0 to 65535) or a cs name (for example `\newbox\MyBox`: `MyBox`)
6700 ---
6701 ---@return Node|nil head
6702 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6703 function tex.getbox(register) end
6704
6705 ---
6706 ---Check if the given integer is a valid box register number.
6707 ---
6708 ---__Example:__
6709 ---
6710 ---```lua
6711 ---print(tex.isbox(65535)) -- true
6712 ---print(tex.isbox(65536)) -- false
6713 ---```
6714 ---
6715 ---__Reference:__
6716 ---
6717 ---* Corresponding C source code: [ltexlib.c#L1310-L1315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1310-L1315)
6718 ---
6719 ---@param register integer|string # A box register number (0 to 65535) or a cs name (for example `\newbox\MyBox`: `MyBox`)
6720 ---
6721 ---@return boolean
6722 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6723 function tex.isbox(register) end
6724
6725 ---
6726 ---Register a box for reuse (this is modelled after so
6727 ---called xforms in *PDF*). You can (re)use the box with `useboxresource` or
6728 ---by creating a rule node with subtype 2.
6729 ---
6730 ---* Corresponding C source code: [ltexlib.c#L3217-L3278](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3217-L3278)
6731 ---
6732 ---@see tex.useboxresource
6733 ---
6734 ---@param n Node|integer # Instead of a box number one can also pass a `[h|v]list` node.
6735 ---@param attributes string
6736 ---@param resources string
6737 ---@param immediate boolean
6738 ---@param type integer # When set to non-zero the `/Type` entry is omitted. A value of 1 or 3 still writes a `/BBox`, while 2 or 3 will write a `/Matrix`.
6739 ---@param margin integer # The (virtual) margin that extends beyond the effective boundingbox as seen by *TeX*.
6740 ---
6741 ---@return integer index
6742 ---
6743 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6744 function tex.saveboxresource(n, attributes, resources, immediate, type, margin) end
6745
6746 ---
6747 ---* Corresponding Lua source code: [ltexlib.c#L3346-L3355](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3346-L3355)
6748 ---
6749 ---@param n integer
6750 ---
6751 ---@return Node
6752 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6753 function tex.getboxresourcebox(n) end
6754
6755 ---
6756 ---Generate the reference (a rule type).
6757 ---
6758 ---The dimensions are optional and the final ones are returned as extra values.
6759 ---
6760 ---* Corresponding C source code: [ltexlib.c#L3280-L3325](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3280-L3325)
6761 ---
6762 ---@see tex.saveboxresource
6763 ---
6764 ---@param n integer
6765 ---@param width? integer
6766 ---@param height? integer
6767 ---@param depth? integer
6768 ---
6769 ---@return Node|nil margin
6770 ---@return integer|nil width
6771 ---@return integer|nil height
6772 ---@return integer|nil depth
6773 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6774 function tex.useboxresource(n, width, height, depth) end
6775
6776 ---
6777 ---Return the width, height, depth and margin of the resource.
6778 ---
6779 ---No dimensions returned means that the resource is
6780 ---unknown.
6781 ---
6782 ---* Corresponding C source code: [ltexlib.c#L3327-L3344](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3327-L3344)
6783 ---
6784 ---@param n Node
6785 ---
6786 ---@return integer|nil width
6787 ---@return integer|nil height
6788 ---@return integer|nil depth
6789 ---@return integer|nil margin
6790 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6791 function tex.getboxresourcedimensions(n) end
6792
6793 ---
6794 ---Call the internal
6795 ---function that build a page, given that there is something to build.
6796 ---
6797 ---You should not expect to much from the `triggerbuildpage` helpers because
6798 ---often *TeX* doesn't do much if it thinks nothing has to be done, but it might be
6799 ---useful for some applications.
6800 ---
6801 ---* Corresponding C source code: [ltexlib.c#L3357-L3361](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3357-L3361)
6802 ---
6803 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6804 function tex.triggerbuildpage() end
6805
6806 ---
6807 ---Split a box.
6808 ---
6809 ---The remainder is kept in the original box and a packaged vlist is returned. This
6810 ---operation is comparable to the `vsplit` operation. The mode can be `additional` or `exactly` and concerns the split off box.
6811 ---
6812 ---* Corresponding C source code: [ltexlib.c#L1282-L1308](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1282-L1308)
6813 ---
6814 ---@param n Node
6815 ---@param height integer
6816 ---@param mode 'additional' | 'exactly'
6817 ---
6818 ---@return Node|nil vlist
6819 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6820 function tex.splitbox(n, height, mode) end
6821
6822 ---
6823 ---Set the internal math parameters.
6824 ---
6825 ---* Corresponding C source code: [ltexlib.c#L1986-L2015](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1986-L2015)
6826 ---
6827 ---@param math_param_name MathParamName
6828 ---@param math_style_name MathStyleName
6829 ---@param value integer
6830 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6831 function tex.setmath(math_param_name, math_style_name, value) end
6832
6833 ---
6834 ---Set the internal math parameters.
6835 ---
6836 ---* Corresponding C source code: [ltexlib.c#L1986-L2015](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L1986-L2015)
6837 ---
6838 ---@param global 'global' # Indicate a global assignment.
6839 ---@param math_param_name MathParamName
6840 ---@param math_style_name MathStyleName
6841 ---@param value integer|Node # The value is either a number (representing a dimension or number) or a glue spec node representing a muskip for `ordordspacing` and similar spacing parameters.
6842 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6843 function tex.setmath(global, math_param_name, math_style_name, value) end
6844
6845 ---
6846 ---Query the internal math parameters.
6847 ---
6848 ---* Corresponding C source code: [ltexlib.c#L2017-L2039](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2017-L2039)
6849 ---
6850 ---@param math_param_name MathParamName
6851 ---@param math_style_name MathStyleName
6852 ---
6853 ---@return integer|Node value # The value is either a number (representing a dimension or number) or a glue spec node representing a muskip for `ordordspacing` and similar spacing parameters.
6854 ---
6855 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6856 function tex.getmath(math_param_name, math_style_name) end
6857
6858 ---
6859 ---The style name minus the trailing “style”.
6860 ---
6861 ---* Corresponding C source code: [texmath.c#L510-L516](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texmath.c#L510-L516)
6862 ---
6863 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6864 ---@alias MathStyleName
6865 ---|'display'
6866 ---|'crampeddisplay'
6867 ---|'text'
6868 ---|'crampedtext'
6869 ---|'script'
6870 ---|'crampedscript'
6871 ---|'scriptscript'
6872 ---|'crampedscriptscript'
6873
6874 ---
6875 ---The parameter name minus the leading “Umath”.
6876 ---
6877 ---* Corresponding C source code: [texmath.c#L518-L558](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texmath.c#L518-L558)
6878 ---
6879 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
6880 ---@alias MathParamName
6881 ---|'quad'
6882 ---|'axis'
6883 ---|'operatorsize'
6884 ---|'overbarkern'
6885 ---|'overbarrule'
6886 ---|'overbarvgap'
6887 ---|'underbarkern'
6888 ---|'underbarrule'
6889 ---|'underbarvgap'
6890 ---|'radicalkern'
6891 ---|'radicalrule'
6892 ---|'radicalvgap'
6893 ---|'radicaldegreebefore'
6894 ---|'radicaldegreeafter'
6895 ---|'radicaldegreeraise'
6896 ---|'stackvgap'
6897 ---|'stacknumup'
6898 ---|'stackdenomdown'
6899 ---|'fractionrule'
6900 ---|'fractionnumvgap'
6901 ---|'fractionnumup'
6902 ---|'fractiondenomvgap'
6903 ---|'fractiondenomdown'
6904 ---|'fractiondelsize'
6905 ---|'skewedfractionhgap'
6906 ---|'skewedfractionvgap'
6907 ---|'limitabovevgap'
6908 ---|'limitabovebgap'
6909 ---|'limitabovekern'
6910 ---|'limitbelowvgap'
6911 ---|'limitbelowbgap'
6912 ---|'limitbelowkern'
6913 ---|'nolimitsubfactor'
6914 ---|'nolimitsupfactor'
6915 ---|'underdelimitervgap'
6916 ---|'underdelimiterbgap'
6917 ---|'overdelimitervgap'
6918 ---|'overdelimiterbgap'
6919 ---|'subshiftdrop'
6920 ---|'supshiftdrop'
6921 ---|'subshiftdown'
6922 ---|'subsupshiftdown'
6923 ---|'subtopmax'
6924 ---|'supshiftup'
6925 ---|'supbottommin'
6926 ---|'supsubbottommax'
6927 ---|'subsupvgap'
6928 ---|'spaceafterscript'
6929 ---|'connectoroverlapmin'
6930 ---|'ordordspacing'
6931 ---|'ordopspacing'
6932 ---|'ordbinspacing'
6933 ---|'ordrelspacing'
6934 ---|'ordopenspacing'
6935 ---|'ordclosespacing'
6936 ---|'ordpunctspacing'
6937 ---|'ordinnerspacing'
6938 ---|'opordspacing'
6939 ---|'opopspacing'
6940 ---|'opbinspacing'
6941 ---|'oprelspacing'
6942 ---|'opopenspacing'
6943 ---|'opclosespacing'
6944 ---|'oppunctspacing'
6945 ---|'opinnerspacing'
6946 ---|'binordspacing'
6947 ---|'binopspacing'
6948 ---|'binbinspacing'
6949 ---|'binrelspacing'
6950 ---|'binopenspacing'
6951 ---|'binclosespacing'
6952 ---|'binpunctspacing'
6953 ---|'bininnerspacing'
6954 ---|'relordspacing'
6955 ---|'relopspacing'
6956 ---|'relbinspacing'
6957 ---|'relrelspacing'
6958 ---|'relopenspacing'
6959 ---|'relclosespacing'
6960 ---|'relpunctspacing'
6961 ---|'relinnerspacing'
6962 ---|'openordspacing'
6963 ---|'openopspacing'
6964 ---|'openbinspacing'
6965 ---|'openrelspacing'
6966 ---|'openopenspacing'
6967 ---|'openclosespacing'
6968 ---|'openpunctspacing'
6969 ---|'openinnerspacing'
6970 ---|'closeordspacing'
6971 ---|'closeopspacing'
6972 ---|'closebinspacing'
6973 ---|'closerelspacing'
6974 ---|'closeopenspacing'
6975 ---|'closeclosespacing'
6976 ---|'closepunctspacing'
6977 ---|'closeinnerspacing'
6978 ---|'punctordspacing'
6979 ---|'punctopspacing'
6980 ---|'punctbinspacing'
6981 ---|'punctrelspacing'
6982 ---|'punctopenspacing'
6983 ---|'punctclosespacing'
6984 ---|'punctpunctspacing'
6985 ---|'punctinnerspacing'
6986 ---|'innerordspacing'
6987 ---|'inneropspacing'
6988 ---|'innerbinspacing'
6989 ---|'innerrelspacing'
6990 ---|'inneropenspacing'
6991 ---|'innerclosespacing'
6992 ---|'innerpunctspacing'
6993 ---|'innerinnerspacing'
6994
6995 ---
6996 ---The virtual table `tex.lists` contains the set of internal registers that
6997 ---keep track of building page lists.
6998 ---
6999 ---__Reference:__
7000 ---
7001 ---* Corresponding C source code: [ltexlib.c#L3713](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3713)
7002 ---
7003 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7004 tex.lists = {}
7005
7006 ---
7007 ---circular list of pending insertions
7008 ---
7009 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7010 tex.lists.page_ins_head = nil
7011
7012 ---
7013 ---the recent contributions
7014 ---
7015 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7016 tex.lists.contrib_head = nil
7017
7018 ---
7019 ---the current page content
7020 ---
7021 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7022 tex.lists.page_head = nil
7023
7024 ---
7025 ---used for held-over items for next page
7026 ---
7027 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7028 tex.lists.hold_head = nil
7029
7030 ---
7031 ---head of the current `vadjust` list
7032 ---
7033 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7034 tex.lists.adjust_head = nil
7035
7036 ---
7037 ---head of the current `\vadjust pre` list
7038 ---
7039 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7040 tex.lists.pre_adjust_head = nil
7041
7042 ---
7043 ---head of the discarded items of a page break
7044 ---
7045 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7046 tex.lists.page_discards_head = nil
7047
7048 ---
7049 ---head of the discarded items in a vsplit
7050 ---
7051 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7052 tex.lists.split_discards_head = nil
7053
7054 ---
7055 ---You have
7056 ---to be careful with what you set as *TeX* can have expectations with regards to
7057 ---how a list is constructed or in what state it is.
7058 ---
7059 ---* Corresponding C source code: [ltexlib.c#L2266-L2321](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2266-L2321)
7060 ---
7061 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7062 function tex.setlist() end
7063
7064 ---
7065 ---* Corresponding C source code: [ltexlib.c#L2202-L2264](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2202-L2264)
7066 ---
7067 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7068 function tex.getlist() end
7069
7070 ---
7071 ---The virtual table `nest` contains the currently active semantic nesting
7072 ---state. It has two main parts: a zero-based array of userdata for the semantic
7073 ---nest itself, and the numerical value `ptr`, which gives the highest
7074 ---available index. Neither the array items in `nest[]` nor `ptr` can be
7075 ---assigned to (as this would confuse the typesetting engine beyond repair), but you
7076 ---can assign to the individual values inside the array items, e.g. `tex.nest[tex.nest.ptr].prevdepth`.
7077 ---
7078 ---`tex.nest[tex.nest.ptr]` is the current nest state, `nest[0]` the
7079 ---outermost (main vertical list) level.
7080 ---
7081 ---__Reference:__
7082 ---
7083 ---* Corresponding C source code: [ltexlib.c#L3714](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3714)
7084 ---
7085 ---@type table<integer, Nest>
7086 ---
7087 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7088 tex.nest = {}
7089
7090 ---
7091 ---highest
7092 ---available index.
7093 ---@type integer
7094 ---
7095 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7096 tex.nest.ptr = 0
7097
7098 ---
7099 ---The getter function is `getnest`. You
7100 ---can pass a number (which gives you a list), nothing or `top`, which returns
7101 ---the topmost list, or the string `ptr` which gives you the index of the
7102 ---topmost list.
7103 ---
7104 ---* Corresponding C source code: [ltexlib.c#L2422-L2455](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2422-L2455)
7105 ---
7106 ---@return Nest
7107 ---
7108 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7109 function tex.getnest() end
7110
7111 ---
7112 ---* Corresponding C source code: [ltexlib.c#L2457-L2461](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2457-L2461)
7113 ---
7114 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7115 function tex.setnest() end
7116
7117 ---
7118 ---* Corresponding C source code: [ltexlib.c#L2325-L2361](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2325-L2361)
7119 ---
7120 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7121 ---@class Nest
7122 ---@field mode number # the meaning of these numbers depends on the engine and sometimes even the version; you can use `tex.getmodevalues()` to get the mapping: positive values signal vertical, horizontal and math mode, while negative values indicate inner and inline variants (all modes).
7123 ---@field modeline integer # source input line where this mode was entered in, negative inside the output routine (all modes).
7124 ---@field head Node # the head of the current list (all modes).
7125 ---@field tail Node # the tail of the current list (all modes).
7126 ---@field prevgraf integer # number of lines in the previous paragraph (vertical mode).
7127 ---@field prevdepth integer # depth of the previous paragraph (vertical mode).
7128 ---@field spacefactor integer # the current space factor (horizontal mode).
7129 ---@field dirs Node # used for temporary storage by the line break algorithm (horizontal mode).
7130 ---@field noad Node # used for temporary storage of a pending fraction numerator, for `over` etc. (math mode).
7131 ---@field delimptr Node # used for temporary storage of the previous math delimiter, for `middle` (math mode).
7132 ---@field mathdir boolean # true when during math processing the `mathdir` is not the same as the surrounding `textdir` (math mode).
7133 ---@field mathstyle integer # mmode the current `mathstyle`
7134 ---
7135
7136 ---
7137 ---`tex.getmodevalues()` to get the mapping: positive values signal vertical, horizontal and math mode, while negative values indicate inner and inline variants (all modes).
7138 ---
7139 ---* Corresponding C source code: [ltexlib.c#L3549-L3565](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3549-L3565)
7140 ---
7141 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7142 function tex.getmodevalues() end
7143
7144 ---
7145 ---@alias PrintableInput string|number|integer
7146
7147 ---
7148 ---__Reference:__
7149 ---
7150 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1222-L1224](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1222-L1224)
7151 ---* Corresponding C source code: [ltexlib.c#L161-164](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L161-164)
7152 ---
7153 ---@param input_line PrintableInput # Each string argument is treated by *TeX* as a separate input line.
7154 ---@param ... PrintableInput # The very last string of the very last `tex.print` command in a `directlua` will not have the `endlinechar` appended, all others do.
7155 ---
7156 ---@see tex.sprint
7157 ---@see tex.tprint
7158 ---@see tex.cprint
7159 ---@see tex.write
7160 ---
7161 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7162 function tex.print(input_line, ...) end
7163
7164 ---
7165 ---__Reference:__
7166 ---
7167 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1222-L1224](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1222-L1224)
7168 ---* Corresponding C source code: [ltexlib.c#L161-164](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L161-164)
7169 ---
7170 ---@param catcodetable_no integer The parameter can be used to print the strings using the catcode regime defined by `\catcodetable` `catcodetable_no`. If `catcodetable_no` is `-1`, the currently active catcode regime is used. If `catcodetable_no` is `-2`, the resulting catcodes are the result of `\the` `\toks`: all category codes are `12` (`other`) except for the space character, that has category code `10` (`space`). Otherwise, if `catcodetable_no` is not a valid catcode table, then it is ignored, and the currently active catcode regime is used instead.
7171 ---@param input_line PrintableInput # Each string argument is treated by *TeX* as a separate input line.
7172 ---@param ... PrintableInput # The very last string of the very last `tex.print` command in a `directlua` will not have the `endlinechar` appended, all others do.
7173 ---
7174 ---@see tex.print
7175 ---@see tex.sprint
7176 ---@see tex.tprint
7177 ---@see tex.cprint
7178 ---@see tex.write
7179 ---
7180 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7181 function tex.print(catcodetable_no, input_line, ...) end
7182
7183 ---
7184 ---If there is a
7185 ---table argument instead of a list of strings, this has to be a consecutive array
7186 ---of strings to print (the first non-string value will stop the printing process).
7187 ---
7188 ---see `LuaTeX` manual: 10.3.14.1 `print`
7189 ---
7190 ---__Reference:__
7191 ---
7192 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1222-L1224](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1222-L1224)
7193 ---* Corresponding C source code: [ltexlib.c#L161-164](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L161-164)
7194 ---
7195 ---@param input_lines PrintableInput[] # Each string (or number) element of the input table is treated by *TeX* as a separate input line.
7196 ---
7197 ---@see tex.sprint
7198 ---@see tex.tprint
7199 ---@see tex.cprint
7200 ---@see tex.write
7201 ---
7202 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7203 function tex.print(input_lines) end
7204
7205 ---
7206 ---see `LuaTeX` manual: 10.3.14.1 `print`
7207 ---
7208 ---__Reference:__
7209 ---
7210 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1222-L1224](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1222-L1224)
7211 ---* Corresponding C source code: [ltexlib.c#L161-164](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L161-164)
7212 ---
7213 ---@param catcodetable_no integer The parameter can be used to print the strings using the catcode regime defined by `\catcodetable` `catcodetable_no`. If `catcodetable_no` is `-1`, the currently active catcode regime is used. If `catcodetable_no` is `-2`, the resulting catcodes are the result of `\the` `\toks`: all category codes are `12` (`other`) except for the space character, that has category code `10` (`space`). Otherwise, if `catcodetable_no` is not a valid catcode table, then it is ignored, and the currently active catcode regime is used instead.
7214 ---@param input_lines PrintableInput[] # Each string element of the input table is treated by *TeX* as a separate input line.
7215 ---
7216 ---@see tex.sprint
7217 ---@see tex.tprint
7218 ---@see tex.cprint
7219 ---@see tex.write
7220 ---
7221 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7222 function tex.print(catcodetable_no, input_lines) end
7223
7224 ---
7225 ---combines all of its arguments (or the elements of array argument) into a single input line for TeX. So any leading spaces will be treated as if they were typed, etc. (`s(ingle-input-line)print`).
7226 ---
7227 ---Each string argument is treated by *TeX* as a special kind of input line that
7228 ---makes it suitable for use as a partial line input mechanism:
7229 ---
7230 ---* *TeX* does not switch to the “new line” state, so that leading
7231 --- spaces are not ignored.
7232 ---* No `endlinechar` is inserted.
7233 ---* Trailing spaces are not removed. Note that this does not prevent
7234 --- *TeX* itself from eating spaces as result of interpreting the line.
7235 --- For example, in
7236 ---
7237 ---```tex
7238 ---before\directlua{tex.sprint("\\relax")tex.sprint(" inbetween")}after
7239 ---```
7240 ---
7241 ---the space before `in between` will be gobbled as a result of the
7242 ---“normal” scanning of `\relax`.
7243 ---
7244 ---If there is a table argument instead of a list of strings, this has to be a
7245 ---consecutive array of strings to print (the first non-string value will stop the
7246 ---printing process).
7247 ---
7248 ---The optional argument sets the catcode regime, as with `tex.print`. This
7249 ---influences the string arguments (or numbers turned into strings).
7250 ---
7251 ---Although this needs to be used with care, you can also pass token or node
7252 ---userdata objects. These get injected into the stream. Tokens had best be valid
7253 ---tokens, while nodes need to be around when they get injected. Therefore it is
7254 ---important to realize the following:
7255 ---
7256 ---* When you inject a token, you need to pass a valid token userdata object. This
7257 --- object will be collected by *Lua* when it no longer is referenced. When it gets
7258 --- printed to *TeX* the token itself gets copied so there is no interference with the
7259 --- *Lua* garbage collection. You manage the object yourself. Because tokens are
7260 --- actually just numbers, there is no real extra overhead at the *TeX* end.
7261 ---* When you inject a node, you need to pass a valid node userdata object. The
7262 --- node related to the object will not be collected by *Lua* when it no longer
7263 --- is referenced. It lives on at the *TeX* end in its own memory space. When it
7264 --- gets printed to *TeX* the node reference is used assuming that node stays
7265 --- around. There is no *Lua* garbage collection involved. Again, you manage the
7266 --- object yourself. The node itself is freed when *TeX* is done with it.
7267 ---
7268 ---If you consider the last remark you might realize that we have a problem when a
7269 ---printed mix of strings, tokens and nodes is reused. Inside *TeX* the sequence
7270 ---becomes a linked list of input buffers. So, `"123"` or `"\foo{123`"}
7271 ---gets read and parsed on the fly, while `<token userdata>` already is
7272 ---tokenized and effectively is a token list now. A `<node userdata>` is also
7273 ---tokenized into a token list but it has a reference to a real node. Normally this
7274 ---goes fine. But now assume that you store the whole lot in a macro: in that case
7275 ---the tokenized node can be flushed many times. But, after the first such flush the
7276 ---node is used and its memory freed. You can prevent this by using copies which is
7277 ---controlled by setting `luacopyinputnodes` to a non-zero value. This is one
7278 ---of these fuzzy areas you have to live with if you really mess with these low
7279 ---level issues.
7280 ---
7281 ---__Reference:__
7282 ---
7283 ---* Corresponding C source code: [ltexlib.c#L168-171](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L168-171)
7284 ---
7285 ---@param input PrintableInput
7286 ---@param ... PrintableInput
7287 ---
7288 ---@see tex.print
7289 ---@see tex.tprint
7290 ---@see tex.cprint
7291 ---@see tex.write
7292 ---
7293 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7294 function tex.sprint(input, ...) end
7295
7296 ---
7297 ---__Reference:__
7298 ---
7299 ---* Corresponding C source code: [ltexlib.c#L168-171](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L168-171)
7300 ---
7301 ---@param catcodetable_no integer The parameter can be used to print the strings using the catcode regime defined by `\catcodetable` `catcodetable_no`. If `catcodetable_no` is `-1`, the currently active catcode regime is used. If `catcodetable_no` is `-2`, the resulting catcodes are the result of `\the` `\toks`: all category codes are `12` (`other`) except for the space character, that has category code `10` (`space`). Otherwise, if `catcodetable_no` is not a valid catcode table, then it is ignored, and the currently active catcode regime is used instead.
7302 ---@param input PrintableInput
7303 ---@param ... PrintableInput
7304 ---
7305 ---@see tex.print
7306 ---@see tex.tprint
7307 ---@see tex.cprint
7308 ---@see tex.write
7309 ---
7310 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7311 function tex.sprint(catcodetable_no, input, ...) end
7312
7313 ---
7314 ---(`s(ingle-input-line)print`).
7315 ---
7316 ---__Reference:__
7317 ---
7318 ---* Corresponding C source code: [ltexlib.c#L168-171](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L168-171)
7319 ---
7320 ---@param input PrintableInput[] # Each string element of the input table is treated by *TeX* as a separate input argument.
7321 ---
7322 ---@see tex.print
7323 ---@see tex.tprint
7324 ---@see tex.cprint
7325 ---@see tex.write
7326 ---
7327 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7328 function tex.sprint(input) end
7329
7330 ---
7331 ---__Reference:__
7332 ---
7333 ---* Corresponding C source code: [ltexlib.c#L168-171](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L168-171)
7334 ---
7335 ---@param catcodetable_no integer The parameter can be used to print the strings using the catcode regime defined by `\catcodetable` `catcodetable_no`. If `catcodetable_no` is `-1`, the currently active catcode regime is used. If `catcodetable_no` is `-2`, the resulting catcodes are the result of `\the` `\toks`: all category codes are `12` (`other`) except for the space character, that has category code `10` (`space`). Otherwise, if `catcodetable_no` is not a valid catcode table, then it is ignored, and the currently active catcode regime is used instead.---@param t table
7336 ---@param input PrintableInput[] # Each string element of the input table is treated by *TeX* as a separate input argument.
7337 ---
7338 ---@see tex.print
7339 ---@see tex.tprint
7340 ---@see tex.cprint
7341 ---@see tex.write
7342 ---
7343 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7344 function tex.sprint(catcodetable_no, input) end
7345
7346 ---
7347 ---Print tables of strings to the input stream (`t(able)print`).
7348 ---
7349 ---This function is basically a shortcut for repeated calls to
7350 ---`tex.sprint(catcodetable_no, input, ...)`, once for each of the
7351 ---supplied argument tables.
7352 ---
7353 ---```tex
7354 ---\begingroup
7355 ---\catcode`\_=12
7356 ---\savecatcodetable 2
7357 ---\endgroup
7358 ---\tt\directlua{tex.tprint({ 2, '_' })}
7359 ---```
7360 ---
7361 ---```lua
7362 ---tex.tprint({ 1, 1, 2, 3 }) -- output: 123
7363 ---```
7364 ---
7365 ---__Reference:__
7366 ---
7367 ---* Corresponding C source code: [ltexlib.c#L207-242](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L207-242)
7368 ---
7369 ---@param input PrintableInput[] # Each string element of the input table is treated by *TeX* as a separate input argument.
7370 ---@param ... PrintableInput[]
7371 ---
7372 ---@see tex.print
7373 ---@see tex.sprint
7374 ---@see tex.cprint
7375 ---@see tex.write
7376 ---
7377 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7378 function tex.tprint(input, ...) end
7379
7380 ---
7381 ---Print to the input stream and specify a catcode (`c(atcode)print`).
7382 ---
7383 ---```lua
7384 ---tex.cprint( 1, " 1: `&{\\foo}") tex.print("\\par") -- a lot of \bgroup s
7385 ---tex.cprint( 2, " 2: `&{\\foo}") tex.print("\\par") -- matching \egroup s
7386 ---tex.cprint( 9, " 9: `&{\\foo}") tex.print("\\par") -- all get ignored
7387 ---tex.cprint(10, "10: `&{\\foo}") tex.print("\\par") -- all become spaces
7388 ---tex.cprint(11, "11: `&{\\foo}") tex.print("\\par") -- letters
7389 ---tex.cprint(12, "12: `&{\\foo}") tex.print("\\par") -- other characters
7390 ---tex.cprint(14, "12: $&{\\foo}") tex.print("\\par") -- comment triggers
7391 ---```
7392 ---
7393 ---__Reference:__
7394 ---
7395 ---* Corresponding C source code: [ltexlib.c#L175-203](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L175-203)
7396 ---
7397 ---@param catcode integer # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
7398 ---@param input PrintableInput
7399 ---@param ... PrintableInput
7400 ---
7401 ---@see tex.print
7402 ---@see tex.sprint
7403 ---@see tex.tprint
7404 ---@see tex.write
7405 ---
7406 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7407 function tex.cprint(catcode, input, ...) end
7408
7409 ---
7410 ---Print to the input stream and specify a catcode (`c(atcode)print`).
7411 ---
7412 ---__Reference:__
7413 ---
7414 ---* Corresponding C source code: [ltexlib.c#L175-203](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L175-203)
7415 ---
7416 ---@param catcode integer # The category code (`0` stands for the escape character, normally `\`, `1` stands for begin grouping, normally `{` and so on).
7417 ---@param input PrintableInput[] # Each string element of the input table is treated by *TeX* as a separate input argument.
7418 ---
7419 ---@see tex.print
7420 ---@see tex.sprint
7421 ---@see tex.tprint
7422 ---@see tex.write
7423 ---
7424 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7425 function tex.cprint(catcode, input) end
7426
7427 ---
7428 ---Print to the input stream using category code `12` (`other`) except
7429 ---for the space character, that has category code `10` (`space`).
7430 ---
7431 ---Each string argument is treated by *TeX* as a special kind of input line that
7432 ---makes it suitable for use as a quick way to dump information:
7433 ---
7434 ---* All catcodes on that line are either “space” (for ` `) or “character” (for all others).
7435 ---* There is no `endlinechar` appended.
7436 ---
7437 ---__Reference:__
7438 ---
7439 ---* Corresponding C source code: [ltexlib.c#L175-203](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L154-157)
7440 ---
7441 ---@param input PrintableInput
7442 ---@param ... PrintableInput
7443 ---
7444 ---@see tex.print
7445 ---@see tex.sprint
7446 ---@see tex.tprint
7447 ---@see tex.cprint
7448 ---
7449 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7450 function tex.write(input, ...) end
7451
7452 ---
7453 ---Print to the input stream using category code `12` (`other`) except
7454 ---for the space character, that has category code `10` (`space`).
7455 ---
7456 ---Each string argument is treated by *TeX* as a special kind of input line that
7457 ---makes it suitable for use as a quick way to dump information:
7458 ---
7459 ---* All catcodes on that line are either “space” (for ` `) or “character” (for all others).
7460 ---* There is no `endlinechar` appended.
7461 ---
7462 ---__Reference:__
7463 ---
7464 ---* Corresponding C source code: [ltexlib.c#L175-203](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L154-157)
7465 ---
7466 ---@param input PrintableInput[] # Each string element of the input table is treated by *TeX* as a separate input argument.
7467 ---
7468 ---@see tex.print
7469 ---@see tex.sprint
7470 ---@see tex.tprint
7471 ---@see tex.cprint
7472 ---
7473 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7474 function tex.write(input) end
7475
7476 ---
7477 ---Rounds *Lua* number `o`, and returns a number that is in the range of a
7478 ---valid *TeX* register value. If the number starts out of range, it generates a
7479 ---“number too big” error as well.
7480 ---
7481 ---__Reference:__
7482 ---
7483 ---* Corresponding C source code: [ltexlib.c#L2474-2482](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2474-2482)
7484 ---
7485 ---@param o number
7486 ---
7487 ---@return integer
7488 ---
7489 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7490 function tex.round(o) end
7491
7492 ---
7493 ---Multiplies the *Lua* numbers `o` and `delta`, and returns a rounded
7494 ---number that is in the range of a valid *TeX* register value. In the table
7495 ---version, it creates a copy of the table with all numeric top-level values scaled
7496 ---in that manner. If the multiplied number(s) are of range, it generates
7497 ---“number too big” error(s) as well.
7498 ---
7499 ---Note: the precision of the output of this function will depend on your computer's
7500 ---architecture and operating system, so use with care! An interface to *LuaTeX*'s
7501 ---internal, 100% portable scale function will be added at a later date.
7502 ---
7503 ---__Reference:__
7504 ---
7505 ---* Corresponding C source code: [ltexlib.c#L2484-2513](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2484-2513)
7506 ---
7507 ---@param o number
7508 ---@param delta number
7509 ---
7510 ---@return number
7511 ---
7512 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7513 function tex.scale(o, delta) end
7514
7515 ---
7516 ---@param o table
7517 ---@param delta number
7518 ---
7519 ---@return table
7520 ---
7521 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7522 function tex.scale(o, delta) end
7523
7524 ---
7525 ---Companion to the primitive `\number`.
7526 ---
7527 ---__Reference:__
7528 ---
7529 ---* Corresponding C source code: [ltexlib.c#L2484-2513](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2484-2513)
7530 ---* https://www.tug.org/utilities/plain/cseq.html#number-rp
7531 ---
7532 ---@param n integer
7533 ---
7534 ---@return integer
7535 ---
7536 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7537 function tex.number(n) end
7538
7539 ---
7540 ---Companion to the primitive `\romannumeral`.
7541 ---
7542 ---__Reference:__
7543 ---
7544 ---* Corresponding C source code: [ltexlib.c#L2061-2064](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2061-2064)
7545 ---
7546 ---@param n integer # for example `2025`
7547 ---
7548 ---@return string # for example `mmxxv`
7549 ---
7550 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7551 function tex.romannumeral(n) end
7552
7553 ---
7554 ---returns the `csname` string that matches a
7555 ---font id number (if there is one).
7556 ---
7557 ---__Reference:__
7558 ---
7559 ---* Corresponding C source code: [L2047-L2050](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2047-L2050)
7560 ---
7561 ---@param font_id integer
7562 ---
7563 ---@return string # for example `\tenrm`.
7564 ---
7565 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7566 function tex.fontidentifier(font_id) end
7567
7568 ---
7569 ---The first one returns the name only, the second one reports the size too.
7570 ---
7571 ---__Reference:__
7572 ---
7573 ---* Corresponding C source code: [L2042-L2045](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2042-L2045)
7574 ---
7575 ---@param font_id integer
7576 ---
7577 ---@return string # for example `cmr10`.
7578 ---
7579 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7580 function tex.fontname(font_id) end
7581
7582 ---
7583 ---Converts the number `o` that represents an explicit
7584 ---dimension into an integer number of scaled points.
7585 ---
7586 ---see `LuaTeX` manual: 10.3.15.5 `sp`
7587 ---
7588 ---__Reference:__
7589 ---
7590 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1395-L1396](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1395-L1396)
7591 ---
7592 ---@param o integer
7593 ---
7594 ---@return integer
7595 ---
7596 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7597 function tex.sp(o) end
7598
7599 ---
7600 ---Convert a string `s` that represents an explicit
7601 ---dimension into an integer number of scaled points.
7602 ---
7603 ---For parsing the string, the same scanning and conversion rules are used that
7604 ---*LuaTeX* would use if it was scanning a dimension specifier in its *TeX*-like
7605 ---input language (this includes generating errors for bad values), expect for the
7606 ---following:
7607 ---
7608 ---* only explicit values are allowed, control sequences are not handled
7609 ---* infinite dimension units (`fil...`) are forbidden
7610 ---* `mu` units do not generate an error (but may not be useful either)
7611 ---
7612 ---__Example__:
7613 ---
7614 ---```lua
7615 ---local scaled_points = tex.sp('1cm')
7616 ---print(scaled_points) -- 1864679
7617 ---```
7618 ---
7619 ---__Reference__:
7620 ---
7621 ---* `LuaTeX` manual: 10.3.15.5 `sp` page 204
7622 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1386-L1413](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1386-L1413)
7623 ---
7624 ---@param s string # A string to convert into scaled points.
7625 ---
7626 ---@return integer # The dimension in the scaled points format.
7627 ---
7628 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7629 function tex.sp(s) end
7630
7631 -- Removed?
7632
7633 ---
7634 ---Create an error like the combination of `\errhelp` and
7635 ---`\errmessage`.
7636 ---
7637 ---During this error, deletions are disabled.
7638 ---
7639 ---see `LuaTeX` manual: 10.3.15.5 `sp`
7640 ---
7641 ---__Reference:__
7642 ---
7643 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1438-L1457](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1438-L1457)
7644 ---* Corresponding C source code: [ltexlib.c#L654-692](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L654-692)
7645 ---
7646 ---@param message string # An error message like `\errmessage`.
7647 ---@param help? table # The array part of the `help` table has to contain strings, one for each line of error help.
7648 ---
7649 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7650 function tex.error(message, help) end
7651
7652 ---
7653 ---Show the current
7654 ---(expansion) context in case of an error.
7655 ---
7656 ----__Reference:__
7657 ---
7658 ---* Corresponding C source code: [ltexlib.c#L3210-L3215](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3210-L3215)
7659 ---
7660 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7661 function tex.show_context() end
7662
7663 ---
7664 ---Start the interpretation.
7665 ---
7666 ---A run normally
7667 ---boils down to *TeX* entering the so called main loop. A token is fetched and
7668 ---depending on it current meaning some actions takes place. Sometimes that actions
7669 ---comes immediately, sometimes more scanning is needed. Quite often tokens get
7670 ---pushed back into the input. This all means that the *TeX* scanner is constantly
7671 ---pushing and popping input states, but in the end after all the action is done
7672 ---returns to the main loop.
7673 ---
7674 ---__Reference:__
7675 ---
7676 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1459-L1470](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1459-L1470)
7677 ---
7678 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7679 function tex.run() end
7680
7681 ---
7682 ---Force the end of an interpretation.
7683 ---
7684 ---__Reference:__
7685 ---
7686 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1464](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1464)
7687 ---
7688 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7689 function tex.finish() end
7690
7691 ---
7692 ---Because of the fact that *TeX* is in a complex dance of expanding, dealing with
7693 ---fonts, typesetting paragraphs, messing around with boxes, building pages, and so
7694 ---on, you cannot easily run a nested *TeX* run (read nested main loop). However,
7695 ---there is an option to force a local run with `runtoks`. The content of the
7696 ---given token list register gets expanded locally after which we return to where we
7697 ---triggered this expansion, at the *Lua* end. Instead a function can get passed
7698 ---that does some work. You have to make sure that at the end *TeX* is in a sane
7699 ---state and this is not always trivial. A more complex mechanism would complicate
7700 ---*TeX* itself (and probably also harm performance) so this simple local expansion
7701 ---loop has to do.
7702 ---
7703 ---When the `tracingnesting` parameter is set to a value larger than 2 some
7704 ---information is reported about the state of the local loop.
7705 ---
7706 ---Inside for instance an `\edef` the `runtoks` function behaves (at
7707 ---least tries to) like it were an `\the`. This prevents unwanted side
7708 ---effects: normally in such an definition tokens remain tokens and (for instance)
7709 ---characters don't become nodes.
7710 ---
7711 ---__Example:__
7712 ---
7713 ---```lua
7714 ---\toks0{\setbox0\hbox{one}}
7715 ---\toks1{\setbox0\hbox{first}}
7716 ---\directlua {
7717 --- tex.forcehmode(true)
7718 --- tex.runtoks(0)
7719 --- print(tex.getbox(0).width)
7720 --- tex.runtoks(1)
7721 --- print(tex.getbox(0).width)
7722 ---}
7723 ---```
7724 ---
7725 ---__Reference:__
7726 ---
7727 ---* Source file of the `LuaTeX` manual: [luatex-tex.tex#L1472-L1508](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-tex.tex#L1472-L1508)
7728 ---* Corresponding C source code: [ltexlib.c#L3464-L3536](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3464-L3536)
7729 ---
7730 ---@param token_register integer
7731 ---@param force? boolean # force the local main loop
7732 ---@param grouped? boolean # adds a level of grouping.
7733 ---
7734 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7735 function tex.runtoks(token_register, force, grouped) end
7736
7737 ---
7738 ---@param func function
7739 ---
7740 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7741 function tex.runtoks(func) end
7742
7743 ---
7744 ---You can quit the local loop with `\endlocalcontrol` or from the *Lua* end
7745 ---with `tex.quittoks`. In that case you end one level up! Of course in the
7746 ---end that can mean that you arrive at the main level in which case an extra end
7747 ---will trigger a redundancy warning (not an abort!).
7748 ---
7749 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7750 function tex.quittoks() end
7751
7752 ---
7753 ---An example of a (possible error triggering) complication is that *TeX* expects to
7754 ---be in some state, say horizontal mode, and you have to make sure it is when you
7755 ---start feeding back something from *Lua* into *TeX*. Normally a user will not run
7756 ---into issues but when you start writing tokens or nodes or have a nested run there
7757 ---can be situations that you need to run `forcehmode`. There is no recipe for
7758 ---this and intercepting possible cases would weaken *LuaTeX*'s flexibility.
7759 ---
7760 ---@param indented? boolean
7761 ---
7762 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7763 function tex.forcehmode(indented) end
7764
7765 ---
7766 ---Return a list of names.
7767 ---
7768 ---This can be useful for debugging, but note that this
7769 ---also reports control sequences that may be unreachable at this moment due to
7770 ---local redefinitions: it is strictly a dump of the hash table. You can use `token.create` to inspect properties, for instance when the `command` key
7771 ---in a created table equals `123`, you have the `cmdname` value `undefined_cs`.
7772 ---
7773 ---```lua
7774 ---for i,v in pairs(tex.hashtokens()) do ... end
7775 ---```
7776 ---
7777 ---__Reference:__
7778 ---
7779 ---* Corresponding C source code: [ltexlib.c#L2662-L2690](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2662-L2690)
7780 ---
7781 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7782 function tex.hashtokens() end
7783
7784 ---
7785 ---Associates `csname` with the internal font number `fontid`. The
7786 ---definition is global if (and only if) `global` is specified and true (the
7787 ---setting of `globaldefs` is not taken into account).
7788 ---
7789 ---@param csname string
7790 ---@param fontid integer
7791 ---
7792 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7793 function tex.definefont(csname, fontid) end
7794
7795 ---
7796 ---Associates `csname` with the internal font number `fontid`. The
7797 ---definition is global if (and only if) `global` is specified and true (the
7798 ---setting of `globaldefs` is not taken into account).
7799 ---
7800 ---@param global boolean
7801 ---@param csname string
7802 ---@param fontid integer
7803 ---
7804 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7805 function tex.definefont(global, csname, fontid) end
7806
7807 ---
7808 ---This function accepts a prefix string and an array of primitive names. For each
7809 ---combination of “prefix” and “name”, the `tex.enableprimitives` first verifies that “name” is an actual primitive
7810 ---(it must be returned by one of the `tex.extraprimitives` calls explained
7811 ---below, or part of *TeX*82, or `directlua`). If it is not, `tex.enableprimitives` does nothing and skips to the next pair.
7812 ---
7813 ---But if it is, then it will construct a csname variable by concatenating the
7814 ---“prefix” and “name”, unless the “prefix” is already the
7815 ---actual prefix of “name”. In the latter case, it will discard the “prefix”, and just use “name”.
7816 ---
7817 ---Then it will check for the existence of the constructed csname. If the csname is
7818 ---currently undefined (note: that is not the same as `relax`), it will
7819 ---globally define the csname to have the meaning: run code belonging to the
7820 ---primitive “name”. If for some reason the csname is already defined, it
7821 ---does nothing and tries the next pair.
7822 ---
7823 ---An example:
7824 ---
7825 ---```lua
7826 ---tex.enableprimitives('LuaTeX', {'formatname'})
7827 ---```
7828 ---
7829 ---will define `\LuaTeXformatname` with the same intrinsic meaning as the
7830 ---documented primitive `formatname`, provided that the control sequences `\LuaTeXformatname` is currently undefined.
7831 ---
7832 ---When *LuaTeX* is run with `--ini` only the *TeX*82 primitives and `directlua` are available, so no extra primitives {\bf at all}.
7833 ---
7834 ---If you want to have all the new functionality available using their default
7835 ---names, as it is now, you will have to add
7836 ---
7837 ---```tex
7838 ---\ifx\directlua\undefined \else
7839 --- \directlua {tex.enableprimitives('',tex.extraprimitives ())}
7840 ---\fi
7841 ---```
7842 ---
7843 ---near the beginning of your format generation file. Or you can choose different
7844 ---prefixes for different subsets, as you see fit.
7845 ---
7846 ---Calling some form of `tex.enableprimitives` is highly important though,
7847 ---because if you do not, you will end up with a *TeX*82-lookalike that can run *Lua*
7848 ---code but not do much else. The defined csnames are (of course) saved in the
7849 ---format and will be available at runtime.
7850 ---
7851 ---*
7852 ---
7853 ---* Corresponding C source code: [ltexlib.c#L2752-L2809](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2752-L2809)
7854 ---
7855 ---@param prefix string
7856 ---@param primitive_names string[]
7857 ---
7858 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7859 function tex.enableprimitives(prefix, primitive_names) end
7860
7861 ---
7862 ---@alias TexEngine
7863 ---|'etex'
7864 ---|'tex'
7865 ---|'core'
7866 ---|'luatex'
7867
7868 ---
7869 ---Return a list of the primitives that originate from the engine(s)
7870 ---given by the requested string value(s).
7871 ---
7872 ---The possible values and their (current)
7873 ---return values are given in the following table. In addition the somewhat special
7874 ---primitives “\tex{ ”}, “\tex {/”} and “`-`” are defined.
7875 ---
7876 ---Note that `luatex` does not contain `directlua`, as that is
7877 ---considered to be a core primitive, along with all the *TeX*82 primitives, so it is
7878 ---part of the list that is returned from `core`.
7879 ---
7880 ---Running `tex.extraprimitives()` will give you the complete list of
7881 ---primitives `-ini` startup. It is exactly equivalent to `tex.extraprimitives("etex","luatex")`.
7882 ---
7883 ---* Corresponding C source code: [ltexlib.c#L2710-L2750](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2710-L2750)
7884 ---
7885 ---@param ... TexEngine
7886 ---
7887 ---@return string[]
7888 ---
7889 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7890 function tex.extraprimitives(...) end
7891
7892 ---
7893 ---Return a list of all primitives that *LuaTeX* knows about.
7894 ---
7895 ---* Corresponding C source code: [ltexlib.c#L2691-L2708](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2691-L2708)
7896 ---
7897 ---@return string[]
7898 ---
7899 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7900 function tex.primitives() end
7901
7902 ---
7903 ---Calculate the badness.
7904 ---
7905 ---This helper function is useful during linebreak calculations. The function returns the badness for when total `total`
7906 ---is supposed to be made from amounts that sum to `sum`. The returned number is
7907 ---a reasonable approximation of `100(total/sum)^3`.
7908 ---
7909 ---* Corresponding C source code: [ltexlib.c#L3069-L3075](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3069-L3075)
7910 ---* Corresponding C source code: [arithmetic.c#L275-L300](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/arithmetic.c#L275-L300)
7911 ---
7912 ---@param total integer # scaled values
7913 ---@param sum integer # scaled values
7914 ---
7915 ---@return integer badness
7916 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7917 function tex.badness(total, sum) end
7918
7919 ---
7920 ---Reset the parameters that *TeX* normally resets when a new paragraph
7921 ---is seen.
7922 ---
7923 ---* Corresponding C source code: [ltexlib.c#L3054-L3059](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3054-L3059)
7924 ---
7925 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7926 function tex.resetparagraph() end
7927
7928 ---
7929 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
7930 ---@class LinebreakParameters
7931 ---@field pardir string
7932 ---@field pretolerance integer
7933 ---@field tracingparagraphs integer
7934 ---@field tolerance integer
7935 ---@field looseness integer
7936 ---@field hyphenpenalty integer
7937 ---@field exhyphenpenalty integer
7938 ---@field pdfadjustspacing integer
7939 ---@field adjdemerits integer
7940 ---@field pdfprotrudechars integer
7941 ---@field linepenalty integer
7942 ---@field lastlinefit integer
7943 ---@field doublehyphendemerits integer
7944 ---@field finalhyphendemerits integer
7945 ---@field hangafter integer
7946 ---@field interlinepenalty integer|table # or table if a table, then it is an array like `interlinepenalties`
7947 ---@field clubpenalty integer|table # or table if a table, then it is an array like `clubpenalties`
7948 ---@field widowpenalty integer|table # or table if a table, then it is an array like `widowpenalties`
7949 ---@field brokenpenalty integer
7950 ---@field emergencystretch integer # in scaled points
7951 ---@field hangindent integer # in scaled points
7952 ---@field hsize integer # in scaled points
7953 ---@field leftskip GlueSpecNode
7954 ---@field rightskip GlueSpecNode
7955 ---@field parshape table
7956 ---
7957
7958 ---
7959 ---Note that there is no interface for `displaywidowpenalties`, you have to
7960 ---pass the right choice for `widowpenalties` yourself.
7961 ---
7962 ---It is your own job to make sure that `listhead` is a proper paragraph list:
7963 ---this function does not add any nodes to it. To be exact, if you want to replace
7964 ---the core line breaking, you may have to do the following (when you are not
7965 ---actually working in the `pre_linebreak_filter` or `linebreak_filter`
7966 ---callbacks, or when the original list starting at listhead was generated in
7967 ---horizontal mode):
7968 ---
7969 ---* add an “indent box” and perhaps a `local_par` node at the start
7970 --- (only if you need them)
7971 ---
7972 ---* replace any found final glue by an infinite penalty (or add such a penalty,
7973 --- if the last node is not a glue)
7974 ---
7975 ---* add a glue node for the `parfillskip` after that penalty node
7976 ---
7977 ---* make sure all the `prev` pointers are OK
7978 ---
7979 ---The result is a node list, it still needs to be vpacked if you want to assign it
7980 ---to a `vbox`. The returned `info` table contains four values that are
7981 ---all numbers:
7982 ---
7983 --- name explanation
7984 ---
7985 --- prevdepth depth of the last line in the broken paragraph
7986 --- prevgraf number of lines in the broken paragraph
7987 --- looseness the actual looseness value in the broken paragraph
7988 --- demerits the total demerits of the chosen solution
7989 ---
7990 ---Note there are a few things you cannot interface using this function: You cannot
7991 ---influence font expansion other than via `pdfadjustspacing`, because the
7992 ---settings for that take place elsewhere. The same is true for hbadness and hfuzz
7993 ---etc. All these are in the `hpack` routine, and that fetches its own
7994 ---variables via globals.
7995 ---
7996 ---@param listhead Node
7997 ---@param parameters LinebreakParameters
7998 ---
7999 ---@return Node
8000 ---@return table
8001 ---
8002 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8003 function tex.linebreak(listhead, parameters) end
8004
8005 ---
8006 ---Ships out box number `n` to the output file, and clears the box register.
8007 ---
8008 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8009 function tex.shipout() end
8010
8011 ---
8012 ---This helper reports the current page state: `empty`, `box_there` or
8013 ---`inserts_only` as integer value.
8014 ---
8015 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8016 function tex.getpagestate() end
8017
8018 ---
8019 ---This integer reports the current level of the local loop. It's only useful for
8020 ---debugging and the (relative state) numbers can change with the implementation.
8021 ---
8022 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8023 function tex.getlocallevel() end
8024
8025 -- { "uniform_rand",tex_unif_rand },
8026 -- { "normal_rand", tex_norm_rand },
8027 -- { "lua_math_randomseed", tex_init_rand }, /* syntactic sugar */
8028
8029 ---
8030 ---Initialize a new seed.
8031 ---
8032 ---`lua_math_randomseed` is
8033 ---equivalent to this function.
8034 ---
8035 ---* Corresponding C source code: [ltexlib.c#L3132-L3142](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3132-L3142)
8036 ---
8037 ---@see tex.lua_math_randomseed
8038 ---
8039 ---@param seed integer
8040 ---
8041 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8042 function tex.init_rand(seed) end
8043
8044 ---
8045 ---Initialize a new seed.
8046 ---
8047 ---`init_rand` is
8048 ---equivalent to this function.
8049 ---
8050 ---* Corresponding C source code: [ltexlib.c#L3132-L3142](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3132-L3142)
8051 ---
8052 ---@see tex.init_rand
8053 ---
8054 ---@param seed integer
8055 ---
8056 ---You can
8057 ---initialize with a new seed with `lua_math_randomseed` (`init_rand` is
8058 ---equivalent to this one.)
8059 ---
8060 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8061 function tex.lua_math_randomseed(seed) end
8062
8063 ---
8064 ---For practical reasons *LuaTeX* has its own random number generator. This is the original
8065 ---*Lua* random function.
8066 ---
8067 ---* Corresponding C source code: [ltexlib.c#L3164-L3192](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3164-L3192)
8068 ---
8069 ---@param lower number
8070 ---@param upper number
8071 ---
8072 ---@return number
8073 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8074 function tex.lua_math_random(lower, upper) end
8075
8076 ---
8077 ---For practical reasons *LuaTeX* has its own random number generator. This is the original
8078 ---*Lua* random function.
8079 ---
8080 ---* Corresponding C source code: [ltexlib.c#L3164-L3192](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3164-L3192)
8081 ---
8082 ---@param upper? number
8083 ---
8084 ---@return number
8085 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8086 function tex.lua_math_random(upper) end
8087
8088 ---
8089 ---no argument is used
8090 ---
8091 ---* Corresponding C source code: [ltexlib.c#L3156-L3160](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3156-L3160)
8092 ---
8093 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8094 function tex.normal_rand() end
8095
8096 ---
8097 ---takes a number that will get rounded before being used
8098 ---
8099 ---* Corresponding C source code: [ltexlib.c#L3144-L3154](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3144-L3154)
8100 ---
8101 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8102 function tex.uniform_rand() end
8103
8104 ---
8105 --- which behaves like the primitive and expects a scaled integer, so
8106 ---
8107 ---```lua
8108 ---tex.print(tex.uniformdeviate(65536)/65536)
8109 ---```
8110 ---
8111 ---will give a random number between zero and one.
8112 ---
8113 ---* Corresponding C source code: [ltexlib.c#L2051-L2054](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L2051-L2054)
8114 ---
8115 ---@param n integer a scaled integer
8116 ---
8117 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8118 function tex.uniformdeviate(n) end
8119
8120 ---
8121 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8122 ---@alias SyntexMode
8123 ---|0 # is the default and used normal synctex logic
8124 ---|1 # uses the values set by the next helpers
8125 ---|2 # sets for glyph nodes
8126 ---|3 # sets glyph and glue nodes
8127 ---|4 # sets only glyph modes
8128
8129 ---
8130 ---* Corresponding C source code: [ltexlib.c#L3377-L3382](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3377-L3382)
8131 ---
8132 ---@param mode SyntexMode
8133 ---
8134 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8135 function tex.set_synctex_mode(mode) end
8136
8137 ---
8138 ---Return the current mode.
8139 ---
8140 ---* Corresponding C source code: [ltexlib.c#L3383-L3387](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3383-L3387)
8141 ---
8142 ---@return SyntexMode mode
8143 ---
8144 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8145 function tex.get_synctex_mode() end
8146
8147 ---
8148 ---Set the current tag (file) value (obeys save stack).
8149 ---
8150 ---* Corresponding C source code: [ltexlib.c#L3389-L3394](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3389-L3394)
8151 ---
8152 ---@param tag integer
8153 ---
8154 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8155 function tex.set_synctex_tag(tag) end
8156
8157 ---
8158 ---Get the currently set value of a tag (file).
8159 ---
8160 ---* Corresponding C source code: [ltexlib.c#L3396-L3400](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3396-L3400)
8161 ---
8162 ---@return integer tag
8163 ---
8164 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8165 function tex.get_synctex_tag() end
8166
8167 ---
8168 ---Overload the tag (file) value (`0` resets).
8169 ---
8170 ---* Corresponding C source code: [ltexlib.c#L3402-L3407](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3402-L3407)
8171 ---
8172 ---@param tag integer
8173 ---
8174 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8175 function tex.force_synctex_tag(tag) end
8176
8177 ---
8178 ---Set the current line value (obeys save stack).
8179 ---
8180 ---* Corresponding C source code: [ltexlib.c#L3416-L3421](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3416-L3421)
8181 ---
8182 ---@param line integer
8183 ---
8184 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8185 function tex.set_synctex_line(line) end
8186
8187 ---
8188 ---Get the currently set value of a line.
8189 ---
8190 ---* Corresponding C source code: [ltexlib.c#L3423-L3427](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3423-L3427)
8191 ---
8192 ---@return integer line
8193 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8194 function tex.get_synctex_line() end
8195
8196 ---
8197 ---Overload the line value (`0` resets)
8198 ---
8199 ---* Corresponding C source code: [L3409-L3414](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3409-L3414)
8200 ---
8201 ---@param line integer
8202 ---
8203 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8204 function tex.force_synctex_line(line) end
8205
8206 ---
8207 ---Disable synctex file logging.
8208 ---
8209 ---* Corresponding C source code: [ltexlib.c#L3429-L3434](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexlib.c#L3429-L3434)
8210 ---
8211 ---@param flag integer
8212 ---
8213 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/tex.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8214 function tex.set_synctex_no_files(flag) end
8215
8216 ---
8217 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8218 lua = {}
8219
8220 ---
8221 ---Version information: This library contains one read-only item:
8222 ---
8223 ---```lua
8224 ---<string> s = lua.version
8225 ---```
8226 ---
8227 ---This returns the *Lua* version identifier string.
8228 ---
8229 ---__Reference:__
8230 ---
8231 ---* Corresponding C source code: [llualib.c#L416-L417](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L416-L417)
8232 ---
8233 ---@type string
8234 ---
8235 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8236 lua.version = ""
8237
8238 ---
8239 ---Use the `bytecode` table to store *Lua* code chunks. The accepted values for
8240 ---assignments are functions and `nil`. Likewise, the retrieved value is
8241 ---either a function or `nil`.
8242 ---
8243 ---The contents of the `lua.bytecode` array is stored inside the format file
8244 ---as actual *Lua* bytecode, so it can also be used to preload *Lua* code. The
8245 ---function must not contain any upvalues.
8246 ---@type table<integer, function|nil>
8247 ---
8248 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8249 lua.bytecode = {}
8250
8251 ---
8252 ---Save a function in a bytecode register.
8253 ---
8254 ---__Example:__
8255 ---
8256 ---```lua
8257 ---lua.setbytecode(13, function () print('A message') end)
8258 ---local print_message = lua.getbytecode(13)
8259 ---print_message() -- 'A message'
8260 ---```
8261 ---
8262 ---__Reference:__
8263 ---
8264 ---* Corresponding C source code: [llualib.c#L249-L315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L249-L315)
8265 ---
8266 ---@param n integer
8267 ---@param f function|nil
8268 ---
8269 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8270 function lua.setbytecode(n, f) end
8271
8272 ---
8273 ---Return a previously stored function from a bytecode register.
8274 ---
8275 ---__Example:__
8276 ---
8277 ---```lua
8278 ---lua.setbytecode(13, function () print('A message') end)
8279 ---local print_message = lua.getbytecode(13)
8280 ---print_message() -- 'A message'
8281 ---```
8282 ---
8283 ---__Reference:__
8284 ---
8285 ---* Corresponding C source code: [llualib.c#L187-L212](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L187-L212)
8286 ---
8287 ---@param n integer
8288 ---
8289 ---@return function|nil f
8290 ---
8291 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8292 function lua.getbytecode(n) end
8293
8294 ---
8295 ---Return two numbers, one for the command handler and one for the graphical user interface (on Microsoft Windows).
8296 ---
8297 ---__Reference:__
8298 ---
8299 ---* Corresponding C source code: [llualib.c#L382-L392](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L382-L392)
8300 ---
8301 ---@return integer # command handler
8302 ---@return integer # graphical user interface
8303 ---
8304 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8305 function lua.getcodepage() end
8306
8307 ---
8308 ---There is an array of 65536 (0-65535) potential chunk names for use with the
8309 ---`directlua` and `latelua` primitives.
8310 ---
8311 ---```
8312 ---lua.name[<number> n] = <string> s
8313 ---<string> s = lua.name[<number> n]
8314 ---```
8315 ---@see lua.getluaname
8316 ---@see lua.setluaname
8317 ---
8318 ---@type table<integer, string>
8319 ---
8320 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8321 lua.name = {}
8322
8323 ---
8324 ---Set a Lua chunk name.
8325 ---
8326 ---When a chunk name starts with
8327 ---a `@` it will be displayed as a file name. This is a side effect of the way Lua implements error
8328 ---handling.
8329 ---
8330 ---__Reference:__
8331 ---
8332 ---* Corresponding C source code: [llualib.c#L318-L339](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L318-L339)-
8333 ---
8334 ---@param chunk_name string|nil # If you want to unset a *Lua* name, you can assign `nil` to it.
8335 ---@param index integer
8336 ---
8337 ---@see lua.name
8338 ---@see lua.getluaname
8339 ---
8340 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8341 function lua.setluaname(chunk_name, index) end
8342
8343 ---
8344 ---Return a Lua chunk name.
8345 ---
8346 ---__Reference:__
8347 ---
8348 ---* Corresponding C source code: [llualib.c#L341-L354](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L341-L354)
8349 ---
8350 ---@param index number
8351 ---
8352 ---@return string|nil
8353 ---
8354 ---@see lua.name
8355 ---@see lua.setluaname
8356 ---
8357 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8358 function lua.getluaname(index) end
8359
8360 ---
8361 ---Create a new empty table and push it onto the stack.
8362 ---
8363 ---Parameter `index` is a hint for how many elements the table will have as a sequence; parameter `hash` is a hint for how many other elements the table will have. Lua may use these hints to preallocate memory for the new table. This preallocation is useful for performance when you know in advance how many elements the table will have.
8364 ---
8365 ---__Reference:__
8366 ---
8367 ---* Corresponding C source code: [llualib.c#L362-L368](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L362-L368)
8368 ---* [lua_createtable](https://pgl.yoyo.org/luai/i/lua_createtable)
8369 ---
8370 ---@param index integer
8371 ---@param hash integer
8372 ---
8373 ---@return table
8374 ---
8375 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8376 function lua.newtable(index, hash) end
8377
8378 ---
8379 ---Return a number indicating
8380 ---how much nesting is going on.
8381 ---
8382 ---It is only of use as a breakpoint when
8383 ---checking some mechanism going haywire.
8384 ---
8385 ---__Reference:__
8386 ---
8387 ---* `LuaTeX` manual: 10.1.4 Introspection
8388 ---* Corresponding C source code: [llualib.c#L370-L374](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L370-L374)
8389 ---
8390 ---@return integer
8391 ---
8392 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8393 function lua.getstacktop() end
8394
8395 ---
8396 ---Return a number indicating
8397 ---how much nesting is going on.
8398 ---
8399 ---It is only of use as a breakpoint when
8400 ---checking some mechanism going haywire.
8401 ---
8402 ---__Reference:__
8403 ---
8404 ---* Corresponding C source code: [llualib.c#L376-L380](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L376-L380)
8405 ---* `LuaTeX` manual: 10.1.4 Introspection
8406 ---
8407 ---@return integer
8408 ---
8409 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8410 function lua.getcalllevel() end
8411
8412 ---
8413 ---The `\directlua` commands involves tokenization of its argument (after
8414 ---picking up an optional name or number specification). The tokenlist is then
8415 ---converted into a string and given to *Lua* to turn into a function that is
8416 ---called. The overhead is rather small but when you have millions of calls it can
8417 ---have some impact. For this reason there is a variant call available: `\luafunction`. This command is used as follows:
8418 ---
8419 ---```tex
8420 ---\directlua {
8421 --- local t = lua.get_functions_table()
8422 --- t[1] = function() tex.print("!") end
8423 --- t[2] = function() tex.print("?") end
8424 ---}
8425 ---
8426 ---\luafunction1
8427 ---\luafunction2
8428 ---```
8429 ---
8430 ---Of course the functions can also be defined in a separate file. There is no limit
8431 ---on the number of functions apart from normal *Lua* limitations. Of course there
8432 ---is the limitation of no arguments but that would involve parsing and thereby give
8433 ---no gain. The function, when called in fact gets one argument, being the index, so
8434 ---in the following example the number `8` gets typeset.
8435 ---
8436 ---```tex
8437 ---\directlua {
8438 --- local t = lua.get_functions_table()
8439 --- t[8] = function(slot) tex.print(slot) end
8440 ---}
8441 ---```
8442 --- ---
8443 ---
8444 ---```lua
8445 ---token.set_lua("mycode", id)
8446 ---token.set_lua("mycode", id, "global", "protected")
8447 ---```
8448 ---
8449 ---This creates a token that refers to a *Lua* function with an entry in the table
8450 ---that you can access with `lua.get_functions_table`. It is the companion
8451 ---to `luadef`.
8452 ---
8453 ---__Reference:__
8454 ---
8455 ---* `LuaTeX` manual: 2.4.4 `\luafunction`, `\luafunctioncall` and `\luadef`
8456 ---* `LuaTeX` manual: 10.6.4 Macros
8457 ---* Corresponding C source code: [llualib.c#L356-L360](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llualib.c#L356-L360)
8458 ---
8459 ---@return {[integer]: fun(slot: integer)}
8460 ---
8461 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lua.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8462 function lua.get_functions_table() end
8463 ---
8464 ---The `pdfscanner` library allows interpretation of *PDF* content streams and
8465 ---`/ToUnicode` (cmap) streams. You can get those streams from the `pdfe` library.
8466 ---
8467 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8468 pdfscanner = {}
8469
8470 ---
8471 ---The first argument should be a *Lua* string or a stream or array object coming
8472 ---from the `pdfe` library. The second argument, `operatortable`, should
8473 ---be a *Lua* table where the keys are *PDF* operator name strings and the values
8474 ---are *Lua* functions (defined by you) that are used to process those operators.
8475 ---The functions are called whenever the scanner finds one of these *PDF* operators
8476 ---in the content stream(s). The functions are called with two arguments: the `scanner` object itself, and the `info` table that was passed are the third
8477 ---argument to `pdfscanner.scan`.
8478 ---
8479 ---Internally, `pdfscanner.scan` loops over the *PDF* operators in the
8480 ---stream(s), collecting operands on an internal stack until it finds a *PDF*
8481 ---operator. If that *PDF* operator's name exists in `operatortable`, then the
8482 ---associated function is executed. After the function has run (or when there is no
8483 ---function to execute) the internal operand stack is cleared in preparation for the
8484 ---next operator, and processing continues.
8485 ---
8486 ---The `scanner` argument to the processing functions is needed because it
8487 ---offers various methods to get the actual operands from the internal operand
8488 ---stack.
8489 ---
8490 ---```lua
8491 ---local operatortable = { }
8492 ---
8493 ---operatortable.Do = function(scanner,info)
8494 --- local resources = info.resources
8495 --- if resources then
8496 --- local val = scanner:pop()
8497 --- local name = val[2]
8498 --- local xobject = resources.XObject
8499 --- print(info.space .. "Uses XObject " .. name)
8500 --- local resources = xobject.Resources
8501 --- if resources then local newinfo = { space = info.space .. " ", resources = resources, } pdfscanner.scan(entry, operatortable, newinfo)
8502 --- end
8503 --- end
8504 ---end
8505 ---
8506 ---local function Analyze(filename)
8507 --- local doc = pdfe.open(filename)
8508 --- if doc then
8509 --- local pages = doc.Pages
8510 --- for i=1,#pages do local page = pages[i] local info = { space = " " , resources = page.Resources, } print("Page " .. i)
8511 --- -- pdfscanner.scan(page.Contents,operatortable,info) pdfscanner.scan(page.Contents(),operatortable,info)
8512 --- end
8513 --- end
8514 ---end
8515 ---
8516 ---Analyze("foo.pdf")
8517 ---```
8518 ---
8519 ---__Reference:__
8520 ---
8521 ---* Corresponding C source code: [lpdfscannerlib.c#L680-L828](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L680-L828)
8522 ---
8523 ---@param pdf string|PdfeStream|PdfeArray
8524 ---@param operatortable Operatorable
8525 ---@param info table
8526 ---
8527 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8528 function pdfscanner.scan(pdf, operatortable, info) end
8529
8530 ---
8531 ---@class Scanner
8532 ---
8533 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8534 local Scanner = {}
8535
8536 ---
8537 ---__Reference:__
8538 ---
8539 ---* Corresponding C source code: [lpdfscannerlib.c#L1063-L1069](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1063-L1069)
8540 ---
8541 ---@return any
8542 ---
8543 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8544 function Scanner:pop() end
8545
8546 ---
8547 ---Return only the value of a real or integer
8548 ---
8549 ---__Reference:__
8550 ---
8551 ---* Corresponding C source code: [lpdfscannerlib.c#L1013-L1021](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1013-L1021)
8552 ---
8553 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8554 function Scanner:popnumber() end
8555
8556 ---
8557 ---Return only the value of a name
8558 ---
8559 ---__Reference:__
8560 ---
8561 ---* Corresponding C source code: [lpdfscannerlib.c#L1039-L1045](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1039-L1045)
8562 ---
8563 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8564 function Scanner:popname() end
8565
8566 ---
8567 ---Return only the value of a string
8568 ---
8569 ---__Reference:__
8570 ---
8571 ---* Corresponding C source code: [lpdfscannerlib.c#L1031-L1037](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1031-L1037)
8572 ---
8573 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8574 function Scanner:popstring() end
8575
8576 ---
8577 ---Return only the value of a array
8578 ---
8579 ---__Reference:__
8580 ---
8581 ---* Corresponding C source code: [lpdfscannerlib.c#L1047-L1053](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1047-L1053)
8582 ---
8583 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8584 function Scanner:poparray() end
8585
8586 ---
8587 ---Return only the value of a dict
8588 ---
8589 ---__Reference:__
8590 ---
8591 ---* Corresponding C source code: [lpdfscannerlib.c#L1055-L1061](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1055-L1061)
8592 ---
8593 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8594 function Scanner:popdictionary() end
8595
8596 ---
8597 ---Return only the value of a boolean
8598 ---
8599 ---__Reference:__
8600 ---
8601 ---* Corresponding C source code: [lpdfscannerlib.c#L1023-L1029](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L1023-L1029)
8602 ---
8603 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8604 function Scanner:popboolean() end
8605
8606 ---
8607 ---Abort further processing of this scan() call
8608 ---
8609 ---__Reference:__
8610 ---
8611 ---* Corresponding C source code: [lpdfscannerlib.c#L830-L836](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfscannerlib.c#L830-L836)
8612 ---
8613 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8614 function Scanner:done() end
8615
8616 ---
8617 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfscanner.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8618 ---@alias Operatorable table<string, fun(scanner: Scanner, info: table)>
8619 ---
8620 ---This library contains a number of run-time configuration items that you may find useful in message
8621 ---reporting, as well as an iterator function that gets all of the names and values as a `table`.
8622 ---
8623 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/status.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8624 status = {}
8625
8626 ---
8627 ---__Reference:__
8628 ---
8629 ---* Corresponding C source code: [lstatslib.c#L289-L389](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstatslib.c#L289-L389)
8630 ---
8631 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/status.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8632 ---@class StatusInfo
8633 ---@field output_active boolean # `true` if the output routine is active, for example `false`.
8634 ---@field best_page_break Node # The current best break (a node)
8635 ---
8636 ---@field filename string # The name of the current input file , for example `./list.tex`.
8637 ---@field inputid integer # The numeric id of the current input, for example `2118770`.
8638 ---@field linenumber integer # The location in the current input file, for example `12`.
8639 ---
8640 ---@field lasterrorstring string # The last *TeX* error string.
8641 ---@field lastluaerrorstring string # The last *Lua* error string.
8642 ---@field lastwarningtag string # The last warning string.
8643 ---@field lastwarningstring string # The last warning tag, normally an indication of in what part.
8644 ---@field lasterrorcontext string # The last error context string (with newlines).
8645 ---
8646 ---@field pdf_gone integer # Written *PDF* bytes, for example `0`.
8647 ---@field pdf_ptr integer # Not yet written *PDF* bytes, for example `0`.
8648 ---@field dvi_gone integer # Written *DVI* bytes, for example `1631423304`.
8649 ---@field dvi_ptr integer # Not yet written *DVI* bytes, for example `-1858237624`.
8650 ---
8651 ---@field total_pages integer # The total pages of written pages, for example `0`.
8652 ---@field output_file_name string # The name of the *PDF* or *DVI* file.
8653 ---@field log_name string # The name of the log file, for example `list.log`.
8654 ---@field banner string # The terminal display banner, for example `This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)`.
8655 ---@field luatex_version integer # The *LuaTeX* version number, for example `115`.
8656 ---@field luatex_revision integer # The *LuaTeX* revision string.
8657 ---@field development_id integer # for example `7509`.
8658 ---@field luatex_hashtype string # The hash method used (in *Lua*JITTEX), for example `lua`.
8659 ---@field luatex_hashchars integer # The length to which *Lua* hashes strings (`2^n`), for example `6`.
8660 ---@field luatex_engine string # The *LuaTeX* engine identifier, for example `luahbtex`.
8661 ---
8662 ---@field ini_version boolean # `true` if this is an *iniTeX* run, for example `false`.
8663 ---
8664 ---@field shell_escape integer # `0` means disabled, `1` means anything is permitted, and `2` is restricted, for example `2`.
8665 ---@field safer_option integer # `1` means safer is enforced, for example `0`.
8666 ---@field kpse_used integer # `1` means that kpse is used, for example `1`.
8667 ---
8668 ---@field var_used integer # The variable (one-word) memory in use, for example `309`.
8669 ---@field dyn_used integer # The token (multi-word) memory in use, for example `383564`.
8670 ---
8671 ---@field str_ptr integer # The string pointer, for example `2119239`.
8672 ---@field init_str_ptr integer # The *iniTeX* string pointer, for example `2118768`.
8673 ---@field max_strings integer # The maximum allowed strings, for example `500000`.
8674 ---@field pool_ptr string # The pool index, for example `393692`.
8675 ---@field init_pool_ptr integer # The *iniTeX* string pool index, for example `0`.
8676 ---@field pool_size integer # The current size allocated for string characters, for example `20000`.
8677 ---@field var_mem_max integer # Maximum variable memory of allocated words for nodes, for example `100000`.
8678 ---@field node_mem_usage string # A string giving insight into currently used nodes, for example `2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 3 attribute, 48 glue_spec, 3 attribute_list, 1 write`.
8679 ---@field fix_mem_max integer # The maximum number of allocated words for tokens, for example `1977958`.
8680 ---@field fix_mem_min integer # The minimum number of allocated words for tokens, for example `0`.
8681 ---@field fix_mem_end integer # maximum number of used tokens, for example `1869998`.
8682 ---@field cs_count integer # The count of control sequences, for example `20658`.
8683 ---@field hash_size integer # The size of the hash, for example `65536`.
8684 ---@field hash_extra integer # The extra allowed hash, for example `600000`.
8685 ---@field font_ptr integer # The active fonts pointer, for example `15`.
8686 ---@field max_in_stack integer # The maximum of the used input stack entries, for example `33`.
8687 ---@field max_nest_stack integer # The maximum of the used nesting stack entries, for example `0`.
8688 ---@field max_param_stack integer # The maximum of the used parameter stack entries, for example `37`.
8689 ---@field max_buf_stack integer # The maximum used buffer position, for example `126`.
8690 ---@field max_save_stack integer # The maximum of the used save stack entries, for example `50`.
8691 ---@field stack_size integer # The input stack size, for example `10000`.
8692 ---@field nest_size integer # The nesting stack size, for example `1000`.
8693 ---@field param_size integer # The parameter stack size, for example `20000`.
8694 ---@field buf_size integer # The current allocated size of the line buffer, for example `200000`.
8695 ---@field save_size integer # The save stack size, for example `200000`.
8696 ---@field input_ptr integer # The level of input we're at, for example `1`.
8697 ---@field obj_ptr integer # The *PDF* object pointer.
8698 ---@field obj_tab_size integer # The *PDF* object table size, for example `1000`.
8699 ---@field pdf_os_cntr integer # The *PDF* object stream pointer, for example `0`.
8700 ---@field pdf_os_objidx integer # The *PDF* object stream index, for example `0`.
8701 ---@field pdf_dest_names_ptr integer # max *PDF* destination pointer, for example `0`.
8702 ---@field dest_names_size integer # The *PDF* destination table size, for example `1000`.
8703 ---@field pdf_mem_ptr integer # The *PDF* memory used, for example `1`.
8704 ---@field pdf_mem_size integer # The *PDF* memory size, for example `10000`.
8705 ---@field largest_used_mark integer # The largest referenced marks class, for example `0`.
8706 ---@field luabytecodes integer # The active *Lua* bytecode registers, for example `1`.
8707 ---@field luabytecode_bytes integer # The used bytes in the *Lua* bytecode registers, for example `32`.
8708 ---@field luastate_bytes integer # The bytes in use by *Lua* interpreters, for example `54667449`.
8709 ---
8710 ---@field callbacks integer # The total number of executed callbacks so far, for example `9`.
8711 ---@field indirect_callbacks integer # The total number of those callbacks that were themselves a result of other callbacks (e.g. file readers), for example `0`.
8712 ---
8713 ---@field saved_callbacks integer # alias for `indirect_callbacks` for example `0`.
8714 ---@field late_callbacks integer # for example `0`.
8715 ---@field direct_callbacks integer for example `10`.
8716 ---@field function_callbacks integer # of active fonts, for example `238`.
8717 ---
8718 ---@field lc_collate string # the value of `LC_COLLATE` at startup time (becomes `C` at startup), for example `en_US.UTF-8`.
8719 ---@field lc_ctype string # the value of `LC_CTYPE` at startup time (becomes `C` at startup), for example `en_US.UTF-8`.
8720 ---@field lc_numeric string # the value of `LC_NUMERIC` at startup time, for example `de_DE.UTF-8`.
8721
8722 ---
8723 ---The keys in the table are the known items, the value is the current value. Almost
8724 ---all of the values in `status` are fetched through a metatable at run-time
8725 ---whenever they are accessed, so you cannot use `pairs` on `status`,
8726 ---but you can use `pairs` on `info`, of course. If you do not
8727 ---need the full list, you can also ask for a single item by using its name as an
8728 ---index into `status`.
8729 ---
8730 ---__Example:__
8731 ---
8732 ---```tex
8733 ---\catcode`_=12
8734 ---\directlua{
8735 --- info = status.list()
8736 --- for key, value in pairs(info) do
8737 --- tex.print('"' .. key .. '": '.. tostring(value), '\string\\par')
8738 --- end
8739 ---}
8740 ---```
8741 ---
8742 ---__Reference:__
8743 ---
8744 ---* Corresponding C source code: [lstatslib.c#L476-L488](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstatslib.c#L476-L488)
8745 ---
8746 ---@return StatusInfo
8747 ---
8748 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/status.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8749 function status.list() end
8750
8751 ---
8752 ---Wipe error and warning messages.
8753 ---
8754 ---__Reference:__
8755 ---
8756 ---* Corresponding C source code: [lstatslib.c#L490-L501](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstatslib.c#L490-L501)
8757 ---
8758 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/status.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8759 function status.resetmessages() end
8760
8761 ---
8762 ---Set the exit code.
8763 ---
8764 ---__Reference:__
8765 ---
8766 ---* Corresponding C source code: [lstatslib.c#L503-L506](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstatslib.c#L503-L506)
8767 ---
8768 ---@param code integer
8769 ---
8770 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/status.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
8771 function status.setexitcode(code) end
8772
8773 ---
8774 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/gzip.lua
8775 gzip = {}
8776
8777 ---
8778 ---Open a file name using `gzopen`.
8779 ---
8780 ---Behaviour is identical to the description
8781 ---given in the `zlib` library.
8782 ---
8783 ---The `mode` parameter is as in fopen (`rb` or `wb`) but can also include a compression level (`wb9`) or a strategy: 'f' for filtered data as in `wb6f`, `h` for Huffman-only compression as in `wb1h`, `R` for run-length encoding as in `wb1R`, or `F` for fixed code compression as in `wb9F`. (See the description of deflateInit2 for more information about the strategy parameter.) `T` will request transparent writing or appending with no compression and not using the gzip format.
8784 ---
8785 ---`a` can be used instead of `w` to request that the gzip stream that will be written be appended to the file. `+` will result in an error, since reading and writing to the same gzip file is not supported. The addition of `x` when writing will create the file exclusively, which fails if the file already exists. On systems that support it, the addition of `e` when reading or writing will set the flag to close the file on an `execve()` call.
8786 ---
8787 ---It returns a new file handle, or, in case of errors, `nil` plus an error
8788 ---message
8789 ---
8790 ---__Example:__
8791 ---
8792 ---```lua
8793 ---local g_file = gzip.open('test.gz', 'wb9')
8794 ---assert(g_file)
8795 ---for i = 1, 10 do
8796 --- g_file:write('This is line ' .. i, '\n')
8797 ---end
8798 ---g_file:close()
8799 ---```
8800 ---
8801 ---__Reference:__
8802 ---
8803 ---* Corresponding C source code: [lgzip.c#L132-L138](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L132-L138)
8804 ---* zlib manual [manual.html](https://zlib.net/manual.html)
8805 ---
8806 ---@param filename string
8807 ---@param mode? string
8808 ---
8809 ---@return GFile|nil
8810 ---@return nil|string err
8811 function gzip.open(filename, mode) end
8812
8813 ---
8814 ---Same behaviour as io.lines in the `io` standard library provided by lua
8815 ---with the aditional feature of working with gzip files. If a normal text
8816 ---file is read it will read it normaly (normal gzopen behaviour).
8817 ---
8818 ---__Example:__
8819 ---
8820 ---```lua
8821 ---for line in gzip.lines('test.gz') do
8822 --- print(line)
8823 ---end
8824 ---```
8825 ---
8826 ---__Reference:__
8827 ---
8828 ---* Corresponding C source code: [lgzip.c#L159-L166](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L159-L166)
8829 ---
8830 ---@see io.lines
8831 ---
8832 ---@param filename string
8833 ---
8834 ---@return fun(): string
8835 function gzip.lines(filename) end
8836
8837 ---
8838 ---Close the file.
8839 ---
8840 ---__Example:__
8841 ---
8842 ---```lua
8843 ---local g_file = gzip.open('test.gz', 'rb')
8844 ---assert(g_file)
8845 ---local success = gzip.close(g_file)
8846 ---assert(success == true)
8847 ----- gzip.close(g_file) -> attempt to use a closed file
8848 ---```
8849 ---
8850 ---__Reference:__
8851 ---
8852 ---* Corresponding C source code: [lgzip.c#L107-L109](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L107-L109)
8853 ---
8854 ---@see GFile.close
8855 ---
8856 ---@param file GFile
8857 ---
8858 ---@return true success
8859 function gzip.close(file) end
8860
8861 ---
8862 ---@class GFile
8863 local GFile = {}
8864
8865 ---
8866 ---This function takes no parameters and flushes all output to working file.
8867 ---The same as calling 'gzflush(file, Z_FINISH)' so writing to the file will
8868 ---most likely not work as expected. This is subject to change in the future
8869 ---if there is a strong reason for it to happen.
8870 ---
8871 ---__Reference:__
8872 ---
8873 ---* Corresponding C source code: [lgzip.c#L327-L329](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L327-L329)
8874 function GFile:flush() end
8875
8876 ---
8877 ---Reads the file file, according to the given formats, which specify what
8878 ---to read. For each format, the function returns a string with the characters
8879 ---read, or nil if it cannot read data with the specified format. When called
8880 ---without formats, it uses a default format that reads the entire next line
8881 ---(see below).
8882 ---
8883 ---The available formats are
8884 ---
8885 ---`*a` reads the whole file, starting at the current position. On end of
8886 ---file, it returns the empty string.
8887 ---`*l` reads the next line (skipping the end of line), returning nil on
8888 ---end of file. This is the default format.
8889 ---number reads a string with up to that number of characters, returning
8890 ---nil on end of file. If number is zero, it reads nothing and
8891 ---returns an empty string, or nil on end of file.
8892 ---
8893 ---Unlink io.read, the `*n` format will not be available.
8894 ---
8895 ---__Reference:__
8896 ---
8897 ---* Corresponding C source code: [lgzip.c#L263-L265](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L263-L265)
8898 ---
8899 function GFile:read(format1, ...) end
8900
8901 ---
8902 ---Returns an iterator function that, each time it is called, returns a new
8903 ---line from the file. Therefore, the construction
8904 ---for line in file:lines() do ... end
8905 ---will iterate over all lines of the file. (Unlike gzip.lines, this function
8906 ---does not close the file when the loop ends.)
8907 ---
8908 ---__Reference:__
8909 ---
8910 ---* Corresponding C source code: [lgzip.c#L152-L156](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L152-L156)
8911 ---
8912 function GFile:lines() end
8913
8914 ---
8915 ---Sets and gets the file position, measured from the beginning of the file,
8916 ---to the position given by offset plus a base specified by the string whence,
8917 ---as follows:
8918 ---
8919 ---`set` base is position 0 (beginning of the file);
8920 ---`cur` base is current position;
8921 ---
8922 ---In case of success, function seek returns the final file position, measured in bytes from the beginning of ---the file. If this function fails, it returns nil, plus a string describing the error.
8923 ---The default value for whence is `cur`, and for offset is 0. Therefore, the call file:seek() returns the ---current file position, without changing it; the call file:seek("set") sets the position to the beginning of ---the file (and returns 0); and the call file:seek("end") sets the position to the end of the file, and ---returns its size.
8924 ---
8925 ---This function is subject to limitations imposed by `gzseek` function from
8926 ---`zlib` library, such as the inability to use `end` as the base for seeking
8927 ---and the inability to seek backwards when writing.
8928 ---
8929 ---__Reference:__
8930 ---
8931 ---* Corresponding C source code: [lgzip.c#L310-L324](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L310-L324)
8932 ---
8933 function GFile:seek(whence, offset) end
8934
8935 ---
8936 ---Write the value of each of its arguments to the filehandle file.
8937 ---
8938 ---The
8939 ---arguments must be strings or numbers. To write other values, use tostring
8940 ---or string.format before write
8941 ---
8942 ---__Example:__
8943 ---
8944 ---```lua
8945 ---local g_file = gzip.open('test.gz', 'wb9')
8946 ---assert(g_file)
8947 ---for i = 1, 10 do
8948 --- g_file:write('This is line ' .. i, '\n')
8949 --end
8950 ---g_file:close()
8951 ---```
8952 ---
8953 ---__Reference:__
8954 ---
8955 ---* Corresponding C source code: [lgzip.c#L305-L307](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lgzip.c#L305-L307)
8956 function GFile:write(value1, ...) end
8957
8958 ---
8959 ---Close the file.
8960 ---
8961 ---__Example:__
8962 ---
8963 ---```lua
8964 ---local g_file = gzip.open('test.gz', 'wb9')
8965 ---assert(g_file)
8966 ---for i = 1, 10 do
8967 --- g_file:write('This is line ' .. i, '\n')
8968 ---end
8969 ---g_file:close()
8970 ---```
8971 function GFile:close() end
8972
8973 ---
8974 ---https://github.com/TeX-Live/luatex/tree/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luamd5
8975 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/517487384d3b0b4b003fb3180ea415f52eeb5f5f/source/texk/web2c/luatexdir/lua/luatex-core.lua#L220-L241
8976 ---Changes to upstream:
8977 ---* local md5 table
8978 ---* additional function md5.sumHEXA()
8979
8980 ---
8981 ---The definitions are developed in this repository: https://github.com/LuaCATS/md5
8982
8983 ---
8984 ---`md5`, by Roberto Ierusalimschy http://www.inf.puc-rio.br/~roberto/md5/md5-5/md5.html.
8985 ---
8986 ---This library offers basic cryptographic facilities for Lua 5.0: a hash (digest) function, an a pair crypt/decrypt.
8987 ---
8988 ---All functions are registered inside a table `md5`.
8989 ---
8990 ---😱 [Types](https://github.com/LuaCATS/md5/blob/main/library/md5.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/md5/pulls)
8991 md5 = {}
8992
8993 ---
8994 ---Compute the MD5 message-digest of the string `message`.
8995 ---
8996 ---This function takes as input a message of arbitrary length and content
8997 ---and returns as output a 128-bit "fingerprint" (or "message digest")
8998 ---of the input.
8999 ---
9000 ---The output is formated as a binary string with 16 characters.
9001 ---It is conjectured that it is computationally infeasible to produce
9002 ---two messages having the same message digest, or to produce any
9003 ---message having a given pre-specified target message digest.
9004 ---(see
9005 ---RFC 1321)
9006 ---
9007 ---__Example:__
9008 ---
9009 ---```lua
9010 ---local function convert_to_hex(str)
9011 --- return (str:gsub('.', function (c)
9012 --- return string.format('%02X', string.byte(c))
9013 --- end))
9014 ---end
9015 ---local hash = convert_to_hex(md5.sum('test'))
9016 ---assert(hash == '098F6BCD4621D373CADE4E832627B4F6')
9017 ---```
9018 ---
9019 ---@param message string
9020 ---
9021 ---@return string
9022 ---
9023 ---😱 [Types](https://github.com/LuaCATS/md5/blob/main/library/md5.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/md5/pulls)
9024 function md5.sum(message) end
9025
9026 ---
9027 ---Compute the MD5 lower case hexadecimal message-digest of the string `message`.
9028 ---
9029 ---Similar to `md5.sum()`,
9030 ---but returns its value as a string of 32 hexadecimal digits (lower case letters).
9031 ---
9032 ---__Example:__
9033 ---
9034 ---```lua
9035 ---local hash = md5.sumhexa('test')
9036 ---assert(hash == '098f6bcd4621d373cade4e832627b4f6')
9037 ---```
9038 ---
9039 ---@param message string
9040 ---
9041 ---@return string # for example `098f6bcd4621d373cade4e832627b4f6`
9042 ---
9043 ---😱 [Types](https://github.com/LuaCATS/md5/blob/main/library/md5.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/md5/pulls)
9044 function md5.sumhexa(message) end
9045
9046 ---
9047 ---Compute the MD5 upper case hexadecimal message-digest of the string `message`.
9048 ---
9049 ---Similar to `md5.sum()`
9050 ---but returns its value as a string of 32 hexadecimal digits (upper case letters).
9051 ---
9052 ---__Example:__
9053 ---
9054 ---```lua
9055 ---local hash = md5.sumHEXA('test')
9056 ---assert(hash == '098F6BCD4621D373CADE4E832627B4F6')
9057 ---```
9058 ---
9059 ---@param message string
9060 ---
9061 ---@return string # for example `098F6BCD4621D373CADE4E832627B4F6`
9062 function md5.sumHEXA(message) end
9063
9064 ---
9065 ---Encrypt a string, using MD5 in CFB (Cipher-feedback mode).
9066 ---
9067 ---`message` is an arbitrary binary string to be encrypted.
9068 ---`key` is an arbitrary binary string to be used as a key.
9069 ---`seed` is an arbitrary binary string to be used as a seed;
9070 ---Returns the cyphertext (as a binary string).
9071 ---
9072 ---If no seed is provided,
9073 ---the function uses the result of `os.time()` as a seed.
9074 ---It is recommended that you use different seeds for each message;
9075 ---the seed itself is not private, and should contain no private data,
9076 ---because it goes plain in the beginning of the encrypted message.
9077 ---
9078 ---The length of the cyphertext is the length of the message plus the
9079 ---length of the seed plus one.
9080 ---
9081 ---__Example:__
9082 ---
9083 ---```lua
9084 ---local function convert_to_hex(str)
9085 --- return (str:gsub('.', function(c)
9086 --- return string.format('%02X', string.byte(c))
9087 --- end))
9088 ---end
9089 ---
9090 ---local result = convert_to_hex(md5.crypt('secret', '123', 'seed'))
9091 ---assert(result == '0473656564974C4C1B3848')
9092 ---```
9093 ---
9094 ---@param message string # An arbitrary binary string to be encrypted.
9095 ---@param key string # An arbitrary binary string to be used as a key.
9096 ---@param seed? string # An optional arbitrary binary string to be used as a seed. If no seed is provided, the function uses the result of `time()` as a seed.
9097 ---
9098 ---@return string cyphertext # The cyphertext (as a binary string).
9099 ---
9100 ---😱 [Types](https://github.com/LuaCATS/md5/blob/main/library/md5.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/md5/pulls)
9101 function md5.crypt(message, key, seed) end
9102
9103 ---
9104 ---Decrypt a string.
9105 ---
9106 ---The input `message` must be the result of a previous call
9107 ---to `crypt`.
9108 ---For any `message`, `key`,
9109 ---and `seed`, we have that
9110 ---
9111 ---```lua
9112 ---local encrypted = md5.crypt('message', '123', 'seed')
9113 ---local message = md5.decrypt(encrypted, '123')
9114 ---assert(message == 'message')
9115 ---```
9116 ---
9117 ---@param message string # message to be decrypted (this must be the result of a previous call to `crypt`).
9118 ---@param key string # arbitrary binary string to be used as a key.
9119 ---
9120 ---@return string plaintext # The plaintext.
9121 ---
9122 ---😱 [Types](https://github.com/LuaCATS/md5/blob/main/library/md5.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/md5/pulls)
9123 function md5.decrypt(message, key) end
9124
9125 ---
9126 ---Do a bit-a-bit exclusive `or` of strings `s1` and `s2`.
9127 ---
9128 ---Both strings must have the same length,
9129 ---which will be also the length of the resulting string.
9130 ---
9131 ---__Example:__
9132 ---
9133 ---```lua
9134 ---assert(md5.exor('', '') == '')
9135 ---assert(md5.exor('alo alo', '\0\0\0\0\0\0\0') == 'alo alo')
9136 ---```
9137 ---
9138 ---@param s1 string # arbitrary binary string.
9139 ---@param s2 string # arbitrary binary string with same length as `s1`.
9140 ---
9141 ---@return string # a binary string with same length as `s1` and `s2`, where each bit is the exclusive `or` of the corresponding bits in `s1`-`s2`.
9142 ---
9143 ---😱 [Types](https://github.com/LuaCATS/md5/blob/main/library/md5.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/md5/pulls)
9144 function md5.exor(s1, s2) end
9145 ---
9146 ---The `string` library has a few extra functions.
9147 ---
9148 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9149 string = {}
9150
9151 ---
9152 ---Break a string into pieces.
9153 ---
9154 ---This functions splits a stringa into sub-strings based
9155 ---on the value of the string argument `separator`.
9156 ---The second argument is a string that is either empty (this splits the string into
9157 ---characters), a single character (this splits on each occurrence of that
9158 ---character, possibly introducing empty strings), or a single character followed by
9159 ---the plus sign `+` (this special version does not create empty sub-strings).
9160 ---The default value for `separator` is ` +` (multiple spaces). Note:
9161 ---`separator` is not hidden by surrounding braces as it would be if this function was
9162 ---written in *TeX* macros.
9163 ---
9164 ---__Example:__
9165 ---
9166 ---```lua
9167 ---for _, word in ipairs(string.explode("one two three")) do
9168 --- print(word)
9169 ---end
9170 ----- one
9171 ----- two
9172 ----- three
9173 ---
9174 ---for _, word in ipairs(string.explode("one,,two,three", ',')) do
9175 --- print(word)
9176 ---end
9177 ---
9178 ----- one
9179 -----
9180 ----- two
9181 ----- three
9182 ---
9183 ---for _, word in ipairs(string.explode("one,,two,three", ',+')) do
9184 --- print(word)
9185 ---end
9186 ----- one
9187 ----- two
9188 ----- three
9189 ---```
9190 ---
9191 ---__Reference:__
9192 ---
9193 ---* Corresponding C source code: [lstrlibext.c#L247-309](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/source/texk/web2c/luatexdir/lua/lstrlibext.c#L247-309)
9194 ---* https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L399-409
9195 ---
9196 ---@param text string # A text that is to be divided into several substrings.
9197 ---@param separator? string # A separator that is used to split the string (default ` +`).
9198 ---
9199 ---@return string[]
9200 ---
9201 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9202 function string.explode(text, separator) end
9203
9204 ---
9205 ---Return the Unicode codepoints of the characters in the given string.
9206 ---
9207 ---__Example:__
9208 ---
9209 ---```lua
9210 ---local a = string.utfvalue("abc")
9211 ---print(a) -- 97
9212 ---
9213 ---local a, b, c = string.utfvalue("abc")
9214 ---print(a, b, c) -- 97 98 99
9215 ---
9216 ---print(string.utfvalue("abc")) -- 97 98 99
9217 ---```
9218 ---
9219 ---__Reference:__
9220 ---
9221 ---* Corresponding C source code: [lstrlibext.c#L421-L461](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L421-L461)
9222 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L418](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L418)
9223 ---
9224 ---@see string.utfvalues
9225 ---
9226 ---@param text string # The input string.
9227 ---
9228 ---@return integer, integer ... # The Unicode codepoints of the characters in the given string.
9229 ---
9230 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9231 function string.utfvalue(text) end
9232
9233 ---
9234 ---Provide an iterator function that iterates over each character of the
9235 ---string by returning an integer value in the Unicode range.
9236 ---
9237 ---__Example:__
9238 ---
9239 ---```lua
9240 ---for code_point in string.utfvalues("abc") do
9241 --- print(code_point)
9242 ---end
9243 ----- 97
9244 ----- 98
9245 ----- 99
9246 ---```
9247 ---__Reference:__
9248 ---
9249 ---* Corresponding C source code: [lstrlibext.c#L183-L189](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L183-L189)
9250 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L418](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L418)
9251 ---
9252 ---@see string.utfvalue
9253 ---
9254 ---@param text string # The input string.
9255 ---
9256 ---@return fun(): integer code_point # an integer value in the *Unicode* range
9257 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9258 function string.utfvalues(text) end
9259
9260 ---
9261 ---Convert multiple unicode code points into a string.
9262 ---
9263 ---__Example:__
9264 ---
9265 ---```
9266 ---print(string.utfcharacter(97, 98, 99)) -- abc
9267 ---```
9268 ---
9269 ---__Reference:__
9270 ---
9271 ---* Corresponding C source code: [lstrlibext.c#L402-L412](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L402-L412)
9272 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L421](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L421)
9273 ---
9274 ---@param code_point integer # A Unicode code point
9275 ---@param ... integer # For each character a integer argument
9276 ---
9277 ---@return string # A string with the characters of the given code points.
9278 ---
9279 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9280 function string.utfcharacter(code_point, ...) end
9281
9282 ---
9283 ---Provide an iterator function that iterates over each character of the
9284 ---string by returning a string with a single UTF-8 token in it.
9285 ---
9286 ---__Example:__
9287 ---
9288 ---```lua
9289 ---for character in string.utfcharacters("\u{61}\u{62}\u{63}") do
9290 --- print(character)
9291 ---end
9292 ----- a
9293 ----- b
9294 ----- c
9295 ---```
9296 ---
9297 ---__Reference:__
9298 ---
9299 ---* Corresponding C source code: [lstrlibext.c#L128-L134](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L128-L134)
9300 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L469-470](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L469-470)
9301 ---
9302 ---@param text string # The input string.
9303 ---
9304 ---@return fun(): string character # a string with a single *UTF-8* token in it
9305 ---
9306 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9307 function string.utfcharacters(text) end
9308
9309 ---
9310 ---Return the length of the given string.
9311 ---
9312 ---__Example:__
9313 ---
9314 ---```lua
9315 ---print(string.len("äöü"))
9316 ---print(string.utflength("äöü"))
9317 ---```
9318 ---
9319 ---__Reference:__
9320 ---
9321 ---* Corresponding C source code: [lstrlibext.c#L465-L488](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L465-L488)
9322 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L473](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L473)
9323 ---
9324 ---@param text string # The input string.
9325 ---
9326 ---@return integer # The length of the given string
9327 ---
9328 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9329 function string.utflength(text) end
9330
9331 ---
9332 ---Provide an iterator function that iterates over each character of the
9333 ---string by returning a string containing __one byte__.
9334 ---
9335 ---__Example:__
9336 ---
9337 ---```lua
9338 ---for character in string.characters('abc') do
9339 --- print(character)
9340 ---end
9341 ----- a
9342 ----- b
9343 ----- c
9344 ---
9345 ---for character in string.characters('äöü') do
9346 --- print(character)
9347 ---end
9348 ----- �
9349 ----- �
9350 ----- �
9351 ----- �
9352 ----- �
9353 ----- �
9354 ---```
9355 ---
9356 ---__Reference:__
9357 ---
9358 ---* Corresponding C source code: [lstrlibext.c#L239-L245](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L239-L245)
9359 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L424](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L424)
9360 ---
9361 ---@see string.bytes
9362 ---
9363 ---@param text string # The input string.
9364 ---
9365 ---@return fun(): string # A string containing __one byte__.
9366 ---
9367 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9368 function string.characters(text) end
9369
9370 ---
9371 ---Provide an iterator function that iterates over each character of the
9372 ---string by returning two strings.
9373 ---
9374 ---Each of these returned strings contains __one byte__ or an __empty__
9375 ---second string if the input string length was odd.
9376 ---
9377 ---__Example:__
9378 ---
9379 ---```lua
9380 ---for c1, c2 in string.characterpairs('äöü') do
9381 --- print(c1, c2)
9382 --- print(c1 .. c2)
9383 ---end
9384 ----- � �
9385 ----- ä
9386 ----- � �
9387 ----- ö
9388 ----- � �
9389 ----- ü
9390 ---
9391 ---for c1, c2 in string.characterpairs('a') do
9392 --- print("'" .. c1 .. "'", "'" .. c2 .. "'")
9393 ---end
9394 ----- 'a' ''
9395 ---```
9396 ---
9397 ---__Reference:__
9398 ---
9399 ---* Corresponding C source code: [lstrlibext.c#L216-L222](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L216-L222)
9400 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L427-428](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L427-428)
9401 ---
9402 ---@see string.bytepairs
9403 ---
9404 ---@param text string # The input string.
9405 ---
9406 ---@return fun(): string, string # Two strings of __one byte__ each, or an __empty__ second string if the string length was odd.
9407 ---
9408 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9409 function string.characterpairs(text) end
9410
9411 ---
9412 ---Provide an iterator function that iterates over each character of the
9413 ---string by returning a single byte value.
9414 ---
9415 ---__Example:__
9416 ---
9417 ---```lua
9418 ---for byte in string.bytes('abc') do
9419 --- print(byte)
9420 ---end
9421 ----- 97
9422 ----- 98
9423 ----- 99
9424 ---
9425 ---for byte in string.bytes('äöü') do
9426 --- print(byte)
9427 ---end
9428 ----- 195
9429 ----- 164
9430 ----- 195
9431 ----- 182
9432 ----- 195
9433 ----- 188
9434 ---```
9435 ---
9436 ---__Reference:__
9437 ---
9438 ---* Corresponding C source code: [lstrlibext.c#L85-L91](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L85-L91)
9439 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L431](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L431)
9440 ---
9441 ---@see string.characters
9442 ---
9443 ---@param text string # The input string.
9444 ---
9445 ---@return fun(): integer # A single byte value.
9446 ---
9447 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9448 function string.bytes(text) end
9449
9450 ---
9451 ---Provide an iterator function that iterates over each character of the
9452 ---string by returning two byte values or `nil`.
9453 ---
9454 ---If the input string has an odd length, `nil` is returned.
9455 ---
9456 ---__Example:__
9457 ---
9458 ---```lua
9459 ---for b1, b2 in string.bytepairs('abc') do
9460 --- print(b1, b2)
9461 ---end
9462 ----- 97 98
9463 ----- 99 nil
9464 ---
9465 ---for b1, b2 in string.bytepairs('äöü') do
9466 --- print(b1, b2)
9467 ---end
9468 ----- 195 164
9469 ----- 195 182
9470 ----- 195 188
9471 ---```
9472 ---
9473 ---__Reference:__
9474 ---
9475 ---* Corresponding C source code: [lstrlibext.c#L62-L68](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lstrlibext.c#L62-L68)
9476 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L434-435](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-lua.tex#L434-435)
9477 ---
9478 ---@see string.characterpairs
9479 ---
9480 ---@param text string # The input string.
9481 ---
9482 ---@return fun(): integer, integer|nil # Two byte values or `nil` as the second return value if the input string length was odd.
9483 ---
9484 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/string.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9485 function string.bytepairs(text) end
9486 ---
9487 ---# Binary input from strings with `sio`
9488 ---
9489 ---A similar set of function as in the `fio` library is available in the `sio` library: `sio.readcardinal1`, `sio.readcardinal2`,
9490 ---`sio.readcardinal3`, `sio.readcardinal4`, `sio.readcardinaltable`, `sio.readinteger1`, `sio.readinteger2`,
9491 ---`sio.readinteger3`, `sio.readinteger4`, `sio.readintegertable`, `sio.readfixed2`, `sio.readfixed4`,
9492 ---`sio.read2dot14`, `sio.setposition`, `sio.getposition`, `sio.skipposition`, `sio.readbytes` and
9493 ---`sio.readbytetable`. Here the first argument is a string instead of a
9494 ---file handle. More details can be found in the previous section.
9495 ---
9496 ---| | |
9497 ---|----------------------------|-------------------------------------|
9498 ---| `readcardinal1(s)` | a 1 byte unsigned integer |
9499 ---| `readcardinal2(s)` | a 2 byte unsigned integer |
9500 ---| `readcardinal3(s)` | a 3 byte unsigned integer |
9501 ---| `readcardinal4(s)` | a 4 byte unsigned integer |
9502 ---| `readcardinaltable(s,n,b)` | `n` cardinals of `b` bytes |
9503 ---| `readinteger1(s)` | a 1 byte signed integer |
9504 ---| `readinteger2(s)` | a 2 byte signed integer |
9505 ---| `readinteger3(s)` | a 3 byte signed integer |
9506 ---| `readinteger4(s)` | a 4 byte signed integer |
9507 ---| `readintegertable(s,n,b)` | `n` integers of `b` bytes |
9508 ---| `readfixed2(s)` | a 2 byte float (used in font files) |
9509 ---| `readfixed4(s)` | a 4 byte float (used in font files) |
9510 ---| `read2dot14(s)` | a 2 byte float (used in font files) |
9511 ---| `setposition(s,p)` | goto position `p` |
9512 ---| `getposition(s)` | get the current position |
9513 ---| `skipposition(s,n)` | skip `n` positions |
9514 ---| `readbytes(s,n)` | `n` bytes |
9515 ---| `readbytetable(f,n)` | `n` bytes |
9516 ---
9517 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9518 sio = {}
9519
9520 ---
9521 ---__Reference:__
9522 ---
9523 ---* Corresponding C source code: [liolibext.c#L124-L135](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L124-L135)
9524 ---
9525 ---@param s string
9526 ---
9527 ---@return integer # a 1 byte unsigned integer
9528 ---
9529 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9530 function sio.readcardinal1(s) end
9531
9532 ---
9533 ---__Reference:__
9534 ---
9535 ---* Corresponding C source code: [liolibext.c#L160-L172](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L160-L172)
9536 ---
9537 ---@param s string
9538 ---
9539 ---@return integer # a 2 byte unsigned integer
9540 ---
9541 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9542 function sio.readcardinal2(s) end
9543
9544 ---
9545 ---__Reference:__
9546 ---
9547 ---* Corresponding C source code: [liolibext.c#L212-L225](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L212-L225)
9548 ---
9549 ---@param s string
9550 ---
9551 ---@return integer # a 3 byte unsigned integer
9552 ---
9553 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9554 function sio.readcardinal3(s) end
9555
9556 ---
9557 ---__Reference:__
9558 ---
9559 ---* Corresponding C source code: [liolibext.c#L268-L282](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L268-L282)
9560 ---
9561 ---@param s string
9562 ---
9563 ---@return integer # a 4 byte unsigned integer
9564 ---
9565 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9566 function sio.readcardinal4(s) end
9567
9568 ---
9569 ---@param s string
9570 ---@param n integer
9571 ---@param b integer
9572 ---
9573 ---@return table<integer, integer>
9574 ---
9575 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9576 function sio.readcardinaltable(s, n, b) end
9577
9578 ---
9579 ---__Reference:__
9580 ---
9581 ---* Corresponding C source code: [liolibext.c#L124-L135](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L124-L135)
9582 ---
9583 ---little endian variant
9584 ---
9585 ---@param s string
9586 ---
9587 ---@return integer
9588 ---
9589 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9590 function sio.readcardinal1le(s) end
9591
9592 ---
9593 ---__Reference:__
9594 ---
9595 ---* Corresponding C source code: [liolibext.c#L173-L185](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L173-L185)
9596 ---
9597 ---little endian variant
9598 ---
9599 ---@param s string
9600 ---
9601 ---@return integer
9602 ---
9603 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9604 function sio.readcardinal2le(s) end
9605
9606 ---
9607 ---__Reference:__
9608 ---
9609 ---* Corresponding C source code: [liolibext.c#L226-L239](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L226-L239)
9610 ---
9611 ---little endian variant
9612 ---
9613 ---@param s string
9614 ---
9615 ---@return integer
9616 ---
9617 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9618 function sio.readcardinal3le(s) end
9619
9620 ---
9621 ---__Reference:__
9622 ---
9623 ---* Corresponding C source code: [liolibext.c#L283-L297](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L283-L297)
9624 ---
9625 ---little endian variant
9626 ---
9627 ---@param s string
9628 ---
9629 ---@return integer
9630 ---
9631 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9632 function sio.readcardinal4le(s) end
9633
9634 ---
9635 ---__Reference:__
9636 ---
9637 ---* Corresponding C source code: [liolibext.c#L444-L458](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L444-L458)
9638 ---
9639 ---@param s string
9640 ---
9641 ---@return integer # a 1 byte signed integer
9642 ---
9643 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9644 function sio.readinteger1(s) end
9645
9646 ---
9647 ---__Reference:__
9648 ---
9649 ---* Corresponding C source code: [liolibext.c#L485-L500](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L485-L500)
9650 ---
9651 ---@param s string
9652 ---
9653 ---@return integer # a 2 byte signed integer
9654 ---
9655 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9656 function sio.readinteger2(s) end
9657
9658 ---
9659 ---@param s string
9660 ---
9661 ---@return integer # a 3 byte signed integer
9662 ---
9663 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9664 function sio.readinteger3(s) end
9665
9666 ---
9667 ---@param s string
9668 ---
9669 ---@return integer # a 4 byte signed integer
9670 ---
9671 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9672 function sio.readinteger4(s) end
9673
9674 ---
9675 ---@param s string
9676 ---@param n integer
9677 ---@param b integer
9678 ---
9679 ---@return table<integer, integer>
9680 ---
9681 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9682 function sio.readintegertable(s, n, b) end
9683
9684 ---
9685 ---__Reference:__
9686 ---
9687 ---* Corresponding C source code: [liolibext.c#L444-L458](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L444-L458)
9688 ---little endian variant
9689 ---
9690 ---@param s string
9691 ---
9692 ---@return integer
9693 ---
9694 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9695 function sio.readinteger1le(s) end
9696
9697 ---
9698 ---__Reference:__
9699 ---
9700 ---* Corresponding C source code: [liolibext.c#L501-L516](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L501-L516)
9701 ---
9702 ---little endian variant
9703 ---
9704 ---@param s string
9705 ---
9706 ---@return integer
9707 ---
9708 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9709 function sio.readinteger2le(s) end
9710
9711 ---
9712 ---little endian variant
9713 ---
9714 ---@param s string
9715 ---
9716 ---@return integer
9717 ---
9718 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9719 function sio.readinteger3le(s) end
9720
9721 ---
9722 ---little endian variant
9723 ---
9724 ---@param s string
9725 ---
9726 ---@return integer
9727 ---
9728 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9729 function sio.readinteger4le(s) end
9730
9731 ---
9732 ---@param s string
9733 ---
9734 ---@return number
9735 ---
9736 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9737 function sio.readfixed2(s) end
9738
9739 ---
9740 ---@param s string
9741 ---
9742 ---@return number
9743 ---
9744 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9745 function sio.readfixed4(s) end
9746
9747 ---
9748 ---@param s string
9749 ---
9750 ---@return number
9751 ---
9752 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9753 function sio.read2dot14(s) end
9754
9755 ---
9756 ---@param s string
9757 ---@param p integer
9758 ---
9759 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9760 function sio.setposition(s, p) end
9761
9762 ---
9763 ---@param s string
9764 ---
9765 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9766 function sio.getposition(s) end
9767
9768 ---
9769 ---@param s string
9770 ---@param n integer
9771 ---
9772 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9773 function sio.skipposition(s, n) end
9774
9775 ---
9776 ---@param s string
9777 ---@param n integer
9778 ---
9779 ---@return integer ...
9780 ---
9781 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9782 function sio.readbytes(s, n) end
9783
9784 ---
9785 ---@param s string
9786 ---@param n integer
9787 ---
9788 ---@return table<integer, integer>
9789 ---
9790 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9791 function sio.readbytetable(s, n) end
9792
9793 ---
9794 ---@param s string
9795 ---
9796 ---@return string
9797 ---
9798 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9799 function sio.readline(s) end
9800
9801 ---
9802 ---This is a table that is created empty. A startup *Lua* script could
9803 ---fill this table with a number of settings that are read out by
9804 ---the executable after loading and executing the startup file.
9805 ---
9806 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9807 texconfig = {}
9808
9809 ---
9810 ---`false` totally disables \KPATHSEA\ initialisation, and enables
9811 ---interpretation of the following numeric key--value pairs. (only ever unset
9812 ---this if you implement {\it all\/} file find callbacks!)
9813 ---
9814 ---`shell_escape` string `'f'` Use `'y'` or `'t'` or `'1'` to enable `\write18` unconditionally, `'p'`
9815 ---to enable the commands that are listed in `shell_escape_commands`
9816 ---
9817 ---shell_escape_commands string Comma-separated list of command
9818 ---names that may be executed by `\write18` even if `shell_escape`
9819 ---is set to `'p'`. Do {\it not\/} use spaces around commas, separate any
9820 ---required command arguments by using a space, and use the \ASCII\ double quote
9821 ---(`"`) for any needed argument or path quoting
9822 ---@type boolean
9823 ---
9824 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9825 texconfig.kpse_init = true
9826
9827 ---
9828 ---Minimum pool space after TeX's own strings; must be at least 25000 less than pool_size, but doesn't need to be nearly that large.
9829 ---
9830 ---__Reference:__
9831 ---
9832 ---* [texmf.cnf#L810-L811](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf#L810-L811)
9833 ---
9834 ---@type integer
9835 ---
9836 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9837 texconfig.string_vacancies = 75000
9838
9839 ---
9840 ---Min pool space left after loading .fmt.
9841 ---
9842 ---__Reference:__
9843 ---
9844 ---* [texmf.cnf#L815](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf#L815)
9845 ---
9846 ---@type integer
9847 ---
9848 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9849 texconfig.pool_free = 5000
9850
9851 ---
9852 ---Maximum number of strings.
9853 ---
9854 ---__Reference:__
9855 ---
9856 ---* [texmf.cnf#L813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf#L813)
9857 ---
9858 ---@type integer
9859 ---
9860 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9861 texconfig.max_strings = 15000
9862
9863 ---
9864 ---Ensure at least this many strings are free after loading .fmt.
9865 ---
9866 ---__Reference:__
9867 ---
9868 ---* [texmf.cnf#L817](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf#L817)
9869 ---
9870 ---@type integer
9871 texconfig.strings_free = 100
9872
9873 ---
9874 ---simultaneous semantic levels (e.g., groups)
9875 ---
9876 ---__Reference:__
9877 ---
9878 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9879 ---
9880 ---@type integer
9881 ---
9882 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9883 texconfig.nest_size = 50
9884
9885 ---
9886 ---simultaneous input files and error insertions, also applies to MetaPost
9887 ---
9888 ---__Reference:__
9889 ---
9890 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9891 ---
9892 ---@type integer
9893 ---
9894 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9895 texconfig.max_in_open = 15
9896
9897 ---
9898 ---simultaneous macro parameters, also applies to MP
9899 ---
9900 ---__Reference:__
9901 ---
9902 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9903 ---
9904 ---@type integer
9905 ---
9906 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9907 texconfig.param_size = 60
9908
9909 ---
9910 ---for saving values outside current group
9911 ---
9912 ---__Reference:__
9913 ---
9914 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9915 ---
9916 ---@type integer
9917 ---
9918 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9919 texconfig.save_size = 4000
9920
9921 ---
9922 ---simultaneous input sources
9923 ---
9924 ---__Reference:__
9925 ---
9926 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9927 ---
9928 ---@type integer
9929 ---
9930 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9931 texconfig.stack_size = 300
9932
9933 ---
9934 ---These work best if they are the same as the I/O buffer size, but it doesn't matter much. Must be a multiple of 8.
9935 ---
9936 ---__Reference:__
9937 ---
9938 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9939 ---
9940 ---@type integer
9941 ---
9942 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9943 texconfig.dvi_buf_size = 16384
9944
9945 ---
9946 ---It's probably inadvisable to change these. At any rate, we must have:
9947 ---45 < error_line < 255;
9948 ---30 < half_error_line < error_line - 15;
9949 ---60 <= max_print_line;
9950 ---These apply to TeX, Metafont, and MetaPost.
9951 ---"max_print_line" applies to BibTeX family
9952 ---
9953 ---__Reference:__
9954 ---
9955 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9956 ---
9957 ---@type integer
9958 ---
9959 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9960 texconfig.error_line = 79
9961
9962 ---
9963 ---It's probably inadvisable to change these. At any rate, we must have:
9964 ---45 < error_line < 255;
9965 ---30 < half_error_line < error_line - 15;
9966 ---60 <= max_print_line;
9967 ---These apply to TeX, Metafont, and MetaPost.
9968 ---"max_print_line" applies to BibTeX family
9969 ---
9970 ---__Reference:__
9971 ---
9972 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9973 ---
9974 ---@type integer
9975 ---
9976 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9977 texconfig.half_error_line = 50
9978
9979 ---
9980 ---It's probably inadvisable to change these. At any rate, we must have:
9981 ---45 < error_line < 255;
9982 ---30 < half_error_line < error_line - 15;
9983 ---60 <= max_print_line;
9984 ---These apply to TeX, Metafont, and MetaPost.
9985 ---"max_print_line" applies to BibTeX family
9986 ---
9987 ---__Reference:__
9988 ---
9989 ---* [kpathsea/texmf.cnf](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/2f443efc11d9b87ec0592ddd64c90d9ad15ea498/source/texk/kpathsea/texmf.cnf)
9990 ---
9991 ---@type integer
9992 ---
9993 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
9994 texconfig.max_print_line = 79
9995
9996 ---
9997 ---Extra space for the hash table of control sequences.
9998 ---@type integer
9999 ---
10000 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10001 texconfig.hash_extra = 0
10002
10003 ---
10004 ---For pdftex and luatex: default resolution for bitmaps; commonly set via \pdfpkresolution when needed to be changed.
10005 ---@type integer
10006 ---
10007 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10008 texconfig.pk_dpi = 72
10009
10010 ---
10011 ---`false` disables *TeX*'s normal file open-close feedback (the
10012 ---assumption is that callbacks will take care of that)
10013 ---@type boolean
10014 ---
10015 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10016 texconfig.trace_file_names = true
10017
10018 ---
10019 ---do `file:line` style error messages
10020 ---@type boolean
10021 ---
10022 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10023 texconfig.file_line_error = false
10024
10025 ---
10026 ---abort run on the first encountered error
10027 ---@type boolean
10028 ---
10029 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10030 texconfig.halt_on_error = false
10031
10032 ---
10033 ---if no format name was given on the command line, this key will be tested first
10034 ---instead of simply quitting
10035 ---@type string
10036 ---
10037 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10038 texconfig.formatname = ""
10039
10040 ---
10041 ---if no input file name was given on the command line, this key will be tested
10042 ---first instead of simply giving up
10043 ---
10044 ---@type string
10045 ---
10046 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10047 texconfig.jobname = ""
10048
10049 ---
10050 ---character to put in front of traced macros (see next value)
10051 ---
10052 ---@type integer
10053 ---
10054 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10055 texconfig.level_chr = 0
10056
10057 ---
10058 ---when larger than zero the input nesting level will be shown when `\tracingmacros` is set; levels above this value will be clipped with
10059 ---the level shown up front
10060 ---
10061 ---Note: the numeric values that match web2c parameters are only used if `kpse_init` is explicitly set to `false`. In all other cases, the normal
10062 ---values from `texmf.cnf` are used.
10063 ---
10064 ---You can kick in your own nesting level visualizer, for instance:
10065 ---
10066 ---```
10067 ---callback.register("input_level_string",function(n)
10068 --- if tex.tracingmacros > 0 and tex.count.tracingstacklevels > 0 then
10069 --- if tex.tracingmacros > 1 then
10070 --- return "! " .. string.rep(">",n) .. " "
10071 --- end
10072 ---end)
10073 ---```
10074 ---
10075 ---Or, in sync with other engines (not checked):
10076 ---
10077 ---\newcount\tracingstacklevels
10078 ---
10079 ---```
10080 ---\directlua {
10081 --- callback.register("input_level_string", function(n)
10082 --- if tex.tracingmacros > 0 then
10083 --- local l = tex.count.tracingstacklevels
10084 --- if l > 0 then
10085 --- return string.rep(" ",l) .. string.rep(".",n-l)
10086 --- end
10087 --- end
10088 --- end)
10089 ---}
10090 ---```
10091 ---@type integer
10092 ---
10093 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texconfig.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10094 texconfig.level_max = 0
10095
10096 ---
10097 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luapeg/lpeg.c
10098 ---Changes to upstream: global lpeg table
10099
10100 ---
10101 ---The definitions are developed in this repository: https://github.com/LuaCATS/lpeg
10102
10103 ---
10104 ---This type definition is based on the [HTML documentation](http://www.inf.puc-rio.br/~roberto/lpeg/) of the LPeg library. A different HTML documentation can be found at http://stevedonovan.github.io/lua-stdlibs/modules/lpeg.html.
10105 ---
10106 ---*LPeg* is a new pattern-matching library for Lua,
10107 ---based on
10108 ---[Parsing Expression Grammars](https://bford.info/packrat/) (PEGs).
10109 ---This text is a reference manual for the library.
10110 ---For a more formal treatment of LPeg,
10111 ---as well as some discussion about its implementation,
10112 ---see
10113 ---[A Text Pattern-Matching Tool based on Parsing Expression Grammars](http://www.inf.puc-rio.br/~roberto/docs/peg.pdf).
10114 ---(You may also be interested in my
10115 ---[talk about LPeg](https://vimeo.com/1485123)
10116 ---given at the III Lua Workshop.)
10117 ---
10118 ---Following the Snobol tradition,
10119 ---LPeg defines patterns as first-class objects.
10120 ---That is, patterns are regular Lua values
10121 ---(represented by userdata).
10122 ---The library offers several functions to create
10123 ---and compose patterns.
10124 ---With the use of metamethods,
10125 ---several of these functions are provided as infix or prefix
10126 ---operators.
10127 ---On the one hand,
10128 ---the result is usually much more verbose than the typical
10129 ---encoding of patterns using the so called
10130 ---*regular expressions*
10131 ---(which typically are not regular expressions in the formal sense).
10132 ---On the other hand,
10133 ---first-class patterns allow much better documentation
10134 ---(as it is easy to comment the code,
10135 ---to break complex definitions in smaller parts, etc.)
10136 ---and are extensible,
10137 ---as we can define new functions to create and compose patterns.
10138 ---
10139 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10140 lpeg = {}
10141
10142 ---
10143 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10144 ---@class Pattern
10145 ---@operator len: Pattern
10146 ---@operator unm: Pattern
10147 ---@operator add(Pattern): Pattern
10148 ---@operator sub(Pattern): Pattern
10149 ---@operator mul(Pattern): Pattern
10150 ---@operator mul(Capture): Pattern
10151 ---@operator div(string): Capture
10152 ---@operator div(integer): Capture
10153 ---@operator div(table): Capture
10154 ---@operator div(function): Capture
10155 ---@operator pow(integer): Pattern
10156 ---@operator mod(function): Capture
10157 local Pattern = {}
10158
10159 ---
10160 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10161 ---@alias Capture Pattern
10162 ---@operator len: Pattern
10163 ---@operator add(Capture): Pattern
10164 ---@operator mul(Capture): Pattern
10165 ---@operator mul(Pattern): Pattern
10166 ---@operator div(string): Capture
10167 ---@operator div(integer): Capture
10168 ---@operator div(table): Capture
10169 ---@operator div(function): Capture
10170 ---@operator pow(integer): Pattern
10171
10172 ---
10173 ---Match the given `pattern` against the `subject` string.
10174 ---
10175 ---If the match succeeds,
10176 ---returns the index in the subject of the first character after the match,
10177 ---or the captured values
10178 ---(if the pattern captured any value).
10179 ---
10180 ---An optional numeric argument `init` makes the match
10181 ---start at that position in the subject string.
10182 ---As usual in Lua libraries,
10183 ---a negative value counts from the end.
10184 ---
10185 ---Unlike typical pattern-matching functions,
10186 ---`match` works only in anchored mode;
10187 ---that is, it tries to match the pattern with a prefix of
10188 ---the given subject string (at position `init`),
10189 ---not with an arbitrary substring of the subject.
10190 ---So, if we want to find a pattern anywhere in a string,
10191 ---we must either write a loop in Lua or write a pattern that
10192 ---matches anywhere.
10193 ---This second approach is easy and quite efficient;
10194 ---
10195 ---__Example:__
10196 ---
10197 ---```lua
10198 ---local pattern = lpeg.R('az') ^ 1 * -1
10199 ---assert(pattern:match('hello') == 6)
10200 ---assert(lpeg.match(pattern, 'hello') == 6)
10201 ---assert(pattern:match('1 hello') == nil)
10202 ---```
10203 ---
10204 ---@param pattern Pattern|string|integer|boolean|table|function
10205 ---@param subject string
10206 ---@param init? integer
10207 ---@param ... any
10208 ---
10209 ---@return any ...
10210 ---
10211 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10212 function lpeg.match(pattern, subject, init, ...) end
10213
10214 ---
10215 ---Match the given `pattern` against the `subject` string.
10216 ---
10217 ---If the match succeeds,
10218 ---returns the index in the subject of the first character after the match,
10219 ---or the captured values
10220 ---(if the pattern captured any value).
10221 ---
10222 ---An optional numeric argument `init` makes the match
10223 ---start at that position in the subject string.
10224 ---As usual in Lua libraries,
10225 ---a negative value counts from the end.
10226 ---
10227 ---Unlike typical pattern-matching functions,
10228 ---`match` works only in anchored mode;
10229 ---that is, it tries to match the pattern with a prefix of
10230 ---the given subject string (at position `init`),
10231 ---not with an arbitrary substring of the subject.
10232 ---So, if we want to find a pattern anywhere in a string,
10233 ---we must either write a loop in Lua or write a pattern that
10234 ---matches anywhere.
10235 ---This second approach is easy and quite efficient;
10236 ---
10237 ---__Example:__
10238 ---
10239 ---```lua
10240 ---local pattern = lpeg.R('az') ^ 1 * -1
10241 ---assert(pattern:match('hello') == 6)
10242 ---assert(lpeg.match(pattern, 'hello') == 6)
10243 ---assert(pattern:match('1 hello') == nil)
10244 ---```
10245 ---
10246 ---@param subject string
10247 ---@param init? integer
10248 ---@param ... any
10249 ---
10250 ---@return any ...
10251 ---
10252 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10253 function Pattern:match(subject, init, ...) end
10254
10255 ---
10256 ---Return the string `"pattern"` if the given value is a pattern, otherwise `nil`.
10257 ---
10258 ---@return 'pattern'|nil
10259 ---
10260 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10261 function lpeg.type(value) end
10262
10263 ---
10264 ---A string (not a function) with the running version of LPeg.
10265 ---
10266 ---Note: In earlier versions of LPeg this field was a function.
10267 ---
10268 ---@type string
10269 ---
10270 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10271 lpeg.version = ""
10272
10273 ---
10274 ---Set a limit for the size of the backtrack stack used by LPeg to
10275 ---track calls and choices.
10276 ---
10277 ---The default limit is `400`.
10278 ---Most well-written patterns need little backtrack levels and
10279 ---therefore you seldom need to change this limit;
10280 ---before changing it you should try to rewrite your
10281 ---pattern to avoid the need for extra space.
10282 ---Nevertheless, a few useful patterns may overflow.
10283 ---Also, with recursive grammars,
10284 ---subjects with deep recursion may also need larger limits.
10285 ---
10286 ---@param max integer
10287 ---
10288 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10289 function lpeg.setmaxstack(max) end
10290
10291 ---
10292 ---Convert the given value into a proper pattern.
10293 ---
10294 ---The following rules are applied:
10295 ---
10296 ---* If the argument is a pattern,
10297 ---it is returned unmodified.
10298 ---
10299 ---* If the argument is a string,
10300 ---it is translated to a pattern that matches the string literally.
10301 ---
10302 ---* If the argument is a non-negative number `n`,
10303 ---the result is a pattern that matches exactly `n` characters.
10304 ---
10305 ---* If the argument is a negative number `-n`,
10306 ---the result is a pattern that
10307 ---succeeds only if the input string has less than `n` characters left:
10308 ---`lpeg.P(-n)`
10309 ---is equivalent to `-lpeg.P(n)`
10310 ---(see the unary minus operation).
10311 ---
10312 ---* If the argument is a boolean,
10313 ---the result is a pattern that always succeeds or always fails
10314 ---(according to the boolean value),
10315 ---without consuming any input.
10316 ---
10317 ---* If the argument is a table,
10318 ---it is interpreted as a grammar
10319 ---(see Grammars).
10320 ---
10321 ---* If the argument is a function,
10322 ---returns a pattern equivalent to a
10323 ---match-time capture over the empty string.
10324 ---
10325 ---@param value Pattern|string|integer|boolean|table|function
10326 ---
10327 ---@return Pattern
10328 ---
10329 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10330 function lpeg.P(value) end
10331
10332 ---
10333 ---Return a pattern that
10334 ---matches only if the input string at the current position
10335 ---is preceded by `patt`.
10336 ---
10337 ---Pattern `patt` must match only strings
10338 ---with some fixed length,
10339 ---and it cannot contain captures.
10340 ---
10341 ---Like the `and` predicate,
10342 ---this pattern never consumes any input,
10343 ---independently of success or failure.
10344 ---
10345 ---@param pattern Pattern|string|integer|boolean|table
10346 ---
10347 ---@return Pattern
10348 ---
10349 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10350 function lpeg.B(pattern) end
10351
10352 ---
10353 ---Return a pattern that matches any single character
10354 ---belonging to one of the given ranges.
10355 ---
10356 ---Each `range` is a string `xy` of length 2,
10357 ---representing all characters with code
10358 ---between the codes of `x` and `y`
10359 ---(both inclusive).
10360 ---
10361 ---As an example, the pattern
10362 ---`lpeg.R('09')` matches any digit,
10363 ---and `lpeg.R('az', 'AZ')` matches any ASCII letter.
10364 ---
10365 ---__Example:__
10366 ---
10367 ---```lua
10368 ---local pattern = lpeg.R('az') ^ 1 * -1
10369 ---assert(pattern:match('hello') == 6)
10370 ---```
10371 ---
10372 ---@param ... string
10373 ---
10374 ---@return Pattern
10375 ---
10376 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10377 function lpeg.R(...) end
10378
10379 ---
10380 ---Return a pattern that matches any single character that
10381 ---appears in the given string.
10382 ---(The `S` stands for Set.)
10383 ---
10384 ---As an example, the pattern
10385 ---`lpeg.S('+-*/')` matches any arithmetic operator.
10386 ---
10387 ---Note that, if `s` is a character
10388 ---(that is, a string of length 1),
10389 ---then `lpeg.P(s)` is equivalent to `lpeg.S(s)`
10390 ---which is equivalent to `lpeg.R(s..s)`.
10391 ---Note also that both `lpeg.S('')` and `lpeg.R()`
10392 ---are patterns that always fail.
10393 ---
10394 ---@param string string
10395 ---
10396 ---@return Pattern
10397 ---
10398 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10399 function lpeg.S(string) end
10400
10401 ---
10402 ---Create a non-terminal (a variable) for a grammar.
10403 ---
10404 ---This operation creates a non-terminal (a variable)
10405 ---for a grammar.
10406 ---The created non-terminal refers to the rule indexed by `v`
10407 ---in the enclosing grammar.
10408 ---
10409 ---__Example:__
10410 ---
10411 ---```lua
10412 ---local b = lpeg.P({'(' * ((1 - lpeg.S '()') + lpeg.V(1)) ^ 0 * ')'})
10413 ---assert(b:match('((string))') == 11)
10414 ---assert(b:match('(') == nil)
10415 ---```
10416 ---
10417 ---@param v boolean|string|number|function|table|thread|userdata|lightuserdata
10418 ---
10419 ---@return Pattern
10420 ---
10421 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10422 function lpeg.V(v) end
10423
10424 ---
10425 ---@class Locale
10426 ---@field alnum userdata
10427 ---@field alpha userdata
10428 ---@field cntrl userdata
10429 ---@field digit userdata
10430 ---@field graph userdata
10431 ---@field lower userdata
10432 ---@field print userdata
10433 ---@field punct userdata
10434 ---@field space userdata
10435 ---@field upper userdata
10436 ---@field xdigit userdata
10437
10438 ---
10439 ---Return a table with patterns for matching some character classes
10440 ---according to the current locale.
10441 ---
10442 ---The table has fields named
10443 ---`alnum`,
10444 ---`alpha`,
10445 ---`cntrl`,
10446 ---`digit`,
10447 ---`graph`,
10448 ---`lower`,
10449 ---`print`,
10450 ---`punct`,
10451 ---`space`,
10452 ---`upper`, and
10453 ---`xdigit`,
10454 ---each one containing a correspondent pattern.
10455 ---Each pattern matches any single character that belongs to its class.
10456 --
10457 ---If called with an argument `table`,
10458 ---then it creates those fields inside the given table and
10459 ---returns that table.
10460 ---
10461 ---__Example:__
10462 ---
10463 ---```lua
10464 ---lpeg.locale(lpeg)
10465 ---local space = lpeg.space ^ 0
10466 ---local name = lpeg.C(lpeg.alpha ^ 1) * space
10467 ---local sep = lpeg.S(',;') * space
10468 ---local pair = lpeg.Cg(name * '=' * space * name) * sep ^ -1
10469 ---local list = lpeg.Cf(lpeg.Ct('') * pair ^ 0, rawset)
10470 ---local t = list:match('a=b, c = hi; next = pi')
10471 ---assert(t.a == 'b')
10472 ---assert(t.c == 'hi')
10473 ---assert(t.next == 'pi')
10474 ---
10475 ---local locale = lpeg.locale()
10476 ---assert(type(locale.digit) == 'userdata')
10477 ---```
10478 ---
10479 ---@param tab? table
10480 ---
10481 ---@return Locale
10482 ---
10483 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10484 function lpeg.locale(tab) end
10485
10486 ---
10487 ---Create a simple capture.
10488 ---
10489 ---Creates a simple capture,
10490 ---which captures the substring of the subject that matches `patt`.
10491 ---The captured value is a string.
10492 ---If `patt` has other captures,
10493 ---their values are returned after this one.
10494 ---
10495 ---__Example:__
10496 ---
10497 ---```lua
10498 ---local function split (s, sep)
10499 --- sep = lpeg.P(sep)
10500 --- local elem = lpeg.C((1 - sep) ^ 0)
10501 --- local p = elem * (sep * elem) ^ 0
10502 --- return lpeg.match(p, s)
10503 ---end
10504 ---
10505 ---local a, b, c = split('a,b,c', ',')
10506 ---assert(a == 'a')
10507 ---assert(b == 'b')
10508 ---assert(c == 'c')
10509 ---```
10510 ---
10511 ---@param patt Pattern|string|integer|boolean|table|function
10512 ---
10513 ---@return Capture
10514 ---
10515 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10516 function lpeg.C(patt) end
10517
10518 ---
10519 ---Create an argument capture.
10520 ---
10521 ---This pattern matches the empty string and
10522 ---produces the value given as the nth extra
10523 ---argument given in the call to `lpeg.match`.
10524 ---
10525 ---@param n integer
10526 ---
10527 ---@return Capture
10528 ---
10529 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10530 function lpeg.Carg(n) end
10531
10532 ---
10533 ---Create a back capture.
10534 ---
10535 ---This pattern matches the empty string and
10536 ---produces the values produced by the most recent
10537 ---group capture named `name`
10538 ---(where `name` can be any Lua value).
10539 ---
10540 ---Most recent means the last
10541 ---complete
10542 ---outermost
10543 ---group capture with the given name.
10544 ---A Complete capture means that the entire pattern
10545 ---corresponding to the capture has matched.
10546 ---An Outermost capture means that the capture is not inside
10547 ---another complete capture.
10548 ---
10549 ---In the same way that LPeg does not specify when it evaluates captures,
10550 ---it does not specify whether it reuses
10551 ---values previously produced by the group
10552 ---or re-evaluates them.
10553 ---
10554 ---@param name any
10555 ---
10556 ---@return Capture
10557 ---
10558 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10559 function lpeg.Cb(name) end
10560
10561 ---
10562 ---Create a constant capture.
10563 ---
10564 ---This pattern matches the empty string and
10565 ---produces all given values as its captured values.
10566 ---
10567 ---@param ... any
10568 ---
10569 ---@return Capture
10570 ---
10571 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10572 function lpeg.Cc(...) end
10573
10574 ---
10575 ---Create a fold capture.
10576 ---
10577 ---If `patt` produces a list of captures
10578 ---C1 C2 ... Cn,
10579 ---this capture will produce the value
10580 ---`func(...func(func(C1, C2), C3)...,Cn)`,
10581 ---that is, it will fold
10582 ---(or accumulate, or reduce)
10583 ---the captures from `patt` using function `func`.
10584 ---
10585 ---This capture assumes that `patt` should produce
10586 ---at least one capture with at least one value (of any type),
10587 ---which becomes the initial value of an accumulator.
10588 ---(If you need a specific initial value,
10589 ---you may prefix a constant capture to `patt`.)
10590 ---For each subsequent capture,
10591 ---LPeg calls `func`
10592 ---with this accumulator as the first argument and all values produced
10593 ---by the capture as extra arguments;
10594 ---the first result from this call
10595 ---becomes the new value for the accumulator.
10596 ---The final value of the accumulator becomes the captured value.
10597 ---
10598 ---__Example:__
10599 ---
10600 ---```lua
10601 ---local number = lpeg.R('09') ^ 1 / tonumber
10602 ---local list = number * (',' * number) ^ 0
10603 ---local function add(acc, newvalue) return acc + newvalue end
10604 ---local sum = lpeg.Cf(list, add)
10605 ---assert(sum:match('10,30,43') == 83)
10606 ---```
10607 ---
10608 ---@param patt Pattern|string|integer|boolean|table|function
10609 ---@param func fun(acc, newvalue): (acc: any)
10610 ---
10611 ---@return Capture
10612 ---
10613 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10614 function lpeg.Cf(patt, func) end
10615
10616 ---
10617 ---Create a group capture.
10618 ---
10619 ---It groups all values returned by `patt`
10620 ---into a single capture.
10621 ---The group may be anonymous (if no name is given)
10622 ---or named with the given name
10623 ---(which can be any non-nil Lua value).
10624 ---
10625 ---@param patt Pattern|string|integer|boolean|table|function
10626 ---@param name? string
10627 ---
10628 ---@return Capture
10629 ---
10630 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10631 function lpeg.Cg(patt, name) end
10632
10633 ---
10634 ---Create a position capture.
10635 ---
10636 ---It matches the empty string and
10637 ---captures the position in the subject where the match occurs.
10638 ---The captured value is a number.
10639 ---
10640 ---__Example:__
10641 ---
10642 ---```lua
10643 ---local I = lpeg.Cp()
10644 ---local function anywhere(p) return lpeg.P({I * p * I + 1 * lpeg.V(1)}) end
10645 ---
10646 ---local match_start, match_end = anywhere('world'):match('hello world!')
10647 ---assert(match_start == 7)
10648 ---assert(match_end == 12)
10649 ---```
10650 ---
10651 ---@return Capture
10652 ---
10653 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10654 function lpeg.Cp() end
10655
10656 ---
10657 ---Create a substitution capture.
10658 ---
10659 ---This function creates a substitution capture,
10660 ---which captures the substring of the subject that matches `patt`,
10661 ---with substitutions.
10662 ---For any capture inside `patt` with a value,
10663 ---the substring that matched the capture is replaced by the capture value
10664 ---(which should be a string).
10665 ---The final captured value is the string resulting from
10666 ---all replacements.
10667 ---
10668 ---__Example:__
10669 ---
10670 ---```lua
10671 ---local function gsub (s, patt, repl)
10672 --- patt = lpeg.P(patt)
10673 --- patt = lpeg.Cs((patt / repl + 1) ^ 0)
10674 --- return lpeg.match(patt, s)
10675 ---end
10676 ---assert(gsub('Hello, xxx!', 'xxx', 'World') == 'Hello, World!')
10677 ---```
10678 ---
10679 ---@param patt Pattern|string|integer|boolean|table|function
10680 ---
10681 ---@return Capture
10682 ---
10683 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10684 function lpeg.Cs(patt) end
10685
10686 ---
10687 ---Create a table capture.
10688 ---
10689 ---This capture returns a table with all values from all anonymous captures
10690 ---made by `patt` inside this table in successive integer keys,
10691 ---starting at 1.
10692 ---Moreover,
10693 ---for each named capture group created by `patt`,
10694 ---the first value of the group is put into the table
10695 ---with the group name as its key.
10696 ---The captured value is only the table.
10697 ---
10698 ---@param patt Pattern|string|integer|boolean|table|function
10699 ---
10700 ---@return Capture
10701 ---
10702 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10703 function lpeg.Ct(patt) end
10704
10705 ---
10706 ---Create a match-time capture.
10707 ---
10708 ---Unlike all other captures,
10709 ---this one is evaluated immediately when a match occurs
10710 ---(even if it is part of a larger pattern that fails later).
10711 ---It forces the immediate evaluation of all its nested captures
10712 ---and then calls `function`.
10713 ---
10714 ---The given function gets as arguments the entire subject,
10715 ---the current position (after the match of `patt`),
10716 ---plus any capture values produced by `patt`.
10717 ---
10718 ---The first value returned by `fn`
10719 ---defines how the match happens.
10720 ---If the call returns a number,
10721 ---the match succeeds
10722 ---and the returned number becomes the new current position.
10723 ---(Assuming a subject and current position `i`,
10724 ---the returned number must be in the range `[i, len(s) + 1]`.)
10725 ---If the call returns true,
10726 ---the match succeeds without consuming any input.
10727 ---(So, to return true is equivalent to return `i`.)
10728 ---If the call returns `false`, `nil`, or no value,
10729 ---the match fails.
10730 ---
10731 ---Any extra values returned by the function become the
10732 ---values produced by the capture.
10733 ---
10734 ---@param patt Pattern|string|integer|boolean|table|function
10735 ---@param fn fun(s: string, i: integer, ...: any): (position: boolean|integer, ...: any)
10736 ---
10737 ---@return Capture
10738 ---
10739 ---😱 [Types](https://github.com/LuaCATS/lpeg/blob/main/library/lpeg.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lpeg/pulls)
10740 function lpeg.Cmt(patt, fn) end
10741
10742 ---
10743 ---The node library contains functions that facilitate dealing with (lists of) nodes and their values.
10744 ---They allow you to create, alter, copy, delete, and insert LuaTEX node objects, the core objects
10745 ---within the typesetter.
10746 ---
10747 ---LuaTEX nodes are represented in Lua as userdata with the metadata type `luatex.node.` The
10748 ---various parts within a node can be accessed using named fields.
10749 ---
10750 ---Each node has at least the three fields next, id, and subtype:
10751 ---
10752 ---* The next field returns the userdata object for the next node in a linked list of nodes, or nil,
10753 --- if there is no next node.
10754 ---* The id indicates TEX’s ‘node type’. The field id has a numeric value for efficiency reasons,
10755 --- but some of the library functions also accept a string value instead of id.
10756 ---* The subtype is another number. It often gives further information about a node of a particular
10757 --- id, but it is most important when dealing with ‘whatsits’, because they are differentiated
10758 --- solely based on their subtype.
10759 ---
10760 ---The other available fields depend on the id (and for ‘whatsits’, the subtype) of the node.
10761 ---
10762 ---Support for unset (alignment) nodes is partial: they can be queried and modified from Lua code,
10763 ---but not created.
10764 ---
10765 ---Nodes can be compared to each other, but: you are actually comparing indices into the node
10766 ---memory. This means that equality tests can only be trusted under very limited conditions. It will
10767 ---not work correctly in any situation where one of the two nodes has been freed and/or reallocated:
10768 ---in that case, there will be false positives.
10769 ---
10770 ---At the moment, memory management of nodes should still be done explicitly by the user. Nodes
10771 ---are not ‘seen’ by the Lua garbage collector, so you have to call the node freeing functions yourself
10772 ---when you are no longer in need of a node (list). Nodes form linked lists without reference
10773 ---counting, so you have to be careful that when control returns back to LuaTEX itself, you have
10774 ---not deleted nodes that are still referenced from a next pointer elsewhere, and that you did not
10775 ---create nodes that are referenced more than once. Normally the setters and getters handle this
10776 ---for you.
10777 ---
10778 ---There are statistics available with regards to the allocated node memory, which can be handy
10779 ---for tracing.
10780 ---
10781 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10782 node = {}
10783
10784 ---
10785 ---Deep down in TEX a node has a number which is a numeric entry in a memory table. In fact, this
10786 ---model, where TEX manages memory is real fast and one of the reasons why plugging in callbacks
10787 ---that operate on nodes is quite fast too. Each node gets a number that is in fact an index in the
10788 ---memory table and that number often is reported when you print node related information. You
10789 ---go from userdata nodes and there numeric references and back with:
10790 ---
10791 ---```
10792 ---<integer> d = node.todirect(<node> n)
10793 ---<node> n = node.tonode(<integer> d)
10794 ---```
10795 ---
10796 ---The userdata model is rather robust as it is a virtual interface with some additional checking
10797 ---while the more direct access which uses the node numbers directly. However, even with userdata
10798 ---you can get into troubles when you free nodes that are no longer allocated or mess up lists. if
10799 ---you apply tostring to a node you see its internal (direct) number and id.
10800 ---
10801 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10802 node.direct = {}
10803
10804 ---
10805 ---*LuaTeX* only understands 4 of the 16 direction specifiers of aleph: `TLT` (latin), `TRT` (arabic), `RTT` (cjk), `LTL` (mongolian). All other direction specifiers generate an error.
10806 ---
10807 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10808 ---@alias DirectionSpecifier
10809 ---|"TLT" # 0 latin
10810 ---|"TRT" # 1 arabic
10811 ---|"LTL" # 2 mongolian
10812 ---|"RTT" # 3 cjk
10813
10814 ---
10815 ---In addition to a keyword driven model we also provide an integer driven one.
10816 ---@alias DirectionSpecifierId
10817 ---|0 # "TLT" latin
10818 ---|1 # "TRT" arabic
10819 ---|2 # "LTL" mongolian
10820 ---|3 # "RTT" cjk
10821
10822 ---
10823 ---__Reference:__
10824 ---
10825 ---* Corresponding C source code: [texnodes.c#L493-L542](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L493-L542)
10826 ---
10827 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10828 ---@alias NodeTypeName
10829 ---| 'hlist' # 0 `hlist_node`
10830 ---| 'vlist' # 1 `vlist_node`
10831 ---| 'rule' # 2 `rule_node`
10832 ---| 'ins' # 3 `ins_node`
10833 ---| 'mark' # 4 `mark_node`
10834 ---| 'adjust' # 5 `adjust_node`
10835 ---| 'boundary' # 6 `boundary_node`
10836 ---| 'disc' # 7 `disc_node`
10837 ---| 'whatsit' # 8 `whatsit_node`
10838 ---| 'local_par' # 9 `local_par_node`
10839 ---| 'dir' # 10 `dir_node`
10840 ---| 'math' # 11 `math_node`
10841 ---| 'glue' # 12 `glue_node`
10842 ---| 'kern' # 13 `kern_node`
10843 ---| 'penalty' # 14 `penalty_node`
10844 ---| 'unset' # 15 `unset_node`
10845 ---| 'style' # 16 `style_node`
10846 ---| 'choice' # 17 `choice_node`
10847 ---| 'noad' # 18 `simple_noad`
10848 ---| 'radical' # 19 `radical_noad`
10849 ---| 'fraction' # 20 `fraction_noad`
10850 ---| 'accent' # 21 `accent_noad`
10851 ---| 'fence' # 22 `fence_noad`
10852 ---| 'math_char' # 23 `math_char_node`
10853 ---| 'sub_box' # 24 `sub_box_node`
10854 ---| 'sub_mlist' # 25 `sub_mlist_node`
10855 ---| 'math_text_char' # 26 `math_text_char_node`
10856 ---| 'delim' # 27 `delim_node`
10857 ---| 'margin_kern' # 28 `margin_kern_node`
10858 ---| 'glyph' # 29 `glyph_node`
10859 ---| 'align_record' # 30 `align_record_node`
10860 ---| 'pseudo_file' # 31 `pseudo_file_node`
10861 ---| 'pseudo_line' # 32 `pseudo_line_node`
10862 ---| 'page_insert' # 33 `inserting_node`
10863 ---| 'split_insert' # 34 `split_up_node`
10864 ---| 'expr_stack' # 35 `expr_node`
10865 ---| 'nested_list' # 36 `nesting_node`
10866 ---| 'span' # 37 `span_node`
10867 ---| 'attribute' # 38 `attribute_node`
10868 ---| 'glue_spec' # 39 `glue_spec_node`
10869 ---| 'attribute_list' # 40 `attribute_list_node`
10870 ---| 'temp' # 41 `temp_node`
10871 ---| 'align_stack' # 42 `align_stack_node`
10872 ---| 'movement_stack' # 43 `movement_node`
10873 ---| 'if_stack' # 44 `if_node`
10874 ---| 'unhyphenated' # 45 `unhyphenated_node`
10875 ---| 'hyphenated' # 46 `hyphenated_node`
10876 ---| 'delta' # 47 `delta_node`
10877 ---| 'passive' # 48 `passive_node`
10878 ---| 'shape' # 49 `shape_node`
10879
10880 ---
10881 ---__Reference:__
10882 ---
10883 ---* Corresponding C source code: [texnodes.c#L493-L542](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L493-L542)
10884 ---
10885 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10886 ---@alias NodeTypeId
10887 ---| 0 # hlist `hlist_node`
10888 ---| 1 # vlist `vlist_node`
10889 ---| 2 # rule `rule_node`
10890 ---| 3 # ins `ins_node`
10891 ---| 4 # mark `mark_node`
10892 ---| 5 # adjust `adjust_node`
10893 ---| 6 # boundary `boundary_node`
10894 ---| 7 # disc `disc_node`
10895 ---| 8 # whatsit `whatsit_node`
10896 ---| 9 # local_par `local_par_node`
10897 ---| 10 # dir `dir_node`
10898 ---| 11 # math `math_node`
10899 ---| 12 # glue `glue_node`
10900 ---| 13 # kern `kern_node`
10901 ---| 14 # penalty `penalty_node`
10902 ---| 15 # unset `unset_node`
10903 ---| 16 # style `style_node`
10904 ---| 17 # choice `choice_node`
10905 ---| 18 # noad `simple_noad`
10906 ---| 19 # radical `radical_noad`
10907 ---| 20 # fraction `fraction_noad`
10908 ---| 21 # accent `accent_noad`
10909 ---| 22 # fence `fence_noad`
10910 ---| 23 # math_char `math_char_node`
10911 ---| 24 # sub_box `sub_box_node`
10912 ---| 25 # sub_mlist `sub_mlist_node`
10913 ---| 26 # math_text_char `math_text_char_node`
10914 ---| 27 # delim `delim_node`
10915 ---| 28 # margin_kern `margin_kern_node`
10916 ---| 29 # glyph `glyph_node`
10917 ---| 30 # align_record `align_record_node`
10918 ---| 31 # pseudo_file `pseudo_file_node`
10919 ---| 32 # pseudo_line `pseudo_line_node`
10920 ---| 33 # page_insert `inserting_node`
10921 ---| 34 # split_insert `split_up_node`
10922 ---| 35 # expr_stack `expr_node`
10923 ---| 36 # nested_list `nesting_node`
10924 ---| 37 # span `span_node`
10925 ---| 38 # attribute `attribute_node`
10926 ---| 39 # glue_spec `glue_spec_node`
10927 ---| 40 # attribute_list `attribute_list_node`
10928 ---| 41 # temp `temp_node`
10929 ---| 42 # align_stack `align_stack_node`
10930 ---| 43 # movement_stack `movement_node`
10931 ---| 44 # if_stack `if_node`
10932 ---| 45 # unhyphenated `unhyphenated_node`
10933 ---| 46 # hyphenated `hyphenated_node`
10934 ---| 47 # delta `delta_node`
10935 ---| 48 # passive `passive_node`
10936 ---| 49 # shape `shape_node`
10937
10938 ---
10939 ---A number in the range `[0,4]` indicating the glue order.
10940 ---
10941 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10942 ---@alias GlueOrder 0|1|2|3|4
10943
10944 ---
10945 ---The calculated glue ratio.
10946 ---
10947 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10948 ---@alias GlueSet number
10949
10950 ---
10951 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10952 ---@alias GlueSign
10953 ---|0 # `normal`,
10954 ---|1 # `stretching`,
10955 ---|2 # `shrinking`
10956
10957 ---
10958 ---A node that comprise actual typesetting commands. A few fields are
10959 ---present in all nodes regardless of their type, these are:
10960 ---
10961 --- __Reference:__
10962 ---
10963 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L49-L76](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L49-L76)
10964 ---
10965 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10966 ---@class Node
10967 ---@field next Node|nil # the next node in a list, or nil
10968 ---@field prev Node|nil # That prev field is always present, but only initialized on explicit request: when the function `node.slide()` is called, it will set up the `prev` fields to be a backwards pointer in the argument node list. By now most of *TeX*'s node processing makes sure that the `prev` nodes are valid but there can be exceptions, especially when the internal magic uses a leading `temp` nodes to temporarily store a state.
10969 ---@field id integer # the node’s type (id) number
10970 ---@field subtype integer # the node subtype identifier. The `subtype` is sometimes just a dummy entry because not all nodes actually use the `subtype`, but this way you can be sure that all nodes accept it as a valid field name, and that is often handy in node list traversal.
10971 ---@field head? Node
10972 ---@field attr Node # A list of attributes.. almost all nodes also have an `attr` field
10973
10974 ---
10975 ---__Reference:__
10976 ---
10977 ---* Corresponding C source code: [texnodes.c#L633-L661](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L633-L661)
10978 ---
10979 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
10980 ---@alias HlistNodeSubtype
10981 ---|0 # unknown
10982 ---|1 # line
10983 ---|2 # box
10984 ---|3 # indent
10985 ---|4 # alignment
10986 ---|5 # cell
10987 ---|6 # equation
10988 ---|7 # equationnumber
10989 ---|8 # math
10990 ---|9 # mathchar
10991 ---|10 # hextensible
10992 ---|11 # vextensible
10993 ---|12 # hdelimiter
10994 ---|13 # vdelimiter
10995 ---|14 # overdelimiter
10996 ---|15 # underdelimiter
10997 ---|16 # numerator
10998 ---|17 # denominator
10999 ---|18 # limits
11000 ---|19 # fraction
11001 ---|20 # nucleus
11002 ---|21 # sup
11003 ---|22 # sub
11004 ---|23 # degree
11005 ---|24 # scripts
11006 ---|25 # over
11007 ---|26 # under
11008 ---|27 # accent
11009 ---|28 # radical
11010
11011 ---
11012 ---__Reference:__
11013 ---
11014 ---* Corresponding C source code: [texnodes.c#L841-L851](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L841-L851)
11015 ---
11016 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11017 ---@class ListNode: Node
11018 ---@field width integer # the width of the box
11019 ---@field height integer # the height of the box
11020 ---@field depth integer # the depth of the box
11021 ---@field shift integer # a displacement perpendicular to the character progression direction
11022 ---@field glue_order GlueOrder
11023 ---@field glue_set GlueSet
11024 ---@field glue_sign GlueSign
11025 ---@field head Node # the first node of the body of this list
11026 ---@field list Node # the first node of the body of this list
11027 ---@field dir DirectionSpecifier
11028
11029 ---
11030 ---A warning: never assign a node list to the `head` field unless you are sure
11031 ---its internal link structure is correct, otherwise an error may result.
11032 ---
11033 ---Note: the field name `head` and `list` are both valid. Sometimes it
11034 ---makes more sense to refer to a list by `head`, sometimes `list` makes
11035 ---more sense.
11036 ---
11037 ---__Reference:__
11038 ---
11039 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L78-L108](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L78-L108)
11040 ---
11041 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11042 ---@class HlistNode: ListNode
11043 ---@field subtype HlistNodeSubtype
11044
11045 ---
11046 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11047 ---@alias VlistNodeSubtype
11048 ---|0 # unknown
11049 ---|4 # alignment
11050 ---|5 # cell
11051
11052 ---
11053 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11054 ---@class VlistNode: ListNode
11055 ---@field subtype VlistNodeSubtype
11056
11057 ---
11058 ---__Reference:__
11059 ---
11060 ---* Corresponding C source code: [texnodes.c#L602-L611](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L602-L611)
11061 ---
11062 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11063 ---@alias RuleNodeSubtype
11064 ---|0 # normal
11065 ---|1 # box
11066 ---|2 # image
11067 ---|3 # empty
11068 ---|4 # user
11069 ---|5 # over
11070 ---|6 # under
11071 ---|7 # fraction
11072 ---|8 # radical
11073 ---|9 # outline
11074
11075 ---
11076 ---Contrary to traditional *TeX*, *LuaTeX* has more `rule` subtypes because we
11077 ---also use rules to store reuseable objects and images. User nodes are invisible
11078 ---and can be intercepted by a callback.
11079 ---
11080 ---The `left` and `right` keys are somewhat special (and experimental).
11081 ---When rules are auto adapting to the surrounding box width you can enforce a shift
11082 ---to the right by setting `left`. The value is also subtracted from the width
11083 ---which can be a value set by the engine itself and is not entirely under user
11084 ---control. The `right` is also subtracted from the width. It all happens in
11085 ---the backend so these are not affecting the calculations in the frontend (actually
11086 ---the auto settings also happen in the backend). For a vertical rule `left`
11087 ---affects the height and `right` affects the depth. There is no matching
11088 ---interface at the *TeX* end (although we can have more keywords for rules it would
11089 ---complicate matters and introduce a speed penalty.) However, you can just
11090 ---construct a rule node with *Lua* and write it to the *TeX* input. The `outline` subtype is just a convenient variant and the `transform` field
11091 ---specifies the width of the outline.
11092 ---
11093 ---__Reference:__
11094 ---
11095 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L119-L157](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L119-L157)
11096 ---* Corresponding C source code: [texnodes.c#L912-L920](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L912-L920)
11097 ---
11098 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11099 ---@class RuleNode: Node
11100 ---@field subtype RuleNodeSubtype
11101 ---@field attr Node # A list of attributes.
11102 ---@field width integer # the width of the rule where the special value −1073741824 is used for ‘running’ glue dimensions
11103 ---@field height integer # the height of the rule (can be negative)
11104 ---@field depth integer # the depth of the rule (can be negative)
11105 ---@field left integer # shift at the left end (also subtracted from width)
11106 ---@field right integer # (subtracted from width)
11107 ---@field dir DirectionSpecifier the direction of this rule
11108 ---@field index integer # an optional index that can be referred too
11109 ---@field transform integer # an private variable (also used to specify outline width)
11110
11111 ---
11112 ---__Reference:__
11113 ---
11114 ---* Corresponding C source code: [texnodes.c#L818-L824](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L818-L824)
11115 ---
11116 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11117 ---@class InsNode: Node
11118 ---@field subtype number # the insertion class
11119 ---@field attr Node # A list of attributes.
11120 ---@field cost integer # the penalty associated with this insert
11121 ---@field height integer # height of the insert
11122 ---@field depth integer # depth of the insert
11123 ---@field head Node # the first node of the body of this insert
11124 ---@field list Node # the first node of the body of this insert
11125
11126 ---
11127 ---__Reference:__
11128 ---
11129 ---* Corresponding C source code: [texnodes.c#L868-L871](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L868-L871)
11130 ---
11131 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11132 ---@class MarkNode: Node
11133 ---@field subtype integer # unused
11134 ---@field attr Node # A list of attributes.
11135 ---@field class integer # the mark class
11136 ---@field mark table # a table representing a token list
11137
11138 ---
11139 ---__Reference:__
11140 ---
11141 ---* Corresponding C source code: [texnodes.c#L669-L670](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L669-L670)
11142 ---
11143 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11144 ---@alias AdjustNodeSubtype
11145 ---|0 # normal
11146 ---|1 # pre
11147
11148 ---
11149 ---__Reference:__
11150 ---
11151 ---* Corresponding C source code: [texnodes.c#L725-L727](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L725-L727)
11152 ---
11153 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11154 ---@class AdjustNode: Node
11155 ---@field subtype AdjustNodeSubtype
11156 ---@field attr Node # A list of attributes.
11157 ---@field head Node # adjusted material
11158 ---@field list Node # adjusted material
11159
11160 ---
11161 ---__Reference:__
11162 ---
11163 ---* Corresponding C source code: [texnodes.c#L620-L625](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L620-L625)
11164 ---
11165 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11166 ---@alias DiscNodeSubtype
11167 ---|0 # discretionary
11168 ---|1 # explicit
11169 ---|2 # automatic
11170 ---|3 # regular
11171 ---|4 # first
11172 ---|5 # second
11173
11174 ---
11175 ---__Reference:__
11176 ---
11177 ---* Corresponding C source code: [texnodes.c#L758-L763](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L758-L763)
11178 ---
11179 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11180 ---@class DiscNode: Node
11181 ---@field subtype DiscNodeSubtype
11182 ---@field attr Node # A list of attributes.
11183 ---@field pre Node # pointer to the pre-break text
11184 ---@field post Node # pointer to the post-break text
11185 ---@field replace Node # pointer to the no-break text
11186 ---@field penalty integer # the penalty associated with the break, normally `hyphenpenalty` or `exhyphenpenalty`
11187
11188 ---
11189 ---__Reference:__
11190 ---
11191 ---* Corresponding C source code: [texnodes.c#L663-L664](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L663-L664)
11192 ---
11193 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11194 ---@alias MathNodeSubtype
11195 ---|0 # beginmath
11196 ---|1 # endmath
11197
11198 ---
11199 ---__Reference:__
11200 ---
11201 ---* Corresponding C source code: [texnodes.c#L873-L880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L873-L880)
11202 ---
11203 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11204 ---@class MathNode: Node
11205 ---@field subtype MathNodeSubtype
11206 ---@field attr Node # A list of attributes.
11207 ---@field surround integer # width of the `mathsurround` kern
11208
11209 ---
11210 ---Skips are about the only type of data objects in traditional *TeX* that are not a
11211 ---simple value. They are inserted when *TeX* sees a space in the text flow but also
11212 ---by `hskip` and `vskip`. The structure that represents the glue
11213 ---components of a skip is called a `glue_spec`.
11214 ---
11215 ---The effective width of some glue subtypes depends on the stretch or shrink needed
11216 ---to make the encapsulating box fit its dimensions. For instance, in a paragraph
11217 ---lines normally have glue representing spaces and these stretch or shrink to make
11218 ---the content fit in the available space. The `effective_glue` function that
11219 ---takes a glue node and a parent (hlist or vlist) returns the effective width of
11220 ---that glue item. When you pass `true` as third argument the value will be
11221 ---rounded.
11222 ---
11223 ---A `glue_spec` node is a special kind of node that is used for storing a set
11224 ---of glue values in registers. Originally they were also used to store properties
11225 ---of glue nodes (using a system of reference counts) but we now keep these
11226 ---properties in the glue nodes themselves, which gives a cleaner interface to *Lua*.
11227 ---
11228 ---The indirect spec approach was in fact an optimization in the original *TeX*
11229 ---code. First of all it can save quite some memory because all these spaces that
11230 ---become glue now share the same specification (only the reference count is
11231 ---incremented), and zero testing is also a bit faster because only the pointer has
11232 ---to be checked (this is no longer true for engines that implement for instance
11233 ---protrusion where we really need to ensure that zero is zero when we test for
11234 ---bounds). Another side effect is that glue specifications are read-only, so in
11235 ---the end copies need to be made when they are used from *Lua* (each assignment to
11236 ---a field can result in a new copy). So in the end the advantages of sharing are
11237 ---not that high (and nowadays memory is less an issue, also given that a glue node
11238 ---is only a few memory words larger than a spec).
11239 ---
11240 ---In addition there are the `width`, `stretch` `stretch_order`,
11241 ---`shrink`, and `shrink_order` fields. Note that we use the key `width` in both horizontal and vertical glue. This suits the *TeX* internals well
11242 ---so we decided to stick to that naming.
11243 ---
11244 ---__Reference:__
11245 ---
11246 ---* Corresponding C source code: [texnodes.c#L794-L799](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L794-L799)
11247 ---
11248 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11249 ---@class GlueSpecNode: Node
11250 ---@field width integer # The horizontal or vertical displacement.
11251 ---@field stretch integer # An extra (positive) displacement or stretch amount.
11252 ---@field stretch_order integer # Factor applied to stretch amount.
11253 ---@field shrink integer # An extra (negative) displacement or shrink amount.
11254 ---@field shrink_order integer # Factor applied to shrink amount.
11255
11256 ---
11257 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11258 ---@alias GlueNodeSubtype
11259 ---|0 # userskip
11260 ---|1 # lineskip
11261 ---|2 # baselineskip
11262 ---|3 # parskip
11263 ---|4 # abovedisplayskip
11264 ---|5 # belowdisplayskip
11265 ---|6 # abovedisplayshortskip
11266 ---|7 # belowdisplayshortskip
11267 ---|8 # leftskip
11268 ---|9 # rightskip
11269 ---|10 # topskip
11270 ---|11 # splittopskip
11271 ---|12 # tabskip
11272 ---|13 # spaceskip
11273 ---|14 # xspaceskip
11274 ---|15 # parfillskip
11275 ---|16 # mathskip
11276 ---|17 # thinmuskip
11277 ---|18 # medmuskip
11278 ---|19 # thickmuskip
11279 ---|98 # conditionalmathskip
11280 ---|99 # muglue
11281 ---|100 # leaders
11282 ---|101 # cleaders
11283 ---|102 # xleaders
11284 ---|103 # gleaders
11285
11286 ---
11287 ---A regular word space also results in a `spaceskip` subtype (this used to be
11288 ---a `userskip` with subtype zero).
11289 ---
11290 ---__Reference:__
11291 ---
11292 ---* Corresponding C source code: [texnodes.c#L785-L792](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L785-L792)
11293 ---
11294 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11295 ---@class GlueNode: Node
11296 ---@field subtype GlueNodeSubtype
11297 ---@field leader Node # A pointer to a box or rule for leaders.
11298 ---@field width integer # The horizontal or vertical displacement.
11299 ---@field stretch integer # An extra (positive) displacement or stretch amount.
11300 ---@field stretch_order integer # Factor applied to stretch amount.
11301 ---@field shrink integer # An extra (negative) displacement or shrink amount.
11302 ---@field shrink_order integer # Factor applied to shrink amount.
11303
11304 ---
11305 ---Return the
11306 ---effective width of a glue node.
11307 ---
11308 ---__Reference:__
11309 ---
11310 ---* Corresponding C source code: [lnodelib.c#L8473-L8503](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8473-L8503)
11311 ---
11312 ---@param glue Node
11313 ---@param parent HlistNode|VlistNode
11314 ---@param round? boolean # When you pass true as third argument the value will be rounded.
11315 ---
11316 ---@return number|integer|nil
11317 ---
11318 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11319 function node.effective_glue(glue, parent, round) end
11320
11321 ---
11322 ---Return the
11323 ---effective width of a glue node.
11324 ---
11325 ---__Reference:__
11326 ---
11327 ---* Corresponding C source code: [lnodelib.c#L8505-L8533](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8505-L8533)
11328 ---
11329 ---@param d integer # The index number of the node in the memory table for direct access.
11330 ---@param parent HlistNode|VlistNode
11331 ---@param round? boolean # When you pass true as third argument the value will be rounded.
11332 ---
11333 ---@return number|integer|nil
11334 ---
11335 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11336 function node.direct.effective_glue(d, parent, round) end
11337
11338 ---
11339 ---__Reference:__
11340 ---
11341 ---* Corresponding C source code: [texnodes.c#L597-L600](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L597-L600)
11342 ---
11343 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11344 ---@alias KernNodeSubtype
11345 ---|0 # fontkern
11346 ---|1 # userkern
11347 ---|2 # accentkern
11348 ---|3 # italiccorrection
11349
11350 ---
11351 ---The `kern` command creates such nodes but for instance the font and math
11352 ---machinery can also add them.
11353 ---
11354 ---__Reference:__
11355 ---
11356 ---* Corresponding C source code: [texnodes.c#L836-L839](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L836-L839)
11357 ---
11358 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11359 ---@class KernNode: Node
11360 ---@field subtype KernNodeSubtype
11361 ---@field kern integer # Fixed horizontal or vertical advance (in scaled points)
11362
11363 ---
11364 ---__Reference:__
11365 ---
11366 ---* Corresponding C source code: [texnodes.c#L587-L595](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L587-L595)
11367 ---
11368 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11369 ---@alias PenaltyNodeSubtype
11370 ---|0 # userpenalty
11371 ---|1 # linebreakpenalty
11372 ---|2 # linepenalty
11373 ---|3 # wordpenalty
11374 ---|4 # finalpenalty
11375 ---|5 # noadpenalty
11376 ---|6 # beforedisplaypenalty
11377 ---|7 # afterdisplaypenalty
11378 ---|8 # equationnumberpenalty
11379
11380 ---
11381 ---__Reference:__
11382 ---
11383 ---* Corresponding C source code: [texnodes.c#L898-L900](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L898-L900)
11384 ---
11385 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11386 ---@class PenaltyNode: Node
11387 ---@field subtype PenaltyNodeSubtype
11388 ---@field attr Node # A list of attributes.
11389 ---@field penalty integer # the penalty value
11390
11391 ---
11392 ---__Reference:__
11393 ---
11394 ---* Corresponding C source code: [texnodes.c#L613-L618](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L613-L618)
11395 ---
11396 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11397 ---@alias GlyphNodeSubtype
11398 ---|0 # character
11399 ---|1 # ligature
11400 ---|2 # ghost
11401 ---|3 # left
11402 ---|4 # right
11403
11404 ---
11405 ---__Reference:__
11406 ---
11407 ---* Corresponding C source code: [texnodes.c#L801-L816](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L801-L816)
11408 ---
11409 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11410 ---@class GlyphNode: Node
11411 ---@field subtype GlyphNodeSubtype # A bit field
11412 ---@field attr Node # A list of attributes
11413 ---@field char integer # The character index. in the font
11414 ---@field font integer # The font identifier
11415 ---@field lang integer # The language identifier
11416 ---@field left integer # The frozen `\lefthyphenmnin` value
11417 ---@field right integer # The frozen `\righthyphenmnin` value
11418 ---@field uchyph boolean # The frozen `uchyph` value
11419 ---@field components Node # A Pointer to ligature components
11420 ---@field xoffset integer # A virtual displacement in horizontal direction
11421 ---@field yoffset integer # A virtual displacement in vertical direction
11422 ---@field width integer # The (original) width of the character
11423 ---@field height integer # The (original) height of the character
11424 ---@field depth integer # The (original) depth of the character
11425 ---@field expansion_factor integer # The to be applied expansion factor
11426 ---@field data integer # A general purpose field for users (we had room for it)
11427
11428 ---
11429 ---Return `true` when a glyph or disc node references that font.
11430 ---
11431 ---__Reference:__
11432 ---
11433 ---* Corresponding C source code: [lnodelib.c#L7639-L7655](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L7639-L7655)
11434 ---
11435 ---@param n Node
11436 ---@param font integer
11437 ---
11438 ---@return boolean
11439 ---
11440 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11441 function node.uses_font(n, font) end
11442
11443 ---
11444 ---Return `true` when a glyph or disc node references that font.
11445 ---
11446 ---__Reference:__
11447 ---
11448 ---* Corresponding C source code: [lnodelib.c#L7621-L7637](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L7621-L7637)
11449 ---
11450 ---@param d integer # The index number of the node in the memory table for direct access.
11451 ---@param font integer
11452 ---
11453 ---@return boolean
11454 ---
11455 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11456 function node.direct.uses_font(d, font) end
11457
11458 ---
11459 ---__Reference:__
11460 ---
11461 ---* Corresponding C source code: [texnodes.c#L582-L585](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L582-L585)
11462 ---
11463 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11464 ---@alias BoundaryNodeSubtype
11465 ---|0 # cancel
11466 ---|1 # user
11467 ---|2 # protrusion
11468 ---|3 # word
11469
11470 ---
11471 ---__Reference:__
11472 ---
11473 ---* Corresponding C source code: [texnodes.c#L735-L737](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L735-L737)
11474 ---
11475 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11476 ---@class BoundaryNode: Node
11477 ---@field subtype BoundaryNodeSubtype
11478 ---@field attr Node # A list of attributes.
11479 ---@field value integer # values 0-255 are reserved
11480
11481 ---
11482 ---__Reference:__
11483 ---
11484 ---* Corresponding C source code: [texnodes.c#L853-L861](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L853-L861)
11485 ---
11486 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11487 ---@class LocalParNode: Node
11488 ---@field attr Node # A list of attributes.
11489 ---@field pen_inter integer # local interline penalty (from `localinterlinepenalty`)
11490 ---@field pen_broken integer # local broken penalty (from `localbrokenpenalty`)
11491 ---@field dir string # the direction of this par. see \in [dirnodes]
11492 ---@field box_left Node # the `localleftbox`
11493 ---@field box_left_width integer # width of the `localleftbox`
11494 ---@field box_right Node # the `localrightbox`
11495 ---@field box_right_width integer # width of the `localrightbox`
11496
11497 ---
11498 ---Direction specifiers are three-letter combinations of `T`, `B`,
11499 ---`R`, and `L`. These are built up out of three separate items:
11500 ---
11501 ---* the first is the direction of the “top” of paragraphs
11502 ---* the second is the direction of the “start” of lines
11503 ---* the third is the direction of the “top” of glyphs
11504 ---
11505 ---However, only four combinations are accepted: `TLT`, `TRT`, `RTT`, and `LTL`. Inside actual `dir` nodes, the representation of
11506 ---`dir` is not a three-letter but a combination of numbers. When printed the
11507 ---direction is indicated by a `+` or `-`, indicating whether the value
11508 ---is pushed or popped from the direction stack.
11509 ---
11510 ---__Reference:__
11511 ---
11512 ---* Corresponding C source code: [texnodes.c#L753-L756](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L753-L756)
11513 ---
11514 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11515 ---@class DirNode: Node
11516 ---@field attr Node # A list of attributes.
11517 ---@field dir string # the direction (but see below)
11518 ---@field level integer # nesting level of this direction whatsit
11519
11520 ---
11521 ---__Reference:__
11522 ---
11523 ---* Corresponding C source code: [texnodes.c#L666-L667](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L666-L667)
11524 ---
11525 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11526 ---@alias MarginKernNodeSubtype
11527 ---|0 # left
11528 ---|1 # right
11529
11530 ---
11531 ---Margin kerns result from protrusion.
11532 ---
11533 ---__Reference:__
11534 ---
11535 ---* Corresponding C source code: [texnodes.c#L863-L866](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L863-L866)
11536 ---
11537 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11538 ---@class MarginKernNode: Node
11539 ---@field subtype MarginKernNodeSubtype
11540 ---@field attr Node # A list of attributes.
11541 ---@field width integer # the advance of the kern
11542 ---@field glyph Node # the glyph to be used
11543
11544 ---
11545 ---The `math_char` is the simplest subnode field, it contains the character
11546 ---and family for a single glyph object.
11547 ---
11548 ---__Reference:__
11549 ---
11550 ---* Corresponding C source code: [texnodes.c#L882-L885](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L882-L885)
11551 ---
11552 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11553 ---@class MathCharNode: Node
11554 ---@field attr Node # A list of attributes.
11555 ---@field char integer # The character index.
11556 ---@field fam integer # The family number.
11557
11558 ---
11559 ---The `math_text_char` is a special
11560 ---case that you will not normally encounter, it arises temporarily during math list
11561 ---conversion (its sole function is to suppress a following italic correction).
11562 ---
11563 ---__Reference:__
11564 ---
11565 ---* Corresponding C source code: [texnodes.c#L887-L890](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L887-L890)
11566 ---
11567 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11568 ---@class MathTextCharNode: Node
11569 ---@field attr Node # A list of attributes.
11570 ---@field char integer # The character index.
11571 ---@field fam integer # The family number.
11572
11573 ---
11574 ---For subsidiary list items
11575 ---
11576 ---__Reference:__
11577 ---
11578 ---* Corresponding C source code: [texnodes.c#L933-L935](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L933-L935)
11579 ---
11580 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11581 ---@class SubBoxNode: Node
11582 ---@field attr Node # A list of attributes.
11583 ---@field head Node # A list of nodes. `head` points to a “normal” vbox or hbox.
11584
11585 ---
11586 ---For subsidiary list items
11587 ---
11588 ---__Reference:__
11589 ---
11590 ---* Corresponding C source code: [texnodes.c#L937-L939](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L937-L939)
11591 ---
11592 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11593 ---@class SubMlistNode: Node
11594 ---@field attr Node # A list of attributes.
11595 ---@field head Node # A list of nodes. `head` points to a math list that is yet to be converted.
11596
11597 ---
11598 ---There is a fifth subnode type that is used exclusively for delimiter fields. As
11599 ---before, the `next` and `prev` fields are unused.
11600 ---
11601 ---The fields `large_char` and `large_fam` can be zero, in that case the
11602 ---font that is set for the `small_fam` is expected to provide the large
11603 ---version as an extension to the `small_char`.
11604 ---
11605 ---__Reference:__
11606 ---
11607 ---* Corresponding C source code: [texnodes.c#L746-L751](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L746-L751)
11608 ---
11609 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11610 ---@class DelimNode: Node
11611 ---@field attr Node # A list of attributes.
11612 ---@field small_char integer # character index of base character
11613 ---@field small_fam integer # family number of base character
11614 ---@field large_char integer # character index of next larger character
11615 ---@field large_fam integer # family number of next larger character
11616
11617 ---
11618 ---__Reference:__
11619 ---
11620 ---* Corresponding C source code: [texnodes.c#L672-L684](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L672-L684)
11621 ---
11622 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11623 ---@alias NoadNodeSubtype
11624 ---|0 # ord
11625 ---|1 # opdisplaylimits
11626 ---|2 # oplimits
11627 ---|3 # opnolimits
11628 ---|4 # bin
11629 ---|5 # rel
11630 ---|6 # open
11631 ---|7 # close
11632 ---|8 # punct
11633 ---|9 # inner
11634 ---|10 # under
11635 ---|11 # over
11636 ---|12 # vcenter
11637
11638 ---
11639 ---First, there are the objects (the *TeX* book calls them “atoms”) that are
11640 ---associated with the simple math objects: ord, op, bin, rel, open, close, punct,
11641 ---inner, over, under, vcent. These all have the same fields, and they are combined
11642 ---into a single node type with separate subtypes for differentiation.
11643 ---
11644 ---Some noads have an option field. The values in this bitset are common:
11645 ---
11646 --- | meaning | bits |
11647 --- |-----------------|-----------------|
11648 --- | set | `0x08` |
11649 --- | internal | `0x00` + `0x08` |
11650 --- | internal | `0x01` + `0x08` |
11651 --- | axis | `0x02` + `0x08` |
11652 --- | no axis | `0x04` + `0x08` |
11653 --- | exact | `0x10` + `0x08` |
11654 --- | left | `0x11` + `0x08` |
11655 --- | middle | `0x12` + `0x08` |
11656 --- | right | `0x14` + `0x08` |
11657 --- | no sub script | `0x21` + `0x08` |
11658 --- | no super script | `0x22` + `0x08` |
11659 --- | no script | `0x23` + `0x08` |
11660 ---
11661 ---__Reference:__
11662 ---
11663 ---* Corresponding C source code: [texnodes.c#L892-L896](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L892-L896)
11664 ---
11665 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11666 ---@class NoadNode: Node
11667 ---@field subtype NoadNodeSubtype
11668 ---@field attr Node # A list of attributes.
11669 ---@field nucleus Node # base
11670 ---@field sub Node # subscript
11671 ---@field sup Node # superscript
11672 ---@field options integer # bitset of rendering options
11673
11674 ---
11675 ---__Reference:__
11676 ---
11677 ---* Corresponding C source code: [texnodes.c#L694-L697](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L694-L697)
11678 ---
11679 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11680 ---@alias AccentNodeSubtype
11681 ---|0 # bothflexible
11682 ---|1 # fixedtop
11683 ---|2 # fixedbottom
11684 ---|3 # fixedboth
11685
11686 ---
11687 ---__Reference:__
11688 ---
11689 ---* Corresponding C source code: [texnodes.c#L714-L723](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L714-L723)
11690 ---
11691 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11692 ---@class AccentNode: Node
11693 ---@field attr Node # A list of attributes.
11694 ---@field subtype AccentNodeSubtype
11695 ---@field nucleus Node # base
11696 ---@field sub Node # subscript
11697 ---@field sup Node # superscript
11698 ---@field accent Node # top accent
11699 ---@field bot_accent Node # bottom accent
11700 ---@field top_accent Node # top_accent
11701 ---@field overlay_accent Node # overlay_accent
11702 ---@field fraction integer # larger step criterium (divided by 1000)
11703
11704 ---
11705 ---__Reference:__
11706 ---
11707 ---* Corresponding C source code: [texnodes.c#L929-L931](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L929-L931)
11708 ---
11709 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11710 ---@class StyleNode: Node
11711 ---@field attr Node # A list of attributes.
11712 ---@field style string # contains the style
11713
11714 ---
11715 ---Warning: never assign a node list to the `display`, `text`, `script`, or `scriptscript` field unless you are sure its internal link
11716 ---structure is correct, otherwise an error can occur.
11717 ---
11718 ---__Reference:__
11719 ---
11720 ---* Corresponding C source code: [texnodes.c#L739-L744](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L739-L744)
11721 ---
11722 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11723 ---@class ChoiceNode: Node
11724 ---@field attr Node # A list of attributes.
11725 ---@field display Node # list of display size alternatives
11726 ---@field text Node # list of text size alternatives
11727 ---@field script Node # list of scriptsize alternatives
11728 ---@field scriptscript Node # list of scriptscriptsize alternatives
11729
11730 ---
11731 ---__Reference:__
11732 ---
11733 ---* Corresponding C source code: [texnodes.c#L686-L692](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L686-L692)
11734 ---
11735 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11736 ---@alias RadicalNodeSubtype
11737 ---|0 # radical
11738 ---|1 # uradical
11739 ---|2 # uroot
11740 ---|3 # uunderdelimiter
11741 ---|4 # uoverdelimiter
11742 ---|5 # udelimiterunder
11743 ---|6 # udelimiterover
11744
11745 ---
11746 ----
11747 --Warning: never assign a node list to the `nucleus`, `sub`, `sup`, `left`, or `degree` field unless you are sure its internal
11748 ---link structure is correct, otherwise an error can be triggered.
11749 ---
11750 ---__Reference:__
11751 ---
11752 ---* Corresponding C source code: [texnodes.c#L902-L910](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L902-L910)
11753 ---
11754 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11755 ---@class RadicalNode: Node
11756 ---@field subtype RadicalNodeSubtype
11757 ---@field attr Node # A list of attributes.
11758 ---@field nucleus KernNode # base
11759 ---@field sub KernNode # subscript
11760 ---@field sup KernNode # superscript
11761 ---@field left DelimNode
11762 ---@field degree KernNode # only set by `Uroot`
11763 ---@field width integer # required width
11764 ---@field options integer # bitset of rendering options
11765
11766 ---
11767 ---Warning: never assign a node list to the `num`, or `denom` field
11768 ---unless you are sure its internal link structure is correct, otherwise an error
11769 ---can result.
11770 ---
11771 ---__Reference:__
11772 ---
11773 ---* Corresponding C source code: [texnodes.c#L774-L783](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L774-L783)
11774 ---
11775 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11776 ---@class FractionNode: Node
11777 ---@field attr Node # A list of attributes.
11778 ---@field width integer # (optional) width of the fraction
11779 ---@field num KernNode # numerator
11780 ---@field denom KernNode # denominator
11781 ---@field left DelimNode # left side symbol
11782 ---@field right DelimNode # right side symbol
11783 ---@field middle DelimNode # middle symbol
11784 ---@field options integer # bitset of rendering options
11785 ---
11786
11787 ---
11788 ---__Reference:__
11789 ---
11790 ---* Corresponding C source code: [texnodes.c#L627-L631](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L627-L631)
11791 ---
11792 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11793 ---@alias FenceNodeSubtype
11794 ---|0 # unset
11795 ---|1 # left
11796 ---|2 # middle
11797 ---|3 # right
11798 ---|4 # no
11799
11800 ---
11801 ---Warning: some of these fields are used by the renderer and might get adapted in
11802 ---the process.
11803 ---
11804 ---__Reference:__
11805 ---
11806 ---* Corresponding C source code: [texnodes.c#L765-L772](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L765-L772)
11807 ---
11808 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11809 ---@class FenceNode: Node
11810 ---@field subtype FenceNodeSubtype
11811 ---@field attr Node # list of attributes
11812 ---@field delim DelimNode # delimiter specification
11813 ---@field italic integer # italic correction
11814 ---@field height integer # required height
11815 ---@field depth integer # required depth
11816 ---@field options integer # bitset of rendering options
11817 ---@field class integer # spacing related class
11818
11819 ---
11820 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11821 ---@alias WhatsitTypeId
11822 ---|0 # open
11823 ---|1 # write
11824 ---|2 # close
11825 ---|3 # special
11826 ---|6 # save_pos
11827 ---|7 # late_lua
11828 ---|8 # user_defined
11829 ---|16 # pdf_literal
11830 ---|17 # pdf_refobj
11831 ---|18 # pdf_annot
11832 ---|19 # pdf_start_link
11833 ---|20 # pdf_end_link
11834 ---|21 # pdf_dest
11835 ---|22 # pdf_action
11836 ---|23 # pdf_thread
11837 ---|24 # pdf_start_thread
11838 ---|25 # pdf_end_thread
11839 ---|26 # pdf_thread_data
11840 ---|27 # pdf_link_data
11841 ---|28 # pdf_colorstack
11842 ---|29 # pdf_setmatrix
11843 ---|30 # pdf_save
11844 ---|31 # pdf_restore
11845 ---|32 # pdf_link_state
11846
11847 ---
11848 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11849 ---@alias WhatsitTypeName
11850 ---| 'open' # 0
11851 ---| 'write' # 1
11852 ---| 'close' # 2
11853 ---| 'special' # 3
11854 ---| 'save_pos' # 6
11855 ---| 'late_lua' # 7
11856 ---| 'user_defined' # 8
11857 ---| 'pdf_literal' # 16
11858 ---| 'pdf_refobj' # 17
11859 ---| 'pdf_annot' # 18
11860 ---| 'pdf_start_link' # 19
11861 ---| 'pdf_end_link' # 20
11862 ---| 'pdf_dest' # 21
11863 ---| 'pdf_action' # 22
11864 ---| 'pdf_thread' # 23
11865 ---| 'pdf_start_thread' # 24
11866 ---| 'pdf_end_thread' # 25
11867 ---| 'pdf_thread_data' # 26
11868 ---| 'pdf_link_data' # 27
11869 ---| 'pdf_colorstack' # 28
11870 ---| 'pdf_setmatrix' # 29
11871 ---| 'pdf_save' # 30
11872 ---| 'pdf_restore' # 31
11873 ---| 'pdf_link_state' # 32
11874
11875 ---
11876 ---Whatsit nodes come in many subtypes that you can ask for them by running
11877 ---`node.whatsits`.
11878 ---
11879 ---Some of them are generic and independent of the output mode and others are
11880 ---specific to the chosen backend: *DVI* or \PDF. Here we discuss the generic
11881 ---font-end nodes nodes.
11882 ---
11883 ---Source: [luatex-nodes.tex#L781-L797](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L781-L797)
11884 ---
11885 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11886 ---@class WhatsitNode: Node
11887
11888 ---
11889 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11890 ---@class OpenWhatsitNode: Node
11891 ---@field attr Node # A list of attributes.
11892 ---@field stream integer # *TeX*'s stream id number
11893 ---@field name string # file name
11894 ---@field ext string # file extension
11895 ---@field area string # file area (this may become obsolete)
11896
11897 ---
11898 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11899 ---@class WriteWhatsitNode: Node
11900 ---@field attr Node # A list of attributes.
11901 ---@field stream integer # *TeX*'s stream id number
11902 ---@field data table # a table representing the token list to be written
11903
11904 ---
11905 ---__Reference:__
11906 ---
11907 ---* Corresponding C source code: [texnodes.c#L1018-L1020](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1018-L1020)
11908 ---
11909 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11910 ---@class CloseWhatsitNode: Node
11911 ---@field attr Node # A list of attributes.
11912 ---@field stream integer # *TeX*'s stream id number
11913
11914 ---
11915 ---User-defined whatsit nodes can only be created and handled from *Lua* code. In
11916 ---effect, they are an extension to the extension mechanism. The *LuaTeX* engine
11917 ---will simply step over such whatsits without ever looking at the contents.
11918 ---
11919 ---__Reference:__
11920 ---
11921 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L833-L864](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L833-L864)
11922 ---
11923 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11924 ---@class UserDefinedWhatsitNode: WhatsitNode
11925 ---@field user_id integer # id number
11926 ---@field type 97|100|108|110|115|116 # The `type` can have one of six distinct values. The number is the ASCII value if the first character of the type name (so you can use string.byte("l") instead of `108`): 97 “a” list of attributes (a node list), 100 “d” a *Lua* number, 108 “l” a *Lua* value (table, number, boolean, etc), 110 “n” a node list, 115 “s” a *Lua* string, 116 “t” a *Lua* token list in *Lua* table form (a list of triplets).
11927 ---@field value number|Node|string|table
11928
11929 ---
11930 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11931 ---@class SavePosWhatsitNode: WhatsitNode
11932 ---@field attr Node # A list of attributes.
11933
11934 ---
11935 ---The difference between `data` and `string` is that on assignment, the
11936 ---`data` field is converted to a token list, cf. use as `latelua`. The
11937 ---`string` version is treated as a literal string.
11938 ---
11939 ---When a function is used, it gets called with as first argument the node that triggers
11940 ---the call.
11941 ---
11942 ---__Reference:__
11943 ---
11944 ---* Corresponding C source code: [texnodes.c#L1022-L1027](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1022-L1027)
11945 ---
11946 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11947 ---@class LateLuaWhatsitNode: WhatsitNode
11948 ---@field attr Node # A list of attributes.
11949 ---@field data string|function # the to be written information stored as *Lua* value
11950 ---@field token string # the to be written information stored as token list
11951 ---@field name string # the name to use for *Lua* error reporting
11952
11953 ---
11954 ---There is only one DVI backend whatsit, and it just flushes its content to the
11955 ---output file.
11956 ---
11957 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11958 ---@class SpecialWhatsitNode: WhatsitNode
11959 ---@field attr Node # A list of attributes.
11960 ---@field data string # the `special` information
11961
11962 ---
11963 ---__Reference:__
11964 ---
11965 ---* Corresponding C source code: [texnodes.c#L1082-L1088](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1082-L1088)
11966 ---
11967 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11968 ---@alias PdfLiteralModes
11969 ---|0 `origin`
11970 ---|1 `page`
11971 ---|2 `direct`
11972 ---|3 `raw`
11973 ---|4 `text`
11974 ---|5 `font`
11975 ---|6 `special`
11976
11977 ---
11978 ---The higher the number, the less checking and the more you can run into trouble.
11979 ---Especially the `raw` variant can produce bad *PDF* so you can best check
11980 ---what you generate.
11981 ---
11982 ---__Reference:__
11983 ---
11984 ---* Corresponding C source code: [texnodes.c#L1148-L1151](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1148-L1151)
11985 ---
11986 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11987 ---@class PdfLiteralWhatsitNode: WhatsitNode
11988 ---@field attr Node # A list of attributes.
11989 ---@field mode PdfLiteralModes # the “mode” setting of this literal
11990 ---@field data string # the to be written information stored as *Lua* string
11991 ---@field token string # the to be written information stored as token list
11992
11993 ---
11994 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
11995 ---@class PdfRefobjWhatsitNode: WhatsitNode
11996 ---@field attr Node # A list of attributes.
11997 ---@field objnum integer # the referenced *PDF* object number
11998
11999 ---
12000 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12001 ---@class PdfAnnotWhatsitNode: WhatsitNode
12002 ---@field attr Node # A list of attributes.
12003 ---@field width integer # the width (not used in calculations)
12004 ---@field height integer # the height (not used in calculations)
12005 ---@field depth integer # the depth (not used in calculations)
12006 ---@field objnum integer # the referenced *PDF* object number
12007 ---@field data string # the annotation data
12008
12009 ---
12010 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12011 ---@class PdfStartLinkWhatsitNode: WhatsitNode
12012 ---@field attr Node # A list of attributes.
12013 ---@field width integer # the width (not used in calculations)
12014 ---@field height integer # the height (not used in calculations)
12015 ---@field depth integer # the depth (not used in calculations)
12016 ---@field objnum integer # the referenced *PDF* object number
12017 ---@field link_attr table # the link attribute token list
12018 ---@field action Node # the action to perform
12019
12020 ---
12021 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12022 ---@class PdfEndLinkWhatsitNode: WhatsitNode
12023 ---@field attr Node # A list of attributes.
12024
12025 ---
12026 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12027 ---@class PdfDestWhatsitNode: WhatsitNode
12028 ---@field attr Node # A list of attributes.
12029 ---@field width integer # the width (not used in calculations)
12030 ---@field height integer # the height (not used in calculations)
12031 ---@field depth integer # the depth (not used in calculations)
12032 ---@field named_id integer # is the `dest_id` a string value?
12033 ---@field dest_id integer|string # `integer`: the destination id `string`: the destination name
12034 ---@field dest_type integer # type of destination
12035 ---@field xyz_zoom integer # the zoom factor (times 1000)
12036 ---@field objnum integer # the *PDF* object number; for structure references the *PDF* object number of the linked structure element
12037
12038 ---
12039 ---__Reference:__
12040 ---
12041 ---* Corresponding C source code: [texnodes.c#L1090-L1093](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1090-L1093)
12042 ---
12043 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12044 ---@alias PdfActionTypes
12045 ---|0 'page'
12046 ---|1 'goto'
12047 ---|2 'thread'
12048 ---|3 'user'
12049
12050 ---
12051 ---__Reference:__
12052 ---
12053 ---* Corresponding C source code: [texnodes.c#L1095-L1097](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1095-L1097)
12054 ---
12055 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12056 ---@alias PdfWindowTypes
12057 ---|0 'notset'
12058 ---|1 'new'
12059 ---|2 'nonew'
12060
12061 ---
12062 ---__Reference:__
12063 ---
12064 ---* Corresponding C source code: [texnodes.c#L1104-L1111](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1104-L1111)
12065 ---
12066 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12067 ---@class PdfActionWhatsitNode: WhatsitNode
12068 ---@field action_type PdfActionTypes # the kind of action involved
12069 ---@field named_id integer # are `dest_id` and `struct_id` string values?
12070 ---@field action_id integer|string # token list reference or string
12071 ---@field file string # the target filename
12072 ---@field new_window PdfWindowTypes # the window state of the target
12073 ---@field struct_id nil|integer|string # `nil`: the action does not reference a structure; `integer`: id of the referenced structure; `string`: name of the referenced structure destination
12074 ---@field data string # the name of the destination
12075
12076 ---
12077 ---__Reference:__
12078 ---
12079 ---* Corresponding C source code: [texnodes.c#L1185-L1192](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1185-L1192)
12080 ---
12081 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12082 ---@class PdfThreadWhatsitNode
12083 ---@field attr Node # A list of attributes.
12084 ---@field width integer # the width (not used in calculations)
12085 ---@field height integer # the height (not used in calculations)
12086 ---@field depth integer # the depth (not used in calculations)
12087 ---@field named_id integer # is `tread_id` a string value?
12088 ---@field tread_id integer # the thread id string the thread name
12089 ---@field thread_attr integer # extra thread information
12090
12091 ---
12092 ---__Reference:__
12093 ---
12094 ---* Corresponding C source code: [texnodes.c#L1176-L1183](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1176-L1183)
12095 ---
12096 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12097 ---@class PdfStartThreadWhatsitNode
12098 ---@field attr Node # A list of attributes.
12099 ---@field width integer # the width (not used in calculations)
12100 ---@field height integer # the height (not used in calculations)
12101 ---@field depth integer # the depth (not used in calculations)
12102 ---@field named_id integer # is `tread_id` a string value?
12103 ---@field tread_id integer # the thread id string the thread name
12104 ---@field thread_attr integer # extra thread information
12105
12106 ---
12107 ---__Reference:__
12108 ---
12109 ---* Corresponding C source code: [texnodes.c#L1145-L1146](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L1145-L1146)
12110 ---
12111 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12112 ---@class PdfEndThreadWhatsitNode
12113 ---@field attr Node # A list of attributes.
12114
12115 ---
12116 ---From the pdfTeX manual:
12117 ---
12118 ---`\pdfcolorstack ⟨stack number⟩ ⟨stack action⟩ ⟨general text⟩`
12119 ---
12120 ---The command operates on the stack of a given number. If ⟨stack action⟩ is `push` keyword, the
12121 ---new value provided as ⟨general text⟩ is inserted into the top of the graphic stack and becomes
12122 ---the current stack value. If followed by `pop`, the top value is removed from the stack and the
12123 ---new top value becomes the current. `set` keyword replaces the current value with ⟨general text⟩
12124 ---without changing the stack size. `current` keyword instructs just to use the current stack value
12125 ---without modifying the stack at all.
12126 ---
12127 ---__Reference:__
12128 ---
12129 ---* Source file of the `LuaTeX` manual: [pdftex-t.tex#L3954-L3980](https://github.com/tex-mirror/pdftex/blob/6fb2352aa70a23ad3830f1434613170be3f3cd74/doc/manual/pdftex-t.tex#L3954-L3980)
12130 ---Source: [luatex-nodes.tex#L1097-L1107](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/e1cb50f34dc1451c9c5319dc953305b52a7a96fd/manual/luatex-nodes.tex#L1097-L1107)
12131 ---
12132 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12133 ---@class PdfColorstackWhatsitNode: WhatsitNode
12134 ---@field stack integer # The colorstack id number.
12135 ---@field command integer # The command to execute. ⟨stack action⟩ → set (0) | push (1) | pop (2) | current (3) [texnodes.c#L3523-L3545](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/6472bd794fea67de09f01e1a89e9b12141be7474/source/texk/web2c/luatexdir/tex/texnodes.c#L3523-L3545)
12136 ---@field data string # General text that is placed on top of the stack, for example `1 0 0 rg 1 0 0 RG`. `rg` only colors filled outlines while the stroke color is set with `RG`. From the [PDF Reference, fourth edition](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.5_v6.pdf), 4.5.7 Color Operators Page 251: `gray G`: Set the stroking color space to DeviceGray. `gray` is a number between 0.0 (black) and 1.0 (white). `gray g`: Same as `G`, but for nonstroking operations. `r g b RG`: Set the stroking color space to DeviceRGB. Each operand must be a number between 0.0 (minimum intensity) and 1.0 (maximum intensity). `r g b rg`: same as `RG`, but for nonstroking operations. `c m y k K`: Set the stroking color space to DeviceCMYK. Each operand must be a number between 0.0 (zero concentration) and 1.0 (maximum concentration). `c m y k k`: Same as `K`, but for nonstroking operations.
12137
12138 ---
12139 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12140 ---@class PdfSetmatrixWhatsitNode
12141 ---@field attr Node # A list of attributes.
12142 ---@field data string # data
12143
12144 ---
12145 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12146 ---@class PdfSaveWhatsitNode
12147 ---@field attr Node # A list of attributes.
12148
12149 ---
12150 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12151 ---@class PdfRestoreWhatsitNode
12152 ---@field attr Node # A list of attributes.
12153
12154 ---
12155 ---__Reference:__
12156 ---
12157 ---* Corresponding C source code: [texnodes.c#L941-L952](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L941-L952)
12158 ---
12159 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12160 ---@class UnsetNode: Node
12161 ---@field attr Node
12162 ---@field width integer
12163 ---@field depth integer
12164 ---@field height integer
12165 ---@field dir DirectionSpecifier
12166 ---@field shrink integer
12167 ---@field glue_order integer
12168 ---@field glue_sign integer
12169 ---@field stretch integer
12170 ---@field span unknown
12171 ---@field head Node
12172
12173 ---
12174 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12175 ---@class AlignRecordNode: Node
12176
12177 ---
12178 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12179 ---@class PseudoFileNode: Node
12180
12181 ---
12182 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12183 ---@class PseudoLineNode: Node
12184
12185 ---
12186 ---__Reference:__
12187 ---
12188 ---* Corresponding C source code: [texnodes.c#L826-L834](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L826-L834)
12189 ---
12190 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12191 ---@class PageInsertNode: Node
12192
12193 ---
12194 ---__Reference:__
12195 ---
12196 ---* Corresponding C source code: [texnodes.c#L922-L927](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L922-L927)
12197 ---
12198 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12199 ---@class SplitInsertNode: Node
12200 ---@field height integer
12201 ---@field last_ins_ptr integer
12202 ---@field best_ins_ptr integer
12203 ---@field broken_ptr integer
12204 ---@field broken_ins integer
12205
12206 ---
12207 ---__Reference:__
12208 ---
12209 ---* Corresponding C source code: [texnodes.c#L474](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L474)
12210 ---
12211 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12212 ---@class ExprStackNode: Node
12213
12214 ---
12215 ---__Reference:__
12216 ---
12217 ---* Corresponding C source code: [texnodes.c#L475](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L475)
12218 ---
12219 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12220 ---@class NestedListNode: Node
12221
12222 ---
12223 ---__Reference:__
12224 ---
12225 ---* Corresponding C source code: [texnodes.c#L476](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L476)
12226 ---
12227 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12228 ---@class SpanNode: Node
12229
12230 ---
12231 ---__Reference:__
12232 ---
12233 ---* Corresponding C source code: [texnodes.c#L729-L731](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L729-L731)
12234 ---
12235 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12236 ---@class AttributeNode: Node
12237 ---@field number integer
12238 ---@field value unknown
12239
12240 ---
12241 ---__Reference:__
12242 ---
12243 ---* Corresponding C source code: [texnodes.c#L733](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L733)
12244 ---
12245 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12246 ---@class AttributeListNode: Node
12247
12248 ---
12249 ---__Reference:__
12250 ---
12251 ---* Corresponding C source code: [texnodes.c#L480](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L480)
12252 ---
12253 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12254 ---@class TempNode: Node
12255
12256 ---
12257 ---__Reference:__
12258 ---
12259 ---* Corresponding C source code: [texnodes.c#L481](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L481)
12260 ---
12261 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12262 ---@class AlignStackNode: Node
12263
12264 ---
12265 ---__Reference:__
12266 ---
12267 ---* Corresponding C source code: [texnodes.c#L482](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L482)
12268 ---
12269 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12270 ---@class MovementStackNode: Node
12271
12272 ---
12273 ---__Reference:__
12274 ---
12275 ---* Corresponding C source code: [texnodes.c#L483](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L483)
12276 ---
12277 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12278 ---@class IfStackNode: Node
12279
12280 ---
12281 ---__Reference:__
12282 ---
12283 ---* Corresponding C source code: [texnodes.c#L484](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L484)
12284 ---
12285 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12286 ---@class UnhyphenatedNode: Node
12287
12288 ---
12289 ---__Reference:__
12290 ---
12291 ---* Corresponding C source code: [texnodes.c#L485](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L485)
12292 ---
12293 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12294 ---@class HyphenatedNode: Node
12295
12296 ---
12297 ---__Reference:__
12298 ---
12299 ---* Corresponding C source code: [texnodes.c#L486](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L486)
12300 ---
12301 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12302 ---@class DeltaNode: Node
12303
12304 ---
12305 ---Used in the line breaking algorithm.
12306 ---
12307 ---__Reference:__
12308 ---
12309 ---* Corresponding C source code: [texnodes.c#L487](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L487)
12310 ---
12311 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12312 ---@class PassiveNode: Node
12313
12314 ---
12315 ---`\parshape`
12316 ---
12317 ---__Reference:__
12318 ---
12319 ---* Corresponding C source code: [texnodes.c#L488](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L488)
12320 ---
12321 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12322 ---@class ShapeNode: Node
12323
12324 ---
12325 ---Return a number (the internal index of the node) if the argument is a userdata
12326 ---object of type `node` and `false` when no node is passed.
12327 ---
12328 ---__Reference:__
12329 ---
12330 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1199-L1211](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1199-L1211)
12331 ---* Corresponding C source code: [lnodelib.c#L8295-L8303](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8295-L8303)
12332 ---
12333 ---@param item any
12334 ---
12335 ---@return false|integer t
12336 ---
12337 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12338 function node.is_node(item) end
12339
12340 ---
12341 ---Return a number (the internal index of the node) if the argument is a userdata
12342 ---object of type `node` and `false` when no node is passed.
12343 ---
12344 ---__Reference:__
12345 ---
12346 ---* Corresponding C source code: [lnodelib.c#L8326-L8343](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8326-L8343)
12347 ---
12348 ---@param item any
12349 ---
12350 ---@return false|integer t
12351 ---
12352 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12353 function node.direct.is_node(item) end
12354
12355 ---
12356 ---Return a table that maps node id numbers to node type strings, providing an
12357 ---overview of the possible top-level `id` types.
12358 ---
12359 ---__Reference:__
12360 ---
12361 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1218-L1224](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1218-L1224)
12362 ---* Corresponding C source code: [lnodelib.c#L3066-L3069](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3066-L3069)
12363 ---
12364 ---@return table
12365 ---
12366 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12367 function node.types() end
12368
12369 ---
12370 ---Provides a table of subtype mappings.
12371 ---
12372 ---TEX’s ‘whatsits’ all have the same id. The various subtypes are defined by their subtype fields.
12373
12374 ---
12375 ---__Reference:__
12376 ---
12377 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1226-L1233](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1226-L1233)
12378 ---* Corresponding C source code: [lnodelib.c#L3073-L3076](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3073-L3076)
12379 ---
12380 ---@return table
12381 ---
12382 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12383 function node.whatsits() end
12384
12385 ---
12386 ---Convert a single type name to its internal numeric representation.
12387 ---
12388 ---```lua
12389 ---node.id('glyph') -- 29
12390 ---```
12391 ---
12392 ---__Reference:__
12393 ---
12394 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1235-L1244](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1235-L1244)
12395 ---* Corresponding C source code: [lnodelib.c#L470-L483](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L470-L483)
12396 ---
12397 ---@param type NodeTypeName
12398 ---
12399 ---@return NodeTypeId
12400 ---
12401 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12402 function node.id(type) end
12403
12404 ---
12405 ---Convert an internal numeric node type representation to an external
12406 ---node type string.
12407 ---
12408 ---If the argument is a number, then the type function converts an
12409 ---internal numeric representation to an external string representation.
12410 ---Otherwise, it will return the string `node` if the object
12411 ---represents a node, and `nil` otherwise.
12412 ---
12413 ---```lua
12414 ---node.type(29) -- glyph
12415 ---node.type(node.new("glyph")) -- node
12416 ---node.type('xxx') -- nil
12417 ---```
12418 ---
12419 ---__Reference:__
12420 ---
12421 ---* Corresponding C source code: [lnodelib.c#L1993-L2009](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1993-L2009)
12422 ---
12423 ---@param n NodeTypeId # The numeric node type id.
12424 ---
12425 ---@return NodeTypeName|'node'|nil
12426 ---
12427 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12428 function node.type(n) end
12429
12430 ---
12431 ---Convert a single `whatsit` name to its internal numeric representation (subtype).
12432 ---
12433 ---```lua
12434 ---node.subtype('pdf_literal') -- 16
12435 ---node.subtype('xxx') -- nil
12436 ---```
12437 ---
12438 ---__Reference:__
12439 ---
12440 ---* Corresponding C source code: [lnodelib.c#L1976-L1989](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1976-L1989)
12441 ---
12442 ---@param whatsit_type_name WhatsitTypeName
12443 ---
12444 ---@return WhatsitTypeId whatsit_type_id
12445 ---
12446 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12447 function node.subtype(whatsit_type_name) end
12448
12449 ---
12450 ---Return an array of valid field names for a particular type of
12451 ---node.
12452 ---
12453 ---If you want to get the valid fields for a “whatsit”, you have to
12454 ---supply the second argument also. In other cases, any given second argument will
12455 ---be silently ignored.
12456 ---
12457 ---__Reference:__
12458 ---
12459 ---* Corresponding C source code: [lnodelib.c#L3080-L3115](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3080-L3115)
12460 ---
12461 ---@param id NodeTypeId
12462 ---@param subtype? number
12463 ---
12464 ---@return {[number]: string}
12465 ---
12466 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12467 function node.fields(id, subtype) end
12468
12469 ---
12470 ---Return a boolean that is only `true` if `n` is actually a node, and it has the field.
12471 ---
12472 ---__Reference:__
12473 ---
12474 ---* Corresponding C source code: [lnodelib.c#L2993-L3000](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2993-L3000)
12475 ---
12476 ---@param n Node
12477 ---@param field string
12478 ---
12479 ---@return boolean t
12480 ---
12481 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12482 function node.has_field(n, field) end
12483
12484 ---
12485 ---Return a boolean that is only `true` if `d` is actually a node, and it has the field.
12486 ---
12487 ---__Reference:__
12488 ---
12489 ---* Corresponding C source code: [lnodelib.c#L3041-L3049](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3041-L3049)
12490 ---
12491 ---@param d integer # The index number of the node in the memory table for direct access.
12492 ---@param field string
12493 ---
12494 ---@return boolean t
12495 ---
12496 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12497 function node.direct.has_field(d, field) end
12498
12499 ---
12500 ---Create a new node.
12501 ---
12502 ---All its fields are initialized to
12503 ---either zero or `nil` except for `id` and `subtype`. Instead of
12504 ---numbers you can also use strings (names). If you create a new `whatsit` node
12505 ---the second argument is required. As with all node functions, this function
12506 ---creates a node at the *TeX* level.
12507 ---
12508 ---__Reference:__
12509 ---
12510 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1299-L1314](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1299-L1314)
12511 ---* Corresponding C source code: [lnodelib.c#L2055-L2060](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2055-L2060)
12512 ---
12513 ---@param id integer|NodeTypeName
12514 ---@param subtype? integer|string
12515 ---
12516 ---@return Node
12517 ---
12518 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12519 function node.new(id, subtype) end
12520
12521 ---
12522 ---Create a new node.
12523 ---
12524 ---All its fields are initialized to
12525 ---either zero or `nil` except for `id` and `subtype`. Instead of
12526 ---numbers you can also use strings (names). If you create a new `whatsit` node
12527 ---the second argument is required. As with all node functions, this function
12528 ---creates a node at the *TeX* level.
12529 ---
12530 ---__Reference:__
12531 ---
12532 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1299-L1314](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1299-L1314)
12533 ---* Corresponding C source code: [lnodelib.c#L2064-L2069](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2064-L2069)
12534 ---
12535 ---@param id integer|NodeTypeName
12536 ---@param subtype? integer|string
12537 ---
12538 ---@return integer d
12539 ---
12540 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12541 function node.direct.new(id, subtype) end
12542
12543 ---
12544 ---Free the *TeX* memory allocated for node `n`.
12545 ---
12546 ---Be careful: no checks are
12547 ---done on whether this node is still pointed to from a register or some `next` field: it is up to you to make sure that the internal data structures
12548 ---remain correct.
12549 ---
12550 ---The `free` function returns the next field of the freed node
12551 ---
12552 ---__Reference:__
12553 ---
12554 ---* Corresponding C source code: [lnodelib.c#L2073-L2090](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2073-L2090)
12555 ---
12556 ---@param n Node
12557 ---
12558 ---@return Node next
12559 ---
12560 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12561 function node.direct.free(n) end
12562
12563 ---
12564 ---Free the *TeX* memory allocated for the specified node.
12565 ---
12566 ---Be careful: no checks are
12567 ---done on whether this node is still pointed to from a register or some `next` field: it is up to you to make sure that the internal data structures
12568 ---remain correct.
12569 ---
12570 ---The `free` function returns the next field of the freed node
12571 ---
12572 ---__Reference:__
12573 ---
12574 ---* Corresponding C source code: [lnodelib.c#L2094-L2109](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2094-L2109)
12575 ---
12576 ---@param d integer # The index number of the node in the memory table for direct access.
12577 ---
12578 ---@return integer next
12579 ---
12580 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12581 function node.direct.free(d) end
12582
12583 ---
12584 ---Free the *TeX* memory allocated for the specified node.
12585 ---and return nothing.
12586 ---
12587 ---__Reference:__
12588 ---
12589 ---* Corresponding C source code: [lnodelib.c#L2113-L2122](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2113-L2122)
12590 ---
12591 ---@param n Node
12592 ---
12593 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12594 function node.flush_node(n) end
12595
12596 ---
12597 ---Free the *TeX* memory allocated for the specified node.
12598 ---and return nothing.
12599 ---
12600 ---__Reference:__
12601 ---
12602 ---* Corresponding C source code: [lnodelib.c#L2126-L2133](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2126-L2133)
12603 ---
12604 ---@param d integer # The index number of the node in the memory table for direct access.
12605 ---
12606 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12607 function node.direct.flush_node(d) end
12608
12609 ---
12610 ---Free the *TeX* memory allocated for a list of nodes.
12611 ---
12612 ---Be
12613 ---careful: no checks are done on whether any of these nodes is still pointed to
12614 ---from a register or some `next` field: it is up to you to make sure that the
12615 ---internal data structures remain correct.
12616 ---
12617 ---__Reference:__
12618 ---
12619 ---* Corresponding C source code: [lnodelib.c#L2137-L2146](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2137-L2146)
12620 ---
12621 ---@param n Node
12622 ---
12623 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12624 function node.flush_list(n) end
12625
12626 ---
12627 ---Free the *TeX* memory allocated for a list of nodes.
12628 ---
12629 ---Be
12630 ---careful: no checks are done on whether any of these nodes is still pointed to
12631 ---from a register or some `next` field: it is up to you to make sure that the
12632 ---internal data structures remain correct.
12633 ---
12634 ---__Reference:__
12635 ---
12636 ---* Corresponding C source code: [lnodelib.c#L2150-L2157](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2150-L2157)
12637 ---
12638 ---@param d integer # The index number of the node in the memory table for direct access.
12639 ---
12640 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12641 function node.direct.flush_list(d) end
12642
12643 ---
12644 ---Create a deep copy of node `n`, including all nested lists as in the case
12645 ---of a `hlist` or `vlist` node. Only the `next` field is not copied.
12646 ---
12647 ---__Reference:__
12648 ---
12649 ---* Corresponding C source code: [lnodelib.c#L2476-L2485](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2476-L2485)
12650 ---
12651 ---@param n Node
12652 ---
12653 ---@return Node m
12654 ---
12655 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12656 function node.copy(n) end
12657
12658 ---
12659 ---Create a deep copy of node `n`, including all nested lists as in the case
12660 ---of a `hlist` or `vlist` node. Only the `next` field is not copied.
12661 ---
12662 ---__Reference:__
12663 ---
12664 ---* Corresponding C source code: [lnodelib.c#L2489-L2500](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2489-L2500)
12665 ---
12666 ---@param d integer # The index number of the node in the memory table for direct access.
12667 ---
12668 ---@return integer e
12669 ---
12670 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12671 function node.direct.copy(d) end
12672
12673 ---
12674 ---Create a deep copy of the node list that starts at node `n`.
12675 ---
12676 ---If
12677 ---`m` is also given, the copy stops just before node `m`.
12678 ---
12679 ---Note that you cannot copy attribute lists this way. However, there is normally no
12680 ---need to copy attribute lists as when you do assignments to the `attr` field
12681 ---or make changes to specific attributes, the needed copying and freeing takes
12682 ---place automatically.
12683 ---
12684 ---__Reference:__
12685 ---
12686 ---* Corresponding C source code: [lnodelib.c#L2440-L2452](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2440-L2452)
12687 ---
12688 ---@param n Node
12689 ---@param m? Node
12690 ---
12691 ---@return Node m
12692 ---
12693 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12694 function node.copy_list(n, m) end
12695
12696 ---
12697 ---Create a deep copy of the node list that starts at node `d`.
12698 ---
12699 ---If
12700 ---`e` is also given, the copy stops just before node `e`.
12701 ---
12702 ---Note that you cannot copy attribute lists this way. However, there is normally no
12703 ---need to copy attribute lists as when you do assignments to the `attr` field
12704 ---or make changes to specific attributes, the needed copying and freeing takes
12705 ---place automatically.
12706 ---
12707 ---__Reference:__
12708 ---
12709 ---* Corresponding C source code: [lnodelib.c#L2456-L2472](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2456-L2472)
12710 ---
12711 ---@param d integer # The index number of the node in the memory table for direct access.
12712 ---@param e? integer
12713 ---
12714 ---@return integer e
12715 ---
12716 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12717 function node.direct.copy_list(d, e) end
12718
12719 ---
12720 ---Return the node preceding the given node, or `nil` if
12721 ---there is no such node.
12722 ---
12723 ---__Reference:__
12724 ---
12725 ---* Corresponding C source code: [lnodelib.c#L379-L388](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L379-L388)
12726 ---
12727 ---@param n Node
12728 ---
12729 ---@return Node|nil m
12730 ---
12731 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12732 function node.prev(n) end
12733
12734 ---
12735 ---Return the node following the given node, or `nil` if
12736 ---there is no such node.
12737 ---
12738 ---__Reference:__
12739 ---
12740 ---* Corresponding C source code: [lnodelib.c#L390-L399](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L390-L399)
12741 ---
12742 ---@param n Node
12743 ---
12744 ---@return Node|nil m
12745 ---
12746 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12747 function node.next(n) end
12748
12749 ---
12750 ---Return the currently active list of attributes, if there is one.
12751 ---
12752 ---The intended usage of `current_attr` is as follows:
12753 ---
12754 ---```lua
12755 ---local x1 = node.new("glyph")
12756 ---x1.attr = node.current_attr()
12757 ---local x2 = node.new("glyph")
12758 ---x2.attr = node.current_attr()
12759 ---```
12760 ---
12761 ---or:
12762 ---
12763 ---```lua
12764 ---local x1 = node.new("glyph")
12765 ---local x2 = node.new("glyph")
12766 ---local ca = node.current_attr()
12767 ---x1.attr = ca
12768 ---x2.attr = ca
12769 ---```
12770 ---
12771 ---The attribute lists are ref counted and the assignment takes care of incrementing
12772 ---the refcount. You cannot expect the value `ca` to be valid any more when
12773 ---you assign attributes (using `tex.setattribute`) or when control has been
12774 ---passed back to *TeX*.
12775 ---
12776 ---Note: this function is somewhat experimental, and it returns the *actual*
12777 ---attribute list, not a copy thereof. Therefore, changing any of the attributes in
12778 ---the list will change these values for all nodes that have the current attribute
12779 ---list assigned to them.
12780 ---
12781 ---__Reference:__
12782 ---
12783 ---* Corresponding C source code: [lnodelib.c#L6511-L6532](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6511-L6532)
12784 ---
12785 ---@return Node|nil m
12786 ---
12787 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12788 function node.current_attr() end
12789
12790 ---
12791 ---Return the currently active list of attributes, if there is one.
12792 ---
12793 ---__Reference:__
12794 ---
12795 ---* Corresponding C source code: [lnodelib.c#L6511-L6532](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6511-L6532)
12796 ---
12797 ---@return integer|nil e
12798 ---
12799 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12800 function node.direct.current_attr() end
12801
12802 ---
12803 ---Create a new `hlist` by packaging the list that begins at node `n` into a horizontal box.
12804 ---
12805 ---With only a single argument, this box is created using
12806 ---the natural width of its components. In the three argument form, `info`
12807 ---must be either `additional` or `exactly`, and `width` is the
12808 ---additional (`\hbox spread`) or exact (`\hbox to`) width to be used.
12809 ---The second return value is the badness of the generated box.
12810 ---
12811 ---Caveat: there can be unexpected side-effects to this function, like updating
12812 ---some of the `marks` and `\inserts`. Also note that the content of
12813 ---`h` is the original node list `n`: if you call `node.free(h)`
12814 ---you will also free the node list itself, unless you explicitly set the `list` field to `nil` beforehand. And in a similar way, calling `node.free(n)` will invalidate `h` as well!
12815 ---
12816 ---__Reference:__
12817 ---
12818 ---* Corresponding C source code: [lnodelib.c#L2576-L2619](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2576-L2619)
12819 ---
12820 ---@param n Node
12821 ---@param width? integer
12822 ---@param info? string
12823 ---@param dir? string
12824 ---
12825 ---@return Node n
12826 ---@return integer badness
12827 ---
12828 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12829 function node.hpack(n, width, info, dir) end
12830
12831 ---
12832 ---Create a new `hlist` by packaging the list that begins at node `d` into a horizontal box.
12833 ---
12834 ---With only a single argument, this box is created using
12835 ---the natural width of its components. In the three argument form, `info`
12836 ---must be either `additional` or `exactly`, and `width` is the
12837 ---additional (`\hbox spread`) or exact (`\hbox to`) width to be used.
12838 ---The second return value is the badness of the generated box.
12839 ---
12840 ---Caveat: there can be unexpected side-effects to this function, like updating
12841 ---some of the `marks` and `\inserts`. Also note that the content of
12842 ---`h` is the original node list `n`: if you call `node.free(h)`
12843 ---you will also free the node list itself, unless you explicitly set the `list` field to `nil` beforehand. And in a similar way, calling `node.free(n)` will invalidate `h` as well!
12844 ---
12845 ---__Reference:__
12846 ---
12847 ---* Corresponding C source code: [lnodelib.c#L2576-L2619](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2576-L2619)
12848 ---
12849 ---@param d integer # The index number of the node in the memory table for direct access.
12850 ---@param width? integer
12851 ---@param info? string
12852 ---@param dir? string
12853 ---
12854 ---@return integer d
12855 ---@return integer badness
12856 ---
12857 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12858 function node.direct.hpack(d, width, info, dir) end
12859
12860 ---
12861 ---Create a new `vlist` by packaging the list that begins at node `head` into a vertical box.
12862 ---
12863 ---With only a single argument, this box is created using
12864 ---the natural height of its components.
12865 ---
12866 ---Caveat: there can be unexpected side-effects to this function, like updating
12867 ---some of the `marks` and `\inserts`. Also note that the content of
12868 ---`new_head` is the original node list `head`: if you call `node.free(new_head)`
12869 ---you will also free the node list itself, unless you explicitly set the `list` field to `nil` beforehand. And in a similar way, calling `node.free(head)` will invalidate `new_head` as well!
12870 ---
12871 ---__Reference:__
12872 ---
12873 ---* Corresponding C source code: [lnodelib.c#L2673-L2716](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2673-L2716)
12874 ---
12875 ---@param head Node
12876 ---@param height? integer # The additional (`\vbox spread`) or exact (`\vbox to`) height to be used.
12877 ---@param info? 'additional'|'exactly' # Must be either `additional` (`\vbox spread`) or `exactly` (`\vbox to`).
12878 ---@param dir? DirectionSpecifier|DirectionSpecifierId
12879 ---
12880 ---@return Node new_head
12881 ---@return integer badness # The second return value is the badness of the generated box.
12882 ---
12883 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12884 function node.vpack(head, height, info, dir) end
12885
12886 ---
12887 ---Create a new `vlist` by packaging the list that begins at node `head` into a vertical box.
12888 ---
12889 ---With only a single argument, this box is created using
12890 ---the natural height of its components.
12891 ---
12892 ---Caveat: there can be unexpected side-effects to this function, like updating
12893 ---some of the `marks` and `\inserts`. Also note that the content of
12894 ---`new_head` is the original node list `head`: if you call `node.free(new_head)`
12895 ---you will also free the node list itself, unless you explicitly set the `list` field to `nil` beforehand. And in a similar way, calling `node.free(head)` will invalidate `new_head` as well!
12896 ---
12897 ---__Reference:__
12898 ---
12899 ---* Corresponding C source code: [lnodelib.c#L2720-L2763](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2720-L2763)
12900 ---
12901 ---@param head integer # The index number of the node in the memory table for direct access.
12902 ---@param height? integer # The additional (`\vbox spread`) or exact (`\vbox to`) height to be used.
12903 ---@param info? 'additional'|'exactly' # Must be either `additional` (`\vbox spread`) or `exactly` (`\vbox to`).
12904 ---@param dir? DirectionSpecifier|DirectionSpecifierId
12905 ---
12906 ---@return integer new_head
12907 ---@return integer badness # The second return value is the badness of the generated box.
12908 ---
12909 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12910 function node.direct.vpack(head, height, info, dir) end
12911
12912 ---
12913 ---Add the interlinespace to a line keeping the baselineskip and lineskip into
12914 ---account.
12915 ---
12916 ---__Reference:__
12917 ---
12918 ---* Corresponding C source code: [lnodelib.c#L8763-L8801](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8763-L8801)
12919 ---
12920 ---@param n Node # vlist or hlist
12921 ---@param prevdepth integer
12922 ---
12923 ---@return integer new_prevdepth
12924 ---
12925 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12926 function node.prepend_prevdepth(n, prevdepth) end
12927
12928 ---
12929 ---Add the interlinespace to a line keeping the baselineskip and lineskip into
12930 ---account.
12931 ---
12932 ---__Reference:__
12933 ---
12934 ---* Corresponding C source code: [lnodelib.c#L8803-L8840](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8803-L8840)
12935 ---
12936 ---@param d integer # The index number of the node in the memory table for direct access.
12937 ---@param prevdepth integer
12938 ---
12939 ---@return integer new_prevdepth
12940 ---
12941 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12942 function node.direct.prepend_prevdepth(d, prevdepth) end
12943
12944 ---
12945 ---Calculate the natural in-line dimensions of the end of the node list starting
12946 ---at node `n`.
12947 ---
12948 ---The return values are scaled points.
12949 ---
12950 ---You need to keep in mind that this is one of the few places in *TeX* where floats
12951 ---are used, which means that you can get small differences in rounding when you
12952 ---compare the width reported by `hpack` with `dimensions`.
12953 ---
12954 ---__Reference:__
12955 ---
12956 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
12957 ---* Corresponding C source code: [lnodelib.c#L2767-L2812](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2767-L2812)
12958 ---
12959 ---@param n Node
12960 ---@param dir? DirectionSpecifier
12961 ---
12962 ---@return integer width # scaled points
12963 ---@return integer height # scaled points
12964 ---@return integer depth # scaled points
12965 ---
12966 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12967 function node.dimensions(n, dir) end
12968
12969 ---
12970 ---Calculate the natural in-line dimensions of the end of the node list starting
12971 ---at node `n`.
12972 ---
12973 ---The return values are scaled points.
12974 ---
12975 ---You need to keep in mind that this is one of the few places in *TeX* where floats
12976 ---are used, which means that you can get small differences in rounding when you
12977 ---compare the width reported by `hpack` with `dimensions`.
12978 ---
12979 ---__Reference:__
12980 ---
12981 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
12982 ---* Corresponding C source code: [lnodelib.c#L2838-L2880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2838-L2880)
12983 ---
12984 ---@param d integer # The index number of the node in the memory table for direct access.
12985 ---@param dir? DirectionSpecifier
12986 ---
12987 ---@return integer width # scaled points
12988 ---@return integer height # scaled points
12989 ---@return integer depth # scaled points
12990 ---
12991 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
12992 function node.direct.dimensions(d, dir) end
12993
12994 ---
12995 ---Calculate the natural in-line dimensions of the node list starting
12996 ---at node `n` and terminating just before node `t`.
12997 ---
12998 ---__Reference:__
12999 ---
13000 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
13001 ---* Corresponding C source code: [lnodelib.c#L2767-L2812](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2767-L2812)
13002 ---
13003 ---@param n Node
13004 ---@param t Node # terminating node
13005 ---@param dir? DirectionSpecifier
13006 ---
13007 ---@return integer width # scaled points
13008 ---@return integer height # scaled points
13009 ---@return integer depth # scaled points
13010 ---
13011 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13012 function node.dimensions(n, t, dir) end
13013
13014 ---
13015 ---Calculate the natural in-line dimensions of the node list starting
13016 ---at node `n` and terminating just before node `t`.
13017 ---
13018 ---__Reference:__
13019 ---
13020 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
13021 ---* Corresponding C source code: [lnodelib.c#L2838-L2880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2838-L2880)
13022 ---
13023 ---@param d integer # The index number of the node in the memory table for direct access.
13024 ---@param t integer # terminating node
13025 ---@param dir? DirectionSpecifier
13026 ---
13027 ---@return integer width # scaled points
13028 ---@return integer height # scaled points
13029 ---@return integer depth # scaled points
13030 ---
13031 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13032 function node.direct.dimensions(d, t, dir) end
13033
13034 ---
13035 ---Calculates the natural in-line dimensions of the end of the node list starting
13036 ---at node `n`.
13037 ---
13038 ---This is an
13039 ---alternative format that starts with glue parameters as the first three arguments.
13040 ---
13041 ---This calling method takes glue settings into account and is especially useful for
13042 ---finding the actual width of a sublist of nodes that are already boxed, for
13043 ---example in code like this, which prints the width of the space in between the
13044 ---`a` and `b` as it would be if `\box0` was used as-is:
13045 ---
13046 ---```
13047 ---\setbox0 = \hbox to 20pt {a b}
13048 ---
13049 ---\directlua{print (node.dimensions(
13050 --- tex.box[0].glue_set,
13051 --- tex.box[0].glue_sign,
13052 --- tex.box[0].glue_order,
13053 --- tex.box[0].head.next,
13054 --- node.tail(tex.box[0].head)
13055 ---)) }
13056 ---```
13057 ---
13058 ---__Reference:__
13059 ---
13060 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
13061 ---* Corresponding C source code: [lnodelib.c#L2838-L2880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2838-L2880)
13062 ---
13063 ---@param glue_set integer
13064 ---@param glue_sign integer
13065 ---@param glue_order integer
13066 ---@param n Node
13067 ---@param dir? DirectionSpecifier
13068 ---
13069 ---@return integer width # scaled points
13070 ---@return integer height # scaled points
13071 ---@return integer depth # scaled points
13072 ---
13073 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13074 function node.dimensions(glue_set, glue_sign, glue_order, n, dir) end
13075
13076 ---
13077 ---Calculates the natural in-line dimensions of the end of the node list starting
13078 ---at node `n`.
13079 ---
13080 ---This is an
13081 ---alternative format that starts with glue parameters as the first three arguments.
13082 ---
13083 ---This calling method takes glue settings into account and is especially useful for
13084 ---finding the actual width of a sublist of nodes that are already boxed, for
13085 ---example in code like this, which prints the width of the space in between the
13086 ---`a` and `b` as it would be if `\box0` was used as-is:
13087 ---
13088 ---```
13089 ---\setbox0 = \hbox to 20pt {a b}
13090 ---
13091 ---\directlua{print (node.dimensions(
13092 --- tex.box[0].glue_set,
13093 --- tex.box[0].glue_sign,
13094 --- tex.box[0].glue_order,
13095 --- tex.box[0].head.next,
13096 --- node.tail(tex.box[0].head)
13097 ---)) }
13098 ---```
13099 ---
13100 ---__Reference:__
13101 ---
13102 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
13103 ---* Corresponding C source code: [lnodelib.c#L2838-L2880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2838-L2880)
13104 ---
13105 ---@param glue_set integer
13106 ---@param glue_sign integer
13107 ---@param glue_order integer
13108 ---@param d integer # The index number of the node in the memory table for direct access.
13109 ---@param dir? DirectionSpecifier
13110 ---
13111 ---@return integer width # scaled points
13112 ---@return integer height # scaled points
13113 ---@return integer depth # scaled points
13114 ---
13115 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13116 function node.direct.dimensions(glue_set, glue_sign, glue_order, d, dir) end
13117
13118 ---
13119 ---Calculate the natural in-line dimensions of the node list starting
13120 ---at node `n` and terminating just before node `t`.
13121 ---
13122 ---This is an
13123 ---alternative format that starts with glue parameters as the first three arguments.
13124 ---
13125 ---__Reference:__
13126 ---
13127 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
13128 ---* Corresponding C source code: [lnodelib.c#L2767-L2812](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2767-L2812)
13129 ---
13130 ---@param glue_set integer
13131 ---@param glue_sign integer
13132 ---@param glue_order integer
13133 ---@param d integer # The index number of the node in the memory table for direct access.
13134 ---@param t integer # terminating node
13135 ---@param dir? DirectionSpecifier
13136 ---
13137 ---@return integer width # scaled points
13138 ---@return integer height # scaled points
13139 ---@return integer depth # scaled points
13140 ---
13141 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13142 function node.dimensions(glue_set, glue_sign, glue_order, d, t, dir) end
13143
13144 ---
13145 ---Calculate the natural in-line dimensions of the node list starting
13146 ---at node `n` and terminating just before node `t`.
13147 ---
13148 ---This is an
13149 ---alternative format that starts with glue parameters as the first three arguments.
13150 ---
13151 ---__Reference:__
13152 ---
13153 ---[Source: luatex-nodes.tex#L1490-L1546](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1490-L1546)
13154 ---* Corresponding C source code: [lnodelib.c#L2838-L2880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2838-L2880)
13155 ---
13156 ---@param glue_set integer
13157 ---@param glue_sign integer
13158 ---@param glue_order integer
13159 ---@param n Node
13160 ---@param t Node # terminating node
13161 ---@param dir? DirectionSpecifier
13162 ---
13163 ---@return integer width # scaled points
13164 ---@return integer height # scaled points
13165 ---@return integer depth # scaled points
13166 ---
13167 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13168 function node.direct.dimensions(glue_set, glue_sign, glue_order, n, t, dir) end
13169
13170 ---
13171 ---Calculate the natural in-line dimensions of the node list `parent` starting
13172 ---at node `first` and terminating just before node `last`.
13173 ---
13174 ---This functions saves a few lookups in comparison to `node.dimensions()` and can be more convenient in some
13175 ---cases.
13176 ---
13177 ---__Reference:__
13178 ---
13179 ---* Corresponding C source code: [lnodelib.c#L2814-L2834](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2814-L2834)
13180 ---
13181 ---@param parent Node
13182 ---@param first Node
13183 ---@param last? Node
13184 ---
13185 ---@return integer width # scaled points
13186 ---@return integer height # scaled points
13187 ---@return integer depth # scaled points
13188 ---
13189 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13190 function node.rangedimensions(parent, first, last) end
13191
13192 ---
13193 ---Calculate the natural in-line dimensions of the node list `parent` starting
13194 ---at node `first` and terminating just before node `last`.
13195 ---
13196 ---This functions saves a few lookups in comparison to `node.dimensions()` and can be more convenient in some
13197 ---cases.
13198 ---
13199 ---__Reference:__
13200 ---
13201 ---* Corresponding C source code: [lnodelib.c#L2882-L2902](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2882-L2902)
13202 ---
13203 ---@param parent integer
13204 ---@param first integer
13205 ---@param last? integer
13206 ---
13207 ---@return integer width # scaled points
13208 ---@return integer height # scaled points
13209 ---@return integer depth # scaled points
13210 ---
13211 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13212 function node.direct.rangedimensions(parent, first, last) end
13213
13214 ---
13215 ---Run the internal `mlist` to `hlist` conversion, converting the math list in
13216 ---`n` into the horizontal list `h`.
13217 ---
13218 ---The interface is exactly the same
13219 ---as for the callback `mlist_to_hlist`.
13220 ---
13221 ---__Reference:__
13222 ---
13223 ---* Corresponding C source code: [lnodelib.c#L2906-L2918](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2906-L2918)
13224 ---
13225 ---@param n Node
13226 ---@param display_type string
13227 ---@param penalties boolean
13228 ---
13229 ---@return Node h
13230 ---
13231 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13232 function node.mlist_to_hlist(n, display_type, penalties) end
13233
13234 ---
13235 ---see _N._9_9
13236
13237 ---
13238 ---Return the last node of the node list that starts at `n`.
13239 ---
13240 ---__Reference:__
13241 ---
13242 ---* Corresponding C source code: [lnodelib.c#L3262-L3274](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3262-L3274)
13243 ---
13244 ---@param n Node
13245 ---
13246 ---@return Node m
13247 ---
13248 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13249 function node.tail(n) end
13250
13251 ---
13252 ---Return the last node of the node list that starts at `d`.
13253 ---
13254 ---__Reference:__
13255 ---
13256 ---* Corresponding C source code: [lnodelib.c#L3278-L3289](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3278-L3289)
13257 ---
13258 ---@param d integer # The index number of the node in the memory table for direct access.
13259 ---
13260 ---@return integer e
13261 ---
13262 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13263 function node.direct.tail(d) end
13264
13265 ---
13266 ---Return the number of nodes contained in the node list that starts at `n`.
13267 ---
13268 ---If `m` is also supplied it stops at `m` instead of at the end of the
13269 ---list. The node `m` is not counted.
13270 ---
13271 ---__Reference:__
13272 ---
13273 ---* Corresponding C source code: [lnodelib.c#L4374-L4386](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4374-L4386)
13274 ---
13275 ---@param n Node
13276 ---@param m? Node
13277 ---
13278 ---@return integer i
13279 ---
13280 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13281 function node.length(n, m) end
13282
13283 ---
13284 ---Return the number of nodes contained in the node list that starts at `d`.
13285 ---
13286 ---If `e` is also supplied it stops at `e` instead of at the end of the
13287 ---list. The node `d` is not counted.
13288 ---
13289 ---__Reference:__
13290 ---
13291 ---* Corresponding C source code: [lnodelib.c#L4350-L4360](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4350-L4360)
13292 ---
13293 ---@param d integer # The index number of the node in the memory table for direct access.
13294 ---@param e? Node
13295 ---
13296 ---@return integer i
13297 ---
13298 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13299 function node.direct.length(d, e) end
13300
13301 ---
13302 ---Return the number of nodes contained in the node list that starts at `n`
13303 ---that have a matching `id` field.
13304 ---
13305 ---If `m` is also supplied, counting
13306 ---stops at `m` instead of at the end of the list. The node `m` is not
13307 ---counted. This function also accept string `id`’s.
13308 ---
13309 ---__Reference:__
13310 ---
13311 ---* Corresponding C source code: [lnodelib.c#L4388-L4401](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4388-L4401)
13312 ---
13313 ---@param id integer|string
13314 ---@param n Node
13315 ---@param m? Node
13316 ---
13317 ---@return integer i
13318 ---
13319 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13320 function node.count(id, n, m) end
13321
13322 ---
13323 ---Return the number of nodes contained in the node list that starts at `d`
13324 ---that have a matching `id` field.
13325 ---
13326 ---If `e` is also supplied, counting
13327 ---stops at `e` instead of at the end of the list. The node `d` is not
13328 ---counted. This function also accept string `id`’s.
13329 ---
13330 ---__Reference:__
13331 ---
13332 ---* Corresponding C source code: [lnodelib.c#L4362-L4369](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4362-L4369)
13333 ---
13334 ---@param id integer|string
13335 ---@param d integer # The index number of the node in the memory table for direct access.
13336 ---@param e? Node
13337 ---
13338 ---@return integer i
13339 ---
13340 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13341 function node.direct.count(id, d, e) end
13342
13343 ---
13344 ---Signal if the glyph is already turned into a character reference
13345 ---or not by examining the subtype.
13346 ---
13347 ---__Reference:__
13348 ---
13349 ---* Corresponding C source code: [lnodelib.c#L3004-L3024](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3004-L3024)
13350 ---
13351 ---@param n Node
13352 ---@param font? integer
13353 ---
13354 ---@return boolean|integer|nil
13355 ---@return integer|nil
13356 ---
13357 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13358 function node.is_char(n, font) end
13359
13360 ---
13361 ---Signal if the glyph is already turned into a character reference
13362 ---or not by examining the subtype.
13363 ---
13364 ---__Reference:__
13365 ---
13366 ---* Corresponding C source code: [lnodelib.c#L7572-L7592](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L7572-L7592)
13367 ---
13368 ---@param d integer # The index number of the node in the memory table for direct access.
13369 ---@param font? integer
13370 ---
13371 ---@return boolean|integer|nil
13372 ---@return integer|nil
13373 ---
13374 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13375 function node.direct.is_char(d, font) end
13376
13377 ---
13378 ---Signal if the glyph is already turned into a character reference
13379 ---or not by examining the subtype.
13380 ---
13381 ---__Reference:__
13382 ---
13383 ---* Corresponding C source code: [lnodelib.c#L3026-L3037](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3026-L3037)
13384 ---
13385 ---@param n Node
13386 ---
13387 ---@return boolean|integer character
13388 ---@return integer font
13389 ---
13390 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13391 function node.is_glyph(n) end
13392
13393 ---
13394 ---Signal if the glyph is already turned into a character reference
13395 ---or not by examining the subtype.
13396 ---
13397 ---__Reference:__
13398 ---
13399 ---* Corresponding C source code: [lnodelib.c#L7594-L7605](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L7594-L7605)
13400 ---
13401 ---@param n Node
13402 ---
13403 ---@return boolean|integer character
13404 ---@return integer font
13405 ---
13406 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13407 function node.direct.is_glyph(n) end
13408
13409 ---
13410 ---Return a *Lua* iterator that loops over the node list that starts at `n`.
13411 ---
13412 ---__Example:__
13413 ---
13414 ---```lua
13415 ---for n in node.traverse(head) do
13416 --- ...
13417 ---end
13418 ---```
13419 ---
13420 ---It should be clear from the definition of the function `f` that even though
13421 ---it is possible to add or remove nodes from the node list while traversing, you
13422 ---have to take great care to make sure all the `next` (and `prev`)
13423 ---pointers remain valid.
13424 ---
13425 ---__Reference:__
13426 ---
13427 ---* Corresponding C source code: [lnodelib.c#L4156-L4168](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4156-L4168)
13428 ---
13429 ---@param n Node
13430 ---
13431 ---@return fun(): t: Node, id: integer, subtype: integer
13432 ---
13433 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13434 function node.traverse(n) end
13435
13436 ---
13437 ---Return a *Lua* iterator that loops over the node list that starts at `d`.
13438 ---
13439 ---__Example:__
13440 ---
13441 ---```lua
13442 ---for d in node.traverse(head) do
13443 --- ...
13444 ---end
13445 ---```
13446 ---
13447 ---It should be clear from the definition of the function `f` that even though
13448 ---it is possible to add or remove nodes from the node list while traversing, you
13449 ---have to take great care to make sure all the `next` (and `prev`)
13450 ---pointers remain valid.
13451 ---
13452 ---__Reference:__
13453 ---
13454 ---* Corresponding C source code: [lnodelib.c#L3937-L3953](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3937-L3953)
13455 ---
13456 ---@param d integer # The index number of the node in the memory table for direct access.
13457 ---
13458 ---@return fun(): t: integer, id: integer, subtype: integer
13459 ---
13460 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13461 function node.direct.traverse(d) end
13462
13463 ---
13464 ---Return an iterator that loops over all the nodes in the list that starts at
13465 ---`n` that have a matching `id` field.
13466 ---
13467 ---__Reference:__
13468 ---
13469 ---* Corresponding C source code: [lnodelib.c#L4196-L4209](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4196-L4209)
13470 ---
13471 ---@param id integer
13472 ---@param n Node
13473 ---
13474 ---@return fun(): t: Node, subtype: integer
13475 ---
13476 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13477 function node.traverse_id(id, n) end
13478
13479 ---
13480 ---Return an iterator that loops over all the nodes in the list that starts at
13481 ---`d` that have a matching `id` field.
13482 ---
13483 ---__Reference:__
13484 ---
13485 ---* Corresponding C source code: [lnodelib.c#L3980-L3995](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3980-L3995)
13486 ---
13487 ---@param id integer
13488 ---@param d integer # The index number of the node in the memory table for direct access.
13489 ---
13490 ---@return fun(): t: integer, subtype: integer
13491 ---
13492 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13493 function node.direct.traverse_id(id, d) end
13494
13495 ---
13496 ---Loop over the `glyph` nodes in a list.
13497 ---
13498 ---Only nodes with a subtype less than 256 are seen.
13499 ---
13500 ---__Reference:__
13501 ---
13502 ---* Corresponding C source code: [lnodelib.c#L4237-L4249](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4237-L4249)
13503 ---
13504 ---@param n Node
13505 ---
13506 ---@return fun(): n: Node, font: integer, char: integer
13507 ---
13508 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13509 function node.traverse_char(n) end
13510
13511 ---
13512 ---Loop over the `glyph` nodes in a list.
13513 ---
13514 ---Only nodes with a subtype less than 256 are seen.
13515 ---
13516 ---__Reference:__
13517 ---
13518 ---* Corresponding C source code: [lnodelib.c#L4022-L4038](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4022-L4038)
13519 ---
13520 ---@param d integer # The index number of the node in the memory table for direct access.
13521 ---
13522 ---@return fun(): d: integer, font: integer, char: integer
13523 ---
13524 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13525 function node.direct.traverse_char(d) end
13526
13527 ---
13528 ---Loop over a list and return the list and
13529 ---filter all glyphs.
13530 ---
13531 ---__Reference:__
13532 ---
13533 ---* Corresponding C source code: [lnodelib.c#L4277-L4289](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4277-L4289)
13534 ---
13535 ---@param n Node
13536 ---
13537 ---@return fun(): n: Node, font: integer, char: integer
13538 ---
13539 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13540 function node.traverse_glyph(n) end
13541
13542 ---
13543 ---Loop over a list and return the list and
13544 ---filter all glyphs.
13545 ---
13546 ---__Reference:__
13547 ---
13548 ---* Corresponding C source code: [lnodelib.c#L4065-L4081](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4065-L4081)
13549 ---
13550 ---@param d integer # The index number of the node in the memory table for direct access.
13551 ---
13552 ---@return fun(): d: integer, font: integer, char: integer
13553 ---
13554 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13555 function node.direct.traverse_glyph(d) end
13556
13557 ---
13558 ---Loop over the `hlist` and `vlist` nodes in a list.
13559 ---
13560 ---The four return values can save some time compared to fetching these fields.
13561 ---
13562 ---__Reference:__
13563 ---
13564 ---* Corresponding C source code: [lnodelib.c#L4318-L4330](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4318-L4330)
13565 ---
13566 ---@param n Node
13567 ---
13568 ---@return fun(): n: Node, id: integer, subtype: integer, list: Node
13569 ---
13570 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13571 function node.traverse_list(n) end
13572
13573 ---
13574 ---Loop over the `hlist` and `vlist` nodes in a list.
13575 ---
13576 ---The four return values can save some time compared to fetching these fields.
13577 ---
13578 ---__Reference:__
13579 ---
13580 ---* Corresponding C source code: [lnodelib.c#L4318-L4330](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L4318-L4330)
13581 ---
13582 ---@param d integer # The index number of the node in the memory table for direct access.
13583 ---
13584 ---@return fun(): d: integer, id: integer, subtype: integer, list: Node
13585 ---
13586 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13587 function node.direct.traverse_list(d) end
13588
13589 ---
13590 ---Return the first `glyph` or `disc` node in the given list.
13591 ---
13592 ---__Reference:__
13593 ---
13594 ---* Corresponding C source code: [lnodelib.c#L6368-L6382](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6368-L6382)
13595 ---
13596 ---@param n Node
13597 ---
13598 ---@return Node|nil n
13599 ---
13600 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13601 function node.has_glyph(n) end
13602
13603 ---
13604 ---Return the first `glyph` or `disc` node in the given list.
13605 ---
13606 ---__Reference:__
13607 ---
13608 ---* Corresponding C source code: [lnodelib.c#L6368-L6382](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6368-L6382)
13609 ---
13610 ---@param d integer # The index number of the node in the memory table for direct access.
13611 ---
13612 ---@return integer|nil d
13613 ---
13614 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13615 function node.direct.has_glyph(d) end
13616
13617 ---
13618 ---Look for and return the next `math` node following the start node `n`.
13619 ---
13620 ---If
13621 ---the given node is a math end node this helper returns that node, else it follows
13622 ---the list and returns the next math endnote. If no such node is found `nil` is
13623 ---returned.
13624 ---
13625 ---__Reference:__
13626 ---
13627 ---* Corresponding C source code: [lnodelib.c#L3293-L3313](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3293-L3313)
13628 ---
13629 ---@param n Node
13630 ---
13631 ---@return Node|nil t
13632 ---
13633 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13634 function node.end_of_math(n) end
13635
13636 ---
13637 ---Look for and return the next `math` node following the start node `d`.
13638 ---
13639 ---If
13640 ---the given node is a math end node this helper returns that node, else it follows
13641 ---the list and returns the next math endnote. If no such node is found `nil` is
13642 ---returned.
13643 ---
13644 ---__Reference:__
13645 ---
13646 ---* Corresponding C source code: [lnodelib.c#L3317-L3334](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3317-L3334)
13647 ---
13648 ---@param d integer # The index number of the node in the memory table for direct access.
13649 ---
13650 ---@return integer|nil t
13651 ---
13652 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13653 function node.direct.end_of_math(d) end
13654
13655 ---
13656 ---Remove the node `current` from the list following `head`.
13657 ---
13658 ---It is your responsibility to make sure it is really part of that list.
13659 ---The return values are the new `head` and `current` nodes. The
13660 ---returned `current` is the node following the `current` in the calling
13661 ---argument, and is only passed back as a convenience (or `nil`, if there is
13662 ---no such node). The returned `head` is more important, because if the
13663 ---function is called with `current` equal to `head`, it will be
13664 ---changed.
13665 ---
13666 ---__Reference:__
13667 ---
13668 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1775-L1791](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1775-L1791)
13669 ---* Corresponding C source code: [lnodelib.c#L2176-L2215](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2176-L2215)
13670 ---
13671 ---@param head Node
13672 ---@param current Node # A node following the list `head`.
13673 ---
13674 ---@return Node head # The new `head`
13675 ---@return Node|nil current # The node following the `current` in the calling
13676 ---argument.
13677 ---
13678 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13679 function node.remove(head, current) end
13680
13681 ---
13682 ---Remove the node `current` from the list following `head`.
13683 ---
13684 ---It is your responsibility to make sure it is really part of that list.
13685 ---The return values are the new `head` and `current` nodes. The
13686 ---returned `current` is the node following the `current` in the calling
13687 ---argument, and is only passed back as a convenience (or `nil`, if there is
13688 ---no such node). The returned `head` is more important, because if the
13689 ---function is called with `current` equal to `head`, it will be
13690 ---changed.
13691 ---
13692 ---__Reference:__
13693 ---
13694 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1775-L1791](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1775-L1791)
13695 ---* Corresponding C source code: [lnodelib.c#L2219-L2267](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2219-L2267)
13696 ---
13697 ---@param head integer
13698 ---@param current integer # A node following the list `head`.
13699 ---
13700 ---@return integer|nil head # The new `head`
13701 ---@return integer|nil current # The node following the `current` in the calling
13702 ---argument.
13703 ---
13704 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13705 function node.direct.remove(head, current) end
13706
13707 ---
13708 ---Insert the node `new` before `current` into the list
13709 ---following `head`.
13710 ---
13711 ---It is your responsibility to make sure that `current` is really part of that list. The return values are the (potentially
13712 ---mutated) `head` and the node `new`, set up to be part of the list
13713 ---(with correct `next` field). If `head` is initially `nil`, it
13714 ---will become `new`.
13715 ---
13716 ---__Reference:__
13717 ---
13718 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1793-L1807](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1793-L1807)
13719 ---* Corresponding C source code: [lnodelib.c#L2271-L2315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2271-L2315)
13720 ---
13721 ---@param head Node
13722 ---@param current Node
13723 ---@param new Node
13724 ---
13725 ---@return Node head
13726 ---@return Node new
13727 ---
13728 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13729 function node.insert_before(head, current, new) end
13730
13731 ---
13732 ---Insert the node `new` before `current` into the list
13733 ---following `head`.
13734 ---
13735 ---It is your responsibility to make sure that `current` is really part of that list. The return values are the (potentially
13736 ---mutated) `head` and the node `new`, set up to be part of the list
13737 ---(with correct `next` field). If `head` is initially `nil`, it
13738 ---will become `new`.
13739 ---
13740 ---__Reference:__
13741 ---
13742 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1793-L1807](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1793-L1807)
13743 ---* Corresponding C source code: [lnodelib.c#L2319-L2357](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2319-L2357)
13744 ---
13745 ---@param head integer
13746 ---@param current integer
13747 ---@param new integer
13748 ---
13749 ---@return integer head
13750 ---@return integer new
13751 ---
13752 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13753 function node.direct.insert_before(head, current, new) end
13754
13755 ---
13756 ---Insert the node `new` after `current` into the list
13757 ---following `head`.
13758 ---
13759 ---It is your responsibility to make sure that `current` is really part of that list. The return values are the `head` and
13760 ---the node `new`, set up to be part of the list (with correct `next`
13761 ---field). If `head` is initially `nil`, it will become `new`.
13762 ---
13763 ---__Reference:__
13764 ---
13765 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1809-L1822](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1809-L1822)
13766 ---* Corresponding C source code: [lnodelib.c#L2361-L2395](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2361-L2395)
13767 ---
13768 ---@param head Node
13769 ---@param current Node
13770 ---@param new Node
13771 ---
13772 ---@return Node head
13773 ---@return Node new
13774 ---
13775 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13776 function node.insert_after(head, current, new) end
13777
13778 ---
13779 ---Insert the node `new` after `current` into the list
13780 ---following `head`.
13781 ---
13782 ---It is your responsibility to make sure that `current` is really part of that list. The return values are the `head` and
13783 ---the node `new`, set up to be part of the list (with correct `next`
13784 ---field). If `head` is initially `nil`, it will become `new`.
13785 ---
13786 ---__Reference:__
13787 ---
13788 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L1809-L1822](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1809-L1822)
13789 ---* Corresponding C source code: [lnodelib.c#L2399-L2430](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2399-L2430)
13790 ---
13791 ---@param head integer
13792 ---@param current integer
13793 ---@param new integer
13794 ---
13795 ---@return integer head
13796 ---@return integer new
13797 ---
13798 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13799 function node.direct.insert_after(head, current, new) end
13800
13801 ---
13802 ---Return the first node in the list starting at `n` that is a glyph node
13803 ---with a subtype indicating it is a glyph, or `nil`.
13804 ---
13805 ---If `m` is given,
13806 ---processing stops at (but including) that node, otherwise processing stops at the
13807 ---end of the list.
13808 ---
13809 ---__Reference:__
13810 ---
13811 ---* Corresponding C source code: [lnodelib.c#L6312-L6337](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6312-L6337)
13812 ---
13813 ---@param n Node
13814 ---@param m? Node
13815 ---
13816 ---@return Node|nil n
13817 ---@return boolean success
13818 ---
13819 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13820 function node.first_glyph(n, m) end
13821
13822 ---
13823 ---Return the first node in the list starting at `d` that is a glyph node
13824 ---with a subtype indicating it is a glyph, or `nil`.
13825 ---
13826 ---If `e` is given,
13827 ---processing stops at (but including) that node, otherwise processing stops at the
13828 ---end of the list.
13829 ---
13830 ---__Reference:__
13831 ---
13832 ---* Corresponding C source code: [lnodelib.c#L6341-L6362](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6341-L6362)
13833 ---
13834 ---@param d integer # The index number of the node in the memory table for direct access.
13835 ---@param e? integer
13836 ---
13837 ---@return integer|nil d
13838 ---
13839 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13840 function node.direct.first_glyph(d, e) end
13841
13842 ---
13843 ---Apply *TeX*-style ligaturing to the specified nodelist.
13844 ---
13845 ---__Reference:__
13846 ---
13847 ---* Corresponding C source code: [lnodelib.c#L5945-L5984](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L5945-L5984)
13848 ---
13849 ---@param head Node
13850 ---@param tail? Node
13851 ---
13852 ---@return Node head # the new head
13853 ---@return Node tail # the new tail (both `head` and `tail` can change into a new ligature)
13854 ---@return boolean success
13855 ---
13856 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13857 function node.ligaturing(head, tail) end
13858
13859 ---
13860 ---Apply *TeX*-style ligaturing to the specified nodelist.
13861 ---
13862 ---__Reference:__
13863 ---
13864 ---* Corresponding C source code: [lnodelib.c#L5986-L6017](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L5986-L6017)
13865 ---
13866 ---@param head integer
13867 ---@param tail? integer
13868 ---
13869 ---@return integer head # the new head
13870 ---@return integer tail # the new tail (both `head` and `tail` can change into a new ligature)
13871 ---@return boolean success
13872 ---
13873 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13874 function node.direct.ligaturing(head, tail) end
13875
13876 ---
13877 ---Apply *TeX*-style kerning to the specified node list.
13878 ---
13879 ---__Reference:__
13880 ---
13881 ---* Corresponding C source code: [lnodelib.c#L6021-L6060](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6021-L6060)
13882 ---
13883 ---@param head Node
13884 ---@param tail? Node
13885 ---
13886 ---@return Node head # the new head (can be an inserted kern node, because special kernings with word boundaries are possible).
13887 ---@return Node tail # the new tail (can be an inserted kern node, because special kernings with word boundaries are possible).
13888 ---@return boolean success
13889 ---
13890 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13891 function node.kerning(head, tail) end
13892
13893 ---
13894 ---Apply *TeX*-style kerning to the specified node list.
13895 ---
13896 ---__Reference:__
13897 ---
13898 ---* Corresponding C source code: [lnodelib.c#L6062-L6097](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6062-L6097)
13899 ---
13900 ---@param head integer
13901 ---@param tail? integer
13902 ---
13903 ---@return integer head # the new head (can be an inserted kern node, because special kernings with word boundaries are possible).
13904 ---@return integer tail # the new tail (can be an inserted kern node, because special kernings with word boundaries are possible).
13905 ---@return boolean success
13906 ---
13907 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13908 function node.direct.kerning(head, tail) end
13909
13910 ---
13911 ---Convert from `characters` to `glyphs` during node
13912 ---processing by subtracting `256` from all glyph node subtypes.
13913 ---
13914 ---__Reference:__
13915 ---
13916 ---* Corresponding C source code: [lnodelib.c#L6217-L6223](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6217-L6223)
13917 ---
13918 ---@param n Node
13919 ---
13920 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13921 function node.unprotect_glyph(n) end
13922
13923 ---
13924 ---Convert from `characters` to `glyphs` during node
13925 ---processing by subtracting `256` from the glyph node subtype.
13926 ---
13927 ---__Reference:__
13928 ---
13929 ---* Corresponding C source code: [lnodelib.c#L6272-L6278](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6272-L6278)
13930 ---
13931 ---@param d integer # The index number of the node in the memory table for direct access.
13932 ---
13933 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13934 function node.direct.unprotect_glyph(d) end
13935
13936 ---
13937 ---Convert from `characters` to `glyphs` during node
13938 ---processing by subtracting `256` from the glyph node subtype.
13939 ---
13940 ---__Reference:__
13941 ---
13942 ---* Corresponding C source code: [lnodelib.c#L6243-L6259](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6243-L6259)
13943 ---
13944 ---@param head Node
13945 ---@param tail? Node
13946 ---
13947 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13948 function node.unprotect_glyphs(head, tail) end
13949
13950 ---
13951 ---Convert from `characters` to `glyphs` during node
13952 ---processing by subtracting `256` from all glyph node subtypes.
13953 ---
13954 ---__Reference:__
13955 ---
13956 ---* Corresponding C source code: [lnodelib.c#L6295-L6308](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6295-L6308)
13957 ---
13958 ---@param head integer
13959 ---@param tail? integer
13960 ---
13961 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13962 function node.direct.unprotect_glyphs(head, tail) end
13963
13964 ---
13965 ---Add `256` to the `glyph` node subtype
13966 ---except that if the value is `1`, add only `255`.
13967 ---
13968 ---The special handling of `1` means
13969 ---that `characters` will become `glyphs` after subtraction of `256`.
13970 ---
13971 ---__Reference:__
13972 ---
13973 ---* Corresponding C source code: [lnodelib.c#L6209-L6215](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6209-L6215)
13974 ---
13975 ---@param n Node
13976 ---
13977 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13978 function node.protect_glyph(n) end
13979
13980 ---
13981 ---Add `256` to the `glyph` node subtype
13982 ---except that if the value is `1`, add only `255`.
13983 ---
13984 ---The special handling of `1` means
13985 ---that `characters` will become `glyphs` after subtraction of `256`.
13986 ---
13987 ---__Reference:__
13988 ---
13989 ---* Corresponding C source code: [lnodelib.c#L6264-L6270](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6264-L6270)
13990 ---
13991 ---@param d integer # The index number of the node in the memory table for direct access.
13992 ---
13993 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
13994 function node.direct.protect_glyph(d) end
13995
13996 ---
13997 ---Add `256` to all `glyph` node subtypes in the node list starting at `head`,
13998 ---except that if the value is `1`, add only `255`.
13999 ---
14000 ---The special handling of `1` means
14001 ---that `characters` will become `glyphs` after subtraction of `256`.
14002 ---
14003 ---__Reference:__
14004 ---
14005 ---* Corresponding C source code: [lnodelib.c#L6225-L6241](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6225-L6241)
14006 ---
14007 ---@param head Node
14008 ---@param tail? Node
14009 ---
14010 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14011 function node.protect_glyphs(head, tail) end
14012
14013 ---
14014 ---Add `256` to all `glyph` node subtypes in the node list starting at `head`,
14015 ---except that if the value is `1`, add only `255`.
14016 ---
14017 ---The special handling of `1` means
14018 ---that `characters` will become `glyphs` after subtraction of `256`.
14019 ---
14020 ---__Reference:__
14021 ---
14022 ---* Corresponding C source code: [lnodelib.c#L6280-L6293](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6280-L6293)
14023 ---
14024 ---@param head integer
14025 ---@param tail? integer
14026 ---
14027 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14028 function node.direct.protect_glyphs(head, tail) end
14029
14030 ---
14031 ---Pop the last node from *TeX*'s “current list”.
14032 ---
14033 ---__Reference:__
14034 ---
14035 ---* Corresponding C source code: [lnodelib.c#L2556-L2563](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2556-L2563)
14036 ---
14037 ---@return Node|nil n
14038 ---
14039 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14040 function node.last_node() end
14041
14042 ---
14043 ---Pop the last node from *TeX*'s “current list”.
14044 ---
14045 ---__Reference:__
14046 ---
14047 ---* Corresponding C source code: [lnodelib.c#L2567-L2572](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2567-L2572)
14048 ---
14049 ---@return integer|nil n
14050 ---
14051 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14052 function node.direct.last_node() end
14053
14054 ---
14055 ---Append a node list to *TeX*'s “current list”.
14056 ---
14057 ---The
14058 ---node list is not deep-copied! There is no error checking either! You mignt need
14059 ---to enforce horizontal mode in order for this to work as expected.
14060 ---
14061 ---__Reference:__
14062 ---
14063 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L2518-L2521](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L2518-L2521), [luatex-nodes.tex#L1913-L1923](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1913-L1923)
14064 ---* Corresponding C source code: [lnodelib.c#L2505-L2525](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2505-L2525)
14065 ---
14066 ---@param n Node
14067 ---
14068 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14069 function node.write(n) end
14070
14071 ---
14072 ---Append a node list to *TeX*'s “current list”.
14073 ---
14074 ---The
14075 ---node list is not deep-copied! There is no error checking either! You mignt need
14076 ---to enforce horizontal mode in order for this to work as expected.
14077 ---
14078 ---__Reference:__
14079 ---
14080 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L2518-L2521](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L2518-L2521), [luatex-nodes.tex#L1913-L1923](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L1913-L1923)
14081 ---* Corresponding C source code: [lnodelib.c#L2529-L2552](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2529-L2552)
14082 ---
14083 ---@param d integer # The index number of the node in the memory table for direct access.
14084 ---
14085 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14086 function node.direct.write(d) end
14087
14088 ---
14089 ---Return `true` if, for the purpose of line boundary discovery when
14090 ---character protrusion is active, this node can be skipped.
14091 ---
14092 ---__Reference:__
14093 ---
14094 ---* Corresponding C source code: [lnodelib.c#L6488-L6493](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6488-L6493)
14095 ---
14096 ---@param n Node
14097 ---
14098 ---@return boolean skippable
14099 ---
14100 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14101 function node.protrusion_skippable(n) end
14102
14103 ---
14104 ---Return `true` if, for the purpose of line boundary discovery when
14105 ---character protrusion is active, this node can be skipped.
14106 ---
14107 ---__Reference:__
14108 ---
14109 ---* Corresponding C source code: [lnodelib.c#L6497-L6506](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6497-L6506)
14110 ---
14111 ---@param d integer # The index number of the node in the memory table for direct access.
14112 ---
14113 ---@return boolean skippable
14114 ---
14115 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14116 function node.direct.protrusion_skippable(d) end
14117
14118 ---
14119 ---Set the five properties of a `glue` node in one go.
14120 ---
14121 ---Non-numeric values are
14122 ---equivalent to zero and reset a property.
14123 ---
14124 ---When you pass values, only arguments that are numbers are assigned so
14125 ---
14126 ---```
14127 ---node.setglue(n,655360,false,65536)
14128 ---```
14129 ---
14130 ---will only adapt the width and shrink.
14131 ---
14132 ---When a list node is passed, you set the glue, order and sign instead.
14133 ---
14134 ---__Reference:__
14135 ---
14136 ---* Corresponding C source code: [lnodelib.c#L3862-L3883](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3862-L3883)
14137 ---
14138 ---@param n Node
14139 ---@param width integer|any
14140 ---@param stretch integer|any
14141 ---@param shrink integer|any
14142 ---@param stretch_order integer|any
14143 ---@param shrink_order integer|any
14144 ---
14145 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14146 function node.setglue(n, width, stretch, shrink, stretch_order, shrink_order) end
14147
14148 ---
14149 ---Set the five properties of a `glue` node in one go.
14150 ---
14151 ---Non-numeric values are
14152 ---equivalent to zero and reset a property.
14153 ---
14154 ---When you pass values, only arguments that are numbers are assigned so
14155 ---
14156 ---```
14157 ---node.direct.setglue(n,655360,false,65536)
14158 ---```
14159 ---
14160 ---will only adapt the width and shrink.
14161 ---
14162 ---When a list node is passed, you set the glue, order and sign instead.
14163 ---
14164 ---__Reference:__
14165 ---
14166 ---* Corresponding C source code: [lnodelib.c#L3798-L3818](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3798-L3818)
14167 ---
14168 ---@param d integer # The index number of the node in the memory table for direct access.
14169 ---@param width integer|any
14170 ---@param stretch integer|any
14171 ---@param shrink integer|any
14172 ---@param stretch_order integer|any
14173 ---@param shrink_order integer|any
14174 ---
14175 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14176 function node.direct.setglue(d, width, stretch, shrink, stretch_order, shrink_order) end
14177
14178 ---
14179 ---Return 5 values or nothing when no glue is passed.
14180 ---
14181 ---When the second argument is false, only the width is returned (this is consistent
14182 ---with `tex.get`).
14183 ---
14184 ---__Reference:__
14185 ---
14186 ---* Corresponding C source code: [lnodelib.c#L3840-L3860](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3840-L3860)
14187 ---
14188 ---@param n Node
14189 ---
14190 ---@return integer|number|nil width_or_glue_set # When a list node (`vlist` or `hlist`) is passed, than the glue set is returned.
14191 ---@return integer|nil stretch_or_glue_order # When a list node (`vlist` or `hlist`) is passed, than the glue order is returned.
14192 ---@return integer|nil shrink_or_glue_sign # When a list node (`vlist` or `hlist`) is passed, than the glue sign is returned.
14193 ---@return integer|nil stretch_order
14194 ---@return integer|nil shrink_order
14195 ---
14196 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14197 function node.getglue(n) end
14198
14199 ---
14200 ---Return 5 values or nothing when no glue is passed.
14201 ---
14202 ---When the second argument is false, only the width is returned (this is consistent
14203 ---with `tex.get`).
14204 ---
14205 ---__Reference:__
14206 ---
14207 ---* Corresponding C source code: [lnodelib.c#L3776-L3796](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3776-L3796)
14208 ---
14209 ---@param d integer # The index number of the node in the memory table for direct access.
14210 ---
14211 ---@return integer|number|nil width_or_glue_set # When a list node (`vlist` or `hlist`) is passed, than the glue set is returned.
14212 ---@return integer|nil stretch_or_glue_order # When a list node (`vlist` or `hlist`) is passed, than the glue order is returned.
14213 ---@return integer|nil shrink_or_glue_sign # When a list node (`vlist` or `hlist`) is passed, than the glue sign is returned.
14214 ---@return integer|nil stretch_order
14215 ---@return integer|nil shrink_order
14216 ---
14217 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14218 function node.direct.getglue(d) end
14219
14220 ---
14221 ---Return `true` when the width, stretch and shrink properties
14222 ---are zero.
14223 ---
14224 ---__Reference:__
14225 ---
14226 ---* Corresponding C source code: [lnodelib.c#L3885-L3899](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3885-L3899)
14227 ---
14228 ---@param n Node
14229 ---
14230 ---@return boolean isglue
14231 ---
14232 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14233 function node.is_zero_glue(n) end
14234
14235 ---
14236 ---Return `true` when the width, stretch and shrink properties
14237 ---are zero.
14238 ---
14239 ---__Reference:__
14240 ---
14241 ---* Corresponding C source code: [lnodelib.c#L3820-L3834](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3820-L3834)
14242 ---
14243 ---@param d integer # The index number of the node in the memory table for direct access.
14244 ---
14245 ---@return boolean isglue
14246 ---
14247 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14248 function node.direct.is_zero_glue(d) end
14249
14250 ---
14251 ---Test if a node has the attribute with number `id` set.
14252 ---
14253 ---If `value` is
14254 ---also supplied, also tests if the value matches `value`. It returns the value,
14255 ---or, if no match is found, `nil`.
14256 ---
14257 ---__Reference:__
14258 ---
14259 ---* Corresponding C source code: [lnodelib.c#L3339-L3353](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3339-L3353)
14260 ---
14261 ---@param n Node
14262 ---@param id integer
14263 ---@param value? integer
14264 ---
14265 ---@return integer|nil value
14266 ---
14267 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14268 function node.has_attribute(n, id, value) end
14269
14270 ---
14271 ---Test if a node has the attribute with number `id` set.
14272 ---
14273 ---If `value` is
14274 ---also supplied, also tests if the value matches `value`. It returns the value,
14275 ---or, if no match is found, `nil`.
14276 ---
14277 ---__Reference:__
14278 ---
14279 ---* Corresponding C source code: [lnodelib.c#L3357-L3371](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3357-L3371)
14280 ---
14281 ---@param d integer # The index number of the node in the memory table for direct access.
14282 ---@param id integer
14283 ---@param value? integer
14284 ---
14285 ---@return integer|nil value
14286 ---
14287 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14288 function node.direct.has_attribute(d, id, value) end
14289
14290 ---
14291 ---Test if a node has an attribute with number `id` set.
14292 ---
14293 ---It returns the
14294 ---value, or, if no match is found, `nil`. If no `id` is given then the
14295 ---zero attributes is assumed.
14296 ---
14297 ---__Reference:__
14298 ---
14299 ---* Corresponding C source code: [lnodelib.c#L3375-L3406](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3375-L3406)
14300 ---
14301 ---@param n Node
14302 ---@param id integer
14303 ---
14304 ---@return integer|nil value
14305 ---
14306 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14307 function node.get_attribute(n, id) end
14308
14309 ---
14310 ---Test if a node has an attribute with number `id` set.
14311 ---
14312 ---It returns the
14313 ---value, or, if no match is found, `nil`. If no `id` is given then the
14314 ---zero attributes is assumed.
14315 ---
14316 ---__Reference:__
14317 ---
14318 ---* Corresponding C source code: [lnodelib.c#L3450-L3481](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3450-L3481)
14319 ---
14320 ---@param d integer # The index number of the node in the memory table for direct access.
14321 ---@param id integer
14322 ---
14323 ---@return integer|nil value
14324 ---
14325 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14326 function node.direct.get_attribute(d, id) end
14327
14328 ---
14329 ---Find the first node that has attribute with number `id` set.
14330 ---
14331 ---It returns
14332 ---the value and the node if there is a match and otherwise nothing.
14333 ---
14334 ---__Reference:__
14335 ---
14336 ---* Corresponding C source code: [lnodelib.c#L3408-L3443](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3408-L3443)
14337 ---
14338 ---@param n Node
14339 ---@param id integer
14340 ---
14341 ---@return integer|nil value
14342 ---@return Node|nil n
14343 ---
14344 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14345 function node.find_attribute(n, id) end
14346
14347 ---
14348 ---Find the first node that has attribute with number `id` set.
14349 ---
14350 ---It returns
14351 ---the value and the node if there is a match and otherwise nothing.
14352 ---
14353 ---__Reference:__
14354 ---
14355 ---* Corresponding C source code: [lnodelib.c#L3503-L3538](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3503-L3538)
14356 ---
14357 ---@param d integer # The index number of the node in the memory table for direct access.
14358 ---@param id integer
14359 ---
14360 ---@return integer|nil value
14361 ---@return Node|nil n
14362 ---
14363 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14364 function node.direct.find_attribute(d, id) end
14365
14366 ---
14367 ---Set the attribute with number `id` to the value `value`.
14368 ---
14369 ---Duplicate
14370 ---assignments are ignored.
14371 ---
14372 ---__Reference:__
14373 ---
14374 ---* Corresponding C source code: [lnodelib.c#L3563-L3578](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3563-L3578)
14375 ---
14376 ---@param n Node
14377 ---@param id integer
14378 ---@param value? integer
14379 ---
14380 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14381 function node.set_attribute(n, id, value) end
14382
14383 ---
14384 ---Set the attribute with number `id` to the value `value`.
14385 ---
14386 ---Duplicate
14387 ---assignments are ignored.
14388 ---
14389 ---__Reference:__
14390 ---
14391 ---* Corresponding C source code: [lnodelib.c#L3483-L3501](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3483-L3501)
14392 ---
14393 ---@param d integer # The index number of the node in the memory table for direct access.
14394 ---@param id integer
14395 ---@param value? integer
14396 ---
14397 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14398 function node.direct.set_attribute(d, id, value) end
14399
14400 ---
14401 ---Unset the attribute with the number `id`.
14402 ---
14403 ---If `value` is also supplied, it
14404 ---will only perform this operation if the value matches `value`. Missing
14405 ---attributes or attribute-value pairs are ignored.
14406 ---
14407 ---If the attribute was actually deleted, returns its old value. Otherwise, returns
14408 ---`nil`.
14409 ---
14410 ---__Reference:__
14411 ---
14412 ---* Corresponding C source code: [lnodelib.c#L3580-L3596](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3580-L3596)
14413 ---
14414 ---@param n Node
14415 ---@param id integer
14416 ---@param value? integer
14417 ---
14418 ---@return integer|nil value
14419 ---
14420 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14421 function node.unset_attribute(n, id, value) end
14422
14423 ---
14424 ---Unset the attribute with the number `id`.
14425 ---
14426 ---If `value` is also supplied, it
14427 ---will only perform this operation if the value matches `value`. Missing
14428 ---attributes or attribute-value pairs are ignored.
14429 ---
14430 ---If the attribute was actually deleted, returns its old value. Otherwise, returns
14431 ---`nil`.
14432 ---
14433 ---__Reference:__
14434 ---
14435 ---* Corresponding C source code: [lnodelib.c#L3540-L3558](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3540-L3558)
14436 ---
14437 ---@param n Node
14438 ---@param id integer
14439 ---@param value? integer
14440 ---
14441 ---@return integer|nil value
14442 ---
14443 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14444 function node.direct.unset_attribute(n, id, value) end
14445
14446 ---
14447 ---Return the found
14448 ---tail node and make sure that the node lists is double linked.
14449 ---
14450 ---After some callbacks automatic sliding takes place. This feature can be turned
14451 ---off with `node.fix_node_lists(false)` but you better make sure then that
14452 ---you don't mess up lists. In most cases *TeX* itself only uses `next`
14453 ---pointers but your other callbacks might expect proper `prev` pointers too.
14454 ---Future versions of *LuaTeX* can add more checking but this will not influence
14455 ---usage.
14456 ---
14457 ---__Reference:__
14458 ---
14459 ---* Corresponding C source code: [lnodelib.c#L3226-L3241](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3226-L3241)
14460 ---
14461 ---@param n Node
14462 ---
14463 ---@return Node tail
14464 ---
14465 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14466 function node.slide(n) end
14467
14468 ---
14469 ---Return the found
14470 ---tail node and make sure that the node lists is double linked.
14471 ---
14472 ---After some callbacks automatic sliding takes place. This feature can be turned
14473 ---off with `node.fix_node_lists(false)` but you better make sure then that
14474 ---you don't mess up lists. In most cases *TeX* itself only uses `next`
14475 ---pointers but your other callbacks might expect proper `prev` pointers too.
14476 ---Future versions of *LuaTeX* can add more checking but this will not influence
14477 ---usage.
14478 ---
14479 ---__Reference:__
14480 ---
14481 ---* Corresponding C source code: [lnodelib.c#L3245-L3258](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3245-L3258)
14482 ---
14483 ---@param d integer # The index number of the node in the memory table for direct access.
14484 ---
14485 ---@return integer tail
14486 ---
14487 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14488 function node.direct.slide(d) end
14489
14490 ---
14491 ---Check all `disc` nodes in the node list.
14492 ---
14493 ---When you fool around with disc nodes you need to be aware of the fact that they
14494 ---have a special internal data structure. As long as you reassign the fields when
14495 ---you have extended the lists it’s ok because then the tail pointers get updated,
14496 ---but when you add to list without reassigning you might end up in trouble when
14497 ---the linebreak routine kicks in.
14498 ---
14499 ---__Reference:__
14500 ---
14501 ---* Corresponding C source code: [lnodelib.c#L8615-L8627](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8615-L8627)
14502 ---
14503 ---@param head Node
14504 ---
14505 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14506 function node.check_discretionaries(head) end
14507
14508 ---
14509 ---Check all `disc` nodes in the node list.
14510 ---
14511 ---When you fool around with disc nodes you need to be aware of the fact that they
14512 ---have a special internal data structure. As long as you reassign the fields when
14513 ---you have extended the lists it’s ok because then the tail pointers get updated,
14514 ---but when you add to list without reassigning you might end up in trouble when
14515 ---the linebreak routine kicks in.
14516 ---
14517 ---__Reference:__
14518 ---
14519 ---* Corresponding C source code: [lnodelib.c#L8550-L8562](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8550-L8562)
14520 ---
14521 ---@param d integer # The index number of the node in the memory table for direct access.
14522 ---
14523 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14524 function node.direct.check_discretionaries(d) end
14525
14526 ---
14527 ---Check one `disc` node only and also check if the node is a `disc` node.
14528 ---
14529 ---When you fool around with disc nodes you need to be aware of the fact that they
14530 ---have a special internal data structure. As long as you reassign the fields when
14531 ---you have extended the lists it’s ok because then the tail pointers get updated,
14532 ---but when you add to list without reassigning you might end up in trouble when
14533 ---the linebreak routine kicks in.
14534 ---
14535 ---__Reference:__
14536 ---
14537 ---* Corresponding C source code: [lnodelib.c#L8629-L8638](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8629-L8638)
14538 ---
14539 ---@param n Node
14540 ---
14541 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14542 function node.check_discretionary(n) end
14543
14544 ---
14545 ---Check one `disc` node only and also check if the node is a `disc` node.
14546 ---
14547 ---When you fool around with disc nodes you need to be aware of the fact that they
14548 ---have a special internal data structure. As long as you reassign the fields when
14549 ---you have extended the lists it’s ok because then the tail pointers get updated,
14550 ---but when you add to list without reassigning you might end up in trouble when
14551 ---the linebreak routine kicks in.
14552 ---
14553 ---__Reference:__
14554 ---
14555 ---* Corresponding C source code: [lnodelib.c#L8564-L8573](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8564-L8573)
14556 ---
14557 ---@param d integer # The index number of the node in the memory table for direct access.
14558 ---
14559 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14560 function node.direct.check_discretionary(d) end
14561
14562 ---
14563 ---Remove the discretionaries in the list and inject the replace
14564 ---field when set.
14565 ---
14566 ---__Reference:__
14567 ---
14568 ---* Corresponding C source code: [lnodelib.c#L8640-L8679](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8640-L8679)
14569 ---
14570 ---@param n Node
14571 ---
14572 ---@return Node head
14573 ---@return integer count
14574 ---
14575 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14576 function node.flatten_discretionaries(n) end
14577
14578 ---
14579 ---Remove the discretionaries in the list and inject the replace
14580 ---field when set.
14581 ---
14582 ---__Reference:__
14583 ---
14584 ---* Corresponding C source code: [lnodelib.c#L8575-L8613](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8575-L8613)
14585 ---
14586 ---@param d integer # The index number of the node in the memory table for direct access.
14587 ---
14588 ---@return Node head
14589 ---@return integer count
14590 ---
14591 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14592 function node.direct.flatten_discretionaries(d) end
14593
14594 ---
14595 ---Return the font
14596 ---currently associated with the node.
14597 ---
14598 ---You can normally also access the font with the
14599 ---normal font field or getter because it will resolve the family automatically for
14600 ---noads.
14601 ---
14602 ---__Reference:__
14603 ---
14604 ---* Corresponding C source code: [lnodelib.c#L2922-L2932](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L2922-L2932)
14605 ---
14606 ---@param fam integer # family identifier
14607 ---
14608 ---@return integer id
14609 ---
14610 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14611 function node.family_font(fam) end
14612
14613 ---
14614 ---Convert a userdata node into its numeric reference in the memory table.
14615 ---
14616 ---__Reference:__
14617 ---
14618 ---* Corresponding C source code: [lnodelib.c#L6552-L6565](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6552-L6565)
14619 ---
14620 ---@param n Node
14621 ---
14622 ---@return integer d
14623 ---
14624 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14625 function node.direct.todirect(n) end
14626
14627 ---
14628 ---Convert numeric reference in the memory table of a node into a userdata node.
14629 ---
14630 ---__Reference:__
14631 ---
14632 ---* Corresponding C source code: [lnodelib.c#L6570-L6581](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6570-L6581)
14633 ---
14634 ---@param d integer # The index number of the node in the memory table for direct access.
14635 ---
14636 ---@return Node n
14637 ---
14638 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14639 function node.direct.tonode(d) end
14640
14641 ---
14642 ---Set the next node of the current node.
14643 ---
14644 ---__Reference:__
14645 ---
14646 ---* Corresponding C source code: [lnodelib.c#L1767-L1778](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1767-L1778)
14647 ---
14648 ---@param d integer # The index number of the node in the memory table for direct access.
14649 ---@param next integer
14650 ---
14651 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14652 function node.direct.setnext(d, next) end
14653
14654 ---
14655 ---Return the next node of the current node.
14656 ---
14657 ---__Reference:__
14658 ---
14659 ---* Corresponding C source code: [lnodelib.c#L1782-L1800](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1782-L1800)
14660 ---
14661 ---@param n Node
14662 ---
14663 ---@return Node|nil next
14664 ---
14665 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14666 function node.getnext(n) end
14667
14668 ---
14669 ---Return the next node of the current node.
14670 ---
14671 ---__Reference:__
14672 ---
14673 ---* Corresponding C source code: [lnodelib.c#L1756-L1765](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1756-L1765)
14674 ---
14675 ---@param d integer # The index number of the node in the memory table for direct access.
14676 ---
14677 ---@return integer|nil next
14678 ---
14679 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14680 function node.direct.getnext(d) end
14681
14682 ---
14683 ---Set the previous node of the current node.
14684 ---
14685 ---__Reference:__
14686 ---
14687 ---* Corresponding C source code: [lnodelib.c#L1816-L1827](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1816-L1827)
14688 ---
14689 ---@param d integer # The index number of the node in the memory table for direct access.
14690 ---@param prev integer
14691 ---
14692 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14693 function node.direct.setprev(d, prev) end
14694
14695 ---
14696 ---Return the previous node of the current node.
14697 ---
14698 ---__Reference:__
14699 ---
14700 ---* Corresponding C source code: [lnodelib.c#L1831-L1846](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1831-L1846)
14701 ---
14702 ---@param n Node
14703 ---
14704 ---@return Node|nil prev
14705 ---
14706 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14707 function node.getprev(n) end
14708
14709 ---
14710 ---Return the previous node of a node.
14711 ---
14712 ---__Reference:__
14713 ---
14714 ---* Corresponding C source code: [lnodelib.c#L1805-L1814](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1805-L1814)
14715 ---
14716 ---@param n Node
14717 ---
14718 ---@return Node|nil prev
14719 ---
14720 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14721 function node.direct.getprev(n) end
14722
14723 ---
14724 ---Set the previous and next pointers at once.
14725 ---
14726 ---__Reference:__
14727 ---
14728 ---* Corresponding C source code: [lnodelib.c#L1864-L1880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1864-L1880)
14729 ---
14730 ---@param d integer # The index number of the node in the memory table for direct access.
14731 ---@param prev integer
14732 ---@param next integer
14733 ---
14734 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14735 function node.direct.setboth(d, prev, next) end
14736
14737 ---
14738 ---Return the previous and next pointer of a node.
14739 ---
14740 ---__Reference:__
14741 ---
14742 ---* Corresponding C source code: [lnodelib.c#L1884-L1902](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1884-L1902)
14743 ---
14744 ---@param n Node
14745 ---
14746 ---@return Node|nil prev
14747 ---@return Node|nil next
14748 ---
14749 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14750 function node.getboth(n) end
14751
14752 ---
14753 ---Return the previous and next pointer of a node.
14754 ---
14755 ---__Reference:__
14756 ---
14757 ---* Corresponding C source code: [lnodelib.c#L1851-L1862](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1851-L1862)
14758 ---
14759 ---@param d integer # The index number of the node in the memory table for direct access.
14760 ---
14761 ---@return integer|nil next
14762 ---@return integer|nil prev
14763 ---
14764 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14765 function node.direct.getboth(d) end
14766
14767 ---
14768 ---Return the `id` (type) of a node.
14769 ---
14770 ---__Reference:__
14771 ---
14772 ---* Corresponding C source code: [lnodelib.c#L487-L496](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L487-L496)
14773 ---
14774 ---@param n Node
14775 ---
14776 ---@return integer id
14777 ---
14778 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14779 function node.getid(n) end
14780
14781 ---
14782 ---Return the `id` (type) of a node.
14783 ---
14784 ---__Reference:__
14785 ---
14786 ---* Corresponding C source code: [lnodelib.c#L500-L517](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L500-L517)
14787 ---
14788 ---@param d integer # The index number of the node in the memory table for direct access.
14789 ---
14790 ---@return integer id
14791 ---
14792 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14793 function node.direct.getid(d) end
14794
14795 ---
14796 ---Set the `subtype` of a node.
14797 ---
14798 ---__Reference:__
14799 ---
14800 ---* Corresponding C source code: [lnodelib.c#L533-L540](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L533-L540)
14801 ---
14802 ---@param d integer # The index number of the node in the memory table for direct access.
14803 ---@param subtype integer
14804 ---
14805 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14806 function node.direct.setsubtype(d, subtype) end
14807
14808 ---
14809 ---Return the `subtype` of a node.
14810 ---
14811 ---__Reference:__
14812 ---
14813 ---* Corresponding C source code: [lnodelib.c#L544-L558](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L544-L558)
14814 ---
14815 ---@param n Node
14816 ---
14817 ---@return integer subtype
14818 ---
14819 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14820 function node.getsubtype(n) end
14821
14822 ---
14823 ---Return the `subtype` of a node.
14824 ---
14825 ---__Reference:__
14826 ---
14827 ---* Corresponding C source code: [lnodelib.c#L522-L531](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L522-L531)
14828 ---
14829 ---@param d integer # The index number of the node in the memory table for direct access.
14830 ---
14831 ---@return integer subtype
14832 ---
14833 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14834 function node.direct.getsubtype(d) end
14835
14836 ---
14837 ---Set the font identifier on a `glyph` node.
14838 ---
14839 ---__Reference:__
14840 ---
14841 ---* Corresponding C source code: [lnodelib.c#L621-L632](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L621-L632)
14842 ---
14843 ---@param d integer # The index number of the node in the memory table for direct access.
14844 ---
14845 ---@param font integer
14846 ---
14847 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14848 function node.direct.setfont(d, font) end
14849
14850 ---
14851 ---Return the font identifier of a `glyph`, `math_char`, `math_text_char` or `delim` node.
14852 ---
14853 ---__Reference:__
14854 ---
14855 ---* Corresponding C source code: [lnodelib.c#L636-L654](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L636-L654)
14856 ---
14857 ---@param n Node
14858 ---
14859 ---@return integer|nil font
14860 ---
14861 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14862 function node.getfont(n) end
14863
14864 ---
14865 ---Return the font identifier of a `glyph`, `math_char`, `math_text_char` or `delim` node.
14866 ---
14867 ---__Reference:__
14868 ---
14869 ---* Corresponding C source code: [lnodelib.c#L601-L619](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L601-L619)
14870 ---
14871 ---@param d integer # The index number of the node in the memory table for direct access.
14872 ---
14873 ---@return integer|nil font
14874 ---
14875 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14876 function node.direct.getfont(d) end
14877
14878 ---
14879 ---Set the character index (`char`) in the font on `glyph`, `math_char`, `math_text_char` or `delim` nodes.
14880 ---
14881 ---__Reference:__
14882 ---
14883 ---* Corresponding C source code: [lnodelib.c#L702-L717](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L702-L717)
14884 ---
14885 ---@param d integer # The index number of the node in the memory table for direct access.
14886 ---@param char integer
14887 ---
14888 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14889 function node.direct.setchar(d, char) end
14890
14891 ---
14892 ---Return the character index (`char`) in the font of `glyph`, `math_char`, `math_text_char` or `delim` nodes.
14893 ---
14894 ---__Reference:__
14895 ---
14896 ---* Corresponding C source code: [lnodelib.c#L739-L758](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L739-L758)
14897 ---
14898 ---@param n Node
14899 ---
14900 ---@return integer|nil char
14901 ---
14902 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14903 function node.getchar(n) end
14904
14905 ---
14906 ---Return the character index (`char`) in the font of `glyph`, `math_char`, `math_text_char` or `delim` nodes.
14907 ---
14908 ---__Reference:__
14909 ---
14910 ---* Corresponding C source code: [lnodelib.c#L659-L678](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L659-L678)
14911 ---
14912 ---@param d integer # The index number of the node in the memory table for direct access.
14913 ---
14914 ---@return integer|nil char
14915 ---
14916 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14917 function node.direct.getchar(d) end
14918
14919 ---
14920 ---Set the `width`, `height` and `depth` fields of `hlist`, `vlist`, `rule` or `unset` nodes.
14921 ---
14922 ---__Reference:__
14923 ---
14924 ---* Corresponding C source code: [lnodelib.c#L1307-L1346](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1307-L1346)
14925 ---
14926 ---@param d integer # The index number of the node in the memory table for direct access.
14927 ---@param width number # Rounded to an integer
14928 ---@param height number # Rounded to an integer
14929 ---@param depth number # Rounded to an integer
14930 ---
14931 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14932 function node.direct.setwhd(d, width, height, depth) end
14933
14934 ---
14935 ---Return the `width`, `height` and `depth` of a list, rule or (unexpanded) `glyph` as well as `glue` (its spec is looked at) and `unset` node.
14936 ---
14937 ---__Reference:__
14938 ---
14939 ---* Corresponding C source code: [lnodelib.c#L1350-L1378](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1350-L1378)
14940 ---
14941 ---@param n Node
14942 ---@param get_ex boolean
14943 ---
14944 ---@return integer width
14945 ---@return integer height
14946 ---@return integer depth
14947 ---@return integer|nil ex # If the node is a `glyph` and `get_ex` is true
14948 ---
14949 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14950 function node.getwhd(n, get_ex) end
14951
14952 ---
14953 ---Return the `width`, `height` and `depth` of a list, rule or (unexpanded) `glyph` as well as `glue` (its spec is looked at) and `unset` node.
14954 ---
14955 ---__Reference:__
14956 ---
14957 ---* Corresponding C source code: [lnodelib.c#L1277-L1305](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1277-L1305)
14958 ---
14959 ---@param d integer # The index number of the node in the memory table for direct access.
14960 ---@param get_ex boolean
14961 ---
14962 ---@return integer width
14963 ---@return integer height
14964 ---@return integer depth
14965 ---@return integer|nil ex # If the node is a `glyph` and `get_ex` is true
14966 ---
14967 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14968 function node.direct.getwhd(d, get_ex) end
14969
14970 ---
14971 ---Set the `pre`, `post`, `replace`, `subtype` and `penalty` on a `disc` node.
14972 ---__Reference:__
14973 ---
14974 ---* Corresponding C source code: [lnodelib.c#L1201-L1232](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1201-L1232)
14975 ---
14976 ---@param d integer # The index number of the node in the memory table for direct access.
14977 ---@param pre integer
14978 ---@param post? integer
14979 ---@param replace? integer
14980 ---@param subtype? integer
14981 ---@param penalty? integer
14982 ---
14983 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
14984 function node.direct.setdisc(d, pre, post, replace, subtype, penalty) end
14985
14986 ---
14987 ---Return the `pre`, `post` and `replace` fields and optionally when true is passed also the tail fields.
14988 ---
14989 ---__Reference:__
14990 ---
14991 ---* Corresponding C source code: [lnodelib.c#L1236-L1253](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1236-L1253)
14992 ---
14993 ---@param n Node
14994 ---@param get_tail? boolean
14995 ---
14996 ---@return Node pre
14997 ---@return Node post
14998 ---@return Node replace
14999 ---@return Node|nil pre_tail
15000 ---@return Node|nil post_tail
15001 ---@return Node|nil replace_tail
15002 ---
15003 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15004 function node.getdisc(n, get_tail) end
15005
15006 ---
15007 ---Return the `pre`, `post` and `replace` fields and optionally when true is passed also the tail fields.
15008 ---
15009 ---__Reference:__
15010 ---
15011 ---* Corresponding C source code: [lnodelib.c#L1182-L1199](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1182-L1199)
15012 ---
15013 ---@param d integer # The index number of the node in the memory table for direct access.
15014 ---@param get_tail? boolean
15015 ---
15016 ---@return integer pre
15017 ---@return integer post
15018 ---@return integer replace
15019 ---@return integer|nil pre_tail
15020 ---@return integer|nil post_tail
15021 ---@return integer|nil replace_tail
15022 ---
15023 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15024 function node.direct.getdisc(d, get_tail) end
15025
15026 ---
15027 ---Set child node lists to parent `hlist`, `vlist`, `sub_box`, `sub_mlist`, `ins`, or `adjust` nodes.
15028 ---
15029 ---__Reference:__
15030 ---
15031 ---* Corresponding C source code: [lnodelib.c#L1404-L1436](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1404-L1436)
15032 ---
15033 ---@param d integer # The index number of the node in the memory table for direct access.
15034 ---@param list integer
15035 ---
15036 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15037 function node.direct.setlist(d, list) end
15038
15039 ---
15040 ---Get child node lists of parent `hlist`, `vlist`, `sub_box`, `sub_mlist`, `ins`, or `adjust` nodes.
15041 ---
15042 ---__Reference:__
15043 ---
15044 ---* Corresponding C source code: [lnodelib.c#L1440-L1458](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1440-L1458)
15045 ---
15046 ---@param n Node
15047 ---
15048 ---@return Node|nil list
15049 ---
15050 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15051 function node.getlist(n) end
15052
15053 ---
15054 ---Get child node lists of parent `hlist`, `vlist`, `sub_box`, `sub_mlist`, `ins`, or `adjust` nodes.
15055 ---
15056 ---__Reference:__
15057 ---
15058 ---* Corresponding C source code: [lnodelib.c#L1382-L1402](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1382-L1402)
15059 ---
15060 ---@param d integer # The index number of the node in the memory table for direct access.
15061 ---
15062 ---@return integer|nil list
15063 ---
15064 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15065 function node.direct.getlist(d) end
15066
15067 ---
15068 ---Set the leaders to `glue` nodes.
15069 ---
15070 ---__Reference:__
15071 ---
15072 ---* Corresponding C source code: [lnodelib.c#L1474-L1485](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1474-L1485)
15073 ---
15074 ---@param d integer # The index number of the node in the memory table for direct access.
15075 ---@param leader integer
15076 ---
15077 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15078 function node.direct.setleader(d, leader) end
15079
15080 ---
15081 ---Get the leaders of `glue` nodes.
15082 ---
15083 ---__Reference:__
15084 ---
15085 ---* Corresponding C source code: [lnodelib.c#L1489-L1501](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1489-L1501)
15086 ---
15087 ---@param n Node
15088 ---
15089 ---@return Node|nil leaders
15090 ---
15091 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15092 function node.getleader(n) end
15093
15094 ---
15095 ---Get the leaders of `glue` nodes.
15096 ---
15097 ---__Reference:__
15098 ---
15099 ---* Corresponding C source code: [lnodelib.c#L1463-L1472](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1463-L1472)
15100 ---
15101 ---@param d integer # The index number of the node in the memory table for direct access.
15102 ---
15103 ---@return integer|nil leaders
15104 ---
15105 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15106 function node.direct.getleader(d) end
15107
15108 ---
15109 ---Set the value of a generic node field.
15110 ---
15111 ---__Reference:__
15112 ---
15113 ---* Corresponding C source code: [lnodelib.c#L7348-L7364](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L7348-L7364)
15114 ---
15115 ---@param n Node
15116 ---@param field string
15117 ---@param value any
15118 ---
15119 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15120 function node.setfield(n, field, value) end
15121
15122 ---
15123 ---Set the value of a generic node field.
15124 ---
15125 ---__Reference:__
15126 ---
15127 ---* Corresponding C source code: [lnodelib.c#L7660-L8188](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L7660-L8188)
15128 ---
15129 ---@param d integer # The index number of the node in the memory table for direct access.
15130 ---@param field string
15131 ---@param value any
15132 ---
15133 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15134 function node.direct.setfield(d, field, value) end
15135
15136 ---
15137 ---Get the value of a generic node field.
15138 ---
15139 ---Other field names are often shared so a specific getter makes no sense.
15140 ---
15141 ---__Reference:__
15142 ---
15143 ---* Corresponding C source code: [lnodelib.c#L5189-L5207](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L5189-L5207)
15144 ---
15145 ---@param n Node
15146 ---@param field string
15147 ---
15148 ---@return any|nil
15149 ---
15150 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15151 function node.getfield(n, field) end
15152
15153 ---
15154 ---Get the value of a generic node field.
15155 ---
15156 ---Other field names are often shared so a specific getter makes no sense.
15157 ---
15158 ---__Reference:__
15159 ---
15160 ---* Corresponding C source code: [lnodelib.c#L5402-L5891](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L5402-L5891)
15161 ---
15162 ---@param d integer # The index number of the node in the memory table for direct access.
15163 ---@param field string
15164 ---
15165 ---@return any|nil
15166 ---
15167 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15168 function node.direct.getfield(d, field) end
15169
15170 ---
15171 ---Set the SyncTeX fields, a file number aka tag and a line
15172 ---number, for a glue, kern, hlist, vlist, rule and math nodes as well as glyph
15173 ---nodes (although this last one is not used in native SyncTeX).
15174 ---
15175 ---Of course you need to know what you're doing as no checking on sane values takes
15176 ---place. Also, the SyncTeX interpreter used in editors is rather peculiar and has
15177 ---some assumptions (heuristics).
15178 ---
15179 ---__Reference:__
15180 ---
15181 ---* Corresponding C source code: [lnodelib.c#L8683-L8719](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8683-L8719)
15182 ---
15183 ---@param d integer # The index number of the node in the memory table for direct access.
15184 ---@param tag integer
15185 ---@param line integer
15186 ---
15187 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15188 function node.direct.set_synctex_fields(d, tag, line) end
15189
15190 ---
15191 ---Query the SyncTeX fields, a file number aka tag and a line
15192 ---number, for a glue, kern, hlist, vlist, rule and math nodes as well as glyph
15193 ---nodes (although this last one is not used in native SyncTeX).
15194 ---
15195 ---Of course you need to know what you're doing as no checking on sane values takes
15196 ---place. Also, the SyncTeX interpreter used in editors is rather peculiar and has
15197 ---some assumptions (heuristics).
15198 ---
15199 ---__Reference:__
15200 ---
15201 ---* Corresponding C source code: [lnodelib.c#L8721-L8759](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8721-L8759)
15202 ---
15203 ---@param d integer # The index number of the node in the memory table for direct access.
15204 ---
15205 ---@return integer tag
15206 ---@return integer line
15207 ---
15208 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15209 function node.direct.get_synctex_fields(d) end
15210
15211 ---
15212 ---Set the attribute list on a node.
15213 ---
15214 ---When the second argument of setattributelist is
15215 ---`true` the current attribute list is assumed.
15216 ---
15217 ---__Reference:__
15218 ---
15219 ---* Corresponding C source code: [lnodelib.c#L828-L854](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L828-L854)
15220 ---
15221 ---@param d integer # The index number of the node in the memory table for direct access.
15222 ---@param attr_list integer|true
15223 ---
15224 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15225 function node.direct.setattributelist(d, attr_list) end
15226
15227 ---
15228 ---Return the attribute list on a node.
15229 ---
15230 ---__Reference:__
15231 ---
15232 ---* Corresponding C source code: [lnodelib.c#L817-L826](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L817-L826)
15233 ---
15234 ---@param n Node
15235 ---
15236 ---@return integer|nil
15237 ---
15238 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15239 function node.direct.getattributelist(n) end
15240
15241 ---
15242 ---Return the node list of the given box.
15243 ---
15244 ---__Reference:__
15245 ---
15246 ---* Corresponding C source code: [lnodelib.c#L8224-L8236](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8224-L8236)
15247 ---
15248 ---@param box integer
15249 ---
15250 ---@return integer|nil node
15251 ---
15252 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15253 function node.direct.getbox(box) end
15254
15255 ---
15256 ---Set the field `components` (ligature components) on `glyph` nodes.
15257 ---
15258 ---__Reference:__
15259 ---
15260 ---* Corresponding C source code: [lnodelib.c#L774-L785](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L774-L785)
15261 ---
15262 ---@param d integer # The index number of the node in the memory table for direct access.
15263 ---@param components integer
15264 ---
15265 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15266 function node.direct.setcomponents(d, components) end
15267
15268 ---
15269 ---Return the field `components` (ligature components) of `glyph` nodes.
15270 ---
15271 ---__Reference:__
15272 ---
15273 ---* Corresponding C source code: [lnodelib.c#L763-L772](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L763-L772)
15274 ---
15275 ---@param d integer # The index number of the node in the memory table for direct access.
15276 ---
15277 ---@return integer|nil
15278 ---
15279 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15280 function node.direct.getcomponents(d) end
15281
15282 ---
15283 ---Set the `data` field on `glyph`, `boundary`, `user_defined`, `pdf_literal`, `pdf_late_literal`, `late_lua`, `pdf_setmatrix`, `special`, `late_special` and `write` nodes.
15284 ---
15285 ---__Reference:__
15286 ---
15287 ---* Corresponding C source code: [lnodelib.c#L1716-L1751](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1716-L1751)
15288 ---
15289 ---@param d integer # The index number of the node in the memory table for direct access.
15290 ---
15291 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15292 function node.direct.setdata(d) end
15293
15294 ---
15295 ---Return the `data` field off `glyph`, `boundary`, `user_defined`, `pdf_literal`, `pdf_late_literal`, `late_lua`, `pdf_setmatrix`, `special`, `late_special` and `write` nodes.
15296 ---
15297 ---__Reference:__
15298 ---
15299 ---* Corresponding C source code: [lnodelib.c#L1678-L1714](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1678-L1714)
15300 ---
15301 ---@param d integer # The index number of the node in the memory table for direct access.
15302 ---
15303 ---@return any|nil
15304 ---
15305 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15306 function node.direct.getdata(d) end
15307
15308 ---
15309 ---Set the direction of `dir`, `hlist`, `vlist`, `rule` and `local_par` nodes as a string.
15310 ---
15311 ---__Reference:__
15312 ---
15313 ---* Corresponding C source code: [lnodelib.c#L1093-L1109](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1093-L1109)
15314 ---
15315 ---@param d integer # The index number of the node in the memory table for direct access.
15316 ---@param dir DirectionSpecifier
15317 ---
15318 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15319 function node.direct.setdir(d, dir) end
15320
15321 ---
15322 ---Get the direction of `dir`, `hlist`, `vlist`, `rule` and `local_par` nodes as a string.
15323 ---
15324 ---__Reference:__
15325 ---
15326 ---* Corresponding C source code: [lnodelib.c#L1047-L1067](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1047-L1067)
15327 ---
15328 ---@param d integer # The index number of the node in the memory table for direct access.
15329 ---
15330 ---@return DirectionSpecifier
15331 ---
15332 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15333 function node.direct.getdir(d) end
15334
15335 ---
15336 ---Set the direction of `dir`, `hlist`, `vlist`, `rule` and `local_par` nodes as an integer.
15337 ---
15338 ---__Reference:__
15339 ---
15340 ---* Corresponding C source code: [lnodelib.c#L1111-L1134](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1111-L1134)
15341 ---
15342 ---@param d integer # The index number of the node in the memory table for direct access.
15343 ---@param dir integer
15344 ---
15345 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15346 function node.direct.setdirection(d, dir) end
15347
15348 ---
15349 ---Get the direction of `dir`, `hlist`, `vlist`, `rule` and `local_par` nodes as an integer.
15350 ---
15351 ---__Reference:__
15352 ---
15353 ---* Corresponding C source code: [lnodelib.c#LL1070-L1092](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#LL1070-L1092)
15354 ---
15355 ---@param d integer # The index number of the node in the memory table for direct access.
15356 ---
15357 ---@return integer
15358 ---
15359 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15360 function node.direct.getdirection(d) end
15361
15362 ---
15363 ---__Reference:__
15364 ---
15365 ---* Corresponding C source code: [lnodelib.c#L580-L596](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L580-L596)
15366 ---
15367 ---@param d integer # The index number of the node in the memory table for direct access.
15368 ---
15369 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15370 function node.direct.setexpansion(d) end
15371
15372 ---
15373 ---__Reference:__
15374 ---
15375 ---* Corresponding C source code: [lnodelib.c#L563-L578](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L563-L578)
15376 ---
15377 ---@param d integer # The index number of the node in the memory table for direct access.
15378 ---
15379 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15380 function node.direct.getexpansion(d) end
15381
15382 ---
15383 ---Set the the family number of `math_char`, `math_text_char`, `delim`, `fraction_noad`, `simple_noad` nodes.
15384 ---
15385 ---__Reference:__
15386 ---
15387 ---* Corresponding C source code: [lnodelib.c#L719-L735](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L719-L735)
15388 ---
15389 ---@param d integer # The index number of the node in the memory table for direct access.
15390 ---@param fam integer
15391 ---
15392 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15393 function node.direct.setfam(d, fam) end
15394
15395 ---
15396 ---__Reference:__
15397 ---
15398 ---* Corresponding C source code: [lnodelib.c#L680-L700](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L680-L700)
15399 ---
15400 ---@param d integer # The index number of the node in the memory table for direct access.
15401 ---
15402 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15403 function node.direct.getfam(d) end
15404
15405 ---
15406 ---Set the width on `hlist`, `vlist`, `rule`, `glue`, `glue_spec`, `math`, `kern`, `margin_kern`, `ins`, `unset`, `fraction_noad` or `radical_noad` nodes.
15407 ---
15408 ---__Reference:__
15409 ---
15410 ---* Corresponding C source code: [lnodelib.c#L3641-L3657](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3641-L3657)
15411 ---
15412 ---@param d integer # The index number of the node in the memory table for direct access.
15413 ---@param width number # Rounded to an integer
15414 ---
15415 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15416 function node.direct.setwidth(d, width) end
15417
15418 ---
15419 ---Get the width of `hlist`, `vlist`, `rule`, `glyph`, `glue`, `glue_spec`, `math`, `kern`, `margin_kern`, `ins` and `unset` nodes.
15420 ---
15421 ---__Reference:__
15422 ---
15423 ---* Corresponding C source code: [lnodelib.c#L3607-L3639](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3607-L3639)
15424 ---
15425 ---@param d integer # The index number of the node in the memory table for direct access.
15426 ---
15427 ---@return integer width
15428 ---
15429 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15430 function node.direct.getwidth(d) end
15431
15432 ---
15433 ---Set the height on `hlist`, `vlist`, `rule`, `unset` and `fence_noad` nodes.
15434 ---
15435 ---__Reference:__
15436 ---
15437 ---* Corresponding C source code: [lnodelib.c#L3681-L3697](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3681-L3697)
15438 ---
15439 ---@param d integer # The index number of the node in the memory table for direct access.
15440 ---
15441 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15442 function node.direct.setheight(d) end
15443
15444 ---
15445 ---Return the height off `hlist`, `vlist`, `rule`, `glyph`, `unset`, `ins` and `fence` nodes.
15446 ---
15447 ---__Reference:__
15448 ---
15449 ---* Corresponding C source code: [lnodelib.c#L3659-L3679](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3659-L3679)
15450 ---
15451 ---@param d integer # The index number of the node in the memory table for direct access.
15452 ---
15453 ---@return integer|nil
15454 ---
15455 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15456 function node.direct.getheight(d) end
15457
15458 ---
15459 ---Set the depth on `hlist`, `vlist`, `rule`, `unset` and `fence` nodes.
15460 ---
15461 ---__Reference:__
15462 ---
15463 ---* Corresponding C source code: [lnodelib.c#L3721-L3737](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3721-L3737)
15464 ---
15465 ---@param d integer # The index number of the node in the memory table for direct access.
15466 ---@param depth number
15467 ---
15468 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15469 function node.direct.setdepth(d, depth) end
15470
15471 ---
15472 ---Return the depth of `hlist`, `vlist`, `rule`, `glyph`, `unset`, `ins` and `fence` nodes.
15473 ---
15474 ---__Reference:__
15475 ---
15476 ---* Corresponding C source code: [lnodelib.c#L3699-L3719](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3699-L3719)
15477 ---
15478 ---@param d integer # The index number of the node in the memory table for direct access.
15479 ---
15480 ---@return integer|nil
15481 ---
15482 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15483 function node.direct.getdepth(d) end
15484
15485 ---
15486 ---Set the kerning on `kern` (kern), `margin_kern` (width) and `math` (surround) nodes.
15487 ---
15488 ---__Reference:__
15489 ---
15490 ---* Corresponding C source code: [lnodelib.c#L1019-L1042](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1019-L1042)
15491 ---
15492 ---@param d integer # The index number of the node in the memory table for direct access.
15493 ---@param kern integer
15494 ---
15495 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15496 function node.direct.setkern(d, kern) end
15497
15498 ---
15499 ---Return the kerning of `kern` (kern), `margin_kern` (width) and `math` (surround) nodes.
15500 ---
15501 ---__Reference:__
15502 ---
15503 ---* Corresponding C source code: [lnodelib.c#L995-L1017](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L995-L1017)
15504 ---
15505 ---@param d integer # The index number of the node in the memory table for direct access.
15506 ---@return integer|nil kern
15507 ---
15508 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15509 function node.direct.getkern(d) end
15510
15511 ---
15512 ---Set the `lang` (the language identifier) field on `glyph` nodes.
15513 ---
15514 ---__Reference:__
15515 ---
15516 ---* Corresponding C source code: [lnodelib.c#L801-L812](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L801-L812)
15517 ---
15518 ---@param d integer # The index number of the node in the memory table for direct access.
15519 ---@param lang integer
15520 ---
15521 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15522 function node.direct.setlang(d, lang) end
15523
15524 ---
15525 ---Return the `lang` (the language identifier) field of `glyph` nodes.
15526 ---
15527 ---__Reference:__
15528 ---
15529 ---* Corresponding C source code: [lnodelib.c#L790-L799](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L790-L799)
15530 ---
15531 ---@param d integer # The index number of the node in the memory table for direct access.
15532 ---
15533 ---@return integer|nil lang
15534 ---
15535 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15536 function node.direct.getlang(d) end
15537
15538 ---
15539 ---Set the `nucleus` (base) field an `simple_noad`, `accent_noad` and `radical_noad` nodes.
15540 ---
15541 ---__Reference:__
15542 ---
15543 ---* Corresponding C source code: [lnodelib.c#L916-L930](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L916-L930)
15544 ---
15545 ---@param d integer # The index number of the node in the memory table for direct access.
15546 ---@param nucleus integer
15547 ---
15548 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15549 function node.direct.setnucleus(d, nucleus) end
15550
15551 ---
15552 ---Return the `nucleus` (base) field of `simple_noad`, `accent_noad` and `radical_noad` nodes.
15553 ---
15554 ---__Reference:__
15555 ---
15556 ---* Corresponding C source code: [lnodelib.c#L902-L914](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L902-L914)
15557 ---
15558 ---@param d integer # The index number of the node in the memory table for direct access.
15559 ---
15560 ---@return integer|nil nucleus
15561 ---
15562 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15563 function node.direct.getnucleus(d) end
15564
15565 ---
15566 ---Set offsets on `glyph` (`xoffset`: a virtual displacement in horizontal direction and
15567 ---`yoffset`: a virtual displacement in vertical direction) and `rule` (`left`: shift at the left end (also subtracted from width) and `right`: subtracted from width) nodes.
15568 ---
15569 ---__Reference:__
15570 ---
15571 ---* Corresponding C source code: [lnodelib.c#L1156-L1177](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1156-L1177)
15572 ---
15573 ---@param d integer # The index number of the node in the memory table for direct access.
15574 ---@param a integer # `xoffset` or `left`
15575 ---@param b integer # `yoffset` or `right`
15576 ---
15577 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15578 function node.direct.setoffsets(d, a, b) end
15579
15580 ---
15581 ---Set the `penalty` field on `glyph` and `rule` nodes.
15582 ---
15583 ---__Reference:__
15584 ---
15585 ---* Corresponding C source code: [lnodelib.c#L1139-L1154](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1139-L1154)
15586 ---
15587 ---@param d integer # The index number of the node in the memory table for direct access.
15588 ---
15589 ---@return integer|nil a # `xoffset` or `left`
15590 ---@return integer|nil b # `yoffset` or `right`
15591 ---
15592 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15593 function node.direct.getoffsets(d) end
15594
15595 ---
15596 ---Set the `penalty` field on `penalty` and `disc` nodes.
15597 ---
15598 ---__Reference:__
15599 ---
15600 ---* Corresponding C source code: [lnodelib.c#L876-L896](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L876-L896)
15601 ---
15602 ---@param d integer # The index number of the node in the memory table for direct access.
15603 ---
15604 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15605 function node.direct.setpenalty(d) end
15606
15607 ---
15608 ---Return the `penalty` field of `penalty` and `disc` nodes.
15609 ---
15610 ---__Reference:__
15611 ---
15612 ---* Corresponding C source code: [lnodelib.c#L858-L874](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L858-L874)
15613 ---
15614 ---@param d integer # The index number of the node in the memory table for direct access.
15615 ---
15616 ---@return integer|nil penalty
15617 ---
15618 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15619 function node.direct.getpenalty(d) end
15620
15621 ---
15622 ---Set the `shift` (a displacement perpendicular to the character progression direction) field on `vlist` and `hlist` nodes.
15623 ---__Reference:__
15624 ---
15625 ---* Corresponding C source code: [lnodelib.c#L3756-L3770](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3756-L3770)
15626 ---
15627 ---@param d integer # The index number of the node in the memory table for direct access.
15628 ---@param shift integer
15629 ---
15630 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15631 function node.direct.setshift(d, shift) end
15632
15633 ---
15634 ---Return the `shift` (a displacement perpendicular to the character progression direction) field off `vlist` and `hlist` nodes.
15635 ---
15636 ---__Reference:__
15637 ---
15638 ---* Corresponding C source code: [lnodelib.c#L3742-L3754](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3742-L3754)
15639 ---
15640 ---@param d integer # The index number of the node in the memory table for direct access.
15641 ---
15642 ---@return integer|nil shift
15643 ---
15644 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15645 function node.direct.getshift(d) end
15646
15647 ---
15648 ---Set the `sub` (subscript) field on `simple_noad`, `accent_noad` and `radical_noad` nodes.
15649 ---
15650 ---__Reference:__
15651 ---
15652 ---* Corresponding C source code: [lnodelib.c#L946-L960](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L946-L960)
15653 ---
15654 ---@param d integer # The index number of the node in the memory table for direct access.
15655 ---@param sub integer
15656 ---
15657 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15658 function node.direct.setsub(d, sub) end
15659
15660 ---
15661 ---Return the `sub` (subscript) field of `simple_noad`, `accent_noad` and `radical_noad` nodes.
15662 ---
15663 ---__Reference:__
15664 ---
15665 ---* Corresponding C source code: [lnodelib.c#L932-L944](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L932-L944)
15666 ---
15667 ---@param d integer # The index number of the node in the memory table for direct access.
15668 ---
15669 ---@return integer|nil sub
15670 ---
15671 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15672 function node.direct.getsub(d) end
15673
15674 ---
15675 ---Set the `sup` (superscript) field on `simple_noad`, `accent_noad` and `radical_noad` nodes.
15676 ---
15677 ---__Reference:__
15678 ---
15679 ---* Corresponding C source code: [lnodelib.c#L976-L990](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L976-L990)
15680 ---
15681 ---@param d integer # The index number of the node in the memory table for direct access.
15682 ---@param sup number
15683 ---
15684 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15685 function node.direct.setsup(d, sup) end
15686
15687 ---
15688 ---Return the `sup` (superscript) field of `simple_noad`, `accent_noad` and `radical_noad` nodes.
15689 ---
15690 ---__Reference:__
15691 ---
15692 ---* Corresponding C source code: [lnodelib.c#L962-L974](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L962-L974)
15693 ---
15694 ---@param d integer # The index number of the node in the memory table for direct access.
15695 ---
15696 ---@return integer|nil sup
15697 ---
15698 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15699 function node.direct.getsup(d) end
15700
15701 ---
15702 ---__Reference:__
15703 ---
15704 ---* Corresponding C source code: [lnodelib.c#L8307-L8322](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8307-L8322)
15705 ---
15706 ---@param d integer # The index number of the node in the memory table for direct access.
15707 ---
15708 ---@return integer|false
15709 ---
15710 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15711 function node.direct.is_direct(d) end
15712
15713 ---
15714 ---__Reference:__
15715 ---
15716 ---* Corresponding C source code: [lnodelib.c#L1912-L1957](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1912-L1957)
15717 ---
15718 ---@param d integer # The index number of the node in the memory table for direct access.
15719 ---
15720 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15721 function node.direct.setlink(d) end
15722
15723 ---
15724 ---__Reference:__
15725 ---
15726 ---* Corresponding C source code: [lnodelib.c#L1959-L1972](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L1959-L1972)
15727 ---
15728 ---@param l integer # The index number of the node in the memory table for direct access.
15729 ---@param r integer # The index number of the node in the memory table for direct access.
15730 ---
15731 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15732 function node.direct.setsplit(l, r) end
15733
15734 ---
15735 ---Assign values to the properties table.
15736 ---
15737 ---__Reference:__
15738 ---
15739 ---* Source file of the `LuaTeX` manual: [lnodelib.c#L8397-L8410](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8397-L8410)
15740 ---* Corresponding C source code: [lnodelib.c#L8403-L8416](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8403-L8416)
15741 ---
15742 ---@param n Node
15743 ---@param value any
15744 ---
15745 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15746 function node.setproperty(n, value) end
15747
15748 ---
15749 ---Assign values to the properties table.
15750 ---
15751 ---__Reference:__
15752 ---
15753 ---* Source file of the `LuaTeX` manual: [lnodelib.c#L8397-L8410](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8397-L8410)
15754 ---* Corresponding C source code: [lnodelib.c#L8418-L8431](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8418-L8431)
15755 ---
15756 ---@param d integer # The index number of the node in the memory table for direct access.---@param value any
15757 ---
15758 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15759 function node.direct.setproperty(d, value) end
15760
15761 ---
15762 ---Each node also can have a properties table and you can get properties using the `getproperty` function.
15763 ---
15764 ---__Reference:__
15765 ---
15766 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L2520-L2523](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L2520-L2523)
15767 ---* Corresponding C source code: [lnodelib.c#L8379-L8389](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8379-L8389)
15768 ---
15769 ---@param node Node
15770 ---
15771 ---@return any value
15772 ---
15773 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15774 function node.getproperty(node) end
15775
15776 ---
15777 ---Each node also can have a properties table and you can get properties using the `getproperty` function.
15778 ---
15779 ---__Reference:__
15780 ---
15781 ---* Source file of the `LuaTeX` manual: [luatex-nodes.tex#L2520-L2523](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-nodes.tex#L2520-L2523)
15782 ---* Corresponding C source code: [lnodelib.c#L8391-L8401](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8391-L8401)
15783 ---
15784 ---@param d integer # The index number of the node in the memory table for direct access.
15785 ---
15786 ---@return any value
15787 ---
15788 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15789 function node.direct.getproperty(d) end
15790
15791 ---
15792 ---Managing properties in the node (de)allocator functions is disabled by default and is enabled by:
15793 ---
15794 ---__Reference:__
15795 ---
15796 ---* Corresponding C source code: [lnodelib.c#L8351-L8360](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8351-L8360)
15797 ---
15798 ---@param enable boolean
15799 ---@param use_metatable? boolean
15800 ---
15801 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15802 function node.set_properties_mode(enable, use_metatable) end
15803
15804 ---
15805 ---Managing properties in the node (de)allocator functions is disabled by default and is enabled by:
15806 ---
15807 ---__Reference:__
15808 ---
15809 ---* Corresponding C source code: [lnodelib.c#L8351-L8360](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8351-L8360)
15810 ---
15811 ---@param enable boolean
15812 ---@param use_metatable? boolean
15813 ---
15814 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15815 function node.direct.set_properties_mode(enable, use_metatable) end
15816
15817 ---
15818 ---__Reference:__
15819 ---
15820 ---* Corresponding C source code: [lnodelib.c#L8364-L8375](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8364-L8375)
15821 ---
15822 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15823 function node.flush_properties_table() end
15824
15825 ---
15826 ---__Reference:__
15827 ---
15828 ---* Corresponding C source code: [lnodelib.c#L8364-L8375](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8364-L8375)
15829 ---
15830 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15831 function node.direct.flush_properties_table() end
15832
15833 ---
15834 ---__Reference:__
15835 ---
15836 ---* Corresponding C source code: [lnodelib.c#L8439-L8443](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8439-L8443)
15837 ---
15838 ---@return table
15839 ---
15840 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15841 function node.get_properties_table() end
15842
15843 ---
15844 ---__Reference:__
15845 ---
15846 ---* Corresponding C source code: [lnodelib.c#L8433-L8437](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8433-L8437)
15847 ---
15848 ---@return table
15849 ---
15850 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15851 function node.direct.get_properties_table() end
15852
15853 ---
15854 ---__Reference:__
15855 ---
15856 ---* Corresponding C source code: [lnodelib.c#L366-L374](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L366-L374)
15857 ---
15858 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15859 function node.fix_node_lists() end
15860
15861 ---
15862 ---__Reference:__
15863 ---
15864 ---* Corresponding C source code: [lnodelib.c#L6104-L6122](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6104-L6122)
15865 ---
15866 ---@param n Node
15867 ---@param m? Node
15868 ---
15869 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15870 function node.hyphenating(n, m) end
15871
15872 ---
15873 ---__Reference:__
15874 ---
15875 ---* Corresponding C source code: [lnodelib.c#L6124-L6142](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6124-L6142)
15876 ---
15877 ---@param d integer # The index number of the node in the memory table for direct access.
15878 ---@param e? integer
15879 ---
15880 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15881 function node.direct.hyphenating(d, e) end
15882
15883 ---
15884 ---__Reference:__
15885 ---
15886 ---* Corresponding C source code: [lnodelib.c#L8842-L8868](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L8842-L8868)
15887 ---
15888 ---@param fnt integer
15889 ---@param chr integer
15890 ---@param size integer
15891 ---@param overlap? integer
15892 ---@param horizontal? boolean
15893 ---@param attlist? Node
15894 ---
15895 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15896 function node.make_extensible(fnt, chr, size, overlap, horizontal, attlist) end
15897
15898 ---
15899 ---__Example:__
15900 ---
15901 ---```lua
15902 ---node.subtypes('fence') -- {"left", "middle", "right", "no", [0] = "unset"}
15903 ---```
15904 ---
15905 ---__Reference:__
15906 ---
15907 ---* Corresponding C source code: [lnodelib.c#L3153-L3222](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3153-L3222)
15908 ---
15909 ---@param subtype string|integer
15910 ---
15911 ---@return table<integer, string>
15912 ---
15913 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15914 function node.subtypes(subtype) end
15915
15916 ---
15917 ---__Reference:__
15918 ---
15919 ---* Corresponding C source code: [lnodelib.c#L5913-L5918](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L5913-L5918)
15920 ---
15921 ---@param n Node
15922 ---@return string # For example `<node nil < 234 > nil : glyph 0>`
15923 ---
15924 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15925 function node.tostring(n) end
15926
15927 ---
15928 ---__Reference:__
15929 ---
15930 ---* Corresponding C source code: [lnodelib.c#L5922-L5931](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L5922-L5931)
15931 ---@param d integer # The index number of the node in the memory table for direct access.
15932 ---
15933 ---@return string # For example `<direct nil < 234 > nil : glyph 0>`
15934 ---
15935 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15936 function node.direct.tostring(d) end
15937
15938 ---
15939 ---__Reference:__
15940 ---
15941 ---* Corresponding C source code: [lnodelib.c#L6471-L6476](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6471-L6476)
15942 ---
15943 ---@return Node n
15944 ---
15945 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15946 function node.usedlist() end
15947
15948 ---
15949 ---__Reference:__
15950 ---
15951 ---* Corresponding C source code: [lnodelib.c#L6480-L6484](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L6480-L6484)
15952 ---
15953 ---@return integer d
15954 ---
15955 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15956 function node.direct.usedlist() end
15957
15958 ---
15959 ---Report some used values.
15960 ---
15961 ---Valid arguments are `dir`, `direction`, `glue`, `pdf_literal`, `pdf_action`, `pdf_window` and `color_stack`. Keep
15962 ---in mind that the setters normally expect a number, but this helper gives you a
15963 ---list of what numbers matter. For practical reason the `pagestate` values
15964 ---are also reported with this helper.
15965 ---
15966 ---__Example:__
15967 ---
15968 ---```lua
15969 ---node.values('dir') -- { "TLT", "TRT", "LTL", "RTT" },
15970 ---```
15971 ---
15972 ---__Reference:__
15973 ---
15974 ---* Corresponding C source code: [lnodelib.c#L3117-L3151](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lnodelib.c#L3117-L3151)
15975 ---
15976 ---@param type 'dir'|'direction'|'glue'|'pdf_literal'|'pdf_action'|'pdf_window'|'color_stack'|'pagestate'
15977 ---
15978 ---@return string[]|nil
15979 ---
15980 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/node.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15981 function node.values(type) end ---
15982 ---The fontloader library is sort of independent of the rest in the sense that it
15983 ---can load font into a *Lua* table that then can be converted into a table suitable
15984 ---for *TeX*. The library is an adapted subset of *FontForge* and as such gives a
15985 ---similar view on a font (which has advantages when you want to debug).
15986 ---
15987 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15988 fontloader = {}
15989
15990 ---
15991 ---__Reference:__
15992 ---
15993 ---* Corresponding C source code: [luafflib.c#L2256-2283](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2256-2283)
15994 ---
15995 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
15996 ---@class FontInfo
15997 ---@field fontname string # The *PostScript* name of the font, for example `NimbusRoman-Regular`.
15998 ---@field fullname string # The formal name of the font, for example `NimbusRoman-Regular`.
15999 ---@field familyname string # The family name this font belongs to, for example `Nimbus Roman`.
16000 ---@field weight string # A string indicating the color value of the font, for example `Book`.
16001 ---@field version string # The internal font version, for example `1.00`,
16002 ---@field italicangle number # The slant angle, for example `0.0`, `-12.0`, `-9.4626`, `-10.5`, `-15.5` or `11.0`.
16003 ---@field units_per_em number # `1000` for *PostScript*-based fonts, usually `2048` for *TrueType*, for example `1000`.
16004 ---@field pfminfo FontloaderPfminfo #
16005 ---@field names FontloaderLangName # https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2278-2282
16006
16007 ---
16008 ---Get various information fields from an font file.
16009 ---
16010 ---This function returns either `nil`, or a `table`, or an array of
16011 ---small tables (in the case of a *TrueType* collection). The returned table(s) will
16012 ---contain some fairly interesting information items from the font(s) defined by the
16013 ---file.
16014 ---
16015 ---Getting information through this function is (sometimes much) more efficient than
16016 ---loading the font properly, and is therefore handy when you want to create a
16017 ---dictionary of available fonts based on a directory contents.
16018 ---
16019 ---__Reference:__
16020 ---
16021 ---* Corresponding C source code: [luafflib.c#L2257-L2284](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2257-L2284)
16022 ---
16023 ---@param filename string The path a font file.
16024 ---
16025 ---@return FontInfo|nil
16026 ---
16027 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16028 function fontloader.info(filename) end
16029
16030 ---
16031 ---Parse a font file and return a table representing its contents. The optional argument is the name of the desired font in case of font collection files. The optional return value contains any parser error strings.
16032 ---
16033 ---Open an *OpenType* font.
16034 ---
16035 ---If you want to use an *OpenType* font, you have to get the metric information
16036 ---from somewhere. Using the `fontloader` library, the simplest way to get
16037 ---that information is thus:
16038 ---
16039 ---```lua
16040 ---function load_font (filename)
16041 --- local metrics = nil
16042 --- local font = fontloader.open(filename)
16043 --- if font then
16044 --- metrics = fontloader.to_table(font)
16045 --- fontloader.close(font)
16046 --- end
16047 --- return metrics
16048 ---end
16049 ---
16050 ---myfont = load_font('/opt/tex/texmf/fonts/data/arial.ttf')
16051 ---```
16052 ---
16053 ---__Reference:__
16054 ---
16055 ---* Corresponding C source code: [luafflib.c#L198-L263](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L198-L263)
16056 ---
16057 ---@param filename string
16058 ---@param fontname? string
16059 ---
16060 ---@return FontloaderFont font # The first return value is a userdata representation of the font.
16061 ---@return table warnings # The second return value is a table containing any warnings and errors reported by fontloader while opening the font. In normal typesetting, you would probably ignore the second argument, but it can be useful for debugging purposes.
16062 ---
16063 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16064 function fontloader.open(filename, fontname) end
16065
16066 ---
16067 ---If you want to use an \OPENTYPE\ font, you have to get the metric information
16068 ---from somewhere. Using the fontloader library, the simplest way to get
16069 ---that information is thus:
16070 ---
16071 ---__Example:__
16072 ---
16073 ---```lua
16074 ---function load_font (filename)
16075 --- local metrics = nil
16076 --- local font = fontloader.open(filename)
16077 --- if font then
16078 --- metrics = fontloader.to_table(font)
16079 --- fontloader.close(font)
16080 --- end
16081 --- return metrics
16082 ---end
16083 ---
16084 ---myfont = load_font('/opt/tex/texmf/fonts/data/arial.ttf')
16085 ---```
16086 ---
16087 ---__Reference:__
16088 ---
16089 ---* Corresponding C source code: [luafflib.c#L2244-L2255](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2244-L2255)
16090 ---
16091 ---@param font FontloaderFont
16092 ---
16093 ---@return FontloaderFont|false f
16094 ---
16095 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16096 function fontloader.to_table(font) end
16097
16098 ---
16099 ---Discard a loaded font.
16100 ---
16101 ---__Example:__
16102 ---
16103 ---```lua
16104 ---local f = fontloader.open(
16105 --- '/usr/share/fonts/opentype/urw-base35/NimbusRoman-Regular.otf')
16106 ---print(fontloader.to_table(f)) -- table: 0x3d23b50
16107 ---fontloader.close(f)
16108 ---print(fontloader.to_table(f)) -- false
16109 ---```
16110 ---
16111 ---__Reference:__
16112 ---
16113 ---* Corresponding C source code: [luafflib.c#L265-L280](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L265-L280)
16114 ---* Source file of the `LuaTeX` manual: [luatex-fontloader.tex#L149-153](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/4f2b914d365bab8a2747afe6e8c86d0f1c8475f7/manual/luatex-fontloader.tex#L149-153)
16115 ---
16116 ---@param font FontloaderFont
16117 ---
16118 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16119 function fontloader.close(font) end
16120
16121 ---
16122 ---Apply a feature file to a fontloader table.
16123 ---
16124 ---__Reference:__
16125 ---
16126 ---* Corresponding C source code: [luafflib.c#L313-L334](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L313-L334)
16127 ---
16128 ---@param font userdata
16129 ---@param filename string
16130 ---
16131 ---@return table errors
16132 ---
16133 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16134 function fontloader.apply_featurefile(font, filename) end
16135
16136 ---
16137 ---Apply an AFM file to a fontloader table.
16138 ---
16139 ---__Reference:__
16140 ---
16141 ---* Corresponding C source code: [luafflib.c#L336-L355](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L336-L355)
16142 ---
16143 ---@param font userdata
16144 ---@param filename string
16145 ---
16146 ---@return table errors
16147 ---
16148 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16149 function fontloader.apply_afmfile(font, filename) end
16150
16151 ---
16152 ---@alias FontloaderFontField
16153 ---|`table_version`
16154 ---|`fontname`
16155 ---|`fullname`
16156 ---|`familyname`
16157 ---|`weight`
16158 ---|`copyright`
16159 ---|`filename`
16160 ---|`version`
16161 ---|`italicangle`
16162 ---|`upos`
16163 ---|`uwidth`
16164 ---|`ascent`
16165 ---|`descent`
16166 ---|`uniqueid`
16167 ---|`glyphcnt`
16168 ---|`glyphmax`
16169 ---|`glyphmin`
16170 ---|`units_per_em`
16171 ---|`lookups`
16172 ---|`glyphs`
16173 ---|`hasvmetrics`
16174 ---|`onlybitmaps`
16175 ---|`serifcheck`
16176 ---|`isserif`
16177 ---|`issans`
16178 ---|`encodingchanged`
16179 ---|`strokedfont`
16180 ---|`use_typo_metrics`
16181 ---|`weight_width_slope_only`
16182 ---|`head_optimized_for_cleartype`
16183 ---|`uni_interp`
16184 ---|`map`
16185 ---|`origname`
16186 ---|`private`
16187 ---|`xuid`
16188 ---|`pfminfo`
16189 ---|`names`
16190 ---|`cidinfo`
16191 ---|`subfonts`
16192 ---|`comments`
16193 ---|`fontlog`
16194 ---|`cvt_names`
16195 ---|`ttf_tables`
16196 ---|`ttf_tab_saved`
16197 ---|`texdata`
16198 ---|`anchor_classes`
16199 ---|`kerns`
16200 ---|`vkerns`
16201 ---|`gsub`
16202 ---|`gpos`
16203 ---|`features`
16204 ---|`mm`
16205 ---|`chosenname`
16206 ---|`macstyle`
16207 ---|`fondname`
16208 ---|`design_size`
16209 ---|`fontstyle_id`
16210 ---|`fontstyle_name`
16211 ---|`design_range_bottom`
16212 ---|`design_range_top`
16213 ---|`strokewidth`
16214 ---|`mark_classes`
16215 ---|`creationtime`
16216 ---|`modificationtime`
16217 ---|`os2_version`
16218 ---|`sfd_version`
16219 ---|`math`
16220 ---|`validation_state`
16221 ---|`horiz_base`
16222 ---|`vert_base`
16223 ---|`extrema_bound`
16224 ---|`notdef_loc`
16225
16226 ---
16227 ---__Example:__
16228 ---
16229 ---```lua
16230 ---local f = fontloader.open('/usr/share/fonts/opentype/urw-base35/NimbusRoman-Regular.otf')
16231 ---for _, value in ipairs(fontloader.fields(f)) do
16232 --- print(value, f[value])
16233 ---end
16234 ---```
16235 ---
16236 ---__Reference:__
16237 ---
16238 ---* Corresponding C source code: [luafflib.c#L2491-L2511](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2491-L2511)
16239 ---
16240 ---@param font FontloaderFont
16241 ---
16242 ---@return FontloaderFontField[] fields
16243 ---
16244 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16245 function fontloader.fields(font) end
16246
16247 ---
16248 ---@alias FontloaderGlyphField
16249 ---|`name`
16250 ---|`unicode`
16251 ---|`boundingbox`
16252 ---|`vwidth`
16253 ---|`width`
16254 ---|`lsidebearing`
16255 ---|`class`
16256 ---|`kerns`
16257 ---|`vkerns`
16258 ---|`dependents`
16259 ---|`lookups`
16260 ---|`ligatures`
16261 ---|`comment`
16262 ---|`anchors`
16263 ---|`altuni`
16264 ---|`tex_height`
16265 ---|`tex_depth`
16266 ---|`is_extended_shape`
16267 ---|`italic_correction`
16268 ---|`top_accent`
16269 ---|`vert_variants`
16270 ---|`horiz_variants`
16271 ---|`mathkern`
16272
16273 ---
16274 ------__Example:__
16275 ---
16276 ---```lua
16277 ---local f = fontloader.open('/usr/share/fonts/opentype/urw-base35/NimbusRoman-Regular.otf')
16278 ---for _, value in ipairs(fontloader.fields(f.glyphs[1])) do
16279 --- print(value, f[value])
16280 ---end
16281 ---```---
16282 ---
16283 ---__Reference:__
16284 ---
16285 ---* Corresponding C source code: [luafflib.c#L2491-L2511](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2491-L2511)
16286 ---
16287 ---@param glyph FontloaderGlyph
16288 ---
16289 ---@return FontloaderGlyphField[] fields
16290 ---
16291 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16292 function fontloader.fields(glyph) end
16293
16294 ---
16295 ---__Example:__
16296 ---
16297 ---```lua
16298 ---local f = fontloader.open('/usr/share/fonts/opentype/urw-base35/NimbusRoman-Regular.otf')
16299 ---
16300 ---for _, value in ipairs(fontloader.fields(f)) do
16301 --- print(value, f[value])
16302 ---end
16303 ---```
16304 ---
16305 ---__Reference:__
16306 ---
16307 ---* Corresponding C source code: [luafflib.c#L1899-2241](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1899-2241)
16308 ---
16309 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16310 ---@class FontloaderFont
16311 ---@field table_version string # Indicates the metrics version (currently `0.3`), for example `0.5`; Corresponding C source code: [luafflib.c#L2772-L2774](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2772-L2774).
16312 ---@field fontname string # The *PostScript* font name, for example `NimbusRoman-Regular`; Corresponding C source code: [luafflib.c#L2775-L2777](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2775-L2777).
16313 ---@field fullname string # The official (human-oriented) font name, for example `Nimbus Roman Regular`; Corresponding C source code: [luafflib.c#L2778-L2780](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2778-L2780).
16314 ---@field familyname string # The family name, for example `Nimbus Roman`; Corresponding C source code: [luafflib.c#L2781-L2783](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2781-L2783).
16315 ---@field weight string # The weight indicator, for example `Regular`; Corresponding C source code: [luafflib.c#L2784-L2786](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2784-L2786).
16316 ---@field copyright string # The copyright information, for example `Copyright (URW)++,Copyright 2014 by (URW)++ Design & Development`; Corresponding C source code: [luafflib.c#L2787-L2789](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2787-L2789).
16317 ---@field filename string # The file name; Corresponding C source code: [luafflib.c#L2790-L2792](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2790-L2792).
16318 ---@field version string # The font version; Corresponding C source code: [luafflib.c#L2793-L2795](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2793-L2795).
16319 ---@field italicangle integer # The slant angle; Corresponding C source code: [luafflib.c#L2796-L2798](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2796-L2798)
16320 ---@field units_per_em integer # `1000` for *PostScript*-based fonts, usually `2048` for *TrueType*; Corresponding C source code: [luafflib.c#L2827-L2829](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2827-L2829).
16321 ---@field ascent integer # The height of ascender in `units_per_em`; Corresponding C source code: [luafflib.c#L2805-L2807](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2805-L2807).
16322 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2808-L2810
16323 ---@field descent integer # The depth of descender in `units_per_em`; Corresponding C source code: [luafflib.c#L2808-L2810](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2808-L2810).
16324 ---@field upos integer # Corresponding C source code: [luafflib.c#L2799-L2801](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2799-L2801)
16325 ---@field uwidth integer # Corresponding C source code: [luafflib.c#L2802-L2804](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2802-L2804)
16326 ---@field uniqueid integer # Corresponding C source code: [luafflib.c#L2811-L2813](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2811-L2813)
16327 ---@field glyphs FontloaderGlyph[] # The `glyphs` is an array containing the per-character information (quite a few of these are only present if non-zero); Corresponding C source code: [luafflib.c#L2838-L2845](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2838-L2845).
16328 ---@field glyphcnt integer # The number of included glyphs; Corresponding C source code: [luafflib.c#L2814-L2820](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2814-L2820).
16329 ---@field glyphmax integer # The maximum used index the glyphs array; Corresponding C source code: [luafflib.c#L2821-L2823](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2821-L2823).
16330 ---@field glyphmin integer # The minimum used index the glyphs array; Corresponding C source code: [luafflib.c#L2824-L2826](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2824-L2826).
16331 ---@field notdef_loc integer # The location of the `.notdef` glyph or `-1` when not present, for example `0`, `-1`, `854`; Corresponding C source code: [luafflib.c#L1920](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1920).
16332 ---@field hasvmetrics integer # Corresponding C source code: [luafflib.c#L2846-L2848](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2846-L2848).
16333 ---@field onlybitmaps integer # Corresponding C source code: [luafflib.c#L2849-L2851](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2849-L2851).
16334 ---@field serifcheck integer # Corresponding C source code: [luafflib.c#L2852-L2854](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2852-L2854).
16335 ---@field isserif integer # Corresponding C source code: [luafflib.c#L2855-L2857](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2855-L2857).
16336 ---@field issans integer # Corresponding C source code: [luafflib.c#L2858-L2860](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2858-L2860).
16337 ---@field encodingchanged integer # Corresponding C source code: [luafflib.c#L2861-L2863](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2861-L2863).
16338 ---@field strokedfont integer # Corresponding C source code: [luafflib.c#L2864-L2866](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2864-L2866).
16339 ---@field use_typo_metrics integer # Corresponding C source code: [luafflib.c#L2867-L2869](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2867-L2869).
16340 ---@field weight_width_slope_only integer # Corresponding C source code: [luafflib.c#L2870-L2872](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2870-L2872).
16341 ---@field head_optimized_for_cleartype integer # Corresponding C source code: [luafflib.c#L2873-L2875](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2873-L2875).
16342 ---@field uni_interp `unset`|`none`|`adobe`|`greek`|`japanese`|`trad_chinese`|`simp_chinese`|`korean`|`ams` # for example `none`; Corresponding C source code: [luafflib.c#L2876-L2878](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2876-L2878).
16343 ---@field origname string # The file name, as supplied by the user; Corresponding C source code: [luafflib.c#L2887-L2889](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2887-L2889).
16344 ---@field map FontloaderMap # Corresponding C source code: [luafflib.c#L2879-L2886](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2879-L2886).
16345 ---@field public private FontloaderPrivate # Corresponding C source code: [luafflib.c#L2890-L2897](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2890-L2897).
16346 ---@field xuid string # `[1021 618 1197637146 7437765]`; Corresponding C source code: [luafflib.c#L2041](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2041).
16347 ---@field pfminfo FontloaderPfminfo # Corresponding C source code: [luafflib.c#L2901-L2904](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2901-L2904).
16348 ---@field names FontloaderLangName # Corresponding C source code: [luafflib.c#L2905-L2912](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2905-L2912)
16349 ---@field cidinfo FontloaderCidinfo # Corresponding C source code: [luafflib.c#L2913-L2919](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2913-L2919).
16350 ---
16351 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2920-L2930
16352 ---@field subfonts? table
16353 ---
16354 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2931-L2933
16355 ---@field commments? string #
16356 ---
16357 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2934-L2936
16358 ---@field fontlog? string #
16359 ---
16360 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2937-L2947
16361 ---@field cvt_names? table #
16362 ---
16363 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2979-L2986
16364 ---@field anchor_classes FontloaderAnchorClasses #
16365 ---
16366 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2948-L2955
16367 ---@field ttf_tables? FontloaderTtfTables #
16368 ---
16369 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2956-L2963
16370 ---@field ttf_tab_saved? FontloaderTtfTables #
16371 ---
16372 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2964-L2978
16373 ---@field texdata? FontloaderTexdata #
16374 ---
16375 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2987-L2994
16376 ---@field kerns? FontloaderGlyph[] #
16377 ---
16378 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2995-L3002
16379 ---@field vkerns? FontloaderGlyph[] #
16380 ---
16381 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2830-L2837
16382 ---@field lookups FontloaderLockup #
16383 ---
16384 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3011-L3018
16385 ---@field gpos FontloaderGpos #
16386 ---
16387 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3019-L3026
16388 ---@field gsub? FontloaderGsub #
16389 ---
16390 ---@field features? unknown
16391 ---
16392 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3019-L3026
16393 ---@field mm? FontloaderMm #
16394 ---
16395 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3027-L3029
16396 ---@field chosenname? string #
16397 ---
16398 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3030-L3032
16399 ---@field macstyle integer # for example `-1`.
16400 ---
16401 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3033-L3035
16402 ---@field fondname? string #
16403 ---
16404 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3036-L3038
16405 ---@field design_size integer # for example `0`.
16406 ---
16407 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3039-L3041
16408 ---@field fontstyle_id integer # for example `0`.
16409 ---
16410 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3042-L3049
16411 ---@field fontstyle_name? table #
16412 ---
16413 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2155
16414 ---@field design_range_bottom integer # for example `0`.
16415 ---
16416 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3053-L3055
16417 ---@field design_range_top integer # for example `0`.
16418 ---
16419 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3056-L3058
16420 ---@field strokewidth integer # for example `0`.
16421 ---
16422 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L3059-L3072
16423 ---@field mark_classes? FontloaderMarkClasses|nil #
16424 ---
16425 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2171
16426 ---@field creationtime integer # for example `1495029639`.
16427 ---
16428 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2172
16429 ---@field modificationtime integer # for example `1495029639`.
16430 ---
16431 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2174
16432 ---@field os2_version integer # for example `3`.
16433 ---
16434 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1705-L1764
16435 ---@field math? FontloaderMath #
16436 ---
16437 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2228
16438 ---@field validation_state? FontloaderValidationState #
16439 ---
16440 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2234
16441 ---@field horiz_base? FontloaderHorizVertBase #
16442 ---
16443 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2239
16444 ---@field vert_base? FontloaderHorizVertBase #
16445 ---
16446 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2241
16447 ---@field extrema_bound integer # for example `0`.
16448 ---
16449 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1931-L1939
16450 ---@field truetype integer # signals a *TrueType* font
16451
16452 ---
16453 ---__Reference:__
16454 ---
16455 ---* Corresponding C source code: [luafflib.c#L959-L1120](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L959-L1120)
16456 ---
16457 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16458 ---@class FontloaderGlyph
16459 ---@field name string # The glyph name, for example `space`.
16460 ---@field unicode integer # The unicode code point, or -1 , for example `32`.
16461 ---@field boundingbox integer[] Array of four numbers, for example `{ 0, 0, 0, 0 }`.
16462 ---@field width integer # Only for horizontal fonts
16463 ---@field vwidth integer # Only for vertical fonts
16464 ---@field tsidebearing integer # Only for vertical ttf/otf fonts, and only if non-zero
16465 ---@field lsidebearing integer # Only if non-zero and not equal to boundingbox[1]
16466 ---@field class string # one of "none", "base", "ligature", "mark", "component" (if not present, the glyph class is “automatic”)
16467 ---@field kerns FontloaderGlyphKern[] only for horizontal fonts, if set
16468 ---@field vkerns table only for vertical fonts, if set
16469 ---@field dependents string[] linear array of glyph name strings, only if nonempty
16470 ---@field lookups table # only if nonempty
16471 ---@field ligatures table # only if nonempty
16472 ---@field anchors table # only if set
16473 ---@field comment string # only if set
16474 ---@field tex_height integer # only if set
16475 ---@field tex_depth integer # only if set
16476 ---@field italic_correction integer # only if set
16477 ---@field top_accent integer # only if set
16478 ---@field is_extended_shape integer # only if this character is part of a math extension list
16479 ---@field altuni table # alternate *Unicode* items
16480 ---@field vert_variants FontloaderVertHorizVariants #
16481 ---@field horiz_variants FontloaderVertHorizVariants #
16482 ---@field mathkern FontloaderMathkern #
16483
16484 ---
16485 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16486 ---@class FontloaderGlyphKern
16487 ---@field char string # for example `afii10065`.
16488 ---@field lookup string # for example `pp_l_0_s`.
16489 ---@field off integer # for example `7`.
16490
16491 ---
16492 ---The top-level map is a list of encoding mappings. Each of those is a table
16493 ---itself.
16494 ---
16495 ---__Reference:__
16496 ---
16497 ---* Corresponding C source code: [luafflib.c#L1346-L1404](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1346-L1404)
16498 ---
16499 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16500 ---@class FontloaderMap
16501 ---@field enccount integer # for example `65537`
16502 ---@field encmax integer # for example `65537`
16503 ---@field backmax integer # for example `855`
16504 ---@field remap FontloaderRemap #
16505 ---@field map table<integer, integer> # non-linear array of mappings, for example `{ [32] = 1, [33] = 2, [34] = 3 }`
16506 ---@field backmap integer[] # non-linear array of backward mappings, for example `{ 32, 33, 34, 35, 36, 37, 38, 8217 }`
16507 ---@field enc FontloaderEnc #
16508
16509 ---
16510 ---__Reference:__
16511 ---
16512 ---* Corresponding C source code: [luafflib.c#L1353-L1359](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1353-L1359)
16513 ---
16514 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16515 ---@class FontloaderRemap
16516 ---@field firstenc integer #
16517 ---@field lastenc integer #
16518 ---@field infont integer #
16519
16520 ---
16521 ---__Reference:__
16522 ---
16523 ---* Corresponding C source code: [luafflib.c#L1284-L1336](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1284-L1336)
16524 ---
16525 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16526 ---@class FontloaderEnc
16527 ---@field enc_name string #
16528 ---@field char_cnt integer #
16529 ---@field char_max integer #
16530 ---@field unicode integer[] # array of *Unicode* position numbers
16531 ---@field psnames string[] # array of *PostScript* glyph names
16532 ---@field builtin integer #
16533 ---@field hidden integer #
16534 ---@field only_1byte integer #
16535 ---@field has_1byte integer #
16536 ---@field has_2byte integer #
16537 ---@field is_unicodebmp integer # only if non-zero
16538 ---@field is_unicodefull integer # only if non-zero
16539 ---@field is_custom integer # only if non-zero
16540 ---@field is_original integer # only if non-zero
16541 ---@field is_compact integer # only if non-zero
16542 ---@field is_japanese integer # only if non-zero
16543 ---@field is_korean integer # only if non-zero
16544 ---@field is_tradchinese integer # only if non-zero [name?]
16545 ---@field is_simplechinese integer # only if non-zero
16546 ---@field low_page integer #
16547 ---@field high_page integer #
16548 ---@field iconv_name string #
16549 ---@field iso_2022_escape string #
16550
16551 ---
16552 ---This is the font's private *PostScript* dictionary, if any. Keys and values are
16553 ---both strings.
16554 ---
16555 ---__Reference:__
16556 ---
16557 ---* Corresponding C source code: [luafflib.c#L2035-L2039](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2035-L2039)
16558 ---
16559 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16560 ---@alias FontloaderPrivate string<string, string>
16561
16562 ---
16563 ---CID fonts (Character Identifier Fonts) were developed by Adobe to
16564 ---display Asian font formats with many different symbols. In CID fonts,
16565 ---CIDs (Character Identifiers) are used to address glyph descriptions
16566 ---within the font. A so-called CMap (Character Map) is used to
16567 ---establish correspondences between the CIDs and the character codes.
16568 ---
16569 ---__Reference:__
16570 ---
16571 ---* Corresponding C source code: [luafflib.c#L2053-L2058](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2053-L2058)
16572 ---* https://www.compart.com/de/glossar/cid-fonts
16573 ---
16574 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16575 ---@class FontloaderCidinfo
16576 ---@field registry string #
16577 ---@field ordering string #
16578 ---@field supplement integer # For example `0`.
16579 ---@field version number # For example `0`.
16580
16581 ---
16582 ---The `pfminfo` table contains most of the OS/2 information.
16583 ---
16584 ---PFM stands for PostScript Font Metrics and is the suffix of a file
16585 ---associated with a PostScript Type 1 font. The PFM file contains
16586 ---metric data such as kerning values.
16587 ---
16588 ---__Reference:__
16589 ---
16590 ---* Corresponding C source code: [luafflib.c#L1200-L1281](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1200-L1281)
16591 ---* https://www.typografie.info/3/wiki.html/p/pfm-r2/
16592 ---* https://github.com/fontforge/fontforge/blob/2d4ccf06b68ce1e31386cbfa5822d448378b6500/fontforge/splinefont.h#L1112-L1148
16593 ---
16594 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16595 ---@class FontloaderPfminfo
16596 ---@field pfmset integer # for example `0` or `1`.
16597 ---@field winascent_add integer # for example `0` or `1`.
16598 ---@field windescent_add integer # for example `0` or `1`.
16599 ---@field hheadascent_add integer # for example `0` or `1`.
16600 ---@field hheaddescent_add integer # for example `0` or `1`.
16601 ---@field typoascent_add integer # for example `0` or `1`.
16602 ---@field typodescent_add integer # for example `0` or `1`.
16603 ---@field subsuper_set integer # for example `0` or `1`.
16604 ---@field panose_set integer # for example `0` or `1`.
16605 ---@field hheadset integer # for example `0` or `1`.
16606 ---@field vheadset integer # for example `0` or `1`.
16607 ---@field pfmfamily integer # for example `17`, `65` or `81`.
16608 ---@field weight integer # for example `400`.
16609 ---@field width integer # for example `5`.
16610 ---@field avgwidth integer # for example `725`.
16611 ---@field firstchar integer # for example `32`.
16612 ---@field lastchar integer # for example `61440`.
16613 ---@field fstype integer # for example `0`.
16614 ---@field linegap integer # for example `0`.
16615 ---@field vlinegap integer # for example `0`.
16616 ---@field hhead_ascent integer # for example `870`.
16617 ---@field hhead_descent number # for example `-373`.
16618 ---@field os2_typoascent integer # The typographic ascender for this font. This field should be combined with the sTypoDescender and sTypoLineGap values to determine default line spacing. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#stypoascender
16619 ---@field os2_typodescent integer # The typographic descender for this font. This field should be combined with the sTypoAscender and sTypoLineGap values to determine default line spacing. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#stypodescender
16620 ---@field os2_typolinegap integer # The typographic line gap for this font. This field should be combined with the sTypoAscender and sTypoDescender values to determine default line spacing. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#stypolinegap
16621 ---@field os2_winascent integer # https://learn.microsoft.com/en-us/typography/opentype/spec/os2#uswinascent
16622 ---@field os2_windescent integer # https://learn.microsoft.com/en-us/typography/opentype/spec/os2#uswindescent
16623 ---@field os2_subxsize integer # The recommended horizontal size in font design units for subscripts for this font. Should be > 0. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysubscriptxsize
16624 ---@field os2_subysize integer # The recommended vertical size in font design units for subscripts for this font. Should be > 0. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysubscriptysize
16625 ---@field os2_subxoff integer # The recommended horizontal offset in font design units for subscripts for this font. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysubscriptxoffset
16626 ---@field os2_subyoff integer # The recommended vertical offset in font design units from the baseline for subscripts for this font. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysubscriptyoffset
16627 ---@field os2_supxsize integer # The recommended horizontal size in font design units for superscripts for this font. Should be > 0. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysuperscriptxsize
16628 ---@field os2_supysize integer # The recommended vertical size in font design units for superscripts for this font. Should be > 0. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysuperscriptysize
16629 ---@field os2_supxoff integer # The recommended horizontal offset in font design units for superscripts for this font. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysuperscriptxoffset
16630 ---@field os2_supyoff integer # The recommended vertical offset in font design units from the baseline for superscripts for this font. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ysuperscriptyoffset
16631 ---@field os2_strikeysize integer # Thickness of the strikeout stroke in font design units. Should be > 0. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ystrikeoutsize
16632 ---@field os2_strikeypos integer # The position of the top of the strikeout stroke relative to the baseline in font design units. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ystrikeoutposition
16633 ---@field os2_family_class integer # This field provides a classification of font-family design. # https://learn.microsoft.com/en-us/typography/opentype/spec/os2#sfamilyclass
16634 ---@field os2_xheight integer # The height of lower case letters such as “x”
16635 ---@field os2_capheight integer # This metric specifies the distance between the baseline and the approximate height of uppercase letters measured in font design units. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#scapheight
16636 ---@field os2_defaultchar integer # This is the Unicode code point, in UTF-16 encoding, of a character that can be used for a default glyph if a requested character is not supported in the font. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#scapheight
16637 ---@field os2_breakchar integer # This is the Unicode code point, in UTF-16 encoding, of a character that can be used as a default break character. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#usbreakchar
16638 ---@field os2_vendor string # The four character identifier for the vendor of the given typeface. https://learn.microsoft.com/en-us/typography/opentype/spec/os2#achvendid
16639 ---@field codepages table # A two-number array of encoded code pages
16640 ---@field unicoderages table # A four-number array of encoded unicode ranges
16641 ---@field panose table #
16642
16643 ---
16644 ---__Reference:__
16645 ---
16646 ---* Corresponding C source code: [luafflib.c#L1222-L1232](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1222-L1232)
16647 ---* https://learn.microsoft.com/en-us/typography/opentype/spec/os2#panose
16648 ---* https://monotype.github.io/panose/pan1.htm
16649 ---* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6OS2.html
16650 ---* https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/manual/luatex-fontloader.tex#L694-715
16651 ---* https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-panose
16652 ---
16653 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16654 ---@class FontloaderPanose
16655 ---@field familytype `Any`|`No Fit`|`Text and Display`|`Script`|`Decorative`|`Pictorial` # Values as in the *OpenType* font specification, for example `Text and Display`; Corresponding C source code: [luafflib.c#L1122-1124](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1122-1124).
16656 ---@field serifstyle `Any`|`No Fit`|`Cove`|`Obtuse Cove`|`Square Cove`|`Obtuse Square Cove`|`Square`|`Thin`|`Bone`|`Exaggerated`|`Triangle`|`Normal Sans`|`Obtuse Sans`|`Perp Sans`|`Flared`|`Rounded` # See the *OpenType* font specification for values, for example `Normal Sans`; Corresponding C source code: [luafflib.c#L1126-1131](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1126-1131).
16657 ---@field weight `Any`|`No Fit`|`Very Light`|`Light`|`Thin`|`Book`|`Medium`|`Demi`|`Bold`|`Heavy`|`Black`|`Nord` # For example `Medium`; Corresponding C source code: [luafflib.c#L1133-1136](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1133-1136).
16658 ---@field proportion `Any`|`No Fit`|`Old Style`|`Modern`|`Even Width`|`Expanded`|`Condensed`|`Very Expanded`|`Very Condensed`|`Monospaced` # Values as in the *OpenType* font specification, for example `Monospaced`; Corresponding C source code: [luafflib.c#L1138-1141](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1138-1141).
16659 ---@field contrast `Any`|`No Fit`|`None`|`Very Low`|`Low`|`Medium Low`|`Medium`|`Medium High`|`High`|`Very High` # Values as in the *OpenType* font specification, for example `Medium`; Corresponding C source code: [luafflib.c#L1143-1146](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1143-1146).
16660 ---@field strokevariation `Any`|`No Fit`|`Gradual/Diagonal`|`Gradual/Transitional`|`Gradual/Vertical`|`Gradual/Horizontal`|`Rapid/Vertical`|`Rapid/Horizontal`|`Instant/Vertical` # Values as in the *OpenType* font specification, for example `No Fit`; Corresponding C source code: [luafflib.c#L1148-1153](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1148-1153).
16661 ---@field armstyle `Any`|`No Fit`|`Straight Arms/Horizontal`|`Straight Arms/Wedge`|`Straight Arms/Vertical`|`Straight Arms/Single Serif`|`Straight Arms/Double Serif`|`Non-Straight Arms/Horizontal`|`Non-Straight Arms/Wedge`|`Non-Straight Arms/Vertical`|`Non-Straight Arms/Single Serif`|`Non-Straight Arms/Double Serif` # Values as in the *OpenType* font specification, for example `Straight Arms/Horizontal`; Corresponding C source code: [luafflib.c#L1155-1163](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1155-1163).
16662 ---@field letterform `Any`|`No Fit`|`Normal/Contact`|`Normal/Weighted`|`Normal/Boxed`|`Normal/Flattened`|`Normal/Rounded`|`Normal/Off Center`|`Normal/Square`|`Oblique/Contact`|`Oblique/Weighted`|`Oblique/Boxed`|`Oblique/Flattened`|`Oblique/Rounded`|`Oblique/Off Center`|`Oblique/Square` # Values as in the *OpenType* font specification, for example `Oblique/Weighted`; Corresponding C source code: [luafflib.c#L1165-1172](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1165-1172).
16663 ---@field midline `Any`|`No Fit`|`Standard/Trimmed`|`Standard/Pointed`|`Standard/Serifed`|`High/Trimmed`|`High/Pointed`|`High/Serifed`|`Constant/Trimmed`|`Constant/Pointed`|`Constant/Serifed`|`Low/Trimmed`|`Low/Pointed`|`Low/Serifed` # Values as in the *OpenType* font specification, for example `Standard/Pointed`; Corresponding C source code: [luafflib.c#L1174-1180](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1174-1180).
16664 ---@field xheight `Any`|`No Fit`|`Constant/Small`|`Constant/Standard`|`Constant/Large`|`Ducking/Small`|`Ducking/Standard`|`Ducking/Large` # Values as in the *OpenType* font specification, for example `Constant/Small`; Corresponding C source code: [luafflib.c#L1182-1185](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/a4b8e13d3879e95c21e1719af0c3e31722bedd4f/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1182-1185).
16665 ---
16666
16667 ---
16668 ---__Reference:__
16669 ---
16670 ---* Corresponding C source code: [luafflib.c#L1418-L1416](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1418-L1416)
16671 ---
16672 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16673 ---@class FontloaderLangName
16674 ---@field lang string # The language for this entry, for example `Basque`, `Spanish Mexico`, `Portuguese (Brasil)`, `Spanish (Modern)`, `French Canadian` or `English (US)`
16675 ---@field names FontloaderTrueTypeNames # The `names` keys are the actual *TrueType* name strings.
16676
16677 ---
16678 ---__Reference:__
16679 ---
16680 ---* Corresponding C source code: [luafflib.c#L108-L115](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L108-L115)
16681 ---
16682 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16683 ---@class FontloaderTrueTypeNames
16684 ---@field copyright string # for example `Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. DejaVu changes are in public domain, math extensions are in public domain.`.
16685 ---@field family string # for example `DejaVu Math TeX Gyre`.
16686 ---@field subfamily string # for example `Bold`.
16687 ---@field uniqueid string # for example `Monotype:Arial Bold:Version 2.82 (Microsoft)`.
16688 ---@field fullname string # for example `DejaVuMathTeXGyre-Regular`.
16689 ---@field version string # for example `Version 2.82`.
16690 ---@field postscriptname string # for example `Arial-BoldMT`.
16691 ---@field trademark string # for example `Arial® Trademark of The Monotype Corporation plc registered in the US Pat & TM Off. and elsewhere.`.
16692 ---@field manufacturer string # for example `Monotype Typography`.
16693 ---@field designer string # for example `Monotype Type Drawing Office - Robin Nicholas, Patricia Saunders 1982`.
16694 ---@field descriptor string # for example `Contemporary sans serif design, Arial contains ...`.
16695 ---@field venderurl string # for example `http://www.monotype.com/html/mtname/ms_arial.html`.
16696 ---@field designerurl string # for example `http://www.monotype.com/html/mtname/ms_welcome.html`.
16697 ---@field license string # for example `NOTIFICATION OF LICENSE AGREEMENT\r\n\r\nThis typeface is the property of Monotype Typography and its use by you is covered under the terms of a license agreement. ...`.
16698 ---@field licenseurl string # for example `http://dejavu-fonts.org/wiki/License`.
16699 ---@field idontknow string
16700 ---@field preffamilyname string # for example `JetBrains Mono NL`.
16701 ---@field prefmodifiers string # for example `65 Bold` or `Light Italic` or `SemiCondensed SemiBold`.
16702 ---@field compatfull string # for example `Noto Looped Lao ExtraCondensed SemiBold`.
16703 ---@field sampletext string # for example `How razorback-jumping frogs can level six piqued gymnasts!`.
16704 ---@field cidfindfontname string # for example `Vemana2000`.
16705 ---@field wwsfamily string
16706 ---@field wwssubfamily string # for example ``.
16707
16708 ---
16709 ---__Reference:__
16710 ---
16711 ---* Corresponding C source code: [luafflib.c#L1448-L1452](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1448-L1452)
16712 ---
16713 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16714 ---@class FontloaderAnchorClasses
16715 ---@field name string # a descriptive id of this anchor class
16716 ---@field lookup string #
16717 ---@field type `mark`|`mkmk`|`curs`|`mklg` # type is actually a lookup subtype, not a feature name. Officially, these strings should be gpos_mark2mark etc.
16718
16719 ---
16720 ---__Reference:__
16721 ---
16722 ---* Corresponding C source code: [luafflib.c#L580-L643](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L580-L643)
16723 ---
16724 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16725 ---@class FontloaderGposSub
16726 ---@field flags FontloaderGposFlags #
16727 ---@field name string #
16728 ---@field features FontloaderGposFeatures
16729 ---@field subtables FontloaderGposSubtables
16730
16731 ---
16732 ---The `gpos` table has one array entry for each lookup. (The `gpos_`
16733 ---prefix is somewhat redundant.)
16734 ---
16735 ---__Reference:__
16736 ---
16737 ---* Corresponding C source code: [luafflib.c#L74-L76](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L74-L76)
16738 ---
16739 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16740 ---@class FontloaderGpos: FontloaderGposSub
16741 ---@field type `gpos_single`|`gpos_pair`|`gpos_cursive`|`gpos_mark2base`|`gpos_mark2ligature`|`gpos_mark2mark`|`gpos_context`|`gpos_contextchain`
16742
16743 ---
16744 ---The flags table has a true value for each of the lookup flags that is actually
16745 ---set:
16746 ---
16747 ---__Reference:__
16748 ---
16749 ---* Corresponding C source code: [luafflib.c#L587-L612](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L587-L612)
16750 ---
16751 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16752 ---@class FontloaderGposFlags
16753 ---@field r2l boolean #
16754 ---@field ignorebaseglyphs boolean #
16755 ---@field ignoreligatures boolean #
16756 ---@field ignorecombiningmarks boolean #
16757 ---@field mark_class string #
16758 ---
16759
16760 ---
16761 ---The features subtable items of gpos have
16762 ---
16763 ---__Reference:__
16764 ---
16765 ---* Corresponding C source code: [luafflib.c#L523-L531](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L523-L531)
16766 ---
16767 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16768 ---@class FontloaderGposFeatures
16769 ---@field tag string #
16770 ---@field scripts FontloaderGposFeaturesScripts #
16771
16772 ---
16773 ---The scripts table within features has:
16774 ---
16775 ---__Reference:__
16776 ---
16777 ---* Corresponding C source code: [luafflib.c#L492-L515](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L492-L515)
16778 ---
16779 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16780 ---@class FontloaderGposFeaturesScripts
16781 ---@field script string #
16782 ---@field langs string[]
16783 ---
16784
16785 ---
16786 ---The subtables table has:
16787 ---
16788 ---__Reference:__
16789 ---
16790 ---* Corresponding C source code: [luafflib.c#L541-L572](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L541-L572)
16791 ---
16792 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16793 ---@class FontloaderGposSubtables
16794 ---@field name string #
16795 ---@field suffix string # (only if used) % used by gpos_single to get a default
16796 ---@field anchor_classes number # (only if used)
16797 ---@field vertical_kerning number # (only if used)
16798 ---@field kernclass FontloaderGposSubtablesKernclass # (only if used)
16799 ---
16800
16801 ---
16802 ---Note: the kernclass (as far as we can see) always has one entry so it could be one level
16803 ---deep instead. Also the seconds start at `[2]` which is close to the fontforge
16804 ---internals so we keep that too.
16805 ---
16806 ---__Reference:__
16807 ---
16808 ---* Corresponding C source code: [luafflib.c#L1469-L1518](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1469-L1518)
16809 ---
16810 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16811 ---@class FontloaderGposSubtablesKernclass
16812 ---@field firsts string[]
16813 ---@field seconds string[]
16814 ---@field lookup string # or an array of associated lookup(s)
16815 ---@field offsets integer[]
16816
16817 ---
16818 ---This has identical layout to the `gpos` table, except for the
16819 ---type:
16820 ---
16821 ---__Reference:__
16822 ---
16823 ---* Corresponding C source code: [luafflib.c#L56-L58](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L56-L58)
16824 ---
16825 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16826 ---@class FontloaderGsub: FontloaderGposSub
16827 ---@field type `gsub_single`|`gsub_multiple`|`gsub_alternate`|`gsub_ligature`|`gsub_context`|`gsub_contextchain`|`gsub_reversecontextchain`
16828 ---
16829
16830 ---
16831 ---__Reference:__
16832 ---
16833 ---* Corresponding C source code: [luafflib.c#L1454-L1461](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1454-L1461)
16834 ---
16835 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16836 ---@class FontloaderTtfTables
16837 ---@field tag string #
16838 ---@field len integer #
16839 ---@field maxlen integer #
16840 ---@field data integer #
16841
16842 ---
16843 ---__Reference:__
16844 ---
16845 ---* Corresponding C source code: [luafflib.c#L1841-L1898](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1841-L1898)
16846 ---
16847 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16848 ---@class FontloaderMm
16849 ---@field axes table # array of axis names
16850 ---@field instance_count integer #
16851 ---@field positions table # array of instance positions (\#axes * instances )
16852 ---@field defweights table # array of default weights for instances
16853 ---@field cdv string #
16854 ---@field ndv string #
16855 ---@field axismaps table #
16856
16857 ---
16858 ---__Reference:__
16859 ---
16860 ---* Corresponding C source code: [luafflib.c#L1820-L1839](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1820-L1839)
16861 ---
16862 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16863 ---@class FontloaderAxismaps
16864 ---@field blends table # an array of blend points
16865 ---@field designs table # an array of design values
16866 ---@field min integer #
16867 ---@field def integer #
16868 ---@field max integer #
16869
16870 ---
16871 ---The keys in this table are mark class names, and the values are a
16872 ---space-separated string of glyph names in this class.
16873 ---
16874 ---__Reference:__
16875 ---
16876 ---* Corresponding C source code: [luafflib.c#L2159-L2169](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2159-L2169)
16877 ---
16878 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16879 ---@alias FontloaderMarkClasses string<string, string>
16880
16881 ---
16882 ---The math table has the variables that are also discussed in the chapter about
16883 ---math
16884 ---
16885 ---__Reference:__
16886 ---
16887 ---* Corresponding C source code: [luafflib.c#L1706-L1767](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1706-L1767)
16888 ---
16889 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16890 ---@class FontloaderMath
16891 ---@field ScriptPercentScaleDown integer
16892 ---@field ScriptScriptPercentScaleDown integer
16893 ---@field DelimitedSubFormulaMinHeight integer
16894 ---@field DisplayOperatorMinHeight integer
16895 ---@field MathLeading integer
16896 ---@field AxisHeight integer
16897 ---@field AccentBaseHeight integer
16898 ---@field FlattenedAccentBaseHeight integer
16899 ---@field SubscriptShiftDown integer
16900 ---@field SubscriptTopMax integer
16901 ---@field SubscriptBaselineDropMin integer
16902 ---@field SuperscriptShiftUp integer
16903 ---@field SuperscriptShiftUpCramped integer
16904 ---@field SuperscriptBottomMin integer
16905 ---@field SuperscriptBaselineDropMax integer
16906 ---@field SubSuperscriptGapMin integer
16907 ---@field SuperscriptBottomMaxWithSubscript integer
16908 ---@field SpaceAfterScript integer
16909 ---@field UpperLimitGapMin integer
16910 ---@field UpperLimitBaselineRiseMin integer
16911 ---@field LowerLimitGapMin integer
16912 ---@field LowerLimitBaselineDropMin integer
16913 ---@field StackTopShiftUp integer
16914 ---@field StackTopDisplayStyleShiftUp integer
16915 ---@field StackBottomShiftDown integer
16916 ---@field StackBottomDisplayStyleShiftDown integer
16917 ---@field StackGapMin integer
16918 ---@field StackDisplayStyleGapMin integer
16919 ---@field StretchStackTopShiftUp integer
16920 ---@field StretchStackBottomShiftDown integer
16921 ---@field StretchStackGapAboveMin integer
16922 ---@field StretchStackGapBelowMin integer
16923 ---@field FractionNumeratorShiftUp integer
16924 ---@field FractionNumeratorDisplayStyleShiftUp integer
16925 ---@field FractionDenominatorShiftDown integer
16926 ---@field FractionDenominatorDisplayStyleShiftDown integer
16927 ---@field FractionNumeratorGapMin integer
16928 ---@field FractionNumeratorDisplayStyleGapMin integer
16929 ---@field FractionRuleThickness integer
16930 ---@field FractionDenominatorGapMin integer
16931 ---@field FractionDenominatorDisplayStyleGapMin integer
16932 ---@field SkewedFractionHorizontalGap integer
16933 ---@field SkewedFractionVerticalGap integer
16934 ---@field OverbarVerticalGap integer
16935 ---@field OverbarRuleThickness integer
16936 ---@field OverbarExtraAscender integer
16937 ---@field UnderbarVerticalGap integer
16938 ---@field UnderbarRuleThickness integer
16939 ---@field UnderbarExtraDescender integer
16940 ---@field RadicalVerticalGap integer
16941 ---@field RadicalDisplayStyleVerticalGap integer
16942 ---@field RadicalRuleThickness integer
16943 ---@field RadicalExtraAscender integer
16944 ---@field RadicalKernBeforeDegree integer
16945 ---@field RadicalKernAfterDegree integer
16946 ---@field RadicalDegreeBottomRaisePercent integer
16947 ---@field MinConnectorOverlap integer
16948 ---@field FractionDelimiterSize integer
16949 ---@field FractionDelimiterDisplayStyleSize integer
16950
16951 ---
16952 ---__Reference:__
16953 ---
16954 ---* Corresponding C source code: [luafflib.c#L2183-L2229](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2183-L2229)
16955 ---
16956 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16957 ---@class FontloaderValidationState
16958 ---@field bad_ps_fontname string
16959 ---@field bad_glyph_table table
16960 ---@field bad_cff_table table
16961 ---@field bad_metrics_table table
16962 ---@field bad_cmap_table table
16963 ---@field bad_bitmaps_table table
16964 ---@field bad_gx_table table
16965 ---@field bad_ot_table table
16966 ---@field bad_os2_version any
16967 ---@field bad_sfnt_header any
16968
16969 ---
16970 ---__Reference:__
16971 ---
16972 ---* Corresponding C source code: [luafflib.c#L1785-L1818](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1785-L1818)
16973 ---
16974 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16975 ---@class FontloaderHorizVertBase
16976 ---@field tags table # an array of script list tags
16977 ---@field scripts FontloaderScripts #
16978
16979 ---
16980 ---__Reference:__
16981 ---
16982 ---* Corresponding C source code: [luafflib.c#L1785-L1818](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1785-L1818)
16983 ---
16984 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16985 ---@class FontloaderScripts
16986 ---@field baseline table #
16987 ---@field default_baseline number #
16988 ---@field lang FontloaderLang #
16989
16990 ---
16991 ---__Reference:__
16992 ---
16993 ---* Corresponding C source code: [luafflib.c#L1769-L1777](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1769-L1777)
16994 ---
16995 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
16996 ---@class FontloaderLang
16997 ---@field tag string # a script tag
16998 ---@field ascent number #
16999 ---@field descent number #
17000 ---@field features table # The `features` points to an array of tables with the same layout except that in those nested tables, the tag represents a language.
17001
17002 ---
17003 ---__Reference:__
17004 ---
17005 ---* Corresponding C source code: [luafflib.c#L692-L714](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L692-L714)
17006 ---
17007 ---An array of alternate *Unicode* values. Inside that array are hashes with:
17008 ---
17009 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17010 ---@class FontloaderAltuni
17011 ---@field unicode number # this glyph is also used for this unicode
17012 ---@field variant number # the alternative is driven by this unicode selector
17013
17014 ---
17015 ---__Reference:__
17016 ---
17017 ---* Corresponding C source code: [luafflib.c#L914-L930](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L914-L930)
17018 ---
17019 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17020 ---@class FontloaderVertHorizVariants
17021 ---@field variants string #
17022 ---@field italic_correction number #
17023 ---@field parts FontloaderParts[] # The `parts` table is an array of smaller tables.
17024
17025 ---
17026 ---__Reference:__
17027 ---
17028 ---* Corresponding C source code: [luafflib.c#L914-L930](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L914-L930)
17029 ---
17030 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17031 ---@class FontloaderParts
17032 ---@field component string #
17033 ---@field extender number #
17034 ---@field start number #
17035 ---@field end number #
17036 ---@field advance number #
17037
17038 ---
17039 ---__Reference:__
17040 ---
17041 ---* Corresponding C source code: [luafflib.c#L943-L957](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L943-L957)
17042 ---
17043 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17044 ---@class FontloaderMathkern
17045 ---@field top_right FontloaderMathkernSubtable #
17046 ---@field bottom_right FontloaderMathkernSubtable #
17047 ---@field top_left FontloaderMathkernSubtable #
17048 ---@field bottom_left FontloaderMathkernSubtable #
17049
17050 ---
17051 ---__Reference:__
17052 ---
17053 ---* Corresponding C source code: [luafflib.c#L932-L941](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L932-L941)
17054 ---
17055 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17056 ---@class FontloaderMathkernSubtable
17057 ---@field height number #
17058 ---@field kern number #
17059
17060 ---
17061 ---# `kerns`
17062 ---
17063 ---Substructure is identical to the per-glyph subtable.
17064
17065 ---
17066 ---# `vkerns`
17067 ---
17068 ---Substructure is identical to the per-glyph subtable.
17069
17070 ---
17071 ---__Reference:__
17072 ---
17073 ---* Corresponding C source code: [luafflib.c#L2096-L2107](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L2096-L2107)
17074 ---
17075 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17076 ---@class FontloaderTexdata
17077 ---@field type `unset`|`text`|`math`|`mathext`
17078 ---@field params table # 22 font numeric parameters
17079
17080 --
17081 ---Top-level `lookups` is quite different from the ones at character level.
17082 ---The keys in this hash are strings, the values the actual lookups, represented as
17083 ---dictionary tables.
17084 ---
17085 ---__Reference:__
17086 ---
17087 ---* Corresponding C source code: [luafflib.c#L1628-L1661](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1628-L1661)
17088 ---
17089 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17090 ---@class FontloaderLockup
17091 ---@field type string #
17092 ---@field format `glyphs`|`class`|`coverage`|`reversecoverage`
17093 ---@field tag string #
17094 ---@field current_class string[]
17095 ---@field before_class string[]
17096 ---@field after_class string[]
17097 ---@field rules FontloaderLockupRule[] # an array of rule items
17098
17099 ---
17100 ---Rule items have one common item and one specialized item:
17101 ---
17102 ---__Reference:__
17103 ---
17104 ---* Corresponding C source code: [luafflib.c#L1558-L1626](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1558-L1626)
17105 ---
17106 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17107 ---@class FontloaderLockupRule
17108 ---@field lookups string[] a linear array of lookup names
17109 ---@field glyphs FontloaderLockupGlyph[] only if the parent's format is `glyphs`
17110 ---@field class FontloaderLockupClass[] only if the parent's format is `class`
17111 ---@field coverage FontloaderLockupsCoverage[] only if the parent's format is `coverage`
17112 ---@field reversecoverage FontloaderLockupReverseCoverage[] only if the parent's format is `reversecoverage`
17113
17114 ---
17115 ---__Reference:__
17116 ---
17117 ---* Corresponding C source code: [luafflib.c#L1562-L1568](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1562-L1568)
17118 ---
17119 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17120 ---@class FontloaderLockupGlyph
17121 ---@field names string #
17122 ---@field back string #
17123 ---@field fore string #
17124
17125 ---
17126 ---__Reference:__
17127 ---
17128 ---* Corresponding C source code: [luafflib.c#L1570-L1580](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1570-L1580)
17129 ---
17130 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17131 ---@class FontloaderLockupClass
17132 ---@field before number[]
17133 ---@field after number[]
17134
17135 ---
17136 ---__Reference:__
17137 ---
17138 ---* Corresponding C source code: [luafflib.c#L1582-L1591](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1582-L1591)
17139 ---
17140 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17141 ---@class FontloaderLockupsCoverage
17142 ---@field current string[]
17143 ---@field before string[]
17144 ---@field after string[]
17145
17146 ---
17147 ---__Reference:__
17148 ---
17149 ---* Corresponding C source code: [luafflib.c#L1593-L1604](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c#L1593-L1604)
17150 ---
17151 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fontloader.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17152 ---@class FontloaderLockupReverseCoverage
17153 ---@field current string[]
17154 ---@field before string[]
17155 ---@field after string[]
17156 ---@field replacements string #
17157 ---
17158 ---# Binary input from files with `fio`
17159 ---
17160 ---There is a whole set of helpers for reading numbers and strings from a file:
17161 ---`fio.readcardinal1`, `fio.readcardinal2`, `fio.readcardinal3`, `fio.readcardinal4`, `fio.readcardinaltable`, `fio.readinteger1`, `fio.readinteger2`,
17162 ---`fio.readinteger3`, `fio.readinteger4`, `fio.readintegertable`, `fio.readfixed2`, `fio.readfixed4`,
17163 ---`fio.read2dot14`, `fio.setposition`, `fio.getposition`, `fio.skipposition`, `fio.readbytes`, `fio.readbytetable`. They work on normal *Lua* file handles.
17164 ---
17165 ---This library provides a set of functions for reading numbers from a file and
17166 ---in addition to the regular `io` library functions.
17167 ---
17168 ---| | |
17169 ---|----------------------------|-------------------------------------|
17170 ---| `readcardinal1(f)` | a 1 byte unsigned integer |
17171 ---| `readcardinal2(f)` | a 2 byte unsigned integer |
17172 ---| `readcardinal3(f)` | a 3 byte unsigned integer |
17173 ---| `readcardinal4(f)` | a 4 byte unsigned integer |
17174 ---| `readcardinaltable(f,n,b)` | `n` cardinals of `b` bytes |
17175 ---| `readinteger1(f)` | a 1 byte signed integer |
17176 ---| `readinteger2(f)` | a 2 byte signed integer |
17177 ---| `readinteger3(f)` | a 3 byte signed integer |
17178 ---| `readinteger4(f)` | a 4 byte signed integer |
17179 ---| `readintegertable(f,n,b)` | `n` integers of `b` bytes |
17180 ---| `readfixed2(f)` | a 2 byte float (used in font files) |
17181 ---| `readfixed4(f)` | a 4 byte float (used in font files) |
17182 ---| `read2dot14(f)` | a 2 byte float (used in font files) |
17183 ---| `setposition(f,p)` | goto position `p` |
17184 ---| `getposition(f)` | get the current position |
17185 ---| `skipposition(f,n)` | skip `n` positions |
17186 ---| `readbytes(f,n)` | `n` bytes |
17187 ---| `readbytetable(f,n)` | `n` bytes |
17188 ---
17189 ---There are eight additional little endian variants for the `cardinal[1-4]`
17190 ---and `integer[1-4]` readers: `cardinal[1-4]le` and `integer[1-4]le`.
17191 ---
17192 --- https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c
17193 ---
17194 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17195 fio = {}
17196
17197 ---
17198 ---__Reference:__
17199 ---
17200 ---* Corresponding C source code: [liolibext.c#L114-L122](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L114-L122)
17201 ---
17202 ---@param f file* # A file handle.
17203 ---
17204 ---@return integer # a 1 byte unsigned integer
17205 ---
17206 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17207 function fio.readcardinal1(f) end
17208
17209 ---
17210 ---__Reference:__
17211 ---
17212 ---* Corresponding C source code: [liolibext.c#L137-L147](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L137-L147)
17213 ---
17214 ---@param f file* # A file handle.
17215 ---
17216 ---@return integer # a 2 byte unsigned integer
17217 ---
17218 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17219 function fio.readcardinal2(f) end
17220
17221 ---
17222 ---__Reference:__
17223 ---
17224 ---* Corresponding C source code: [liolibext.c#L187-L198](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L187-L198)
17225 ---
17226 ---@param f file* # A file handle.
17227 ---
17228 ---@return integer # a 3 byte unsigned integer
17229 ---
17230 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17231 function fio.readcardinal3(f) end
17232
17233 ---
17234 ---__Reference:__
17235 ---
17236 ---* Corresponding C source code: [liolibext.c#L241-L253](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L241-L253)
17237 ---
17238 ---@param f file* # A file handle.
17239 ---
17240 ---@return integer # a 4 byte unsigned integer
17241 ---
17242 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17243 function fio.readcardinal4(f) end
17244
17245 ---
17246 ---@param f file* # A file handle.
17247 ---@param n integer
17248 ---@param b integer
17249 ---
17250 ---@return table<integer, integer>
17251 function fio.readcardinaltable(f, n, b) end
17252
17253 ---
17254 ---__Reference:__
17255 ---
17256 ---* Corresponding C source code: [liolibext.c#L137-L147](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L137-L147)
17257 ---
17258 ---little endian variant
17259 ---
17260 ---@param f file* # A file handle.
17261 ---
17262 ---@return integer
17263 ---
17264 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17265 function fio.readcardinal1le(f) end
17266
17267 ---
17268 ---__Reference:__
17269 ---
17270 ---* Corresponding C source code: [liolibext.c#L148-L158](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L148-L158)
17271 ---
17272 ---little endian variant
17273 ---
17274 ---@param f file* # A file handle.
17275 ---
17276 ---@return integer
17277 ---
17278 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17279 function fio.readcardinal2le(f) end
17280
17281 ---
17282 ---__Reference:__
17283 ---
17284 ---* Corresponding C source code: [liolibext.c#L199-L210](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L199-L210)
17285 ---
17286 ---little endian variant
17287 ---
17288 ---@param f file* # A file handle.
17289 ---
17290 ---@return integer
17291 ---
17292 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17293 function fio.readcardinal3le(f) end
17294
17295 ---
17296 ---__Reference:__
17297 ---
17298 ---* Corresponding C source code: [liolibext.c#L254-L266](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L254-L266)
17299 ---
17300 ---little endian variant
17301 ---
17302 ---@param f file* # A file handle.
17303 ---
17304 ---@return integer
17305 ---
17306 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17307 function fio.readcardinal4le(f) end
17308
17309 ---
17310 ---__Reference:__
17311 ---
17312 ---* Corresponding C source code: [liolibext.c#L432-L442](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L432-L442)
17313 ---
17314 ---@param f file* # A file handle.
17315 ---
17316 ---@return integer # a 1 byte signed integer
17317 ---
17318 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17319 function fio.readinteger1(f) end
17320
17321 ---
17322 ---__Reference:__
17323 ---
17324 ---* Corresponding C source code: [liolibext.c#L460-L471](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L460-L471)
17325 ---
17326 ---@param f file* # A file handle.
17327 ---
17328 ---@return integer # a 2 byte signed integer
17329 ---
17330 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17331 function fio.readinteger2(f) end
17332
17333 ---
17334 ---@param f file* # A file handle.
17335 ---
17336 ---@return integer # a 3 byte signed integer
17337 ---
17338 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17339 function fio.readinteger3(f) end
17340
17341 ---
17342 ---@param f file* # A file handle.
17343 ---
17344 ---@return integer # a 4 byte signed integer
17345 ---
17346 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17347 function fio.readinteger4(f) end
17348
17349 ---
17350 ---@param f file* # A file handle.
17351 ---@param n integer
17352 ---@param b integer
17353 ---
17354 ---@return table<integer, integer>
17355 ---
17356 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17357 function fio.readintegertable(f, n, b) end
17358
17359 ---
17360 ------* Corresponding C source code: [liolibext.c#L432-L442](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/liolibext.c#L432-L442)
17361 ---
17362 ---little endian variant
17363 ---
17364 ---@param f file* # A file handle.
17365 ---
17366 ---@return integer
17367 ---
17368 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17369 function fio.readinteger1le(f) end
17370
17371 ---
17372 ---little endian variant
17373 ---
17374 ---@param f file* # A file handle.
17375 ---
17376 ---@return integer
17377 ---
17378 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17379 function fio.readinteger2le(f) end
17380
17381 ---
17382 ---little endian variant
17383 ---
17384 ---@param f file* # A file handle.
17385 ---
17386 ---@return integer
17387 ---
17388 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17389 function fio.readinteger3le(f) end
17390
17391 ---
17392 ---little endian variant
17393 ---
17394 ---@param f file* # A file handle.
17395 ---
17396 ---@return integer
17397 ---
17398 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17399 function fio.readinteger4le(f) end
17400
17401 ---
17402 ---@param f file* # A file handle.
17403 ---
17404 ---@return number # a 2 byte float (used in font files)
17405 ---
17406 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17407 function fio.readfixed2(f) end
17408
17409 ---
17410 ---@param f file* # A file handle.
17411 ---
17412 ---@return number # a 4 byte float (used in font files)
17413 ---
17414 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17415 function fio.readfixed4(f) end
17416
17417 ---
17418 ---@param f file* # A file handle.
17419 ---
17420 ---@return number # a 2 byte float (used in font files)
17421 ---
17422 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17423 function fio.read2dot14(f) end
17424
17425 ---
17426 ---goto position `p`
17427 ---
17428 ---@param f file* # A file handle.
17429 ---@param p integer
17430 ---
17431 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17432 function fio.setposition(f, p) end
17433
17434 ---
17435 ---get the current position
17436 ---
17437 ---@param f file* # A file handle.
17438 ---
17439 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17440 function fio.getposition(f) end
17441
17442 ---
17443 ---skip `n` positions.
17444 ---
17445 ---@param f file* # A file handle.
17446 ---@param n integer
17447 ---
17448 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17449 function fio.skipposition(f, n) end
17450
17451 ---
17452 ---Read `n` bytes.
17453 ---
17454 ---@param f file* # A file handle.
17455 ---@param n integer
17456 ---
17457 ---@return integer ...
17458 ---
17459 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17460 function fio.readbytes(f, n) end
17461
17462 ---
17463 ---Read `n` bytes as a table.
17464 ---
17465 ---@param f file* # A file handle.
17466 ---@param n integer
17467 ---
17468 ---@return table<integer, integer>
17469 ---
17470 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17471 function fio.readbytetable(f, n) end
17472
17473 ---
17474 ---@param f file* # A file handle.
17475 ---
17476 ---@return string
17477 ---
17478 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/fio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17479 function fio.readline(f) end
17480 ---
17481 ---This library contains variables and functions that are related to the *PDF*
17482 ---backend.
17483 ---
17484 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17485 pdf = {}
17486
17487 ---
17488 ---Modify the map-file.
17489 ---
17490 ---This function modifies the map-file by adding, replacing, or removing all entries (lines) of <map_file>.
17491 ---
17492 ---@param map_file string # File name of map-file.
17493 ---The first character of <map_file> has a special meaning:
17494 --- * `'+'` Add new entries, if they do not exist already.
17495 --- * `'='` Replace existing entries.
17496 --- * `'-'` Remove entries, if they exist.
17497 --- * `''` Flush map file first, then insert new entries.
17498 ---
17499 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17500 function pdf.mapfile(map_file) end
17501
17502 ---
17503 ---Modify the map-file.
17504 ---
17505 ---This function modifies the map-file by adding, replacing, or removing exactly one entry (line).
17506 ---
17507 ---@param map_line string # Entry (line) to be added, replace, or removed.
17508 ---The first character of <map_line> has a special meaning:
17509 --- * `'+'` Insert new entry, if it doesn't exist already.
17510 --- * `'='` Replace existing entry.
17511 --- * `'-'` Remove entry, if it exists.
17512 --- * `''` Flush map file first, then insert new entry.
17513 ---
17514 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17515 function pdf.mapline(map_line) end
17516
17517 ---
17518 ---Insert string <catalog> into the `/Catalog` dictionary.
17519 ---
17520 ---This function complements the corresponding *PDF* backend token lists dealing
17521 ---with metadata. The value is written to the *PDF*
17522 ---file directly after the token registers set at the *TeX* end are written.
17523 ---
17524 ---__Reference:__
17525 ---
17526 ---* Corresponding C source code: [lpdflib.c#L612](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L612)
17527 ---
17528 ---@see pdf.getcatalog
17529 ---
17530 ---@param catalog string # String.
17531 ---
17532 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17533 function pdf.setcatalog(catalog) end
17534
17535 ---
17536 ---Return string <catalog> that was set by `pdf.setcatalog()`.
17537 ---
17538 ---This function complements the corresponding *PDF* backend token lists dealing
17539 ---with metadata. The value is written to the *PDF*
17540 ---file directly after the token registers set at the *TeX* end are written.
17541 ---
17542 ---@see pdf.setcatalog
17543 ---
17544 ---@return string | nil catalog # String.
17545 ---
17546 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17547 function pdf.getcatalog() end
17548
17549 ---
17550 ---Insert string <info> into the `/Info` dictionary.
17551 ---
17552 ---This function complements the corresponding *PDF* backend token lists dealing
17553 ---with metadata. The value is written to the *PDF*
17554 ---file directly after the token registers set at the *TeX* end are written.
17555 ---
17556 ---__Reference:__
17557 ---
17558 ---* Corresponding C source code: [lpdflib.c#L613](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L613)
17559 ---
17560 ---@see pdf.getinfo
17561 ---
17562 ---@param info string # String.
17563 ---
17564 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17565 function pdf.setinfo(info) end
17566
17567 ---
17568 ---Return string <info> that was set by `pdf.setinfo()`.
17569 ---
17570 ---This function complements the corresponding *PDF* backend token lists dealing
17571 ---with metadata. The value is written to the *PDF*
17572 ---file directly after the token registers set at the *TeX* end are written.
17573 ---
17574 ---@see pdf.setinfo
17575 ---
17576 ---@return string | nil info # String.
17577 ---
17578 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17579 function pdf.getinfo() end
17580
17581 ---
17582 ---Insert string <names> into the `/Names` dictionary of the `/Catalog`.
17583 ---
17584 ---This function complements the corresponding *PDF* backend token lists dealing
17585 ---with metadata. The value is written to the *PDF*
17586 ---file directly after the token registers set at the *TeX* end are written.
17587 ---
17588 ---__Reference:__
17589 ---
17590 ---* Corresponding C source code: [lpdflib.c#L614](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L614)
17591 ---
17592 ---@see pdf.getnames
17593 ---
17594 ---@param names string # String.
17595 ---
17596 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17597 function pdf.setnames(names) end
17598
17599 ---
17600 ---Return string <names> that was set by `pdf.setnames()`.
17601 ---
17602 ---This function complements the corresponding *PDF* backend token lists dealing
17603 ---with metadata. The value is written to the *PDF*
17604 ---file directly after the token registers set at the *TeX* end are written.
17605 ---
17606 ---@see pdf.setnames
17607 ---
17608 ---@return string | nil names # String.
17609 ---
17610 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17611 function pdf.getnames() end
17612
17613 ---
17614 ---Insert string <trailer> into the `trailer` dictionary.
17615 ---
17616 ---This function complements the corresponding *PDF* backend token lists dealing
17617 ---with metadata. The value is written to the *PDF*
17618 ---file directly after the token registers set at the *TeX* end are written.
17619 ---
17620 ---__Reference:__
17621 ---
17622 ---* Corresponding C source code: [lpdflib.c#L615](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L615)
17623 ---
17624 ---@see pdf.gettrailer
17625 ---
17626 ---@param trailer string # String.
17627 ---FIXME: pdf.settrailer() not working. Bug?
17628 ---
17629 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17630 function pdf.settrailer(trailer) end
17631
17632 ---
17633 ---Return string <trailer> that was set by `pdf.settrailer()`.
17634 ---
17635 ---This function complements the corresponding *PDF* backend token lists dealing
17636 ---with metadata. The value is written to the *PDF*
17637 ---file directly after the token registers set at the *TeX* end are written.
17638 ---
17639 ---@see pdf.settrailer
17640 ---
17641 ---@return string | nil trailer # String.
17642 ---
17643 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17644 function pdf.gettrailer() end
17645
17646 ---
17647 ---Insert string <attributes> into the current `/Page` dictionary.
17648 ---
17649 ---This function complements the corresponding *PDF* backend token lists dealing
17650 ---with page resources. The variables have no interaction with the corresponding *PDF*
17651 ---backend token register. They are written to the *PDF* file directly after the
17652 ---token registers set at the *TeX* end are written.
17653 ---
17654 ------* Corresponding C source code: [lpdflib.c#L610](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L610)
17655 ---
17656 ---@see pdf.getpageattributes
17657 ---
17658 ---@param attributes string # String.
17659 ---
17660 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17661 function pdf.setpageattributes(attributes) end
17662
17663 ---
17664 ---Return string <attributes> that was set by `pdf.setpageattributes()`.
17665 ---
17666 ---This function complements the corresponding *PDF* backend token lists dealing
17667 ---with page resources. The variables have no interaction with the corresponding *PDF*
17668 ---backend token register. They are written to the *PDF* file directly after the
17669 ---token registers set at the *TeX* end are written.
17670 ---
17671 ---@see pdf.setpageattributes
17672 ---
17673 ---@return string | nil attributes # String.
17674 ---
17675 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17676 function pdf.getpageattributes() end
17677
17678 ---
17679 ---Insert string <resources> into the `/Resources` dictionary of the current page.
17680 ---
17681 ---This function complements the corresponding *PDF* backend token lists dealing
17682 ---with page resources. The variables have no interaction with the corresponding *PDF*
17683 ---backend token register. They are written to the *PDF* file directly after the
17684 ---token registers set at the *TeX* end are written.
17685 ---
17686 ---__Reference:__
17687 ---
17688 ---* Corresponding C source code: [lpdflib.c#L609](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L609)
17689 ---
17690 ---@see pdf.getpageresources
17691 ---
17692 ---@param resources string # String.
17693 ---
17694 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17695 function pdf.setpageresources(resources) end
17696
17697 ---
17698 ---Return string <resources> that was set by `pdf.setpageresources()`.
17699 ---
17700 ---This function complements the corresponding *PDF* backend token lists dealing
17701 ---with page resources. The variables have no interaction with the corresponding *PDF*
17702 ---backend token register. They are written to the *PDF* file directly after the
17703 ---token registers set at the *TeX* end are written.
17704 ---
17705 ---@see pdf.setpageresources
17706 ---
17707 ---@return string | nil resources # String.
17708 ---
17709 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17710 function pdf.getpageresources() end
17711
17712 ---
17713 ---Insert string <attributes> into the `/Pages` dictionary of the `/Catalog`.
17714 ---
17715 ---This function complements the corresponding *PDF* backend token lists dealing
17716 ---with page resources. The variables have no interaction with the corresponding *PDF*
17717 ---backend token register. They are written to the *PDF* file directly after the
17718 ---token registers set at the *TeX* end are written.
17719 ---
17720 ---__Reference:__
17721 ---
17722 ---* Corresponding C source code: [lpdflib.c#L611](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L611)
17723 ---
17724 ---@see pdf.setpageattributes
17725 ---
17726 ---@param attributes string # String.
17727 ---
17728 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17729 function pdf.setpagesattributes(attributes) end
17730
17731 ---
17732 ---Return string <attributes> that was set by `pdf.setpageattributes()`.
17733 ---
17734 ---This function complements the corresponding *PDF* backend token lists dealing
17735 ---with page resources. The variables have no interaction with the corresponding *PDF*
17736 ---backend token register. They are written to the *PDF* file directly after the
17737 ---token registers set at the *TeX* end are written.
17738 ---
17739 ---@see pdf.setpageattributes
17740 ---
17741 ---@return string | nil attributes # String.
17742 ---
17743 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17744 function pdf.getpagesattributes() end
17745
17746 ---
17747 ---This function complements the corresponding *PDF* backend token lists dealing
17748 ---with reuseable boxes and images. The variables have no interaction with the
17749 ---corresponding *PDF* backend token register. They are written to the *PDF*
17750 ---file directly after the token registers set at the *TeX* end are written.
17751 ---
17752 ---@see pdf.getxformattributes
17753 ---
17754 ---__Reference:__
17755 ---
17756 ---* Corresponding C source code: [lpdflib.c#L617](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L617)
17757 ---
17758 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17759 function pdf.setxformattributes() end
17760
17761 ---
17762 ---This function complements the corresponding *PDF* backend token lists dealing
17763 ---with reuseable boxes and images. The variables have no interaction with the
17764 ---corresponding *PDF* backend token register. They are written to the *PDF*
17765 ---file directly after the token registers set at the *TeX* end are written.
17766 ---
17767 ---@see pdf.setxformattributes
17768 ---
17769 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17770 function pdf.getxformattributes() end
17771
17772 ---
17773 ---This function complements the corresponding *PDF* backend token lists dealing
17774 ---with reuseable boxes and images. The variables have no interaction with the
17775 ---corresponding *PDF* backend token register. They are written to the *PDF*
17776 ---file directly after the token registers set at the *TeX* end are written.
17777 ---
17778 ---@see pdf.getxformresources
17779 ---
17780 ---__Reference:__
17781 ---
17782 ---* Corresponding C source code: [lpdflib.c#L616](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L616)
17783 ---
17784 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17785 function pdf.setxformresources() end
17786
17787 ---
17788 ---This function complements the corresponding *PDF* backend token lists dealing
17789 ---with reuseable boxes and images. The variables have no interaction with the
17790 ---corresponding *PDF* backend token register. They are written to the *PDF*
17791 ---file directly after the token registers set at the *TeX* end are written.
17792 ---
17793 ---@see pdf.setxformresources
17794 ---
17795 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17796 function pdf.getxformresources() end
17797
17798 ---
17799 ---Set major version number of the PDF file format.
17800 ---
17801 ---Note: This function sets the version number of the file header. It does not set the `/Version` key of the `/Catalog` as recommended for PDF-1.4 and later.
17802 ---
17803 ---The major version is
17804 ---normally 1 but when set to 2 some data will not be written to the file in order
17805 ---to comply with the standard. What minor version you set depends on what *PDF*
17806 ---features you use. This is out of control of *LuaTeX*.
17807 ---
17808 ---One can set the major version number to 2 but we cannot guarantee that the engine
17809 ---adapts itself correctly, because there is no public and free specification that
17810 ---we know of. Also, user constructed annotations are not checked and just passed
17811 ---to the file. On the other hand, the *PDF* that the engine generated is rather
17812 ---simple and not that version depending.
17813 ---
17814 ---@see pdf.getmajorversion
17815 ---
17816 ---@param n integer # Major version number.
17817 ---
17818 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17819 function pdf.setmajorversion(n) end
17820
17821 ---
17822 ---Return major version number of the PDF file format.
17823 ---
17824 ---@see pdf.setmajorversion
17825 ---
17826 ---@return integer n # Major version number.
17827 ---
17828 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17829 function pdf.getmajorversion() end
17830
17831 ---
17832 ---Set minor version number of the PDF file format.
17833 ---
17834 ---Note: This function sets the version number of the file header. It does not set the `/Version` key of the `/Catalog` as recommended for PDF-1.4 and later.
17835 ---
17836 ---@see pdf.getmajorversion
17837 ---
17838 ---@param n integer # Minor version number.
17839 ---
17840 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17841 function pdf.setminorversion(n) end
17842
17843 ---
17844 ---Return minor version number of the PDF file format.
17845 ---
17846 ---@see pdf.setminorversion
17847 ---
17848 ---@return integer n # Minor version number.
17849 ---
17850 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17851 function pdf.getminorversion() end
17852
17853 ---
17854 ---Return the `/CreationDate` string of the `/Info` dictionary.
17855 ---
17856 ---@return string
17857 ---
17858 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17859 function pdf.getcreationdate() end
17860
17861 ---
17862 ---Set error level for inserting *PDF* files.
17863 ---
17864 ---A warning/error is issued if the inserted *PDF* file has a newer version number than the main *PDF* file.
17865 --- * `level <= 0`: Issue a warning.
17866 --- * `level > 0`: Issue an error.
17867 ---@param level integer
17868 ---
17869 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17870 function pdf.setinclusionerrorlevel(level) end
17871
17872 ---
17873 ---Return value set by `pdf.setinclusionerrorlevel()`.
17874 ---
17875 ---@return integer level # Error level.
17876 ---
17877 ---@see pdf.setinclusionerrorlevel
17878 ---
17879 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17880 function pdf.getinclusionerrorlevel() end
17881
17882 ---
17883 ---Set <ignore> status for inserting images.
17884 --- * `ignore ~= 0`: Issue a warning if image file type is unknown.
17885 --- * `ignore == 0`: Issue an error if image file type is unknown.
17886 ---LuaTeX can handle these file types: pdf, png, jpg, jbig2
17887 ---@param ignore integer # Ignore image.
17888 ---
17889 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17890 function pdf.setignoreunknownimages(ignore) end
17891
17892 ---
17893 ---Return <ignore> status.
17894 ---
17895 ---@return integer ignore # Ignor image.
17896 ---
17897 ---@see pdf.setignoreunknownimages
17898 ---
17899 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17900 function pdf.getignoreunknownimages() end
17901
17902 ---
17903 ---Set bit field suppressing certain informational keys in the *PDF* file.
17904 ---
17905 ---@param flags integer # Bit field.
17906 --- --------------------------------------------------------------
17907 --- Bit Meaning
17908 --- --- ---------------------------------------------------------
17909 --- 1 `/PTEX.FullBanner` in `/Info` dictionary of the trailer.
17910 --- 2 `/PTEX.FileName` in `/XObject` dictionary of an image. (1)
17911 --- 4 `/PTEX.PageNumber` in `/XObject` dictionary of an image.
17912 --- 8 `/PTEX.InfoDict` in `/XObject` dictionary of an image.
17913 --- 16 `/Creator` in `/Info` dictionary of the trailer.
17914 --- 32 `/CreationDate` in `/Info` dictionary of the trailer.
17915 --- 64 `/ModDate` in `/Info` dictionary of the trailer.
17916 --- 128 `/Producer` in `/Info` dictionary of the trailer.
17917 --- 256 `/Trapped` in `/Info` dictionary of the trailer.
17918 --- 512 `/ID` of the trailer.
17919 --- --------------------------------------------------------------
17920 --- (1) Seems to work only if '\pdfvariable imageaddfilename = 1'
17921 ---
17922 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17923 function pdf.setsuppressoptionalinfo(flags) end
17924
17925 ---
17926 ---Return bit field set by `pdf.setsuppressoptionalinfo()`.
17927 ---
17928 ---@return integer flags # Bit field.
17929 ---
17930 ---@see pdf.setsuppressoptionalinfo
17931 ---
17932 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17933 function pdf.getsuppressoptionalinfo() end
17934
17935 ---
17936 ---Set `/ID` of the trailer.
17937 ---
17938 ---@param id string # Trailer ID.
17939 ---
17940 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17941 function pdf.settrailerid(id) end
17942
17943 ---
17944 ---Return `/ID` of the trailer.
17945 ---
17946 ---@return string id # Trailer ID.
17947 ---
17948 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17949 function pdf.gettrailerid() end
17950
17951 ---
17952 ---Add or remove `/CIDSet` entry in `/FontDescriptor`.
17953 --- * `n ~= 0`: Remove `/CIDSet` entry.
17954 --- * `n == 0`: Add `/CIDSet` entry.
17955 ---
17956 ---@param n integer
17957 ---
17958 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17959 function pdf.setomitcidset(n) end
17960
17961 ---
17962 ---Return <flag> set by `pdf.setomitcidset()`.
17963 ---
17964 ---@return integer flag
17965 ---
17966 ---@see pdf.setomitcidset
17967 ---
17968 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17969 function pdf.getomitcidset() end
17970
17971 ---
17972 ---Add or remove `/CharSet` entry in `/FontDescriptor`.
17973 --- * `n ~= 0`: Remove `/CharSet` entry.
17974 --- * `n == 0`: Add `/CharSet` entry.
17975 ---
17976 ---@param n integer
17977 ---
17978 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17979 function pdf.setomitcharset(n) end
17980
17981 ---
17982 ---Return value set by `pdf.setomitcharset()`.
17983 ---
17984 ---@return integer n
17985 ---
17986 ---@see pdf.setomitcharset
17987 ---
17988 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17989 function pdf.getomitcharset() end
17990
17991 ---
17992 ---Set compression level of streams.
17993 ---
17994 ---@param level integer # Minimum: 0, Maximum: 9
17995 ---
17996 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
17997 function pdf.setcompresslevel(level) end
17998
17999 ---
18000 ---Return compression level of streams.
18001 ---
18002 ---@return integer level # Compression level.
18003 ---
18004 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18005 function pdf.getcompresslevel() end
18006
18007 ---
18008 ---Set compression level of objects.
18009 ---
18010 ---@param level integer # Minimum: 0, Maximum: 9
18011 ---
18012 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18013 function pdf.setobjcompresslevel(level) end
18014
18015 ---
18016 ---Return compression level of objects.
18017 ---
18018 ---@return integer level # Compression level.
18019 ---
18020 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18021 function pdf.getobjcompresslevel() end
18022
18023 ---
18024 ---Switch for recompressing streams of `/XObject`s.
18025 ---
18026 ---@param switch integer # 0: don't recompress, 1: do recompress.
18027 ---FIXME: pdf.setrecompress() not working. Bug?
18028 ---
18029 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18030 function pdf.setrecompress(switch) end
18031
18032 ---
18033 ---Return value set by `pdf.setrecompress()`.
18034 ---
18035 ---@return integer switch # 0: don't recompress, 1: do recompress.
18036 ---
18037 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18038 function pdf.getrecompress() end
18039
18040 ---
18041 ---Add or remove `/ToUnicode` entry in a font dictionary.
18042 ---
18043 ---@param n integer
18044 --- * `n ~= 0`: Add `/ToUnicode` entry.
18045 --- * `n == 0`: Remove `/ToUnicode` entry.
18046 --- Note: Use `\pdfextension glyphtounicode` to add a CMap mapping from character codes to Unicode values.
18047 ---
18048 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18049 function pdf.setgentounicode(n) end
18050
18051 ---
18052 ---Return value set by `pdf.setgentounicode()`.
18053 ---
18054 ---@return integer n
18055 ---@see pdf.setgentounicode
18056 ---
18057 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18058 function pdf.getgentounicode() end
18059
18060 ---
18061 ---Set number of decimal digits used for writing numbers (floats) in the *PDF* file.
18062 ---
18063 ---@param ndigits integer # Number of decimal digits.
18064 ---
18065 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18066 function pdf.setdecimaldigits(ndigits) end
18067
18068 ---
18069 ---Return value set by `pdf.setdecimaldigits()`.
18070 ---
18071 ---@return integer ndigits # Number of digits.
18072 ---
18073 ---@see pdf.setdecimaldigits
18074 ---
18075 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18076 function pdf.getdecimaldigits() end
18077
18078 ---
18079 ---Set resolution of PK fonts.
18080 ---@param resolution integer
18081 ---@param fixed_dpi integer
18082 ---
18083 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18084 function pdf.setpkresolution(resolution, fixed_dpi) end
18085
18086 ---
18087 ---Return resolution of PK fonts.
18088 ---
18089 ---@return integer resolution
18090 ---@return integer fixed_dpi
18091 ---
18092 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18093 function pdf.getpkresolution() end
18094
18095 ---
18096 ---Return object number of latest created objects.
18097 ---
18098 ---@return integer objnum # Number of latest created object.
18099 ---
18100 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18101 function pdf.getlastobj() end
18102
18103 ---
18104 ---Return object number of latest created `/Annot` object (subtype `/Link`) that was created by `/pdfextension startlink`.
18105 ---
18106 ---@return integer objnum # Object number.
18107 ---
18108 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18109 function pdf.getlastlink() end
18110
18111 ---
18112 ---Return object number of latest created `/Annot` object that was created by `pdf.reserveobj('annot')`.
18113 ---
18114 ---@return integer objnum # Number of latest created object.
18115 ---
18116 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18117 function pdf.getlastannot() end
18118
18119 ---
18120 ---Warning! Undocumented code!<p>
18121 ---TODO: Please contribute
18122 ---https://github.com/Josef-Friedrich/LuaTeX_Lua-API#how-to-contribute
18123 ---
18124 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18125 function pdf.getretval() end
18126
18127 ---
18128 ---Return the object number of the latest created pdf object.
18129 ---
18130 ---@return integer objnum # Object number.
18131 ---
18132 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18133 function pdf.getmaxobjnum() end
18134
18135 ---
18136 ---Return a string describing the object type.
18137 ---
18138 ---@param objnum integer # Object number.
18139 ---
18140 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18141 function pdf.getobjtype(objnum) end
18142
18143 ---
18144 ---Return the number of the font resource name.
18145 ---The `/Font` entry of a `/Resource` dictionary maps resource names to font dictionaries.
18146 ---LuaTeX uses resource names like `/F36` or `/F52`, where the number corresponds to
18147 ---the font ID.
18148 ---
18149 ---@param id integer # Font ID.
18150 ---
18151 ---@return integer
18152 ---
18153 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18154 function pdf.getfontname(id) end
18155
18156 ---
18157 ---Return the object number of the `/Font` dictionary.
18158 ---
18159 ---@param id integer # Font ID.
18160 ---
18161 ---@return integer objnum # Object number.
18162 ---
18163 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18164 function pdf.getfontobjnum(id) end
18165
18166 ---
18167 ---Return the font size in scaled points.
18168 ---
18169 ---@param id integer # Font ID.
18170 ---
18171 ---@return integer # Font size.
18172 ---
18173 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18174 function pdf.getfontsize(id) end
18175
18176 ---
18177 ---Warning! Undocumented code!<p>
18178 ---TODO: Please contribute
18179 ---https://github.com/Josef-Friedrich/LuaTeX_Lua-API#how-to-contribute
18180 ---
18181 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18182 function pdf.getxformname() end
18183
18184 ---
18185 ---Set horizontal and vertical offset from the top left corner of the page.
18186 ---
18187 ---@param h integer # Horizontal offset in scaled points.
18188 ---@param v integer # Vertical offset in scaled points.
18189 ---
18190 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18191 function pdf.setorigin(h, v) end
18192
18193 ---
18194 ---Return values set by `pdf.setorigin()`.
18195 ---
18196 ---@return integer h # Horizontal offset in scaled points.
18197 ---@return integer v # Vertical offset in scaled points.
18198 ---
18199 ---@see pdf.setorigin
18200 ---
18201 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18202 function pdf.getorigin() end
18203
18204 ---
18205 ---Set default resolution of a bitmap image.
18206 ---
18207 ---@param dpi integer # Resolution.
18208 --- LuaTeX determines the size of an image as follows:
18209 --- 1. It uses <width> and <height> parameter of `\useimageresource`.
18210 --- 2. If (1) is missing, it uses the resolution given in the metadata of the image.
18211 --- 3. If (2) is missing, it uses the resolution given by this function.
18212 --- 4. If (3) is missing, it uses a resolution of 72 dpi.
18213 ---
18214 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18215 function pdf.setimageresolution(dpi) end
18216
18217 ---
18218 ---Return value set by `pdf.setimageresolution()`.
18219 ---
18220 ---@return integer dpi # Resolution.
18221 ---
18222 ---@see pdf.setimageresolution
18223 ---
18224 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18225 function pdf.getimageresolution() end
18226
18227 ---
18228 ---Set margin size of hyperlinks.
18229 ---
18230 ---@param margin integer # Margin in scaled points.
18231 ---
18232 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18233 function pdf.setlinkmargin(margin) end
18234
18235 ---
18236 ---Return value set by `pdf.setlinkmargin()`.
18237 ---
18238 ---@return integer margin # Margin in scaled points.
18239 ---@see pdf.setlinkmargin
18240 ---
18241 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18242 function pdf.getlinkmargin() end
18243
18244 ---
18245 ---Set margin size of destination.
18246 ---
18247 ---@param margin integer # Margin in scaled points.
18248 ---FIXME pdf.setdestmargin() is not working. Bug?
18249 ---
18250 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18251 function pdf.setdestmargin(margin) end
18252
18253 ---
18254 ---Return value set by `pdf.setdestmargin()`.
18255 ---
18256 ---@return integer margin # Margin in scaled points.
18257 ---@see pdf.setdestmargin
18258 ---
18259 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18260 function pdf.getdestmargin() end
18261
18262 ---
18263 ---Set size of margin for threads.
18264 ---
18265 ---@param margin integer # Margin in scaled points.
18266 ---
18267 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18268 function pdf.setthreadmargin(margin) end
18269
18270 ---
18271 ---Return value set by `pdf.setthreadmargin()`.
18272 ---
18273 ---@return integer margin # Margin in scaled points.
18274 ---
18275 ---@see pdf.setthreadmargin
18276 ---
18277 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18278 function pdf.getthreadmargin() end
18279
18280 ---
18281 ---Warning! Undocumented code!<p>
18282 ---TODO: Please contribute
18283 ---https://github.com/Josef-Friedrich/LuaTeX_Lua-API#how-to-contribute
18284 ---
18285 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18286 function pdf.setxformmargin() end
18287
18288 ---
18289 ---Warning! Undocumented code!<p>
18290 ---TODO: Please contribute
18291 ---https://github.com/Josef-Friedrich/LuaTeX_Lua-API#how-to-contribute
18292 ---
18293 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18294 function pdf.getxformmargin() end
18295
18296 ---
18297 ---Return coordinates of the current position. The origin of the coordinate system is at the lower left corner of the page.
18298 ---
18299 ---@return integer h # Horizontal position in scaled points.
18300 ---@return integer v # Vertical position in scaled points.
18301 ---
18302 ---Note: This function is mainly used inside `\latelua` calls.
18303 ---
18304 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18305 function pdf.getpos() end
18306
18307 ---
18308 ---Return horizontal coordinate of the current position. The origin of the coordinate system is at the lower left corner of the page.
18309 ---
18310 ---@return integer h # Horizontal position in scaled points.
18311 ---Note: This function is mainly used inside `\latelua` calls.
18312 ---
18313 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18314 function pdf.gethpos() end
18315
18316 ---
18317 ---Return vertical coordinate of the current position. The origin of the coordinate system is at the lower left corner of the page.
18318 ---
18319 ---@return integer v # Vertical position in scaled points.
18320 ---
18321 ---Note: This function is mainly used inside `\latelua` calls.
18322 ---
18323 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18324 function pdf.getvpos() end
18325
18326 ---
18327 ---Returns `true` is a CTM is currently used.
18328 ---
18329 ---@return boolean
18330 ---
18331 ---Note: This function is mainly used inside `\latelua` calls.
18332 ---
18333 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18334 function pdf.hasmatrix() end
18335
18336 ---
18337 ---Return the CTM (current transformation matrix) at the current position.
18338 --- ┌ ┐
18339 --- │ a b 0 │
18340 --- │ c d 0 │
18341 --- │ e f 1 │
18342 --- └ ┘
18343 ---@return integer a
18344 ---@return integer b
18345 ---@return integer c
18346 ---@return integer d
18347 ---@return integer e
18348 ---@return integer f
18349 ---Note: This function is mainly used inside `\latelua` calls.
18350 ---
18351 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18352 function pdf.getmatrix() end
18353
18354 ---
18355 ---Write a string into the contents stream of the current page. If LuaTeX is currently inside a text block (**BT**...**ET**), close the text block first.
18356 ---
18357 ---@param str string # String.
18358 ---
18359 ---Note: This function is mainly used inside `\latelua` calls.
18360 ---
18361 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18362 function pdf.print(str) end
18363
18364 ---
18365 ---Write a string into the contents stream of the current page.
18366 ---
18367 ---@param type string # Type.
18368 ---@param str string # String.
18369 ---Parameter <type> determines how the string is written:
18370 --- * `text`: String <str> is written inside a text block (**BT**...**ET**).
18371 --- * `page`: String <str> is written outside a text block (**BT**...**ET**).
18372 --- * `origin`: Like `page` but the CTM is inserted just before the string <str>.
18373 --- * `direct`: String <str> is written directly, independ of whether this is inside or outside a text block.
18374 --- * `raw`: Like `direct`.
18375 ----Note: This function is mainly used inside `\latelua` calls.
18376 ---
18377 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18378 function pdf.print(type, str) end
18379
18380 ---
18381 ---Create an object and write it immediately to the pdf file.
18382 ---
18383 ---The created object looks like this:
18384 ---> <objnum> 0 obj
18385 ---> <str>
18386 ---> endobj
18387 ---@param objnum? integer # Object number (optional argument).
18388 ---@param str string # Contents of the object.
18389 ---
18390 ---@return integer objnum # Object number.
18391 ---
18392 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18393 function pdf.immediateobj(str) end
18394
18395 ---
18396 ---Create an object and write it immediately to the pdf file.
18397 ---The created object looks like this:
18398 ---> <objnum> 0 obj
18399 ---> <contents of file <filename>>
18400 ---> endobj
18401 ---@param objnum? integer # Object number (optional argument).
18402 ---@param file string # Literal string `"file"`.
18403 ---@param filename string # File name.
18404 ---
18405 ---@return integer objnum # Object number.
18406 ---
18407 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18408 function pdf.immediateobj(objnum, file, filename) end
18409
18410 ---
18411 ---Create an object and write it immediately to the pdf file.
18412 ---
18413 ---The created object looks like this:
18414 ---> <objnum> 0 obj
18415 ---> <<
18416 ---> <streamdict>
18417 ---> /Length 123 >>
18418 ---> stream
18419 ---> <streamcontents>
18420 ---> endstream
18421 ---> endobj
18422 ---@param objnum? integer # Object number (optional argument).
18423 ---@param stream string # Literal string `"stream"`.
18424 ---@param streamcontents string # Contents of the stream.
18425 ---@param streamdict string # Stream dictionary.
18426 ---
18427 ---@return integer objnum # Object number.
18428 ---
18429 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18430 function pdf.immediateobj(stream, streamcontents, streamdict) end
18431
18432 ---
18433 ---Create an object and write it immediately to the pdf file.
18434 ---
18435 ---The created object looks like this:
18436 ---> <objnum> 0 obj
18437 ---> <<
18438 ---> <contents of `file` <filename>>
18439 ---> /Length 123 >>
18440 ---> stream
18441 ---> <streamcontents>
18442 ---> endstream
18443 ---> endobj
18444 ---@param objnum? integer # Object number (optional argument).
18445 ---@param streamfile string # Literal string `"streamfile"`.
18446 ---@param filename string # File name.
18447 ---@param streamdict string # Stream dictionary.
18448 ---@return integer objnum # Object number.
18449 ---
18450 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18451 function pdf.immediateobj(streamfile, filename, streamdict) end
18452
18453 ---
18454 ---Create an object.
18455 ---
18456 ---This object is written to the pdf file only if it is referenced later by `pdf.refobj()`
18457 ---The created object looks like this:
18458 ---> <objnum> 0 obj
18459 ---> <str>
18460 ---> endobj
18461 ---@param objnum? integer # Object number (optional argument).
18462 ---@param str string # Contents of the object.
18463 ---
18464 ---@return integer objnum # Object number.
18465 ---
18466 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18467 function pdf.obj(str) end
18468
18469 ---
18470 ---Create an object.
18471 ---
18472 ---This object is written to the pdf file only if it is referenced later by `pdf.refobj()`
18473 ---The created object looks like this:
18474 ---> <objnum> 0 obj
18475 ---> <contents of file <filename>>
18476 ---> endobj
18477 ---
18478 ---@param objnum? integer # Object number (optional argument).
18479 ---@param file string # Literal string `"file"`.
18480 ---@param filename string # File name.
18481 ---
18482 ---@return integer objnum # Object number.
18483 ---
18484 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18485 function pdf.obj(objnum, file, filename) end
18486
18487 ---
18488 ---Create an object.
18489 ---
18490 ---This object is written to the pdf file only if it is referenced later by `pdf.refobj()`
18491 ---The created object looks like this:
18492 ---> <objnum> 0 obj
18493 ---> <<
18494 ---> <streamdict>
18495 ---> /Length 123 >>
18496 ---> stream
18497 ---> <streamcontents>
18498 ---> endstream
18499 ---> endobj
18500 ---@param objnum? integer # Object number (optional argument).
18501 ---@param stream string # Literal string `"stream"`.
18502 ---@param streamcontents string # Contents of the stream.
18503 ---@param streamdict string # Stream dictionary.
18504 ---
18505 ---@return integer objnum # Object number.
18506 ---
18507 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18508 function pdf.obj(stream, streamcontents, streamdict) end
18509
18510 ---
18511 ---Create an object.
18512 ---
18513 ---This object is written to the pdf file only if it is referenced later by `pdf.refobj()`
18514 ---The created object looks like this:
18515 ---> <objnum> 0 obj
18516 ---> <<
18517 ---> <contents of `file` <filename>>
18518 ---> /Length 123 >>
18519 ---> stream
18520 ---> <streamcontents>
18521 ---> endstream
18522 ---> endobj
18523 ---@param objnum? integer # Object number (optional argument).
18524 ---@param streamfile string # Literal string `"streamfile"`.
18525 ---@param filename string # File name.
18526 ---@param streamdict string # Stream dictionary.
18527 ---
18528 ---@return integer objnum # Object number.
18529 ---
18530 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18531 function pdf.obj(streamfile, filename, streamdict) end
18532
18533 ---
18534 ---Create an object.
18535 ---
18536 ---@param keyvals table # Object specification.
18537 ---> keyvals = {
18538 ---> type = <string>, -- `'stream'` (stream object), `'raw'` (non-stream object)
18539 ---> immediate = <boolean>,
18540 ---> objnum = <number>, -- object number
18541 ---> attr = <string>, -- stream dictionary
18542 ---> compresslevel = <number>,
18543 ---> objcompression = <boolean>,
18544 ---> file = <string>, -- contents of object/stream
18545 ---> string = <string>, -- contents of object/stream
18546 ---> nolength = <boolean>, -- omit `/Length` entry of stream dictionary
18547 ---> }
18548 --- Keys `string` and `file` are mutual exclusive.
18549 --- Key `nolength` omits `/Length` entry of the stream dictionary only if a `/Length` entry is given in the `attr` key.
18550 ---
18551 ---@return integer objnum # Object number.
18552 ---
18553 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18554 function pdf.obj(keyvals) end
18555
18556 ---
18557 ---Write referenced object to pdf file.
18558 ---
18559 ---@param objnum integer # Object number.
18560 ---
18561 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18562 function pdf.refobj(objnum) end
18563
18564 ---
18565 ---Create an empty object.
18566 ---
18567 ---Use `pdf.obj()` or `pdf.immediateobj()` to define this object.
18568 ---
18569 ---@return integer objnum # Object number.
18570 ---
18571 ---@see pdf.obj
18572 ---@see pdf.immediateobj
18573 ---
18574 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18575 function pdf.reserveobj() end
18576
18577 ---
18578 ---Create a annotation object.
18579 ---
18580 ---Annotation object are not written to file directly but must be registered with `pdf.registerannot()`.
18581 ---
18582 ---@param annot string # Literal string `'annot'`.
18583 ---
18584 ---@return integer objnum # Object number.
18585 ---@see pdf.registerannot
18586 ---
18587 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18588 function pdf.reserveobj(annot) end
18589
18590 ---
18591 ---Return object number of page <pagenum>.
18592 ---
18593 ---This can be a forwar reference, i.e. page <pagenum> doesn't have to be created yet.
18594 ---
18595 ---@param pagenum integer # Page number.
18596 ---
18597 ---@return integer objnum # Object number.
18598 ---
18599 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18600 function pdf.getpageref(pagenum) end
18601
18602 ---
18603 ---Add an `/Annot` object to the `/Annots` dictionary.
18604 ---
18605 ---@param objnum integer # Object number of `/Annot` object.
18606 ---
18607 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18608 function pdf.registerannot(objnum) end
18609
18610 ---
18611 ---Allocate a new color stack and returns it's id. The arguments
18612 ---are the same as for the similar backend extension primitive.
18613 ---
18614 ---```
18615 ---pdf.newcolorstack("0 g","page",true) --
18616 ---```
18617 ---
18618 ---__Reference:__
18619 ---
18620 ---* Corresponding C source code: [lpdflib.c#L1166-L1199](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1166-L1199)
18621 ---
18622 ---@param s string
18623 ---@param literal_mode 'page'|'direct'|'origin'|'text'|'raw'
18624 ---@param page_start boolean
18625 ---
18626 ---@return integer color_stack_id
18627 ---
18628 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18629 function pdf.newcolorstack(s, literal_mode, page_start) end
18630
18631 ---
18632 ---Force some additional code into the font resource.
18633 ---
18634 ---It can for
18635 ---instance be used to add a custom `ToUnicode` vector to a bitmap file.
18636 ---
18637 ---__Reference:__
18638 ---
18639 ---* Corresponding C source code: [lpdflib.c#L1202-L1216](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1202-L1216)
18640 ---@param font_id integer
18641 ---@param pdf_code integer
18642 ---
18643 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18644 function pdf.setfontattributes(font_id, pdf_code) end
18645
18646 ---
18647 ---@deprecated
18648 ---@see pdf.getfontname
18649 ---
18650 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18651 function pdf.fontname() end
18652
18653 ---
18654 ---@deprecated
18655 ---@see pdf.getpdffontsize
18656 ---
18657 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18658 function pdf.fontsize() end
18659
18660 ---
18661 ---Return how many objects were created so far.
18662 ---
18663 ---@return integer n # Number of objects.
18664 ---
18665 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18666 function pdf.maxobjnum() end
18667
18668 ---
18669 ---Return number of object that are written or not yet written to file.
18670 ---
18671 ---__Reference:__
18672 ---
18673 ---* Corresponding C source code: [lpdflib.c#L1270-L1285](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1270-L1285)
18674 ---
18675 ---@return integer written_obj # Object written to file.
18676 ---@return integer not_written_obj # Object not yet written to file.
18677 ---
18678 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18679 function pdf.getnofobjects() end
18680
18681 ---
18682 ---__Reference:__
18683 ---
18684 ---* Corresponding C source code: [lpdflib.c#L1218-L1235](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1218-L1235)
18685 ---
18686 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18687 function pdf.includechar() end
18688
18689 ---
18690 ---__Reference:__
18691 ---
18692 ---* Corresponding C source code: [lpdflib.c#L1237-L1242](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1237-L1242)
18693 ---
18694 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18695 function pdf.includefont() end
18696
18697 ---
18698 ---__Reference:__
18699 ---
18700 ---* Corresponding C source code: [lpdflib.c#L1244-L1268](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1244-L1268)
18701 ---
18702 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18703 function pdf.includeimage() end
18704
18705 ---
18706 ---@deprecated
18707 ---@see pdf.getobjtype
18708 ---
18709 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18710 function pdf.objtype() end
18711
18712 ---
18713 ---@deprecated
18714 ---@see pdf.getpageref
18715 ---
18716 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18717 function pdf.pageref() end
18718
18719 ---
18720 ---__Reference:__
18721 ---
18722 ---* Corresponding C source code: [lpdflib.c#L871-L879](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L871-L879)
18723 ---
18724 ---@param force boolean
18725 ---
18726 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18727 function pdf.setforcefile(force) end
18728
18729 ---
18730 ---__Reference:__
18731 ---
18732 ---* Corresponding C source code: [lpdflib.c#L1294-L1298](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L1294-L1298)
18733 ---
18734 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18735 function pdf.settypeonewidemode() end
18736
18737 ---
18738 ---@deprecated
18739 ---@see pdf.getxformname
18740 ---
18741 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
18742 function pdf.xformname() end
18743
18744 ---
18745 ---The definitions are developed in this repository: https://github.com/LuaCATS/luafilesystem
18746 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
18747 ---Changes to upstream: global lfs table---
18748 ---@class LuaFileSystem.Attributes
18749 ---@field [LuaFileSystem.AttributeName] any
18750 ---@field ['mode'] LuaFileSystem.AttributeMode
18751
18752 ---
18753 ---@alias LuaFileSystem.AttributeMode
18754 ---|'file'
18755 ---|'directory'
18756 ---|'link'
18757 ---|'socket'
18758 ---|'char device'
18759 ---|"block device"
18760 ---|"named pipe"
18761
18762 ---
18763 ---@alias LuaFileSystem.AttributeName
18764 ---|'dev' -- on Unix systems, this represents the device that the inode resides on. On Windows systems, represents the drive number of the disk containing the file
18765 ---|'ino' -- on Unix systems, this represents the inode number. On Windows systems this has no meaning
18766 ---|'mode' -- string representing the associated protection mode (the values could be file, directory, link, socket, named pipe, char device, block device or other)
18767 ---|'nlink' -- number of hard links to the file
18768 ---|'uid' -- user-id of owner (Unix only, always 0 on Windows)
18769 ---|'gid' -- group-id of owner (Unix only, always 0 on Windows)
18770 ---|'rdev' -- on Unix systems, represents the device type, for special file inodes. On Windows systems represents the same as dev
18771 ---|'access' -- time of last access
18772 ---|'modification' -- time of last data modification
18773 ---|'change' -- time of last file status change
18774 ---|'size' -- file size, in bytes
18775 ---|'permissions' -- file permissions string
18776 ---|'blocks' -- block allocated for file; (Unix only)
18777 ---|'blksize' -- optimal file system I/O blocksize; (Unix only)
18778
18779 ---
18780 ---@class LuaFileSystem
18781 lfs = {}
18782
18783 --[[
18784 Returns a table with the file attributes corresponding to filepath (or nil followed by an error message and a system-dependent error code in case of error). If the second optional argument is given and is a string, then only the value of the named attribute is returned (this use is equivalent to lfs.attributes(filepath)[request_name], but the table is not created and only one attribute is retrieved from the O.S.). if a table is passed as the second argument, it (result_table) is filled with attributes and returned instead of a new table. The attributes are described as follows; attribute mode is a string, all the others are numbers, and the time related attributes use the same time reference of os.time:
18785 ]]
18786 ---@overload fun(filepath:string):LuaFileSystem.Attributes
18787 ---@overload fun(filepath:string, result_table:LuaFileSystem.Attributes)
18788 ---@param filepath string
18789 ---@param request_name LuaFileSystem.AttributeName
18790 ---@return string|integer|LuaFileSystem.AttributeMode
18791 function lfs.attributes(filepath, request_name) end
18792
18793 --[[
18794 Changes the current working directory to the given path.
18795 Returns true in case of success or nil plus an error string.
18796 ]]
18797 ---@param path string
18798 ---@return boolean, string
18799 function lfs.chdir(path) end
18800
18801 --[[
18802 Creates a lockfile (called lockfile.lfs) in path if it does not exist and returns the lock. If the lock already exists checks if it's stale, using the second parameter (default for the second parameter is INT_MAX, which in practice means the lock will never be stale. To free the the lock call lock:free().
18803 In case of any errors it returns nil and the error message. In particular, if the lock exists and is not stale it returns the "File exists" message.
18804 ]]
18805 ---@param path string
18806 ---@param seconds_stale? number
18807 ---@return boolean, string
18808 function lfs.lock_dir(path, seconds_stale) end
18809
18810 ---
18811 ---Returns a string with the current working directory or nil plus an error string.
18812 ---@return string
18813 function lfs.currentdir() end
18814
18815 --[[
18816 Lua iterator over the entries of a given directory. Each time the iterator is called with dir_obj it returns a directory entry's name as a string, or nil if there are no more entries. You can also iterate by calling dir_obj:next(), and explicitly close the directory before the iteration finished with dir_obj:close(). Raises an error if path is not a directory.
18817 ]]
18818 ---@param path string
18819 ---@return fun():string
18820 function lfs.dir(path) end
18821
18822 --[[
18823 Locks a file or a part of it. This function works on open files; the file handle should be specified as the first argument. The string mode could be either r (for a read/shared lock) or w (for a write/exclusive lock). The optional arguments start and length can be used to specify a starting point and its length; both should be numbers.
18824 Returns true if the operation was successful; in case of error, it returns nil plus an error string.
18825 ]]
18826 ---@param filehandle file*
18827 ---@param mode openmode
18828 ---@param start? integer
18829 ---@param length? integer
18830 ---@return boolean, string
18831 function lfs.lock(filehandle, mode, start, length) end
18832
18833 --[[
18834 Creates a link. The first argument is the object to link to and the second is the name of the link. If the optional third argument is true, the link will by a symbolic link (by default, a hard link is created).
18835 ]]
18836 ---@param old string
18837 ---@param new string
18838 ---@param symlink? boolean
18839 ---@return boolean, string
18840 function lfs.link(old, new, symlink) end
18841
18842 --[[
18843 Creates a new directory. The argument is the name of the new directory.
18844 Returns true in case of success or nil, an error message and a system-dependent error code in case of error.
18845 ]]
18846 ---@param dirname string
18847 ---@return boolean, string
18848 function lfs.mkdir(dirname) end
18849
18850 --[[
18851 Removes an existing directory. The argument is the name of the directory.
18852 Returns true in case of success or nil, an error message and a system-dependent error code in case of error.
18853 ]]
18854 ---@param dirname string
18855 ---@return boolean, string
18856 function lfs.rmdir(dirname) end
18857
18858 --[[
18859 Sets the writing mode for a file. The mode string can be either "binary" or "text". Returns true followed the previous mode string for the file, or nil followed by an error string in case of errors. On non-Windows platforms, where the two modes are identical, setting the mode has no effect, and the mode is always returned as binary.
18860 ]]
18861 ---@param file string
18862 ---@param mode 'binary'|'text'
18863 ---@return boolean, string
18864 function lfs.setmode(file, mode) end
18865
18866 --[[
18867 Identical to lfs.attributes except that it obtains information about the link itself (not the file it refers to). It also adds a target field, containing the file name that the symlink points to. On Windows this function does not yet support links, and is identical to lfs.attributes.
18868 ]]
18869 ---@param filepath string
18870 ---@param request_name? LuaFileSystem.AttributeName
18871 ---@return LuaFileSystem.Attributes
18872 function lfs.symlinkattributes(filepath, request_name) end
18873
18874 --[[
18875 Set access and modification times of a file. This function is a bind to utime function. The first argument is the filename, the second argument (atime) is the access time, and the third argument (mtime) is the modification time. Both times are provided in seconds (which should be generated with Lua standard function os.time). If the modification time is omitted, the access time provided is used; if both times are omitted, the current time is used.
18876 Returns true in case of success or nil, an error message and a system-dependent error code in case of error.
18877 ]]
18878 ---@param filepath string
18879 ---@param atime? integer
18880 ---@param mtime? integer
18881 ---@return boolean, string
18882 function lfs.touch(filepath, atime, mtime) end
18883
18884 --[[
18885 Unlocks a file or a part of it. This function works on open files; the file handle should be specified as the first argument. The optional arguments start and length can be used to specify a starting point and its length; both should be numbers.
18886 Returns true if the operation was successful; in case of error, it returns nil plus an error string.
18887 ]]
18888 ---@param filehandle file*
18889 ---@param start? integer
18890 ---@param length? integer
18891 ---@return boolean, string
18892 function lfs.unlock(filehandle, start, length) end
18893
18894 ---
18895 ---Changes to upstream: global zlib table
18896
18897 ---
18898 ---The definitions are developed in this repository: https://github.com/LuaCATS/lzlib
18899
18900 ---
18901 ---`lzlib`, by Tiago Dionizio.
18902 ---
18903 ---__Reference:__
18904 ---
18905 ---* Old location: http://luaforge.net/projects/lzlib/.
18906 ---* More recent git repo (archived): https://github.com/LuaDist/lzlib
18907 ---* On luarocks: https://luarocks.org/modules/hisham/lzlib
18908 ---
18909 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
18910 zlib = {}
18911
18912 ---
18913 ---Return the zlib version.
18914 ---
18915 ---__Example:__
18916 ---
18917 ---```lua
18918 ---local version = zlib.version()
18919 ---assert(version == '1.2.13')
18920 ---```
18921 ---
18922 ---__Reference:__
18923 ---
18924 ---* Corresponding C source code: [lzlib.c#L331-L335](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L331-L335)
18925 ---
18926 ---@return string version # For example `1.2.13`
18927 ---
18928 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
18929 function zlib.version() end
18930
18931 ---
18932 ---Return the initial `adler32` value.
18933 ---
18934 ---Call to update the `adler32` value, `adler32` is the current value, `buffer` is passed
18935 ---to `adler32` zlib function and the updated value is returned.
18936 ---
18937 ---This function is not related to compression but is exported anyway because it might be useful in applications using the compression library.
18938 ---
18939 ---__Example:__
18940 ---
18941 ---```lua
18942 ---local adler = zlib.adler32()
18943 ---assert(adler == 1.0)
18944 ---adler = zlib.adler32(adler, 'some text')
18945 ---assert(adler == 300417946.0)
18946 ---adler = zlib.adler32(adler, 'some text')
18947 ---assert(adler == 1144063795.0)
18948 ---adler = zlib.adler32(adler, 'some text')
18949 ---assert(adler == 2530937548.0)
18950 ---```
18951 ---
18952 ---__Reference:__
18953 ---
18954 ---* Corresponding C source code: [lzlib.c#L338-L355](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L338-L355)
18955 ---
18956 ---@param adler32? number
18957 ---@param buffer? string
18958 ---
18959 ---@return number adler32
18960 ---
18961 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
18962 function zlib.adler32(adler32, buffer) end
18963
18964 ---
18965 ---Return the initial `crc32` (Cyclic Redundancy Check) value.
18966 ---
18967 ---Call to update the `crc32` value, `crc32` is the current value, `buffer` is passed
18968 ---to `crc32` zlib function and the updated value is returned.
18969 ---
18970 ---This function is not related to compression but is exported anyway because it might be useful in applications using the compression library.
18971 ---
18972 ---__Example:__
18973 ---
18974 ---```lua
18975 ---local crc = zlib.crc32()
18976 ---assert(crc == 0.0)
18977 ---crc = zlib.crc32(crc, 'some text')
18978 ---assert(crc == 1337638330.0)
18979 ---crc = zlib.crc32(crc, 'some text')
18980 ---assert(crc == 2768805016.0)
18981 ---crc = zlib.crc32(crc, 'some text')
18982 ---assert(crc == 1021719064.0)
18983 ---```
18984 ---
18985 ---__Reference:__
18986 ---
18987 ---* Corresponding C source code: [lzlib.c#L358-L375](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L358-L375)
18988 ---
18989 ---@param crc32? number
18990 ---@param buffer? string
18991 ---
18992 ---@return number crc32
18993 ---
18994 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
18995 function zlib.adler32(crc32, buffer) end
18996
18997 ---
18998 ---Return a string containing the compressed buffer according to the given parameters.
18999 ---
19000 ---__Example:__
19001 ---
19002 ---```lua
19003 ---local orig = [[
19004 ---Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
19005 ---nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
19006 ---sed diam voluptua.
19007 ---]]
19008 ---assert(string.len(zlib.compress(orig)) < string.len(orig))
19009 ---```
19010 ---
19011 ---__Reference:__
19012 ---
19013 ---* Corresponding C source code: [lzlib.c#L380-L441](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L380-L441)
19014 ---
19015 ---@param buffer string
19016 ---@param level? integer # The compression level must be `-1` (default compression), or between `0` and `9`: `1` gives best speed, `9` gives best compression, `0` gives no compression at all (the input data is simply copied a block at a time).
19017 ---@param method? integer # The method parameter is the compression method. It must be `8` (`Z_DEFLATED`) in this version of the library.
19018 ---@param window_bits? integer # `The window_bits` parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range `8..15` for this version of the library, default `15`.
19019 ---@param mem_level? integer - default `8`
19020 ---@param strategy? integer - default `Z_DEFAULT_STRATEGY`
19021 ---
19022 ---@return string buffer
19023 ---
19024 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19025 function zlib.compress(buffer, level, method, window_bits, mem_level, strategy) end
19026
19027 ---
19028 ---Return the decompressed stream after processing the given buffer.
19029 ---
19030 ---__Example:__
19031 ---
19032 ---```lua
19033 ---local uncompressed = 'Lorem ipsum'
19034 ---local compressed = zlib.compress(uncompressed)
19035 ---local result = zlib.decompress(compressed)
19036 ---assert(result == uncompressed)
19037 ---```
19038 ---
19039 ---__Reference:__
19040 ---
19041 ---* Corresponding C source code: [lzlib.c#L445-L502](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L445-L502)
19042 ---
19043 ---@param buffer string
19044 ---@param window_bits? integer # `The window_bits` parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range `8..15` for this version of the library, default `15`.
19045 ---
19046 ---@return string
19047 ---
19048 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19049 function zlib.decompress(buffer, window_bits) end
19050
19051 ---
19052 ---Return a deflate stream.
19053 ---
19054 ---In the upstream project this function is called `zlib.deflate()`.
19055 ---
19056 ---__Example:__
19057 ---
19058 ---```lua
19059 ---local z_stream = zlib.compressobj(1)
19060 ---local result = z_stream:compress('test')
19061 ---assert(type(result) == 'string')
19062 ---```
19063 ---
19064 ---__Reference:__
19065 ---
19066 ---* Corresponding C source code: [lzlib.c#L156-L173](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L156-L173)
19067 ---
19068 ---@param level? integer # The compression level must be `-1` (default compression), or between `0` and `9`: `1` gives best speed, `9` gives best compression, `0` gives no compression at all (the input data is simply copied a block at a time).
19069 ---@param method? integer # The method parameter is the compression method. It must be `8` (`Z_DEFLATED`) in this version of the library.
19070 ---@param window_bits? integer # `The window_bits` parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range `8..15` for this version of the library, default `15`.
19071 ---@param mem_level? integer - default `8`
19072 ---@param strategy? integer - default `Z_DEFAULT_STRATEGY`
19073 ---
19074 ---@return ZStream
19075 ---
19076 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19077 function zlib.compressobj(level, method, window_bits, mem_level, strategy) end
19078
19079 ---
19080 ---Return an inflate stream.
19081 ---
19082 ---In the upstream project this function is called `zlib.inflate()`.
19083 ---
19084 ---__Example:__
19085 ---
19086 ---```lua
19087 ---local z_stream_com = zlib.compressobj(1)
19088 ---local compressed = z_stream_com:compress('test')
19089 ---compressed = compressed .. z_stream_com:flush()
19090 ---
19091 ---local z_stream_decomp = zlib.decompressobj()
19092 ---local result = z_stream_decomp:decompress(compressed)
19093 ---assert(result == 'test')
19094 ---```
19095 ---
19096 ---__Reference:__
19097 ---
19098 ---* Corresponding C source code: [lzlib.c#L177-L191](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L177-L191)
19099 ---
19100 ---@param window_bits? integer # `The window_bits` parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range `8..15` for this version of the library, default `15`.
19101 ---
19102 ---@return ZStream
19103 ---
19104 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19105 function zlib.decompressobj(window_bits) end
19106
19107 ---
19108 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19109 ---@class ZStream
19110 local ZStream = {}
19111
19112 ---
19113 ---__Reference:__
19114 ---
19115 ---* Corresponding C source code: [lzlib.c#L307-L322](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L307-L322)
19116 ---
19117 function ZStream:adlerreset() end
19118
19119 ---
19120 ---__Reference:__
19121 ---
19122 ---* Corresponding C source code: [lzlib.c#L231-L263](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L231-L263)
19123 ---
19124 ---@param buffer string
19125 ---
19126 ---@return string buffer
19127 function ZStream:compress(buffer) end
19128
19129 ---
19130 ---__Reference:__
19131 ---
19132 ---* Corresponding C source code: [lzlib.c#L195-L227](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L195-L227)
19133 ---
19134 ---@param buffer string
19135 ---
19136 ---@return string buffer
19137 function ZStream:decompress(buffer) end
19138
19139 ---
19140 ---Flush the output for deflate streams.
19141 ---
19142 ---__Reference:__
19143 ---
19144 ---* Corresponding C source code: [lzlib.c#L267-L303](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L267-L303)
19145 ---
19146 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19147 function ZStream:flush() end
19148
19149 ---
19150 ---Close the stream.
19151 ---
19152 ---__Reference:__
19153 ---
19154 ---* Corresponding C source code: [lzlib.c#L138-L143](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L138-L143)
19155 ---
19156 ---😱 [Types](https://github.com/LuaCATS/lzlib/blob/main/library/lzlib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/lzlib/pulls)
19157 function ZStream:close() end
19158
19159 ---
19160 ---__Reference:__
19161 ---
19162 ---* Corresponding C source code: [lzlib.c#L147-L152](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazlib/lzlib.c#L147-L152)
19163 ---
19164 ---@return number adler
19165 function ZStream.adler() end
19166
19167 ---
19168 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/trunk/source/texk/web2c/luatexdir/luasocket/src/mime.lua
19169 ---Changes to upstream: global mime table
19170
19171 ---
19172 ---The definitions are developed in this repository: https://github.com/LuaCATS/luasocket
19173
19174 ---
19175 ---https://lunarmodules.github.io/luasocket/mime.html
19176 ---
19177 ---The `mime` namespace offers filters that apply and remove common
19178 ---content transfer encodings, such as Base64 and Quoted-Printable.
19179 ---It also provides functions to break text into lines and change
19180 ---the end-of-line convention.
19181 ---MIME is described mainly in
19182 ---RFC 2045,
19183 ---2046,
19184 ---2047,
19185 ---2048, and
19186 ---2049.
19187 ---
19188 ---All functionality provided by the MIME module
19189 ---follows the ideas presented in
19190 ---
19191 ---LTN012, Filters sources and sinks.
19192 ---
19193 ---To obtain the `mime` namespace, run:
19194 ---
19195 ---```
19196 ----- loads the MIME module and everything it requires
19197 ---local mime = require("mime")
19198 ---```
19199 ---
19200 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19201 mime = {}
19202
19203 ---
19204 ---Returns a filter that decodes data from a given transfer content
19205 ---encoding.
19206 ---
19207 ---In the Quoted-Printable case, the user can specify whether the data is
19208 ---textual or binary, by passing the `mode` strings "`text`" or
19209 ---"`binary`". `Mode` defaults to "`text`".
19210 ---
19211 ---@param name 'base64'|'quoted-printable'
19212 ---
19213 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19214 function mime.decode(name) end
19215
19216 ---
19217 ---Returns a filter that encodes data according to a given transfer content
19218 ---encoding.
19219 ---
19220 ---In the Quoted-Printable case, the user can specify whether the data is
19221 ---textual or binary, by passing the `mode` strings "`text`" or
19222 ---"`binary`". `Mode` defaults to "`text`".
19223 ---
19224 ---@param name 'base64'|'quoted-printable'
19225 ---@param mode? 'text'|'binary'
19226 ---
19227 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19228 function mime.encode(name, mode) end
19229
19230 ---
19231 ---Converts most common end-of-line markers to a specific given marker.
19232 ---
19233 ---`Marker` is the new marker. It defaults to CRLF, the canonic
19234 ---end-of-line marker defined by the MIME standard.
19235 ---
19236 ---The function returns a filter that performs the conversion.
19237 ---
19238 ---Note: There is no perfect solution to this problem. Different end-of-line
19239 ---markers are an evil that will probably plague developers forever.
19240 ---This function, however, will work perfectly for text created with any of
19241 ---the most common end-of-line markers, i.e. the Mac OS (CR), the Unix (LF),
19242 ---or the DOS (CRLF) conventions. Even if the data has mixed end-of-line
19243 ---markers, the function will still work well, although it doesn't
19244 ---guarantee that the number of empty lines will be correct.
19245 ---
19246 ---@param marker string
19247 ---
19248 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19249 function mime.normalize(marker) end
19250
19251 ---
19252 ---Creates and returns a filter that performs stuffing of SMTP messages.
19253 ---
19254 ---Note: The `smtp.send`function
19255 ---uses this filter automatically. You don't need to chain it with your
19256 ---source, or apply it to your message body.
19257 ---
19258 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19259 function mime.stuff() end
19260
19261 ---
19262 ---Returns a filter that breaks data into lines.
19263 ---
19264 ---The "`text`" line-wrap filter simply breaks text into lines by
19265 ---inserting CRLF end-of-line markers at appropriate positions.
19266 ---`Length` defaults 76.
19267 ---The "`base64`" line-wrap filter works just like the default
19268 ---"`text`" line-wrap filter with default length.
19269 ---The function can also wrap "`quoted-printable`" lines, taking care
19270 ---not to break lines in the middle of an escaped character. In that case, the
19271 ---line length is fixed at 76.
19272 ---
19273 ---For example, to create an encoding filter for the Quoted-Printable transfer content encoding of text data, do the following:
19274 ---
19275 ---```
19276 ---qp = ltn12.filter.chain(
19277 --- mime.normalize(),
19278 --- mime.encode("quoted-printable"),
19279 --- mime.wrap("quoted-printable")
19280 ---)
19281 ---```
19282 ---
19283 ---Note: To break into lines with a different end-of-line convention, apply
19284 ---a normalization filter after the line break filter.
19285 ---
19286 ---@param name 'text'|'base64'|'quoted-printable'
19287 ---@param length integer
19288 ---
19289 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19290 function mime.wrap(name, length) end
19291
19292 ---
19293 ---Low-level filter to perform Base64 encoding.
19294 ---
19295 ---If `D` is `nil`, `A` is padded with
19296 ---the encoding of the remaining bytes of `C`.
19297 ---
19298 ---Note: The simplest use of this function is to encode a string into it's
19299 ---Base64 transfer content encoding. Notice the extra parenthesis around the
19300 ---call to `mime.b64`, to discard the second return value.
19301 ---
19302 ---```
19303 ---print((mime.b64("diego:password")))
19304 -----&gt; ZGllZ286cGFzc3dvcmQ=
19305 ---```
19306 ---
19307 ---@param C string
19308 ---@param D? string
19309 ---
19310 ---@return string A - `A` is the encoded version of the largest prefix of `C..D` that can be encoded unambiguously.
19311 ---@return string B - `B` has the remaining bytes of `C..D`, before encoding.
19312 ---
19313 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19314 function mime.b64(C, D) end
19315
19316 ---
19317 ---Low-level filter to perform SMTP stuffing and enable transmission of
19318 ---messages containing the sequence "CRLF.CRLF".
19319 ---
19320 ---Note: The message body is defined to begin with
19321 ---an implicit CRLF. Therefore, to stuff a message correctly, the
19322 ---first `m` should have the value 2.
19323 ---
19324 ---```
19325 ---print((string.gsub(mime.dot(2, ".\r\nStuffing the message.\r\n.\r\n."), "\r\n", "\\n")))
19326 -----&gt; ..\nStuffing the message.\n..\n..
19327 ---```
19328 ---
19329 ---Note: The `smtp.send`function
19330 ---uses this filter automatically. You don't need to
19331 ---apply it again.
19332 ---
19333 ---@param m integer - '`m`' should tell the same, but for the previous chunk.
19334 ---@param B? string
19335 ---
19336 ---@return string A - `A` is the stuffed version of `B`.
19337 ---@return integer n - `n` gives the number of characters from the sequence CRLF seen in the end of `B`.
19338 ---
19339 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19340 function mime.dot(m, B) end
19341
19342 ---
19343 ---A, B = mime.eol(C [, D, marker])
19344 ---
19345 ---Low-level filter to perform end-of-line marker translation.
19346 ---For each chunk, the function needs to know if the last character of the
19347 ---previous chunk could be part of an end-of-line marker or not. This is the
19348 ---context the function receives besides the chunk. An updated version of
19349 ---the context is returned after each new chunk.
19350 ---
19351 ---```
19352 ----- translates the end-of-line marker to UNIX
19353 ---unix = mime.eol(0, dos, "\n")
19354 ---```
19355 ---
19356 ---@param C integer # `C` is the ASCII value of the last character of the previous chunk, if it was a candidate for line break, or 0 otherwise.
19357 ---@param D? string
19358 ---@param marker string `Marker` gives the new end-of-line marker and defaults to CRLF.
19359 ---
19360 ---@return string A # `A` is the translated version of `D`.
19361 ---@return string B # `B` is the same as `C`, but for the current chunk.
19362 ---
19363 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19364 function mime.eol(C, D, marker) end
19365
19366 ---
19367 ---Low-level filter to perform Quoted-Printable encoding.
19368 ---
19369 ---Note: The simplest use of this function is to encode a string into it's
19370 ---Quoted-Printable transfer content encoding.
19371 ---Notice the extra parenthesis around the call to `mime.qp`, to discard the second return value.
19372 ---
19373 ---```
19374 ---print((mime.qp("ma��")))
19375 -----&gt; ma=E7=E3=
19376 ---```
19377 ---
19378 ---@param C string
19379 ---@param D? string If `D` is `nil`, `A` is padded with the encoding of the remaining bytes of `C`.
19380 ---@param marker string Throughout encoding, occurrences of CRLF are replaced by the `marker`, which itself defaults to CRLF.
19381 ---
19382 ---@return string A # `A` is the encoded version of the largest prefix of `C..D` that can be encoded unambiguously.
19383 ---@return string B # `B` has the remaining bytes of `C..D`, before decoding.
19384 ---
19385 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19386 function mime.qp(C, D, marker) end
19387
19388 ---
19389 ---Low-level filter to break Quoted-Printable text into lines.
19390 ---
19391 ---Note: Besides breaking text into lines, this function makes sure the line
19392 ---breaks don't fall in the middle of an escaped character combination. Also,
19393 ---this function only breaks lines that are bigger than `length` bytes.
19394 ---
19395 ---@param n integer `n` should tell how many bytes are left for the first line of `B`
19396 ---@param B? string
19397 ---@param length? any # broken into lines of at most `length` bytes (defaults to 76).
19398 ---
19399 ---@return string A # `A` is a copy of `B`, broken into lines of at most `length` bytes (defaults to 76).
19400 ---@return integer m # returns the number of bytes left in the last line of `A`.
19401 ---
19402 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19403 function mime.qpwrp(n, B, length) end
19404
19405 ---
19406 ---Low-level filter to perform Base64 decoding.
19407 ---
19408 ---If `D` is `nil`, `A` is the empty string
19409 ---and `B` returns whatever couldn't be decoded.
19410 ---
19411 ---Note: The simplest use of this function is to decode a string from it's
19412 ---Base64 transfer content encoding.
19413 ---Notice the extra parenthesis around the call to `mime.unqp`, to discard the second return value.
19414 ---
19415 ---```
19416 ---print((mime.unb64("ZGllZ286cGFzc3dvcmQ=")))
19417 -----&gt; diego:password
19418 ---```
19419 ---
19420 ---@param C string
19421 ---@param D? string
19422 ---
19423 ---@return string A # `A` is the decoded version of the largest prefix of `C..D` that can be decoded unambiguously.
19424 ---@return string B # `B` has the remaining bytes of `C..D`, before decoding.
19425 ---
19426 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19427 function mime.unb64(C, D) end
19428
19429 ---
19430 ---Low-level filter to remove the Quoted-Printable transfer content encoding
19431 ---from data.
19432 ---
19433 ---Note: The simplest use of this function is to decode a string from it's
19434 ---Quoted-Printable transfer content encoding.
19435 ---Notice the extra parenthesis around the call to `mime.unqp`, to discard the second return value.
19436 ---
19437 ---```
19438 ---print((mime.qp("ma=E7=E3=")))
19439 -----&gt; ma��
19440 ---```
19441 ---
19442 ---@param C string
19443 ---@param D? string
19444 ---
19445 ---@return string A # `A` is the decoded version of the largest prefix of `C..D` that can be decoded unambiguously. If `D` is `nil`, `A` is augmented with the encoding of the remaining bytes of `C`.
19446 ---@return string B # `B` has the remaining bytes of `C..D`, before decoding.
19447 ---
19448 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19449 function mime.unqp(C, D) end
19450
19451 ---
19452 ---Low-level filter to break text into lines with CRLF marker.
19453 ---Text is assumed to be in the `normalize` form.
19454 ---
19455 ---Note: This function only breaks lines that are bigger than
19456 ---`length` bytes. The resulting line length does not include the CRLF
19457 ---marker.
19458 ---
19459 ---@param n integer `n` should tell how many bytes are left for the first line of `B`
19460 ---@param B? string
19461 ---@param length? any # broken into lines of at most `length` bytes (defaults to 76).
19462 ---
19463 ---@return string A # `A` is a copy of `B`, broken into lines of at most `length` bytes (defaults to 76).
19464 ---@return integer m # returns the number of bytes left in the last line of `A`.
19465 ---
19466 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mime.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
19467 function mime.wrp(n, B, length) end
19468
19469 ---
19470 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19471 img = {}
19472
19473 ---
19474 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19475 ---@class Image
19476 ---@field attr string # the image attributes for *LuaTeX*
19477 ---@field bbox table # table with 4 boundingbox dimensions `llx`, `lly`, `urx` and `ury` overruling the `pagebox` entry
19478 ---@field colordepth number # the number of bits used by the color space
19479 ---@field colorspace number # the color space object number
19480 ---@field depth number # the image depth for *LuaTeX*
19481 ---@field filename string # the image file name
19482 ---@field filepath string # the full (expanded) file name of the image
19483 ---@field height number # the image height for *LuaTeX*
19484 ---@field imagetype string # one of `pdf`, `png`, `jpg`, `jp2` or `jbig2`
19485 ---@field index number # the *PDF* image name suffix
19486 ---@field objnum number # the *PDF* image object number
19487 ---@field page number # the identifier for the requested image page
19488 ---@field pagebox string # the requested bounding box, one of `none`, `media`, `crop`, `bleed`, `trim`, `art`
19489 ---@field pages number # the total number of available pages
19490 ---@field rotation number # the image rotation from included *PDF* file, in multiples of 90 deg.
19491 ---@field stream string # the raw stream data for an `/Xobject` `/Form` object
19492 ---@field transform number # the image transform, integer number 0..7
19493 ---@field orientation number # the (jpeg) image orientation, integer number 1..8 (0 for unset)
19494 ---@field width number # the image width for *LuaTeX*
19495 ---@field xres number # the horizontal natural image resolution (in \DPI)
19496 ---@field xsize number # the natural image width
19497 ---@field yres number # the vertical natural image resolution (in \DPI)
19498 ---@field ysize number # the natural image height
19499 ---@field visiblefilename string # when set, this name will find its way in the *PDF* file as `PTEX` specification; when an empty string is assigned nothing is written to file; otherwise the natural filename is taken
19500 ---@field userpassword string # the userpassword needed for opening a *PDF* file
19501 ---@field ownerpassword string # the ownerpassword needed for opening a *PDF* file
19502 ---@field keepopen boolean # keep the *PDF* file open
19503 ---@field nobbox boolean # don't add a boundingbox specification for streams
19504 ---@field nolength boolean # don't add length key nor compress for streams
19505 ---@field nosize boolean # don't add size fields for streams
19506
19507 ---
19508 ---Create a userdata object of type “image”.
19509 ---
19510 ---```
19511 ---<image> var = img.new()
19512 ---<image> var = img.new(<table> image_spec)
19513 ---```
19514 ---
19515 ---This function creates a userdata object of type “image”. The `image_spec` argument is optional. If it is given, it must be a table, and that
19516 ---table must contain a `filename` key. A number of other keys can also be
19517 ---useful, these are explained below.
19518 ---
19519 ---You can either say
19520 ---
19521 ---```
19522 ---a = img.new()
19523 ---```
19524 ---
19525 ---followed by
19526 ---
19527 ---```
19528 ---a.filename = "foo.png"
19529 ---```
19530 ---
19531 ---or you can put the file name (and some or all of the other keys) into a table
19532 ---directly, like so:
19533 ---
19534 ---```
19535 ---a = img.new({filename='foo.pdf', page=1})
19536 ---```
19537 ---
19538 ---The generated `<image>` userdata object allows access to a set of
19539 ---user-specified values as well as a set of values that are normally filled in
19540 ---and updated automatically by *LuaTeX* itself. Some of those are derived from the
19541 ---actual image file, others are updated to reflect the *PDF* output status of the
19542 ---object.
19543 ---
19544 ---There is one required user-specified field: the file name (`filename`). It
19545 ---can optionally be augmented by the requested image dimensions (`width`,
19546 ---`depth`, `height`), user-specified image attributes (`attr`),
19547 ---the requested *PDF* page identifier (`page`), the requested boundingbox
19548 ---(`pagebox`) for *PDF* inclusion, the requested color space object (`colorspace`).
19549 ---
19550 ---The function `img.new` does not access the actual image file, it just
19551 ---creates the `<image>` userdata object and initializes some memory
19552 ---structures. The `<image>` object and its internal structures are
19553 ---automatically garbage collected.
19554 ---
19555 ---Once the image is scanned, all the values in the `<image>` except `width`, `height` and `depth`, become frozen, and you cannot change
19556 ---them any more.
19557 ---
19558 ---You can use `pdf.setignoreunknownimages(1)` (or at the *TeX* end the `pdfvariable` `ignoreunknownimages`) to get around a quit when no known
19559 ---image type is found (based on name or preamble). Beware: this will not catch
19560 ---invalid images and we cannot guarantee side effects. A zero dimension image is
19561 ---still included when requested. No special flags are set. A proper workflow will
19562 ---not rely in such a catch but make sure that images are valid.
19563 ---
19564 ---__Reference:__
19565 ---
19566 ---* Corresponding C source code: [limglib.c#L75-L102](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L75-L102)
19567 ---
19568 ---@param image_spec? ImageSpec
19569 ---
19570 ---@return Image
19571 ---
19572 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19573 function img.new(image_spec) end
19574
19575 ---
19576 ---__Reference:__
19577 ---
19578 ---* Corresponding C source code: [limglib.c#L301-L304](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L301-L304)
19579 ---@return ImageSpec keys
19580 ---
19581 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19582 function img.fields() end
19583
19584 ---
19585 ---Alias for img.fields()
19586 ---
19587 ---__Reference:__
19588 ---
19589 ---* Corresponding C source code: [limglib.c#L301-L304](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L301-L304)
19590 ---
19591 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19592 function img.keys() end
19593
19594 ---
19595 ---Must be a table, and that table must contain a `filename` key.
19596 ---
19597 ---__Reference:__
19598 ---
19599 ---* Corresponding C source code: [luatex-api.h#L506-L532](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luatex-api.h#L506-L532)
19600 ---
19601 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19602 ---@class ImageSpec
19603 ---@field attr? string # the image attributes for *LuaTeX*
19604 ---@field bbox? table # table with 4 boundingbox dimensions `llx`, `lly`, `urx` and `ury` overruling the `pagebox` entry
19605 ---@field colordepth? number # the number of bits used by the color space
19606 ---@field colorspace? number # the color space object number
19607 ---@field depth? number # the image depth for *LuaTeX*
19608 ---@field filename string # the image file name
19609 ---@field filepath? string # the full (expanded) file name of the image
19610 ---@field height? number # the image height for *LuaTeX*
19611 ---@field imagetype? string # one of `pdf`, `png`, `jpg`, `jp2` or `jbig2`
19612 ---@field index? number # the *PDF* image name suffix
19613 ---@field objnum? number # the *PDF* image object number
19614 ---@field page? number # the identifier for the requested image page
19615 ---@field pagebox? string # the requested bounding box, one of `none`, `media`, `crop`, `bleed`, `trim`, `art`
19616 ---@field pages? number # the total number of available pages
19617 ---@field rotation? number # the image rotation from included *PDF* file, in multiples of 90 deg.
19618 ---@field stream? string # the raw stream data for an `/Xobject` `/Form` object
19619 ---@field transform? number # the image transform, integer number 0..7
19620 ---@field orientation? number # the (jpeg) image orientation, integer number 1..8 (0 for unset)
19621 ---@field width? number # the image width for *LuaTeX*
19622 ---@field xres? number # the horizontal natural image resolution (in \DPI)
19623 ---@field xsize? number # the natural image width
19624 ---@field yres? number # the vertical natural image resolution (in \DPI)
19625 ---@field ysize? number # the natural image height
19626 ---@field visiblefilename? string # when set, this name will find its way in the *PDF* file as `PTEX` specification; when an empty string is assigned nothing is written to file; otherwise the natural filename is taken
19627 ---@field userpassword? string # the userpassword needed for opening a *PDF* file
19628 ---@field ownerpassword? string # the ownerpassword needed for opening a *PDF* file
19629 ---@field keepopen? boolean # keep the *PDF* file open
19630 ---@field nobbox? boolean # don't add a boundingbox specification for streams
19631 ---@field nolength? boolean # don't add length key nor compress for streams
19632 ---@field nosize? boolean # don't add size fields for streams
19633
19634 ---
19635 ---When you say `img.scan(a)` for a new image, the file is scanned, and
19636 ---variables such as `xsize`, `ysize`, image `type`, number of
19637 ---`pages`, and the resolution are extracted. Each of the `width`, `height`, `depth` fields are set up according to the image dimensions, if
19638 ---they were not given an explicit value already. An image file will never be
19639 ---scanned more than once for a given image variable. With all subsequent `img.scan(a)` calls only the dimensions are again set up (if they have been
19640 ---changed by the user in the meantime).
19641 ---
19642 ---For ease of use, you can do right-away a
19643 ---
19644 ---```lua
19645 ---<image> a = img.scan { filename = "foo.png" }
19646 ---```
19647 ---
19648 ---without a prior `img.new`.
19649 ---
19650 ---Nothing is written yet at this point, so you can do `a=img.scan`, retrieve
19651 ---the available info like image width and height, and then throw away `a`
19652 ---again by saying `a=nil`. In that case no image object will be reserved in
19653 ---the PDF, and the used memory will be cleaned up automatically.
19654 ---
19655 ---__Reference:__
19656 ---
19657 ---* Corresponding C source code: [limglib.c#L145-L157](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L145-L157)
19658 ---
19659 ---@param image Image|ImageSpec
19660 ---
19661 ---@return Image
19662 ---
19663 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19664 function img.scan(image) end
19665
19666 ---
19667 ---If you say `a = b`, then both variables point to the same `<image>`
19668 ---object. if you want to write out an image with different sizes, you can do
19669 ---`b = img.copy(a)`.
19670 ---
19671 ---Afterwards, `a` and `b` still reference the same actual image
19672 ---dictionary, but the dimensions for `b` can now be changed from their
19673 ---initial values that were just copies from `a`.
19674 ---
19675 ---__Reference:__
19676 ---
19677 ---* Corresponding C source code: [limglib.c#L104-L114](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L104-L114)
19678 ---
19679 ---@param image Image|ImageSpec
19680 ---
19681 ---@return Image
19682 ---
19683 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19684 function img.copy(image) end
19685
19686 ---
19687 ---Allocate a *PDF* object number and generate a rule node of
19688 ---subtype `image` and put it into the output list.
19689 ---
19690 ---By this the
19691 ---image `a` is placed into the page stream, and the image file is written out
19692 ---into an image stream object after the shipping of the current page is finished.
19693 ---
19694 ---Again you can do a terse call like
19695 ---
19696 ---```
19697 ---img.write { filename = "foo.png" }
19698 ---```
19699 ---
19700 ---The `<image>` variable is returned in case you want it for later
19701 ---processing. You can also write an object.
19702 ---
19703 ---__Reference:__
19704 ---
19705 ---* Corresponding C source code: [limglib.c#L267-L271](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L267-L271)
19706 ---
19707 ---@param image Image|ImageSpec
19708 ---
19709 ---@return Image
19710 ---
19711 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19712 function img.write(image) end
19713
19714 ---
19715 ---Allocate a *PDF* object number and write the
19716 ---image file for image `a` out immediately into the *PDF* file as
19717 ---an image stream object (like with `immediate` `\pdfximage`).
19718 ---
19719 ---The object
19720 ---number of the image stream dictionary is then available by the `objnum`
19721 ---key. No `pdf_refximage` whatsit node is generated. You will need an
19722 ---`img.write(a)` or `img.node(a)` call to let the image appear on the
19723 ---page, or reference it by another trick; else you will have a dangling image
19724 ---object in the *PDF* file.
19725 ---
19726 ---Also here you can do a terse call like
19727 ---
19728 ---```
19729 ---a = img.immediatewrite { filename = "foo.png" }
19730 ---```
19731 ---
19732 ---The `<image>` variable is returned and you will most likely need it.
19733 ---
19734 ---__Reference:__
19735 ---
19736 ---* Corresponding C source code: [limglib.c#L273-L282](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L273-L282)
19737 ---
19738 ---@param image Image|ImageSpec
19739 ---
19740 ---@return Image
19741 ---
19742 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19743 function img.immediatewrite(image) end
19744
19745 ---
19746 ---Copie an object from a (*PDF*) image
19747 ---file.
19748 ---
19749 ---This features is experimental and might disappear.
19750 ---
19751 ---__Reference:__
19752 ---
19753 ---* Corresponding C source code: [limglib.c#L284-L293](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L284-L293)
19754 ---
19755 ---@param image Image|ImageSpec
19756 ---@param objnum integer
19757 ---
19758 ---@return Image
19759 ---
19760 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19761 function img.immediatewriteobject(image, objnum) end
19762
19763 ---
19764 ---Allocate a *PDF* object number and return a whatsit node of
19765 ---subtype `pdf_refximage`, filled with the image parameters `width`,
19766 ---`height`, `depth`, and `objnum`.
19767 ---
19768 ---Also here you can do a terse
19769 ---call like:
19770 ---
19771 ---```
19772 ---n = img.node ({ filename = "foo.png" })
19773 ---```
19774 ---
19775 ---This example outputs an image:
19776 ---
19777 ---```
19778 ---node.write(img.node{filename="foo.png"})
19779 ---```
19780 ---
19781 ---__Reference:__
19782 ---
19783 ---* Corresponding C source code: [limglib.c#L295-L299](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L295-L299)
19784 ---
19785 ---@param image Image|ImageSpec
19786 ---
19787 ---@return Node
19788 ---
19789 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19790 function img.node(image) end
19791
19792 ---
19793 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19794 ---@alias ImgType `pdf` | `png` | `jpg` | `jp2` | `jbig2`
19795
19796 ---
19797 ---Return a list with the supported image file type names, currently
19798 ---these are `pdf`, `png`, `jpg`, `jp2` (JPEG 2000), and
19799 ---`jbig2`.
19800 ---
19801 ---```lua
19802 ---types = img.types()
19803 ---```
19804 ---
19805 ---__Reference:__
19806 ---
19807 ---* Corresponding C source code: [limglib.c#L306-L309](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L306-L309)
19808 ---
19809 ---@return ImgType[]
19810 ---
19811 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19812 function img.types() end
19813
19814 ---
19815 ---__Reference:__
19816 ---
19817 ---* Corresponding C source code: [luatex-api.h#L534-L540](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luatex-api.h#L534-L540)
19818 ---
19819 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19820 ---@alias ImgBox `media` | `crop` | `bleed` | `trim` | `art`
19821
19822 ---
19823 ---Return a list with the supported *PDF* page box names, currently
19824 ---these are `media`, `crop`, `bleed`, `trim`, and `art`, all in lowercase.
19825 ---
19826 ---```lua
19827 ---boxes = img.boxes()
19828 ---```
19829 ---
19830 ---__Reference:__
19831 ---
19832 ---* Corresponding C source code: [limglib.c#L311-L314](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/limglib.c#L311-L314)
19833 ---
19834 ---@return ImgBox[]
19835 ---
19836 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/img.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19837 function img.boxes() end ---
19838 ---This library provides the interface to *LuaTeX*'s structure representing a
19839 ---language, and the associated functions.
19840 ---
19841 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19842 lang = {}
19843
19844 ---
19845 ---The language object is the first argument to most of the other functions in the `lang` library.
19846 ---
19847 ---__Reference:__
19848 ---
19849 ---* Corresponding C source code: [texlang.c#L55-62](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lang/texlang.c#L55-62)
19850 ---
19851 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19852 ---@class Language
19853 Language = {}
19854
19855 ---
19856 ---Create a new language object, with an optional fixed id number.
19857 ---
19858 ---Create a new userdata object of type `<language>`.
19859 ---
19860 ---These functions can also be used as if they were object methods, using the colon
19861 ---syntax.
19862 ---
19863 ---__Reference:__
19864 ---
19865 ---* Corresponding C source code: [llanglib.c#L27-L48](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L27-L48)
19866 ---
19867 ---@param id? integer # Without an argument, the next available internal id number will be assigned to this object. With an argument, an object will be created that links to the internal language with that id number.
19868 ---
19869 ---@return Language # The language object.
19870 ---
19871 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19872 function lang.new(id) end
19873
19874 ---
19875 ---Return the current internal `language` id number.
19876 ---
19877 ---__Reference:__
19878 ---
19879 ---* Corresponding C source code: [llanglib.c#L50-L56](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L50-L56)
19880 ---
19881 ---@param language Language # The language object.
19882 ---
19883 ---@return integer # The number returned is the internal `language` id number this object refers to.
19884 ---
19885 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19886 function lang.id(language) end
19887
19888 ---
19889 ---Return the current internal `language` id number.
19890 ---
19891 ---__Reference:__
19892 ---
19893 ---* Corresponding C source code: [llanglib.c#L50-L56](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L50-L56)
19894 ---
19895 ---@return integer # The number returned is the internal `language` id number this object refers to.
19896 ---
19897 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19898 function Language:id() end
19899
19900 ---
19901 ---Add hyphenation exceptions.
19902 ---
19903 ---```lua
19904 ---local l = lang.new()
19905 ---lang.hyphenation(l, "man-u-script")
19906 ---print(lang.hyphenation(l)) -- man-u-script
19907 ---lang.hyphenation(l, "ca-tas-tro-phe")
19908 ---print(lang.hyphenation(l)) -- man-u-script ca-tas-tro-phe
19909 ---```
19910 ---
19911 ---__Reference:__
19912 ---
19913 ---* Corresponding C source code: [llanglib.c#L86-L104](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L86-L104)
19914 ---
19915 ---@param language Language # The language object.
19916 ---@param hyphenation_exceptions string
19917 ---
19918 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19919 function lang.hyphenation(language, hyphenation_exceptions) end
19920
19921 ---
19922 ---Add hyphenation exceptions.
19923 ---
19924 ---```lua
19925 ---local l = lang.new()
19926 ---l:hyphenation("man-u-script")
19927 ---print(l:hyphenation()) -- man-u-script
19928 ---l:hyphenation("ca-tas-tro-phe")
19929 ---print(l:hyphenation()) -- man-u-script ca-tas-tro-phe
19930 ---```
19931 ---
19932 ---__Reference:__
19933 ---
19934 ---* Corresponding C source code: [llanglib.c#L86-L104](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L86-L104)
19935 ---
19936 ---@param hyphenation_exceptions string
19937 ---
19938 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19939 function Language:hyphenation(hyphenation_exceptions) end
19940
19941 ---
19942 ---Get the hyphenation exceptions.
19943 ---
19944 ---__Reference:__
19945 ---
19946 ---* Corresponding C source code: [llanglib.c#L86-L104](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L86-L104)
19947 ---
19948 ---@param language Language # The language object.
19949 ---
19950 ---@return string|nil hyphenation_exceptions
19951 ---
19952 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19953 function lang.hyphenation(language) end
19954
19955 ---
19956 ---Get the hyphenation exceptions.
19957 ---
19958 ---__Reference:__
19959 ---
19960 ---* Corresponding C source code: [llanglib.c#L86-L104](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L86-L104)
19961 ---
19962 ---@return string|nil hyphenation_exceptions
19963 ---
19964 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19965 function Language:hyphenation() end
19966
19967 ---
19968 ---Clear the set of hyphenation exceptions.
19969 ---
19970 ---@param language Language
19971 ---
19972 ---__Reference:__
19973 ---
19974 ---* Corresponding C source code: [llanglib.c#L215-L221](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L215-L221)
19975 ---
19976 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19977 function lang.clear_hyphenation(language) end
19978
19979 ---
19980 ---Clear the exception dictionary (string) for this language.
19981 ---
19982 ---__Reference:__
19983 ---
19984 ---* Corresponding C source code: [llanglib.c#L223-L241](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L223-L241)
19985 ---
19986 ---@param language Language # The language object.
19987 ---@param o string
19988 ---
19989 ---@return string n
19990 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
19991 function lang.clean(language, o) end
19992
19993 ---
19994 ---Clear the exception dictionary (string) for this language.
19995 ---
19996 ---__Reference:__
19997 ---
19998 ---* Corresponding C source code: [llanglib.c#L223-L241](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L223-L241)
19999 ---
20000 ---@param o string # The language object.
20001 ---
20002 ---@return string n
20003 ---
20004 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20005 function lang.clean(o) end
20006
20007 ---
20008 ---Add additional patterns for this language object.
20009 ---
20010 ---__Reference:__
20011 ---
20012 ---* Corresponding C source code: [llanglib.c#L58-L76](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L58-L76)
20013 ---
20014 ---@param language Language # The language object.
20015 ---@param patterns string # For example `.ab3a .abb2 .ab5erk`
20016 ---
20017 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20018 function lang.patterns(language, patterns) end
20019
20020 ---
20021 ---Add additional patterns for this language object.
20022 ---
20023 ---__Reference:__
20024 ---
20025 ---* Corresponding C source code: [llanglib.c#L58-L76](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L58-L76)
20026 ---
20027 ---@param patterns string # For example `.ab3a .abb2 .ab5erk`
20028 ---
20029 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20030 function Language:patterns(patterns) end
20031
20032 ---
20033 ---Return the current set of patterns.
20034 ---
20035 ---__Reference:__
20036 ---
20037 ---* Corresponding C source code: [llanglib.c#L58-L76](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L58-L76)
20038 ---
20039 ---@param language Language # The language object.
20040 ---
20041 ---@return string|nil pattterns # For example `.ab3a .abb2 .ab5erk`
20042 ---
20043 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20044 function lang.patterns(language) end
20045
20046 ---
20047 ---Return the current set of patterns.
20048 ---
20049 ---__Reference:__
20050 ---
20051 ---* Corresponding C source code: [llanglib.c#L58-L76](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L58-L76)
20052 ---
20053 ---@return string|nil pattterns # For example `.ab3a .abb2 .ab5erk`
20054 ---
20055 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20056 function Language:patterns() end
20057
20058 ---
20059 ---Clear the set of hyphenation patterns.
20060 ---
20061 ---Clear the pattern dictionary for a language.
20062 ---
20063 ---__Reference:__
20064 ---
20065 ---* Corresponding C source code: [llanglib.c#L78-L84](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L78-L84)
20066 ---
20067 ---@param language Language
20068 ---
20069 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20070 function lang.clear_patterns(language) end
20071
20072 ---
20073 ---Set the value of the *TeX* parameter
20074 ---`\hyphenationmin`.
20075 ---
20076 ---__Reference:__
20077 ---
20078 ---* Corresponding C source code: [llanglib.c#L199-L213](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L199-L213)
20079 ---
20080 ---@param language Language
20081 ---@param min integer
20082 function lang.hyphenationmin(language, min) end
20083
20084 ---
20085 ---Get the value of the *TeX* parameter
20086 ---`\hyphenationmin`.
20087 ---
20088 ---__Reference:__
20089 ---
20090 ---* Corresponding C source code: [llanglib.c#L199-L213](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L199-L213)
20091 ---
20092 ---@param language Language # The language object.
20093 ---
20094 ---@return integer min
20095 ---
20096 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20097 function lang.hyphenationmin(language) end
20098
20099 ---
20100 ---Set the “pre-break” hyphen characters for implicit hyphenation in this language.
20101 ---
20102 ---The
20103 ---intial values are decimal 45 (hyphen) and decimal 0 (indicating emptiness).
20104 ---
20105 ---__Reference:__
20106 ---
20107 ---* Corresponding C source code: [llanglib.c#L106-L120](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L106-L120)
20108 ---
20109 ---@param language Language # The language object.
20110 ---@param char integer
20111 ---
20112 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20113 function lang.prehyphenchar(language, char) end
20114
20115 ---
20116 ---Get the “pre-break” hyphen characters for implicit hyphenation in this language.
20117 ---
20118 ---The
20119 ---intial values are decimal 45 (hyphen) and decimal 0 (indicating emptiness).
20120 ---
20121 ---__Reference:__
20122 ---
20123 ---* Corresponding C source code: [llanglib.c#L106-L120](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L106-L120)
20124 ---
20125 ---@param language Language # The language object.
20126 ---
20127 ---@return integer char
20128 ---
20129 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20130 function lang.prehyphenchar(language) end
20131
20132 ---
20133 ---Set the “post-break” hyphen characters for implicit hyphenation in this language.
20134 ---
20135 ---The
20136 ---intial values are decimal 45 (hyphen) and decimal 0 (indicating emptiness).
20137 ---
20138 ---__Reference:__
20139 ---
20140 ---* Corresponding C source code: [llanglib.c#L122-L136](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L122-L136)
20141 ---
20142 ---@param language Language # The language object.
20143 ---@param char integer
20144 ---
20145 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20146 function lang.posthyphenchar(language, char) end
20147
20148 ---
20149 ---Get the “post-break” hyphen characters for implicit hyphenation in this language.
20150 ---
20151 ---The
20152 ---intial values are decimal 45 (hyphen) and decimal 0 (indicating emptiness).
20153 ---
20154 ---__Reference:__
20155 ---
20156 ---* Corresponding C source code: [llanglib.c#L122-L136](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L122-L136)
20157 ---
20158 ---@param language Language # The language object.
20159 ---
20160 ---@return integer char
20161 ---
20162 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20163 function lang.posthyphenchar(language) end
20164
20165 ---
20166 ---Set the “pre-break” hyphen
20167 ---characters for explicit hyphenation in this language.
20168 ---
20169 ---The hyphen
20170 ---character is initially
20171 ---decimal `0` (indicating emptiness).
20172 ---
20173 ---__Reference:__
20174 ---
20175 ---* Corresponding C source code: [llanglib.c#L138-L152](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L138-L152)
20176 ---
20177 ---@param language Language # The language object.
20178 ---@param char integer
20179 ---
20180 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20181 function lang.preexhyphenchar(language, char) end
20182
20183 ---
20184 ---Get the “pre-break” hyphen
20185 ---characters for explicit hyphenation in this language.
20186 ---
20187 ---The hyphen
20188 ---character is initially
20189 ---decimal `0` (indicating emptiness).
20190 ---
20191 ---__Reference:__
20192 ---
20193 ---* Corresponding C source code: [llanglib.c#L138-L152](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L138-L152)
20194 ---
20195 ---@param language Language # The language object.
20196 ---
20197 ---@return integer char
20198 ---
20199 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20200 function lang.preexhyphenchar(language) end
20201
20202 ---
20203 ---Set the “post-break” hyphen
20204 ---characters for explicit hyphenation in this language.
20205 ---
20206 ---The hyphen
20207 ---character is initially
20208 ---decimal `0` (indicating emptiness).
20209 ---
20210 ---__Reference:__
20211 ---
20212 ---* Corresponding C source code: [llanglib.c#L183-L197](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L183-L197)
20213 ---
20214 ---@param language Language # The language object.
20215 ---@param char integer
20216 ---
20217 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20218 function lang.postexhyphenchar(language, char) end
20219
20220 ---
20221 ---Get the “post-break” hyphen
20222 ---characters for explicit hyphenation in this language.
20223 ---
20224 ---The hyphen
20225 ---character is initially
20226 ---decimal `0` (indicating emptiness).
20227 ---
20228 ---__Reference:__
20229 ---
20230 ---* Corresponding C source code: [llanglib.c#L183-L197](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L183-L197)
20231 ---
20232 ---@param language Language # The language object.
20233 ---
20234 ---@return integer char
20235 ---
20236 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20237 function lang.postexhyphenchar(language) end
20238
20239 ---
20240 ---Hyphenate a node list.
20241 ---
20242 ---Insert hyphenation points (discretionary nodes) in a node list.
20243 ---
20244 ---If
20245 ---`tail` is given as argument, processing stops on that node. Currently,
20246 ---`success` is always true if `head` (and `tail`, if specified)
20247 ---are proper nodes, regardless of possible other errors.
20248 ---
20249 ---Hyphenation works only on “characters”, a special subtype of all the glyph
20250 ---nodes with the node subtype having the value `1`. Glyph modes with
20251 ---different subtypes are not processed.
20252 ---
20253 ---__Reference:__
20254 ---
20255 ---* Corresponding C source code: [llanglib.c#L243-L261](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L243-L261)
20256 ---
20257 ---@param head Node
20258 ---@param tail? Node
20259 ---
20260 ---@return boolean success
20261 ---
20262 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20263 function lang.hyphenate(head, tail) end
20264
20265 ---
20266 ---Set hj codes.
20267 ---
20268 ---When you set a hjcode the current sets get initialized unless the set was already
20269 ---initialized due to `\savinghyphcodes` being larger than zero.
20270 ---
20271 ---__Reference:__
20272 ---
20273 ---* Corresponding C source code: [llanglib.c#L154-L169](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L154-L169)
20274 ---
20275 ---@param language Language # The language object.
20276 ---@param char integer
20277 ---@param used_char integer
20278 ---
20279 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20280 function lang.sethjcode(language, char, used_char) end
20281
20282 ---
20283 ---Query hj codes.
20284 ---
20285 ---__Reference:__
20286 ---
20287 ---* Corresponding C source code: [llanglib.c#L171-L181](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/llanglib.c#L171-L181)
20288 ---
20289 ---@param language Language # The language object.
20290 ---@param char number
20291 ---
20292 ---@return integer used_char
20293 ---
20294 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/lang.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20295 function lang.gethjcode(language, char) end ---
20296 ---# Extra `os` library functions
20297 ---
20298 ---The `os` library has a few extra functions and variables: `os.selfdir`, `os.exec`, `os.spawn`, `os.setenv`,
20299 ---`os.env`, `os.gettimeofday`, `os.times`, `os.tmpdir`, `os.type`, `os.name` and `os.uname`,
20300 ---that we will discuss here.
20301 ---
20302 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20303 os = {}
20304
20305 ---
20306 ---A variable that holds the directory path of the
20307 ---actual executable.
20308 ---
20309 ---For example: `\directlua {tex.sprint(os.selfdir)`}.
20310 ---
20311 ---__Reference:__
20312 ---
20313 ---* Corresponding C source code: [luainit.c#L169-L186](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luainit.c#L169-L186)
20314 ---
20315 ---For example `/usr/local/texlive/bin/x86_64-linux`
20316 ---@string
20317 ---
20318 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20319 os.selfdir = ""
20320
20321 ---
20322 ---A variation on `os.execute`.
20323 ---
20324 ---Here
20325 ---`commandline` can be either a single string or a single table.
20326 ---
20327 ---* If the argument is a table *LuaTeX* first checks if there is a value at
20328 --- integer index zero. If there is, this is the command to be executed.
20329 --- Otherwise, it will use the value at integer index one. If neither are
20330 --- present, nothing at all happens.
20331 ---
20332 ---* The set of consecutive values starting at integer 1 in the table are the
20333 --- arguments that are passed on to the command (the value at index 1 becomes
20334 --- `arg[0]`). The command is searched for in the execution path, so
20335 --- there is normally no need to pass on a fully qualified path name.
20336 ---
20337 ---* If the argument is a string, then it is automatically converted into a
20338 --- table by splitting on whitespace. In this case, it is impossible for the
20339 --- command and first argument to differ from each other.
20340 ---
20341 ---* In the string argument format, whitespace can be protected by putting
20342 --- (part of) an argument inside single or double quotes. One layer of quotes
20343 --- is interpreted by *LuaTeX*, and all occurrences of `\"`, `\'`
20344 --- or `\\` within the quoted text are unescaped. In the table format,
20345 --- there is no string handling taking place.
20346 ---
20347 ---This function normally does not return control back to the *Lua* script: the
20348 ---command will replace the current process. However, it will return the two
20349 ---values `nil` and `error` if there was a problem while
20350 ---attempting to execute the command.
20351 ---
20352 ---On *MS Windows*, the current process is actually kept in memory until after the
20353 ---execution of the command has finished. This prevents crashes in situations
20354 ---where *TeXLua* scripts are run inside integrated *TeX* environments.
20355 ---
20356 ---The original reason for this command is that it cleans out the current
20357 ---process before starting the new one, making it especially useful for use in
20358 ---*TeX*LUA.
20359 ---
20360 ---__Reference:__
20361 ---
20362 ---* Corresponding C source code: [loslibext.c#L429-L501](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L429-L501)
20363 ---
20364 ---@see os.execute
20365 ---
20366 ---@param commandline string|table
20367 ---
20368 ---@return integer|nil exit_status
20369 ---@return string|nil error
20370 ---
20371 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20372 function os.exec(commandline) end
20373
20374 ---
20375 ---A returning version of `os.exec`,
20376 ---with otherwise identical calling conventions.
20377 ---
20378 ---If the command ran ok, then the return value is the exit status of the
20379 ---command. Otherwise, it will return the two values `nil` and `error`.
20380 ---
20381 ---__Reference:__
20382 ---
20383 ---* Corresponding C source code: [loslibext.c#L510-L596](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L510-L596)
20384 ---
20385 ---@see os.execute
20386 ---
20387 ---@param commandline string|table
20388 ---
20389 ---@return integer|nil exit_status
20390 ---@return string|nil error
20391 ---
20392 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20393 function os.spawn(commandline) end
20394
20395 ---
20396 ---This function is similar to `io.popen`
20397 ---but with a preliminary check of the command by mean of `kpse.check_permission`
20398 ---
20399 ---If the command ran ok, then the return value is the same of `io.popen`;
20400 ---otherwise it will return the two values `nil` and `error`.
20401 ---
20402 ---__Reference:__
20403 ---
20404 ---* Corresponding C source code: [loslibext.c#L1093-1121](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/5650c067de62cb7d4aaca44f30c8e9115c51bfc6/source/texk/web2c/luatexdir/lua/loslibext.c#L1093-1121)
20405 ---
20406 ---@see io.popen
20407 ---@see kpse.check_permission
20408 ---
20409 ---@param commandline string
20410 ---@param mode 'r'|'w'
20411 ---
20412 ---@return integer|nil exit_status
20413 ---@return string|nil error
20414 ---
20415 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20416 function os.kpsepopen(commandline, mode) end
20417
20418 ---
20419 ---Set a variable in the environment.
20420 ---
20421 ---Passing
20422 ---`nil` instead of a value string will remove the variable.
20423 ---
20424 ---__Reference:__
20425 ---
20426 ---* Corresponding C source code: [loslibext.c#L600-L627](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L600-L627)
20427 ---
20428 ---@param key string
20429 ---@param value string|nil
20430 ---
20431 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20432 function os.setenv(key, value) end
20433
20434 ---
20435 ---A hash table containing a dump of the variables and
20436 ---values in the process environment at the start of the run.
20437 ---
20438 ---It is writeable,
20439 ---but the actual environment is `not` updated automatically.
20440 ---
20441 ---__Reference:__
20442 ---
20443 ---* Corresponding C source code: [loslibext.c#L630-L661](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L630-L661)
20444 ---
20445 ---```lua
20446 ---{
20447 --- HOME = "/home/user",
20448 --- HOSTNAME = "myhost",
20449 --- INFOPATH = "/usr/local/texlive/texmf-dist/doc/info",
20450 --- LANG = "en_US.UTF-8",
20451 --- LANGUAGE = "en_US:en",
20452 --- OS = "Linux",
20453 --- PAPERSIZE = "a4",
20454 --- PATH = "/bin:/sbin",
20455 --- TERM = "xterm-256color",
20456 --- USER = "user",
20457 --- USERNAME = "user",
20458 --- ...
20459 ---}
20460 ---```
20461 ---@type table<string, string>
20462 ---
20463 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20464 os.env = {}
20465
20466 ---
20467 ---Suspend execution for second intervals.
20468 ---
20469 ---__Example:__
20470 ---
20471 ---```lua
20472 ---local start_time = os.gettimeofday()
20473 ---os.sleep(1)
20474 ---local end_time = os.gettimeofday()
20475 ---assert(end_time - start_time > 1)
20476 ---
20477 ---os.sleep(1) -- Sleep 1 second
20478 ---os.sleep(1, 10) -- Sleep 1 decisecond
20479 ---os.sleep(1, 100) -- Sleep 1 centisecond
20480 ---os.sleep(1, 1000) -- Sleep 1 millisecond
20481 ---```
20482 ---
20483 ---__Reference:__
20484 ---
20485 ---* Corresponding C source code: [loslibext.c#L663-L673](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L663-L673)
20486 ---* Corresponding Lualibs source code: [lualibs-os.lua#L580-L587](https://github.com/latex3/lualibs/blob/26fe094de645fdee79f65d9fc93040a53cb97272/lualibs-os.lua#L580-L587)
20487 ---
20488 ---@param interval number # By default seconds.
20489 ---@param unit? number # Sleep `interval / unit` seconds.
20490 ---
20491 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/lualibs/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20492 function os.sleep(interval, unit) end
20493
20494 ---
20495 ---Return the current “UNIX time”, but as a
20496 ---float.
20497 ---
20498 ---This function is not available on the *SunOS* platforms, so do not use
20499 ---this function for portable documents.
20500 ---
20501 ---__Example:__
20502 ---
20503 ---```lua
20504 ---local time = os.gettimeofday()
20505 ---assert(time > 1682153121.3217, time)
20506 ---```
20507 ---
20508 ---__Reference:__
20509 ---
20510 ---* Corresponding C source code: [loslibext.c#L905-L927](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L905-L927)
20511 ---
20512 ---@return number # for example `1673390071.0893`
20513 ---
20514 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20515 function os.gettimeofday() end
20516
20517 ---
20518 ---@class Times
20519 ---@field cstime number # system time of children
20520 ---@field cutime number # user time of children
20521 ---@field stime number # system time
20522 ---@field utime number # user time
20523
20524 ---
20525 ---Return the current process times according to the
20526 ---UNIX C library function “times”.
20527 ---
20528 ---This function is not available on
20529 ---the MS Windows and *SunOS* platforms, so do not use this function for
20530 ---portable documents.
20531 ---
20532 ---```lua
20533 ---{
20534 --- cstime = 0.0,
20535 --- cutime = 0.0,
20536 --- stime = 0.01,
20537 --- utime = 0.12
20538 ---}
20539 ---```
20540 ---
20541 ---__Example:__
20542 ---
20543 ---```lua
20544 ---local times = os.times()
20545 ---assert(type(times.cstime) == 'number')
20546 ---assert(type(times.cutime) == 'number')
20547 ---assert(type(times.stime) == 'number')
20548 ---assert(type(times.utime) == 'number')
20549 ---```
20550 ---
20551 ---__Reference:__
20552 ---
20553 ---* Corresponding C source code: [loslibext.c#L872-L894](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L872-L894)
20554 ---
20555 ---@return Times
20556 ---
20557 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20558 function os.times() end
20559
20560 ---
20561 ---Create a directory in the “current directory”
20562 ---with the name `luatex.XXXXXX` where the `X`-es are replaced by a
20563 ---unique string.
20564 ---
20565 ---The function also returns this string, so you can `lfs.chdir()` into it, or `nil` if it failed to create the directory.
20566 ---The user is responsible for cleaning up at the end of the run, it does not
20567 ---happen automatically.
20568 ---
20569 ---__Example:__
20570 ---
20571 ---```lua
20572 ---lfs.chdir('/tmp')
20573 ---local dir, err = os.tmpdir()
20574 ---assert(type(dir) == 'string')
20575 ---assert(lfs.isdir('/tmp/' .. dir))
20576 ---
20577 ---dir, err = os.tmpdir('tmp.XXXXXX')
20578 ---assert(type(dir) == 'string')
20579 ---assert(lfs.isdir('/tmp/' .. dir))
20580 ---
20581 ---dir, err = os.tmpdir('tmp.X')
20582 ---assert(dir == nil)
20583 ---assert(err == 'Invalid argument to os.tmpdir()', err)
20584 ---
20585 ---dir, err = os.tmpdir('tmp.XXXXXXX_suffix')
20586 ---assert(dir == nil)
20587 ---assert(err == 'Invalid argument to os.tmpdir()', err)
20588 ---```
20589 ---
20590 ---__Reference:__
20591 ---
20592 ---* Source file of the `LuaTeX` manual: [luatex-lua.tex#L531-L538](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-lua.tex#L531-L538)
20593 ---* Corresponding C source code: [loslibext.c#L971-L997](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L971-L997)
20594 ---
20595 ---@param template? string # for example `luatex.XXXXXX`
20596 ---
20597 ---@return string|nil
20598 ---@return nil|string error
20599 ---
20600 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20601 function os.tmpdir(template) end
20602
20603 ---
20604 ---A string that gives a global indication of the class of
20605 ---operating system.
20606 ---
20607 ---The possible values are currently `windows`, `unix`, and `msdos` (you are unlikely to find this value “in the
20608 ---wild”).
20609 ---
20610 ---__Example:__
20611 ---
20612 ---```lua
20613 ---assert(os.type == 'unix')
20614 ---```
20615 ---
20616 ---__Reference:__
20617 ---
20618 ---* Corresponding C source code: [loslibext.c#L40-L91](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L40-L91)
20619 ---
20620 ---@type string
20621 ---
20622 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20623 os.type = ""
20624
20625 ---
20626 ---A string that gives a more precise indication of the
20627 ---operating system.
20628 ---
20629 ---These possible values are not yet fixed, and for `os.type` values `windows` and `msdos`, the `os.name`
20630 ---values are simply `windows` and `msdos`
20631 ---
20632 ---The list for the type `unix` is more precise: `linux`, `freebsd`, `kfreebsd`, `cygwin`, `openbsd`, `solaris`, `sunos` (pre-solaris), `hpux`, `irix`, `macosx`, `gnu` (hurd), `bsd` (unknown, but BSD-like), `sysv` (unknown, but SYSV-like), `generic` (unknown).
20633 ---
20634 ---__Example:__
20635 ---
20636 ---```lua
20637 ---assert(os.name == 'linux')
20638 ---```
20639 ---
20640 ---__Reference:__
20641 ---
20642 ---* Corresponding C source code: [loslibext.c#L40-L91](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L40-L91)
20643 ---
20644 ---@type string
20645 ---
20646 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20647 os.name = ""
20648
20649 ---
20650 ---@class Uname
20651 ---@field sysname string # for example `x86_64`
20652 ---@field machine string # for example `zotac`
20653 ---@field release string # for example `5.15.0-57-generic`
20654 ---@field version string # for example `#63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022`
20655 ---@field nodename string # for example `mypc`
20656
20657 ---
20658 ---Return a table with specific operating system
20659 ---information acquired at runtime.
20660 ---
20661 ---The keys in the returned table are all
20662 ---string values, and their names are: `sysname`, `machine`, `release`, `version`, and `nodename`.
20663 ---
20664 ---__Example:__
20665 ---
20666 ---```lua
20667 ---local uname = os.uname()
20668 ---assert(type(uname.machine) == 'string')
20669 ---assert(type(uname.nodename) == 'string')
20670 ---assert(type(uname.release) == 'string')
20671 ---assert(type(uname.sysname) == 'string')
20672 ---assert(type(uname.version) == 'string')
20673 ---```
20674 ---
20675 ---__Reference:__
20676 ---
20677 ---* Corresponding C source code: [loslibext.c#L849-L868](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/loslibext.c#L849-L868)
20678 ---
20679 ---```lua
20680 ---{
20681 --- machine = "x86_64",
20682 --- nodename = "mypc",
20683 --- release = "5.15.0-57-generic",
20684 --- sysname = "Linux",
20685 --- version = "#63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022"
20686 ---}
20687 ---```
20688 ---
20689 ---@return Uname
20690 ---
20691 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20692 function os.uname() end
20693
20694 ---
20695 ---__Reference:__
20696 ---
20697 ---* Corresponding C source code: [loslibext.c#L1157-1170](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/b6437de2fa62bb25e17f162e624e8d815fc4d88b/source/texk/web2c/luatexdir/lua/loslibext.c#L1157-1170)
20698 ---
20699 ---@see socket.sleep
20700 ---
20701 ---@param time number
20702 ---
20703 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20704 function os.socketsleep(time) end
20705
20706 ---
20707 ---__Reference:__
20708 ---
20709 ---* Corresponding C source code: [loslibext.c#L1171-1179](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/b6437de2fa62bb25e17f162e624e8d815fc4d88b/source/texk/web2c/luatexdir/lua/loslibext.c#L1171-1179)
20710 ---
20711 ---@see socket.gettime
20712 ---
20713 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/os.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20714 function os.socketgettime() end
20715 ---
20716 ---The `texio` library takes care of the low-level I/O interface: writing to the log file
20717 ---and/or console.
20718 ---
20719 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20720 texio = {}
20721
20722 ---
20723 ---The optional `target` can be one of three possibilities: `term`, `log` or `term and log`.
20724 ---@alias WriteTarget
20725 ---|'term'
20726 ---|'log'
20727 ---|'term and log'
20728
20729 ---
20730 ---Write all given strings to a target.
20731 ---
20732 ---__Reference:__
20733 ---
20734 ---* Corresponding C source code: [ltexiolib.c#L119-L126](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexiolib.c#L119-L126)
20735 ---
20736 ---@param target WriteTarget
20737 ---@param ... string
20738 ---
20739 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20740 function texio.write(target, ...) end
20741
20742 ---
20743 ---Write all given strings to the same
20744 ---location(s) *TeX* writes messages to at this moment.
20745 ---
20746 ---If `batchmode` is in
20747 ---effect, it writes only to the log, otherwise it writes to the log and the
20748 ---terminal.
20749 ---
20750 ---__Reference:__
20751 ---
20752 ---* Corresponding C source code: [ltexiolib.c#L119-L126](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexiolib.c#L119-L126)
20753 ---
20754 ---@param ... string
20755 ---
20756 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20757 function texio.write(...) end
20758
20759 ---
20760 ---Write all given strings to a target.
20761 ---
20762 ---It makes sure that the given
20763 ---strings will appear at the beginning of a new line.
20764 ---
20765 ---__Reference:__
20766 ---
20767 ---* Corresponding C source code: [ltexiolib.c#L128-L135](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexiolib.c#L128-L135)
20768 ---
20769 ---@param target WriteTarget
20770 ---@param ... string
20771 ---
20772 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20773 function texio.write_nl(target, ...) end
20774
20775 ---
20776 ---Write all given strings to the same
20777 ---location(s) *TeX* writes messages to at this moment. It makes sure that the given
20778 ---strings will appear at the beginning of a new line.
20779 ---
20780 ---Note: If several strings are given, and if the first of these strings is or might
20781 ---be one of the targets above, the `target` must be specified explicitly to
20782 ---prevent *Lua* from interpreting the first string as the target.
20783 ---
20784 ---__Reference:__
20785 ---
20786 ---* Corresponding C source code: [ltexiolib.c#L128-L135](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexiolib.c#L128-L135)
20787 ---
20788 ---@param ... string
20789 ---
20790 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20791 function texio.write_nl(...) end
20792
20793 ---
20794 ---Disable `^^` escaping of control characters.
20795 ---
20796 ---__Reference:__
20797 ---
20798 ---* Corresponding C source code: [ltexiolib.c#L148-L156](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexiolib.c#L148-L156)
20799 ---
20800 ---@param escape_controls boolean
20801 ---
20802 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20803 function texio.setescape(escape_controls) end
20804
20805 ---
20806 ---Force a jump back to *TeX*.
20807 ---
20808 ---This function should be used with care. It acts as `endinput` but at
20809 ---the *Lua* end. Normally
20810 ---*Lua* will just collect prints and at the end bump an input level and flush these
20811 ---prints. This function can help you stay at the current level but you need to know
20812 ---what you're doing (or more precise: what *TeX* is doing with input).
20813 ---
20814 ---__Reference:__
20815 ---
20816 ---* Corresponding C source code: [ltexiolib.c#L158-L171](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/ltexiolib.c#L158-L171)
20817 ---
20818 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/texio.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20819 function texio.closeinput() end
20820
20821 ---
20822 ---Current version
20823 ---
20824 ---2025/07/24 v0.2.0
20825 ------
20826 ---This library has functions that register, find and list callbacks. Callbacks are
20827 ---*Lua* functions that are called in well defined places. There are two kind of
20828 ---callbacks: those that mix with existing functionality, and those that (when
20829 ---enabled) replace functionality. In mosty cases the second category is expected to
20830 ---behave similar to the built in functionality because in a next step specific
20831 ---data is expected. For instance, you can replace the hyphenation routine. The
20832 ---function gets a list that can be hyphenated (or not). The final list should be
20833 ---valid and is (normally) used for constructing a paragraph. Another function can
20834 ---replace the ligature builder and/or kerner. Doing something else is possible
20835 ---but in the end might not give the user the expected outcome.
20836 ---
20837 ---__Reference:__
20838 ---
20839 ---* Source file of the `LuaTeX` manual: [luatex-callbacks.tex#L17-L26](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-callbacks.tex#L17-L26)
20840 ---
20841 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20842 callback = {}
20843
20844 ---
20845 ---__Reference:__
20846 ---
20847 ---* Corresponding C source code: [lcallbacklib.c#L33-L90](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lcallbacklib.c#L33-L90)
20848 ---
20849 ---Source: `callback.list()`
20850 ---
20851 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20852 ---@alias CallbackName
20853 ---|"append_to_vlist_filter"
20854 ---|"build_page_insert"
20855 ---|"buildpage_filter"
20856 ---|"call_edit"
20857 ---|"contribute_filter"
20858 ---|"define_font"
20859 ---|"find_cidmap_file"
20860 ---|"find_data_file"
20861 ---|"find_enc_file"
20862 ---|"find_font_file"
20863 ---|"find_format_file"
20864 ---|"find_image_file"
20865 ---|"find_map_file"
20866 ---|"find_opentype_file"
20867 ---|"find_output_file"
20868 ---|"find_pk_file"
20869 ---|"find_read_file"
20870 ---|"find_truetype_file"
20871 ---|"find_type1_file"
20872 ---|"find_vf_file"
20873 ---|"find_write_file"
20874 ---|"finish_pdffile"
20875 ---|"finish_pdfpage"
20876 ---|"hpack_quality"
20877 ---|"hyphenate"
20878 ---|"input_level_string"
20879 ---|"insert_local_par"
20880 ---|"kerning"
20881 ---|"ligaturing"
20882 ---|"linebreak_filter"
20883 ---|"make_extensible"
20884 ---|"mlist_to_hlist"
20885 ---|"new_graf"
20886 ---|"open_read_file"
20887 ---|"page_order_index"
20888 ---|"post_linebreak_filter"
20889 ---|"pre_dump
20890 ---|"pre_linebreak_filter"
20891 ---|"pre_output_filter"
20892 ---|"process_input_buffer"
20893 ---|"process_jobname"
20894 ---|"process_output_buffer"
20895 ---|"process_pdf_image_content"
20896 ---|"process_rule"
20897 ---|"provide_charproc_data"
20898 ---|"read_cidmap_file"
20899 ---|"read_data_file"
20900 ---|"read_enc_file"
20901 ---|"read_font_file"
20902 ---|"read_map_file"
20903 ---|"read_opentype_file"
20904 ---|"read_pk_file"
20905 ---|"read_truetype_file"
20906 ---|"read_type1_file"
20907 ---|"read_vf_file"
20908 ---|"show_error_hook"
20909 ---|"show_error_message"
20910 ---|"show_lua_error_hook"
20911 ---|"show_warning_message"
20912 ---|"start_file"
20913 ---|"start_page_number"
20914 ---|"start_run"
20915 ---|"stop_file"
20916 ---|"stop_page_number"
20917 ---|"stop_run"
20918 ---|"vpack_filter"
20919 ---|"vpack_quality"
20920 ---|"wrapup_run
20921
20922 ---
20923 ---__Reference:__
20924 ---
20925 ---* Corresponding C source code: [](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lcallbacklib.c#L198-L208)
20926 ---
20927 -- #define CALLBACK_BOOLEAN 'b'
20928 -- #define CALLBACK_INTEGER 'd'
20929 -- #define CALLBACK_FLOAT 'f'
20930 -- #define CALLBACK_LINE 'l'
20931 -- #define CALLBACK_STRNUMBER 's'
20932 -- #define CALLBACK_STRING 'S'
20933 -- #define CALLBACK_RESULT 'R' /* a string but nil is also ok */
20934 -- #define CALLBACK_CHARNUM 'c'
20935 -- #define CALLBACK_LSTRING 'L'
20936 -- #define CALLBACK_NODE 'N'
20937 -- #define CALLBACK_DIR 'D'
20938
20939 ---
20940 ---Register a callback. Passing `nil` removes an existing callback. Returns `nil`, `error` on failure.
20941 ---
20942 ---The first thing you need to do is registering a callback:
20943 ---
20944 ---Here the `callback_name` is a predefined callback name, see below.
20945 ---
20946 ---*LuaTeX* internalizes the callback function in such a way that it does not matter
20947 ---if you redefine a function accidentally.
20948 ---
20949 ---Callback assignments are always global. You can use the special value `nil`
20950 ---instead of a function for clearing the callback.
20951 ---
20952 ---For some minor speed gain, you can assign the boolean `false` to the
20953 ---non-file related callbacks, doing so will prevent *LuaTeX* from executing
20954 ---whatever it would execute by default (when no callback function is registered at
20955 ---all). Be warned: this may cause all sorts of grief unless you know `exactly` what you are doing!
20956 ---
20957 ---__Reference:__
20958 ---
20959 ---* Source file of the `LuaTeX` manual: [luatex-callbacks.tex#L28-L54](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-callbacks.tex#L28-L54)
20960 ---* Corresponding C source code: [lcallbacklib.c#L517-L557](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lcallbacklib.c#L517-L557)
20961 ---
20962 ---@param callback_name CallbackName
20963 ---@param func function|nil|false
20964 ---
20965 ---@return integer|nil id # The function returns the internal `id` of the callback or `nil`, if the callback could not be registered.
20966 ---@return string error # In the latter case, `error` contains an error message, otherwise it is `nil`. The function returns `No such callback exists.` if a wrong callback name was specified.
20967 ---
20968 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20969 function callback.register(callback_name, func) end
20970
20971 ---
20972 ---Produce a list of all known callback names.
20973 ---
20974 ---The keys in the table are the known callback names, the value is a boolean where
20975 ---`true` means that the callback is currently set (active).
20976 ---
20977 ---__Reference:__
20978 ---
20979 ---* Source file of the `LuaTeX` manual: [luatex-callbacks.tex#L56-L62](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-callbacks.tex#L56-L62)
20980 ---* Corresponding C source code: [lcallbacklib.c#L584-L599](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lcallbacklib.c#L584-L599)
20981 ---
20982 ---@return table<string, boolean> info
20983 ---
20984 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
20985 function callback.list() end
20986
20987 ---
20988 ---If the callback is not set, `find` returns `nil`.
20989 ---
20990 ---__Reference:__
20991 ---
20992 ---* Source file of the `LuaTeX` manual: [luatex-callbacks.tex#L64-L68](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-callbacks.tex#L64-L68)
20993 ---* Corresponding C source code: [lcallbacklib.c#L559-L582](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lcallbacklib.c#L559-L582)
20994 ---
20995 ---@param callback_name CallbackName
20996 ---
20997 ---@return function|nil f
20998 ---
20999 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21000 function callback.find(callback_name) end
21001
21002 ---
21003 ---Find a file for `input` (0) or `openin` (higher integers).
21004 ---
21005 ---Arguments:
21006 ---
21007 ---__id_number__
21008 ---
21009 ---This number is zero for the log or `input` files. For *TeX*'s `read`
21010 ---or `write` the number is incremented by one, so `\read0` becomes 1.
21011 ---
21012 ---__asked_name__
21013 ---
21014 ---This is the user-supplied filename, as found by `input`, `openin`
21015 ---or `openout`.
21016 ---
21017 ---Return value:
21018 ---
21019 ---__actual_name__
21020 ---
21021 ---This is the filename used. For the very first file that is read in by *TeX*, you
21022 ---have to make sure you return an `actual_name` that has an extension and
21023 ---that is suitable for use as `jobname`. If you don't, you will have to
21024 ---manually fix the name of the log file and output file after *LuaTeX* is finished,
21025 ---and an eventual format filename will become mangled. That is because these file
21026 ---names depend on the jobname.
21027 ---
21028 ---You have to return `nil` if the file cannot be found.
21029 ---
21030 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21031 ---@alias FindReadFileCallback fun(id_number: integer, asked_name: string): actual_name: string|nil
21032
21033 ---
21034 ---Find a file for writing to the log file (0) or with `write` (higher integers).
21035 ---
21036 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21037 ---@alias FindWriteFileCallback fun(id_number: integer, asked_name: string): actual_name: string|nil
21038
21039 ---
21040 ---Find a font metrics file.
21041 ---
21042 ---The `asked_name` is an *OTF* or *TFM* font metrics file.
21043 ---
21044 ---Return `nil` if the file cannot be found.
21045 ---
21046 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21047 ---@alias FindFontFileCallback fun(asked_name: string): actual_name: string|nil
21048
21049 ---
21050 ---The `asked_name` is the *PDF* or *DVI* file for writing.
21051 ---
21052 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21053 ---@alias FindOutputFileCallback fun(asked_name: string): actual_name: string|nil
21054
21055 ---
21056 ---Find the format file.
21057 ---
21058 ---The `asked_name` is a format file for reading (the format file for writing
21059 ---is always opened in the current directory).
21060 ---
21061 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21062 ---@alias FindFormatFileCallback fun(asked_name: string): actual_name: string|nil
21063
21064 ---
21065 ---Find a VF (virtual font) file.
21066 ---
21067 ---Like `find_font_file`, but for virtual fonts. This applies to both *ALEPH's
21068 ---*OVF* files and traditional Knuthian *VF* files.
21069 ---
21070 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21071 ---@alias FindVfFileCallback fun(asked_name: string): actual_name: string|nil
21072
21073 ---
21074 ---Like `find_font_file`, but for map files.
21075 ---
21076 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21077 ---@alias FindMapFileCallback fun(asked_name: string): actual_name: string|nil
21078
21079 ---
21080 ---Find a font encoding file.
21081 ---
21082 ---Like `find_font_file`, but for enc files.
21083 ---
21084 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21085 ---@alias FindEncFileCallback fun(asked_name: string): actual_name: string|nil
21086
21087 ---
21088 ---Find a PK font bitmap file.
21089 ---
21090 ---Like `find_font_file`, but for pk bitmap files. This callback takes two
21091 ---arguments: `name` and `dpi`. In your callback you can decide to
21092 ---look for:
21093 ---
21094 ---```
21095 ---<base res>dpi/<fontname>.<actual res>pk
21096 ---```
21097 ---
21098 ---but other strategies are possible. It is up to you to find a “reasonable”
21099 ---bitmap file to go with that specification.
21100 ---
21101 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21102 ---@alias FindPkFileCallback fun(asked_name: string, dpi: integer): actual_name: string|nil
21103
21104 ---
21105 ---Find an input data file for PDF attachment.
21106 ---
21107 ---Like `find_font_file`, but for embedded files (`\pdfobj file '...'`).
21108 ---
21109 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21110 ---@alias FindDataFileCallback fun(asked_name: string): actual_name: string|nil
21111
21112 ---
21113 ---Find an OpenType font file.
21114 ---
21115 ---Like `find_font_file`, but for *OpenType* font files.
21116 ---
21117 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21118 ---@alias FindOpentypeFileCallback fun(asked_name: string): actual_name: string|nil
21119
21120 ---
21121 ---Find a TrueType font file.
21122 ---
21123 ---The `asked_name` is a font file. This callback is called while *LuaTeX* is
21124 ---building its internal list of needed font files, so the actual timing may
21125 ---surprise you. Your return value is later fed back into the matching `read_file` callback.
21126 ---
21127 ---Strangely enough, `find_type1_file` is also used for *OpenType* (OTF)
21128 ---fonts.
21129 ---
21130 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21131 ---@alias FindTruetypeFileCallback fun(asked_name: string): actual_name: string|nil
21132
21133 ---
21134 ---Find an Type1 (PostScript) font file.
21135 ---
21136 ---The `asked_name` is a font file. This callback is called while *LuaTeX* is
21137 ---building its internal list of needed font files, so the actual timing may
21138 ---surprise you. Your return value is later fed back into the matching `read_file` callback.
21139 ---
21140 ---Strangely enough, `find_type1_file` is also used for *OpenType* (OTF)
21141 ---fonts.
21142 ---
21143 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21144 ---@alias FindType1FileCallback fun(asked_name: string): actual_name: string|nil
21145
21146 ---
21147 ---Find an image file for inclusion.
21148 ---
21149 ---The `asked_name` is an image file. Your return value is used to open a file
21150 ---from the hard disk, so make sure you return something that is considered the name
21151 ---of a valid file by your operating system.
21152 ---
21153 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21154 ---@alias FindImageFileCallback fun(asked_name: string): actual_name: string|nil
21155
21156 ---
21157 ---*LuaTeX* never looks at the rest of the table, so you can use it to store your
21158 ---private per-file data. Both the callback functions will receive the table as
21159 ---their only argument.
21160 ---
21161 ---@class OpenReadFileEnv
21162 local OpenReadFileEnv = {}
21163
21164 ---
21165 ---Read a line from a file opened with the `open_read_file` callback. The argument is the return value from `open_read_file`
21166 ---
21167 ---*LuaTeX* will run this function whenever it needs a new input line from the file.
21168 ---
21169 ---Your function should return either a string or `nil`. The value `nil`
21170 ---signals that the end of file has occurred, and will make *TeX* call the optional
21171 ---@param env OpenReadFileEnv
21172 ---
21173 ---@return string|nil line
21174 function OpenReadFileEnv.reader(env) end
21175
21176 ---
21177 ---Close a file opened with the `open_read_file` callback. The argument is the return value from the `open_read_file`.
21178 ---
21179 ---*LuaTeX* will run this optional function when it decides to close the file.
21180 ---
21181 ---@param env OpenReadFileEnv
21182 ---
21183 function OpenReadFileEnv.close(env) end
21184
21185 ---
21186 ---Open a file for reading. The returned table should define key functions for `reader` and `close`.
21187 ---
21188 ---The filename returned by a previous `find_read_file` or the return value of
21189 ---`kpse.find_file()` if there was no such callback defined.
21190 ---
21191 ---@alias OpenReadFileCallback fun(file_name: string): OpenReadFileEnv
21192
21193 ---
21194 ---callback for the loading of binary data files.
21195 ---The `name` will normally be a full path name as it is returned by either
21196 ---one of the file discovery callbacks or the internal version of `kpse.find_file()`.
21197 ---
21198 ---__success__
21199 ---
21200 ---Return `false` when a fatal error occurred (e.g.\ when the file cannot be
21201 ---found, after all).
21202 ---
21203 ---__data__
21204 ---
21205 ---The bytes comprising the file.
21206 ---
21207 ---__data_size__
21208 ---
21209 ---The length of the `data`, in bytes.
21210 ---
21211 ---Return an empty string and zero if the file was found but there was a
21212 ---reading problem.
21213 ---@alias ReadFileCallback fun(file_name: string): success: boolean, data: string, data_size: integer
21214
21215 ---
21216 ---Read a TFM metrics file. Return `true`, the data, and the data length for success, `false` otherwise
21217 ---
21218 ---ofm or tfm files
21219 ---@alias ReadFontFileCallback ReadFileCallback
21220
21221 ---
21222 ---Read a VF metrics file.
21223 ---
21224 ---virtual fonts
21225 ---@alias ReadVfFileCallback ReadFileCallback
21226
21227 ---
21228 ---Read a font map file.
21229 ---
21230 --- map files
21231 ---@alias ReadMapFileCallback ReadFileCallback
21232
21233 ---
21234 ---Read a font encoding file.
21235 ---
21236 ---encoding files
21237 ---@alias ReadEncFileCallback ReadFileCallback
21238
21239 ---
21240 ---Read a font bitmap PK file.
21241 ---
21242 ---pk bitmap files
21243 ---@alias ReadPkFileCallback ReadFileCallback
21244
21245 ---
21246 ---Read a data file.
21247 ---
21248 ---embedded files (as is possible with *PDF* objects)
21249 ---@alias ReadDataFileCallback ReadFileCallback
21250
21251 ---
21252 ---Read a TrueType font.
21253 ---*TrueType* font files
21254 ---@alias ReadTruetypeFileCallback ReadFileCallback
21255
21256 ---
21257 ---Read a Type1 font.
21258 ---
21259 ---*Type1* font files
21260 ---@alias ReadType1FileCallback ReadFileCallback
21261
21262 ---
21263 ---Read an OpenType font.
21264 ---
21265 ---*OpenType* font files
21266 ---@alias ReadOpentypeFileCallback ReadFileCallback
21267
21268 ---
21269 ---Modify the encoding of the input buffer.
21270 ---
21271 ---This callback allows you to change the contents of the line input buffer just
21272 ---before *LuaTeX* actually starts looking at it.
21273 ---
21274 ---If you return `nil`, *LuaTeX* will pretend like your callback never
21275 ---happened. You can gain a small amount of processing time from that. This callback
21276 ---does not replace any internal code.
21277 ---
21278 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21279 ---@alias ProcessInputBufferCallback fun(buffer: string): string|nil
21280
21281 ---
21282 ---Modify the encoding of the output buffer.
21283 ---
21284 ---This callback allows you to change the contents of the line output buffer just
21285 ---before *LuaTeX* actually starts writing it to a file as the result of a `write` command. It is only called for output to an actual file (that is,
21286 ---excluding the log, the terminal, and so called `write` 18 calls).
21287 ---
21288 ---If you return `nil`, *LuaTeX* will pretend like your callback never
21289 ---happened. You can gain a small amount of processing time from that. This callback
21290 ---does not replace any internal code.
21291 ---
21292 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21293 ---@alias ProcessOutputBufferCallback fun(buffer: string): adjusted_buffer: string|nil
21294
21295 ---
21296 ---This callback allows you to change the jobname given by `jobname` in *TeX*
21297 ---and `tex.jobname` in Lua. It does not affect the internal job name or the
21298 ---name of the output or log files.
21299 ---
21300 ---The only argument is the actual job name; you should not use `tex.jobname`
21301 ---inside this function or infinite recursion may occur. If you return `nil`,
21302 ---*LuaTeX* will pretend your callback never happened. This callback does not
21303 ---replace any internal code.
21304 ---
21305 ---__Reference:__
21306 ---
21307 ---* Corresponding C source code: [textoken.c#L2511](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/textoken.c#L2511)
21308 ---
21309 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21310 ---@alias ProcessJobnameCallback fun(jobname: string): string|nil
21311
21312 ---
21313 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21314 ---@alias ContributeFilterExtrainfo
21315 ---|'pre_box' # interline material is being added
21316 ---|'pre_adjust' # `vadjust` material is being added
21317 ---|'box' # a typeset box is being added (always called)
21318 ---|'adjust' # `vadjust` material is being added
21319
21320 ---
21321 ---This callback is called when *LuaTeX* adds contents to list:
21322 ---
21323 ---The string reports the group code. From this you can deduce from
21324 ---what list you can give a treat.
21325 ---
21326 ---__Reference:__
21327 ---
21328 ---* Corresponding C source code: [luatexcallbackids.h#L163](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luatexcallbackids.h#L163)
21329 ---
21330 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21331 ---@alias ContributeFilterCallback fun(extrainfo: ContributeFilterExtrainfo)
21332
21333 ---
21334 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21335 ---@alias BuildpageFilterExtrainfo
21336 ---|'alignment' # a (partial) alignment is being added
21337 ---|'after_output' # an output routine has just finished
21338 ---|'new_graf' # the beginning of a new paragraph
21339 ---|'vmode_par' # `par` was found in vertical mode
21340 ---|'hmode_par' # `par` was found in horizontal mode
21341 ---|'insert' # an insert is added
21342 ---|'penalty' # a penalty (in vertical mode)
21343 ---|'before_display' # immediately before a display starts
21344 ---|'after_display' # a display is finished
21345 ---|'end' # *LuaTeX* is terminating (it's all over)
21346
21347 ---
21348 ---Process objects as they are added to the main vertical list. The string argument gives some context.
21349 ---
21350 ---This callback is called whenever *LuaTeX* is ready to move stuff to the main
21351 ---vertical list. You can use this callback to do specialized manipulation of the
21352 ---page building stage like imposition or column balancing.
21353 ---
21354 ---The string `extrainfo` gives some additional information about what *TeX*'s
21355 ---state is with respect to the “current page”.
21356 ---
21357 ---__Reference:__
21358 ---
21359 ---* Corresponding C source code: [align.c#L1281](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/align.c#L1281)
21360 ---
21361 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21362 ---@alias BuildpageFilterCallback fun(extrainfo: ContributeFilterExtrainfo)
21363
21364 ---
21365 ---This callback is called when the pagebuilder adds an insert. There is not much
21366 ---control over this mechanism but this callback permits some last minute
21367 ---manipulations of the spacing before an insert, something that might be handy when
21368 ---for instance multiple inserts (types) are appended in a row.
21369 ---
21370 ---__Reference:__
21371 ---
21372 ---* `n` the insert class
21373 ---* `i` the order of the insert
21374 ---
21375 ---The return value is a number indicating the skip register to use for the
21376 ---prepended spacing. This permits for instance a different top space (when `i` equals one) and intermediate space (when `i` is larger than one). Of
21377 ---course you can mess with the insert box but you need to make sure that *LuaTeX*
21378 ---is happy afterwards.
21379 ---
21380 ---__Reference:__
21381 ---
21382 ---* Corresponding C source code: [buildpage.c#L507](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/buildpage.c#L507)
21383 ---
21384 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21385 ---@alias BuildPageInsertCallback fun(n: integer, i: integer): integer
21386
21387 ---
21388 ---The string called `groupcode` identifies the nodelist's context within
21389 ---*TeX*'s processing. The range of possibilities is given in the table below, but
21390 ---not all of those can actually appear in `pre_linebreak_filter`, some are
21391 ---for the `hpack_filter` and `vpack_filter` callbacks that will be
21392 ---explained in the next two paragraphs.
21393 ---
21394 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21395 ---@alias PreLinebreakFilterGroupCode
21396 ---|'' # main vertical list
21397 ---|'hbox' # hbox` in horizontal mode
21398 ---|'adjusted_hbox' #hbox` in vertical mode
21399 ---|'vbox' # vbox`
21400 ---|'vtop' # vtop' #
21401 ---|'align' # halign` or `valign`
21402 ---|'disc' # discretionaries
21403 ---|'insert' # packaging an insert
21404 ---|'vcenter' # vcenter`
21405 ---|'local_box' # localleftbox` or `localrightbox`
21406 ---|'split_off' # top of a `vsplit`
21407 ---|'split_keep' # remainder of a `vsplit`
21408 ---|'align_set' # alignment cell
21409 ---|'fin_row' # alignment row
21410
21411 ---
21412 ---As for all the callbacks that deal with nodes, the return value can be one of
21413 ---three things:
21414 ---
21415 ---__Reference:__
21416 ---
21417 ---* boolean `true` signals successful processing
21418 ---* `<node>` signals that the “head” node should be replaced by the
21419 --- returned node
21420 ---* boolean `false` signals that the “head” node list should be
21421 --- ignored and flushed from memory
21422 ---
21423 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21424 ---@alias NodeCallbackReturn true|false|Node
21425
21426 ---
21427 ---Alter a node list before linebreaking takes place. The string argument gives some context.
21428 ---
21429 ---This callback is called just before *LuaTeX* starts converting a list of nodes
21430 ---into a stack of `hbox`es, after the addition of `parfillskip`.
21431 ---
21432 ---```lua
21433 ------@type PreLinebreakFilter
21434 ---function(head, groupcode)
21435 --- --- true|false|node
21436 --- return true
21437 ---end
21438 ---```
21439 ---
21440 ---This callback does not replace any internal code.
21441 ---
21442 ---__Reference:__
21443 ---
21444 ---* Corresponding C source code: [linebreak.c#L124](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/linebreak.c#L124)
21445 ---
21446 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21447 ---@alias PreLinebreakFilterCallback fun(head: Node, groupcode: PreLinebreakFilterGroupCode): NodeCallbackReturn
21448
21449 ---
21450 ---Override the linebreaking algorithm. The boolean is `true` if this is a pre-display break.
21451 ---
21452 ---This callback replaces *LuaTeX*'s line breaking algorithm.
21453 ---
21454 ---The returned node is the head of the list that will be added to the main vertical
21455 ---list, the boolean argument is true if this paragraph is interrupted by a
21456 ---following math display.
21457 ---
21458 ---If you return something that is not a `<node>`, *LuaTeX* will apply the
21459 ---internal linebreak algorithm on the list that starts at `<head>`.
21460 ---Otherwise, the `<node>` you return is supposed to be the head of a list of
21461 ---nodes that are all allowed in vertical mode, and at least one of those has to
21462 ---represent a hbox. Failure to do so will result in a fatal error.
21463 ---
21464 ---Setting this callback to `false` is possible, but dangerous, because it is
21465 ---possible you will end up in an unfixable “deadcycles loop”.
21466 ---
21467 ---__Reference:__
21468 ---
21469 ---* Corresponding C source code: [luanode.c#L125](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luanode.c#L125)
21470 ---* Corresponding C source code: [linebreak.c#L128](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/linebreak.c#L128)
21471 ---
21472 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21473 ---@alias LinebreakFilterCallback fun(head: Node, is_display: boolean): NodeCallbackReturn
21474
21475 ---
21476 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21477 ---@alias AppendToVlistFilterLocationcode
21478 ---| 'box'
21479 ---| 'alignment'
21480 ---| 'equation'
21481 ---| 'equation_number'
21482 ---| 'post_linebreak'
21483
21484 ---
21485 ---This callback is called whenever *LuaTeX* adds a box to a vertical list.
21486 ---
21487 ---It is ok to return nothing in which case you also need to flush the box or deal
21488 ---with it yourself. The prevdepth is also optional. You can pass `nil` instead of a node.
21489 ---
21490 ---__Reference:__
21491 ---
21492 ---* Corresponding C source code: [luanode.c#L164](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luanode.c#L164)
21493 ---
21494 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21495 ---@alias AppendToVlistFilterCallback fun(box: Node, locationcode: AppendToVlistFilterLocationcode, prevdepth: integer, mirrored: boolean): list: Node, prevdepth: integer
21496
21497 ---
21498 ---Alter a node list afer linebreaking has taken place. The string argument gives some context.
21499 ---
21500 ---This callback is called just after *LuaTeX* has converted a list of nodes into a
21501 ---stack of `\hbox`es.
21502 ---
21503 ---This callback does not replace any internal code.
21504 ---
21505 ---__Reference:__
21506 ---
21507 ---* Corresponding C source code: [linebreak.c#L196](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/linebreak.c#L196)
21508 ---
21509 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21510 ---@alias PostLinebreakFilterCallback fun(head: Node, groupcode: string): NodeCallbackReturn
21511
21512 ---
21513 ---Alter a node list before horizontal packing takes place. The first string gives some context,
21514 ---the number is the desired size, the second string is either `exact` or `additional` (modifies the first string),
21515 ---the third string is the desired direction
21516 ---
21517 ---This callback is called when *TeX* is ready to start boxing some horizontal mode
21518 ---material. Math items and line boxes are ignored at the moment.
21519 ---
21520 ---The `packtype` is either `additional` or `exactly`. If `additional`, then the `size` is a `\hbox spread ...` argument. If
21521 ---`exactly`, then the `size` is a `\hbox to ...`. In both cases,
21522 ---the number is in scaled points.
21523 ---
21524 ---The `direction` is either one of the three-letter direction specifier
21525 ---strings, or `nil`.
21526 ---
21527 ---This callback does not replace any internal code.
21528 ---
21529 ---__Reference:__
21530 ---
21531 ---* Corresponding C source code: [luanode.c#L205](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luanode.c#L205)
21532 ---
21533 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21534 ---@alias HpackFilterCallback fun(head: Node, groupcode: string, size: integer, packtype: 'additional'|'exactly', direction?: DirectionSpecifier, attributelist?: Node): NodeCallbackReturn
21535
21536 ---
21537 ---Alter a node list before vertical packing takes place. The second number is the desired max depth.
21538 ---
21539 ---This callback is called when *TeX* is ready to start boxing some vertical mode
21540 ---material. Math displays are ignored at the moment.
21541 ---
21542 ---This function is very similar to the `hpack_filter`. Besides the fact
21543 ---that it is called at different moments, there is an extra variable that matches
21544 ---*TeX*'s `maxdepth` setting.
21545 ---
21546 ---This callback does not replace any internal code.
21547 ---
21548 ---__Reference:__
21549 ---
21550 ---* Corresponding C source code: [luanode.c#L264](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luanode.c#L264)
21551 ---
21552 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21553 ---@alias VpackFilterCallback fun(head: Node, groupcode: string, size: integer, packtype: 'additional'|'exactly', maxdepth: integer, direction?: DirectionSpecifier, attributelist?: Node): NodeCallbackReturn
21554
21555 ---
21556 ---This callback can be used to intercept the overfull messages that can result from
21557 ---packing a horizontal list (as happens in the par builder).
21558 ---
21559 ---The incident is one of `overfull`, `underfull`, `loose` or
21560 ---`tight`. The detail is either the amount of overflow in case of `overfull`, or the badness otherwise. The head is the list that is constructed
21561 ---(when protrusion or expansion is enabled, this is an intermediate list).
21562 ---Optionally you can return a node, for instance an overfull rule indicator. That
21563 ---node will be appended to the list (just like *TeX*'s own rule would).
21564 ---
21565 ---__Reference:__
21566 ---
21567 ---* Corresponding C source code: [packaging.c#L862](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/packaging.c#L862)
21568 ---* Corresponding C source code: [packaging.c#L932](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/packaging.c#L932)
21569 ---
21570 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21571 ---@alias HpackQualityCallback fun(incident: 'overfull'|'underfull'|'loose'|'tight', detail: integer, head: Node, first: integer, last: integer): Node
21572
21573 ---
21574 ---This callback can be used to intercept the overfull messages that can result from
21575 ---packing a vertical list (as happens in the page builder).
21576 ---
21577 ---The incident is one of `overfull`, `underfull`, `loose` or
21578 ---`tight`. The detail is either the amount of overflow in case of `overfull`, or the badness otherwise. The head is the list that is constructed.
21579 ---
21580 ---__Reference:__
21581 ---
21582 ---* Corresponding C source code: [packaging.c#L1345](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/packaging.c#L1345)
21583 ---* Corresponding C source code: [packaging.c#L1405](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/packaging.c#L1405)
21584 ---
21585 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21586 ---@alias VpackQualityCallback fun(incident: 'overfull'|'underfull'|'loose'|'tight', detail: integer, head: Node, first: integer, last: integer)
21587
21588 ---
21589 ---This is an experimental callback. It can be used with rules of subtype 4
21590 ---(user). The callback gets three arguments: the node, the width and the
21591 ---height. The callback can use `pdf.print` to write code to the *PDF*
21592 ---file but beware of not messing up the final result. No checking is done.
21593 ---
21594 ---__Reference:__
21595 ---
21596 ---* Corresponding C source code: [pdfshipout.c#L246](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfshipout.c#L246)
21597 ---
21598 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21599 ---@alias ProcessRuleCallback fun(node: Node, width: integer, height: integer)
21600
21601 ---
21602 ---Alter a node list before boxing to `outputbox` takes place.
21603 ---
21604 ---This callback is called when *TeX* is ready to start boxing the box 255 for `output`.
21605 ---
21606 ---This callback does not replace any internal code.
21607 ---
21608 ---__Reference:__
21609 ---
21610 ---* Corresponding C source code: [luanode.c#L262](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/luanode.c#L262)
21611 ---
21612 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21613 ---@alias PreOutputFilterCallback fun(head: Node, groupcode: string, size: integer, packtype: 'additional'|'exactly', maxdepth: integer, direction?: DirectionSpecifier): NodeCallbackReturn
21614
21615 ---
21616 ---Apply hyphenation to a node list.
21617 ---
21618 ---Setting this callback to `false` will prevent the internal discretionary
21619 ---insertion pass.
21620 ---
21621 ---__Reference:__
21622 ---
21623 ---* Corresponding C source code: [texlang.c#L1179](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lang/texlang.c#L1179)
21624 ---
21625 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21626 ---@alias HyphenateCallback fun(head: Node, tail: Node): false|nil
21627
21628 ---
21629 ---Apply ligaturing to a node list.
21630 ---
21631 ---No return values. This callback has to apply ligaturing to the node list it
21632 ---receives.
21633 ---
21634 ---You don't have to worry about return values because the `head` node that is
21635 ---passed on to the callback is guaranteed not to be a glyph_node (if need be, a
21636 ---temporary node will be prepended), and therefore it cannot be affected by the
21637 ---mutations that take place. After the callback, the internal value of the “tail of the list” will be recalculated.
21638 ---
21639 ---The `next` of `head` is guaranteed to be non-nil.
21640 ---
21641 ---The `next` of `tail` is guaranteed to be nil, and therefore the
21642 ---second callback argument can often be ignored. It is provided for orthogonality,
21643 ---and because it can sometimes be handy when special processing has to take place.
21644 ---
21645 ---Setting this callback to `false` will prevent the internal ligature
21646 ---creation pass.
21647 ---
21648 ---You must not ruin the node list. For instance, the head normally is a local par node,
21649 ---and the tail a glue. Messing too much can push *LuaTeX* into panic mode.
21650 ---
21651 ---__Reference:__
21652 ---
21653 ---* Corresponding C source code: [luafont.c#L2688](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/font/luafont.c#L2688)
21654 ---
21655 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21656 ---@alias LigaturingCallback fun(head: Node, tail: Node): false|nil
21657
21658 ---
21659 ---Apply kerning to a node list.
21660 ---
21661 ---No return values. This callback has to apply kerning between the nodes in the
21662 ---node list it receives. See `ligaturing` for calling conventions.
21663 ---
21664 ---Setting this callback to `false` will prevent the internal kern insertion
21665 ---pass.
21666 ---
21667 ---You must not ruin the node list. For instance, the head normally is a local par node,
21668 ---and the tail a glue. Messing too much can push *LuaTeX* into panic mode.
21669 ---
21670 ---__Reference:__
21671 ---
21672 ---* Corresponding C source code: [luafont.c#L2704](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/font/luafont.c#L2704)
21673 ---
21674 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21675 ---@alias KerningCallback fun(head: Node, tail: Node): false|nil
21676
21677 ---
21678 ---Each paragraph starts with a local par node that keeps track of for instance
21679 ---the direction. You can hook a callback into the creator:
21680 ---
21681 ---There is no return value and you should make sure that the node stays valid
21682 ---as otherwise *TeX* can get confused.
21683 ---
21684 ---__Reference:__
21685 ---
21686 ---* Corresponding C source code: [texnodes.c#L4812](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texnodes.c#L4812)
21687 ---
21688 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21689 ---@alias InsertLocalParCallback fun(local_par: Node, location: string)
21690
21691 ---
21692 ---Convert a math node list into a horizontal node list.
21693 ---
21694 ---This callback replaces *LuaTeX*'s math list to node list conversion algorithm.
21695 ---
21696 ---The returned node is the head of the list that will be added to the vertical or
21697 ---horizontal list, the string argument is either “text” or “display”
21698 ---depending on the current math mode, the boolean argument is `true` if
21699 ---penalties have to be inserted in this list, `false` otherwise.
21700 ---
21701 ---Setting this callback to `false` is bad, it will almost certainly result in
21702 ---an endless loop.
21703 ---
21704 ---__Reference:__
21705 ---
21706 ---* Corresponding C source code: [mlist.c#L1866](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/mlist.c#L1866)
21707 ---
21708 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21709 ---@alias MlistToHlistCallback fun(head: Node, display_type: string, need_penalties: boolean): newhead: Node
21710
21711 ---
21712 ---Run actions just before format dumping takes place.
21713 ---
21714 ---This function is called just before dumping to a format file starts. It does not
21715 ---replace any code and there are neither arguments nor return values.
21716 ---
21717 ---__Reference:__
21718 ---
21719 ---* Corresponding C source code: [dumpdata.c#L95](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/dumpdata.c#L95)
21720 ---
21721 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21722 ---@alias PreDumpCallback fun()
21723
21724 ---
21725 ---Run actions at the start of the typesetting run.
21726 ---
21727 ---This callback replaces the code that prints *LuaTeX*'s banner. Note that for
21728 ---successful use, this callback has to be set in the *Lua* initialization script,
21729 ---otherwise it will be seen only after the run has already started.
21730 ---
21731 ---__Reference:__
21732 ---
21733 ---* Corresponding C source code: [printing.c#L557](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/printing.c#L557)
21734 ---* Corresponding C source code: [texfileio.c#L917](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/texfileio.c#L917)
21735 ---
21736 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21737 ---@alias StartRunCallback fun()
21738
21739 ---
21740 ---Run actions just before the end of the typesetting run.
21741 ---
21742 ---This callback replaces the code that prints *LuaTeX*'s statistics and “output written to” messages. The engine can still do housekeeping and therefore
21743 ---you should not rely on this hook for postprocessing the *PDF* or log file.
21744 ---
21745 ---__Reference:__
21746 ---
21747 ---* Corresponding C source code: [mainbody.c#L609](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/mainbody.c#L609)
21748 ---* Corresponding C source code: [dvigen.c#L1447](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/dvi/dvigen.c#L1447)
21749 ---* Corresponding C source code: [pdfgen.c#L2243](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfgen.c#L2243)
21750 ---
21751 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21752 ---@alias StopRunCallback fun()
21753
21754 ---
21755 ---Run actions at the start of typeset page number message reporting.
21756 ---
21757 ---Replaces the code that prints the `[` and the page number at the begin of
21758 ---`shipout`. This callback will also override the printing of box information
21759 ---that normally takes place when `tracingoutput` is positive.
21760 ---
21761 ---__Reference:__
21762 ---
21763 ---* Corresponding C source code: [pdfshipout.c#L61](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfshipout.c#L61)
21764 ---
21765 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21766 ---@alias StartPageNumberCallback fun()
21767
21768 ---
21769 ---Run actions at the end of typeset page number message reporting.
21770 ---
21771 ---Replaces the code that prints the `]` at the end of `shipout`.
21772 ---
21773 ---__Reference:__
21774 ---
21775 ---* Corresponding C source code: [pdfshipout.c#L62](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfshipout.c#L62)
21776 ---
21777 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21778 ---@alias StopPageNumberCallback fun()
21779
21780 ---
21781 ---Run action at error reporting time.
21782 ---
21783 ---This callback is run from inside the *TeX* error function, and the idea is to
21784 ---allow you to do some extra reporting on top of what *TeX* already does (none of
21785 ---the normal actions are removed). You may find some of the values in the `status` table useful. This callback does not replace any internal code.
21786 ---
21787 ---__Reference:__
21788 ---
21789 ---* Corresponding C source code: [filename.c#L282](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/filename.c#L282)
21790 ---* Corresponding C source code: [errors.c#L430](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/errors.c#L430)
21791 ---
21792 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21793 ---@alias ShowErrorHookCallback fun()
21794
21795 ---
21796 ---This callback replaces the code that prints the error message. The usual
21797 ---interaction after the message is not affected.
21798 ---
21799 ---__Reference:__
21800 ---
21801 ---* Corresponding C source code: [errors.c#L105](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/errors.c#L105)
21802 ---
21803 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21804 ---@alias ShowErrorMessageCallback fun()
21805
21806 ---
21807 ---This callback replaces the code that prints the extra *Lua* error message.
21808 ---
21809 ---__Reference:__
21810 ---
21811 ---* Corresponding C source code: [errors.c#L995](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/errors.c#L995)
21812 ---
21813 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21814 ---@alias ShowLuaErrorHookCallback fun()
21815
21816 ---
21817 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21818 ---@alias StartFileCallbackCategory
21819 ---|1 # a normal data file, like a *TeX* source
21820 ---|2 # a font map coupling font names to resources
21821 ---|3 # an image file (`png`, `pdf`, etc)
21822 ---|4 # an embedded font subset
21823 ---|5 # a fully embedded font
21824
21825 ---
21826 ---This callback replaces the code that prints *LuaTeX*'s when a file is opened like
21827 ---`(filename` for regular files.
21828 ---
21829 ---__Reference:__
21830 ---
21831 ---* Corresponding C source code: [luatexcallbackids.h#L127](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luatexcallbackids.h#L127)
21832 ---
21833 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21834 ---@alias StartFileCallback fun(category: StartFileCallbackCategory, filename: string)
21835
21836 ---
21837 ---This callback replaces the code that prints *LuaTeX*'s when a file is closed like
21838 ---the `)` for regular files.
21839 ---
21840 ---__Reference:__
21841 ---
21842 ---* Corresponding C source code: [luatexcallbackids.h#L150](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luatexcallbackids.h#L150)
21843 ---
21844 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21845 ---@alias StopFileCallback fun(category: integer)
21846
21847 ---
21848 ---This callback replaces the call to an external editor when “E” is pressed
21849 ---in reply to an error message. Processing will end immediately after the callback
21850 ---returns control to the main program.
21851 ---
21852 ---__Reference:__
21853 ---
21854 ---* Corresponding C source code: [errors.c#L531](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/errors.c#L531)
21855 ---
21856 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21857 ---@alias CallEditCallback fun(filename: string, linenumber: integer)
21858
21859 ---
21860 ---This callback can be used to wrap up alternative synctex methods. It kicks in
21861 ---after the normal synctex finalizer (that happens to remove the synctex files
21862 ---after a run when native synctex is not enabled).
21863 ---
21864 ---__Reference:__
21865 ---
21866 ---* Corresponding C source code: [mainbody.c#L668](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/mainbody.c#L668)
21867 ---
21868 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21869 ---@alias FinishSynctexCallback fun()
21870
21871 ---
21872 ---This callback is called after the *PDF* and log files are closed. Use it at your own
21873 ---risk.
21874 ---
21875 ---__Reference:__
21876 ---
21877 ---* Corresponding C source code: [mainbody.c#L687](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/mainbody.c#L687)
21878 ---
21879 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21880 ---@alias WrapupRunCallback fun()
21881
21882 ---
21883 ---Run actions just before the PDF closing takes place.
21884 ---
21885 ---This callback is called when all document pages are already written to the *PDF*
21886 ---file and *LuaTeX* is about to finalize the output document structure. Its
21887 ---intended use is final update of *PDF* dictionaries such as `/Catalog` or
21888 ---`/Info`. The callback does not replace any code. There are neither
21889 ---arguments nor return values.
21890 ---
21891 ---__Reference:__
21892 ---
21893 ---* Corresponding C source code: [pdfgen.c#L2244](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfgen.c#L2244)
21894 ---
21895 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21896 ---@alias FinishPdffileCallback fun()
21897
21898 ---
21899 ---```
21900 ---function(shippingout)
21901 ---end
21902 ---```
21903 ---
21904 ---This callback is called after the *PDF* page stream has been assembled and before
21905 ---the page object gets finalized.
21906 ---
21907 ---* Corresponding C source code: [pdfgen.c#L1788](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfgen.c#L1788)
21908 ---
21909 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21910 ---@alias FinishPdfpageCallback fun(shippingout: string)
21911
21912 ---
21913 ---This is one that experts can use to juggle the page tree, a data structure
21914 ---that determines the order in a *PDF* file:
21915 ---
21916 ---Say that we have 12 pages, then we can do this:
21917 ---
21918 ---```lua
21919 ---callback.register("page_order_index",function(page)
21920 --- if page == 1 then return 12
21921 --- elseif page == 2 then return 11
21922 --- elseif page == 11 then return 2
21923 --- elseif page == 12 then return 1
21924 --- else return page
21925 --- end
21926 ---end)
21927 ---```
21928 ---
21929 ---This will swap the first two and last two pages. You need to know the number of
21930 ---pages which is a side effect of the implementation. When you mess things up
21931 ---\unknown\ don't complain.
21932 ---
21933 ---__Reference:__
21934 ---
21935 ---* Corresponding C source code: [pdfgen.c#L1793](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/pdf/pdfgen.c#L1793)
21936 ---
21937 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21938 ---@alias PageOrderIndexCallback fun(pagenumber: integer): pagenumber: string
21939
21940 ---
21941 ---When a page from a *PDF* file is embedded its page stream as well as related
21942 ---objects are copied to the target file. However, it can be that the page stream
21943 ---has operators that assume additional resources, for instance marked text. You can
21944 ---decide to filter that for which *LuaTeX* provides a callback. Here is a simple
21945 ---demonstration of use:
21946 ---
21947 ---```lua
21948 ---pdf.setrecompress(1)
21949 ---
21950 ---callback.register("process_pdf_image_content",function(s)
21951 --- print(s)
21952 --- return s
21953 ---end)
21954 ---```
21955 ---
21956 ---You need to explicitly enable recompression because otherwise the content stream
21957 ---gets just passed on in its original compressed form.
21958 ---
21959 ---__Reference:__
21960 ---
21961 ---* Corresponding C source code: [pdftoepdf.c#L440](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/image/pdftoepdf.c#L440)
21962 ---
21963 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21964 ---@alias ProcessPdfImageContentCallback fun(s: string): string
21965
21966 ---
21967 ---Define a font from within lua code.
21968 ---
21969 ---The arguments are the user-supplied information, with negative numbers indicating `scaled`, positive numbers `at`
21970 ---
21971 ---The string `name` is the filename part of the font specification, as given
21972 ---by the user.
21973 ---
21974 ---The number `size` is a bit special:
21975 ---
21976 ---* If it is positive, it specifies an “at size” in scaled points.
21977 ---* If it is negative, its absolute value represents a “scaled” setting
21978 --- relative to the designsize of the font.
21979 ---
21980 ---The `id` is the internal number assigned to the font.
21981 ---
21982 ---The internal structure of the `font` table that is to be returned is
21983 ---explained in chapter fonts. That table is saved internally, so you can
21984 ---put extra fields in the table for your later *Lua* code to use. In alternative,
21985 ---`retval` can be a previously defined fontid. This is useful if a previous
21986 ---definition can be reused instead of creating a whole new font structure.
21987 ---
21988 ---Setting this callback to `false` is pointless as it will prevent font
21989 ---loading completely but will nevertheless generate errors.
21990 ---
21991 ---__Reference:__
21992 ---
21993 ---* Corresponding C source code: [dofont.c#L52](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/font/dofont.c#L52)
21994 ---
21995 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
21996 ---@alias DefineFontCallback fun(name: string, size: number, id: number): Font|integer
21997
21998 ---
21999 ---The `glyph_not_found` callback, when set, kicks in when the backend cannot
22000 ---insert a glyph. When no callback is defined a message is written to the log.
22001 ---
22002 ---__Reference:__
22003 ---
22004 ---* Corresponding C source code: [texfont.c#L364](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/font/texfont.c#L364)
22005 ---
22006 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22007 ---@alias GlyphNotFoundCallback fun(id: number, char: number)
22008
22009 ---
22010 ---The `glyph_info` callback can be set to report a useful representation of a
22011 ---glyph.
22012 ---
22013 ---When `nil` is returned the character code is printed, otherwise the
22014 ---returned string is used. By default the *UTF-8* representation is shown which is
22015 ---not always that useful, especially when there is no real representation. Keep in
22016 ---mind that setting this callback can change the log in an incompatible way.
22017 ---
22018 ---__Reference:__
22019 ---
22020 ---* Corresponding C source code: [printing.c#L1036](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/tex/printing.c#L1036)
22021 ---
22022 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/callback.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22023 ---@alias GlyphInfoCallback fun(g: Node): string|nil
22024
22025 ---
22026 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/trunk/source/texk/web2c/luatexdir/luasocket/src/mbox.lua
22027 ---Changes to upstream: global mbox table
22028
22029 ---
22030 ---The definitions are developed in this repository: https://github.com/LuaCATS/luasocket
22031
22032 ---
22033 ---https://github.com/lunarmodules/luasocket/blob/master/src/mbox.lua
22034 ---
22035 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22036 mbox = {}
22037
22038 ---
22039 ---@param message_s string
22040 ---
22041 ---@return string headers
22042 ---@return string body
22043 ---
22044 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22045 function mbox.split_message(message_s) end
22046
22047 ---
22048 ---@param headers_s string
22049 ---
22050 ---@return string[] headers
22051 ---
22052 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22053 function mbox.split_headers(headers_s) end
22054
22055 ---
22056 ---@param header_s string
22057 ---
22058 ---@return string name
22059 ---@return string value
22060 ---
22061 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22062 function mbox.parse_header(header_s) end
22063
22064 ---
22065 ---@param headers_s string
22066 ---
22067 ---@return table<string, string> headers
22068 ---
22069 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22070 function mbox.parse_headers(headers_s) end
22071
22072 ---
22073 ---@param from string
22074 ---
22075 ---@return string name
22076 ---@return string address
22077 ---
22078 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22079 function mbox.parse_from(from) end
22080
22081 ---
22082 ---@param mbox_s string
22083 ---
22084 ---@return string[] mbox
22085 ---
22086 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22087 function mbox.split_mbox(mbox_s) end
22088
22089 ---
22090 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22091 ---@class Message
22092 ---@field headers table<string, string>
22093 ---@field body string
22094
22095 ---
22096 ---@param mbox_s string
22097 ---
22098 ---@return Message[] mbox
22099 ---
22100 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22101 function mbox.parse(mbox_s) end
22102
22103 ---
22104 ---@param message_s string
22105 ---
22106 ---@return Message message
22107 ---
22108 ---😱 [Types](https://github.com/LuaCATS/luasocket/blob/main/library/mbox.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luasocket/pulls)
22109 function mbox.parse_message(message_s) end
22110 mplib = {}
22111
22112 ---
22113 ---__Reference:__
22114 ---
22115 ---* Corresponding C source code: [lmplib.c#L330-L374](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L330-L374)
22116 ---
22117 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22118 ---@alias MpFindFileFunc fun(name: string, mode: MpFileFileMode, type: MpFindFileType): string
22119
22120 ---
22121 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22122 ---@alias MpFileFileMode `r`|`w` the file mode
22123
22124 ---
22125 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22126 ---@alias MpFindFileType `mp`|`tfm`|`map`|`pfb`|`enc` the kind of file
22127
22128 ---
22129 ---__Reference:__
22130 ---
22131 ---* Corresponding C source code: [lmplib.c#L408-L442](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L408-L442)
22132 ---
22133 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22134 ---@alias MpRunScriptFunc fun(name: string): string
22135
22136 ---
22137 ---__Reference:__
22138 ---
22139 ---* Corresponding C source code: [lmplib.c#L444-L480](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L444-L480)
22140 ---
22141 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22142 ---@alias MpMakeTextFunc fun(name: string, what: integer): string
22143
22144 ---
22145 ---__Reference:__
22146 ---
22147 ---* Corresponding C source code: [lmplib.c#L381-L406C2](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L381-L406C2)
22148 ---
22149 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22150 ---@alias MpScriptErrorFunc fun(name: string)
22151
22152 ---
22153 ---__Reference:__
22154 ---
22155 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L387-L409](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L387-L409)
22156 ---* Corresponding C source code: [lmplib.c#L308-L322](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L308-L322)
22157 ---
22158 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22159 ---@class MpArguments
22160 ---@field error_line? integer # error line width, default 79
22161 ---@field print_line? integer # line length in ps output 100
22162 ---@field random_seed? integer # the initial random seed variable
22163 ---@field interaction? `batch`|`nonstop`|`scroll`|`errorstop` # the interaction mode, default `errorstop`
22164 ---@field job_name? string # `--jobname`, default `mpout`
22165 ---@field find_file? MpFindFileFunc # a function to find files only local files
22166 ---@field run_script? MpRunScriptFunc
22167 ---@field make_text? MpMakeTextFunc
22168 ---@field script_error? MpScriptErrorFunc
22169 ---@field extensions? integer
22170 ---@field math_mode? `scaled`|`double`|`binary`|`decimal` # the number system to use, default `scaled`
22171 ---@field utf8_mode? boolean
22172
22173 ---
22174 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22175 ---@class MpInstance
22176 local MpInstance = {}
22177
22178 ---
22179 ---Create a new metapost instance.
22180 ---
22181 ---__Reference:__
22182 ---
22183 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L381-L385](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L381-L385)
22184 ---* Corresponding C source code: [lmplib.c#L532-L627](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L532-L627)
22185 ---
22186 ---@param args? MpArguments
22187 ---
22188 ---@return MpInstance
22189 ---
22190 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22191 function mplib.new(args) end
22192
22193 ---
22194 ---There are
22195 ---four fields, giving the maximum number of used items in each of four allocated
22196 ---object classes.
22197 ---
22198
22199 ---
22200 ---__Reference:__
22201 ---
22202 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L460-L470](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L460-L470)
22203 ---
22204 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22205 ---@class MpStats
22206 ---@field main_memory integer # The memory size.
22207 ---@field hash_size integer # The hash size.
22208 ---@field param_size integer # The simultaneous macro parameters.
22209 ---@field max_in_open integer # The input file nesting levels.
22210
22211 ---
22212 ---Return some statistics for this metapost instance.
22213 ---
22214 ---This function returns the vital statistics for an *MPlib* instance.
22215 ---
22216 ---Note that in the new version of *MPlib*, this is informational only. The objects
22217 ---are all allocated dynamically, so there is no chance of running out of space
22218 ---unless the available system memory is exhausted.
22219 ---
22220 ---__Reference:__
22221 ---
22222 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L470-L482](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L470-L482)
22223 ---* Corresponding C source code: [lmplib.c#L771-L792](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L771-L792)
22224 ---
22225 ---@param mp MpInstance
22226 ---
22227 ---@return MpStats
22228 ---
22229 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22230 function mplib.statistics(mp) end
22231
22232 ---
22233 ---Return some statistics for this metapost instance.
22234 ---
22235 ---This function returns the vital statistics for an *MPlib* instance.
22236 ---
22237 ---Note that in the new version of *MPlib*, this is informational only. The objects
22238 ---are all allocated dynamically, so there is no chance of running out of space
22239 ---unless the available system memory is exhausted.
22240 ---
22241 ---__Reference:__
22242 ---
22243 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L470-L482](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L470-L482)
22244 ---* Corresponding C source code: [lmplib.c#L771-L792](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L771-L792)
22245 ---
22246 ---@return MpStats
22247 ---
22248 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22249 function MpInstance:statistics() end
22250
22251 ---
22252 ---Execute metapost code in the instance.
22253 ---
22254 ---You can ask the *MetaPost* interpreter to run a chunk of code by calling mp.execute()
22255 ---
22256 ---for various bits of *MetaPost* language input. Be sure to check the `rettable.status` (see below) because when a fatal *MetaPost* error occurs the
22257 ---*MPlib* instance will become unusable thereafter.
22258 ---
22259 ---Generally speaking, it is best to keep your chunks small, but beware that all
22260 ---chunks have to obey proper syntax, like each of them is a small file. For
22261 ---instance, you cannot split a single statement over multiple chunks.
22262 ---
22263 ---In contrast with the normal stand alone `mpost` command, there is
22264 ---`no` implied “input” at the start of the first chunk.
22265 ---
22266 ---__Reference:__
22267 ---
22268 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L488-L507](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L488-L507)
22269 ---* Corresponding C source code: [lmplib.c#L692-L711](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L692-L711)
22270 ---
22271 ---@param mp MpInstance
22272 ---@param code string
22273 ---
22274 ---@return MpResult
22275 ---
22276 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22277 function mplib.execute(mp, code) end
22278
22279 ---
22280 ---Execute metapost code in the instance.
22281 ---
22282 ---You can ask the *MetaPost* interpreter to run a chunk of code by calling mp.execute()
22283 ---
22284 ---for various bits of *MetaPost* language input. Be sure to check the `rettable.status` (see below) because when a fatal *MetaPost* error occurs the
22285 ---*MPlib* instance will become unusable thereafter.
22286 ---
22287 ---Generally speaking, it is best to keep your chunks small, but beware that all
22288 ---chunks have to obey proper syntax, like each of them is a small file. For
22289 ---instance, you cannot split a single statement over multiple chunks.
22290 ---
22291 ---In contrast with the normal stand alone `mpost` command, there is
22292 ---`no` implied “input” at the start of the first chunk.
22293 ---
22294 ---__Reference:__
22295 ---
22296 ---* Source file of the `LuaTeX` manual: [luatex-graphics.tex#L488-L507](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-graphics.tex#L488-L507)
22297 ---* Corresponding C source code: [lmplib.c#L692-L711](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L692-L711)
22298 ---
22299 ---@param code string
22300 ---
22301 ---@return MpResult
22302 ---
22303 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22304 function MpInstance:execute(code) end
22305
22306 ---
22307 ---Finish a metapost instance.
22308 ---
22309 ---If for some reason you want to stop using an *MPlib* instance while processing is
22310 ---not yet actually done, you can call `finish`. Eventually, used memory
22311 ---will be freed and open files will be closed by the *Lua* garbage collector, but
22312 ---an explicit `finish` is the only way to capture the final part of the
22313 ---output streams.
22314 ---
22315 ---__Reference:__
22316 ---
22317 ---* Corresponding C source code: [lmplib.c#L713-L728](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L713-L728)
22318 ---
22319 ---@param mp MpInstance
22320 ---
22321 ---@return MpResult
22322 ---
22323 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22324 function mplib.finish(mp) end
22325
22326 ---
22327 ---Finish a metapost instance.
22328 ---
22329 ---If for some reason you want to stop using an *MPlib* instance while processing is
22330 ---not yet actually done, you can call `finish`. Eventually, used memory
22331 ---will be freed and open files will be closed by the *Lua* garbage collector, but
22332 ---an explicit `finish` is the only way to capture the final part of the
22333 ---output streams.
22334 ---
22335 ---__Reference:__
22336 ---
22337 ---* Corresponding C source code: [lmplib.c#L713-L728](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L713-L728)
22338 ---
22339 ---@return MpResult
22340 ---
22341 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22342 function MpInstance:finish() end
22343
22344 ---
22345 ---@alias MpResultStatus
22346 ---|0 # good
22347 ---|1 # warning
22348 ---|2 # errors
22349 ---|3 # fatal error
22350
22351 ---
22352 ---The return value of `execute` and `finish` is a table with a
22353 ---few possible keys (only `status` is always guaranteed to be present).
22354 ---
22355 ---__Reference:__
22356 ---
22357 ---* Corresponding C source code: [lmplib.c#L649-L690](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L649-L690)
22358 ---
22359 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22360 ---@class MpResult
22361 ---@field log? string # The output to the “log” stream.
22362 ---@field term? string # The output to the “term” stream.
22363 ---@field error? string # The output to the “error” stream (only used for “out of memory”).
22364 ---@field status MpResultStatus # The return value: `0` = good, `1` = warning, `2` = errors, `3` = fatal error.
22365 ---@field fig? MpFig[] # An array of generated figures (if any).
22366 ---
22367 ---When `status` equals 3, you should stop using this *MPlib* instance
22368 ---immediately, it is no longer capable of processing input.
22369 ---
22370 ---If it is present, each of the entries in the `fig` array is a userdata
22371 ---representing a figure object, and each of those has a number of object methods
22372 ---you can call:
22373
22374 ---
22375 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22376 ---@class MpFig
22377 local MpFig = {}
22378
22379 ---
22380 ---Return the bounding box, as an array of 4 values.
22381 ---number.
22382 ---
22383 ---When the boundingbox represents a “negated rectangle”, i.e. when the
22384 ---first set of coordinates is larger than the second set, the picture is empty.
22385 ---
22386 ---__Reference:__
22387 ---
22388 ---* Corresponding C source code: [lmplib.c#L1375-L1388](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1375-L1388)
22389 ---
22390 ---@return number[] # minx miny maxx maxy
22391 function MpFig.boundingbox() end
22392
22393 ---
22394 ---Return a string that is the ps output of the `fig`.
22395 ---
22396 ---this function accepts two optional integer arguments for specifying the values of `prologues` (first argument) and `procset` (second argument)
22397 ---
22398 ---__Reference:__
22399 ---
22400 ---* Corresponding C source code: [lmplib.c#L1262-L1276](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1262-L1276)
22401 ---@param prologues? integer
22402 ---@param procset? integer
22403 ---
22404 ---@return string|nil
22405 function MpFig.postscript(prologues, procset) end
22406
22407 ---
22408 ---Return a string that is the svg output of the `fig`.
22409 ---
22410 ---This function accepts an optional integer argument for specifying the value of `prologues`.
22411 ---
22412 ---__Reference:__
22413 ---
22414 ---* Corresponding C source code: [lmplib.c#L1278-L1291](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1278-L1291)
22415 ---
22416 ---@param prologues? integer
22417 ---
22418 ---@return string|nil
22419 function MpFig.svg(prologues) end
22420
22421 ---
22422 ---__Reference:__
22423 ---
22424 ---* Corresponding C source code: [lmplib.c#L1293-L1306](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1293-L1306)
22425 ---
22426 ---@param options? string
22427 ---
22428 ---@return string|nil
22429 function MpFig.png(options) end
22430
22431 ---
22432 ---Return the actual array of graphic objects in this `fig`.
22433 ---
22434 ---Note: you can call `fig:objects()` only once for any one `fig`
22435 ---object!
22436 ---
22437 ---__Reference:__
22438 ---
22439 ---* Corresponding C source code: [lmplib.c#L1213-L1233](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1213-L1233)
22440 ---@return table
22441 function MpFig.objects() end
22442
22443 ---
22444 ---Return a deep copy of the array of graphic objects in this `fig`.
22445 ---
22446 ---__Reference:__
22447 ---
22448 ---* Corresponding C source code: [lmplib.c#L1235-L1253](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1235-L1253)
22449 ---
22450 ---@return table
22451 function MpFig.copy_objects() end
22452
22453 ---
22454 ---The filename this `fig`'s *PostScript* output would have written to in stand alone mode
22455 ---
22456 ---__Reference:__
22457 ---
22458 ---* Corresponding C source code: [lmplib.c#L1308-L1318](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1308-L1318)
22459 ---
22460 ---@return string|nil
22461 function MpFig.filename() end
22462
22463 ---
22464 ---Return the `fontcharwd` value.
22465 ---
22466 ---__Reference:__
22467 ---
22468 ---* Corresponding C source code: [lmplib.c#L1320-L1329](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1320-L1329)
22469 ---
22470 ---@return number|nil
22471 function MpFig.width() end
22472
22473 ---
22474 ---Return the `fontcharht` value.
22475 ---
22476 ---__Reference:__
22477 ---
22478 ---* Corresponding C source code: [lmplib.c#L1331-L1340](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1331-L1340)
22479 ---
22480 ---@return number|nil
22481 function MpFig.height() end
22482
22483 ---
22484 ---Return the `fontchardp` value.
22485 ---
22486 ---__Reference:__
22487 ---
22488 ---* Corresponding C source code: [lmplib.c#L1342-L1351](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1342-L1351)
22489 ---
22490 ---@return number|nil
22491 function MpFig.depth() end
22492
22493 ---
22494 ---Return the `fontcharit` value.
22495 ---
22496 ---__Reference:__
22497 ---
22498 ---* Corresponding C source code: [lmplib.c#L1353-L1362](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1353-L1362)
22499 ---
22500 ---@return number|nil
22501 function MpFig.italcorr() end
22502
22503 ---
22504 ---Return the (rounded) `charcode` value.
22505 ---
22506 ---__Reference:__
22507 ---
22508 ---* Corresponding C source code: [lmplib.c#L1364-L1373](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1364-L1373)
22509 ---
22510 ---@return number|nil
22511 function MpFig.charcode() end ---
22512 ---All graphical objects have a field `type` that gives the object type as a
22513 ---string value;
22514 ---
22515 ---__Reference:__
22516 ---
22517 ---* Corresponding C source code: [psout.w#L5308-L5310](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/psout.w#L5308-L5310)
22518 ---
22519 ---@class MpGraphicObject
22520 ---@field type string
22521
22522 ---
22523 ---Get the list of
22524 ---accessible values for a particular object.
22525 ---
22526 ---__Reference:__
22527 ---
22528 ---* Corresponding C source code: [lmplib.c#L1548-L1591](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1548-L1591)
22529 ---
22530 ---@param obj MpGraphicObject
22531 ---
22532 ---@return string[]
22533 ---
22534 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22535 function mplib.fields(obj) end
22536
22537 ---
22538 ---__Reference:__
22539 ---
22540 ---* Corresponding C source code: [psout.w#L5335-L5346](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/psout.w#L5335-L5346)
22541 ---
22542 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22543 ---@class MpFill
22544 ---@field path table # the list of knots
22545 ---@field htap table # the list of knots for the reversed trajectory
22546 ---@field pen table # knots of the pen
22547 ---@field color table # the object's color
22548 ---@field linejoin integer # line join style (bare number)
22549 ---@field miterlimit integer # miterlimit
22550 ---@field prescript string # the prescript text
22551 ---@field postscript string # the postscript text
22552
22553 ---
22554 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22555 ---@class MpOutline
22556 ---@field path table # the list of knots
22557 ---@field pen table # knots of the pen
22558 ---@field color table # the object's color
22559 ---@field linejoin integer # line join style (bare number)
22560 ---@field miterlimit integer # miterlimit
22561 ---@field linecap integer # line cap style (bare number)
22562 ---@field dash table # representation of a dash list
22563 ---@field prescript string # the prescript text
22564 ---@field postscript string # the postscript text
22565
22566 ---
22567 ---__Reference:__
22568 ---
22569 ---* Corresponding C source code: [psout.w#L5312-L5333](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/psout.w#L5312-L5333)
22570 ---
22571 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22572 ---@class MpText
22573 ---@field text string # the text
22574 ---@field font string # font tfm name
22575 ---@field dsize integer # font size
22576 ---@field color table # the object's color
22577 ---@field width integer #
22578 ---@field height integer #
22579 ---@field depth integer #
22580 ---@field transform table # a text transformation
22581 ---@field prescript string # the prescript text
22582 ---@field postscript string # the postscript text
22583
22584 ---
22585 ---__Reference:__
22586 ---
22587 ---* Corresponding C source code: [psout.w#L5372-L5375](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/psout.w#L5372-L5375)
22588 ---
22589 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22590 ---@class MpSpecial
22591 ---@field prescript string # special text
22592
22593 ---
22594 ---__Reference:__
22595 ---
22596 ---* Corresponding C source code: [psout.w#L5362-L5370](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/psout.w#L5362-L5370)
22597 ---
22598 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22599 ---@class MpStartBoundsClip
22600 ---@field path table # the list of knots
22601
22602 ---
22603 ---Paths and pens (that are really just a special type of paths as far as mplib is
22604 ---concerned) are represented by an array where each entry is a table that
22605 ---represents a knot.
22606 ---
22607 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22608 ---@class MpKnot
22609 ---@field left_type string # when present: endpoint, but usually absent
22610 ---@field right_type string # like `left_type`
22611 ---@field x_coord number # X coordinate of this knot
22612 ---@field y_coord number # Y coordinate of this knot
22613 ---@field left_x number # X coordinate of the precontrol point of this knot
22614 ---@field left_y number # Y coordinate of the precontrol point of this knot
22615 ---@field right_x number # X coordinate of the postcontrol point of this knot
22616 ---@field right_y number # Y coordinate of the postcontrol point of this knot
22617 ---
22618 ---There is one special case: pens that are (possibly transformed) ellipses have an
22619 ---extra string-valued key `type` with value `elliptical` besides the
22620 ---array part containing the knot list.
22621 ---
22622
22623 ---
22624 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22625 ---@alias MpPathPen MpKnot[]
22626
22627 ---
22628 ---A color is an integer array with 0, 1, 3 or 4 values:
22629 ---
22630 --- field type explanation
22631 ---
22632 --- `0` marking only no values
22633 --- `1` greyscale one value in the range `(0,1)`, “black” is `0`
22634 --- `3` \RGB three values in the range `(0,1)`, “black” is `0,0,0`
22635 --- `4` \CMYK four values in the range `(0,1)`, “black” is `0,0,0,1`
22636 ---
22637 ---If the color model of the internal object was `uninitialized`, then it was
22638 ---initialized to the values representing “black” in the colorspace `defaultcolormodel` that was in effect at the time of the `shipout`.
22639 ---
22640 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22641 ---@alias MpColor integer[]
22642
22643 ---
22644 ---Each transform is a six-item array.
22645 ---
22646 ---Note that the translation (index 1 and 2) comes first. This differs from the
22647 ---ordering in *PostScript*, where the translation comes last.
22648 ---
22649 ---```
22650 ---{ x, y, xx, yx, xy, yy }
22651 ---```
22652 ---
22653 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22654 ---@alias MPTransform number[]
22655
22656 ---
22657 ---Each `dash` is two-item hash, using the same model as *PostScript* for the
22658 ---representation of the dashlist. `dashes` is an array of “on” and
22659 ---“off”, values, and `offset` is the phase of the pattern.
22660 ---
22661 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22662 ---@class MpDash
22663 ---@field dashes table # an array of on-off numbers
22664 ---@field offset integer # the starting offset value
22665
22666 ---
22667 ---There is helper function (`pen_info(obj)`) that returns a table containing
22668 ---a bunch of vital characteristics of the used pen (all values are floats):
22669 ---
22670 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22671 ---@class PenInfo
22672 ---@field width number # width of the pen
22673 ---@field sx number # `x` scale
22674 ---@field rx number # `xy` multiplier
22675 ---@field ry number # `yx` multiplier
22676 ---@field sy number # `y` scale
22677 ---@field tx number # `x` offset
22678 ---@field ty number # `y` offset
22679 ---
22680
22681 ---
22682 ---__Reference:__
22683 ---
22684 ---* Corresponding C source code: [lmplib.c#L1474-L1539](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1474-L1539)
22685 ---
22686 ---@param obj MpGraphicObject
22687 ---
22688 ---@return PenInfo|nil
22689 ---
22690 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22691 function mplib.pen_info(obj) end
22692
22693 ---
22694 ---Report a character's width.
22695 ---
22696 ---This function finds the size of a glyph in a defined font. The `fontname`
22697 ---is the same name as the argument to `infont`; the `char` is a glyph
22698 ---id in the range 0 to 255; the returned `width` is in AFM units.
22699 ---
22700 ---__Reference:__
22701 ---
22702 ---* Corresponding C source code: [lmplib.c#L748-L751](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L748-L751)
22703 ---
22704 ---@param mp MpInstance
22705 ---@param fontname string
22706 ---@param char integer
22707 ---
22708 ---@return number width # AFM units
22709 ---
22710 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22711 function mplib.char_width(mp, fontname, char) end
22712
22713 ---
22714 ---Report a character's width.
22715 ---
22716 ---This function finds the size of a glyph in a defined font. The `fontname`
22717 ---is the same name as the argument to `infont`; the `char` is a glyph
22718 ---id in the range 0 to 255; the returned `width` is in AFM units.
22719 ---
22720 ---__Reference:__
22721 ---
22722 ---* Corresponding C source code: [lmplib.c#L748-L751](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L748-L751)
22723 ---
22724 ---@param fontname string
22725 ---@param char integer
22726 ---
22727 ---@return number width # AFM units
22728 ---
22729 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22730 function MpInstance:char_width(fontname, char) end
22731
22732 ---
22733 ---Report a character's height.
22734 ---
22735 ---This function finds the size of a glyph in a defined font. The `fontname`
22736 ---is the same name as the argument to `infont`; the `char` is a glyph
22737 ---id in the range 0 to 255; the returned `height` is in AFM units.
22738 ---
22739 ---__Reference:__
22740 ---
22741 ---* Corresponding C source code: [lmplib.c#L758-L761](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L758-L761)
22742 ---
22743 ---@param mp MpInstance
22744 ---@param fontname string
22745 ---@param char integer
22746 ---
22747 ---@return number height # AFM units
22748 ---
22749 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22750 function mplib.char_height(mp, fontname, char) end
22751
22752 ---
22753 ---Report a character's height.
22754 ---
22755 ---This function finds the size of a glyph in a defined font. The `fontname`
22756 ---is the same name as the argument to `infont`; the `char` is a glyph
22757 ---id in the range 0 to 255; the returned `height` is in AFM units.
22758 ---
22759 ---__Reference:__
22760 ---
22761 ---* Corresponding C source code: [lmplib.c#L758-L761](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L758-L761)
22762 ---
22763 ---@param fontname string
22764 ---@param char integer
22765 ---
22766 ---@return number height # FM units
22767 ---
22768 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22769 function MpInstance:char_height(fontname, char) end
22770
22771 ---
22772 ---Report a character's depth.
22773 ---
22774 ---This function finds the size of a glyph in a defined font. The `fontname`
22775 ---is the same name as the argument to `infont`; the `char` is a glyph
22776 ---id in the range 0 to 255; the returned `depth` is in AFM units.
22777 ---
22778 ---__Reference:__
22779 ---
22780 ---* Corresponding C source code: [lmplib.c#L753-L756](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L753-L756)
22781 ---
22782 ---@param mp MpInstance
22783 ---@param fontname string
22784 ---@param char integer
22785 ---
22786 ---@return number depth # AFM units
22787 ---
22788 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22789 function mplib.char_depth(mp, fontname, char) end
22790
22791 ---
22792 ---Report a character's depth.
22793 ---
22794 ---This function finds the size of a glyph in a defined font. The `fontname`
22795 ---is the same name as the argument to `infont`; the `char` is a glyph
22796 ---id in the range 0 to 255; the returned `depth` is in AFM units.
22797 ---
22798 ---__Reference:__
22799 ---
22800 ---* Corresponding C source code: [lmplib.c#L753-L756](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L753-L756)
22801 ---
22802 ---@param fontname string
22803 ---@param char integer
22804 ---
22805 ---@return number depth # AFM units
22806 ---
22807 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22808 function MpInstance:char_depth(fontname, char) end
22809
22810 ---
22811 ---__Reference:__
22812 ---
22813 ---* Corresponding C source code: [lmplib.c#L497-L510](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L497-L510)
22814 ---
22815 ---@param mp MpInstance
22816 ---@param name string
22817 ---
22818 ---@return boolean value
22819 ---
22820 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22821 function mplib.get_boolean(mp, name) end
22822
22823 ---
22824 ---__Reference:__
22825 ---
22826 ---* Corresponding C source code: [lmplib.c#L497-L510](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L497-L510)
22827 ---
22828 ---@param name string
22829 ---
22830 ---@return boolean value
22831 ---
22832 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22833 function MpInstance:get_boolean(name) end
22834
22835 ---
22836 ---Not documented alias for get_numeric
22837 ---function mplib.get_number() end
22838
22839 ---
22840 ---__Reference:__
22841 ---
22842 ---* Corresponding C source code: [lmplib.c#L482-L495](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L482-L495)
22843 ---
22844 ---@param mp MpInstance
22845 ---@param name string
22846 ---
22847 ---@return integer value
22848 ---
22849 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22850 function mplib.get_numeric(mp, name) end
22851
22852 ---
22853 ---__Reference:__
22854 ---
22855 ---* Corresponding C source code: [lmplib.c#L482-L495](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L482-L495)
22856 ---
22857 ---@param name string
22858 ---
22859 ---@return integer value
22860 ---
22861 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22862 function MpInstance:get_numeric(name) end
22863
22864 ---
22865 ---__Reference:__
22866 ---
22867 ---* Corresponding C source code: [lmplib.c#L512-L528](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L512-L528)
22868 ---
22869 ---@param mp MpInstance
22870 ---@param name string
22871 ---
22872 ---@return string value
22873 ---
22874 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22875 function mplib.get_string(mp, name) end
22876
22877 ---
22878 ---__Reference:__
22879 ---
22880 ---* Corresponding C source code: [lmplib.c#L512-L528](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L512-L528)
22881 ---
22882 ---@param name string
22883 ---
22884 ---@return string value
22885 ---
22886 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22887 function MpInstance:get_string(name) end
22888
22889 ---
22890 ---__Reference:__
22891 ---
22892 ---* Corresponding C source code: [lmplib.c#L1649-L1693](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1649-L1693)
22893 ---
22894 ---@param mp MpInstance
22895 ---@param name string
22896 ---
22897 ---@return table value
22898 ---
22899 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22900 function mplib.get_path(mp, name) end
22901
22902 ---
22903 ---__Reference:__
22904 ---
22905 ---* Corresponding C source code: [lmplib.c#L1649-L1693](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L1649-L1693)
22906 ---
22907 ---@param name string
22908 ---
22909 ---@return table value
22910 ---
22911 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22912 function MpInstance:get_path(name) end
22913
22914 ---
22915 ---__Reference:__
22916 ---
22917 ---* Corresponding C source code: [lmplib.c#L763-L769](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L763-L769)
22918 ---
22919 ---@return string version # for example `2.02`
22920 ---
22921 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22922 function mplib.version() end
22923
22924 ---
22925 ---__Reference:__
22926 ---
22927 ---* Corresponding C source code: [lmplib.c#L978-L1195](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L978-L1195)
22928 ---
22929 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22930 --
22931 ---@param mp MpInstance
22932 ---@param coordinates table
22933 ---@param cyclic boolean
22934 function mplib.solve_path(mp, coordinates, cyclic) end
22935
22936 ---
22937 ---__Reference:__
22938 ---
22939 ---* Corresponding C source code: [lmplib.c#L978-L1195](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/mplibdir/lmplib.c#L978-L1195)
22940 ---
22941 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/mplib.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
22942 ---
22943 ---@param coordinates table
22944 ---@param cyclic boolean
22945 function MpInstance:solve_path(coordinates, cyclic) end
22946
22947 ---
22948 ---https://github.com/TeX-Live/luatex/tree/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luazip
22949 ---Changes to upstream: global zip table
22950
22951 ---
22952 ---The definitions are developed in this repository: https://github.com/LuaCATS/luazip
22953
22954 ---
22955 ---`LuaZip` is a lightweight Lua extension library that can be used to read files stored inside zip files. It uses `zziplib` to do all the hard work.
22956 ---
22957 ---The API exposed to Lua is very simple and very similiar to the usual file handling functions provided by the I/O Lua standard library. In fact, the API is so similar that parts of this manual are extracted from the Lua manual, copyrighted by Tecgraf, PUC-Rio.
22958 ---
22959 ---History:
22960 ---
22961 ---* keplerproject.org (link not accessible): http://www.keplerproject.org/luazip
22962 ---* luaforge.net (link not accessible): http://luaforge.net/projects/luazip
22963 ---* Forked from the CVS repository on luaforge.net on Jan. 20, 2010: https://github.com/luaforge/luazip
22964 ---* Most active fork: https://github.com/mpeterv/luazip
22965 ---
22966 ---Project on luarocks: https://luarocks.org/modules/mpeterv/luazip
22967 ---HTML documentation: http://mpeterv.github.io/luazip
22968 ---
22969 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
22970 zip = {}
22971
22972 ---
22973 ---Check if a zip file is open or closed.
22974 ---
22975 ---__Reference:__
22976 ---
22977 ---* Corresponding C source code: (luazip.c#L217-L225)[https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L217-L225]
22978 ---
22979 ---__Example:__
22980 ---
22981 ---```lua
22982 ---local z_file = zip.open('test.zip')
22983 ---assert(z_file)
22984 ---assert(zip.type(z_file) == "zip file")
22985 ---z_file:close()
22986 ---assert(zip.type(z_file) == "closed zip file")
22987 ---```
22988 ---
22989 ---@param zfile ZFile
22990 ---
22991 ---@return "closed zip file"|"zip file"|nil
22992 ---
22993 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
22994 function zip.type(zfile) end
22995
22996 ---
22997 ---Open a zip file and return a new zip file handle.
22998 ---
22999 ---In case of
23000 ---error it returns nil and an error message. Unlike `io.open`, there is no
23001 ---`mode` parameter, as the only supported mode is "read".
23002 ---
23003 ---__Example:__
23004 ---
23005 ---```lua
23006 ---local z_file = zip.open('test.zip')
23007 ---assert(z_file)
23008 ---```
23009 ---
23010 ---__Reference:__
23011 ---
23012 ---* Corresponding C source code: [luazip.c#L106-L119](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L106-L119)
23013 ---
23014 ---@param filename string
23015 ---
23016 ---@return ZFile|nil
23017 ---@return nil|string err
23018 ---
23019 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23020 function zip.open(filename) end
23021
23022 ---
23023 ---Open a file and return a file handle.
23024 ---
23025 ---In case of
23026 ---error it returns nil and an error message. Unlike `io.open`, there is no
23027 ---`mode` parameter, as the only supported mode is `read`.
23028 ---
23029 ---This function implements a virtual file system based on optionally compressed files.
23030 ---Instead of simply looking for a file at a given path, this function goes recursively up
23031 ---through all path separators ("/") looking for zip files there. If it finds a zip file,
23032 ---this function use the remaining path to open the requested file.
23033 ---The optional parameter `extensions` allows the use of file extensions other than .zip
23034 ---during the lookup. It can be a string corresponding to the extension or an indexed table
23035 ---with the lookup extensions sequence.
23036 ---
23037 ---__Example:__
23038 ---
23039 ---```lua
23040 ----- test.zip: Hello-World.txt
23041 ---local z_internal_file = zip.openfile('test/Hello-world.txt')
23042 ---assert(z_internal_file)
23043 ---local content = z_internal_file:read('*a')
23044 ---assert(content == 'Hello, World!\n', content)
23045 ---```
23046 ---
23047 ---__Reference:__
23048 ---
23049 ---* Corresponding C source code: [luazip.c#L151-L215](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L151-L215)
23050 ---
23051 ---@param filename string
23052 ---@param extensions? string|string[]
23053 ---
23054 ---@return ZInternalFile|nil
23055 ---@return nil|string err
23056 ---
23057 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23058 function zip.openfile(filename, extensions) end
23059
23060 ---
23061 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23062 ---@class ZFile
23063 local ZFile = {}
23064
23065 ---
23066 ---Close a zfile opened by `zip.open`.
23067 ---
23068 ---__Example:__
23069 ---
23070 ---```lua
23071 ---local z_file = zip.open('test.zip')
23072 ---local success = zip.close(z_file)
23073 ---assert(success == true)
23074 ---```
23075 ---
23076 ---__Reference:__
23077 ---
23078 ---* Corresponding C source code: [luazip.c#L121-L131](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L121-L131)
23079 ---
23080 ---@param zfile ZFile
23081 ---
23082 ---@return boolean success
23083 function zip.close(zfile) end
23084
23085 ---
23086 ---Close a zfile opened by `zip.open`.
23087 ---
23088 ---__Example:__
23089 ---
23090 ---```lua
23091 ---local z_file = zip.open('../test.zip')
23092 ---assert(z_file)
23093 ---local success = z_file:close()
23094 ---assert(success == true, success)
23095 ---```
23096 ---
23097 ---__Reference:__
23098 ---
23099 ---* Corresponding C source code: [luazip.c#L121-L131](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L121-L131)
23100 ---
23101 ---@return boolean success
23102 ---
23103 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23104 function ZFile:close() end
23105
23106 ---
23107 ---@class ZInternalFileInfo
23108 ---@field filename string # The full path of a file, for example `folder/Test.txt`.
23109 ---@field compression_method integer # for example `8`.
23110 ---@field compressed_size integer # The compressed size of the file in bytes, for example `28673`.
23111 ---@field uncompressed_size integer # The uncompressed size of the file in bytes, for example `434654`.
23112
23113 ---
23114 ---Return an iterator function that returns a new table containing
23115 ---informations about the current file.
23116 ---
23117 ---__Example:__
23118 ---
23119 ---```lua
23120 ---local z_file = zip.open('../test.zip')
23121 ---assert(z_file)
23122 ---
23123 ---for info in z_file:files() do
23124 --- assert(info.filename)
23125 --- assert(info.compression_method)
23126 --- assert(info.compressed_size)
23127 --- assert(info.uncompressed_size)
23128 ---end
23129 ---```
23130 ---
23131 ---__Reference:__
23132 ---
23133 ---* Corresponding C source code: [luazip.c#L278-L285](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L278-L285)
23134 ---
23135 ---@return fun(): ZInternalFileInfo
23136 ---
23137 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23138 function ZFile:files() end
23139
23140 ---
23141 ---Open a file that is stored inside the zip file opened by `zip.open`.
23142 ---
23143 ---The filename may contain the full path of the file contained inside the zip. The
23144 ---directory separator must be '/'.
23145 ---Unlike `f:open`, there is no `mode` parameter, as the only
23146 ---supported mode is "read".
23147 ---
23148 ---__Example:__
23149 ---
23150 ---```lua
23151 ---local z_file = zip.open('test.zip')
23152 ---assert(z_file)
23153 ---local _, err = z_file:open('xxx.xxx')
23154 ---assert(err == 'could not open file `xxx.xxx\'')
23155 ---
23156 ---local z_internal_file, err = z_file:open('Hello-world.txt')
23157 ---assert(z_internal_file)
23158 ---assert(err == nil)
23159 ---```
23160 ---
23161 ---__Reference:__
23162 ---
23163 ---* Corresponding C source code: [luazip.c#L133-L146](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L133-L146)
23164 ---
23165 ---@param filename string
23166 ---
23167 ---@return ZInternalFile|nil
23168 ---@return nil|string err
23169 ---
23170 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23171 function ZFile:open(filename) end
23172
23173 ---
23174 ---@class ZInternalFile
23175 local ZInternalFile = {}
23176
23177 ---
23178 ---Read a `file` according to the given formats, which specify what to read.
23179 ---
23180 ---For each format, the function returns a string with the characters read, or nil if it cannot read
23181 ---data with the specified format. When called without formats, it uses a default format that reads
23182 ---the entire next line (see below).
23183 ---
23184 ---The available formats are:
23185 ---
23186 ---* `*a`: reads the whole file, starting at the current position. On end of file, it
23187 ---returns the empty string.
23188 ---* `*l`: reads the next line (skipping the end of line), returns nil on end of file.
23189 ---This is the default format.
23190 ---* `number`: reads a string with up to that number of characters, returning nil
23191 ---on end of file.
23192 ---
23193 ---__Example:__
23194 ---
23195 ---```lua
23196 ---local z_file = zip.open('../test.zip')
23197 ---assert(z_file)
23198 ---local z_internal_file, err = z_file:open('Hello-world.txt')
23199 ---assert(z_internal_file)
23200 ---local content = z_internal_file:read('*a')
23201 ---assert(content == 'Hello, World!\n', content)
23202 ---
23203 ---```
23204 ---
23205 ---__Reference:__
23206 ---
23207 ---* Corresponding C source code: [luazip.c#L407-L409](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L407-L409)
23208 ---
23209 ---@param ... '*a'|'*l'|integer
23210 ---
23211 ---@return string|nil
23212 ---
23213 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23214 function ZInternalFile:read(...) end
23215
23216 ---
23217 ---Sets and gets the file position.
23218 ---
23219 ---Unlike the standard I/O read, the format `"*n"` is not supported.
23220 ---
23221 ---Sets and gets the file position, measured from the beginning of the file, to the position given
23222 ---by `offset` plus a base specified by the string `whence`, as follows:
23223 ---
23224 ---* `set`: base is position 0 (beginning of the file);
23225 ---* `cur`: base is current position;
23226 ---* `end`: base is end of file;
23227 ---
23228 ---In case of success, function `seek` returns the final file position, measured in bytes
23229 ---from the beginning of the file. If this function fails, it returns nil, plus an error string.
23230 ---The default value for `whence` is `"cur"`, and for `offset` is 0.
23231 ---Therefore, the call `zfile:seek()` returns the current file position, without changing
23232 ---it; the call `zfile:seek("set")` sets the position to the beginning of the file (and returns 0);
23233 ---and the call `zfile:seek("end")` sets the position to the end of the file, and returns its
23234 ---size.
23235 ---
23236 ---__Example:__
23237 ---
23238 ---```lua
23239 ---local z_file = zip.open('../test.zip')
23240 ---assert(z_file)
23241 ---local z_internal_file, err = z_file:open('Hello-world.txt')
23242 ---assert(z_internal_file)
23243 ---
23244 ---local size = z_internal_file:seek('end')
23245 ---assert(size == 14, size)
23246 ---
23247 ---local offset = z_internal_file:seek('set', 7)
23248 ---assert(offset == 7)
23249 ---
23250 ---local cur = z_internal_file:seek('cur')
23251 ---assert(cur == 7)
23252 ---```
23253 ---
23254 ---__Reference:__
23255 ---
23256 ---* Corresponding C source code: [luazip.c#L429-L447](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L429-L447)
23257 ---
23258 ---@param whence? 'set'|'cur'|'end'
23259 ---@param offset? integer
23260 ---
23261 ---@return integer|nil offset
23262 ---@return nil|string err
23263 ---@return nil|integer errno
23264 ---
23265 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23266 function ZInternalFile:seek(whence, offset) end
23267
23268 ---
23269 ---Close a file opened by `zfile:open()`.
23270 ---
23271 ---__Example:__
23272 ---
23273 ---```lua
23274 ---local z_file = zip.open('../test.zip')
23275 ---assert(z_file)
23276 ---local z_internal_file, err = z_file:open('Hello-world.txt')
23277 ---assert(z_internal_file)
23278 ---local success = z_internal_file:close()
23279 ---assert(success == true)
23280 ---```
23281 ---
23282 ---__Reference:__
23283 ---
23284 ---* Corresponding C source code: [luazip.c#L295-L297](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L295-L297)
23285 ---
23286 ---@see ZFile.open
23287 ---
23288 ---@return true|nil success
23289 ---@return nil|string err
23290 ---@return nil|integer errno
23291 ---
23292 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23293 function ZInternalFile:close() end
23294
23295 ---
23296 ---Return an iterator function that returns a new line from the
23297 -- file each time it is called.
23298 ---
23299 ---Therefore, the construction
23300 ---
23301 ---```lua
23302 ---for line in file:lines() do ... end
23303 ---```
23304 ---
23305 ---will iterate over all lines of the file.
23306 ---
23307 ---__Example:__
23308 ---
23309 ---```lua
23310 ---local z_file = zip.open('../test.zip')
23311 ---assert(z_file)
23312 ---local z_internal_file, err = z_file:open('Hello-world.txt')
23313 ---assert(z_internal_file)
23314 ---for line in z_internal_file:lines() do
23315 --- assert(line == 'Hello, World!')
23316 ---end
23317 ---```
23318 ---
23319 ---__Reference:__
23320 ---
23321 ---* Corresponding C source code: [luazip.c#L423-L427](https://github.com/mpeterv/luazip/blob/e424f667cc5c78dd19bb5eca5a86b3c8698e0ce5/src/luazip.c#L423-L427)
23322 ---
23323 ---@return fun(): string
23324 ---
23325 ---😱 [Types](https://github.com/LuaCATS/luazip/blob/main/library/zip.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luazip/pulls)
23326 function ZInternalFile:lines() end
23327
23328 ---
23329 ---`slnunicode`, from the `selene` libraries, http://luaforge.net/projects/sln. This library has been slightly extended
23330 ---so that the `unicode.utf8.*` functions also accept the first 256 values
23331 ---of plane 18. This is the range *LuaTeX* uses for raw binary output, as
23332 ---explained above. We have no plans to provide more like this because you can
23333 ---basically do all that you want in *Lua*.
23334 ---
23335 ---Changes to the upstream project: global unicode table
23336
23337 ---
23338 ---The definitions are developed in this repository: https://github.com/LuaCATS/slnunicode
23339
23340 ---
23341 ---There are four `string`-like tables of functions:
23342 ---`ascii`, `latin1`, `utf8` and `grapheme`.
23343 ---
23344 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23345 unicode = {}
23346
23347 ---
23348 ---`ascii` is single-byte like `string`, but use the unicode table for upper/lower and character classes.
23349 ---`ascii` does not touch bytes > 127 on upper/lower.
23350 ---
23351 ---`ascii` can be used as locale-independent `string` replacement.
23352 ---
23353 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23354 unicode.ascii = {}
23355
23356 ---
23357 ---Return the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.
23358 ---
23359 ---__Example:__
23360 ---
23361 ---```lua
23362 ---local one, two = unicode.ascii.byte('İÖ', 3, 4)
23363 ----- the UTF-8 seq for °
23364 ---assert(one == 194)
23365 ---assert(two == 176)
23366 ---```
23367 ---
23368 ---@see string.byte
23369 ---
23370 ---@param s string
23371 ---@param i? integer
23372 ---@param j? integer
23373 ---
23374 ---@return integer ...
23375 ---
23376 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23377 function unicode.ascii.byte(s, i, j) end
23378
23379 ---
23380 ---Return a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.
23381 ---
23382 ---@see string.char
23383 ---
23384 ---@param byte integer
23385 ---@param ... integer
23386 ---
23387 ---@return string
23388 ---
23389 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23390 function unicode.ascii.char(byte, ...) end
23391
23392 ---
23393 ---Return a string containing a binary representation (a binary chunk) of the given function.
23394 ---
23395 ---@see string.dump
23396 ---
23397 ---@param f fun(...: any):...unknown
23398 ---
23399 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23400 function unicode.ascii.dump(f) end
23401
23402 ---
23403 ---Look for the first match of pattern in the string.
23404 ---
23405 ---@see string.find
23406 ---
23407 ---@param s string
23408 ---@param pattern string
23409 ---@param init? integer
23410 ---
23411 ---@return integer start
23412 ---@return integer end
23413 ---
23414 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23415 function unicode.ascii.find(s, pattern, init) end
23416
23417 ---
23418 ---Return a formatted version of its variable number of arguments following the description given in its first argument.
23419 ---
23420 ---@see string.format
23421 ---
23422 ---@param s any
23423 ---@param ... any
23424 ---
23425 ---@return string
23426 ---
23427 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23428 function unicode.ascii.format(s, ...) end
23429
23430 ---
23431 ---Return an iterator function that, each time it is called, returns the next captures from `pattern` over the string `s`.
23432 ---
23433 ---@see string.gmatch
23434 ---
23435 ---@param s string
23436 ---@param pattern string
23437 ---
23438 ---@return fun(): string, ...
23439 ---
23440 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23441 function unicode.ascii.gmatch(s, pattern) end
23442
23443 ---
23444 ---Return a copy of `s` in which all (or the first `n`, if given) occurrences of the pattern have been replaced by a replacement string specified by `repl`.
23445 ---
23446 ---@see string.gsub
23447 ---
23448 ---@param s string
23449 ---@param pattern string
23450 ---@param repl string|number|table|function
23451 ---@param n? integer
23452 ---
23453 ---@return string
23454 ---@return integer count
23455 ---
23456 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23457 function unicode.ascii.gsub(s, pattern, repl, n) end
23458
23459 ---
23460 ---Return the length of a string.
23461 ---
23462 ---__Example:__
23463 ---
23464 ---```lua
23465 ----- \204\136 (CC,88) -> COMBINING DIAERESIS in UTF-8
23466 ---local len = unicode.ascii.len('A\204\136O\204\136')
23467 ---assert(len == 6)
23468 ---```
23469 ---
23470 ---@see string.len
23471 ---
23472 ---@param s string
23473 ---
23474 ---@return integer
23475 ---
23476 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23477 function unicode.ascii.len(s) end
23478
23479 ---
23480 ---Return a copy of this string with all uppercase letters changed to lowercase.
23481 ---
23482 ---__Example:__
23483 ---
23484 ---```lua
23485 ---local lower = unicode.ascii.lower('Ä')
23486 ---assert(lower == 'Ä')
23487 ---```
23488 ---
23489 ---@see string.lower
23490 ---
23491 ---@param s string
23492 ---
23493 ---@return string
23494 ---
23495 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23496 function unicode.ascii.lower(s) end
23497
23498 ---
23499 ---Look for the first match of pattern in the string.
23500 ---
23501 ---@see string.gmatch
23502 ---
23503 ---@param s string
23504 ---@param pattern string
23505 ---@param init? integer
23506 ---
23507 ---@return any ...
23508 ---
23509 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23510 function unicode.ascii.match(s, pattern, init) end
23511
23512 ---
23513 ---Return a string that is the concatenation of `n` copies of the string `s`.
23514 ---
23515 ---@see string.rep
23516 ---
23517 ---@param s string
23518 ---@param n integer
23519 ---
23520 ---@return string
23521 ---
23522 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23523 function unicode.ascii.rep(s, n) end
23524
23525 ---
23526 ---Return a string that is the string `s` reversed.
23527 ---
23528 ---@see string.reverse
23529 ---
23530 ---@param s string
23531 ---
23532 ---@return string
23533 ---
23534 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23535 function unicode.ascii.reverse(s) end
23536
23537 ---
23538 ---Return the substring of the string that starts at `i` and continues until `j`.
23539 ---
23540 ---@see string.sub
23541 ---
23542 ---@param s string
23543 ---@param i integer
23544 ---@param j? integer
23545 ---
23546 ---@return string
23547 ---
23548 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23549 function unicode.ascii.sub(s, i, j) end
23550
23551 ---
23552 ---Return a copy of this string with all lowercase letters changed to uppercase.
23553 ---
23554 ---__Example:__
23555 ---
23556 ---```lua
23557 ---local upper = unicode.ascii.upper('ä')
23558 ---assert(upper == 'ä')
23559 ---```
23560 ---
23561 ---@see string.upper
23562 ---
23563 ---@param s string
23564 ---
23565 ---@return string
23566 ---
23567 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23568 function unicode.ascii.upper(s) end
23569
23570 ---
23571 ---`latin1` is single-byte like `string`, but uses the unicode table for upper/lower and character classes.
23572 ---
23573 ---`latin1` can be used as locale-independent `string` replacement.
23574 ---
23575 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23576 unicode.latin1 = {}
23577
23578 ---
23579 ---Return the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.
23580 ---
23581 ---__Example:__
23582 ---
23583 ---```lua
23584 ---local one, two = unicode.latin1.byte('İÖ', 3, 4)
23585 ----- the UTF-8 seq for °
23586 ---assert(one == 194)
23587 ---assert(two == 176)
23588 ---```
23589 ---
23590 ---@see string.byte
23591 ---
23592 ---@param s string
23593 ---@param i? integer
23594 ---@param j? integer
23595 ---
23596 ---@return integer ...
23597 ---
23598 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23599 function unicode.latin1.byte(s, i, j) end
23600
23601 ---
23602 ---Return a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.
23603 ---
23604 ---@see string.char
23605 ---
23606 ---@param byte integer
23607 ---@param ... integer
23608 ---
23609 ---@return string
23610 ---
23611 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23612 function unicode.latin1.char(byte, ...) end
23613
23614 ---
23615 ---Return a string containing a binary representation (a binary chunk) of the given function.
23616 ---
23617 ---@param f fun(...: any):...unknown
23618 ---
23619 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23620 function unicode.latin1.dump(f) end
23621
23622 ---
23623 ---Look for the first match of pattern in the string.
23624 ---
23625 ---@see string.find
23626 ---
23627 ---@param s string
23628 ---@param pattern string
23629 ---@param init? integer
23630 ---
23631 ---@return integer start
23632 ---@return integer end
23633 ---
23634 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23635 function unicode.latin1.find(s, pattern, init) end
23636
23637 ---
23638 ---Return a formatted version of its variable number of arguments following the description given in its first argument.
23639 ---
23640 ---@see string.format
23641 ---
23642 ---@param s any
23643 ---@param ... any
23644 ---
23645 ---@return string
23646 ---
23647 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23648 function unicode.latin1.format(s, ...) end
23649
23650 ---
23651 ---Return an iterator function that, each time it is called, returns the next captures from `pattern` over the string `s`.
23652 ---
23653 ---@see string.gmatch
23654 ---
23655 ---@param s string
23656 ---@param pattern string
23657 ---
23658 ---@return fun(): string, ...
23659 ---
23660 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23661 function unicode.latin1.gmatch(s, pattern) end
23662
23663 ---
23664 ---Return a copy of `s` in which all (or the first `n`, if given) occurrences of the pattern have been replaced by a replacement string specified by `repl`.
23665 ---
23666 ---@see string.gsub
23667 ---
23668 ---@param s string
23669 ---@param pattern string
23670 ---@param repl string|number|table|function
23671 ---@param n? integer
23672 ---
23673 ---@return string
23674 ---@return integer count
23675 ---
23676 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23677 function unicode.latin1.gsub(s, pattern, repl, n) end
23678
23679 ---
23680 ---Return the length of a string.
23681 ---
23682 ---__Example:__
23683 ---
23684 ---```lua
23685 ----- \204\136 (CC,88) -> COMBINING DIAERESIS in UTF-8
23686 ---local len = unicode.latin1.len('A\204\136O\204\136')
23687 ---assert(len == 6)
23688 ---```
23689 ---
23690 ---@see string.len
23691 ---
23692 ---@param s string
23693 ---
23694 ---@return integer
23695 ---
23696 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23697 function unicode.latin1.len(s) end
23698
23699 ---
23700 ---Return a copy of this string with all uppercase letters changed to lowercase.
23701 ---
23702 ---__Example:__
23703 ---
23704 ---```lua
23705 ---local lower = unicode.latin1.lower('A')
23706 ---assert(lower == 'a')
23707 ---```
23708 ---
23709 ---@see string.lower
23710 ---
23711 ---@param s string
23712 ---
23713 ---@return string
23714 ---
23715 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23716 function unicode.latin1.lower(s) end
23717
23718 ---
23719 ---Look for the first match of pattern in the string.
23720 ---
23721 ---@see string.match
23722 ---
23723 ---@param s string
23724 ---@param pattern string
23725 ---@param init? integer
23726 ---
23727 ---@return any ...
23728 ---
23729 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23730 function unicode.latin1.match(s, pattern, init) end
23731
23732 ---
23733 ---Return a string that is the concatenation of `n` copies of the string `s`.
23734 ---
23735 ---@see string.rep
23736 ---
23737 ---@param s string
23738 ---@param n integer
23739 ---
23740 ---@return string
23741 ---
23742 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23743 function unicode.latin1.rep(s, n) end
23744
23745 ---
23746 ---Return a string that is the string `s` reversed.
23747 ---
23748 ---@see string.reverse
23749 ---
23750 ---@param s string
23751 ---
23752 ---@return string
23753 ---
23754 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23755 function unicode.latin1.reverse(s) end
23756
23757 ---
23758 ---Return the substring of the string that starts at `i` and continues until `j`.
23759 ---
23760 ---@see string.sub
23761 ---
23762 ---@param s string
23763 ---@param i integer
23764 ---@param j? integer
23765 ---
23766 ---@return string
23767 ---
23768 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23769 function unicode.latin1.sub(s, i, j) end
23770
23771 ---
23772 ---Return a copy of this string with all lowercase letters changed to uppercase.
23773 ---
23774 ---__Example:__
23775 ---
23776 ---```lua
23777 ---local upper = unicode.latin1.upper('ä')
23778 ---assert(upper == 'ä')
23779 ---```
23780 ---
23781 ---@see string.upper
23782 ---
23783 ---@param s string
23784 ---
23785 ---@return string
23786 ---
23787 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23788 function unicode.latin1.upper(s) end
23789
23790 ---
23791 ---`grapheme` takes care of grapheme clusters, which are characters followed by
23792 ---“grapheme extension” characters (Mn+Me) like combining diacritical marks.
23793 ---
23794 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23795 unicode.grapheme = {}
23796
23797 ---
23798 ---Return the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.
23799 ---
23800 ---__Example:__
23801 ---
23802 ---```lua
23803 ----- \204\136 (CC,88 ) -> COMBINING DIAERESIS in UTF-8
23804 ---local one, two = unicode.grapheme.byte('\204\136A\204\136O\204\136', 2)
23805 ----- decomposed
23806 ---assert(one == 65) -- 65 = 0041; LATIN CAPITAL LETTER A
23807 ---assert(two == 776) -- 776 = 0308; COMBINING DIAERESIS
23808 ---```
23809 ---
23810 ---@see string.byte
23811 ---
23812 ---@param s string
23813 ---@param i? integer
23814 ---@param j? integer
23815 ---
23816 ---@return integer ...
23817 ---
23818 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23819 function unicode.grapheme.byte(s, i, j) end
23820
23821 ---
23822 ---Return a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.
23823 ---
23824 ---@see string.char
23825 ---
23826 ---@param byte integer
23827 ---@param ... integer
23828 ---
23829 ---@return string
23830 ---
23831 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23832 function unicode.grapheme.char(byte, ...) end
23833
23834 ---
23835 ---Return a string containing a binary representation (a binary chunk) of the given function.
23836 ---
23837 ---@see string.dump
23838 ---
23839 ---@param f fun(...: any): ...unknown
23840 ---
23841 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23842 function unicode.grapheme.dump(f) end
23843
23844 ---
23845 ---Look for the first match of pattern in the string.
23846 ---
23847 ---@see string.find
23848 ---
23849 ---@param s string
23850 ---@param pattern string
23851 ---@param init? integer
23852 ---
23853 ---@return integer start
23854 ---@return integer end
23855 ---
23856 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23857 function unicode.grapheme.find(s, pattern, init) end
23858
23859 ---
23860 ---Return a formatted version of its variable number of arguments following the description given in its first argument.
23861 ---
23862 ---@see string.format
23863 ---
23864 ---@param s any
23865 ---@param ... any
23866 ---
23867 ---@return string
23868 ---
23869 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23870 function unicode.grapheme.format(s, ...) end
23871
23872 ---
23873 ---Return an iterator function that, each time it is called, returns the next captures from `pattern` over the string `s`.
23874 ---
23875 ---@see string.gmatch
23876 ---
23877 ---@param s string
23878 ---@param pattern string
23879 ---
23880 ---@return fun(): string, ...
23881 ---
23882 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23883 function unicode.grapheme.gmatch(s, pattern) end
23884
23885 ---
23886 ---Return a copy of `s` in which all (or the first `n`, if given) occurrences of the pattern have been replaced by a replacement string specified by `repl`.
23887 ---
23888 ---@see string.gsub
23889 ---
23890 ---@param s string
23891 ---@param pattern string
23892 ---@param repl string|number|table|function
23893 ---@param n? integer
23894 ---
23895 ---@return string
23896 ---@return integer count
23897 ---
23898 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23899 function unicode.grapheme.gsub(s, pattern, repl, n) end
23900
23901 ---
23902 ---Return the length of a string.
23903 ---
23904 ---__Example:__
23905 ---
23906 ---```lua
23907 ----- \204\136 (CC,88) -> COMBINING DIAERESIS in UTF-8
23908 ---local len = unicode.grapheme.len('A\204\136O\204\136')
23909 ---assert(len == 2)
23910 ---```
23911 ---
23912 ---@see string.len
23913 ---
23914 ---@param s string
23915 ---
23916 ---@return integer
23917 ---
23918 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23919 function unicode.grapheme.len(s) end
23920
23921 ---
23922 ---Return a copy of this string with all uppercase letters changed to lowercase.
23923 ---
23924 ---__Example:__
23925 ---
23926 ---```lua
23927 ---local lower = unicode.grapheme.lower('Ä')
23928 ---assert(lower == 'ä')
23929 ---```
23930 ---
23931 ---@see string.lower
23932 ---
23933 ---@param s string
23934 ---
23935 ---@return string
23936 ---
23937 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23938 function unicode.grapheme.lower(s) end
23939
23940 ---
23941 ---Look for the first match of pattern in the string.
23942 ---
23943 ---@see string.match
23944 ---
23945 ---@param s string
23946 ---@param pattern string
23947 ---@param init? integer
23948 ---
23949 ---@return any ...
23950 ---
23951 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23952 function unicode.grapheme.match(s, pattern, init) end
23953
23954 ---
23955 ---Return a string that is the concatenation of `n` copies of the string `s`.
23956 ---
23957 ---@see string.rep
23958 ---
23959 ---@param s string
23960 ---@param n integer
23961 ---
23962 ---@return string
23963 ---
23964 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23965 function unicode.grapheme.rep(s, n) end
23966
23967 ---
23968 ---Return a string that is the string `s` reversed.
23969 ---
23970 ---@see string.reverse
23971 ---
23972 ---@param s string
23973 ---
23974 ---@return string
23975 ---
23976 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23977 function unicode.grapheme.reverse(s) end
23978
23979 ---
23980 ---Return the substring of the string that starts at `i` and continues until `j`.
23981 ---
23982 ---@see string.sub
23983 ---
23984 ---@param s string
23985 ---@param i integer
23986 ---@param j? integer
23987 ---
23988 ---@return string
23989 ---
23990 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
23991 function unicode.grapheme.sub(s, i, j) end
23992
23993 ---
23994 ---Return a copy of this string with all lowercase letters changed to uppercase.
23995 ---
23996 ---__Example:__
23997 ---
23998 ---```lua
23999 ---local upper = unicode.grapheme.upper('ä')
24000 ---assert(upper == 'Ä')
24001 ---```
24002 ---
24003 ---@see string.upper
24004 ---
24005 ---@param s string
24006 ---
24007 ---@return string
24008 ---
24009 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24010 function unicode.grapheme.upper(s) end
24011
24012 ---
24013 ---`utf8` operates on UTF-8 sequences as of RFC 3629:
24014 ---1 byte 0-7F, 2 byte 80-7FF, 3 byte 800-FFFF, 4 byte 1000-10FFFF
24015 ---(not exclusing UTF-16 surrogate characters)
24016 ---Any byte not part of such a sequence is treated as it's (Latin-1) value.
24017 ---
24018 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24019 unicode.utf8 = {}
24020
24021 ---
24022 ---Return the internal numeric codes of the characters `s[i], s[i+1], ..., s[j]`.
24023 ---
24024 ---__Example:__
24025 ---
24026 ---```lua
24027 ----- \204\136 (CC,88 ) -> COMBINING DIAERESIS in UTF-8
24028 ---local one, two = unicode.grapheme.byte('\204\136A\204\136O\204\136', 2, 3)
24029 ----- decomposed
24030 ---assert(one == 65) -- 65 = 0041; LATIN CAPITAL LETTER A
24031 ---assert(two == 776) -- 776 = 0308; COMBINING DIAERESIS
24032 ---```
24033 ---
24034 ---@see string.byte
24035 ---
24036 ---@param s string
24037 ---@param i? integer
24038 ---@param j? integer
24039 ---
24040 ---@return integer ...
24041 ---
24042 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24043 function unicode.utf8.byte(s, i, j) end
24044
24045 ---
24046 ---Return a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.
24047 ---
24048 ---@see string.char
24049 ---
24050 ---@param byte integer
24051 ---@param ... integer
24052 ---
24053 ---@return string
24054 ---
24055 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24056 function unicode.utf8.char(byte, ...) end
24057
24058 ---
24059 ---Return a string containing a binary representation (a binary chunk) of the given function.
24060 ---
24061 ---@see string.dump
24062 ---
24063 ---@param f fun(...: any):...unknown
24064 ---
24065 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24066 function unicode.utf8.dump(f) end
24067
24068 ---
24069 ---Look for the first match of pattern in the string.
24070 ---
24071 ---@see string.find
24072 ---
24073 ---@param s string
24074 ---@param pattern string
24075 ---@param init? integer
24076 ---
24077 ---@return integer start
24078 ---@return integer end
24079 ---
24080 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24081 function unicode.utf8.find(s, pattern, init) end
24082
24083 ---
24084 ---Return a formatted version of its variable number of arguments following the description given in its first argument.
24085 ---
24086 ---@see string.format
24087 ---
24088 ---@param s any
24089 ---@param ... any
24090 ---
24091 ---@return string
24092 ---
24093 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24094 function unicode.utf8.format(s, ...) end
24095
24096 ---
24097 ---Return an iterator function that, each time it is called, returns the next captures from `pattern` over the string `s`.
24098 ---
24099 ---@see string.gmatch
24100 ---
24101 ---@param s string
24102 ---@param pattern string
24103 ---
24104 ---@return fun(): string, ...
24105 ---
24106 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24107 function unicode.utf8.gmatch(s, pattern) end
24108
24109 ---
24110 ---Return a copy of `s` in which all (or the first `n`, if given) occurrences of the pattern have been replaced by a replacement string specified by `repl`.
24111 ---
24112 ---@see string.gsub
24113 ---
24114 ---@param s string
24115 ---@param pattern string
24116 ---@param repl string|number|table|function
24117 ---@param n? integer
24118 ---
24119 ---@return string
24120 ---@return integer count
24121 ---
24122 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24123 function unicode.utf8.gsub(s, pattern, repl, n) end
24124
24125 ---
24126 ---Return the length of a string.
24127 ---
24128 ---__Example:__
24129 ---
24130 ---```lua
24131 ----- \204\136 (CC,88) -> COMBINING DIAERESIS in UTF-8
24132 ---local len = unicode.utf8.len('A\204\136O\204\136')
24133 ---assert(len == 4)
24134 ---```
24135 ---
24136 ---@see string.len
24137 ---
24138 ---@param s string
24139 ---
24140 ---@return integer
24141 ---
24142 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24143 function unicode.utf8.len(s) end
24144
24145 ---
24146 ---Return a copy of this string with all uppercase letters changed to lowercase.
24147 ---
24148 ---__Example:__
24149 ---
24150 ---```lua
24151 ---local lower = unicode.utf8.lower('Ä')
24152 ---assert(lower == 'ä')
24153 ---```
24154 ---
24155 ---@see string.lower
24156 ---
24157 ---@param s string
24158 ---
24159 ---@return string
24160 ---
24161 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24162 function unicode.utf8.lower(s) end
24163
24164 ---
24165 ---Look for the first match of pattern in the string.
24166 ---
24167 ---@param s string
24168 ---@param pattern string
24169 ---@param init? integer
24170 ---
24171 ---@return any ...
24172 ---
24173 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24174 function unicode.utf8.match(s, pattern, init) end
24175
24176 ---
24177 ---Return a string that is the concatenation of `n` copies of the string `s`.
24178 ---
24179 ---@see string.rep
24180 ---
24181 ---@param s string
24182 ---@param n integer
24183 ---
24184 ---@return string
24185 ---
24186 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24187 function unicode.utf8.rep(s, n) end
24188
24189 ---
24190 ---Return a string that is the string `s` reversed.
24191 ---
24192 ---@see string.reverse
24193 ---
24194 ---@param s string
24195 ---
24196 ---@return string
24197 ---
24198 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24199 function unicode.utf8.reverse(s) end
24200
24201 ---
24202 ---Return the substring of the string that starts at `i` and continues until `j`.
24203 ---
24204 ---@see string.sub
24205 ---
24206 ---@param s string
24207 ---@param i integer
24208 ---@param j? integer
24209 ---
24210 ---@return string
24211 ---
24212 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24213 function unicode.utf8.sub(s, i, j) end
24214
24215 ---
24216 ---Return a copy of this string with all lowercase letters changed to uppercase.
24217 ---
24218 ---__Example:__
24219 ---
24220 ---```lua
24221 ---local upper = unicode.utf8.upper('ä')
24222 ---assert(upper == 'Ä')
24223 ---```
24224 ---
24225 ---@see string.upper
24226 ---
24227 ---@param s string
24228 ---
24229 ---@return string
24230 ---
24231 ---😱 [Types](https://github.com/LuaCATS/slnunicode/blob/main/library/unicode.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/slnunicode/pulls)
24232 function unicode.utf8.upper(s) end
24233
24234 ---
24235 ---The `vf` library can be used when *Lua* code, as defined in the `commands` of the font, is executed. The functions provided are similar as the
24236 ---commands: `char`, `down`, `fontid`, `image`, `node`, `nop`, `pop`, `push`, `right`, `rule`, `special` and `pdf`. This library has been present for a while but not been
24237 ---advertised and tested much, if only because it's easy to define an invalid font
24238 ---(or mess up the *PDF* stream). Keep in mind that the *Lua* snippets are executed
24239 ---each time when a character is output.
24240 ---
24241 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24242 vf = {}
24243
24244 ---
24245 ---Typeset a character from the current font, and move right by the character’s width.
24246 ---
24247 ---__Reference:__
24248 ---
24249 ---* Corresponding C source code: [lfontlib.c#L327-L352](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L327-L352)
24250 ---
24251 ---@param n integer
24252 ---
24253 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24254 function vf.char(n) end
24255
24256 ---
24257 ---Move down on the page.
24258 ---
24259 ---@param down integer
24260 ---
24261 ---__Reference:__
24262 ---
24263 ---* Corresponding C source code: [lfontlib.c#L354-L367](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L354-L367)
24264 ---
24265 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24266 function vf.down(down) end
24267
24268 ---
24269 ---__Reference:__
24270 ---
24271 ---* Corresponding C source code: [lfontlib.c#L369-L376](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L369-L376)
24272 ---
24273 ---@param fontid integer
24274 ---
24275 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24276 function vf.fontid(fontid) end
24277
24278 ---
24279 ---Output an image (the argument can be either an `image` variable or an `image_spec` table)
24280 ---
24281 ---__Reference:__
24282 ---
24283 ---* Corresponding C source code: [lfontlib.c#L378-L387](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L378-L387)
24284 ---
24285 ---@param image Image|ImageSpec
24286 ---
24287 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24288 function vf.image(image) end
24289
24290 ---
24291 ---Output this node (list), and move right by the width of
24292 ---this list.
24293 ---
24294 ---__Reference:__
24295 ---
24296 ---* Corresponding C source code: [lfontlib.c#L389-L398](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L389-L398)
24297 ---
24298 ---@param list Node
24299 ---
24300 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24301 function vf.node(list) end
24302
24303 ---
24304 ---Do nothing.
24305 ---
24306 ---__Reference:__
24307 ---
24308 ---* Corresponding C source code: [lfontlib.c#L400-L406](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L400-L406)
24309 ---
24310 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24311 function vf.nop() end
24312
24313 ---
24314 ---Pop position.
24315 ---
24316 ---__Reference:__
24317 ---
24318 ---* Corresponding C source code: [lfontlib.c#L408-L420](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L408-L420)
24319 ---
24320 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24321 function vf.pop() end
24322
24323 ---
24324 ---Save the current position.
24325 ---
24326 ---__Reference:__
24327 ---
24328 ---* Corresponding C source code: [lfontlib.c#L422-L435](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L422-L435)
24329 ---
24330 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24331 function vf.push() end
24332
24333 ---
24334 ---Move right on the page.
24335 ---
24336 ---@param right integer
24337 ---
24338 ---__Reference:__
24339 ---
24340 ---* Corresponding C source code: [lfontlib.c#L437-L453](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L437-L453)
24341 ---
24342 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24343 function vf.right(right) end
24344
24345 ---
24346 ---Output a rule (height * width) and move right.
24347 ---
24348 ---__Reference:__
24349 ---
24350 ---* Corresponding C source code: [lfontlib.c#L455-L475](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L455-L475)
24351 ---
24352 ---@param height integer
24353 ---@param width integer
24354 ---
24355 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24356 function vf.rule(height, width) end
24357
24358 ---
24359 ---Output a `\special` command.
24360 ---
24361 ---@param special string
24362 ---
24363 ---__Reference:__
24364 ---
24365 ---* Corresponding C source code: [lfontlib.c#L477-L489](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L477-L489)
24366 ---
24367 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24368 function vf.special(special) end
24369
24370 ---
24371 ---Output a pdf literal.
24372 ---
24373 ---The first string is one of `origin`,
24374 ---`page`, `text`, `font`, `direct` or `raw`
24375 ---
24376 ---__Reference:__
24377 ---
24378 ---* Corresponding C source code: [lfontlib.c#L491-L499](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L491-L499)
24379 ---* Corresponding C source code: [lpdflib.c#L25-L87](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L25-L87)
24380 ---
24381 ---@param mode `origin`|`page`|`text`|`font`|`direct`|`raw`
24382 ---@param general_text string
24383 ---
24384 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24385 function vf.pdf(mode, general_text) end
24386
24387 ---
24388 ---Output a pdf literal.
24389 ---
24390 ---If you have one string
24391 ---only `origin` is assumed.
24392 ---
24393 ---__Reference:__
24394 ---
24395 ---* Corresponding C source code: [lfontlib.c#L491-L499](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L491-L499)
24396 ---* Corresponding C source code: [lpdflib.c#L25-L87](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdflib.c#L25-L87)
24397 ---
24398 ---@param general_text string
24399 ---
24400 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/vf.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24401 function vf.pdf(general_text) end
24402 ---
24403 ---# Hashes conform `sha2`
24404 ---
24405 ---This library is a side effect of the `pdfe` library that needs such
24406 ---helpers. The `sha2.digest256`, `sha2.digest384` and
24407 ---`sha2.digest512` functions accept a string and return a string with the
24408 ---hash.
24409 ---
24410 ---https://github.com/contextgarden/pplib
24411 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/libs/pplib/pplib-src/src/util/utilsha.c
24412 ---
24413 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sha2.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24414 sha2 = {}
24415
24416 ---
24417 ---__Example:__
24418 ---
24419 ---```lua
24420 ---local function to_hex(str)
24421 --- return (str:gsub('.', function (c)
24422 --- return string.format('%02x', string.byte(c))
24423 --- end))
24424 ---end
24425 ---
24426 ---print(to_hex(sha2.digest256('test')))
24427 --- -- 9f86d081... (length 64)
24428 ---```
24429 ---
24430 ---__Reference:__
24431 ---
24432 ---* Corresponding C source code: [md5lib.c#L199-L210](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luamd5/md5lib.c#L199-L210)
24433 ---
24434 ---@param data string
24435 ---
24436 ---@return string # binary string
24437 ---
24438 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sha2.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24439 function sha2.digest256(data) end
24440
24441 ---
24442 ---__Example:__
24443 ---
24444 ---```lua
24445 ---local function to_hex(str)
24446 --- return (str:gsub('.', function (c)
24447 --- return string.format('%02x', string.byte(c))
24448 --- end))
24449 ---end
24450 ---
24451 ---print(to_hex(sha2.digest384('test')))
24452 --- -- 76841232... (length 96)
24453 ---```
24454 ---
24455 ---__Reference:__
24456 ---
24457 ---* Corresponding C source code: [md5lib.c#L212-L223](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luamd5/md5lib.c#L212-L223)
24458 ---
24459 ---@param data string
24460 ---
24461 ---@return string # binary string
24462 ---
24463 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sha2.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24464 function sha2.digest384(data) end
24465
24466 ---
24467 ---__Example:__
24468 ---
24469 ---```lua
24470 ---local function to_hex(str)
24471 --- return (str:gsub('.', function (c)
24472 --- return string.format('%02x', string.byte(c))
24473 --- end))
24474 ---end
24475 ---
24476 ---print(to_hex(sha2.digest512('test')))
24477 --- -- ee26b0dd ... (length 128)
24478 ---```
24479 ---
24480 ---__Reference:__
24481 ---
24482 ---* Corresponding C source code: [md5lib.c#L225-L236](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luamd5/md5lib.c#L225-L236)
24483 ---
24484 ---@param data string
24485 ---
24486 ---@return string # binary string
24487 ---
24488 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/sha2.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
24489 function sha2.digest512(data) end
24490
24491 ---
24492 ---Changes to upstream: global luaharfbuzz table
24493
24494 ---
24495 ---The definitions are developed in this repository: https://github.com/LuaCATS/luaharfbuzz
24496
24497 ---
24498 ---https://github.com/ufyTeX/luaharfbuzz/blob/master/src/harfbuzz.luadoc
24499 ---
24500 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24501 luaharfbuzz = {}
24502
24503 ---
24504 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24505 ---@class LuaHarfBuzzOptions
24506 ---@field direction HbDirection # A `Direction` object representing the object.
24507 ---@field script HbScript # A `Script` object representing the script.
24508 ---@field language HbLanguage # A `Language` object representing the language.
24509 ---@field features string|HbFeature[] # features to enable, specified as either of the following.
24510 ----- comma-separated list of features. See [feature string syntax reference](https://github.com/ufytex/luaharfbuzz/wiki/Feature-Strings)
24511 ----- table of `Feature` objects
24512
24513 ---
24514 ---Shapes `buffer` using `font` turning its Unicode characters content to positioned glyphs. If `features` is not `nil`, it will be used to control the features applied during shaping.
24515 ---
24516 ---Wraps `hb_shape_full`.
24517 ---
24518 ---__Reference:__
24519 ---
24520 ---* Corresponding C source code: [luaharfbuzz.c#L16-L51](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.c#L16-L51)
24521 ---* HarfBuzz online documentation: [hb_shape_full](https://harfbuzz.github.io/harfbuzz-hb-shape.html#hb-shape-full)
24522 ---
24523 ---@param font HbFont
24524 ---@param buffer HbBuffer
24525 ---@param features HbFeature[]
24526 ---@param shapers string[]
24527 ---
24528 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24529 function luaharfbuzz.shape_full(font, buffer, features, shapers) end
24530
24531 ---
24532 ---Retrieve the list of shapers supported by HarfBuzz.
24533 ---
24534 ---__Reference:__
24535 ---
24536 ---* Corresponding C source code: [luaharfbuzz.c#L44-L53](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/luaharfbuzz.c#L44-L53)
24537 ---* HarfBuzz online documentation: [hb_shape_list_shapers](https://harfbuzz.github.io/harfbuzz-hb-shape.html#hb-shape-list-shapers)
24538 ---
24539 ---@return string ... # for example: `graphite2 ot fallback`
24540 ---
24541 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24542 function luaharfbuzz.shapers() end
24543
24544 ---
24545 ---Return the library version as a string with three components.
24546 ---
24547 ---Wraps `hb_version_string`.
24548 ---
24549 ---__Reference:__
24550 ---
24551 ---* Corresponding C source code: [luaharfbuzz.c#L39-L42](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/luaharfbuzz.c#L39-L42)
24552 ---* HarfBuzz online documentation: [hb_version_string](https://harfbuzz.github.io/harfbuzz-hb-version.html#hb-version-string)
24553 ---
24554 ---@return string
24555 ---
24556 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24557 function luaharfbuzz.version() end
24558
24559 ---
24560 ---Shape `buffer` using `font` turning its Unicode characters content to positioned glyphs.
24561 ---
24562 ---__Reference:__
24563 ---
24564 ---* Corresponding C source code: [harfbuzz.lua#L22-L53](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/harfbuzz.lua#L22-L53)
24565 ---
24566 ---@param font HbFont # `Font` to use for shaping
24567 ---@param buffer HbBuffer # `Buffer` to shape
24568 ---@param options? LuaHarfBuzzOptions
24569 ---
24570 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24571 function luaharfbuzz.shape(font, buffer, options) end
24572
24573 ---
24574 ---Blobs wrap a chunk of binary data to handle lifecycle management of data while it is passed between client and HarfBuzz. Blobs are primarily used to create font faces, but also to access font face tables, as well as pass around other binary data.
24575 ---
24576 ---Wraps `hb_blob_t`.
24577 ---
24578 ---__Reference:__
24579 ---
24580 ---* Corresponding C source code: [luaharfbuzz.h#L12](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L12)
24581 ---* HarfBuzz online documentation: [hb_blob_t](https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-t)
24582 ---
24583 ---@class Blob
24584 ---
24585 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24586 local Blob = {}
24587 luaharfbuzz.Blob = Blob
24588
24589 ---
24590 ---Create a new "blob" object wrapping data.
24591 ---
24592 ---Wraps `hb_blob_create`.
24593 ---
24594 ---__Reference:__
24595 ---
24596 ---* Corresponding C source code: [blob.c#L3-L14](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/blob.c#L3-L14)
24597 ---* HarfBuzz online documentation: [hb_blob_create](https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-create)
24598 ---
24599 ---@param data string # A Lua string containing binary or character data.
24600 ---
24601 ---@return Blob
24602 ---
24603 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24604 function Blob.new(data) end
24605
24606 ---
24607 ---Create a new blob containing the data from the specified binary font file.
24608 ---
24609 ---Wraps `hb_blob_create_from_file`.
24610 ---
24611 ---__Reference:__
24612 ---
24613 ---* Corresponding C source code: [blob.c#L16-L26](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/blob.c#L16-L26)
24614 ---* HarfBuzz online documentation: [hb_blob_create_from_file](https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-create-from-file)
24615 ---
24616 ---@param filename string # lua string.
24617 ---
24618 ---@return Blob
24619 ---
24620 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24621 function Blob.new_from_file(filename) end
24622
24623 ---
24624 ---Fetch the length of a blob's data.
24625 ---
24626 ---Wraps `hb_blob_get_length`.
24627 ---
24628 ---__Reference:__
24629 ---
24630 ---* Corresponding C source code: [blob.c#L28-L33](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/blob.c#L28-L33)
24631 ---* HarfBuzz online documentation: [hb_blob_get_length](https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-get-length)
24632 ---
24633 ---@return integer
24634 ---
24635 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24636 function Blob:get_length() end
24637
24638 ---
24639 ---Fetch the data from a blob.
24640 ---
24641 ---Wraps `hb_blob_get_data`.
24642 ---
24643 ---__Reference:__
24644 ---
24645 ---* Corresponding C source code: [blob.c#L35-L44](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/blob.c#L35-L44)
24646 ---* HarfBuzz online documentation: [hb_blob_get_data](https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-get-data)
24647 ---
24648 ---@return string data # the byte data of blob as a string
24649 ---
24650 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24651 function Blob:get_data() end
24652
24653 ---
24654 ---A font face is an object that represents a single face from within a font family.
24655 ---
24656 ---More precisely, a font face represents a single face in a binary font file. Font faces are typically built from a binary blob and a face index. Font faces are used to create fonts.
24657 ---
24658 ---Wraps `hb_face_t`.
24659 ---
24660 ---__Reference:__
24661 ---
24662 ---* Corresponding C source code: [luaharfbuzz.h#L13](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L13)
24663 ---* HarfBuzz online documentation: [hb_face_t](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-t)
24664 ---
24665 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24666 ---@class HbFace
24667 local Face = {}
24668 luaharfbuzz.Face = Face
24669
24670 ---
24671 ---Constructs a new face object from the specified blob and a face index into that blob.
24672 ---
24673 ---The face index is used for blobs of file formats such as TTC and DFont that can contain more than one face. Face indices within such collections are zero-based.
24674 ---
24675 ---Wraps `hb_face_create`.
24676 ---
24677 ---__Reference:__
24678 ---
24679 ---* Corresponding C source code: [face.c#L28-L45](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L28-L45)
24680 ---* HarfBuzz online documentation: [hb_face_create](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-create)
24681 ---
24682 ---@param blob Blob # `Blob` to read the font from.
24683 ---@param font_index? integer # index of font to read.
24684 ---
24685 ---@return HbFace|nil
24686 ---
24687 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24688 function Face.new_from_blob(blob, font_index) end
24689
24690 ---
24691 ---Create a new `Face` from a file.
24692 ---
24693 ---Makes a call to `Face:new_from_blob` after creating a `Blob` from the
24694 ---file contents.
24695 ---
24696 ---Wraps `hb_face_create`.
24697 ---
24698 ---__Example:__
24699 ---
24700 ---```lua
24701 ---local face = luaharfbuzz.Face.new('xxx')
24702 ---print(face) -- nil
24703 ---
24704 ---face = luaharfbuzz.Face.new(
24705 --- '/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf')
24706 ---if face ~= nil then
24707 --- print(face) -- harfbuzz.Face: 0x12426a8
24708 ---end
24709 ---```
24710 ---
24711 ---__Reference:__
24712 ---
24713 ---* Corresponding C source code: [face.c#L7-L26](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L7-L26)
24714 ---* HarfBuzz online documentation: [hb_face_create](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-create)
24715 ---
24716 ---@param file string # path to font file.
24717 ---@param font_index? integer # index of font to read.
24718 ---
24719 ---@return HbFace|nil
24720 ---
24721 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24722 function Face.new(file, font_index) end
24723
24724 ---
24725 ---Collect all of the Unicode characters covered by face.
24726 ---
24727 ---Wraps `hb_face_collect_unicodes`.
24728 ---
24729 ---__Example:__
24730 ---
24731 ---```lua
24732 ---local face = luaharfbuzz.Face.new('/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf')
24733 ---if face == nil then error("Font not found!") end
24734
24735 ---
24736 ---for _, char in ipairs(face:collect_unicodes()) do
24737 --- print(char, unicode.utf8.char(char))
24738 ---end
24739 ---```
24740 ---
24741 ---__Reference:__
24742 ---
24743 ---* Corresponding C source code: [face.c#L264-L284](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L264-L284)
24744 ---* HarfBuzz online documentation: [hb_face_collect_unicodes](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-collect-unicodes)
24745 ---
24746 ---@return number[] # of codepoints supported by the face.
24747 ---
24748 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24749 function Face:collect_unicodes() end
24750
24751 ---
24752 ---Fetch the glyph-count value of the specified face object.
24753 ---
24754 ---Wraps `hb_face_get_glyph_count`.
24755 ---
24756 ---__Reference:__
24757 ---
24758 ---* Corresponding C source code: [face.c#L47-L52](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L47-L52)
24759 ---* HarfBuzz online documentation: [hb_face_get_glyph_count](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-get-glyph-count)
24760 ---
24761 ---@return integer glyph_count
24762 ---
24763 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24764 function Face:get_glyph_count() end
24765
24766 ---
24767 ---Fetch a font name from the OpenType 'name' table.
24768 ---
24769 ---If language is HB_LANGUAGE_INVALID, English ("en") is assumed. Returns string in UTF-8 encoding.
24770 ---
24771 ---Wraps `hb_ot_name_get_utf8`.
24772 ---
24773 ---__Example:__
24774 ---
24775 ---```lua
24776 ---local face = luaharfbuzz.Face.new('/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf')
24777 ---if face == nil then error("Font not found!") end
24778
24779 ---
24780 ---local name_id = 0
24781 ---local name
24782 ---repeat
24783 --- name = face:get_name(name_id)
24784 --- print(name_id, name)
24785 --- name_id = name_id + 1
24786 ---until (name == nil)
24787 ---```
24788 ---
24789 ---__Reference:__
24790 ---
24791 ---* Corresponding C source code: [face.c#L54-L80](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L54-L80)
24792 ---* HarfBuzz online documentation: [hb_ot_name_get_utf8](https://harfbuzz.github.io/harfbuzz-hb-ot-name.html#hb-ot-name-get-utf8)
24793 ---
24794 ---@param name_id integer
24795 ---@param lang? HbLanguage
24796 ---
24797 ---@return string|nil
24798 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24799 function Face:get_name(name_id, lang) end
24800
24801 ---
24802 ---Fetch a reference to the specified table within the specified face.
24803 ---
24804 ---Wraps `hb_face_reference_table`.
24805 ---
24806 ---__Reference:__
24807 ---
24808 ---* Corresponding C source code: [face.c#L82-L94](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L82-L94)
24809 ---* HarfBuzz online documentation: [hb_face_reference_table](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-reference-table)
24810 ---
24811 ---@param tag HbTag # `Tag` object of the table.
24812 ---
24813 ---@return Blob # `Blob` object for the face table of `tag`.
24814 ---
24815 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24816 function Face:get_table(tag) end
24817
24818 ---
24819 ---Fetch a list of all table tags for a face, if possible. The list returned will begin at the offset provided.
24820 ---
24821 ---Wraps `hb_face_get_table_tags`.
24822 ---
24823 ---__Reference:__
24824 ---
24825 ---* Corresponding C source code: [face.c#L96-L124](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L96-L124)
24826 ---* HarfBuzz online documentation: [hb_face_get_table_tags](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-get-table-tags)
24827 ---
24828 ---@return HbTag[] # table of `Tag`s representing face table tags.
24829 ---
24830 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24831 function Face:get_table_tags() end
24832
24833 ---
24834 ---Fetch the units-per-em (UPEM) value of the specified face object.
24835 ---
24836 ---Typical UPEM values for fonts are 1000, or 2048, but any value in between 16 and 16,384 is allowed for OpenType fonts.
24837 ---
24838 ---Wraps `hb_face_get_upem`.
24839 ---
24840 ---__Example:__
24841 ---
24842 ---```lua
24843 ---local face = luaharfbuzz.Face.new('/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf')
24844 ---if face == nil then error("Font not found!") end
24845
24846 ---
24847 ---print('Units per em', face:get_upem()) -- 1000
24848 ---```
24849 ---
24850 ---__Reference:__
24851 ---
24852 ---* Corresponding C source code: [face.c#L286-L291](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L286-L291)
24853 ---* HarfBuzz online documentation: [hb_face_get_upem](https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-get-upem)
24854 ---
24855 ---@return integer # The upem value of face.
24856 ---
24857 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24858 function Face:get_upem() end
24859
24860 ---
24861 ---Tests whether a face includes a CPAL color-palette table.
24862 ---
24863 ---Wraps `hb_ot_color_has_palettes`.
24864 ---
24865 ---__Reference:__
24866 ---
24867 ---* Corresponding C source code: [face.c#L293-L298](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L293-L298)
24868 ---* HarfBuzz online documentation: [hb_ot_color_has_palettes](https://harfbuzz.github.io/harfbuzz-hb-ot-color.html#hb-ot-color-has-palettes)
24869 ---
24870 ---@return boolean # true if data found, false otherwise
24871 ---
24872 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24873 function Face:ot_color_has_palettes() end
24874
24875 ---
24876 ---Fetch the number of color palettes in a face.
24877 ---
24878 ---Wraps `hb_ot_color_palette_get_count`.
24879 ---
24880 ---__Reference:__
24881 ---
24882 ---* Corresponding C source code: [face.c#L300-L305](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L300-L305)
24883 ---* HarfBuzz online documentation: [hb_ot_color_palette_get_count](https://harfbuzz.github.io/harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-count)
24884 ---
24885 ---@return integer # The number of palettes found.
24886 ---
24887 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24888 function Face:ot_color_palette_get_count() end
24889
24890 ---
24891 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24892 ---@class HbColor
24893 ---@field red integer
24894 ---@field green integer
24895 ---@field blue integer
24896 ---@field alpha integer
24897
24898 ---
24899 ---Fetch a list of the colors in a color palette.
24900 ---
24901 ---Wraps `hb_ot_color_palette_get_colors`.
24902 ---
24903 ---__Reference:__
24904 ---
24905 ---* Corresponding C source code: [face.c#L307-L347](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L307-L347)
24906 ---* HarfBuzz online documentation: [hb_ot_color_palette_get_colors](https://harfbuzz.github.io/harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-colors)
24907 ---
24908 ---@return HbColor[]
24909 ---
24910 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24911 function Face:ot_color_palette_get_colors() end
24912
24913 ---
24914 ---Test whether a face includes a COLR table with data according to COLRv0.
24915 ---
24916 ---Wraps `hb_ot_color_has_layers`.
24917 ---
24918 ---__Reference:__
24919 ---
24920 ---* Corresponding C source code: [face.c#L349-L354](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L349-L354)
24921 ---* HarfBuzz online documentation: [hb_ot_color_has_layers](https://harfbuzz.github.io/harfbuzz-hb-ot-color.html#hb-ot-color-has-layers)
24922 ---
24923 ---@return boolean # true if data found, false otherwise
24924 ---
24925 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24926 function Face:ot_color_has_layers() end
24927
24928 ---
24929 ---@class HbGlyphColor
24930 ---@field glyph integer
24931 ---@field color_index integer
24932
24933 ---
24934 ---Fetches a list of all color layers for the specified glyph index in the specified face. The list returned will begin at the offset provided.
24935 ---
24936 ---Wraps `hb_ot_color_glyph_get_layers`.
24937 ---
24938 ---__Reference:__
24939 ---
24940 ---* Corresponding C source code: [face.c#L356-L392](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L356-L392)
24941 ---* HarfBuzz online documentation: [hb_ot_color_glyph_get_layers](https://harfbuzz.github.io/harfbuzz-hb-ot-color.html#hb-ot-color-glyph-get-layers)
24942 ---
24943 ---@param glyph integer # The glyph index to query
24944 ---
24945 ---@return HbGlyphColor[]
24946 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24947 function Face:ot_color_glyph_get_layers(glyph) end
24948
24949 ---
24950 ---Test whether a face has PNG glyph images (either in CBDT or sbix tables).
24951 ---
24952 ---Wraps `hb_ot_color_has_png`.
24953 ---
24954 ---__Reference:__
24955 ---
24956 ---* Corresponding C source code: [face.c#L394-L399](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L394-L399)
24957 ---* HarfBuzz online documentation: [hb_ot_color_has_png](https://harfbuzz.github.io/harfbuzz-hb-ot-color.html#hb-ot-color-has-png)
24958 ---
24959 ---@return boolean # true if data found, false otherwise
24960 ---
24961 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24962 function Face:ot_color_has_png() end
24963
24964 ---
24965 ---Fetch a list of all scripts enumerated in the specified face's GSUB table or GPOS table.
24966 ---
24967 ---Wraps `hb_ot_layout_table_get_script_tags`.
24968 ---
24969 ---__Reference:__
24970 ---
24971 ---* Corresponding C source code: [face.c#L126-L156](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L126-L156)
24972 ---* HarfBuzz online documentation: [hb_ot_layout_table_get_script_tags](https://harfbuzz.github.io/harfbuzz-hb-ot-layout.html#hb-ot-layout-table-get-script-tags)
24973 ---
24974 ---@param table_tag HbTag # OpenType Glyph Substitution Table (gsub) or OpenType Glyph Positioning Table (gpos).
24975 ---
24976 ---@return HbTag[]
24977 ---
24978 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24979 function Face:ot_layout_get_script_tags(table_tag) end
24980
24981 ---
24982 ---Fetch a list of language tags in the given face's GSUB or GPOS table, underneath the specified script index.
24983 ---
24984 ---Wraps `hb_ot_layout_script_get_language_tags`.
24985 ---
24986 ---__Reference:__
24987 ---
24988 ---* Corresponding C source code: [face.c#L158-L189](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L158-L189)
24989 ---* HarfBuzz online documentation: [hb_ot_layout_script_get_language_tags](https://harfbuzz.github.io/harfbuzz-hb-ot-layout.html#hb-ot-layout-script-get-language-tags)
24990 ---
24991 ---@param table_tag HbTag # OpenType Glyph Substitution Table (gsub) or OpenType Glyph Positioning Table (gpos).
24992 ---@param script_index integer # The index of the requested script tag
24993 ---
24994 ---@return HbTag[]
24995 ---
24996 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
24997 function Face:ot_layout_get_language_tags(table_tag, script_index) end
24998
24999 ---
25000 ---Wraps `hb_ot_layout_language_get_feature_tags`.
25001 ---
25002 ---__Reference:__
25003 ---
25004 ---* Corresponding C source code: [face.c#L191-L223](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L191-L223)
25005 ---* HarfBuzz online documentation: [hb_ot_layout_language_get_feature_tags](https://harfbuzz.github.io/harfbuzz-hb-ot-layout.html#hb-ot-layout-language-get-feature-tags)
25006 ---
25007 ---@param table_tag HbTag # OpenType Glyph Substitution Table (gsub) or OpenType Glyph Positioning Table (gpos).
25008 ---@param script_index integer # The index of the requested script tag
25009 ---@param language_index integer # The index of the requested language tag
25010 ---
25011 ---@return HbTag[] # The array of HbTag feature tags found for the query.
25012 ---
25013 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25014 function Face:ot_layout_get_feature_tags(table_tag, script_index, language_index) end
25015
25016 ---
25017 ---Fetch the index if a given script tag in the specified face's GSUB table or GPOS table.
25018 ---
25019 ---Wraps `hb_ot_layout_table_find_script`.
25020 ---
25021 ---__Reference:__
25022 ---
25023 ---* Corresponding C source code: [face.c#L225-L235](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L225-L235)
25024 ---* HarfBuzz online documentation: [hb_ot_layout_table_find_script](https://harfbuzz.github.io/harfbuzz-hb-deprecated.html#hb-ot-layout-table-find-script)
25025 ---
25026 ---@deprecated
25027 ---
25028 ---@param table_tag HbTag # OpenType Glyph Substitution Table (gsub) or OpenType Glyph Positioning Table (gpos).
25029 ---@param script_tag HbTag # The `HbTag` script tag requested
25030 ---
25031 ---@return boolean found # `true` if the script is found, `false` otherwise
25032 ---@return integer index # The index of the requested script tag.
25033 ---
25034 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25035 function Face:ot_layout_find_script(table_tag, script_tag) end
25036
25037 ---
25038 ---Fetch the index of a given language tag in the specified face's GSUB table or GPOS table, underneath the specified script tag.
25039 ---
25040 ---Wraps `hb_ot_layout_script_find_language`.
25041 ---
25042 ---__Reference:__
25043 ---
25044 ---* Corresponding C source code: [face.c#L237-L248](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L237-L248)
25045 ---* HarfBuzz online documentation: [hb_ot_layout_script_find_language](https://harfbuzz.github.io/harfbuzz-hb-ot-layout.html#hb-ot-layout-script-find-language)
25046 ---
25047 ---@param tag HbTag # OpenType Glyph Substitution Table (gsub) or OpenType Glyph Positioning Table (gpos).
25048 ---@param script_index integer # The index of the requested script tag.
25049 ---@param language_tag HbTag # The `HbTag` of the requested language.
25050 ---
25051 ---@return boolean found # `true` if the language tag is found, `false` otherwise
25052 ---@return integer index # The index of the requested language.
25053 ---
25054 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25055 function Face:ot_layout_find_language(tag, script_index, language_tag) end
25056
25057 ---
25058 ---Fetches the index of a given feature tag in the specified face's GSUB table or GPOS table, underneath the specified script and language.
25059 ---
25060 ---Wraps `hb_ot_layout_language_find_feature`.
25061 ---
25062 ---__Reference:__
25063 ---
25064 ---* Corresponding C source code: [face.c#L250-L262](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/face.c#L250-L262)
25065 ---* HarfBuzz online documentation: [hb_ot_layout_language_find_feature](https://harfbuzz.github.io/harfbuzz-hb-ot-layout.html#hb-ot-layout-language-find-feature)
25066 ---
25067 ---@param tag HbTag # OpenType Glyph Substitution Table (gsub) or OpenType Glyph Positioning Table (gpos).
25068 ---@param script_index integer # The index of the requested script tag.
25069 ---@param language_index integer # The index of the requested language tag.
25070 ---@param feature HbTag # The feature tag requested.
25071 ---
25072 ---@return boolean found # `true` if the feature is found, `false` otherwise
25073 ---@return integer index # The index of the requested feature.
25074 ---
25075 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25076 function Face:ot_layout_find_feature(tag, script_index, language_index, feature) end
25077
25078 ---
25079 ---Data type for holding fonts.
25080 ---
25081 ---Lua wrapper for `hb_font_t` type.
25082 ---
25083 ---__Reference:__
25084 ---
25085 ---* Corresponding C source code: [luaharfbuzz.h#L14](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L14)
25086 ---* HarfBuzz online documentation: [hb_font_t](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-t)
25087 ---
25088 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25089 ---@class HbFont
25090 local Font = {}
25091 luaharfbuzz.Font = Font
25092
25093 ---
25094 ---Set up some defaults for scale and shaping functions.
25095 ---Initializes a new `hb_font_t` from a `Face` object. Sets the default scale
25096 ---to the face’s upem value, and sets the font shaping functions by
25097 ---calling `hb_ot_font_set_funcs` on it.
25098 ---
25099 ---Wraps `hb_font_create`.
25100 ---
25101 ---__Reference:__
25102 ---
25103 ---* Corresponding C source code: [font.c#L3-L20](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L3-L20)
25104 ---* HarfBuzz online documentation: [hb_font_create](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-create)
25105 ---
25106 ---@param face HbFace # `Face` object.
25107 ---
25108 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25109 function Font.new(face) end
25110
25111 ---
25112 ---Fetch the horizontal and vertical scale of a font.
25113 ---
25114 ---Wraps `hb_font_get_scale`.
25115 ---
25116 ---__Reference:__
25117 ---
25118 ---* Corresponding C source code: [font.c#L31-L40](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L31-L40)
25119 ---* HarfBuzz online documentation: [hb_font_get_scale](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-scale)
25120 ---
25121 ---@return integer # x-scale of the font.
25122 ---@return integer # y-scale of the font.
25123 ---
25124 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25125 function Font:get_scale() end
25126
25127 ---
25128 ---Sets the horizontal and vertical scale of a font.
25129 ---
25130 ---The font scale is a number related to, but not the same as, font size. Typically the client establishes a scale factor to be used between the two. For example, 64, or 256, which would be the fractional-precision part of the font scale.
25131 ---
25132 ---Wraps `hb_font_set_scale`.
25133 ---
25134 ---__Reference:__
25135 ---
25136 ---* Corresponding C source code: [font.c#L22-L29](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L22-L29)
25137 ---* HarfBuzz online documentation: [hb_font_set_scale](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-set-scale)
25138 ---
25139 ---@param x_scale integer # desired x-scale of font.
25140 ---@param y_scale integer # desired y-scale of font.
25141 ---
25142 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25143 function Font:set_scale(x_scale, y_scale) end
25144
25145 ---
25146 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25147 ---@class FontExtens
25148 ---@field ascender integer # typographic ascender.
25149 ---@field descender integer # typographic descender.
25150 ---@field line_gap integer # line spacing gap.
25151
25152 ---
25153 ---Fetch the extents for a specified font, for horizontal text segments.
25154 ---
25155 ---Wraps `hb_font_get_h_extents`.
25156 ---
25157 ---__Reference:__
25158 ---
25159 ---* Corresponding C source code: [font.c#L42-L62](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L42-L62)
25160 ---* HarfBuzz online documentation: [hb_font_get_h_extents](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-h-extents)
25161 ---
25162 ---@param glyph integer # index inside the font.
25163 ---
25164 ---@return FontExtens|nil # font extents table for horizontal direction, contains the following or `nil` if HarfBuzz fails to load font extents:
25165 ---
25166 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25167 function Font:get_h_extents(glyph) end
25168
25169 ---
25170 ---Wraps `hb_font_get_v_extents`.
25171 ---
25172 ---__Reference:__
25173 ---
25174 ---* Corresponding C source code: [font.c#L64-L84](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L64-L84)
25175 ---* HarfBuzz online documentation: [hb_font_get_v_extents](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-v-extents)
25176 ---
25177 ---@param glyph integer # index inside the font.
25178 ---
25179 ---@return FontExtens|nil # font extents table for vertical direction, similar to `Font:get_h_extents`, or `nil` if HarfBuzz fails to load font extents:
25180 ---
25181 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25182 function Font:get_v_extents(glyph) end
25183
25184 ---
25185 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25186 ---@class GlyphExtens
25187 ---@field x_bearing integer # left side of glyph from origin.
25188 ---@field y_bearing integer # top side of glyph from origin.
25189 ---@field width integer # distance from left to right side.
25190 ---@field height integer # distance from top to bottom side.
25191
25192 ---
25193 ---Wraps `hb_font_get_glyph_extents`.
25194 ---
25195 ---__Reference:__
25196 ---
25197 ---* Corresponding C source code: [font.c#L86-L110](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L86-L110)
25198 ---* HarfBuzz online documentation: [hb_font_get_glyph_extents](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-extents)
25199 ---
25200 ---@param glyph integer # index inside the font.
25201 ---
25202 ---@return GlyphExtens|nil # extents table contains the following or `nil` if HarfBuzz fails to
25203 ---load glyph extents
25204 ---
25205 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25206 function Font:get_glyph_extents(glyph) end
25207
25208 ---
25209 ---Wraps `hb_font_get_glyph_name`.
25210 ---
25211 ---__Reference:__
25212 ---
25213 ---* Corresponding C source code: [font.c#L112-L125](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L112-L125)
25214 ---* HarfBuzz online documentation: [hb_font_get_glyph_name](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-name)
25215 ---
25216 ---@param glyph integer # index inside the font.
25217 ---
25218 ---@return string # name of the glyph or nil.
25219 ---
25220 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25221 function Font:get_glyph_name(glyph) end
25222
25223 ---
25224 ---Wraps `hb_font_get_glyph_from_name`.
25225 ---
25226 ---__Reference:__
25227 ---
25228 ---* Corresponding C source code: [font.c#L127-L138](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L127-L138)
25229 ---* HarfBuzz online documentation: [hb_font_get_glyph_from_name](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-from-name)
25230 ---
25231 ---@param name string # name of the glyph.
25232 ---
25233 ---@return integer # glyph index inside the font or nil.
25234 ---
25235 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25236 function Font:get_glyph_from_name(name) end
25237
25238 ---
25239 ---Wraps `hb_font_get_glyph_h_advance`.
25240 ---
25241 ---__Reference:__
25242 ---
25243 ---* Corresponding C source code: [font.c#L140-L146](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L140-L146)
25244 ---* HarfBuzz online documentation: [hb_font_get_glyph_h_advance](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-h-advance)
25245 ---
25246 ---@param glyph integer # glyph index inside the font.
25247 ---
25248 ---@return integer # advance glyph advance of the glyph in horizontal direction.
25249 ---
25250 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25251 function Font:get_glyph_h_advance(glyph) end
25252
25253 ---
25254 ---Wraps `hb_font_get_glyph_v_advance`.
25255 ---
25256 ---__Reference:__
25257 ---
25258 ---* Corresponding C source code: [font.c#L148-L154](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L148-L154)
25259 ---* HarfBuzz online documentation: [hb_font_get_glyph_v_advance](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-v-advance)
25260 ---
25261 ---@param glyph integer # glyph index inside the font.
25262 ---
25263 ---@return integer # advance glyph advance of the glyph in vertical direction.
25264 ---
25265 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25266 function Font:get_glyph_v_advance(glyph) end
25267
25268 ---
25269 ---Wraps `hb_font_get_nominal_glyph`.
25270 ---
25271 ---__Reference:__
25272 ---
25273 ---* Corresponding C source code: [font.c#L156-L167](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L156-L167)
25274 ---* HarfBuzz online documentation: [hb_font_get_nominal_glyph](https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-nominal-glyph)
25275 ---
25276 ---@param codepoint integer
25277 ---
25278 ---@return integer|nil # glyph index or `nil` if `codepoint` is not supported by the font.
25279 ---
25280 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25281 function Font:get_nominal_glyph(codepoint) end
25282
25283 ---
25284 ---Wraps `hb_ot_color_glyph_get_png`.
25285 ---
25286 ---__Reference:__
25287 ---
25288 ---* Corresponding C source code: [font.c#L188-L204](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/font.c#L188-L204)
25289 ---
25290 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25291 function Font:ot_color_glyph_get_png() end
25292
25293 ---
25294 ---The main structure holding the input text and its properties before shaping, and output glyphs and their information after shaping.
25295 ---
25296 ---Lua wrapper for `hb_buffer_t` type.
25297 ---
25298 ---__Reference:__
25299 ---
25300 ---* Corresponding C source code: [luaharfbuzz.h#L15](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L15)
25301 ---* HarfBuzz online documentation: [hb_buffer_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-t)
25302 ---
25303 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25304 ---@class HbBuffer
25305 local Buffer = {}
25306 luaharfbuzz.Buffer = Buffer
25307
25308 ---
25309 ---Create a new `Buffer` object with all properties to defaults.
25310 ---
25311 ---Wraps `hb_buffer_create`.
25312 ---
25313 ---__Reference:__
25314 ---
25315 ---* Corresponding C source code: [buffer.c#L3-L12](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L3-L12)
25316 ---* HarfBuzz online documentation: [hb_buffer_create](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-create)
25317 ---
25318 ---@return HbBuffer
25319 ---
25320 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25321 function Buffer.new() end
25322
25323 ---
25324 ---Replace invalid UTF-8 characters with the buffer replacement code point.
25325 ---
25326 ---Wraps `hb_buffer_add_utf8`.
25327 ---
25328 ---__Reference:__
25329 ---
25330 ---* Corresponding C source code: [buffer.c#L178-L191](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L178-L191)
25331 ---* HarfBuzz online documentation: [hb_buffer_add_utf8](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-add-utf8)
25332 ---
25333 ---@param text string # UTF8 encoded string.
25334 ---@param item_offset? integer # The offset of the first character to add to the `buffer`.
25335 ---@param item_length? integer # The number of characters to add to the buffer , or `-1` for the end of text.
25336 ---
25337 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25338 function Buffer:add_utf8(text, item_offset, item_length) end
25339
25340 ---
25341 ---Appends characters from text array to buffer .
25342 ---
25343 ---The `item_offset` is the position of the first character from text that will be appended, and `item_length` is the number of character. When shaping part of a larger text (e.g. a run of text from a paragraph), instead of passing just the substring corresponding to the run, it is preferable to pass the whole paragraph and specify the run start and length as `item_offset` and `item_length`, respectively, to give HarfBuzz the full context to be able, for example, to do cross-run Arabic shaping or properly handle combining marks at stat of run.
25344 ---
25345 ---This function does not check the validity of `text`, it is up to the caller to ensure it contains a valid Unicode scalar values. In contrast, `Buffer:add_utf8()` can be used that takes similar input but performs sanity-check on the input.
25346 ---
25347 ---Wraps `hb_buffer_add_codepoints`.
25348 ---
25349 ---__Reference:__
25350 ---
25351 ---* Corresponding C source code: [buffer.c#L137-L162](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L137-L162)
25352 ---* HarfBuzz online documentation: [hb_buffer_add_codepoints](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-add-codepoints)
25353 ---
25354 ---@see HbBuffer.add_utf8
25355 ---
25356 ---@param text integer[] # with codepoints as lua numbers.
25357 ---@param item_offset? integer # The offset of the first character to add to the `buffer`.
25358 ---@param item_length? integer # The number of characters to add to the buffer , or `-1` for the end of text.
25359 ---
25360 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25361 function Buffer:add_codepoints(text, item_offset, item_length) end
25362
25363 ---
25364 ---Wraps `hb_buffer_set_direction`.
25365 ---
25366 ---__Reference:__
25367 ---
25368 ---* Corresponding C source code: [buffer.c#L32-L38](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L32-L38)
25369 ---* HarfBuzz online documentation: [hb_buffer_set_direction](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-set-direction)
25370 ---
25371 ---@param dir HbDirection # A `Direction` object.
25372 ---
25373 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25374 function Buffer:set_direction(dir) end
25375
25376 ---
25377 ---Wraps `hb_buffer_get_direction`.
25378 ---
25379 ---__Reference:__
25380 ---
25381 ---* Corresponding C source code: [buffer.c#L21-L30](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L21-L30)
25382 ---* HarfBuzz online documentation: [hb_buffer_get_direction](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-direction)
25383 ---
25384 ---@return HbDirection # A `Direction` object.
25385 ---
25386 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25387 function Buffer:get_direction() end
25388
25389 ---
25390 ---Wraps `hb_buffer_set_script`.
25391 ---
25392 ---__Reference:__
25393 ---
25394 ---* Corresponding C source code: [buffer.c#L86-L92](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L86-L92)
25395 ---* HarfBuzz online documentation: [hb_buffer_set_script](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-set-script)
25396 ---
25397 ---@param script HbScript # A `Script` object.
25398 ---
25399 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25400 function Buffer:set_script(script) end
25401
25402 ---
25403 ---Wraps `hb_buffer_get_script`.
25404 ---
25405 ---__Reference:__
25406 ---
25407 ---* Corresponding C source code: [buffer.c#L75-L84](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L75-L84)
25408 ---* HarfBuzz online documentation: [hb_buffer_get_script](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-script)
25409 ---
25410 ---@return HbScript # A `Script` object.
25411 ---
25412 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25413 function Buffer:get_script() end
25414
25415 ---
25416 ---Wraps `hb_buffer_set_language`.
25417 ---
25418 ---__Reference:__
25419 ---
25420 ---* Corresponding C source code: [buffer.c#L67-L73](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L67-L73)
25421 ---* HarfBuzz online documentation: [hb_buffer_set_language](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-set-language)
25422 ---
25423 ---@param lang HbLanguage A `Language` object
25424 ---
25425 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25426 function Buffer:set_language(lang) end
25427
25428 ---
25429 ---Wraps `hb_buffer_get_language`.
25430 ---
25431 ---__Reference:__
25432 ---
25433 ---* Corresponding C source code: [buffer.c#L56-L65](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L56-L65)
25434 ---* HarfBuzz online documentation: [hb_buffer_get_language](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-language)
25435 ---
25436 ---@return HbLanguage # A `Language` object
25437 ---
25438 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25439 function Buffer:get_language() end
25440
25441 ---
25442 ---Wraps `hb_buffer_reverse`.
25443 ---
25444 ---__Reference:__
25445 ---
25446 ---* Corresponding C source code: [buffer.c#L247-L252](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L247-L252)
25447 ---* HarfBuzz online documentation: [hb_buffer_reverse](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-reverse)
25448 ---
25449 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25450 function Buffer:reverse() end
25451
25452 ---
25453 ---Wraps `hb_buffer_get_length`.
25454 ---
25455 ---__Reference:__
25456 ---
25457 ---* Corresponding C source code: [buffer.c#L254-L259](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L254-L259)
25458 ---* HarfBuzz online documentation: [hb_buffer_get_length](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-length)
25459 ---
25460 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25461 function Buffer:get_length() end
25462
25463 ---
25464 ---Wraps `hb_buffer_get_cluster_level`.
25465 ---
25466 ---__Reference:__
25467 ---
25468 ---* Corresponding C source code: [buffer.c#L261-L266](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L261-L266)
25469 ---* HarfBuzz online documentation: [hb_buffer_get_cluster_level](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-cluster-level)
25470 ---
25471 ---@return integer level # see Cluster Levels
25472 ---
25473 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25474 function Buffer:get_cluster_level() end
25475
25476 ---
25477 ---Wraps `hb_buffer_set_cluster_level`.
25478 ---
25479 ---__Reference:__
25480 ---
25481 ---* Corresponding C source code: [buffer.c#L268-L275](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L268-L275)
25482 ---* HarfBuzz online documentation: [hb_buffer_set_cluster_level](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-set-cluster-level)
25483 ---
25484 ---@param level integer # see Cluster Levels
25485 ---
25486 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25487 function Buffer:set_cluster_level(level) end
25488
25489 ---
25490 ---Wraps `hb_buffer_guess_segment_properties`.
25491 ---
25492 ---__Reference:__
25493 ---
25494 ---* Corresponding C source code: [buffer.c#L14-L19](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/buffer.c#L14-L19)
25495 ---* HarfBuzz online documentation: [hb_buffer_guess_segment_properties](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-guess-segment-properties)
25496 ---
25497 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25498 function Buffer:guess_segment_properties() end
25499
25500 ---
25501 ---containing data for each glyph, in a nested table. Each nested
25502 ---table contains the following:
25503 ---
25504 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25505 ---@class HbGlyph
25506 ---@field x_advance number # horizontal advance.
25507 ---@field y_advance number # vertical advance.
25508 ---@field x_offset number # horizontal displacement.
25509 ---@field y_offset number # vertical displacement.
25510 ---@field cluster integer # glyph cluster index within input.
25511 ---@field codepoint integer # glyph index inside the font _(this field name is a bit misleading, but that’s what Harfbuzz uses)_.
25512 ---@field flags number # glyph flags
25513
25514 ---
25515 ---Helper method to get shaped glyph data.
25516 ---Calls `hb_buffer_get_glyph_infos`, `hb_buffer_get_glyph_positions` and
25517 ---`hb_glyph_info_get_glyph_flags`, and assembles the data into a Lua table.
25518 ---
25519 ---__Reference:__
25520 ---
25521 ---* HarfBuzz online documentation: [hb_buffer_get_glyph_infos](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-glyph-infos)
25522 ---
25523 ---@return HbGlyph[]
25524 ---
25525 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25526 function Buffer:get_glyphs() end
25527
25528 ---
25529 ---Cluster Levels.
25530 ---See [Harfbuzz docs](http://behdad.github.io/harfbuzz/clusters.html) for more details
25531 ---about what each of these levels mean.
25532 ---
25533 ---Wraps `HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES`.
25534 ---
25535 ---__Reference:__
25536 ---
25537 ---* HarfBuzz online documentation: [hb_buffer_cluster_level_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t)
25538 ---
25539 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25540 Buffer.CLUSTER_LEVEL_MONOTONE_GRAPHEMES = 0
25541
25542 ---
25543 ---Wraps `HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS`.
25544 ---
25545 ---__Reference:__
25546 ---
25547 ---* HarfBuzz online documentation: [hb_buffer_cluster_level_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t)
25548 ---
25549 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25550 Buffer.CLUSTER_LEVEL_MONOTONE_CHARACTERS = 1
25551
25552 ---
25553 ---Wraps `HB_BUFFER_CLUSTER_LEVEL_CHARACTERS`.
25554 ---
25555 ---__Reference:__
25556 ---
25557 ---* HarfBuzz online documentation: [hb_buffer_cluster_level_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t)
25558 ---
25559 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25560 Buffer.CLUSTER_LEVEL_CHARACTERS = 2
25561
25562 ---
25563 ---Wraps `HB_BUFFER_CLUSTER_LEVEL_DEFAULT`.
25564 ---
25565 ---__Reference:__
25566 ---
25567 ---* HarfBuzz online documentation: [hb_buffer_cluster_level_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t)
25568 ---
25569 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25570 Buffer.CLUSTER_LEVEL_DEFAULT = 0
25571
25572 ---
25573 ---Wraps `HB_GLYPH_FLAG_UNSAFE_TO_BREAK`.
25574 ---
25575 ---__Reference:__
25576 ---
25577 ---* HarfBuzz online documentation: [hb_glyph_flags_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-flags-t)
25578 ---
25579 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25580 Buffer.GLYPH_FLAG_UNSAFE_TO_BREAK = 1
25581
25582 ---
25583 ---Wraps `HB_GLYPH_FLAG_DEFINED`.
25584 ---
25585 ---__Reference:__
25586 ---
25587 ---* HarfBuzz online documentation: [hb_glyph_flags_t](https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-flags-t)
25588 ---
25589 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25590 Buffer.GLYPH_FLAG_DEFINED = 3
25591
25592 ---
25593 ---The `Feature` is the structure that holds information about requested feature application.
25594 ---
25595 ---Lua wrapper for `hb_feature_t` type.
25596 ---
25597 ---__Reference:__
25598 ---
25599 ---* HarfBuzz online documentation: [hb_feature_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-feature-t)
25600 ---* Corresponding C source code: [luaharfbuzz.h#L16](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L16)
25601 ---* Corresponding Lua source code: [hb_feature_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-feature-t)
25602 ---
25603 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25604 ---@class HbFeature
25605 local Feature = {}
25606 luaharfbuzz.Feature = Feature
25607
25608 ---
25609 ---Wraps `hb_feature_from_string`
25610 ---
25611 ---__Reference:__
25612 ---
25613 ---* Corresponding C source code: [feature.c#L4-L18](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/feature.c#L4-L18)
25614 ---* HarfBuzz online documentation: [hb_feature_from_string](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-feature-from-string)
25615 ---
25616 ---@param feature_string string # See [feature string syntax reference](https://github.com/ufytex/luaharfbuzz/wiki/Feature-Strings)
25617 ---
25618 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25619 function Feature.new(feature_string) end
25620
25621 ---
25622 ---Enables nice output with `tostring(…)`.
25623 ---
25624 ---Wraps `hb_feature_to_string`.
25625 ---
25626 ---__Reference:__
25627 ---
25628 ---* Corresponding C source code: [feature.c#L20-L27](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/feature.c#L20-L27)
25629 ---
25630 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25631 function Feature:__tostring() end
25632
25633 ---
25634 ---Data type for tag identifiers. Tags are four byte integers, each byte representing a character.
25635 ---
25636 ---Tags are used to identify tables, design-variation axes, scripts, languages, font features, and baselines with human-readable names.
25637 ---
25638 ---Lua wrapper for `hb_tag_t` type.
25639 ---
25640 ---__Reference:__
25641 ---
25642 ---* Corresponding C source code: [luaharfbuzz.h#L17](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L17)
25643 ---* HarfBuzz online documentation: [hb_tag_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-tag-t)
25644 ---
25645 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25646 ---@class HbTag
25647 local Tag = {}
25648 luaharfbuzz.Tag = Tag
25649
25650 ---
25651 ---Convert a string into an `Tag` object.
25652 ---
25653 ---Valid tags are four characters. Shorter input strings will be padded with spaces. Longer input strings will be truncated.
25654 ---
25655 ---Wraps `hb_tag_from_string`.
25656 ---
25657 ---__Reference:__
25658 ---
25659 ---* Corresponding C source code: [tag.c#L4-L17](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/tag.c#L4-L17)
25660 ---* HarfBuzz online documentation: [hb_tag_from_string](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-tag-from-string)
25661 ---
25662 ---@param s string # to be converted to a `Tag` object.
25663 ---
25664 ---@return HbTag # a `Tag` object.
25665 ---
25666 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25667 function Tag.new(s) end
25668
25669 ---
25670 ---Enable nice output with `tostring(…)`.
25671 ---
25672 ---Wraps `hb_tag_to_string`.
25673 ---
25674 ---__Reference:__
25675 ---
25676 ---* Corresponding C source code: [tag.c#L19-L27](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/tag.c#L19-L27)
25677 ---
25678 ---@return string # Returns a string representation for the `Tag` object.
25679 ---
25680 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25681 function Tag:__to_string() end
25682
25683 ---
25684 ---Enables equality comparisions with `==` between two tags.
25685 ---
25686 ---__Reference:__
25687 ---
25688 ---* Corresponding C source code: [tag.c#L29-L35](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/tag.c#L29-L35)
25689 ---
25690 ---@return boolean # `true` or `false` depending on whether the two tags are equal.
25691 ---
25692 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25693 function Tag:__eq() end
25694
25695 ---
25696 ---Data type for scripts. Each `Script` 's value is an `Tag` corresponding to the four-letter values defined by ISO 15924.
25697 ---
25698 ---Lua wrapper for `hb_script_t` type.
25699 ---
25700 ---__Reference:__
25701 ---
25702 ---* Corresponding C source code: [luaharfbuzz.h#L18](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L18)
25703 ---* HarfBuzz online documentation: [hb_script_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-t)
25704 ---
25705 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25706 ---@class HbScript
25707 local Script = {}
25708 luaharfbuzz.Script = Script
25709
25710 ---
25711 ---Convert a string representing an ISO 15924 script tag to a corresponding `Script` object.
25712 ---Wraps `hb_script_from_string`.
25713 ---
25714 ---__Reference:__
25715 ---
25716 ---* Corresponding C source code: [script.c#L3-L14](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/script.c#L3-L14)
25717 ---* HarfBuzz online documentation: [hb_script_from_string](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-from-string)
25718 ---
25719 ---@param script string # 4-letter script code according to the [ISO 15924 standard](http://www.unicode.org/iso15924/iso15924-num.html).
25720 ---
25721 ---@return HbScript # a `Script` object.
25722 ---
25723 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25724 function Script.new(script) end
25725
25726 ---
25727 ---Convert an ISO 15924 script `Tag` object to a corresponding `Script` object.
25728 ---
25729 ---Wraps `hb_script_from_iso15924_tag`
25730 ---
25731 ---__Reference:__
25732 ---
25733 ---* Corresponding C source code: [script.c#L16-L25](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/script.c#L16-L25)
25734 ---* HarfBuzz online documentation: [harfbuzz-hb-common.html#hb-script-from-iso15924-tag](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-from-iso15924-tag)
25735 ---
25736 ---@param tag HbTag # a `Tag` object representing a [ISO 15924 script](http://www.unicode.org/iso15924/iso15924-num.html).
25737 ---
25738 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25739 function Script.from_iso15924_tag(tag) end
25740
25741 ---
25742 ---Converts an `Script` object to a corresponding ISO 15924 script `Tag`.
25743 ---
25744 ---Wraps `hb_script_to_iso15924_tag`.
25745 ---
25746 ---__Reference:__
25747 ---
25748 ---* Corresponding C source code: [script.c#L37-L46](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/script.c#L37-L46)
25749 ---* HarfBuzz online documentation: [harfbuzz-hb-common.html#hb-script-to-iso15924-tag](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-to-iso15924-tag)
25750 ---
25751 ---@return HbTag # a `Tag` object representing the script.
25752 ---
25753 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25754 function Script:to_iso15924_tag() end
25755
25756 ---
25757 ---Enable nice output with `tostring(…)`.
25758 ---
25759 ---__Reference:__
25760 ---
25761 ---* Corresponding C source code: [script.c#L27-L35](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/script.c#L27-L35)
25762 ---
25763 ---@return string # Returns a 4-letter [ISO 15924 script code](http://www.unicode.org/iso15924/iso15924-num.html) for the script object.
25764 ---
25765 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25766 function Script:__to_string() end
25767
25768 ---
25769 ---Enables equality comparisions with `==` between two scripts.
25770 ---
25771 ---__Reference:__
25772 ---
25773 ---* Corresponding C source code: [script.c#L48-L54](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/script.c#L48-L54)
25774 ---
25775 ---@return boolean `true` or `false` depending on whether the two scripts are equal.
25776 ---
25777 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25778 function Script:__eq() end
25779
25780 ---
25781 ---Wraps `HB_SCRIPT_COMMON`.
25782 ---
25783 ---__Reference:__
25784 ---
25785 ---* [HarfBuzz online documentation](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-SCRIPT-COMMON:CAPS)
25786 ---
25787 ---@type string
25788 ---
25789 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25790 Script.COMMON = "Zyyy"
25791
25792 ---
25793 ---Wraps `HB_SCRIPT_INHERITED`.
25794 ---
25795 ---__Reference:__
25796 ---
25797 ---* [HarfBuzz online documentation](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-SCRIPT-INHERITED:CAPS)
25798 ---
25799 ---@type string
25800 ---
25801 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25802 Script.INHERITED = "Zinh"
25803
25804 ---
25805 ---Wraps `HB_SCRIPT_UNKNOWN`.
25806 ---
25807 ---__Reference:__
25808 ---
25809 ---* [HarfBuzz online documentation](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-SCRIPT-UNKNOWN:CAPS)
25810 ---
25811 ---@type string
25812 ---
25813 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25814 Script.UNKNOWN = "Zzzz"
25815
25816 ---
25817 ---Wraps `HB_SCRIPT_INVALID`.
25818 ---
25819 ---__Reference:__
25820 ---
25821 ---* [HarfBuzz online documentation](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-SCRIPT-INVALID:CAPS)
25822 ---
25823 ---@type string
25824 ---
25825 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25826 Script.INVALID = "No script set"
25827
25828 ---
25829 ---The direction of a text segment or buffer.
25830 ---
25831 ---Lua wrapper for `hb_direction_t` type.
25832 ---
25833 ---__Reference:__
25834 ---
25835 ---* Corresponding C source code: [luaharfbuzz.h#L19](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L19)
25836 ---* HarfBuzz online documentation: [hb_direction_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-t)
25837 ---
25838 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25839 ---@class HbDirection
25840 local Direction = {}
25841 luaharfbuzz.Direction = Direction
25842
25843 ---
25844 ---Wraps `hb_direction_from_string`.
25845 ---
25846 ---__Reference:__
25847 ---
25848 ---* Corresponding C source code: [direction.c#L4-L14](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L4-L14)
25849 ---* HarfBuzz online documentation: [hb_direction_from_string](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-from-string)
25850 ---
25851 ---@param dir `ltr`|`rtl`|`ttb`|`btt`|`invalid` # can be one of `ltr`, `rtl`, `ttb`, `btt` or `invalid`.
25852 ---
25853 ---@return HbDirection # a `Direction` object.
25854 ---
25855 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25856 function Direction.new(dir) end
25857
25858 ---
25859 ---Enable nice output with `tostring(…)`.
25860 ---
25861 ---Wraps `hb_direction_to_string`.
25862 ---
25863 ---__Reference:__
25864 ---
25865 ---* Corresponding C source code: [direction.c#L16-L21](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L16-L21)
25866 ---
25867 ---@return string # Returns a string representation for direction.
25868 ---
25869 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25870 function Direction:__to_string() end
25871
25872 ---
25873 ---Enable equality comparisions with `==` between two directions.
25874 ---
25875 ---__Reference:__
25876 ---
25877 ---* Corresponding C source code: [direction.c#L23-L29](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L23-L29)
25878 ---
25879 ---@return boolean # `true` or `false` depending on whether the two tags are equal.
25880 ---
25881 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25882 function Direction:__eq() end
25883
25884 ---
25885 ---Test whether a text direction is valid.
25886 ---
25887 ---Wraps `HB_DIRECTION_IS_VALID`.
25888 ---
25889 ---__Reference:__
25890 ---
25891 ---* Corresponding C source code: [direction.c#L31-L36](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L31-L36)
25892 ---* HarfBuzz online documentation: [HB_DIRECTION_IS_VALID](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-DIRECTION-IS-VALID:CAPS)
25893 ---
25894 ---@return boolean # a boolean value
25895 ---
25896 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25897 function Direction:is_valid() end
25898
25899 ---
25900 ---Test whether a text direction is horizontal.
25901 ---
25902 ---Requires that the direction be valid. Wraps `HB_DIRECTION_IS_HORIZONTAL`.
25903 ---
25904 ---__Reference:__
25905 ---
25906 ---* Corresponding C source code: [direction.c#L38-L43](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L38-L43)
25907 ---* HarfBuzz online documentation: [HB_DIRECTION_IS_HORIZONTAL](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-DIRECTION-IS-HORIZONTAL:CAPS)
25908 ---
25909 ---@return boolean # a boolean value
25910 ---
25911 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25912 function Direction:is_horizontal() end
25913
25914 ---
25915 ---Test whether a text direction is vertical.
25916 ---
25917 ---Requires that the direction be valid. Wraps `HB_DIRECTION_IS_VERTICAL`.
25918 ---
25919 ---__Reference:__
25920 ---
25921 ---* Corresponding C source code: [direction.c#L45-L50](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L45-L50)
25922 ---* HarfBuzz online documentation: [HB_DIRECTION_IS_VERTICAL](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-DIRECTION-IS-VERTICAL:CAPS)
25923 ---
25924 ---@return boolean # a boolean value
25925 ---
25926 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25927 function Direction:is_vertical() end
25928
25929 ---
25930 ---Test whether a text direction moves forward (from left to right, or from top to bottom).
25931 ---
25932 ---Requires that the direction be valid. Wraps `HB_DIRECTION_IS_FORWARD`.
25933 ---
25934 ---__Reference:__
25935 ---
25936 ---* Corresponding C source code: [direction.c#L52-L57](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L52-L57)
25937 ---* HarfBuzz online documentation: [HB_DIRECTION_IS_FORWARD](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-DIRECTION-IS-FORWARD:CAPS)
25938 ---
25939 ---@return boolean # a boolean value
25940 ---
25941 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25942 function Direction:is_forward() end
25943
25944 ---
25945 ---Test whether a text direction moves backward (from right to left, or from bottom to top).
25946 ---
25947 ---Requires that the direction be valid. Wraps `HB_DIRECTION_IS_BACKWARD`.
25948 ---
25949 ---__Reference:__
25950 ---
25951 ---* Corresponding C source code: [direction.c#L59-L64](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/direction.c#L59-L64)
25952 ---* HarfBuzz online documentation: [HB_DIRECTION_IS_BACKWARD](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-DIRECTION-IS-BACKWARD:CAPS)
25953 ---
25954 ---@return boolean # a boolean value
25955 ---
25956 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25957 function Direction:is_backward() end
25958
25959 ---
25960 ---Wraps `HB_DIRECTION_LTR`.
25961 ---
25962 ---Predefined directions that correspond to their original definitions in Harfbuzz.
25963 ---
25964 ---__Reference:__
25965 ---
25966 ---* HarfBuzz online documentation: [hb_direction_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-t)
25967 ---
25968 ---@type integer|nil
25969 ---
25970 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25971 luaharfbuzz.Direction.LTR = 4
25972
25973 ---
25974 ---Wraps `HB_DIRECTION_RTL`.
25975 ---
25976 ---Predefined directions that correspond to their original definitions in Harfbuzz.
25977 ---
25978 ---__Reference:__
25979 ---
25980 ---* HarfBuzz online documentation: [hb_direction_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-t)
25981 ---
25982 ---@type integer|nil
25983 ---
25984 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25985 luaharfbuzz.Direction.RTL = 0
25986
25987 ---
25988 ---Wraps `HB_DIRECTION_TTB`.
25989 ---
25990 ---Predefined directions that correspond to their original definitions in Harfbuzz.
25991 ---
25992 ---__Reference:__
25993 ---
25994 ---* HarfBuzz online documentation: [hb_direction_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-t)
25995 ---
25996 ---@type integer|nil
25997 ---
25998 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
25999 luaharfbuzz.Direction.TTB = 0
26000
26001 ---
26002 ---Wraps `HB_DIRECTION_LTR`.
26003 ---
26004 ---Predefined directions that correspond to their original definitions in Harfbuzz.
26005 ---
26006 ---__Reference:__
26007 ---
26008 ---* HarfBuzz online documentation: [hb_direction_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-t)
26009 ---
26010 ---@type integer|nil
26011 ---
26012 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26013 luaharfbuzz.Direction.BTT = 0
26014
26015 ---
26016 ---Data type for languages. Each lanauge object corresponds to a BCP 47 language tag.
26017 ---
26018 ---Lua wrapper for `hb_language_t` type.
26019 ---
26020 ---__Reference:__
26021 ---
26022 ---* Corresponding C source code: [luaharfbuzz.h#L20](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L20)
26023 ---* HarfBuzz online documentation: [hb_language_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-t)
26024 ---
26025 ---@class HbLanguage
26026 local Language = {}
26027 luaharfbuzz.Language = Language
26028
26029 ---
26030 ---Convert a string representing a BCP 47 language tag to the corresponding language object.
26031 ---
26032 ---Wraps `hb_language_from_string`.
26033 ---
26034 ---__Reference:__
26035 ---
26036 ---* Corresponding C source code: [language.c#L4-L17](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/language.c#L4-L17)
26037 ---* HarfBuzz online documentation: [hb_language_from_string](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-from-string)
26038 ---
26039 ---@param language_tag string [three-letter language tag](http://www.microsoft.com/typography/otspec/languagetags.htm) to be converted to a `Language` object.
26040 ---
26041 ---@return HbLanguage # a `Language` object.
26042 ---
26043 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26044 function Language.new(language_tag) end
26045
26046 ---
26047 ---Enable nice output with `tostring(…)`.
26048 ---
26049 ---Wraps `hb_language_to_string`.
26050 ---
26051 ---__Reference:__
26052 ---
26053 ---* Corresponding C source code: [language.c#L19-L25](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/language.c#L19-L25)
26054 ---* HarfBuzz online documentation: [hb_language_to_string](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-to-string)
26055 ---
26056 ---@return string # Returns a string representation for the language object.
26057 ---
26058 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26059 function Language:__tostring() end
26060
26061 ---
26062 ---Enable equality comparisions with `==` between two languages.
26063 ---
26064 ---__Reference:__
26065 ---
26066 ---* Corresponding C source code: [language.c#L27-L34](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/language.c#L27-L34)
26067 ---
26068 ---@param lang HbLanguage
26069 ---
26070 ---@return boolean # `true` or `false` depending on whether the two languages are equal.
26071 ---
26072 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26073 function Language:__eq(lang) end
26074
26075 ---
26076 ---Value to represent a nonexistent name ID.
26077 ---
26078 ---Wraps `HB_LANGUAGE_INVALID`.
26079 ---
26080 ---__Reference:__
26081 ---
26082 ---* HarfBuzz online documentation: [HB_LANGUAGE_INVALID](https://harfbuzz.github.io/harfbuzz-hb-common.html#HB-LANGUAGE-INVALID:CAPS)
26083 ---* Corresponding C source code: [harfbuzz.lua#L20](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/harfbuzz.lua#L20)
26084 ---
26085 ---@type HbLanguage
26086 Language.INVALID = nil
26087
26088 ---
26089 ---Unicode functions.
26090 ---@class unicode
26091 local unicode = {}
26092 luaharfbuzz.unicode = unicode
26093
26094 ---
26095 ---Retrieve the `Script` object to which code point `unicode` belongs.
26096 ---
26097 ---Wraps `hb_unicode_script`
26098 ---
26099 ---__Reference:__
26100 ---
26101 ---* Corresponding C source code: [unicode.c#L3-L12](https://github.com/ufyTeX/luaharfbuzz/blob/b3bdf5dc7a6e3f9b674226140c3dfdc73d2970cd/src/luaharfbuzz/unicode.c#L3-L12)
26102 ---* HarfBuzz online documentation: [hb_unicode_script](https://harfbuzz.github.io/harfbuzz-hb-unicode.html#hb-unicode-script)
26103 ---
26104 ---@param char integer # Unicode codepoint
26105 ---
26106 ---@return HbScript # a `Script` object.
26107 ---
26108 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26109 function unicode.script(char) end
26110
26111 ---
26112 ---Predefined Name IDs.
26113 ---Predefined OpenType 'name' table name identifier.
26114 ---
26115 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26116 ---@class ot
26117 ---
26118 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L4
26119 ---@field NAME_ID_COPYRIGHT string # Copyright notice. Wraps `HB_OT_NAME_ID_COPYRIGHT`.
26120 ---
26121 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L5
26122 ---@field NAME_ID_FONT_FAMILY string # Font Family name. Wraps `HB_OT_NAME_ID_FONT_FAMILY`.
26123 ---
26124 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L6
26125 ---@field NAME_ID_FONT_SUBFAMILY string # Font Subfamily name. Wraps `HB_OT_NAME_ID_FONT_SUBFAMILY`.
26126 ---
26127 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L7
26128 ---@field NAME_ID_UNIQUE_ID string # Unique font identifier. Wraps `HB_OT_NAME_ID_UNIQUE_ID`.
26129 ---
26130 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L8
26131 ---@field NAME_ID_FULL_NAME string # Full font name that reflects all family and relevant subfamily descriptors. Wraps `HB_OT_NAME_ID_FULL_NAME`.
26132 ---
26133 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L9
26134 ---@field NAME_ID_VERSION_STRING string # Version string. Wraps `HB_OT_NAME_ID_VERSION_STRING`.
26135 ---
26136 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L10
26137 ---@field NAME_ID_POSTSCRIPT_NAME string # PostScript name for the font. Wraps `HB_OT_NAME_ID_POSTSCRIPT_NAME`.
26138 ---
26139 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L11
26140 ---@field NAME_ID_TRADEMARK string # Trademark. Wraps `HB_OT_NAME_ID_TRADEMARK`.
26141 ---
26142 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L12
26143 ---@field NAME_ID_MANUFACTURER string # Manufacturer Name. Wraps `HB_OT_NAME_ID_MANUFACTURER`.
26144 ---
26145 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L13
26146 ---@field NAME_ID_DESIGNER string # Designer. Wraps `HB_OT_NAME_ID_DESIGNER`.
26147 ---
26148 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L14
26149 ---@field NAME_ID_DESCRIPTION string # Description. Wraps `HB_OT_NAME_ID_DESCRIPTION`.
26150 ---
26151 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L15
26152 ---@field NAME_ID_VENDOR_URL string # URL of font vendor. Wraps `HB_OT_NAME_ID_VENDOR_URL`.
26153 ---
26154 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L16
26155 ---@field NAME_ID_DESIGNER_URL string # URL of typeface designer. Wraps `HB_OT_NAME_ID_DESIGNER_URL`.
26156 ---
26157 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L17
26158 ---@field NAME_ID_LICENSE string # License Description. Wraps `HB_OT_NAME_ID_LICENSE`.
26159 ---
26160 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L18
26161 ---@field NAME_ID_LICENSE_URL string # URL where additional licensing information can be found. Wraps `HB_OT_NAME_ID_LICENSE_URL`.
26162 ---
26163 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L19
26164 ---@field NAME_ID_TYPOGRAPHIC_FAMILY string # Typographic Family name. Wraps `HB_OT_NAME_ID_TYPOGRAPHIC_FAMILY`.
26165 ---
26166 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L20
26167 ---@field NAME_ID_TYPOGRAPHIC_SUBFAMILY string # Typographic Subfamily name. Wraps `HB_OT_NAME_ID_TYPOGRAPHIC_SUBFAMILY`.
26168 ---
26169 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L21
26170 ---@field NAME_ID_MAC_FULL_NAME string # Compatible Full Name for MacOS. Wraps `HB_OT_NAME_ID_MAC_FULL_NAME`.
26171 ---
26172 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L22
26173 ---@field NAME_ID_SAMPLE_TEXT string # Sample text. Wraps `HB_OT_NAME_ID_SAMPLE_TEXT`.
26174 ---
26175 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L23
26176 ---@field NAME_ID_CID_FINDFONT_NAME string # PostScript CID findfont name. Wraps `HB_OT_NAME_ID_CID_FINDFONT_NAME`.
26177 ---
26178 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L24
26179 ---@field NAME_ID_WWS_FAMILY string # WWS Family Name. Wraps `HB_OT_NAME_ID_WWS_FAMILY`.
26180 ---
26181 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L25
26182 ---@field NAME_ID_WWS_SUBFAMILY string # WWS Subfamily Name. Wraps `HB_OT_NAME_ID_WWS_SUBFAMILY`.
26183 ---
26184 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L26
26185 ---@field NAME_ID_LIGHT_BACKGROUND string # Light Background Palette. Wraps `HB_OT_NAME_ID_LIGHT_BACKGROUND`.
26186 ---
26187 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L27
26188 ---@field NAME_ID_DARK_BACKGROUND string # Dark Background Palette. Wraps `HB_OT_NAME_ID_DARK_BACKGROUND`.
26189 ---
26190 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L28
26191 ---@field NAME_ID_VARIATIONS_PS_PREFIX string # Variations PostScript Name Prefix. Wraps `HB_OT_NAME_ID_VARIATIONS_PS_PREFIX`.
26192 ---
26193 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L29
26194 ---@field NAME_ID_INVALID string # Value to represent a nonexistent name ID. Wraps `HB_OT_NAME_ID_INVALID`.
26195 ---
26196 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L30
26197 ---@field LAYOUT_NO_SCRIPT_INDEX string # Special value for script index indicating unsupported script. Wraps `HB_OT_LAYOUT_NO_SCRIPT_INDEX`.
26198 ---
26199 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L31
26200 ---@field LAYOUT_NO_FEATURE_INDEX string # Special value for variations index indicating unsupported variation. Wraps `HB_OT_LAYOUT_NO_FEATURE_INDEX`.
26201 ---
26202 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L32
26203 ---@field LAYOUT_DEFAULT_LANGUAGE_INDEX string # Special value for language index indicating default or unsupported language. Wraps `HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX`.
26204 ---
26205 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L33
26206 ---@field LAYOUT_NO_VARIATIONS_INDEX string # Special value for variations index indicating unsupported variation. Wraps `HB_OT_LAYOUT_NO_VARIATIONS_INDEX`.
26207 ---
26208 ---https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/ot.c#L34
26209 local ot = {}
26210 luaharfbuzz.ot = ot
26211
26212 ---
26213 ---Data type for holding variation data. Registered OpenType variation-axis tags are listed in OpenType Axis Tag Registry.
26214 ---
26215 ---Wraps `hb_variation_t`.
26216 ---
26217 ---__Reference:__
26218 ---
26219 ---* Corresponding C source code: [luaharfbuzz.h#L21](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L21)
26220 ---* HarfBuzz online documentation: [hb_variation_t](https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-variation-t)
26221 ---
26222 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26223 ---@class HbVariation
26224 local Variation = {}
26225
26226 ---
26227 ---__Reference:__
26228 ---
26229 ---* Corresponding C source code: [luaharfbuzz.h#L21](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.h#L21)
26230 ---
26231 ---😱 [Types](https://github.com/LuaCATS/luaharfbuzz/blob/main/library/luaharfbuzz.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/LuaCATS/luaharfbuzz/pulls)
26232 luaharfbuzz.Variation = Variation
26233 ---
26234 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26235 pdfe = {}
26236
26237 ---
26238 ---__Reference:__
26239 ---
26240 ---* Corresponding C source code: [lpdfelib.c#L1521-L1537](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1521-L1537)
26241 ---
26242 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26243 ---@class PdfeDocument
26244 ---@field catalog any
26245 ---@field Catalog any
26246 ---@field info any
26247 ---@field Info any
26248 ---@field trailer any
26249 ---@field Trailer any
26250 ---@field pages any
26251 ---@field Pages any
26252
26253 ---
26254 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26255 ---@class PdfeDictionary
26256
26257 ---
26258 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26259 ---@class PdfeArray
26260
26261 ---
26262 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26263 ---@class PdfeStream
26264
26265 ---
26266 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26267 ---@class PdfeReference
26268
26269 ---
26270 ---Open a pdf file.
26271 ---
26272 ---@param filename string # File name.
26273 ---
26274 ---@return PdfeDocument doc # Pdfe document.
26275 ---
26276 ---__Reference:__
26277 ---
26278 ---* Corresponding C source code: [lpdfelib.c#L834-L851](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L834-L851)
26279 ---
26280 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26281 function pdfe.open(filename) end
26282
26283 ---
26284 ---Open a pseudo (in-memory) pdf file.
26285 ---
26286 ---@param contents string # A string containing a complete pdf file.
26287 ---@param size integer # Size of contents in bytes.
26288 ---
26289 ---@return PdfeDocument
26290 ---
26291 ---__Reference:__
26292 ---
26293 ---* Corresponding C source code: [lpdfelib.c#L853-L917](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L853-L917)
26294 ---
26295 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26296 function pdfe.new(contents, size) end
26297
26298 ---
26299 ---Return the encryption status of a pdfe document.
26300 ---
26301 ---@param doc PdfeDocument # Pdfe document.
26302 ---
26303 ---@return integer status # Encryption status.
26304 -- - -2 <doc> is encrypted
26305 -- - -1 <doc> is encrypted and decryption with `pdfe.unencrypt()` failed
26306 -- - 0 <doc> is not encrypted
26307 -- - 1 <doc> successfully unencrypted with `pdfe.unencrypt()`
26308 ---
26309 ---__Reference:__
26310 ---
26311 ---* Corresponding C source code: [lpdfelib.c#L1031-L1038](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1031-L1038)
26312 ---
26313 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26314 function pdfe.getstatus(doc) end
26315
26316 ---
26317 ---Close a pdfe document.
26318 ---
26319 ---@param doc PdfeDocument # Pdfe document.
26320 ---
26321 ---__Reference:__
26322 ---
26323 ---* Corresponding C source code: [lpdfelib.c#L945-L948](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L945-L948)
26324 ---
26325 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26326 function pdfe.close(doc) end
26327
26328 ---
26329 ---Unencrypt a pdfe document.
26330 ---
26331 ---@param doc PdfeDocument # Pdfe document.
26332 ---
26333 ---@param userpassword string|nil # User password.
26334 ---@param ownerpassword string|nil # Owner password.
26335 ---
26336 ---__Reference:__
26337 ---
26338 ---* Corresponding C source code: [lpdfelib.c#L963-L991](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L963-L991)
26339 ---
26340 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26341 function pdfe.unencrypt(doc, userpassword, ownerpassword) end
26342
26343 ---
26344 ---Return the size of a pdfe document in bytes.
26345 ---
26346 ---@param doc PdfeDocument # Pdfe document.
26347 ---
26348 ---@return integer size # Size of pdf document is bytes.
26349 ---
26350 ---__Reference:__
26351 ---
26352 ---* Corresponding C source code: [lpdfelib.c#L1008-L1015](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1008-L1015)
26353 ---
26354 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26355 function pdfe.getsize(doc) end
26356
26357 ---
26358 ---Return the version number of the pdf document.
26359 ---
26360 ---@param doc PdfeDocument
26361 ---
26362 ---@return integer major # major version number
26363 ---@return integer minor # minor version number
26364 ---
26365 ---__Reference:__
26366 ---
26367 ---* Corresponding C source code: [lpdfelib.c#L1017-L1029](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1017-L1029)
26368 ---
26369 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26370 function pdfe.getversion(doc) end
26371
26372 ---
26373 ---Return number of objects referenced in the XREF table.
26374 ---
26375 ---@param doc PdfeDocument # Pdf document.
26376 ---
26377 ---@return integer nobj # Number of objects.
26378 ---
26379 ---__Reference:__
26380 ---
26381 ---* Corresponding C source code: [lpdfelib.c#L1040-L1047](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1040-L1047)
26382 ---
26383 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26384 function pdfe.getnofobjects(doc) end
26385
26386 ---
26387 ---Return the number of pages of the pdf document.
26388 ---
26389 ---@param document PdfeDocument # Pdfe document.
26390 ---
26391 ---@return integer npages # Number of pages.
26392 ---
26393 ---__Reference:__
26394 ---
26395 ---* Corresponding C source code: [lpdfelib.c#L1049-L1056](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1049-L1056)
26396 ---
26397 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26398 function pdfe.getnofpages(document) end
26399
26400 ---
26401 ---Return memory usage of pplib library in bytes.
26402 ---
26403 ---@param doc PdfeDocument # Pdfe document.
26404 ---
26405 ---@return integer used # Used memory including waste.
26406 ---@return integer waste # Waste (E.g. optional keys of pdf objects that are not used.)
26407 ---
26408 ---__Reference:__
26409 ---
26410 ---* Corresponding C source code: [lpdfelib.c#L1058-L1069](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1058-L1069)
26411 ---
26412 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26413 function pdfe.getmemoryusage(doc) end
26414
26415 ---
26416 ---Return pdf catalog.
26417 ---
26418 ---@param doc PdfeDocument # Pdfe document.
26419 ---
26420 ---@return PdfeDictionary catalog # Catalog of the pdf.
26421 ---
26422 ---__Reference:__
26423 ---
26424 ---* Corresponding C source code: [lpdfelib.c#L465-L471](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L465-L471)
26425 ---
26426 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26427 function pdfe.getcatalog(doc) end
26428
26429 ---
26430 ---Return pdf trailer.
26431 ---
26432 ---@param doc PdfeDocument # Pdfe document
26433 ---
26434 ---@return PdfeDictionary trailor # Trailer of the pdf.
26435 ---
26436 ---__Reference:__
26437 ---
26438 ---* Corresponding C source code: [lpdfelib.c#L473-L479](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L473-L479)
26439 ---
26440 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26441 function pdfe.gettrailer(doc) end
26442
26443 ---
26444 ---Return pdf info.
26445 ---
26446 ---@param doc PdfeDocument # Pdfe document
26447 ---
26448 ---@return PdfeDictionary info # Info of the pdf.
26449 ---
26450 ---__Reference:__
26451 ---
26452 ---* Corresponding C source code: [lpdfelib.c#L481-L487](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L481-L487)
26453 ---
26454 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26455 function pdfe.getinfo(doc) end
26456
26457 ---
26458 ---Return a specific pdf page.
26459 ---
26460 ---@param doc PdfeDocument # Pdfe document.
26461 ---@param page integer # Page number.
26462 ---
26463 ---@return PdfeDictionary page # Page object.
26464 ---
26465 ---__Reference:__
26466 ---
26467 ---* Corresponding C source code: [lpdfelib.c#L1091-L1099](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1091-L1099)
26468 ---
26469 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26470 function pdfe.getpage(doc, page) end
26471
26472 ---
26473 ---Return a table of pages.
26474 ---
26475 ---@param doc PdfeDocument # Pdfe document.
26476 ---
26477 ---@return table< PdfeDictionary > table # Lua table.
26478 ---Each item of the returned table is a PdfeDictionary of one page of the pdf.
26479 ---
26480 ---__Reference:__
26481 ---
26482 ---* Corresponding C source code: [lpdfelib.c#L1114-L1122](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1114-L1122)
26483 ---
26484 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26485 function pdfe.getpages(doc) end
26486
26487 ---
26488 ---Return bounding box of a pdf page.
26489 ---
26490 ---@param page PdfeDictionary # Pdfe dictionary.
26491 ---@param bbox_name 'MediaBox'|'CropBox'|'BleedBox'|'TrimBox'|'ArtBox' # Name of bounding box.
26492 ---
26493 ---@return number[] bbox # [llx lly urx ury]
26494 ---
26495 ---__Reference:__
26496 ---
26497 ---* Corresponding C source code: [lpdfelib.c#L1136-L1161](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1136-L1161)
26498 ---
26499 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26500 function pdfe.getbox(page, bbox_name) end
26501
26502 ---
26503 ---Return a pdf string object as a string.
26504 ---
26505 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26506 ---@param key_or_index integer # Key or index.
26507 ---
26508 ---@return string string # If the pdf string is hex encoded then the returned string is hex encoded too.
26509 ---
26510 ---__Reference:__
26511 ---
26512 ---* Corresponding C source code: [lpdfelib.c#L1342-L1369](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1342-L1369)
26513 ---
26514 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26515 function pdfe.getstring(dict_or_array, key_or_index) end
26516
26517 ---
26518 ---Return a pdf string object as a string.
26519 ---
26520 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26521 ---@param key_or_index string|integer # Key or index.
26522 ---@param decode boolean # `True`, if a hex encoded string shall be decoded.
26523 ---
26524 ---@return string string
26525 ---@return boolean was_encoded # `True`, if string was hex encoded. Return value `was_encoded` is only available if `decode` is `false`.
26526 ---
26527 ---__Reference:__
26528 ---
26529 ---* Corresponding C source code: [lpdfelib.c#L1342-L1369](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1342-L1369)
26530 ---
26531 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26532 function pdfe.getstring(dict_or_array, key_or_index, decode) end
26533
26534 ---
26535 ---Return a pdf integer object as integer.
26536 ---
26537 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26538 ---@param key_or_index string|integer # Key or index.
26539 ---
26540 ---@return integer value # Integer.
26541 ---
26542 ---__Reference:__
26543 ---
26544 ---* Corresponding C source code: [lpdfelib.c#L1371-L1383](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1371-L1383)
26545 ---
26546 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26547 function pdfe.getinteger(dict_or_array, key_or_index) end
26548
26549 ---
26550 ---Return a pdf number object as number.
26551 ---
26552 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26553 ---@param key_or_index string|integer # Key or index.
26554 ---
26555 ---@return number value
26556 ---
26557 ---__Reference:__
26558 ---
26559 ---* Corresponding C source code: [lpdfelib.c#L1385-L1397](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1385-L1397)
26560 ---
26561 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26562 function pdfe.getnumber(dict_or_array, key_or_index) end
26563
26564 ---
26565 ---Return a pdf boolean value as boolean.
26566 ---
26567 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26568 ---@param key_or_index string|integer # Key or index.
26569 ---
26570 ---@return boolean value
26571 ---
26572 ---__Reference:__
26573 ---
26574 ---* Corresponding C source code: [lpdfelib.c#L1399-L1411](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1399-L1411)
26575 ---
26576 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26577 function pdfe.getboolean(dict_or_array, key_or_index) end
26578
26579 ---
26580 ---Return a pdf name object as string.
26581 ---
26582 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26583 ---@param key_or_index string|integer # Key or index.
26584 ---
26585 ---@return string value # Name.
26586 ---
26587 ---__Reference:__
26588 ---
26589 ---* Corresponding C source code: [lpdfelib.c#L1413-L1425](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1413-L1425)
26590 ---
26591 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26592 function pdfe.getname(dict_or_array, key_or_index) end
26593
26594 ---
26595 ---Return a string representing the pdfe type of <pdfe_obj>.
26596 ---
26597 ---| returned string | type of `<pdfe_obj>` |
26598 ---| --------------- | -------------------- |
26599 ---| pdfe | PdfeDocument |
26600 ---| pdfe.dictionary | PdfeDictionary |
26601 ---| pdfe.array | PdfeArray |
26602 ---| pdfe.stream | PdfeStream |
26603 ---| pdfe.reference | PdfeReference |
26604 ---
26605 ---@param pdfe_obj PdfeDocument|PdfeDictionary|PdfeArray|PdfeStream|PdfeReference
26606 ---
26607 ---@return string|nil pdfe_type # Type of pdfe object.
26608 ---
26609 --- Note: Returns `nil` for all other objects like integer, string, etc.
26610 ---
26611 ---__Reference:__
26612 ---
26613 ---* Corresponding C source code: [lpdfelib.c#L224-L235](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L224-L235)
26614 ---
26615 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26616 function pdfe.type(pdfe_obj) end
26617
26618 ---
26619 ---Return a pdf dictionary as a pdfe dictionary.
26620 ---
26621 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26622 ---@param key_or_index string|integer # Key or index.
26623 ---
26624 ---@return PdfeDictionary dict # Pdfe dictionary.
26625 ---
26626 ---__Reference:__
26627 ---
26628 ---* Corresponding C source code: [lpdfelib.c#L1427-L1437](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1427-L1437)
26629 ---
26630 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26631 function pdfe.getdictionary(dict_or_array, key_or_index) end
26632
26633 ---
26634 ---Return a pdf array as a pdfe array.
26635 ---
26636 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26637 ---@param key_or_index string|integer # Key or index.
26638 ---
26639 ---@return PdfeArray array # Pdfe array.
26640 ---
26641 ---__Reference:__
26642 ---
26643 ---* Corresponding C source code: [lpdfelib.c#L1439-L1449](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1439-L1449)
26644 function pdfe.getarray(dict_or_array, key_or_index) end
26645
26646 ---
26647 ---Return a pdf stream as a pdfe stream.
26648 ---
26649 ---The corresponding dictionary of the stream is returned too.
26650 ---
26651 ---@param dict_or_array PdfeDictionary|PdfeArray # Pdfe dictionary or array.
26652 ---@param key_or_index string|integer # Key or index.
26653 ---
26654 ---@return PdfeStream stream # Pdfe stream.
26655 ---@return PdfeDictionary dict # Pdfe dictionary of the stream.
26656 ---
26657 ---__Reference:__
26658 ---
26659 ---* Corresponding C source code: [lpdfelib.c#L1451-L1461](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1451-L1461)
26660 ---
26661 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26662 function pdfe.getstream(dict_or_array, key_or_index) end
26663
26664 ---
26665 ---Return a value of a pdf stream dictionary, including low level details about this value.
26666 ---
26667 ---Like `pdfe.getfromdictionary()` except that this functions works on a 'dictionary of a stream'.
26668 ---
26669 ---| Type | PDF type | Lua type | Details |
26670 ---| ---- | ------------ | ---------------- | ------------------- |
26671 ---| 0 | `none` | `nil` | |
26672 ---| 1 | `null` | `nil` | |
26673 ---| 2 | `boolean` | `boolean` | |
26674 ---| 3 | `integer` | `integer` | |
26675 ---| 4 | `number` | `number` | |
26676 ---| 5 | `name` | `string` | |
26677 ---| 6 | `string` | `string` | Is_hex? (1) |
26678 ---| 7 | `array` | `PdfeArray` | Size of array |
26679 ---| 8 | `dictionary` | `PdfeDictionary` | Size of dictionary |
26680 ---| 9 | `stream` | `PdfeStream` | PdfeDictionary |
26681 ---| 10 | `reference` | `PdfeReference` | Number of reference |
26682 ---
26683 ---(1) `true`, for hexadecimal string, `false` for normal string
26684 ---
26685 ---@param stream PdfeStream
26686 ---@param key integer
26687 ---
26688 ---@return integer type # Integer representing the type of a value. (See table below.)
26689 ---@return any value # The value itself.
26690 ---@return any details # Details about this value. (See table below.)
26691 ---
26692 ---__Reference:__
26693 ---
26694 ---* Corresponding C source code: [lpdfelib.c#L544-L570](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L544-L570)
26695 ---
26696 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26697 function pdfe.getfromstream(stream, key) end
26698
26699 ---
26700 ---Open a stream.
26701 ---
26702 ---@param stream PdfeStream # Pdfe stream object.
26703 ---@param decode? boolean # `True`, if stream should be decompressed.
26704 ---
26705 ---@return boolean okay # `True`, if reading the stream was successful.
26706 ---
26707 ---__Reference:__
26708 ---
26709 ---* Corresponding C source code: [lpdfelib.c#L764-L778](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L764-L778)
26710 ---
26711 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26712 function pdfe.openstream(stream, decode) end
26713
26714 ---
26715 ---Close a stream.
26716 ---
26717 ---@param stream PdfeStream # Pdfe stream object
26718 ---
26719 ---__Reference:__
26720 ---
26721 ---* Corresponding C source code: [lpdfelib.c#L780-L791](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L780-L791)
26722 ---
26723 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26724 function pdfe.closestream(stream) end
26725
26726 ---
26727 ---Read a stream object in chunks.
26728 ---
26729 ---@param stream PdfeStream # Pdfe stream object.
26730 ---
26731 ---@return string contents # Contents of stream.
26732 ---@return integer size# Length of stream.
26733 ---
26734 ---__Reference:__
26735 ---
26736 ---* Corresponding C source code: [lpdfelib.c#L793-L812](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L793-L812)
26737 ---
26738 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26739 function pdfe.readfromstream(stream) end
26740
26741 ---
26742 ---Read stream object as a whole.
26743 ---Opening and closing the stream with `pdfe.openstream()` and `pdfe.closestream()` is not necessary.
26744 ---
26745 ---@param stream PdfeStream # Pdfe stream object.
26746 ---@param decode boolean # `True`, if stream should be decompressed.
26747 ---
26748 ---@return string contents # Contents of stream.
26749 ---@return integer size # Length of stream.
26750 ---
26751 ---__Reference:__
26752 ---
26753 ---* Corresponding C source code: [lpdfelib.c#L728-L750](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L728-L750)
26754 ---
26755 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26756 function pdfe.readwholestream(stream, decode) end
26757
26758 ---
26759 ---Return a table in which each item represents one page of a pdf.
26760 ---
26761 ---@param doc PdfeDocument # Pdfe document.
26762 ---
26763 ---@return table table # Lua table.
26764 -- Each item (page) of the returned table is a table itself like this:
26765 -- `{ page, size, objnum }`
26766 -- * `page` - pdfe dictionary of a page
26767 -- * `size` - number of keys of the `page` dictionary
26768 -- * `objnum` - pdf object number of the page object
26769 ---
26770 ---__Reference:__
26771 ---
26772 ---* Corresponding C source code: [lpdfelib.c#L686-L716](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L686-L716)
26773 ---
26774 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26775 function pdfe.pagestotable(doc) end
26776
26777 ---
26778 ---Return a value of a pdf dictionary, including low level details about this value.
26779 ---
26780 ---| Type | PDF type | Lua type | Details |
26781 ---| ---- | ------------ | ---------------- | ------------------- |
26782 ---| 0 | `none` | `nil` | |
26783 ---| 1 | `null` | `nil` | |
26784 ---| 2 | `boolean` | `boolean` | |
26785 ---| 3 | `integer` | `integer` | |
26786 ---| 4 | `number` | `number` | |
26787 ---| 5 | `name` | `string` | |
26788 ---| 6 | `string` | `string` | Is_hex? (1) |
26789 ---| 7 | `array` | `PdfeArray` | Size of array |
26790 ---| 8 | `dictionary` | `PdfeDictionary` | Size of dictionary |
26791 ---| 9 | `stream` | `PdfeStream` | PdfeDictionary |
26792 ---| 10 | `reference` | `PdfeReference` | Number of reference |
26793 ---
26794 ---(1) `true`, for hexadecimal string, `false` for normal string
26795 ---
26796 ---@param dict PdfeDictionary
26797 ---@param key string
26798 ---
26799 ---@return integer type # Integer representing the type of a value. (See table below.)
26800 ---@return any value # The value itself.
26801 ---@return any details # Details about this value. (See table below.)
26802 ---
26803 ---__Reference:__
26804 ---
26805 ---* Corresponding C source code: [lpdfelib.c#L517-L542](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L517-L542)
26806 ---
26807 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26808 function pdfe.getfromdictionary(dict, key) end
26809
26810 ---
26811 ---Return a value of a pdf dictionary, including low level details about this value.
26812 ---
26813 ---| Type | PDF type | Lua type | Details |
26814 ---| ---- | ------------ | ---------------- | ------------------- |
26815 ---| 0 | `none` | `nil` | |
26816 ---| 1 | `null` | `nil` | |
26817 ---| 2 | `boolean` | `boolean` | |
26818 ---| 3 | `integer` | `integer` | |
26819 ---| 4 | `number` | `number` | |
26820 ---| 5 | `name` | `string` | |
26821 ---| 6 | `string` | `string` | Is_hex? (1) |
26822 ---| 7 | `array` | `PdfeArray` | Size of array |
26823 ---| 8 | `dictionary` | `PdfeDictionary` | Size of dictionary |
26824 ---| 9 | `stream` | `PdfeStream` | PdfeDictionary |
26825 ---| 10 | `reference` | `PdfeReference` | Number of reference |
26826 ---
26827 ---(1) `true`, for hexadecimal string, `false` for normal string
26828 ---
26829 ---@param array PdfeArray
26830 ---@param index integer
26831 ---
26832 ---@return integer type # Integer representing the type of a value. (See table below.)
26833 ---@return any value # The value itself.
26834 ---@return any details # Details about this value. (See table below.)
26835 ---
26836 ---__Reference:__
26837 ---
26838 ---* Corresponding C source code: [lpdfelib.c#L501-L515](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L501-L515)
26839 ---
26840 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26841 function pdfe.getfromarray(array, index) end
26842
26843 ---
26844 ---Convert a pdfe dictionary into a lua table.
26845 ---
26846 ---@param dict PdfeDictionary # Pdfe dictionary.
26847 ---
26848 ---@return table<string, table<integer, any, any> > table # Lua table
26849 -- This function returns a lua table. Its keys are the keys of the pdfe dictionary and its values are what `pdfe.getfromdictionary(dict, key)` returns.
26850 ---
26851 ---__Reference:__
26852 ---
26853 ---* Corresponding C source code: [lpdfelib.c#L651-L674](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L651-L674)
26854 ---
26855 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26856 function pdfe.dictionarytotable(dict) end
26857
26858 ---
26859 ---Convert a pdfe array into a lua table.
26860 ---
26861 ---@param array PdfeArray # Pdfe array.
26862 ---
26863 ---@return table<integer, table<integer, any, any> > table # Lua table
26864 -- This function returns a lua table. Its indices are the indices of the pdfe array and its values are what `pdfe.getfromarray(array, index)` returns.
26865 ---
26866 ---__Reference:__
26867 ---
26868 ---* Corresponding C source code: [lpdfelib.c#L628-L649](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L628-L649)
26869 ---
26870 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26871 function pdfe.arraytotable(array) end
26872
26873 ---
26874 ---Return the value of a reference, including low level details about this value.
26875 ---
26876 ---| Type | PDF type | Lua type | Details |
26877 ---| ---- | ------------ | ---------------- | ------------------- |
26878 ---| 0 | `none` | `nil` | |
26879 ---| 1 | `null` | `nil` | |
26880 ---| 2 | `boolean` | `boolean` | |
26881 ---| 3 | `integer` | `integer` | |
26882 ---| 4 | `number` | `number` | |
26883 ---| 5 | `name` | `string` | |
26884 ---| 6 | `string` | `string` | Is_hex? (1) |
26885 ---| 7 | `array` | `PdfeArray` | Size of array |
26886 ---| 8 | `dictionary` | `PdfeDictionary` | Size of dictionary |
26887 ---| 9 | `stream` | `PdfeStream` | PdfeDictionary |
26888 ---| 10 | `reference` | `PdfeReference` | Number of reference |
26889 ---
26890 ---(1) `true`, for hexadecimal string, `false` for normal string
26891 ---
26892 ---@param ref PdfeReference
26893 ---
26894 ---@return integer type # Type of value. (See table below.)
26895 ---@return any value # The value itself.
26896 ---@return any details # Details about this value. (See table below.)
26897 ---
26898 ---__Reference:__
26899 ---
26900 ---* Corresponding C source code: [lpdfelib.c#L1174-L1188](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lpdfelib.c#L1174-L1188)
26901 ---
26902 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/pdfe.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26903 function pdfe.getfromreference(ref) end ---The font library provides the interface into the internals of the font system,
26904 ---and it also contains helper functions to load traditional *TeX* font metrics
26905 ---formats. Other font loading functionality is provided by the `fontloader`
26906 ---library that will be discussed in the next section.
26907 ---
26908 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26909 font = {}
26910
26911 ---
26912 ---All *TeX* fonts are represented to *Lua* code as tables, and internally as
26913 ---*C code* structures. All keys in the table below are saved in the internal font
26914 ---structure if they are present in the table returned by the `define_font`
26915 ---callback, or if they result from the normal *tfm*/*vf* reading routines if there
26916 ---is no `define_font` callback defined.
26917 ---
26918 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26919 ---@class Font
26920 ---@field name string # metric (file) name
26921 ---@field area string # (directory) location, typically empty
26922 ---@field used boolean # Indicates usage (initial: false). The key `used` is set by the engine when a font is actively in use. This makes sure that the font's definition is written to the output file (*DVI* or *PDF*). The *tfm* reader sets it to false.
26923 ---@field characters table<integer, FontCharacter> # the defined glyphs of this font
26924 ---@field checksum integer # default: 0
26925 ---@field designsize integer # expected size (default: 655360 == 10pt)
26926 ---@field direction FontDirection # default: 0
26927 ---@field encodingbytes integer # default: depends on `format`
26928 ---@field encodingname string # encoding name
26929 ---@field fonts table # locally used fonts
26930 ---@field psname string # This is the *PostScript* fontname in the incoming font source, and it's used as fontname identifier in the *PDF* output. This has to be a valid string, e.g.\ no spaces and such, as the backend will not do a cleanup. This gives complete control to the loader.
26931 ---@field fullname string # output font name, used as a fallback in the *PDF* output if the `psname` is not set
26932 ---@field subfont number # default: 0, index in (`ttc`) font with multiple fonts. The `subfont` parameter can be used to specify the subfont in a `ttc` font. When given, it is used instead of the `psname` and `fullname` combination. The first subfont has number 1. A zero value signals using the names as lookup.
26933 ---@field header string # header comments, if any
26934 ---@field hyphenchar integer # default: *TeX*'s `hyphenchar`
26935 ---@field parameters FontParameters # default: 7 parameters, all zero
26936 ---@field size integer # the required scaling (by default the same as designsize)
26937 ---@field skewchar integer # default: *TeX*'s `skewchar`
26938 ---@field type FontType # basic type of this font
26939 ---@field format FontFormat # disk format type
26940 ---@field embedding FontEmbedding # *PDF* inclusion
26941 ---@field filename string # the name of the font on disk
26942 ---@field tounicode integer # When this is set to 1 *LuaTeX* assumes per-glyph tounicode entries are present in the font.
26943 ---@field stretch integer # the “stretch” value from `expandglyphsinfont`
26944 ---@field shrink integer # the “shrink” value from `expandglyphsinfont`
26945 ---@field step integer # the “step” value from `expandglyphsinfont`
26946 ---@field expansion_factor integer # the actual expansion factor of an expanded font
26947 ---@field attributes string # the `pdffontattr`. The key `attributes` can be used to set font attributes in the *PDF* file.
26948 ---@field cache string # This key controls caching of the *Lua* table on the *TeX* end where `yes` means: use a reference to the table that is passed to *LuaTeX* (this is the default), and `no` means: don't store the table reference, don't cache any *Lua* data for this font while `renew` means: don't store the table reference, but save a reference to the table that is created at the first access to one of its fields in the font.
26949 ---@field nomath boolean # This key allows a minor speedup for text fonts. If it is present and true, then *LuaTeX* will not check the character entries for math-specific keys.
26950 ---@field oldmath boolean # This key flags a font as representing an old school *TeX* math font and disables the *OpenType* code path.
26951 ---@field slant integer # This parameter will tilt the font and does the same as `SlantFont` in the map file for *Type1* fonts.
26952 ---@field extend integer # This parameter will scale the font horizontally and does the same as `ExtendFont` in the map file for *Type1* fonts.
26953 ---@field squeeze integer # This parameter will scale the font vertically and has no equivalent in the map file.
26954 ---@field width integer # The backend will inject *PDF* operators that set the penwidth. The value is (as usual in *TeX*) divided by 1000. It works with the `mode` file.
26955 ---@field mode integer # The backend will inject *PDF* operators that relate to the drawing mode with 0 being a fill, 1 being an outline, 2 both draw and fill and 3 no painting at all.
26956 ---
26957
26958 ---
26959 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26960 ---@class VfFont
26961 ---@field name string # metric (file) name
26962 ---@field characters table<integer, FontCharacter> # the defined glyphs of this font
26963 ---@field checksum integer # default: 0
26964 ---@field fonts table # locally used fonts
26965 ---@field header string # header comments, if any
26966 ---@field type string # basic type of this font
26967
26968 ---
26969 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26970 ---@class TfmFont
26971 ---@field name string # metric (file) name
26972 ---@field area string # (directory) location, typically empty
26973 ---@field used boolean # Indicates usage (initial: false). The key `used` is set by the engine when a font is actively in use. This makes sure that the font's definition is written to the output file (*DVI* or *PDF*). The *tfm* reader sets it to false.
26974 ---@field characters table<integer, FontCharacter> # the defined glyphs of this font
26975 ---@field checksum integer # default: 0
26976 ---@field designsize integer # expected size (default: 655360 == 10pt)
26977 ---@field direction FontDirection # default: 0
26978 ---@field parameters FontParameters # default: 7 parameters, all zero
26979 ---@field size integer # the required scaling (by default the same as designsize)
26980 ---@field tounicode integer # When this is set to 1 *LuaTeX* assumes per-glyph tounicode entries are present in the font.
26981
26982 ---
26983 ---The `direction` is a number
26984 ---signalling the “normal” direction for this font. There are sixteen
26985 ---possibilities.
26986 ---
26987 ---These are *Omega*-style direction abbreviations: the first character indicates
26988 ---the “first” edge of the character glyphs (the edge that is seen first in
26989 ---the writing direction), the second the “top” side. Keep in mind that
26990 ---*LuaTeX* has a bit different directional model so these values are not used for
26991 ---anything.
26992 ---
26993 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
26994 ---@alias FontDirection
26995 ---|0 # LT
26996 ---|1 # LL
26997 ---|2 # LB
26998 ---|3 # LR
26999 ---|4 # RT
27000 ---|5 # RL
27001 ---|6 # RB
27002 ---|7 # RR
27003 ---|8 # TT
27004 ---|9 # TL
27005 ---|10 # TB
27006 ---|11 # TR
27007 ---|12 # BT
27008 ---|13 # BL
27009 ---|14 # BB
27010 ---|15 # BR
27011
27012 ---
27013 ---The `parameters` is a hash with mixed key types. There are seven possible
27014 ---string keys, as well as a number of integer indices (these start from 8 up). The
27015 ---seven strings are actually used instead of the bottom seven indices, because that
27016 ---gives a nicer user interface.
27017 ---
27018 ---The names and their internal remapping are:
27019 ---
27020 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27021 ---@alias FontParameterKey
27022 ---|`slant` # 1
27023 ---|`space` # 2
27024 ---|`space_stretch` # 3
27025 ---|`space_shrink` # 4
27026 ---|`x_height` # 5
27027 ---|`quad` # 6
27028 ---|`extra_space` # 7
27029
27030 ---
27031 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27032 ---@alias FontParameters table<FontParameterKey|integer, any>
27033
27034 ---
27035 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27036 ---@class FontCharacter
27037 ---@field width integer # The character's width, in sp (default 0)
27038 ---@field height integer # The character's height, in sp (default 0)
27039 ---@field depth integer # The character's depth, in sp (default 0)
27040 ---@field italic integer # The character's italic correction, in sp (default zero)
27041 ---@field top_accent integer # The character's top accent alignment place, in sp (default zero)
27042 ---@field bot_accent integer # The character's bottom accent alignment place, in sp (default zero)
27043 ---@field left_protruding integer # The character's `lpcode`
27044 ---@field right_protruding integer # The character's `rpcode`
27045 ---@field expansion_factor integer # The character's `efcode`
27046 ---@field tounicode string # The character's *Unicode* equivalent(s), in *UTF-8*-16BE hexadecimal format
27047 ---@field next integer # The “next larger” character index
27048 ---@field extensible FontCharacterExtensible # The constituent parts of an extensible recipe
27049 ---@field vert_variants FontCharacterComponent[] # The constituent parts of a vertical variant set
27050 ---@field horiz_variants FontCharacterComponent[] # The constituent parts of a horizontal variant set
27051 ---@field kerns table # The kerning information. The `kerns` table is a hash indexed by character index (and “character index” is defined as either a non-negative integer or the string value `right_boundary`), with the values of the kerning to be applied, in scaled points.
27052 ---@field ligatures table<integer|'right_boundary', FontCharacterLigature> # The ligaturing information. The `ligatures` table is a hash indexed by character index (and “character index” is defined as either a non-negative integer or the string value `right_boundary`), with the values being yet another small hash.
27053 ---@field commands FontCharacterCommands # The virtual font commands
27054 ---@field name string # The character (*PostScript*) name
27055 ---@field index integer # The (*OpenType* or *TrueType*) font glyph index
27056 ---@field used boolean # Already typeset (default: false)
27057 ---@field mathkern table # The math cut-in specifications
27058
27059 ---
27060 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27061 ---@class FontCharacterExtensible
27062 ---@field top integer # The top character index.
27063 ---@field mid integer # The middle character index.
27064 ---@field bot integer # The bottom character index.
27065 ---@field rep integer # The repeatable character index.
27066
27067 ---
27068 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27069 ---@class FontCharacterComponent
27070 ---@field glyph integer # The character index. Note that this is an encoding number, not a name.
27071 ---@field extender integer # One (1) if this part is repeatable, zero (0) otherwise.
27072 ---@field start integer # The maximum overlap at the starting side (in scaled points).
27073 ---@field end integer # The maximum overlap at the ending side (in scaled points).
27074 ---@field advance integer # The total advance width of this item. It can be zero or missing, then the natural size of the glyph for character `component` is used.
27075
27076 ---
27077 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27078 ---@class FontCharacterLigature
27079 ---@field type integer # the type of this ligature command, default 0
27080 ---@field char integer # the character index of the resultant ligature
27081
27082 ---
27083 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27084 ---@alias FontType
27085 ---|`real` # this is a base font
27086 ---|`virtual` # this is a virtual font
27087
27088 ---
27089 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27090 ---@alias FontFormat
27091 ---|`type1` # this is a *PostScript* *Type1* font
27092 ---|`type3` # this is a bitmapped (*pk*) font
27093 ---|`truetype` # this is a *TrueType* or *TrueType*-based *OpenType* font
27094 ---|`opentype` # this is a *PostScript*-based *OpenType* font
27095
27096 ---
27097 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27098 ---@alias FontEmbedding
27099 ---|`no` # don't embed the font at all
27100 ---|`subset` # include and atttempt to subset the font
27101 ---|`full` # include this font in its entirety
27102
27103 ---
27104 ---| command | arguments | type | description |
27105 ---|-----------|-----------|------------------|-------------|
27106 ---| `font` | 1 | number | select a new font from the local `fonts table |
27107 ---| `char` | 1 | number | typeset this character number from the current font, and move right by the character's width |
27108 ---| `node` | 1 | node | output this node # (list), and move right by the width of this list |
27109 ---| `slot` | 2 | 2 numbers | a shortcut for the combination of a font and char command |
27110 ---| `push` | 0 | | save current position |
27111 ---| `nop` | 0 | | do nothing |
27112 ---| `pop` | 0 | | pop position |
27113 ---| `rule` | 2 | 2 numbers | output a rule `ht*wd`, and move right. |
27114 ---| `down` | 1 | number | move down on the page |
27115 ---| `right` | 1 | number | move right on the page |
27116 ---| `special` | 1 | string | output a `special` command |
27117 ---| `pdf` | 2 | 2 strings | output a *PDF* literal, the first string is one of `origin`, `page`, `text`, `font`, `direct` or `raw`; if you have one string only `origin` is assumed |
27118 ---| `lua` | 1 | string, function | execute a *Lua* script when the glyph is embedded; in case of a function it gets the font id and character code passed |
27119 ---| `image` | 1 | image | output an image (the argument can be either an `<image>` variable or an `image_spec` table) |
27120 ---| `comment` | any | any | the arguments of this command are ignored |
27121 ---
27122 ---__Example:__
27123 ---
27124 ---```lua
27125 ---commands = {
27126 --- { "push" }, -- remember where we are
27127 --- { "right", 5000 }, -- move right about 0.08pt
27128 --- { "font", 3 }, -- select the fonts[3] entry
27129 --- { "char", 97 }, -- place character 97 (ASCII 'a')
27130 --- -- { "slot", 2, 97 }, -- an alternative for the previous two
27131 --- { "pop" }, -- go all the way back
27132 --- { "down", -200000 }, -- move upwards by about 3pt
27133 --- { "special", "pdf: 1 0 0 rg" } -- switch to red color
27134 --- -- { "pdf", "origin", "1 0 0 rg" } -- switch to red color (alternative)
27135 --- { "rule", 500000, 20000 } -- draw a bar
27136 --- { "special", "pdf: 0 g" } -- back to black
27137 --- -- { "pdf", "origin", "0 g" } -- back to black (alternative)
27138 ---}
27139 ---```
27140 ---
27141 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27142 ---@alias FontCharacterCommands any[]
27143
27144 ---
27145 ---Parse a font metrics file, at the size indicated by the number.
27146 ---
27147 ---Load a TFM (`TeX` font metric) file.
27148 ---
27149 ---__Example:__
27150 ---
27151 ---```lua
27152 ---font.read_tfm('cmr10', tex.sp('10pt'))
27153 ---```
27154 ---
27155 ---__Reference:__
27156 ---
27157 ---* Corresponding C source code: [lfontlib.c#L38-L64](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L38-L64)
27158 ---
27159 ---@param name string
27160 ---@param at_size integer # If `at_size` is positive, it specifies an “at size” in scaled points. If `at_size` is negative, its absolute value represents a “scaled” setting relative to the designsize of the font.
27161 ---
27162 ---@return TfmFont
27163 ---
27164 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27165 function font.read_tfm(name, at_size) end
27166
27167 ---
27168 ---Parse a virtual font metrics file, at the size indicated by the number.
27169 ---
27170 ---Load a VF (virtual font) file.
27171 ---
27172 ---__Example:__
27173 ---
27174 ---```lua
27175 ---font.read_vf('ptmr8t', tex.sp('8pt'))
27176 ---```
27177 ---
27178 ---The meaning of the number `at_size` and the format of the returned table are
27179 ---similar to the ones in the `read_tfm` function.
27180 ---
27181 ---__Reference:__
27182 ---
27183 ---* Corresponding C source code: [lfontlib.c#L67-L83](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L67-L83)
27184 ---
27185 ---@param at_size integer # If `s` is positive, it specifies an “at size” in scaled points. If `at_size` is negative, its absolute value represents a “scaled” setting relative to the designsize of the font.
27186 ---
27187 ---@return VfFont
27188 ---
27189 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27190 function font.read_vf(name, at_size) end
27191
27192 ---
27193 ---The whole table of *TeX* fonts is accessible from *Lua* using a virtual array.
27194 ---Because this is a virtual array, you cannot call `pairs` on it
27195 ---
27196 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27197 font.fonts = {}
27198
27199 ---
27200 ---Set an internal font id from a lua table.
27201 ---
27202 ---__Reference:__
27203 ---
27204 ---* Corresponding C source code: [lfontlib.c#L156-L173](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L156-L173)
27205 ---
27206 ---@param font_id integer
27207 ---@param f Font
27208 ---
27209 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27210 function font.setfont(font_id, f) end
27211
27212 ---
27213 ---Fetch an internal font id as a Lua table.
27214 ---
27215 ---Note that at the moment, each access to the `font.fonts` or call to `font.getfont` creates a *Lua* table for the whole font unless you cached it.
27216 ---
27217 ---__Reference:__
27218 ---
27219 ---* Corresponding C source code: [lfontlib.c#L251-L258](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L251-L258)
27220 ---
27221 ---@param font_id integer
27222 ---
27223 ---@return table Font
27224 ---
27225 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27226 function font.getfont(font_id) end
27227
27228 ---
27229 ---Copy the internal data of a font.
27230 ---
27231 ---__Reference:__
27232 ---
27233 ---* Corresponding C source code: [lfontlib.c#L260-L267](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L260-L267)
27234 ---
27235 ---@param font_id integer
27236 ---
27237 ---@return table Font
27238 ---
27239 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27240 function font.getcopy(font_id) end
27241
27242 ---
27243 ---Return a table of the parameters as known to *TeX*. These can be
27244 ---different from the ones in the cached table.
27245 ---
27246 ---__Reference:__
27247 ---
27248 ---* Corresponding C source code: [lfontlib.c#L269-L276](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L269-L276)
27249 ---
27250 ---@param font_id integer
27251 ---
27252 ---@return table p
27253 ---
27254 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27255 function font.getparameters(font_id) end
27256
27257 ---
27258 ---Test for the status of a font.
27259 ---
27260 ---Return true if the font is frozen and can no longer be altered.
27261 ---
27262 ---The return value is one of `true` (unassignable), `false` (can be
27263 ---changed) or `nil` (not a valid font at all).
27264 ---
27265 ---__Reference:__
27266 ---
27267 ---* Corresponding C source code: [lfontlib.c#L135-L153](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L135-L153)
27268 ---
27269 ---@param font_id integer
27270 ---
27271 ---@return boolean|nil
27272 ---
27273 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27274 function font.frozen(font_id) end
27275
27276 ---
27277 ---Define a font into `font.fonts`.
27278 ---
27279 ---__Reference:__
27280 ---
27281 ---* Corresponding C source code: [lfontlib.c#L209-L235](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L209-L235)
27282 ---
27283 ---@param f Font
27284 ---
27285 ---@return integer font_id
27286 ---
27287 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27288 function font.define(f) end
27289
27290 ---
27291 ---An alternative call is:
27292 ---
27293 ---Where the first argument is a reserved font id (see below).
27294 ---
27295 ---@param font_id integer
27296 ---@param f Font
27297 ---
27298 ---@return integer i
27299 ---
27300 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27301 function font.define(font_id, f) end
27302
27303 ---
27304 ---Add characters to a font.
27305 ---
27306 ---The table passed can have the fields `characters` which is a (sub)table
27307 ---like the one used in `font.define()`, and for virtual fonts a `fonts` table can be
27308 ---added. The characters defined in the `characters` table are added (when not
27309 ---yet present) or replace an existing entry. Keep in mind that replacing can have
27310 ---side effects because a character already can have been used. Instead of posing
27311 ---restrictions we expect the user to be careful. (The `setfont` helper is
27312 ---a more drastic replacer.)
27313 ---
27314 ---__Example:__
27315 ---
27316 ---```lua
27317 ---local newcharacters = {}
27318 ---for gid = 0, #glyphs do
27319 --- local glyph = glyphs[gid]
27320 --- if glyph.used then
27321 --- local character = characters[gid + gid_offset]
27322 --- newcharacters[gid + gid_offset] = character
27323 --- local unicode = nominals[gid]
27324 --- if unicode then
27325 --- newcharacters[unicode] = character
27326 --- end
27327 --- character.tounicode = glyph.tounicode or unicode or "FFFD"
27328 --- character.used = true
27329 --- end
27330 ---end
27331 ---font.addcharacters(font_id, { characters = newcharacters })
27332 ---```
27333 ---
27334 ---__Reference:__
27335 ---
27336 ---* Corresponding C source code: [lfontlib.c#L175-L188](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L175-L188)
27337 ---
27338 ---@param font_id integer
27339 ---@param f Font
27340 ---
27341 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27342 function font.addcharacters(font_id, f) end
27343
27344 ---
27345 ---Return the next free font id number.
27346 ---
27347 ---Return the font id number that would be returned by a `font.define`
27348 ---call if it was executed at this spot in the code flow.
27349 ---
27350 ---This is useful for virtual
27351 ---fonts that need to reference themselves. If you pass `true` as argument,
27352 ---the id gets reserved and you can pass to `font.define` as first argument.
27353 ---This can be handy when you create complex virtual fonts.
27354 ---
27355 ---__Reference:__
27356 ---
27357 ---* Corresponding C source code: [lfontlib.c#L240-L249](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L240-L249)
27358 ---
27359 ---@return integer font_id
27360 ---
27361 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27362 function font.nextid() end
27363
27364 ---
27365 ---Return the font id of the font accessed by the csname given.
27366 ---
27367 ---Return the font id associated with `csname`, or `-1` if `csname` is not defined.
27368 ---
27369 ---__Reference:__
27370 ---
27371 ---* Corresponding C source code: [lfontlib.c#L278-L296](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L278-L296)
27372 ---
27373 ---@param csname string
27374 ---
27375 ---@return integer font_id
27376 ---
27377 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27378 function font.id(csname) end
27379
27380 ---
27381 ---Return the highest used font id at this moment.
27382 ---
27383 ---Get the largest used index in `font.fonts`.
27384 ---
27385 ---__Reference:__
27386 ---
27387 ---* Corresponding C source code: [lfontlib.c#L102-L106](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L102-L106)
27388 ---
27389 ---@return integer max_font_id # The largest used index in `font.fonts`.
27390 ---
27391 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27392 function font.max() end
27393
27394 ---
27395 ---Set the currently used / active font number.
27396 ---
27397 ---__Reference:__
27398 ---
27399 ---* Corresponding C source code: [lfontlib.c#L85-L100](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L85-L100)
27400 ---
27401 ---@param font_id integer
27402 ---
27403 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27404 function font.current(font_id) end
27405
27406 ---
27407 ---Get the currently used / active font number.
27408 ---
27409 ---__Reference:__
27410 ---
27411 ---* Corresponding C source code: [lfontlib.c#L85-L100](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L85-L100)
27412 ---
27413 ---@return integer font_id
27414 ---
27415 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27416 function font.current(font_id) end
27417
27418 ---
27419 ---Iterate over all the defined fonts.
27420 ---
27421 ---This is an iterator over each of the defined *TeX* fonts. The first returned
27422 ---value is the index in `font.fonts`, the second the font itself, as a *Lua*
27423 ---table. The indices are listed incrementally, but they do not always form an array
27424 ---of consecutive numbers: in some cases there can be holes in the sequence.
27425 ---
27426 ---__Example:__
27427 ---
27428 ---```lua
27429 ---local inspect = require('inspect')
27430 ---for font_id, font in font.each() do
27431 --- print(font_id, inspect(font))
27432 ---end
27433 ---```
27434 ---
27435 ---__Reference:__
27436 ---
27437 ---* Corresponding C source code: [lfontlib.c#L127-L133](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L127-L133)
27438 ---
27439 ---@return fun(): font_id: integer, font: Font
27440 ---
27441 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27442 function font.each() end
27443
27444 ---
27445 ---Because we store the actual state of expansion with each glyph and don't have
27446 ---special font instances, we can change some font related parameters before lines
27447 ---are constructed, like:
27448 ---
27449 ---```lua
27450 ---font.setexpansion(font.current(),100,100,20)
27451 ---```
27452 ---
27453 ---This is mostly meant for experiments (or an optimizing routing written in *Lua*)
27454 ---so there is no primitive.
27455 ---
27456 ---__Reference:__
27457 ---
27458 ---* Corresponding C source code: [lfontlib.c#L190-L204](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lfontlib.c#L190-L204)
27459 ---
27460 ---@param font_id integer
27461 ---@param stretch integer
27462 ---@param shrink integer
27463 ---@param step integer
27464 ---
27465 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/font.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27466 function font.setexpansion(font_id, stretch, shrink, step) end
27467
27468 ---
27469 ---This library provides two separate, but nearly identical interfaces to the
27470 ---`kpathsea` file search functionality: there is a “normal” procedural
27471 ---interface that shares its kpathsea instance with *LuaTeX* itself, and an object
27472 ---oriented interface that is completely on its own.
27473 ---
27474 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27475 kpse = {}
27476
27477 ---
27478 ---The way the library looks up variables is driven by the `texmf.cmf` file
27479 ---where the currently set program name acts as filter. You can check what file is
27480 ---used by with `default_texmfcnf`.
27481 ---
27482 ---__Reference:__
27483 ---
27484 ---* Corresponding C source code: [lkpselib.c#L317-321](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L317-321)
27485 ---
27486 ---@return string # returns the value of the C preprocessor macro DEFAULT_TEXMFCNF without initializing anything else from kpathsea, for example `{$SELFAUTOLOC,$SELFAUTOLOC/share/texmf-local/web2c,...}`
27487 ---
27488 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27489 function kpse.default_texmfcnf() end
27490
27491 ---
27492 ---Initialize the kpathsea library by setting the program name. The optional string allows explicit `progname` setting.
27493 ---
27494 ---Before the search library can be used at all, its database has to be initialized.
27495 ---There are three possibilities, two of which belong to the procedural interface.
27496 ---
27497 ---First, when *LuaTeX* is used to typeset documents, this initialization happens
27498 ---automatically and the `kpathsea` executable and program names are set to `luatex` (that is, unless explicitly prohibited by the user's startup script.)
27499 ---
27500 ---Second, in *TeX*LUA mode, the initialization has to be done explicitly via the
27501 ---`kpse.set_program_name` function, which sets the `kpathsea` executable
27502 ---(and optionally program) name.
27503 ---
27504 ---The second argument controls the use of the “dotted” values in the `texmf.cnf` configuration file, and defaults to the first argument.
27505 ---
27506 ---Third, if you prefer the object oriented interface, you have to call a different
27507 ---function. It has the same arguments, but it returns a userdata variable.
27508 ---
27509 ---* Corresponding C source code: [lkpselib.c#L832-852](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L832-852)
27510 ---
27511 ---@param name string
27512 ---@param progname? string
27513 ---
27514 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27515 function kpse.set_program_name(name, progname) end
27516
27517 ---
27518 ---Create a new kpathsea library instance.
27519 ---
27520 ---The optional string allows explicit `progname` setting.
27521 ---
27522 ---__Reference:__
27523 ---
27524 ---* Corresponding C source code: [lkpselib.c#L908-L921](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L908-L921)
27525 ---
27526 ---@param name string
27527 ---@param progname? string
27528 ---
27529 ---@return userdata
27530 ---
27531 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27532 function kpse.new(name, progname) end
27533
27534 ---
27535 ---Register used files.
27536 ---
27537 ---Because callbacks can load
27538 ---files themselves you might need these helpers (if you use recording at all).
27539 ---
27540 ---__Reference:__
27541 ---
27542 ---* Corresponding C source code: [lkpselib.c#L923-L930](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L923-L930)
27543 ---
27544 ---@param name string
27545 ---
27546 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27547 function kpse.record_input_file(name) end
27548
27549 ---
27550 ---Register used files.
27551 ---
27552 ---Because callbacks can load
27553 ---files themselves you might need these helpers (if you use recording at all).
27554 ---
27555 ---__Reference:__
27556 ---
27557 ---* Corresponding C source code: [lkpselib.c#L932-L939](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L932-L939)
27558 ---
27559 ---@param name string
27560 ---
27561 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27562 function kpse.record_output_file(name) end
27563
27564 ---
27565 ---__Reference:__
27566 ---
27567 ---* Corresponding C source code: [lkpselib.c#L104-163](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L104-163)
27568 ---
27569 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27570 ---@alias KpseFtype
27571 ---| 'afm'
27572 ---| 'base'
27573 ---| 'bib'
27574 ---| 'bitmap font'
27575 ---| 'bst'
27576 ---| 'cid maps'
27577 ---| 'clua'
27578 ---| 'cmap files'
27579 ---| 'cnf'
27580 ---| 'cweb'
27581 ---| 'dvips config'
27582 ---| 'enc files'
27583 ---| 'fmt'
27584 ---| 'font feature files'
27585 ---| 'gf'
27586 ---| 'graphic/figure'
27587 ---| 'ist'
27588 ---| 'lig files'
27589 ---| 'ls-R'
27590 ---| 'lua'
27591 ---| 'map'
27592 ---| 'mem'
27593 ---| 'MetaPost support'
27594 ---| 'mf'
27595 ---| 'mfpool'
27596 ---| 'mft'
27597 ---| 'misc fonts'
27598 ---| 'mlbib'
27599 ---| 'mlbst'
27600 ---| 'mp'
27601 ---| 'mppool'
27602 ---| 'ocp'
27603 ---| 'ofm'
27604 ---| 'opentype fonts'
27605 ---| 'opl'
27606 ---| 'other binary files'
27607 ---| 'other text files'
27608 ---| 'otp'
27609 ---| 'ovf'
27610 ---| 'ovp'
27611 ---| 'pdftex config'
27612 ---| 'pk'
27613 ---| 'PostScript header'
27614 ---| 'subfont definition files'
27615 ---| 'tex'
27616 ---| 'TeX system documentation'
27617 ---| 'TeX system sources'
27618 ---| 'texmfscripts'
27619 ---| 'texpool'
27620 ---| 'tfm'
27621 ---| 'Troff fonts'
27622 ---| 'truetype fonts'
27623 ---| 'type1 fonts'
27624 ---| 'type42 fonts'
27625 ---| 'vf'
27626 ---| 'web'
27627 ---| 'web2c files'
27628
27629 ---
27630 ---Find a file.
27631 ---
27632 ---The optional string is the file type as supported by the standalone `kpsewhich` program (default is ``tex`, no autodiscovery takes place). The optional boolean indicates wether the file must exist. The optional number is the dpi value for PK files.
27633 ---
27634 ---The most often used function in the library is `find_file`:
27635 ---
27636 ---If `--output-directory` is specified and the value is a relative pathname,
27637 ---the file is searched first here and if it fails it will be searched in the standard tree.
27638 ---
27639 ---__References:__
27640 ---
27641 ---* Corresponding C source code: [lkpselib.c#L254-315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01yd53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L254-315)
27642 ---
27643 ---@param filename string # the name of the file you want to find, with or without extension.
27644 ---
27645 ---@return string
27646 ---
27647 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27648 function kpse.find_file(filename) end
27649
27650 ---
27651 ---Find a file.
27652 ---
27653 ---The optional string is the file type as supported by the standalone `kpsewhich` program (default is ``tex`, no autodiscovery takes place). The optional boolean indicates wether the file must exist. The optional number is the dpi value for PK files.
27654 ---
27655 ---The most often used function in the library is `find_file`:
27656 ---
27657 ---If `--output-directory` is specified and the value is a relative pathname,
27658 ---the file is searched first here and if it fails it will be searched in the standard tree.
27659 ---
27660 ---__References:__
27661 ---
27662 ---* Corresponding C source code: [lkpselib.c#L254-315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01yd53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L254-315)
27663 ---
27664 ---@param filename string # the name of the file you want to find, with or without extension.
27665 ---@param ftype KpseFtype # maps to the `-format` argument of `kpsewhich`. The supported `ftype` values are the same as the ones supported by the standalone `kpsewhich` program. The default type is `tex`. Note: this is different from `kpsewhich`, which tries to deduce the file type itself from looking at the supplied extension.
27666 ---
27667 ---@return string
27668 ---
27669 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27670 function kpse.find_file(filename, ftype) end
27671
27672 ---
27673 ---Find a file.
27674 ---
27675 ---The optional string is the file type as supported by the standalone `kpsewhich` program (default is ``tex`, no autodiscovery takes place). The optional boolean indicates wether the file must exist. The optional number is the dpi value for PK files.
27676 ---
27677 ---The most often used function in the library is `find_file`:
27678 ---
27679 ---If `--output-directory` is specified and the value is a relative pathname,
27680 ---the file is searched first here and if it fails it will be searched in the standard tree.
27681 ---
27682 ---__References:__
27683 ---
27684 ---* Corresponding C source code: [lkpselib.c#L254-315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01yd53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L254-315)
27685 ---
27686 ---@param filename string # the name of the file you want to find, with or without extension.
27687 ---@param ftype KpseFtype # maps to the `-format` argument of `kpsewhich`. The supported `ftype` values are the same as the ones supported by the standalone `kpsewhich` program. The default type is `tex`. Note: this is different from `kpsewhich`, which tries to deduce the file type itself from looking at the supplied extension.
27688 ---@param mustexist boolean # is similar to `kpsewhich`'s `-must-exist`, and the default is `false`. If you specify `true` (or a non-zero integer), then the kpse library will search the disk as well as the `ls-R` databases.
27689 ---
27690 ---@return string
27691 ---
27692 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27693 function kpse.find_file(filename, ftype, mustexist) end
27694
27695 ---
27696 ---Find a file.
27697 ---
27698 ---The optional string is the file type as supported by the standalone `kpsewhich` program (default is ``tex`, no autodiscovery takes place). The optional boolean indicates wether the file must exist. The optional number is the dpi value for PK files.
27699 ---
27700 ---The most often used function in the library is `find_file`:
27701 ---
27702 ---If `--output-directory` is specified and the value is a relative pathname,
27703 ---the file is searched first here and if it fails it will be searched in the standard tree.
27704 ---
27705 ---__References:__
27706 ---
27707 ---* Corresponding C source code: [lkpselib.c#L254-315](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01yd53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L254-315)
27708 ---
27709 ---@param filename string # the name of the file you want to find, with or without extension.
27710 ---@param ftype KpseFtype # maps to the `-format` argument of `kpsewhich`. The supported `ftype` values are the same as the ones supported by the standalone `kpsewhich` program. The default type is `tex`. Note: this is different from `kpsewhich`, which tries to deduce the file type itself from looking at the supplied extension.
27711 ---@param dpi number # This is used for the size argument of the formats `pk`, `gf`, and `bitmap font`.
27712 ---
27713 ---@return string
27714 ---
27715 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27716 function kpse.find_file(filename, ftype, dpi) end
27717
27718 ---
27719 ---The options correspond to the command line arguments of `kpsewhich`:
27720 ---
27721 ---__References:__
27722 ---
27723 ---* Corresponding C source code: [lkpselib.c#L565-810](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L565-810)
27724 ---
27725 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27726 ---@class KpseLookupOptions
27727 ---@field debug number # set debugging flags for this lookup \NR
27728 ---@field format string # use specific file type (see list above)
27729 ---@field dpi number # use this resolution for this lookup; default 600
27730 ---@field path string # search in the given path
27731 ---@field all boolean # output all matches, not just the first
27732 ---@field mustexist boolean # search the disk as well as ls-R if necessary
27733 ---@field mktexpk boolean # disable/enable mktexpk generation for this lookup
27734 ---@field mktextex boolean # disable/enable mktextex generation for this lookup
27735 ---@field mktexmf boolean # disable/enable mktexmf generation for this lookup
27736 ---@field mktextfm boolean # disable/enable mktextfm generation for this lookup
27737 ---@field subdir string|table # only output matches whose directory part ends with the given string(s)
27738
27739 ---
27740 ---Find a file (extended interface).
27741 ---
27742 ---A more powerful (but slower) generic method for finding files is also available.
27743 ---It returns a string for each found file.
27744 ---
27745 ---If `--output-directory` is specified and the value is a relative pathname,
27746 ---the file is searched first here and then in the standard tree.
27747 ---
27748 ---__References:__
27749 ---
27750 ---* Corresponding C source code: [lkpselib.c#L813-818](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L813-818)
27751 ---
27752 ---@param filename string # the name of the file you want to find, with or without extension.
27753 ---@param options KpseLookupOptions
27754 ---
27755 ---@return string
27756 ---
27757 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27758 function kpse.lookup(filename, options) end
27759
27760 ---
27761 ---Initialize a PK generation program. The optional string is the metafont mode fallback name.
27762 ---
27763 ---Extra initialization for programs that need to generate bitmap fonts.
27764 ---
27765 ---__References:__
27766 ---
27767 ---* Corresponding C source code: [lkpselib.c#L865-874](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L865-874)
27768 ---
27769 ---@param prefix string
27770 ---@param base_dpi number
27771 ---@param mfmode string
27772 ---@param fallback string
27773 ---
27774 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27775 function kpse.init_prog(prefix, base_dpi, mfmode, fallback) end
27776
27777 ---
27778 ---Returns true if a file exists and is readable.
27779 ---
27780 ---Test if an (absolute) file name is a readable file.
27781 ---
27782 ---__References:__
27783 ---
27784 ---* Corresponding C source code: [lkpselib.c#L891-898](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L891-898)
27785 ---
27786 ---@param name string
27787 ---
27788 ---@return string|nil f The return value is the actual absolute filename you should use, because the disk name is not always the same as the requested name, due to aliases and system-specific handling under e.g. MS Dos Returns `nil` if the file does not exist or is not readable.
27789 ---
27790 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27791 function kpse.readable_file(name) end
27792
27793 ---
27794 ---Expand a path.
27795 ---
27796 ---Output the complete expansion of string, with each element separated by the usual path separator on the current system (`;` on Windows, `:` otherwise). This may be useful to construct a custom search path for a format not otherwise supported.
27797 ---Like `kpsewhich`’s `-expand-path`.
27798 ---
27799 ---__References:__
27800 ---
27801 ---* [kpathsea manual](https://www.tug.org/texinfohtml/kpathsea.html#index-_002d_002dexpand_002dpath_003dstring)
27802 ---* Corresponding C source code: [lkpselib.c#L353-359](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L353-359)
27803 ---
27804 ---@param s string
27805 ---
27806 ---@return string r
27807 ---
27808 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27809 function kpse.expand_path(s) end
27810
27811 ---
27812 ---Expand a variable.
27813 ---
27814 ---Output the variable and tilde expansion of string. For example, with the usual texmf.cnf, `kpse.expand_var('$TEXMF')` returns the TeX system hierarchy root(s). The specified string can contain anything, though, not just variable references. This calls kpse_var_expand (see Programming with config files).
27815 ---Like `kpsewhich`’s `-expand-var`:
27816 ---
27817 ---__References:__
27818 ---
27819 ---* [kpathsea manual](https://www.tug.org/texinfohtml/kpathsea.html#index-_002d_002dexpand_002dvar_003dstring)
27820 ---* Corresponding C source code: [lkpselib.c#L386-392](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L386-392)
27821 ---
27822 ---@param s string
27823 ---
27824 ---@return string r
27825 ---
27826 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27827 function kpse.expand_var(s) end
27828
27829 ---
27830 ---Expand the braces in a variable.
27831 ---
27832 ---Output variable, tilde, and brace expansion of string, which is assumed to be a single path element. Like `kpsewhich`’s `-expand-braces`
27833 ---
27834 ---__References:__
27835 ---
27836 ---* [kpathsea manual](https://www.tug.org/texinfohtml/kpathsea.html#index-_002d_002dexpand_002dbraces_003dstring)
27837 ---* Corresponding C source code: [lkpselib.c#L369-375](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L369-375)
27838 ---
27839 ---@param s string
27840 ---
27841 ---@return string r
27842 ---
27843 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27844 function kpse.expand_braces(s) end
27845
27846 ---
27847 ---List the search path for a specific file type.
27848 ---
27849 ---Show the path that would be used for file lookups of file type name. Either a filename extension (`pk`, `.vf`, etc.) or an integer can be used, just as with `--format`, described in the previous section.
27850 ---
27851 ---Like `kpsewhich`’s `-show-path`
27852 ---
27853 ---__References:__
27854 ---
27855 ---* [kpathsea manual](https://www.tug.org/texinfohtml/kpathsea.html#index-_002d_002dshow_002dpath_003dname)
27856 ---* Corresponding C source code: [lkpselib.c#L334-343](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L334-343)
27857 ---
27858 ---@param file_type string
27859 ---
27860 ---@return string search_path
27861 ---
27862 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27863 function kpse.show_path(file_type) end
27864
27865 ---
27866 ---Return the value of a variable.
27867 ---
27868 ---Outputs the value of variable (a simple identifier like `TEXMFDIST`, with no `$` or other constructs), expanding `$` (see Variable expansion) and `~` (see Tilde expansion) constructs in the value. ‘~` expansion happens at the beginning of the overall value and at the beginning of a variable expansion, but not arbitrarily within the string. Braces are not expanded.
27869 ---
27870 ---Like `kpsewhich’`s `-var-value`
27871 ---
27872 ---__References:__
27873 ---
27874 ---* [kpathsea manual](https://www.tug.org/texinfohtml/kpathsea.html#index-_002d_002dvar_002dvalue_003dvariable)
27875 ---* Corresponding C source code: [lkpselib.c#L395-L401](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L395-L401)
27876 ---
27877 ---@param variable string
27878 ---
27879 ---@return string value
27880 ---
27881 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27882 function kpse.var_value(variable) end
27883
27884 ---
27885 ---Return the kpathsea version string.
27886 ---
27887 ---__Reference:__
27888 ---
27889 ---* Corresponding C source code: [lkpselib.c#L876-L880](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L876-L880)
27890 ---
27891 ---@return string version # For example `kpathsea version 6.3.4`
27892 ---
27893 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27894 function kpse.version() end
27895
27896 ---
27897 ---```lua
27898 ---local okay, found = kpse.check_permission(name)
27899 ---if okay and found then
27900 --- return io.popen(found,...)
27901 ---end
27902 ---```
27903 ---
27904 ---__Reference:__
27905 ---
27906 ---* Corresponding C source code: [lkpselib.c#L943-L980](https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/source/texk/web2c/luatexdir/lua/lkpselib.c#L943-L980)
27907 ---
27908 ---@param name string
27909 ---
27910 ---@return boolean okay
27911 ---@return string found
27912 ---
27913 ---😱 [Types](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/blob/main/library/luatex/kpse.lua) incomplete or incorrect? 🙏 [Please contribute!](https://github.com/Josef-Friedrich/LuaTeX_Lua-API/pulls)
27914 function kpse.check_permission(name) end