vincentdoerig / latex-css

LaTeX.css is a CSS library that makes your website look like a LaTeX document
https://latex.vercel.app
MIT License
2.76k stars 123 forks source link

MathJax doen't work properly #6

Closed 0xflotus closed 4 years ago

0xflotus commented 4 years ago
Bildschirmfoto 2020-05-24 um 14 46 50

If I look at https://latex.now.sh/, MathJAX is not working for inline TeX

benhid commented 4 years ago

Sometimes work, sometimes doesn't. I think this is a problem of timing:

To configure MathJax, this library use a global object named MathJax inserted between <script> and </script> tags in the <body> section. However, the script that loads MathJax itself is placed in the <head> section.

This leads to an undesired behaviour, as MathJax could be loaded first (and it's not trivial to configure MathJax after it is loaded) in some cases.

I've submitted a PR to place the MathJax object just before the main script: https://github.com/vincentdoerig/latex-css/pull/15

Hope it helps!

vincentdoerig commented 4 years ago

Should be fixed now (#15). Thank you @benhid.