2

Following the diagram here:

\topsep, \itemsep, \partopsep and \parsep - what does each of them mean (and what about the bottom)?

is there a name for the vertical rather than horizontal space between the label of an item in a list and its corresponding text (for the case where the label is longer than \leftmargin so the text gets pushed down)?

I'm not finding any such term in the documentation of enumitem.

  • This happens with some description styles. The usual \baselineskip is used, so it doesn't need to have a name. – Bernard Aug 5 '17 at 12:50
  • I’m not sure to understand what you are asking for, but try adding \leavevmode\\*[\smallskipamount] (say) just after the closing bracket of the relevant \item[...] command. – GuM Aug 5 '17 at 22:18
  • @Bernard: So you're telling me there's no way to control it independently of \baselineskip? :-( – einpoklum Aug 5 '17 at 22:38
  • @JohnKormylo: I'm reading your comments, but I must be missing something since they sound like an answer to another question :-( – einpoklum Aug 5 '17 at 22:39
  • @GuM: That seems to always insert at least one empty paragraph, even if I replace \smallskipamount with, say, 1pt. Can't I avoid that somehow? – einpoklum Aug 5 '17 at 22:52
3

Normally, there is no vertical spacing between the label of an item in one of the standard lists and the following text – only a horizontal spacing, namely \labelsep and \itemindent.

However, as mentioned by @GuM, you can manage to have a line break manually, and it's up to you to add such a spacing. This is easy for enumerate and itemize, writing \leavevmode\\[some verticalskip] just after \item.

Unfortunately it doesn't work for description environments. I propose a solution, which consists in defining a new Description environment for which the \descriptionlabel command is redefined to incorporate an invisible rule below the base line. The length of this rule is an optional argument of the environment (rather arbitrary default: 3mm). Thanks to xparse, the environment accepts a second optional argument, for the set of key = some value to be handed to the description environment.

Here is an example:

\documentclass{article}%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}
\usepackage{lipsum}
\usepackage{enumitem}
\setlist[description]{leftmargin = 12mm}
\usepackage{xparse}
\NewDocumentEnvironment{Description}{O{3mm}O{}}{\renewcommand*\descriptionlabel[1]{\rule[-#1]{0pt}{#1}\hspace\labelsep
                            \normalfont\bfseries ##1}\description[style =standard, labelwidth=\textwidth, #2]}{\enddescription}

\begin{document}

‘Force next line’:

\begin{Description}[1.8ex][font=\sffamily\color{FireBrick!60}]
\item[One]\lipsum[4]
\item[And another one] \lipsum[4]
\end{Description}

\end{document} 

enter image description here

2

My crystal ball suggests that you might be using the style=nextline key that the enumitem package provides for description environment. If this is the case, the workaround I suggested in a comment is obviously not applicable. However, since the nextitem style doesn’t “box” the label, you can achieve what you want by including an appropriate \vspace command at the end of your label text, as the following MWE shows:

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage{enumitem}



\begin{document}

Preceding text.

\begin{description}[style=nextline,leftmargin=6pc]

    \item[A]
        The text of the first description.

    \item[Short label]
        Full description of the second item in the list follows here.
        Let's add a few words so that it makes it to the second line.

    \item[A somewhat longer label]
        Here's the text of the thirs description, or, better, the description of
        the third item in the list.

    \item[Similar, but with vertical space\vspace{\smallskipamount}]
        Replace the argument of \verb|\vspace| (here, \verb|\smallskipamount|) 
        with any rubber length of your choice.

    \item[Abc def ghij\vspace{\smallskipamount}]
        If the label is ``short'', then it gets boxed, thus suppressing the 
        vertical spacing.

    \item[Wrong]\leavevmode\\*[\smallskipamount]
        The workaround I~suggested in a comment does \emph{not} work as 
        expexted in the context of a \texttt{description} environment with 
        \texttt{style=nextline}, neither for ``short'' labels\ldots

    \item[And wrong as well]\leavevmode\\*[\smallskipamount]
        \ldots nor for ``long'' ones; retrospectively, this is obvious!

\end{description}

Following text.

\end{document}

Here’s the output I get:

Output of the code

  • Your crystal ball reads true. I'll try to make my issue into a separate question to which you could move this answer, but generating a MWE is proving a bit tricky. – einpoklum Aug 6 '17 at 9:09

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.