# figure overrides linespacing

I am using framed package to draw a box around some texts. When I compile it without wrapping it up in the figure command I have no problem. However, when I use it like this:

\documentclass[a4paper,12pt]{report}
\usepackage{setspace} % for switching between double/single space in document‎
\usepackage{framed}‎‎
\usepackage[top=3cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}‎

\doublespacing‎‎

\begin{document}‎
this is a line

this is a line

\begin{figure}‎
\begin{framed}
this is a line

this is another line
\end{‎framed}‎‎
\caption[figure1]‎{description for figure1}‎‎‎
\label{Fig_1}‎‎ %for Lockstep point!see the comments!
\end{figure}

\end{document}‎


the linespacing reverts to default (see the attached image). Am I missing something?
BTW, I have seen Post1 and Post2, still no clue. If it is important why I used framed, I must mention that when using double spacing, the text spans more than 1 page and framed does a nice job.

• Please post a complete but minimal example. – Axel Sommerfeldt Jan 2 '11 at 14:06
• I have just edited the code. – Yasser Sobhdel Jan 2 '11 at 14:22
• The \label command should be placed after the \caption command. – lockstep Jan 2 '11 at 14:26
• Why? I don't get the point. What is the difference? But I just edited it and added a comment! – Yasser Sobhdel Jan 2 '11 at 14:43
• The \label command will refer to the last command that stepped a "referable" counter (e.g., \section or \caption). To observe this in your code example, add two sections before the figure and \ref{Fig_1} after the figure. A \label before \caption will actually refer to the second section, not to the figure. – lockstep Jan 2 '11 at 15:00

\usepackage[...]{setspace}

But please note that this will increase the vertical distance between figure body and figure caption, too. (And make the captions double-spaced as well.) If you don't like this, forget about the code above and better use \doublespacing inside your framed environments.