Verbatim text

From Wiki
Revision as of 08:33, 2 June 2005 by Peter (talk | contribs)
Jump to navigation Jump to search

< Visuals

Displayed text

\starttyping, \typebuffer

In-line text

Interesting features

Using ConTeXt-commands inside verbatim text:

\definetyping[C][option=commands]
\startC
#include 
int main(){
	return 0;
	/BTEX{\em unreachedCode;}/ETEX
}
\stopC

Adjusting size of tabulator (since 2005.06.01):

\definetyping[C][tab=4]
% for older ConTeXt versions: \chardef\spacespertab=3
\startC
int func(int a){
	if(a > 4)
		return 0;
	else
		return 10;
}
\stopC