Difference between revisions of "Command/define"

From Wiki
Jump to navigation Jump to search
Line 60: Line 60:
== See also ==
== See also ==
* [[Calculating_with_dimension_units]]
* [http://en.wikibooks.org/wiki/TeX/def http://en.wikibooks.org/wiki/TeX/def]
* [http://en.wikibooks.org/wiki/TeX/def http://en.wikibooks.org/wiki/TeX/def]

Revision as of 21:14, 22 April 2013



[...] number
{...} macro contents


and \defineexpandable is like \def.

The optional bracketed argument denotes the number of parameters you can give to your command. macro contents is the result when the macro gets expanded.


\define does not use \long; that means that in MkII multiple paragraphs (e.g. through \par or \endgraf) inside arguments will not work.

The name of the new command may not include numbers.


% wiki mode=mkiv

\define\hello{Good morning}

% You may not use numbers
% \define[1]\mp3{The ID3 Tag of the MP3 file is: #1}
% but this will work:
\define[1]\mpThree{The ID3 Tag of the MP3 file is: #1}

% You can use non-ASCII characters in MkIV, but not in MkII.
% This example is compiled using mkiv.
\define[1]\KüFst{Küstenfunkstelle, #1!}




See also

Help from ConTeXt-Mailinglist/Forum

All issues with: