# Setting font size for caption package

I wish to set the font size for caption package, how should I do it, now I have this in my preamble

\usepackage[skip=2pt]{caption}

-
I don't use the caption package, but if you aren't tied to it, you could consider the boxhandler package that gives extensive control over caption style and placement. – Steven B. Segletes Mar 9 '13 at 3:07

You can use the font key with one of the values scriptsize, footnotesize, small, normalsize, large or Large. A little example:

\documentclass{article}
\usepackage[skip=2pt,font=scriptsize]{caption}

\begin{document}

\begin{figure}
\caption{A test caption}
\end{figure}
Some regular text

\end{document}


If you want other sizes, you can declare a new format and use \fontsize as in the following (just illustrative) example:

\documentclass{article}
\usepackage[skip=2pt]{caption}

\DeclareCaptionFormat{myformat}{\fontsize{5}{6}\selectfont#1#2#3}
\captionsetup{format=myformat}

\begin{document}

\begin{figure}
\caption{A test caption}
\end{figure}
Some regular text

\end{document}


-