2021-07-01 09:05:26 +02:00
|
|
|
{{ if not (.Page.Scratch.Get "katex") }}
|
2022-01-06 13:58:10 +01:00
|
|
|
<!-- Include katext only first time -->
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="{{ index (index .Site.Data.assets "katex.css") "src" | relURL }}"
|
|
|
|
/><script defer src="{{ index (index .Site.Data.assets "katex.js") "src" | relURL }}"></script>
|
|
|
|
{{ .Page.Scratch.Set "katex" true }}
|
2021-07-01 09:05:26 +02:00
|
|
|
{{ end }}
|
|
|
|
|
2022-01-06 13:58:10 +01:00
|
|
|
|
|
|
|
<span class="gdoc-katex katex{{ with .Get "class" }}{{ . }}{{ end }}">
|
2021-07-01 09:05:26 +02:00
|
|
|
{{ cond (in .Params "display") "\\[" "\\(" -}}
|
|
|
|
{{- trim .Inner "\n" -}}
|
|
|
|
{{- cond (in .Params "display") "\\]" "\\)" }}
|
|
|
|
</span>
|