Hacker Newsnew | comments | show | ask | jobs | submit login
JsMath: Including Mathematics in Web Pages (union.edu)
59 points by gus_massa 2152 days ago | 20 comments



I use the codecogs service to convert LaTeX to PNG:

http://www.codecogs.com/png.latex?\begin{bmatrix}4,1&1,3...

Just put that in the "src" attribute of an <img> tag. Works everywhere, no JavaScript, no installs, nothing.

-----


Seems extremely slow. I wonder if they're suffered a slashdot effect.

Also, previous services that I have used similar to this have been pulled or put behind a paywall, so I'm reluctant to use a web service like this.

-----


No problem, host it yourself: http://www.fourmilab.ch/webtools/textogif/textogif.html

-----


Hi I'm from CodeCogs. This last week has been somewhat interesting, it hasn't been a slashdot effect, more a Dos attack effect. But you're right, CC has been slower than it should be - and this is being rectified fast.

As for it being pulled. Not anytime soon. It will always be a free survice, so long as its in use. Made increasingly likely now two large companies are considering handing over control of their servers for us to support directly in exchange for public access. First steps to a truely worldwise distributed equation rendering network.

-----


Also useful is mathURL: http://mathurl.com/

which provides a tinyurl-style link to the formula, and a png which can be saved or referenced using the same reference.

-----


Planetmath.org switched to this some time ago and I can't stand it. After initially displaying as a bunch of LaTeX, the entire page goes blank for 5-10 seconds as JsMath does its thing. So incredibly annoying, especially since I am usually just trying to glance quickly at a theorem or definition. I don't know why they didn't switch to MathML, which is supported by any browser someone reading math is likely to use, and is awesome.

On that note, does anyone know how to get Wikipedia's MathML display mode to work correctly? I have it set in my profile but it doesn't do anything.

-----


I fail to understand why web-page authors would prefer this over MathML, especially given that:

1. MathML is a W3C standard.

2. Preventing page breakage due to NoScript.

p.s: I haven't used either - the few (very rare) occasion I have required to display an equation/complex expression, I construct it externally (MS Office mostly) and paste a screenshot of it :)

-----


Authoring MathML is extremely difficult compared to authoring TeX, because it is one of those godawful bloated XML formats. I know people who can write TeX about as fast as I can write mathematical equations on paper. I don’t know anyone who can write MathML at all.

-----


There are wysiwyg tools- like FireMath (for FF), and open-office will convert. But the cross-browser stuff is killer. I'm writing a physics tutorial site and decided I'd only support FF because of the hassle (SVG, too).

-----


What is MathML support like in most of the popular browsers currently in use today? Better or worse than the support for jsMath? I'm guessing the answer to that question is an answer to your first question.

-----


Precisely. We stopped supporting math subject completely in our e-learning product because we couldn't handle MathML. Its too cumbersome, takes way too many resources, and ugly.

-----


Combine it with this http://detexify.kirelabs.org/classify.html and you've got yourself a nifty draw->code tool :)

EDIT: I tried to leave this comment on the jsMath site, but the form wouldn't let me include a link to detexify.

-----


The examples have that LaTeX beauty http://www.math.union.edu/~dpvc/jsMath/examples/Struik.html (top-right corner to flick through)

It's a bit slow to render on my little eee PC. That's understandable - but when using the back button, it re-renders all over again. It is possible in Javascript to somehow cache the result, so it is instant when you return to a previously rendered page?

-----


I've found that if you don't have a onunload handler, the browser will cache it.

-----


In case you missed it, jsmath implements the full TeX layout algorithm in javascript. Quite impressive.

On the other hand, jsmath uses a non-unicode encoding of the math symbols which means you have to download their fonts that use the 8bit TeX encoding. I hope they switch to the STIX font.

-----


If they switch fonts then the formatting won't look so much like TeX. This would disappoint many mathematicians.

-----


I also cannot make it work in an xhtml document.

-----


There's a rewrite of jsMath on the way called MathJax which will provide even better rendering of math on the web.

http://www.mathjax.com/

-----


We've been using this script which you can install on your own server.

http://code.google.com/p/jstexrender/

http://doc.yourequations.com/

jsTeXrender is a small JavaScript program which will convert LaTeX code inside pre or code tags to high-quality images produced by LaTeX typesetting system.

-----


Didn't know "Tex Fonts". With those installed, this is the best solution for mathematics on the web.

Great concept.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: