From 39d4defb1270d8296c87c0a5141d814d68d72b07 Mon Sep 17 00:00:00 2001 From: Mohcine Chraibi <m.chraibi@fz-juelich.de> Date: Thu, 29 Jun 2017 12:53:23 +0200 Subject: [PATCH] Add new file --- _posts/2016-03-24-latex | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 _posts/2016-03-24-latex diff --git a/_posts/2016-03-24-latex b/_posts/2016-03-24-latex new file mode 100644 index 0000000..8ecf666 --- /dev/null +++ b/_posts/2016-03-24-latex @@ -0,0 +1,49 @@ +--- +title: Math Sample +subtitle: Using KaTeX +date: 2017-03-05 +tags: ["example", "math"] +--- + +KaTeX can be used to generate complex math formulas server-side. + +$$ +\phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots +$$ + +Additional details can be found on [GitHub](https://github.com/Khan/KaTeX) or on the [Wiki](http://tiddlywiki.com/plugins/tiddlywiki/katex/). +<!--more--> + +### Example 1 + +If the text between $$ contains newlines it will rendered in display mode: +``` +$$ +f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi +$$ +``` +$$ +f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi +$$ + + +### Example 2 +``` +$$ +\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } +$$ +``` +$$ +\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } +$$ + + +### Example 3 +``` +$$ +1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1. +$$ +``` +$$ +1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1. +$$ -- GitLab