Hi,
There is indeed a space added in this case. But you do not need n=3.
And in fact, you do not need a simplealign either, but can use an
ordinary align, with location=packed. It looks like you had the wrong
number of \NC. I hope the examples below help, the last one is merely
for Hans for looking into why the relation-digit space is added there.
/Mikael
\definemathsimplealign[inneralign]
\showglyphs
\showboxes
\showmakeup[mathglue]
\startdocument
OK with \typ {n=2} instead of \typ {n=3}:
\startformula
\startalign
\NC a = b \NC \NR
\NC \NC \startinneralign[n=2,align={1:right,2:left}]
\NC A \NC = B \NR
\NC f(x,y) \NC = \startcases
\NC 1 \NC a \NR
\NC 1 \NC b \NR
\NC 1 \NC b \NR
\stopcases
\NR
\stopinneralign
\NR
\stopalign
\stopformula
With align and location set to packed, instead of simplealign
\startformula
\startalign
\NC a = b \NC \NR
\NC \NC \startalign[n=2,location=packed,align={1:right,2:left}]
\NC A \NC = B \NR
\NC f(x,y) \NC = \startcases
\NC 1 \NC a \NR
\NC 1 \NC b \NR
\NC 1 \NC b \NR
\stopcases
\NR
\stopalign
\NR
\stopalign
\stopformula
Extra \typ {reldig} space before the 1:
\startformula
\startalign[n=3,location=packed,align={1:right,2:middle,2:left}]
\NC A \NC = \NC B \NR
\NC f(x,y) \NC = \NC \startcases
\NC 1 \NC a \NR
\NC 2 \NC b \NR
\stopcases
\NR
\stopalign
\stopformula
\stopdocument
On Tue, Aug 20, 2024 at 11:55 AM Gerion Entrup
Hi,
I currently have the case of a strange extra space in math mode when using cases in inner align.
Here is a MWE to demonstrate the problem: ``` \definemathsimplealign[inneralign] \startdocument \startformula \startalign \NC a = b \NR \NC \NC \startinneralign[n=3,align={1:right,2:middle,3:left}] \NC A \NC = \NC B \NR \NC f(x,y) \NC = \NC \startcases \NC \text{strange} \NC a \NR \NC \text{normal} \NC b \NR \NC \text{also normal} \NC b \NR \stopcases \stopinneralign \stopalign \stopformula \stopdocument ```
"strange" and "normal" are not aligned what I would expect but strange has more space in front of it. Is this a usage error or a bug in the math engine?
Best, Gerion___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________