# Help:Formulas

## MediaWiki and TeX

MediaWiki uses a subset of TeX markup (including some extensions from LaTeX and AMSLaTeX) for mathematical formulae. It generates either PNG images or simple HTML markup, depending on user preferences and the complexity of the expression. In the future, as more browsers are smarter, it will be able to generate enhanced HTML or even MathML in many cases.

More precisely, MediaWiki filters the markup through Texvc, which in turn passes the commands to TeX for the actual rendering. Thus, only a limited part of the full TeX language is supported; see below for details.

## Syntax

Math markup goes inside $...$. The edit toolbar has a button for this.

Similarly to HTML, in TeX extra spaces and newlines are ignored.

MediaWiki templates, variables and parameters cannot be used within math tags, see m:Template talk:Demo of attempt to use parameters within TeX.

## Rendering

The PNG images are black on white (not transparent). These colors, as well as font sizes and types, are independent of browser settings or CSS. Font sizes and types will often deviate from what HTML renders. Vertical alignment with the surrounding text can also be a problem. The css selector of the images is img.tex.

It should be pointed out that most of these shortcomings have been addressed by Maynard Handley, but have not been released yet.

The alt attribute of the PNG images (the text that is displayed if your browser can't display images; Internet Explorer shows it up in the hover box) is the wikitext that produced them, excluding the $ and $.

Apart from function and operator names, as is customary in mathematics for variables, letters are in italics; digits are not. For other text, (like variable labels) to avoid being rendered in italics like variables, use \mbox or \mathrm. For example, $\mbox{abc}$ gives $\mbox{abc}$.

## TeX vs HTML

Before introducing TeX markup for producing special characters, it should be noted that, as this comparison table shows, sometimes similar results can be achieved in HTML (see Help:Special characters).

TeX Syntax (forcing PNG) TeX Rendering HTML Syntax HTML Rendering
$\alpha\,$ $\alpha\,$

### Site Toolbox:

##### Navigation
 Disclaimers - About BluWiki