Fun with Superscripts

A virtual pub for off topic, light hearted pub related banter and discussion. No trainers
Post Reply
scotia
Lemon Quarter
Posts: 3577
Joined: November 4th, 2016, 8:43 pm

Fun with Superscripts

Post by scotia »

I'm not sure if the Snug is the best place for this - but it has arisen from the contributions to "The solution to 42" in the Snug
Looking at these contributions, its clear that some contributors know how to display Superscripts correctly - while others of us don't.
So I set out to try to discover the secret knowledge. Back in May 2019 this matter was raised, and the conclusion was that changes were required - but only the "Gods of Stooz & Clariman can do this". But clearly it can be done - how?
I played around in many dead ends, but my only limited success came with the use of Alt codes directly in Lemon Fool contributions.
I was using Windows 10 on a PC. Set the keypad to Num Lock, and, holding the Alt key down, type 0178 on the numeric keypad, then release the Alt key - you should get superscript 2. and to get superscript 3 you should use 0179.
There are numerous sites which list the Alt key combinations (including the above two), so I thought that I could continue for 4,5,6 etc - which have published codes 8308, 8309, 8310 etc. But this doesn't work - I get the letters t,u,v. So does TLF only use a subset of the Alt Codes?
OK - off on another track. I had already tried creating text with superscripts using the normal constructs within Microsoft Word - then cutting and pasting into TLF - but the superscript gets lost. How about using Word with the Alt Codes? You do this by typing the Code in Hex, followed by the letter x with the Alt key depressed and released. So I tried it with hex code B2 (decimal 0178) - and correctly displayed superscript 2. I also tried it with hex code 2074 (decimal 8308) and got superscript 4. I now cut and pasted this into TLF - and the correct formats appeared.
So using TLF directly I was able to write:-
X² + Y³
And Using Word with a cut and paste into TLF I was able to display
Z⁴
Apologies if all of you already knew how to do this :lol:

mc2fool
Lemon Half
Posts: 6209
Joined: November 4th, 2016, 11:24 am

Re: Fun with Superscripts

Post by mc2fool »

scotia wrote:There are numerous sites which list the Alt key combinations (including the above two), so I thought that I could continue for 4,5,6 etc - which have published codes 8308, 8309, 8310 etc. But this doesn't work - I get the letters t,u,v. So does TLF only use a subset of the Alt Codes?
It's not TLF, it appears to be the browser. E.g. while I can enter the superscript ² and ³ into the URL with alt codes, trying ⁴ etc gets t etc. However, it does seem to be possible to copy and paste them in, from say https://www.webnots.com/alt-code-shortc ... subscript/ . ⁰ⁱ²³⁴⁵⁶⁷⁸⁹

scotia
Lemon Quarter
Posts: 3577
Joined: November 4th, 2016, 8:43 pm

Re: Fun with Superscripts

Post by scotia »

mc2fool wrote:
scotia wrote:There are numerous sites which list the Alt key combinations (including the above two), so I thought that I could continue for 4,5,6 etc - which have published codes 8308, 8309, 8310 etc. But this doesn't work - I get the letters t,u,v. So does TLF only use a subset of the Alt Codes?
It's not TLF, it appears to be the browser. E.G. while I can enter the superscript ² and ³ into the URL with alt codes, trying ⁴ etc gets t etc.
Yes - this seems to ocurr in both Edge and Chrome browsers

scotia
Lemon Quarter
Posts: 3577
Joined: November 4th, 2016, 8:43 pm

Re: Fun with Superscripts

Post by scotia »

scotia wrote:
mc2fool wrote: It's not TLF, it appears to be the browser. E.G. while I can enter the superscript ² and ³ into the URL with alt codes, trying ⁴ etc gets t etc.
Yes - this seems to ocurr in both Edge and Chrome browsers
And further research discovers that the ALT Code in the Browsers and the Lemon Fool is that the Code is truncated to 8 bits.
So 8308 becomes 116 - and this gives the character t.
Presumably Word handles the full code in a more sophisticated fashion

mc2fool
Lemon Half
Posts: 6209
Joined: November 4th, 2016, 11:24 am

Re: Fun with Superscripts

Post by mc2fool »

scotia wrote:And further research discovers that the ALT Code in the Browsers and the Lemon Fool is that the Code is truncated to 8 bits.
So it seems!

For non-"normal" characters I usually user the Character Map (click on the Start button and start typing Character Map), which you can select and copy characters from and then paste where you want. The great thing about it is the ability to select and view related groups of characters, from which you can select, copy and paste. E.g.

Start up Character Map
Make sure "Arial" is the font selected at the top.
At the bottom tick Advanced view
In the Group by dropdown list select Unicode Subrange
Have fun selecting groups of characters in the Group By popup →►☺♫!

Post Reply

Return to “Beerpig's Snug”