# [texhax] boldfacing words from a list

Reinhard Kotucha reinhard.kotucha at web.de
Thu Sep 28 23:20:16 CEST 2006

>>>>> "Philip" == Philip TAYLOR <P.Taylor at rhul.ac.uk> writes:

> Tom Schneider wrote:

>> Nice.  Presumably one generalizes using:
>>
>> \newcommand{\vocabulary}{\textbf{#1}}

> Possibly ...  That looks like LaTeX-ese, which I don't speak; I
> would have written the Plain version, something along the lines of
> :

> 	\def \vocabulary #1{\textbf {#1}}

You can say "\def\vocabulary" in LaTeX but you should make sure that
"\vocabulary" is undefined before you use it.  And even if it is
undefined, you cannot be sure that it is undefined after you decided
to include another package.

The advantage of using \newcommand is that it complains if the macro
is already defined.  The error message occurs in the package which
contains the \newcommand.  If you use \def, your macro works but if
you accidentally overwrite a macro with the same name provided by
another package you get a confusing error message.

> if I guess that \textbf {#1} has much the same effect as Plain
> TeX's {\bf #1}.

If you say \textbf{-} you get a hyphen but if you say \mathbf{-} you
get a minus sign.  That's why {\bf #1} is deprecated in LaTeX.

LaTeX is a little bit more than just a bunch of plain TeX macros.

Regards,
Reinhard

--
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------