4 ways to framed displayed formulas in LaTeX

This article will show on how to display formulas (mathematics equations) inside a box or frame.

Using \fbox and \parbox

The formula will be framed. Must declare the width of the frame.

\fbox
{
    \parbox{5cm}
    {
        \[
        \oint\limits_C V\,d\tau =
            \oint\limits_\Sigma\nabla\times V\,d\sigma
        \]
    }
}

fbox-parbox

Using \fbox and \minipage

The formula will be framed. Must declare the width of the frame.

\fbox
{
	\begin{minipage}[position]{5cm}
		\[
		\oint\limits_C V\,d\tau =
			\oint\limits_\Sigma\nabla\times V\,d\sigma
		\]
	\end{minipage}
}

fbox-minipage

Using equation environment and \fbox

The formula will be centred, framed and numbered.

\begin{equation}
    \fbox
    {
        $ \displaystyle
        \oint\limits_C V\,d\tau =
                \oint\limits_\Sigma\nabla\times V\,d\sigma
        $
    }
\end{equation}

equation-fbox

Using displaymath enviroment and \fbox

The formula will be centred, framed and unnumbered.

\begin{displaymath}
	\fbox
	{
		$ \displaystyle
		\oint\limits_C V\,d\tau =
			\oint\limits_\Sigma\nabla\times V\,d\sigma
		$
	}
\end{displaymath}

displaymath-fbox

If you are new here, you might want to subscribe to the RSS feed or newsletter.

Enter your email address:

Related

This entry was posted in LaTeX and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>