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
Superscripts in underlined text makes the underline change size and position #1210
When using super in underlined text the line underneath the text becomes thinner and moves up above the normal underline.
This is not an ideal reading experience when 1st has an inconsistent line underneath the st portion when one would expect it to continue in the same style/format as the number before it.
example code: #underline[1#super[st], 2#super[nd], and 3#super[rd]]
result:
version: typst 0.3.0 (4b17c3f5) a.k.a. the latest git commit as of time of writing
This seems to be a problem in general when either stroke or offset are set to auto and the underline content has text with different font sizes.
For example, the following code produces the following output:
#underline[text #box(height: 10mm, fill: red)[box]]
#underline[
small
#text(size: 32pt)[big]
small
]
The problem is, how to select the underline width and offset with different font sizes? Do we select the biggest stroke in the text? What about the offset? Do we select the smaller one?
Note: as a workaround, the offset and stroke can be set explicitly.
#underline(stroke: 0.5pt, offset: 1.5pt)[
1#super[st], 2#super[nd], and 3#super[rd]
]
changed the title [-]super in underlined text makes the underline change size and position[/-][+]Superscripts in underlined text makes the underline change size and position[/+]on Jul 16, 2024
Activity
AndyBarcia commentedon Jun 26, 2023
This seems to be a problem in general when either stroke or offset are set to
autoand the underline content has text with different font sizes.For example, the following code produces the following output:
The problem is, how to select the underline width and offset with different font sizes? Do we select the biggest stroke in the text? What about the offset? Do we select the smaller one?
Note: as a workaround, the offset and stroke can be set explicitly.
[-]super in underlined text makes the underline change size and position[/-][+]Superscripts in underlined text makes the underline change size and position[/+]Leedehai commentedon Jan 9, 2026
This issue has become obsolete:
bluss commentedon Jan 10, 2026
The example is obsolete but the issue is maybe not? The issue has at least changed.
The underline is now good when the super is typographic and the underline is worse than before when not.