[NTG-context] Re: lua error in `strc-lev.lua`

2024-05-29 Thread Henning Hraban Ramm

Am 29.05.24 um 11:16 schrieb Henning Hraban Ramm:

Am 29.05.24 um 11:05 schrieb Sylvain Hubert:
I replaced `strc-lev.lua` and rerun `context` but the error message 
stays the same. `context` command doesn't seem to recognize the change 
of `strc-lev.lua`. Should I run `mtxrun` or something before?


After changes to the source files you must re-generate the format:

context --generate

and maybe

context --luatex --generate


--make instead of --generate, of course. Sorry!

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: lua error in `strc-lev.lua`

2024-05-29 Thread Hans Hagen

On 5/29/2024 11:05 AM, Sylvain Hubert wrote:
I replaced `strc-lev.lua` and rerun `context` but the error message 
stays the same. `context` command doesn't seem to recognize the change 
of `strc-lev.lua`. Should I run `mtxrun` or something before?

context --make

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: lua error in `strc-lev.lua`

2024-05-29 Thread Henning Hraban Ramm

Am 29.05.24 um 11:05 schrieb Sylvain Hubert:
I replaced `strc-lev.lua` and rerun `context` but the error message 
stays the same. `context` command doesn't seem to recognize the change 
of `strc-lev.lua`. Should I run `mtxrun` or something before?


After changes to the source files you must re-generate the format:

context --generate

and maybe

context --luatex --generate



Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: lua error in `strc-lev.lua`

2024-05-29 Thread Sylvain Hubert
I rerun `install.sh` after replacing `strc-lev.lua` and the error goes
away. Thanks Hans!

On Tue, 28 May 2024 at 20:20, Hans Hagen  wrote:

> On 5/28/2024 10:48 AM, Sylvain Hubert wrote:
> > ConTeXt LMTX version: 2024.05.27 18:16
> >
> > Reproducible example:
> >
> > \definesectionlevels
> > [default]
> > [section, subsection, subsubsection, subsubsubsection,
> subsubsubsubsection]
> >
> > \starttext
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stoptext
> >
> > lua error   > lua error on line 19 in file ./input.tex:
> >
> > registered function call [969]:
> > ...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75: attempt
> > to index a nil value (field '?')
> > stack traceback:
> >  ...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75:
> > in function
> <...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:66>
> >  (...tail calls...)
> can you test with the attached ... (remake the format)
>
> \starttext
> \startsectionlevel[title=level 1]
>  \startsectionlevel[title=level 2 ]
>  \startsectionlevel[title=level 3]
>  \startsectionlevel[title=level 4]
>  \startsectionlevel[title=level 5]
>  \startsectionlevel[title=level 6]
>  \startsectionlevel[title=level 7]
>  \startsectionlevel[title=level 8]
>  \startsectionlevel[title=level 9]
>  \startsectionlevel[title=level 10 ]
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stoptext
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: lua error in `strc-lev.lua`

2024-05-29 Thread Sylvain Hubert
I replaced `strc-lev.lua` and rerun `context` but the error message stays
the same. `context` command doesn't seem to recognize the change of
`strc-lev.lua`. Should I run `mtxrun` or something before?

On Tue, 28 May 2024 at 20:20, Hans Hagen  wrote:

> On 5/28/2024 10:48 AM, Sylvain Hubert wrote:
> > ConTeXt LMTX version: 2024.05.27 18:16
> >
> > Reproducible example:
> >
> > \definesectionlevels
> > [default]
> > [section, subsection, subsubsection, subsubsubsection,
> subsubsubsubsection]
> >
> > \starttext
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \startsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stopsectionlevel
> > \stoptext
> >
> > lua error   > lua error on line 19 in file ./input.tex:
> >
> > registered function call [969]:
> > ...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75: attempt
> > to index a nil value (field '?')
> > stack traceback:
> >  ...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75:
> > in function
> <...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:66>
> >  (...tail calls...)
> can you test with the attached ... (remake the format)
>
> \starttext
> \startsectionlevel[title=level 1]
>  \startsectionlevel[title=level 2 ]
>  \startsectionlevel[title=level 3]
>  \startsectionlevel[title=level 4]
>  \startsectionlevel[title=level 5]
>  \startsectionlevel[title=level 6]
>  \startsectionlevel[title=level 7]
>  \startsectionlevel[title=level 8]
>  \startsectionlevel[title=level 9]
>  \startsectionlevel[title=level 10 ]
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
>  \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stopsectionlevel
> \stoptext
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: lua error in `strc-lev.lua`

2024-05-28 Thread Denis Maier via ntg-context
Well, you define less levels than you need.

 

Try this :

 

%

\definesectionlevels

   [default]

   [

%chapter, % uncomment this line to make it work

   section, subsection, subsubsection, subsubsubsection, subsubsubsubsection]

 

\starttext

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stoptext

%

 

Interestingly, this will also work, although (if I’m counting correctly) there 
are still only 5 levels defined, but 6 are used (just like above):

 



 

\definesectionlevels

   [default]

   [

%chapter, % uncomment this line to make it work

   section, subsection, subsubsection, subsubsubsection, subsubsubsubsection]

 

\starttext

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

%\startsectionlevel

%\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stoptext

 

 



Von: Sylvain Hubert  
Gesendet: Dienstag, 28. Mai 2024 10:48
An: mailing list for ConTeXt users 
Betreff: [NTG-context] lua error in `strc-lev.lua`

 

ConTeXt LMTX version: 2024.05.27 18:16

 

Reproducible example:

 

\definesectionlevels

   [default]

   [section, subsection, subsubsection, subsubsubsection, subsubsubsubsection]

 

\starttext

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stoptext

 

lua error   > lua error on line 19 in file ./input.tex:

registered function call [969]: 
...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75: attempt to 
index a nil value (field '?')
stack traceback:
...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75: in 
function <...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:66>
(...tail calls...)

 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___