ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerion Entrup <gerion.entrup@flump.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Strange extra space when using cases in an inner align in math
Date: Sun, 25 Aug 2024 15:53:00 +0200	[thread overview]
Message-ID: <24298697.ouqheUzb2q@falbala> (raw)
In-Reply-To: <CAHy-LL85Ln6oxbevDE=jaM-Z0=QUyzR_3hR1rQwXyKweCXOKEA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3814 bytes --]

Hi Mikael,

your examples are simpler, that is correct, but all of them have the extra space.
Thanks for the simpler code, I will integrate it!

Gerion

Am Dienstag, 20. August 2024, 12:41:45 MESZ schrieb Mikael Sundqvist:
> 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 <gerion.entrup@flump.de> wrote:
> >
> > 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___________________________________________________________________________________


[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

  reply	other threads:[~2024-08-25 13:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  9:50 [NTG-context] " Gerion Entrup
2024-08-20 10:41 ` [NTG-context] " Mikael Sundqvist
2024-08-25 13:53   ` Gerion Entrup [this message]
2024-08-25 20:11     ` Mikael Sundqvist
2024-09-27  9:24       ` Gerion Entrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24298697.ouqheUzb2q@falbala \
    --to=gerion.entrup@flump.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).