eyenx

eyenx

yet another geek

07 Mar 2014
trying out kramdown

kramdown seems awesome!

I heard and used kramdown already a long time ago. But I didn’t know they had such a good documentation on their website.

It is only after seeing this image that I went crazy.

kramdownoverview

So I’ll try some math stuff here. I hope you don’t mind. (I don’t really know math)

today I learned

everyone should know

But in math there is always the hard way. Defined generally it looks different.

And here starts the hilariousness

how does the syntax look like?

Quite simple. One has only to put the latex code between the two dollar signs.

$$
\begin{align*}
(a+b)^n &= \sum_{k=0}^n \binom{n}{k}\cdot a^{n-k}\cdot b^{k}
\end{align*}
$$


will render to

Inline math is very similar.

$$ 2^{3}+8=16 $$


renders to

JS needed to render

Don’t forget to include the MathJax.js. I just took it from their website.

<script 
src="http://kramdown.gettalong.org/MathJax/MathJax.js" type="text/javascript">
</script>


edit

Actually the official MathJax from mathjax.org works way better.

<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>