diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/mfpic/changes.txt')
-rw-r--r-- | Master/texmf-dist/doc/generic/mfpic/changes.txt | 3053 |
1 files changed, 3053 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/changes.txt b/Master/texmf-dist/doc/generic/mfpic/changes.txt new file mode 100644 index 00000000000..a362e6d95a1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/mfpic/changes.txt @@ -0,0 +1,3053 @@ +%%% File: changes.tex +%%% A part of mfpic 0.7a beta 2004/04/16 +%%% + + Changes History. + +VERSION 0.0.x: + +Development versions. Never released. + + +VERSION 0.1: + +First version released to network, 30 June 1992. + + +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. + + +VERSION 0.2: + +Second version released to network, 7 Sept. 1992. (Still had 0.1.13.1 +version number in code---oops!) + + +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. + + +VERSION 0.2.5 of Wed 10 Nov. 1993: + +Bug fix release Primarily work by Geoffrey Tobin. + + +REVISION 0.2.(5.0.)9 of Mon 28 Feb. 1994: + +Intended to release as version 0.3 to network. Release delayed, as +picture operator code is overhauled to cope with arbitrary overlays: 11 +Mar. 1994. + +Horizontal offset by unwanted glue is traced to missing comment +characters: Fri 29 Apr. 1994. + +Vertical displacement of shading reported for MF modes with +nonrectangular pixels: Mon 23 May 1994. + + +REVISION 0.2.5.1 of Wed 13 July 1994: + +Bug fix release Corrected "unxconv" bug which remained in version +0.2.5's graphbase.mf. + + +Alpha Test Versions. + +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. + + +UPDATE 0.2.9.1 Alpha} of Thu 8 September 1994: Fixes a bug in \sclosed +and a bug in \white, corrects some omissions and typos in the +documentation, and adds the \shadewd, \hatchwd, \lhatch and \rhatch +macros. + + +UPDATE 0.2.9.2 Alpha of Fri 24 February 1995: Rearranges some code in +mfpic.tex; little else to report. + +In 0.2.9.3 Alpha of Thu 21 March 1995: + +GT renamed \fill to \gfill, in order to avoid conflict with the LaTeX +\fill macro. + + +UPDATE 0.2.9.4 Alpha of Thu 13 April 1995: + +Contributes a test for an existing definition of each macro in +mfpic.tex, + +Renaming of \label to \tlabel, and \caption to \tcaption, in order to +avoid conflict with the LaTeX macros with those names. + +\white was renamed to \gclear, because \white is a likely name for a +color macro. + +Also, a new macro for defining Metafont functions was introduced, +because user-defined functions provide more power, and function plotting +macros were added that accept Metafont function names instead of +Metafont expressions. + +Renaming of graphbase.mf and graphdoc.tex to grafbase.mf and grafdoc.tex +to emphasise incompatible upgrade of mfpic Metafont macros, and to +provide $8+3$ filenames for ms-dos users. + +Added \hbox{} to start of \mfpic, for some now forgotten reason to do +with formatting, I suppose. + +VERSION 0.2.9.5 Alfa of Wed 19 July 1995: + +Replaces TeX dimensions by font dimensions for economy. + +Renames \mfcmd to \mfsrc for clarity. + +Renames \wedge to \sector to avoid conflict with the character name +defined in plain TeX and LaTeX. + +Introduces \mftitle, \tmtitle and \plr. + +Abolishes \plrpoint, \plrlines, \plrcurve and \plrcyclic as +redundant specializations. The meaning of \turtle is changed to a +Cartesian form, for flexibility. + +Changed objects.tex to use \tmtitle, \plr, \mfsrc, \gfill, +\gclear, \tlabel, and \tcaption. + +Rendering macros redesigned, and \setrender introduced. Coordinate +transforms in grafbase.mf made slightly more robust. Begin an attempt +to make grafbase.mf compatible with John Hobby's MetaPost drawing +program. + +Added comment in grafbase.mf about dangers of text arguments, + +Updated the documentation files grafdoc.tex, Acknowl.tex, README2, +MANIFEST and mfpicdoc.tex. + + +UPDATE 0.2.9.6 Alfa of Mon 24 July 1995: + +Contributes \thatch which provides hatching by lines at any angle. + +Modifications to \pen, \shadewd and \hatchwd, along with changes to +grafbase.mf to make drawing, shading and hatching more independent. + +Decided that the behavior of \point inside a connect environment was +bizarre, hazardous, and an unnecessary complication to the mfpic macros, +so \point has reverted to its original, obvious and simple definition. + +Renamed \rotate to \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 grafbase.mf to use a transform stack to implement local +Metafont coordinate systems; this may be more robust, and extensible to +other graphic localizations. + + +UPDATE 0.2.9.7 alfa, Fri 18 August 1995: + +Changes to pictures.tex: + +Replaced version from "0.2.9.1 alpha Thu 8 September 1994" to +"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 \label by \tlabel, \caption by \tcaption, +\fill by \gfill, \wedge by \sector. + +Added some uses of \mftitle. + +Moved one arrow in the commutative diagram, to illustrate the b +option of the \arrow command. + +Simplified Metafont algebraic expressions used in function plots, so +that they use fewer * operators. + +Edited the example of \turtle to allow for the new semantics of +rectangular coordinates. + +Captioned all eight figures, with figure numbers and descriptions. + +Deleted an instance of "\vfill\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. + + +Changes to lapictures.tex: + +Renamed version from "0.2.9.1 alpha Thu 8 September 1994" to +"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 \mag command. + +Set \fboxsep to zero. + +Initialized arrow heads using \headshape. + +Commented out the center environment around the commutative diagram +example. + +Placed \fbox commands around each picture. + +Other changes as in pictures.tex. + + +Extensive changes to grafbase.mf: + +Turned warningcheck off. + +Used an explicit designsize. + +Debugging refined. + +Rearranged some code. + +Made ClipOn boolean (instead of numeric). + +Added maparr macro. + +Eliminated mistake of using hround in graph-to-pixel coordinate +transformation. + +Remarked that clipping can distort paths by changing their points. + +Tried to clip on character boundary. + +Added Metafont vector coordinate transform, to complement affine +transform for geometric points. + +Write message when drawing nominal Metafont bounding box. + +Changed beginmfpic Metafont macro to take only the character code as +an argument. + +Introduced global Metafont transform stack, for coordinate changes. + +Replaced currentpen by drawpen in path stroking. + +Changed ourfill and ourunfill to use an undelimited path argument. + +Added setdotpath, ourdot. + +Changed onedot to use dotpath instead of a scaled shape path. + +Edited tightbbox and bbox to take a path described in pixel +coordinates as their first argument, instead of one in graph +coordinates. + +Added tbbox. + +Did some more saving of local variables in Metafont functions. + +Deleted lhatchf and rhatchf. + +Added thatchf, thatch, hhatch and xhatch. + +Rewrote lhatch and rhatch to use thatch. + +Edited dotted, renamed it dashed. + +Added a separate dotted Metafont macro. + +Changed head from a def to a vardef; edited head to clarify its +code. + +Altered axis tic mark macros, xmarks and ymarks to ensure that the +tic marks are always at right angles to their axes, irrespective of +coordinate transforms. + +Added a grid command. + +Renamed mkellipse to ellipse, deleted old ellipse. + +Renamed mkarc to arc. + + +UPDATE 0.2.9.8 alfa, Mon 11 September 1995: + +Added to Acknowl.tex. + + +In mfpic.tex: + +Add comment about use of \ignorespaces to skip spaces in user's +document after \mfpic command. + +Retain line separations of user's document's mfpic environment when +writing Metafont file. This prevents long Metafont commands from +exceeding Metafont's input buffer. + + +UPDATE 0.2.9.9 alfa, Thu 5 October 1995: + +In mfpicdoc.tex: + +changed \wedge references to \sector, and \rotateabout to +\rotatearound. + +Added some logical formatting commands to mfpicdoc.tex. + +Included much more information about recent changes (from 0.2.9.1 to +0.2.9.8). + + +In mfpic.tex: + +Renamed \@graph to \@graphfont for identifiability. + + +UPDATE 0.2.9.10 alfa, Fri 6 October 1995: + +In grafbase.mf: + +Deleted spurious argument to \xyswap. + +Changed \store to take two arguments, and to logically bracket the +second, which is the path description. + + +UPDATE 0.2.9.11 alfa, Fri 24 November 1995: + +In grafbase.mf: + +Fixed X-coordinate rounding bug in thatchf. + + +REVISION 0.2.10.0 alfa, Wed 17 January 1996: + +In mfpic.tex and grafbase.mf: + +Changed names of five Metafont macros: xslanted, yslanted, zslanted, +boosted, and xyswapped to xslant, yslant, zslant, boost, xyswap. + + +In grafbase.mf: + +Replaced my dash and dot code by Frank Michielsen's, modified to use +suffix arguments instead of text for l-values. + +Also, the dotsize argument to dotted is now effective. + +Deleted the unused ourdraw, ourfill, ourunfill macros. + +Simplified the dotpath and onedot initialization code; it was too +baroque. + +Added a pixdot macro as a shorthand for picdot(active_plane,onedot,p). + +Replaced the apoint (w, a) macro by bpoint (w, b) which is a +shorthand for fullcircle scaled w shifted b. + +Gratuitously added Bruce Leban's overlay macros from the METAFONTbook, +page 295. + +Cosmetic reformatting of source. + + +In Acknowl.tex: + +Add Frank Michielsen's name. + + +REVISION 0.2.10.1 alfa, Thu 18 January 1996: + +In grafbase.mf: + +Fixed wrong declaration in dotted of dp from path to pair. + + +REVISION 0.2.10.2 alfa, Tue 23 January 1996: + +Editing to restore compatibility with older graphbase.mf versions used +with xfig's (actually, transfig's fig2dev's) mf driver (genmf.c). + + +In mfpic.tex: + +Edited writing of setting of Metafont variables xscale and yscale to +omit factor of unitlen. + +Changed references to drawwd to penwd in \drawpen. + + +In grafbase.mf: + +Add declarations and initializations of these variables: unitlen, +xscale, yscale, xneg, xpos, yneg, ypos. + +Renamed drawwd to its former name, penwd. + +Again made penwd, hdwdr, hdten into newinternal variables, and +assign them using interim. + +Definition of ztr now includes unitlen as a factor in the x and y +scaling. + +mfpicenv and endmfpicenv defined as empty statements. + +bounds defined for setting xneg, xpos, yneg, ypos. + +beginchar now includes unitlen. + + +REVISION 0.2.10.3 alfa, Tue 6 February 1996: + +In mfpicdoc.tex: + +Updated documentation to cover to \dotted, \dotsize and \dotspace +on the one hand, and \dashed, \dashlen and \dashspace on the other. + + +REVISION 0.2.10.4 alfa, Mon 26 February 1996: + +In mfpic.tex: + +Let internal \sim@gdef (simple global definition) stand for \gdef. + +Added \newgdef for new global definitions with a test for previous +definition. + +Replaced use of \obeylines by \mfpicobeylines, to use \endgraf instead +of \par, because LaTeX(2e) redefines \par with unpleasant effects on +Metafont files when using LaTeX's center environment. (To wit, LaTeX's +center environment would write \@@par to the Metafont file. + +Defined \preservelines to call \mfpicobeylines then set +\newlinechar to control-M (carriage return). + +Use \preservelines in \mfsrc, thus bypassing (I hope) the mischief +arising from LaTeX in the center environment. + +Wrapped replacement text of \mfsrc in a layer of braces. + +Added descriptive comments for \tlabel and \tcaption. + +Set TeX's primitives \leftskip and \rightskip to zero dimension +inside \tcaption, so as to protect typesetting of diagrams' captions +from unwanted effects. + + +REVISION 0.2.10.5 alfa, Sat 9 March 1996: + +Minor reformatting of mfpic.tex, including adding spaces, adding +comment characters at end of more lines, and renaming some internal +register variables. + +Introduced \polyline as an alternative name for \lines. + +In order to avoid repetition of side-effects, changed \tcaption to use +\unhbox\@textbox, instead of repeating its text argument. + + +REVISION 0.2.10.6 alfa, (two hours later) on Sat 9 March 1996: + +Updated mfpic.tex and documentation files to incorporate improvements +by Dan Luecking: + +a loading check that automatically saves and restores the catcode of +`@'; + +the name of the graph base is now stored in a macro near the top of +mfpic.tex; + +\leavevmode is now moved [GT has, for now, commented it out +completely]; + +\polyline introduced as a synonym for \lines; a \polygon figure +has been introduced; + +\\ specifies explicit line breaks in tlabels and tcaptions; + +\onelevel causes one level of expansion in an \edef; + +\savepic and \copypic allow saving, use and copying of an entire +mfpic picture, including its tcaptions and tlabels. + +Also modified \tcaption code to prevent repeated use of the text +argument, as that can cause side effects, as reported by Dennis +Petrovic. + + +REVISION 0.2.10.7 alfa, Sat 28 March 1996: + +First release via Geoffrey Tobin's School's local anon ftp site: + + ftp.ee.latrobe.edu.au : pub/gt/mfpic + +Added skip-pix.tex file, which tests whether TeX's \leftskip +primitive breaks up mfpic's typesetting of diagrams. Fortunately, it +seems not. + + +REVISION 0.2.10.8 alfa, Tue 26 May 1996: + +Second, and bug fix, release via Geoffrey Tobin's anonymous ftp area. + +Due to change in syntax of \store to take the path command as a second +argument (which made coding of mfpic.tex easier), objects.tex and +part of mfpicdoc.tex needed to be amended. Reported by Miroslav Dont +(Thu 16 May 1996). + +Descriptions of LaTeX environments clarified to emphasise that 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 \MFbook in documentation macro file header.tex. + +Noticed that the method by which the line breaks in the TeX file are +copied into the Metafont file can cause command arguments to be omitted +from the Metafont file unless at least the left brace (immediately +before the arguments) occurs on the same line as the command. Corrected +objects.tex to obey this restriction. Also noted this phenomenon in +mfpicdoc.tex. Effect reported by Miroslav Dont (Thu 16 May 1996). + +Updated lapictures.tex to LaTeX2e. + +Added LaTeX2e logo to header.tex. + + +REVISION 0.3.0 alpha, 1998: + +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 grafbase.mf to grafbase.mp, retaining all(?) +functionality. Now any(?) .mf file created by a recent mfpic can be +run through Metapost to produce a PostScript 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 grafbase.mp +shading macros to simply calculate a gray colored fill. + +Added grafbase functions sin, cos, and their inverses invsin, +etc., that compute in radian measure. Also tan and cot. + +Wrote mppicdoc.tex, which can be TeX-ed alone or input from +mfpicdoc.tex. Should probably combine the two documents. Made small +changes to header.tex: added logos for pdfTeX and pdfLaTeX. Changed +The macros \MF and \MP to use small capitals. Minor modifications to +\LaTeX and \LaTeXe + + +REVISION 0.3.8 alpha, 1999: + +Color has been added. Standard colors for lines/curves (drawcolor), +fills (fillcolor), hatch patterns (hatchcolor), and arrowheads +(headcolor) added to grafbase.mp. Corresponding macros in mppic.tex +for setting these colors. Optional arguments for color added to \gfill, +\draw, \arrow, and all the hatching macros. A new macro \polkadot +creates polkadot fill patterns. + +Changed some of the commands for setting dimensions so that they +actually worked, and so they are local to mfpic environments. + +Added support for LaTeX2e's \usepackage command and options. Added +graphics inclusion code, summoning the following packages: epsf for +plain TeX or LaTeX209, graphics for LaTeX2e and pdfLaTeX, the macro +files supp-pdf.tex and supp-mis.tex from the ConTeXt distribution +for plain \pdfTeX). Added code to detect which TeX format was in use. + + +REVISION 0.3.9 alpha, 2000: + +Altered almost all messages written to the log file or the terminal to +announce they were from mfpic. Altered format detection code to test +against both \UndEfInEd _and_ \relax (lest some previous package +convert certain commands to \relax using the \csname style test). +Minor change to definition of \circle to avoid error messages in LaTeX. + +Changed the graphic placement code so that it tests for the existence of +the graphic first (to avoid all those error messages from epsf, +graphics, etc., on the first pass, or when Metapost fails to make a +graphic). + +Tried to find and change code in grafbase where we could inadvertently +divide by zero. Added another closure prefix \uclosed and its +corresponding grafbase support, to close a path smoothly (meaning +simply matching directions at both ends), but keep the original curve +Unchanged. The current (\sclosed simply closes with ..cycle which +alters the original curve. + + +REVISION 0.3.10 alpha, 2000: + +Put mfpic version, date and package name into macros for use in +messages. Decided the package name is "mfpic" if it is input as +mfpic.tex or mfpic.sty, otherwise mppic, regardless of whether the +metafont or metapost option is used. There are four files +m[fp]ic.[sty,tex], which simply set the package name and input +mppic.tex if necessary. Also put this version and date info into +strings in grafbase.mf. + +Added changes contributed by Jaromir Kuben (Thanks!): An option +centercaptions and command \centercaptions to center the lines in a +\tcaption. Also \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 \tlabel. Both c and b now take into account the +depth of the text b puts the absolute bottom of the text in line with +the point. A new parameter B to align the baseline of the text with +the point. Jaromir also contributed several corrections to grafbase.mp +(mostly inadvertently introduced by me, DHL). + +Added option dvipsnames to allow color names as in the dvips header +color.pro. Requires file dvipsnam.mp. Added grafbase.mp macros: +cmyk, RGB, gray and rgb to convert from the indicated color space +to Metapost's internal color space (which is rgb, so the last is a +no-op). In plain TeX the command \dvipsnames can be used in the +preamble (before \opengraphsfile). + +Added macro \ConTeXt to header.tex, a macro \opt for style of +LaTeX2e option names. Changed \prog to typeset its argument in +sans serif font. Changed \tmtitle in mppic.tex so it _doesn't_ ignore +following spaces (it ended with \mftitle which invokes \ignorespaces). + +Added functions tanh, its inverse atanh, and additional trig +functions secd, sec, cscd, csc, atan, invtan. Made log a +synonym for ln. Added complex variables functions Arg, cis, zexp +and Log. + +Changed all trig, hyperbolic, exp, log, etc, to use syntax "vardef +<name> primary X" so as to match (I hope) as close as possible the +behavior of the built-in sind and cosd. + +Changed \do@ptparami so that it does not strip too many braces. This +was done by changing the line \redef\@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: + \draw[{{\color[cmyk]{1,1,0,0}}}]... +(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. + + +REVISION 0.3.11 alpha, 2000: + +Added \plot (usage \plot[<size>,<separation>]{<shape>}...) similar to +\dotted except: +1) explicit shape required (shapes Triangle, Square, Circle, Plus, + Cross, Star, SolidTriangle, SolidSquare, SolidCircle). +2) initial size and separation are 2pt and 5pt. +3) Size is governed by \plotsymbolsize, and separation by + \plotsymbolspace. The dimension \plotsymbolsize corresponds + roughly to the _average_ diameter of the shape. + +Added code to mkfcn and parafcn so that the end of the curve falls +on the given endpoint (even if bst doesn't go evenly into bmax-bmin). +Also ensure the loop parameter doesn't exceed infinity. Also avoid +problems if the sign of bmax-bmin differs from that of bst. + + +REVISION 0.3.12 alpha, 2000: + +Save and restore catcodes of certain punctuation (@.,:;!?{}`'=/- and +parentheses), as well as spaces, setting punctuation to 12 while reading +mppic.tex to ensure the right stuff gets written to the .log and .mp +files. + +Added macro \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 clip (to clip all pictures to the specified dimensions), +truebbox (to give the metapost output file the true bounding box rather +than the one specified in the \mfpic arguments), and debug (write +debugging info to terminal and log file). Command forms: \clipmfpic +turns it on \noclipmfpic turns it off. Similarly, \usetruebbox and +\notruebbox. For debug we can define \mfpicdebug before loading +mfpic.tex (which will turn on debugging information written prior to +option processing), and in the rest of a source file, \mfpicdebugtrue +and \mfpicdebugfalse will switch it on and off. + +%%% Revised after here, adding spaces before and after code and math +%%% removing blank lines, stray TeX markup, reformatting paragraphs, etc. +Changed names of various commands to a more imperative form: +\usingmetapost becomes \usemetapost, \usingmetafont becomes +\usemetafont, \dvipsnames becomes \usedvipsnames, etc. Also changed +name of option centercaptions to centeredcaptions. Changed many +internal names, prefixing most with "mfp@", inserting "@mfp@" in the +\if... commands. + + +REVISION 0.3.13 alpha, 2000: + +\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 \tcaption twice +(caveat emptor). + +New command \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 \coloredlines), different symbols (\pointedlines), or +different dashing patterns (\dashedlines). NOT a figure macro, (i.e., +no prefixes). + +New command \using affects what \datafile and \plotdata write to +the .mf output. Default is \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 grafbase. A complete +reorganization of the code made dashing faster. That was followed by +another reorganization and the gendashed (generalized dashes) command +added to grafbase. Now any dashing pattern can be drawn. A dashing +pattern, ptrn, consists of three arrays: ptrn.start[], ptrn.rep[], +ptrn.finish[]. The command gendashed (ptrn) p; draws the path p +beginning with ptrn.start, repeating ptrn.rep, and ending with +ptrn.finish. The arrays are numeric and specify the lengths of dashes +and gaps. A command + dashpat (suffix name) (text dims) +takes a comma separated list dims, assigns them to the array name.rep, +and computes reasonable name.start and name.finish. + +\gendashed{<pattern>}... is a generalized dashing command; <pattern> +is the name of a dashing pattern. + \dashpat{<name>}{<dim1>,<dim2>,...,<dim2n>} +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 dashtype0 through dashtype5 are predefined and used by +\plotdata when \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 .mf shading code. All dots +now pixel aligned, looks infinitely better. + +Corrections to mkfcn and parafcn, they could still have overshot the +value of bmax. + +Removed all spaces (commenting out EOL's) in mppic.tex. It can now be +\input in horizontal mode without generating any spaces (even without +switching to \nullfont). Removed \nullfont. + +Changed some more internal names. Added Diamond and SolidDiamond to +the symbols available to \plot and \plotsymbol. + +At some point (perhaps this or the last revision) I added a command +\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 \curve, +also. + + +REVISION 0.3.14 alpha, 2000: + +Added \@@tlabel to write label text to output file between btex and +etex. Added mplabels to make \tlabel use it instead of original +\@tlabel. Commands \usemplabels and \nomplabels to turn the option +on and off. Added third part to the optional argument of \tlabel to +rotate the text (ignored in \@tlabel) so \tlabel[Bl45] will place +the left baseline at the point and rotate 45 degrees around that point. + +New macro \mfpdatacomment so that \datafile and \plotdata can now +have their comment character reset. A side effect is that `%'s in the +data file will be recognized. Commands \makepercentother and +\makepercentcomment created to allow the user to use `%' in \using +arguments. + +Gave \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 +.tfm or 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 \framed[<fgap>]{...}. Parameters +\framegap and \framethickness control the default appearance. +(Internal code for undefined figures uses \framegap =-\framethickness +so not to take up any extra space.) + +Added some error checking: when option mplabels is selected without +metapost, issue error message and ignore. Same when \usemetapost is +used after \opengraphsfile. Remove dvipsnames option, making all +dvips color names always available to mfpic. + +Multiple changes to documentation: Added \GS for Ghostscript and \sc +for small caps to header.tex. Folded all the new macros and their +descriptions into mfpicdoc.tex. Still keeping mppicdoc.tex for more +detail on differences between the Metafont and Metapost support. + +Made some small additions to MFobjs.tex and MPobjs.tex to better +illustrate some new features. Adjusted pictures.tex and +lapictures.tex so they produce the same output and no overfull boxes. +Changed TeXMPobjs.tex and LTXMPobjs.tex so that they work better in +pdfTeX and pdfLaTeX, resetting \pdfpageheight and \pdfpagewidth (which +otherwise get magnified by \mag=1200). + +Replaced curves.dat with curves1.dat and curves2.dat to better +show features of \plotdata. + +Changed the default for \using to \using{#1 #2 #3}{(#1,#2)}, +(redundant parentheses). + +Added \fdef, which seemed to be documented, but not defined! Changed +the format slightly and adjusted the documentation to reflect that. + +Changed \savepic: Now use \newpic{\foo} to allocate a box, +\savepic{\foo} to store the next picture, and \usepic{\foo} to copy +it. Now more like LaTeX's system of save boxes. + + +REVISION 0.3.15 alpha, 2000: + +In grafbase, changed secd and cscd so that abs(temp) < +nottoosmall is tested instead of temp itself (which was incorrect when +temp < -nottoosmall). Renamed dashed to DASHED to make primitive +dashed available to power users. Added some error checking to dashing +code. Added save in several places in *fcn commands. Changed +hatching code in grafbase.mp so that all (even those not used by mfpic) +respect hatchcolor. + +Redefined parafcn so it can call mkfcn like all the other function +drawing commands. + +Added \mfpverbtex to write verbatimtex block to .mp file. + +Changed a few \newdef-s and \newlets to \def and \let to keep +ConTeXt from complaining. Affected commands are \rotate, \mirror, +\scale and \grid. Changed code for date written to output file for +same reason. + +Changed \newpic to \newsavepic to more closely parallel LaTeX's +\newsavebox command. + +Allow plotting of a number in a data file against its sequence position +with \using{...}{...\sequence...}. + +Rename \mf@gobble to \mfp@gobble. Move the definition of \newdef +earlier and use it more (didn't catch any new conflicts). + +Changed \rotatepath from a \@modmac to a \@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 \pointdef: \pointdef{A}(1,3) makes \A expand +to (1,3), with \Ax and \Ay expanding +to 1 and 3, respectively. + +Provide a directory structure to the distribution. Rename file mppic.tex +to mfpic.tex and provide files mppic.tex, mfpic.sty, and mppic.sty +as wrappers to input it. Made Metapost the default when mppic.* are +used. + +Add some error correction to dashpat: force an even number of +dimensions. + + +REVISION 0.3.16 alpha, 2000: + +In grafbase: + +Change name of glabel (in grafbase.mp) to gblabel so as not to +conflict with glabel from graph.mp in the standard Metapost +distribution. Adjusted mfpic.tex accordingly. + +Correct the change to 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 dashes and dots used in the macros DASHED and +dotted. + +Uncomment three macros commented out in 0.3.13: tightbbox, tbbox and +bbox. Though these are not used in any other macro, but they might +nevertheless be useful to users of grafbase. + +Change the 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 unbound.tex updating mfpic info in "TeX Unbound". + +Restored mf-revu.tex, somewhat altering its formatting and correcting a +TeX error. + +Changed \endconnect so it tests for its use in LaTeX as an +environment and if so issues \aftergroup\@startfigtrue and +\aftergroup\@imrendtrue to bypass the LaTeX-supplied \endgroup. +Added a similar test to \endmfpic to set \@ignoretrue. + + +REVISION 0.4.0 beta, Aug 2000: + +Released to CTAN. Removed mppic.*, package is named mfpic regardless +of whether MF or MP support is needed. + + +REVISION 0.4.01 beta, Nov/Dec 2000: + +Sergei V. Znamenskii reported (and mostly solved) an incompatibility +with AmSTeX using amsppt style if mfpic.tex is input after the +\documentstyle[amsppt] command. The file amstex.tex loads the dummy +font, setting 22 font dimensions. Then amsppt.sty loads some more fonts. +It appears that if font loading intervenes, mfpic.tex cannot add extra +font dimension parameters to dummy to use with \newfdim. Solved by +changing + \font\@dummy=dummy +to + \font\@dummy=dummy scaled 1002 +in mfpic.tex + +Also corrected code that purported to detect LaTeX when in fact AmSTeX +was in use. + +Added documentation of a bug in supp-pdf.tex which requires +\usemetapost (as well as \usepackage[metapost]{mfpic}) to come before +\usepackage[french]{babel} when running pdfLaTeX. The conflict was +reported by Pascal Chantriaux. + +Changed \tmtitle and \mftitle so they read the argument as a token +list and write it to .mf file and .log file without expansion. Simple +things like "\'" expand to quite long expressions in LaTeX2e. + +Added commands \MFPdebugwrite (to write its argument only in presence +of debug option), \MFPmsg (as a synonym for \immediate\write16) and +\MFPICmsg (to write its argument preceded by "MFpic: ". + +Added \restoreCODE to shorten all the lines in \mfpic-package that +restore the category codes of punctuation. + +Added a few new debug lines in response to previous failure to detect +\AmSTeX. + +Rewrote \mfp@now (which generates a time-stamp for the output file) to +use only 2 \count registers instead of three. + +Added \dimendef\mfp@scratch=255 for scratch use instead having +\dimen255 hard coded. This will make changes easier should use of +\dimen255 cause any problem. + +Added \penwd as a synonym for \pen (to be more in line with +\shadewd, etc.). + +Removed redundant parentheses from default \using. + +Changed internal command \mfp@rwdata, which is responsible for reading +and writing in the \datafile and \plotdata commands, so that it +outputs + polyline (false)((x_1,y_1),(x_2,y_2),...,(x_n,y_n)); +instead of + (x_1,y_1)--(x_2,y_2)--...--(x_n,y_n); +The intent is to have a better interface if ever we get 3D support +started. For example, polyline calls textpairs which processes the +list of coordinates. In a hypothetical 3D environment, we'd need to +change only \using to write triples, and then textpairs could choose +to run some command that processes triples instead of pairs. + +Changed use of \unpreservelines in \plotdata, etc., to the expicit +resetting of the category of ascii 13 (which was its only purpose +anyway). + +Added macros \xaxis[<hlen>] and \yaxis[<hlen>] with the obvious +meanings. Plan on adding something like \leftaxis, \bottomaxis, etc., +with changes to \xmarks and \ymarks for putting tics on them. +(Haven't figured out the best interface yet.) + +Added some new error messages. Rewrote almost all error messages, adding +linebreaks. Added command \mfp@errmsg to format error messages and set +the \errhelp tokens. + + +REVISION 0.4.02 beta, Jan 2001: + +Backward comparability was inadvertently destroyed when \curve was +given an optional parameter and the definition of curve in grafbase.m? +was changed. Any .mf file created by using \curve with an older +version of mfpic would give curve the wrong number of parameters for the +new grafbase files. I renamed the new curve to tcurve and gave curve +a definition equivalent to its old one. + + +REVISION 0.4.03 beta, Feb 2001: + +Corrected a typo in vardef thegblabel: had zz for a parameter, but +used z in the replacement text. I am surprised \tlabel _ever_ worked +when the mplabels option was selected. + + +REVISION 0.4.04 beta, Mar 2001: + +Added \smoothdata[<tension>] to cause \datafile and \plotdata to +draw smooth curves with optional tension setting. And \unsmoothdata to +restore the default. + +Changed \pointedlines to work as documented (causing \plotdata to +issue the equivalent of \plot{<symbol>}) and added \datapointsonly to +behave as it used to (causing \plotdata to issue the equivalent of +\plotnodes, plotting only the data points). + +Some documentation changes: added info that something like +\xmarks{-4 step 2 until 6} is valid. + + +REVISION 0.4.05 beta, Mar 2001: + +Changed vc=vt; to vc:=vt; in function clipsto. When used on an +array of paths, the original caused an "Inconsistent equation" error +on the second iteration. Fortunately, this does not come up in mfpic +except for very advanced users. + + +REVISION 0.4.10 beta, May 2001: + +Renamed \fileversion and \filedate to \mfpfileversion and +\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 \mfp@ifnextchar, a clone of LaTeX's \@ifnextchar, and +redefined the macros \do@ptparam and \alt@ptparam in terms of it. +Copied LaTeX's code to eat one space after a command into the macro +\eatspacedef. + +Added \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 \mfp@now and \mfp@today. + +Renamed \framed and related macros by prefixing mfp or mfp@. Some +formats and packages (ConTeXt, for example) have a \framed macro. Now +\mfpframed _can_ be used, and _must_ be used if \framed already +exists (as in ConTeXt). Replaced \framegap and \framethickness +with \mfpframegap and \mfpframethickness. If \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 .dvi file when a mfpic detects +that Metafont or Metapost has not been run, or the figure is absent. + +New dimensions: \tlabel@hadj, \tlabel@vadj and \tlabel@sep for +shifting \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 "[Bc]" or +"[cc]" is used). A label is shifted by \tlabel@sep downward when the +`t' parameter is found, upward for `b', rightward for `l' and +leftward for `r'. The first two dimensions can be set with a new macro +\adjustlabels{<hadj>}{<vadj>} (name later changed to \tlabeljustify, +and the third with \tlabelsep{<dimen>}. Need to do it this way because +under mplabels they need to write the information to the output file. + +Added \expandafter before \@render\fi in several places. This now +appears not to be needed, but the \fi following \@render caused +problems with some experimental versions of optional argument handling. + +Added the following macros for drawing axes along the borders of the +picture: + \leftaxis + \rightaxis + \topaxis + \bottomaxis + \bottomleftaxes + \borderaxes + \leftaxisshift + \rightaxisshift + \topaxisshift + \bottomaxisshift +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: + \lmarks + \rmarks + \tmarks + \bmarks + \lmarksposition + \rmarksposition + \tmarksposition + \bmarksposition + \xmarksposition + \ymarksposition +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 inside, outside, centered, ontop, onbottom, +onleft, or onright. For side axes the default is inside, while +for x- and y-axes it is centered. + +For arrowheads on the side axis we have \sideaxishead which takes a +dimension argument and sets the length of the arrowhead. To turn heads +off again set the length to 0pt. + +Added \gridlines to draw a regular grid of lines. It's syntax is the +same as that of \grid. Changed the behavior of \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 \if-tests so that if an incorrect optional parameter +is used, the default behavior will be seen. For example, \function +takes an optional argument of [s] or [p] with s the default. The +code had been: + \if ##1s true\else false\fi +and I changed it to + \if ##1p false\else true\fi +so for the typographical error \function[o], the user will get the effect +of the default s. + +Added the command \labeljustify to change the default justification +of text labels. For example, \labeljustify[cr] makes the default +[cr] instead of [Bl]. + +When truebbox is in effect, but mfpic detects that Metapost has not +been run, truebbox is turned off for each picture. Before, this was +global, now it is local (so that it doesn't affect a new \opengraphsfile +command, even though mfpic does not officially support more than one +\opengraphsfile commands per file). + +Added the command \tlabels (note the plural). It has one mandatory +argument which contains a concatenation of arguments for one or more +\tlabel commands. These arguments may (but need not be) separated by +spaces or new-lines. + +Replaced all occurrences of \@labeldim, which had been \let equal to +\mfp@scratch, to the explicit control sequence \mfp@scratch. This was +to avoid confusion that could have been caused by changing one of them, +not realizing they should be the same. + + +REVISIONs 0.4.11--15 beta, July 2001: + +Restored a lost backward comparability: I stored the (Metapost) +primitive meaning of dashed in the command dashed_ and made dashed +synonymous with DASHED. Power users will have to use dashed_ if they +wish to invoke that primitive after loading grafbase.mp + +Added \MFPICwarn in addition to \MFPICmsg and \mfp@errmsg. Added +"MFpic error: " to the front of all mfpic generated error messages. +Introduced \on@line (from LaTeX) to place the line number in warnings. + +Removed many more spaces and eols from mfpic.tex (lest it be input +with spaces or eols active). Added some spaces between a command and +`!' lest the latter have category 11. + +Changed name of \restoreCODE (and others) to \MFPrestorecode (etc.) +after running across a package which defined \restorecode. Introduced +\@xp (from AMSLaTeX) for \expandafter. Removed saving of the current +font as \@torig, since we no longer change to \nullfont. + +Added test for equality to \relax in \testdef. Removed \newlet +(later put it back), \sim@def and \sim@gdef as they are not used (any +longer). The latter two were used once each and those were changed. + +Changed handling of \if@mfp@metafont and \if@mfp@metapost to ensure +they are kept mutually exclusive. Changed handling of +\@if@mfp@beforefileopen from a simple \if...\else...\fi to saving the +alternatives in a macro and then issuing the macro after the test. +Changed \mfp@clip to make it global if issued before \opengraphsfile. +Redid \mfp@truebbox to ensure it is global, but leave an out so that +\@mfp@truebboxtrue/false could be set locally. Made similar +changes to mplabels. + +Removed \unpreservelines from \mfsrc since grouping restores EOLs. +Also made \mfsrc check that a .mf/p file has been opened. + +Removed the definition of \mf@bsl since it is not used (any longer). + +Delayed the definition of \mfp@data until \@mfpic@graf@macs. +Introduce the hook \mfp@additions, to be expanded last in +\@mfpic@graf@macs. + +Changed the name of macro \mfplinestyle to \mfplinetype and the +\count register \mfp@linestyle to \mfp@linetype. +Changed name of \missinggraphfileerror to \nooutputfileerror. +Changed name of \adjustlabels to \tlabeloffset. +Changed name of \labeljustify to \tlabeljustify. + +Try to support multiline labels even in the case of mplabels by writing +appropriate definition of `\\' to the .mp. + +Changed definition of \mfp@scratch from \dimension255 to a register +defined by \newdimen. + +Added ability to create a curve surrounding some text: macro +\textboundary creates a rectangle, with optionally rounded corners, +\textoval creates an ellipse with aspect ratio the same as the block of +text, \textellipse creates an ellipse with a given aspect ratio, +\textcircle is \textellipse with aspect ratio of 1. TeX measures +the text and transmits the information to Metafont. + +New macro \axislabels. This takes a letter indicating the axis, an +optional justification parameter (as in \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 \mfp@addto is used to add the boundary +coordinate (one of the parameters of \mfpic) to the appropriate offset, +returning the result in graph units for use in a \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 \tlabelcolor and grafbase color variable +tlabelcolor to control color of Metapost placed text; added +\backgroundcolor to set the color variable background, the color used +by \gclear and by all plain Metapost unfill operations. Had to +rewrite the various color setting macros since, till now, all assumed +the color variable name ended with the string "color". + +Changed the macros introduced in 0.4.10 or previous that controlled the +position of the side axis. Now instead of saying + \leftaxisshift{<num>} +one says + \axismargin{l}{<num>}. +One can set all 4 margins at once with + \setaxismargins{<num>}{<num>}{<num>}{<num>}. +or all margins to the same number with + \setallaxismargins{<num>}. + +A similar change was made to the setting of the axis marks position +(i.e., inside, outside or centered). Instead of + \lmarksposition{inside} +one writes + \setaxismarks{l}{inside}. +One can also set the position of all the border marks at once with +\setbordermarks, or all border marks to the same position with +\setallbordermarks. + +Command \drawaxes added: it takes a comma separated list of +letters chosen from x, y, l, b, r and t, and draws the specified +axes. Later renamed to \doaxes, and commas omitted. + +Added optional parameter to \plotdata and \datafile which +has the form p or s<num>. "[p]" causes a polygonal curve to be +plotted and "[s<num>]" causes a smooth curve to be drawn, with the +given number as the tension. The number may be omitted, and then +grafbase's value of curvetension (default 1.0) will be used. Any +other letter or none is the same as [p]. Internally, the optional +parameter is passed to \mfp@rwdata, which now, of course, takes +parameters. Along with this, \smoothdata was revamped to simply +change the default optional parameter, rather than set a switch. + +When option metapost is selected, each mfpic environment writes the +current font to the output file (in verbtimtex) to have at least the +chance (under mplabels) to match the fonts that TeX would use in +tlabels. + +Framing code: in addition to \framed or \mfpframed, we now have a +LaTeX environment: \begin{mfpframe}...\end{mfpframe} or, in plain TeX, +a command group \mfpframe...\endmfpframe. This is actually recommended +(over the first form) if the user wishes to frame an mfpic environment. +This ensures that category codes are not prematurely set by reading the +whole picture as an argument. + +Changes to grafbase: + +Moved interim warningcheck:=0; after mode_setup because mode_setup +sets it to 1. Now that warningcheck is correctly set, we can change +the test of parameters in secd, etc., from comparing with nottoosmall, +to comparing with reallysmall. + +Streamlined minpair and maxpair. + +Define transform vtr on its own in setztr rather than only the macro +vconv being defined (in terms of ztr). Define ztr in terms of vtr +(the "right way to do things", said the linear algebra teacher). +Remove definition of invztr and use inverse ztr the few times necessary. + +Remove the "complicated zconv" entirely. + +Added plain Metapost's image command to grafbase.mf. + +Changed the command executed when clipall is true to clipto instead +of clipsto. + +Added textboundary, textoval and textellipse to put paths around +text. Only the size and center point of the text is passed by mfpic, not +the actual text. These implement the mfpic commands \textboundary, etc. + +Added parameters pair label_adjust and numeric label_sep. +These are used in grafbase.mp for shifting labels. They are also +used there and in grafbase.mf for positioning and sizing textboundary, +textoval and textellipse. + +Added test for ClipOn to dashing code, plotsymbol and plotnodes. + +arrowdraw now checks for hlen > 0 before drawing head. + +Complete rewrite of axes code and drawing of hash marks on axes. Four +new axes added leftaxis, etc. + +Changed code for grid so it is fitted to the coordinates: integer +multiples of xspace and yspace are plotted. Added gridlines. + +Changed arcppp in grafbase for more robustness (I hope) and better +result on small values of sweep. + + +REVISION 0.4.16 beta, July 28--30 2001: + +-- Changed name of \textboundary to \tlabelboundary and then + \tlabelrect. +-- Changed name of \textoval to \tlabeloval. +-- Changed name of \textellipse to \tlabelellipse. +-- Added "star form" of each that defines the curve without placing the + label. +-- Renamed grafbase command textboundary to textrect. + +Replaced the four commands \leftaxis, etc., with single +command + \axis[<hlen>]{<one-axis>} +(example \axis{l}) and \borderaxes, etc., with + \doaxes[<hlen>]{<axis-list>} +(example \doaxes{lbrt} for the 4 borders). + +Recoded \mfp@now so that only 1 count register is used. + + +REVISION 0.4.17 beta, July 28--Aug 10, 2001: + +Changed grafbase.mp commands textrect, etc., so the first two +parameters (dimensions of some unspecified text) became one parameter, +which could be either of type pair (the two dimensions), string, or +picture (e.g., a btex...etex expression). In the latter two cases, +Metapost measures it and uses those dimensions to make a rectangle, etc. + +Gave all commands that take a [s] smoothness specification the +option to make it [s<tension>] to draw the curve more tightly. +Commands affected: \function, \parafcn, \plrfcn, \btwnfcn and +\plrregion. This necessitated changes in grafbase code to mkfcn so +that it accepts a tension parameter. Plus changes to all the macros that +call it: parafcn, xfcn, function, rfcn, and plrfcn. Those that +are used by mfpic, like function, were altered as follows. The name was +changed to tfunction, it was given a tension parameter and the call to +mkfcn passes that parameter. A new macro named function simply calls +tfunction with default tension. This was to make the new grafbase +accept old files generated by mfpic. Those macros not used by mfpic +(rfcn and xfcn) simply call mkfcn with tension equal to 1. + +Redid doplot, plotsymbol, and 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 Metafont and since it is expected that in Metapost it will +be a 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 its center at the chosen position (instead of the left +baseline). This is not done in Metafont since finding the center of a +picture is non-trivial. In grafbase.mp the first parameter is also +allowed to be a string, and is then converted to a picture with the +infont operator. In all other cases it reverts to a default dot scaled +by the second parameter. + +Changed the \mfpic command so both optional parameters may be omitted +(scale 1 is then assumed). Also, the first parameter is no longer saved +in \@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 \@param is not expanded until \@xconv and +\@yconv are used in tlabels, and I included a redefinition of \@param +in a command that calls \tlabel). + +Added EOL, `*', `"' and `$' to the list of symbols whose catcodes +are saved, changed while reading mfpic.tex, and restored at the end. +`$' is put in category 12 and used then in several \if tests for empty +arguments (previously `!' was used, then `@'. (Changed again a couple +of times!) + + +REVISION 0.4.18 beta, Aug 10--20, 2001: + +Added point size option to \grid. + +Added a macro \plottext similar to \plotsymbol except instead of a +symbol, it takes a bit of TeX text. The macro runs entirely in TeX, +issuing a sequence of \tlabel commands. + +Changed grid and gridlines so the lines and points are fitted to the +pixel grid. We now use safedraw on +hroundpair(zconv(p1))--hroundpair(zconv(point)) instead of on +zconv((p1)--(p2)). When grid and gridlines are used with the same +parameters, this seems to make the picture periodic. + +Added \plrgrid and \plrpatch. + +Added \piechart and \piewdge. + +Removed \d@adv, \i@mul, \i@div, \q@mul as it turns out they are +either no longer used or unnecessary: \i@mul and \i@div, were only +used in \q@mul and it isn't needed as \x= 1.2\x works for fdims. +\d@adv seems to have disappeared from use. + + +REVISION 0.4.19 beta, Aug 20--26, 2001: + +Added \mfpicnumber to set the number of the next character or figure. + +Removed explicit references to gcode, instead of writing +beginmfpic(incr gcode), \mfpic now writes +beginmfpic(\number\mfp@count). This way TeX's understanding of the +current figure number and Metafont's understanding are guaranteed to be +the same. The opening code of beginmfpic sets gcode in case any existing +files make use of it. This simplifies maintenance, and such things as +\noship and \mfpicnumber. + +Speaking of which, added code to \noship to set a switch so +\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.) + + +REVISION 0.4.20 beta, Aug 26--Sep 1, 2001: + +Added \barchart (it was easy after \piechart) after seeing comments +on gnuplot list that deprecated pie charts as a means of conveying +quantitative information. The rectangles become available as +\chartbar{<n>}. Where <n> is the number of the bar. + +Changed the code (again!) for shade in 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 a separate 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 extra 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 \shadespace apart. Then copy _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 100pt by 100pt rectangle with a \shadespace of 1.2pt +(this is about the most dots MiKTeX's Metafont could handle). I came up +with another algorithm that is O(m/n + \log n), when n < m. But it +was only marginally better at the sizes Metafont 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 \mfp@count is initialized to 1, and +incremented only in \endmfpic (where it is in the code skipped if +\noship is used). + +Changed \newdef to \def for \arrow so eplain won't generate a +complaint. + + +REVISION 0.4.21 beta, Sept 1--10, 2001: + +Got tired of typing "\macro" so I changed it to \mac. Also got +tired of "\vskip\myskip", etc., so I wrote \bcd and \ecd to +bracket the headers of command descriptions. For examples, I wrote +\bex and \eex. Changed the font for \prog to small caps and for +\opt to sans serif. Added \null to the end of the definition of \TeX +for \spacefactor reasons (saw this somewhere). + +Wrote a \myverbatim macro for mfpicdoc.tex since header.tex's +verbatim wouldn't work for me. Completely rewrote \head and \subhead +for better spacing and page breaks. (One of these days I will give them +numbers and perhaps translate everything to either LaTeX or eplain to +provide cross references.) + +Added SolidStar to symbols allowed by \plot, etc. Changed grafbase +code so that Star produces an open five-pointed star instead of the +asterisk previously drawn. Added Asterisk in case anyone prefers the +old way. + +Separated the part of \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 \do@datafile. Took +out of \mfp@rwdata the code that wraps the point in (redundant) +parentheses. Now the parentheses _must_ be added by \using. + +Changed the name of \mfpic-package to 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 \plotdata[s1.2] +the code splits it up as [#1#2] so that s is assigned to +#1 and 1.2 is assigned to #2. If 1.2 is omitted, then #2 is +empty, but if both parts are accidentally omitted, then the closing +bracket is assigned to #1 and TeX searches for another right +bracket. This can cause extremely unhelpful error messages from internal +commands generated much later. Now, a command like \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 \tlabel, but only for the second part of the +optional parameter (laziness). + +Added commands similar to \rotatepath: \shiftpath{p}, \scalepath{p,sc}, +\xscalepath{x,sc}, \yscalepath{y,sc} and \slantpath{y,sl}. "p" is a +point "sc" is a scale factor, "x" is an x-coordinate, "y" is a +y-coordinate and "sl" is a slant factor. These commands accept a +following path and pass back the corresponding transformed path (to +preceding prefix macros). + +Released to alpha testers. + + +REVISION 0.4.22 beta, Sept 11--22, 2001: + +Added \reflectpath{p1,p2}, \xyswappath and \yslantpath{x,sl}. Added +also \xslantpath as a synonym for \slantpath. + +Removed grouping in \mftitle that inadvertently caused \tmtitle's +argument to be omitted from the .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. \mftitle supplies the grouping to preserve +the token variable. \tmtitle also adds the grouping, plus writes to +the .log and to the document. + +Redid \tlabel so that it checks for completely empty optional +parameter. + +Also avoid duplicating every \@...tlabel command. Only ever did that +to avoid the message about rotation being ignored in the \nomplabels +case. Somewhere along the way handling of default optional parameters +made that moot. + +Now \tlabel begins a group, then sets \tlabel@rot to empty (not +zero!) if mplabels is not in effect, then passes +"[\tlabel@vpos\tlabel@hpos\tlabel@rot]" as the optional parameter. The +two different commands \@tlabel and \@@tlabel ultimately end the +group. This necessitated changing a number of commands that call for +tlabels: I thought it more efficient to say + + \if@mfp@mplabels\expandafter\@tlabels\else\@@tlabels\fi... + +than to call \tlabel directly. But now that would unbalance the +grouping. + +Somehow I overwrote the version of 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. \tlabel starts a group and calls +two different commands: if no "[]" follows, it defines \tlabel@rot +to be empty under \nomplabels; and if "[]" follows, it calls +\tlabeljustify. Finally it calls either \@@tlabel or \@tlabel, +depending on mplabels, feeding the arguments \tlabel@vpos, +\tlabel@hpos and \tlabel@rot. This ensures that insufficient optional +parameters produce default results, as \tlabeljustify does default +things with empty parameters. + +In grafbase: push vtr in bcoords command and pop it in ecoords. +Added vtr:=ztr shifted -zconv((0,0)); to apply_t. It seems coords +and apply_t were broken ever since I defined vconv in terms of vtr +instead of zconv. + +Added \@firstoftwo and \@secondoftwo and rewrote several commands to +use them, including \@if@mfp@beforefileopen.. + +REVISION 0.5.0 beta, Sept 24--Oct25, 2001: + +Change comment written at the top of the output file. Now includes the +name of the output file, as well as the \jobname of the TeX source +that produced it. + +Changed how \grid handles optional point size. Now it writes a command +vgrid that takes the extra parameter (and the old grid just calls +vgrid with default parameter). + +Made \mfpic and \endmfpic write the source line number to the +output for debugging use. + +Added token list \every@tlabel and a command \everytlabel for +setting it (and writing the settings to the .mp file when mplabels +is in effect.) In order to make this local to mfpic +environments, now \mfpic writes "verbatimtex \begingroup etex" to +output and \endmfpic ends the group (under mplabels). + +Renamed \if@graphfileexists to \ifmfpicFirstTime which +required reversing the sense of all \if... tests. This will allow the +user to override the behavior of mfpic in unusual circumstances. + +Restored the command that expands to a backslash with category 12, for +writing the outer token \newtoks to the output file. + +Because \mfsrc ends with \ignorespaces (should it?) commands +can generate a space under metafont but not under metapost with +mplabels (because they write TeX code to the output). I have therefore +started to look out for such differences and am adding \ignorespaces +when I notice them. + +Released to CTAN, Oct ??, 2001. + + +REVISION 0.5.01 beta + +This modification actually occurred 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 \tlabel in a couple of places. The problem was that +Metapost code in the point argument could contain parentheses or commas, +and these had to be hidden inside braces. The code of \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. + + +REVISION 0.5.02 alpha, Oct 26--Nov 8, 2001: + +Put most of the catcode changes (in the "paranoia" section of +mfpic.tex) in a command \mfp@sanitize for possible reuse. + +In preparation for a planned enhancement, I have divided \@figmac into +three parts: the set-up, write, and post-write phases. The idea is that, +e.g., \@curve[1.2] will do the setup, and write the code +tcurve(1.2, false) but not the points or the ending semicolon, then +close with the all-purpose macro \@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. +\@figmacdata would detect the form and do the appropriate thing. In +particular I would like to be able to do something like +\curve[1.2]\datafile{file.dat} to draw a curve connecting the points +listed in file.dat. + +Have actually changed the definition of \curve and \cyclic to use +this scheme, although \@figmacdata just writes the inline data points +to output. Shouldn't be unusually hard to make it open the file handle +and call \mfp@rwdata. I will first try to organize the opening, +reading, writing and closing of files into reusable modules. + + +REVISION 0.5.03 alpha, Nov 8, 2001--???: + +Further modified \@figmacdata: Split it in two. First, \mfp@writelist +writes the list, enclosed in parentheses and followed by a semicolon, +then issue \@figmacend. This is because lists are also used by +"non-figmacs", like \xmarks and \point. For these I just use +\mfp@writelist. Perhaps it wouldn't hurt to include \@figmacend on +those, but I wasn't prepared to chance it. Also put the common +combination \@figmacstart\mfsrc{#1}\@figmacdata in a new macro +\@listmac. + +Now all those macros that take a list as last argument (thank goodness +it always _is_ the last argument) follow the scheme. This includes +\xmarks, \ymarks, \lmarks, \bmarks, \rmarks, \tmarks, \point, +\plotsymbol, \piechart, \barchart, \polyline, \polygon, \fcncurve, +\curve, \cyclic, \qspline, \closedqspline, \cspline, +\closedcspline, and \turtle. Ultimately, I may make \@figmacdata +write data from a file (if the next token is \datafile) or data listed +inline as if in a file (if the next token is \inline). + +I rewrote the code in \@mfpic that loads the figure into \@wholegraph +so that when \ifmfpicdraft is true then it is skipped completely and +\@wholegraph is just set to an empty box. Then, at the end of \@mfpic, +if \ifmfpicdraft is true, the figure number in \tt is set as a +\tlabel (so the size of the figure will automatically adjust to +accommodate it). + +Oops! Had to change the above behavior: \tlabel doesn't expand its +contents when writing to the .mp file in mplabels. So it is +impossible to get \mfp@count (the picture number) written as a number. +Rather than have to write the definition of \mfp@count to the output +file, I changed the code that loads the figure into \@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. + + +REVISION 0.5.04 alpha, ???--April 11, 2002: + +Added \@XP which expands to three \expandafters. + +Changed what the truebbox option writes to the .mf file. The scope +in Metafont should now more closely match the scope in TeX. + +Added options draft, final, and nowrite (as well as command +versions \mfpicdraft, \mfpicfinal, and \mfpicnowrite) which should +avoid including the pictures (draft) or include the pictures (final), +overriding automatic decisions. Option nowrite avoids writing anything +to the .mf file. + +Made several assignments, such as \mfp@count, \@graphfont, etc., +global, in case the command \opengraphsfile is issued inside a group. + +Rewrote \tlabel and friends so that the point arguments could +optionally be enclosed in braces. This was done by checking for a left +parenthesis with \mfp@ifnextchar and branching on that. This allowed +me to change the gblabel command to accept a list of points, and now +\tlabel can, under mplabels accept a list of points in braces. + +Completely reorganized the data file reading macros (much smaller and +free of \loop...\repeat constructs). Also added the previously +mentioned capability to replace any list after a macro such as +\curve{...} with the construct such as \curve\datafile{<file>} to +construct the list from the data in file + +Changed explicit value of 5 data points per line to the value of +\mfpdataperline when plotting data files. + +Added error messages \nodatafileerror and \emptydatafileerror. + +Added command resizedrawpen to grafbase to unclutter the +output file. + +Collected the common code in \xmarks, \ymarks, etc., so that now they +are implemented with \marks x, etc. + +Added aliases \lattice and \gridpoints for \grid. + +Changed the option handling in \tlabel so that it is translated into +integer values and \ifcase can be used, making for simpler conditional +code. Added \mfp@justifyerror to the \tlabeljustify command, to +occur if an invalid letter is used. + +Added \extra@tlabel command at the end of \@tlabel and \@@tlabel. +Redefining this makes it easier to write macros looping through many +\tlabel commands. + + +REVISION 0.5.05 alpha, April 16, 2002: + +Corrected bug in \mfpverbtex which caused # symbols to be doubled in +the output: simply change catcode of # before reading the verbatimtex +material into the token list. + +Remove \DeclareGraphicsRule commands issued in 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 +\@namedef{Gin@rule@.\mfp@count}. + +Added a command index to \mfpicdoc.tex. The distribution now includes +a recent version of eplain.tex for the indexing macros and the actual +index mfpicdoc.ind. The makeindex style file that was used, +mfpic.ist, is also included. + + +REVISION 0.5.06 alpha, April 16--May 7, 2002: + +After installing new MiKTeX and forgetting to set localfont, I found +that textrect, textoval and textellipse (in 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 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 sqrt to instead use ++ or abs to minimize +such problems. + +Updated most docs. Changed mfpic.ist so it will write an mfpic package +comment to the top of mfpicdoc.ind. + + +REVISION 0.5.07 alpha, May 7--June 25, 2002: + +Added \usingpairdefault to reset the \using specification to the +default. Also \usingnumericdefault for commands that take a numeric +list (equivalent to \using{#1 #2}{#1} ). + +Documented \marks<axis> commands. + + +REVISION 0.5g alpha, June 26--July 31, 2002: + +Changed version numbering scheme so LaTeX file utilities like the +snapshot package are better served. + +Change the graphic inclusion to use \@setmfpicgraphic which, in +addition to executing \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 +truebbox without mplabels). The graphics package makes this hard by +not saving it globally except in \@gtempa, which hardly seems safe to +rely on. Nevertheless that is what I use now, though it doesn't get used +yet. + +Changed \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 verbatimtex stuff that was written to the out file in +\opengraphsfile is now stored in a token register +\mfp@commonverbatimtex and then written. + +\opengraphsfile now checks for the existence of a file with the +extension of the current value of \mfp@count (default 1) in case the +user changes its value (with \mfpicnumber) before that command. +mfpic.tex now sets it to 1 rather than rely on \opengraphsfile to do +so. + +Changed \tlabel to place its contents in a simple left aligned +\halign. This makes it possible to right-align or center multi-line +labels with an \hfill or \hfil on left. + +Corrected bugs in file read/write (\plotdata, etc.): Moved whitespace +resetting to \@processdatafile, and changed one \def in +\mfp@rwdataloop to \edef. + +Moved the LaTeX2e graphics rule stuff to \mfpic, \usemetapost now just +saves the graphics rule signature ("eps" or "mps") for use in that +stuff. + +Remove eplain.tex, substituting indexing.tex which contains only(?) +macros necessary to process the one indexing command actually used in +mfpicdoc.tex, and the two-column printing of the index. + + +REVISION 0.5h alpha, Aug 1--6, 2002: + +Added code to \@setmfpicgraphic to retain the lower left corner of the +picture under metapost. I did this by redefining \Gin@def@bp to make +its definitions (of \Gin@llx, etc.) global. Then added that info to +\@xconv and \@yconv. This allows truebbox to work without mplabels. +Added code to 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 mfpic environment. This allows labels +to expand the size of the graph (as documented) in the remaining case: +with mplabels but without truebbox. + +This requires that any user who redefines \setmfpicgraphic must also +redefine a command \getmfpicoffset that stores the coordinates of the +lower left corner in the macros \mfpicllx and \mfpiclly. + +Reverted to the previous \tlabel method of producing multiline +labels. The \halign method (specifically the \let\\=\cr) produces +an error when either of the packages latexsym or amsfonts is used. So it +is not (yet) possible to right align or center multiline labels. + +Reverted back when I discovered that \def\\{\cr} did _not_ conflict +and seems to work just as well. It is again possible to right align and +center multiline labels. + +Added \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 *objs.tex. + + + +REVISION 0.5i alpha, Aug 7--12, 2002: + +Rearranged the endmfpic code of grafbase.mp so that truebbox, clip +and mplabels interact properly, meaning that text which is clipped off +_doesn't_ expand the bounding box. + +Announced to mfpic mailing list. Maybe this will become version 0.6 beta. +(Ha!) + + +REVISION 0.5j alpha, Aug 12--15, 2002: + +Changed name of \marks command (introduced in 0.5.04) to \axismarks +to avoid name clash with \eTeX primitive command (reported by Guy +Worthington). + + +REVISION 0.5k alpha, Aug 15--26, 2002: + +Rearrangement of \begingroup-s at some point caused a problem with +\datafile commands: the \@figmacend was issued inside a group. +(reported by Jaromir Kuben). + +I moved the location of \@figmacstart and \@figmacend and that +solved it but caused a problem with \plotdata, which reused that code. +Solved by putting an appropriate \@figmacend in the \plotdata code. + + +REVISION 0.5l alpha, Aug 26--29, 2002: + +Changed the code that saves the lower left corner of the picture under +metapost. Instead of making \Gin@llx, etc., global, I redefine +\Gread@parse@bb to store them globally in our own macros. This +redefinition happens only in the \mfpic environment (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 \Gin@* commands are local even though no one on +comp.text.tex came up with one. + +Also, since now the only \begingroup/\endgroup pair in the +file read/write code is in one place: the \@processdatafile command, I +deleted all the \global in front of \read commands. + + +REVISION 0.5m alpha, Aug 29--30, 2002: + +Updates to *.txt, readme.1st, and documentation. + +Changed \mfp@ifnextchar so that when looking for the next token, it +will skip over \relax. This means one can put the optional argument on +another line even when \preservelines is in effect (at which time the +line end character is active and has been \let equal to \relax) + +Change \@figmaclist and \@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 \preservelines from \mfpic. Now we no longer need the +caution about putting a macro and its arguments on the same line. + + +REVISION 0.5n alpha, Aug 30--Sep 04, 2002: + +Allow \tlabelsep and \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 \mfpdataperline. Also changed it to a macro rather than a +\count because LaTeX users are unfamiliar with count registers +(\newcounter, yes, \newcount, no). I could have called it +\c@mfpdataperline, but then it wouldn't be user-level for plain TeX. + +Changed "\ifnum\mfp@n=\mfpdataperline" to +"\ifnum\mfp@n<\mfpdataperline" and exchanged the true and false clauses. +Just in case some user sets \mfpdataperline to some number which is not a +positive integer. + +Added \space to "\mfsrc{verbatimtex\endgroup\space etex}", just in +case TeX could enter a state where it doesn't append a space when it +writes the \endgroup. + + +REVISION 0.5o alpha, Sep 04--06, 2002: + +Corrected LTXMFobj.tex and LTXMPobj.tex. After testing various +combinations of mplabels and truebbox, I'd incorrectly added these +options to the former file and failed to restore them to the latter. + + +REVISION 0.5p alpha, Sep 06--09, 2002: + +Added commands \setpapersize and \setpagegeometry to header.tex. +Now the preamble of almost every .tex file in the docs directory is +reduced to using these two commands. + +Deleted old verbatim macros which were no longer used. + +Removed save piecenter; from grafbase. This variable was documented to +be set by the piechart command, but saving it made it unavailable. + +Corrected the example concerning \datafile with \xmarks: the +parameters of \using needed a space between them. + + +REVISION 0.5q alpha, Sep 09--12, 2002: + +Multiple documentation refinements. + +Removed \if@mfp@metafont, using only the switch \if@mfp@metapost. + +Added \mfp@ifdefined: it checks if a token is neither \undefined nor +\relax. Used in macros to detect format. Moved definition of +\@firstoftwo and \@secondoftwo before it. + +Made some definitions in \usemetapost global, in case it is +mistakenly issued inside a group. + +Removed \@eatspacedef since it was used only once to define something, +and it was shorter to define it directly. + +Changed all \ifx in \@@arrowoption to \if in case someone wants to +pass the the letter as a macro + +In axis code, changed `\x to simply `x lest \x have some +definition and some TeX state causes it to be expanded. + +Gave \newsavepic a definition closer to \newsavebox, which uses +\@ifundefined rather than strictly testing against \undefined. + + +REVISION 0.6 beta, Sep 12, 2002: + +Uploaded to CTAN. + + +REVISION 0.6a alpha, Sep 12--Nov 5, 2002. + +Added \let\par\relax in the definition of \@mfpic to +nullify blank lines in user code. Needed since I stopped using +\preservelines. (Reported by Jaromir Kuben.) Put in commands to +restore \par to its normal meaning in labels and captions. + + +REVISION 0.6b beta, Nov 6--, 2002. + +Incorrect sign on sinh function in grafbase. + +REVISION 0.6c beta, Nov 6--, 2002. + +Bounding box had the horizontal and vertical data reversed if all +of the following three options were selected: metapost, mplabels and +clip. + +REVISION 0.63 alpha + +Mfpic: + +Added code to write into the graphs file a test of the major version +number (to assure that the files mfpic.tex and graphbase.mf/p are +comparable). + +Added a switch \in@mfpicenv that is true inside an mfpic environment and +false outside. This allows macros to make global changes outside and +local changes inside, helping TeX and Metafont stay in sync. Modified +some commands to use it (clip and truebbox options, so far). Added +\mfp@local which expands to nothing inside and mfpic environment and +to \global outside. + +Changed \@dummy to \mfp@dummy (mfpic.tex) lest its name clash with +other packages. + +Added a \partialpath{a,b} command. It's argument is two fractions +separated by a comma and produces the subpath of the following path f +that goes from a*length(f) to b*length(f). (Hmmm...so +\partialpath{1,0} would inefficiently reverse a path!) + +Also added \subpath{a,b} to give the equivalent of the MF code + subpath (a, b) of <following path> + +Added command \closed[<tension>]{<method>} where <method> is l, b, +s, cb, or u so that, for example, \closed[2]{s} does the same as +\sclosed, except that added or modified links will have tension equal +to 2. Then I defined the previous commands in terms of this one (tension is +ignored for \lclosed and \cbclosed since they specify exactly what the +link should be.) Default for <tension> is 1. + +Moved \fdef to a global location and added "save #1;" to its +definition. Functions defined with it should now be local if it is used +in an mfpic environment and global otherwise. + +Redefine \+ for entire mfpic.tex. Avoids somewhat complicated +work-around of its outerness in \usemetapost. Restore previous meaning +at end of file. + +Added \@bsphack and \@esphack (as in LaTeX). + +Rewrote \tlabelrect, etc., so that they take a second optional +parameter: the label justification. Made the current \tlabel defaults +the default for \tlabel<path> also. Might change this to [cc] after +talking to Jaromir. + +Changed \store to be usable as a prefix command. It still takes a +second argument but doesn't wrap anything around it, so +\store{m}\circle{...} is as valid as \store{m}{\circle{...}}. But now + \xscalepath{0,2}\store{m}\circle{...} +is also valid, storing the untransformed circle. It is written as a +\@rendmac so that it turns off automatic path rendering. It invokes a +new grafbase command stored , which stores the path and passes it on +(as the other prefix macros do). This may have restored the old behavior +(prior to 0.2.9.10 alpha), but I can't tell, since I never had any +experience using those versions and don't know why the change was made. + +Streamlined \arrow so that instead of a chain of 4 macros (that all +did the same thing!), each calling the next, it loops until no more +optional arguments are found. + +Renamed \mfpicdebugwrite to \mfpDBwrite to streamline the source +file. Later renamed to \mfp@DBlog to remind me that it only writes to +the .log . + +Change \getmfpicoffset and \preparemfpicgraphic so they take an +argument: the name of the figure file. The default versions do nothing +with it. Changed \@setmfpicgraphic so it calls them with the name of +file. In case a power user needed the file name in his redefinition. + +Shortened \usemetapost. Defined as much as possible outside it, and +include only what needs to be changed. E.g., we no longer redefine +\@setmfpicgraphic inside it (nor \preparemfpicgraphic in the +non-LaTeX version). + +Rearranged code so that \usemetapost is defined in three ways instead +of two: LaTeX2e, plain pdfTeX and plain TeX. Formerly the second two +were combined in one which contained an \ifpdf-\else-\fi construct. That +is now moved to an outer level. Shortened the name of \if@mfp@pdftex to +\if@mfp@pdf since pdftex could be used to produce dvi output, and we +want this to be true only when pdf is being produced. + +Added \mfcmd (adds semicolon to argument) and \mflist (wraps argument +in parentheses). Done so that we can delay reading the argument and +therefore preserve lines. Both of these and \mfsrc now call \@mfwrite +with an appropriate argument. It initiates \preservelines and +continues with \@mfcmd, \@mflist, or \@mfsrc. These read the +argument and end with \@mfsrc, which ends line preserving. + +Rearranged code of \@figmac. It now issues \@startfigtrue before +writing its argument and doesn't do \@imrendtrue. This allows it to +end with the code to read the argument, and avoids some cases of having +to read large arguments before \preservelines is issued. There was +only one case where the timing mattered: \connect, and there we needed +the current order! + +Simplified the scheme for list macros (\mfp@writedata). The above +rearrangement meant there was no longer any need for different treatment +of figmacs and non-figmacs. + +Grafbase: + +Added code to grafbase file to test if the major version of mfpic +(assuming it is input by an mfpic generated file) and that of +grafbase.mf/p are comparable. Added a boolean MFPIC that is true if +the test succeeds. Not used yet. + +Rewrote most of the arc commands in grafbase, focusing on trying to make +any points that were explicitly specified into actual nodes of the path +(i.e., use nothing that could result in round-off error) plus trying to +increase robustness. + +"Corrected" cbclosed command in grafbase. Its code used to put in one +cubic B-spline link and connect that to the beginning and end of the +path f with two ordinary MF Bezier path joins. Now it connects with +three cubic B-spline links, the middle one being the same as before. + +removed w, d, and h as internal variables because of another user +name clash, this time with \fdef(h)... . + +Rewrote grafbase messages and error messages for consistency and +pithiness. + +Changed gblabel to newlabel, but gblabel remains as an interface for old +files, calling newlabel. There are now three parameters rather than four +for horizontal and vertical adjustment. The first gives the fraction +of the text left of the point of placement. The third is a +boolean. If false, the second parameter is taken as the absolute +fraction of the text below this point. If true, it represents the same +except the depth of the text is ignored. This (.5,0,true) gives [Bc] +placement, while (.5,0,false) gives [bc]. + +Added textrectx, textellipsex and textovalx which now allow horizontal +and vertical adjustment and rotation, just like gblabel. The original +commands just call it with the old default (centered, not rotated). + +Rewrote nearly all error messages in grafbase.mf/p. Changed "GUBED" to +"END DEBUG". (That has always bothered me.) + +Reintroduced "bounds" to the mfpic file. It seemed a reasonable +shorthand, replacing four lines of code with one. And has been around +forever. + +Reexamined clipping, trying to make sure that when ClipOn is true, +nothing is written outside the clipping paths. Except there are things +drawn for debugging purposes, so I added noclip() which executes its +contents in a group where ClipOn is set to false. Added DoClip(v) as a +shorthand for: + if ClipOn and (ClipPath > 0) : clipsto (v, ClipPath); fi +Correspondingly changed several commands to write to a temporary picture +variable, which is then DoClip-ed before adding to active_plane. This +turned out to be a prescient act for the purpose of using color in MF +(see below). + +Changed P1 in headpath (giving the direction of the arrowhead) +from "direction n of g" to "point n of g - precontrol n of g". +This gives the arrowhead from \arrow\rect{...} a reasonable direction +without having to rotate it +/- 45 degrees. + +Determined that the filling commands shade , polkadot and tess (all +these are my doing) did not respect aspect_ratio. Changed all of +them to invoke a macro, filledwith, that returns a rectangular picture +tiled with shifted copies of a given picture. This macro respects +aspect_ratio (i.e, invokes .t_ where it should -- I hope). + +Introduced color to Metafont (gray levels only): made color synonymous +with numeric; assigned numeric gray levels to the variables red, +green, etc. Defined the color commands (rgb, RGB, cmyk, gray and +named) to produce appropriate gray levels. Added macro makegray for +this purpose. Allow black or white in drawing commands and gray +levels in filling commands. Gray fill is implemented by a new macro +shaded which is similar in some ways to the internal code of shade and +may one day replace it. Right now shade uses round dots and respects +shadewd and the spacing parameter. But shaded just builds a square +picture which is either two black almost-squares in a white background +(gray levels > .5) or two white almost-squares in a black background. +Works well in simple tests so far. + +Changed the code executed if mode is unknown back to switching on a +default mode, but this time ljfour instead of cx. + +Removed the aspect_ratio scaling from resizedrawpen, and also from +the definition of drawpen and hatchpen. Added that scaling to +shpath. + +Added partialpath and gsubpath to support mfpic's \partialpath +and \subpath . + +Docs: + +Changed this file (changes.tex) from a .tex file to a .txt file for +simplicity of maintenance. + +Transcribed mfpicdoc.tex to a LaTeX file adding mfpdoc.sty to preserve +most of the previous formatting. Adds a table of contents; allows an index +without the extra files indexing.tex and mfpic.ist (both now removed). +Added hyperref, producing a linked .pdf file if pdflatex is used. Did +the same with grafdoc.tex and mf-revu.tex, except the latter has no +index. Have removed mppicdoc.tex since the small part of it that was +not already covered in mfpicdoc.tex has been added in an additional +appendix. + +Made mfpic.dtx, mfpic.ins and grafbase.dtx files. Processing +mfpic.ins produces mfpic.tex and mfpic.sty from mfpic.dtx, plus +grafbase.mf, grafbase.mp and dvipsnam.mp from grafbase.dtx. + +REVISION 0.64 alpha + +Grafbase: + +Rewrote the mfpic macro \polkadotwd so all it does is set the width +(omitting the code "thepolkadot := setdot(...)"). The grafbase polkadot +command now remakes the dot each time it is run. This is really just for +simplicity (for the \cs{polkadotwd} macro). Same was done for \shadewd +and shade. To change the shape of the dots used, I've added +shadedotpath and polkadotpath in addition to dotpath. The last is +now only used for dotted lines and grid. + +Added command threeangles (suffix s) (expr A, B, C) that finds the +three angles of the triangle ABC and assigns them to the s1, s2, and +s3. Now used in arcppp and the new command circleppp . Later +threeangles was replaced by three calls to a new vardef: cornerangle +(A,B,C) , which was useful on its own. + +Added circleppp producing the circle through three points. + +Added circlecp producing the circle with center at a given point, and +passing through a given point. + +Added circlepps producing the circle completing the arc produced by +the corresponding arcpps. These three form their circle from arcs, +ensuring that the circle (a) begins at the first given point on the +circumference, (2) has all the given points as nodes (though more may +have to be added, of course), and (iii) it is at least as robust as the +arc commands, into which a lot of thought was put. + +Added commands that produce circles related to triangle. A triangle Q +is, by definition, required to be a closed path in the form +Q0--Q1--Q2--cycle. + +circumcircle Q produces the circle through all three corners +incircle Q produces the inscribed circle (inside the triangle + and tangent to all three sides) +excircle n of Q produces the exscribed circle opposite Q[n] (tangent + to Q[n-1]--Q[n+1], and to the extensions of + Q[n]--Q[n-1] and Q[n]--Q[n+1] outside the triangle) +ninepointcircle Q The circle through the base of all three altitudes, + through all three midpoints of the sides and through + the points on each median that is halfway + between the corner and the common intersection of + the medians. + +And commands that produce points related to a triangle: +incenter Q center of incircle Q (= intersection of angle + bisectors) +circumcenter Q center of circumcircle Q +excenter n of Q center of excircle n of Q +ninepointcenter Q center of ninepointcircle Q + +None of the triangle related command integrated into mfpic yet. + +Added command pathcenter c which obtains the center of a circle c +(or a rectangle c!) by finding the intersection of the perpendicular +bisectors of two chords. It will happily find the "center" of any path. + +Mfpic: + +Rewrote \function, \plrfcn and \parafcn so they all simply define +\mfp@fcnname to the appropriate grafbase command name and call the +same macro to write the code. As with a lot of other commands, we now +write the old shorter commands when the new parameter (in this case the +tension) is absent: \function {...} produces "function (true) (...)" +while \function[s1.5]{...} produces "tfunction (true) (1.5) (...)". +In retrospect it would have made cleaner code if I had placed the extra +"t" at the end of the name and the tension parameter at the beginning of +the parameters. + +Made similar changes to \btwnfcn and \plrregion . + +All the commands that have an optional argument for the color (\draw, +\gfill, \arrow and all the hatching commands) now have an empty value +for color as the default. When the color is empty we write the old +simpler commands. That is, "\draw..." or "\draw[]..." produces +"drawn ..." rather than "colordrawn (drawcolor) ..." Trying to +streamline the output file. + +Added optional argument to \circle (similar to the ones for \arc). So +the circle through three points can be easily drawn, filled, etc. + +Renamed \@graphdp to \@graphbot, since it is not the TeX depth, but +the coordinate of the bottom recalculated after each \tlabel . Also +\@graphht -> \@graphtop for the consistency. + +Streamlined some aspects of tlabel macros, reducing number of +macros in the chain. Also keep track of the \@graphleft, etc., +calculations so that we can later set the label on the graph with only +two kerns and no \if-clauses. \tb@moveright is the accumulated value to +kern horizontally, and \tb@raise is the amount to move vertically. + +Streamlined \tlabel<path> macros, including consolidating main code into +one, rather than two alternative macros. + +Added \@firstofone and use it in place of \mfp@identity . Also use it +when passing a pair of coordinates for \tlabel : provides grouping that +is not stripped by parameter matching, but also not written into output +file. + +Assigned numbers to axes: x=0, y=1, l=2, b=3, r=4, t=5 . Defined +\get@axisnum similar to \tlabeljustify to assign the numbers, and can +now use \ifnum in \axis and \ifcase in \axislabels to branch on. +This also consolidates the error message in one place. + +Rewrote the \endmfpic debug messages to give me information I want to +see: compare \@graphleft and \@graphright with \wd\@wholegraph, etc. + +Rewrote \plottext under the assumption that all points are specified +as in other plotting commands: pairs separated by commas (i.e., no +braces). Changed docs to reflect it. + +Redid \axislabels so that it could proceed gracefully on an empty +argument. In fact... + +Added \mfp@ifempty as an abbreviation for + \if~#1~\@xp\@firstoftwo \else \@xp\@secondoftwo\fi +to make several such changes possible. Redid \do@mtparam using it. + + +Docs: + +Documented some aspects of MF naming conventions (basically: no +suffixes) and suggested only letters be used. + + +REVISION 0.65 alpha + +Mfpic: + +Rename \mfp@metaposttrue to \mfp@mposttrue, etc. + +Since \@mfp@mposttrue is never otherwise used, we don't define it +(i.e., remove \newif command), instead, replace its use in +\mfp@mposttrue with \global\let\if@mfp@mpost\iftrue . Similar +changes for the false version and for other switches: \if@mfp@clip, +\if@mfp@centcapt (formerly \if@mfp@centercaptions), \if@mfp@mplabels + +Added \mfp@ifmpost{1}{2} as shorthand for \if@mfp@mpost 1\else 2\fi. +Added \@ifmplabels{1}{2} as shorthand for \if@mfp@mplabels 1\else 2\fi. + +Added \xxxfalse (initializations). Though unnecessary, it provides +documentation of the default. + +Renamed \@if@mfp@beforefileopen to \@if@mfp@filenotopen (since it +could conceivably have been previously opened but then closed). + +Added \setdatadashes, \setdatacolors, and setdatasymbols, to allow +the user to set the dashing style, colors and symbols used when +\dashedlines, \coloredlines , or \pointedlines (or \datapointsonly), +respectively, are in effect. (later removed them, see below). + +Added \@nameuse and \@namedef and replaced a several lines of code +with shorter versions using them. + +Added \@ifmtarg (from ifmtarg.sty) and use it when possible instead +of \mfp@ifempty + +Reordered much of both mfpic.dtx and grafbase.dtx (many times!) to +make documentation more natural. + +Rather extensive revision of \axislabels , mainly so that braces around +the text argument are not prematurely stripped (bug introduced when we +tried to "gracefully" handle empty portions of the arguments). + +Added \@makeother and used it in \mfp@sanitize. + +Removed a number of \newif's : those whose values are always set by +another command. These commands now contain \let\ifxxx\iftrue instead +of \xxxtrue . This saves a couple of strings of pool. + +Added \mf@T for the frequently used string "true" , and \mf@F for +"false" . + +Removed grafdoc.tex from the manifest (grafbase.dtx documents the +grafbase macros). Also removed mf-revu.tex (because I'm lazy). +But will add mfpguide.tex as a short intro/tutorial. + +Set \@mfp@verbtexfalse after writing the verbatimtex in +\opengraphsfile (in case it a user tries to have more than one +\opengraphsfile command in a document). + +The utility \mfp@gettoks that was only used in \tmtitle and +\mftitle has now been used to abbreviate similar \afterassignment +constructs elsewhere. + +Rewrote \curve and \cyclic so both call the same command (as was +done some time ago with \polyline and \polygon though not documented +until now). + +Rewrote \noship and added \stopshipping and \resumeshipping so that +shipping can be turned off for several figures. + +Simplifies \mfpdatacomment so that it just sets the register +\@datacommentchar to the character code. Then \mfp@setcomment +changes the category of \@datacommentchar to 14 (comment). + +Added \transformpath , similar to \applyT except that it is a +modification macro for figures. It's argument is a transformer + +Added \cutoffafter {<obj>} and \cutoffbefore {<obj>} as prefix +macros that cut the following path after its intersection with the named +<obj> (a name defined with \store) + +Added \trimpath{<dim1>,<dim2>} , a prefix macro that removes the part +of the following path within <dim1> of its start and within <dim2> +of its end. + +Grafbase: + +Added transformedpath (transformer) expr f that reads a path f , applies +the transformer and returns the result. This is to supply the correct +syntax for the \transformpath macro. + +Added gbcutafter and gbcutbefore . Unlike the similarly named MP +macros, these try to cut off as much as possible. Later changed the +names to cutoffafter and cutoffbefore, but gave them standard mfpic +syntax: "vardef cutoffbefore (expr b) expr f =". Also reverted to +essentially the same as the MP definitions. + +Added trimmedpath (expr a,b) to implement \trimpath . + +Rewrote textovalx and textellipsex so they now simply call a common +command, xellipse with a switch set that affects only two lines of the +calculations. + +Slightly revised MF handling of colors. Now the only real difference +between MF and MP is in one macro, makeclr , plus the "color" keyword +("color" still means "numeric" in MF). What makeclr does is accept +three parameters and calculate a gray level in MF, but simply return a +color triple in MP. Then rgb(r, g, b) means + makeclr(snapto(r), snapto(g), snapto(b)) +while all other color functions (except named ) call rgb . + + +REVISION 0.66 alpha + +Grafbase: + +Will try to converge behavior of labels between options mplabels and +nomplabels . Therefor, we add the labels in grafbase on top of the +drawing, after any clipping. We do this in newgblabel (oh, yes, I +renamed newabel to newgblabel) by adding the label to their own +picture: currentlabels. Then currentlabels is added onto the picture +as the very last thing in endmfpic . + +Added emin(x,y) and emax(x,y) as somewhat more efficient versions +of min() and max() . They are vardefs and take two expression +arguments rather than a text parameter with an arbitrary list. + +Added the possibility for textrectx to be given "maximally" rounded +corners: each quarter circle meets the one at the nearest corner so the +end is a semicircle. This is done by allowing the radius parameter to be +a boolean. When it is true, maximal roundedness is used, when false the +corners are not rounded. Provided a mfpic interface by defining the +boolean variable roundends, which is true by default. + +Added TruncateWarn and NoCycleWarn , that print common warning +messages. + +Added pointcolor , the color in which points are drawn by pointd and +in which symbols are drawn by plotsymbol . Now implement pointd with +plotsymbol . However plotnodes , being a drawing command, uses +drawcolor . + +Removed "withcolor fillcolor" from the definition of interior , which +is normally only used in grafbase.mp in some other command that has a +color parameter. The only really "benefit" of having it there was a +dubious one: plotsymbol produced fillcolor solid symbols and +drawcolor open ones. Now all are in pointcolor . Also moved a couple +of other instances of withcolor out of low level commands and into +higher level commands. + +Removed the color parameter from thatchf . For MF to respond to +hatchcolor , the color has to be invoked when the hatching is added to +active_plane , and only the higher level command, thatch , does that. + +Rearranged some of grafbase.dtx for documentation purposes. I am +trying to follow this order: bitwise operations, picture manipulation +commands with use-motivated names, and then the rendering commands that +use those to manipulate active_plane, finally followed by the graph +coordinate rendering commands. + +Added vardefs pnt@#(f) , pre@#(f) and post@#(f) as abbreviations +for point @# of f , precontrol @# of f and postcontrol @# of f . + +Changed a few "max (x,0)" to "abs(x)". These had mostly been not +well-thought-out attempts to gracefully handle erroneous negative values +of "x". The "abs(x)" versions avoid problems in more situations + +Mfpic: + +I will eventually move the import of the picture from the beginning of +the environment (\mfpic) to the end (\endmfpic). Labels (when TeX is +placing them) will be kept in a separate box, and it will be added onto +the picture at the end. + +The optional parameter of \tlabelrect may now be the literal word +"roundends". This will make the radius of the quarter circles equal to +half the narrower dimension of the rectangle, giving the "rectangle" +semicircular ends. + +Added \pointcolor for setting the color of points (for \point) and for +symbols (\plotsymbol), but \plotnodes is interpreted as a drawing +command, and so still uses \drawcolor. + +Changed (again!) the name of \@if@mfp@filenotopen, this time to +\@if@mfp@fileisopen, reversing its sense, and reversed the order of all +commands. + +Moved the undefining of \mfp@filename in \closegraphsfile outside +the conditional (just in case). + + + +REVISION 0.67 alpha + +Grafbase: + +Added knownarray suffix arr, which returns a boolean: true if arr is +the name of a known array (arr is numeric and a positive integer and +arr[1] through arr[arr] are known). Added isdashpat suffix pat, +which applies knownarray to pat.start, pat.rep and pat.finish. + +Added defaultdashes, defaultsymbols, and defaultcolors, which +contains the code to define dashtype0, etc., pointtype0, etc., and +colortype0, etc. + +Added setdatadashes, setdatasymbols, and setdatacolors to allow the +user to change the definitions of the dashtype, pointtype, and +colortype arrays. + +Added getdashpat, getsymbol, and getcolor which perform the modding +operation that used to be done in TeX for reverting (for example) to +pointtype0 after the ninth curve is drawn by \plotdata. + +Changed thepolkadot (in MF) so it is shaded. But we should make it +cover other contents of a region, and we need to subtract black ones +before we add gray ones. Done. + +Added regularpolygon (expr n) (suffix P) (text eqns), where n +is the number of sides, P is the name of the array of vertices, and +eqns is a pair of equations specifying either the center, P0, and one +vertex, or two vertices. Vertices are numbered anticlockwise (otherwise +two points are not enough data). + +Added variables default_tension and fcn_tension to be used as the +default in path creation commands instead of the hard coded values 1 and +1.2. + +Mfpic: + +Realized that the opening code of \mfpic no longer needs to know the +setting of truebbox. No longer make it an error to use it in an mfpic +environment. + +Replaced the three commands \setdatadashes, \setdatacolors etc., with +a single command \reconfigureplot which takes the word `dashes', +`colors', or `symbols' for an argument. Added \defaultplot which +takes the same arguments and restores the builtin defaults. + +Changed name of \partialpath to \partpath. + +Added \regpolygon{n}{P}{<eqn1>}{<eqn2>} which writes +reguralpolygon (n) (P) (<eqn1>;<eqn2>;) (see above). + +Moved the loading of the figure to \endmfpic. Now tlabels are added +to a box \@alltlabels which is appended to the figure right after it +is loaded. This helps keep most of the box loading in one place. It also +permits the possibility of adding a write-18 capability for on-the-fly +figure creation. + +Added \mpobj as a synonym for \mfobj. + +Added \settension to set the grafbase variable default_tension. +and \setfcntension to set the grafbase variable fcn_tension. + +Docs: + +Started mfpguide.tex, a beginner's tutorial. + +Renamed mfpicdoc.tex to mfpicman.tex (can't remember why -- maybe +because I got it confused with mfpdoc.sty). + + +REVISION 0.68 alpha + +Grafbase: + +Improved fcncurve: fcncontrol does `the right thing' when two +successive points have the same x-coordinate. This gives the curve a +decent ending if, instead of extending the sequence by symmetry (in +order to calculate the controls for the endpoints) we extend by making +the additional points equal to the endpoints. Looks _so_ much better! +That was surprising given that all I tried to do was avoid dividing by +0! + +Modified plotnodes as well as plotsymbol so that both store the +relevant pairs in an array and call dosymbols, which draws the symbol +at each coordinate in the array. And dosymbols call another command, +addsymbols, one or two times (once to clear). + +Added boolean: clearsymbols. When true, those symbols place by +plotsymbol or plotnodes which are `clearable' (open paths that satisfy +their first point equals their last) are first closed and filled with +background color in MP (cleared in MF) before being drawn. + +Added complex function sgn Z : returns 0 if Z is (0,0) otherwise +unitvector Z. + +Modified shadepic. The main point to make sure we don't divide by 0. +But also, set dimensions for the picture by doing the lowest resolution +first (thus ensuring both dimensions are at least 2 _pixels_). + +Modified the arrowhead routine so that when the head is filled, the +extra line that closes the head is also drawn. + +Modified arcpps so that angles less than 45 are drawn as a single +segment without passing through a midpoint. + +Modified pathcenter c so it can find the center when c is only an +arc. + +Added barycenter expr t to average the points of the the path t. + +Added makesector expr p, where p is an arc (or any path). Connects +pathcenter p to its endpoints. Could be a little more accurate if we +limited it to arcpps and used arccenter. + +Added boolean: overlaylabels. When true, labels are added to +current_labels, which is then overlayed at endmfpic (new behavior), +when false, labels are added immediately to active_plane. + +Changed these so they produce a path (line segment); used to be they +returned the endpoint. (You can get the point by invoking +"point 1 of altitude n of Q".) + +altitude n of Q the altitude from Q[n] to the opposite side + (produced if necessary). +median n of Q the median from Q[n] to the opposite side +anglebisector n of Q the angle bisector from Q[n] to the opposite + side + +Added + tbezier (expr tens, cyclic) (text lst) +which makes the simple cubic bezier (connects the points in the list +with ..tension tens.. ), as well as its non-tense counterpart bezier. +Also added + mkbezier (expr tens, cyclic) (suffix pts) +which is called by the above after loading the text list in the +the array pts. + +For quadratic Be'ziers we have qbezier, and mkqbezier. + +Removed fcn_tension, using instead 1.2*default_tension. This is for +consistency, all curves responding to the same default + +Added verbatimtex definition to grafbase.mf. It just gobbles +everything to the next semicolon. + +Redid openqbs and closedqbs so they behave like most other +path-making commands: they call textpairs and then some common code, +mkqbs with the name of an array. Also redid mkclosedcbs so it +utilizes mkopencbs. + + +Mfpic: + +Changed the axis commands so they explicitly call \arrow. The purpose +was to ensure that the arrowhead is drawn _after_ the shaft. +Significant only for colored heads. This turns out to make axis@# in +grafbase unnecessary \arrow[l##1]\@figmac{axisline.##2} is all that is +required. + +Added \makesector, a \@closmac prefix that can make a sector out of +a following arc. Useful when the arc is given without a known center +([t] or [s]). + +Added \let\@nl=\@activectrlM to \@mfwrite so that \@nl can +be used for line breaks when catcodes of EOL are already fixed (e.g., in +macro definitions) + +Added check to \opengraphsfile that no previous file is still open. + +Added \clearsymbols \noclearsymbols to interface with the grafbase +clearsymbols boolean. Added clearsymbols LaTeX option + +Added \newdef\pinumber{3.14159}. + +Added new option: overlaylabels and commands \overlaylabels and +\nooverlaylabels. Similar in implementation to truebbox: a TeX +boolean is used only to communicate the setting to \opengraphsfile +before a file is open. Otherwise a MetaPost boolean (above) is switched +on or off. + +Moved \@processdatafile outside \@mfpic@graf@macs. Also moved +\skipBlanksandComments and definition of \mfp@data since they are +used by \@processdatafile. Also moved \skipcoomments because it +seemed it should go along with \skipBlanksandComments. Then I rewrote +the latter to actually call \skipcomments, so now it _has_ to go where +it goes. + +Renamed \mfp@empty to \@empty. + +Added \pairarray{<name>}{<list-of-pairs>} and +\numericarray{<name>}{<list-of-numbers>}. They define, respectively, an +array of pairs and an array of numbers. They can be used outside an mfpic +environments (unlike \patharr), and have the usual scoping properties. + +Added \mfbezier[<tens>]{<list>} to interface with grafbase's new +bezier command. Also \closedmfbezier. + +And the equivalent of (a sequence of) LaTeX \qbezier: \qbeziers and +\closedqbeziers. + +Removed \setfcntension because grafbase's fcn_tension was removed. +Adjusted docs. + +Renamed \if@mfp@mpost to \ifmfpmpost so power users can use it to +write code dependent on the figure processor. The commands to change it +are still private: \mfp@mposttrue/false . + +Added the test for file being open to \setmfvariable. Saves a lot of +tokens. It seems we never used it without \@if@mfp@fileisopen. Require +moving it considerably earlier. + +Added \mfp@let as abbreviation for \mfp@local\let. Likewise +\mfp@def. + +Renamed \mfp@addto to \mfpaddto for power users (i.e., me) and added +\mfpmultiply (same syntax and similar effect). + +Renamed \@if@mfp@fileisopen to \@ifmfpfileisopen (it was just too +many @'s !) + +Changed \everytlabel so it tests for metapost rather than mplabels. +This allows it to be used anywhere without worrying whether \nomplabels +might have cancelled its effect. + +Renamed \massage@data to \parse@data. + +Make sure every write of verbatimtex ... etex ends with a semicolon so +it can be used by grafbase.mf (see above). + + +Docs: + +First version of mfpguide.tex finished. Writing it exposed a number of +bugs that got by the usual suite of tests. It is the first documentation +that actually shows the code and its result together. + +Second version of mfpguide.tex, adds appendices. Planning to ship a +PDF version. + + +REVISION 0.69 alpha and 0.69a + +Mfpic: + +Rewrote \do@ptparam so its first parameter is the command token (e.g., +\do@ptparam\@draw{} instead of the old \do@ptparam{@draw}{}). Added a +command \simple@opt to process simple optional arguments (those that +don't need further parsing), it calls a second command to read the +option, substitute the default if empty, and then call the command with +the given or supplied option as a normal (brace enclosed) argument. The +idea is to make all empty optional arguments the same as none at all. +Added a command \null@opt which is essentially \do@ptparam with a null +second argument. It turns out that now all commands can be handled by +the last two: \do@ptparam and \alt@ptparam are not used anywhere +anymore, although the bare "\mfp@ifnextchar[" does appear once or twice. + +Make \gridlines honor the settings of \axismargin (see grafbase +section below). + +Added \hgridlines to draw only the horizontal and \vgridlines to +draw only the vertical. + +Added \gridarcs and \gridrays to draw only the arcs or rays of a +polar grid. + +Added \setmfboolean for \setmfvariable{boolean}. +Added \setmfnumeric for \setmfvariable{numeric}. + + +Grafbase: + +Rewrote gridlines to honor the axis margins (laxis, baxis, raxis, +and taxis). + +Added hgridlines (expr ysp) and vgridlines (expr xsp) + +Corrected polargrid. How did it ever last this long without a bug +report? The computation of rmin was wrong, and it seems a semicolon +was missing! Added gridarcs (expr rstep) to draw only the arcs, and +gridrays (tstep) for only the rays. Complemented plrpatch with +patcharcs and patchrays for this purpose. + +Corrected polargrid again! It seems the calculation of max and min +angles didn't take into account that angle (0,0) was undefined but +could occur in the code. + +Redid resizedrawpen to save drawpen and currentpen (not just +penwd). + +Removed mindiam and substituted minpenwd in the MP version (they +were equal anyway). + +Added \InputIfFileExists{mfpic.cfg} in the LaTeX section just before +\ProcessOptions. Added code to detect and input mfppatch.tex if it +exists. + +Docs: + +Added a file plotting example to pictures.tex and lapictures.tex. + +Added some of the new commands to Objects.tex . Converted Objects.tex +to use built-in \ifmfpmpost instead of the ad hoc \ifmetapost +defined in TeXMPobj.tex and LTXMPobj.tex. + +Renamed mfpicman.tex to mfpman.tex. + + +Distribution: + +Packed up for distribution in mfpic69b.zip: + + mfpic.dtx + grafbase.dtx + mfpic.ins + README.txt + install.txt + changes.txt + mfpman.pdf + mfpguide.pdf + examlpes\pictures.tex + examlpes\lapictures.tex + examlpes\forfun.tex + examlpes\data.dat + scr\mfpman.tex + scr\mfpguide.tex + scr\refcard.tex + scr\mfpdoc.sty + +And placed on web site. + + +REVISION 0.69c alpha + +Grafbase: + +Redid gendashed so that it balances speed versus memory: If there are +n repeated patterns, add sqrt(_n) of them to the picture _v, then +DoClip (_v); coloraddto (drawcolor) (active_plane, _v); <repeat>. Doing +that for each pattern was too slow, doing it only once wasted memory. + +Put on web site. + + +REVISION 0.69d + +Grafbase: + +Modified barchart so that the data can be pairs. Interpret (a,b) +as an interval and creates bars that begin at a and end at b (Gantt +diagrams). + +Added predirection@# (expr p) and postdirection@# (expr p) which +give correct results *whenever* the path p is nontrivial. Based on +the easily prove fact (which I only recently discovered) that for a +nontrivial single knot with keypoints A, B, C and D, the direction at A +is towards the first one of B, C or D that is not equal to A. The +predirection[j] returns (0,0) if the path is trivial. If the path is +trivial upto time j, it returns postdirection[j]. postdirection[j] +is analogous. + +Changed headpath to use predirection[length p](p) instead of +point length p of p - precontrol length p of p. + + +Mfpic: + +Added \gantt (= \barchart) + + +Distribution: + +Placed on web site, announced on c.t.t. + + +REVISION 0.69e + +Grafbase: + +Somehow the last version of grafbase included failed to include a +long-ago change to colorsafefill in which non-black fills first +subtract the interior under MF. Corrected that. + +Experimented with a O(log n) loop for filledwith. Made no significant +difference in speed in tests. Must be the extra overhead. Keeping old +O(n) method. + +Experimented with using "..tension atleast tens.." in mksmooth and +sclosed. All other tension using operations either call these or +require different treatment. The one case in the test suite where a +visible difference occured, it looked worse. Returned to old method. + +Proofed grafbase.dvi, the documentation of grafbase macros. + + +Docs: + +Proofed mfpguide. + + +REVISION 0.69f + +Mfpic: + +Made [cc] the default for \tlabelrect, etc. Added command +\tlpathjustify to change the default. + +Added code to input local additions, defaults, etc., in mfpic.usr, if +it exists. + +Changed \let\par\relax to \let\par\@empty at the beginning of +\@mfpic. It isn't really necessary to use \relax, we just want +to disable blank lines, we don't necessarily want to skip over them in +\mfp@ifnextchar. In fact, for catching errors, it is better if a blank +line stops \mfp@ifnextchar. + +Grafbase: + +New definition of image (writing on active_plane) prevents use of +plain.mp macros (draw and undraw, for example) inside it. Revert +to plain.mp version. + +Change patcharcs and patchrays so they draw on a suffix parameter +This avoids the use of image and saves memory since drawing on a +picture takes less memory (in some circumstances) than creating a +picture and then assigning it. Actually, the least memory would be to +clip each line as created and add that directly to active_plane. + +Re-examined use (or lack of use) of mono(). Added a few. + + +REVISION 0.69g + +Packed it up in mfpic69g.zip and put it on my web site. + +Docs: + +Added documentation that several arrays become defined after a +\piechart or \barchart command. + +Added documentation on \mfpicversion. Added a couple of overlooked +\index entries and a couple of commands omitted from the "by type" +list. + +Grafbase: + +Modified piechart and barchart so that the documentation about +arrays was correct What was missing: pieangle and piedirection +(without numeric suffixes) were not declared, nor given the correct +value. + +Modified code of textrectx so that documentation of \tlabelrect was +accurate: negative values of the optional argument should now produce +indented arcs and reversed path. All that needed doing was reversing the +order of the path connections for negative radii. + +Fine tune the calculation of gray level for the MP version of shade so +that the result more closely matches the MF version on modern printers +(600+ DPI). Formula is now gray = 1 - (.88*shadewd/sp)**2, which gives +a lighter gray than before. We therefore rewrite the MF code to permit +shadewd to be as high as sp/.88 before resorting to filling. The +number .88 was empirically arrived at (i.e. I determined what number +made most of the MP and MF shaded figures in Objects.tex look the most +similar on two different printers; then I averaged the two values). + +Change pi and deg to internals (along with radians). + +Make plrpatch do what it used to do: draw in drawcolor. Also change +polarpatch back to calling plrpatch. + + +REVISION 0.7 beta, 14 Nov 2003 + +Packed up and put on web page and CTAN. + + +REVISION 0.7a beta, 16 Apr 2004 + +Change one semicolon (;) in a string written by \opengraphsfile to a +colon (:) to work around a bug in the perl scripts mptopdf and/or +texexec. + + +------------------------------------------------------------------------ + + Stuff To Do + +------------------------------------------------------------------------ + + Pie-in-the-sky stuff + +A command to obtain the boundary of a region defined by F(x,y), where +F is a boolean valued function. Easy if the region is convex. + +A command to draw a path paralleling another path. Will need +predirection and postdirection and some notion of what to do when +they differ. Inside corners/cusps should be easy, + + /\ /\ + / \ --> / \ + / \ / /\ \ + +outside corners might need some limit on "mitering": + __ /\ + / \ / \ + /\ --> / /\ \ or / /\ \ or a rounded (circular?) connection. + + +A command to render a path with a "photon"? + +Try 'write18' on-the-fly creation of figures? Most straightforward would +be to mimic \opengraphsfile with each \mfpic. That would require +rethinking those commands that write to the graph file _outside_ an +mfpic figure. Maybe redo \mfsrc so it added to some macro or token list, +and write _that_ after the file is opened. + +Or maybe: \opengraphsfile at beginning of document, then +\closegraphsfile just before processing the figure, then \opengraphsfile +again right afterwards. Then only commands we insert occur when a file +is closed. + +Truebbox for MF? Might be done if every drawing command kept track of +bounding boxes (commands that fill, hatch, etc. already get this info +with gbbox). Would just need to add it to plotsymbol (for pointd and +plotnodes) and to the drawing commands (drawn, gendashed, etc.). Might +want to skip the lower-level things like safedraw, safefill, etc. (or +maybe add it _only_ there). Don't want to do it for anything that +doesn't add to active_plane. But some things only add pictures to +active_plane and by then it's impossible to determine the size. Once a +bounding box is known, endmfpic can adjust tfm dimensions. and shift the +picture before shipout. + + |