summaryrefslogtreecommitdiff
path: root/systems/doc/luatex/luatex-lua.tex
diff options
context:
space:
mode:
Diffstat (limited to 'systems/doc/luatex/luatex-lua.tex')
-rw-r--r--systems/doc/luatex/luatex-lua.tex35
1 files changed, 29 insertions, 6 deletions
diff --git a/systems/doc/luatex/luatex-lua.tex b/systems/doc/luatex/luatex-lua.tex
index ed0bc23a53..c5d053e093 100644
--- a/systems/doc/luatex/luatex-lua.tex
+++ b/systems/doc/luatex/luatex-lua.tex
@@ -86,6 +86,7 @@ consequence. The following command|-|line options are understood:
\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of
\type {NUMBER} \NC \NR
\NC \type{--lua=FILE} \NC load and execute a \LUA\ initialization script \NC\NR
+\NC \type{--luadebug} \NC enable the \type{debug} library\NC\NR
\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is
\type {tex} or \type {tfm} \NC \NR
\NC \type{--nosocket} \NC disable the \LUA\ socket library \NC\NR
@@ -137,6 +138,10 @@ The file names for output files that are generated automatically are created by
attaching the proper extension (\type {log}, \type {pdf}, etc.) to the found
\prm {jobname}. These files are created in the directory pointed to by \type
{--output-directory}, or in the current directory, if that switch is not present.
+If \type{--output-directory} is not empty, its value it's copied to the
+\type{TEXMF_OUTPUT_DIRECTORY} env. variable; if it's empty, the value of
+\type{TEXMF_OUTPUT_DIRECTORY} is the value of the output directory.
+
Without the \type {--lua} option, command line processing works like it does in
any other \WEBC|-|based typesetting engine, except that \LUATEX\ has a few extra
@@ -165,8 +170,8 @@ in the following order:
\startitem
Then it checks the various safety switches. You can use those to disable some
- \LUA\ commands that can easily be abused by a malicious document. At the
- moment, \type {--safer} \type {nil}s the following functions:
+ \LUA\ commands that can easily be abused by a malicious document. Currently
+ \type {--safer} nils the following functions:
\blank
@@ -177,8 +182,8 @@ in the following order:
\type {spawn} \type {setenv}
\type {rename} \type {remove} \type {tmpdir} \NC \NR
\NC \type {io} \NC \type {popen} \type {output} \type {tmpfile} \NC \NR
- \NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {chdir} \type {lock}
- \type {touch} \NC \NR
+ \NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {mkdirp} \type {chdir}
+ \type {lock} \type {touch} \NC \NR
\LL
\stoptabulate
@@ -189,6 +194,23 @@ in the following order:
Finally, it disables the \type {socket} library unconditionally (but not the
\type {mime} library which is always available).
+
+ From version 1.18.0 and if \KPATHSEA\ is used, with the exception of \type{debug.traceback}
+ the \type{debug} library is not enabled by default; it can
+ be enabled with the \type{--luadebug} switch. The \type{debug} library
+ is always enabled in shell-escape mode.
+
+ Also from version 1.18.0 and if \KPATHSEA\ is used, the functions
+ \type{os.rename},\type{os.remove}, \type{lfs.attributes}, \type{lfs.chdir},
+ \type{lfs.lock_dir}, \type{lfs.dir}, \type{lfs.link}, \type{lfs.mkdir}, \type{lfs.mkdirp},
+ \type{lfs.rmdir}, \type{lfs.symlinkattributes}, \type{lfs.touch}
+ return \type{true} if both \type{kpse.in_name_ok_silent_extended} and
+ \type{kpse.out_name_ok_silent_extended} validate the pathname;
+ \type{lfs.attributes}, \type{lfs.dir} and \type{lfs.symlinkattributes} are validated
+ only against \type{kpse.in_name_ok_silent_extended}.
+
+
+
\stopitem
\startitem
@@ -237,7 +259,7 @@ deal with typesetting, like \type {tex}, \type {token}, \type {node} and
\type {pdf}, are off|-|limits during the execution of the startup file (they
are \type {nil}'d). Special care is taken that \type {texio.write} and \type
{texio.write_nl} function properly, so that you can at least report your actions
-to the log file when (and if) it eventually becom1es opened (note that \TEX\ does
+to the log file when (and if) it eventually becomes opened (note that \TEX\ does
not even know its \prm {jobname} yet at this point).
Everything you do in the \LUA\ initialization script will remain visible during
@@ -363,7 +385,8 @@ instance, when we started with \LUATEX\ we added some helpers to the \type
{lfs.isdir} and \type {lfs.isfile} were speedy and better variants of what could
be done with \type {lfs.attributes}. The additional function \type
{lfs.shortname} takes a file name and returns its short name on \type {win32}
-platforms. Finally, for non|-|\type {win32} platforms only, we provided \type
+platforms; \type{lfs.mkdirp} is like \type{lfs.mkdir} but make parent directories as needed.
+Finally, for non|-|\type {win32} platforms only, we provided \type
{lfs.readlink} that takes an existing symbolic link as argument and returns its
name. However, the \type {lfs} library evolved so we have dropped these in favour of
pure \LUA\ variants. The \type {shortname} helper is obsolete and now just