Skip to content

Automatically centre dots between infix notation #147

Description

@njericha

Description

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.
Image

And here is Overleaf's generated document.
Image

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.

Activity

  1. njericha commented on May 15, 2025

    @njericha
    Author

    Related, it may also be nice to auto-centre dots in matrices from this

    Image

    to this

    Image

    But this feature does not exist in amsmath so I would not consider this as important:

    Image

  2. Enivex commented on May 15, 2025

    @Enivex
    Collaborator

    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.

  3. MDLC01 commented on May 15, 2025

    @MDLC01
    Collaborator

    There is an argument to be made in favor of changing dots.h (and dots) to be centered, because non-centered dots can already be obtained with ....

  4. Enivex commented on May 15, 2025

    @Enivex
    Collaborator

    There is an argument to be made in favor of changing dots.h (and dots) to be centered, because non-centered dots can already be obtained with ....

    Here OP is requesting it to be contextual though

  5. njericha commented on May 15, 2025

    @njericha
    Author

    p.s.: You should not be using $$ $$ for display math in LaTeX. It's a TeX primitive and not officially supported.

    Yes my bad! I got into the habit since using Obsidian and Quarto.

  6. njericha commented on May 15, 2025

    @njericha
    Author

    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.

  7. Kees-van-Beilen commented on May 23, 2025

    @Kees-van-Beilen

    I'm in favour of dots being automatically centred, however this can already be achieved with something like #let dots = sym.dots.c

  8. MDLC01 commented on Feb 25, 2026

    @MDLC01
    Collaborator

    @laurmaedje can you transfer this issue to typst/codex?

  9. transferred this issue fromtypst/typston Feb 26, 2026
  10. added theissue type on May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions