Skip to content

Commit

Permalink
#9 Add katex support for markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
raeperd committed Jan 9, 2022
1 parent 3f69160 commit f91c021
Show file tree
Hide file tree
Showing 66 changed files with 1,158 additions and 146 deletions.
15 changes: 1 addition & 14 deletions lib/content/article/math-typesetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,9 @@ In this example we will be using [KaTeX](https://katex.org/)
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<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
{{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p>
{{</ math.inline >}}
Inline math: $(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…)$
Block math:
$$
Expand Down
Loading

0 comments on commit f91c021

Please sign in to comment.