I followed the transform.ToMath example given in the Hugo Docs.
My equations render correctly but I also get the equations in plain text printed alongside MathML.
(for reference)
I followed the transform.ToMath example given in the Hugo Docs.
My equations render correctly but I also get the equations in plain text printed alongside MathML.
Do you have a link to your actual code or repo? It’d make it easier to identify the issue rather than just from the generated image.
I suspect you missed all (or part of) Step 3:
https://gohugo.io/functions/transform/tomath/#step-3
The code within the head element of your base template should look like this:
{{ $noop := .WordCount }}
{{ if .Page.Store.Get "hasMath" }}
<link href="https://cdn.jsdelivr.net/npm/katex@0.16.23/dist/katex.min.css" rel="stylesheet">
{{ end }}
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.