# Package caption Error: 9pt undefined

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.

• use \usepackage[font={small,bf}]{caption} – user2478 Oct 27 '16 at 7:42
• does small enforce an specific size? – rkioji Oct 27 '16 at 7:43
• yes, but it depends to your main font size – user2478 Oct 27 '16 at 7:44
• @rkioji: small depends on your default document font setting. See what \small looks like relative to what you have in \documentclass[.]{..}: What point (pt) font size are \Large etc.? – Werner Oct 27 '16 at 7:45

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}