* Tagging and Math Matrix
@ 2015-12-28 14:33 Christoph Reller
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Reller @ 2015-12-28 14:33 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 341 bytes --]
Hi,
There seems to be a problem with the structure information added when using
\startmatrix:
\setuptagging[state=start]
\starttext
\math{
\startmatrix
\NC A \NR
\NC B \NR
\stopmatrix}
\stoptext
The log reports an open chain: document>1 => mtr>1 => mtd>1 => mtr>2 =>
mtd>2 => mtr>3
This may be a bug.
Kind regards,
Christoph
[-- Attachment #1.2: Type: text/html, Size: 603 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tagging and Math Matrix
2017-09-07 5:51 ` Christoph Reller
@ 2017-09-07 18:23 ` Hans Hagen
0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2017-09-07 18:23 UTC (permalink / raw)
To: ntg-context
On 9/7/2017 7:51 AM, Christoph Reller wrote:
> However: Testing never stops ;-) I have the following MWE:
These alignments are kind of tricky. I made a fix (will upload later)
but we need more tests or actually a proper test suite for this. I'm
pretty sure that there are other issues. (For instance one needs to get
rid of artifacts related to spacing and wrappers.)
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] 7+ messages in thread
* Re: Tagging and Math Matrix
[not found] <mailman.97.1504689965.1988.ntg-context@ntg.nl>
@ 2017-09-07 5:51 ` Christoph Reller
2017-09-07 18:23 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Reller @ 2017-09-07 5:51 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 2297 bytes --]
On Wed, 6 Sep 2017 11:25:51 +0200 Hans Hagen <pragma@wxs.nl> wrote:
> On 9/6/2017 9:55 AM, Christoph Reller wrote:
> > On Tue, 5 Sep 2017 16:29:52 +0200 Hans Hagen <pragma@wxs.nl
> > <mailto:pragma@wxs.nl>> wrote:
> >
> > On 8/30/2017 9:45 AM, Christoph Reller wrote:
> > > On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller
> > > <christoph.reller@gmail.com> wrote:
> > >
> > > There seems to be a problem with the structure information added
> > > when using \startmatrix:
> > >
> > > A fix would be very much appreciated.
> >
> > should be ok now
> >
> >
> > Thank you Hans for this fix!
> >
> > There seems to be, however, still a minor issue with a more complete MWE:
> > \math{
> > \startmatrix
> > \NC A \NC B \NR
> > \NC C \NC D \NR
> > \stopmatrix}
>
> can you test with
>
> \def\math_matrix_process#1#2%
> {\forgettagging % otherwise dummy mrows and such
> \dowithnextbox
> {\scratchdimen\dimexpr(\nextboxdp-\nextboxht)/2
> \ifcase#2\or+\mathaxisheight\textfont2\fi\relax
>
>
> \ifcase#1\relax\or\lower\scratchdimen\or\or\raise\scratchdimen\fi\hbox\bgroup
> \normalstartimath
> \mathmatrixparameter\c!left
> \vcenter{\unvbox\nextbox}%
> \mathmatrixparameter\c!right
> \normalstopimath
> \egroup}%
> \vbox}
>
Indeed, this is much better! Thank you!
I recommend to include this as a patch in ConTeXt.
However: Testing never stops ;-) I have the following MWE:
\definemathmatrix[pmatrix][left={\left(},right={\right)}]
\math{
\startpmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stoppmatrix}
This (including your suggested fix) results in the following structure tree:
<document>
|-<math>
| '-<mrow>
| '-<mrow>
| '-<mfenced>
| '-<mrow>
'-<math>
'-<mtable>
|-<mtr>
| |-<mtd>
| | '-<math>
| | '-<mrow>
| | '-<mi>
| | '-"A"
| '-<mtd>
| '-<math>
| '-<mrow>
| '-<mi>
| '-"B"
'-<mtr>
|-<mtd>
| '-<math>
| '-<mrow>
| '-<mi>
| '-"C"
'-<mtd>
'-<math>
'-<mrow>
'-<mi>
'-"D"
I think that the <mtable> should be located within the <mfenced>, shouldn't
it?
Cheers,
Christoph
[-- Attachment #1.2: Type: text/html, Size: 4001 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Tagging and Math Matrix
2017-09-06 7:55 ` Christoph Reller
@ 2017-09-06 9:25 ` Hans Hagen
0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2017-09-06 9:25 UTC (permalink / raw)
To: ntg-context
On 9/6/2017 9:55 AM, Christoph Reller wrote:
> On Tue, 5 Sep 2017 16:29:52 +0200 Hans Hagen <pragma@wxs.nl
> <mailto:pragma@wxs.nl>> wrote:
>
> On 8/30/2017 9:45 AM, Christoph Reller wrote:
> > On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller
> > <christoph.reller@gmail.com <mailto:christoph.reller@gmail.com>
> <mailto:christoph.reller@gmail.com
> <mailto:christoph.reller@gmail.com>>> wrote:
> >
> > There seems to be a problem with the structure information added
> > when using \startmatrix:
> >
> > A fix would be very much appreciated.
>
> should be ok now
>
>
> Thank you Hans for this fix!
>
> There seems to be, however, still a minor issue with a more complete MWE:
> \math{
> \startmatrix
> \NC A \NC B \NR
> \NC C \NC D \NR
> \stopmatrix}
can you test with
\def\math_matrix_process#1#2%
{\forgettagging % otherwise dummy mrows and such
\dowithnextbox
{\scratchdimen\dimexpr(\nextboxdp-\nextboxht)/2
\ifcase#2\or+\mathaxisheight\textfont2\fi\relax
\ifcase#1\relax\or\lower\scratchdimen\or\or\raise\scratchdimen\fi\hbox\bgroup
\normalstartimath
\mathmatrixparameter\c!left
\vcenter{\unvbox\nextbox}%
\mathmatrixparameter\c!right
\normalstopimath
\egroup}%
\vbox}
> The resulting structure tree is as follows:
> <document>
> '-<math>
> '-<mrow>
> '-<mtext>
> '-<mrow>
> |-<mrow>
> | '-<mtr>
> | |-<mtd>
> | | '-<math>
> | | '-<mrow>
> | | '-<mi>
> | | '-"A"
> | '-<mtd>
> | '-<math>
> | '-<mrow>
> | '-<mi>
> | '-"B"
> |-<mrow> (*)
> |-<mrow>
> | '-<mtr>
> | |-<mtd>
> | | '-<math>
> | | '-<mrow>
> | | '-<mi>
> | | '-"C"
> | '-<mtd>
> | '-<math>
> | '-<mrow>
> | '-<mi>
> | '-"D"
> '-<mrow> (*)
>
> The elements marked with (*) are IMHO unnecessary. Do you agree?
>
> Cheers
> Christoph
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
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] 7+ messages in thread
* Re: Tagging and Math Matrix
[not found] <mailman.83.1504639917.1988.ntg-context@ntg.nl>
@ 2017-09-06 7:55 ` Christoph Reller
2017-09-06 9:25 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Reller @ 2017-09-06 7:55 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]
On Tue, 5 Sep 2017 16:29:52 +0200 Hans Hagen <pragma@wxs.nl> wrote:
> On 8/30/2017 9:45 AM, Christoph Reller wrote:
> > On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller
> > <christoph.reller@gmail.com <mailto:christoph.reller@gmail.com
> >> wrote:
> >
> > There seems to be a problem with the structure information added
> > when using \startmatrix:
> >
> > A fix would be very much appreciated.
>
> should be ok now
>
Thank you Hans for this fix!
There seems to be, however, still a minor issue with a more complete MWE:
\math{
\startmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopmatrix}
The resulting structure tree is as follows:
<document>
'-<math>
'-<mrow>
'-<mtext>
'-<mrow>
|-<mrow>
| '-<mtr>
| |-<mtd>
| | '-<math>
| | '-<mrow>
| | '-<mi>
| | '-"A"
| '-<mtd>
| '-<math>
| '-<mrow>
| '-<mi>
| '-"B"
|-<mrow> (*)
|-<mrow>
| '-<mtr>
| |-<mtd>
| | '-<math>
| | '-<mrow>
| | '-<mi>
| | '-"C"
| '-<mtd>
| '-<math>
| '-<mrow>
| '-<mi>
| '-"D"
'-<mrow> (*)
The elements marked with (*) are IMHO unnecessary. Do you agree?
Cheers
Christoph
[-- Attachment #1.2: Type: text/html, Size: 2855 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Tagging and Math Matrix
2017-08-30 7:45 ` Christoph Reller
@ 2017-09-05 14:29 ` Hans Hagen
0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2017-09-05 14:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 8/30/2017 9:45 AM, Christoph Reller wrote:
> On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller
> <christoph.reller@gmail.com <mailto:christoph.reller@gmail.com>> wrote:
>
> There seems to be a problem with the structure information added
> when using
> \startmatrix:
>
> \setuptagging[state=start]
> \starttext
> \math{
> \startmatrix
> \NC A \NR
> \NC B \NR
> \stopmatrix}
> \stoptext
>
> The log reports an open chain: document>1 => mtr>1 => mtd>1 => mtr>2 =>
> mtd>2 => mtr>3
> This may be a bug.
>
>
> This is clearly a bug. The resulting structure tree of the above MWE is
> as follows (sorry for the ASCII art):
>
> <document>
> '-<mtr>
> '-<mtd>
> |-<mtr>
> | '-<mtd>
> | |-<mtr>
> | | '-<mtd>
> | | |-<math>
> | | | '-<mrow>
> | | | '-<mtext>
> | | | '-<mrow>
> | | | |-<mrow>
> | | | '-<mrow>
> | | '-<math>
> | | '-<mrow>
> | | '-<mtext>
> | | |-<mrow>
> | | '-<mrow>
> | '-<math>
> | '-<mrow>
> | '-<mi>
> | '-"B"
> '-<math>
> '-<mrow>
> '-<mi>
> '-"A"
>
> A fix would be very much appreciated.
should be ok now
--
-----------------------------------------------------------------
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] 7+ messages in thread
* Re: Tagging and Math Matrix
[not found] <mailman.345.1451313540.2404.ntg-context@ntg.nl>
@ 2017-08-30 7:45 ` Christoph Reller
2017-09-05 14:29 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Reller @ 2017-08-30 7:45 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1112 bytes --]
On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller <christoph.reller@gmail.com
> wrote:
> There seems to be a problem with the structure information added when using
> \startmatrix:
>
> \setuptagging[state=start]
> \starttext
> \math{
> \startmatrix
> \NC A \NR
> \NC B \NR
> \stopmatrix}
> \stoptext
>
> The log reports an open chain: document>1 => mtr>1 => mtd>1 => mtr>2 =>
> mtd>2 => mtr>3
> This may be a bug.
>
This is clearly a bug. The resulting structure tree of the above MWE is as
follows (sorry for the ASCII art):
<document>
'-<mtr>
'-<mtd>
|-<mtr>
| '-<mtd>
| |-<mtr>
| | '-<mtd>
| | |-<math>
| | | '-<mrow>
| | | '-<mtext>
| | | '-<mrow>
| | | |-<mrow>
| | | '-<mrow>
| | '-<math>
| | '-<mrow>
| | '-<mtext>
| | |-<mrow>
| | '-<mrow>
| '-<math>
| '-<mrow>
| '-<mi>
| '-"B"
'-<math>
'-<mrow>
'-<mi>
'-"A"
A fix would be very much appreciated.
Thanks in advance,
Christoph
[-- Attachment #1.2: Type: text/html, Size: 2170 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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] 7+ messages in thread
end of thread, other threads:[~2017-09-07 18:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-28 14:33 Tagging and Math Matrix Christoph Reller
[not found] <mailman.345.1451313540.2404.ntg-context@ntg.nl>
2017-08-30 7:45 ` Christoph Reller
2017-09-05 14:29 ` Hans Hagen
[not found] <mailman.83.1504639917.1988.ntg-context@ntg.nl>
2017-09-06 7:55 ` Christoph Reller
2017-09-06 9:25 ` Hans Hagen
[not found] <mailman.97.1504689965.1988.ntg-context@ntg.nl>
2017-09-07 5:51 ` Christoph Reller
2017-09-07 18:23 ` 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).