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.
Best Answer
The setspace package patches floating environments, footnotes etc. to be single-spaced. Unfortunately there is no package option to suppress that, so if you don't like your float single-spaced as default, insert the following code immediately after loading of the setspace package:
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 yourframed
environments.