\startcomponent work-en-gettingstarted

\product work-en

\chapter{How to process a file}

\index{input file+processing}
\index[pdffile]{\type{pdf}--file}

Assuming \CONTEXT\ is installed on your system already and that your
input file is named \type{myfile.tex}, to process a \CONTEXT\ input
file you can type at the command line prompt:

\starttyping
context myfile
\stoptyping

the extension \type{.tex} is not needed. 

Note: some specialized text editors are aware of the existance
\CONTEXT, and these allow you to run \CONTEXT\ by simply selecting a
menu entry or pressing a key combination. You should check the
documentation of your text editor of choice whether this is possible.
This book sticks with explaining the command line because in the
end even these editor tools will result in a command line
that is passed on to the operating system.

After pressing \Enter\ processing will be started. \CONTEXT\
will show processing information on your screen. If
processing is succesful the command line prompt will return
and \CONTEXT\ will produce a \type{pdf} file.

If processing is not succesful ---for example because you
typed \type{\stptext} instead of \type{\stoptext}---
\CONTEXT\ produces a \type{ ? } on your terminal and tells
you it has just processed an error. It will give you some
basic information on the type of error and the line number
where the error becomes effective.

After a \type{ ? } appears you can type:

\starttabulate[|||]
\NC \type{H} \NC for help information on your error \NC\NR
\NC \type{I} \NC for inserting the correct \CONTEXT\ command \NC\NR
\NC \type{Q} \NC for switching on batch mode wherein further errors are ignored\NC\NR
\NC \type{X} \NC for exiting the run immediately \NC\NR
\NC \Enter   \NC for ignoring the error \NC\NR
\stoptabulate

Most of the time you will type \Enter\ and processing will continue.
Then you can edit the input file and fix the error.  

Some errors will produce a~\type{ * } on your screen and processing
will stop. This kind of error is due to an unrecoverable error in your
input file. You can't ignore these errors, so the only option you have
is to type \type{\stop} or {\sc Ctrl}~Z/{\sc Ctrl}~C or whatever is
the way to abort programs under your operating system. The \LUATEX\
program will be closed and you have to fix the error in the file
afterwards.

When an error has happened, \CONTEXT\ will not perform any further
processing runs because it assumes the output will be incorrect
anyway. In odd cases (errors inside the table of contents, for
example) this means that you will have to delete the auxilliary file
manually to get out of an infinite error loop. See
\in{chapter~}[processingfiles] for details.

During the processing of your input file \CONTEXT\ will also
inform you of what it is doing with your document. For
example it will show page numbers and information about
process steps. Further more it gives warnings. These are of
a typographical order and tells you when line breaking is not
successful. All information on processing is stored in a
\type{log} file that can be used for reviewing warnings and
errors and the respective line numbers where they occur in
your file.

When processing is succesful \CONTEXT\ produces a new file, with the
extension \type{.pdf}, so for the example above the file
\type{myfile.pdf} is generated. The abbreviation \PDF\ stands for
Portable Document Format. This is a platform independent format for
printing and viewing.

Normally 

\starttyping
context myfile
\stoptyping

is all you need, but the command \type{context} supports a number of
command line options for special features. Some of these options will be
mentioned in passing in the next chapters, and there is a reference
section in the back of this book.

\stopcomponent
