diff options
Diffstat (limited to 'content/overview-math.md')
| -rw-r--r-- | content/overview-math.md | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/content/overview-math.md b/content/overview-math.md index aac9d00..3d29dd3 100644 --- a/content/overview-math.md +++ b/content/overview-math.md @@ -22,6 +22,7 @@ tags = [ You can use [KaTeX](https://katex.org) to render mathematical notations. You can enable the $\KaTeX$ support globally, per-section or per-page basis. + <!-- more --> ## Enable Globally @@ -63,27 +64,28 @@ math_auto_render = true +++ ``` -It is a good practice to enable $\KaTeX$ support on a per-page basis, since this will only load the -required files on that particular page, without affecting the page load speed of other pages. -If your site is not math-heavy, please do NOT enable this feature globally or per-section basis. +It is a good practice to enable $\KaTeX$ support on a per-page basis, since this will only load the required files on that particular page, without affecting the page load speed of other pages. If your site is not math-heavy, please do NOT enable this feature globally or per-section basis. ## Usage -Wrap any [valid](https://katex.org/docs/supported.html) $\KaTeX$ syntax with `$...$` for inline -Mathematics and `$$...$$` for block Mathematics. +Wrap any [valid](https://katex.org/docs/supported.html) $\KaTeX$ syntax with `$...$` for inline Mathematics and `$$...$$` for block Mathematics. ### Inline Mathematics This is the most beautiful equation I've ever seen: ### Usage + ```rs {%/* katex(block=false) */%} e^{i\pi}+1=0 {%/* end */%} ``` + ### Output + ```html {% katex(block=false) %} e^{i\pi}+1=0 {% end %} ``` + {% katex(block=false) %} e^{i\pi}+1=0 {% end %} ### Block Mathematics @@ -91,16 +93,21 @@ This is the most beautiful equation I've ever seen: Some Mathematics in display mode is fair enough: ### Usage + ```rs {%/* katex(block=true) */%} \int_0^1 x^2 dx {%/* end */%} ``` + ### Output + ```html {% katex(block=true) %} \int_0^1 x^2 dx {% end %} ``` + {% katex(block=true) %} \int_0^1 x^2 dx {% end %} ### Auto Render Inline + ```tex $ e^{i\pi}+1=0 $ ``` @@ -108,6 +115,7 @@ $ e^{i\pi}+1=0 $ $ e^{i\pi}+1=0 $ ### Auto Render Block + ```tex $$ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi |
