Prime symbols can be attached as limits
Description
Prime symbols can be attached as limits instead of always being attached as exponents.
Not sure if this is a bug or the intended behavior.
$ lim' $
$ lim'' $
$ lim''' $
$ lim'''' $
$ lim''''' $
Reproduction URL
No response
Operating system
No response
Typst version
- [X] I am using the latest version of Typst
This is intentional, since lim has..well..limits.
scripts(lim)' should be what you want
Or use attach directly if you want to mix scripts and limits.
Just to be clear, this issue is not about lim attaching its scripts as limits. It is about prime symbols being able to be attached as limits without the user explicitly using attach.
I think in most cases, the user does not want prime symbols to attach as limits even with a math.op(limits: true).
Just to be clear, this issue is not about
limattaching its scripts as limits. It is about prime symbols being able to be attached as limits without the user explicitly usingattach.I think in most cases, the user does not want prime symbols to attach as limits even with a
math.op(limits: true).
It is the same thing, because prime is treated in a particular way. Essentially ' means the same thing as ^(big version of prime). This is the exact same way it's handled in LaTeX, so you'll also see the same thing if you write \lim' there
While it may seem somewhat weird, it is consistent with how things generally work, so I would refrain from adding more special cases.
On second thought, I sort of agree with @MDLC01. While a prime is as a normal attachment, that feels like an implementation detail to me and attaching it as a limit is probably almost never what the user wanted.
On second thought, I sort of agree with @MDLC01. While a prime is as a normal attachment, that feels like an implementation detail to me and attaching it as a limit is probably almost never what the user wanted.
I apparently disagreed with myself here.
To extend on this (and reference #3299), should the exponent and subscript after a comparator behave similarly to limits? I.e., should the 2 in >^2 and >_2 be rendered above and below the > or next to it?
To extend on this (and reference #3299), should the exponent and subscript behave similarly for comparators? I.e., should the
2in>^2and>_2be rendered above and below the>or next to it?
That's the difference between limits and scripts.
Both appear, so it's mostly about personal preference and/or context.