This help page is a how-to guide. It explains concepts or processes used by the Wikipedia community. It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus. |
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. The manual of style MOS:MATH has not always evolved accordingly. So the how-to recommendations that appear below may differ from those of the manual of style. In this case, they express a consensus resulting of the practice of most experienced members of WikiProject Mathematics and many discussions at Wikipedia talk:WikiProject Mathematics.
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 .