[Tex/LaTex] Using tiny font with the (sub)caption package

captionsfontsizesubcaption

In some situations (e.g. with beamer), it may be desirable to use tiny as font size with the (sub)caption package. How to use it?

Best Answer

While the tiny option is not available per default, it can easily be added using \DeclareCaptionFont{tiny}{\tiny}

\documentclass{article} 
\usepackage{graphicx}

\usepackage{subcaption} 
\DeclareCaptionFont{tiny}{\tiny} 
\captionsetup{font+=tiny} 
\captionsetup[sub]{font+=tiny} 

\begin{document} 
    \begin{figure}
        \centering  
        \subcaptionbox{Original}{\includegraphics[scale=0.15]{example-image}}
        \subcaptionbox{New}{\includegraphics[scale=0.15]{example-image}}
        \caption{Image}
    \end{figure}  
\end{document}

EDIT May 2018:

This workaround is no longer necessary, it was fixed in the caption package with the commit https://github.com/axelsommerfeldt/caption/commit/8088ac29f196076ab4b9a942f96d557a36cdec47