Help:Math markup

&larr; Help: Contents

MediaWiki uses LaTeX markup to render mathematical formulas. OpenVistA Wiki currently (June 2005) does not have all of the code support loaded to do this. The following page is from MediaWiki in anticipation of this code being loaded.

It generates either PNG images or simple HTML markup, depending on user preferences and the complexity of the expression. Alternatively, if you are using an advanced browser like Mozilla or Mozilla Firefox, MediaWiki can generate enhanced HTML or even MathML in most cases.

Math markup goes inside $$ ... $$ tags. Line breaks within these tags are fine, and aren't rendered. They're a good idea to keep the raw markup clear (for instance, a line break after each term or row of a matrix).

Note that PNG images use font sizes and types independent of browser settings. Therefore in most cases these deviate from what HTML renders (the latter does depend on browser settings). Please avoid using TeX markup as part of a line of regular text, as the formulas don't align properly and the font size, as said, usually does not match. Additionally, the background color of the PNG images cannot be changed by the user.

Parenthesizing big expressions
You can use various delimiters with \left and \right:

Spacing
Note that TeX handles most spacing automatically, but you may sometimes want manual control.

Forced PNG rendering
If you must, it is possible to force the formula to render as PNG, without affecting the display of the formula, by adding \,\! (small space and negative space, which cancel out) somewhere inside the math tags (probably at the end).

This could be useful to keep the rendering of formulas in a proof consistent, for example, or to fix formulas that render incorrectly in HTML (x prime, or a^{2+2}), or to demonstrate how something is rendered when it would normally show up as HTML (as in the examples above). For instance:

This has been tested with most of the formulas on this page, and seems to work perfectly.

You might want to include a comment in the HTML so people don't "correct" the formula by removing it: