Newsgroups: comp.text.tex
Subject: mfpic -- new version
Message-ID: <1992Sep8.230254.9504@dartvax.dartmouth.edu>
From: leathrum@griggs.dartmouth.edu (Thomas Leathrum)
Date: 8 Sep 92 23:02:54 GMT
Reply-To: leathrum@griggs.dartmouth.edu (Thomas Leathrum)
Sender: news@dartvax.dartmouth.edu (The News Manager)
Followup-To: comp.text.tex
Organization: Dept. of Math and Computer Science, Dartmouth College
Lines: 2416

This posting contains the latest version of mfpic, a
macro package for including pictures in TeX documents. 
The idea behind this package is to have Metafont do the
actual drawing, and store the pictures in a font that TeX
can include in the document.  The macros have been
designed so that the user should never have to learn
Metafont to use these macros -- the TeX macros actually
write the Metafont file for you.

The previous net release of this package was in late
June.  There have been *MANY* changes since then.  I
still don't view mfpic as being complete, but it is much
more so than the previous release, and most of the basic
features probably won't be changing any more.

mfpic has also started taking advantage of Metafont's
capabilites in a few more interesting ways.  For example,
one of my personal favorite pieces of mfpic code looks

\picture[20]{-3}{3}{-3}{3}
\axes
\function{-2,2,0.1,(x**3-x)/3}
\endpicture

The first line opens up the picture environment and
establishes the coordinate system.  The coorinate scale
is 20 points per coordinate unit (x- and y-axis scales
the same in this case), with bounds on both axes being -3
and 3.  The second line draws the axes.  The third line
plots a smooth Bezier interpolation of the function
f(x)=(x^3-x)/3 on the domain -2<=x<=2, through points
with x values 0.1 units apart.  Since the algebraic
expression is passed directly to Metafont and parsed
there, the TeX user does not have to worry about
computing the points.  The fourth line closes the picture
environment.

The files included below are as follows:

10288  graphbase.mf
265  lamfpic.tex
1307  lapictures.tex
6773  mfpic.tex
30473  mfpicdoc.tex
5469  objects.tex
1238  pictures.tex

The file mfpicdoc.tex contains documentation for all of
the mfpic macros.  The files mfpic.tex and graphbase.tex
contain the actual macros.  The file objects.tex is a
sample file containing at least one of every drawable
object.  The file pictures.tex contains a few more
complicated pictures.  The file lamfpic.tex is a header
file to allow LaTeX users to use mfpic without clashing
with the LaTeX picture environment.  The file
lapictures.tex is the LaTeX version of the sample file
pictures.tex.

Much of the process of setting up your site to use mfpic
will be site-dependent.  The biggest problem, no matter
where you are, will be convincing TeX and its output
drivers to find the Metafont output files.  This often
involves modifying environment variables (or the
equivalent thereof) to inculde the current directory.

Coming in another posting:  I have some scripts and
makefiles to facilitate setting up and processing TeX
files containing mfpic commands, for users on UNIX
machines.  I will send those under separate cover.

Under development:  I have recently gotten someone
interested in writing a fig-to-mfpic converter.  I have
seen some preliminary code, and while it is still far
from complete, it is a step in the right direction.

If you find problems or bugs with the mfpic macros,
please e-mail me.  I probably will not be able to help
much with site-dependent setup stuff, but I should be
able to answer questions about the actual macros.

Regards,
Tom Leathrum
moth@dartmouth.edu
-------------


