## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Can we add a title to each caption in scrbook class ? Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Cham
Posts: 830
Joined: Sat Apr 02, 2011 4:06 pm

### Can we add a title to each caption in scrbook class ?

I'm wondering if it's possible to add a bold title to each figure and table caption, in the scrbook class.

Because of the command \setcapindent*{0pt} in the preamble, the caption text is placed below the caption number, with a useless space after the number (where a single-line title could stand). If I use\setcapindent{0pt} instead, there is no wasted space.

So is there a way to use the useless space after the number to add a title to the caption?

Here's a MWE to try :
\RequirePackage[l2tabu,orthodox]{nag}\documentclass[11pt,twoside,letterpaper,headsepline,footsepline,cleardoublepage=plain,]{scrbook}\usepackage[T1]{fontenc}\usepackage[french]{babel}\usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot]{geometry}\usepackage{graphicx}\usepackage{subfig}\setcapindent*{0pt} \begin{document} 	\begin{figure}		\centering			\includegraphics[height=4cm]{example-image-a}		\quad			\includegraphics[height=4cm]{example-image-b}		\\[12pt]			\includegraphics[height=4cm]{example-image-c}		\quad			\includegraphics[height=4cm]{example-image}		\caption{Some long description text, to show what would happen when a caption is long, long and very long.  Hey, what a boring text to write !  Maybe I should use a verbatim or another random text package instead of writing this annoying text.  Oh well, such is life anyway.  We never know in advance what would happen next.  Why do I remember the past, and not the future instead, or maybe we already do, so that the future is actually the past?}	\end{figure} \end{document}

PS. The autocompletion mechanism of my browser is annoying : always changing "scrbook" to "scrapbook" !

Stefan Kottwitz
Posts: 8708
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
You could use \setcapindent without a star *, and add a title that way, using the title also for the list of figures:

\setcapindent{0pt}...\caption[Figure title]{\textbf{Figure title}\\Some long description text, ...}

figure.png (41.3 KiB) Viewed 119 times

Stefan