2022-02-22 20:42:44 +00:00
|
|
|
<!-- prettier-ignore-start -->
|
2022-02-22 15:45:10 +00:00
|
|
|
{{ if not (.Page.Scratch.Get "katex") }}
|
|
|
|
<!-- Include katex 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 }}
|
|
|
|
{{ end }}
|
2022-02-22 20:42:44 +00:00
|
|
|
<!-- prettier-ignore-end -->
|
2022-02-22 15:45:10 +00:00
|
|
|
|
2022-02-23 08:03:11 +00:00
|
|
|
<span class="gblog-katex {{ with .Get "class" }}{{ . }}{{ end }}">
|
2022-02-22 15:45:10 +00:00
|
|
|
{{ cond (in .Params "display") "\\[" "\\(" -}}
|
|
|
|
{{- trim .Inner "\n" -}}
|
2022-05-17 12:42:08 +00:00
|
|
|
{{- cond (in .Params "display") "\\]" "\\)" -}}
|
2022-02-22 15:45:10 +00:00
|
|
|
</span>
|
2022-05-17 12:42:08 +00:00
|
|
|
{{- /* Drop trailing newlines */ -}}
|