I am writing my thesis in TexniCenter and I have the following problem. I want all my figures to have a border. So I use :
\usepackage{float}
\floatstyle{boxed}
\restylefloat{figure}
in the beginning.
However, every figure after that has a border with width equal to text width, even it is much smaller. For example I use the following code to include an image:
\begin{figure}[h]
\centering
\includegraphics [width=0.5\textwidth] {myfigure.png}
\caption[myfigure]%
{myfigure}
\label{myfigure}
\end{figure}
I want to have a figure with width half the text width. The border though remains full width size. Could you help me please.

\restylefloat{figure}has a border of width equal to text width. Do you want every figure to have a border of width0.5\textwidthinstead? Or just some of your figures? – Werner Aug 05 '11 at 23:16