Difference between revisions of "Template:Chemical formula"
imported>Waldyrious (forked and formatted from {{Template:Drugbox}}) |
imported>Waldyrious (+iron and other fixes) |
||
| Line 1: | Line 1: | ||
| − | {{#if:{{{C|}}}{{{H|}}}{{{O|}}}{{{N|}}}{{{S|}}} |<!-- | + | {{#if:{{{C|}}}{{{H|}}}{{{O|}}}{{{N|}}}{{{S|}}}1 |<!-- |
-->{{OrganicBox_{{#if:{{{C|}}} |atom }} | -->{{OrganicBox_{{#if:{{{C|}}} |atom }} | ||
| atom_name={{#if:{{{C|}}} |Carbon }} | | atom_name={{#if:{{{C|}}} |Carbon }} | ||
| Line 27: | Line 27: | ||
| atom_name={{#if:{{{Au|}}} |Gold}} | | atom_name={{#if:{{{Au|}}} |Gold}} | ||
| atom_color=rgb(127,84,0) | | atom_color=rgb(127,84,0) | ||
| − | | atom_abb=Au| atom_number={{{Au}}} | + | | atom_abb=Au |
| + | | atom_number={{{Au}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{B|}}} |atom }} | -->{{OrganicBox_{{#if:{{{B|}}} |atom }} | ||
| Line 56: | Line 57: | ||
| atom_name={{#if:{{{Co|}}} |Cobalt }} | | atom_name={{#if:{{{Co|}}} |Cobalt }} | ||
| atom_color=rgb(53,59,90) | | atom_color=rgb(53,59,90) | ||
| − | | atom_abb=Co | + | | atom_abb=Co |
| atom_number={{{Co}}} |var1= }}<!-- | | atom_number={{{Co}}} |var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{F|}}} |atom }} | -->{{OrganicBox_{{#if:{{{F|}}} |atom }} | ||
| atom_name={{#if:{{{F|}}} |Fluorine}} | | atom_name={{#if:{{{F|}}} |Fluorine}} | ||
| atom_color=rgb(66,98,98) | | atom_color=rgb(66,98,98) | ||
| − | | atom_abb=F | + | | atom_abb=F |
| atom_number={{{F}}} | | atom_number={{{F}}} | ||
| + | | var1= }}<!-- | ||
| + | -->{{OrganicBox_{{#if:{{{Fe|}}} |atom }} | ||
| + | | atom_name={{#if:{{{Fe|}}} |Iron}} | ||
| + | | atom_color= | ||
| + | | atom_abb=Fe | ||
| + | | atom_number={{{Fe}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{Gd|}}} |atom }} | -->{{OrganicBox_{{#if:{{{Gd|}}} |atom }} | ||
| atom_name={{#if:{{{Gd|}}} |Gadolinium}} | | atom_name={{#if:{{{Gd|}}} |Gadolinium}} | ||
| atom_color=rgb(64,0,64) | | atom_color=rgb(64,0,64) | ||
| − | | atom_abb=Gd | + | | atom_abb=Gd |
| atom_number={{{Gd}}} | | atom_number={{{Gd}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
| Line 73: | Line 80: | ||
| atom_name={{#if:{{{I|}}} |Iodine}} | | atom_name={{#if:{{{I|}}} |Iodine}} | ||
| atom_color=rgb(74,11,74) | | atom_color=rgb(74,11,74) | ||
| − | | atom_abb=I | + | | atom_abb=I |
| atom_number={{{I}}} |var1= }}<!-- | | atom_number={{{I}}} |var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{K|}}} |atom }} | -->{{OrganicBox_{{#if:{{{K|}}} |atom }} | ||
| atom_name={{#if:{{{K|}}} |Potassium}} | | atom_name={{#if:{{{K|}}} |Potassium}} | ||
| atom_color=rgb(72,32,106) | | atom_color=rgb(72,32,106) | ||
| − | | atom_abb=K | + | | atom_abb=K |
| atom_number={{{K}}} |var1= }}<!-- | | atom_number={{{K}}} |var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{Mn|}}} |atom }} | -->{{OrganicBox_{{#if:{{{Mn|}}} |atom }} | ||
| atom_name={{#if:{{{Mn|}}} |Manganese}} | | atom_name={{#if:{{{Mn|}}} |Manganese}} | ||
| atom_color=rgb(78,21,99) | | atom_color=rgb(78,21,99) | ||
| − | | atom_abb=Mn | + | | atom_abb=Mn |
| atom_number={{{Mn}}} | | atom_number={{{Mn}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
| Line 89: | Line 96: | ||
| atom_name={{#if:{{{N|}}} |Nitrogen }} | | atom_name={{#if:{{{N|}}} |Nitrogen }} | ||
| atom_color=rgb(0,0,128) | | atom_color=rgb(0,0,128) | ||
| − | | atom_abb=N | + | | atom_abb=N |
| atom_number={{{N}}} | | atom_number={{{N}}} | ||
|var1= }}<!-- | |var1= }}<!-- | ||
| Line 101: | Line 108: | ||
| atom_name={{#if:{{{O|}}} |Oxygen}} | | atom_name={{#if:{{{O|}}} |Oxygen}} | ||
| atom_color=rgb(116,35,35) | | atom_color=rgb(116,35,35) | ||
| − | | atom_abb=O | + | | atom_abb=O |
| atom_number={{{O}}} | | atom_number={{{O}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
| Line 107: | Line 114: | ||
| atom_name={{#if:{{{P|}}} |Phosphorus}} | | atom_name={{#if:{{{P|}}} |Phosphorus}} | ||
| atom_color=rgb(127,63,0) | | atom_color=rgb(127,63,0) | ||
| − | | atom_abb=P | + | | atom_abb=P |
| atom_number={{{P}}} | | atom_number={{{P}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
| Line 113: | Line 120: | ||
| atom_name={{#if:{{{Pt|}}} |Platinum}} | | atom_name={{#if:{{{Pt|}}} |Platinum}} | ||
| atom_color=rgb(21,53,79) | | atom_color=rgb(21,53,79) | ||
| − | | atom_abb=Pt | + | | atom_abb=Pt |
| atom_number={{{Pt}}} |var1= }}<!-- | | atom_number={{{Pt}}} |var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{S|}}} |atom }} | -->{{OrganicBox_{{#if:{{{S|}}} |atom }} | ||
| atom_name={{#if:{{{S|}}} |Sulfur}} | | atom_name={{#if:{{{S|}}} |Sulfur}} | ||
| atom_color=rgb(114,97,31) | | atom_color=rgb(114,97,31) | ||
| − | | atom_abb=S | + | | atom_abb=S |
| atom_number={{{S}}} | | atom_number={{{S}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
| Line 142: | Line 149: | ||
| atom_name={{#if:{{{Tc|}}} |Technetium}} | | atom_name={{#if:{{{Tc|}}} |Technetium}} | ||
| atom_color=rgb(30,79,84) | | atom_color=rgb(30,79,84) | ||
| − | | atom_abb=Tc| atom_number={{{Tc}}} | + | | atom_abb=Tc |
| + | | atom_number={{{Tc}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
-->{{OrganicBox_{{#if:{{{Zn|}}} |atom }} | -->{{OrganicBox_{{#if:{{{Zn|}}} |atom }} | ||
| atom_name={{#if:{{{Zn|}}} |Zinc}} | | atom_name={{#if:{{{Zn|}}} |Zinc}} | ||
| atom_color=rgb(54,60,104) | | atom_color=rgb(54,60,104) | ||
| − | | atom_abb=Zn| atom_number={{{Zn}}} | + | | atom_abb=Zn |
| + | | atom_number={{{Zn}}} | ||
| var1= }}<!-- | | var1= }}<!-- | ||
--><sup>{{#if:{{{charge|}}}|{{{charge}}}| }}</sup> | ? }}<noinclude>{{doc}}</noinclude> | --><sup>{{#if:{{{charge|}}}|{{{charge}}}| }}</sup> | ? }}<noinclude>{{doc}}</noinclude> | ||
Revision as of 21:04, 11 May 2010
Template:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBox
Usage
Use the odd parameters for atoms (automatically linked) or miscellaneous text, and the even parameters for number of atoms. For example:
- {{Chemical formula|H|2|O}} produces: Template:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBox
- {{Chemical formula|H|2|S||O|4}} produces: Template:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBox
Some of the miscellaneous text (like common polyatomic anions) are also automatically linked if included in a single parameter. For example:
- {{Chemical formula|H2O}} produces: Template:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBox
- {{Chemical formula|Ca||SO4}} produces: Template:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBoxTemplate:OrganicBox
Here is the full table:
| Type | Symbol[nb 1] | Linked page | Notes |
|---|---|---|---|
| Atomic series | X | Halogen | |
| Atomic series | Ng | Noble gas | |
| Atomic series | Ln | Lanthanide | |
| Atomic series | Nu | Nucleophile | |
| Isotope | D | Deuterium | |
| Isotope | T | Tritium | |
| Molecule | H2O | Properties of water | |
| Molecule | CO2 | Carbon dioxide | |
| Molecule | CH4 | Methane | |
| Molecule | O2 | Dioxygen | |
| Group of a molecule | R | R group | |
| Group of a molecule | Ph | Phenyl group | |
| Group of a molecule | Bn | Benzyl group | |
| Group of a molecule | Bz | Benzoyl group | |
| Group of a molecule | Et | Ethyl group | |
| Group of a molecule | Me | Methyl group | |
| CH3 | |||
| Group of a molecule | NH2 | Amine group | |
| Group of a molecule | OH | Hydroxy group | |
| Group of a molecule | SH | Thiol group | |
| Group of a molecule | SeH | Selenol group | |
| Group of a molecule | Teh | Tellurol group | |
| Group of a molecule | COOH | Carboxyl group | |
| Group of a molecule | Tf | Trifluoromethylsulfonyl group | |
| Anion | CO3 | Carbonate | |
| Anion | PO4 | Phosphate | could theoretically refer to tetrapolonium (Po4), but that is not likely |
| Anion | SO4 | Sulfate | |
| Anion | SO3 | Sulfite | |
| Anion | NO3 | Nitrate | could theoretically refer to triniobium (No3), but that is not likely |
| Anion | PO3 | Phosphite | could theoretically refer to tripolonium (Po3), but that is not likely |
| Anion | ClO4 | Perchlorate | |
| Anion | ClO4 | Chlorate | |
| Anion | ClO4 | Chlorite | |
| Anion | ClO | Hypochlorite | |
| Cation | NH4 | Ammonium | |
| Cation | H3O | Hydronium | |
| Exotic matter | Ps | Positronium | |
| Exotic matter | Pn | Protonium | a bound proton and an anti-proton; the hydrogen isotope is protium |
| Exotic matter | Mu | Muonium |
- ↑ The inputs during usage are all-lowercase, and the numbers are not subscripted.
Template data
TemplateData for Chemical formula
Extended content
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
No description.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See also
- Template:Chem, which allows providing charge, atomic number and mass number, but doesn't automatically link the elements or common formulas
- Template:Chem2, which has same functionality e.g. {{chem2|auto=yes|H2SO4}} gives H
2SO
4
| The above documentation is transcluded from Template:Chemical formula/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. |