niklasbuschmann / contrast

Jekyll Theme

Home Page:https://niklasbuschmann.github.io/contrast/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MathJax support does not seem to be working

Ptival opened this issue · comments

I'm not sure whether there's something special to do, but checking out this repo and serving it, I don't see the math rendered in the "Advanced examples" post.

Hi,

Inline formula not rendering correctly.

I mean $\hat{p}$ should be rendered inline and $$\hat{p}$$ in block or display mode.

Below fix works, but I don't know how to make it work for all pages.

<!doctype html>

<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/contrib/auto-render.min.js"></script>
The formula $a^2+b^2=c^2$ will be rendered inline, but $$a^2+b^2=c^2$$ will be rendered as a block element.

The formula \(a^2+b^2=c^2\) will be rendered inline, but \[a^2+b^2=c^2\] will be rendered as a block element.
<script> renderMathInElement( document.body, { delimiters: [ {left: "$$", right: "$$", display: true}, {left: "\\[", right: "\\]", display: true}, {left: "$", right: "$", display: false}, {left: "\\(", right: "\\)", display: false} ] } ); </script>