Skip to content

Commit fdcb8cd

Browse files
stephanlachnitdeining
authored andcommitted
feature: add support for GLFM math blocks
This add supports for GLFM's math blocks [1] using hugo's Markdown render hooks [2]. [1]: https://docs.gitlab.com/ee/user/markdown.html#math [2]: https://gohugo.io/templates/render-hooks/#render-hooks-for-code-blocks Signed-off-by: Stephan Lachnit <[email protected]>
1 parent 7489c35 commit fdcb8cd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>$$
2+
{{ .Inner | safeHTML }}
3+
$$</p>

userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md

+7
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ $$\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}$$
3535
The probability of getting \\(k\\) heads when flipping \\(n\\) coins is:
3636
$$\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}$$
3737

38+
You can also use [GLFM's math blocks](https://docs.gitlab.com/ee/user/markdown.html#math) (requires hugo 0.93 or newer):
39+
````markdown
40+
```math
41+
\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}
42+
```
43+
````
44+
3845
{{% alert title="Tip" %}}
3946
This [wiki page](https://en.wikibooks.org/wiki/LaTeX/Mathematics) provides in-depth information about typesetting mathematical formulae using the \\(\LaTeX\\) typesetting system.
4047
{{% /alert %}}

0 commit comments

Comments
 (0)