September 10, 2021 latex jekyll markdown ☕️ buy me a coffee
I’m about to start my PhD and a logical conclusion from that is that I will be writing a lot on LaTex. If I plan to write any blogs or such about the progress then this LaTex support is needed! Luckily for me iangoodfellow has written a short guide on this already!
Add the following code to _layouts/post.html
:
Note: cdn.mathjax.org
has been deprecated. Please use cdnjs.cloudflare.com
as per https://www.mathjax.org/cdn-shutting-down/
Then you can write normal MathJax expressions such as
to get
\[\vec{\alpha} = \begin{bmatrix} 1 & 1 & 1 \\ 2 & 2 & 2 \end{bmatrix} \cdot \begin{bmatrix} 4 \\ 2 \\ 0 \end{bmatrix}\]MathJax only supports the core LaTex functionality which means so ability to add packages with usepackage
. Hence, iangoodfellow suggests using boldsymbol
rather than bm
. Furthermore, he says
“There seem to be a few other rough edges, for example, LaTeX expressions seem to cause extraneous line breaks when used in blog post titles.”
There’s two resources I result on the regular when using Markdown and/or Latex:
adam-p
MJD