* Bad argument #1 to 'prehypenchar'
@ 2020-09-15 3:30 Aditya Mahajan
2020-09-15 6:50 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2020-09-15 3:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
The following MWE gives an error with LMTX 2020.09.05
\usemodule[vim]
\definevimtyping[MATLABCODE][syntax=matlab]
\starttext
\startMATLABCODE
saveas(gcf(), "output/same-sigma.png")
\stopMATLABCODE
\stoptext
The error message is:
callback error: ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: bad argument #1 to 'prehyphenchar' (luatex.lang expected, got no value)
stack traceback:
[C]: in function 'lang.prehyphenchar'
...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: in field 'prehyphenchar'
...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:171: in local 'method'
...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:392: in upvalue 'typesetters_breakpoints_handler'
[string "local tonut = nodes.tonut..."]:16: in function <[string "local tonut = nodes.tonut..."]:11>
(...tail calls...)
...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:88: in function <...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:79>
1 >> \SYNBOL{}saveas(gcf(), \SYN[String]{"output/same-sigma.png"})\SYNEOL{}
2
mtx-context | fatal error: return code: 256
Any idea what is going on?
Thanks,
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bad argument #1 to 'prehypenchar'
2020-09-15 3:30 Bad argument #1 to 'prehypenchar' Aditya Mahajan
@ 2020-09-15 6:50 ` Wolfgang Schuster
2020-09-15 19:19 ` Aditya Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2020-09-15 6:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
Aditya Mahajan schrieb am 15.09.2020 um 05:30:
> The following MWE gives an error with LMTX 2020.09.05
>
>
> \usemodule[vim]
> \definevimtyping[MATLABCODE][syntax=matlab]
>
> \starttext
> \startMATLABCODE
> saveas(gcf(), "output/same-sigma.png")
> \stopMATLABCODE
> \stoptext
>
> The error message is:
>
> callback error: ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: bad argument #1 to 'prehyphenchar' (luatex.lang expected, got no value)
> stack traceback:
> [C]: in function 'lang.prehyphenchar'
> ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: in field 'prehyphenchar'
> ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:171: in local 'method'
> ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:392: in upvalue 'typesetters_breakpoints_handler'
> [string "local tonut = nodes.tonut..."]:16: in function <[string "local tonut = nodes.tonut..."]:11>
> (...tail calls...)
> ...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:88: in function <...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:79>
>
> 1 >> \SYNBOL{}saveas(gcf(), \SYN[String]{"output/same-sigma.png"})\SYNEOL{}
> 2
> mtx-context | fatal error: return code: 256
>
> Any idea what is going on?
You have to add \resetbreakpoints to the vim/filter module.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bad argument #1 to 'prehypenchar'
2020-09-15 6:50 ` Wolfgang Schuster
@ 2020-09-15 19:19 ` Aditya Mahajan
2020-09-15 19:43 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2020-09-15 19:19 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
On Tue, 15 Sep 2020, Wolfgang Schuster wrote:
> Aditya Mahajan schrieb am 15.09.2020 um 05:30:
> > The following MWE gives an error with LMTX 2020.09.05
> >
> >
> > \usemodule[vim]
> > \definevimtyping[MATLABCODE][syntax=matlab]
> >
> > \starttext
> > \startMATLABCODE
> > saveas(gcf(), "output/same-sigma.png")
> > \stopMATLABCODE
> > \stoptext
> >
> > The error message is:
> >
> > callback error:
> > ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: bad
> > argument #1 to 'prehyphenchar' (luatex.lang expected, got no value)
> > stack traceback:
> > [C]: in function 'lang.prehyphenchar'
> > ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: in
> > field 'prehyphenchar'
> > ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:171: in
> > local 'method'
> > ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:392: in
> > upvalue 'typesetters_breakpoints_handler'
> > [string "local tonut = nodes.tonut..."]:16: in function <[string
> > "local tonut = nodes.tonut..."]:11>
> > (...tail calls...)
> > ...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:88: in
> > function <...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:79>
> >
> > 1 >> \SYNBOL{}saveas(gcf(), \SYN[String]{"output/same-sigma.png"})\SYNEOL{}
> > 2
> > mtx-context | fatal error: return code: 256
> >
> > Any idea what is going on?
>
> You have to add \resetbreakpoints to the vim/filter module.
Thanks. I had:
\doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
{\language\minusone}%
which I changed to
\doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
{\language\minusone
\resetbreakpoints}%
and this fixed the error.
Thanks,
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bad argument #1 to 'prehypenchar'
2020-09-15 19:19 ` Aditya Mahajan
@ 2020-09-15 19:43 ` Wolfgang Schuster
2020-09-15 19:51 ` Aditya Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2020-09-15 19:43 UTC (permalink / raw)
To: Aditya Mahajan; +Cc: mailing list for ConTeXt users
Aditya Mahajan schrieb am 15.09.2020 um 21:19:
> On Tue, 15 Sep 2020, Wolfgang Schuster wrote:
>
>> You have to add \resetbreakpoints to the vim/filter module.
>
> Thanks. I had:
>
> \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
> {\language\minusone}%
>
> which I changed to
>
> \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
> {\language\minusone
> \resetbreakpoints}%
>
> and this fixed the error.
Don't use the \language hack, the official and supported commands are
\nohypens and \dohyphens or when you need a interface for it use
\usehyphensparameter\...parameter
which allows
\setup...[hyphens=yes|no]
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bad argument #1 to 'prehypenchar'
2020-09-15 19:43 ` Wolfgang Schuster
@ 2020-09-15 19:51 ` Aditya Mahajan
2020-09-15 20:13 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2020-09-15 19:51 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
On Tue, 15 Sep 2020, Wolfgang Schuster wrote:
> Aditya Mahajan schrieb am 15.09.2020 um 21:19:
> > On Tue, 15 Sep 2020, Wolfgang Schuster wrote:
> >
> > > You have to add \resetbreakpoints to the vim/filter module.
> >
> > Thanks. I had:
> >
> > \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
> > {\language\minusone}%
> >
> > which I changed to
> >
> > \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
> > {\language\minusone
> > \resetbreakpoints}%
> >
> > and this fixed the error.
>
> Don't use the \language hack, the official and supported commands are
> \nohypens and \dohyphens or when you need a interface for it use
>
> \usehyphensparameter\...parameter
>
> which allows
>
> \setup...[hyphens=yes|no]
This is a leftover from the old days. Thank for the suggestion on how to fix this. I'll play around a bit and perhaps add the option `hyphens=yes|no` instead of the current `option=hyphenated`.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bad argument #1 to 'prehypenchar'
2020-09-15 19:51 ` Aditya Mahajan
@ 2020-09-15 20:13 ` Hans Hagen
0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2020-09-15 20:13 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan, Wolfgang Schuster
On 9/15/2020 9:51 PM, Aditya Mahajan wrote:
> This is a leftover from the old days. Thank for the suggestion on how to fix this. I'll play around a bit and perhaps add the option `hyphens=yes|no` instead of the current `option=hyphenated`.
the latest lmtx should be ok (predefines language zero)
but wolfgangs suggestions are the ones to follow ... language=0 is a
hack, just as is setting left/right hyphenmin so we now have a proper
disabler (in luametatex/lmtx that is; luatex/mkiv should not be affected)
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@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-15 20:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 3:30 Bad argument #1 to 'prehypenchar' Aditya Mahajan
2020-09-15 6:50 ` Wolfgang Schuster
2020-09-15 19:19 ` Aditya Mahajan
2020-09-15 19:43 ` Wolfgang Schuster
2020-09-15 19:51 ` Aditya Mahajan
2020-09-15 20:13 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).