Changes

Jump to navigation Jump to search
4 bytes added ,  16:22, 11 November 2019
no edit summary
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>define</syntax>
== [[Help:Reference|Syntax]] ==
<tr valign="top" class="third">
<td class="cmd">{...}</td>
<td><i>text</i> ''macro contents''</td>
</tr>
</table>
== Description ==
<code>\define</code> is like the TeX primitive <code>\def</code>: it defines a new TeX macro. Unlike <code>\def</code>, <code>\define</code> will print an error to the log file if the new definition overwrites an existing command.
* In MkII, {{cmd|define}} is like the TeX primitive {{tex|def}}: it defines a new TeX macro.
* In MkIV {{cmd|define}} is like {{tex|unexpanded}}{{tex|def}}
: and \defineexpandable is like {{tex|def}}.
The optional bracketed argument denotes the number of parameters you can give
to your command. "text" ''macro contents'' is the result when the macro gets expanded.
== Pitfalls ==
<code>\define</code> does not use {{cmdtex|long}}, ; that means that in MkIImultiple paragraphs (e.g. through {{cmdtex|par}} or {{cmd|<tt>\endgraf}}</tt>)
inside arguments will not work.
== See also ==
 * [http://en.wikibooks.org/wiki/TeX/{{tex|def http://en.wikibooks.org/wiki/TeX/def]}}
== Help from ConTeXt-Mailinglist/Forum ==

Navigation menu