5

I have description lists that I'm using discursively, like

\begin{description}
    \item[Video recordings] arguably produced the richest part of the data set.
    \item[Questionnaires] were no second, mind you!
\end{description}

Unfortunately this renders with a space between the label and the item that is larger than the regular space between words on the same line:

An example of a description list in LaTeX.

Is there anything I can do to make that space between "Video recordings" and "arguably" equal to that between "arguably" and "produced" and so on?

4 Answers 4

6

enter image description here

\documentclass[12pt]{article}
\usepackage{enumitem}
\begin{document}

\begin{description}[labelsep=\fontdimen2\font]
    \item[Video recordings] arguably produced the richest part of the data set.
    \item[Questionnaires] were no second, mind you!
\end{description}

\end{document}

To control the space between the label and the item, you can change the labelsep parameter of the description list (available from the enumitem package). To obtain the regular word spacing, you need \fontdimen2 (the normal interword space) for labelsep. This is done by passing:

[labelsep=\fontdimen2\font]

as an option to the description environment.

1
  • This will not stretch or shrink, so it won't actually be like the other interword spaces in the line unless the item is just one line long or you're very lucky.
    – egreg
    Sep 9, 2015 at 20:23
2

Loading enumitem, you can play with labelsep:

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\begin{description}[labelsep=0pt]
    \item[Video recordings] arguably produced the richest part of the data set.
    \item[Questionnaires] were no second, mind you!
\end{description}


\begin{description}[labelsep=2cm]
    \item[Video recordings] arguably produced the richest part of the data set.
    \item[Questionnaires] were no second, mind you!
\end{description}

\end{document} 

enter image description here

3
  • Apparently our solutions weren't acceptable ;-) (+1)
    – user31729
    Sep 9, 2015 at 20:17
  • @Christian Hupfer: What the O.P. wanted was not very explicit, but AboAmmar was smarter than us – he guessed.
    – Bernard
    Sep 9, 2015 at 20:22
  • Yes, the question was not very clear
    – user31729
    Sep 9, 2015 at 20:23
2

It's possible, by stretching a bit the list model; in the case of description it's not really a big problem provided you don't nest enumerated lists inside description.

\documentclass{article}
\usepackage{lipsum} % for context

\makeatletter
\renewenvironment{description}
  {\list{}{%
    \labelwidth\z@
    \itemindent-\leftmargin
    \labelsep=\z@
    \let\makelabel\descriptionlabel
    \let\item\desc@item
  }}
  {\endlist}
\def\desc@item[#1]{\@item[#1]\ \ignorespaces}
\makeatother

\begin{document}
\lipsum*[2]
\begin{description}

\item[Video recordings] arguably produced the richest part of the data set.

\item[Questionnaires] were no second, mind you! Some text that should
  make the~text~wrap over a couple of lines

\end{description}
\end{document}

enter image description here

A magnified view (click on it for even higher resolution)

enter image description here

3
  • @ChristianHupfer You need glasses.
    – egreg
    Sep 9, 2015 at 20:29
  • @ChristianHupfer I'll add a high resolution screenshot.
    – egreg
    Sep 9, 2015 at 20:33
  • @ChristianHupfer The distances are supposed to be different!
    – egreg
    Sep 9, 2015 at 20:39
0

A mild alternative to egreg's answer if you want to intermix the regular description with a modified bfdesc:

enter image description here

\documentclass{article}
\usepackage[paper=a6paper,showframe]{geometry}% Just for this example

\newenvironment{bfdesc}
  {\begin{description}
   \let\olditem\item
   \renewcommand{\item}[1][]{%
     \olditem% Set old \item without [..]
     \hspace*{-\labelsep}% Remove \labelsep
     {\bfseries ##1}% Set new \item
     \space% Insert space (\ )
     \ignorespaces}}% Ignore any following spaces
  {\end{description}}

\begin{document}

\begin{description}
  \item[Video recordings] arguably produced the richest part of the data set.
  \item[Questionnaires] were no second, mind you!
\end{description}

\begin{bfdesc}
  \item[Video recordings] arguably produced the richest part of the data set.
  \item[Questionnaires] were no second, mind you!
\end{bfdesc}

\end{document}

You must log in to answer this question.

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