Help:Displaying a formula

This screenshot shows the formula E = mc2 being edited using VisualEditor. The window is opened by typing "<math>" in VisualEditor. The visual editor shows a button that allows to choose one of three offered modes to display a formula.

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 .


From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne