XimeraProject / ximeraLatex

Author tools for creating Ximera activities
LaTeX Project Public License v1.3c
40 stars 36 forks source link

Fixed TeX4ht support #126

Open michal-h21 opened 3 months ago

michal-h21 commented 3 months ago

I've updted ximera.cfg, ximera.4ht and ximera.cls to work with the current TeX4ht. There is a lot of changes, but the most important ones are related to MathJax - it reuses TeX4ht code, so it doesn't have issues with equations etc. Other changes are related to TikZ, as TeX4ht supports it out of the box, so there is no need to use externalization by default.

I've tested it on the old-state branch from Ximera experimental repo. All files now compile without errors, except for the feedback.tex, because lines like \begin{feedback}[y<17] cause make4ht DOM filters to fail. It is caused by the < character, it thinks that it is a start of a HTML tag, so the parser gets confused. I've fixed this error in development versions of LuaXML and make4ht, but they are not in TeX Live yet.

There were some weird rendering errors for the stuff displayed using JavaScript when I displayed the HTML files, but I think these issues are on the JS side. Maybe they are caused by the fact that I am not viewing it in Ximera environment, but directly, so some CSS or JS is not used.