# Equation number on wrong line

Hi my equations produce their numbers on the following line as opposed to the same line. Here's an example

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$$I_{3}^{-}(sol) \longleftrightarrow I_{2}(sol)+I^{-}(sol)... Dissociation$$
\end{document}

• Don't use $$...$$ or any other math escaping $...$ inside equation. So just use $$...$$. – Werner Mar 12 '14 at 17:21
• $$...$$ is too much of a good thing, do you want \begin{align} blah \end{align}. If you ware interested in TeX for chemistry try mhchem or chemmacros. – moewe Mar 12 '14 at 17:21
• @NieldeBeaudrap Can you supply an answer? – egreg Apr 5 '14 at 21:40
• @egreg: done (and old comment removed for cleanup). – Niel de Beaudrap Apr 7 '14 at 17:37

(By request, here's my comment posted as an answer. You should be on the lookout for a specialised chemistry package to typeset such equations in a clear and consistent way — the advice in this answer is generic to displayed math in general.)

You only need to use a displayed math environment such as equation or gather, if you want to display a single equation. Also, you should put explanatory text (such as Dissociation inside the argument of a \text command; and labels which are part of the equation (such as (sol) for your ions) should be put inside the argument of a command such as \mathrm.

Example.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$I_{3}^{-}\textrm{(sol)} \longleftrightarrow I_{2}\textrm{(sol)}+I^{-}\textrm{(sol)} \qquad \text{\ldots Dissociation}$$
\end{document}


$$I_{3}^{-}(sol) \longleftrightarrow I_{2}(sol)+I^{-}(sol)... Dissociation$$


Like that

clean pretty awesome

• Not very clean, though, when you consider that "Dissociation" is not meant to represent the product of variables D, i, s, s again, o, c, i, a, t, another i, o again, and n. – Niel de Beaudrap Mar 12 '14 at 17:47
• @NieldeBeaudrap, You are talking about the content of the equation, I am talking about placing the equation in the same line of the number. This creates the needed effect. I undestand that the code would be better if it explained the content but alas sometimes we just want a specific format. I think you should post your answer as an answer. It gives the pretty effect and the representation you say... it is more correct. – Claudiordgz Mar 12 '14 at 17:52
• True, you do solve the original problem. But it's always a good idea to suggest an answer which doesn't contain any other errors of formatting. I'm refraining from posting an answer because I don't want it to distract from or reduce the chances of a forthcoming answer which is even better. (Sorry if my earlier remark was a bit snide.) – Niel de Beaudrap Mar 12 '14 at 18:22
• Oh no need to apologize. I thank you for your comment. I think the formatting from your code looks prettier in the end product. This makes it all worthwhile, it is... a better answer, and not only that, it is simple, without adding any further packages. – Claudiordgz Mar 12 '14 at 18:26