To insert a figure in the body of the text, use a sequence of commands like this:

\figure \figrdef{fig:figure name} [\vbox goes here] \begincaption {The caption} \endcaption \endfigure

Between \figure and \begincaption, put a \vbox containing the figure. If you are using \PiCTeX, you may simply put \beginpicture\endpicture between them, as \PiCTeX wraps its pictures up in a vbox. See figure 1.3.1.

\beginpicture\ninepoint \ifdraft \setdots < \draftresolution>\fi \setcoordinatesystem units < 0.75in,0.5in> \setplotarea x from 0 to 2, y from 0 to 2 \axis bottom ticks withvalues 0 $p/2$ $p$ / quantity 3 / \axis left ticks withvalues $A$ $q/2$ $q$ / quantity 3 / \axis right / \axis top / \plot 0 0 2 2 / \putrule from 0 1 to 1 1 \putrule from 1 0 to 1 2 \put {$K$} [br] < -2pt,2pt> at 1 0 \put {$D$} [br] < -2pt,2pt> at 2 0 \put {$B$} [b] < 0pt,2pt> at 2 2 \put {$F$} [bl] < 2pt,2pt> at 0 2 \put {$J$} [b] < 0pt,2pt> at 1 2 \put {$L$} [bl] < 2pt,2pt> at 0 1 \put {$H$} [br] < -2pt,2pt> at 1 1 \endpicture

Figure 1.3.1. {A sample figure.}

If converting the source to html, figures must typically be done separately for the html. In this case, the figure would be defined with something like this:

\figure \figrdef{fig:figure name} \htmlfigure{figure.html} \begincaption {The caption} \endcaption \endfigure

The \htmlfigure macro will cause figure.html to be included in the html source. Occasionally the caption will need to be different for html as well, in which case you can do something like this:

\figure \figrdef{fig:figure name} \htmlfigure{figure.html} \htmlonly \begincaption The html caption... \endcaption \endhtmlonly \endfigure