Underscore italics collides with KaTeX underscores

Hi there. I have an instance of Ghost up and running on my server using Docker. I plan on writing a lot of maths and found that KaTeX can serve my purpose well. As described in the linked GitHub, I have put the appropriate links in the site header in code injection and equations seem to format pretty well. However, in longer equations which involves several underscores, the text between underscores are interpreted as italics by Ghost and messes up the KaTeX formatting. Is it possible to mitigate this problem somehow? Disable the use of underscores as special formatting characters or something like that?

Thanks : )

I don’t know much about KaTeX, but are you placing your KaTeX in an HTML block? In another thread, someone mentioned that you have to add the Katex in an HTML block, which makes sense, since markdown shouldn’t apply to those.