\startmatrix bug in beta
Hi Hans/ Aditya, With the latest beta, \startmatrix's final \NR creates a superfluous line, resulting in ugly output: \starttext \startformula \startmatrix[left={\left(\,},right={\,\right)}] \NC 0 \NR \NC 0 \NR \NC 0 \NR % removing this fixes the output \stopmatrix \stopformula \stoptext Best wishes, Taco
On Tue, 17 May 2011, Taco Hoekwater wrote:
Hi Hans/ Aditya,
With the latest beta, \startmatrix's final \NR creates a superfluous line, resulting in ugly output:
This has been present for a while now, so not introduced by any recent change. I'll try to figure out what is going wrong (I suspect a \cr instead of a \crcr). Aditya
On Tue, 17 May 2011, Taco Hoekwater wrote:
Hi Hans/ Aditya,
With the latest beta, \startmatrix's final \NR creates a superfluous line, resulting in ugly output:
Bugfix: In \dodefinemathmatrix, change \setuvalue{\e!stop #1}{\dostopmathmatrix}% to \setvalue{\e!stop #1}{\dostopmathmatrix}% If someone wants to correct this in a working document, add \let\stopmatrix\dostopmathmatrix somewhere before \starttext
\starttext \startformula \startmatrix[left={\left(\,},right={\,\right)}] \NC 0 \NR \NC 0 \NR \NC 0 \NR % removing this fixes the output \stopmatrix \stopformula \stoptext
I don't know why \setuvalue gives an extra space. Hopefully, you or Hans will be able to figure that out. Aditya
On 18-5-2011 6:58, Aditya Mahajan wrote:
On Tue, 17 May 2011, Taco Hoekwater wrote:
Hi Hans/ Aditya,
With the latest beta, \startmatrix's final \NR creates a superfluous line, resulting in ugly output:
Bugfix:
In \dodefinemathmatrix, change
\setuvalue{\e!stop #1}{\dostopmathmatrix}%
to
\setvalue{\e!stop #1}{\dostopmathmatrix}%
If someone wants to correct this in a working document, add
\let\stopmatrix\dostopmathmatrix
somewhere before \starttext
\starttext \startformula \startmatrix[left={\left(\,},right={\,\right)}] \NC 0 \NR \NC 0 \NR \NC 0 \NR % removing this fixes the output \stopmatrix \stopformula \stoptext
I don't know why \setuvalue gives an extra space. Hopefully, you or Hans will be able to figure that out.
no clue yet but \unexpanded\def\dostopmathmatrix gives an extra row some day Taco and I will arrive at dealing with this lookahead in the perspective of protected (\unexpanded in context) macros issue in luatex (makes a nice topic for discussion on one of our travels to a conference) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 18 May 2011, Hans Hagen wrote:
On 18-5-2011 6:58, Aditya Mahajan wrote:
On Tue, 17 May 2011, Taco Hoekwater wrote:
Hi Hans/ Aditya,
With the latest beta, \startmatrix's final \NR creates a superfluous line, resulting in ugly output:
Bugfix:
In \dodefinemathmatrix, change
\setuvalue{\e!stop #1}{\dostopmathmatrix}%
to
\setvalue{\e!stop #1}{\dostopmathmatrix}%
If someone wants to correct this in a working document, add
\let\stopmatrix\dostopmathmatrix
somewhere before \starttext
\starttext \startformula \startmatrix[left={\left(\,},right={\,\right)}] \NC 0 \NR \NC 0 \NR \NC 0 \NR % removing this fixes the output \stopmatrix \stopformula \stoptext
I don't know why \setuvalue gives an extra space. Hopefully, you or Hans will be able to figure that out.
no clue yet but
\unexpanded\def\dostopmathmatrix
gives an extra row
Simpler example: \def\A{\halign \bgroup ## \crcr} \unexpanded\def\B{\crcr\egroup} \def\C{\crcr\egroup} \starttext \ruledvbox{\A A \cr B \cr \B} \ruledvbox{\A A \cr B \cr \C} \stoptext Same results with MkII and MkIV, so this is not a luatex issue. Aditya
On 18-5-2011 4:18, Aditya Mahajan wrote:
Simpler example:
\def\A{\halign \bgroup ## \crcr} \unexpanded\def\B{\crcr\egroup} \def\C{\crcr\egroup}
\starttext \ruledvbox{\A A \cr B \cr \B}
\ruledvbox{\A A \cr B \cr \C}
\ruledvbox{\A A \cr B \cr \relax \C}
\stoptext
I wonder what the rationale is behind this ... when we redo the matrix code we can prune such empty rows in lua. I always thought that \crcr was more clever. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Taco Hoekwater