Superscript and Subscript
Less than 1 minute
Let the Markdown file in your VuePress site support Subscript and Superscript.
Settings
import { hopeTheme } from "vuepress-theme-hope";
export default hopeTheme({
markdown: {
// Enable Subscript
sub: true,
// Enable Superscript
sup: true,
},
});Syntax
- Use
^ ^to mark the superscript. - Use
~ ~to mark the subscript.
- 19th
- H2O
Demo
- 19^th^
- H~2~OYou can use \ to escape ^ and ~:
H~2~O 19^th^
Escaping
You can use `\` to escape `^` and `~`:
H\~2~O 19\^th^Changelog
6/4/25, 1:34 PM
View All Changelog
1bd5f-on55e92-onb1230-on22787-onb41c0-on54c46-on757fd-on83bff-one45fb-on2fa50-on3c8d6-on9856d-on23515-on48bca-on9cdd7-on63d09-onfd395-on1eb77-onf6ff0-on3c199-on