Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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}

enter image description here

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.