[Tex/LaTex] Line spacing in supertabular multi lined table cells

line-spacingtables

I have created a table using the supertabular package with table cells containing from one to four lines of text. In my document I have defined a linespread of 1.5. I also have defined following table configurations.

\renewcommand{\arraystretch}{1}
\setlength{\tabcolsep}{5pt}

The problem I have is, that the spaces between the table cells are 1, as I want. But the spaces between the lines of text stay 1.5 caused by the global linespread setting.

Here is an example

\documentclass[a4paper,headsepline,12pt,toc=index,toc=bibliography,ngerman]{scrreprt}

\usepackage{supertabular}

\linespread {1.5}

\renewcommand{\arraystretch}{1}
\setlength{\tabcolsep}{5pt}

\begin{document}

\begin{table}[htbp]
\begin{supertabular}{|p{2.6in}|p{1.5in}|p{1.5in}|} \hline 
A & B & C \\ \hline 
very long text will be wrapped in the cell & another long text will be wrapped in the table cell & short text \\ \hline 
\end{supertabular}
\end{table}


\end{document}

How can I define a line spacing of 1 between two lines of text?

Best Answer

I'd use the setspace package rather than raw \linespread commands (to be honest I wouldn't increase line spacing at all).

Using supertabular in a table environment is surely overkill, as the table environment can't be split across pages.

\documentclass[a4paper,headsepline,12pt,toc=index,
  toc=bibliography,ngerman]{scrreprt}

\usepackage{setspace}
\onehalfspacing

\renewcommand{\arraystretch}{1}
\setlength{\tabcolsep}{5pt}

\begin{document}

\begin{table}[htbp]
\singlespacing
\begin{tabular}{|p{2.6in}|p{1.5in}|p{1.5in}|} \hline 
A & B & C \\ \hline 
very long text will be wrapped in the cell &
another long text will be wrapped in the table cell &
short text \\ \hline 
\end{tabular}
\end{table}


\end{document}