[NTG-context] Minor bug in Lua or ConTeXt
Bruce Horrocks
ntg at scorecrow.com
Wed Jan 18 14:41:42 CET 2023
Thanks Hans.
Before Pablo spends too much effort on the wiki it's worth pointing out that this only happened because I was in-line documenting the Lua function that I had written and wanted to name the ConTeXT macro that would invoke it - so it's trivial for me to avoid this error.
Perhaps the Wiki only needs to point out that if you get a Lua related error and the error log lists the entire contents of \startluacode ... \stopluacode then a possible source of the error is a \command somewhere in there?
Regards,
> On 18 Jan 2023, at 09:48, Hans Hagen via ntg-context <ntg-context at ntg.nl> wrote:
>
> On 1/18/2023 12:36 AM, Bruce Horrocks via ntg-context wrote:
>> ConTeXt ver: 2023.01.04
>> The following MWE won't compile because of the \dummycommand line even though it is a comment. Not sure whether it's a minor bug or an unavoidable aspect of allowing embedded Lua.
>> \startluacode
>> -- \dummycommand
>> \stopluacode
>> \starttext
>> Hello
>> \stoptext
>
> a bang-head-against-the-wall case:
>
> \let\dummycommand\relax
>
> \startluacode
> -- \dummycommand
> \stopluacode
> \starttext
> Hello
> \stoptext
>
> or:
>
> \ifdefined\dummycommand \else \let\dummycommand\relax \fi
>
> a document-on-the-wiki challenge for Pablo
>
> Hans
>
> -----------------------------------------------------------------
> 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 at ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
â
Bruce Horrocks
Hampshire, UK
More information about the ntg-context
mailing list