October 30, 2025
When subscripts go rogue
Typst's Math Mode Problem
Typst users split: fix the weird math subscripts or live with it
TLDR: Typst’s math input turns things like f_i(x) into a surprising subscript, and there’s a proposal to revert to the old behavior that would change existing docs. Commenters are split between “quirks are fine,” “be explicit like LaTeX,” and “just rip the band-aid,” making this a fight over smart vs. simple math typing.
Math drama alert: Typst—the buzzy LaTeX alternative for pretty documents—has a brain-twister. Type f_i(x) and it thinks you meant the whole i(x) as the subscript; same with f^pi(x). Why? The app treats function calls like abs(x) as more important than subscripts, so parentheses “win.” Now there’s an open PR to revert to the old behavior, which could change how some docs look. Cue the comment wars.
Team Chill says: relax. One user shrugs it off, saying the live preview catches it fast—no biggie. The pragmatists pile on: fewer parentheses means some quirks, and that’s the price of clean-looking math. Meanwhile, the traditionalists roll in with LaTeX nostalgia. They want curly braces and backslashes back, thank you very much. One commenter flat-out says they’re wary of engines that are “too smart,” because that can break new notation. Oof.
Then there’s the “rip the band-aid” crowd. They want a blunt fix: revert and make people group things explicitly. Another commenter even chides the blog for burying the lede—just say you’re reverting! In between, the memes write themselves: “Schrödinger’s subscript,” “pi that won’t let go,” and “choose your fighter: Smart Parser vs. Curly Braces.” Typst wanted to be helpful; the community wants it to pick a side—and soon. Read the room, then read the math at Typst.
Key Points
- •Typst’s math mode currently makes function calls bind more tightly than sub/superscripts, leading to unintuitive rendering (e.g., f_i(x) → i(x) as subscript).
- •In Typst 0.3 and earlier, attachments behaved intuitively but function-call-like constructs such as abs(x) silently failed; later versions reversed this behavior via a community PR.
- •The root cause is parse-time ambiguity when an identifier is followed by parentheses, which can represent a Typst function call, mathematical function evaluation, or implied multiplication.
- •Typst parses symbols like omega(x) as function calls and only resolves them at runtime, sometimes “unparsing” arguments; a named-argument omission in 0.13.1 is noted and fixed on main.
- •An open PR proposes reverting to the 0.3 behavior to prioritize intuitive attachments, though it would silently change rendering in many documents.