This commit is contained in:
Vanessa 2024-02-06 09:45:08 +08:00
parent d01fec553d
commit aa6e044cc5
5 changed files with 9 additions and 7 deletions

View file

@ -352,7 +352,9 @@
}
.katex {
// https://github.com/siyuan-note/siyuan/issues/10251 font-size: 113%;
// https://github.com/siyuan-note/siyuan/issues/10251
// https://github.com/siyuan-note/siyuan/issues/10321
font-size: 1.36em;
line-height: normal; // https://ld246.com/article/1649890278771
.mathnormal {

View file

@ -16,9 +16,9 @@ export const mathRender = (element: Element, cdn = Constants.PROTYLE_CDN, maxWid
if (mathElements.length === 0) {
return;
}
addStyle(`${cdn}/js/katex/katex.min.css?v=0.16.0`, "protyleKatexStyle");
addScript(`${cdn}/js/katex/katex.min.js?v=0.16.0`, "protyleKatexScript").then(() => {
addScript(`${cdn}/js/katex/mhchem.min.js?v=0.16.0`, "protyleKatexMhchemScript").then(() => {
addStyle(`${cdn}/js/katex/katex.min.css?v=0.16.9`, "protyleKatexStyle");
addScript(`${cdn}/js/katex/katex.min.js?v=0.16.9`, "protyleKatexScript").then(() => {
addScript(`${cdn}/js/katex/mhchem.min.js?v=0.16.9`, "protyleKatexMhchemScript").then(() => {
mathElements.forEach((mathElement: HTMLElement) => {
if (mathElement.getAttribute("data-render") === "true") {
return;