Skip to content

Commit de85321

Browse files
deiningchalin
authored andcommitted
Correct information about minimum required hugo version
1 parent 00f0503 commit de85321

File tree

1 file changed

+27
-7
lines changed
  • userguide/content/en/docs/adding-content/diagrams-and-formulae

1 file changed

+27
-7
lines changed

userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ The probability of getting \(k\) heads when flipping \(n\) coins is:
5050
\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}
5151
```
5252

53-
{{% alert title="Warning" color="warning" %}}
54-
`math` code blocks are supported as of hugo version 0.93, using the standard syntax is possible as of hugo version 0.122.
53+
{{% alert title="Attention" color="warning" %}}
54+
In order to display mathematical formulae and/or chemical equations inside your page(s), you need to run hugo version 0.141.0 or above. With older hugo versions, an error is thrown.
5555
{{% /alert %}}
5656

5757
{{% alert title="Tip" %}}
@@ -172,6 +172,30 @@ params:
172172
{{< /tab >}}
173173
{{< /tabpane >}}
174174

175+
By default, docsy pulls in the latest officially released version of \(\KaTeX\) / mhchem extension at build time. If that doesn't fit your needs, you can specify the wanted \(\KaTeX\) version inside your configuration file `hugo.toml`/`hugo.yaml`/`hugo.json`:
176+
177+
{{< tabpane >}}
178+
{{< tab header="Configuration file:" disabled=true />}}
179+
{{< tab header="hugo.toml" lang="toml" >}}
180+
[params.katex]
181+
version = "0.16.21"
182+
{{< /tab >}}
183+
{{< tab header="hugo.yaml" lang="yaml" >}}
184+
params:
185+
mermaid:
186+
version: 0.16.21
187+
{{< /tab >}}
188+
{{< tab header="hugo.json" lang="json" >}}
189+
{
190+
"params": {
191+
"mermaid": {
192+
"version": "0.16.21"
193+
}
194+
}
195+
}
196+
{{< /tab >}}
197+
{{< /tabpane >}}
198+
175199
Additionally, you can customize various \(\KaTeX\) options inside `hugo.toml`/`hugo.yaml`/`hugo.json`, if needed:
176200

177201
{{< tabpane >}}
@@ -322,10 +346,6 @@ Both standard syntax and `chem` block renders to the same equation:
322346
\tag*{(2)} \ce{Zn^2+ <=>[+ 2OH-][+ 2H+] $\underset{\text{amphoteric hydroxide}}{\ce{Zn(OH)2 v}}$ <=>[+ 2OH-][+ 2H+] $\underset{\text{tetrahydroxozincate}}{\ce{[Zn(OH)4]^2-}}$}
323347
\]
324348

325-
{{% alert title="Warning" color="warning" %}}
326-
`chem` code blocks are supported as of hugo version 0.93, using the standard syntax is possible as of hugo version 0.122.
327-
{{% /alert %}}
328-
329349
{{% alert title="Note" %}}
330350
The [manual](https://mhchem.github.io/MathJax-mhchem/) for mchem’s input syntax provides in-depth information about typesetting chemical formulae and physical units using the `mhchem` tool.
331351
{{% /alert %}}
@@ -342,7 +362,7 @@ Use of `mhchem` is not limited to the authoring of chemical equations. By using
342362

343363
For a complete list of options when authoring physical units, have a look at the [section](https://mhchem.github.io/MathJax-mhchem/#pu) on physical units in the `mhchem` documentation.
344364

345-
#### Activating rendering support for chemical formulae
365+
#### Activating rendering support for chemical equations
346366

347367
##### Auto activation
348368

0 commit comments

Comments
 (0)