John Gabriele | 10 Jul 2012 19:33
Picon

Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

Hi,

Which method of producing nice mathematics in your html output do you prefer?

Personally, I find that using --webtex produces beautiful output (have
not yet tried gladTeX), and does not require any additional software
to be installed. Will the --webtex option continue to be available in
pandoc?

Also, a few things:

  * At http://johnmacfarlane.net/pandoc/README.html#math , under
"HTML, Slidy, Slideous, ...", mathjax is missing from the numbered
list.

  * Would be nice if there were more detailed instructions for how to
use the --jsmath option.

  * The links to gladTeX appear to need updating.

Thanks,
---John

John MacFarlane | 10 Jul 2012 20:31
Picon

Re: Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

Have you tried mathjax?  Just pass the --mathjax option to pandoc and
be sure to produce a standalone file (-s).  The resulting HTML file
will use mathjax's CDN, so you don't need to install any software,
as long as you have net access.  I think the results are better than
webtex, and more math is supported.

+++ John Gabriele [Jul 10 12 13:33 ]:
> Hi,
> 
> Which method of producing nice mathematics in your html output do you prefer?
> 
> Personally, I find that using --webtex produces beautiful output (have
> not yet tried gladTeX), and does not require any additional software
> to be installed. Will the --webtex option continue to be available in
> pandoc?
> 
> Also, a few things:
> 
>   * At http://johnmacfarlane.net/pandoc/README.html#math , under
> "HTML, Slidy, Slideous, ...", mathjax is missing from the numbered
> list.
> 
>   * Would be nice if there were more detailed instructions for how to
> use the --jsmath option.
> 
>   * The links to gladTeX appear to need updating.
> 
> Thanks,
> ---John
> 
(Continue reading)

John Gabriele | 10 Jul 2012 20:49
Picon

Re: Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

On Tue, Jul 10, 2012 at 2:31 PM, John MacFarlane
<fiddlosopher@...> wrote:
> Have you tried mathjax?  Just pass the --mathjax option to pandoc and
> be sure to produce a standalone file (-s).  The resulting HTML file
> will use mathjax's CDN, so you don't need to install any software,
> as long as you have net access.  I think the results are better than
> webtex, and more math is supported.

Yes, I tried mathjax, but the results look a bit off on my system:

source file: http://www.unexpected-vortices.com/temp/foo.txt
webtex output: http://www.unexpected-vortices.com/temp/foo-webtex.html
mathjax output: http://www.unexpected-vortices.com/temp/foo-mathjax.html
screenshot of mathjax output:
http://www.unexpected-vortices.com/temp/mathjax-output.png

Looking more into gladTeX, it seems like exactly what I want, except
that I don't want to ask users to install Texlive and gladTeX.

---John

John MacFarlane | 10 Jul 2012 22:28
Picon

Re: Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

+++ John Gabriele [Jul 10 12 14:49 ]:
> On Tue, Jul 10, 2012 at 2:31 PM, John MacFarlane
<fiddlosopher@...> wrote:
> > Have you tried mathjax?  Just pass the --mathjax option to pandoc and
> > be sure to produce a standalone file (-s).  The resulting HTML file
> > will use mathjax's CDN, so you don't need to install any software,
> > as long as you have net access.  I think the results are better than
> > webtex, and more math is supported.
> 
> Yes, I tried mathjax, but the results look a bit off on my system:
> 
> source file: http://www.unexpected-vortices.com/temp/foo.txt
> webtex output: http://www.unexpected-vortices.com/temp/foo-webtex.html
> mathjax output: http://www.unexpected-vortices.com/temp/foo-mathjax.html
> screenshot of mathjax output:
> http://www.unexpected-vortices.com/temp/mathjax-output.png

I think the mathjax looks better.  Note that the inline math is properly
aligned with the rest of the sentence.  Also, if you try increasing or
decreasing the font size, or changing the font color, you'll soon see
limitations of the webtex approach!

John Gabriele | 11 Jul 2012 01:44
Picon

Re: Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

John MacFarlane <fiddlosopher@...> wrote:
> +++ John Gabriele [Jul 10 12 14:49 ]:
>>
>> Yes, I tried mathjax, but the results look a bit off on my system:
>>
>> source file: http://www.unexpected-vortices.com/temp/foo.txt
>> webtex output: http://www.unexpected-vortices.com/temp/foo-webtex.html
>> mathjax output: http://www.unexpected-vortices.com/temp/foo-mathjax.html
>> screenshot of mathjax output:
>> http://www.unexpected-vortices.com/temp/mathjax-output.png
>
> I think the mathjax looks better.  Note that the inline math is properly
> aligned with the rest of the sentence.  Also, if you try increasing or
> decreasing the font size, or changing the font color, you'll soon see
> limitations of the webtex approach!

Yes, it certainly has its limitations. I tend to prefer it anyway
though. It may be a slightly older-fashioned way to do things, I
guess, but it gives me that familiar LaTeX-y output that I like. :)

I found this recent thread about --webtex:
http://groups.google.com/group/pandoc-discuss/browse_thread/thread/517487cbd548cf74/e67463364a2cb97e?lnk=gst&q=webtex#e67463364a2cb97e
which refers to https://developers.google.com/chart/image/ where
deprecation is mentioned. I don't know if this applies to the --webtex
option, but if it does, does anyone know of a suitable replacement
which does things the same way (like an online version of gladTeX)?

Anyhow, if there's any chance of --webtex being up for deprecation in
Pandoc, my vote would be to keep it and find a replacement service for
it that does the same thing.
(Continue reading)

Ryan Gray | 12 Jul 2012 03:22
Gravatar

Re: Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

The MathJax one looks great on my iPhone and the webtex one looks obviously low-res, but neither show the
overlap problem in your screenshot. Also fine in Firefox, Safari, IE 8 and Chrome. 

You can try right-clicking on one math to get a MathJax menu and try changing some of the settings for your
browser to see if anything there helps. 

Ryan

On Jul 10, 2012, at 12:49 PM, John Gabriele <jmg3000@...> wrote:

> On Tue, Jul 10, 2012 at 2:31 PM, John MacFarlane
<fiddlosopher@...> wrote:
>> Have you tried mathjax?  Just pass the --mathjax option to pandoc and
>> be sure to produce a standalone file (-s).  The resulting HTML file
>> will use mathjax's CDN, so you don't need to install any software,
>> as long as you have net access.  I think the results are better than
>> webtex, and more math is supported.
> 
> Yes, I tried mathjax, but the results look a bit off on my system:
> 
> source file: http://www.unexpected-vortices.com/temp/foo.txt
> webtex output: http://www.unexpected-vortices.com/temp/foo-webtex.html
> mathjax output: http://www.unexpected-vortices.com/temp/foo-mathjax.html
> screenshot of mathjax output:
> http://www.unexpected-vortices.com/temp/mathjax-output.png
> 
> Looking more into gladTeX, it seems like exactly what I want, except
> that I don't want to ask users to install Texlive and gladTeX.
> 
> ---John
(Continue reading)

John Gabriele | 12 Jul 2012 18:51
Picon

Re: Rendering LaTeX math in html (latexmathml, jsmath, mimetex, gladtex, webtex, mathjax)

On Wed, Jul 11, 2012 at 9:22 PM, Ryan Gray <u2mr2os2@...> wrote:
> The MathJax one looks great on my iPhone and the webtex one looks obviously low-res, but neither show the
overlap problem in your screenshot. Also fine in Firefox, Safari, IE 8 and Chrome.
>
> You can try right-clicking on one math to get a MathJax menu and try changing some of the settings for your
browser to see if anything there helps.
>

Wow! Did not know about all those right-click settings available!
Thanks for pointing them out, Ryan.

When I first load the page, there's that bad overlapping. Refreshing
the page doesn't help.

Then if I right-click on an eqn, "Math Settings --> Math Renderer",
there's 3 choices: HTML-CSS, MathML, & SVG. The one checked is
HTML-CSS.

If I go there and click any of the choices --- even the
already-selected HTML-CSS --- the overlap problem goes away! Very
strange.

Then if I refresh the page, the problem is back.

This is on Firefox 13.0.1 on the current Xubuntu. I'm curious if
anyone else sees this same behaviour.

Thanks,
---John

(Continue reading)


Gmane