You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Citation numbers are flying over their brackets in the superscript #6513
The style gb-7714-2015-numeric formats a citation with a number enclosed in square brackets (e.g., [1]) and render them in superscript.
However, some fonts only provide dedicated superscript glyphs for numbers, not for brackets. This can cause misalignment, with the numbers appearing higher than the brackets in the superscript.
This issue is caused by an imperfect font, but typst can still provide a better default.
For example, we can use the dedicated superscript glyphs only when all characters in [1] have them.
According to the following example, the mechanism is already implemented for #super, but #cite processes prefix ([), number (1), and suffix (]) separately, thereby ignoring that mechanism.
The unexpected behaviour was described in #4203 and #5852, but they were closed in favor of #4006, which was in turn closed as a duplicate of #633.
However, this issue (occured in single citation) is more basic than #633 (occured in multiple superscripts), and be can be fixed before #633. Therefore, I recreate this one.
Thank you! I was aware of #5777, but I thought it won't fix this issue because its title seems irrelevant. I've just switched to that branch, and confirmed that it does fix.
Activity
Enivex commentedon Jun 27, 2025
I'll close this as a duplicate of #633 since it'll soon be closed by #5777 anyway
YDX-2147483647 commentedon Jun 27, 2025
Thank you! I was aware of #5777, but I thought it won't fix this issue because its title seems irrelevant. I've just switched to that branch, and confirmed that it does fix.