{{ if not (.Page.Scratch.Get "katex") }} {{ .Page.Scratch.Set "katex" true }} {{ end }} {{ cond (in .Params "display") "\\[" "\\(" -}} {{- trim .Inner "\n" -}} {{- cond (in .Params "display") "\\]" "\\)" -}} {{- /* Drop trailing newlines */ -}}