On Jun 3, 2011, at 10:50 PM, Hans Hagen wrote:

> On 3-6-2011 10:19, Thomas A. Schmitz wrote:
>> 
>> Hmm, almost... Gives the dreaded "Missing number, treated as zero" error. 
>> But your "fit" gave me an idea: this works:
>> 
>> [height=\xmlattdef{#1}{height}{fit}]
>> 
>> but only if I have a real dimension as in height="5cm". What if I want to 
>> define something like height="0.4" and want this to be the equivalent of 
>> height=0.4\textheight ? This of course doesn't work:
>> 
>> [height=\xmlattdef{#1}{height}{fit}\textheight]
>> 
>> since it will expand to "fit\textheight" as a default option. Any 
>> suggestions?
> 
> something (slow):
> 
> \expdoifelse
>  {\xmlattdef{#1}{height}{fit}
>  {fit}
>  {\xmlatt{#1}{height}\textheight}
> 
> (of you define a lua helper)
> 
Ah, expdoifelse is for "expanded doifelse," right? Any examples for such a lua 
helper? Sounds good, but I still haven't been able to understand how to mix xml 
and lua code.

Thanks!

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to