Hallo Alex,
das ist Teil einer aktuellen Diskussion. Und könnte Deinen
Wunsch nach ant oder etwas ähnlichem erfüllen. Da baut
jemand auf der aktuellen luatex eine allgemeine Printengine,
die man von außen steuern kann -- siehe die Bemerkung
ganz am Ende der Meldung.

Viele Grüße
Jürgen

> Gesendet: Donnerstag, 20. Oktober 2016 um 11:49 Uhr
> Von: [email protected]
> An: [email protected]
> Betreff: luatex Digest, Vol 94, Issue 12
>
> Send luatex mailing list submissions to
>       [email protected]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://tug.org/mailman/listinfo/luatex
> or, via email, send a message with subject or body 'help' to
>       [email protected]
> 
> You can reach the person managing the list at
>       [email protected]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of luatex digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Building a PDF with Lua code, without a TeX stub
>       (David Carlisle)
>    2. Re: Building a PDF with Lua code, without a TeX stub (Deepak Jois)
>    3. Re: Building a PDF with Lua code, without a TeX stub (Deepak Jois)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 20 Oct 2016 09:47:04 +0100
> From: David Carlisle <[email protected]>
> To: "LuaTeX discussion." <[email protected]>
> Subject: Re: [luatex] Building a PDF with Lua code, without a TeX stub
> Message-ID:
>       <CAEW6iOh_cDnsrEpw6cQ=3hb2_kq8cb8fb4rx+zok-q9naww...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> On 20 October 2016 at 07:25, Deepak Jois <[email protected]> wrote:
> > Hi
> > 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:
> >
> > <code>
> > -- Page settings
> > tex.pagewidth = "210mm"
> > tex.pageheight = "297mm"
> > tex.hsize = "210mm"
> >
> > -- Set the paragraph indentation
> > tex.parindent = "20pt"
> >
> > tex.sprint("hello world")
> > </code>
> >
> > and I want to generate a PDF from it directly using the luatex
> > command. I cannot seem to do that right now, and I require a stub TeX
> > file like this.
> >
> > <code>
> > \outputmode=1 % this could be avoided if I pass --output-format=pdf
> > \directlua{dofile('code.lua')}
> > \bye
> > </code>
> >
> > Questions:
> >
> > - Is there a way to avoid creating the stub TeX file?
> >
> > - If not, is it something worth adding (or possible to add) as a
> > feature to the LuaTeX program?
> >
> > Deepak
> >
> 
> You don't need a file, although you do need some tex code,
>  this produces a pdf with hello world if I save your lua as zz.lua
> 
> luatex '\directlua{require("zz")}\end'
> 
> of course you could have written the \end from lua as well so you
> really just need
> a calling line as
> 
> luatex '\directlua{require("zz")}'
> 
> David
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 20 Oct 2016 15:08:39 +0530
> From: Deepak Jois <[email protected]>
> To: "LuaTeX discussion." <[email protected]>
> Subject: Re: [luatex] Building a PDF with Lua code, without a TeX stub
> Message-ID:
>       <cabr1-xzwbnpfnesop_-mhga+1ez05+wpp_2w3jpfbordpvo...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> On Thu, Oct 20, 2016 at 2:17 PM, David Carlisle <[email protected]> 
> wrote:
> > You don't need a file, although you do need some tex code,
> >  this produces a pdf with hello world if I save your lua as zz.lua
> 
> Thank you for that. I had not realised that it is possible to pass in
> TeX commands as arguments.
> 
> I should really read the help output more carefully (or maybe this
> should be in the manual?).
> 
> I managed to reduce the size of my wrapper script[1] using this
> method. It would be nice to get  rid of the rest of it as well.
> 
> Deepak
> 
> [1]: 
> https://github.com/deepakjois/ufy/commit/4ab51c761a5be3750281cbbcc9ab9bc45d17c265
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Thu, 20 Oct 2016 15:19:27 +0530
> From: Deepak Jois <[email protected]>
> To: "LuaTeX discussion." <[email protected]>
> Subject: Re: [luatex] Building a PDF with Lua code, without a TeX stub
> Message-ID:
>       <cabr1-xbef_tu0urdur1g+atw5hke8wzj61j9mnhk+og2a7a...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> On Thu, Oct 20, 2016 at 2:08 PM, Mojca Miklavec
> <[email protected]> wrote:
> > (Or you can install the standalone ConTeXt distribution, but don't
> > worry about it just yet.)
> >
> > You can try to save the following to test.cld and process it with
> > "context.cld" just to answer yourself whether this could help you in
> > any way:
> >
> > context.setupindenting({"yes", "20pt", "first"})
> > context.starttext()
> > context("hello world")
> > context.par()
> > context.input("knuth")
> > context.stoptext()
> >
> > If it does, it might be possible to replace ConTeXt with plain TeX.
> 
> I was able to install ConTeXt standalone quite easily. So I will
> definitely be checking this out. It will also provide some inspiration
> for the API I am trying to build.
> 
> However, my goals are a bit different. I would like to build a Lua
> based API module for typesetting, that can work nicely with LuaRocks,
> and depends on nothing but the LuaTeX binary: no complicated wrapping,
> no stub files, no format files, no TEXMF trees etc.
> 
> 
> End of luatex Digest, Vol 94, Issue 12
> **************************************
>

Reply via email to