[NTG-context] Math align not working

Hans Hagen j.hagen at xs4all.nl
Fri Jan 1 12:49:24 CET 2021


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}%

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
-----------------------------------------------------------------


More information about the ntg-context mailing list