Help:Displaying a formula
This help page is a how-to guide. It details processes or procedures of some aspect(s) of our norms and practices. |
There are three methods for displaying formulas in Wikipedia: raw HTML, HTML with math templates (abbreviated here as {{math}}), and a subset of LaTeX implemented with the HTML markup <math></math>
(referred to as LaTeX in this article). Each method has some advantages and some disadvantages, which have evolved over time with improvements of MediaWiki.
For example, the famous Einstein formula can be entered in raw HTML as {{nowrap|''E'' {{=}} ''mc''<sup>2</sup>}}
, which is rendered as E = mc2 (the template {{nowrap}} is here only for avoiding a line break inside the formula). With {{math}}, it can be entered as {{math|''E'' {{=}} ''mc''{{sup|2}}}}
, which is rendered as E = mc2. With LaTeX, it is entered as <math>E=mc^2</math>
, and rendered as <math>E=mc^2</math>.