Command/type

From Wiki
Jump to navigation Jump to search


\type

Summary

The command \type typesets verbatim TeX code

Settings

\type[...=...,...]{...}
...=...,...inherits from \setuptype
{...}content

Settings angles

\type[...=...,...]<<...>>
...=...,...inherits from \setuptype
<<...>>angles

Description

Verbatim text, typeset in typewriter font.

In a caption (and probably other places), \type can cause errors if it contains active characters (| for example). You can use

\type{...}\type{|}\type{...}
as a workaround, since the first character is not expanded.


Examples

Example 1

Plain example: \type{\bf You can type any %ld thing you |ike, even command$.}

Alternate delimiters: \type-You can choose your own delimiters-

With options \type[option=TEX]{\ConTeXt\ colouring}

Preserving some spaces needs more work

In some cases spaces disappear unless you do a bit more work.  For example, notice the missing space here: \type{\someCommand [option]}.

The following usage preserves that space: \type[compact=last]{\someCommand [option]}.

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: