* [NTG-context] math best practices
@ 2025-09-06 13:38 Henning Hraban Ramm
2025-09-06 14:45 ` [NTG-context] " Hans Hagen via ntg-context
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Henning Hraban Ramm @ 2025-09-06 13:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
Ahoi,
I’m working on the Math chapter of my ConTeXt book. As you know, this is
not my area of expertise, that’s why I try to keep it short and mostly
refer to the math manual.
What subjects do you think I should include for beginners or readers
switching from PlainTeX/LaTeX?
Probably \alignhere and \breakhere? What else is new & different?
I know there are some constructs that users should avoid, e.g. dollar
notation ($math$, $$math$$) and commands that need lookahead (\over,
\atop, \above). What else?
(Maybe an explicit “don’t do this” section in the math manual would make
sense.)
Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 13:38 [NTG-context] math best practices Henning Hraban Ramm
@ 2025-09-06 14:45 ` Hans Hagen via ntg-context
2025-09-06 17:23 ` Henning Hraban Ramm
2025-09-06 17:35 ` Jim
2025-09-06 18:18 ` Wolfgang Schuster
2 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen via ntg-context @ 2025-09-06 14:45 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 9/6/2025 3:38 PM, Henning Hraban Ramm wrote:
> Ahoi,
> I’m working on the Math chapter of my ConTeXt book. As you know, this is
> not my area of expertise, that’s why I try to keep it short and mostly
> refer to the math manual.
>
> What subjects do you think I should include for beginners or readers
> switching from PlainTeX/LaTeX?
> Probably \alignhere and \breakhere? What else is new & different?
just refer to the math manual ... maybe only mention \im for inlien math
and \startformula .. \stopformula for display .. leave it at that
> I know there are some constructs that users should avoid, e.g. dollar
> notation ($math$, $$math$$) and commands that need lookahead (\over,
> \atop, \above). What else?
no need to explain that ... if they use math, they can read the manual
because more is involved .. you can only confuse them
> (Maybe an explicit “don’t do this” section in the math manual would make
> sense.)
if someone who needs math comes to context he/she is probably willing
to check out the math manual anyway
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 14:45 ` [NTG-context] " Hans Hagen via ntg-context
@ 2025-09-06 17:23 ` Henning Hraban Ramm
0 siblings, 0 replies; 15+ messages in thread
From: Henning Hraban Ramm @ 2025-09-06 17:23 UTC (permalink / raw)
To: ntg-context
Am 06.09.25 um 16:45 schrieb Hans Hagen via ntg-context:
> On 9/6/2025 3:38 PM, Henning Hraban Ramm wrote:
>> Ahoi,
>> I’m working on the Math chapter of my ConTeXt book. As you know, this
>> is not my area of expertise, that’s why I try to keep it short and
>> mostly refer to the math manual.
>>
>> What subjects do you think I should include for beginners or readers
>> switching from PlainTeX/LaTeX?
>> Probably \alignhere and \breakhere? What else is new & different?
>
> just refer to the math manual ... maybe only mention \im for inlien math
> and \startformula .. \stopformula for display .. leave it at that
Of course I got that already.
>> I know there are some constructs that users should avoid, e.g. dollar
>> notation ($math$, $$math$$) and commands that need lookahead (\over,
>> \atop, \above). What else?
>
> no need to explain that ... if they use math, they can read the manual
> because more is involved .. you can only confuse them
Judging from discussions on this very mailing list, I guess it makes
sense to talk about outdated/discouraged commands that some are used to.
> > (Maybe an explicit “don’t do this” section in the math manual would make
> > sense.)
>
> if someone who needs math comes to context he/she is probably willing
> to check out the math manual anyway
Thank you, but I don’t think that’s enough. You could say that about
several other parts of documentation, but I find a different approach is
often helpful.
Even when I know that something is in the docs, I often enough find it
hard to find and/or grasp. And in writing this book I recognized how
much of ConTeXt is not documented at all, and that’s not only some
obscure features (of which some are quite interesting) but e.g. several
setup options of common features. On this mailing lists, regularly
someone (often Wolfgang) comes up with something I never heard of.
I see the paradox that only the developer can really document a software
system like ConTeXt, but documentation should not be written by the
developer, because they tend to omit the “obvious”.
I’m glad and thankful that you wrote so much documentation. I can’t even
keep up with reading, even less understanding. Some manuals are great
(like Metafun), but some are stuck in an incomplete state (like
Graphics). The math manual goes deep into some details, but I feel it’s
lacking a bit in overview and basics; maybe that’s just my lack of
understanding.
Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 13:38 [NTG-context] math best practices Henning Hraban Ramm
2025-09-06 14:45 ` [NTG-context] " Hans Hagen via ntg-context
@ 2025-09-06 17:35 ` Jim
2025-09-06 18:00 ` Henning Hraban Ramm
` (3 more replies)
2025-09-06 18:18 ` Wolfgang Schuster
2 siblings, 4 replies; 15+ messages in thread
From: Jim @ 2025-09-06 17:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]
On Sat, Sep 6, 2025 at 15:38 (+0200), Henning Hraban Ramm wrote:
> Ahoi,
Ahoi (Ahoy?)? Are you getting ready for International Talk Like A Pirate
Day? :-)
> I’m working on the Math chapter of my ConTeXt book. As you know, this is not
> my area of expertise, that’s why I try to keep it short and mostly refer to
> the math manual.
> What subjects do you think I should include for beginners or readers
> switching from PlainTeX/LaTeX?
> Probably \alignhere and \breakhere? What else is new & different?
I think you should mention that math isn't going to look the same.
For example, attached are two PDFs
-> plain tex: $3\over 4$
-> context: \im{\frac{3}{4}}
As can be seen, in ConTeXt there is a much bigger space between the '3' and
the horizontal line. (I *really* don't want to step on toes or sound like
a complete ingrate, especially in light of the large amount of effort
(AIUI) which has gone into math typesetting, but I strongly prefer the
plain TeX version.)
To help plain TeX (and maybe LaTeX) refugees understand that things which
look different may not be due to them doing something wrong, pointing out
some examples where there are some typesetting differences (I assume by
design) may make the adoption of ConTeXt more expeditious for some people.
Cheers.
Jim
P.S. On the other hand, if the attached ConTeXt output is *not* how things
are supposed to look, and my installation is somehow broken, someone please
let me know.
[-- Attachment #2: context.pdf --]
[-- Type: application/pdf, Size: 8111 bytes --]
[-- Attachment #3: plain.pdf --]
[-- Type: application/pdf, Size: 15576 bytes --]
[-- Attachment #4: 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 17:35 ` Jim
@ 2025-09-06 18:00 ` Henning Hraban Ramm
2025-09-06 18:07 ` Mikael Sundqvist
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Henning Hraban Ramm @ 2025-09-06 18:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 06.09.25 um 19:35 schrieb Jim:
> On Sat, Sep 6, 2025 at 15:38 (+0200), Henning Hraban Ramm wrote:
>
>> Ahoi,
> Ahoi (Ahoy?)? Are you getting ready for International Talk Like A Pirate
> Day? :-)
Maybe ahoj? (Czech. In Switzerland it’s more like ’hoi…)
> I think you should mention that math isn't going to look the same.
Ok.
> For example, attached are two PDFs
> -> plain tex: $3\over 4$
> -> context: \im{\frac{3}{4}}
>
> As can be seen, in ConTeXt there is a much bigger space between the '3' and
> the horizontal line. (I *really* don't want to step on toes or sound like
> a complete ingrate, especially in light of the large amount of effort
> (AIUI) which has gone into math typesetting, but I strongly prefer the
> plain TeX version.)
Apparently, \frac uses the strut height, incl. ascender and descender,
so \frac{n}{x} or \frac{g}{2} looks good. I agree that a single
\frac{3}{4} looks odd, but consistency matters? And probably it’s
configurable…
(But I’m not the one to argue about mathematical microtypography.)
Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 17:35 ` Jim
2025-09-06 18:00 ` Henning Hraban Ramm
@ 2025-09-06 18:07 ` Mikael Sundqvist
2025-09-06 18:59 ` Henning Hraban Ramm
2025-09-06 18:07 ` Hans Hagen via ntg-context
2025-09-06 18:15 ` Wolfgang Schuster
3 siblings, 1 reply; 15+ messages in thread
From: Mikael Sundqvist @ 2025-09-06 18:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
On Sat, Sep 6, 2025 at 7:39 PM Jim <zlists+context@jdvb.ca> wrote:
>
> On Sat, Sep 6, 2025 at 15:38 (+0200), Henning Hraban Ramm wrote:
>
> > Ahoi,
>
> Ahoi (Ahoy?)? Are you getting ready for International Talk Like A Pirate
> Day? :-)
>
> > I’m working on the Math chapter of my ConTeXt book. As you know, this is not
> > my area of expertise, that’s why I try to keep it short and mostly refer to
> > the math manual.
>
> > What subjects do you think I should include for beginners or readers
> > switching from PlainTeX/LaTeX?
> > Probably \alignhere and \breakhere? What else is new & different?
>
> I think you should mention that math isn't going to look the same.
>
> For example, attached are two PDFs
> -> plain tex: $3\over 4$
> -> context: \im{\frac{3}{4}}
Try
\startTEXpage[offset=1TS]
\dm {\frac {3}{4}}
\setupmathfractions
[strut=no]
\dm {\frac {3}{4}}
\stopTEXpage
>
> As can be seen, in ConTeXt there is a much bigger space between the '3' and
> the horizontal line. (I *really* don't want to step on toes or sound like
> a complete ingrate, especially in light of the large amount of effort
> (AIUI) which has gone into math typesetting, but I strongly prefer the
> plain TeX version.)
>
> To help plain TeX (and maybe LaTeX) refugees understand that things which
> look different may not be due to them doing something wrong, pointing out
> some examples where there are some typesetting differences (I assume by
> design) may make the adoption of ConTeXt more expeditious for some people.
I might have misunderstood the purpose of the book. I thought it was a
"ConTeXt book", where one explains and discusses ConTeXt. If it is
more of a "How to move from X to ConTeXt" book, then one could
probably add a few things:
* Use \im inline math.
* Use \startformula \stopformula for all displayed math. Show a few
examples with \alignhere, \breakhere and \numberhere. (The usual ones
are done in the displayed math chapter.)
* Explain that manual spaces inserted by \, and \! and so on are not
meant to be needed. For example, one often sees \,dx for
differentials, in ConTeXt, use \dd x.
* (Almost) everything is possible to set up. The keywords are
explained in the math manual. (The example above with fractions is one
example)
Also, not everything is perfect, so if there is a problem somewhere,
please tell. If the math manual is difficult to read, please point to
specific places where it is difficult. The idea is that the default
setup should be usable for most people, but it is possible to setup
things if needed. I'm happy to clarify if I can.
/Mikael
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 17:35 ` Jim
2025-09-06 18:00 ` Henning Hraban Ramm
2025-09-06 18:07 ` Mikael Sundqvist
@ 2025-09-06 18:07 ` Hans Hagen via ntg-context
2025-09-06 19:39 ` Jim
2025-09-06 18:15 ` Wolfgang Schuster
3 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen via ntg-context @ 2025-09-06 18:07 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 9/6/2025 7:35 PM, Jim wrote:
> On Sat, Sep 6, 2025 at 15:38 (+0200), Henning Hraban Ramm wrote:
>
>> Ahoi,
>
> Ahoi (Ahoy?)? Are you getting ready for International Talk Like A Pirate
> Day? :-)
>
>> I’m working on the Math chapter of my ConTeXt book. As you know, this is not
>> my area of expertise, that’s why I try to keep it short and mostly refer to
>> the math manual.
>
>> What subjects do you think I should include for beginners or readers
>> switching from PlainTeX/LaTeX?
>> Probably \alignhere and \breakhere? What else is new & different?
>
> I think you should mention that math isn't going to look the same.
>
> For example, attached are two PDFs
> -> plain tex: $3\over 4$
> -> context: \im{\frac{3}{4}}
>
> As can be seen, in ConTeXt there is a much bigger space between the '3' and
> the horizontal line. (I *really* don't want to step on toes or sound like
> a complete ingrate, especially in light of the large amount of effort
> (AIUI) which has gone into math typesetting, but I strongly prefer the
> plain TeX version.)
it has a lot to do with consistency ... putting stuff next to each
other, more complex formulas and so on; all is configurable (see manual)
and we've chosen values that work well with the hundreds of pages and
thousands of formulas we looked at
> To help plain TeX (and maybe LaTeX) refugees understand that things which
> look different may not be due to them doing something wrong, pointing out
> some examples where there are some typesetting differences (I assume by
> design) may make the adoption of ConTeXt more expeditious for some people.
context math is definitely not for those who like to mix lots of \, \!,
\: or whatevers in formulas and like playing with compensation for the
lack of symbols, classes, who prefer to add manual penalties, tweak
spacing and deal with explicit break lines to make it look fine; a lot
in how we do math in context also relates to new possibilities in the
engine esp in making paragraphs with lots of math coming out ok without
intervention as well as display math that breaks over lines without
hackery .. of course users can still control most but it might also
interfere
basically one can set up a plain machinery but we wonder if that looks
better on the average
we don't care much about how latex renders things and we assume
publishers also have their special demands .. we dont'care about those
neither; but we do care about abstraction, consistency and structure
> P.S. On the other hand, if the attached ConTeXt output is *not* how things
> are supposed to look, and my installation is somehow broken, someone please
> let me know.
that one is for mikael
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 17:35 ` Jim
` (2 preceding siblings ...)
2025-09-06 18:07 ` Hans Hagen via ntg-context
@ 2025-09-06 18:15 ` Wolfgang Schuster
3 siblings, 0 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2025-09-06 18:15 UTC (permalink / raw)
To: ntg-context
Am 06.09.2025 um 19:35 schrieb Jim:
> On Sat, Sep 6, 2025 at 15:38 (+0200), Henning Hraban Ramm wrote:
>
>> Ahoi,
>
> Ahoi (Ahoy?)? Are you getting ready for International Talk Like A Pirate
> Day? :-)
>
>> I’m working on the Math chapter of my ConTeXt book. As you know, this is not
>> my area of expertise, that’s why I try to keep it short and mostly refer to
>> the math manual.
>
>> What subjects do you think I should include for beginners or readers
>> switching from PlainTeX/LaTeX?
>> Probably \alignhere and \breakhere? What else is new & different?
>
> I think you should mention that math isn't going to look the same.
>
> For example, attached are two PDFs
> -> plain tex: $3\over 4$
> -> context: \im{\frac{3}{4}}
>
> As can be seen, in ConTeXt there is a much bigger space between the '3' and
> the horizontal line. (I *really* don't want to step on toes or sound like
> a complete ingrate, especially in light of the large amount of effort
> (AIUI) which has gone into math typesetting, but I strongly prefer the
> plain TeX version.)
You can change it:
\starttext
\im{\frac{3}{4}}
%
\setupmathfraction[strut=no]
\im{\frac{3}{4}}
%
\setupmathfraction[strut=no,distance=both,topdistance=1pt,bottomdistance=1pt]
\im{\frac{3}{4}}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 13:38 [NTG-context] math best practices Henning Hraban Ramm
2025-09-06 14:45 ` [NTG-context] " Hans Hagen via ntg-context
2025-09-06 17:35 ` Jim
@ 2025-09-06 18:18 ` Wolfgang Schuster
2 siblings, 0 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2025-09-06 18:18 UTC (permalink / raw)
To: ntg-context
Am 06.09.2025 um 15:38 schrieb Henning Hraban Ramm:
> Ahoi,
> I’m working on the Math chapter of my ConTeXt book. As you know, this is
> not my area of expertise, that’s why I try to keep it short and mostly
> refer to the math manual.
>
> What subjects do you think I should include for beginners or readers
> switching from PlainTeX/LaTeX?
> Probably \alignhere and \breakhere? What else is new & different?
>
> I know there are some constructs that users should avoid, e.g. dollar
> notation ($math$, $$math$$) and commands that need lookahead (\over,
> \atop, \above). What else?
> (Maybe an explicit “don’t do this” section in the math manual would make
> sense.)
\over etc. no longer produce the expected output:
\starttext
\im{\frac{1}{2}}
\im{{1 \over 2}}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 18:07 ` Mikael Sundqvist
@ 2025-09-06 18:59 ` Henning Hraban Ramm
0 siblings, 0 replies; 15+ messages in thread
From: Henning Hraban Ramm @ 2025-09-06 18:59 UTC (permalink / raw)
To: ntg-context
Am 06.09.25 um 20:07 schrieb Mikael Sundqvist:
> I might have misunderstood the purpose of the book. I thought it was a
> "ConTeXt book", where one explains and discusses ConTeXt. If it is
> more of a "How to move from X to ConTeXt" book, then one could
> probably add a few things:
I’m quite sure that most people who are interested in ConTeXt already
know LaTeX or plain TeX.
It is a ConTeXt book. I usually don’t explain differences or “moving”.
So why I think we need that for math? In opposite to most other areas,
formulae can look mostly the same in ConTeXt and LaTeX, before the math
manual there was no documentation, because you could refer to LaTeX
docs, so it’s more important now to explain the differences.
> * Use \im inline math.
> * Use \startformula \stopformula for all displayed math. Show a few
> examples with \alignhere, \breakhere and \numberhere. (The usual ones
> are done in the displayed math chapter.)
> * Explain that manual spaces inserted by \, and \! and so on are not
> meant to be needed. For example, one often sees \,dx for
> differentials, in ConTeXt, use \dd x.
> * (Almost) everything is possible to set up. The keywords are
> explained in the math manual. (The example above with fractions is one
> example)
Thank you, that’s what I wanted to hear!
Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 18:07 ` Hans Hagen via ntg-context
@ 2025-09-06 19:39 ` Jim
2025-09-07 15:36 ` Jeong Dal via ntg-context
0 siblings, 1 reply; 15+ messages in thread
From: Jim @ 2025-09-06 19:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
Rather than replying three times, first let me say "thanks" to Mikael and
Wolfgang for their suggestions.
Interestingly (to me) I found the looks of Mikael's \dm{...} example to
look good, but when I changed it to \im{...} I found the top of the 4 to be
too close to the horizontal line. (A bit more on this below.)
On Sat, Sep 6, 2025 at 20:07 (+0200), Hans Hagen via ntg-context wrote:
> On 9/6/2025 7:35 PM, Jim wrote:
>> I think you should mention that math isn't going to look the same.
>> For example, attached are two PDFs
>> -> plain tex: $3\over 4$
>> -> context: \im{\frac{3}{4}}
>> As can be seen, in ConTeXt there is a much bigger space between the '3' and
>> the horizontal line. (I *really* don't want to step on toes or sound like
>> a complete ingrate, especially in light of the large amount of effort
>> (AIUI) which has gone into math typesetting, but I strongly prefer the
>> plain TeX version.)
> it has a lot to do with consistency ... putting stuff next to each other,
> more complex formulas and so on; all is configurable (see manual) and we've
> chosen values that work well with the hundreds of pages and thousands of
> formulas we looked at
>> To help plain TeX (and maybe LaTeX) refugees understand that things which
>> look different may not be due to them doing something wrong, pointing out
>> some examples where there are some typesetting differences (I assume by
>> design) may make the adoption of ConTeXt more expeditious for some people.
> context math is definitely not for those who like to mix lots of \, \!, \:
> or whatevers in formulas
<snip>
Trust me, I don't *like* playing with spacing tweaks. Maybe I am having a
bit of OCD about this, but looking at \im{frac{3}{4}} triggers my inner
typographer (or some other annoying part of my psyche :-) and tells me I
can't live with that.
For the case of \im{\frac{3}{4}}, Wolfgang's suggestion of
\setupmathfraction[strut=no,distance=both,topdistance=1pt,bottomdistance=1pt]
does the trick... when there is no descender in the numerator, I believe
(and I admit that beauty is in the eye of the beholder) that the numerator
should not be as far above the horizontal line as when there is a
descender, even at the cost of the 3's being at different heights in this:
\im{\frac {3}{4} = \frac {3g}{4g}}
Clearly YMMV.
So it would seem (to me, anyway) that being able to produce math output
that (almost) never needs tweaking is only possible if there is universal
agreement on exactly how math should be typeset. I conclude there isn't
universal agreement on that point, which means either people can learn to
live with the defaults, or they will need to perform some tweaking.
Which gets me back to my suggestion for Hraban's book. Perhaps some basics
and a pointer to the math manual is all that is needed, but if his book is
going to be useful for refugees, then I think an example or two of how
things are different in ConTeXt could help readers out.
> ...
> basically one can set up a plain machinery but we wonder if that looks
> better on the average
Hard to say. I would assume DEK likes the way his math engine worked (even
though I believe in The TeXBook he admits that occasional tweaking will be
necessary). But I suppose that doesn't speak to "on average".
I'd like to conclude by saying (as previously mentioned) I don't want to
step the toes (or be seen as stepping on toes) of people who put in great
efforts to provide such an excellent tool to the world (for free!) and who
are always ready to help on this mailing list. I sincerely appreciate
everyone who makes contributions (large or small) to ConTeXt and the
ConTeXt community.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-06 19:39 ` Jim
@ 2025-09-07 15:36 ` Jeong Dal via ntg-context
2025-09-07 17:08 ` Mikael Sundqvist
0 siblings, 1 reply; 15+ messages in thread
From: Jeong Dal via ntg-context @ 2025-09-07 15:36 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Jeong Dal
[-- Attachment #1.1: Type: text/plain, Size: 1244 bytes --]
Hi,
I have moved to ConTeXt from Latex many years before.
It is nice and simple.
Since then I used ConTeXt except the case of writing a paper.
One thing I couldn’t satisfy is the math typesetting in ConTeXt. It is not so bad, but I have to do some extra jobs to make the output of math things look good.
But math typesetting ability in ConTeXt is upgraded continuously, and now we can see a nice output in the math manual.
I think that a font, spaces, etc in Math are matter of taste. Of course, it is my personal thought.
I thank Hraban to write a ConTeXt book which needs a lot of efforts.
And, I’d like to add “Use also \dm{}” in the Mikael’s suggestions.
> I'd like to conclude by saying (as previously mentioned) I don't want to
> step the toes (or be seen as stepping on toes) of people who put in great
> efforts to provide such an excellent tool to the world (for free!) and who
> are always ready to help on this mailing list. I sincerely appreciate
> everyone who makes contributions (large or small) to ConTeXt and the
> ConTeXt community.
I also agree with Jim, and I always mention my appreciation to the experts of ConTeXt in the acknowledgement in my books.
With best regards,
Dalyoung
[-- Attachment #1.2: Type: text/html, Size: 2278 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-07 15:36 ` Jeong Dal via ntg-context
@ 2025-09-07 17:08 ` Mikael Sundqvist
2025-09-08 11:18 ` Jeong Dal via ntg-context
0 siblings, 1 reply; 15+ messages in thread
From: Mikael Sundqvist @ 2025-09-07 17:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Dalyoung,
On Sun, Sep 7, 2025 at 5:50 PM Jeong Dal via ntg-context
<ntg-context@ntg.nl> wrote:
>
> Hi,
>
> I have moved to ConTeXt from Latex many years before.
> It is nice and simple.
> Since then I used ConTeXt except the case of writing a paper.
> One thing I couldn’t satisfy is the math typesetting in ConTeXt. It is not so bad, but I have to do some extra jobs to make the output of math things look good.
> But math typesetting ability in ConTeXt is upgraded continuously, and now we can see a nice output in the math manual.
> I think that a font, spaces, etc in Math are matter of taste. Of course, it is my personal thought.
Thanks. Indeed some are personal thought, and one might not be happy
with the default setup. We are eager to hear if there is anything we
can do to improve in general, though. It might also be if there is
something that needs a different setup for, say, Korean math.
/Mikael
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-07 17:08 ` Mikael Sundqvist
@ 2025-09-08 11:18 ` Jeong Dal via ntg-context
2025-09-09 2:45 ` Matthias Weber
0 siblings, 1 reply; 15+ messages in thread
From: Jeong Dal via ntg-context @ 2025-09-08 11:18 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Jeong Dal
[-- Attachment #1.1: Type: text/plain, Size: 1134 bytes --]
Dear Mikael,
> Thanks. Indeed some are personal thought, and one might not be happy
> with the default setup.
I used the following setup for math and others in my environment file, and I wonder these things are still needed since many things are already done in the current version.
\setupmathematics[autopunctuation=no, integral=nolimits]
I think that it is great if you suggest a standard(?) setup for math if it exist.
> We are eager to hear if there is anything we
> can do to improve in general, though. It might also be if there is
> something that needs a different setup for, say, Korean math.
>
There is no special setup for Korean math which I can tell you. Math is global(?) thing.
In Korea, almost all the Math people use LaTeX because math journals in the world requires LaTeX file when we submit.
I hope that more Korean mathematicians use ConTeXt, then they may have something to tell you. Instead, I may ask you a lot.
The pioneers of Korean TeX are mathematicians, but the situation is changed a lot right now.
Thanks for writing a nice manual of math.
Best regards,
Dalyoung
[-- Attachment #1.2: Type: text/html, Size: 6858 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [NTG-context] Re: math best practices
2025-09-08 11:18 ` Jeong Dal via ntg-context
@ 2025-09-09 2:45 ` Matthias Weber
0 siblings, 0 replies; 15+ messages in thread
From: Matthias Weber @ 2025-09-09 2:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 4613 bytes --]
Dear All,
I am adding my (rather special) comments to all the other answers to Henning’s original question:
I use ConTeXt mainly for longer math-heavy texts like lecture notes. Right now, I am revising notes that I wrote in 2013 (in ConTeXt), which are revisions of earlier notes from previous years.
I found the transition from LaTeX to ConTeXt enjoyable (or liberating), and the lack of documentation a minor issue: In LaTeX, there is too much documentation for my taste, and the ConTeXt mailing list and wiki have answered all my questions faster (thanks!) than I could have solved my LaTeX issues.
In LaTeX, I used to spend most of my time finding and choosing the right package. In ConTeXt, I spend most of my time thinking about layout possibilities.
Sometimes I just grab a manual and read it for inspiration.
(By the way, the new Math Manual is fantastic; I have it open at all times.)
Still, I have a few recommendations for people who would like to switch:
— If someone wants to convert long LaTeX documents, it is worth learning how to use regular expressions (AI will help with that these days). For instance, I replace my old $ xxx $ with \im{xxx} using a simple search. Similarly, \begin{proof} .. \end{proof} easily becomes \startproof .. \stopproof, etc
— Start with some basic setup that has environments for theorems and proofs
and your own \mathfunction definitions, and grow your documents organically.
— I learned from Aditya (thanks!) how to have environments conditionally typeset using modes:
\definebuffer[Solution][local=yes,nested=yes]
\startmode[solution]
\definecolor[fade][r=0.1,g=.1,b=.8] % [r=0.9,g=.9,b=.9]
\defineenumeration [Solution]
[text={Solution:},
headstyle=bold,
number=no,
before={\blank\startcolor[fade]},
after={\stopcolor\blank},
style=normal,
title=no
]
\stopmode
This will cause any \startSolution ... \stopSolution to be typeset only when the “solution” mode is enabled.
— For people who use lots of graphics, it will help to look at luametafun. I wish I had the time to learn metapost and Lua better...
— ConTeXt offers an abundance of opportunities to structure your document by controlling headers and margins. Of course, one doesn’t need to use any of these features to typeset a document, but they offer so many opportunities to make the document easier and more appealing to read. I learned only recently that one can use descriptions to structure longer text blocks (like proofs), for instance
\definedescription[Step][
headstyle=bold, style=normal, align=flushleft, alternative=serried, width=fit, margin=.5cm]
And use it as in
\startStep{\quotation{\im{ (1)\Rightarrow (2)}}:}
…
\stopStep
Matthias
> On Sep 8, 2025, at 7:18 AM, Jeong Dal via ntg-context <ntg-context@ntg.nl> wrote:
>
> Dear Mikael,
>
>> Thanks. Indeed some are personal thought, and one might not be happy
>> with the default setup.
>
> I used the following setup for math and others in my environment file, and I wonder these things are still needed since many things are already done in the current version.
>
> \setupmathematics[autopunctuation=no, integral=nolimits]
>
> I think that it is great if you suggest a standard(?) setup for math if it exist.
>
>> We are eager to hear if there is anything we
>> can do to improve in general, though. It might also be if there is
>> something that needs a different setup for, say, Korean math.
>>
>
> There is no special setup for Korean math which I can tell you. Math is global(?) thing.
> In Korea, almost all the Math people use LaTeX because math journals in the world requires LaTeX file when we submit.
> I hope that more Korean mathematicians use ConTeXt, then they may have something to tell you. Instead, I may ask you a lot.
>
> The pioneers of Korean TeX are mathematicians, but the situation is changed a lot right now.
>
> Thanks for writing a nice manual of math.
>
> Best regards,
>
> Dalyoung
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 11233 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-09-09 2:47 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-06 13:38 [NTG-context] math best practices Henning Hraban Ramm
2025-09-06 14:45 ` [NTG-context] " Hans Hagen via ntg-context
2025-09-06 17:23 ` Henning Hraban Ramm
2025-09-06 17:35 ` Jim
2025-09-06 18:00 ` Henning Hraban Ramm
2025-09-06 18:07 ` Mikael Sundqvist
2025-09-06 18:59 ` Henning Hraban Ramm
2025-09-06 18:07 ` Hans Hagen via ntg-context
2025-09-06 19:39 ` Jim
2025-09-07 15:36 ` Jeong Dal via ntg-context
2025-09-07 17:08 ` Mikael Sundqvist
2025-09-08 11:18 ` Jeong Dal via ntg-context
2025-09-09 2:45 ` Matthias Weber
2025-09-06 18:15 ` Wolfgang Schuster
2025-09-06 18:18 ` Wolfgang Schuster
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).