diff options
Diffstat (limited to 'macros/luatex/optex/doc/optex-techdoc.tex')
-rw-r--r-- | macros/luatex/optex/doc/optex-techdoc.tex | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/macros/luatex/optex/doc/optex-techdoc.tex b/macros/luatex/optex/doc/optex-techdoc.tex index d35e6faf4e..a22e6baab2 100644 --- a/macros/luatex/optex/doc/optex-techdoc.tex +++ b/macros/luatex/optex/doc/optex-techdoc.tex @@ -71,12 +71,16 @@ The `\_codedecl` will be re-defined later. Individual `*.opm` macro files are read. \verbinput (44-87) optex.ini - % +The file `optex.lua` is embedded into the format as byte-code. +It is documented in section~\ref[lua]. + +\verbinput (89-92) optex.ini + The `\everyjob` register is initialized and the format is saved by the `\dump` command. -\verbinput (89-97) optex.ini +\verbinput (94-102) optex.ini } @@ -179,7 +183,7 @@ The `\margins` macro is documented in the section~\ref[marg]. \printdoc lists.opm \sec Verbatim, listings -\secc Inline and \"display" verbatim +\secc[verb] Inline and \"display" verbatim \printdoc verbatim.opm \secc[hisyntax] Listings with syntax highlighting \printdoctail hi-syntax.opm @@ -244,6 +248,34 @@ The `\margins` macro is documented in the section~\ref[marg]. Miscellaneous macros are here. \printdoc others.opm +\sec[lua] Lua code embedded to the format + +The file `optex.lua` is loaded into the format in `optex.ini` as byte-code +and initialized by `\everyjob`, see section~\ref[init]. + +The file implements part of the functionality from `luatexbase` namespace, +nowadays defined by \LaTeX/ kernel. `luatexbase` deals with modules, +allocators and callback management. Callback management is a nice extension +and is actually used in \OpTeX/. Other functions are defined more or less just +to suit luaotfload's use. + +\newtoks \_hisyntaxlua +\_hisyntaxlua={% + \_hicolor C \Green + \_replfromto {--}{^^J} {\z C{--#1}^^J}% +} + +{\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip} + \commentchars-- \def\docfile{optex.lua} \ttline=-1 + \_def\_printcomments{\_medskip + {\_catcodetable0 \_typosize[10/12]\_everypar={}\_scantextokens\_ea{\_vcomments}\par}% + \_bigskip + } + +\verbinput \hisyntax{lua} (4-) optex.lua +} + + \sec Printing documentation \printdoctail doc.opm \printdoc doc.opm |