%%% File: changes.tex
%%% A part of mfpic 0.6 2002/09/12
%%%
%  Documentation of most changes
\input header

% For "12pt":
%\magnification=\magstep1

% Paper size: {width}{height}
\setpapersize{8.5truein}{11 truein}

% Text size: {width}{height}
\setpagegeometry{5.4167 in}{7.4166 in}

\noindent{\bf Changes History.}

\vskip\beforeskip
\noindent{\it Version 0.0.x:}  Development versions.  Never released.

\noindent{\it Version 0.1:}  First version RELEASED to network,
30 June 1992.

\noindent{\it Version 0.1.x:}  Test versions for new features,
fixes, etc.
None of them were released for general distribution.
Many new features added, bugs worked out, code cleaned up.

\noindent{\it Version 0.2:}  Second version RELEASED to network,
7 Sept. 1992.
(Still had 0.1.13.1 version number in code---oops!)

\noindent{\it Versions 0.2.x:}  Resumed serious development of
\TeX{} code:  Sun 7 Nov. 1993.
Much work done on graphbase code in meantime, especially by
Geoffrey Tobin.  The primary task at this point was a radical rewrite
of the \TeX{} code, including defining a prefix form for shading
macros.

\noindent
{\it Bug fix RELEASE Version 0.2.5} of Wed 10 Nov. 1993:

Primarily work by Geoffrey Tobin.

\noindent
{\it Version 0.2.(5.0.)9} of Mon 28 Feb. 1994:
Intended to release as version 0.3 to network.

\noindent
{\it Release delayed}, as picture operator code is overhauled
to cope with arbitrary overlays:  11 Mar. 1994.

\noindent
Horizontal offset by unwanted glue is traced to missing comment
characters:  Fri 29 Apr. 1994.

\noindent
Vertical displacement of shading reported for \MF{} modes with
nonrectangular pixels:  Mon 23 May 1994.

\noindent
{\it Bug fix RELEASE 0.2.5.1} of Wed 13 July 1994:
Corrected `unxconv' bug which remained in version 0.2.5's graphbase.mf.

\noindent
{\bf Alpha Test Versions.}

\noindent
{\it Version 0.2.9 Alpha} of Thu 11 August 1994:

A test RELEASE prior to any official version 0.3,
is ready for intrepid users.
Introduces coordinate transforms, and other novelties.

\noindent
{\it Update 0.2.9.1 Alpha} of Thu 8 September 1994:

Fixes a bug in \mac{sclosed} and a bug in \mac{white},
corrects some omissions and typos in the documentation,
and adds the \mac{shadewd}, \mac{hatchwd}, \mac{lhatch}
and \mac{rhatch} macros.

\noindent
{\it Update 0.2.9.2 Alpha} of Fri 24 February 1995:
\par\indent
Rearranges some code in \file {mfpic.tex}; little else to report.

\noindent
In {\it 0.2.9.3 Alpha} of Thu 21 March 1995:

GT renamed \mac{fill} to \mac{gfill}, in order to avoid conflict
with the \LaTeX{} \mac{fill} macro.

\noindent
{\it Update 0.2.9.4 Alpha} of Thu 13 April 1995:

Contributes a test for an existing definition of each macro in
\file {mfpic.tex},

Renaming of \mac{label} to \mac{tlabel}, and \mac{caption} to
\mac{tcaption}, in order to avoid conflict with the \LaTeX{} macros
with those names.

\mac{white} was renamed to \mac{gclear}, because \mac{white} is
a likely name for a color macro.

Also, a new macro for defining \MF{} functions was introduced, because
user-defined functions provide more power, and function plotting
macros were added that accept \MF{} function names instead of \MF{}
expressions.

Renaming of \file {graphbase.mf} and \file {graphdoc.tex} to
\file {grafbase.mf} and \file {grafdoc.tex} to emphasise incompatible
upgrade of \prog {mfpic} \MF{} macros, and to provide $8+3$ filenames
for \prog {ms-dos} users.

Added \mac{hbox\{\}} to start of \mac{mfpic}, for some now
forgotten reason to do with formatting, I suppose.

\noindent
{\it Version 0.2.9.5 Alfa} of Wed 19 July 1995:

Replaces \TeX{} dimensions by font dimensions for economy.

Renames \mac{mfcmd} to \mac{mfsrc} for clarity.

Renames \mac{wedge} to \mac{sector} to avoid conflict with the
character name defined in plain \TeX{} and \LaTeX{}.

Introduces \mac{mftitle}, \mac{tmtitle} and \mac{plr}.

Abolishes \mac{plrpoint}, \mac{plrlines}, \mac{plrcurve} and
\mac{plrcyclic} as redundant specialisations.
The meaning of \mac{turtle} is changed to a Cartesian form, for
flexibility.

Changed \file {objects.tex} to use \mac{tmtitle}, \mac{plr},
\mac{mfsrc}, \mac{gfill}, \mac{gclear}, \mac{tlabel}, and
\mac{tcaption}.

Rendering macros redesigned, and \mac{setrender} introduced.
Coordinate transforms in \file {grafbase.mf} made slightly more robust.
Begin an attempt to make \file {grafbase.mf} compatible with John
Hobby's MetaPost drawing program.

Added comment in \file {grafbase.mf} about dangers of \mfc {text}
arguments,

Updated the documentation files \file {grafdoc.tex},
\file {Acknowl.tex}, \file {README2}, \file {MANIFEST} and
\file {mfpicdoc.tex}.

\noindent
{\it Update 0.2.9.6 Alfa} of Mon 24 July 1995:

Contributes \mac{thatch} which provides hatching by lines at any
angle.

Modifications to \mac{pen}, \mac{shadewd} and \mac{hatchwd},
along with changes to \file {grafbase.mf} to make drawing, shading and
hatching more independent.

Decided that the behavior of \mac{point} inside a \env {connect}
environment was bizarre, hazardous, and an unnecessary complication
to the \prog {mfpic} macros, so \mac{point} has reverted to its
original, obvious and simple definition.

Renamed \mac{rotate} to \mac{rotatepath}.

Also renamed the affine transform macros, so that they no longer use
the `s' of the present tense, which could be mistaken for a plural.
(The sample files did not hitherto use the affine transform macros, so
the damage may be slight.)

Modified \file {grafbase.mf} to use a transform stack to implement local
\MF{} coordinate systems; this may be more robust, and extensible to
other graphic localisations.

\noindent
{\it Update 0.2.9.7 alfa}, Fri 18 August 1995:

\noindent
{\it Changes to \file {pictures.tex}:}

Replaced version from `{\tt 0.2.9.1 alpha  Thu 8 September 1994}' to
`{\tt 0.2.9.7 alfa  Sat 5 August 1995}'.

Added a comment containing an ASCII sketch of the commutative diagram
example, and indicated where each arc is drawn.

Replaced all uses of \mac{label} by \mac{tlabel}, \mac{caption}
by \mac{tcaption}, \mac{fill} by \mac{gfill}, \mac{wedge} by
\mac{sector}.

Added some uses of \mac{mftitle}.

Moved one arrow in the commutative diagram, to illustrate the {\tt b}
option of the \mac{arrow} command.

Simplified \MF{} algebraic expressions used in function plots, so that
they use fewer {\tt *} operators.

Edited the example of \mac{turtle} to allow for the new semantics of
rectangular coordinates.

Captioned all eight figures, with figure numbers and descriptions.

Deleted an instance of `\mac{vfill}\mac{eject}'.

Increased the complexity of the seventh figure, to illustrate use of
hatching, closing, point, dotted curves, and so forth.

Made figures~seven and~eight twice as large.

\noindent
{\it Changes to \file {lapictures.tex}:}

Renamed version from `{\tt 0.2.9.1 alpha  Thu 8 September 1994}' to
`{\tt 0.2.9.7 alfa  Thu 17 August 1995}'.

Magnified the \LaTeX{} pictures document to the same scale as the plain
TeX one, using the \mac{mag} command.

Set \mac{fboxsep} to zero.

Initialised arrow heads using \mac{headshape}.

Commented out the \env {center} environment around the commutative
diagram example.

Placed \mac{fbox} commands around each picture.

Other changes as in \file {pictures.tex}.

\noindent
{\it Extensive changes to \file {grafbase.mf}:}

Turned \mfc {warningcheck} off.

Used an explicit \mfc {designsize}.

Debugging refined.

Rearranged some code.

Made \mfc {ClipOn} \mfc {boolean} (instead of \mfc {numeric}).

Added \mfc {maparr} macro.

Eliminated mistake of using \mfc {hround} in graph-to-pixel coordinate
transformation.

Remarked that clipping can distort paths by changing their points.

Tried to clip on character boundary.

Added \MF{} vector coordinate transform, to complement affine
transform for geometric points.

Write message when drawing nominal \MF{} bounding box.

Changed \mfc {beginmfpic} \MF{} macro to take only the character code
as an argument.

Introduced global \MF{} \mfc {transform} stack, for coordinate changes.

Replaced \mfc {currentpen} by \mfc {drawpen} in path stroking.

Changed \mfc {ourfill} and \mfc {ourunfill} to use an {\it undelimited}
\mfc {path} argument.

Added \mfc {setdotpath}, \mfc {ourdot}.

Changed \mfc {onedot} to use \mfc {dotpath} instead of a scaled
\mfc {shape} path.

Edited \mfc {tightbbox} and \mfc {bbox} to take a path described in
pixel coordinates as their first argument, instead of one in graph
coordinates.

Added \mfc {tbbox}.

Did some more saving of local variables in \MF{} functions.

Deleted \mfc {lhatchf} and \mfc {rhatchf}.

Added \mfc {thatchf}, \mfc {thatch}, \mfc {hhatch} and \mfc {xhatch}.

Rewrote \mfc{lhatch} and \mfc {rhatch} to use \mfc {thatch}.

Edited \mfc {dotted}, renamed it \mfc {dashed}.

Added a separate \mfc {dotted} \MF{} macro.

Changed \mfc {head} from a \mfc {def} to a \mfc {vardef}; edited
\mfc {head} to clarify its code.

Altered axis tic mark macros, \mfc {xmarks} and \mfc {ymarks} to ensure
that the tic marks are always at right angles to their axes,
irrespective of coordinate transforms.

Added a \mfc {grid} command.

Renamed \mfc {mkellipse} to \mfc {ellipse}, deleted old \mfc {ellipse}.

Renamed \mfc {mkarc} to \mfc {arc}.
\par\noindent
{\it Update 0.2.9.8 alfa}, Mon 11 September 1995:
\par\noindent
Added to \file {Acknowl.tex}.
\par\noindent
In \file {mfpic.tex}:

Add comment about use of \mac{ignorespaces} to skip spaces in user's
document after \mac{mfpic} command.

Retain line separations of user's document's \env {mfpic} environment
when writing \MF{} file.  This prevents long \MF{} commands from
exceeding \MF{}'s input buffer.
\par\noindent
{\it Update 0.2.9.9 alfa}, Thu 5 October 1995:
\par\noindent
In \file {mfpicdoc.tex}:

changed \mac{wedge} references to \mac{sector},
and \mac{rotateabout} to \mac{rotatearound}.

Added some logical formatting commands to \file {mfpicdoc.tex}.

Included much more information about recent changes
(from {\it 0.2.9.1} to {\it 0.2.9.8}).
\par\noindent
In \file {mfpic.tex}:

Renamed \mac{@graph} to \mac{@graphfont} for identifiability.
\par\noindent
{\it Update 0.2.9.10 alfa}, Fri 6 October 1995:
\par\noindent
In \file {grafbase.mf}:

Deleted spurious argument to \mac{xyswap}.

Changed \mac{store} to take two arguments, and to logically
`bracket' the second, which is the path description.
\par\noindent
{\it Update 0.2.9.11 alfa}, Fri 24 November 1995:
\par\noindent
In \file {grafbase.mf}:

Fixed X-coordinate rounding bug in \mfc {thatchf}.

