0

Consider the following math expressions (which are not equivalent):

(e^x)^y

e^(x^y)

Can I write these in Unicode (with unlimited number of bracketable subscripts)?

1 Answers1

2

Unicode does define some specific codepoints for superscripts and subscripts.

There are some codepoints specifically for x, y, ( and ) as superscripts. For your two specific examples, the closest you can get is something like this:

U+0028 U+0065 U+02E3 U+0029 U+02B8

(eˣ)ʸ

U+0065 U+207D U+02E3 U+005E U+02B8 U+207E

e⁽ˣ^ʸ⁾

In this second case, you cannot have y as a superscript of x when x is already a superscript of e. In other words, something like this is not possible in Unicode:

not possible

If you tried putting the x and y superscripts together, it would come out like this instead:

e⁽ˣʸ⁾

You can, however, replace x and y with actual number digits:

U+2070
¹ U+00B9
² U+00B2
³ U+00B3
U+2074
U+2075
U+2076
U+2077
U+2078
U+2079

For example:

(e¹⁰)²
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Possibly my Stack Overflow client on Android does not support the Unicode symbols you inputted). Nevertheless, all I see I your answers is rectangles instead of characters. What if we tried with UT8 instead? – Jack Maddington Dec 18 '15 at 14:29
  • 1
    @JackMaddington: StackOverflow uses UTF-8 for its HTML. But regardless, fonts are based on Unicode codepoints, not UTFs. I have taken a screenshot of this answer and [posted it online](http://i.stack.imgur.com/zQ6Xq.png) for you. – Remy Lebeau Dec 18 '15 at 21:13
  • Thanks. I guess even with Unicode you cannot do more than a simple basic math. I guess it's suitable for calculator buttons and that's it (as far as my purposes go). – Jack Maddington Dec 19 '15 at 01:08
  • Isn't there at least a set of codes that will allow you to subscript a word (like "hello")? What about UTF-8? – Jack Maddington Dec 19 '15 at 01:09
  • 1
    Subscripts/superscripts are specific codepoints, they don't work like combining characters that modify other codepoints. There is no codepoint that says "the preceding/following codepoint(s) is subscripted/superscripted." If you look at links I gave you, or even read the [Unicode code charts](http://www.unicode.org/charts/), you will see that there are a handful of letter-based subscript/superscript codepoints available, but certainly not all letters are represented. – Remy Lebeau Dec 19 '15 at 01:43
  • 1
    And what about UTF-8 do you want to know exactly? UTFs are just encoding schemes of Unicode codepoints for storage/transmission purposes. They don't change how the codepoints themselves work. If you need to know more than that, please ask a new question about it. – Remy Lebeau Dec 19 '15 at 01:44
  • Too bad Unicode/UTF-8 can't do everything the LaTeX typesetting system can do for mathematics and other systens (at least excluding diagrams). – Jack Maddington Dec 19 '15 at 01:47
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/98393/discussion-between-remy-lebeau-and-jack-maddington). – Remy Lebeau Dec 19 '15 at 02:12
  • one more question: Can it be possible to make a negate variable in Unicode. f.e. an x with an overstrike ? – Walter Schrabmair Apr 12 '17 at 09:09
  • @WalterSchrabmair I don't understand what you are asking for, but please post it as a new question. – Remy Lebeau Apr 12 '17 at 09:25
  • Unfortunately I am block to post new questions. What a pitty. I find it really bad. But in the meantime I found, that is not possible to overstrike one character with another. – Walter Schrabmair Apr 12 '17 at 13:28