[luatex] parsing the first line of a file for format name
luigi.scarso at gmail.com
Wed Aug 26 20:02:14 CEST 2015
On Sat, Jul 25, 2015 at 7:12 PM, David Carlisle <d.p.carlisle at gmail.com>
> If you process the following with (plain) pdftex
> then you get
> This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015)
> (preloaded format=pdflatex)
> showing that the first line comment has been read to load pdflatex.fmt
> The analogous file for (plain) luatex
> This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)
> restricted \write18 enabled.
> ! Undefined control sequence.
> l.3 \stop
> showing that the file is being processed by plain.
> luatex --help and page 30 of the (0.80) manual indicate that there are
> --(no-)parse-first-line command line options which at least implies
> that the web2c style first line parsing should be active?
> If it isn't intended to work could those options be removed thanks, also
> in that case is it possible to do a similar thing from lua at the top
> of the file?
> (no-)parse-first-line are recognized but currently do nothing, apart a
message on the log.
I will fix the manual.
One can use the lua interpreter in this way:
$> luatex --luaonly myscript.lua -i latex test.tex
(note that the standard lua options are not recognized as such)
Of course in you case the script can parse the first line of test.tex and
eventually run luatex with the right
options (i.e. luatex --fmt=lualatex test.tex) with os.execute .
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the luatex