Skip to content

Commit bbb3806

Browse files
committed
docs(latex): enhance LaTeX guide and clarify chemistry expressions
- Updated section titles for better clarity, changing "Supported Functions" to "Chemistry Expressions." - Improved description of the mhchem extension for rendering chemistry equations. - Removed redundant instructions regarding the passthrough extension in Hugo. - Corrected minor typographical errors in references to MathJax.
1 parent 9d8cd63 commit bbb3806

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

exampleSite/content/docs/guide/latex.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ $$
5555
\end{aligned}
5656
$$
5757

58-
## Supported Functions
59-
6058
For a list of supported functions, see [KaTeX supported functions](https://katex.org/docs/supported.html).
6159

62-
## Chemistry
60+
### Chemistry Expressions
6361

64-
Chemistry expressions are supported via [mhchem](https://mhchem.github.io/MathJax-mhchem/) extension.
62+
The [mhchem][mhchem] extension is enabled by default, allowing you to easily render chemistry equations and formulas.
6563

6664
Inline: \(\ce{H2O}\) is water.
6765

@@ -77,8 +75,6 @@ $$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
7775

7876
## Configuration
7977

80-
### Enable passthrough extension in Hugo
81-
8278
> [!IMPORTANT]
8379
> Please enable and configure the [passthrough extension](https://gohugo.io/content-management/mathematics/) in the Hugo configuration file, so that Hugo can detect LaTeX math expressions in your Markdown content.
8480
@@ -97,7 +93,7 @@ markup:
9793
9894
[KaTeX][katex] is the default engine used to render LaTeX math expressions during the build process supported by [Hugo][hugo-transform-tomath].
9995
100-
The default is KaTeX, but you can also switch to [MathJaX][mathjax] if you need features only available in MathJaX.
96+
The default is KaTeX, but you can also switch to [MathJax][mathjax] if you need features only available in MathJax.
10197
10298
#### KaTeX
10399
@@ -133,7 +129,7 @@ It will load the KaTeX CSS file from `assets/css/katex.min.css` instead of downl
133129

134130
#### MathJax
135131

136-
Alternatively, you can use [MathJax][mathjax] to render math expressions. To use it instead, add the following to the configuration `hugo.yaml` file:
132+
Alternatively, you can use [MathJax][mathjax] to render math expressions:
137133

138134
```yaml {filename="hugo.yaml"}
139135
params:
@@ -146,4 +142,5 @@ params:
146142

147143
[katex]: https://katex.org/
148144
[mathjax]: https://www.mathjax.org/
145+
[mhchem]: https://mhchem.github.io/MathJax-mhchem/
149146
[hugo-transform-tomath]: https://gohugo.io/functions/transform/tomath/

0 commit comments

Comments
 (0)