Console Mode

From ConTeXt wiki

In the introduction to The TeXbook, Donald Knuth begins by instructing the reader to run tex, and then simply start typing at the command line that appears. This is a good way to explore TeXing, as there's no need to switch between the editor and the processor to experiment.

In ConTeXt, the command line is less useful for initial learning, as there is a fair bit of machinery (\starttext, \stoptext, and setup commands) that one generally wants to put into the document each time. However, the command line is very useful for experimenting with programming; one can define an macro, and then process it and investigate the results with \show, \showthe, \message, and similar constructions.

Unfortunately, simply running texexec without a filename will merely spit out some version and help information, and exit. In order to get to a command line, one can instead put the following text in a file named console.tex and put it somewhere in TeX's path.

% A ConTeXt document which runs \type{\starttext} and
% then leaves things at the console for manual continuation.

\starttext

Then, running texexec console will open a TeX command line with all of ConTeXt preloaded.