11

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.

  • 2
    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
  • 2
    yes, but it depends to your main font size – user2478 Oct 27 '16 at 7:44
  • 3
    @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
13

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.