Template:Chem2
Uses Lua: |
{{chem2}}
{{chem2}} is a template used to format a chemical equation
Use[edit source]
Symbol | Gives | Example | Output |
---|---|---|---|
none | don't link | {{chem2|Na+}} |
Na+ |
\d |
= | {{chem2|CH2\dCH2}} |
CH 2=CH 2 |
none | link | {{chem2|H2OMg|auto=yes}} |
H 2OMg |
\s |
– | {{chem2|[Cl4Re\sReCl4](2−)|}} |
[Cl 4Re–ReCl 4]2− |
\- |
- | ||
\\ |
\ | ||
\' |
'
| ||
\h |
η | ||
\h{1} |
η1− | ||
\m{1} |
μ1− | ||
-> |
→ | {{chem2|2H2 + O2 -> 2H2O}} |
2H 2 + O 2 → 2H 2O |
<-> |
⇌ | ||
* |
· | {{chem2|CoCl2*6H2O}} |
CoCl 2 · 6H2O |
\* |
* | {{chem2|Cp\*2Fe}} |
Cp* 2Fe |
_{} |
{{chem2|CH4_{(g)}|}} * |
CH 4 (g) | |
^{} |
{{chem2|^{13}CH4}} |
13 CH 4 | |
∇ |
∇ | {{chem2|∇}} |
∇ |
^ If the last character of the template input is }
, MediaWiki will confuse it with the end-of-template tag }}
. Adding |
between the two resolves this ambiguity. Other options include instead inserting
(space), {{null}}
or <nowiki/>
.
Formulas (without charge) are just written. Eg.:
{{chem2|CH3(CH2)5CH3}}
gives CH
3(CH
2)
5CH
3
{{chem2|Fe3S2(CO)9}}
gives Fe
3S
2(CO)
9
{{chem2|C_{''n''}H_{2''n''+2}|}}
gives C
nH
2n+2
Charges are written inside parenthesis, otherwise its treated as +1 or −1, e.g.:
{{chem2|Na+}}
gives Na+
{{chem2|O2-}}
gives O−
2
but can be written as {{chem2|O2(-)}}
too.
{{chem2|SO4(2-)}}
gives SO2−
4
{{chem2|S19(2+)}}
gives S2+
19
Chemical equations can be written too. E.g.:
{{chem2|2 S + 3 O2 + 2 H2O -> 2 H2SO4}}
gives 2 S + 3 O
2 + 2 H
2O → 2 H
2SO
4
{{chem2|2S + 3O2 + 2H2O -> 2H2SO4}}
gives 2S + 3O
2 + 2H
2O → 2H
2SO
4
The arrows can be written as ->
or just →
. All characters (and unicode markup) are valid input except \
, = (Mediawiki use it), _
and -
(endash etc.)
{{chem2|2 H2_{(g)} + O2_{(g)} -> 2H2O_{(g)}|}}
gives 2 H
2
(g) + O
2
(g) → 2H
2O
(g)
{{chem2|NH2RCHCO2H <-> NH3+RCHCO2-}}
gives NH
2RCHCO
2H ⇌ NH+
3RCHCO−
2
Hapticity and mu:
{{chem2|W(CO)3(PiPr3)2(\h{2}\-H2)}}
gives W(CO)
3(PiPr
3)
2(η2−-H
2)
Links: Use link=
<wiki page> or ordinary wiki link ([[
and ]]
), e.g.:
{{chem2|link=Iron|FeCl3}}
gives FeCl
3
{{chem2|3[H2 + 2[[nitrogen|N2]] <-> 2[[ammonia|NH3]]}}
gives 3H
2 + 2N
2 ⇌ 2NH
3
Auto links: Automatic link elements: Use auto=
<something> (e.g. yes
):
Examples[edit source]
{{chem2|[Cl4Re\qReCl4](2−)|}}
gives [Cl
4Re≣ReCl
4]2−
{{chem2|[Cl4Re\qReCl4](2-)|}}
gives [Cl
4Re≣ReCl
4]2−
{{chem2|NH2RCHCO2H <-> NH3+RCHCO2−}}
gives NH
2RCHCO
2H ⇌ NH+
3RCHCO−
2
{{chem2|\\hallo}}
gives \hallo
{{chem2|H3CC\tCH <-> H2C\dC\dCH2}}
gives H
3CC≡CH ⇌ H
2C=C=CH
2
{{chem2|4 NH3 + 5 O2 -> 4 NO + 6 H2O}}
gives 4 NH
3 + 5 O
2 → 4 NO + 6 H
2O
- "H2O → H2O" is H
2O → H
2O
- "H2O_{(l)} -> H2O_{(g)}" is H
2O
(l) → H
2O
(g)
- "4 NH3 + 5 O2 → 4 NO + 6 H2O" is 4 NH
3 + 5 O
2 → 4 NO + 6 H
2O
- " 4 NH3 + 5 O2 → 4 NO + 6 H2O" is 4 NH
3 + 5 O
2 → 4 NO + 6 H
2O
- " 4NH3 + 5O2 → 4NO + 6H2O" is 4NH
3 + 5O
2 → 4NO + 6H
2O
- " 2Mn2(+)" is 2Mn+
2
- " 2Mn2(+) + 3H2O" is 2Mn+
2 + 3H
2O
- Mn– is Mn−
- Mn2(2-) is Mn2−
2
- Mn2☃+ is Mn
2☃+
, Mn2(2–) is Mn2−
2
, Mn2(2☃–) is Mn
2(
2☃−
)
- Mn2(+) is Mn+
2
- Mn2+ is Mn+
2
- Mn2(-) is Mn−
2
- Mn2- is Mn−
2
- {{chem2|C_{''n''}H_{2''n'' + 2}|}} gives C
nH
2n + 2
- {{chem2|C_{abc}|}} gives C
abc
- {{chem2|CoCl2*1.5H2O}} gives CoCl
2 · 1.5H2O
- Mn22– is Mn−
22
- Cu2C2*H2O is Cu
2C
2 · H2O
- Special
- {{chem2|[Me2Al(\m{2}Me)]2}} gives [Me
2Al(μ2−Me)]
2
- {{chem2|^{13}CO2}} gives 13
CO
2
- {{chem2|\h{5}(C5H5)2TiCl2}} gives η5−(C
5H
5)
2TiCl
2
- {{chem2|\h{5}\s(C5H5)}} gives η5−–(C
5H
5)
- {{chem2|CH2\dCH2\sCH2\sC\tCH\qMn}} is CH
2=CH
2–CH
2–C≡CH≣Mn
- {{chem2|RC(OR’)3}} gives RC(OR’)
3
- {{chem2|C\\C}} gives C\C
- {{chem2|C2*NH3}} gives C
2 · NH
3
- {{chem2|C2*2NH3}} gives C
2 · 2NH
3
- {{chem2|C1.2H3.5}} gives C
1.2H
3.5
- {{chem2|12|6|C}} is 12
- {{chem2|12|C}} is 12
- {{chem2|CH3\i{13}CH2CH3}} is CH
3CH
2CH
3
- {{chem2|\{\{abc\}\}}} is AbC
- C2(μ\-C) is C
2(μ-C)
- SO4(2-) is SO2−
4
- 2Mn2(2+) is 2Mn2+
2
- CH3-CH2-OH is CH−
3CH−
2OH
- [ZnCl4]- is [ZnCl
4]−
- [ZnCl4](2-) is [ZnCl
4]2−
- Si(OH)4 is Si(OH)
4
- Cu2C2*2H2O is Cu
2C
2 · 2H2O
- CuSO*2H2O is CuSO · 2H2O
- CuSO4*15H2O is CuSO
4 · 15H2O
- CuSO4(H2O)5 is CuSO
4(H
2O)
5
- H+ + OH- → H2O is H+
+ OH−
→ H
2O
- H → O is H → O
- ZxPo4 is ZxPo
4
Unknown element
- ((Na)Cl is ((Na)Cl
To many (
- Si(OH))4 is Si(OH))
4
To many )
- Si&☃Si is Si&☃Si
- CH
2=CH
2
More[edit source]
- {{chem2|Cl2O6|link=dichlorine hexoxide}} is Cl
2O
6
- [Fe(Phen)(Phen)3](2+) is [Fe(Phen)(Phen)
3]2+
- AUTO: [Fe(Phen)(Phen)3](2+) is [[[Iron|Fe]](Phen)(Phen)
3]2+
- {{chem2|[C2O2](2+)}} is [C
2O
2]2+
- {{chem2|link=Tomato|SI4}} is SI
4
- H2SO4+ is H
2SO+
4
- Mn- is Mn−
- Mn22+ is Mn+
22
, Mn22- is Mn−
22
,
- Mn(2+) is Mn2+
- Mn2(+) is Mn+
2
- Mn(22-) is Mn22−
- Mn3(22-) is Mn22−
3
- Mn(22+) is Mn22+
- Mn2(22+) is Mn22+
2
- Mn2(2+) is Mn2+
2
- Mn22(2+) is Mn2+
22
The above documentation is transcluded from Template:Chem2/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
Format chemical symbol or equation
Parameter | Description | Type | Status | |
---|---|---|---|---|
symbol or equation | 1 1 | symbol or equation
| Unknown | required |
link | 2 2 link auto | auto link parts of equation to article
| Unknown | optional |