Superscript and Subscript
Setting
ts
import { defineConfig } from 'vitepress-theme-niansi'
export default defineConfig({
markdown: {
plugins: {
// Enable Subscript
sub: true,
// Enable Superscript
sup: true
}
}
})Syntax
- Use
^ ^to mark the superscript. - Use
~ ~to mark the subscript.
Example
19th
H2O
Demo
md
19^th^
H~2~OTips
You can use \ to escape ^ and ~:
H~2~O 19^th^
Changelog
2026-04-18 23:33
View All Changelog