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.externalf
On 4-6-2011 12:14, Peter Münster wrote:
On Fri, Jun 03 2011, Thomas A. Schmitz wrote:
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.
\startluacode
function my_external
On Fri, Jun 03 2011, Thomas A. Schmitz wrote:
> 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.
\startluacode
function my_externalfigure(file, t)
local args_present
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 rea
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
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
"f
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:
[hei
On Fri, 3 Jun 2011, Thomas A. Schmitz wrote:
Hi all,
I'm pulling my hair - thought this was easy, but turns out to be more
difficult. The \externalfigure command can take a width and/or a height
parameter, and context will be happy to take either one into account. I'm
trying to translate tha
Hi all,
I'm pulling my hair - thought this was easy, but turns out to be more
difficult. The \externalfigure command can take a width and/or a height
parameter, and context will be happy to take either one into account. I'm
trying to translate that into xml syntax. Here's a minimal example that