Difference between revisions of "Command/definetyping"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=definetyping
 
|name=definetyping
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>definetyping</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 17: Line 18:
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
 
     <td class="cmd">[...,...=...,...]</td>
 
     <td class="cmd">[...,...=...,...]</td>
     <td>see [[Reference/en/setuptyping|\setuptyping]] </td>
+
     <td>see [[Command/setuptyping|\setuptyping]] </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
 
  
 
== Description ==  
 
== Description ==  
 
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}}: {{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}}).
  
  
Line 32: Line 32:
 
== Example ==
 
== Example ==
  
<pre class="example">
+
<texcode>
 
  \definetyping
 
  \definetyping
 
   [TTinput]
 
   [TTinput]
 
   [before={\startframedtext[width=\makeupwidth,
 
   [before={\startframedtext[width=\makeupwidth,
                             background=screen,
+
                             background=color,
                             backgroundscreen=.8]},
+
                             backgroundcolor=lightgray]},
 
     after={\stopframedtext}]
 
     after={\stopframedtext}]
 
  \starttext
 
  \starttext
Line 44: Line 44:
 
  \stopTTinput
 
  \stopTTinput
 
  \stoptext
 
  \stoptext
</pre>
+
</texcode>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
{{cmd|setuptyping}}
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Reference/en|definetyping]]
+
[[Category:Command/Verbatim Text|definetyping]]

Latest revision as of 20:46, 13 January 2020

\definetyping

Syntax (autogenerated)

\definetyping[...][...][...=...,...]
[...]name
[...]name
...=...,...inherits from \setuptyping


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=color,
                             backgroundcolor=lightgray]},
    after={\stopframedtext}]
 \starttext
 \startTTinput
 test
 \stopTTinput
 \stoptext

See also

\setuptyping

Help from ConTeXt-Mailinglist/Forum

All issues with: