# [LaTeX] isotopes - how to align left indices?

1. May 2, 2012

### Staff: Mentor

So, I have this equation:

$$^{137}_{55}Cs \rightarrow ^{137}_{56}Ba + e^- + \bar{\nu}_e$$

What I don't like about it is that both 55 and 56 are left aligned and there is a gap between numbers and Ba symbol. I guess I could try to hand align them using spaces and negative spaces, but I also guess that's not the correct way to do it.

2. May 2, 2012

3. May 2, 2012

### Staff: Mentor

I need it on the forum so it must be properly rendered by MathJax, sorry for not being clear.

4. May 2, 2012

### D H

Staff Emeritus
As an admin, don't you have the power to make mhchem one of the automatically loaded packages?

Without this,

$$^{137}_{\mspace{8mu} 55}\mathrm{Cs} \rightarrow ^{137}_{\mspace{8mu}56}\!\mathrm{Ba} + \mathrm e^- + \bar{\mathrm{\nu}}_e$$

5. May 2, 2012

### Staff: Mentor

Very funny .

So it has to be done manually, by tweaking spacers. Thanks.

Last edited by a moderator: Apr 16, 2017
6. May 2, 2012

### AlephZero

A workround without the package:

You can make the sub and superscripts the same width with the \phantom{} macro, which creates an empty space the size of its parameter. All digits are the same width in any sensible font, so it doesn't matter what digit you use to make the space.

The other alignment problem is because the sub and superscripts are attached to the right arrow. Attach them to an empty group {} instead.
Code (Text):

^{137}_{\phantom{0}55}Cs \rightarrow {}^{137}_{\phantom{0}56}Ba + e^- + \bar{\nu}_e

$$^{137}_{\phantom{0}55}Cs \rightarrow {}^{137}_{\phantom{0}56}Ba + e^- + \bar{\nu}$$

7. May 2, 2012

### Staff: Mentor

I like the \phantom thing more - as far as I can tell it should be easier, as \mspace{8mu} may require trial and error to select correct number of math units?

8. May 2, 2012

### D H

Staff Emeritus
Much better. I forgot all about a phantom zero. I tend to use phantom with a minus sign to make arrays line up better, but phantom works quite nicely with numbers as well.

Nice catch on the problem with barium.

One last thing I would suggest: Standard nomenclature dictates that element names be non-italicized. Those chemical symbols should be in a \mathrm. This cures another problem: Without the \mathrm, sees that "Ba" as the variable B times the variable a, with an implied '*' between the B and the a.