7

Unicode provides subscripts and superscripts, so I can do this:

And this:

x₅

However, combining these two I get:

x²₅ or x₅²

Which looks badly.

Any chance to get the superscript directly on top of the subscript in Unicode?

For clarity, this is what I'd like to achieve:

enter image description here

gaazkam
  • 1,003
  • 1
    No. You need to use a math formatting program. – DavidPostill Dec 25 '18 at 13:42
  • @DavidPostill Too bad :( – gaazkam Dec 25 '18 at 13:45
  • Out of interest what are you using the notation to mean? "x²₅ or x₅²" would ordinarily mean different things. Other than chemical elements I can't readily recall seeing that notation? – pbhj Dec 25 '18 at 16:28
  • @pbhj It occurs often wherever people have reason to make up such a notation. For example the superscript if put in parenthesis could be the nth derivation and the subscript the mth part of a vector. Or whatever. – Nobody Dec 25 '18 at 19:07
  • @pbhj My particular use case: x is a vector of unknowns in a system of linear equations. So we have: a_1*x_1^5+b_1*x_1^4+...etc, etc – gaazkam Dec 25 '18 at 22:36
  • @gaazkam: Complete sidenote: That’s a non-linear equation. – Wrzlprmft Dec 26 '18 at 09:53
  • @Wrzlprmft I was sleepy, I guess. a, b, ... are unknowns. xs are coefficients, like in Vandermone matrix. – gaazkam Dec 26 '18 at 17:29
  • I guess I'd want the subscript interior to the superscript for things like a_1.(x_1)^5. – pbhj Dec 26 '18 at 20:18

1 Answers1

13

Your issue is not with Unicode but with the font you use. Technically, every font could use negative kerning to move subsequent super- and subscripts on top of each other. One font that does this is Linux Libertine (if you put the subscript first):

your example rendered with Linux Libertine

On the other hand, this is quite rare. Even STIX, which is specifically designed with mathematical typesetting in mind, does not have this feature.

Wrzlprmft
  • 2,813
  • 4
    Does it also work for x₅₅²²? – Ilmari Karonen Dec 25 '18 at 20:35
  • 1
    While I believe there are fonts which do this, it doesn’t seem like correct behavior. The superscript and subscript characters are neither combining characters nor modifier characters, as far as I know. – VGR Dec 25 '18 at 21:38
  • @VGR: Well, from some point of view, you are not combining with or modifying another character this way. You just use space more efficiently. – Wrzlprmft Dec 26 '18 at 09:52
  • Thanks for mentioning Linux Libertine! — it works perfectly for writing music-theory analysis, e.g. "Ⅴ 6/5", with the 6 and 5 vertically aligned just to the right of the Roman numeral, as shown above with "x 2/5". – Richard E. Silverman Jan 02 '22 at 17:51