From a5e57ae1336c1d237de3e3631d11be4c86501ea7 Mon Sep 17 00:00:00 2001 From: zwbetz Date: Sun, 21 Apr 2019 11:42:51 -0500 Subject: [PATCH] Revert "Remove katex support, for now" This reverts commit 56f7738d6e79cc7e78b13c1bfb748c7148feab95. --- exampleSite/config.toml | 1 + exampleSite/config.yaml | 1 + .../post/katex-math-typesetting/index.md | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 exampleSite/content/post/katex-math-typesetting/index.md diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2110a56..1facf93 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -23,6 +23,7 @@ enableGitInfo = true # For more date formats see https://gohugo.io/functions/format/ dateFormat = "Jan 2, 2006" codePenUser = "someUser" + katex = true [menu] [[menu.nav]] diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 23e2ac8..2c3de32 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -23,6 +23,7 @@ params: # For more date formats see https://gohugo.io/functions/format/ dateFormat: Jan 2, 2006 codePenUser: someUser + katex: true menu: nav: diff --git a/exampleSite/content/post/katex-math-typesetting/index.md b/exampleSite/content/post/katex-math-typesetting/index.md new file mode 100644 index 0000000..d4a368e --- /dev/null +++ b/exampleSite/content/post/katex-math-typesetting/index.md @@ -0,0 +1,29 @@ +--- +title: "Katex Math Typesetting" +date: 2019-03-28 +tags: [katex, math, typesetting, hugo] +--- + +Enable Katex in the config file by setting the `katex` param to `true`. This will import the necessary Katex CSS/JS. + +**Note:** Use the online reference of [supported TeX functions](https://katex.org/docs/supported.html). + +Some math: + +``` +$$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$ +``` + +$$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$ + +More math: + +``` +$$ +\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } +$$ +``` + +$$ +\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } +$$