\noindent
{\it Revision 0.2.10.0 alfa}, Wed 17 January 1996:

\nobreak
\noindent
In \file {mfpic.tex} and \file {grafbase.mf}:

Changed names of five \MF{} macros:
\mfc {xslanted}, \mfc {yslanted}, \mfc {zslanted}, \mfc {boosted},
and \mfc {xyswapped}
to
\mfc {xslant}, \mfc {yslant}, \mfc {zslant}, \mfc {boost},
\mfc {xyswap}.
\par\noindent
In \file {grafbase.mf}:

Replaced my dash and dot code by Frank Michielsen's, modified to use
\mfc {suffix} arguments instead of \mfc {text} for l-values.

Also, the \mfc {dotsize} argument to \mfc {dotted} is now effective.

Deleted the unused \mfc {ourdraw, ourfill, ourunfill} macros.

Simplified the \mfc {dotpath} and \mfc {onedot} initialisation code;
it was too baroque.

Added a \mfc {pixdot} macro as a shorthand for
\mfc {picdot (active\_plane, onedot, p)}.

Replaced the \mfc {apoint (w, a)} macro by \mfc {bpoint (w, b)}
which is a shorthand for \mfc {fullcircle scaled w shifted b}.

Gratuitously added Bruce Leban's overlay macros from \MFbook{}, p 295.

Cosmetic reformatting of source.
\par\noindent
In \file {Acknowl.tex}:
\noindent
Add Frank Michielsen's name.
\par\noindent
{\it Revision 0.2.10.1 alfa}, Thu 18 January 1996:

\nobreak
\noindent
In \file {grafbase.mf}:

Fixed wrong declaration in \mfc {dotted} of \mfc {dp} from
\mfc {path} to \mfc {pair}.

\noindent
{\it Revision 0.2.10.2 alfa}, Tue 23 January 1996:

\nobreak
\noindent
Editing to restore compatibility with older graphbase.mf versions used
with \prog {xfig}'s (actually, \prog {transfig}'s \prog {fig2dev}'s)
\prog {mf} driver (\file {genmf.c}).
\par\noindent
In \file {mfpic.tex}:

Edited writing of setting of \MF{} variables \gbc {xscale} and
\gbc {yscale} to omit factor of \mfc {unitlen}.

Changed references to \gbc {drawwd} to \gbc {penwd} in
\mac{drawpen}.
\par\noindent
In \file {grafbase.mf}:

Add declarations and initialisations of these variables:
\mfc {unitlen, xscale, yscale, xneg, xpos, yneg, ypos}.

Renamed \mfc {drawwd} to its former name, \mfc {penwd}.

Again made \mfc {penwd, hdwdr, hdten} into \mfc {newinternal}
variables, and assign them using \mfc {interim}.

Definition of \mfc{ztr} now includes \mfc {unitlen} as a factor in the x
and y scaling.

\mfc {mfpicenv} and \mfc {endmfpicenv} defined as empty statements.

\mfc {bounds} defined for setting \mfc {xneg, xpos, yneg, ypos}.

\mfc {beginchar} now includes \mfc {unitlen}.

\noindent
{\it Revision 0.2.10.3 alfa}, Tue 6 February 1996:

\nobreak
\noindent
In \file {mfpicdoc.tex}:

Updated documentation to cover to \mac{dotted}, \mac{dotsize}
and \mac{dotspace} on the one hand, and \mac{dashed},
\mac{dashlen} and \mac{dashspace} on the other.

$\cdots$

\noindent
{\it Revision 0.2.10.4 alfa}, Mon 26 February 1996:

\nobreak
\noindent
In \file {mfpic.tex}:

Let internal \mac{sim@gdef} (simple global definition)
stand for \mac{gdef}.

Added \mac{newgdef} for new global definitions with a test for
previous definition.

Replaced use of \mac{obeylines} by \mac{mfpicobeylines}, to use
\mac{endgraf} instead of \mac{par}, because \LaTeX(2e) redefines
\mac{par} with unpleasant effects on \MF{} files when using \LaTeX's
center environment.  (To wit, \LaTeX's \env {center} environment would
write \mac{@@par} to the \MF{} file.

Defined \mac{preservelines} to call \mac{mfpicobeylines} then
set \mac{newlinechar} to control-M (carriage return).

Use \mac{preservelines} in \mac{mfsrc}, thus bypassing (I hope)
the mischief arising from \LaTeX{} in the center environment.

Wrapped replacement text of \mac{mfsrc} in a layer of braces.

Added descriptive comments for \mac{tlabel} and \mac{tcaption}.

Set \TeX's primitives \mac{leftskip} and \mac{rightskip} to zero
dimension inside \mac{tcaption}, so as to protect typesetting of
diagrams' captions from unwanted effects.

\noindent
{\it Revision 0.2.10.5 alfa}, Sat 9 March 1996:

\nobreak
\noindent
Minor reformatting of \file {mfpic.tex}, including adding spaces,
adding comment characters at end of more lines, and renaming some
internal register variables.
\par\noindent
Introduced \mac{polyline} as an alternative name for \mac{lines}.
\par\noindent
In order to avoid repetition of side-effects, changed \mac{tcaption}
to use \mac{unhbox}\mac{@textbox},
instead of repeating its text argument.

\noindent
{\it Revision 0.2.10.6 alfa}, (two hours later) on Sat 9 March 1996:

\nobreak
\noindent
Updated \file {mfpic.tex} and documentation files to incorporate
improvements by Dan Luecking:

a loading check that automatically saves and restores the catcode of
`@';
\hfil\break
the name of the graph base is now stored in a macro near the top of
\file {mfpic.tex};
\hfil\break
\mac{leavevmode} is now moved
[GT has, for now, commented it out completely];
\hfil\break
\mac{polyline} instroduced as a synonym for \mac{lines};
a \mac{polygon} figure has been introduced;
\hfil\break
{\bsl\bsl} specifies explicit line breaks in tlabels and tcaptions;
\hfil\break
\mac{onelevel} causes one level of expansion in an \mac{edef};
\hfil\break
\mac{savepic} and \mac{copypic} allow saving, use and copying
of an entire \prog {mfpic} picture, including its tcaptions and
tlabels.

Also modified \mac{tcaption} code to prevent repeated use of the
text argument, as that can cause side effects, as reported by
Dennis Petrovic.

\noindent
{\it Revision 0.2.10.7 alfa}, Sat 28 March 1996:

\nobreak
\noindent
First RELEASE via Geoffrey Tobin's School's local anon ftp site:
\hfil\break
\hskip 1cm \file {ftp.ee.latrobe.edu.au : pub/gt/mfpic}

Added \file {skip-pix.tex} file, which tests whether \TeX's
\mac{leftskip} primitive breaks up \prog {mfpic}'s typesetting
of diagrams.  Fortunately, it seems not.

\noindent
{\it Revision 0.2.10.8 alfa}, Tue 26 May 1996:

\nobreak
\noindent
Second, and bug fix, RELEASE via Geoffrey Tobin's anonymous ftp area.

Due to change in syntax of \mac{store} to take the path command as
a second argument (which made coding of \file {mfpic.tex} easier),
\file {objects.tex} and part of \file {mfpicdoc.tex} needed to be
amended.
Reported by Miroslav Dont (Thu 16 May 1996).

Descriptions of \LaTeX{} environments clarified to emphasise that
\prog {mfpic}'s plain \TeX{} command names may be used in \LaTeX.
This is useful to know when designing automatic code generators.
Reported by Van Snyder (Fri 17 May 1996).

Added hyphenation to \mac{MFbook} in documentation macro file
\file {header.tex}.

Noticed that the method by which the line breaks in the \TeX{}
file are copied into the \MF{} file can cause command arguments
to be omitted from the \MF{} file unless at least the left brace
(immediately before the arguments) occurs on the same line as the
command.
Corrected \file {objects.tex} to obey this restriction.
Also noted this phenomenon in \file {mfpicdoc.tex}.
Effect reported by Miroslav Dont (Thu 16 May 1996).

Updated \file {lapictures.tex} to \LaTeXe.

Added \LaTeXe{} logo to \file {header.tex}.


\noindent
{\it Revision 0.3.0 alpha}, 1998:

\nobreak
\noindent
Numbers jump a lot from here because I (Dan Luecking) have been lax in
keeping track of changes. First version with support for Metapost. (Yes!)

Translated \file{grafbase.mf} to \file{grafbase.mp}, retaining all(?)
functonality. Now any(?) \file{.mf} file created by a recent mfpic can be run
through \MP{} to produce a \PS{} picture. Lots of problems with Metapost
capacity, especially with shading. It is apparently a lot more memory
intensive to hold thousands of circular paths in memory than hundreds of
thousands of pixels. Ultimately recoded the \file{grafbase.mp} shading
macros to simply calculate a gray colored fill.

Added \prog{grafbase} functions \mfc{sin}, \mfc{cos}, and their inverses
\mfc{invsin}, etc., that compute in radian measure. Also \mfc{tan} and
\mfc{cot}.

Wrote \file{mppicdoc.tex}, which can be \TeX ed alone or input from
\file{mfpicdoc.tex}. Should probably combine the two documents. Made
small changes to header.tex: added logos for \mac{pdfTeX} and
\mac{pdfLaTeX}. Changed The macros \mac{MF} and \mac{MP} to use
small capitals. Minor modifications to \mac{LaTeX} and \mac{LaTeXe}

\noindent
{\it Revision 0.3.8 alpha}, 1999:

\nobreak
\noindent
Color has been added. Standard colors for lines/curves
(\mfc{drawcolor}), fills (\mfc{fillcolor}), hatch patterns
(\mfc{hatchcolor}), and arrowheads (\mfc{headcolor}) added to
\file{grafbase.mp}. Corresponding macros in \file{mppic.tex} for setting
these colors. Optional arguments for color added to \mac{gfill},
\mac{draw}, \mac{arrow}, and all the hatching macros. A new macro
\mac{polkadot} creates polkadot fill patterns.

Changed some of the commands for setting dimensions so that they
actually worked, and so they are local to \env{mfpic} environments.

Added support for \LaTeXe's \mac{usepackage} command and options. Added
graphics inclusion code, summoning the following packages: \prog{epsf}
for plain \TeX{} or \LaTeX209, \prog{graphics} for \LaTeXe{} and \pdfLaTeX,
the macro files \file{supp-pdf.tex} and \file{supp-mis.tex} from the
\ConTeXt{} distribution for plain \pdfTeX). Added code to detect which
\TeX{} format was in use.

\noindent
{\it Revision 0.3.9 alpha}, 2000:

\nobreak
\noindent
Altered almost all messages written to the log file or the terminal to
announce they were from \prog{mfpic}. Altered format detection code to
test against both \mac{UndEfInEd} \emph{and} \mac{relax} (lest some
previous package convert certain commands to \mac{relax} using the
\mac{csname} style test). Minor change to definition of \mac{circle}
to avoid error messages in \LaTeX.

\indent
Changed the graphic placement code so that it tests for the existence of
the graphic first (to avoid all those error messages from \prog{epsf},
\prog{graphics}, etc., on the first pass, or when \MP{} fails to make a
graphic).

\indent
Tried to find and change code in \prog{grafbase} where we could
inadvertently divide by zero. Added another closure prefix
\mac{uclosed} and its corresponding \prog{grafbase} support, to close
a path smoothly (meaning simply matching directions at both ends), but
keep the original curve Unchanged. The current (\mac{sclosed} simply
closes with \mfc{..cycle} which alters the original curve.

\noindent
{\it Revision 0.3.10 alpha}, 2000:

\nobreak
\noindent
Put \prog{mfpic} version, date and package name into macros for use in
messages. Decided the package name is ``\prog{mfpic}'' if it is input as
\file{mfpic.tex} or \file{mfpic.sty}, otherwise \prog{mppic}, regardless
of whether the \opt{metafont} or \opt{metapost} option is used. There
are four files \file{m[fp]ic.[sty,tex]}, which simply set the
package name and input \file{mppic.tex} if necessary. Also put this
version and date info into strings in \prog{grafbase}.

Added changes contributed by Jaromir Kuben (Thanks!): An option
\opt{centercaptions} and command \mac{centercaptions} to center the
lines in a \mac{tcaption}. Also \mac{nocentercaptions}; these can be
used at any point to turn the feature on and off. Improvements
(corrections?) to the code that positions text labels (so that) labels
that extend outside the picture are correctly taken into account.
Changes to the positioning parameters in \mac{tlabel}. Both {\tt c}
and {\tt b} now take into account the depth of the text ({\tt b}) puts
the absolute bottom of the text in line with the point. A new parameter
{\tt B} to align the baseline of the text with the point. Jaromir also
contributed several corrections to \file{grafbase.mp} (mostly
inadvertently introduced by me, DHL).

Added option \opt{dvipsnames} to allow color names as in the
\prog{dvips} header \file{color.pro}. Requires file \file{dvipsnam.mp}.
Added \file{grafbase.mp} macros: \mfc{cmyk}, \mfc{RGB}, \mfc{gray} and
\mfc{rgb} to convert from the indicated color space to \MP's internal
color space (which is rgb, so the last is a no-op). In plain\TeX{} the
command \mac{dvipsnames} can be used in the preamble (before
\mac{opengraphsfile}).

Added macro \mac{ConTeXt} to \file{header.tex} to produce \ConTeXt, a
macro \mac{opt} for style of \LaTeXe{} option names. Changed
\mac{prog} to typeset its argument in sanserif font. Changed
\mac{tmtitle} in \file{mppic.tex} so it \emph{doesn't} ignore
following spaces (it ended with \mac{mftitle} which invokes
\mac{ignorespaces}).

Added functions \mfc{tanh}, its inverse \mfc{atanh}, and additional trig
functions \mfc{secd}, \mfc{sec}, \mfc{cscd}, \mfc{csc}, \mfc{atan},
\mfc{invtan}. Made \mfc{log} a synonym for \mfc{ln}. Added complex
variables functions \mfc{Arg}, \mfc{cis}, \mfc{zexp} and \mfc{Log}.

Changed all trig, hyperbolic, exp, log, etc, to use syntax ``\mfc{vardef}
\<name\>~\mfc{primary X}'' so as to match (I hope) as close as possible
the behavior of the built-in \mfc{sind} and \mfc{cosd}.

Changed \mac{do@ptparami} so that it does not strip too many braces.
This was done by changing the line \mac{redef}\mac{@ptparami} to be
parameterless (delaying the reading of the optional parameter). The old
code read the optional parameter, replaced it, then read it again. This
strips two levels of braces, making two levels of bracing necessary to
hide an enclosed bracket:\brk {\tt \bsl draw[\{\{\bsl
color[cmyk]\{1,1,0,0\}\}\}]...}\brk (Such use of \LaTeX{} color macros
has not yet been added, but might be one day.) This strategy is closer
to \LaTeX's optional parameter handling technique.

\noindent
{\it Revision 0.3.11 alpha}, 2000:

\nobreak
\noindent
Added \mac{plot} (usage \mac{plot}[?<size>,<separation>][\<shape\>]
$\ldots$) similar to \mac{dotted} except: 1.~explicit shape required
(available shapes \mfc{Triangle, Square, Circle, Plus, Cross, Star,
SolidTriangle, SolidSquare, SolidCircle}). 2.~initial size and
separation are 2pt and 5pt. 3.~Size is governed by
\mac{plotsymbolsize}, and separation by \mac{plotsymbolspace}. The
dimension \mac{plotsymbolsize} corresponds roughly to the
\emph{average} diameter of the shape.

Added code to \mfc{mkfcn} and \mfc{parafcn} so that the end of the curve
falls on the given endpoint (even if \mfc{bst} doesn't go evenly
into \mfc{bmax-bmin}). Also ensure the loop parameter doesn't exceed
\mfc{infinity}. Also avoid problems if the sign of
\mfc{bmax-bmin} differs from that of \mfc{bst}.

\noindent
{\it Revision 0.3.12 alpha}, 2000:

\nobreak
\noindent
Save and restore catcodes of certain punctuation (@.,:;!?{}`'=/- and
parentheses), as well as spaces, setting punction to 12 while reading
\file{mppic.tex} to ensure the right stuff gets written to the
\file{.log} and \file{.mp} files.

