%%
%% The LaTeX Companion, 3ed
%%
%% Example 7-4-2 on page I-542 in "Standard customization possibilities for \protect \nxLcs  {caption}".
%%
%% Copyright (C) 2022 Frank Mittelbach
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%% See https://www.latex-project.org/lppl.txt for details.
%%

\documentclass{tlc3exa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{159.0pt}
%
 \setcounter{page}{1}             % make this an odd page to show the margins
 \setlength\intextsep{6pt}
 \addtolength\textwidth{-10pt}

%StartShownPreambleCommands
\usepackage{graphicx,float}
\floatstyle{boxed} \restylefloat{figure}
\usepackage[format=hang,margin={0pt,15pt}]{caption}

%StopShownPreambleCommands

\begin{document}
\begin{figure}[ht]  \centering
\includegraphics[width=8mm]{elephant}
\includegraphics[width=10mm]{elephant}
\caption{Short caption}
\end{figure}
\begin{figure}[ht]   \centering
\includegraphics[width=15mm]{elephant}
\caption{A caption that runs over more than one line}
\end{figure}
\end{document}