4 Jun
2011
4 Jun
'11
8:35 p.m.
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