4

In order to typeset lists with very tight interline spacing, I normally define my own tightlist using memoir's list environment.

Even though my definition (see shortly) (1) ensures that all vertical spacing parameters are zero and (2) uses the Spacing environment to ensure single-spacing (in a 1.5-or-wider spacing environment), I strangely get an extraneous empty line after a nested tightlist:

\documentclass{memoir}

\newenvironment{mytightlist}[3]{%
  \begin{Spacing}{1}%
  \begin{list}{#1}{%
    \setlength{\topsep}{0pt}%
    \setlength{\parskip}{0pt}%
    \setlength{\parsep}{0pt}%
    \setlength{\itemsep}{0pt}%
    \setlength{\leftmargin}{#2}%
    \setlength{\labelwidth}{#3}%
    \setlength{\labelsep}{0.5em}%
  }%
}%
{\end{list}\end{Spacing}}


\begin{document}

Text.

\begin{mytightlist}{\(\bullet\)}{1.5em}{0.5em}
\item Text.
  \begin{mytightlist}{\(\circ\)}{1.5em}{0.5em}
  \item Text.
  \item Text.
  \end{mytightlist}% there is an empty line here that shouldn't be there
\item Text.
\end{mytightlist}

Text.

\begin{mytightlist}{\(\bullet\)}{1.5em}{0.5em}
\item Text.
  \begin{mytightlist}{\(\circ\)}{1.5em}{0.5em}
  \item Text.
  \item Text.
  \end{mytightlist}\vspace{0pt}% this magically prevents the empty line from occurring
\item Text.
\end{mytightlist}

Text.

\end{document}

Issuing \vspace{0pt} after the nested tightlist eliminates the empty line, so that solves the problem, but why does this happen in the first place, and why does this solution work? It seems like this behavior is caused by how the Spacing environment interacts with the list environment.

10
  • 1
    Why are you adding Spacing around it?
    – daleif
    Commented Jun 19, 2013 at 8:15
  • @daleif Good observation! To ensure single-spacing within wider-spaced environments. It looks like this is the fault of Spacing. Let me edit the question title to make this clearer. Commented Jun 19, 2013 at 8:38
  • I'm not sure WTF is going on. But I'm guessing that when it is used within a list some of the vertical spacing macros behave differently.
    – daleif
    Commented Jun 19, 2013 at 8:40
  • In any case it might be better to use enumitem for configuring lists anyway.
    – daleif
    Commented Jun 19, 2013 at 8:41
  • If you replace \begin{Spacing}{1} with \setSpcaing{1} and remove \end{Spacing} it seems to work ok in a double spaced situation. Tough it still leave space below.
    – daleif
    Commented Jun 19, 2013 at 8:47

1 Answer 1

4

Don't use Spacing to begin with. But if you do (and you shouldn't), issue \begin{Spacing} only when really necessary.

\documentclass{memoir}
\usepackage[a4paper,margin=2cm]{geometry} % just to fit the example in one page
\usepackage{lipsum}

\newif\iftightlist
\newenvironment{mytightlist}[3]{%
  \iftightlist
    \def\finishspacing{}%
  \else
    \begin{Spacing}{1}\def\finishspacing{\end{Spacing}}%
  \fi
  \tightlisttrue
  \begin{list}{#1}{%
    \setlength{\topsep}{0pt}%
    \setlength{\parskip}{0pt}%
    \setlength{\parsep}{0pt}%
    \setlength{\itemsep}{0pt}%
    \setlength{\leftmargin}{#2}%
    \setlength{\labelwidth}{#3}%
    \setlength{\labelsep}{0.5em}%
  }%
}%
{\end{list}\finishspacing}


\begin{document}

\begin{Spacing}{1.5}

\lipsum*[2]

\begin{mytightlist}{\(\bullet\)}{1.5em}{0.5em}
\item \lipsum*[2]
  \begin{mytightlist}{\(\circ\)}{1.5em}{0.5em}
  \item \lipsum*[2]
  \item \lipsum*[2]
  \end{mytightlist}
\item \lipsum*[2]
\end{mytightlist}

\lipsum*[2]

\end{Spacing}

\end{document}

enter image description here

5
  • Is the problem nesting? or what is it that goes wrong here?
    – daleif
    Commented Jun 19, 2013 at 13:59
  • @daleif I really don't know; I tried the easiest path of not issuing \begin{Spacing}{1} if already in a mytightlist environment and it worked.
    – egreg
    Commented Jun 19, 2013 at 14:05
  • Why should people not use Spacing? Commented Jun 21, 2013 at 6:10
  • @LoverofStructure Increasing the interline skip can be done, but only for small fractions of the font size; some fonts need more room because of their shapes. A line spread factor of 1.3 or more is just awful, leaving the words drowning in a sea of white space.
    – egreg
    Commented Jul 1, 2013 at 20:10
  • I am entirely with you. As you know, some institutions require "doublespacing" for submissions, which is awful indeed (and I don't like "1.5-spacing" either), so Spacing in my case is intended to revert the spacing to the normal spacing that you'd find in books whenever I can get away with it. Commented Jul 1, 2013 at 20:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .