Community Central
Register
Community Central
m (+ vi)
Tags: Help sourceedit
(Minor tweaks)
Tag: sourceedit
Line 1: Line 1:
'''Math formulas''' may displayed on articles using the <code><nowiki><math></nowiki></code> tag.
+
'''Math formulas''' may displayed on articles using the '''<code><nowiki><math></nowiki></code>''' tag.
   
For the technically inclined, MediaWiki (which FANDOM wikis run on) uses a subset of AMS-LaTeX markup, a superset of LaTeX markup which is in turn a superset of TeX markup, for mathematical formulae.
+
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 formulae.
   
 
== Step by step ==
 
== Step by step ==
* You need to first be in [[Help:Editing|source editing mode]] on an article.
+
* Open [[Help:Editing|source editing mode]] for an article.
* Use the following format: <code><nowiki><math> math to be displayed </math></nowiki></code>.
+
* Write your math code in the following format: <code><nowiki><math>math to be displayed</math></nowiki></code>.
* For example, '3 x 2 = 6' can be displayed with <code><nowiki><math>{3 ~ \times ~ 2 ~ = ~ 6}</math></nowiki></code>, which generates:
+
* For example, the equation '3 x 2 = 6' can be displayed using:
  +
*:<code><nowiki><math>{3 ~ \times ~ 2 ~ = ~ 6}</math></nowiki></code>
  +
* Which generates this:
 
*:<math>{3 ~ \times ~ 2 ~ = ~ 6}</math>
 
*:<math>{3 ~ \times ~ 2 ~ = ~ 6}</math>
 
* For details on how to write the math formulae themselves, see [[wikipedia:Help:Displaying a formula|Help:Displaying a formula, on Wikipedia]].
 
* For details on how to write the math formulae themselves, see [[wikipedia:Help:Displaying a formula|Help:Displaying a formula, on Wikipedia]].
Line 15: Line 17:
 
<pre>
 
<pre>
 
<div style="overflow-x:scroll;">
 
<div style="overflow-x:scroll;">
<math> math formula goes here </math>
+
<math> ... </math>
 
</div>
 
</div>
 
</pre>
 
</pre>
Line 42: Line 44:
 
[[zh:Help:數學公式]]
 
[[zh:Help:數學公式]]
 
[[vi:Trợ giúp:Toán học]]
 
[[vi:Trợ giúp:Toán học]]
  +
 
[[Category:Editing]]
 
[[Category:Editing]]
 
[[Category:Source editing]]
 
[[Category:Source editing]]

Revision as of 18:45, 19 September 2017

Math formulas may 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 formulae.

Step by step

  • Open source editing mode for an article.
  • Write your math code in the following format: <math>math to be displayed</math>.
  • For example, the equation '3 x 2 = 6' can be displayed using:
    <math>{3 ~ \times ~ 2 ~ = ~ 6}</math>
  • Which generates this:
  • For details on how to write the math formulae themselves, see Help:Displaying a formula, on Wikipedia.

Notes

  • Large formulae 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 style="overflow-x:scroll;">
<math> ... </math>
</div>
  • In-line formulae often have poor vertical alignment relative to the rest of the text. A work-around is described on Wikipedia.
  • If the wiki doesn't have a white background, formulas might not display correctly unless placed in a table with a white background, for example:
{| style="background-color: white;"
| <math> ... </math>
|}

See also

Further help and feedback