Support » Plugin: LaTeX2HTML » LaTeX2HTML not allowing MathJax to reference equations

  • Resolved rhcocker

    (@rhcocker)


    First of all, LaTeX2HTML is a great plugin.

    I am having one issue with it though. When I have both MathJax and LaTeX2HTML activated, auto-numbering works, but references to equations always produces (???) instead of the equation number. When I deactivate LaTeX2HTML, the equation referencing works fine. I noticed that auto-numbering code was commented out in the LaTeX2HTML.php file so I am not sure what is causing the conflict. Please help.

    https://wordpress.org/plugins/latex2html/

Viewing 1 replies (of 1 total)
  • Plugin Author Van Abel

    (@van-abel)

    Thanks for your feedback, it is a bug in fact there:

    In the main function file, latex2hml.php, there are two lines:

    //remove \label for equation and theorems but keep {\label{*}}
    	$content_data = preg_replace('/\\\\label\{(.*?)\}/ims', '', $content_data);

    This means that it will remove all your \label{[lab]}, which is essential for the old version, but since then we command out the self labeling scheme, now it is a bug!

    To fix it, just command out the preg_replace line, just as

    //remove \label for equation and theorems but keep {\label{*}}
    	//$content_data = preg_replace('/\\\\label\{(.*?)\}/ims', '', $content_data);

    Now, it should work for you!

Viewing 1 replies (of 1 total)
  • The topic ‘LaTeX2HTML not allowing MathJax to reference equations’ is closed to new replies.