From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/99062 Path: news.gmane.org!.POSTED!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: Re: Tagging and Math Matrix Date: Thu, 07 Sep 2017 05:51:20 +0000 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2795529971493913226==" X-Trace: blaine.gmane.org 1504763545 9243 195.159.176.226 (7 Sep 2017 05:52:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 7 Sep 2017 05:52:25 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 07 07:52:20 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dppjS-0001Yv-ED for gctc-ntg-context-518@m.gmane.org; Thu, 07 Sep 2017 07:52:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 42EF1FC13F9; Thu, 7 Sep 2017 07:51:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0NX8Hho0nXLJ; Thu, 7 Sep 2017 07:51:44 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 7BF1EFC13ED; Thu, 7 Sep 2017 07:51:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4BC5EFC13EA for ; Thu, 7 Sep 2017 07:51:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SeyhumesYYLk for ; Thu, 7 Sep 2017 07:51:42 +0200 (CEST) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 55B47FC12B5 for ; Thu, 7 Sep 2017 07:51:32 +0200 (CEST) Original-Received: by mail-wm0-f48.google.com with SMTP id i145so1908446wmf.1 for ; Wed, 06 Sep 2017 22:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=lSrBPOx8FfaXEqneh69oyhlZAfBK2tvH8S4YcPAViAQ=; b=oFfDBeXZrfjVAMD+XbS96+35MipldO0u4mOcCLEJrxs0NUJNR3k3TV5fjrqljnsPwu 5ueKrb3l1SkeYSihwKz3UGshrqia5RUHj43RBBaaJQVT0w9wScu+Z9szZbTUh6+NdjIy oPEaEdKtw6QgQdbz+Rct2auvnYN3BVQrWDLA3NS+eV3M2qXznwhr15XsRRi3/K8P9TIC ZgKm/wR+3YkRdDlv8F+EItp6w70jg+Ly5WPIhV02MLUxYqu9xoK89kdOTx6Y5nwcd63S G/dEe+JmJtaZbQa5v5AuJ8kyGkBeNa+989EyI5UMhMUqA87z8m+H/0ahul3g/TlwzMTq xnPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=lSrBPOx8FfaXEqneh69oyhlZAfBK2tvH8S4YcPAViAQ=; b=OecI8+e+uLJdArgJfzaf+pwZRk+1Zbkk73S35E2KjNuibm4ofx9dJm/JYv+yInIUpP e8Z2xAst8yy6k+m7Pk/Qj6g/nz/dDg4jMIkFscWazL7jmNbKtydTgVPS/1vEq+ILJk0L Kp1S2UDMyourUlxQCuKLbFdqFCz822FF0HK2V/7ivWP7TITbVrn7fygiHlm7DS4qmmxB NGe38ePy30y1+fcBER9OHzwnYgtZuyKu+upKoDD2ar5hiITcSlniWhF46cuzcKEHnJHg KtbK1vugdCbwgwxB/pKj0f9XdSiTZK77rxDaAKGN+eMhVE93ovQnCebTdQ/cjWAjccPL g1CQ== X-Gm-Message-State: AHPjjUjaZAz7DkhFLECrmoCpk/A7Fy+O1WGkQ6aWppKnNOM6i/0SrgOf AMYuw5/u7GPctJ8hrOKPAPa8AlU1Gw== X-Google-Smtp-Source: ADKCNb7wGCmWbEciVFhP6yuLcMgQuua6UIWYQ528pc70IjroEObeg1mW968YZgQleUgQ5OxChRrQMkzd+NeMgOG0VVY= X-Received: by 10.80.224.8 with SMTP id e8mr1560778edl.259.1504763491518; Wed, 06 Sep 2017 22:51:31 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:99062 Archived-At: --===============2795529971493913226== Content-Type: multipart/alternative; boundary="089e08220db8620bc10558930dbd" --089e08220db8620bc10558930dbd Content-Type: text/plain; charset="UTF-8" On Wed, 6 Sep 2017 11:25:51 +0200 Hans Hagen wrote: > On 9/6/2017 9:55 AM, Christoph Reller wrote: > > On Tue, 5 Sep 2017 16:29:52 +0200 Hans Hagen > > wrote: > > > > On 8/30/2017 9:45 AM, Christoph Reller wrote: > > > On Mon, Dec 28, 2015 at 3:45 PM Christoph Reller > > > 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: |- | '- | '- | '- | '- '- '- |- | |- | | '- | | '- | | '- | | '-"A" | '- | '- | '- | '- | '-"B" '- |- | '- | '- | '- | '-"C" '- '- '- '- '-"D" I think that the should be located within the , shouldn't it? Cheers, Christoph --089e08220db8620bc10558930dbd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 6 Sep = 2017 11:25:51 +0200=C2=A0Hans Hagen <pragma@wxs.nl>=C2=A0wrote:
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@w= xs.nl>>=C2=A0=C2=A0=C2=A0wrote:
>
>=C2=A0 =C2=A0 =C2=A0On 8/30/2017 9:45 AM, Christoph Reller wrote:
>=C2=A0 =C2=A0 =C2=A0 > On Mon, Dec 28, 2015 at 3:45 PM Christoph Rel= ler
>=C2=A0 =C2=A0 =C2=A0 > <christoph.reller@gmail.com> wrote:
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > There seems to be a problem with the structur= e information added
>=C2=A0 =C2=A0 =C2=A0 > when using=C2=A0\startmatrix:
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > A fix would be very much appreciated.
>
>=C2=A0 =C2=A0 =C2=A0should be ok now
>
>
> Thank you Hans for this fix!
>
> There seems to be, however, still a minor issue with a more complete M= WE:
> \math{
>=C2=A0 =C2=A0 \startmatrix
>=C2=A0 =C2=A0 =C2=A0 \NC A \NC B \NR
>=C2=A0 =C2=A0 =C2=A0 \NC C \NC D \NR
>=C2=A0 =C2=A0 \stopmatrix}

