Packages   caption   cleveref   graphicx   hvfloat   sidecap   subcaption   tikz   wrapfig

The caption Package

Documentation caption
Categories figures
Description

Customize the format of figure and table captions. You can either pass options to the class in a \usepackage[options]{caption} or you can set them anywhere in the document with \captionsetup{options}.

Options
\usepackage{caption}
Examples

In the preamble:

\usepackage{caption}
\DeclareCaptionFont{quack}{\sffamily}
\captionsetup{
  font={quack,small},
  labelfont=bf,
  justification=raggedright,
  singlelinecheck=false,
  margin=10pt
}

In the document:

\begin{figure}[b!]
  \centering
  \includegraphics[width=0.5\textwidth]{sample}
  \caption{This is my lovely caption.}
  \label{fig:caption}
\end{figure}
\lipsum[1]