Open baudren opened 9 years ago
Actually, pandoc supports it out of the box, though my tests so far are not working. It seems that pypandoc does not transmit the --katex
flag. Will test tonight on a Linux
So, after more tinkering, it looks like actually windows support is not so good with KaTeX
... pandoc is working fine, but the display is just plain wrong. I have been putting up a minimal working example, and will probably end up asking on their repo or on Stack Overflow. I will try tonight on Linux.
Ok, so there is a small problem of dependency. The version of pandoc
shipped with the latest Ubuntu, 15.04
, is too old to support KaTeX (it uses 1.12.4.2
, whereas it was introduced in 1.13.2
).
How should we handle that? We could try to detect the version through pypandoc, and if there is not the right one, simply remove the --katex
call. We should somehow show people that the math display could be improved...
What do you think?
There was also a problem with not using html 5 type declaration at the beginning of the html, so I had to changed the pandoc headers to <!DOCTYPE html>
. I will check if this solves the issue on Windows (or you can tell me, @egolus )
I'm no expert in math rendering, but at least the example from http://khan.github.io/KaTeX/ looks good
about the version issue.. I don't know, if there's an easy check for the pandoc version, removing the --katex
parameter sounds reasonable. I'm not sure, we should at least add a log-entry, but maybe even show a note in the client .. with the option to not show it again
It looks like it is Qt html rendering that fails, on windows (or the PySide bindings, but that would be weird).
When rendered through Firefox, I get the good display for inline math,
But when rendered inside Note Organiser, the lower infinity sign is far too high. I get a warning, QFont::setPixelSize: Pixel size <= 0 (0)
, but from searching for it, it seems to be a non problematic warning.
.
Don't you get the same on your machine?
For the version issue, our wish has already been fulfilled. I am implementing it now.
I added the check for the version - and had to rebase (I had branched out of another branch than devel, sorry for that). Please be sure to delete your local KaTeX branch before pulling, or pain will follow...
you're right, I've got the same issue
KaTeX seems pretty easy to set up, and is faster than MathJax. This would be nice to have on the long term.