Re: [NTG-context] Typing within doifmode leads to error

2021-03-21 Thread Christoph Reller
On Sat, Mar 20, 2021 at 6:07 PM Hans Hagen wrote: > On 3/20/2021 4:00 PM, Christoph Reller wrote: > > On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen > > wrote: > > > > On 3/20/2021 8:24 AM, Aditya Mahajan wrote: > > > On Sat, 20 Mar 2021, Christoph Reller wrote:

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sun, 21 Mar 2021, Hans Hagen wrote: > On 3/20/2021 10:03 PM, Aditya Mahajan wrote: > > On Sat, 20 Mar 2021, Hans Hagen wrote: > > > > > > > > > > I wonder if we could have an environment, say \startluatemplate ... > > > > \stopluatemplate, which is evaluated on the fly rather than when

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen
On 3/20/2021 10:03 PM, Aditya Mahajan wrote: On Sat, 20 Mar 2021, Hans Hagen wrote: I wonder if we could have an environment, say \startluatemplate ... \stopluatemplate, which is evaluated on the fly rather than when loading a file. define 'evaluated on the fly' Consider the following

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sat, 20 Mar 2021, Hans Hagen wrote: > > > > I wonder if we could have an environment, say \startluatemplate ... > > \stopluatemplate, which is evaluated on the fly rather than when loading a > > file. > > define 'evaluated on the fly' Consider the following example: \enablemode[A]

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen
On 3/20/2021 9:23 PM, Aditya Mahajan wrote: On Sat, 20 Mar 2021, Hans Hagen wrote: On 3/20/2021 4:00 PM, Christoph Reller wrote: On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen mailto:j.ha...@xs4all.nl>> wrote: On 3/20/2021 8:24 AM, Aditya Mahajan wrote: > On Sat, 20 Mar 2021,

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sat, 20 Mar 2021, Hans Hagen wrote: > On 3/20/2021 4:00 PM, Christoph Reller wrote: > > On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen > > wrote: > > > > On 3/20/2021 8:24 AM, Aditya Mahajan wrote: > > > On Sat, 20 Mar 2021, Christoph Reller wrote: > > >>

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen
On 3/20/2021 4:00 PM, Christoph Reller wrote: On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen > wrote: On 3/20/2021 8:24 AM, Aditya Mahajan wrote: > On Sat, 20 Mar 2021, Christoph Reller wrote: >> Of course we can do this in lua: >> >> if

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Christoph Reller
On Sat, Mar 20, 2021 at 12:12 PM Hans Hagen wrote: > On 3/20/2021 8:24 AM, Aditya Mahajan wrote: > > On Sat, 20 Mar 2021, Christoph Reller wrote: > >> Of course we can do this in lua: > >> > >> if tex.modes["A"] and not tex.modes{"B"] then > >> ... > >> end > > > > ... which means that you can

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Hans Hagen
On 3/20/2021 8:24 AM, Aditya Mahajan wrote: On Sat, 20 Mar 2021, Christoph Reller wrote: Of course we can do this in lua: if tex.modes["A"] and not tex.modes{"B"] then ... end ... which means that you can use that at the context end as well (old feature). Save the following as test.mkix (or

Re: [NTG-context] Typing within doifmode leads to error

2021-03-20 Thread Aditya Mahajan
On Sat, 20 Mar 2021, Christoph Reller wrote: > Of course we can do this in lua: > > if tex.modes["A"] and not tex.modes{"B"] then > ... > end ... which means that you can use that at the context end as well (old feature). Save the following as test.mkix (or add "% macros=mkix" as the first

Re: [NTG-context] Typing within doifmode leads to error

2021-03-19 Thread Christoph Reller
On Fri, Mar 19, 2021 at 9:49 AM Hans Hagen wrote: > On 3/19/2021 4:58 AM, Christoph Reller wrote: > > Hi, > > > > Consider the following MWE: > > > > \definetyping[T] > > \definemode[mode][yes] > > \starttext > > \doifmode{mode}{% > >\startT > > Bla > >\stopT} > > \stoptext > > > >

Re: [NTG-context] Typing within doifmode leads to error

2021-03-19 Thread Hans Hagen
On 3/19/2021 4:58 AM, Christoph Reller wrote: Hi, Consider the following MWE: \definetyping[T] \definemode[mode][yes] \starttext \doifmode{mode}{%   \startT     Bla   \stopT} \stoptext Compilation with the currently latest ConTeXt LMTX (ver: 2021.03.17 17:46 LMTX  fmt: 2021.3.18) fails

Re: [NTG-context] Typing within doifmode leads to error

2021-03-19 Thread Christoph Reller
On Fri, Mar 19, 2021 at 5:38 AM Aditya Mahajan wrote: > On Fri, 19 Mar 2021, Christoph Reller wrote: > > > Consider the following MWE: > > > > \definetyping[T] > > \definemode[mode][yes] > > \starttext > > \doifmode{mode}{% > > \startT > > Bla > > \stopT} > > \stoptext > > > >

Re: [NTG-context] Typing within doifmode leads to error

2021-03-18 Thread Aditya Mahajan
On Fri, 19 Mar 2021, Christoph Reller wrote: > Hi, > > Consider the following MWE: > > \definetyping[T] > \definemode[mode][yes] > \starttext > \doifmode{mode}{% > \startT > Bla > \stopT} > \stoptext > > Compilation with the currently latest ConTeXt LMTX (ver: 2021.03.17 17:46 > LMTX

[NTG-context] Typing within doifmode leads to error

2021-03-18 Thread Christoph Reller
Hi, Consider the following MWE: \definetyping[T] \definemode[mode][yes] \starttext \doifmode{mode}{% \startT Bla \stopT} \stoptext Compilation with the currently latest ConTeXt LMTX (ver: 2021.03.17 17:46 LMTX fmt: 2021.3.18) fails with: tex error > runaway error: end of file