ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jim <zlists+context@jdvb.ca>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: How hard should something get \smash-ed ?
Date: Mon, 13 Jan 2025 10:58:19 -0400	[thread overview]
Message-ID: <Z4UqC9pjldOSvCdZ@x360.localdomain> (raw)
In-Reply-To: <CAHy-LL8H0OvDJyDotVF6D5BNA8r5Swncieha+qi40r18jYDqNw@mail.gmail.com>

Hi Mikael et al,

On Mon, Jan 13, 2025 at 07:44 (+0100), Mikael Sundqvist wrote:

> Hi,

> On Mon, Jan 13, 2025 at 1:43 AM Jim <zlists+context@jdvb.ca> wrote:

>> Hi,

>> In plain TeX,

>> $$\smash{\sum_0^n}$$

>> is set in \displaystyle, just like

>> $$\smash{\sum_0^n}$$


>> However, ConTeXt

>> \starttext
>> $$\smash{\sum^0_n}$$
>> \stoptext

>> outputs the above in \textstyle, whereas

>> \starttext
>> $$\sum^0_n$$
>> \stoptext

>> is in (of course(?)) \displaystyle.

>> Is this difference intentional?


> Thanks for reporting. I don't think it is intentional. (Can you show your
> real world example where \smash is needed? It seems to not really be used
> in any macro in ConTeXt.)

At the risk of citing an example using a deprecated feature, in
        https://wiki.contextgarden.net/Tables/Deprecated/Table
the following example is shown:

\starttable[|M|c|]
\HL
\VL \VL a \VL \AR
\DC \DL[1] \DR
\VL \smash{\displaystyle\sum_0^N} \VL b \VL \AR
\DC \DL[1] \DR
\VL \VL c \VL \AR
\HL
\stoptable

Without \smash{}, the second row is higher than (presumably) whomever wrote
the example wanted.  I can imagine someone wanting to do something like
that in another type of table, even using a non-deprecated type of table.

(I added \displaystyle to the example yesterday to make it do what the
example's author intended.)


> PS $$ is not meant to be used in ConTeXt.  If you want inline math in
> display style, use \dm {}, and if you want displayed formulas in display
> style, use \startformula \stopformula.

Yeah...  as a very-long-time plain TeX user, old habits die hard (and I am
not using any math in my current main use of ConTeXt).

The main reason for using $$ in my report was because that is what is in
the wiki page.  (And the issue is still there with \startformula and
\stopformula anyway.)

Cheers.
                                        Jim
___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2025-01-13 15:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13  0:40 [NTG-context] " Jim
2025-01-13  6:44 ` [NTG-context] " Mikael Sundqvist
2025-01-13  7:49   ` Hans Hagen via ntg-context
2025-01-13 15:21     ` Jim
2025-01-13 14:58   ` Jim [this message]
2025-01-13 16:14     ` Hans Hagen via ntg-context
2025-01-13 16:28       ` Jim

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=Z4UqC9pjldOSvCdZ@x360.localdomain \
    --to=zlists+context@jdvb.ca \
    --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).