
| \newlength{\captionwidth}
\newlength{\captionwidthmax}
\setlength{\captionwidthmax}{\linewidth} \addtolength{\captionwidthmax}{-1cm} \newlength{\figlabelwidth} \newlength{\minipagewidth} \makeatletter \newcommand{\@makefigcaption}[2]{% \vspace{2pt} \settowidth{\captionwidth}{#1: #2} \begin{center} \ifthenelse{\lengthtest{\captionwidth > \captionwidthmax}} { \setlength{\minipagewidth}{\captionwidthmax} \settowidth{\figlabelwidth}{#1: } \addtolength{\minipagewidth}{-\figlabelwidth} #1: \begin{minipage}[t]{\minipagewidth}\emph{#2}\end{minipage} } {#1: \emph{#2}} \end{center} } \renewcommand{\figure}{\let\@makecaption\@makefigcaption\@float{figure}} \makeatother |
If you have troubles working with LaTeX, here is an on line guide
http://www.loria.fr/services/tex/english/index.html
