[texhax] Problems with framing a minipage
Martin Heller
mr_heller at yahoo.dk
Tue May 15 14:24:13 CEST 2007
James Smith skrev:
> I'm trying to put a frame around a figure, thus:
>
> +++
>
> \begin{figure}[h]
> \centering
> \framebox
> {
> \begin{minipage}{\textwidth}
> \epsffile{figures/Class_heirarchy.eps}
> \end{minipage}
> }
> \caption{The Jasper core class methods and hierarchy}
> \label{figure_core_class}
> \end{figure}
>
> +++
>
> For some reason the width of the frame is slightly wider than the
> textwidth. I have changed this (and the evensidemargin size) in the
> preamble, but even when I take these out the problem remains? Why is the
> width of the frame not exactly equal to \textwidth?
Try:
\usepackage{calc}
\framebox
{% <- no space
\begin{minipage}{\textwidth-2\fboxsep-2\fboxrule}
\epsffile{figures/Class_heirarchy.eps}
\end{minipage}% <- no space
}
More information about the texhax
mailing list