[luatex] Building a PDF with Lua code, without a TeX stub
mojca.miklavec.lists at gmail.com
Thu Oct 20 08:55:54 CEST 2016
On 20 October 2016 at 08:25, Deepak Jois wrote:
> I would like to invoke the LuaTeX interpreter with a Lua file which
> does the node building etc, and then calls something like
> tex.shipout(), which can generate a PDF. I am aware of the --lua flag,
> but the file passed to that flag executes before the TeX engine is
> fully initialised. So that’s not what I am looking for
> For example, lets say I have a Lua file with code:
> -- Page settings
> tex.pagewidth = "210mm"
> tex.pageheight = "297mm"
> tex.hsize = "210mm"
> -- Set the paragraph indentation
> tex.parindent = "20pt"
> tex.sprint("hello world")
> and I want to generate a PDF from it directly using the luatex
Others will give you a more definitive answer, but this works out of
the box with
See for example:
I'm sure there must be a way to switch to a different format (or at
lest it should not be to difficult to add that functionality in case
it's not there yet).
More information about the luatex