mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat(math): add more block delimiter support for math
import from https://github.com/dillonzq/LoveIt/commit/264dd5b9d5079d4fe2f29bc3ffa7b43fbf937336
This commit is contained in:
@@ -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
|
||||
|
||||
+5
-5
@@ -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
|
||||
|
||||
+1
-1
Submodule docs updated: 4ea2b1b659...92bf258490
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user