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