r/jamt9000 • u/jamt9000 • Mar 18 '10
Subscript and superscript
Reddit now supports superscript officially with ^
Custom superscript and subscript so you can make formulae like:
NH*_4_+*
2H*2O ⇌ H3O+* + OH-
a2 + b2 = c2
_1_2D + _1_3T → _2_4He + n0
Here's the syntax:
*_subscript_* makes subscript
*`superscript`* makes superscript
*_sub_`sup`* makes _sub_sup
*`sup`_sub_* makes sup_sub_
And the CSS:
/* == Subscript and superscript == */
.md em{
position: relative;
}
/* *_sub_* */
.md em em{
font-style: normal;
vertical-align: sub;
font-size: 80%;
}
/* *`sup`* */
.md em code{
font-family: verdana, arial, helvetica, sans-serif;
vertical-align: super;
font-size: 80%;
}
/* *_sub_`sup`* */
.md em em+code{
position: absolute;
left: 0;
bottom: 1em;
vertical-align: super;
}
/* *`sup`_sub_* */
.md em code+em{
position: absolute;
left: 0;
top: 1em;
vertical-align: sub;
}
18
Upvotes
View all comments
Show parent comment
1
u/avspuk Sep 25 '26 edited Sep 25 '26
PRETTY SURE MY PROBLEMS HERE ARE ALL THAT IT MUST BE IRIGINALLY WRITTEN FROM old.reddit.com AND THAT IT ALSO DOESNT LIKE EDITS
rₙ
r/ₙ
Why can't I get this to work but I can for the H₂O
And why has that stopped working when it worked in a comment or two below this obe