1

I am trying to align the following set of equations

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
\begin{align*}
    [J_i,J_j] &= i\hbar\epsilon_{ijk}J_k \\
    [J^2,J_i] &= 0 \\
    &\left\{\begin{aligned}
        J^2\lvert j\;m\rangle &= \hbar^2j(j+1)\lvert j\;m\rangle \\
        J_z\lvert j\;m\rangle &= \hbar m\lvert j\;m\rangle \\ 
        J_\pm\lvert j\;m\rangle &= \hbar\sqrt{j(j+1)-m(m\pm1)}\lvert j,m\pm1\rangle
    \end{aligned}\right.
\end{align*}
\end{document}

so that all the equals signs are aligned together and looks like the following.

 A = B
 C = D
{E = F
{G = H
{I = J

However, all of my attempts to do so have not worked, and the other posts on this forum are always just slightly off from what I am hoping for. I'd also like to do this generally (avoiding brute forcing it by inserting negative spacing and whatnot), but if that's all that can work I'm willing to use that as well.

Currently, the latex above compiles and provides the following image. image of the compiled latex code

1

1 Answer 1

0

The follow code inserts a "fake" left brace to the left of the middle equation, knowing that it will be centred around the math axis vertically, and therefore stretch across equation above and below it.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
                [J_i, J_j] &= i \hbar\epsilon_{ijk} J_k \\
                [J^2, J_i] &= 0 \\
    J^2\lvert j\; m\rangle &= \hbar^2 j (j + 1)\lvert j\; m\rangle \\
    \makebox[0pt][r]{\smash{$\left\{\begin{array}{@{}c} \mathstrut \\[\jot] \mathstrut \\[\jot] \mathstrut \end{array}\right.$}}
    J_z\lvert j\; m\rangle &= \hbar m\lvert j\; m\rangle \\ 
  J_\pm\lvert j\; m\rangle &= \hbar\sqrt{j (j + 1) - m (m \pm 1)} \lvert j\; m \pm 1\rangle
\end{align*}

\end{document}
2
  • This is great, thanks! How would this be done if the left brace needed to be over an even number of lines? I see that you began the brace at the middle point and added the necessary line breaks but I'm unsure how to do that if I had four lines there. Nov 30, 2021 at 15:08
  • Ah, using the post you linked above I was able to rephrase my question and found this tex.stackexchange.com/a/365923/203655, so this can work. Thanks! Nov 30, 2021 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .