# Upgrading Mathjax to version 4

**URL:** <https://meta.discourse.org/t/upgrading-mathjax-to-version-4/392669>\
**Category:** Development\
**Tags:** math\
**Created:** [November 23, 2025, 5:57pm UTC](https://meta.discourse.org/t/upgrading-mathjax-to-version-4/392669 "2025-11-23T17:57:05Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![mcmcclur](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcmcclur/32/115456_2.png) [@mcmcclur](https://meta.discourse.org/u/mcmcclur)\
**Post date:** [January 4, 2026, 4:18am UTC](https://meta.discourse.org/t/upgrading-mathjax-to-version-4/392669/23 "2026-01-04T04:18:19Z")

</div>

@sam It turns out that KaTeX isn’t working quite right in the new plugin. If you take a look at it, it’s quite clearly a missing font problem and, indeed, the console indicates that there a bunch of font (Woff-v2) files that are not found.

The fonts actually exist in the correct location, which should be in a folder named ‘fonts’ adjacent to the style sheet. Both of these files exist on my development version, for example:  
[http://localhost:4200/plugins/discourse-math/katex/katex.min.css](http://localhost:4200/plugins/discourse-math/katex/katex.min.css)  
and  
[http://localhost:4200/plugins/discourse-math/katex/fonts/KaTeX\_Size2-Regular.woff2](http://localhost:4200/plugins/discourse-math/katex/fonts/KaTeX_Size2-Regular.woff2)

When we take a look at the Network tab of the console, it appears that it’s trying to download something like  
[http://localhost:4200/t/my-topic/fonts/KaTeX\_Size2-Regular.woff2](http://localhost:4200/t/my-topic/fonts/KaTeX_Size2-Regular.woff2)

Thus, the browser is looking in a ‘fonts’ folder adjacent to the topic URL, which is clearly wrong.

I suppose this all has something to do with the `loadKaTeX` function defined in the `katex-bundle`, which I guess loads KaTeX in a non-standard way leading to KaTeX not really knowing where the CSS file lives. I don’t know how to fix it, though.

---

_[View the full topic](https://meta.discourse.org/t/upgrading-mathjax-to-version-4/392669)._
