Error after latest update
![](https://secure.gravatar.com/avatar/46da49256462126dbe77187c073aa6c6.jpg?s=120&d=mm&r=g)
I have defined a determinant environment like below: \definemathmatrix[determinant] [matrix:bars] [simplecommand=thedeterminant] and I create a determinant like below: \startformula \startdeterminant\NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn} \NR\stopdeterminant This was working before today but I updated ConTeXt and it has stopped working. The error it gives me now is: tex error > tex error on line 277 in file determinants.tex: You can't use '\Ustopmath' in restricted horizontal mode How can I get it working again? -- Respect, Shiv Shankar Dayal
![](https://secure.gravatar.com/avatar/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
Hi,
On Tue, Aug 6, 2024 at 5:57 PM Shiv Shankar Dayal
I have defined a determinant environment like below:
\definemathmatrix[determinant] [matrix:bars] [simplecommand=thedeterminant]
and I create a determinant like below:
\startformula \startdeterminant\NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn} \NR\stopdeterminant
This was working before today but I updated ConTeXt and it has stopped working. The error it gives me now is:
tex error > tex error on line 277 in file determinants.tex: You can't use '\Ustopmath' in restricted horizontal mode
How can I get it working again?
-- Respect, Shiv Shankar Dayal
I never seen \multispan before. But this seems to work: \definemathmatrix [determinant] [matrix:bars] [simplecommand=thedeterminant] \starttext \startformula \startdeterminant \NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \HF\NR % \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn}\NR \stopdeterminant \stopformula \stoptext I hope it gives you what you want. /Mikael
![](https://secure.gravatar.com/avatar/46da49256462126dbe77187c073aa6c6.jpg?s=120&d=mm&r=g)
Hi,
I do not remember where it came from, probably AMS Math or something like that.
Many thanks. It works but I am curious as to why the working code broke.
On Tue, Aug 6, 2024 at 9:58 PM Mikael Sundqvist
Hi,
On Tue, Aug 6, 2024 at 5:57 PM Shiv Shankar Dayal
wrote: I have defined a determinant environment like below:
\definemathmatrix[determinant] [matrix:bars] [simplecommand=thedeterminant]
and I create a determinant like below:
\startformula \startdeterminant\NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn} \NR\stopdeterminant
This was working before today but I updated ConTeXt and it has stopped working. The error it gives me now is:
tex error > tex error on line 277 in file determinants.tex: You can't use '\Ustopmath' in restricted horizontal mode
How can I get it working again?
-- Respect, Shiv Shankar Dayal
I never seen \multispan before. But this seems to work:
\definemathmatrix [determinant] [matrix:bars] [simplecommand=thedeterminant]
\starttext
\startformula \startdeterminant \NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \HF\NR % \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn}\NR \stopdeterminant \stopformula
\stoptext
I hope it gives you what you want.
/Mikael ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Respect, Shiv Shankar Dayal
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Tue, 6 Aug 2024, Shiv Shankar Dayal wrote:
Hi,
I do not remember where it came from, probably AMS Math or something like that.
It comes from plain: ❯ pdftex This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Arch Linux) (preloaded format=pdftex) restricted \write18 enabled. **\relax entering extended mode *\show\multispan
\multispan=macro: #1->\omit \mscount #1\relax \loop \ifnum \mscount >\@ne \sp@n \repeat . <*> \show\multispan
Aditya
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Mikael Sundqvist schrieb am 06.08.2024 um 18:27:
Hi,
On Tue, Aug 6, 2024 at 5:57 PM Shiv Shankar Dayal
wrote: I have defined a determinant environment like below:
\definemathmatrix[determinant] [matrix:bars] [simplecommand=thedeterminant]
and I create a determinant like below:
\startformula \startdeterminant\NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn} \NR\stopdeterminant
This was working before today but I updated ConTeXt and it has stopped working. The error it gives me now is:
tex error > tex error on line 277 in file determinants.tex: You can't use '\Ustopmath' in restricted horizontal mode
How can I get it working again?
-- Respect, Shiv Shankar Dayal I never seen \multispan before. But this seems to work:
\multispan is a plain TeX command to create cells which span multiple columns and makes only sense when you create tables with the \halign primitive because tables in context use hidden cells for padding on the left and right etc. Wolfgang
![](https://secure.gravatar.com/avatar/46da49256462126dbe77187c073aa6c6.jpg?s=120&d=mm&r=g)
Hi,
I still do not know why it stopped working after the latest update.
On Tue, Aug 6, 2024 at 10:54 PM Wolfgang Schuster
Mikael Sundqvist schrieb am 06.08.2024 um 18:27:
Hi,
On Tue, Aug 6, 2024 at 5:57 PM Shiv Shankar Dayal
wrote: I have defined a determinant environment like below:
\definemathmatrix[determinant] [matrix:bars] [simplecommand=thedeterminant]
and I create a determinant like below:
\startformula \startdeterminant\NC a_{11} \NC a_{12} \NC a_{13} \NC \cdots \NC a_{1n}\NR \NC a_{21} \NC a_{22} \NC a_{23} \NC \cdots \NC a_{2n}\NR \NC a_{31} \NC a_{32} \NC a_{33} \NC \cdots \NC a_{3n}\NR \multispan{9}{\dotfill}\NR \NC a_{n1} \NC a_{n2} \NC a_{n3} \NC \cdots \NC a_{nn} \NR\stopdeterminant
This was working before today but I updated ConTeXt and it has stopped working. The error it gives me now is:
tex error > tex error on line 277 in file determinants.tex: You can't use '\Ustopmath' in restricted horizontal mode
How can I get it working again?
-- Respect, Shiv Shankar Dayal I never seen \multispan before. But this seems to work:
\multispan is a plain TeX command to create cells which span multiple columns and makes only sense when you create tables with the \halign primitive because tables in context use hidden cells for padding on the left and right etc.
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Respect, Shiv Shankar Dayal
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Shiv Shankar Dayal schrieb am 06.08.2024 um 19:30:
Hi,
I still do not know why it stopped working after the latest update.
Which version was your last one you used? Just because it worked without an error message before doesn't mean your input is the right way. Especially when you have to pass 9 as argument to \multispan even though you have only 5 columns should be alarming. The reason for the error here is that Context creates a template for each matrix cell which enables and disable math mode at the begin of each cell but when you use \multispan the template is ignored and you have to provide your own settings. The problem no is that no math mode is entered at the begin of your new marge cell but Context always adds a end of math mode trigger when it reaches the \NR command at the end of the row. Wolfgang
![](https://secure.gravatar.com/avatar/46da49256462126dbe77187c073aa6c6.jpg?s=120&d=mm&r=g)
LuaMetaTeX 2.11.03 20240517 + ConTeXt LMTX 2024.05.17 16:32
On Wed, Aug 7, 2024 at 12:40 AM Wolfgang Schuster
Shiv Shankar Dayal schrieb am 06.08.2024 um 19:30:
Hi,
I still do not know why it stopped working after the latest update.
Which version was your last one you used?
Just because it worked without an error message before doesn't mean your input is the right way. Especially when you have to pass 9 as argument to \multispan even though you have only 5 columns should be alarming.
The reason for the error here is that Context creates a template for each matrix cell which enables and disable math mode at the begin of each cell but when you use \multispan the template is ignored and you have to provide your own settings. The problem no is that no math mode is entered at the begin of your new marge cell but Context always adds a end of math mode trigger when it reaches the \NR command at the end of the row.
Wolfgang
-- Respect, Shiv Shankar Dayal
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Shiv Shankar Dayal schrieb am 06.08.2024 um 21:17:
LuaMetaTeX 2.11.03 20240517 + ConTeXt LMTX 2024.05.17 16:32
I had a copy of this older version and the cell handling was different back then. Still the correct way to add filler symbols in a matrix is the \HF command which has two optional commands where you can a) set the number of columns which should be filled and b) the filler alternative to be used for the symbol. Wolfgang
participants (4)
-
Aditya Mahajan
-
Mikael Sundqvist
-
Shiv Shankar Dayal
-
Wolfgang Schuster