r/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

71 comments sorted by

View all comments

Show parent comment

1

u/DataBaeBee Feb 13 '25

rU+2099

1

u/DataBaeBee Feb 13 '25

r\U+2099

1

u/avspuk Sep 25 '26 edited Sep 25 '26

rₙ

rₙ

Try the 'html entity' version instead of the unicode one. And also initially enter it on old.reddit.com

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

1

u/avspuk Sep 25 '26

H₂O

1

u/avspuk Sep 25 '26

Will this work H₂O

1

u/avspuk Sep 25 '26 edited Sep 25 '26

Now writing from old.reddit.com,..., H₂O

And this is a straight cut&paste from the comment below where it works