[NTG-context] Learning LuaTeX : Invoice

Henning Hraban Ramm hraban at fiee.net
Sun Feb 20 20:16:03 CET 2011


Am 2011-02-20 um 16:09 schrieb Hans Hagen:

> it's a system mode, so
>
> \startnotmode[*trialtypesetting] ...
>
> and in lua
>
> if tex.systemmodes.trialtypesetting then ...
>
> but, you need to use \settrialtypesetting (see syst-aux.mkiv) as  
> there is more than the \if now (too late to get rid of the if)

You mean, Wolfgang must set it in his module? I guess he did.

At least this works as expected:

function userdata.RegisterItem(text, hours)
	if tex.systemmodes.trialtypesetting then return end
	table.insert(userdata.invoice.items, {text=text, hours=hours})
end

Thank you!


Am 2011-02-20 um 16:12 schrieb Hans Hagen:

> On 20-2-2011 3:49, Henning Hraban Ramm wrote:
>
>> "trialtypesetting" in the LuaTeX manual.
>
> things like this are not part of luatex but of context so you need  
> the cld manual (or wait till more documentation shows up, or ask ..)

Ah, I guess the CLD manual was what I was looking for all the time ;-)

I suggest you mention tex.systemmodes.trialtypesetting in section 3.3.  
"trial typesetting" - the "return true" approach didn't help in my  
case (or I didn't understand it).


I'll wikify my invoice sample soon. LuaTeX docs in the wiki are a bit  
scattered ATM... (e.g. Lua, LuaTeX, CLD and MkIV all explain LuaTeX  
basics)


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)



More information about the ntg-context mailing list