1

I am trying to label several lines at once in a very long equation. From this question I have come up with the following minimal example:

\documentclass{report}
\usepackage[onehalfspacing]{setspace}
\usepackage{amsmath}
\begin{document}
\begin{align*}
    x &= \sum_i c_i X_i \\
    &\left. \def\arraystretch{1.5}
    \begin{array}{l}
    + \sum_i c_i Y_i \\
    +\sum_i c_i Z_i 
    \end{array} 
    \right\} \tag{From (1)} \\
\end{align*}
\end{document}

which generates

Minimal example

As you can see I have attempted to correct the fact that array by default will have smaller row spacing than the align*. However, I cannot make the font sizes match up and the line spacing is really not that good either. I have tried using begingroup, endgroup but that doesn't seem to work. I would really appreciate any help on this!

2

If I have understood your problem correctly, you can make use of mathtools' drcases environment (d stands for displaystyle, while r means the brace will be on the right):

\documentclass[preview]{standalone}
\usepackage{mathtools}
\begin{document}
\begin{align*}
    x &= \sum_i c_i X_i \\
      &\hphantom{={}}\!\begin{drcases} % <--- \! is to get correct spacing/alignment
          + \sum_i c_i Y_i \\
          + \sum_i c_i Z_i 
        \end{drcases} 
    \tag{From (1)} \\
\end{align*}
\end{document}

Output

If you want more space between the math and the brace, you can add \quad (or any other space) to the end of the longest line:

\documentclass[preview]{standalone}
\usepackage{mathtools}
\begin{document}
\begin{align*}
    x &= \sum_i c_i X_i \\
      &\hphantom{={}}\!\begin{drcases} % <--- \! is to get correct spacing/alignment
          + \sum_i c_i Y_i \quad\\
          + \sum_i c_i Z_i 
        \end{drcases} 
    \tag{From (1)} \\
\end{align*}
\end{document}

Output with more space

Another possibility (less "automatic") is to give the extra linespacing in square brackets after the \\ as in \\[.5em], which will give an extra 0.5 em of linespacing after the line you are ending.

|improve this answer|||||

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.