0

I have a sum expression with many terms. I would like to split the summands into two groups in order to be able to talk about the differences between group 1 terms and group 2 terms in general. I would also like to assign numbers to individual terms in order to be able to refer to them later. Thus I want to render the equation like this:

(1.1)    f_1(...)  }
                   }  group 1
(1.2)  + f_2(...)  }

(1.3) + g_1(...) } } group 2 (1.4) + g_2(...) }

(of course, there should be two large curly braces instead of many small ones)

How can one achieve this? I can get line numbers with align and I can get the braces with nested splits, but how does one get both?

1 Answers1

2

A tricky solution using bigdelim package and alignat:

\documentclass{article}
\usepackage[leqno]{amsmath}
\usepackage{bigdelim}
%\usepackage{hyperref} %optionnal

\newcommand\mydelim[2][0.5]{% &\quad \rdelim}{2}{3mm}&&\smash{\raisebox{-#1\baselineskip}[0pt]{#2}}% }

\begin{document} \begin{subequations}\label{wholeset} \begin{alignat}{3} f_b(x)&=1+2+3 & \mydelim{group one}\ &=f_1(\cdots) \label{secondInGroupOne}\ &+ f_2(\cdots) & \mydelim{grouptwo} \label{firstInGroupTwo}\ &+ f_3(\cdots) \end{alignat} \end{subequations}

The whole equation set \eqref{wholeset}.\par The second line \eqref{secondInGroupOne}.\par The third line \eqref{firstInGroupTwo}.

\end{document}

where optional parameter #1 of \mydelim is the number of \baselineskip required to properly space the right text (0.5 by default) Direct hyperreference to a group would be more involved, but (\ref{wholeset}a,b) should work.

enter image description here

Edit: if the number of lines to span is not constant to 2, you could add another optional parameter. Assuming latex3 is enabled (or xparse loaded), you could replace \newcommand\mydelim[2][0.5]{...} by:

\NewDocumentCommand{\mydelim}{D(){2}O{0.5}m}{%
&\quad \rdelim\}{#1}{3mm}&&\smash{\raisebox{-#2\baselineskip}[0pt]{#3}}%
}

that would be used as

\mydelim(number of lines)[number of lineskips]{text}

where the two first arguments are optional (default to 2 and 0.5 respectively)

Jhor
  • 4,179