0

If in linux I type CTRL-shift-U, followed by a unicode control code, I can type a superscript.

So if I type 10, followed by CTRL-shift-U, followed by b9, I can get 10¹.

How though do I write something like 10 to the power of 18?

1 Answer 1

1

Install gucharmap, the GNOME Character Map tool, and find the codepoint number in there. It is always shown as "U+xxxx" (four or more digits).

The codepoint for "superscript 8" is U+2078, from the Superscripts and Subscripts Unicode block. Most superscript digits correspond to U+207x in this block, with the exception of 123 (which are U+00B9, U+00B2, and U+00B3 respectively).

(The reason is that ¹²³ were originally imported from another codepage where they already existed, so they were placed in one of the initial blocks, but all other subscript and superscript numerals were added "fresh" to Unicode so they got their own block. For example, IBM codepage 437 had ² long before Unicode.)


An alternative method is to repurpose one of the keyboard's keys as the Compose key. (For example, if your Caps Lock is entirely unused, you could remap it to Compose.) Afterwards, pressing Compose then Shift^ and 6 would give you ⁶.

3
  • So you type each control code in turn to print each superscript char in succession? When I tried this, I got little spaces between each char, making them look not quite like an exponent of 18, for example, but like 1 8. But now I find if I paste them here, they appear without such spaing, thus: 10¹²³. So it my problem is my use of a monospace font, which puts big gaps between each of them and makes it seem like I need to use some other control code to get multi-char exponents.
    – markling
    Oct 28, 2021 at 13:03
  • 1
    Yes, that's literally what "monospace font" means: each character, without exception, has the same width. (This also applies to superscripts because they're not really superscripts as far as the text layout code cares – they still have the same font size as main text, the same baseline as main text, so they also occupy the same amount of space in a monospace font.) Oct 28, 2021 at 13:13
  • There is no such thing as "multi-char exponents" in Unicode in general. (IMHO, it's almost out-of-scope for Unicode – certainly not impossible in theory, considering it already has "fraction slash", but not really the job of Unicode.) To get nice-looking exponents you need to write the document in a format that supports real superscripts, such as 10<sup>18</sup> in HTML (or math features in MS Word or LaTeX) – as that's a layout feature it can just take regular digits and shrink them to superscript size, even in monospace fonts. Oct 28, 2021 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .