Skip to content

Katex css/js not included #40

@jpf91

Description

@jpf91

Hi,

sorry if this is a dumb question, but I couldn't find a solution.
I'm using the latest version of the PaperMod theme and hugo v0.140.2.

I've added this to layouts/partials/extend_head.html:

{{ partial "katex/assets/css" . }}
{{ partial "katex/assets/js" . }}

And if I add some debug text there I also see that it's always included. However, if I run hugo serve, add the example to a post and save:

{{< katex >}}
\begin{array}{l}
E*{o 1}=\frac{1}{2}\left( { target }*{o 1}- { out }_{o 1}\right)^{2}=\frac{1}{2}(0.01-0.75136507)^{2}=0.274811083 \\
E_{o 2}=0.023560026 \\
E*{ {total }}=E*{o 1}+E\_{o 2}=0.274811083+0.023560026=0.298371109
\end{array}
{{< /katex >}}

Then the latex does not render and the CSS and JS is not included. If I now open extend_head.html and save it, hugo recompiles, the page reloads, the imports are there and Katex renders. But if I now modify the article and save that file, it doesn't render again. Any idea what could cause this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions