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 am not a tex guru, but I need to modify my existing command \description to include boldtext.

Here is the command snippet:

    \def\description{\@ifnextchar[{\@describe}{\list{}{\labelwidth\z@
\labelsep=12pt\relax  %!!!!!!!!!
\leftmargini=12pt\relax  %!!!!!!!!!
\leftmargin=12pt\relax  %!!!!!!!!!
\itemindent-\leftmargin \let\makelabel\descriptionlabel}}}

Where and how and why do I insert \bfseries or \textbf to change the label to a bold version?


Additional information

% adjusted environment "description"
% if an optional parameter (at the first two levels of lists)
% is present, its width is considered to be the widest mark
% throughout the current list.
\def\description{\@ifnextchar[{\@describe}{\list{}{\labelwidth\z@
\labelsep=12pt\relax  %!!!!!!!!!
\leftmargini=12pt\relax  %!!!!!!!!!
\leftmargin=12pt\relax  %!!!!!!!!!
\itemindent-\leftmargin \let\makelabel\descriptionlabel}}}
%
\def\describelabel#1{#1\hfil}
\def\@describe[#1]{\labelsep=12pt\relax
\relax\ifnum\@listdepth=0
\setitemindent{#1}\else\ifnum\@listdepth=1
\setitemitemindent{#1}\fi\fi
\list{--}{\let\makelabel\describelabel}}
%
share|improve this question
1  
This isn't the full definition. You need to also copy the definitions of \@describe and \descriptionlabel. –  Caramdir Mar 23 '12 at 19:49
    
Why use this instead of the enumitem package? –  Mike Renfro Mar 23 '12 at 21:20

1 Answer 1

If you want to create a new environment modeled on description that has boldface labels, the best way is to use enumitem

\documentclass{article}

\usepackage{enumitem}
\newlist{bolddesc}{description}{4}
\setlist[bolddesc]{font=\normalfont\bfseries}

\begin{document}
\begin{bolddesc}
\item[Gnu] is a large animal

\item[Gnat] is a small animal
\end{bolddesc}
\end{document}

enter image description here

This actually doesn't give anything different from the standard environment, but enumitem has lots of bells and whistles to modify the appearance of a list environment.

share|improve this answer
1  
This can be achieved by using the default description environment of latex itself (by just \begin{description} and \end{description}). No need of using an extra package (enumitem) –  Harish Kumar Mar 23 '12 at 23:12
    
@HarishKumar Of course; it was just by way of example. It's hard to understand what the OP is trying to achieve. –  egreg Mar 23 '12 at 23:14
    
I agree. That was just for information to the OP. Thank you. –  Harish Kumar Mar 23 '12 at 23:15
    
Wow, Thanks for all the help; –  Dave Mar 25 '12 at 3:20
    
Here is the snippet plus describe and so on: –  Dave Mar 25 '12 at 3:21

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.