Hey Folks! Me Again! (Edit: Solution Found)
Last edited Sun Jan 3, 2021, 02:28 PM - Edit history (1)
First, Happy New Year!
Does anybody know if there's a code to subscript or superscript in an HTML site, like here at DU?
I know things like bold are brackets by bracket. Italics uses an i. Then you close it with backslash and the same bracket thing.
Is there something similar for sub or super scripting?
OAITW r.2.0
(28,361 posts)but Happy New Year.....no script needed!
tblue37
(66,035 posts)doing so here.
I don't think there is, though.
ProfessorGAC
(69,879 posts)There's a way to bold, italic, or underline text in a post. We can use the buttons above the post textbox, or we can code [ ], putting a b, an I, or a u, inside the brackets. (If I actually type the text, it won't show because it will just alter the font.
What I'm asking is if there's a way to raise or lower a character. For instance, instead of 2^5, it would actually raise the 5 up to show 2 to the 5th power.
Or, lowering the "2" in CO2. That way the formula would look chemically correct.
It's easy in any Office program, but doesn't apply when posting to a site like this.
tblue37
(66,035 posts)ProfessorGAC
(69,879 posts)Thanks.
Sorry if I wasted anybody's time. Can't do it here on DU.
I'll try it on a different site, though. Now I know how!
Midnightwalk
(3,131 posts)Googled it but to paste it Id have to do the show html trick and i forget.
< sup > probably. Without spaces
ProfessorGAC
(69,879 posts)The code doesn't appear, but the number that was supposed to sub, stayed on the same line.
Midnightwalk
(3,131 posts)Three[ b ]3[ /b ] without spaces on DU is
Three3
Three3 doesnt work here
I wont talk about some other experiments
Btw, sitting playing with bbcode and html on du during a blackout. Heres a link i found
https://skdavis.net/viewtopic.php?t=130]
SheltieLover
(59,605 posts)I hope this helps:
Subscript: The tag is used to add a subscript text to the HTML document. ... The tag defines the superscript text. Superscript text appears half a character above the normal line and is sometimes rendered in a smaller font. Superscript text can be used for footnotes.Aug 2, 2019
From google search.
On edit: https://www.geeksforgeeks.org/html-subscript-superscript-tags/
ProfessorGAC
(69,879 posts)Seems to only apply in writing HTML code, but doesn't work for text in the text box, like for posting.
If I type H, then that tag with a 2, close the sub and an O, I get H2O. All full size characters on the same line. I don't get the smaller "2", offset down.
Oh, well.
It was a curiosity. It's not vital.
SheltieLover
(59,605 posts)Sorry.
Maybe pm an admin person?
ProfessorGAC
(69,879 posts)...it doesn't work on DU.
I'll try it on the ACS forum.
That was really my issue. I hate discussing chemical mechanisms and not be able to subscript the numbers. Or kinetics without superscrpting exponents bugs me.
And, since my laptop is paleolithic, the updates for the chem draw programs don't work. I can draw the reactions, and I'm not subbing or supering. I hate the way it looks.
tblue37
(66,035 posts)we transitioned to DU3, I haven't been able to do that, either.
FuzzyRabbit
(2,083 posts)then " /sub" and "/sup" between brackets to close.
This works for my websites, but I don't know if it works here in DU.
ProfessorGAC
(69,879 posts)Doesn't seem to work here. I'll try it on a different site to see if it works there.
Pobeka
(4,999 posts)Happy New Year!
Make7
(8,546 posts)99⁰
99¹
99²
99³
99⁴
99⁵
99⁶
99⁷
99⁸
99⁹
99₀
99₁
99₂
99₃
99₄
99₅
99₆
99₇
99₈
99₉
They are kinda small and inconsistent, but for some math and chemistry they're better than nothing. My biggest concern with using them is I am not certain they will display correctly in all the browser / OS combinations that people might be using.
c² = a² + b² − 2ab cos 𝛾
C₁₂H₂₂O₁₁
https://en.m.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
I didn't see in the Wiki how I'm supposed to code it. Can you school me?
BTW: your last example is sucrose. When I sub in science classes, I draw that chemical structure on the whiteboard.
Fun with the kids a around Halloween or Christmas because I can ask questions to get to "sugar" talking about favorite stuff about those holidays.
I use theobromine too, because it's the primary flavor component in chocolate!
Make7
(8,546 posts)You can bookmark my reply at the following link:
https://www.democraticunderground.com/109526708
To use Unicode characters here, you just put them in an html entity:
Most tables show them as hexadecimal numbers. For example, at that wiki link the Unicode number for superscript parentheses are 0x207D and 0x207E. So we write:
Which should give us this: n⁽²⁺⁵⁾
Most Unicode characters should work in thread/reply titles as well. Like using = for an equals sign.
There is a catch. Any characters the DU software strips out for security purposes will get deleted if you preview and then post a message or if you go back and edit one. When previewing, just hit the back button before posting so the html entity is in the post, not the actual character. That pertains more to titles than message text, and only for a few characters - most Unicode characters act like any other character after being converted from an html entity.
You could even DU Mail yourself a list of the characters you may use to have an easy place to copy and paste from - easy to update and find as well.
ProfessorGAC
(69,879 posts)Thanks much!
Denzil_DC
(7,941 posts)Many of these were disabled after the grand hack during the 2016 election.
See the post from Elad here: https://www.democraticunderground.com/10138634
and the long discussion in Community Help here: https://www.democraticunderground.com/12561674