Template:Format ion formula/doc

Usage
Result:

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.