Difference between revisions of "Command/definetyping"
< Command
Jump to navigation
Jump to search
(Create reference page) |
m (cleanup) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
{{Reference | {{Reference | ||
|name=definetyping | |name=definetyping | ||
Line 25: | Line 23: | ||
Defines a new typing environment and the corresponding <tt>\start</tt> and <tt>\stop</tt> commands. The first argument is the name of the typing environment, the second argument are the options to apply for this environment. | Defines a new typing environment and the corresponding <tt>\start</tt> and <tt>\stop</tt> commands. The first argument is the name of the typing environment, the second argument are the options to apply for this environment. | ||
− | Note that difference with [[cmd:setuptyping]]: [[cmd:definetyping]] defines a new typing environment, while [[cmd:setuptyping]] changes the options of an existing typing environment (including the default environment that you get when using [[cmd:starttyping]]). | + | Note that difference with [[cmd:setuptyping|\setuptyping]]: [[cmd:definetyping|\definetyping]] defines a new typing environment, while [[cmd:setuptyping|\setuptyping]] changes the options of an existing typing environment (including the default environment that you get when using [[cmd:starttyping|\starttyping]]). |
Line 32: | Line 30: | ||
== Example == | == Example == | ||
− | < | + | <texcode> |
\definetyping | \definetyping | ||
[TTinput] | [TTinput] | ||
Line 44: | Line 42: | ||
\stopTTinput | \stopTTinput | ||
\stoptext | \stoptext | ||
− | </ | + | </texcode> |
== See also == | == See also == | ||
− | + | [[cmd:setuptyping|\setuptyping]] | |
[[Category:Reference/en|definetyping]] | [[Category:Reference/en|definetyping]] |
Revision as of 15:38, 11 April 2010
\definetyping
Syntax
\definetyping[...][...,...=...,...] | |
[...] | file typing name |
[...,...=...,...] | see \setuptyping |
Description
Defines a new typing environment and the corresponding \start and \stop commands. The first argument is the name of the typing environment, the second argument are the options to apply for this environment.
Note that difference with \setuptyping: \definetyping defines a new typing environment, while \setuptyping changes the options of an existing typing environment (including the default environment that you get when using \starttyping).
Example
\definetyping [TTinput] [before={\startframedtext[width=\makeupwidth, background=screen, backgroundscreen=.8]}, after={\stopframedtext}] \starttext \startTTinput test \stopTTinput \stoptext