# Inconsistent behavior of setspace package in ctable doinside

This is odd:

\ctable[
doinside=\singlespacing,
%doinside=\setstretch{1}
]
{lp{5cm}}
{}
{\FL
Blubb & Blobb simply dummy text of the printing and typesetting industry. Lorem Ipsum
has been the industry's standard dummy text ever since the 1500s. \ML
\LL
}


\singlespacing in doinside gives various Errors. \doublespacing, \onehalfspacing works, as does \setstretch{x}. Could this be a bug? If so, where to report it? And do I get the same linespacing with \setstretch{1} as with \singlespacing?

-

Contrary to \doublespacing and \onehalfspacing, the \singlespacing command also adds a "Correction for coming into singlespace" (comment in setspace.sty), namely \vskip\baselineskip, and this results in \ctable producing an error. So either change the definition of \singlespacing or preferably use \setstretch{1} inside a ctable.

\documentclass{article}

\usepackage{setspace}

\makeatletter
\renewcommand{\singlespacing}{%
\setstretch{\setspace@singlespace}%
%  \vskip\baselineskip% REMOVED
}
\makeatother

\usepackage{ctable}

\begin{document}

\ctable[
doinside=\singlespacing,
%doinside=\setstretch{1}
]
{lp{5cm}}
{}
{\FL
Blubb & Blobb simply dummy text of the printing and typesetting industry. Lorem Ipsum
has been the industry's standard dummy text ever since the 1500s. \ML
\LL
}

\end{document}


-
Thanks a lot. The inner workings of Tex will always remain a mystery to me, but hooray for people like you who can explain us what's going on. ;) –  Narretz May 13 '12 at 17:13