Difference between revisions of "Command/setuptyping"
< Command
Jump to navigation
Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}") |
m (Improve formatting a bit) |
||
Line 102: | Line 102: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
== Description == | == Description == | ||
Line 121: | Line 120: | ||
== Example == | == Example == | ||
− | < | + | <context source=yes> |
− | + | \setuptyping | |
[before={\startframedtext[width=\makeupwidth, | [before={\startframedtext[width=\makeupwidth, | ||
background=screen, | background=screen, | ||
Line 128: | Line 127: | ||
after={\stopframedtext}] | after={\stopframedtext}] | ||
− | + | \starttext | |
− | + | \starttyping | |
− | + | This is a \test{} | |
− | + | and everything | |
− | + | is printed just as I write it | |
− | </ | + | \stoptyping |
− | + | \stoptext | |
+ | </context> | ||
== See also == | == See also == | ||
− | {{cmd|typefile}} | + | * {{cmd|typefile}} to print files verbatim |
− | + | * {{cmd|starttyping}} to print lines verbatim | |
+ | * {{cmd|definetyping}} to define a custom typing environment | ||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == |
Revision as of 19:45, 8 June 2012
\setuptyping
Syntax
\setuptyping[...][...,...=...,...] | |
[...] | file typing name |
space | on off fixed |
page | yes no |
option | slanted normal commands color none |
text | yes no |
icommand | command |
vcommand | command |
ccommand | command |
before | command |
after | command |
margin | dimension standard yes no |
evenmargin | dimension |
oddmargin | dimension |
blank | dimension small medium big standard halfline line |
escape | character |
tab | number yes no |
indentnext | yes no |
style | normal bold slanted boldslanted type cap small... command |
color | name |
palet | name |
lines | yes no hyphenated |
empty | yes all no |
numbering | line file no |
Description
Changes options for displaying verbatim text. When called with a single argument, this command changes the options for the default typing environment as created with \starttyping. When the optional argument is given, it identifies a specific typing environment (as created with \definetyping).
\setuptyping can be used multiple times to change options and options will stay in effect until the end of file.
Note that \setuptyping also affects the display of the \typefile command.
- space
- fixed: Lines will not be broken, even if too long (may cause "overfull hbox" message)
- lines
- no (default): no hyphenation
- yes: no hyphenation and left aligned text (align key is ignored)
- hyphenated: hyphenation
Example
\setuptyping [before={\startframedtext[width=\makeupwidth, background=screen, backgroundscreen=.8]}, after={\stopframedtext}] \starttext \starttyping This is a \test{} and everything is printed just as I write it \stoptyping \stoptext
See also
- \typefile to print files verbatim
- \starttyping to print lines verbatim
- \definetyping to define a custom typing environment
Help from ConTeXt-Mailinglist/Forum
All issues with: