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}

\begin{document}
\ce{K_a \times K_b = K_w}
\end{document}

enter image description here

In \ce{} all text is supposed to be regularized. See how the K_a is regularized but then the K_b is italicised and the ensuing K_w is again subject to \ce's regularization. Why does this interruption in formatting happen? I mean, it probably has to do with the \times, but then why does italicised formatting resume after that?

share|improve this question
    
Equilibrium constants are not chemical symbols but normal mathematical variables. The should simply be typeset as such, i.e., in math mode and in italics $K_a \times K_b = K_w$. For reference see page 58 of IUPAC Green Book (third edition). –  cgnieder May 24 '13 at 20:27

2 Answers 2

up vote 5 down vote accepted

Not sure why it happened, but you can fix it by placing the \times around in a $..$.

\documentclass[12pt,a4paper]{article}
\usepackage[version=3]{mhchem}

\begin{document}
\ce{K_a \times K_b = K_w}

\ce{K_a ${}\times{}$ K_b = K_w}
\end{document}

enter image description here

To keep the proper math spacing I added {} to make the times a binary operator. Alternatively you could use \ce{K_a \mathbin{\times} K_b = K_w}, but I prefer the {}.

share|improve this answer
3  
It's documented (See page 8 of the documentation). –  Gonzalo Medina Oct 1 '11 at 0:17
    
Um, about the {} to make the times a binary operator, I'm not sure I understand. Can you please explain? –  ptrcao Oct 1 '11 at 0:30
1  
Binary operator in the math sense. Best to have a look at the difference spacing between the times symbols in $A \times B$ and $\times B$. Or, try taking out the {} in the solution and see what happens. If this still is not clear, perhaps you should post a question. –  Peter Grill Oct 1 '11 at 0:52

You could simply enclose \times in braces:

\documentclass[12pt,a4paper]{article}
\usepackage[version=3]{mhchem}
\begin{document}
\ce{K_a {\times} K_b = K_w}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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