6

I'm trying to display two equations side by side and then display a third one centred between both on the next line. I'm using the align environment. Here's what I've tried

\begin{align*}
    E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} &   & L=4\times d_{\text{c-c}}=5.64\si{\angstrom}\\
    &E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}&\\
\end{align*}

Aligning equations How can I correctly display these?

7

There are a number of ways of achieving this:

enter image description here

\documentclass{article}

\usepackage{amsmath,siunitx}

\begin{document}

Using \verb|align*|:
\begin{align*}
  E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
  & E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}
\end{align*}

Using \verb|gather*| (1):
\begin{gather*}
  E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} \qquad L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
  E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}
\end{gather*}

Using \verb|gather*| (2):
\begin{gather*}
  E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} \quad
  \phantom{E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}} \quad
  L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
  \phantom{E_n = \frac{n^2h^2}{8m_{e^{-}}L^2}} \quad
  E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2} \quad
  \phantom{L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom}}
\end{gather*}

Using \verb|alignat*|:
\begin{alignat*}{3}
  E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
  & \quad E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2} \quad
\end{alignat*}

Using an \verb|array|:
\begin{equation*}
  \renewcommand{\arraystretch}{2}
  \begin{array}{ *{3}{c} }
    \displaystyle E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
    & \displaystyle E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}
  \end{array}
\end{equation*}


\end{document}
5

You can use the alignat environment:

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} % Fontencoding: 7bit -> 8bit
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L=4\times d_{\text{c-c}}=5.64\\
&E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}&
\end{alignat*}
\end{document}

Note, however, this will place the equation below in between the gap of the two above. It doesn't really center it. Especially, if the equation is long, there will be much space between the first equations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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