Alignment of chemical equations
Wouldn't it be easier to use a chemistry package like mhchem
(together with the already proposed amsmath
) instead of tensor
? mhchem
's \ce
macro is defined especially for use in alignment environments like {align}
.
For text between aligned equations one can use amsmath
's \intertext{}
.
\documentclass{book}
\usepackage[version=4]{mhchem}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\ce{^{14}_7N + n &-> ^{11}_5B + ^4_2H}
\intertext{Some text in between that is not aligned or anything.}
\ce{
^{14}_7N + n &-> ^{12}_6C + ^3_1H \\
^{16}_8O + n &-> ^{10}_4Be + ^7_4Be
}
\end{align*}
\end{document}
Edit: In order to get the first equation numbered but not the second and third you have basically two options:
- Use
{align}
(without the star!) and suppress the numbers of the second and third equation via\notag
or\nonumber
. - Use
{align*}
and add the number for the first manually by saying\tag{\refstepcounter{equation}\theequation}
Personally I prefer the first variant. BTW: if you haven't read it yet you might want to have a look at “Math Mode” by Herbert Voß.
\documentclass{book}
\usepackage[version=4]{mhchem}
\usepackage{amsmath}
\begin{document}
\begin{align}
\ce{^{14}_7N + n &-> ^{11}_5B + ^4_2H}
\intertext{Some text in between that is not aligned or anything.}
\ce{
^{14}_7N + n &-> ^{12}_6C + ^3_1H \nonumber \\
^{16}_8O + n &-> ^{10}_4Be + ^7_4Be \notag
}
\end{align}
\begin{align*}
\ce{
^{14}_7N + n &-> ^{11}_5B + ^4_2H \tag{\refstepcounter{equation}\theequation}
}
\intertext{Some text in between that is not aligned or anything.}
\ce{
^{14}_7N + n &-> ^{12}_6C + ^3_1H \\
^{16}_8O + n &-> ^{10}_4Be + ^7_4Be
}
\end{align*}
\end{document}
Try the align*
environment, provided by amsmath
package. To change the position of the aligment, change the &
symbol.
\documentclass{book}
\usepackage{tensor}
\usepackage{amsmath}
\begin{document}
\begin{align*}
&\nuclide[14][7]{N} + n \to \nuclide[11][5]{B} + \nuclide[4][2]{H}\\
&\nuclide[14][7]{N} + n \to \nuclide[12][6]{C} + \nuclide[3][1]{H}\\
&\nuclide[16][8]{O} + n \to \nuclide[10][4]{Be} + \nuclide[7][4]{Be}
\end{align*}
\end{document}