% output=pdftex engine=pdftex language=uk
%
% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa

\startcomponent mfun-023

\environment mfun-000

\chapter {Conventions}

When reading this manual, you may be tempted to test the
examples shown. This can be done in several ways. You can
make a file and process that file by \METAPOST. Such a file
looks like:

\starttyping
input mp-tool ; % some initializations and auxiliary macros
input mp-spec ; % macros that support special features

beginfig(1) ;
  fill fullcircle scaled 5cm withcolor red ; % a graphic
endfig ;

end .
\stoptyping

Don't forget the semi||colons that end the statements. If
the file is saved as \type {yourfile.mp}, then the file is
processed by:

\starttyping
mpost yourfile
\stoptyping

The results are available in \type {yourfile.1} and can be
viewed with \GHOSTSCRIPT. You don't need to close the file
so reprocessing is very convenient.

Alternatively you can use \CONTEXT. In that case, a simple
file looks like:

\starttyping
\starttext
\startuseMPgraphic{dummy}
  fill fullcircle scaled 5cm withcolor red ;
\stopuseMPgraphic
\useMPgraphic{dummy}
\stoptext
\stoptyping

If the file is saved as \type {yourfile.tex}, then you can
produce a \DVI\ file with:

\starttyping
texexec yourfile
\stoptyping

A \PDF\ file, viewable in \ACROBAT\ or \GHOSTVIEW, is produced
with:

\starttyping
texexec --pdf yourfile
\stoptyping

Depending on how your system is set up, \CONTEXT\ will run
\METAPOST\ during the \TEX\ run or afterwards. If you want
to process a \METAPOST\ file separately using \TEXEXEC, you
should say:

\starttyping
texexec --mptex yourfile.mp
\stoptyping

This is the preferred way when a graphic contains \TEX\
directives (\type {btex} cum suis) or when the \METAPOST\
file is generated by \CONTEXT.

We will use lots of color. Don't worry if your red is not
our red, or your yellow does not match ours. We've made
color definitions to match the overall design of this
document, but you should feel free to use any color of
choice in the upcoming examples.

By default, \CONTEXT\ has turned its color mechanism off. If
you want your graphics to have color, you should say:

\starttyping
\setupcolors[state=start]
\stoptyping

\stopcomponent
