diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b917afbc4..097cae79c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -87,6 +87,15 @@ {{if $.Site.Data.config.enableLinkPreview}} initPopover({{strings.TrimRight "/" .Site.BaseURL }}) {{end}} + {{if $.Site.Data.config.enableLatex}} + renderMathInElement(document.body, { + delimiters: [ + {left: '$$', right: '$$', display: true}, + {left: '$', right: '$', display: false}, + ], + throwOnError : false + }); + {{end}} }; attachSPARouting(draw); diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html index e11c4f14e..756ef779e 100644 --- a/layouts/partials/katex.html +++ b/layouts/partials/katex.html @@ -2,15 +2,4 @@ - {{end}}