[NTG-context] Math align not working

Johann Birnick johann.birnick at hotmail.de
Sat Jan 9 13:59:29 CET 2021


Hi Aditya,

thank you very much, now I need to specify the alignment only for one "column"
and it gets applied for all of them. However, there is still the problem with
the standard setting of the alignment. For example, 

\starttext
\startformula \startalign[m=2, align={right,left}]
\NC ab \NC = cd
\NC efgh \NC = ijkl \NR
\NC efgh \NC = ijkl
\NC ab \NC = cd \NR
\stopalign \stopformula
\stoptext

works now. But the setting [align={right,left}] should be the standard when n is
not set. So (also according to your documentation) the following code 

\starttext
\startformula \startalign[m=2]
\NC ab \NC = cd
\NC efgh \NC = ijkl \NR
\NC efgh \NC = ijkl
\NC ab \NC = cd \NR
\stopalign \stopformula
\stoptext

should work, but it doesn't. The first column is right-oriented, the third (i.e.
the first in the right "column") not.

Could you please fix that?

Thanks you very much,
Johann


On Sat, 2021-01-02 at 02:15 -0500, Aditya Mahajan wrote:
> On Fri, 1 Jan 2021, Hans Hagen wrote:
> 
> > On 1/1/2021 8:21 AM, Aditya Mahajan wrote:
> > > \startformula \startalign[m=2,distance=8em,n=5,
> > > align={right,middle,middle,middle,left, right,middle,middle,middle,left}]
> > > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10
> > > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
> > > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15
> > > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
> > > \stopalign \stopformula
> > > 
> > > \stoptext
> > 
> > 
> > Aditya:
> > 
> > can you check this?
> > 
> > \def\math_build_eqalign
> >   {\scratchtoks\emptytoks
> >    \d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
> >    \scratchcounterone\mathalignmentparameter\c!m
> >    \scratchcountertwo\mathalignmentparameter\c!n
> >    \etoksapp\scratchtoks{\the\t_math_align_a}%
> >    \scratchcounter\plusone
> >    \dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
> >      {\ifnum\scratchcounter=\scratchcountertwo
> >         \scratchcounter\plusone
> >         \etoksapp\scratchtoks{\math_eqalign_distance}%
> >         \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
> >       \else
> >         \advance\scratchcounter\plusone
> >       \fi
> >       \etoksapp\scratchtoks{\the\t_math_align_b}}%
> >    \etoksapp\scratchtoks{\the\t_math_align_c}}
> > 
> > 
> > I added:
> > 
> >         \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
> > 
> 
> This works nicely. Thanks.
> 
> I'll also go back to the mathalign document and try to update it for the
> current LMTX to catch other regressions which might have happened.
> 
> Aditya
> ______________________________________________________________________________
> _____
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context at 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
> ______________________________________________________________________________
> _____



More information about the ntg-context mailing list