Template:Chem2/testcases

From blackwiki
< Template:Chem2
Revision as of 12:57, 18 October 2019 by imported>WOSlinker (fix tags)
Jump to navigation Jump to search

from Doc

{{Chems}}
Symbol Gives Example Output
\s {{chem2|CH3\sCH3}} CH
3
−CH
3
\d = {{chem2|CH2\dCH2}} CH
2
=CH
2
\t {{chem2|HC\tCH}} HC≡CH
\q {{chem2|[Cl4Re\qReCl4](2−)|}} [Cl
4
Re≣ReCl
4
]2−
\- -
\\ \
\h η
\h{1} η1-
\m{1} μ1-
-> {{chem2|2H2 + O2 -> 2H2O}} 2H
2
+ O
2
→ 2H
2
O
<->
* · {{chem2|CoCl2*6H2O}} CoCl
2
·6H2O
\* * {{chem2|Cp\*2Fe}} Cp*
2
Fe
_{} {{chem2|CH4_{(g)}|}} * CH
4

(g)
^{} {{chem2|^{13}CH4}} 13
CH
4
&nabla; {{chem2|&nabla;}}

^ 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
    )
    5
    CH
    3
  • {{chem2|Fe3S2(CO)9}} gives Fe
    3
    S
    2
    (CO)
    9
  • {{chem2|C_{''n''}H_{2''n''+2}|}} gives C
    n
    H
    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
    2
    O → 2 H
    2
    SO
    4
  • {{chem2|2S + 3O2 + 2H2O -> 2H2SO4}} gives 2S + 3O
    2
    + 2H
    2
    O → 2H
    2
    SO
    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
    2
    O
    (g)
  • {{chem2|NH2RCHCO2H <-> NH3+RCHCO2-}} gives NH
    2
    RCHCO
    2
    H ⇌ NH+
    3
    RCHCO
    2

Hapticity and mu:

  • {{chem2|W(CO)3(PiPr3)2(\h{2}\-H2)}} gives W(CO)
    3
    (PiPr
    3
    )
    2
    2--H
    2
    )
  • {{chem2|auto=yes|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(III) chloride|FeCl3}} gives FeCl
    3
  • {{chem2|3[[hydrogen|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):

  • {{chem2|auto=yes|CH3CH2CH3CBrFCIClCH3}} gives CH
    3
    CH
    2
    CH
    3
    CBrFCIClCH
    3

All \sandbox

{{Chems\sandbox}}
Symbol Gives Example Output
\s Template:Chem2\sandbox {{chem2\sandbox|CH3\sCH3}} Template:Chem2\sandbox
\d Template:Chem2\sandbox {{chem2\sandbox|CH2\dCH2}} Template:Chem2\sandbox
\t Template:Chem2\sandbox {{chem2\sandbox|HC\tCH}} Template:Chem2\sandbox
\q Template:Chem2\sandbox {{chem2\sandbox|[Cl4Re\qReCl4](2−)|}} Template:Chem2\sandbox
\- Template:Chem2\sandbox
\\ Template:Chem2\sandbox
\h Template:Chem2\sandbox
\h{1} Template:Chem2\sandbox
\m{1} Template:Chem2\sandbox
-> Template:Chem2\sandbox {{chem2\sandbox|2H2 + O2 -> 2H2O}} Template:Chem2\sandbox
<-> Template:Chem2\sandbox
* Template:Chem2\sandbox {{chem2\sandbox|CoCl2*6H2O}} Template:Chem2\sandbox
\* * {{chem2\sandbox|Cp\*2Fe}} Template:Chem2\sandbox
_{} {{chem2\sandbox|CH4_{(g)}|}} * Template:Chem2\sandbox
^{} {{chem2\sandbox|^{13}CH4}} Template:Chem2\sandbox
&nabla; Template:Chem2\sandbox {{chem2\sandbox|&nabla;}} Template:Chem2\sandbox

^ 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.:

Charges are written inside parenthesis, otherwise its treated as +1 or −1, e.g.:

Chemical equations can be written too. E.g.:

The arrows can be written as -> or just . All characters (and unicode markup) are valid input except \, = (Mediawiki use it), _ and - (endash etc.)

Hapticity and mu:

Links: Use link=<wiki page> or ordinary wiki link ([[ and ]]), e.g.:

Auto links: Automatic link elements: Use auto=<something> (e.g. yes):

Examples






Special





More
Examples






Special





More

Line wrapping

Table 1: Incnis Mrsi original post demo
(extended by DMacks)
Incnis
Mrsi's
original
sandbox (nowrap) current live (wraps)
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
CO2−
3
DMacks's
additions
C
6
H
12
O
6
C
6
H
12
O
6
2H
2
+ O
2
→ 2H
2
O
Template:Wbr+heat


Table 2
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
C2H5 OH
CH3 COO
Attention!
It is not {{chem2}},
it is HTML.