Help: Wiki Math

Version 1
by (unknown)
Version
by (unknown)

Deletions or items before changed

Additions or items after changed

1 -
The Wiki supports LaTeX markup:
+
 
2 -
+
3 -
<math>pi=\frac{3}{4} \sqrt{3}+24 \int_0^{1/4}{\sqrt{x-x^2}dx}</math>
+
4 -
+
5 -
Mathematical Formula (LaTeX) can be inserted into text like this:
+
6 -
{{{
+
7 -
&lt;math&gt;Insert formula here&lt;/math&gt;
+
8 -
}}}
+
9 -
+
10 -
For example:
+
11 -
{{{<math>\alpha^2+\beta^2=1</math>}}}
+
12 -
+
13 -
...displays <math>\alpha^2+\beta^2=1</math>
+
14 -
+
15 -
== Displaying a Formula ==
+
16 -
+
17 -
The Wiki uses a subset of TeX markup, including some extensions from LaTeX and AMSLaTeX, for mathematical formulae. It generates either PNG images or simple HTML markup, depending on the complexity of the expression. While it can generate MathML, it is not currently used due to limited browser support. As browsers become more advanced and support for MathML becomes more wide-spread, this could be the preferred method of output as images have very real disadvantages.
+
18 -
+
19 -
=== Syntax ===
+
20 -
+
21 -
Math markup goes inside `<math> ... </math>`.
+
22 -
+
23 -
===Pros of HTML===
+
24 -
# In-line HTML formulae always align properly with the rest of the HTML text.
+
25 -
# The formula's background, font size and face match the rest of HTML contents and the appearance respects CSS and browser settings.
+
26 -
# Pages using HTML will load faster.
+
27 -
+
28 -
=== Pros of TeX ===
+
29 -
# TeX is semantically superior to HTML. In TeX, "{{{x}}}" means "mathematical variable <math>x</math>", whereas in HTML "{{{x}}}" could mean anything. Information has been irrevocably lost.
+
30 -
# TeX has been specifically designed for typesetting formulae, so input is easier and more natural, and output is more aesthetically pleasing.
+
31 -
# One consequence of point 1 is that TeX can be transformed into HTML, but not vice-versa. This means that on the server side we can always transform a formula, based on its complexity and location within the text, user preferences, type of browser, etc. Therefore, where possible, all the benefits of HTML can be retained, together with the benefits of TeX. It's true that the current situation is not ideal, but that's not a good reason to drop information/contents. It's more a reason to [[#Bug_reports|help improve the situation]].
+
32 -
# Another consequence of point 1 is that TeX can be converted to [[w:MathML|MathML]] for browsers which support it, thus keeping its semantics and allowing it to be rendered vectorially.
+
33 -
# When writing in TeX, editors need not worry about whether this or that version of this or that browser supports this or that HTML entity. The burden of these decisions is put on the server. This doesn't hold for HTML formulae, which can easily end up being rendered wrongly or differently from the editor's intentions on a different browser.
+
34 -
# TeX is the preferred text formatting language of most professional mathematicians, scientists, and engineers. It is easier to persuade them to contribute if they can write in TeX.
+
35 -
+
36 -
=== Example Formulas ===
+
37 -
+
38 -
The following are a few examples of formulas:
+
39 -
+
40 -
{{{
+
41 -
&lt;math&gt;\sqrt{1-e^2}&lt;/math&gt;
+
42 -
}}}
+
43 -
<math>\sqrt{1-e^2}</math>
+
44 -
+
45 -
{{{&lt;math&gt;\overbrace{ 1+2+\cdots+100 }^{5050}&lt;/math&gt;}}}
+
46 -
<math>\overbrace{ 1+2+\cdots+100 }^{5050}</math>
+
47 -
+
48 -
{{{&lt;math&gt;ax^2 + bx + c = 0&lt;/math&gt;}}}
+
49 -
<math>ax^2 + bx + c = 0</math>
+
50 -
+
51 -
{{{&lt;math&gt;\int_{-N}^{N} e^x\, dx&lt;/math&gt;}}}
+
52 -
<math>\int_{-N}^{N} e^x\, dx</math>
+