diff --git a/content/en/content-management/mathematics.md b/content/en/content-management/mathematics.md index 83be9899b..88118ed33 100644 --- a/content/en/content-management/mathematics.md +++ b/content/en/content-management/mathematics.md @@ -10,7 +10,7 @@ keywords: [] ## Overview -Mathematical equations and expressions written in [LaTeX] are common in academic and scientific publications. Your browser typically renders this mathematical markup using an open-source JavaScript display engine such as [MathJax] or [KaTeX]. +Mathematical equations and expressions written in [LaTeX][] are common in academic and scientific publications. Your browser typically renders this mathematical markup using an open-source JavaScript display engine such as [MathJax][] or [KaTeX][]. For example, with this LaTeX markup: @@ -37,7 +37,7 @@ Equations and expressions can be displayed inline with other text, or as standal Whether an equation or expression appears inline, or as a block, depends on the delimiters that surround the mathematical markup. Delimiters are defined in pairs, where each pair consists of an opening and closing delimiter. The opening and closing delimiters may be the same, or different. > [!note] -> You can configure Hugo to render mathematical markup on the client side using the MathJax or KaTeX display engine, or you can render the markup with the [`transform.ToMath`] function while building your site. +> You can configure Hugo to render mathematical markup on the client side using the MathJax or KaTeX display engine, or you can render the markup with the [`transform.ToMath`][] function while building your site. > > The first approach is described below. @@ -46,7 +46,7 @@ Whether an equation or expression appears inline, or as a block, depends on the Follow these instructions to include mathematical equations and expressions in your Markdown using LaTeX markup. Step 1 -: Enable and configure the Goldmark [passthrough extension] in your site configuration. The passthrough extension preserves raw Markdown within delimited snippets of text, including the delimiters themselves. +: Enable and configure the Goldmark [passthrough extension][] in your site configuration. The passthrough extension preserves raw Markdown within delimited snippets of text, including the delimiters themselves. {{< code-toggle file=hugo copy=true >}} [markup.goldmark.extensions.passthrough] @@ -60,12 +60,12 @@ Step 1 math = true {{< /code-toggle >}} - The configuration above enables mathematical rendering on every page unless you set the `math` parameter to `false` in front matter. To enable mathematical rendering as needed, set the `math` parameter to `false` in your site configuration, and set the `math` parameter to `true` in front matter. Use this parameter in your base template as shown in [Step 3](#step-3). + The configuration above enables mathematical rendering on every page unless you set the `math` parameter to `false` in front matter. To enable mathematical rendering as needed, set the `math` parameter to `false` in your site configuration, and set the `math` parameter to `true` in front matter. Use this parameter in your base template as shown in [Step 3][]. > [!note] > The configuration above precludes the use of the `$...$` delimiter pair for inline equations. Although you can add this delimiter pair to the configuration and JavaScript, you must double-escape the `$` symbol when used outside of math contexts to avoid unintended formatting. > - > See the [inline delimiters](#inline-delimiters) section for details. + > See the [inline delimiters][] section for details. To disable passthrough of inline snippets, omit the `inline` key from the configuration: @@ -74,7 +74,7 @@ Step 1 block = [['\[', '\]'], ['$$', '$$']] {{< /code-toggle >}} - You can define your own opening and closing delimiters, provided they match the delimiters that you set in [Step 2]. + You can define your own opening and closing delimiters, provided they match the delimiters that you set in [Step 2][]. {{< code-toggle file=hugo >}} [markup.goldmark.extensions.passthrough.delimiters] @@ -83,7 +83,7 @@ Step 1 {{< /code-toggle >}} Step 2 -: Create a _partial_ template to load MathJax or KaTeX. The example below loads MathJax, or you can use KaTeX as described in the [engines](#engines) section. +: Create a _partial_ template to load MathJax or KaTeX. The example below loads MathJax, or you can use KaTeX as described in the [engines][] section. ```go-html-template {file="layouts/_partials/math.html" copy=true} @@ -166,35 +166,35 @@ I will give you \\$2 if you can solve $y = x^2$. ``` > [!note] -> If you use the `$...$` delimiter pair for inline equations, and occasionally use the `$` symbol outside of math contexts, you must use MathJax instead of KaTeX to avoid unintended formatting caused by [this KaTeX limitation](https://github.com/KaTeX/KaTeX/issues/437). +> If you use the `$...$` delimiter pair for inline equations, and occasionally use the `$` symbol outside of math contexts, you must use MathJax instead of KaTeX to avoid unintended formatting caused by [this KaTeX limitation][]. ## Engines MathJax and KaTeX are open-source JavaScript display engines. > [!note] -> If you use the `$...$` delimiter pair for inline equations, and occasionally use the `$` symbol outside of math contexts, you must use MathJax instead of KaTeX to avoid unintended formatting caused by [this KaTeX limitation](https://github.com/KaTeX/KaTeX/issues/437). +> If you use the `$...$` delimiter pair for inline equations, and occasionally use the `$` symbol outside of math contexts, you must use MathJax instead of KaTeX to avoid unintended formatting caused by [this KaTeX limitation][]. > ->See the [inline delimiters](#inline-delimiters) section for details. +>See the [inline delimiters][] section for details. -To use KaTeX instead of MathJax, replace the _partial_ template from [Step 2] with this: +To use KaTeX instead of MathJax, replace the _partial_ template from [Step 2][] with this: ```go-html-template {file="layouts/_partials/math.html" copy=true}