diff --git a/exampleSite/content/post/2017-03-05-math-sample.md b/exampleSite/content/post/2017-03-05-math-sample.md new file mode 100644 index 00000000..8ecf6660 --- /dev/null +++ b/exampleSite/content/post/2017-03-05-math-sample.md @@ -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/). + + +### 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. +$$ diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 18125b29..904cf9b5 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -186,7 +186,7 @@

- Hugo v{{ .Hugo.Version }} powered  •  Theme by beautiful-jekyll adapted to Beautiful Hugo + Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo {{ with .Site.Params.commit }} • [{{ getenv "GIT_COMMIT_SHA_SHORT" }}]{{ end }}

@@ -194,12 +194,13 @@ + + - + + {{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index fb5ed3e9..4c144220 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,6 +11,7 @@ +