![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 4-9-2012 19:40, Marco Patzer wrote:
On 2012-09-04 Martin Schröder
wrote: Hi Martin,
It seems that I just hit a very hard to solve issue which needs not yet available support from the luatex side.
Patricks solution seems not very practical and error prone, so I settled with this ugly but still readable workaround:
\def\cmd {\newdimen\mydimen \mydimen=50pt}
\starttexdefinition action \cmd \startluacode if tex.dimen.mydimen < tex.dimen.textwidth then % context("is smaller") else % context("is not smaller") end % \stopluacode \stoptexdefinition
\action
you probably over code things ... instead of storing you can pass the
valus directly
\def\largerthantextwidth#1%
{\cldcontext
{if \number\dimexpr#1