6

\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?

raphink
  • 31,894

1 Answers1

9

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

Gonzalo Medina
  • 505,128