[Tex/LaTex] Package caption Error: 9pt undefined

captionsfontsize

How to set the font size for captions using specific sizes (e.g.: 9pt)?

I've been trying to set the captions to 9pt using the following command:

\usepackage[font={9pt,bf}]{caption}

But it fails. The error message is Package caption Error: 9pt undefined.

On the other hand, using footnotesize (or any other) works ok.

Best Answer

caption knows only a specific set of font keywords. If you want something special you must setup the keyword first:

\documentclass{memoir}
\usepackage{caption}
\DeclareCaptionFont{9pt}{\fontsize{9pt}{10pt}\selectfont}
\captionsetup{font={9pt,bf}}
\begin{document}

\begin{figure}
 blblblblb
\caption{blblb}
\end{figure}
\end{document}

enter image description here