0

I have written this equation in alignment mode. But now I want to box this whole expression. What command should I use? Any Idea?

\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*}
Vincent
  • 20,157
Epsilon
  • 516

1 Answers1

1

Here are two solutions; one with empheq and a custom box, based on \fcolorbox, the other with the standard \boxed command from amsmath and the multlined environment (requires mathtools – which is loaded by 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} 

enter image description here

Bernard
  • 271,350