diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index 6fd80b1..6efd43c 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -106,11 +106,7 @@ {{- $source := $cdn.katexMhchemJS | default "lib/katex/mhchem.min.js" -}} {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} {{- end -}} - {{- $delimiters := slice (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}} - {{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}} - {{- $delimiters = $delimiters | append (dict "left" $math.inlineRightDelimiter "right" $math.inlineRightDelimiter "display" false) -}} - {{- end -}} - {{- $delimiters = $delimiters | append (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}} + {{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}} {{- $delimiters = $delimiters | append (dict "left" "\\begin{equation}" "right" "\\end{equation}" "display" true) -}} {{- $delimiters = $delimiters | append (dict "left" "\\begin{equation*}" "right" "\\end{equation*}" "display" true) -}} {{- $delimiters = $delimiters | append (dict "left" "\\begin{align}" "right" "\\end{align}" "display" true) -}} @@ -122,6 +118,10 @@ {{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}} {{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}} {{- end -}} + {{- $delimiters = $delimiters | append (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}} + {{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}} + {{- $delimiters = $delimiters | append (dict "left" $math.inlineRightDelimiter "right" $math.inlineRightDelimiter "display" false) -}} + {{- end -}} {{- $config = dict "strict" false "delimiters" $delimiters | dict "math" | merge $config -}} {{- end -}}