As a (retired) mathematician, I want to write mathematical notation on my blog, and since LaTeX is the least evil to do so, I want to have LaTeX support on my blog.
The simplest way to do so seems to be KaTeX; altough please tell me if you know something better!
Including KaTeX in my blog - The simple way
That’s the way I am currently working with. Just add the following lines to my your head.html
partial:
|
|
And that’s all, you are good to go!
A note of caution
If you want to do a multiline something, you have to escape backslashes.
The following KaTeX rendering:
$$ 42 \\ 43 $$
… looks like that:
$$ 42 \\\\ 43 $$
Potential improvements
- I would prefer my website to be self-contained. Hence I should probably host KaTeX next to my own files. This is not there yet, but an improvement I am planning to do.
- Also, I would like to keep on the latest version of KaTeX. This might be doable with Renovate, altough I don’t yet know how…
There will be an update if I find out. - In the future, I might only include the KaTeX style only on sites where math occurs, making the blog load faster.