使用方法/chem:修订间差异
来自康健生活
< 使用方法
| 第136行: | 第136行: | ||
===Reaction arrows=== | ===Reaction arrows=== | ||
{ | {| class="wikitable" | ||
|- | |||
|<nowiki><chem>A ->B</chem></nowiki> | |<nowiki><chem>A ->B</chem></nowiki> | ||
|<chem>A -> B</chem> | |<chem>A -> B</chem> | ||
|- | |||
|<nowiki><chem>A <- B</chem></nowiki> | |<nowiki><chem>A <- B</chem></nowiki> | ||
|<chem>A <- B</chem> | |<chem>A <- B</chem> | ||
|- | |||
|<nowiki><chem>A <=> B</chem></nowiki> | |<nowiki><chem>A <=> B</chem></nowiki> | ||
|<chem>A <=> B</chem> | |<chem>A <=> B</chem> | ||
|- | |||
|<nowiki><chem>A <=>> B</chem></nowiki> | |<nowiki><chem>A <=>> B</chem></nowiki> | ||
|<chem>A <=>> B</chem> | |<chem>A <=>> B</chem> | ||
|- | |||
|<nowiki><chem>A <<=> B</chem></nowiki> | |<nowiki><chem>A <<=> B</chem></nowiki> | ||
|<chem>A <<=> B</chem> | |<chem>A <<=> B</chem> | ||
|- | |||
|<syntaxhighlight lang="latex" inline><chem>A ->[{}\atop x] B</chem></syntaxhighlight> | |<syntaxhighlight lang="latex" inline><chem>A ->[{}\atop x] B</chem></syntaxhighlight> | ||
|<chem>A ->[{}\atop x] B</chem> | |<chem>A ->[{}\atop x] B</chem> | ||
|- | |||
|<syntaxhighlight lang="latex" inline><chem>A ->[\text{text above}][\text{text below}] B</chem></syntaxhighlight> | |<syntaxhighlight lang="latex" inline><chem>A ->[\text{text above}][\text{text below}] B</chem></syntaxhighlight> | ||
|<chem>A ->[\text{text above}][\text{text below}] B</chem> | |<chem>A ->[\text{text above}][\text{text below}] B</chem> | ||
|- | |||
|<syntaxhighlight lang="latex" inline><chem>A ->[{}\atop\ce{+H2O}] B</chem></syntaxhighlight> | |<syntaxhighlight lang="latex" inline><chem>A ->[{}\atop\ce{+H2O}] B</chem></syntaxhighlight> | ||
|<chem>A ->[{}\atop\ce{+H2O}] B</chem> | |<chem>A ->[{}\atop\ce{+H2O}] B</chem> | ||
|} | |||
==== Comparison of arrow symbols ==== | ==== Comparison of arrow symbols ==== | ||
{ | |||
|<nowiki><math>\rightarrow</math></nowiki>|<math>\rightarrow</math> | {| class="wikitable" | ||
|<nowiki><math>\rightleftarrows</math></nowiki>|<math>\rightleftarrows</math> | |- | ||
|<nowiki><math>\rightleftharpoons</math></nowiki>|<math>\rightleftharpoons</math> | |<nowiki><math>\rightarrow</math></nowiki> | ||
|<nowiki><math>\leftrightarrow</math></nowiki>|<math>\leftrightarrow</math> | |<math>\rightarrow</math> | ||
|- | |||
|<nowiki><math>\rightleftarrows</math></nowiki> | |||
|<math>\rightleftarrows</math> | |||
|- | |||
|<nowiki><math>\rightleftharpoons</math></nowiki> | |||
|<math>\rightleftharpoons</math> | |||
|- | |||
|<nowiki><math>\leftrightarrow</math></nowiki> | |||
|<math>\leftrightarrow</math> | |||
|- | |||
|<nowiki><math>\longrightarrow</math> | |<nowiki><math>\longrightarrow</math> | ||
<chem>-></chem></nowiki>|<math>\longrightarrow</math><br/><chem>-></chem> | <chem>-></chem></nowiki> | ||
|<math>\longrightarrow</math><br/><chem>-></chem> | |||
|- | |||
|<nowiki><math>\rightleftharpoons</math></nowiki> | |<nowiki><math>\rightleftharpoons</math></nowiki> | ||
<nowiki><chem><=></chem></nowiki>|<math>\rightleftharpoons</math><br/><chem><=></chem> | <nowiki><chem><=></chem></nowiki> | ||
|<math>\rightleftharpoons</math><br/><chem><=></chem> | |||
|- | |||
|<nowiki><math>\longleftrightarrow</math> | |<nowiki><math>\longleftrightarrow</math> | ||
<chem><-></chem></nowiki>|<math>\longleftrightarrow</math><br/><chem><-></chem> | <chem><-></chem></nowiki> | ||
|<math>\longleftrightarrow</math><br/><chem><-></chem> | |||
|} | |||
===Further examples using ordinary LaTeX tags=== | ===Further examples using ordinary LaTeX tags=== | ||
2020年2月20日 (四) 15:03的版本
有关显示化学符号的MediaWiki 解析器扩展标签 <ce>(重命名为<chem>),显示公式 Chemistry”。
Chemistry
有三种方式呈现在使用的化学式和化学方程式:
- <chem>...</chem>(是已弃用的别名)<ce>...</ce>
- <math chem>...</math>
- {{chem}} 和 {{chem2}},需要模板支持
Molecular and condensed formula
| mhchem | Equivalent HTML | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Bonds
| Markup | Renders as |
|---|---|
| <chem>C6H5-CHO</chem> | |
| <chem>A-B=C#D</chem> |
Charges
| <chem>H+</chem> | |
| <chem>NO3-</chem> | |
| <chem>CrO4^2-</chem> | |
| <chem>AgCl2-</chem> | |
| <chem>[AgCl2]-</chem> | |
| <chem>Y^99+</chem> | |
| <chem>Y^{99+}+</chem> |
Addition compounds and stoichiometric numbers
| <chem>MgSO4.7H2O</chem> | |
| <chem>KCr(SO4)2*12H2O</chem> | |
| <chem>CaSO4.1/2H2O + 1\!1/2 H2O -> CaSO4.2H2O</chem> | |
| <chem>25/2 O2 + C8H18 -> 8 CO2 + 9 H2O</chem> |
Wiki linking
(Italic) Math
| <chem>{C_\mathit{x}H_\mathit{y}} + \mathit{z}O2 -> {\mathit{x}CO2} + \frac{\mathit{y}}{2}H2O</chem> |
Oxidation states
| <chem>Fe^{II}Fe^{III}2O4</chem> |
Greek characters
| <chem>\mu-Cl</chem> | |
| <chem>[Fe(\eta^5-C5H5)2]</chem> |
Isotopes
| <chem>^{227}_{90}Th+</chem> | |
| <chem>^0_{-1}n-</chem> |
States
States subscripting is not IUPAC recommendation.
| <chem>H2_{(aq)}</chem> | |
| <chem>CO3^{2-}(aq)</chem> |
Precipitate
| <chem>Ba^2+ + SO4^{2-} -> BaSO4(v)</chem> |
Reaction arrows
| <chem>A ->B</chem> | |
| <chem>A <- B</chem> | |
| <chem>A <=> B</chem> | |
| <chem>A <=>> B</chem> | |
| <chem>A <<=> B</chem> | |
<chem>A ->[{}\atop x] B</chem>
|
|
<chem>A ->[\text{text above}][\text{text below}] B</chem>
|
|
<chem>A ->[{}\atop\ce{+H2O}] B</chem>
|
Comparison of arrow symbols
| <math>\rightarrow</math> | |
| <math>\rightleftarrows</math> | |
| <math>\rightleftharpoons</math> | |
| <math>\leftrightarrow</math> | |
| <math>\longrightarrow</math> <chem>-></chem> | |
| <math>\rightleftharpoons</math>
<chem><=></chem> |
|
| <math>\longleftrightarrow</math> <chem><-></chem> |
Further examples using ordinary LaTeX tags
<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. 模板:-
No categories