I would like to redefine the \caption command to have to arguments : one "main" caption and then the description.
This is what I want :
\begin{figure}
\caption{\textbf{Caption title} \newline \small{I would like this sentence to be under the title and smaller.}}
\end{figure}
Figure 1 - Caption title
I would like this sentence to be under the title and smaller.
But I want to change the format for all captions. I looked at the package caption :
\documentclass[10pt]{article}
\usepackage[french,english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin=10pt,font=small,labelfont=bf,
labelsep=endash]{caption}
\newlength\myindention
\DeclareCaptionFormat{myformat}%
{#1#2\\\hspace*{\myindention}#3}
\setlength\myindention{1cm}
\captionsetup{format=myformat}
\begin{document}
\begin{figure}
\caption{Caption title. I would like this sentence to be under the title and smaller.}
\end{figure}
\end{document}
Figure 1
Caption title. I would like this sentence to be under the title and smaller.
But only the title is above (which I expected, because I gave no indication about it - but I don't know how to change it).
I tried to add arguments in the formatting command :
\DeclareCaptionFormat{myformat}%
{#1#2#3 \newline \small{#4}}
...
\caption{Caption title.}{I would like this sentence to be under the title and smaller}
But I get : "Illegal parameter number in definition of \caption"
Any help on that ?
\newcommand\mycaption[2]{\caption{\textbf{#1}\newline\small#2}}
?figure
(or other float) environment.