有关显示化学符号的MediaWiki 解析器扩展标签 <ce>(重命名为解析失败 (语法错误): {\displaystyle \ce{),显示公式 Chemistry”。 ==Chemistry== <!-- this is linked from [[Template:Xtag]] -->{{shortcut|WP:MATHCHEM}} There are three ways to render chemical sum formulae as used in [[chemical equation]]s: *{{xtag|chem|p}} ({{xtag|ce|p}} is a deprecated alias for it) *{{xtag|math|p|params=chem}} *{{tlx|chem}} and {{tlx|chem2}} {{xtag|chem|p|content=X}} is short for <syntaxhighlight lang="xml" inline><math chem>\ce{X}</math></syntaxhighlight> (where <code>X</code> is a chemical sum formula) Technically, {{xtag|math|params=chem}} is a <code>math</code> tag with the extension <code>mhchem</code> enabled, according to the [http://mathjax.readthedocs.org/en/latest/tex.html#mhchem MathJax documentation]. Note, that the commands <code>\cee</code> and <code>\cf</code> are disabled, because they are marked as deprecated in the [http://www.ctan.org/pkg/mhchem mhchem LaTeX package documentation]. If the formula reaches a certain "complexity", spaces might be ignored (<code><nowiki><chem>A + B}}
</nowiki> might be rendered as if it were <chem>A+B</chem> with a positive charge). In that case, write <chem>A{} + B</chem> (and not <chem>{A} + {B}</chem> as was previously suggested). This will allow auto-cleaning of formulae once the bug will be fixed and/or a newer mhchem version will be used.
Please note that there are still major issues with mhchem support in MediaWiki. Some issue can be solved by enabling the extension using 模板:Xtag and formatting individual items with \ce. For example, 模板:Markup2
Bonds
Charges
Addition compounds and stoichiometric numbers
Wiki linking
(Italic) Math
Oxidation states
Greek characters
Isotopes
States
States subscripting is not IUPAC recommendation.
Reaction arrows
<math chem>\begin{align}
\overbrace{\ce{2Fe3O4}}^{\text{magnetite}} + \ce{1/2 O2 ->}\ &{\color{Brown}\overbrace{\ce{3(\lambda{-}Fe2O3)}}^{\text{maghemite}}}\\
\underbrace{\ce{2Fe3O4}}_{\text{magnetite}} + \ce{1/2 O2 ->}\ &{\color{Red}\underbrace{\ce{3(\alpha{-}Fe2O3)}}_{\text{hematite}}}
\end{align}</math>
To align the equations or color them, use 模板:Xtag and 模板:Code.
模板:-