Closed lkkmpn closed 12 months ago
You probably cannot check if a letter has an accent from a code point of view, but since Å has to be manually defined one can always do
\DeclareSIUnit{\angstrom}{\text{\smash{Å}\vphantom{A}}}
The reference rendering here should I think be
Reference output: $\mathrm{m}^{2}$, $\mathrm{A}^{2}$, $\mathrm{\textrm{Å}}^{2}$
which shows exactly the same effect as TeX is adjusting the superscript height for the taller letter.
Ah, I didn't realize that siunitx
uses math mode internally for unit typesetting. Would you say the raised superscript is a desirable output, though?
@daleif Thanks for the suggestion, I didn't think of using \smash
as a workaround.
I think that as the output matches the reference, this is something that should work as-now: I'll think about whether to add a hint about adjustments for those who feel this appearance is desirable.
When combining a unit whose symbol extends past the cap height of the font, like ångström (Å), with a power, the power is typeset relative to the top of the unit symbol, causing it to be typeset higher than powers on other units. If this is done in a longer paragraph, it causes the line where the unit is present to take up more height than other lines, leaving an undesired gap between lines.
MWE:
(I know the ångström is deprecated in
siunitx
and there are probably not many other units with accents, but I feel this would still be a reasonable change to include given it is still a fairly common unit in some fields.)