# Trouble with frame around figure

I'm currently attempting to place a frame around a figure in an Elsevier template. My figure contains 4 images in a 2 by 2 grid. When I try to use the command \fbox, all the images bunch up and the formatting is ruined.

Is there a way to fix this problem with minimal pain? Below is part of my code:

\begin{figure}[h]
\centering

\fbox{
\includegraphics[scale=0.25]{ews1}
\includegraphics[scale=0.25]{ews3}
\includegraphics[scale=0.25]{ews2}
\includegraphics[scale=0.25]{ews4}
}
\label{f1}
\caption{}
\end{figure}


• \label must be placed after \caption – user31729 May 14 '16 at 18:24

Try to use a \parbox{...} inside of the \fbox{...} and leave an empty line after two of the \includegraphics statements.

\documentclass{elsarticle}

\usepackage{graphicx}

\begin{document}

\begin{figure}[h]
\centering

\fbox{ %
\parbox{0.7\textwidth}{%
\centering

\includegraphics[scale=0.25]{ente}
\includegraphics[scale=0.25]{ente}

\includegraphics[scale=0.25]{ente}
\includegraphics[scale=0.25]{ente}
}
}
\caption{}
\label{f1}
\end{figure}

\end{document}


• Thanks @Christian Hupfer, that does it. I'll accept the answer as soon as SE lets me. – Lucif3r May 14 '16 at 18:32
• @JohnWayne360: Thanks. Happy TeXing! – user31729 May 14 '16 at 18:42