On Jun 3, 2011, at 10:19 PM, 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?
Thomas
Answering my own question: this isn't pretty, but it does what I need at this moment: \startxmlsetups xml:externalfigure \doifemptyelse {\xmlatt{#1}{heigth}} {\externalfigure[\xmlatt{#1}{resource}] [width=\xmlatt{#1}{width}\textwidth]} {\externalfigure[\xmlatt{#1}{resource}] [height=\xmlatt{#1}{height}\textheight]} \stopxmlsetups So I'll leave it at that... Thomas