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

github.com/dzello/reveal-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Dzielak <dzello@users.noreply.github.com>2020-04-12 05:26:15 +0300
committerGitHub <noreply@github.com>2020-04-12 05:26:15 +0300
commitf86d9378fd585959a147ac992fc0c5a0098b674f (patch)
tree26dd8df49e008ee7e4a9d8828c3e55859e8f5eef
parenta54265ad7d72123931b16f92b07c2fcffb5a3474 (diff)
Document MathJax supportdzello-patch-1
Document how to use MathJax
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md
index 235fa2b..de81b56 100644
--- a/README.md
+++ b/README.md
@@ -271,6 +271,39 @@ Markdown surrounded by the markdown shortcode will not be rendered by Hugo but b
{{% /markdown %}}
```
+### MathJax support
+
+Add the following to `layouts/partials/reveal-hugo/body.html`:
+
+```
+<script>
+MathJax = {
+ tex: {
+ inlineMath: [['$', '$'], ['\\(', '\\)']]
+ },
+ svg: {
+ fontCache: 'global'
+ }
+};
+</script>
+
+<script type="text/javascript" id="MathJax-script" async
+ src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
+</script>
+```
+
+Then you can do this in a slide:
+
+```
+## Cool equations
+
+Displayed equations are wrapped in double-\$
+
+$$\frac{n!}{k!(n-k)!} = \binom{n}{k}$$
+
+Inline equations like $E=mc^2$ are wrapped in single-\$
+```
+
### HTML slides
If you need to create fancier HTML for a slide than you can do with markdown, just add `data-noprocess` to the &lt;section&gt; element.