I have 2 minipages side by side as follows:
\begin{figure}
\centering
\fbox{
\begin{minipage}[t]{0.48\linewidth}%
\begin{minipage}[t]{0.48\linewidth}%
left part
\end{minipage}
\end{minipage}\hfill
\begin{minipage}[t]{0.48\linewidth}%
\begin{minipage}[t]{0.48\linewidth}%
right part
\end{minipage}
\end{minipage}}
\captionof{figure}{An example program}\label{fig:An example program}
\end{figure}
Now the width of the whole figure
is a little bit shorter than the width of the paper. I would like to make them exactly the same.
Could anyone tell me which parameter I could change to realize that?
Best Answer
Use
\framebox
instead of\fbox
.EDIT: As per Martin's comments on using
\framebox
and verbatim text/catcode changing material, this code will work as desired using\fbox
However, you have to use
for this to work properly.
PS. If you want this to go up to the paper width (do you really want to do that?), you have to reduce the margins to zero using geometry.
I am of the opinion that you can simply use
\caption
insidefigure
environment (instead of\captionof
which will be used outside\figure
environment)