Is there a simple way to embed a MathJax formula to webpage?

116 views
Skip to first unread message

Jack

unread,
Dec 31, 2011, 2:11:00 AM12/31/11
to MathJax Users
If MathJax can export formula as image, I can use <image></image> to
insert it to a webpage easily. Unfortunately, current MathJax don't
support to export image! :(

Is there a simple way to create a embeded code to show formula just
like Twitter above? If you have, could you show me some sample codes?
Thanks!


<a href="https://twitter.com/share" class="twitter-share-button" data-
count="horizontal" data-via="my">Tweet</a>
<script type="text/javascript" src="//platform.twitter.com/
widgets.js"></script>

Davide P. Cervone

unread,
Dec 31, 2011, 8:03:55 AM12/31/11
to mathja...@googlegroups.com
> If MathJax can export formula as image, I can use <image></image> to
> insert it to a webpage easily. Unfortunately, current MathJax don't
> support to export image! :(

Correct. MathJax does not have image creation capabilities, and I
don't know of a way to make that possible from Javascript (a quick web
search suggests it is not readily doable). If you are looking to
convert TeX to images, there are plenty of tools for doing that
already. You could, for example, use TeX with dvipng, or one of the
tools designed for that like the LaTeX Equation Editor or Laeqed
applications. There are a number of on-line tools for doing this as
well, e.g.,

http://www.codecogs.com/latex/eqneditor.php
http://www.equationsheet.com/textoimage.php

A web search should turn up more. I haven't used any of these, so
can't really give you a recommendation, but this should get you started.


> Is there a simple way to create a embeded code to show formula just
> like Twitter above? If you have, could you show me some sample codes?
> Thanks!

Sure, include

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
"></script>

in your page, and put your equation within \(...\) for inline
equations and \[...\] for displayed equations.

Davide


Reply all
Reply to author
Forward
0 new messages