texvc

From Wikipedia, the free encyclopedia

texvc (TeX validator and converter) is a program which validates (AMS) LaTeX mathematical expressions and converts them to HTML, MathML, or PNG graphics. It was written by Tomasz Wegrzanowski and is integrated into MediaWiki.

texvc is used by MediaWiki to render mathematical formulae and similar content. The aim is to allow a single syntax for math markup while allowing a range of output formats to be generated, and to provide protection against cross-site scripting and other potential security issues.

In addition, texvc provides some extensions to standard AMSLaTeX, such as \codes for HTML math character entities (for example, Σ\Sigma) which have different names in LaTeX.

texvc generates HTML based on three classes (as well as limited support for exporting to MathML):

  1. Conservative: the code should look good and work well in most browsers.
  2. Moderate: the code should work and look good in reasonably modern browsers.
  3. Liberal: the code is HTML, but it is designed for very recent browsers, such as newer versions of Mozilla. While it should be legible, it might not look very good.

texvc is written in OCaml, along with PHP code to integrate it with the rest of MediaWiki. It uses dvipng (instead of the commonly used combination of ImageMagick and dvips) to convert LaTeX's output to PNG files.

Like the rest of MediaWiki, it is available under the terms of the GNU GPL from the MediaWiki site.

[edit] External links

Languages