The fraction line was bracketing by "is this operand a single token", so \frac{n(n+1)}{2} rendered as (n(n+1))/2 and the quadratic formula as a wall of parentheses.
Brackets now appear in exactly two cases:
A sum, because the slash would otherwise divide only its last term.
A denominator of more than one term, because 1/2a is read as 1/(2a) by some readers and (1/2)a by others.
LaTeX
before
after
\frac{n(n+1)}{2}
(n(n+1))/2
n(n+1)/2
\frac{\sqrt{\pi}}{2}
(√π)/2
√π/2
\frac{mc^2}{\sqrt{1 - v^2/c^2}}
(mc²)/(√(1 − v²/c²))
mc²/√(1 − v²/c²)
\frac{1}{2a}
1/(2a)
1 / (2a)
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
(−b ± √(b² − 4ac))/(2a)
(−b ± √(b² − 4ac)) / (2a)
\frac{\sin x}{x}
(sin x)/x
(sin x) / x
The decision is made from the rendered operand, which is what a reader sees, and it tracks bracket depth so that n(n+1) is not read as a sum, and steps over <sup>/<sub> so that a sum above the line is not counted as a split. The slash gets a space only when something beside it is bracketed, which is where the brackets would otherwise crowd it.
npm run typecheck, npm run lint:code and npm test pass: 582 tests, 5 new.
The fraction line was bracketing by "is this operand a single token", so `\frac{n(n+1)}{2}` rendered as `(n(n+1))/2` and the quadratic formula as a wall of parentheses.
Brackets now appear in exactly two cases:
- **A sum**, because the slash would otherwise divide only its last term.
- **A denominator of more than one term**, because `1/2a` is read as `1/(2a)` by some readers and `(1/2)a` by others.
| LaTeX | before | after |
| --- | --- | --- |
| `\frac{n(n+1)}{2}` | `(n(n+1))/2` | `n(n+1)/2` |
| `\frac{\sqrt{\pi}}{2}` | `(√π)/2` | `√π/2` |
| `\frac{mc^2}{\sqrt{1 - v^2/c^2}}` | `(mc²)/(√(1 − v²/c²))` | `mc²/√(1 − v²/c²)` |
| `\frac{1}{2a}` | `1/(2a)` | `1 / (2a)` |
| `\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}` | `(−b ± √(b² − 4ac))/(2a)` | `(−b ± √(b² − 4ac)) / (2a)` |
| `\frac{\sin x}{x}` | `(sin x)/x` | `(sin x) / x` |
The decision is made from the *rendered* operand, which is what a reader sees, and it tracks bracket depth so that `n(n+1)` is not read as a sum, and steps over `<sup>`/`<sub>` so that a sum above the line is not counted as a split. The slash gets a space only when something beside it is bracketed, which is where the brackets would otherwise crowd it.
`npm run typecheck`, `npm run lint:code` and `npm test` pass: 582 tests, 5 new.
`\frac{n(n+1)}{2}` came out as `(n(n+1))/2` and the quadratic formula
as a wall of parentheses, because the test was "is this operand a
single token" rather than "would the slash change what this means".
Brackets now appear in exactly two cases: a sum, where the slash would
otherwise divide only the last term, and a denominator that is more
than one term, where `1/2a` is read two ways. `n(n+1)/2`, `√π/2` and
`mc²/√(1 − v²/c²)` need nothing, while `1 / (2a)` and
`(−b ± √(b² − 4ac)) / (2a)` keep their brackets. A script is read
through rather than counted, since a sum above the line is unambiguous
by construction.
The slash is spaced only when something beside it is bracketed, which
is where the brackets would otherwise crowd it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The fraction line was bracketing by "is this operand a single token", so
\frac{n(n+1)}{2}rendered as(n(n+1))/2and the quadratic formula as a wall of parentheses.Brackets now appear in exactly two cases:
1/2ais read as1/(2a)by some readers and(1/2)aby others.\frac{n(n+1)}{2}(n(n+1))/2n(n+1)/2\frac{\sqrt{\pi}}{2}(√π)/2√π/2\frac{mc^2}{\sqrt{1 - v^2/c^2}}(mc²)/(√(1 − v²/c²))mc²/√(1 − v²/c²)\frac{1}{2a}1/(2a)1 / (2a)\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}(−b ± √(b² − 4ac))/(2a)(−b ± √(b² − 4ac)) / (2a)\frac{\sin x}{x}(sin x)/x(sin x) / xThe decision is made from the rendered operand, which is what a reader sees, and it tracks bracket depth so that
n(n+1)is not read as a sum, and steps over<sup>/<sub>so that a sum above the line is not counted as a split. The slash gets a space only when something beside it is bracketed, which is where the brackets would otherwise crowd it.npm run typecheck,npm run lint:codeandnpm testpass: 582 tests, 5 new.`\frac{n(n+1)}{2}` came out as `(n(n+1))/2` and the quadratic formula as a wall of parentheses, because the test was "is this operand a single token" rather than "would the slash change what this means". Brackets now appear in exactly two cases: a sum, where the slash would otherwise divide only the last term, and a denominator that is more than one term, where `1/2a` is read two ways. `n(n+1)/2`, `√π/2` and `mc²/√(1 − v²/c²)` need nothing, while `1 / (2a)` and `(−b ± √(b² − 4ac)) / (2a)` keep their brackets. A script is read through rather than counted, since a sum above the line is unambiguous by construction. The slash is spaced only when something beside it is bracketed, which is where the brackets would otherwise crowd it.