There is an extra markup in Hugo for vertically shifted characters in normal text.

For complex mathematical or chemical formulas, LaTeX notation is probably the better choice.

Syntax

x~4~ x‍^4^ ^3^⁄~4~

The HTML entity ⁄ corresponds to a fraction line.

Layout

x4 x4 X4 X4   x3 x3 X3 X334

Compare the theme styling to the one the Plex fonts provide as special Unicode numbers:

x₄ x⁴   X₄ X⁴ x₃ x³   X₃ X³ ³⁄₄

These glyphs are very small and the subscripts are not placed consistently. Therefore, I recommend using markup that also works for other characters like alphabetical indices and the 1st, 2nd, 3rd, 4th,…

Chemical Formula

Ethanol with the structural formula C2H5OH is better known as drinking alcohol.

Mathematical Formula

Simple formulas like E = mc2 or functions like f(x) = 3x2 + 5x5.

Fractions

Every fraction like 232747 may be included using super- and subscripts with a fraction line (entity ⁄) in between them.