You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatically centre dots between infix notation #147
Coming from Overleaf and TeX-style math, I am use to the compiler autommatically handling triples dots between different symbols.
For example, 1 + \dots + n will centre the dots like this: $1 + \dots + n$.
But keep the dots lowered for lists 1, \dots, n like this: $1,\dots, n$.
Use Case
Here is a Typst generated document.
And here is Overleaf's generated document.
Although it can be easy enough for a human to add a ".c" when needed, this change would make it easier for machine generated documents (e.g. Quarto, Pandoc) to maintain a similar appearence between formats, and more consistant for users coming from TeX-style math.
Note that dots is not an actual symbol. In fact dots.c isn't either. It's just that dots.h is the top entry under dots, so it resolves to that.
My personal feeling has always been that \dots feels a bit too automagic to me. It doesn't handle every case properly, so you have to pull out the specific versions anyway. Not to mention authors may have differing opinions.
p.s.: You should not be using $$ $$ for display math in LaTeX. It's a TeX primitive and not officially supported.
I can see the automagic being annoying, especially if you use a different convention. And adding customizable settings to change which symbols cause dots to automatically centre or lower could add to the mess.
I could be happy with dots being centred by default, since I almost always want them centred in math. The exception being lists, which I could use ...
Edit: This could cause for some bad translation issues with Pandoc, but I'm not sure that is good enough reason to hold back Typst from a more useful design.
Reacted by Bastien Voirin, Kees van Beilen and pure-chance
Activity
njericha commentedon May 15, 2025
Related, it may also be nice to auto-centre dots in matrices from this
to this
But this feature does not exist in amsmath so I would not consider this as important:
Enivex commentedon May 15, 2025
Note that
dotsis not an actual symbol. In factdots.cisn't either. It's just thatdots.his the top entry underdots, so it resolves to that.My personal feeling has always been that
\dotsfeels a bit too automagic to me. It doesn't handle every case properly, so you have to pull out the specific versions anyway. Not to mention authors may have differing opinions.p.s.: You should not be using
$$ $$for display math in LaTeX. It's a TeX primitive and not officially supported.MDLC01 commentedon May 15, 2025
There is an argument to be made in favor of changing
dots.h(anddots) to be centered, because non-centered dots can already be obtained with....Enivex commentedon May 15, 2025
Here OP is requesting it to be contextual though
njericha commentedon May 15, 2025
Yes my bad! I got into the habit since using Obsidian and Quarto.
njericha commentedon May 15, 2025
I can see the automagic being annoying, especially if you use a different convention. And adding customizable settings to change which symbols cause dots to automatically centre or lower could add to the mess.
I could be happy with
dotsbeing centred by default, since I almost always want them centred in math. The exception being lists, which I could use...Edit: This could cause for some bad translation issues with Pandoc, but I'm not sure that is good enough reason to hold back Typst from a more useful design.
Kees-van-Beilen commentedon May 23, 2025
I'm in favour of
dotsbeing automatically centred, however this can already be achieved with something like#let dots = sym.dots.cMDLC01 commentedon Feb 25, 2026
@laurmaedje can you transfer this issue to typst/codex?