Page 1 of 1
Typing supercripts?
Posted: Sat Aug 17, 2019 10:02 am
by terrypin
Is it possible to type a superscript in TextPad?
e.g. the '2' in the usual expression for x squared, or the '-1' for the inverse of x?
Posted: Sun Aug 18, 2019 11:40 am
by MudGuard
superscript is not possible in textpad (the same as it is not possible to set bold, italic or a different font for a part of a text). Textpad is a text editor and thus allows only plain text, no formatting.
Except: Unicode has some superscript characters (\u2070 and following, and \u00b2 ...), among them the digits, but as far as I could see not a superscript minus sign.
Posted: Sun Aug 18, 2019 3:22 pm
by ben_josephs
Superscript minus is U+207B. Here are some others (they are in different Unicode blocks for historical reasons):
Code: Select all
U+2070 x�
U+20B9 x¹
U+00B2 x²
U+00B3 x³
U+2074 x�
U+2075 x�
U+2076 x�
U+2077 x�
U+2078 x�
U+2079 x�
U+2071 x�
U+207A x�
U+207B x�
U+207C x�
U+207D x�
U+207E x�
U+207F x�
You need a well-populated font (for example, Lucida Sans Unicode, any of the DejaVu Sans or DejaVu Serif fonts, Calibri, Cambria, Times New Roman) to display all of these.
Posted: Sun Aug 18, 2019 5:05 pm
by terrypin
Thanks both, that's promising. But could you step me through how to try that please?
What I've tried so far:
I've never seriously used special document classes, but I see from Preferences that a couple of decades ago I must have experimentally made a new one called Terry1. So I went to that and changed its font to Calibri 14. I also specified Unix (and UTF -8 ??) as shown in my screenshot.
Well, I tried in vain to include that either as an image or an active URL using the tools provided, but this untagged text looks OK
https://www.dropbox.com/s/j3j3omdn9ihhx ... .jpg?raw=1
I then added an extension of .tp1 and saved a new empty file as TestCalibri.txt. In File Explorer I changed that to TesrCalibri.tp1 and used Open With... to open it in TextPad.
Encouragingly, typing 'abc123' duly appeared in Calibri size 14.
But what next? For example, how do I type 'U+207B'?
====================
Hmm, I assume the site is broken, as on using Submit I get
Couldn't get mail server response codes
DEBUG MODE
Line : 185
File : smtp.php
I'll try again later or tomorrow.
Terry, East Grinstead, UK
Posted: Sun Aug 18, 2019 5:18 pm
by MudGuard
According to 8.0.0 release notes:
By default the command Edit -> EditUnicodeChar might be assigned to Alt-X (unless you already have own key assignments).
Then you have to assign a key by yourself (Configure -> Preferences -> Keyboard, select Edit in left list, EditUnicodeChar in Right list, focus key field and press the key you want to use , then click Assign button).
If you then press Alt-X (or whatever you assigned), a small box appears at the cursor position where you can enter the hex code of the character.
(Or you could use the Windows Character Table for selecting characters)
Btw, I deleted the duplicates of your last post.
Posted: Sun Aug 18, 2019 6:01 pm
by terrypin
Hmm, I assume the site is broken, as on using Submit I get
Couldn't get mail server response codes
DEBUG MODE
Line : 185
File : smtp.php
I'll try again later or tomorrow.
--------------------
I was hoping maybe it could be done by simply specifying a font that included sub and superscripts in its repertoire.
--------------------
Happily I found that some superscripts
can be entered in TextPad.
This list is the best so far:
https://www.webnots.com/alt-code-shortc ... subscript/
But strangely, although all of those I tried worked in my image editor, PaintShop Pro, and my video editor, Movie Edit Pro, some failed in TextPad (in my Calibri document class).
Terry, East Grinstead, UK
Posted: Mon Aug 19, 2019 7:52 am
by AmigoJack
terrypin wrote:a font that included sub and superscripts in its repertoire
Consolas in version 6.96 does so (comes with Windows 7). Pay attention to a font's version - they're rarily born supporting all characters that yet have to be planned in the future.
terrypin wrote:all of those I tried worked in my ..., some failed in TextPad
"Failed" in what? Displaying properly? Accepting input? Have you tried just copying the text elsewhere and paste it in Textpad - as in copy �¹²³������������� and see if it's still the same length in Textpad and then check which characters don't render as expected? And to then change the font because now you have all the characters?
Posted: Mon Aug 19, 2019 4:42 pm
by terrypin
Thanks both, appreciate the further replies.
It's proving a more complex topic than I'd anticipated!
For the rare occasions that I need supercripts I think I'll settle for that web site.
@AmigoJack
So far unable to download a free copy of Consolas. At
https://www.wfonts.com/font/consolas
I read "Due to copyright issues, this font has been removed," and other sites proved fruitless too.
Re "... some failed in TextPad": it displayed either '?' or other incorrect characters.
I copied this
�¹²³�������������
to PSP and to TextPad with these results:
(Is the Image tool broken? It failed to display using Preview. I'll just add a raw link.)
https://www.dropbox.com/s/tsn4pchjv8z1c ... .jpg?raw=1
(Here we go again. On using Submit, get tha same error message, so I'm left assuming my post did not get sent. Yet it sounds as if yesterday's similar attempts
did work. I'll not try again for the time being...)
Posted: Mon Aug 19, 2019 4:47 pm
by terrypin
On opening Edge or Chrome I see my post did get sent. Still not included the embedded screenshot:
Posted: Mon Aug 19, 2019 7:18 pm
by MudGuard
IIRC Textpad supports Unicode from version 8, you seem to use version 7.6.4 ...