[Tex/LaTex] Restricting linespread to an environment

line-spacing

\linespread doesn't seem to be taken in consideration when set in an environment. How can I reduce the space between lines in a specific environment?

Best Answer

Inside your environment you can use one of the commands \singlespacing, \onehalfspacing or \doublespacing, or the spacing environment from the setspace package; a little example:

\documentclass{article}
\usepackage{setspace}

\newcommand\TestText{test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test }
\newenvironment{myenv}[1]
  {\begin{spacing}{#1}}
  {\end{spacing}}

\begin{document}

\TestText
\begin{myenv}{1.6}
\TestText
\end{myenv}
\begin{myenv}{0.6}
\TestText
\end{myenv}

\end{document}

enter image description here

Related Question