Extension:LaTeXSVG

Purpose
This file is a replacement for the original  of MediaWiki, which enables MediaWiki to render LaTeX expressions to SVG and PNG images, which are embedded into the page (SVG as first option, PNG as a fallback for browsers aren't supporting SVG yet). LaTeXSVG is intended for the use on Windows operating systems, but should even work on Linux and possibly other OS (I haven't tried it).

Usage
Just type your math as usual, e.g..

Download instructions
The LaTeXSVG class for MediaWiki is available for download here.

Requirements
LaTeXSVG uses some tools to render LaTeX formulas and to convert them into SVG and PNG images. At the moment this mass of tools is needed, because SVG support is experimental or yet not implemented by the most tools. Anyway, to get LaTeXSVG work you will need the following software installed on your server:
 * MikTeX 2.8+
 * ActivePerl 5.12+
 * Ghostscript 8.70+
 * pdfcrop.pl (placed in ; see Installation)

Installation

 * 1) Download LaTeXSVG from here (the file is named  ).
 * 2) Rename the original   in your MediaWiki installation (e.g.  ) to.
 * 3) Move the downloaded   to this directory.
 * 4) Download   to the temporary directory for math rendering (e.g.  ).
 * 5) Configure LaTeXSVG.

Configuration
Open  in a text editor (e.g. Notepad++) and look for these lines:

Change the upper lines to match your file system. Parameters in the bottom lines are optional and can be used to customize LaTeXSVG. You can find the explanation for the particular parameters inline.

If everything is fine with the installation, you can now render a LaTeX expression in your MediaWiki installation (e.g. ) without any errors.

Difference of SVG and PNG formula rendering
Some time ago I tried to print a page with LaTeX formulas of Wikipedia. The result was really ugly, because all LaTeX expressions in the MediaWiki software will be rendered to PNG images by default. Due to the nature of rasterized images, all scalings generate artifacts („Jaggies“). So a solution would be a vector image of the formulas.

Vector images in HTML is a hot topic today, because rasterized image file types (e.g. png, gif, jpg) are the most common in the web caused by the lack of browser support of vector images. SVG (Scalable Vector Graphics) are a really good thing, which is currently being implemented in all major browsers.

So I had the wish to render math within the MediaWiki software to an SVG image instead of an PNG image. Because all SVG implementations in the major browsers are experimental, a fallback solution is neccessary.

I have written a replacement for the original  of MediaWiki, which works on Windows servers (I think it should even work on Linux systems, but at the moment I have no time to verify that), called the LaTeXSVG class. This class enables MediaWiki to render LaTeX formulas both to an PNG and an SVG image. This class automatically generates HTML code for the embedding of the SVG image with the fallback solution of an PNG image within a page.

You can compare an original rendered formula and the result of this MediaWiki modification on my website (here it is not allowed to embed objects in raw HTML for security purposes).

Bugs & Feedback
Feedback and bug reports are ever welcome at this page.

License
I distribute LaTeXSVG under the terms of the Creative Commons - Attribution-Share Alike 3.0 Germany License.