Changes

Jump to navigation Jump to search
1,322 bytes added ,  02:33, 5 September 2005
no edit summary
In the introduction to <i>The TeXbook</i>, Donald Knuth begins by instructing the reader to run <code>tex</code>, 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 (<cmd>starttext</cmd>, <cmd>stoptext</cmd>, and setup commands) that one generally wants to put into the document each time. However, the command line <i>is</i> very useful for experimenting with programming; one can define an macro, and then process it and investigate the results with <code>\show</code>, <code>\showthe</code>, <code>\message</code>, and similar constructions.

Unfortunately, simply running <code>texexec</code> 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 <code>console.tex</code> and put it somewhere in TeX's path.

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

\starttext
</texcode>

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

Navigation menu