diff --git a/layouts/_default/_markup/render-codeblock-math.html b/layouts/_default/_markup/render-codeblock-math.html new file mode 100644 index 0000000000..149a1ae188 --- /dev/null +++ b/layouts/_default/_markup/render-codeblock-math.html @@ -0,0 +1,3 @@ +

$$ +{{ .Inner | safeHTML }} +$$

diff --git a/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md b/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md index b60de7f771..19f506c527 100644 --- a/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md +++ b/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md @@ -35,6 +35,13 @@ $$\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}$$ The probability of getting \\(k\\) heads when flipping \\(n\\) coins is: $$\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}$$ +You can also use [GLFM's math blocks](https://docs.gitlab.com/ee/user/markdown.html#math): +````markdown +```math +E = m c^2 +``` +```` + {{% alert title="Tip" %}} This [wiki page](https://en.wikibooks.org/wiki/LaTeX/Mathematics) provides in-depth information about typesetting mathematical formulae using the \\(\LaTeX\\) typesetting system. {{% /alert %}}