我已经在对齐模式下写下了这个方程。但现在我想将整个表达式框起来。我应该使用什么命令?有什么想法吗?
\begin{align*}
I=&\frac{1}{|\mathrm{det \, \textbf{A}}|} \sum_{m_{s+1}\cdots m_{r}} \phi_{m_{s+1}\cdots m_{r}}\,\,\textbf{Res} \Big[ f(\Bar{n}_{1},\cdots,\Bar{n}_{s},n_{s+1}+m_{s+1},\cdots,n_{r}+m_{r})\Gamma(-\Bar{n}_{1})\dotsm\Gamma(-\Bar{n}_{s}) &\\ &\hspace{2.8cm}\cdot \frac{\Gamma(1-n_{s+1})\Gamma(1+n_{s+1})\dotsm\Gamma(1-n_{r})\Gamma(1+n_{r})\Gamma(1+m_{s+1})\cdots\Gamma(1+m_{r})}{n_{s+1}\cdots n_{r}\quad\Gamma(1+n_{s+1}+m_{s+1})\cdots\Gamma(1+n_{r}+m_{r})}\Big]
\end{align*}
答案1
这里有两个解决方案;一个使用empheq
和基于的自定义框,\fcolorbox
另一个使用\boxed
来自的标准命令amsmath
和multlined
环境(需要mathtools
- 由 empheq 加载)。
\documentclass{article}
\usepackage{geometry}
\usepackage{empheq, amssymb}
\usepackage[svgnames, table]{xcolor}
\DeclareMathOperator{\Res}{\mathbf{Res}}
\newcommand*\widefbox[2][black]{\setlength{\fboxrule}{0.8pt}\setlength{\fboxsep}{1.2ex}\fcolorbox{#1}{white}{\enspace #2\enspace}}
\begin{document}
\begin{empheq}[box={\widefbox[SeaGreen]}]{align*}
I=\frac{1}{|\det \mathbf{A}|} \quad \smashoperator{\sum_{m_{s+1}\cdots m_{r}}} \phi_{m_{s+1}\cdots m_{r}}\Res\biggl[ f(\Bar{n}_{1},\dots,\Bar{n}_{s},n_{s+1}+m_{s+1},\dots,n_{r}+m_{r})\Gamma(-\Bar{n}_{1})\dotsm\Gamma(-\Bar{n}_{s}) & \\
\cdot \frac{\Gamma(1-n_{s+1})\Gamma(1+n_{s+1})\dotsm\Gamma(1-n_{r})\Gamma(1+n_{r})\Gamma(1+m_{s+1})\cdots\Gamma(1+m_{r})}{n_{s+1}\cdots n_{r}\quad\Gamma(1+n_{s+1}+m_{s+1})\cdots\Gamma(1+n_{r}+m_{r})}\biggr] &
\end{empheq}
\[ \boxed{\begin{multlined}
I=\frac{1}{|\det\mathbf{A}|}\quad \smashoperator{\sum_{m_{s+1}\cdots m_{r}}}\phi_{m_{s+1}\cdots m_{r}}\Res\biggl[ f(\Bar{n}_{1},\dots,\Bar{n}_{s},n_{s+1}+m_{s+1},\dots,n_{r}+m_{r})\Gamma(-\Bar{n}_{1})\dotsm\Gamma(-\Bar{n}_{s}) \\
\frac{\Gamma(1-n_{s+1})\Gamma(1+n_{s+1})\dotsm\Gamma(1-n_{r})\Gamma(1+n_{r})\Gamma(1+m_{s+1})\cdots\Gamma(1+m_{r})}{n_{s+1}\cdots n_{r}\quad\Gamma(1+n_{s+1}+m_{s+1})\cdots\Gamma(1+n_{r}+m_{r})}\biggr]
\end{multlined}} \]
\end{document}