[NTG-context] TeX expansion within lua

Wolfgang Schuster wolfgang.schuster at gmail.com
Tue Sep 4 20:25:27 CEST 2012


Am 04.09.2012 um 20:11 schrieb Marco Patzer <homerow at lavabit.com>:

> On 2012-09-04 Wolfgang Schuster <wolfgang.schuster at gmail.com> wrote:
> 
>> Is there a good reason why you put \newdimen because dimen/count
>> etc. registers should always be defined once.
> 
> The definitions are not in a macro, they are defined at the top of
> the file. I messed around while creating a minimal example. However,
> the problem remains the same since the assignment does not happen
> within Lua.
> 
> But, thanks for the hint. I am always happy for improvements and
> feedback about my code.

What prevents you from setting the dimen value in Lua?

\starttext

\scratchdimen = 20pt

\the\scratchdimen

\ctxlua{tex.dimen.scratchdimen = "10pt"}

\the\scratchdimen

\stoptext

Wolfgang


More information about the ntg-context mailing list