4

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?

  • 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
5

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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