Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to add a bullet point to description lists.

\begin{description}
  \item[Term] Description
\end{description}

Basically what I want looks like the following, when rendered:

\begin{itemize}
  \item \textbf{Term} Description
\end{itemize}

Using the itemize hack does not feel right. Is there a better solution?

share|improve this question
add comment

3 Answers 3

up vote 10 down vote accepted
\documentclass{article}
\let\Item\item
\newcommand\SpecialItem{\renewcommand\item[1][]{\Item[\textbullet~\bfseries##1]}}
\renewcommand\enddescription{\endlist\global\let\item\Item}
\begin{document}
\SpecialItem
\begin{description}
  \item[Text] more text
  \item[and some] more text
  \item[] empty
\end{description}

\begin{description}
  \item[Text] more text
  \item[and some] more text
  \item[] empty
\end{description}

\end{document}

without setting \SpecialItem it will be a default list

share|improve this answer
    
This works! (bullet point is a bit smaller than the bullet point of itemize, but that's no big deal). Can I somehow wrap this in a single command, so I could do this selectively for some description lists? –  knittl May 30 '12 at 14:12
    
@knittl: see edited answer –  Herbert May 30 '12 at 14:24
    
@Herbert: If you move \SpecialItem to be after \begin{description}, then the renewcommand\enddescription{} is not needed. –  Peter Grill May 30 '12 at 18:47
    
@PeterGrill: I know, but I prefer the other way –  Herbert May 30 '12 at 18:59
    
@Herbert: I guess your way is safer in that \SpecialItem can be invoked both from within the description environment and from outside. –  Peter Grill May 30 '12 at 19:20
show 1 more comment

The enumitem package menitions the following solution

\documentclass{article}
\usepackage{enumitem}
\newcommand\litem[1]{\item{\bfseries #1,\enspace}}
\begin{document}
 \begin{itemize}[label=\textbullet]
  \litem{Text} more text
 \end{itemize}

\end{document}

Obviously this is not much nicer than what you do already...

share|improve this answer
add comment

Using enumitem one can simplify the matter

\newenvironment{mydescription}
  {\description[before=\let\makelabel\bulletbfseriesmakelabel]}
  {\enddescription}
\newcommand\bulletbfseriesdescriptionlabel[1]{\textmd{\textbullet}~\textbf{#1}}

In the optional argument to \description one can add other customizations.

A more complicated way, that ensures one always uses the original enumitem provided \makelabel is

\newcommand{\changemakelabel}{%
  \let\enumitemmakelabel\makelabel
  \renewcommand\makelabel[1]{%
    \enumitemmakelabel{\normalfont\textbullet~\textbf{##1}}%
  }%
}

and then

\newenvironment{mydescription}
  {\description[before=\changemakelabel]}
  {\enddescription}

A perhaps simpler technique is changing the \descriptionlabel command; here's a way:

\documentclass{article}
\usepackage{enumitem}

\newcommand{\bulletdescriptionlabel}[1]{%
  \hspace\labelsep
  \normalfont
  \textbullet\ %
  \bfseries #1}

\newlist{mydescription}{description}{1}
\setlist[mydescription]
  {before=\let\makelabel\bulletdescriptionlabel}

\begin{document}
\begin{mydescription}
\item[title] test2
\end{mydescription}
\end{document}

One might want to simply patch the current \descriptionlabel command in a more abstract way, instead of having to look up the definition of \descriptionlabel.

\usepackage{etoolbox}
\let\bulletdescriptionlabel\descriptionlabel
\patchcmd\bulletdescriptionlabel
  {#1}
  {{\normalfont\textbullet\ }#1}
  {}{}

that is, getting a copy of \descriptionlabel and modifying it so that it typesets {\normalfont\textbullet\ } before the argument (which is the optional argument to \item).

share|improve this answer
    
Why is the more complicated way required? And what is wrong with the first approach? –  drozzy Jun 18 '12 at 19:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.