Hi all, I’ve been getting Github Pages set up to build and generate html for my class notes, which are written in a combination of Markdown and inline LaTeX (via the $$
style).
I’ve run into a really weird issue where the Jekyll build script seems to remove backslashes in front of the {
and }
characters. Since LaTeX uses {}
extensively, representing sets (and literal braces) is done like so: \{ x \in \mathbb{Z} \}
. As Jekyll is removing those preceding backslashes, KaTeX (the LaTeX rendering engine I’m using) doesn’t render them properly.
You can see an example of this behavior here: Automata Theory
KaTeX will render everything (sans braces) upon loading the page in a browser, but if you curl it, you’ll notice that the backslashes before the braces are gone (compared to the raw markdown). Interestingly - the same thing appears to happen on Github’s native Markdown renderer.