Difference between revisions of "Command/define"

From Wiki
Jump to navigation Jump to search
Line 47: Line 47:
== See also ==
== See also ==
[http://en.wikibooks.org/wiki/TeX/def http://en.wikibooks.org/wiki/TeX/def]
<!-- something like [[cmd:goto|\goto]] -->
<!-- something like [[cmd:goto|\goto]] -->

Revision as of 19:05, 18 April 2010



[...] number
{...} text


\define is like the TeX primitive \def: it defines a new TeX macro. Unlike \def, it will not allow you to redefine an already defined command.

The optional (bracketed) argument denotes the number of parameters you can give to your command. text is the result when the macro gets expanded. \define is not \long, that means you cannot use \par inside the arguments.


is there any bonus when I use \define instead of \def? -PG


\define[1]\hello{Good morning, #1}

\hello{mom} % Good morning mom

See also