Pandoc/KaTeX loading issue
I'm using Marked to view html generated by Pandoc. Recently (I think this started with the last update), I've noticed some weird behavior with the rendering of equations: if Marked updates itself after I save the file, none of the equations are rendered properly; I just see the raw LaTeX. If I get Marked to manually reload the page, however, they show up just fine. If I then change the text and save they go back to being rendered improperly until I manually reload, etc.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 27 Aug, 2020 06:25 PM
Hm. This sounds like an issue with the new update mechanism in version 2.6.0, but none of the beta testers pointed it out. Can you tell me if you have the same issue with MathJax as well?
Thanks,
Brett
2 Posted by Scott Hartley on 27 Aug, 2020 08:16 PM
Does not seem to be an issue with MathJax, just KaTeX.
Thanks! For what I’m doing I can just use MathJax, so this basically solves the problem for me.
Support Staff 3 Posted by Brett on 27 Aug, 2020 08:20 PM
Cool. I'll figure out what's going on with Katex.
Thanks,
Brett
Support Staff 4 Posted by Brett on 28 Aug, 2020 02:02 PM
So in my testing Katex is rendering just as well as MathJax with every
refresh. Do you have a sample document that displays the issue for you?
Thanks,
Brett
5 Posted by Scott Hartley on 28 Aug, 2020 08:24 PM
Sure, no problem. I've attached the markdown input and the html output I see when I view source in Marked. This is processed using
pandoc --from markdown --to html --katex --template default.html
. I've also attached before and after screenshots.Thanks!
Support Staff 6 Posted by Brett on 03 Sep, 2020 12:41 PM
Sorry for the delay on this one, getting around to investigating now.
Support Staff 7 Posted by Brett on 03 Sep, 2020 12:50 PM
In my testing your whole setup seems to work fine if I just leave the --katex flag out of the custom processor command. Can you test and verify?
8 Posted by Scott Hartley on 03 Sep, 2020 05:56 PM
I checked this out. I think the minimal example I sent was a little too minimal, unfortunately. It does render ok without the --katex flag, but it doesn't seem to be using KaTeX (or MathJax). If I switch the math to something even a little more complicated, like $\frac{x}{y}$, it fails.
MathJax is still working fine for me, though, so maybe this is some weird bug/behavior on the KaTeX side.
Best,
Scott
---- On Thu, 03 Sep 2020 08:50:12 -0400 Brett <[email blocked]> wrote ----