Added macro \mac{datafile} to read a file of number pairs and create
the polygonal path connecting them. Works like the other figure macros
(i.e., may take any prefixes).

Added options \opt{clip} (to clip the picture to the specified
dimensions), \opt{truebbox} (to give the metapost output file the true
bounding box rather than the one specified in the \mac{mfpic} arguments), and
\opt{debug} (write debug info to terminal and log file). Command forms:
\mac{clipmfpic} turns it on \mac{noclipmfpic} turns it off.
Similarly, \mac{usetruebbox} and \mac{notruebbox}. For \opt{debug}
we can define \mac{mfpicdebug} before loading \file{mfpic.tex} (which
will turn on debugging information written prior to option processing),
and in the rest of a source file, \mac{mfpicdebugtrue} and
\mac{mfpicdebugfalse} will switch it on and off.

Changed names of various commands to a more imperative form:
\mac{usingmetapost} becomes \mac{usemetapost}, \mac{usingmetafont}
becomes \mac{usemetafont}, \mac{dvipsnames} becomes \mac{usedvipsnames},
etc. Also changed name of option \opt{centercaptions} to
\opt{centeredcaptions}. Changed many internal names. prefixing most with
``{\tt mfp@}'', inserting ``{\tt @mfp@}'' in the \mac{if...} commands.

\noindent
{\it Revision 0.3.13 alpha}, 2000:

\nobreak
\noindent
\mac{datafile} rewritten, now ignores leading blank lines and
comments, and won't gag on commented out EOLs. Code somewhat
modularized.

Went back to technique of expanding argument of \mac{tcaption} twice
({\it caveat emptor\/}).

New command \mac{plotdata} reads a data file and draws one (polygonal)
path for each non-blank sequence of lines in the data file. Exits when a
pair of blank lines is encountered (or EOF). Cycles through six
different drawing styles for successive curves. User may elect different
colors (with \mac{coloredlines}), different symbols
(\mac{pointedlines}), or different dashing patterns
(\mac{dashedlines}). NOT a figure macro, (i.e., no prefixes).

