Latex rendering needs too much disk space in MediaWiki?
Not totally sure that Stackoverflow is the best place to ask this question, but since I see a slew of other MediaWiki questions that have already been posted, I suppose my question is appropriate.
My understanding is that MediaWiki, in addition to storing a copy of all revisions of all images, will also store all revisions of all rendered LaTeX. This means that as I am editing a page and clicking "preview" to view my changes, each change of the embedded LaTeX will produce its own se开发者_运维技巧parate file even though I am only saving the page once!
This is from reading MediaWiki Manual: TeX Temporary Files
My question is this, how can people host a reasonably sized MediaWiki that supports LaTex without producing an enormous number of files leading to a loss of significant disk space??
The above link suggests the following, inelegant solution:
The images can be manually deleted, since the wiki can regenerate them, but if you do you'll want to fix the database as well:
• Clear the affected entries in the math table, or the wiki will think it's already rendered those bits
• If using file caching, do one of the following to invalidate the cached pages or visits by anon users won't trigger regeneration of the images:
•• remove all (affected) pages from the cache (consider grep)
•• Update cur_touched fields to present time for affected entries (check for "" in cur_text)
•• Update the global $wgCacheEpoch timestamp in LocalSettings, forcing all cached pages to be regenerated without going to the bother of deleting anything.
The third suggestion to change $wgCacheEpoch
seems the most straightforward but also the least elegant.
Failing an elegant solution, would anyone be able to clarify how on Earth I can accomplish this? Is there not a php script in the maintenance directory that can accomplish this??
You might want to try http://www.mediawiki.org/wiki/Extension:MathJax (client-side JavaScript solution) instead of the default server-side approach.
精彩评论