[texhax] \figure caption

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Fri Nov 19 10:39:58 CET 2004


> how can i get \figure captions to show up without a "Figure #."  before
> the \caption text?

Put this in your preamble; it'll do what you ask, but also for tables(!) and
only provided you're not using any fancy packages that already interfere
with captions.

\makeatletter
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
%%%  \sbox\@tempboxa{#1: #2}% ORIGINAL
  \sbox\@tempboxa{#2}%
  \ifdim \wd\@tempboxa >\hsize
%%%    #1: #2\par % ORIGINAL
    #2\par
  \else
    \global \@minipagefalse
    \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\makeatother

You might want to look at the "ccaption" package though, for more control.

Cordialmente,  Philip G. Ratcliffe
-----------------------------------------
Professor of Nuclear & Subnuclear Physics
Dipartimento di Fisica e Matematica
Universita degli Studi dell'Insubria
via Valleggio 11
22100 Como (CO)
Italy

Tel. +39 (039) 238.6231
Fax  +39 (039) 238.6119
Cell +39 (340) 2346580
Web  http://www.unico.it/~pgr
-----------------------------------------



More information about the texhax mailing list