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.

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?

share|improve this question
    
Can you show a fully functional MWE? Most of all the implementation of the supertabular environment would be interesting. –  Count Zero May 29 '12 at 8:55
    
I've added a MWE –  martin May 29 '12 at 9:06
1  
Ok, I see now. I had the impression from your wording that you had created a supertabular of your own. :) I edited your question in accordingly. Hope that's ok with you. –  Count Zero May 29 '12 at 9:12
add comment

1 Answer

up vote 5 down vote accepted

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}
share|improve this answer
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.