On 2011-06-17, Richard Heck wrote: > On 06/17/2011 03:07 AM, John Perry wrote: >> Hi
>> I learned today that LyxHTML exports files that *almost* make MathJax >> happy. There are a few issues: newcommand's (i.e. math macros) don't >> seem to get exported by LyxHTML, and a header for MathJax would have >> to be inserted. > If you could tell me precisely what needs to be done, it should be > fairly easy to add to the source. The following header uses the latest version of MathJax from the distributed server: avaliable to the public under the `MathJax CDN Terms of Service` (http://www.mathjax.org/download/mathjax-cdn-terms-of-service/) <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> > If I remember correctly, MathJax expects LaTeX, yes? Yes. > If so, then it would be pretty easy to export the math macros, I think, > when we are in "export math as LaTeX" mode. I'd need to know exactly > what they should look like. Basics: * "Normal" LaTeX + amstex syntax * inline-math wrapped in \( \) (instead of $ $) * display math wrapped in one of the standard environments (not $$ $$). Details at the MathJax page http://www.mathjax.org/docs/1.1/tex.html > As far as the MathJax header goes, this could certainly be added > automatically, though we'd probably need a document setting for it, > which would mean it couldn't go into 2.0.x. But in the meantime that > line could easily be added manually, or you could write a simple > "copier" to do it. MathJax should become a "math-output" option (alongside MathML, PNG, SVG, HTML, LaTeX). Günter