GeneralBest Method for LaTeX in HTML

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
hbaromega
Posts: 48
Joined: Mon Mar 07, 2011 8:21 pm

Best Method for LaTeX in HTML

Post by hbaromega »

How can I write LaTeX code in an HTML page? In HTML, the LaTeX to converter does not produce the way latex generates for other format, e.g. DVI, PS or PDF.
  1. My main purpose is to write math equations inside an HTML page.
  2. I want to use my own definitions (using \newcommand or \def ) for commands. Is it possible to use that too?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Best Method for LaTeX in HTML

Post by localghost »

I guess you are probably looking for something like MathJax. A search for MathML might also help you on.


Thorsten
hbaromega
Posts: 48
Joined: Mon Mar 07, 2011 8:21 pm

Re: Best Method for LaTeX in HTML

Post by hbaromega »

Yeah I've heard of that. But they do not probably let me use definitions as I have mentioned in the second point.

Thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Best Method for LaTeX in HTML

Post by localghost »

Hm. If I go to the »Demos« section, select »TeX Samples«and disable JavaScript, I get the impression that this is pretty much what you are looking for (see attachment).
Attachments
MathJax-JavaScript.zip
The TeX Samples source code with JavaScript disabled and rendered with JavaScript enabled on the MathJax Demos page.
(176.12 KiB) Downloaded 257 times
hbaromega
Posts: 48
Joined: Mon Mar 07, 2011 8:21 pm

Re: Best Method for LaTeX in HTML

Post by hbaromega »

Thank you very much. Could you tell how I can put inside the html? There must be some initial declaration if I want to use mathjax. Isn't it?

And do you think, \def or \newcommand will work there?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Best Method for LaTeX in HTML

Post by localghost »

Since I never used this, I can't help any further. In the »Resources« section of the project page you can find a documentation and other useful stuff. I think this will help you on.
Post Reply