All the math images have a white background. So I changed wgTexvcBackgroundColor to be transparent. So all the new math renderings are transparent, but the existing ones are still white. Is there a way to force them to re render, under maintenance or something?
Thanks, -Adam
On Mon, Sep 20, 2010 at 20:09, Adam Meyer meyer7@mindspring.com wrote:
All the math images have a white background. So I changed wgTexvcBackgroundColor to be transparent. So all the new math renderings are transparent, but the existing ones are still white. Is there a way to force them to re render, under maintenance or something?
I don't know this part of MediaWiki, so I've been poking around in the docs and the source. Grepping through the maintenance directory, it doesn't seem like there is a script for this.
However, if $wgMathCheckFiles is set to true (which it is by default), then MediaWiki should ensure that the files generated by texvc exist. If I'm reading the manual page (http://www.mediawiki.org/wiki/Manual:$wgMathCheckFiles) right, then you should just be able to move the existing images to another directory and new images should be generated on demand.
I've dropped a few more notes into http://www.mediawiki.org/wiki/Manual:Math. The changes are currently awaiting review, so you'll need to log in or visit http://www.mediawiki.org/w/index.php?title=Manual:Math&stable=0&redi... to see them.
I tried moving the folder, and making a new math folder. The math just showed as a missing image. If I did a null save on the page it then created them. But then I need to know all the pages with math on them to do a null edit.
Is there a maintenance to just touch every page so it would recreate them?
Thanks, -Adam
On Sep 21, 2010, at 1:32 AM, Zak Greant (Foo Associates) wrote:
On Mon, Sep 20, 2010 at 20:09, Adam Meyer meyer7@mindspring.com wrote:
All the math images have a white background. So I changed wgTexvcBackgroundColor to be transparent. So all the new math renderings are transparent, but the existing ones are still white. Is there a way to force them to re render, under maintenance or something?
I don't know this part of MediaWiki, so I've been poking around in the docs and the source. Grepping through the maintenance directory, it doesn't seem like there is a script for this.
However, if $wgMathCheckFiles is set to true (which it is by default), then MediaWiki should ensure that the files generated by texvc exist. If I'm reading the manual page (http://www.mediawiki.org/wiki/Manual:$wgMathCheckFiles) right, then you should just be able to move the existing images to another directory and new images should be generated on demand.
I've dropped a few more notes into http://www.mediawiki.org/wiki/Manual:Math. The changes are currently awaiting review, so you'll need to log in or visit http://www.mediawiki.org/w/index.php?title=Manual:Math&stable=0&redi... to see them.
-- Cheers! Zak Greant :: WMF Contractor :: http://mediawiki.org/wiki/User:Zakgreant
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Tue, Sep 21, 2010 at 04:53, Adam Meyer meyer7@mindspring.com wrote:
I tried moving the folder, and making a new math folder. The math just showed as a missing image. If I did a null save on the page it then created them. But then I need to know all the pages with math on them to do a null edit.
Is there a maintenance to just touch every page so it would recreate them?
I'm not aware of a maintenance script to handle this task – however, that doesn't mean that there isn't one.
I asked about this issue on irc://irc.freenode.net/#mediawiki and received a suggestion that it might be fastest to do with a pywikipediabot script (http://meta.wikimedia.org/wiki/Using_the_python_wikipediabot)
You could grab a list of the last version of all pages and then search through the text for '<math>'. This sounds simple, but probably has one small difficulty – the text of the revision is likely gzipped, meaning that you can't search for the tag directly in the database.
You can grab the text with this query:
SELECT p.page_title AS "Page Title", t.old_text AS "Page Text" FROM wikidb.page p inner join wikidb.revision r ON p.page_latest = r.rev_id inner join wikidb.text t ON r.rev_text_id = t.old_id;
Once you've got the text, use PHP's gzinflate() function to get the plain text back out.
A more expert user of MediaWiki will likely have a more elegant solution.
What about deleting all the files in the math images directory (it is /images/math/* in my instalation). Couldn't it help?
Jakub
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Adam Meyer Sent: Tuesday, September 21, 2010 5:10 AM To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] Re render math images
All the math images have a white background. So I changed wgTexvcBackgroundColor to be transparent. So all the new math renderings are transparent, but the existing ones are still white. Is there a way to force them to re render, under maintenance or something?
Thanks, -Adam _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org