I see, very helpful idea, thank you !
And what if the formula is really long ? I guess there are limits to the length of the URL, so is it possible in this case to send a POST message and retrieve the same result ?

On Mon, Dec 13, 2010 at 1:23 PM, Roan Kattouw <roan.kattouw@gmail.com> wrote:
2010/12/13 Gabriel Sandor <gabi.t.sandor@gmail.com>:
> Is it possible to retrieve (preferably via the MediaWiki API) an image
> representing a mathematical formula given in the <math> tags that are
> frequently encountered in Wikipedia articles ?
There's no direct way to do this, although I guess it could be
implemented. A workaround would be to do something like
http://en.wikipedia.org/w/api.php?action=parse&text=<math>\gamma=\frac{1}{\sqrt{1-v^2}}</math>&format=yamlfm
, which will give you the HTML generated for this <math> tag, which
could be an image (like in this case), or HTML if the formula is
sufficiently simple (try a^2+b^2=c^2 for instance).

Roan Kattouw (Catrope)

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api