diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ed1be7..b5855a9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ## v0.2.16 - :sparkles: Feat: add custom aside template in post page ([#172](https://github.com/hugo-fixit/FixIt/issues/172)) +- :sparkles: Feat(math): add more block delimiter support for math - :bug: Fix: add function doc2unix to unify new lines symbol between Windows and Unix/Mac OS - :bug: Fix: author display error in post and markdown file - :bug: Fix: use data attributes or class replace for custom attributes diff --git a/config.toml b/config.toml index bba52fcb..579cd7f3 100644 --- a/config.toml +++ b/config.toml @@ -336,15 +336,15 @@ warning = 180 # If the article expires, close the comment or not closeComment = false - # FixIt 0.2.0 | CHANGED KaTeX mathematical formulas (https://katex.org) + # FixIt 0.2.16 | CHANGED KaTeX mathematical formulas (https://katex.org) [params.page.math] enable = true - # default block delimiter is $$ ... $$ and \\[ ... \\] - blockLeftDelimiter = "" - blockRightDelimiter = "" - # default inline delimiter is $ ... $ and \\( ... \\) + # default inline delimiter is $ ... $ and \( ... \) inlineLeftDelimiter = "" inlineRightDelimiter = "" + # default block delimiter is $$ ... $$, \[ ... \], \begin{equation} ... \end{equation} and some other functions + blockLeftDelimiter = "" + blockRightDelimiter = "" # KaTeX extension copy_tex copyTex = true # KaTeX extension mhchem diff --git a/docs b/docs index 4ea2b1b6..92bf2584 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 4ea2b1b6597b970362bddccabdea99713b258a9b +Subproject commit 92bf258490835007c4ad63015739384be16a8cd6 diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index b5333f0e..05d693e9 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -106,6 +106,14 @@ {{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} {{- end -}} {{- $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) -}} + {{- $delimiters = $delimiters | append (dict "left" "\\begin{align*}" "right" "\\end{align*}" "display" true) -}} + {{- $delimiters = $delimiters | append (dict "left" "\\begin{alignat}" "right" "\\end{alignat}" "display" true) -}} + {{- $delimiters = $delimiters | append (dict "left" "\\begin{alignat*}" "right" "\\end{alignat*}" "display" true) -}} + {{- $delimiters = $delimiters | append (dict "left" "\\begin{gather}" "right" "\\end{gather}" "display" true) -}} + {{- $delimiters = $delimiters | append (dict "left" "\\begin{CD}" "right" "\\end{CD}" "display" true) -}} {{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}} {{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}} {{- end -}}