Help:Math
- This extension isenabled by default on Fandom.
Math formulas can be displayed on articles using the<math> tag.
For the technically inclined,MediaWiki (which is used by Fandom wikis) uses a subset of AMS-LaTeX markup, a superset of LaTeX markup which is in turn a superset of TeX markup, for mathematical formulas.
Instructions[]
Source[]
- Opensource editing mode for an article.
- Write your math code in the following format:
<math>math to be displayed</math>. - For details on how to write the math formulas themselves, seeHelp:Displaying a formula on Wikipedia.
Visual[]
- Openvisual editing mode for an article.
- In the insert dropdown, select "Math formula".
- In the middle will be an editor similar to source editing, but you can choose options from the bottom to insert into the formula.
Examples[]
The equation '3 x 2 = 6' can be displayed using:
<math>{3 ~ \times ~ 2 ~ = ~ 6}</math>- Which generates this:
In-line formulas requiredisplay="inline" attribute:
<math display="inline">V = \frac{4}{3}\pi R^3</math>- Which can be used to generate this:
- The volume of a sphere is.
Regular text can be added to a math formula like so:
<math display="inline">\rho_{\text{Air}} = 1.225~\text{kg/m}^3</math>- Which will render like this:
If you want to display something like 3 to the power of 12, this will not work:
<math display="inline">3^12</math>- It will display as this:
- Instead, group the 12 with { and }, like this:
<math display="inline">3^{12}</math>- It will display as this:
Notes[]
- Large formulas may become wider than the maximum page width. Consider breaking them into multiple lines when possible.
- Another solution is to place the formula inside a simple div with "overflow-x:scroll" set, so that a scrollbar show up. For example:
<div><math> ... </math></div>
- In-line formulas can have poor vertical alignment relative to the rest of the text. A work-around is describedon Wikipedia.
See also[]
Further help and feedback[]
- Browse and search other help pages atHelp:Contents
- CheckFandom Community Central for sources of further help and support
- CheckContacting Fandom for how to report any errors or unclear steps in this article
