Re: [NTG-context] Access ConTeXt dimensions in Lua

2016-10-09 Thread Hans Hagen
On 10/8/2016 10:41 PM, Henning Hraban Ramm wrote: Hi all, I’m trying to write some dimensions to a file, e.g. \startluacode io.savedata("settings.txt", context("\\textwidth")) \stopluacode But that context() construct is nil. There’s probably a simple solution... ;) \starttext

Re: [NTG-context] Access ConTeXt dimensions in Lua

2016-10-08 Thread Henning Hraban Ramm
> \startluacode > io.savedata("settings.txt", context("\\textwidth")) > \stopluacode Found it myself: number.todimen(tex.dimen.textwidth) Sorry for the noise. But now I need the current font name, even better the current values for rm, ss and tt fonts. I found p.123 of cld-mkiv.pdf, but don’t

[NTG-context] Access ConTeXt dimensions in Lua

2016-10-08 Thread Henning Hraban Ramm
Hi all, I’m trying to write some dimensions to a file, e.g. \startluacode io.savedata("settings.txt", context("\\textwidth")) \stopluacode But that context() construct is nil. There’s probably a simple solution... ;) Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net