This site requires JavaScript, please enable it in your browser!
Greenfoot back
abby410
abby410 wrote ...

2017/3/9

Subscripts

abby410 abby410

2017/3/9

#
I am trying to create a program to teach about logarithms. I would like to use subscripts and superscripts to display numbers, but I don't know how to make a string of text into a superscript or subscript.
danpost danpost

2017/3/10

#
The subscripts are not too difficult to do. There are characters for all ten of them between (char)8320 and (char)8329. I have found all but one of the superscripts (the 1 was not found). Most of them between (char)8304 and (char)8313 (8305 through 8307 are not usable. The 2 and 3 superscripts are the squaring and cubing characters located at (char)178 and (char)179 (if I am not mistaken). Without the '1', however,, the codes for the other nine might be quite useless. A side though is that you could create you own system for creating the superscripts and subscripts in an image with a base number using image manipulation. Another possibility is to use the carrot to indicate exponent values -- the '^' symbol followed by the exponent after the base number with or without its subscript. It would look something like this: 328₅^(2/3). I noticed that the subscripts are quite small and multiple digit subscripts do not print out too well. Maybe creating your own system is best.
You need to login to post a reply.