2 书写化学反应式
If you are configuring MathJax yourself, see this JS Bin and the MathJax documentation and the extension page.
使用 mhchem 工具渲染漂亮的化学反应式。这个工具有 MathJax 扩展,需要额外载入。
format:
html:
theme: cosmo
include-after-body:
- text: |
<script src="path/to/tex-mml-chtml.js"></script>在使用时,使用 \ce{} 来调用。
2.1 分子式
参见下面的例子:
\(\ce{H2O}\):$\ce{H2O}$;
\(\ce{Sb2O3}\):$\ce{Sb2O3}$
2.2 电荷
\(\ce{H+}\)
\(\ce{CrO4^2-}\)
\(\ce{[AgCl2]-}\)
\(\ce{Y^99+}\)
\(\ce{Y^{99+}}\)
$\ce{H+}$
$\ce{CrO4^2-}$
$\ce{[AgCl2]-}$
$\ce{Y^99+}$
$\ce{Y^{99+}}$2.3 化学方程式
\(\ce{CO2 + C -> 2 CO}\)
$\ce{CO2 + C -> 2 CO}$
\(\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}\)
$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$
\(C_p[\ce{H2O(l)}] = \pu{75.3 J // mol K}\)
C_p[\ce{H2O(l)}] = \pu{75.3 J // mol K}
see: https://tex.stackexchange.com/questions/405579/how-to-use-mathjax-mhchem-pu-command-in-latex
2.4 同位素
\(\ce{^{227}_{90}Th+}\)
\(\ce{^227_90Th+}\)
\(\ce{^{0}_{-1}n^{-}}\)
\(\ce{^0_-1n-}\)
$\ce{^{227}_{90}Th+}$
$\ce{^227_90Th+}$
$\ce{^{0}_{-1}n^{-}}$
$\ce{^0_-1n-}$2.5 反应箭头
\(\ce{A -> B}\)
\(\ce{A <- B}\)
\(\ce{A <--> B}\)
\(\ce{A <=> B}\)
$\ce{A -> B}$
$\ce{A <- B}$
$\ce{A <--> B}$
$\ce{A <=> B}$\(\ce{A ->[{text above}][{text below}] B}\)
$\ce{A ->[{text above}][{text below}] B}$