2

Is it possible to put a line next to a split equation indicating that the equation number applies to multiple lines? I'd like to achieve a similar effect to that in the following image:

enter image description here

MWE:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}

\newcommand{\iu}{\mathrm{i}} %imaginary unit
\newcommand{\eu}{\mathrm{e}} %euler number
\newcommand{\dd}[1]{{\mathrm{d}#1}} %derivative
\usepackage{dutchcal} %Cursive font for Res operator
\newcommand{\res}[2]{\mathop{\mathcal{Res}}\limits_{#1}\left\{{#2}\right\}}

\begin{document}

The residues can be calculated. All poles are of order 1, so this is an easy task.
\begin{align}
\begin{split}
\res{z=\iu}{p(z)}&=\lim_{z\rightarrow\iu}(z-\iu)p(z)\\
&=\lim_{z\rightarrow\iu}\frac{z-\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=\lim_{z\rightarrow\iu}\frac{1}{\left(z+\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=-\frac{\iu}{6}
\end{split}\label{eqn:q2_res1}
\end{align}
\begin{align}
\begin{split}
\res{z=2\iu}{p(z)}&=\lim_{z\rightarrow 2\iu}(z-2\iu)p(z)\\
&=\lim_{z\rightarrow 2\iu}\frac{z-2\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=\lim_{z\rightarrow 2\iu}\frac{1}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)}\\
&=\frac{\iu}{12}
\end{split}\label{eqn:q2_res2}
\end{align}

\end{document}

2 Answers 2

3

Here is a way, with the empheq package (which loads mathtools) and flalign. Note one can have two variants, according to the placement of the &:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{empheq}

\newcommand{\iu}{\mathrm{i}} %imaginary unit
\newcommand{\eu}{\mathrm{e}} %euler number
\newcommand{\dd}[1]{{\mathrm{d}#1}} %derivative
\usepackage{dutchcal} %Cursive font for Res operator
\newcommand{\res}[2]{\mathop{\mathcal{Res}}\limits_{#1}\left\{{#2}\right\}}

\begin{document}

The residues can be calculated. All poles are of order 1, so this is an easy task.
\begin{empheq}[right = \empheqrbrace]{flalign}
  & & &\begin{split}
  \res{z=\iu}{p(z)}&=\lim_{z → \iu}(z-\iu)p(z) \\
  & =\lim_{z → \iu}\frac{z-\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
  & =\lim_{z → \iu}\frac{1}{\left(z+\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
  & =-\frac{\iu}{6}
  \end{split} & &
  \label{eqn:q2_res1}
\end{empheq}
\vspace{6ex}
\begin{empheq}[right=\empheqrbrack]{flalign}
  & & \begin{split}
  \res{z=2\iu}{p(z)}&=\lim_{z → 2\iu}(z-2\iu)p(z)\\
  &=\lim_{z → 2\iu}\frac{z-2\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
  &=\lim_{z → 2\iu}\frac{1}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)}\\
  &=\frac{\iu}{12}
  \end{split} & \label{eqn:q2_res2}
\end{empheq}

\end{document} 

enter image description here

3
  • Is there any way, within a single align environment, to automatically do this for all equations encapsulated within split, but not stand-alone equations? Commented Apr 4, 2017 at 9:01
  • Do you mean several split environments, each with its own brace or bracket?
    – Bernard
    Commented Apr 4, 2017 at 9:15
  • Yes. I want to have a single align environment, within which I would have both single-line equations and split equations across multiple lines. I'd like the bracket placement to occur only for the equations spanning multiple lines. Commented Apr 6, 2017 at 1:50
0

By enclosing the whole equation set in an array and using \left. \right].

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}

\newcommand{\iu}{\mathrm{i}} %imaginary unit
\newcommand{\eu}{\mathrm{e}} %euler number
\newcommand{\dd}[1]{{\mathrm{d}#1}} %derivative
\usepackage{dutchcal} %Cursive font for Res operator
\newcommand{\res}[2]{\mathop{\mathcal{Res}}\limits_{#1}\left\{{#2}\right\}}

\begin{document}

The residues can be calculated. All poles are of order 1, so this is an easy task.
\begin{equation}\left.
\begin{array}{c}
\begin{aligned}
\res{z=\iu}{p(z)}&=\lim_{z\rightarrow\iu}(z-\iu)p(z)\\
&=\lim_{z\rightarrow\iu}\frac{z-\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=\lim_{z\rightarrow\iu}\frac{1}{\left(z+\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=-\frac{\iu}{6}
\end{aligned}\label{eqn:q2_res1}
\end{array} \qquad \right]
\end{equation}
%
\begin{equation}\left.
\begin{array}{c}
\begin{aligned}
\res{z=2\iu}{p(z)}&=\lim_{z\rightarrow 2\iu}(z-2\iu)p(z)\\
&=\lim_{z\rightarrow 2\iu}\frac{z-2\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=\lim_{z\rightarrow 2\iu}\frac{1}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)}\\
&=\frac{\iu}{12}
\end{aligned}\label{eqn:q2_res2}
\end{array} \qquad \right]
\end{equation}

\end{document}

enter image description here

Also for TikZ lovers, here is a nice solution. What I like most about this method is that the brackets are drawn on-top of the text and don't interfere with your math setup whatsoever.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}

\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture]{\coordinate(#1);}}

\newcommand{\iu}{\mathrm{i}} %imaginary unit
\newcommand{\eu}{\mathrm{e}} %euler number
\newcommand{\dd}[1]{{\mathrm{d}#1}} %derivative
\usepackage{dutchcal} %Cursive font for Res operator
\newcommand{\res}[2]{\mathop{\mathcal{Res}}\limits_{#1}\left\{{#2}\right\}}

\begin{document}

The residues can be calculated. All poles are of order 1, so this is an easy task.
\begin{equation}
\begin{aligned}
\res{z=\iu}{p(z)}&=\lim_{z\rightarrow\iu}(z-\iu)p(z)\tikzmark{1}\\
&=\lim_{z\rightarrow\iu}\frac{z-\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=\lim_{z\rightarrow\iu}\frac{1}{\left(z+\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=-\frac{\iu}{6}\tikzmark{2}
\end{aligned}\label{eqn:q2_res1}
\end{equation}
\begin{equation}
\begin{aligned}
\res{z=2\iu}{p(z)}&=\lim_{z\rightarrow 2\iu}(z-2\iu)p(z)\tikzmark{3}\\
&=\lim_{z\rightarrow 2\iu}\frac{z-2\iu}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)\left(z-2\iu\right)}\\
&=\lim_{z\rightarrow 2\iu}\frac{1}{\left(z+\iu\right)\left(z-\iu\right)\left(z+2\iu\right)}\\
&=\frac{\iu}{12}\tikzmark{4}
\end{aligned}\label{eqn:q2_res2}
\end{equation}

\begin{tikzpicture}[remember picture, overlay, thin]
\coordinate [xshift=-2in] (u) at (1-|current page.east);
\coordinate [xshift=-2in] (l) at (2-|current page.east);
\draw ([xshift=-2mm]u)--(u)--(l)--++(-2mm,0mm);
%
\coordinate [xshift=-2in] (u) at (3-|current page.east);
\coordinate [xshift=-2in] (l) at (4-|current page.east);
\draw ([xshift=-2mm]u)--(u)--(l)--++(-2mm,0mm);
\end{tikzpicture}

\end{document}

enter image description here

You must log in to answer this question.

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