Skip to content

typst formulas have a smaller font size #746

Closed

Description

@cyperion

Displayed inline Math formulas are scaled wrongly using Typst as the math format.
KaTeX Formulas have a nicely scaled font size fitting to that of the text.
Typst formulas render in a smaller, off-looking fontsize.
This is probably a bug.

System specification:

  • Arch Linux
  • zennotes-bin v2.45.0 via AUR
  • DE: KDE Plasma
Image Image

Activity

  1. adibhanna commented on Sep 8, 2026

    @adibhanna
    Contributor

    Fixed on the v2.46.0 branch in ac480df (release PR #749). Thanks for the report and the side-by-side screenshots; they were exactly right.

    KaTeX draws Computer Modern at 1.21 times the text size (its own stylesheet asks for it, because the family sits small on its em square), while the Typst SVG was sized at a plain 1em. New Computer Modern shares the metrics, so the same formula came out a fifth smaller under Typst: 52 px wide against KaTeX's 63 for E = h nu at the default text size. Typst formulas now use the same 1.21 factor in both the editor and the reading view, display blocks included, so switching engines no longer changes how big the math is. The Math size setting still scales on top.

    While there, the recolor that makes Typst formulas follow the theme only handled glyph fills, so a square root's bar and fraction lines (black strokes in Typst's export) stayed black on dark themes; strokes are recolored now too.

    It ships with 2.46.0.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions