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

David Carlisle d.p.carlisle at gmail.com
Sat Jul 25 19:12:54 CEST 2015


If you process the  following with (plain) pdftex

%&pdflatex

\stop

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

%&lualatex

\stop



produces

This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)
 restricted \write18 enabled.
(./xx.tex
! 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?

The use case where I found this was a bunch of test files using different
formats and wanted to simply loop over them with information within the
file as to which format to use, rather than maintaining the information
about which format to use for each test separately.

David


More information about the luatex mailing list