Help:Displaying a formula: Difference between revisions

Content deleted Content added
No edit summary
Tag: 2017 source edit
 
(37 intermediate revisions by the same user not shown)
Line 1:
{{TOCright}}{{Wikipedia how-to}}{{Commons Import}}
{{Wikipedia how-to}}
{{Commons Import}}
== Fractions ==
 
Fractions sometimes occur in regular text, and need proper presentation. Only a limited number are covered in the UTF-8 repertoire: they are ¼ ½ ¾ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞
 
[[File:Editing a formula using VisualEditor.png|thumb|This screenshot shows the formula {{math|1=''E'' = ''mc''{{smallsup|2}}}} being edited using [[wikipedia:VisualEditor|VisualEditor]]. The visual editor shows a button that allows to choose one of three offered modes to display a formula.]]
A number of these fractions have been added to the characters bar at the bottom of the edit page. The remainder have been left off since they do not render in the font used for Wikisource. They will appear here if your computer has Lucida Sans Unicode. They are overlarge compared with the regular font size.
 
Math is rendered in EMEA Support Wiki's by TeX using Mathoid. There are three methods for displaying formulas in mediawiki: raw HTML, HTML with 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 for math has not always evolved accordingly. So the how-to recommendations that appear below may differ from those of the manual of style.<ref>[[mediawikiwiki:Extension:Math/Help:Formula|Extension:Math/Help:Formula (Mediawiki-Wiki)]]</ref>
Other fractions can be done with keyboard figures (like 11/16, 27/32, et cetera), but they are intrusive, being overlarge. More elegant fractions can be made by HTML coding, such as using the superscript/subscript markup.
<ref>[[metawikimedia:Help:Displaying a formula |Help:Displaying a formula (Wiki-Source)]]</ref>
<ref>[[wikipedia:Help:Displaying_a_formula |Help:Displaying_a_formula (Wikipedia) ]]</ref>
<ref>[https://web.archive.org/web/20160305074303/https://www.math.upenn.edu/tex-stuff/cookbook.pdf {{TeX}} Cookbook]{{space}}[[Media:Tex-cookbook.pdf | local copy]]</ref>
 
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>.
Thus, <span style="vertical-align:super;font-size:x-small">11</span>/<span style="vertical-align:sub;font-size:x-small">16</span> will be displayed by <code><nowiki><span style="vertical-align:super;font-size:x-small">11</span>/<span style="vertical-align:sub;font-size:x-small">16</span></nowiki></code>
 
[[:Template:frac]] will produce {{frac|11|16}};
 
==Use of raw HTML==
<nowiki>{{fs70|{{frac|11|16}}}}</nowiki> fits inline: {{fs70|{{frac|11|16}}}}
 
Variable names and many symbols look very different with raw HTML and the other display methods. This may be confusing in the common case where several methods are used in the same article. Moreover, mathematicians who are used to reading and writing texts written with LaTeX often find the raw HTML rendering awful.
[[:Template:sfrac]] will produce vertical fractions fitting in with the Mediawiki typeface. Ex. {{sfrac|4|3|4}}, {{sfrac|67|83726}};
 
So, raw HTML should normally not be used for new content. However, raw HTML is still present in many mathematical articles. It is generally a good practice to convert it to {{tl|math}} format, but coherency must be respected; that is, such a conversion must be done in a whole article, or at least in a whole section. Moreover, such a conversion must be identified as such in the edit summary, and it should be avoided making other changes in the same edit. This is for helping other users to identify changes that are possibly controversial (the "diff" of a conversion may be very large, and may hide other changes).
<nowiki>{{fs70|{{sfrac|4|3}}}}</nowiki> fits inline: {{fs70|{{sfrac|4|3}}}}
 
Converting raw HTML to {{tl|math}} is rather simple: when the formula is enclosed with {{tl|nowrap}}, it suffices to change "nowrap" into "math". However, if the formula contains an equal sign, one has to add 1= just before the formula for avoiding confusion with the template syntax; for example, <syntaxhighlight lang="html5" inline>{{math|1=''E'' = ''mc''{{sup|2}}}}</syntaxhighlight>. Also, vertical bars, if any, must either be replaced with {{tlx|!}} or avoided by using {{tlx|abs}}.
Fractions can also be made with the TeX, but they do not match the Mediawiki typeface.
 
==LaTeX vs. <nowiki>{{math}}</nowiki>==
== Functions ==
{{anchor|LaTeX vs. math template}}
 
These two ways of writing mathematical formulas each have their advantages and disadvantages. They are both accepted by the [[wikipedia:MOS:MATH|manual of style]]. The rendering of variable names is very similar. So having a variable name displayed in the same paragraph with {{tlx|math}} and <syntaxhighlight lang="html5" inline><math></syntaxhighlight> is generally not a problem.
Functions are rendered in EMEA Support Wiki's by TeX using Mathoid. The text here is from the following sources:
* [[mediawikiwiki:Help:Displaying a formula |Help:Displaying a formula (Meta-Wiki)]]
* [[wikisource:Help:Fractions_and_functions |Help:Fractions_and_functions (Wiki-Source)]]
* [[wikipedia:Help:Displaying_a_formula |Help:Displaying_a_formula (Wikipedia) ]]
* [https://web.archive.org/web/20160305074303/https://www.math.upenn.edu/tex-stuff/cookbook.pdf {{TeX}} Cookbook], [[Media:Tex-cookbook.pdf | Local Copy]]
 
The disadvantages of LaTeX are the following:
=={{TeX}}==
On some browser configurations, LaTeX inline formulas appear with a slight vertical misalignment, or with a font size that is slightly different from that of the surrounding text. This is not a problem with a block displayed formula. This is generally also not a real problem with inline formulas that exceed the normal line height (for example formulas with subscripts and superscripts).
Also, the use of LaTeX in a [[wikipedia:piped link|piped link]] or in a section heading should appear in blue in the linked text or the table of content, but they do not. Moreover, links to section headings containing LaTeX formulas do not work always as expected.
Finally, too many LaTeX formulas may significantly increase the processing time of a page. LaTeX formulas should be avoided in image captions, because when the image is clicked for a larger display, LaTeX in the caption will not render.
 
The disadvantages of {{tl|math}} are the following:
[[w:MediaWiki]] uses a subset of '''[[w:TeX|TeX]] markup''' for mathematical formulae. See [[meta:MediaWiki math markup]]
not all formulas can be displayed. While it is possible to render a complicated formula with {{tl|math}}, it is often poorly rendered. Except for the most common ones, the rendering of non-alphanumeric Unicode symbols is often very poor and may depend on the browser configuration (misalignment, wrong size, ...). The spaces inside formulas are not managed automatically, and thus need some expertise for being rendered correctly. Except for short formulas, many more characters have to be typed for entering a formula, and the source is more difficult to read.
 
Therefore, the common practice of most members of [[wikipedia:WPM|WikiProject mathematics]] is the following:
It generates either [[w:PNG|PNG]] images or simple [[w:HTML|HTML]] markup, depending on [[meta:Help:Preferences#Rendering_math|user preferences]] and the complexity of the expression. In the future, as more browsers are smarter, it will be able to generate enhanced HTML or even [[w:MathML|MathML]] in many cases.
* Use of {{tl|mvar}} and {{tl|math}} for isolated variables and very simple inline formulas
* Use of {{tl|mvar}} and {{tl|math}} for formulas in image captions, even if the rendering is mediocre
* Use of LaTeX for displayed formulas and more complicated inline formulas
* Use of LaTeX for formulas involving symbols that are not regularly rendered in Unicode (see [[wikipedia:MOS:BBB]])
* Avoid formulas in section headings, and when this is a problem, use raw HTML (see [[wikipedia:Finite field|Finite field]] for an example)
 
The choice between {{tl|math}} and LaTeX depends on the editor. So converting from a format to another one must be done with stronger reasons than editor preference.
(More precisely, [[w:MediaWiki]] filters the markup through [[w:Texvc|Texvc]], which in turn passes the commands to TeX for the actual rendering. Thus, only a limited part of the full [[w:TeX]] language is supported; see below for details.)
 
=== Display format of LaTeX ===
Math markup goes inside ''<nowiki><math> ... </math></nowiki>''. The [[meta:help:edit toolbar|edit toolbar]] has a button for this.
{{see also|mw:Extension:Math}}
By default SVG images with non-visible [[wikipedia:MathML|MathML]] are generated. The text-only form of the LaTeX can be set via [[Help:Preferences|user preferences]] at [[Special:Preferences#mw-prefsection-rendering|My Preferences – Appearance – Math]].
 
The hidden MathML can be used by screen readers and other assistive technology. To display the MathML in Firefox:
MediaWiki templates, variables and parameters cannot be used within math tags, see [[meta:Template talk:Demo of attempt to use parameters within TeX|Demo of attempt to use parameters within TeX]].
 
* Install the [https://addons.mozilla.org/en-US/firefox/addon/native-mathml/ Native MathML] extension
The PNG images are black on white (not transparent). These colors, as well as font sizes and types, are independent of browser settings or css. Font sizes and types will often deviate from what HTML renders. The [[meta:Help:User_style#CSS_selectors|css selector]] of the images is img.tex.
* Or copy [https://github.com/fred-wang/webextension-native-mathml/blob/master/content-scripts/mediawiki.css its CSS rules] to your Wikipedia [[wikipedia:Help:User style|user stylesheet]].
 
In either case, you must have fonts that support MathML ([https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts see developer.mozilla.org]) installed on your system. For copy-paste support in Firefox, you can also install [https://addons.mozilla.org/en-US/firefox/addon/mathml-copy/ MathML Copy].
In the case of a non-white page background, the white background of the formula effectively highlights it, which can be an advantage or a disadvantage.
 
==Use of HTML templates==
One may want to avoid using TeX markup as part of a line of regular text, as the formulae don't align properly and the font size, as said, usually does not match.
{{See also|Wikipedia:Rendering math}}
TeX markup is not the only way to render mathematical formulas. For simple inline formulas, the template {{tl|math}} and its associated templates are often preferred. The following comparison table shows that similar results can be achieved with the two methods. See also [[wikipedia:Help:Special characters]].
 
{| class="wikitable"
The alt attribute of the TeX images (the text that is displayed if your browser can't display images; Internet Explorer even shows it up in the hover box) is the wikitext that produced them, excluding the <nowiki><math> and </math></nowiki>.
|-
! TeX syntax
! TeX rendering
|rowspan=7|&nbsp;
! HTML syntax
! HTML rendering
|-
| <syntaxhighlight lang="latex" inline><math>\alpha</math></syntaxhighlight>
| <math>\alpha</math>
| <syntaxhighlight lang="html5" inline>{{math|''&alpha;''}}</syntaxhighlight> &emsp; or &emsp; <syntaxhighlight lang="html5" inline>{{mvar|&alpha;}}</syntaxhighlight>
| {{math|''&alpha;''}} &emsp; or &emsp; {{mvar|&alpha;}}
|-
| <syntaxhighlight lang="latex" inline> <math>f(x) = x^2</math></syntaxhighlight>
| <math> f(x) = x^2</math>
| <syntaxhighlight lang="html5" inline>{{math|''f''(''x'') {{=}} ''x''<sup>2</sup>}}</syntaxhighlight>
| {{math|''f''(''x'') {{=}} ''x''<sup>2</sup>}}
|-
| <syntaxhighlight lang="latex" inline> <math>\{1,e,\pi\}</math></syntaxhighlight>
| <math>\{1,e,\pi\}</math>
| <syntaxhighlight lang="html5" inline>{{math|{{mset|1, ''e'', ''&pi;''}}}}</syntaxhighlight>
| {{math|{{mset|1, ''e'', ''&pi;''}}}}
|-
| <syntaxhighlight lang="latex" inline> <math>|z + 1| \leq 2</math></syntaxhighlight>
| <math>|z + 1| \leq 2</math>
| <syntaxhighlight lang="html5" inline>{{math|{{abs|''z'' + 1}} &le; 2}}</syntaxhighlight>
| {{math|{{abs|''z'' + 1}} &le; 2}}
|}
 
===HTML entities===
Discussion, bug reports and feature requests should go to the [[meta:Mailing_list#Wikitech|Wikitech-l mailing list]]. These can also be filed on [http://bugzilla.wikipedia.org Mediazilla] under ''MediaWiki extensions''.
 
Though Unicode characters are generally preferred, sometimes HTML entities are needed to avoid problems with wiki syntax or confusion with other characters:
 
{{aligned table|cols=10|style=text-align:center;|row1class=unicode|row2class=mw-code
| &lt; | &gt; | &minus; | &bull; |&prime; | &Prime; | &sdot; | &middot;| &ndash; | &mdash;
| &amp;lt; | &amp;gt; | &amp;minus; | &amp;bull; | &amp;prime; | &amp;Prime; | &amp;sdot; | &amp;middot; | &amp;ndash; | &amp;mdash; }}
 
In the table below, the codes on the left produce the symbols on the right, but these symbols can also be entered directly in the wikitext either by typing them if they are available on the keyboard, by copy-pasting them, or by using menus below the edit windows. (When editing any Wikipedia page in a desktop web browser, use the "Insert" pulldown menu immediately below the article text, or the "Special characters" menu immediately above the article text.) Normally, lowercase Greek letters should be entered in italics, that is, enclosed between two single quotes (<syntaxhighlight lang="html5" inline>''</syntaxhighlight>).
 
{| class="wikitable" border=1 <!--set border for MSIE browsers-->
|-
! HTML syntax
! Rendering
|- style="vertical-align:middle;"
|
<pre>&amp;alpha; &amp;beta; &amp;gamma; &amp;delta; &amp;epsilon; &amp;zeta;
&amp;eta; &amp;theta; &amp;iota; &amp;kappa; &amp;lambda; &amp;mu; &amp;nu;
&amp;xi; &amp;omicron; &amp;pi; &amp;rho; &amp;sigma; &amp;sigmaf;
&amp;tau; &amp;upsilon; &amp;phi; &amp;chi; &amp;psi; &amp;omega;</pre>
|
α β γ δ ε ζ<br>η θ ι κ λ μ ν<br>ξ ο π ρ σ ς<br>τ υ φ χ ψ ω<br>
|- style="vertical-align:middle;"
|
<pre>&amp;Gamma; &amp;Delta; &amp;Theta; &amp;Lambda; &amp;Xi; &amp;Pi;
&amp;Sigma; &amp;Phi; &amp;Psi; &amp;Omega;</pre>
|
Γ Δ Θ Λ Ξ Π<br>Σ Φ Ψ Ω
|- style="vertical-align:middle;"
| <pre>&amp;int; &amp;sum; &amp;prod; &amp;minus; &amp;plusmn; &amp;infin;
&amp;asymp; &amp;prop; = &amp;equiv; &amp;ne; &amp;le; &amp;ge;
&amp;times; &amp;middot; &amp;sdot; &amp;divide; &amp;part; &amp;prime; &amp;Prime;
&amp;nabla; &amp;permil; &amp;deg; &amp;there4; &amp;empty;</pre>
|
∫ ∑ ∏ − ± ∞<br/>≈ ∝ = ≡ ≠ ≤ ≥<br/>× · ⋅ ÷ ∂ ′ ″<br/>∇ ‰ ° ∴ ∅
|- style="vertical-align:middle;"
| <pre>&amp;isin; &amp;notin; &amp;cap; &amp;cup; &amp;sub; &amp;sup; &amp;sube; &amp;supe;
&amp;not; &amp;and; &amp;or; &amp;exist; &amp;forall;
&amp;rArr; &amp;hArr; &amp;rarr; &amp;harr; &amp;uarr; &amp;darr;
&amp;alefsym; - &amp;ndash; &amp;mdash;</pre>
|
∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇<br>¬ ∧ ∨ ∃ ∀<br/>⇒ ⇔ → ↔ ↑ ↓<br/>ℵ - – —
|}
 
===Superscripts and subscripts===
{{aligned table|cols=3|style=text-align:center;|row1class=unicode|row2class=mw-code|x<sup>2</sup> | x<sub>3</sub> | x{{su|p=2|b=1}} |<nowiki>x<sup>2</sup></nowiki>|<nowiki>x<sub>3</sub></nowiki>|<nowiki>x{{su|p=2|b=1}}</nowiki>}}
 
===Spacing===
To avoid line-wrapping in the middle of a formula, use {{tl|math}}. If necessary, a non-breaking space (&nbsp;) can be inserted with "&amp;nbsp;".
 
Typically [[wikipedia:whitespace character|whitespace]] should be a regular space ( ) or none at all. In rare circumstances, such as where one character overlaps another due to one being in italics, a thin space can be added with {{tl|thin space}}.
 
== Fractions ==
 
Fractions sometimes occur in regular text, and need proper presentation. Only a limited number are covered in the UTF-8 repertoire: they are ¼ ½ ¾ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞
 
A number of these fractions have been added to the characters bar at the bottom of the edit page. The remainder have been left off since they do not render in the font used for Wikisource. They will appear here if your computer has Lucida Sans Unicode. They are overlarge compared with the regular font size.
 
Other fractions can be done with keyboard figures (like 11/16, 27/32, et cetera), but they are intrusive, being overlarge. More elegant fractions can be made by HTML coding, such as using the superscript/subscript markup.
 
Thus, <span style="vertical-align:super;font-size:x-small">11</span>/<span style="vertical-align:sub;font-size:x-small">16</span> will be displayed by <code><nowiki><span style="vertical-align:super;font-size:x-small">11</span>/<span style="vertical-align:sub;font-size:x-small">16</span></nowiki></code>
 
[[:Template:frac]] will produce {{frac|11|16}};
 
<nowiki>{{fs70|{{frac|11|16}}}}</nowiki> fits inline: {{fs70|{{frac|11|16}}}}
 
[[:Template:sfrac]] will produce vertical fractions fitting in with the Mediawiki typeface. Ex. {{sfrac|4|3|4}}, {{sfrac|67|83726}};
 
<nowiki>{{fs70|{{sfrac|4|3}}}}</nowiki> fits inline: {{fs70|{{sfrac|4|3}}}}
 
Fractions can also be made with the TeX, but they do not match the Mediawiki typeface.
 
==General==
Line 59 ⟶ 165:
===Size===
There are some possibilities, to change the size of the formulas. For example, fractions can be made smaller using <code>\tfrac</code> instead of <code>\frac</code>.
{{<center|><math>\frac{10}{100}</math> becomes <math>\tfrac{10}{100}</math>.}}</center>
In general, formulas can be made even smaller if <code>\scriptstyle</code> is employed:
{{<center|><math>\sqrt{1-\frac{v^{2}}{c^{2}}}</math> becomes <math>\scriptstyle \sqrt{1-\frac{v^{2}}{c^{2}}}</math>.}}</center>
 
=== Special characters ===
 
{{markupv
<nowiki><math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math></nowiki>
|m=<math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math>
<math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math>
|r=<nowiki><math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math></nowiki>
<nowiki><math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math></nowiki>
}}
 
 
gives:
 
 
<math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math>
<math>\text {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math>
 
 
Or, using <code>\mbox</code> instead of <code>\text</code>, pretty much the same:
 
{{markupv
 
|m=<math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math>
For example,
<math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math>
<nowiki><math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math></nowiki>
|r=<nowiki><math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math></nowiki>
<nowiki><math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math></nowiki>
}}
 
 
gives:
<math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}</math>
<math>\mbox {abcdefghijklmnopqrstuvwxyzàáâãäåæçčèéêëìíîïñòóôõö÷øùúûüýÿ}\,</math>
 
 
Line 96 ⟶ 196:
<math>\text {þ}</math>
 
For producing special characters without math tags, see [[mmediawikiwiki:Help:Special characters | Special characters]].
 
Comparison:
Line 120 ⟶ 220:
 
<code><nowiki><math> \hat{} \quad \tilde{} \quad \backslash </math></nowiki></code> gives <math> \hat{} \quad \tilde{} \quad \backslash </math>
 
=={{TeX}} and HTML==
 
 
Before introducing {{TeX}} markup for producing special characters, it should be noted that, as this comparison table shows, sometimes similar results can be achieved in HTML (see [[w:Help:Special characters]]).
{| class="wikitable"
|-
! <!--T:240-->
{{TeX}} Syntax ([[#Forced_PNG_rendering|forcing PNG]])
! <!--T:241-->
{{TeX}} Rendering
! <!--T:242-->
HTML Syntax
! <!--T:243-->
HTML Rendering
|-
| <code><nowiki><math>\alpha</math></nowiki></code>
| <math>\alpha</math>
| <code><nowiki>{{math|<var>&amp;alpha;</var>}}</nowiki></code>
| {{math|<var>&alpha;</var>}}
|-
| <code><nowiki><math> f(x) = x^2\,</math></nowiki></code>
| <math> f(x) = x^2\,</math>
| <code><nowiki>{{math|''f''(<var>x</var>) {{=}} <var>x</var><sup>2</sup>}}</nowiki></code>
| {{math|''f''(<var>x</var>) {{=}} <var>x</var><sup>2</sup>}}
|-
| <code><nowiki><math>\sqrt{2}</math></nowiki></code>
| <math>\sqrt{2}</math>
| <code><nowiki>{{math|{{radical|2}}}}</nowiki></code>
| {{math|{{radical|2}}}}
|-
| <code><nowiki><math>\sqrt{1-e^2}</math></nowiki></code>
| <math>\sqrt{1-e^2}</math>
| <code><nowiki>{{math|{{radical|1 &amp;minus; ''e''&amp;sup2;}}}}</nowiki></code>
| {{math|{{radical|1 &minus; ''e''&sup2;}}}}
|}
 
 
The codes on the left produce the symbols on the right, but the latter can also be put directly in the wikitext, except for &lsquo;=&rsquo;.
 
{| class="wikitable"
|-
!
Syntax
!
Rendering
|- valign="top"
|<pre><nowiki>&amp;alpha; &amp;beta; &amp;gamma; &amp;delta; &amp;epsilon; &amp;zeta;
&amp;eta; &amp;theta; &amp;iota; &amp;kappa; &amp;lambda; &amp;mu; &amp;nu;
&amp;xi; &amp;omicron; &amp;pi; &amp;rho; &amp;sigma; &amp;sigmaf;
&amp;tau; &amp;upsilon; &amp;phi; &amp;chi; &amp;psi; &amp;omega;
&amp;Gamma; &amp;Delta; &amp;Theta; &amp;Lambda; &amp;Xi; &amp;Pi;
&amp;Sigma; &amp;Phi; &amp;Psi; &amp;Omega;
</nowiki></pre>
| style="texhtml" |α β γ δ ε ζ<br
/>η θ ι κ λ μ ν<br
/>ξ ο π ρ σ ς<br
/>τ υ φ χ ψ ω<br
/>Γ Δ Θ Λ Ξ Π<br
/>Σ Φ Ψ Ω
|- valign="top"
| valign="middle" | <pre><nowiki>&amp;int; &amp;sum; &amp;prod; &amp;radic; &amp;minus; &amp;plusmn; &amp;infty;
&amp;asymp; &amp;prop; {{=}} &amp;equiv; &amp;ne; &amp;le; &amp;ge;
&amp;times; &amp;sdot; &amp;divide; &amp;part; &amp;prime; &amp;Prime;
&amp;nabla; &amp;permil; &amp;deg; &amp;there4; &amp;Oslash; &amp;oslash;
&amp;isin; &amp;notin;
&amp;cap; &amp;cup; &amp;sub; &amp;sup; &amp;sube; &amp;supe;
&amp;not; &amp;and; &amp;or; &amp;exist; &amp;forall;
&amp;rArr; &amp;hArr; &amp;rarr; &amp;harr; &amp;uarr;
&amp;alefsym; - &amp;ndash; &amp;mdash;
</nowiki></pre>
| style="texhtml" |∫ ∑ ∏ √ − ± ∞<br
/>≈ ∝ = ≡ ≠ ≤ ≥<br
/>× ⋅ ÷ ∂ ′ ″<br
/>∇ ‰ ° ∴ Ø ø<br
/>∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇<br
/>¬ ∧ ∨ ∃ ∀<br
/>⇒ ⇔ → ↔ ↑<br
/>ℵ - – —
|}
 
 
The project has settled on both HTML and TeX because each has advantages in some situations.
 
===Pros of HTML===
 
 
# Formulas in HTML behave more like regular text. In-line HTML formulae always align properly with the rest of the HTML text and, to some degree, can be cut-and-pasted (this is not a problem if {{TeX}} is rendered using [[w:MathJax|MathJax]], and the alignment should not be a problem for PNG rendering once [[bugzilla:32694|bug 32694]] is fixed).
# The formula&rsquo;s background and font size match the rest of HTML contents (this can be fixed on {{TeX}} formulas by using the commands [[#Color|<code>\pagecolor</code> and <code>\definecolor</code>]]) and the appearance respects CSS and browser settings while the typeface is conveniently altered to help you identify formulae.
# Pages using HTML code for formulae use less data to transmit, which is important to users with slow or capped Internet connections (e.g. those using dialup or mobile Internet connections which are either slow or have a data cap).
# Formulae typeset with HTML code will be accessible to client-side script links (a.k.a. scriptlets).
# The display of a formula entered using mathematical templates can be conveniently altered by modifying the templates involved; this modification will affect all relevant formulae without any manual intervention.
# The HTML code, if entered diligently, will contain all semantic information to transform the equation back to {{TeX}} or any other code as needed. It can even contain differences {{TeX}} does not normally catch, e.g. <code><nowiki>{{math|''i''}}</nowiki></code> for the [[w:imaginary unit|imaginary unit]] and <code><nowiki>{{math|<var>i</var>}}</nowiki></code> for an arbitrary index variable.
# Formulae using HTML code will render as sharp as possible no matter what device is used to render them.
 
===Pros of {{TeX}}===
 
 
# {{TeX}} is semantically more precise than HTML.
## In {{TeX}}, "<code><nowiki><math>x</math></nowiki></code>" means "mathematical variable <math>x</math>", whereas in HTML "<code>x</code>" is generic and somewhat ambiguous.
## On the other hand, if you encode the same formula as "<code><nowiki>{{math|<var>x</var>}}</nowiki></code>", you get the same visual result {{math|<var>x</var>}} and no information is lost. This requires diligence and more typing that could make the formula harder to understand as you type it. However, since there are far more readers than editors, this effort is worth considering if no other rendering options are available (such as [[w:MathJax|MathJax]], which was requested on [[bugzilla:31406|bug 31406]] for use on Wikimedia wikis and [http://www.gossamer-threads.com/lists/wiki/wikitech/260990 is being implemented] on [[mw:Extension:Math|Extension:Math]] as a new rendering option).
# One consequence of point&nbsp;1 is that {{TeX}} code can be transformed into HTML, but not vice-versa.{{ref|dilHTML}} 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 is true that the current situation is not ideal, but that is not a good reason to drop information/contents. It is more a reason to [[#Bug_reports|help improve the situation]].
# Another consequence of point&nbsp;1 is that {{TeX}} can be converted to [[w:MathML|MathML]] (e.g. by MathJax) for browsers which support it, thus keeping its semantics and allowing the rendering to be better suited for the reader&rsquo;s graphic device.
# {{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}}.
# {{TeX}} has been specifically designed for typesetting formulae, so input is easier and more natural if you are accustomed to it, and output is more aesthetically pleasing if you focus on a single formula rather than on the whole containing page.
# Once a formula is done correctly in {{TeX}}, it will render reliably, whereas the success of HTML formulae is somewhat dependent on browsers or versions of browsers. Another aspect of this dependency is fonts: the serif font used for rendering formulae is browser-dependent and it may be missing some important glyphs. While the browser generally capable to substitute a matching glyph from a different font family, it need not be the case for combined glyphs (compare&nbsp;&lsquo;&nbsp;<var>{{IPA|a&#773;}}</var>&nbsp;&rsquo; and&nbsp;&lsquo;&nbsp;<var style="font-family: SERIF">a&#773;</var>&nbsp;&rsquo;).
# 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 software. This does not hold for HTML formulae, which can easily end up being rendered wrongly or differently from the editor&rsquo;s intentions on a different browser.{{ref|browsupp}}
# {{TeX}} formulae, by default, render larger and are usually more readable than HTML formulae and are not dependent on client-side browser resources, such as fonts, and so the results are more reliably WYSIWYG.
# While {{TeX}} does not assist you in finding HTML codes or Unicode values (which you can obtain by viewing the HTML source in your browser), cutting and pasting from a {{TeX}} PNG in Wikipedia into simple text will return the LaTeX source.
 
 
:<small>{{note|dilHTML}} unless your wikitext follows the style of point&nbsp;1.2</small>
:<small>{{note|entHTML}} The entity support problem is not limited to mathematical formulae though; it can be easily solved by using the corresponding characters instead of entities, as the character repertoire links do, except for cases where the corresponding glyphs are visually indiscernible (e.g. &amp;ndash; for &lsquo;&ndash;&rsquo; and &amp;minus; for &lsquo;&minus;&rsquo;).</small>
 
 
In some cases it may be the best choice to use neither {{TeX}} nor the html-substitutes, but instead the simple ASCII symbols of a standard keyboard (see below, for an example).
 
==Functions, symbols, special characters==
Line 1,060 ⟶ 1,044:
 
== Alphabets and typefaces == <!--T:65-->
[[wwikipedia:Texvc|Texvc]] cannot render arbitrary [[wwikipedia:Unicode|Unicode]] characters. Those it can handle can be entered by the expressions below.
For others, such as [[wwikipedia:Cyrillic|Cyrillic]], they can be entered as Unicode or HTML entities in running text, but cannot be used in displayed formulas.
 
<!--T:66-->
Line 1,322 ⟶ 1,306:
|}
 
== Color == <!--T:68-->
Equations can use color with the <code>\color</code> command. For example,
 
{| class="wikitable"
<!--T:69-->
|-
Equations can use color:
! How it looks rendered
! Syntax
! Feature
|-
| <math>{\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1}</math>
| <syntaxhighlight lang="latex" inline>{\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1}</syntaxhighlight>
|
|-
| <math>x=\frac{{\color{Blue}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a}</math>
| {{nowrap|1=<syntaxhighlight lang="latex" inline>x=\frac{{\color{Blue}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a}</syntaxhighlight>}}
|
|}
 
The <code>\color</code> command colors all symbols to its right.
<!--T:70-->
However, if the <code>\color</code> command is enclosed in a pair of braces (e.g. <code>{\color{Red}...}</code>) then no symbols outside of those braces are affected.
*<code>{\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1}</code>
*:<math>{\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1}</math>
 
{| class="wikitable"
<!--T:71-->
*<code>x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}</code>
*:<math>x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}</math>
 
<!--T:72-->
It is also possible to change the background color (since [[rev:59550|r59550]]), as in the following example:
{| class=wikitable
|-
! How it looks rendered
! Background
! Syntax
! Wikicode
! Feature
! Rendering (in PNG)
|-
| <math>x\color{red}\neq y=z</math>
! rowspan=2 | White
| <syntaxhighlight lang="latex" inline>x\color{red}\neq y=z</syntaxhighlight>
| <code>e^{i \pi} + 1 = 0</code>
|
| <math>e^{i \pi} + 1 = 0\,</math>
Colors <span style="color:red;">red</span> everything to the right of <code><nowiki>\color{red}</nowiki></code>. To only color the <math>\neq</math> symbol red, place braces around <code><nowiki>\color{red}\neq</nowiki></code> or insert <code><nowiki>\color{black}</nowiki></code> to the right of <code><nowiki>\neq</nowiki></code>.
|-
| <math>x{\color{red}\neq} y=z</math>
| <code>'''\definecolor{orange}{RGB}{255,165,0}\pagecolor{orange}'''e^{i \pi} + 1 = 0</code>
| <syntaxhighlight lang="latex" inline>x{\color{red}\neq} y=z</syntaxhighlight>
| <math>\definecolor{orange}{RGB}{255,165,0}\pagecolor{orange}e^{i \pi} + 1 = 0\,</math></span>
|
|-
| <math>x\color{red}\neq\color{black} y=z</math>
! rowspan=2 | Orange
| <syntaxhighlight lang="latex" inline>x\color{red}\neq\color{black} y=z</syntaxhighlight>
| <code>e^{i \pi} + 1 = 0</code>
|
| style="background-color:orange;" | <math>e^{i \pi} + 1 = 0\,</math>
|-
| <math>\frac{-b\color{Green}\pm\sqrt{b^2\color{Blue}-4{\color{Red}a}c}}{2a}=x</math>
| <code>'''\definecolor{orange}{RGB}{255,165,0}\pagecolor{orange}'''e^{i \pi} + 1 = 0</code>
| {{nowrap|1=<syntaxhighlight lang="latex" inline>\frac{-b\color{Green}\pm\sqrt{b^2\color{Blue}-4{\color{Red}a}c}}{2a}=x</syntaxhighlight>}}
| style="background-color:orange;" | <math>\definecolor{orange}{RGB}{255,165,0}\pagecolor{orange}e^{i \pi} + 1 = 0\,</math>
| The outermost braces in <code>{\color{Red}a}c</code> limit the affect of <code>\color{Red}</code> to the symbol <code>a</code>. Similarly, <code>\color{Blue}</code> does not affect any symbols outside of the <code>\sqrt{}</code> that encloses it, and <code>\color{Green}</code> does not affect any symbols outside of the numerator.
|}
 
There are several alternate notations styles
 
{| class="wikitable"
|-
! How it looks rendered
! Syntax
! Feature
|-
| <math>{\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1}</math>
| <syntaxhighlight lang="latex" inline>{\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1}</syntaxhighlight>
| works with both texvc and MathJax
|-
| <math>\color{Blue}x^2\color{Black}+\color{Orange}2x\color{Black}-\color{LimeGreen}1</math>
| {{nowrap|1=<syntaxhighlight lang="latex" inline>\color{Blue}x^2\color{Black}+\color{Orange}2x\color{Black}-\color{LimeGreen}1</syntaxhighlight>}}
| works with both texvc and MathJax
|-
| <math>\color{Blue}{x^2}+\color{Orange}{2x}-\color{LimeGreen}{1}</math>
| <syntaxhighlight lang="latex" inline>\color{Blue}{x^2}+\color{Orange}{2x}-\color{LimeGreen}{1}</syntaxhighlight>
| only works with MathJax
|}
 
Some color names are predeclared according to the following table, you can use them directly for the rendering of formulas (or for declaring the intended color of the page background).
 
Color should not be used as the ''only'' way to identify something, because it will become meaningless on black-and-white media or for color-blind people.
 
Latex does not have a command for setting the background color. The most effective way of setting a background color is by setting a CSS styling rule for a table cell:
<pre style="display: inline-block;">
{| class="wikitable" align="center"
| style="background-color: gray;" | <math>x^2</math>
| style="background-color: Goldenrod;" | <math>y^3</math>
|}
</pre>
 
Rendered as:
{| class="wikitable" align="center"
| style="background-color: gray;" | <math>x^2</math>
| style="background-color: Goldenrod;" | <math>y^3</math>
|}
 
Custom colors can be defined using:
<!--T:73-->
<syntaxhighlight lang="latex">\definecolor{myorange}{rgb}{1,0.65,0.4}\color{myorange}e^{i \pi}\color{Black} + 1 = 0</syntaxhighlight>
See here for [http://oregonstate.edu/%7Epeterseb/tex/samples/docs/color-package-demo.pdf all named colors] supported by LaTeX.
 
:<math>\definecolor{myorange}{rgb}{1,0.65,0.4}\color{myorange}e^{i \pi}\color{Black} + 1 = 0</math>
<!--T:74-->
Note that color should not be used as the ''only'' way to identify something, because it will become meaningless on black-and-white media or for color-blind people. See [[en:Wikipedia:Manual of Style#Color coding]].
 
== Formatting issues == <!--T:75-->
Line 1,433 ⟶ 1,464:
<!--T:82-->
Also note that if you rely on this workaround, if/when the rendering on the server gets fixed in future releases, as a result of this extra manual offset your formulae will suddenly be aligned incorrectly. So use it sparingly, if at all.
 
== Commutative diagrams == <!--T:83-->
To make a [[en:Commutative diagram|commutative diagram]], there are three steps:
* Write the diagram in [[en:TeX|TeX]]
* Convert to [[en:SVG|SVG]]
* [[commons:Commons:First steps/Upload form|Upload the file]] to [[commons:|Wikimedia Commons]]
 
=== Diagrams in {{TeX}} === <!--T:84-->
[http://www.tug.org/applications/Xy-pic/ Xy-pic] ([http://tex.loria.fr/graph-pack/doc-xypic/xyguide-html/xyguide-html.html online manual]) is the most powerful and general-purpose diagram package in [[Help:Displaying a formula|TeX]].
 
<!--T:85-->
Simpler packages include:
* [[en:American Mathematical Society|AMS]]'s [http://www.dante.de/CTAN//help/Catalogue/entries/amscd.html amscd]
* Paul Taylor's [http://www.ctan.org/tex-archive/macros/generic/diagrams/taylor/ diagrams]
* François Borceux [http://www.ctan.org/tex-archive/help/Catalogue/entries/borceux.html Diagrams]
 
<!--T:86-->
The following is a template for Xy-pic, together with a [[en:Hack (technology)|hack]] to increase the [[en:Margin (typography)|margins]] in [[en:dvips|dvips]], so that the diagram is not truncated by over-eager cropping
(suggested in [[en:TUGboat|TUGboat]] [http://www.tug.org/TUGboat/Articles/tb17-3/tb52rahtz.pdf TUGboat, Volume 17 1996, No. 3]):
<pre>
\documentclass{amsart}
\usepackage[all, ps]{xy} % Loading the XY-Pic package
% Using postscript driver for smoother curves
\usepackage{color} % For invisible frame
\begin{document}
\thispagestyle{empty} % No page numbers
\SelectTips{eu}{} % Euler arrowheads (tips)
\setlength{\fboxsep}{0pt} % Frame box margin
{\color{white}\framebox{{\color{black}$$ % Frame for margin
 
<!--T:87-->
\xymatrix{ % The diagram is a 3x3 matrix
%%% Diagram goes here %%%
}
 
<!--T:88-->
$$}}} % end math, end frame
\end{document}
</pre>
 
=== Convert to SVG === <!--T:89-->
Once you have produced your diagram in LaTeX (or {{TeX}}), you can convert it to an SVG file using the following sequence of commands:
 
<!--T:90-->
<pre>
pdflatex file.tex
pdfcrop --clip file.pdf tmp.pdf
pdf2svg tmp.pdf file.svg
(rm tmp.pdf at the end)
</pre>
pdflatex and the [http://pdfcrop.sourceforge.net pdfcrop] and [http://www.cityinthesky.co.uk/pdf2svg.html pdf2svg] utilities are needed for this procedure.
 
<!--T:91-->
If you do not have these programs, you can also use the commands
 
<!--T:92-->
<pre>
latex file.tex
dvipdfm file.dvi
</pre>
 
<!--T:93-->
to get a PDF version of your diagram.
 
==== Programs ==== <!--T:94-->
In general, you will not be able to get anywhere with diagrams without {{TeX}} and Ghostscript, and the <code>inkscape</code> program is a useful tool for creating or modifying your diagrams by hand. There is also a utility <code>pstoedit</code> which supports direct conversion from Postscript files to many vector graphics formats, but it requires a non-free plugin to convert to SVG, and regardless of the format, [[w:user:Ryan Reich|this editor]] has not been successful in using it to convert diagrams with diagonal arrows from {{TeX}}-created files.
 
<!--T:95-->
These programs are:
* a working {{TeX}} distribution, such as [[en:TeX Live|TeX Live]]
* [[en:Ghostscript|Ghostscript]]
* [[en:pstoedit|pstoedit]]
* [[en:Inkscape|Inkscape]]
 
=== Upload the file ===
See Also: [[commons:Commons:First steps/Upload form]]
See Also: [[en:Help:Contents/Images and media]]
 
As the diagram is your own work, upload it to [[commons:|Wikimedia Commons]], so that all projects (notably, all languages) can use it without having to copy it to their language's Wiki. (If you've previously uploaded a file to somewhere other than Commons, [[en:Wikipedia:Moving images to the Commons|transwiki it]] to Commons.)
 
 
;Check size: Before uploading, check that the default size of the image is neither too large nor too small by opening in an [[SVG#Support in applications|SVG application]] and viewing at default size (100% scaling), otherwise adjust the <tt>-y</tt> option to <tt>dvips</tt>.
;Name: Make sure the file has a [[en:Wikipedia:Naming_conventions|meaningful name]].
;Upload: [[commons:Special:Userlogin|Login to Wikimedia Commons]], then <span class="plainlinks">[http://commons.wikimedia.org/w/index.php?title=Special:Upload&uselang=ownwork upload the file]</span>; for the '''Summary''', give a brief description.
Now go to the [[en:Help:Image page|image page]] and add a [[commons:Commons:First steps/Quality and description#Good file descriptions|description]], including the '''source code''', using this template (using <tt>{{[[commons:Template:Information|Information]]}}</tt>):
 
 
<nowiki>{{</nowiki>Information
|Description =
<nowiki>{{</nowiki>en| '''Description <nowiki>[[</nowiki>:en:Link to WP page|topic]]'''
}}
|Source = <nowiki>{{</nowiki>own}}
 
 
Created as per:
<nowiki>[[</nowiki>:en:meta:Help:Displaying a formula#Commutative diagrams]]; source code below.
|Date = '''The Creation Date, like 1999-12-31'''
|Author = '''<nowiki>[[</nowiki>User:YourUserName|Your Real Name]]'''
|Permission = Public domain; '''(or [[commons:Licensing#Well-known_licenses|other license]])''' see below.
}}
== LaTeX source ==
&lt;source lang="latex">
'''% LaTeX source here'''
&lt;/source>
== <nowiki>[[</nowiki>Commons:Copyright tags|Licensing]]: ==
<nowiki>{{</nowiki>self|PD-self '''(or [[commons:Licensing#Well-known_licenses|other license]])'''|author='''<nowiki>[[</nowiki>User:YourUserName|Your Real Name]]'''}}
<nowiki>[[</nowiki>Category:'''Descriptive categories, such as "Group theory"''']]
<nowiki>[[</nowiki>Category:Commutative diagrams]]
 
 
;Source code:
* Include the source code in the [[en:Help:Image page|image page]], in a <tt>LaTeX source</tt> section, so that the diagram can be edited in future.
* Include the complete <tt>.tex</tt> file, not just the fragment, so future editors do not need to reconstruct a compilable file.
;License: The most common license for commutative diagrams is <tt>[[commons:Template:PD-self|PD-self]]</tt>; some use <tt>[[commons:Template:PD-ineligible|PD-ineligible]]</tt>, especially for simple diagrams, or other licenses. Please ''do not'' use the [http://www.gnu.org/copyleft/fdl.html GFDL], as it requires the entire text of the GFDL to be attached to any document that uses the diagram.
;Description: If possible, link to a Wikipedia page relevant to the diagram.
;Category: Include <tt><nowiki>[[Category:Commutative diagrams]]</nowiki></tt>, so that it appears in [[commons:Category:Commutative diagrams]]. There are also subcategories, which you may choose to use.
;Include image: Now include the image on the original page via <tt><nowiki>[[Image:Diagram.svg]]</nowiki></tt>
 
=== Examples ===
A sample conforming diagram is [[commons:Image:PSU-PU.svg]].
 
==Chemistry==
Line 1,690 ⟶ 1,598:
<math chem><-></math></nowiki>|<math>\longleftrightarrow</math><br/><math chem><-></math>
}}
 
== Examples ==
 
 
<center>
 
=== Chemistry ===
<nowiki><math chem>C6H5-CHO</math></nowiki>
<math chem>C6H5-CHO</math>
 
<nowiki><math chem>{SO4^{2-}} + Ba^2+ -> BaSO4 v</math></nowiki>
<math chem>{SO4^{2-}} + Ba^2+ -> BaSO4 v</math>
 
<nowiki><math chem>H2O</math></nowiki>
<math chem>H2O</math>
 
<nowiki><math chem>Sb2O3</math></nowiki>
<math chem>Sb2O3</math>
 
<nowiki><math chem>H+</math></nowiki>
<math chem>H+</math>
 
<nowiki><math chem>CrO4^2-</math></nowiki>
<math chem>CrO4^2-</math>
 
<nowiki><math chem>AgCl2-</math></nowiki>
<math chem>AgCl2-</math>
 
<nowiki><math chem>[AgCl2]-</math></nowiki>
<math chem>[AgCl2]-</math>
 
<nowiki><math chem>Y^{99}+</math></nowiki>
<math chem>Y^{99}+</math>
 
<nowiki><math chem>Y^{99+}</math></nowiki>
<math chem>Y^{99+}</math>
 
<nowiki><math chem>H2_{(aq)}</math></nowiki>
<math chem>H2_{(aq)}</math>
 
<nowiki><math chem>NO3-</math></nowiki>
<math chem>NO3-</math>
 
<nowiki><math chem>(NH4)2S</math></nowiki>
<math chem>(NH4)2S</math>
 
==Examples of implemented TeX formulas==
Line 1,885 ⟶ 1,748:
}}
 
==See alsoReferences ==
{{Reflist}}
*[[w:Wikipedia:How to write a Wikipedia article on Mathematics#Typesetting_of_mathematical_formulas|Typesetting of mathematical formulas]]
*[[mw:Extension:Score|Score]] — extension for music markup
*[[w:Table of mathematical symbols|Table of mathematical symbols]]
*[[mw:Extension:Blahtex]], or [[w:Wikipedia talk:WikiProject Mathematics/Archive10#blahtex: a LaTeX to MathML converter|blahtex: a LaTeX to MathML converter for Wikipedia]]
*[[Help:Editing|General help]] for editing a Wiki page
 
== External links ==
*[http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ A LaTeX tutorial].
*A [http://www.ctan.org/tex-archive/info/gentle/gentle.pdf paper introducing {{TeX}}]—see page 39 onwards for a good introduction to the maths side of things.
*A [http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf paper introducing LaTeX]—skip to page 49 for the math section. See page 63 for a complete reference list of symbols included in LaTeX and AMS-LaTeX.
*[http://tug.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf The Comprehensive LaTeX Symbol List].
*[http://www.ams.org/tex/amslatex.html AMS-LaTeX guide].
*[http://us.metamath.org/symbols/symbols.html A set of public domain fixed-size math symbol bitmaps].
*[[w:MathML|MathML]]: A product of the [[w:W3C|W3C]] [http://www.w3.org/Math/ Math working group], is a low-level specification for describing mathematics as a basis for machine to machine communication.