New command \mac{using} affects what \mac{datafile} and
\mac{plotdata} write to the \file{.mf} output. Default is
\mac{using}[\#1 \#2 \#3][\#1,\#2], meaning: of two or more space
delimited numbers, write the first two separated by a comma.

Brand new dashing and dotting code in \prog{grafbase}. A complete
reorganization of the code made dashing faster. That was followed by
another reorganization and the \mfc{gendashed} (generalized dashes)
command added to \prog{grafbase}. Now any dashing pattern can be drawn.
A dashing pattern, \mfc{ptrn}, consists of three arrays:
\mfc{ptrn.start[$\,$]}, \mfc{ptrn.rep[$\,$]}, \mfc{ptrn.finish[$\,$]}.
The command \mfc{gendashed (ptrn) p}; draws the path \mfc{p} beginning
with \mfc{ptrn.start}, repeating \mfc{ptrn.rep}, and ending with
\mfc{ptrn.finish}. The arrays are numeric and specify the lengths of
dashes and gaps. A command

\mfc{dashpat (suffix name) (text dims)}

\noindent
takes a comma separated list \mfc{dims}, assigns them to the
array \mfc{name.rep}, and computes reasonable \mfc{name.start} and
\mfc{name.finish}.

\mac{gendashed}[\<pattern\>] ... is a generalized dashing command;
\<pattern\> is the name of a dashing pattern.

\mac{dashpat}[\<name\>][\<dim1\>,\<dim2\>,$\ldots$,\<dim2n\>]

\noindent
will create a dashing pattern with the specified name.
Here \<dim1\>, etc., are dimensions specifying the length of
dashes (odd positions) and the length of gaps (even positions). A dash
length of 0 is written as a dot. Patterns \mfc{dashtype0} through
\mfc{dashtype5} are predefined and used by \mac{plotdata} when
\mac{dashedlines} is selected.

Commented out several macros in grafbase that were never used
elsewhere, and also some that were only used once (replacing that
use by the replacement text). I haven't done any comparisons, but for
the macro dotted, avoiding two expansions out of four (what it used
to take to draw a dot) might be a significant time saving when
thousands of dots are being drawn.

Added a couple of rounding commands to the \file{.mf} shading code. All
dots now pixel aligned, looks infinitely better.

Corrections to \mfc{mkfcn} and \mfc{parafcn}, they could still have
overshot the value of \mfc{bmax}.

Removed all spaces (commenting out EOL's) in \file{mppic.tex}. It
can now be \mac{input} in horizontal mode without generating any spaces
(even without switching to \mac{nullfont}). Removed \mac{nullfont}.

Changed some more internal names. Added \mfc{Diamond} and
\mfc{SolidDiamond} to the symbols available to \mac{plot} and
\mac{plotsymbol}.

At some point (perhaps this or the last revision) I added a command
\mac{fcncurve} that draws a function (i.e., curve doesn't double back)
if the x-values are unique and listed in order. It has an optional
tension-like argument. Added an optional tension parameter to
\mac{curve}, also.

\noindent
{\it Revision 0.3.14 alpha}, 2000:

\nobreak
\noindent
Added \mac{@@tlabel} to write label text to output file between \mfc{btex}
and \mfc{etex}. Added \opt{mplabels} to make \mac{tlabel} use it instead of
original \mac{@tlabel}. Commands \mac{usemplabels} and
\mac{nomplabels} to turn the option on and off. Added third part to
the optional argument of \mac{tlabel} to rotate the text (ignored in
\mac{@tlabel}) so \mac{tlabel}[?Bl45] will place the left baseline
at the point and rotate 45 degrees around that point.

New macro \mac{mfpdatacomment} so that \mac{datafile} and \mac{plotdata}
can now have their comment character reset. A side effect is that {\tt
\%}'s in the data file will be recognized. Commands
\mac{makepercentother} and \mac{makepercentcomment} created to allow the
user to use {\tt \%} in \mac{using} arguments.

Gave \mac{plotdata} the ability to cycle through 8 colors or 9 symbols
(instead of only 6), but still only 6 dash patterns. (Too many makes for
confusion. Only increased colors and symbols because it was so easy.)

Added framing macro. On the first \TeX{} run (indicated by nonexistence
of \file{.tfm} or \file{fig.1}), now show a visible rectangle of appropriate
size with the figure number inside. For plain \TeX{} users, the internal
code is made available in the user level command
\mac{framed}[?\<fgap\>][$\ldots$]. Parameters \mac{framegap} and
\mac{framethickness} control the default appearence. (Internal code
for undefined figures uses \mac{framegap} {\tt = -}\mac{framethickness})
so not to take up any extra space.

Added some error checking: when option \opt{mplabels} is selected without
\opt{metapost}, issue error message and ignore. Same when \mac{usemetapost}
is used after \mac{opengraphsfile}. Remove \opt{dvipsnames} option,
making all dvips color names always available to \prog{mfpic}.

Multiple changes to documentation: Added \mac{GS} for Ghostscript and
\mac{sc} for small caps to \file{header.tex}.
Folded all the new macros and their descriptions into
\file{mfpicdoc.tex}. Still keeping \file{mppicdoc.tex} for more detail
on differences between the \MF{} and \MP{} support.

Made some small additions to \file{MFobjs.tex} and \file{MPobjs.tex} to
better illustrate some new features. Adjusted \file{pictures.tex} and
\file{lapictures.tex} so they produce the same output and no overfull
boxes.  Changed \file{TeXMPobjs.tex} and \file{LTXMPobjs.tex} so that
they work better in \pdfTeX{} and \pdfLaTeX, resetting \mac{pdfpageheight}
and \mac{pdfpagewidth} (which otherwise get magnified by \mac{mag=1200}).

Replaced \file{curves.dat} with \file{curves1.dat} and \file{curves2.dat} to
better show features of \mac{plotdata}.

Changed the default for \mac{using} to \mac{using}[\#1 \#2 \#3][(\#1,\#2)],
(redundant parentheses).

Added \mac{fdef}, which seemed to be documented, but not defined!
Changed the format slightly and adjusted the documentation to reflect
that.

Changed \mac{savepic}: Now use \mac{newpic}[\bsl foo] to allocate a box,
\mac{savepic}[\bsl foo] to store the next picture, and
\mac{usepic}[\bsl foo] to copy it. Now more like \LaTeX's system of
save boxes.

\noindent
{\it Revision 0.3.15 alpha}, 2000:

\nobreak
\noindent
In \prog{grafbase}, changed \mfc{secd} and \mfc{cscd} so that
\mfc{abs(temp)} $<$ \mfc{nottoosmall} is tested instead of \mfc{temp}
itself (which was incorrect when \mfc{temp} $<$ \mfc{-nottoosmall}).
Renamed \mfc{dashed} to \mfc{DASHED} to make primative \mfc{dashed}
available to power users. Added some error checking to dashing code.
Added some `save's to \gbc{*fcn} commands. Changed hatching code in
\file{grafbase.mp} so that all (even those not used by \prog{mfpic})
respect \gbc{hatchcolor}.

Redefined \gbc{parafcn} so it can call \gbc{mkfcn} like all the other
function drawing commands.

Added \mac{mfpverbtex} to write \mfc{verbatimtex} block to \file{.mp}
file.

Changed a few \mac{newdef}s and \mac{newlet}s to \mac{def} and \mac{let}
to keep \ConTeXt{} from complaining. Affected commands are \mac{rotate},
\mac{mirror}, \mac{scale} and \mac{grid}. Changed code for date written
to output file for same reason.

Changed \mac{newpic} to \mac{newsavepic} to more closely parallel
\LaTeX's \mac{newsavebox} command.

Allow plotting of a number in a data file against its sequence position
with\brk
\mac{using}[$\ldots$][\bsl sequence,$\ldots$].

Rename \mac{mf@gobble} to \mac{mfp@gobble}. Move the definition of
\mac{newdef} earlier and use it more (didn't catch any new conflicts).

Changed \mac{rotatepath} from a \mac{@modmac} to a \mac{@closmac} (even though it doesn't
close anything), because that makes its behavior vis-a-vis rendering
more in line with what one might expect. Actually, closing and rotating
both simply accept a path, change it, and pass the result on. So both
should be handled the same.

Added contributed macro \mac{pointdef}:\brk
\mac{pointdef}[A]{\tt (1,3)}
makes \mac{A} expand to {\tt (1,3)}, with \mac{Ax} and \mac{Ay}
expanding to {\tt 1} and {\tt 3}, respectively.

Provide a directory structure to the distribution. Rename file
\file{mppic.tex} to \file{mfpic.tex} and provide files \file{mppic.tex},
\file{mfpic.sty}, and \file{mppic.sty} as wrappers to input it. Made
\MP{} the default when \file{mppic.*} are used.

Add some error correction to \gbc{dashpat}: force an even number of
dimensions.


\noindent
{\it Revision 0.3.16 alpha}, 2000:

\nobreak
\noindent
In \prog{grafbase}:

Change \gbc{glabel} (in \file{grafbase.mp}) to \gbc{gblabel} so as not
to conflict with \mfc{glabel} from \file{graph.mp} in the standard
\MP{} distribution. Adjusted \file{mfpic.tex} accordingly.

Correct the change to \gbc{dashpat} made in 0.3.15: don't force dashing
when there are fewer than 2 dimensions in the list. Instead, this is the
signal to draw a solid curve.

Save the variables \gbc{dashes} and \gbc{dots} used in the macros
\gbc{DASHED} and \gbc{dotted}.

Uncomment three macros commented out in 0.3.13: \gbc{tightbbox},
\gbc{tbbox} and \gbc{bbox}. Though these are not used in any other macro,
but they might nevertheless be useful to users of \prog{grafbase}.

Change the \gbc{dashtype[]} arrays that mix dots and dashes so they
begin with a dot. This will produce a dot at the ends of the curve. This
just looks better than a partial dash.

Added \file{unbound.tex} updating \prog{mfpic} info in {\it \TeX{}
Unbound}.

Restored \file{mf-revu.tex}, somewhat altering its formating
and correcting a \TeX{} error.

Changed \mac{endconnect} so it tests for its use in \LaTeX{} as an
environment and if so issues \mac{aftergroup}\mac{@startfigtrue} and
\mac{aftergroup}\mac{@imrendtrue} to bypass the \LaTeX-supplied
\mac{endgroup}. Added a simplar test to \mac{endmfpic} to set
\mac{@ignoretrue}.


\noindent
{\it Revision 0.4.0 beta}, Aug 2000:

\nobreak
\noindent
Released to CTAN. Removed \file{mppic.*}, package is named \prog{mfpic}
regardless of whether \MF{} or MP{} support is needed.

\noindent
{\it Revision 0.4.01 beta}, Nov/Dec 2000:

\nobreak
\noindent
Sergei V. Znamenskii reported (and mostly solved) an incompatibility
with \AmSTeX{} using \prog{amsppt} style if \file{mfpic.tex} is input
after the \mac{documentstyle}[amsppt] command. The file
\file{amstex.tex} loads the dummy font, setting 22 font dimensions. Then
\file{amsppt.sty} loads some more fonts. It appears that if font loading
intervenes, \file{mfpic.tex} cannot add extra font dimension parameters
to dummy to use with \mac{newfdim}. Solved by changing\brk
\indent\mac{font}\mac{@dummy}{\tt=dummy}\brk to\brk
\indent\mac{font}\mac{@dummy}{\tt=dummy scaled 1002}\brk
in \file{mfpic.tex}

Also corrected code that purported to detect \LaTeX{} when in fact
\AmSTeX{} was in use.

Added documentation of a bug in \file{supp-pdf.tex} which requires
\mac{usemetapost} (as well as \mac{usepackage}[?metapost][mfpic]) to
come before \mac{usepackage}[?french][babel] when running \pdfLaTeX.
The conflict was reported by Pascal Chantriaux.

Changed \mac{tmtitle} and \mac{mftitle} so they read the argument as
a token list and write it to \file{.mf} file and \file{.log} file
without expansion. Simple things like \mac{'} expand to quite long
expressions in \LaTeXe.

Added commands \mac{MFPdebugwrite} (to write its argument only in
presence of debug option), \mac{MFPmsg} (as a synonym for
\mac{immediate}\mac{write16}) and \mac{MFPICmsg} (to write its
argument preceded by ``{\tt MFpic: }'').

Added \mac{restoreCODE} to shorten all the lines is
\mac{mfpic-package} that restore the \mac{catcode}s of punctuation.

Added a few new debug lines in response to previous failure to detect
\AmSTeX.

Rewrote \mac{mfp@now} (which generates a time-stamp for the output
file) to use only 2 count registers instead of three.

Added \mac{dimendef}\mac{mfp@scratch=255} for scratch use instead having
\mac{dimen255} hard coded. This will make changes easier should use of
dimension 255 cause any problem.

Added \mac{penwd} as a synonym for \mac{pen} (to be more in line
with \mac{shadewd}, etc.).

Removed redundant parentheses from default \mac{using}.

Changed internal command \mac{mfp@rwdata}, which is responsible for
reading and writing in the \mac{datafile} and \mac{plotdata}
commands, so that it outputs\brk
\indent \gbc{polyline (false) (($x_1,y_1$),($x_2,y_2$),$\ldots\,$,($x_n,y_n$));}\brk
instead of\brk
\indent \gbc{($x_1,y_1$)--($x_2,y_2$)--$\cdots\,$--($x_n,y_n$);}\brk
The intent is to have a better interface if ever we get 3D support
started. For example, \gbc{polyline} calls \gbc{textpairs} which processes the
list of coordinates. In a hypothetical 3D environment, we'd need to
change only \mac{using} to write triples, and then \gbc{textpairs}
could choose to run some command that processes triples instead of
pairs.

Changed use of \mac{unpreservelines} in \mac{plotdata}, etc., to the
expicit resetting of the category code of ascii 13 (which was its only
purpose anyway).

Added macros \mac{xaxis}[?\<hlen\>] and \mac{yaxis}[?\<hlen\>] with
the obvious meanings. Plan on adding something like \mac{leftaxis},
\mac{bottomaxis}, etc., with changes to \mac{xmarks} and
\mac{ymarks} for putting tics on them. (Haven't figured out the best
interface yet.)

Rewrote \mac{mftitle} to supress expansion (for example, \mac{'}
expands to about two lines of confusing code in \LaTeXe).

Added some new error messages. Rewrote almost all error messages, adding
linebreaks. Added command \mac{mfp@errmsg} to format error messages
and set the \mac{errhelp} tokens.

\noindent
{\it Revision 0.4.02 beta}, Jan 2001:

\nobreak
\noindent
Backward compatability was inadvertantly destroyed when \mac{curve}
was given an optional parameter and the definition of \gbc{curve} in
\file{grafbase.m?} was changed. Any \file{.mf} file created by using
\mac{curve} with an older version of \prog{mfpic} would give
\gbc{curve} the wrong number of parameters for the new \file{grafbase}
files. I renamed the new \gbc{curve} to \gbc{tcurve} and gave
\gbc{curve} a definition equivalent to its old one.

\noindent
{\it Revision 0.4.03 beta}, Feb 2001:

\nobreak
\noindent
Corrected a typo in \gbc{vardef thegblabel}: had \gbc{zz} for a
parameter, but used \gbc{z} in the replacement text. I am surprised
\mac{tlabel} \emph{ever} worked when the \opt{mplabels} option was
selected.

\noindent
{\it Revision 0.4.04 beta}, Mar 2001:

\nobreak
\noindent
Added \mac{smoothdata}[?\<tension\>] to cause \mac{datafile} and
\mac{plotdata} to draw smooth curves with optional tension setting.
And \mac{unsmoothdata} to restore the default.

Changed \mac{pointedlines} to work as documented (causing
\mac{plotdata} to issue the equivalent of \mac{plot}[\<sumbol\>]) and added
\mac{datapointsonly} to behave as it used to (causing
\mac{plotdata} to issue the equivalent of \mac{plotnodes}, plotting
only the datapoints).

Some documentation changes: added info that something like
\mac{xmarks}[-4 step 2 until 6] is valid.

\noindent
{\it Revision 0.4.05 beta}, Mar 2001:

\nobreak
\noindent
Changed \mfc{vc=vt;} to \mfc{vc:=vt;} in function clipsto. When used on
an array of paths, the original caused an ``Inconsistant equation''
error on the second iteration. Fortunately, this does not come up in
\prog{mfpic} except for very advanced users.

\noindent
{\it Revision 0.4.10 beta}, May 2001:

\nobreak
\noindent
Renamed \mac{fileversion} and \mac{filedate} to
\mac{mfpfileversion} and \mac{mfpfiledate} to avoid name clashes
with other packages. Most packages only use these macros for messages
while loading, but mfpic writes the information as a header comment in
the output file

Added \mac{mfp@ifnextchar}, a clone of \LaTeX's \mac{@ifnextchar},
and redefined the macros \mac{do@ptparam} and \mac{alt@ptparam} in
terms of it. Copied LaTeX's code to eat one space after a command into
the macro \mac{eatspacedef}.

Added \mac{mfp@delim} as an all-purpose argument delimiter. For
debugging purposes, its definition is to issue an error message saying
it shouldn't ever be triggered.

Slight rewrite of \mac{mfp@now} and \mac{mfp@today}.

Renamed \mac{framed} and related macros by prefixing {\tt mfp} or {\tt
mfp@}. Some formats and packages (\ConTeXt, for example) have a
\mac{framed} macro. Now \mac{mfpframed} \emph{can} be used, and
\emph{must} be used if \mac{framed} already exists (as in \ConTeXt).
Replaced \mac{framegap} and \mac{framethickness} with \mac{mfpframegap}
and \mac{mfpframethickness}. If \mac{framed} is already defined, the old
version is kept and the user may not get the effect described.

Slight change to what is printed in the \file{.dvi} file when a
\prog{mfpic} detects that \MF{} or \MP{} has not been run, or the figure
is absent.

New {\tt fdim}s \mac{tlabel@hadj}, \mac{tlabel@vadj} and
\mac{tlabel@sep} for shifting \mac{tlabel} text. The first is a
horizontal adjustment, the second vertical, added to every label. The
third shifts the label directly away from the point of placement (unless
optional argument {\tt [Bc]} or {\tt [cc]} is used). A label is shifted
by \mac{tlabel@sep} downward when the {\tt t} parameter is found,
upward for {\tt b}, rightward for {\tt l} and leftward for {r}. The
first two dimensions can be set with a new macro
\mac{adjustlabels}[\<hadj\>][\<vadj\>], and the third with
\mac{tlabelsep}[\<dimen\>]. Need to do it this way because under
\opt{mplabels} they need to write the information to the output file.

Added \mac{expandafter} before \mac{@render}\mac{fi} in several
places. This now appears not to be needed, but the \mac{fi} following
\mac{@render} caused problems with some experimental versions of
optional argument handling.

Added the following macros for drawing axes along the borders of the
picture:
\bex
 \mac{leftaxis}\brk
 \mac{rightaxis}\brk
 \mac{topaxis}\brk
 \mac{bottomaxis}\brk
 \mac{bottomleftaxes}\brk
 \mac{borderaxes}\brk
 \mac{leftaxisshift}\brk
 \mac{rightaxisshift}\brk
 \mac{topaxisshift}\brk
 \mac{bottomaxisshift}
\eex
The first four draw the appropriate axis (no head by default), the last
four set an amount (in graph units) to shift the axis inward.

For tick marks we have:
\bex
 \mac{lmarks}\brk
 \mac{rmarks}\brk
 \mac{tmarks}\brk
 \mac{bmarks}\brk
 \mac{lmarksposition}\brk
 \mac{rmarksposition}\brk
 \mac{tmarksposition}\brk
 \mac{bmarksposition}\brk
 \mac{xmarksposition}\brk
 \mac{ymarksposition}
\eex
The first four set the positions (and optionally size) of the tick marks
on the corresponding axis, the next six determine if the marks are
centered, or on one side of the axis. They take an argument which must
be one of {\tt inside, outside, centered, ontop, onbottom, onleft,} or
{\tt onright}. For side axes the default is {\tt inside}, while for $x$-
and $y$-axes it is {\tt centered}.

For arrowheads on the side axis we have \mac{sideaxishead} which takes
a dimension argument and sets the length of the arrowhead. To turn heads
off again set the length to \dim{0pt}.

Added \mac{gridlines} to draw a regular grid of lines. It's syntax is
the same as that of \mac{grid}. Changed the behavior of \mac{grid}
so that instead of starting at the left and bottom, it draws the grid
centered on the origin of the graph coordinates.

Changed most of the \mac{if}-tests so that if an incorrect optional
parameter is used, the default behavior will be seen. For example,
\mac{function} takes an optional argument of {\tt [s]} or {\tt [p]} with
{\tt s} the default. The code had been:\brk
\mac{if \#\#1s true}\mac{else false}\mac{fi}\brk
and I changed it to\brk
\mac{if \#\#1p false}\mac{else true}\mac{fi}\brk
so for the typographical error \mac{function[o]}, the user will get the
effect of {\tt s}.

Added the command \mac{labeljustify} to change the default justification
of text labels. For example, \mac{labeljustify}[cr] makes the default
{\tt [cr]} instead of {\tt [Bl]}.

When \opt{truebbox} is in effect, but \prog{mfpic} detects that \MP{}
has not been run, \opt{truebbox} is turned off for each picture. Before,
this was global, now it is local (so that it doesn't affect a new
\mac{opengraphsfile} command).

Added the command \mac{tlabels} (note the plural). It has one
mandatory argument which contains a concatenation of arguments for one
or more \mac{tlabel} commands. These arguments may (but need not be)
separated by spaces or newlines.

Replaced all occurances of \mac{@labeldim}, which had been \mac{let}
equal to \mac{mfp@scratch}, to the explicit control sequence
\mac{mfp@scratch}. This was to avoid confusion that could have been
caused by changing one of them, not realizing they should be the same.

\noindent
{\it Revisions 0.4.11--15 beta}, July 2001:

\nobreak
\noindent
Restored a lost backward compatability: I stored the (\MP) primative
meaning of \mfc{dashed} in the command \gbc{dashed\_} and made
\gbc{dashed} synonymous with \gbc{DASHED}. Power users will have to use
\gbc{dashed\_} if they wish to invoke that primative after loading
\file{grafbase.mp}

Added \mac{MFPICwarn} to \mac{MFPICmsg} and \mac{mfp@errmsg}.
Added "MFpic error: " to the front of all \prog{mfpic} generated error
messages. Introduced \mac{on@line} (from \LaTeX) to place the line
number in warnings.

Removed many more spaces and eols from \file{mfpic.tex} (lest it be
input with spaces or eols active). Added some spaces lest ! have catcode
of letter. Changed catcode of ! to letter while mfpic loads, to have an
unusual character when testing for empty argument in something like
\mac{if !\#1!}.

Changed name of \mac{restoreCODE} (and others) to
\mac{MFPrestorecode} (etc.) after running across a package which
defined \mac{restorecode}. Introduced \mac{@xp} (from AMS\LaTeX) for
\mac{expandafter}. Removed saving of the current font as
\mac{@torig}, since we no longer change to \mac{nullfont}.

Added test for equality to \mac{relax} in \mac{testdef}. Removed
\mac{newlet}, \mac{sim@def} and \mac{sim@gdef} as they are not
used (any longer). The latter two were used once each and those were
changed.

Changed handling of \mac{if@mfp@metafont} and \mac{if@mfp@metapost}
to ensure they are kept mutually exclusive. Changed handling of
\mac{@if@mfp@beforefileopen} from a simple \mac{if}$\ldots$
\mac{else}$\ldots$ \mac{fi} to saving the alternatives in a macro
and then issuing the macro after the test. Changed \mac{mfp@clip} to
make it global if issued before \mac{opengraphsfile}. Redid
\mac{mfp@truebbox} to ensure it is global, but leave an out so that
\mac{@mfp@truebboxtrue}/{\tt false} could be set locally. Made similar
changes to \opt{mplabels}.

Removed \mac{unpreservelines} from \mac{mfsrc} since grouping
restores EOLs. Also made \mac{mfsrc} check that a \file{.mf}/{\tt p}
file has been opened.

Removed the definition of \mac{mf@bsl} since it is not used (any longer).

Delayed the definition of \mac{mfp@data} until
\mac{@mfpic@graf@macs}. Introduce the hook \mac{mfp@additions}, to
be expanded last in \mac{@mfpic@graf@macs}.

Changed the name of macro \mac{mfplinestyle} to \mac{mfplinetype} and the
\mac{count} register \mac{mfp@linestyle} to \mac{mfp@linetype}.
Changed name of \mac{missinggraphfileerror} to \mac{nooutputfileerror}.
Changed name of \mac{adjustlabels} to \mac{tlabeloffset}.
Changed name of \mac{labeljustify} to \mac{tlabeljustify}.

Try to support multiline labels even in the case of \opt{mplabels} by
writing appropriate definition of \bsl\bsl{} to the \file{.mp}.

Changed definition of \mac{mfp@scratch} from \mac{dimension255} to a
register defined by \mac{newdimen}.

Added ability to create a curve surrounding some text: macro
\mac{textboundary} creates a rectangle, with optionally rounded
corners, \mac{textoval} creates an ellipse with aspect ratio the same
as the block of text, \mac{textellipse} creates an ellipse with a given
aspect ration, \mac{textcircle} is \mac{textellipse} with aspect
ratio of $1$. \TeX{} measures the text and transmits the information to
\MF.

New macro \mac{axislabels}. This takes a letter indicating the axis,
an optional justification parameter (as in \mac{tlabel}) and a comma
separated list of \TeX{} text and numbers. The numbers indicating the
position on the given axis to place the text. Since side axes may be
offset from the edge of the graph, the utility \mac{mfp@addto} is used
to add the boundary coordinate (one of the parameters of \mac{mfpic})
to the appropriate offset, returning the result in graph units for use
in a \mac{tlabel} command. The default justification depends on the
axis. It is chosen so that the text ends up outside the border axes,
below the x-axis and left of the y-axis.

Color additions: added \mac{tlabelcolor} and \file{grafbase} color
variable \gbc{tlabelcolor} to control color of \MP{} placed text;
added \mac{backgroundcolor} to set the color variable
\mfc{background}, the color used by \mac{gclear} and by all plain
\MP{} \mfc{unfill} operations. Had to rewrite the various color setting
macros since, till now, all assumed the color variable name ended with
the string ``{\tt color}''.

Changed the macros introduced in 0.4.10 or previous that controlled the
position of the side axis. Now instead of saying\brk
  \indent\mac{leftaxisshift}[\<num\>]\brk
one says\brk
  \indent\mac{axismargin}[l][\<num\>].\brk
One can set all 4 margins at once with\brk
  \indent\mac{setaxismargins}[\<num\>][\<num\>][\<num\>][\<num\>],\brk
or all margins to the same number with\brk
  \indent\mac{setallaxismargins}[\<num\>].

A similar change was made to the setting of the axis marks position
(i.e., inside, outside or centered). Instead of\brk
  \indent\mac{lmarksposition}[inside]\brk
one writes\brk
  \indent\mac{setaxismarks}[l][inside].\brk
One can also set the position of all the border marks at once with
\mac{setbordermarks}, or all bordermarks to the same position with
\mac{setallbordermarks}.

Command \mac{drawaxes} added: it takes a comma separated list of
letters chosen from {\tt x}, {\tt y}, {\tt l}, {\tt b}, {\tt r} and {\tt
t}, and draws the specified axes.

Added optional parameter to \mac{plotdata} and \mac{datafile} which
has the form {\tt[p]} or {\tt[s\<num\>]}. {\tt p} causes a polygonal
curve to be plotted and {\tt[s\<num\>]} causes a smooth curve to be
drawn, with the given number as the tension. The number may be omitted,
and then \file{grafbase}'s value of \gbc{curvetension} (default 1.0) will
be used. Any other letter or none is the same as {\tt [p]}. Internally, the
optional parameter is passed to \mac{mfp@rwdata}, which now, of
course, takes parameters.  Along with this, \mac{smoothdata} was
revamped to simply change the default optional parameter, rather than
set a switch.

When \opt{metapost} is selected, each \env{mfpic} environment writes
the current font to the output file (in \mfc{verbtimtex}) to have at
least the chance (under \opt{mplabels}) to match the fonts that \TeX{}
would use in tlabels.

Framing code: in addition to \mac{framed} or \mac{mfpframed}, we now
have a \LaTeX{} environment: \mac{begin}[mfpframe]$\ldots$
\mac{end}[mfpframe] or, in plain \TeX, a command group
\mac{mfpframe}$\ldots$ \mac{endmfpframe}. This is actually
recommended (over the first form) if the user wishes to frame an
\env{mfpic} environment. This ensures that category codes are not
prematurely set by reading the whole picture as an argument.

Changes to \prog{grafbase}:

Moved \mfc{interim warningcheck:=0;} after \mfc{mode\_setup} because
\mfc{mode\_setup} sets it to 1. Now that \mfc{warningcheck} is correctly
set, we can change the test of parameters in \gbc{secd}, etc., from
comparing with \gbc{nottoosmall}, to comparing with \gbc{reallysmall}.

Streamlined \gbc{minpair} and \gbc{maxpair}.

Define transform \gbc{vtr} on its own in \gbc{setztr} rather than only
the macro \gbc{vconv} being defined (in terms of \gbc{ztr}). Define
\gbc{ztr} in terms of \gbc{vtr} (the ``right way to do things'', said the
linear algebra teacher). Remove definition of \gbc{invztr} and
use \gbc{inverse ztr} the few times necessary.

Remove the ``complicated \gbc{zconv}'' entirely.

Added plain \MP's \mfc{image} command to \file{grafbase.mf}.

Changed the command executed when \gbc{clipall} is \mfc{true} to
\gbc{clipto} instead of \gbc{clipsto}.

Added parameters \gbc{pair label\_adjust} and \gbc{numeric label\_sep}.
These are used in \file{grafbase.mp} for shifting labels. They are also
used there and in \file{grafbase.mf} for positioning and  sizing
\gbc{textrect}, \gbc{textoval} and \gbc{textellipse}.

Added \gbc{textboundary}, \gbc{textoval} and \gbc{textellipse} to put
paths around text. Only the size and center point of the text is passed
by \prog{mfpic}, not the actual text. These implement the \prog{mfpic}
commands \mac{textboundary}, etc.

Added test for \gbc{ClipOn} to dashing code, \gbc{plotsymbol} and
\gbc{plotnodes}.

\gbc{arrowdraw} now checks for \mfc{hlen > 0} befor drawing head.

Complete rewrite of axes code and drawing of hash marks on axes. Four
new axes added \gbc{leftaxis}, etc.

Changed code for \gbc{grid} so it is fitted to the coordinates: integer
multiples of \gbc{xspace} and \gbc{yspace} are plotted. Added
\gbc{gridlines}.

Changed \gbc{arcppp} in \prog{grafbase} for more robustness (I hope) and
better result on small values of \mfc{sweep}.

\noindent
{\it Revision 0.4.16 beta}, July 28--30 2001:

\nobreak
\noindent
Changed name of \mac{textboundary} to \mac{tlabelboundary} and then
\mac{tlabelrect}.\brk
Changed name of \mac{textoval} to \mac{tlabeloval}.\brk
Changed name of \mac{textellipse} to \mac{tlabelellipse}.\brk
Added ``star form'' of each that draws the curve without placing the
label. \brk
Renamed \prog{grafbase} command \gbc{textboundary} to \gbc{textrect}.

Replaced the four commands \mac{leftaxis}, etc., with single
command\brk
\indent     \mac{axis}[?\<hlen\>]{\<one-axis\>}\brk
and \mac{borderaxes}, etc., with\brk
\indent     \mac{doaxes}[?\<hlen\>][\<axis-list\>]

Recoded \mac{mfp@now} so that only 1 count register is used.

\noindent
{\it Revision 0.4.17 beta}, July 28--Aug 10, 2001:

\nobreak
\noindent
Changed \file{grafbase.mp} commands \gbc{textrect}, etc., so the first
two parameters (dimensions of some unspecified text) became one
parameter, which could be either a pair (dimensions), a string, or a
picture (e.g., a \mfc{btex...etex} expression). In the latter two cases,
\MP{} measures it and uses those dimensions to make a rectangle, etc.

Gave all commands that take a {\tt [s]} smoothness specification the
option to make it {\tt [s\<tension\>]} to draw the curve more tightly.
Commands affected: \mac{function}, \mac{parafcn}, \mac{plrfcn},
\mac{btwnfcn} and \mac{plrregion}. This necessitated changes in
\prog{grafbase} code to \gbc{mkfcn} so that it accepts a tension
parameter. Plus changes to all the macros that call it: \gbc{parafcn},
\gbc{xfcn}, \gbc{function}, \gbc{rfcn}, and \gbc{plrfcn}. Those that are
used by \prog{mfpic}, like \gbc{function}, were altered as follows. The
name was changed to \gbc{tfunction}, it was given a tension parameter
and the call to \gbc{mkfcn} passes that parameter. A new macro named
\gbc{function} simply calls \gbc{tfunction} with default tension. This
was to make the new \prog{grafbase} accept old files generated by
\prog{mfpic}. Those macros not used by \prog{mfpic} (\gbc{rfcn} and
\gbc{xfcn}) simply call \gbc{mkfcn} with tension equal to 1.

Redid \gbc{doplot}, \gbc{plotsymbol}, and \gbc{plotnodes} so that the
plotting symbol can be a picture as well as a path. If a path, it is
scaled by the scale parameter. A picture is not scaled, since this is
essentially not possible in \MF{} and since it is expected that in \MP{}
it will be a \mfc{btex...etex} expression and the size is determined by
the font. Because this is expected to be the typical case, the picture
is shifted so that it's center at the chosen position (instead of the
left baseline). This is not done in \MF{} since finding the center of a
picture is non-trivial. In \file{grafbase.mp} the first parameter is
also allowed to be a string, and is then converted to a picture with the
\mfc{infont} operator. In all other cases it reverts to a default dot
scaled by the second parameter.

Changed the \mac{mfpic} command so both optional parameters may be
omitted (scale 1 is then assumed). Also, the first parameter is no
longer saved in \mac{@param}. That was not a serious problem, but I
did experience a hard-to-debug problem from using the same temporary
name in another command. (It seems that \mac{@param} is not expanded
until \mac{@xconv} and \mac{@yconv} are used in tlabels, and I
included a redefinition of \mac{@param} in a command that calls
\mac{tlabel}).

Added EOL, {\tt *}, {\tt "} and {\tt \$} to the list of symbols whose
catcodes are saved, changed while reading \file{mfpic.tex} and restored
at the end. {\tt \$} is put in catagory 12 and used then in several
\mac{if} tests for empty arguments (previously {\tt !} was used, then
{\tt @}).

\noindent
{\it Revision 0.4.18 beta}, Aug 10--20, 2001:

\nobreak
\noindent
Added point size option to \mac{grid}.

Added a macro \mac{plottext} similar to \mac{plotsymbol} except
instead of a symbol, it takes a bit of \TeX{} text. The macro runs
entirely in \TeX{} issuing a sequence of \mac{tlabel} commands.

Changed \gbc{gridlines} so the lines and points are
fitted to the pixel grid. We now use \gbc{safedraw} on
\gbc{hroundpair(zconv(\<point1\>))}\allowbreak\gbc{--}\allowbreak
\gbc{hroundpair(zconv(\<point2\>))} instead of on
\gbc{zconv(\<point1\>)}\allowbreak\gbc{--}\allowbreak
\gbc{\<point2\>}.
When \gbc{grid} and \gbc{gridlines} are used with the same parameters,
this seems to make the picture periodic.

Added \mac{plrgrid} and \mac{plrpatch}.

Added  \mac{piechart} and  \mac{piewdge}.

Removed \mac{d@adv}, \mac{i@mul}, \mac{i@div}, \mac{q@mul} as it
turns out they are either no longer used or unnecessary: \mac{i@mul}
and \mac{i@div}, were only used in \mac{q@mul} and it isn't needed
as \mac{x}= 1.2\mac{x} works for fdims. \mac{d@adv} seems to have
disappeared from use.

\noindent
{\it Revision 0.4.19 beta}, Aug 20--26, 2001:

\nobreak
\noindent
Added \mac{mfpicnumber} to set the number of the next character or
figure.

Removed explicit references to \mfc{gcode}, instead of writing
\gbc{beginmfpic (incr gcode)}, \mac{mfpic} now writes \gbc{beginmfpic
(\mac{number}\mac{mfp@count})}. This way \TeX's understanding of the
current figure number and \MF's understanding are guaranteed to be the
same. The opening code of \gbc{beginmfpic} sets \gbc{gcode} in case any
existing files make use of it. This simplifies maintenance, and such
things as \mac{noship} and \mac{mfpicnumber}.

Speaking of which, added code to \mac{noship} to set a switch so
\mac{endmfpic} could skip placing an empty box. I hope this makes an
mfpic environment a typesetting no-op. The only worry is that an
invisible character or box might creep into the output. (It hasn't yet,
that I've noticed, but checking would require testing virtually every
macro we've defined that can be used in an mfpic.)

\noindent
{\it Revision 0.4.20 beta}, Aug 26--Sep 1, 2001:

\nobreak
\noindent
Added \mac{barchart} (it was easy after \mac{piechart}) after seeing
comments on gnuplot list that deprecated pie charts as a means of
conveying quantitative information. The rectangles become available as
\mac{chartbar}[$n$].

Changed the code (again!) for \gbc{shade} in \file{grafbase.mf}. I was
certain there had to be a faster way. The key turned out to be not to do
a double loop. Instead, draw the bottom row of pixels in one loop, and
then copy that row in another loop. The original looped $O(nm)$ times
if $n$ and $m$ are the dimensions of the rectangle. The new one loops,
$O(n+m)$ times. A slight bit of efficiency in coding is obtained by
finding the smallest repeating pattern and repeating that (avoids
shifting every other row). This turned out to be two dots at a 45 degree
angle placed \mac{shadespace} apart. Then copy \emph{that} picture.

I was worried that this algorithm had to copy a much larger picture the
second loop, but it seemed to make little difference. The bottleneck
seems to be the loop overhead. There was a seven-fold speed increase in
shading a \dim{100pt by 100pt} rectangle with a \mac{shadespace} of
\dim{1.2pt} (this is about the most dots MiK\TeX's \MF{} could handle).
I came up with another algorithm that is $O(m/n + \log n)$, $n < m$. But
it was only marginally better at the sizes \MF{} could handle. Plus it
traded memory for speed. It built a shading rectangle of size at least
$n/8$ in $O(\log n)$ iterations and then tiled with $O(m/n)$ of them. This
could require up to an additional 12.5\% more memory, as the last row or
column could overshoot by up to $n/8$..

Changed timing so that \mac{mfp@count} is initialized to 1, and
incremented only in \mac{endmfpic} (where it is in the code skipped if
\mac{noship} is used).

Changed \mac{newdef} to \mac{def} for \mac{arrow} so \prog{eplain} won't
generate a complaint.

\noindent
{\it Revision 0.4.21 beta}, Sept 1--10, 2001:

\nobreak
\noindent
Got tired of typing \mac{macro} so I changed it to \mac{mac}. Also got
tired of \mac{vskip}\mac{myskip}, etc., so I wrote \mac{bcd} and
\mac{ecd} to bracket the headers of command descriptions. For examples,
I wrote \mac{bex} and \mac{eex}. Changed the font for \mac{prog} to
small caps and for \mac{opt} to sans serif. Added \mac{null} to the end
of \mac{TeX} for spacefactor reasons (saw this somewhere).

Wrote a \mac{myverbatim} macro for \file{mfpicdoc.tex} since
\file{header.tex}'s verbatim wouldn't work for me. Completely rewrote
\mac{head} and \mac{subhead} for better spacing and pagebreaks. (One of
these days I will give them numbers and perhaps translate everything to
either \LaTeX{} or \prog{eplain} to provide cross references.)

Added \gbc{SolidStar} to symbols allowed by \mac{plot}, etc. Changed
\prog{grafbase} code so that \gbc{Star} produces an open five-pointed
star instead of the asterisk previously drawn. Added \gbc{Asterisk} in
case anyone prefers the old way.

In \file{header.tex} change \mac{prog} to use small caps and \mac{opt}
to use sans serif.

Separated the part of \mac{mfp@rwdata} that writes the rendering code
from the part that writes the data. This is for later enhancements. The
wrapper that writes the rendering code is called \mac{do@datafile}. Took
out of \mac{mfp@rwdata} the code that wraps the point in (redundant)
parentheses. Now the parentheses \emph{must} be added by \mac{using}.

Changed the name of \mac{mfpic-package} to \mac{MFPicpackagE}, (part of
the paranoia that catcodes of punctuation might be changed).

Added code to several commands to test for empty optional arguments. The
reason: when an optional argument has two parts (as in
\mac{plotdata}[?s1.2]) the code splits it up as {\tt [\#1\#2]} so that
{\tt s} is assigned to {\tt \#1} and {\tt 1.2} is assigned to {\tt \#2}.
If {\tt 1.2} is omitted, then {\tt\#2} is empty, but if both parts are
accidentally omitted, the the closing bracket is assigned to {\tt\#1}
and \TeX{} searches for another right brace. This can cause extremely
unhelpful error messages from internal commands generated much later.
Now, a command like \mac{plotdata[]} is treated as if there were no
optional argument: default values are used. The user can deduce from
incorrect output where an error occurred.

Did the above for \mac{tlabel}, but only for the second part of the
optional parameter (laziness).

Added commands similar to \mac{rotatepath}: \mac{shiftpath}[\<p\>],
\mac{scalepath}[\<p\>,\<sc\>], \mac{xscalepath}[\<x\>,\<sc\>],
\mac{yscalepath}[\<y\>,\<sc\>] and \mac{slantpath}[\<y\>,\<sl\>]. \<p\>
is a pair, \<sc\> is a scale factor, and \<sl\> is a slant factor. These
commands accept a following path and pass back the corresponding
transformed path (to preceeding prefix macros).

Released to alpha testers.

\noindent
{\it Revision 0.4.22 beta}, Sept 11--22, 2001:

\nobreak
\noindent
Added \mac{reflectpath}[\<$p_1$\>,\<$p_2$\>], \mac{xyswappath} and
\mac{yslantpath}[\<x\>,\<s\>]. Added also \mac{xslantpath} as a synonym
for \mac{slantpath}.

Removed grouping in \mac{mftitle} that inadvertantly caused
\mac{tmtitle}'s argument to be omitted from the \file{.log} file.
Rewrote both to call a third macro. The third macro loads the argument
in a token list and writes to the mf file. \mac{mftitle} supplies the
grouping to preserve the token variable. \mac{tmtitle} also adds the
grouping, plus writes to the log and to the document.

Redid \mac{tlabel} so that it checks for completely empty optional parameter.

Also avoid duplicating every \mac{@...tlabel} command. Only ever did
that to avoid the message about rotation being ignored in the
\mac{nomplabels} case. Somewhere along the way handling of default
optional parameters made that moot.

Now \mac{tlabel} begins a group, then sets \mac{tlabel@rot} to empty
(not zero!) if mplabels is not in effect, then passes {\tt
[\mac{tlabel@vpos}\mac{tlabel@hpos}\mac{tlabel@rot}]} as the optional
parameter. The two different commands \mac{@tlabel} and \mac{@@tlabel}
ultimately end the group. This necessitated changing a number of
commands that call for tlabels: I thought it more efficient to say
\bex
  \mac{if@mfp@mplabels}\mac{expandafter}\mac{@tlabels}\mac{else}...
\eex
than to call \mac{tlabel} directly. But now that would unbalance the
grouping.

Somehow I overwrote the version of \file{mfpic.tex} in which I made the
above three paragraphs of changes with the previous version. So I did it
all again, but now it does the following. \mac{tlabel} starts a group
and calls two different commands: if no {\tt[]}'s follow it defines
\mac{tlabel@rot} to be empty under \mac{nomplabels}; and if {\tt []}'s
follow, it calls \mac{tlabeljustify}. Finally it calls either
\mac{@@tlabel} of \mac{@tlabel}, depending on \opt{mplabels}, feeding
the arguments \mac{tlabel@vpos}, \mac{tlabel@hpos} and \mac{tlabel@rot}.
This ensures that insufficient optional parameters produce default
results, as \mac{tlabeljustify} does default things with empty
parameters.

In grafpase: push \gbc{vtr} in \gbc{bcoords} command and pop it in
\gbc{ecoords}. Added \gbc{vtr := ztr shifted -zconv((0,0));} to
\gbc{apply\_t}. It seems \gbc{coords} and \gbc{apply\_t} were broken
ever since I defined \gbc{vconv} in terms of \gbc{vtr} instead of
\gbc{zconv}.

\noindent
{\it Revision 0.5.0 beta}, Sept 24--Oct25, 2001:

\nobreak
\noindent
Change comment written at the top of the output file. Now includes the
name of the output file, as well as the \mac{jobname} of the TeX source
that produced it.

Changed how \mac{grid} handles optional point size. Now it writes a
command \gbc{vgrid} that takes the extra parameter (and old \gbc{grid}
just calls \gbc{vgrid} with default parameter).

Made \mac{mfpic} and \mac{endmfpic} write the source line number to the
output for debugging use.

Added token list \mac{every@tlabel} and a command \mac{everytlabel} for
setting it (and writing the settings to the \file{.mp} file when
\opt{mplabels} is in effect.) In order to make this local to \env{mfpic}
environments, now \mac{mfpic} writes {\tt verbatimtex \mac{begingroup}
etex} to output and \mac{endmfpic} ends the group (under
\opt{mplabels}).

Renamed \mac{if@graphfileexists} to \mac{ifmfpicFirstTime} which
required reversing the sense of all if-tests. This will allow the
user to override the behavior of \prog{mfpic} in unusual circumstances.

Restored the command that expands to a catcode 12 backslash, for writing
the outer token \mac{newtoks} to the output file.

Because \mac{mfsrc} ends with \mac{ignorespaces} (should it?) commands
can generate a space under \opt{metafont} but not under \opt{metapost}
with \opt{mplabels} (because they write \TeX{} code to the output). I
have therefore started to look out for such differences and am adding
\mac{ignorespaces} when I notice them.

Released to CTAN, Oct ??, 2001.


\noindent
{\it Revision 0.5.01 beta}

\nobreak
\noindent
This modification actually occured in February 2002, but I made it on
version 0.5.0, correcting a small bug by adding some braces around the
point arguments of \mac{tlabel} in a couple of places. The problem was
that \MP{} code in the point argument could contain parentheses or
commas, and these had to be hidden inside braces. The code of
\mac{tlabels} and other commands would read this argument twice so two
levels of braces were needed, but that would cause errors in other
contexts. The internal braces in the right places meant the user need
only use one. All of this was only a problem with mplabels.

\noindent
{\it Revision 0.5.02 alpha}, Oct 26--Nov 8, 2001:

\nobreak
\noindent
Put most of the catcode changes (in the ``paranoia'' section of
\file{mfpic.tex}) in a command \mac{mfp@sanitize} for possible reuse.

In preparation for a planned enhancement, I have divided \mac{@figmac}
into three parts: the set-up, write, and post-write phases. The idea
is that, e.g., \mac{@curve[1.2]} will do the setup, and write the code
\mfc{tcurve(1.2, false)} but not the points or the ending semicolon, then
close with the all-pupose macro \mac{@figmacdata}. This macro will scoop
up the last parameter (listing the points), write them to output, adding
the semicolon, and then issue the post-write code. Why? Ultimately I
would like to be able to present the data in more than one form.
\mac{@figmacdata} would detect the form and do the appropriate thing. In
particular I would like to be able to do something like\mac{curve[1.2]}
\mac{datafile}[file.dat] to draw a curve connecting the points listed in
\file{file.dat}.

Have actually changed the definition of \mac{curve} and \mac{cyclic} to
use this scheme, although \mac{@figmacdata} just writes the inline data
points to output. Shouldn't be unusually hard to make it open the file
handle and call \mac{mfp@rwdata}. I will first try to organize the
opening, reading, writing and closing of files into reusable modules.

\noindent
{\it Revision 0.5.03 alpha}, Nov 8, 2001--???:

Further modified \mac{@figmacdata}: Split it in two. First,
\mac{mfp@writelist} writes the list, enclosed in parentheses and
followed by a semicolon, then issue \mac{@figmacend}. This is because
lists are also used by ``non-figmacs'', like \mac{xmarks} and
\mac{point}. For these I just use \mac{mfp@writelist}. Perhaps it
wouldn't hurt to include \mac{@figmacend} on those, but I wasn't
prepared to chance it. Also put the common combination
\mac{@figmacstart}\allowbreak\mac{mfsrc}[\#1]\allowbreak\mac{@figmacdata}
in a new macro \mac{@listmac}.

Now all those macros that take a list as last argument (thank goodness
it always \emph{is} the last argument) follow the scheme. This includes
\mac{xmarks}, \mac{ymarks}, \mac{lmarks}, \mac{bmarks}, \mac{rmarks},
\mac{tmarks}, \mac{point}, \mac{plotsymbol}, \mac{piechart},
\mac{barchart}, \mac{polyline}, \mac{polygon}, \mac{fcncurve},
\mac{curve}, \mac{cyclic}, \mac{qspline}, \mac{closedqspline},
\mac{cspline}, \mac{closedcspline}, and \mac{turtle}. Ultimately, I may
make \mac{@figmacdata} write data from a file (if the next token is
\mac{datafile}) or data listed inline as if in a file (if the next token
is \mac{inline}).

I rewrote the code in \mac{@mfpic} that loads the figure into
\mac{@wholegraph} so that when \mac{ifmfpicdraft} is true then
it is skipped completely and \mac{@wholegraph} is just set to an empty
box. Then, at the end of \mac{@mfpic}, if \mac{ifmfpicdraft} is true,
the figure number in \mac{tt} is set as a \mac{tlabel} (so the size of
the figure will automatically adjust to accomodate it).

Oops! Had to change the above behavior: \mac{tlabel} doesn't expand its
contents when writing to the \file{.mp} file in \opt{mplabels}. So it is
impossible to get \mac{mfp@count} (the picture number) written as a
number. Rather than have to write the definition of \mac{mfp@count} to
the output file, I changed the code that loads the figure into
\mac{@wholegraph} to put the figure number into the box as straight
text. Now, the figure number may again overwrite the boundaries of the
box, but that's OK, I guess, since it's just a temporary situation.

\noindent
{\it Revision 0.5.04 alpha}, ???--April 11, 2002:

Added \mac{@XP} which expands to three \mac{expandafter}s.

Changed what the \opt{truebbox} option writes to the \file{.mf} file.
The scope in \MF{} should now more closely match the scope in \TeX{}.

Added options \opt{draft}, \opt{final}, and \opt{nowrite} (as well as
command versions \mac{mfpicdraft}, \mac{mfpicfinal}, and
\mac{mfpicnowrite}) which should avoid including the pictures
(\opt{draft}) or include the pictures (\opt{final}), overriding
automatic decisions. Option \opt{nowrite} avoids writing anything to the
\file{.mf} file.

Made several assignments, such as  \mac{mfp@count}, \mac{@graphfont},
etc., global, in case the command \mac{opengraphsfile} is issued inside a
group.

Rewrote \mac{tlabel} and friends so that the point arguments could
optionally be enclosed in braces. This was done by checking for a left
parenthesis with \mac{mfp@ifnextchar} and branching on that. This
allowed me to change the \gbc{gblabel} command to accept a list of
points, and now \mac{tlabel} can, under \opt{mplabels} accept a list of
points in braces.

Completely reorganized the data file reading macros (much smaller and
free of \mac{loop}\allowbreak$\ldots$\allowbreak\mac{repeat} constructs). Also
added the previously mentioned capability to replace any list after a
macro such as \mac{curve}[$\ldots$] with the construct such as
\mac{curve}\mac{datafile}[\file{file}] to construct the list from the
data in \file{file}

Changed explicit value of 5 data points per line to the value of
\mac{mfpdataperline} when plotting data files.

Added error messages \mac{nodatafileerror} and \mac{emptydatafileerror}.

Added command \gbc{resizedrawpen} to \prog{grafbase} to unclutter the
output file.

Collected the common code in \mac{xmarks}, \mac{ymarks}, etc., so that
now they are implemented with \mac{marks~x}, etc.

Added aliases \mac{lattice} and \mac{gridpoints} for \mac{grid}.

Changed the option handling in \mac{tlabel} so that it is translated
into integer values and \mac{ifcase} can be used, making for simpler
conditional code. Added \mac{mfp@justifyerror} to the \mac{tlabeljustify}
command, to occur if an invalid letter is used.

Added \mac{extra@tlabel} command at the end of \mac{@tlabel} and
\mac{@@tlabel}. Redefining this makes it easier to write macros looping
through many \mac{tlabel} commands.


\noindent
{\it Revision 0.5.05 alpha}, April 16, 2002:

Corrected bug in \mac{mfpverbtex} which caused \# symbols to be doubled
in the output: simply change catcode of \# before reading the
verbatimtex material into the token list.

Remove \mac{DeclareGraphicsRule} commands issued in \file{mfpic.tex} so
as not to interfere with the graphics package error checking. Instead
the equivalent is done inside a group for each picture with
\mac{@namedef}[Gin@rule@.\bsl mfp@count].

Added a command index to \mac{mfpicdoc.tex}. Tne distribution now
includes a recent version of \file{eplain.tex} for the indexing macros
and the actual index \file{mfpicdoc.ind}. The file \prog{makeindex}
style file that was used, \file{mfpic.ist}, is also included.

\noindent
{\it Revision 0.5.06 alpha}, April 16--May 7, 2002:

After installing new MiKTeX and forgetting to set localfont, I found
that \gbc{textrect}, \gbc{textoval} and \gbc{textellipse} (in
\file{grafbase.mf}) fail due to arithmetic overflow. This is because
rather simple text can be (say) 40pt by 40pt. Since that is 400 by 400
pixels (under \mfc{mode:=ljfour}), and we have to compute numbers on the
order of their product, we exceed the 32K limit on numbers. Changed
these commands to do computations in graph coordinates. That is at least
resolution independent. Also change some formulas involving \mfc{sqrt}
to instead use \mfc{++} or \mfc{abs} to minimize such problems.

Updated most docs. Changed mfpic.ist so it will write an \prog{mfpic}
package comment to the top of mfpicdoc.ind.

\noindent
{\it Revision 0.5.07 alpha}, May 7--June 25, 2002:

Added \mac{usingpairdefault} to reset the \mac{using} specification to
the default. Also \mac{usingnumericdefault} for commands that take a
numeric list (equivalent to \mac{using}[\#1 \#2][\#1]).

Documented \mac{marks}[\<axis\>] commands.

\noindent
{\it Revision 0.5g alpha}, June 26--July 31, 2002:

Changed version numbering scheme so LaTeX file utilities like the
\prog{snapshot} package are better served.

Change the graphic inclusion to use \mac{@setmfpicgraphic} which, in
addition to executing \mac{setmfpicgraphic}, also runs any additional
commands that may be needed and should be transparent to the user. These
include the above setting of the graphics inclusion rule, and now also a
scheme for recovering the bounding box (for future feature allowing
\opt{truebbox} without \opt{mplabels}). The graphics package makes this
hard by not saving it globally except in \mac{@gtempa}, which hardly
seems safe to rely on. Neverheless that is what I use now, though it
doesn't get used yet.

Changed \mac{DeclareOption*} to print a warning or a message (depending
on whether graphics was already loaded or not) instead of just passing
the option on to graphics package).

The default \mfc{verbatimtex} stuff that was written to the out file in
\mac{opengraphsfile} is now stored in a token register
\mac{mfp@commonverbatimtex} and then written.

\mac{opengraphsfile} now checks for the existence of a file with the
extension of the current value of \mac{mfp@count} (default 1) in case
the user changes its value (with \mac{mfpicnumber}) before that command.
\file{mfpic.tex} now sets it to 1 rather than rely of
\mac{opengraphsfile} to do so.

Changed \mac{tlabel} to place its contents in a simple left aligned
\mac{halign}. This makes it possible to right-align or center multi-line
labels with an \mac{hfill} or \mac{hfil} on left.

Corrected bugs in file read/write (\mac{plotdata}, etc.): Moved
whitespace resetting to \mac{@processdatafile}, and changed one \mac{def}
in \mac{mfp@rwdataloop} to \mac{edef}.

Moved the LaTeX2e graphics rule stuff to \mac{mfpic}, \mac{usemetapost}
now just saves the graphics rule signature ("eps" or "mps") for use in
that stuff.

Remove \file{eplain.tex}, substituting \file{indexing.tex} which
contains only(?) macros necessary to process the one indexing command
actually used in \file{mfpicdoc.tex}, and the two-column printing of the
index.

\noindent
{\it Revision 0.5h alpha}, Aug 1--6, 2002:

Added code to \mac{@setmfpicgraphic} to retain the lower left corner of
the picture under \opt{metapost}. I did this by redefining
\mac{Gin@def@bp} to make its definitions (of \mac{Gin@llx}, etc.)
global. Then added that info to \mac{@xconv} and \mac{@yconv}. This
allows \opt{truebbox} to work without \opt{mplabels}. Added code to
\file{graphbase.mp} that keeps track of maximum bounding box of all the
text labels and to adjust the figure's bounding box if that extends past
the boundary of the \env{mfpic} environment. This allows labels to
expand the size of the graph (as documented) in the remaining case: with
\opt{mplabels} but without \opt{truebbox}.

This requires that any user who redefines \mac{setmfpicgraphic} must
also redefine a command \mac{getmfpicoffset} that stores the coordinates
of the lower left corner in the macros \mac{mfpicllx} and
\mac{mfpiclly}.

Reverted to the previous \mac{tlabel} method of producing multiline
labels. The \mac{halign} method (specifically the {\tt
\mac{let}\bsl\bsl\mac{cr}}) produces an error when either of the
packages \prog{latexsym} or \prog{amsfonts} is used. So it is not (yet)
possible to right align or center multiline labels.

Reverted back when I discovered that \mac{def}{\tt\bsl\bsl\{\bsl cr\}}
did \emph{not} conflict and seems to work just as well. It is again
possible to right align and center multiline labels.

Added \mac{gclip} rendering macro (did no one ever miss this?), that
clips the current picture to the interior of the following path. And
added an example to \file{*objs.tex}.


\noindent
{\it Revision 0.5i alpha}, Aug 7--12, 2002:

Added an example of \mac{gclip} to the files \file{*objs.tex}.

Rearranged the \gbc{endmfpic} code of \file{grafbase.mp} so that
\opt{truebbox}, \opt{clip} and \opt{mplabels} interact properly, meaning
that text which is clipped off \emph{doesn't} expand the bounding box.

Announced to mfpic mailing list. Maybe this will become version 0.6 beta.
(Ha!)

\noindent
{\it Revision 0.5j alpha}, Aug 12--15, 2002:

Changed name of \mac{marks} command (introduced in 0.5.04) to
\mac{axismarks} to avoid name clash with \eTeX{} primitive command
(reported by Guy Worthington).

\noindent
{\it Revision 0.5k alpha}, Aug 15--26, 2002:

Rearrangment of \mac{begingroup}s at some point caused a problem with
\mac{datafile} commands: the \mac{@figmacend} was issued inside a group.
(reported by Jaromir Kuben).

I moved the location of \mac{@figmacstart} and \mac{@figmacend} and that
solved it but caused a problem with \mac{plotdata}, which reused that
code. Solved by putting an appropriate \mac{@figmacend} in the
\mac{plotdata} code.

\noindent
{\it Revision 0.5l alpha}, Aug 26--29, 2002:

Changed the code that saves the lower left corner of the picture under
\opt{metapost}. Instead of making \mac{Gin@llx}, etc., global, I
redefine \mac{Gread@parse@bb} to store them globally in our own macros.
This redefinition happens only in the \mac{mfpic} envirinment (in fact
only inside the box where the graphic is included).

I settled on this as having almost no side effects. Perhaps there is a
reason the \mac{Gin@*} commands are local even though no one on
comp.text.tex came up with one.

Also, since now the only \mac{begingroup}/\mac{endgroup} pair in the
file read/write code is in one place: the \mac{@processdatafile}
command, I deleted all the \mac{global} in front of \mac{read} commands.

\noindent
{\it Revision 0.5m alpha}, Aug 29--30, 2002:

Updates to \file{*.txt}, \file{readme.1st}, and documentation.

Changed \mac{mfp@ifnextchar} so that when looking for the next token, it
will skip over \mac{relax}. This means one can put the optional argument
on another line even when \mac{preservelines} is in effect (at which
time the line end character is active and has been \mac{let} equal to
\mac{relax})

Change \mac{@figmaclist} and \mac{@mfp@writelist} so they preserve
lines. Since all commands that write lists of data to the output file
ultimately run one of these, all those commands preserve lines. Then I
removed \mac{preservelines} from \mac{mfpic}. Now we no longer need the
caution about putting a macro and its arguments on the same line.

\noindent
{\it Revision 0.5n alpha}, Aug 30--Sep 04, 2002:

Allow \mac{tlabelsep} and \mac{tlabeloffset} to have any \<dimen\>
argument. I was so stupid: it was just a matter of setting the \TeX{}
dimensions first and then writing their values to the output.

Documented \mac{mfpdataperline}. Also changed it to a macro rather than
a \mac{count} because LaTeX users are unfamiliar with count registers
(\mac{newcounter}, yes, \mac{newcount}, no). I could have called it
\mac{c@mfpdataperline}, but then it wouldn't be user-level for plain
\TeX{}.

Changed ``\mac{ifnum}\mac{mfp@n}{\tt =}\mac{mfpdataperline}'' to
``\mac{ifnum}\mac{mfp@n}{\tt <}\mac{mfpdataperline}'' and exchanged the
true and false clauses. Just in case some user sets \mac{mfpdataperline}
to something which is not a positive integer.

Added \mac{space} to \mac{mfsrc}[verbatimtex \bsl endgroup \bsl space
etex], just in case \TeX{} could enter a state where it doesn't append a
space when it writes the \mac{endgroup}.

\noindent
{\it Revision 0.5o alpha}, Sep 04--06, 2002:

Corrected \file{LTXMFobj.tex} and \file{LTXMPobj.tex}. After testing
various combinations of \opt{mplabels} and \opt{truebbox}, I'd
incorrectly added these options to the former file and failed to restore
them to the latter.

\noindent
{\it Revision 0.5p alpha}, Sep 06--09, 2002:

Added commands \mac{setpapersize} and \mac{setpagegeometry} to
\file{header.tex}. Now the preamble of almost every \file{.tex} file in
the \file{docs} diretory is reduced to using these two commands.

Deleted old verbatim macros which were no longer used.

Removed ``\gbc{save piecenter;}'' from \prog{grafbase}. This variable
was documented to be set by the \gbc{piechart} command, but saving it
made it unavailable.

Corrected the example concerning \mac{datafile} with \mac{xmarks}: the
parameters of \mac{using} needed a space between them.

\noindent
{\it Revision 0.5q alpha}, Sep 09--12, 2002:

Multiple documentation refinements.

Removed \mac{if@mfp@metafont}, using only the switch
\mac{if@mfp@metapost}.

Added \mac{mfp@ifdefined}: it checks if a token is neither
\mac{undefined} nor \mac{relax}. Used in macros to detect format. Moved
definition of \mac{@firstoftwo} and \mac{@secondoftwo} before it.

Made some definitions in \mac{usemetapost} global, in case it is
mistakenly issued inside a group.

Removed \mac{@eatspacedef} since it was used only once to define
something, and it was shorter to define it directly.

Changed \mac{ifx}s in \mac{@@arrowoption} to \mac{if}s in case someone
wants to pass the the letter as a macro

In axis code, changed {\tt \lq\bsl x} to simply {\tt \lq x} lest \mac{x}
have some definition and some TeX state causes it to be expanded.

Gave \mac{newsavepic} a definition closer to \mac{newsavebox}, which
uses \mac{@ifundefined} rather than strictly testing against
\mac{undefined}.

\noindent
{\it Revision 0.6 beta}, Sep 12, 2002:

Uploaded to CTAN.

\bye
