Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-04 Thread Sylvain Hubert
again, sorry for replying on the wrong channel. On Wed, 4 Nov 2020 at 17:35, Hans Hagen wrote: > > it would harm performance because it involves parsing all values and > also ways around cases where the title is "function" (lieral text). > I'm not sure I understand what you mean by literal

Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-04 Thread Hans Hagen
On 11/4/2020 4:53 PM, Sylvain Hubert wrote: % Hans, sorry for having replied on the wrong channel before. On Tue, 3 Nov 2020 at 09:03, Hans Hagen > wrote: On 11/3/2020 4:05 AM, Sylvain Hubert wrote: >  > as tables like those in setuphead({somehead},

Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-04 Thread Sylvain Hubert
% Hans, sorry for having replied on the wrong channel before. On Tue, 3 Nov 2020 at 09:03, Hans Hagen wrote: > On 11/3/2020 4:05 AM, Sylvain Hubert wrote: > > > as tables like those in setuphead({somehead}, {somesettings}) are > > actual Lua tables and follow Lua, not TeX, rules > > But there

Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-03 Thread Hans Hagen
On 11/3/2020 4:05 AM, Sylvain Hubert wrote: > as tables like those in setuphead({somehead}, {somesettings}) are actual Lua tables and follow Lua, not TeX, rules But there are lua apis that support delayed TeX like `context.chapter(context.delayed'text')`. Whether or not the function is stored

Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-02 Thread Jairo A. del Rio
Sorry. What I meant is: when you use context.setuphead({'chapter'}, {title="Some text"}) at the Lua end, {'chapter'} and {title="Some text"} (notice "Some text" is a string, not a function) are Lua tables. TeX will print "Some text", but it won't work for context.delayed as it is another table

Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-02 Thread Sylvain Hubert
> as tables like those in setuphead({somehead}, {somesettings}) are actual Lua tables and follow Lua, not TeX, rules But there are lua apis that support delayed TeX like `context.chapter(context.delayed'text')`. Whether or not the function is stored in a table should be theoretically irrelevant. I

Re: [NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-02 Thread Jairo A. del Rio
On the Lua side, you'll have to pass strings so your example works, as tables like those in setuphead({somehead}, {somesettings}) are actual Lua tables and follow Lua, not TeX, rules (see e.g. Lua reference in https://www.lua.org/manual/5.4/ or, better, CLD manual in

[NTG-context] context.delayed as parameter of setuphead[before=...]

2020-11-02 Thread Sylvain Hubert
Dear List, I'm trying to mirror the context command `\setuphead[chapter][before=hello]` into lua with delayed typesetting of 'hello', but `\ctxlua{context.setuphead({'chapter'}, {before=context.delayed'hello'})}` does not have any effect. Could anyone help me on this? Thanks! Best, Sylvain