On 3-6-2011 10:19, Thomas A. Schmitz wrote:
On Jun 3, 2011, at 9:57 PM, Aditya Mahajan wrote:
(untested)
\exeternalfigure[...][height=\doifemptyelse{\xmlatt{#1}{height}}{fit}{\xmlatt{#1}{height}}]
Aditya
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) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------