# caption package doesn't recognize font=doublespacing?

The journal I'm targetting requires "doublespaced" figure captions, and posts like these

http://www.latex-community.org/forum/viewtopic.php?f=45&t=4187

made me try out the caption package. I grabbed it from CTAN and looking at its doc (p. 10) made me try the font=doublespacing option, via a \usepackage[font=doublespacing]{caption} line in my preamble. But doing so generates an unknown key error:

! Package keyval Error: doublespacing undefined.
See the keyval package documentation for explanation.
l.448 \ProcessOptionsWithKV{caption}

this is using  pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex
2006.12.10), via LyX v2.0.3.

-
Please edit your post and include the MWE directly after the existing content. Also include the contents of your .log file (after *File List*) when you include \listfiles in your document preamble. This will give the community an indication of the packages you load and their age (and whether they are outdated or not). – Werner May 2 '12 at 23:13

You must load the setspace package to use caption's doublespacing option .

\documentclass{article}

\usepackage{setspace}

\usepackage[font=doublespacing]{caption}

\begin{document}

\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut
purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget,
consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.}
\end{figure}

\end{document}


-
hmm, setspace doesn't fix it for me? – rik May 2 '12 at 23:09
@rik Then you must be doing something different, and you should add a minimal working example to your question that shows the problematic behaviour. – lockstep May 2 '12 at 23:14
check out: pastie.org/3851166 – rik May 2 '12 at 23:23
@rik Compiles fine for me (after I added the demo option to the graphicx package). – lockstep May 2 '12 at 23:26
One need at least version 3.1 (2007/09/01) of the caption package for setspace support. Your version of the caption package is definitely older than that, as I can see from the error message. (\ProcessOptionsWithKV isn't used anymore since v3.0l) – Axel Sommerfeldt May 3 '12 at 5:04