can you test with

\def\math_matrix_process#1#2%
=C2=A0 =C2=A0{\forgettagging % otherwise dummy mrows and such
=C2=A0 =C2=A0 \dowithnextbox
=C2=A0 =C2=A0 =C2=A0 {\scratchdimen\dimexpr(\nextboxdp-\nextboxht)/2
\ifcase#2\or+\mathaxisheight\textfont2\fi\relax

\ifcase#1\relax\or\lower\scratchdimen\or\or\raise\scratchdimen\fi\hbox\bgro= up
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\normalstartimath
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\mathmatrixparameter\c!left
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\vcenter{\unvbox\nextbox}%
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\mathmatrixparameter\c!right
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\normalstopimath
=C2=A0 =C2=A0 =C2=A0 =C2=A0\egroup}%
=C2=A0 =C2=A0 \vbox}

Indeed, this is mu= ch better! Thank you!
I recommend to include this as a patch in C= onTeXt.

However: Testing never stops ;-) I hav= e the following MWE:

\definemathmatrix[pmatri= x][left=3D{\left(},right=3D{\right)}]
\math{
=C2=A0 \st= artpmatrix
=C2=A0 =C2=A0 \NC A \NC B \NR
=C2=A0 =C2=A0 = \NC C \NC D \NR
=C2=A0 \stoppmatrix}

This (including your suggested fix) results in the following structure t= ree:

<document>
|-<math>= ;
| '-<mrow>
| =C2=A0 '-<mrow>
| =C2=A0 =C2=A0 '-<mfenced>
| =C2=A0 =C2=A0 =C2= =A0 '-<mrow>
'-<math>
=C2=A0 '-= <mtable>
=C2=A0 =C2=A0 |-<mtr>
=C2=A0 =C2= =A0 | |-<mtd>
=C2=A0 =C2=A0 | | '-<math>
=C2=A0 =C2=A0 | | =C2=A0 '-<mrow>
=C2=A0 =C2=A0 | | = =C2=A0 =C2=A0 '-<mi>
=C2=A0 =C2=A0 | | =C2=A0 =C2=A0 = =C2=A0 '-"A"
=C2=A0 =C2=A0 | '-<mtd>
=C2=A0 =C2=A0 | =C2=A0 '-<math>
=C2=A0 =C2=A0 | = =C2=A0 =C2=A0 '-<mrow>
=C2=A0 =C2=A0 | =C2=A0 =C2=A0 = =C2=A0 '-<mi>
=C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2= =A0 '-"B"
=C2=A0 =C2=A0 '-<mtr>
=C2=A0 =C2=A0 =C2=A0 |-<mtd>
=C2=A0 =C2=A0 =C2=A0 | '-= <math>
=C2=A0 =C2=A0 =C2=A0 | =C2=A0 '-<mrow>
=C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 '-<mi>
=C2= =A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 '-"C"
=C2= =A0 =C2=A0 =C2=A0 '-<mtd>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &= #39;-<math>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-<mr= ow>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-<mi>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-"D&q= uot;

I think that the <mtable> should = be located within the <mfenced>, shouldn't it?

Cheers,
Christoph

--089e08220db8620bc10558930dbd-- --===============2795529971493913226== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============2795529971493913226==--