[luatex] parsing the first line of a file for format name

David Carlisle d.p.carlisle at gmail.com
Wed Aug 26 20:07:39 CEST 2015


On 26 August 2015 at 19:02, luigi scarso <luigi.scarso at gmail.com> wrote:

> (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:
>
> -- myscript.lua
> print("arg[1]=",arg[1])
> print("arg[2]=",arg[2])
> print("arg[3]=",arg[3])
>
>
> $> luatex --luaonly myscript.lua -i latex test.tex
>
> that gives
>
> arg[1]= -i
> arg[2]= latex
> arg[3]= 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 .
>
> --
> luigi

Thanks for confirming the current status, and the lua tips.

David


More information about the luatex mailing list