“!不完整的 \ifx”错误是什么意思?

“!不完整的 \ifx”错误是什么意思?
\documentclass[12pt,a4paper]{article}
\usepackage[version=3]{mhchem}
\usepackage{siunitx}

\begin{document}

\begin{align*}
 \ce{PH &= -\log  \ce{[H+]}} \\
 -\ce{PH} &= \log \ce{[H+]} \\
 10^{-\ce{PH}} &= \ce{[H+]} \\
\end{align*}
\end{document}

给出

(/home/peter/texlive/2011/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviat
ions.cfg)
(/home/peter/texlive/2011/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cf
g)
! Incomplete \ifx; all text was ignored after line 11.
<inserted text> 
                \fi 
l.11 \end{align*}

怎么了?

答案1

第一个\ce缺少},而第二个多了一个。因此您应该

\begin{align*}
 \ce{PH} &= -\log  \ce{[H+]} \\
 -\ce{PH} &= \log \ce{[H+]} \\
 10^{-\ce{PH}} &= \ce{[H+]} \\
\end{align*}

相关内容