{{- if not (.Page.Scratch.Get "katex") -}} {{- .Page.Scratch.Set "katex" true -}} {{- end -}} {{ with .Get "display" }}\[{{else}}\({{end}} {{- trim .Inner "\n" -}} {{ with .Get "display" }}\]{{else}}\){{end}}