beta-0.89.2
[luatex.git] / manual / old / functionref.tex
blob2243d51bc4ad45e23bbd04dd2d44c49af90f12e3
1 % $Id$
2 \pdfcompresslevel=0
3 \pdfobjcompresslevel=0
5 \nonknuthmode
6 \catcode`\|=12
8 \setuplayout[backspace=1cm,edge=0pt,topspace=1cm,
9 margin=0pt,location=middle,height=fit,footer=0pt,width=middle,
10 header=24pt]
12 \setuptabulate[before=]
13 \setuppagenumbering[location=,alternative=doublesided]
14 \setupheadertexts[Luatex 0.66 short reference][pagenumber]
15 \setupheader[style=\ssbf]
17 \setupalign[flushleft]
19 \setuphead[section][number=no,style=\ssbfb,after=,before=\blank]
20 \setuphead[subsection][number=no,after=,style=\ssbf]
22 \switchtobodyfont[times,9pt]
23 \usemodule[abr-01]
24 \def\DPI{DPI}
26 \setuptype[style=\ss]
27 \setuptyping[style=\ss]
29 \def\afunction#1{{\ss\bf #1}}
30 \def\aliteral#1{{\ss "#1"}}
32 \def\showitemnoret#1#2#3#4#5#6%
33 {\hangafter=1\hangindent=12pt
34 \noindent {\ss \afunction{#1#6#2}#3}%
35 \hskip 12pt plus .5\hsize\penalty0 \hskip 0pt plus -.5\hsize
36 #5\par}
38 \def\showitemret#1#2#3#4#5#6%
39 {\hangafter=1\hangindent=12pt
40 \noindent {\ss #4 = \afunction{#1#6#2}#3}%
41 \hskip 12pt plus .5\hsize\penalty0\hskip 0pt plus -.5\hsize
42 #5\par}
44 \def\luafunction#1#2#3#4#5%
45 {\doifemptyelse{#4}
46 {\showitemnoret{#1}{#2}{#3}{#4}{#5}{.}}
47 {\showitemret{#1}{#2}{#3}{#4}{#5}{.}}\par}
49 \def\luamethod#1#2#3#4#5%
50 {\doifemptyelse{#4}
51 {\showitemnoret{#1}{#2}{#3}{#4}{#5}{:}}
52 {\showitemret{#1}{#2}{#3}{#4}{#5}{:}}\par}
54 \def\luacallback#1#2#3#4#5%
55 {\doifemptyelse{#4}
56 {\showitemnoret{}{#2}{#3}{#4}{#5}{}}
57 {\showitemret{}{#2}{#3}{#4}{#5}{}}\par}
59 \startluacode
60 local fdata = dofile('fdata.lua')
61 function showfunction (t,o,f)
62 local val
63 local method
64 if o == nil then
65 val = fdata[t]["functions"][f]
66 method = false
67 else
68 val = fdata[t]["methods"][o][f]
69 method = true
70 end
71 local r = {}
72 local a = {}
73 if #val.returnvalues > 0 then
74 for i,v in ipairs (val.returnvalues) do
75 if v.optional then
76 r[#r+1] = '[' .. v.type .. ']'
77 else
78 r[#r+1] = v.type
79 end
80 end
81 end
82 if #val.arguments > 0 then
83 for i,v in ipairs (val.arguments) do
84 if (method == false) or (i > 1) then
85 if v.optional then
86 a[#a+1] = '[' .. v.type .. ']'
87 else
88 a[#a+1] = v.type
89 end
90 end
91 end
92 end
93 if method == false then
94 tex.sprint(string.format('\\lua%s{%s}{%s}{(%s)}{%s}{%s}', val.type, t, f,
95 table.concat(a,', '),table.concat(r,', '), val.shortdesc))
96 else
97 tex.sprint(string.format('\\lua%s{%s}{%s}{(%s)}{%s}{%s}', "method", o, f,
98 table.concat(a,', '),table.concat(r,', '), val.shortdesc))
99 end
102 \stopluacode
104 \def\presentfunction#1#2{\directlua{showfunction("#1",nil,"#2")}}
105 \def\presentmethod#1#2#3{\directlua{showfunction("#1","#2","#3")}}
107 \starttext
110 \startcolumns
112 \section{Getting started}
114 \type{luatex} is a typesetter; \type{texlua} and \type{luatex --luaonly} are lua interpreters.
115 In lua interpreter mode, the lua tables \type{tex}, \type{token}, \type{node}, and \type{pdf}
116 are unavailable.
118 \blank
120 \tex{directlua}\type{} expands immediately, \tex{latelua}\type{}
121 is processed during \tex{shipout}.
123 \blank
125 \starttabulate[|l|p|]
126 \NC \tex{luatexversion}: \NC {\bf\the\luatexversion} \NC\NR
127 \NC \tex{luatexrevision}: \NC {\bf\luatexrevision} \NC\NR
128 \NC \tex{luatexdatestamp}: \NC {\bf\luatexdatestamp} \NC\NR
129 \stoptabulate
131 \subsection{Attributes}
133 There are 65536 attribute registers, each of which obeys grouping
134 and can have any integer value other than the most negative number
135 (which indicates the value is unset).
137 \subsection{Catcode tables}
139 There are 65536 category code tables, each of which can hold the full range
140 of Unicode. Category table manipulation:
142 \starttabulate[|l|p|]
143 \NC \tex{initcatcodetable} $N$ \NC initialize an \quote{initex} table in $N$ \NC\NR
144 \NC \tex{savecatcodetable} $N$\NC save the current category codes to table $N$ globally\NC\NR
145 \NC \tex{catcodetable} $N$ \NC switch to predefined table $N$\NC\NR
146 \stoptabulate
148 \subsection{Filenames}
150 \tex{input}, \tex{openin}, and \tex{font} accept braced file names to allow embedded spaces.
152 \subsection{Images and forms}
154 \type{\pdfrefximage} and \type{\pdfrefxform} accept optional dimension parameters
155 in the same format as \type{\pdfximage}.
157 \section{Preloaded lua modules}
159 \starttabulate[|l|l|]
160 \NC\type{slnunicode}\NC\hyphenatedurl{http://luaforge.net/projects/sln}\NC\NR
161 \NC\type{luazip} \NC\hyphenatedurl{http://www.keplerproject.org/luazip/}\NC\NR
162 \NC\type{luafilesystem} \NC\hyphenatedurl{http://www.keplerproject.org/luafilesystem/}\NC\NR
163 \NC\type{lpeg} \NC\hyphenatedurl{http://www.inf.puc-rio.br/~roberto/lpeg.html}\NC\NR
164 \NC\type{lzlib} \NC\hyphenatedurl{http://luaforge.net/projects/lzlib/}\NC\NR
165 \NC\type{md5} \NC\hyphenatedurl{http://www.inf.puc-rio.br/~roberto/md5/md5-5/md5.html}\NC\NR
166 \NC\type{luasocket} \NC \kern -12pt\hyphenatedurl{http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/}\NC\NR
167 \stoptabulate
169 \section{String extensions}
171 \presentfunction{string}{explode}
172 \presentfunction{string}{utfvalues}
173 \presentfunction{string}{utfcharacters}
174 \presentfunction{string}{characters}
175 \presentfunction{string}{characterpairs}
176 \presentfunction{string}{bytes}
177 \presentfunction{string}{bytepairs}
179 \section{Operating system extensions}
181 \presentfunction{os}{exec}
182 \presentfunction{os}{spawn}
183 \presentfunction{os}{setenv}
184 \presentfunction{os}{gettimeofday}
185 \presentfunction{os}{times}
186 \presentfunction{os}{tmpdir}
187 \presentfunction{os}{uname}
188 \presentfunction{os}{selfdir}
190 \section{Lua file system extensions}
192 \presentfunction{lfs}{isdir}
193 \presentfunction{lfs}{isfile}
194 \presentfunction{lfs}{shortname}
195 \presentfunction{lfs}{readlink}
197 \section{Callback table}
198 \presentfunction{callback}{register}
199 \presentfunction{callback}{list}
200 \presentfunction{callback}{find}
202 \subsection{File discovery callbacks}
204 \presentfunction{callback}{find_read_file}
205 \presentfunction{callback}{find_write_file}
206 \presentfunction{callback}{find_font_file}
207 \presentfunction{callback}{find_output_file}
208 \presentfunction{callback}{find_format_file}
209 \presentfunction{callback}{find_vf_file}
210 \presentfunction{callback}{find_map_file}
211 \presentfunction{callback}{find_enc_file}
212 \presentfunction{callback}{find_subfont_file}
213 \presentfunction{callback}{find_pk_file}
214 \presentfunction{callback}{find_data_file}
215 \presentfunction{callback}{find_opentype_file}
216 \presentfunction{callback}{find_truetype_file}
217 \presentfunction{callback}{find_type1_file}
218 \presentfunction{callback}{find_image_file}
220 \subsection{File reading callbacks}
222 \presentfunction{callback}{open_read_file}
223 \presentfunction{callback}{reader}
224 \presentfunction{callback}{close}
226 \blank
228 \presentfunction{callback}{read_font_file}
229 \presentfunction{callback}{read_vf_file}
230 \presentfunction{callback}{read_map_file}
231 \presentfunction{callback}{read_enc_file}
232 \presentfunction{callback}{read_sfd_file}
233 \presentfunction{callback}{read_pk_file}
234 \presentfunction{callback}{read_data_file}
235 \presentfunction{callback}{read_truetype_file}
236 \presentfunction{callback}{read_type1_file}
237 \presentfunction{callback}{read_opentype_file}
239 \subsection{Tokenisation changes callbacks}
241 \presentfunction{callback}{process_input_buffer}
242 \presentfunction{callback}{process_output_buffer}
243 \presentfunction{callback}{token_filter}
245 \subsection{Node list callbacks}
247 \presentfunction{callback}{buildpage_filter}
249 \afunction{buildpage_filter} context information:
250 \starttabulate[|lf\ss|p|]
251 \NC \ssbf value \NC \bf explanation \NC\NR
252 \NC alignment \NC a (partial) alignment is being added \NC\NR
253 \NC after_output \NC an output routine has just finished \NC\NR
254 \NC box \NC a typeset box is being added \NC\NR
255 \NC new_graf \NC the beginning of a new paragraph \NC\NR
256 \NC vmode_par \NC \tex{par} was found in vertical mode \NC\NR
257 \NC hmode_par \NC \tex{par} was found in horizontal mode \NC\NR
258 \NC insert \NC an insert is added \NC\NR
259 \NC penalty \NC a penalty (in vertical mode) \NC\NR
260 \NC before_display \NC immediately before a display starts \NC\NR
261 \NC after_display \NC a display is finished \NC\NR
262 \NC end \NC \LUATEX\ is terminating (it's all over)\NC\NR
263 \stoptabulate
265 \presentfunction{callback}{pre_linebreak_filter}
267 \afunction{pre_linebreak_filter} context information:
268 \starttabulate[|lf\ss|p|]
269 \NC \ssbf value \NC \bf explanation \NC\NR
270 \NC <empty> \NC main vertical list \NC\NR
271 \NC hbox \NC \tex{hbox} in horizontal mode \NC\NR
272 \NC adjusted_hbox\NC \tex{hbox} in vertical mode \NC\NR
273 \NC vbox \NC \tex{vbox} \NC\NR
274 \NC vtop \NC \tex{vtop} \NC\NR
275 \NC align \NC \tex{halign} or \tex{valign} \NC\NR
276 \NC disc \NC discretionaries \NC\NR
277 \NC insert \NC packaging an insert \NC\NR
278 \NC vcenter \NC \tex{vcenter} \NC\NR
279 \NC local_box \NC \tex{localleftbox} or \tex{localrightbox} \NC\NR
280 \NC split_off \NC top of a \tex{vsplit} \NC\NR
281 \NC split_keep \NC remainder of a \tex{vsplit} \NC\NR
282 \NC align_set \NC alignment cell \NC\NR
283 \NC fin_row \NC alignment row \NC\NR
284 \stoptabulate
286 \presentfunction{callback}{linebreak_filter}
287 \presentfunction{callback}{post_linebreak_filter}
288 \presentfunction{callback}{hpack_filter}
289 \presentfunction{callback}{vpack_filter}
290 \presentfunction{callback}{pre_output_filter}
291 \presentfunction{callback}{hyphenate}
292 \presentfunction{callback}{ligaturing}
293 \presentfunction{callback}{kerning}
294 \presentfunction{callback}{mlist_to_hlist}
296 \subsection{Font definition callback}
297 \presentfunction{callback}{define_font}
299 \subsection{Event callbacks}
301 \presentfunction{callback}{pre_dump}
302 \presentfunction{callback}{stop_run}
303 \presentfunction{callback}{start_run}
304 \presentfunction{callback}{start_page_number}
305 \presentfunction{callback}{stop_page_number}
306 \presentfunction{callback}{show_error_hook}
307 \presentfunction{callback}{finish_pdffile}
308 \presentfunction{callback}{finish_pdfpage}
310 %***********************************************************************
312 \section{Epdf table}
314 --- All constructors:
316 \presentfunction{epdf}{open}
317 \presentfunction{epdf}{Annot}
318 \presentfunction{epdf}{Annots}
319 \presentfunction{epdf}{Array}
320 \presentfunction{epdf}{Dict}
321 \presentfunction{epdf}{Object}
322 \presentfunction{epdf}{PDFRectangle}
324 --- Annot methods:
326 \presentmethod{epdf}{Annot}{isOK}
327 \presentmethod{epdf}{Annot}{getAppearance}
328 \presentmethod{epdf}{Annot}{getBorder}
329 \presentmethod{epdf}{Annot}{match}
331 --- AnnotBorderStyle methods:
333 \presentmethod{epdf}{AnnotBorderStyle}{getWidth}
335 --- Annots methods:
337 \presentmethod{epdf}{Annots}{getNumAnnots}
338 \presentmethod{epdf}{Annots}{getAnnot}
340 --- Array methods:
342 \presentmethod{epdf}{Array}{incRef}
343 \presentmethod{epdf}{Array}{decRef}
344 \presentmethod{epdf}{Array}{getLength}
345 \presentmethod{epdf}{Array}{add}
346 \presentmethod{epdf}{Array}{get}
347 \presentmethod{epdf}{Array}{getNF}
348 \presentmethod{epdf}{Array}{getString}
350 --- Catalog methods:
352 \presentmethod{epdf}{Catalog}{isOK}
353 \presentmethod{epdf}{Catalog}{getNumPages}
354 \presentmethod{epdf}{Catalog}{getPage}
355 \presentmethod{epdf}{Catalog}{getPageRef}
356 \presentmethod{epdf}{Catalog}{getBaseURI}
357 \presentmethod{epdf}{Catalog}{readMetadata}
358 \presentmethod{epdf}{Catalog}{getStructTreeRoot}
359 \presentmethod{epdf}{Catalog}{findPage}
360 \presentmethod{epdf}{Catalog}{findDest}
361 \presentmethod{epdf}{Catalog}{getDests}
362 \presentmethod{epdf}{Catalog}{numEmbeddedFiles}
363 \presentmethod{epdf}{Catalog}{embeddedFile}
364 \presentmethod{epdf}{Catalog}{numJS}
365 \presentmethod{epdf}{Catalog}{getJS}
366 \presentmethod{epdf}{Catalog}{getOutline}
367 \presentmethod{epdf}{Catalog}{getAcroForm}
369 --- EmbFile methods:
371 \presentmethod{epdf}{EmbFile}{name}
372 \presentmethod{epdf}{EmbFile}{description}
373 \presentmethod{epdf}{EmbFile}{size}
374 \presentmethod{epdf}{EmbFile}{modDate}
375 \presentmethod{epdf}{EmbFile}{createDate}
376 \presentmethod{epdf}{EmbFile}{checksum}
377 \presentmethod{epdf}{EmbFile}{mimeType}
378 \presentmethod{epdf}{EmbFile}{streamObject}
379 \presentmethod{epdf}{EmbFile}{isOk}
381 --- Dict methods:
383 \presentmethod{epdf}{Dict}{incRef}
384 \presentmethod{epdf}{Dict}{decRef}
385 \presentmethod{epdf}{Dict}{getLength}
386 \presentmethod{epdf}{Dict}{add}
387 \presentmethod{epdf}{Dict}{set}
388 \presentmethod{epdf}{Dict}{remove}
389 \presentmethod{epdf}{Dict}{is}
390 \presentmethod{epdf}{Dict}{lookup}
391 \presentmethod{epdf}{Dict}{lookupNF}
392 \presentmethod{epdf}{Dict}{lookupInt}
393 \presentmethod{epdf}{Dict}{getKey}
394 \presentmethod{epdf}{Dict}{getVal}
395 \presentmethod{epdf}{Dict}{getValNF}
397 --- Link methods:
399 \presentmethod{epdf}{Link}{isOK}
400 \presentmethod{epdf}{Link}{inRect}
402 --- LinkDest methods:
404 \presentmethod{epdf}{LinkDest}{isOK}
405 \presentmethod{epdf}{LinkDest}{getKind}
406 \presentmethod{epdf}{LinkDest}{getKindName}
407 \presentmethod{epdf}{LinkDest}{isPageRef}
408 \presentmethod{epdf}{LinkDest}{getPageNum}
409 \presentmethod{epdf}{LinkDest}{getPageRef}
410 \presentmethod{epdf}{LinkDest}{getLeft}
411 \presentmethod{epdf}{LinkDest}{getBottom}
412 \presentmethod{epdf}{LinkDest}{getRight}
413 \presentmethod{epdf}{LinkDest}{getTop}
414 \presentmethod{epdf}{LinkDest}{getZoom}
415 \presentmethod{epdf}{LinkDest}{getChangeLeft}
416 \presentmethod{epdf}{LinkDest}{getChangeTop}
417 \presentmethod{epdf}{LinkDest}{getChangeZoom}
419 --- Links methods:
421 \presentmethod{epdf}{Links}{getNumLinks}
422 \presentmethod{epdf}{Links}{getLink}
424 --- Object methods:
426 \presentmethod{epdf}{Object}{initBool}
427 \presentmethod{epdf}{Object}{initInt}
428 \presentmethod{epdf}{Object}{initReal}
429 \presentmethod{epdf}{Object}{initString}
430 \presentmethod{epdf}{Object}{initName}
431 \presentmethod{epdf}{Object}{initNull}
432 \presentmethod{epdf}{Object}{initArray}
433 \presentmethod{epdf}{Object}{initDict}
434 \presentmethod{epdf}{Object}{initStream}
435 \presentmethod{epdf}{Object}{initRef}
436 \presentmethod{epdf}{Object}{initCmd}
437 \presentmethod{epdf}{Object}{initError}
438 \presentmethod{epdf}{Object}{initEOF}
439 \presentmethod{epdf}{Object}{fetch}
440 \presentmethod{epdf}{Object}{getType}
441 \presentmethod{epdf}{Object}{getTypeName}
442 \presentmethod{epdf}{Object}{isBool}
443 \presentmethod{epdf}{Object}{isInt}
444 \presentmethod{epdf}{Object}{isReal}
445 \presentmethod{epdf}{Object}{isNum}
446 \presentmethod{epdf}{Object}{isString}
447 \presentmethod{epdf}{Object}{isName}
448 \presentmethod{epdf}{Object}{isNull}
449 \presentmethod{epdf}{Object}{isArray}
450 \presentmethod{epdf}{Object}{isDict}
451 \presentmethod{epdf}{Object}{isStream}
452 \presentmethod{epdf}{Object}{isRef}
453 \presentmethod{epdf}{Object}{isCmd}
454 \presentmethod{epdf}{Object}{isError}
455 \presentmethod{epdf}{Object}{isEOF}
456 \presentmethod{epdf}{Object}{isNone}
457 \presentmethod{epdf}{Object}{getBool}
458 \presentmethod{epdf}{Object}{getInt}
459 \presentmethod{epdf}{Object}{getReal}
460 \presentmethod{epdf}{Object}{getNum}
461 \presentmethod{epdf}{Object}{getString}
462 \presentmethod{epdf}{Object}{getName}
463 \presentmethod{epdf}{Object}{getArray}
464 \presentmethod{epdf}{Object}{getDict}
465 \presentmethod{epdf}{Object}{getStream}
466 \presentmethod{epdf}{Object}{getRef}
467 \presentmethod{epdf}{Object}{getRefNum}
468 \presentmethod{epdf}{Object}{getRefGen}
469 \presentmethod{epdf}{Object}{getCmd}
470 \presentmethod{epdf}{Object}{arrayGetLength}
471 \presentmethod{epdf}{Object}{arrayAdd}
472 \presentmethod{epdf}{Object}{arrayGet}
473 \presentmethod{epdf}{Object}{arrayGetNF}
474 \presentmethod{epdf}{Object}{dictGetLength}
475 \presentmethod{epdf}{Object}{dictAdd}
476 \presentmethod{epdf}{Object}{dictSet}
477 \presentmethod{epdf}{Object}{dictLookup}
478 \presentmethod{epdf}{Object}{dictLookupNF}
479 \presentmethod{epdf}{Object}{dictGetKey}
480 \presentmethod{epdf}{Object}{dictGetVal}
481 \presentmethod{epdf}{Object}{dictGetValNF}
482 \presentmethod{epdf}{Object}{streamIs}
483 \presentmethod{epdf}{Object}{streamReset}
484 \presentmethod{epdf}{Object}{streamGetChar}
485 \presentmethod{epdf}{Object}{streamLookChar}
486 \presentmethod{epdf}{Object}{streamGetPos}
487 \presentmethod{epdf}{Object}{streamSetPos}
488 \presentmethod{epdf}{Object}{streamGetDict}
490 --- Page methods:
492 \presentmethod{epdf}{Page}{isOK}
493 \presentmethod{epdf}{Page}{getNum}
494 \presentmethod{epdf}{Page}{getMediaBox}
495 \presentmethod{epdf}{Page}{getCropBox}
496 \presentmethod{epdf}{Page}{isCropped}
497 \presentmethod{epdf}{Page}{getMediaWidth}
498 \presentmethod{epdf}{Page}{getMediaHeight}
499 \presentmethod{epdf}{Page}{getCropWidth}
500 \presentmethod{epdf}{Page}{getCropHeight}
501 \presentmethod{epdf}{Page}{getBleedBox}
502 \presentmethod{epdf}{Page}{getTrimBox}
503 \presentmethod{epdf}{Page}{getArtBox}
504 \presentmethod{epdf}{Page}{getRotate}
505 \presentmethod{epdf}{Page}{getLastModified}
506 \presentmethod{epdf}{Page}{getBoxColorInfo}
507 \presentmethod{epdf}{Page}{getGroup}
508 \presentmethod{epdf}{Page}{getMetadata}
509 \presentmethod{epdf}{Page}{getPieceInfo}
510 \presentmethod{epdf}{Page}{getSeparationInfo}
511 \presentmethod{epdf}{Page}{getResourceDict}
512 \presentmethod{epdf}{Page}{getAnnots}
513 \presentmethod{epdf}{Page}{getLinks}
514 \presentmethod{epdf}{Page}{getContents}
516 --- PDFDoc methods:
518 \presentmethod{epdf}{PDFDoc}{isOK}
519 \presentmethod{epdf}{PDFDoc}{getErrorCode}
520 \presentmethod{epdf}{PDFDoc}{getErrorCodeName}
521 \presentmethod{epdf}{PDFDoc}{getFileName}
522 \presentmethod{epdf}{PDFDoc}{getXRef}
523 \presentmethod{epdf}{PDFDoc}{getCatalog}
524 \presentmethod{epdf}{PDFDoc}{getPageMediaWidth}
525 \presentmethod{epdf}{PDFDoc}{getPageMediaHeight}
526 \presentmethod{epdf}{PDFDoc}{getPageCropWidth}
527 \presentmethod{epdf}{PDFDoc}{getPageCropHeight}
528 \presentmethod{epdf}{PDFDoc}{getNumPages}
529 \presentmethod{epdf}{PDFDoc}{readMetadata}
530 \presentmethod{epdf}{PDFDoc}{getStructTreeRoot}
531 \presentmethod{epdf}{PDFDoc}{findPage}
532 \presentmethod{epdf}{PDFDoc}{getLinks}
533 \presentmethod{epdf}{PDFDoc}{findDest}
534 \presentmethod{epdf}{PDFDoc}{isEncrypted}
535 \presentmethod{epdf}{PDFDoc}{okToPrint}
536 \presentmethod{epdf}{PDFDoc}{okToChange}
537 \presentmethod{epdf}{PDFDoc}{okToCopy}
538 \presentmethod{epdf}{PDFDoc}{okToAddNotes}
539 \presentmethod{epdf}{PDFDoc}{isLinearized}
540 \presentmethod{epdf}{PDFDoc}{getDocInfo}
541 \presentmethod{epdf}{PDFDoc}{getDocInfoNF}
542 \presentmethod{epdf}{PDFDoc}{getPDFMajorVersion}
543 \presentmethod{epdf}{PDFDoc}{getPDFMinorVersion}
545 --- PDFRectangle methods:
547 \presentmethod{epdf}{PDFRectangle}{isValid}
549 --- Stream methods:
551 \presentmethod{epdf}{Stream}{getKind}
552 \presentmethod{epdf}{Stream}{getKindName}
553 \presentmethod{epdf}{Stream}{reset}
554 \presentmethod{epdf}{Stream}{close}
555 \presentmethod{epdf}{Stream}{getChar}
556 \presentmethod{epdf}{Stream}{lookChar}
557 \presentmethod{epdf}{Stream}{getRawChar}
558 \presentmethod{epdf}{Stream}{getUnfilteredChar}
559 \presentmethod{epdf}{Stream}{unfilteredReset}
560 \presentmethod{epdf}{Stream}{getPos}
561 \presentmethod{epdf}{Stream}{isBinary}
562 \presentmethod{epdf}{Stream}{getUndecodedStream}
563 \presentmethod{epdf}{Stream}{getDict}
565 --- XRef methods:
567 \presentmethod{epdf}{XRef}{isOK}
568 \presentmethod{epdf}{XRef}{getErrorCode}
569 \presentmethod{epdf}{XRef}{isEncrypted}
570 \presentmethod{epdf}{XRef}{okToPrint}
571 \presentmethod{epdf}{XRef}{okToPrintHighRes}
572 \presentmethod{epdf}{XRef}{okToChange}
573 \presentmethod{epdf}{XRef}{okToCopy}
574 \presentmethod{epdf}{XRef}{okToAddNotes}
575 \presentmethod{epdf}{XRef}{okToFillForm}
576 \presentmethod{epdf}{XRef}{okToAccessibility}
577 \presentmethod{epdf}{XRef}{okToAssemble}
578 \presentmethod{epdf}{XRef}{getCatalog}
579 \presentmethod{epdf}{XRef}{fetch}
580 \presentmethod{epdf}{XRef}{getDocInfo}
581 \presentmethod{epdf}{XRef}{getDocInfoNF}
582 \presentmethod{epdf}{XRef}{getNumObjects}
583 \presentmethod{epdf}{XRef}{getRootNum}
584 \presentmethod{epdf}{XRef}{getRootGen}
585 \presentmethod{epdf}{XRef}{getSize}
586 \presentmethod{epdf}{XRef}{getTrailerDict}
588 %***********************************************************************
590 \section{Font table}
592 \presentfunction{font}{read_tfm}
593 \presentfunction{font}{read_vf}
594 \presentfunction{font}{getfont}
595 \presentfunction{font}{setfont}
596 \presentfunction{font}{frozen}
597 \presentfunction{font}{define}
598 \presentfunction{font}{nextid}
599 \presentfunction{font}{id}
600 \presentfunction{font}{current}
601 \presentfunction{font}{max}
602 \presentfunction{font}{each}
604 \section{Font loader table}
606 \presentfunction{fontloader}{info}
608 \afunction{fontloader.info} returned information:
609 \starttabulate[|lf\ss|lf\ss|p|]
610 \NC \ssbf key \NC \bf type \NC \bf explanation \NC\NR
611 \NC fontname \NC string \NC the \POSTSCRIPT\ name of the font\NC\NR
612 \NC fullname \NC string \NC the formal name of the font\NC\NR
613 \NC familyname \NC string \NC the family name this font belongs to\NC\NR
614 \NC weight \NC string \NC a string indicating the color value of the font\NC\NR
615 \NC version \NC string \NC the internal font version\NC\NR
616 \NC italicangle \NC float \NC the slant angle\NC\NR
617 \stoptabulate
619 \presentfunction{fontloader}{open}
621 Listing all of the substructure returned from
622 \afunction{fontloader.open} would take too much room, see the big
623 reference manual.
625 \presentfunction{fontloader}{apply_featurefile}
626 \presentfunction{fontloader}{apply_afmfile}
629 \section{Image table}
631 Full list of \type{<image>} object fields:
632 \starttabulate[|lf\ss|lf\ss|p|]
633 \NC \bf field name\NC \bf type \NC description \NC \NR
634 \NC depth \NC number \NC the image depth for \LUATEX\ (in scaled points)\NC \NR
635 \NC height \NC number \NC the image height for \LUATEX\ (in scaled points)\NC \NR
636 \NC width \NC number \NC the image width for \LUATEX\ (in scaled points)\NC \NR
637 \NC transform \NC number \NC the image transform, integer number 0..7\NC \NR
638 \NC attr \NC string \NC the image attributes for \LUATEX \NC \NR
639 \NC filename \NC string \NC the image file name \NC \NR
640 \NC stream \NC string \NC the raw stream data for an \type{/Xobject} \type{/Form} object\NC \NR
641 \NC page \NC ?? \NC the identifier for the requested image
642 page (type is number or string,
643 default is the number 1)\NC \NR
644 \NC pagebox \NC string \NC the requested bounding box,
645 one of \type {none}, \type {media}, \type {crop}, \type {bleed}, \type {trim}, \type {art} \NC \NR
646 \NC bbox \NC table \NC table with 4 boundingbox dimensions \type{llx}, \type{lly},
647 \type{urx}, and \type{ury} overruling the \type{pagebox} entry\NC \NR
648 \NC filepath \NC string \NC the full (expanded) file name of the image \NC \NR
649 \NC colordepth \NC number \NC the number of bits used by the color space \NC \NR
650 \NC colorspace \NC number \NC the color space object number \NC \NR
651 \NC imagetype \NC string \NC one of \type {pdf}, \type {png}, \type {jpg}, \type {jbig2}, or \type{nil} \NC \NR
652 \NC objnum \NC number \NC the \PDF\ image object number \NC \NR
653 \NC index \NC number \NC the \PDF\ image name suffix \NC \NR
654 \NC pages \NC number \NC the total number of available pages \NC \NR
655 \NC xsize \NC number \NC the natural image width \NC \NR
656 \NC ysize \NC number \NC the natural image height \NC \NR
657 \NC xres \NC number \NC the horizontal natural image resolution (in \DPI) \NC \NR
658 \NC yres \NC number \NC the vertical natural image resolution (in \DPI) \NC \NR
659 \stoptabulate
661 \presentfunction{img}{new}
662 \presentfunction{img}{keys}
663 \presentfunction{img}{scan}
664 \presentfunction{img}{copy}
665 \presentfunction{img}{write}
666 \presentfunction{img}{immediatewrite}
667 \presentfunction{img}{node}
668 \presentfunction{img}{types}
669 \presentfunction{img}{boxes}
671 \section{Kpathsea table}
673 \presentfunction{kpse}{set_program_name}
674 \presentfunction{kpse}{new}
675 \presentfunction{kpse}{find_file}
676 \presentfunction{kpse}{lookup}
678 The \afunction{kpse.lookup} options match commandline arguments from
679 \type{kpsewhich}:
681 \starttabulate[|lf\ss|lf\ss|p|]
682 \NC \ssbf key \NC \ssbf type \NC \ssbf description \NC \NR
683 \NC debug \NC number \NC set debugging flags for this lookup\NC \NR
684 \NC format \NC string \NC use specific file type (see list above)\NC \NR
685 \NC dpi \NC number \NC use this resolution for this lookup; default 600\NC \NR
686 \NC path \NC string \NC search in the given path\NC \NR
687 \NC all \NC boolean \NC output all matches, not just the first\NC \NR
688 \NC must-exist\NC boolean \NC search the disk as well as ls-R if necessary\NC \NR
689 \NC mktexpk \NC boolean \NC disable/enable mktexpk generation for this lookup\NC \NR
690 \NC mktextex \NC boolean \NC disable/enable mktextex generation for this lookup\NC \NR
691 \NC mktexmf \NC boolean \NC disable/enable mktexmf generation for this lookup\NC \NR
692 \NC mktextfm \NC boolean \NC disable/enable mktextfm generation for this lookup\NC \NR
693 \NC subdir \NC string
694 or table \NC only output matches whose directory part
695 ends with the given string(s) \NC \NR
696 \stoptabulate
698 \presentfunction{kpse}{init_prog}
699 \presentfunction{kpse}{readable_file}
700 \presentfunction{kpse}{expand_path}
701 \presentfunction{kpse}{expand_var}
702 \presentfunction{kpse}{expand_braces}
703 \presentfunction{kpse}{show_path}
704 \presentfunction{kpse}{var_value}
705 \presentfunction{kpse}{version}
707 \section{Language table}
708 \presentfunction{lang}{new}
709 \presentfunction{lang}{id}
710 \presentfunction{lang}{hyphenation}
711 \presentfunction{lang}{clear_hyphenation}
712 \presentfunction{lang}{clean}
713 \presentfunction{lang}{patterns}
714 \presentfunction{lang}{clear_patterns}
715 \presentfunction{lang}{prehyphenchar}
716 \presentfunction{lang}{posthyphenchar}
717 \presentfunction{lang}{preexhyphenchar}
718 \presentfunction{lang}{postexhyphenchar}
719 \presentfunction{lang}{hyphenate}
721 \section{Lua table}
723 There are 65536 bytecode registers, that are saved in the format file.
724 Assignments are always global.
726 \presentfunction{lua}{getbytecode}
727 \presentfunction{lua}{setbytecode}
729 They also be accessed via the virtual array \type{lua.bytecode[]}.
731 The virtual array \type{lua.name[]} can be used to give names to lua
732 chunks. To use \type{lua.name[1]}, set \type{lua.name[1] = 'testname'} and \type{\directlua1{rubbish}}.
734 \section{Metapost table}
736 \presentfunction{mplib}{version}
738 \presentfunction{mplib}{new}
739 \presentfunction{mp}{execute}
740 \presentfunction{mp}{finish}
742 The return value of \type{mp:execute} and \type{mp:finish} is a table
743 with a few possible keys (only \type {status} is always guaranteed to be present).
745 \starttabulate[|lf\ss|lf\ss|p|]
746 \NC log \NC string \NC output to the \quote {log} stream \NC \NR
747 \NC term \NC string \NC output to the \quote {term} stream \NC \NR
748 \NC error \NC string \NC output to the \quote {error} stream (only used for \quote {out of memory})\NC \NR
749 \NC status \NC number \NC the return value: 0=good, 1=warning, 2=errors, 3=fatal error \NC \NR
750 \NC fig \NC table \NC an array of generated figures (if any)\NC \NR
751 \stoptabulate
753 Handling of \type{fig} objects would take too much room here, please
754 see the big reference manual.
756 \presentfunction{mp}{statistics}
757 \presentfunction{mp}{char_width}
758 \presentfunction{mp}{char_height}
759 \presentfunction{mp}{char_depth}
761 \section{Node table}
763 \presentfunction{node}{types}
764 \presentfunction{node}{whatsits}
765 \presentfunction{node}{is_node}
766 \presentfunction{node}{id}
767 \presentfunction{node}{subtype}
768 \presentfunction{node}{type}
769 \presentfunction{node}{fields}
770 \presentfunction{node}{has_field}
771 \presentfunction{node}{new}
772 \presentfunction{node}{free}
773 \presentfunction{node}{flush_list}
774 \presentfunction{node}{copy}
775 \presentfunction{node}{copy_list}
776 \presentfunction{node}{hpack}
777 \presentfunction{node}{vpack}
778 \presentfunction{node}{dimensions}
779 \presentfunction{node}{mlist_to_hlist}
780 \presentfunction{node}{slide}
781 \presentfunction{node}{tail}
782 \presentfunction{node}{length}
783 \presentfunction{node}{count}
784 \presentfunction{node}{traverse}
785 \presentfunction{node}{traverse_id}
786 \presentfunction{node}{remove}
787 \presentfunction{node}{insert_before}
788 \presentfunction{node}{insert_after}
789 \presentfunction{node}{first_glyph}
790 \presentfunction{node}{ligaturing}
791 \presentfunction{node}{kerning}
792 \presentfunction{node}{unprotect_glyphs}
793 \presentfunction{node}{protect_glyphs}
794 \presentfunction{node}{last_node}
795 \presentfunction{node}{write}
796 \presentfunction{node}{protrusion_skippable}
797 \presentfunction{node}{next}
798 \presentfunction{node}{prev}
800 \presentfunction{node}{has_attribute}
801 \presentfunction{node}{set_attribute}
802 \presentfunction{node}{unset_attribute}
804 \section{Pdf table}
805 \presentfunction{pdf}{immediateobj}
806 \presentfunction{pdf}{mapfile}
807 \presentfunction{pdf}{mapline}
808 \presentfunction{pdf}{obj}
809 \presentfunction{pdf}{refobj}
810 \presentfunction{pdf}{pageref}
811 \presentfunction{pdf}{print}
812 \presentfunction{pdf}{reserveobj}
813 \presentfunction{pdf}{registerannot}
815 \section{Status table}
816 \presentfunction{status}{list}
818 The current list is:
819 \starttabulate[|lf\ss|p|]
820 \NC \ssbf key \NC \bf explanation \NC\NR
821 \NC pdf_gone\NC written \PDF\ bytes \NC \NR
822 \NC pdf_ptr\NC not yet written \PDF\ bytes \NC \NR
823 \NC dvi_gone\NC written \DVI\ bytes \NC \NR
824 \NC dvi_ptr\NC not yet written \DVI\ bytes \NC \NR
825 \NC total_pages\NC number of written pages \NC \NR
826 \NC output_file_name\NC name of the \PDF\ or \DVI\ file \NC \NR
827 \NC log_name\NC name of the log file \NC \NR
828 \NC banner\NC terminal display banner \NC \NR
829 \NC var_used\NC variable (one|-|word) memory in use \NC \NR
830 \NC dyn_used\NC token (multi|-|word) memory in use \NC \NR
831 \NC str_ptr\NC number of strings \NC \NR
832 \NC init_str_ptr\NC number of \INITEX\ strings \NC \NR
833 \NC max_strings\NC maximum allowed strings \NC \NR
834 \NC pool_ptr\NC string pool index \NC \NR
835 \NC init_pool_ptr\NC \INITEX\ string pool index \NC \NR
836 \NC pool_size\NC current size allocated for string characters \NC \NR
837 \NC node_mem_usage\NC a string giving insight into currently used nodes\NC\NR
838 \NC var_mem_max\NC number of allocated words for nodes\NC \NR
839 \NC fix_mem_max\NC number of allocated words for tokens\NC \NR
840 \NC fix_mem_end\NC maximum number of used tokens\NC \NR
841 \NC cs_count\NC number of control sequences \NC \NR
842 \NC hash_size\NC size of hash \NC \NR
843 \NC hash_extra\NC extra allowed hash \NC \NR
844 \NC font_ptr\NC number of active fonts \NC \NR
845 \NC max_in_stack\NC max used input stack entries \NC \NR
846 \NC max_nest_stack\NC max used nesting stack entries \NC \NR
847 \NC max_param_stack\NC max used parameter stack entries \NC \NR
848 \NC max_buf_stack\NC max used buffer position \NC \NR
849 \NC max_save_stack\NC max used save stack entries \NC \NR
850 \NC stack_size\NC input stack size \NC \NR
851 \NC nest_size\NC nesting stack size \NC \NR
852 \NC param_size\NC parameter stack size \NC \NR
853 \NC buf_size\NC current allocated size of the line buffer \NC \NR
854 \NC save_size\NC save stack size \NC \NR
855 \NC obj_ptr\NC max \PDF\ object pointer \NC \NR
856 \NC obj_tab_size\NC \PDF\ object table size \NC \NR
857 \NC pdf_os_cntr\NC max \PDF\ object stream pointer \NC \NR
858 \NC pdf_os_objidx\NC \PDF\ object stream index \NC \NR
859 \NC pdf_dest_names_ptr\NC max \PDF\ destination pointer \NC \NR
860 \NC dest_names_size\NC \PDF\ destination table size \NC \NR
861 \NC pdf_mem_ptr\NC max \PDF\ memory used \NC \NR
862 \NC pdf_mem_size\NC \PDF\ memory size \NC \NR
863 \NC largest_used_mark\NC max referenced marks class \NC \NR
864 \NC filename\NC name of the current input file \NC \NR
865 \NC inputid\NC numeric id of the current input \NC \NR
866 \NC linenumber\NC location in the current input file\NC \NR
867 \NC lasterrorstring\NC last error string\NC \NR
868 \NC luabytecodes\NC number of active \LUA\ bytecode registers\NC \NR
869 \NC luabytecode_bytes\NC number of bytes in \LUA\ bytecode registers\NC \NR
870 \NC luastate_bytes\NC number of bytes in use by \LUA\ interpreters\NC \NR
871 \NC output_active\NC \type{true} if the \tex{output} routine is active\NC \NR
872 \NC callbacks\NC total number of executed callbacks so far\NC \NR
873 \NC indirect_callbacks\NC number of those that were themselves
874 a result of other callbacks (e.g. file readers)\NC \NR
875 \NC luatex_svn\NC the luatex repository id (added in 0.51)\NC\NR
876 \NC luatex_version\NC the luatex version number (added in 0.38)\NC\NR
877 \NC luatex_revision\NC the luatex revision string (added in 0.38)\NC\NR
878 \NC ini_version\NC \type{true} if this is an \INITEX\ run (added in 0.38)\NC\NR
879 \stoptabulate
881 \section{Typesetting table}
883 \presentfunction{tex}{set}
884 \presentfunction{tex}{get}
886 Many of \LUATEX's internal parameters can be queried and set this way,
887 but not nearly all. The big reference manual has an extensive list.
889 \blank
890 \presentfunction{tex}{setattribute}
891 \presentfunction{tex}{getattribute}
892 \presentfunction{tex}{setbox}
893 \presentfunction{tex}{getbox}
894 \presentfunction{tex}{setcount}
895 \presentfunction{tex}{getcount}
896 \presentfunction{tex}{setdimen}
897 \presentfunction{tex}{getdimen}
898 \presentfunction{tex}{setskip}
899 \presentfunction{tex}{getskip}
900 \presentfunction{tex}{settoks}
901 \presentfunction{tex}{gettoks}
902 \presentfunction{tex}{setcatcode}
903 \presentfunction{tex}{getcatcode}
904 \presentfunction{tex}{setlccode}
905 \presentfunction{tex}{getlccode}
906 \presentfunction{tex}{setsfcode}
907 \presentfunction{tex}{getsfcode}
908 \presentfunction{tex}{setuccode}
909 \presentfunction{tex}{getuccode}
910 \presentfunction{tex}{setmathcode}
911 \presentfunction{tex}{getmathcode}
912 \presentfunction{tex}{setdelcode}
913 \presentfunction{tex}{getdelcode}
915 In all the \afunction{tex.set...} functions above, the optional string is
916 the literal \aliteral{global}. The items can also be accessed directly via virtual arrays:
917 \type{tex.attributes[]}, \type{tex.box[]}, \type{tex.count[]}, \type{tex.dimen[]},
918 \type{tex.skip[]}, \type{tex.toks[]}; \type{tex.catcode[]}, \type{tex.lccode[]},
919 \type{tex.sfcode[]}, \type{tex.uccode[]}, \type{tex.mathcode[]}, \type{tex.delcode[]}.
921 \blank
923 \presentfunction{tex}{setmath}
924 \presentfunction{tex}{getmath}
926 \presentfunction{tex}{print}
927 \presentfunction{tex}{sprint}
928 \presentfunction{tex}{tprint}
929 \presentfunction{tex}{write}
930 \presentfunction{tex}{round}
931 \presentfunction{tex}{scale}
932 \presentfunction{tex}{sp}
933 \presentfunction{tex}{definefont}
934 \presentfunction{tex}{error}
935 \presentfunction{tex}{enableprimitives}
936 \presentfunction{tex}{extraprimitives}
937 \presentfunction{tex}{primitives}
938 \presentfunction{tex}{badness}
939 \presentfunction{tex}{linebreak}
941 The \afunction{tex.linebreak} parameters:
943 \starttabulate[|lf\ss|lf\ss|p|]
944 \NC \bf name \NC \bf type \NC \bf description \NC \NR
945 \NC pardir \NC string \NC \NC \NR
946 \NC pretolerance \NC number \NC \NC \NR
947 \NC tracingparagraphs \NC number \NC \NC \NR
948 \NC tolerance \NC number \NC \NC \NR
949 \NC looseness \NC number \NC \NC \NR
950 \NC hyphenpenalty \NC number \NC \NC \NR
951 \NC exhyphenpenalty \NC number \NC \NC \NR
952 \NC pdfadjustspacing \NC number \NC \NC \NR
953 \NC adjdemerits \NC number \NC \NC \NR
954 \NC pdfprotrudechars \NC number \NC \NC \NR
955 \NC linepenalty \NC number \NC \NC \NR
956 \NC lastlinefit \NC number \NC \NC \NR
957 \NC doublehyphendemerits \NC number \NC \NC \NR
958 \NC finalhyphendemerits \NC number \NC \NC \NR
959 \NC hangafter \NC number \NC \NC \NR
960 \NC interlinepenalty \NC number or table \NC if a table, then it is an array like \type{\interlinepenalties}\NC \NR
961 \NC clubpenalty \NC number or table \NC if a table, then it is an array like \type{\clubpenalties}\NC \NR
962 \NC widowpenalty \NC number or table \NC if a table, then it is an array like \type{\widowpenalties}\NC \NR
963 \NC brokenpenalty \NC number \NC \NC \NR
964 \NC emergencystretch \NC number \NC in scaled points \NC \NR
965 \NC hangindent \NC number \NC in scaled points \NC \NR
966 \NC hsize \NC number \NC in scaled points \NC \NR
967 \NC leftskip \NC glue_spec node \NC \NC \NR
968 \NC rightskip \NC glue_spec node \NC \NC \NR
969 \NC pdfeachlineheight \NC number \NC in scaled points \NC \NR
970 \NC pdfeachlinedepth \NC number \NC in scaled points \NC \NR
971 \NC pdffirstlineheight \NC number \NC in scaled points \NC \NR
972 \NC pdflastlinedepth \NC number \NC in scaled points \NC \NR
973 \NC pdfignoreddimen \NC number \NC in scaled points \NC \NR
974 \NC parshape \NC table \NC \NC \NR
975 \stoptabulate
978 The \afunction{tex.linebreak} returned table data:
980 \starttabulate[|lf\ss|p|]
981 \NC prevdepth \NC depth of the last line in the broken paragraph \NC \NR
982 \NC prevgraf \NC number of lines in the broken paragraph \NC \NR
983 \NC looseness \NC the actual looseness value in the broken paragraph \NC \NR
984 \NC demerits \NC the total demerits of the chosen solution \NC \NR
985 \stoptabulate
987 \presentfunction{tex}{shipout}
989 \blank
990 The virtual table \type{tex.lists} contains the set of internal
991 registers that keep track of building page lists.
993 \starttabulate[|lf\ss|p|]
994 \NC \bf field \NC \bf description \NC \NR
995 \NC page_ins_head \NC circular list of pending insertions \NC \NR
996 \NC contrib_head \NC the recent contributions \NC \NR
997 \NC page_head \NC the page-so-far \NC \NR
998 \NC hold_head \NC used for held-over items for next page\NC \NR
999 \NC adjust_head \NC head of the current \tex{adjust} list \NC \NR
1000 \NC pre_adjust_head \NC head of the current \tex{adjust pre} list\NC \NR
1001 \stoptabulate
1003 \blank
1004 The virtual table \type{tex.nest} contains the currently active
1005 semantic nesting state. It has two main parts: an zero-based array of
1006 userdata for the semantic nest itself, and the numerical value
1007 \type{tex.nest.ptr}. Known fields:
1009 \starttabulate[|lf\ss|lf\ss|l|p|]
1010 \NC \ssbf key \NC \bf type \NC \bf modes \NC \bf explanation \NC\NR
1011 \NC mode \NC number \NC all \NC The current mode.
1012 0 = no mode,
1013 1 = vertical,
1014 127 = horizontal,
1015 253 = display math.
1016 $-1$ = internal vertical,
1017 $-127$ = restricted horizontal,
1018 $-253$ = inline math.\NC\NR
1019 \NC modeline \NC number \NC all \NC source input line where this mode was entered in,
1020 negative inside the output routine.\NC\NR
1021 \NC head \NC node \NC all \NC the head of the current list\NC\NR
1022 \NC tail \NC node \NC all \NC the tail of the current list\NC\NR
1023 \NC prevgraf \NC number \NC vmode \NC number of lines in the previous paragraph\NC\NR
1024 \NC prevdepth \NC number \NC vmode \NC depth of the previous paragraph\NC\NR
1025 \NC spacefactor \NC number \NC hmode \NC the current space factor\NC\NR
1026 \NC dirs \NC node \NC hmode \NC internal use only\NC\NR
1027 \NC noad \NC node \NC mmode \NC internal use only\NC\NR
1028 \NC delimptr \NC node \NC mmode \NC internal use only\NC\NR
1029 \NC mathdir \NC boolean \NC mmode \NC true when during math processing the \type{\mathdir} is not
1030 the same as the surrounding \type{\textdir}\NC\NR
1031 \NC mathstyle \NC number \NC mmode \NC the current \type{\mathstyle} \NC\NR
1032 \stoptabulate
1035 \section{Texconfig table}
1037 This is a table that is created empty. A startup \LUA\ script could
1038 fill this table with a number of settings that are read out by
1039 the executable after loading and executing the startup file.
1041 \starttabulate[|lf\ss|lf\ss|l|p|]
1042 \NC \ssbf key \NC \bf type \NC \bf default \NC \bf explanation \NC\NR
1043 \NC kpse_init \NC boolean \NC true \NC \type{false} totally disables \KPATHSEA\ initialisation\NC \NR
1044 \NC shell_escape \NC string\NC \NC cf.\ web2c docs \NC\NR
1045 \NC shell_escape_commands \NC string\NC \NC cf.\ web2c docs \NC\NR
1046 \NC string_vacancies \NC number\NC 75000\NC cf.\ web2c docs \NC \NR
1047 \NC pool_free \NC number\NC 5000\NC cf.\ web2c docs \NC \NR
1048 \NC max_strings \NC number\NC 15000\NC cf.\ web2c docs \NC \NR
1049 \NC strings_free \NC number\NC 100\NC cf.\ web2c docs \NC \NR
1050 \NC nest_size \NC number\NC 50\NC cf.\ web2c docs \NC \NR
1051 \NC max_in_open \NC number\NC 15\NC cf.\ web2c docs \NC \NR
1052 \NC param_size \NC number\NC 60\NC cf.\ web2c docs \NC \NR
1053 \NC save_size \NC number\NC 4000\NC cf.\ web2c docs \NC \NR
1054 \NC stack_size \NC number\NC 300\NC cf.\ web2c docs \NC \NR
1055 \NC dvi_buf_size \NC number\NC 16384\NC cf.\ web2c docs \NC \NR
1056 \NC error_line \NC number\NC 79\NC cf.\ web2c docs \NC \NR
1057 \NC half_error_line \NC number\NC 50\NC cf.\ web2c docs \NC \NR
1058 \NC max_print_line \NC number\NC 79\NC cf.\ web2c docs \NC \NR
1059 \NC hash_extra \NC number\NC 0\NC cf.\ web2c docs \NC \NR
1060 \NC pk_dpi \NC number\NC 72\NC cf.\ web2c docs \NC \NR
1061 \NC trace_file_names \NC boolean \NC true \NC \type{false} disables \TEX's normal file feedback\NC \NR
1062 \NC file_line_error \NC boolean \NC false \NC \type{file:line} style error messages\NC \NR
1063 \NC halt_on_error \NC boolean \NC false \NC abort run on the first encountered error\NC \NR
1064 \NC formatname \NC string \NC \NC if no format name was given
1065 on the commandline, this will be used\NC \NR
1066 \NC jobname \NC string \NC \NC as \type{formatname}.\NC \NR
1067 \stoptabulate
1070 \section{IO table}
1071 \presentfunction{texio}{write}
1072 \presentfunction{texio}{write_nl}
1074 \section{Token table}
1076 A token is represented in \LUA\ as a small table. For the moment, this
1077 table consists of three numeric entries:
1079 \starttabulate[|l|l|p|]
1080 \NC \bf index\NC \bf meaning \NC \bf description \NC \NR
1081 \NC 1 \NC command code \NC this is a value between~$0$ and~$130$\NC \NR
1082 \NC 2 \NC command modifier \NC this is a value between~$0$ and~$2^{21}$ \NC \NR
1083 \NC 3 \NC control sequence id \NC for commands that are not the result of control
1084 sequences, like letters and characters, it is zero,
1085 otherwise, it is a number pointing into the \quote
1086 {equivalence table} \NC \NR
1087 \stoptabulate
1089 \presentfunction{token}{get_next}
1090 \presentfunction{token}{is_expandable}
1091 \presentfunction{token}{expand}
1092 \presentfunction{token}{is_activechar}
1093 \presentfunction{token}{create}
1094 \presentfunction{token}{command_name}
1095 \presentfunction{token}{command_id}
1096 \presentfunction{token}{csname_name}
1097 \presentfunction{token}{csname_id}
1100 \stopcolumns
1101 \stoptext