So eventually I tried this and indeed it works as expected. I have one more question though.
I've seen that most of the complex math formulas are converted into .png images with some long names - for instance, the <math>\iiiint\limits_F \, dx\,dy\,dz\,dt</math> formula (triple integral) is converted into an image with the name 49005f50f3ba2dfade3a265ebe363ee9.png. I'd like to know, is this file name unique for each formula ? And is it persisted on the wiki's server indefinitely, just like other images in articles ? To be more clear, is the triple integral formula always going to be associated to this 49005f50f3ba2dfade3a265ebe363ee9.png file ?
I'm trying to implement a cache mechanism in my app that tries to also deal with images generated from math markup (besides usual images in articles), that's why I have this curiosity. I'd like to know if I can safely associate a math markup string with a file name so that there's no need to retrieve the image from the server again when I encounter that formula.
2010/12/13 Gabriel Sandor <email@example.com>:
> Is it possible to retrieve (preferably via the MediaWiki API) an imageThere's no direct way to do this, although I guess it could be
> representing a mathematical formula given in the <math> tags that are
> frequently encountered in Wikipedia articles ?
implemented. A workaround would be to do something like
, 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