Superscript and Subscript
Less than 1 minute
Let the Markdown file in your VuePress site support Subscript and Superscript.
Config
// .vuepress/config.ts
import { mdEnhancePlugin } from "vuepress-plugin-md-enhance";
export default {
plugins: [
mdEnhancePlugin({
// Enable Subscript
sub: true,
// Enable Superscript
sup: true,
}),
],
};
// .vuepress/config.js
import { mdEnhancePlugin } from "vuepress-plugin-md-enhance";
export default {
plugins: [
mdEnhancePlugin({
// Enable Subscript
sub: true,
// Enable Superscript
sup: true,
}),
],
};
Syntax
- Use
^ ^
to mark the superscript. - Use
~ ~
to mark the subscript.
Demo
- 19th
- H2O
- 19^th^
- H~2~O