可视化分组拆分方程

可视化分组拆分方程

是否可以在拆分方程旁边放置一行,以表明方程编号适用于多行?我想实现与下图类似的效果:

在此处输入图片描述

梅威瑟:

\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}

答案1

empheq这是一种使用包(可加载mathtools)和 的方法flalign。请注意,根据 的位置,可以有两种变体&

\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} 

在此处输入图片描述

答案2

通过将整个方程组包含在一个数组中并使用\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}

在此处输入图片描述

也适用于 TiZ 爱好者们,这里有一个不错的解决方案。我最喜欢这种方法的地方在于,括号绘制在文本上方,不会干扰您的数学设置。

\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}

在此处输入图片描述

相关内容