[LaTeX] isotopes - how to align left indices?

In summary, the problem with this equation is that the sub and superscripts are attached to the right arrow, which causes the spacing between numbers and the Ba symbol to be incorrect. The equation can be solved by hand aligning the numbers and symbols, or by using a package that will do it for you, such as the mhchem package.
  • #1
Borek
Mentor
28,953
4,252
So, I have this equation:

[tex]^{137}_{55}Cs \rightarrow ^{137}_{56}Ba + e^- + \bar{\nu}_e[/tex]

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.
 
Physics news on Phys.org
  • #3
I need it on the forum so it must be properly rendered by MathJax, sorry for not being clear.
 
  • #4
Borek said:
So, I have this equation:

[tex]^{137}_{55}Cs \rightarrow ^{137}_{56}Ba + e^- + \bar{\nu}_e[/tex]

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.

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

Without this,

[tex]^{137}_{\mspace{8mu} 55}\mathrm{Cs} \rightarrow ^{137}_{\mspace{8mu}56}\!\mathrm{Ba} + \mathrm e^- + \bar{\mathrm{\nu}}_e[/tex]
 
  • #5
D H said:
As an admin, don't you have the power to make mhchem one of the automatically loaded packages? :devil:

Very funny
grumpy_Borek.png
.

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

So it has to be done manually, by tweaking spacers. Thanks.
 
Last edited by a moderator:
  • #6
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:
^{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
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
AlephZero said:
You can make the sub and superscripts the same width with the \phantom{} macro
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.

The other alignment problem is because the sub and superscripts are attached to the right arrow. Attach them to an empty group {} instead.
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.
 

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

1. What is LaTeX and why is it used for typesetting isotopes?

LaTeX is a typesetting language used for creating high-quality documents, particularly in fields such as mathematics, physics, and chemistry. It is commonly used for typesetting isotopes because it allows for precise and consistent formatting of mathematical equations and symbols, which are essential for representing isotopic notations.

2. How do I align left indices for isotopes in LaTeX?

To align left indices for isotopes in LaTeX, you can use the \isotope command from the isotope package. This command takes two arguments: the mass number and the atomic number of the isotope. For example, \isotope{16}{8} will produce the isotope symbol for oxygen-16, with the indices aligned to the left.

3. Can I customize the alignment of isotopic indices in LaTeX?

Yes, you can customize the alignment of isotopic indices in LaTeX by using the \isotope* command from the isotope package. This command takes an optional argument specifying the alignment, such as l (left), c (center), or r (right). For example, \isotope*[r]{16}{8} will produce the isotope symbol for oxygen-16 with the indices aligned to the right.

4. How do I add isotopic notations to my LaTeX document?

To add isotopic notations to your LaTeX document, you can use the \isotope command as described above. You can also use the \ce command from the mhchem package, which provides more advanced features for typesetting chemical formulas and equations, including isotopic notations.

5. Are there any other packages or commands for typesetting isotopes in LaTeX?

Yes, apart from the isotope and mhchem packages, there are several other packages and commands available for typesetting isotopes in LaTeX, such as chemformula, chemmacros, and chemgreek. Each package or command offers its own unique features and customization options, so it is recommended to explore and choose the one that best fits your needs.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
299
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • High Energy, Nuclear, Particle Physics
Replies
1
Views
1K
Replies
2
Views
781
  • Advanced Physics Homework Help
Replies
11
Views
2K
  • Special and General Relativity
Replies
22
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top