Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.2 COMMON OBJECTS. 13<br />
this command should come before \opengraphsfile, as that command checks for the existence of<br />
the first numbered figure to determine if there are figures to be included.<br />
\every<strong>mfpic</strong>{〈commands〉}<br />
\everyend<strong>mfpic</strong>{〈commands〉}<br />
These commands store the 〈commands〉. The first arranges for these commands to be issued<br />
at the start of every <strong>mfpic</strong> environment and the second arranges for its commands to be issued<br />
at the end of every such environment. These could be any commands that make sense inside that<br />
environment. The purpose of these commands is to save typing if there is identical setup being<br />
performed in every picture.<br />
\begin{<strong>mfpic</strong>}...\end{<strong>mfpic</strong>}<br />
In LATEX you may prefer to use \begin{<strong>mfpic</strong>} and \end{<strong>mfpic</strong>} (instead of \<strong>mfpic</strong> and<br />
\end<strong>mfpic</strong>). This is by no means required. The sample file lapictures.tex provided with MFPIC<br />
illustrates this use of an <strong>mfpic</strong> environment in LATEX.<br />
One should be careful using TEX groups inside <strong>mfpic</strong> environments. These can be useful to limit<br />
the scope of declarations or of changes to some variables. However, they do not limit the scope of<br />
changes to the figure file that is being written, so there is a danger that TEX and METAFONT will<br />
have different values. There are also some MFPIC commands that need to be at the outermost level.<br />
Thus, grouping should generally be avoided except for those groups provided by MFPIC commands.<br />
For the remainder of the macros, the numerical parameters are expressed in graph units, the units<br />
of the local coordinate system specified by \<strong>mfpic</strong>, unless otherwise indicated.<br />
4.2 Common objects.<br />
The MFPIC macros that draw things can be roughly divided into two classes.<br />
1. Those that simply cause something to be drawn. Examples of these are the \point command,<br />
which places a dot at a list of coordinates, and \gridlines, which draw coordinate lines with<br />
specified separation.<br />
2. Those that both define and draw a path. The macros \circle, \rect, and \polyline are<br />
examples of these.<br />
Macros of type 2 are referred to hereafter as figure macros, for lack of a better term. With them<br />
one can use prefix macros to modify various aspects of the path and how it is drawn. For example,<br />
\polyline{(1,2),(3,4)}<br />
draws a line from (1,2) to (3,4), but<br />
\dotted\polyline{(1,2),(3,4)}<br />
produces a dotted version, and<br />
\arrow\polyline{(1,2),(3,4)}<br />
draws it with an arrowhead at the tip. This is not possible with \gridlines, for example. As MFPIC<br />
and the accompanying METAFONT package GRAFBASE are currently written, prefix macros can only<br />
be applied to single paths, and \gridlines produces a whole set of lines. In this manual, as each<br />
macro is introduced, if it is a figure macro, this will be explicitly stated.<br />
Some commands depend on the value of separately defined parameters. all these parameters<br />
are initialized when MFPIC is loaded. In the following descriptions we give the initial value of<br />
all the relevant parameters. MFPIC provides commands to change any of these parameters. When<br />
METAPOST output is selected, figures can be drawn in any color and several of the above mentioned<br />
parameters are colors. For example, drawcolor is the name of the default color used to draw curves,<br />
headcolor is used when drawing arrowheads, etc. To save repetition: all special colors for figures<br />
are initialized to black except background, which is white.