From 0e28bcbeda3d4b68f789ac3a2b3fd5e528bba285 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Wed, 17 Feb 2021 12:09:13 +0100 Subject: [PATCH 1/3] Display inline math using the '$' delimiter That's the default LaTeX syntax. Using `\\(` and `\\)` worsens the editing experience. Code extracted from https://github.com/KaTeX/KaTeX/blob/5c44c47bd2ca70c2a8585c19d9fae598b1227a57/contrib/auto-render/index.html#L44-L48 I'm not going to repeat the `delimiters` found in `static/js/auto-render.min.js`. --- layouts/partials/footer.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8b487937..84abbca4 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -80,8 +80,21 @@ -{{- end -}} - +{{- end }} + {{- if .Site.Params.selfHosted -}} From abd0cf2317af8f189890e89d6880fdb2035fba8c Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Wed, 17 Feb 2021 12:32:31 +0100 Subject: [PATCH 2/3] fixed missing delimiters existing delimiters have to be repeated --- layouts/partials/footer.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 84abbca4..c9596820 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -86,11 +86,14 @@ document.body, { delimiters: [ + {left: "$$", right: "$$", display: true}, {left: "$", right: "$", display: false}, {left: "\\begin{equation}", right: "\\end{equation}", display: true}, {left: "\\begin{align}", right: "\\end{align}", display: true}, {left: "\\begin{alignat}", right: "\\end{alignat}", display: true}, {left: "\\begin{gather}", right: "\\end{gather}", display: true} + {left: "\\(", right: "\\)", display: false}, + {left: "\\[", right: "\\]", display: true} ] } ); From 55bc5f3edae0896156ef12683120966db7134fdf Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Wed, 17 Feb 2021 15:40:21 +0100 Subject: [PATCH 3/3] fixed missing comma typo --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c9596820..d9020b86 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -91,7 +91,7 @@ {left: "\\begin{equation}", right: "\\end{equation}", display: true}, {left: "\\begin{align}", right: "\\end{align}", display: true}, {left: "\\begin{alignat}", right: "\\end{alignat}", display: true}, - {left: "\\begin{gather}", right: "\\end{gather}", display: true} + {left: "\\begin{gather}", right: "\\end{gather}", display: true}, {left: "\\(", right: "\\)", display: false}, {left: "\\[", right: "\\]", display: true} ]