Difference between revisions of "Template:ComplexNuclide"

From blackwiki
Jump to navigation Jump to search
imported>SkyLined
(Added default value calculation for neutrons and mass number using Template:NeutronsForElement)
imported>SkyLined
(Added "link" argument, moved documentation to Template:nuclide, put link to that page instead)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template returns a representation of the nuclide to be used in formulae, showing the mass number and the number of protons and neutrons.
+
See [[Template:Nuclide]] for documentation.
The template is to be used for nuclides with any atomic number < 1000. Template takes two arguments: the nuclide's element name and its mass number. If the mass number is not supplied, the most common isotope is used and the value is calculated using [[Template:ProtonsForElement]] and [[Template:NeutronsForElement]].
+
</noinclude><includeonly>{{#ifeq: {{lc:{{{1|}}}}} | link
 
+
|[[{{{2}}}-{{{3|{{#expr:{{NeutronsForElement|{{{2}}}}}+{{ProtonsForElement|{{{2}}}}}}}}}}|<sup>{{{3|{{#expr:{{NeutronsForElement|{{{2}}}}}+{{ProtonsForElement|{{{2}}}}}}}}}}</sup><sub style="margin-left:-{{#ifexpr:{{ProtonsForElement|{{{2}}}}}>99|3|{{#ifexpr:{{ProtonsForElement|{{{2}}}}}>9|2|1}}}}ex;">{{ProtonsForElement|{{{2}}}}}</sub>{{SymbolForElement|{{{2}}}}}<sub>{{#expr:{{{3|{{#expr:{{NeutronsForElement|{{{2}}}}}+{{ProtonsForElement|{{{2}}}}}}}}}}-{{ProtonsForElement|{{{2}}}}}}}</sub>]]
==Example==
+
|<sup>{{{2|{{#expr:{{NeutronsForElement|{{{1}}}}}+{{ProtonsForElement|{{{1}}}}}}}}}}</sup><sub style="margin-left:-{{#ifexpr:{{ProtonsForElement|{{{1}}}}}>99|3|{{#ifexpr:{{ProtonsForElement|{{{1}}}}}>9|2|1}}}}ex;">{{ProtonsForElement|{{{1}}}}}</sub>{{SymbolForElement|{{{1}}}}}<sub>{{#expr:{{{2|{{#expr:{{NeutronsForElement|{{{1}}}}}+{{ProtonsForElement|{{{1}}}}}}}}}}-{{ProtonsForElement|{{{1}}}}}}}</sub>
<code><nowiki>{{ComplexNuclide|Carbon}}</nowiki></code> will produce {{ComplexNuclide|Carbon}}
+
}}</includeonly>
 
 
<code><nowiki>{{ComplexNuclide|Carbon|14}}</nowiki></code> will produce {{ComplexNuclide|Carbon|14}}
 
 
 
==Relates Nuclide Templates==
 
{| border = 0
 
|- style="height:2em;"
 
| [[Template:SimpleNuclide]] || {{SimpleNuclide|Carbon|14}}
 
|- style="height:2em;"
 
| [[Template:SimpleNuclideLink]] || {{SimpleNuclideLink|Carbon|14}}
 
|- style="height:2em;"
 
| [[Template:Nuclide]] || {{Nuclide|Carbon|14}}
 
|- style="height:2em;"
 
| [[Template:NuclideLink]] || {{NuclideLink|Carbon|14}}
 
|- style="height:2em;"
 
| [[Template:ComplexNuclide]] || {{ComplexNuclide|Carbon|14}}
 
|- style="height:2em;"
 
| [[Template:ComplexNuclideLink]] || {{ComplexNuclideLink|Carbon|14}}
 
|}
 
 
 
==See Also==
 
* [[Template:SymbolForElement]] - Template that returns the symbol for the given element name.
 
* [[Template:ProtonsForElement]] - Template that returns the number of protons for the given element name.
 
* [[Template:NeutronsForElement]] - Template that returns the number of neutrons in the most common isotope for the given element name.
 
 
 
</noinclude><includeonly><sup>{{{2|{{#expr:{{NeutronsForElement|{{{1}}}}}+{{ProtonsForElement|{{{1}}}}}}}}}}</sup><sub style="margin-left:-{{#ifexpr:{{ProtonsForElement|{{{1}}}}}>99|3|{{#ifexpr:{{ProtonsForElement|{{{1}}}}}>9|2|1}}}}ex;">{{ProtonsForElement|{{{1}}}}}</sub>{{SymbolForElement|{{{1}}}}}<sub>{{#expr:{{{2|{{#expr:{{NeutronsForElement|{{{1}}}}}+{{ProtonsForElement|{{{1}}}}}}}}}}-{{ProtonsForElement|{{{1}}}}}}}</sub></includeonly>
 

Revision as of 00:56, 16 March 2008

See Template:Nuclide for documentation.