gerby-project / plastex

Python package to convert LaTeX markup to DOM
Other
14 stars 12 forks source link

XyJax parsing errors #5

Closed pbelmans closed 7 years ago

pbelmans commented 7 years ago

If we want to stick with MathJax and XyJax, then we better fix 039P, 054L, 00HU. It should suffice to compare the outputted code, and see what's different. One possibility is plasTeX's habit of inserting spaces before underscores, but there could be other reasons.

maxlieblich commented 7 years ago

It appears that these are all caused by plastex parsing errors.

pbelmans commented 7 years ago

They are, but 054L is of a different nature than 039P, see #6.

We should try to figure out which tags give an XyJax error in some automated way. @maxlieblich Do you have a good way of doing this?

pbelmans commented 7 years ago

Possible explanation: \mathop isn't handled appropriately, and stops and restarts the math rendering. I will look into this.

pbelmans commented 7 years ago

At least one of the things that goes wrong is the \ar@.

pbelmans commented 7 years ago

I just took a look at the xypic documentation. Its syntax is peculiar, to say the least. Is it possible to let everything inside an \xymatrix just be unhandled by the parser?

This will also be necessary if we want to have some tool converting xypic to SVG. Right now, the .source attribute just doesn't contain the right source.