On Jun 4, 2011, at 12:14 AM, Peter Münster wrote:

> \startluacode
> function my_externalfigure(file, t)
>    local args_present
>    for k, v in pairs(t) do
>        if v == "" then
>            t[k] = nil
>        else
>            args_present = true
>        end
>    end
>    context.externalfigure({file}, args_present and t)
> end
> \stopluacode
> 
> \startxmlsetups xml:externalfigure
>  \ctxlua{my_externalfigure("\xmlatt{#1}{resource}",
>    {width = "\xmlatt{#1}{width}", height = "\xmlatt{#1}{height}"})}
> \stopxmlsetups
> 
> My first idea was "\expanded{\externalfigure[...][\doif...]}" but it
> does not work...

Thanks a lot Peter, i will have to play with this tomorrow (just came home from 
a short trip).

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