Content deleted Content added
|
|
|
[[File:Editing a formula using VisualEditor.png|thumb|This screenshot shows the formula {{math|1=''E'' = ''mc''{{smallsup|2}}}} being edited using [[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 [[template:math templates|math templates]] (abbreviated here as {{tl|math}}), and a subset of [[LaTeX]] implemented with the [[HTML markup]] <syntaxhighlight lang="html5" inline><math></math></syntaxhighlight> (referred to as ''LaTeX'' in this article). Each method has some advantages and some disadvantages, which have evolved over the time with improvements of [[MediaWiki]]. The manual of style [[MOS:MATH]]for 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 [[WP:CONSENSUS|consensus]] resulting of the practice of most experienced members of [[WP:WikiProject Mathematics|WikiProject Mathematics]] and many discussions at [[Wikipedia talk:WikiProject Mathematics]].
For example, the famous [[Einstein formula]] can be entered in raw HTML as <syntaxhighlight lang="html5" inline>{{nowrap|''E'' {{=}} ''mc''<sup>2</sup>}}</syntaxhighlight>, which is rendered as {{nowrap|''E'' {{=}} ''mc''<sup>2</sup>}} (the template {{tl|nowrap}} is here only for avoiding a line break inside the formula). With {{tl|math}}, it can be entered as <syntaxhighlight lang="html5" inline>{{math|''E'' {{=}} ''mc''{{sup|2}}}}</syntaxhighlight>, which is rendered as {{math|''E'' {{=}} ''mc''{{sup|2}}}}. With LaTeX, it is entered as <syntaxhighlight lang="html5" inline><math>E=mc^2</math></syntaxhighlight>, and rendered as <math>E=mc^2</math>.
==Use of raw HTML==
|