using MathTran with CMSMS
Posted: Mon Jan 28, 2008 10:51 am
Hi,
I am trying to run MathTran (http://www.mathtran.org/) on my CMSMS web site. MathTran is used to represent mathematical formulas by using Javascript which automatically translates LaTeX given as HTML tag to PNG image format.
Using MathTran in standard HTML is actually quite easy (I am describing this so you may recreate the problems I get with CMSMS):
(1) Put the following Javascript into the header (mathtran_img.js is run remotely, but may also be installed locally):
(2) Use LaTeX code such as this one in the main body of the HTML document
Simple equations as (2) will work. However, more involved examples as
produce errors. The error messages indicates that there is some conflict with the Smarty Compiler class in PHP5 and
the 'tex' tag of MathTran. You'll find a detailed error output at the end of this message.
Would it be possible to make MathTrans fully compatible with CMSMS? Would this require a simple
redefinition of the involved tags, or rather something like a new, specialized module?
TeX/LaTeX is the de facto standard for representing scientific formulas. It would be a great thing to fully incorporate MathTrans
into CMSMS. Do you have any suggestions how to achieve this?
Many thanks in advance for ideas and helpful suggestions,
Michael
string(126) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag: n=1 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(126) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag: n^2 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(128) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag: \pi^2 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(125) "Smarty error: [in preview:cmspreviewVBqF5U line 90]: syntax error: unrecognized tag: -n (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 90]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(126) "Smarty error: [in preview:cmspreviewVBqF5U line 93]: syntax error: unrecognized tag: n=0 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 93]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)
I am trying to run MathTran (http://www.mathtran.org/) on my CMSMS web site. MathTran is used to represent mathematical formulas by using Javascript which automatically translates LaTeX given as HTML tag to PNG image format.
Using MathTran in standard HTML is actually quite easy (I am describing this so you may recreate the problems I get with CMSMS):
(1) Put the following Javascript into the header (mathtran_img.js is run remotely, but may also be installed locally):
(2) Use LaTeX code such as this one in the main body of the HTML document
Simple equations as (2) will work. However, more involved examples as
produce errors. The error messages indicates that there is some conflict with the Smarty Compiler class in PHP5 and
the 'tex' tag of MathTran. You'll find a detailed error output at the end of this message.
Would it be possible to make MathTrans fully compatible with CMSMS? Would this require a simple
redefinition of the involved tags, or rather something like a new, specialized module?
TeX/LaTeX is the de facto standard for representing scientific formulas. It would be a great thing to fully incorporate MathTrans
into CMSMS. Do you have any suggestions how to achieve this?
Many thanks in advance for ideas and helpful suggestions,
Michael
string(126) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag: n=1 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(126) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag: n^2 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(128) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag: \pi^2 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 80]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(125) "Smarty error: [in preview:cmspreviewVBqF5U line 90]: syntax error: unrecognized tag: -n (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 90]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(126) "Smarty error: [in preview:cmspreviewVBqF5U line 93]: syntax error: unrecognized tag: n=0 (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewVBqF5U line 93]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)