Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\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}

gives

(/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*}

What is wrong?

share|improve this question

closed as too localized by Werner, egreg, diabonas, lockstep, Stefan Kottwitz Sep 30 '11 at 19:22

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
this question was closed as too localized, but it actually helped me –  simona Apr 19 '13 at 15:36
add comment

1 Answer 1

up vote 8 down vote accepted

The first \ce is missing a }, while the second one has one too much. So you should have

\begin{align*}
 \ce{PH} &= -\log  \ce{[H+]} \\
 -\ce{PH} &= \log \ce{[H+]} \\
 10^{-\ce{PH}} &= \ce{[H+]} \\
\end{align*}
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.