Am 04.02.2013 um 20:12 schrieb Wolfgang Schuster :
>
> Am 04.02.2013 um 19:26 schrieb "Meer H. van der" :
>
>> More ideas?
>
> Move the Lua code to a luacode block or a external and use TeX only to access
> the function.
Am 04.02.2013 um 19:26 schrieb "Meer H. van der" :
> More ideas?
Move the Lua code to a luacode block or a external and use TeX only to access
the function.
Wolfgang
___
If your question is of interest to others as
On 4 feb. 2013, at 19:13, Aditya Mahajan
wrote:
> On Mon, 4 Feb 2013, H. van der Meer wrote:
>
>> The following worked without a hitch:
>>
>> \def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
>> \def\formatDuration#1{\ctxlua{
>> local s = string.gsub("#1","\
On Mon, 4 Feb 2013, H. van der Meer wrote:
The following worked without a hitch:
\def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
\def\formatDuration#1{\ctxlua{
local s = string.gsub("#1","\%D","")
local d = tostring(hvdm.time:match(s))
tex
The following worked without a hitch:
\def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
\def\formatDuration#1{\ctxlua{
local s = string.gsub("#1","\%D","")
local d = tostring(hvdm.time:match(s))
tex.print(string.sub(d,1,2) ~= "0:" and d or stri