% This example shows commands for defining typographic parameters.
% You can define these parameters in units such as in, mm or pt,
% but if you define them in terms of font dimensions, then they will
% adapt themselves to changes in font size.
% 1em = width of `m'; 1ex = height of `x'

% \blank adds vertical whitespace; define what we mean by
% \blank[normal]
\defineblank[normal][3.5ex]
%\defineblank[small][1.75ex]
\defineblank[small][7pt]

% conventional paragraph marking:
% 1 em indentation
\indenting[yes]
\setupindenting[1em]
% no whitespace between paragraphs
\setupwhitespace[none]
% 3.5ex distance between baselines
\setupinterlinespace[line=3.5ex]

% we want raggedright, which is called rightaligned in Context
\setupalign[right]

% typography for `\title' head
\setuphead[title]
  [style={\ss \tfc},
   after=\blank]

% typography for `\subject' heads
\setuphead[subject]
  [before=\blank,
   after={\blank[small]},
   style={\switchtobodyfont[sans,16pt]\bf}]

\setuplayout[grid=no]

\starttext

\title{What is TeX?}

\subject{Introduction}

A text in TeX format is a plain ascii file, such as can be read and
written by any wordprocessor or ascii editor. Formatting is done by
inserting ascii formatting codes (voorbeeld).

Printing is done in two steps: first a dvi (DeVice Independent) file
is generated, and in a separated step this dvi file is printed or
converted to PostScript and then to pdf.\blank

% Change typography locally. Leading and indentation adjust
% themselves automatically since they are defined in terms of font
% dimensions.

\start[bigger] % `bigger' is an arbitrary label
\switchtobodyfont[16pt]
TeX is built by Donald Knuth, a mathematician who was dissatisfied
with the quality of the typesetting of his books. What was meant to
be a quick hack took him seven years. He made TeX freely available
to anybody, and versions are now available for virtually any
computer platform.

TeX is a full-fledged programming language. This distinguishes it
from older markup-based typesetting systems such as troff. It is
especially popular among scientists: modern wysiwyg wordprocessors
become increasingly impractical as the amount of math and the size
and complexity of a document increases.

\stop[bigger]

\subject{LaTeX}

Most users of TeX use a macro package on top of TeX, and by far the
most popular macro package is LaTeX.

LaTeX allows one to specify structure rather than exact typographic
details, just as in HTML and SGML/XML. Examples of structural
elements in LaTeX are the sectioning commands and the
cross-referencing engine. It also takes care of automatic generation
of tables of contents.  Modern wordprocessors provide these
facilities too, but can't touch TeX in terms of speed, reliability
or flexibility.

LaTeX has its share of problems, too: a culture has come into
existence of mutually incompatible packages, and it is difficult to
tailor LaTeX's typography to one's own tastes or requirements.

\subject{Context}

Context provides an interesting alternative. Centralized development
guaratees internal consistency, and it is suitable for a much
broader range of layout requirements, including screen-based,
interactive applications.

Context has a nice keyword-value syntax. However, it may cost
seasoned (La)TeX users a lot of time finding out how to do things
the Context way.

\stoptext
