github.com/square/finch@v0.0.0-20240412205204-6530c03e2b96/docs/themes/hugo-geekdoc/layouts/shortcodes/katex.html (about) 1 <!-- prettier-ignore-start --> 2 {{ if not (.Page.Scratch.Get "katex") }} 3 <!-- Include katex only first time --> 4 <link 5 rel="stylesheet" 6 href="{{ index (index .Site.Data.assets "katex.css") "src" | relURL }}" 7 /> 8 <script defer src="{{ index (index .Site.Data.assets "katex.js") "src" | relURL }}"></script> 9 {{ .Page.Scratch.Set "katex" true }} 10 {{ end }} 11 <!-- prettier-ignore-end --> 12 13 <span class="gdoc-katex {{ with .Get "class" }}{{ . }}{{ end }}"> 14 {{ cond (in .Params "display") "\\[" "\\(" -}} 15 {{- trim .Inner "\n" -}} 16 {{- cond (in .Params "display") "\\]" "\\)" -}} 17 </span> 18 {{- /* Drop trailing newlines */ -}}