Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugoBasicExample.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandros <onedrawingperday@users.noreply.github.com>2020-05-28 00:25:02 +0300
committerGitHub <noreply@github.com>2020-05-28 00:25:02 +0300
commitf6f3d298cc12b54878a1019ee41335a75ca28aa3 (patch)
tree3c49b00581e4aba5ec12e599bb3eca773ad8269c
parentc4afa25a5a336ef44e869e9d1aea494a55994b6c (diff)
Upgrade KaTex + workaround for Inline Math
For an equation to render inline make sure to wrap it within an inline shortcode so that the Markdown processor is not used for parsing. Also note that for inline KaTex since `katex@0.11.1` use the `\( ... \)` delimiters and not the `$` sign. Closes: #60
-rw-r--r--content/post/math-typesetting.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/content/post/math-typesetting.md b/content/post/math-typesetting.md
index a1467e3..ab7b3af 100644
--- a/content/post/math-typesetting.md
+++ b/content/post/math-typesetting.md
@@ -27,18 +27,20 @@ In this example we will be using [KaTeX](https://katex.org/)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
### Examples
-
-Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$
+{{< math.inline >}}
+<p>
+Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
+</p>
+{{</ math.inline >}}
Block math:
-
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$