Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to embed LaTeX in a webpage?

Tags:

html

latex

I'm not asking about converting a LaTeX document to html.

What I'd like to be able to do is have some way to use LaTeX math commands in an html document, and have it appear correctly in a browser. This could be done server or client side.

like image 863
Phenwoods Avatar asked Sep 22 '08 16:09

Phenwoods


People also ask

Can I use LaTeX in HTML?

Since HTML does not support embedded LaTeX, converting the LaTeX to MathML for use with MathJax is an acceptable means, however the problem then becomes one of converting the LaTeX to MathML and seamlessly converting the MathML for use by the HTML browser.

Is KaTeX better than MathJax?

KaTeX, according to most benchmarks I've seen, is faster than MathJax, by a long shot. However, it has somewhat incomplete support for LaTeX, so that may be an issue. MathJax is pretty slow, relative to the others, but it has almost complete support for LaTeX. If that's the price you're willing to pay, then go for it.

Is MathJax the same as LaTeX?

MathJax can display mathematical notation written in LaTeX or MathML markup. Because MathJax is meant only for math display, whereas LaTeX is a document layout language, MathJax only supports the subset of LaTeX used to describe mathematical notation.


1 Answers

I prefer MathJax over solutions that choose to render images (which causes aliasing problems).

MathJax is an open source Javascript rendering engine for mathematics. It uses CSS and Webfonts instead of images or flash and can render LaTeX or MathML. That way you don't have problems with zoom and it's even screenreader compatible.

like image 80
user1433688 Avatar answered Sep 20 '22 11:09

user1433688