Difference between revisions of "Template:Format ion formula"

From blackwiki
Jump to navigation Jump to search
imported>Renamed user awfwvowjvwrvnwio
imported>Renamed user awfwvowjvwrvnwio
 
Line 1: Line 1:
{{#ifeq:{{{1|}}}||<span class="error">Invalid syntax.</span>|{{Format molecular formula|{{{1}}}}}<sup>{{#ifeq:{{{2}}}|1+|+|{{#ifeq:{{{2}}}|1-|-|{{{2}}}}}}}</sup>}}<noinclude>
+
{{#ifeq:{{{1|}}}||'''This template requires two unnamed parameters: the molecular formula of the ion and the ion charge.'''|{{Format molecular formula|{{{1}}}}}<sup>{{#ifeq:{{{2}}}|1+|+|{{#ifeq:{{{2}}}|1-|-|{{{2}}}}}}}</sup>}}<noinclude>
  
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 21:18, 30 July 2016

This template requires two unnamed parameters: the molecular formula of the ion and the ion charge.

Template documentation[view] [edit] [history] [purge]

Usage

{{Format ion formula|Na|+}}

Result: Na+

The template takes two unnamed arguments. The first is the molecule representation of the ion (as passed to Format molecular formula), the second is the ion charge.