Skip to content

Commit

Permalink
fix(plugin-markdown-math): improve font-size in katex
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Sep 30, 2024
1 parent c73b86f commit 4add5f1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export default defineUserConfig({
mark: true,
size: true,
}),
markdownMathPlugin(),
markdownMathPlugin({
type: 'katex',
}),
redirectPlugin({
switchLocale: 'modal',
}),
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@vuepress/plugin-shiki": "workspace:*",
"@vuepress/plugin-cache": "workspace:*",
"@vuepress/theme-default": "workspace:*",
"katex": "0.16.11",
"mathjax-full": "3.2.2",
"sass-embedded": "1.79.4",
"sass-loader": "^16.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// katex fix
.katex {
font-size: 1.05em;
direction: ltr;

/* stylelint-disable-next-line selector-class-pattern */
.cjk_fallback {
font-size: 0.83em;
}
}

.katex-display {
Expand All @@ -17,10 +21,6 @@
&::-webkit-scrollbar {
height: 3px;
}

.katex {
font-size: 1.21em;
}
}

.katex-error {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4add5f1

Please sign in to comment.