[luatex] Hinweis auf luatex Digest, Vol 94, Issue 12

Juergen Pfitzenmaier pfitzen at web.de
Thu Oct 20 12:18:08 CEST 2016


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: luatex-request at tug.org
> An: luatex at tug.org
> Betreff: luatex Digest, Vol 94, Issue 12
>
> Send luatex mailing list submissions to
> 	luatex at tug.org
> 
> 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
> 	luatex-request at tug.org
> 
> You can reach the person managing the list at
> 	luatex-owner at tug.org
> 
> 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 <d.p.carlisle at gmail.com>
> To: "LuaTeX discussion." <luatex at tug.org>
> Subject: Re: [luatex] Building a PDF with Lua code, without a TeX stub
> Message-ID:
> 	<CAEW6iOh_cDnsrEpw6cQ=3hB2_kq8cb8fB4RX+zOK-q9NAWw7Mg at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> On 20 October 2016 at 07:25, Deepak Jois <deepak.jois at gmail.com> 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 <deepak.jois at gmail.com>
> To: "LuaTeX discussion." <luatex at tug.org>
> Subject: Re: [luatex] Building a PDF with Lua code, without a TeX stub
> Message-ID:
> 	<CABR1-XZWbNPfNEsoP_-MHGa+1EZ05+wPp_2W3JPfbOrDpVos+w at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> On Thu, Oct 20, 2016 at 2:17 PM, David Carlisle <d.p.carlisle at gmail.com> 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 <deepak.jois at gmail.com>
> To: "LuaTeX discussion." <luatex at tug.org>
> Subject: Re: [luatex] Building a PDF with Lua code, without a TeX stub
> Message-ID:
> 	<CABR1-XbeF_TU0urDUr1g+aTw5Hke8wZJ61J9mnhk+OG2A7aEyQ at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> On Thu, Oct 20, 2016 at 2:08 PM, Mojca Miklavec
> <mojca.miklavec.lists at gmail.com> 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
> **************************************
>



More information about the luatex mailing list