[texhax] \newcommand*
Reinhard Kotucha
reinhard.kotucha at web.de
Sat Mar 19 01:10:36 CET 2005
>>>>> "Sorin" == Sorin Marti <mas at semafor.ch> writes:
> Michael Barr wrote:
>> While trying to figure out how the toc works, I came on some
>> macros defined with \newcommand*. I find nothing about it in the
>> Latex Companion (1994 version at least). How does it differ from
>> \newcommand?
>>
>> _______________________________________________
>>
>>
> This causes that this item is not numbered in the toc. You also
> can do that, with \section*
The meaning of the star depends on the command which it is attached
to. The star in \newcommand* has a different meaning than the star in
\section*. It only provides an alternative form of the particular
command.
As far as \newcommand is concerned, suppose you have someting like
\mycommand{myargument}. Usually there is no difference whether
\mycommand has been defined by \newcommand or \newcommand*, but if you
forget the closing curly brace, you get an error message (runaway
argument) at the end of the paragraph if \mycommand was defined by
\newcommand*, otherwise the error message will appear at the end of
the file.
Therefore use \newcommand* unless the argument contains more than one
paragraph.
>>>>> "Lars" == Lars Madsen <daleif at imf.au.dk> writes:
> the *-ed version saves memory
Yes, but only if your input file is buggy.
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.
----------------------------------------------------------------------------
More information about the texhax
mailing list