# How to set different line spacing in tabular and main body?

I want the main body to have 1.5 line spacing, while tabular environments should have the default (i.e. smaller) line spacing. However, the code below gives 1.5 line spacing to the whole document, including tables:

\documentclass[12pt, a4paper] {report}
\parindent = 0cm \parskip = 0cm
\renewcommand\baselinestretch{1.5}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce accumsan congue leo, at
convallis diam pulvinar nec. In venenatis neque mi, pellentesque dictum turpis ultrices
quis. \bigskip

\centering
\begin{tabular} { p{2cm} p{6cm} }
Hello World & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
accumsan congue leo, at convallis diam pulvinar nec. \\ \hline
Goodbye World & Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\
\end{tabular}
\end{document}


The answer at tex.stackexchange.com/a/79155 didn't work for me. In particular, I have tried replacing

• \renewcommand\baselinestretch{1.5} with \usepackage{setspace} \setstretch{1.5}
• \centering with \begin{center}

Note: \renewcommand\arraystretch{0.8} doesn't help because I'm concerned with the spacing between lines of text in a table, not between rows of a table.

A solution with setspace. I had to replace \hline with \midrulefrom booktabs to have some padding around the horizontal rule:

\documentclass[12pt, a4paper] {report}
\parindent = 0cm \parskip = 0cm
\usepackage{booktabs}
\usepackage{setspace}
\renewcommand\baselinestretch{1.5}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce accumsan congue leo, at
convallis diam pulvinar nec. In venenatis neque mi, pellentesque dictum turpis ultrices
quis. \bigskip

\begin{spacing}{0.8}\centering
\begin{tabular} { p{2cm} p{6cm} }
Hello World & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
accumsan congue leo, at convallis diam pulvinar nec. \\
\midrule
Goodbye World & Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\
\end{tabular}
\end{spacing}

\end{document}


It seems that putting tabular inside table gives the default line spacing. Bernard's answer works, but I'm reluctant to import packages (i.e. booktabs) unnecessarily.

\documentclass[12pt, a4paper] {report}
\parindent = 0cm \parskip = 0cm
\usepackage{setspace} \setstretch{1.5}
\renewcommand\arraystretch{1.3}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce accumsan congue leo, at
convallis diam pulvinar nec. In venenatis neque mi, pellentesque dictum turpis ultrices
quis.

\begin{table} [h!]
\centering
\begin{tabular} { p{2cm} p{6cm} }
Hello World & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce
accumsan congue leo, at convallis diam pulvinar nec. \\ \hline
Goodbye World & Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\
\end{tabular}
\end{table}
\end{document}