ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mikael Sundqvist via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Mikael Sundqvist <mickep@gmail.com>
Subject: Suggestions for more math classes?
Date: Thu, 27 Jan 2022 09:36:40 +0100	[thread overview]
Message-ID: <CAHy-LL-P6GMfJ56tVwBfOc_1+TvDGXknATmaz7QX3eR-51w-fQ@mail.gmail.com> (raw)

Dear all,

While discussing spacing in math with Hans, we have come to the
conclusion that to have better control and cleaner code there might be
a good idea to have more math classes than the usual ones in TeX (ord,
op, bin, rel, open, close, punct, inner (and some that we need not to
think about)).

So far, Hans has implemented frac and rad for fractions and radicals.
The fractions has been a funny construction, being put inside empty
delimiters, and so surrounded by the \nulldelimiterspace (which has
been set to 1.2pt, independent of font size). Now we have better
control of the spacing around fractions.

Hans has opened up (even in the code) for the addition of more
classes. The overall aim is to have a more coherent and logical way of
typing math, without manual adding of (arbitrary) spaces every now and
then. For example, we have always written \int f(x)\, dx to have a
thin space between the closing parenthesis and the d in integrals.
There will (most likely) be a differential class. Since the d might
occur in other places in a formula with integrals, one cannot just
simply give the letter d the differential class, and we are currently
discussing the correct way for the user to type it. If you have
suggestions, please let us hear!

Some further suggestions by Hans are (see below for two more)

13 imaginary
14 differential
15 exponential
16 function

Q1: Do you have any further suggestions on new classes (or comments on
these)? It might be good to think about situations where you have felt
that you need to insert manual spaces such as \, or \! to obtain a
better result.

I give one contribution: I asked a colleague to look in his TeX files
for manual spaces, and he came up with several \, (usually before the
d in integrals) but also with \!. This \! occurred mostly in fencing
situations to have the exponent come a bit closer to the closing
parenthesis.

\left( \frac{x}{2} \right)^{\! k+2n}

I have seen this in many places before, so no originality is claimed.

Two more classes that we thought of are under and over. Say that we
have a\overbar{bc}d. Should the spacing between a and the \overbar{bc}
and the spacing between \overbar{bc} and d always be tight? If so,
these might just be ord, and no new class needed (although one could
argue for adding the classes now, set them up as ord, and thus being
able to configure them according to taste/need).

Q2: Do you have any real examples of constructions with \overbar,
\underbar, \overbrace, ... or if you have any strong opinion, please
raise your voice!

/Mikael
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@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
___________________________________________________________________________________

             reply	other threads:[~2022-01-27  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  8:36 Mikael Sundqvist via ntg-context [this message]
2022-01-27 18:43 ` Hans Hagen via ntg-context
2022-02-16 14:29 ` Gavin via ntg-context
2022-02-16 15:14   ` Hans Hagen via ntg-context

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=CAHy-LL-P6GMfJ56tVwBfOc_1+TvDGXknATmaz7QX3eR-51w-fQ@mail.gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=mickep@gmail.com \
    /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).