I have a multi-line equation;

  F(\gamma) &= aaaaa \nonumber\\ 
  &+ bbbbbb \nonumber\\ 
  &- cccccc 

How I can put this equation inside a box?

  • With the package bm you can create a box with the environment empheq wirth something like \begin{empheq}[box=\fbox] equation \end{empheq}
    – Aradnix
    Commented Oct 3, 2014 at 15:36

1 Answer 1


Here are some some details of what can be done with empheq and mathtools(which is loaded by empeheq). The overload option simplifies the syntax, but has the drawback that breaking equations over pages is forbidden (however you can use the AmSalign & the like,. environments to enable the ordinary behaviour). The \Aboxed command allows boxing a line with one alignment point.


\usepackage [utf8]{inputenc}

\newcommand*{\widebox}[2][0.5em]{\fbox{\hspace{#1}$\displaystyle #2$\hspace{#1}}}
\boxed {#1#2}}
\color{HotPink3}\boxed {\color{textcolor}#1#2}}


  F(γ) &= aaaaa \notag\\
  &+ bbbbbb \notag\\
  &- cccccc

\begin{empheq}[box=\fcolorbox{HotPink3}{MistyRose2!30! white}]{alignat = 2}
\Aboxed{F(γ) = & aaaaa }& \Aboxed{G & = dddddd}\notag\\
 &\! + bbbbbb \notag\\
 & - cccccc


enter image description here

You must log in to answer this question.

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