diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic')
15 files changed, 908 insertions, 635 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/README b/Master/texmf-dist/doc/generic/mfpic/README index e7da761bce3..fcc76efe00c 100644 --- a/Master/texmf-dist/doc/generic/mfpic/README +++ b/Master/texmf-dist/doc/generic/mfpic/README @@ -1,29 +1,28 @@ % File: README -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/11/13 % -MFpic defines a command group \mfpic...\endmfpic (optionally in LaTeX, -an environment mfpic) and drawing commands to be used inside this group. +MFpic defines a command group \mfpic...\endmfpic (optionally in LaTeX +an environment, mfpic) and drawing commands to be used inside this group. When TeX (or LaTeX) is run on a file containing those commands, a MetaPost (or Metafont) source file is created. When that file is correctly processed by MetaPost (or Metafont), and LaTeX or TeX is run again, the result is a figure in the TeX document at the location of each environment. -See install.txt for initial setup and brief installation instructions. -See mfpguide.pdf for a short tutorial. See below for a summary of -features added since the previous major release (1.00). See the manual -mfpic-doc.pdf for more detailed instructions and descriptions of -features. +See install.txt for installation instructions. See mfpguide.pdf for a +short tutorial. See below for a summary of features added since the +previous major release (1.0). See the manual mfpic-doc.pdf for more +detailed instructions and descriptions of features. -This is mfpic version 1.06. +This is mfpic version 1.10 LICENSE ------- All files of the core mfpic distribution (listed below) may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) -any later version. The latest version of this license is in +any later version. The latest version of this license is http://www.latex-project.org/lppl.txt @@ -39,63 +38,66 @@ MANIFEST -------- Here is a list, plus explanation of purpose, of all files in the mfpic distribution. Read it *before* trying to process any of the example -files. These, and the files generated by running tex on mfpic.ins, -constitute the mfpic distribution to which the LPPL applies. +files. These files constitute the mfpic distribution to which the LPPL +applies. -The five files marked with + below are the only ones essential to using -all the facilities of mfpic. The three files marked with * below are +The six files marked with "+" below are the only ones essential to using +all the facilities of mfpic. The three files marked with "*" below are sufficient to generate those essential files. -The mfpic reference manual is mfpic-doc.pdf. A tutorial is available in -mfpguide.pdf. +All the *.tex files in the doc directory (except the plain TeX file +mfpcard.tex) require the LaTeX style file mfpdoc.sty. The mfpic manual +is mfpic-doc.pdf. A tutorial is available in mfpguide.pdf. -Source files: +The directory names given below are subdirectories of graphics/mfpic/ in +your nearest CTAN mirror (go to http://mirror.ctan.org/) + +Source files (in source/): ------------ -* mfpic.dtx Contains mfpic.sty and mfpic.tex -* grafbase.dtx Contains grafbase.mf, grafbase.mp and dvipsnam.mp -* mfpic.ins The unpacking script: run tex or latex on it. It reads - in mfpic.dtx and grafbase.dtx and produces the - required run-time files mfpic.sty, mfpic.tex, - grafbase.mf, grafbase.mp, and dvipsnam.mp - -TeX/LaTeX code: +*mfpic.dtx Contains mfpic.sty and mfpic.tex +*grafbase.dtx Contains grafbase.mf, grafbase.mp and dvipsnam.mp +*mfpic.ins The unpacking script: run tex or latex on it. It reads + in mfpic.dtx and grafbase.dtx and produces the six + required run-time files (marked "+" below) + +TeX/LaTeX code (in tex/): -------------- - + mfpic.tex Basic TeX/LaTeX code - + mfpic.sty LaTeX2e \usepackage wrapper for mfpic.tex ++mfpic.tex Basic TeX/LaTeX code ++mfpic.sty LaTeX2e wrapper for mfpic.tex ++mfpicdef.tex Input file used by metapost for TeX labels -MetaPost/Metafont code: +MetaPost/Metafont code (in metapost/ and metafont/): ---------------------- - + grafbase.mp MetaPost macros supporting mfpic - + dvipsnam.mp Color definitions for MetaPost, input by grafbase.mp - + grafbase.mf Metafont macros supporting mfpic ++grafbase.mp MetaPost macros supporting mfpic ++dvipsnam.mp Color definitions for MetaPost, needed by grafbase.mp ++grafbase.mf Metafont macos supporting mfpic -Documentation: +Documentation (in doc/): ------------- - changes.txt Summary of 19 years of changes + changes.txt Summary of 20+ years of changes install.txt Basic information on installation README This file. - mfpcard.pdf Precompiled reference card (usletter, landscape). - mfpguide.pdf Precompiled tutorial (usletter paper size) - mfpic-doc.pdf Precompiled manual (usletter paper size) - mfpcard.tex plain TeX source for mfpcard.pdf, should fit on two - sides of either USletter or A4, rotated. + mfpguide.pdf Tutorial (usletter paper size) + mfpic-doc.pdf Manual (usletter paper size) + mfpcard.pdf Reference card (two sides of usletter, landscape). + mfpdoc.sty LaTeX style used by the next two mfpguide.tex LaTeX source for mfpguide.pdf, requires mfpdoc.sty and the mfpic package. - mfpic-doc.tex LaTeX source for mfpic-doc.pdf, requires mfpdoc.sty, - lcheaders.ist amd coil.mps. - mfpdoc.sty LaTeX style used by the above two - lcheaders.ist makeindex style file for mfpic-doc.tex + mfpic-doc.tex LaTeX source for mfpic-doc.pdf, requires mfpdoc.sty. coil.mps Figure included in mfpic-doc.tex + mfpcard.tex reference card source, should fit on two sides of + either USletter or A4, rotated. Plain TeX. + lcheaders.ist makeindex style file for mfpic-doc.tex -Examples: +Examples (in doc/examples/): -------- - pictures.tex Running tex on it produces pics.mp - lapictures.tex Running latex on it produces same pics.mp - data.dat Sample data file needed for above two - forfun.tex Example of \mfsrc: running tex on it produces fun.mp + pictures.tex Example pictures. Produces pics.mp. Plain TeX + lapictures.tex Same examples. Produces same pics.mp. LaTeX + data.dat Sample data file used by above two + forfun.tex Examples of \mfsrc. Produces fun.mp. Plain TeX -This distribution, the latest updates, and some past versions, should also be +This distribution, any new updates, and some past versions, should also be available at my web site: http://comp.uark.edu/~luecking/tex/mfpic.html @@ -117,11 +119,22 @@ NEW FEATURES since Version 1.0 -- Differential equation plotters \DEgraph and \DEtrajectory added. (1.06) - -- Some internal macros changed, some documentation changes made. - (1.01-1.06) - -- Remove mfppatch.tex (which has never been used). (1.06) + -- Added file mfpicdef.tex for metapost labels. (1.07) + + -- Added \quarterellipse, \halfellipse and \fullellipse. (1.07) + + -- Added \gbrace for large braces in pictures. (1.07) + + -- Added \hypergeodesic for certain (technical) circular arcs. (1.07) + + -- Added \browniangraph and \randomwalk (1.07) + + -- Added \gradient, \radialgradient and \areagradient (1.08) + + -- Added \interpolatepath. Added \reversepath (= \reverse) (1.10) + \sig Dan Luecking (luecking at uark dot edu) Department of Mathematical Sciences diff --git a/Master/texmf-dist/doc/generic/mfpic/changes.txt b/Master/texmf-dist/doc/generic/mfpic/changes.txt index 2086042b8ce..dc99de4dfa2 100644 --- a/Master/texmf-dist/doc/generic/mfpic/changes.txt +++ b/Master/texmf-dist/doc/generic/mfpic/changes.txt @@ -1,53 +1,39 @@ % File: changes.txt -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % Summaries of changes. -VERSION 0.1: - +0.1: First version released to network, 30 June 1992. - -VERSION 0.2: - +0.2: Second version released to network, 7 Sept. 1992. (Still had 0.1.13.1 version number in code---oops!) Many new features added, bugs worked out, code cleaned up. -VERSION 0.2.5 of Wed 10 Nov. 1993: - +0.2.5 of Wed 10 Nov. 1993: Bug fix release Primarily work by Geoffrey Tobin. - -REVISION 0.2.5.1 of Wed 13 July 1994: - +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. - -VERSION 0.2.9 Alpha of Thu 11 August 1994: - +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: - +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. - -In 0.2.9.3 Alpha of Thu 21 March 1995: - +0.2.9.3 Alpha of Thu 21 March 1995: 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: - +0.2.9.4 Alpha of Thu 13 April 1995: Renaming of \label to \tlabel, and \caption to \tcaption, in order to avoid conflict with the LaTeX macros with those names. @@ -59,9 +45,7 @@ because user-defined functions provide more power, and function plotting macros were added that accept Metafont function names instead of Metafont expressions. - -VERSION 0.2.9.5 Alfa of Wed 19 July 1995: - +0.2.9.5 Alfa of Wed 19 July 1995: Renames \mfcmd to \mfsrc for clarity. Renames \wedge to \sector to avoid conflict with the character name @@ -78,9 +62,7 @@ transforms in grafbase.mf made slightly more robust. Begin an attempt to make grafbase.mf compatible with John Hobby's MetaPost drawing program. - -UPDATE 0.2.9.6 Alfa of Mon 24 July 1995: - +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 @@ -91,24 +73,18 @@ 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. - -UPDATE 0.2.9.8 alfa, Mon 11 September 1995: - +0.2.9.8 alfa, Mon 11 September 1995: 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. - -REVISION 0.2.10.5 alfa, Sat 9 March 1996: - +0.2.10.5 alfa, Sat 9 March 1996: 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: - +0.2.10.6 alfa, (two hours later) on Sat 9 March 1996: \polygon figure has been introduced; \\ specifies explicit line breaks in tlabels and tcaptions; @@ -120,20 +96,14 @@ 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: - +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 - -REVISION 0.2.10.8 alfa, Tue 26 May 1996: - +0.2.10.8 alfa, Tue 26 May 1996: Second, and bug fix, release via Geoffrey Tobin's anonymous ftp area. - -REVISION 0.3.0 alpha, 1998: - +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. Now any(?) .mf file created by a recent mfpic can be run through Metapost @@ -142,9 +112,7 @@ to produce a PostScript picture. Added functions sin, cos, and their inverses invsin, etc., that compute in radian measure. Also tan and cot. - -REVISION 0.3.8 alpha, 1999: - +0.3.8 alpha, 1999: Color has been added. Default colors for lines/curves (drawcolor), fills (fillcolor), hatch patterns (hatchcolor), and arrowheads (headcolor). Optional arguments for color added to \gfill, \draw, @@ -158,17 +126,13 @@ Added support for LaTeX2e's \usepackage command and options. Added graphics inclusion code. Added code to detect which TeX format was in use. - -REVISION 0.3.9 alpha, 2000: - +0.3.9 alpha, 2000: 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. - -REVISION 0.3.10 alpha, 2000: - +0.3.10 alpha, 2000: Added changes contributed by Jaromir Kuben: An option centercaptions and command \centercaptions to center the lines in a \tcaption. Also \nocentercaptions. Improvements to the code that positions text labels @@ -184,16 +148,12 @@ functions secd, sec, cscd, csc, atan, invtan. Made log a synonym for ln. Added complex variables functions Arg, cis, zexp and Log. - -REVISION 0.3.11 alpha, 2000: - +0.3.11 alpha, 2000: Added \plot similar to \dotted but these shapes can be placed: Triangle, Square, Circle, Plus, Cross, Star, SolidTriangle, SolidSquare, or SolidCircle - -REVISION 0.3.12 alpha, 2000: - +0.3.12 alpha, 2000: Added macro \datafile to read a file of number pairs and create the polygonal path connecting them. @@ -205,9 +165,7 @@ Changed names of various commands to a more imperative form: \usemetapost, \usemetafont, Changed name of option centercaptions to centeredcaptions. - -REVISION 0.3.13 alpha, 2000: - +0.3.13 alpha, 2000: \datafile now ignores leading blank lines and comments, and won't gag on commented out EOLs. @@ -236,9 +194,7 @@ Added Diamond and SolidDiamond to the symbols available. A command \fcncurve that draws a function (i.e., curve doesn't double back) if the x-values are unique and listed in order. - -REVISION 0.3.14 alpha, 2000: - +0.3.14 alpha, 2000: Added optiom mplabels to make \tlabel write btex ... etex groups to the .mp file. Commands \usemplabels and \nomplabels. Added third part to the optional argument of \tlabel to @@ -261,9 +217,7 @@ Changed \savepic: Now use \newpic{\foo} to allocate a box, \savepic{\foo} to store the next picture, and \usepic{\foo} to copy it. - -REVISION 0.3.15 alpha, 2000: - +0.3.15 alpha, 2000: Added \mfpverbtex to write verbatimtex block to .mp file. Changed \newpic to \newsavepic to more closely parallel LaTeX's @@ -276,13 +230,11 @@ Added \pointdef: \pointdef{A}(1,3) makes \A expand to (1,3), with \Ax and \Ay expanding to 1 and 3, respectively. -REVISION 0.4.0 beta, Aug 2000: - +0.4.0 beta, Aug 2000: Released to CTAN. -REVISION 0.4.01 beta, Nov/Dec 2000: - +0.4.01 beta, Nov/Dec 2000: Generate a time-stamp for the output file. Added \penwd as a synonym for \pen. @@ -290,16 +242,12 @@ Added \penwd as a synonym for \pen. Added macros \xaxis[<hlen>] and \yaxis[<hlen>] with the obvious meanings. - -REVISION 0.4.04 beta, Mar 2001: - +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. - -REVISION 0.4.10 beta, May 2001: - +0.4.10 beta, May 2001: Renamed \framed to \mfpframed, similarly: \mfpframegap and \mfpframethickness. @@ -322,7 +270,6 @@ tickmarks along those axes. Syntax eventually settled on in 0.4.16: \setbordermarks{<pos>}{<pos>}{<pos>}{<pos>} \setallbordermarks{<pos>} - For arrowheads on the side axis, a dimesion \sideheadlen was added. Added \gridlines to draw a regular grid of lines. @@ -334,8 +281,7 @@ Added the command \tlabels (note the plural). It has one mandatory argument which contains a concatenation of arguments for one or more \tlabel commands. -REVISIONs 0.4.11--15 beta, July 2001: - +0.4.11--15 beta, July 2001: Added support for multiline labels under mplabels. Added ability to create a curve surrounding some text: @@ -362,24 +308,18 @@ instead of \(un)smoothdata. Added \mfpframe...\endmfpframe to frame the contents. - -REVISION 0.4.16 beta, July 28--30 2001: - +0.4.16 beta, July 28--30 2001: Added "star form" of each \tlabel<path> that defines the curve without placing the label. - -REVISION 0.4.17 beta, July 28--Aug 10, 2001: - +0.4.17 beta, July 28--Aug 10, 2001: Commands: \function, \parafcn, \plrfcn, \btwnfcn and \plrregion now take an option of the form [s<tension>]. Changed the \mfpic command so both optional parameters may be omitted (scale 1 is then assumed). - -REVISION 0.4.18 beta, Aug 10--20, 2001: - +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 @@ -389,19 +329,13 @@ Added \plrgrid and \plrpatch. Added \piechart and \piewdge. - -REVISION 0.4.19 beta, Aug 20--26, 2001: - +0.4.19 beta, Aug 20--26, 2001: Added \mfpicnumber to set the number of the next character or figure. - -REVISION 0.4.20 beta, Aug 26--Sep 1, 2001: - +0.4.20 beta, Aug 26--Sep 1, 2001: Added \barchart. - -REVISION 0.4.21 beta, Sept 1--10, 2001: - +0.4.21 beta, Sept 1--10, 2001: Added SolidStar to symbols available. Changed Star to produces an open five-pointed star instead of the asterisk previously drawn. Added Asterisk to duplicate the old Star. @@ -411,15 +345,11 @@ Added \shiftpath{p}, \scalepath{p,sf}, \xscalepath{x,sf}, scale factor, "x" is an x-coordinate, "y" is a y-coordinate and "sl" is a slant factor. - -REVISION 0.4.22 beta, Sept 11--22, 2001: - +0.4.22 beta, Sept 11--22, 2001: Added \reflectpath{p1,p2}, \xyswappath and \yslantpath{x,sl}; also \xslantpath (a synonym for \slantpath). - -REVISION 0.5.0 beta, Sept 24--Oct25, 2001: - +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. @@ -435,15 +365,11 @@ output and \endmfpic ends the group (under mplabels). Released to CTAN, Oct, 2001. - -REVISION 0.5.01 beta - +0.5.01 beta Corrects a small bug by adding some braces around the point arguments of \tlabel in a couple of places. - -REVISION 0.5.04 alpha, ???--April 11, 2002: - +0.5.04 alpha, ???--April 11, 2002: Added options draft, final, and nowrite (commands \mfpicdraft, \mfpicfinal, and \mfpicnowrite) which should avoid including the pictures (draft) or include the pictures (final), overriding automatic @@ -460,20 +386,14 @@ are implemented with \marks x, etc. (Later renamed to \axismarks.) Added aliases \lattice and \gridpoints for \grid. - -REVISION 0.5.05 alpha, April 16, 2002: - +0.5.05 alpha, April 16, 2002: Corrected bug in \mfpverbtex which caused # symbols to be doubled in the output. - -REVISION 0.5.06 alpha, April 16--May 7, 2002: - +0.5.06 alpha, April 16--May 7, 2002: Made changes to avoid MF/MP overflow in \tlabelellipse/oval. - -REVISION 0.5g (= 0.5.07) alpha, May 7--June 25, 2002: - +0.5g (= 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 numeric data. @@ -481,37 +401,25 @@ data. Changed version numbering scheme so LaTeX file utilities like the snapshot package are better served. - -REVISION 0.5h alpha, Aug 1--6, 2002: - +0.5h alpha, Aug 1--6, 2002: Added \gclip rendering macro that clips the current picture to a path. - -REVISION 0.6 beta, Sep 12, 2002: - +0.6 beta, Sep 12, 2002: Uploaded to CTAN. - -REVISION 0.6a alpha, Sep 12--Nov 5, 2002. - +0.6a alpha, Sep 12--Nov 5, 2002. Added \let\par\relax (later \@empty) in \mfpic to nullify blank lines in user code. (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. - +0.6b beta, Nov 6--, 2002. Correct sign on sinh function with negative argument - -REVISION 0.6c beta, Nov 6--, 2002. - +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(=0.6c) alpha - +0.63(=0.6c) alpha New numbering scheme: increment hundreds (perhaps also thousands) digit for alpha, add letters only for patches to released beta version. @@ -548,15 +456,11 @@ Transcribed documentation to latex. Packaged mfpic in mfpic.dtx, mfpic.ins and grafbase.dtx. - -REVISION 0.64 alpha - +0.64 alpha Added optional argument to \circle (similar to the ones for \arc). So the circle through three points can be easily drawn, filled, etc. - -REVISION 0.65 alpha - +0.65 alpha Rewrote \noship and added \stopshipping and \resumeshipping so that shipping can be turned off for several figures. @@ -571,9 +475,7 @@ 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. - -REVISION 0.66 alpha - +0.66 alpha Added \pointcolor , the color in which points are drawn by \point and in which symbols are drawn by \plotsymbol. @@ -582,9 +484,7 @@ The optional parameter of \tlabelrect may now be the literal word half the narrower dimension of the rectangle, giving the "rectangle" semicircular ends. - -REVISION 0.67 alpha - +0.67 alpha Allow the use of \usetruebbox in an mfpic environment. Added \reconfigureplot which takes the word `dashes', `colors', or @@ -604,9 +504,7 @@ second one later removed). Started mfpguide.tex, a beginner's tutorial. - -REVISION 0.68 alpha - +0.68 alpha Added complex function sgn Z : returns (0,0) if Z = (0,0), otherwise unitvector Z. @@ -639,9 +537,7 @@ figure processor. Renamed \mfp@addto to \mfpaddto and added \mfpmultiply for power users. - -REVISION 0.69 alpha and 0.69a - +0.69 alpha and 0.69a Make \gridlines honor the settings of \axismargin. Added \hgridlines to draw only the horizontal and \vgridlines to @@ -660,49 +556,35 @@ exists. Renamed manual to mfpman.tex. Provide a linked mfpman.pdf with TOC, and two indices. - -REVISION 0.69c alpha - +0.69c alpha Lowered MF memory usage of \gendashed (and therefore also for \dashed, \dotted and \plot). Problem reported by J. Kuben. - -REVISION 0.69d - +0.69d \barchart can now take pair data. Interpreting (a,b) as an interval and creates bars that begin at a and end at b (Gantt diagrams). Added \gantt (= \barchart) - -REVISION 0.69f - +0.69f Made [cc] the default for \tlabelrect, etc. Added command \tlpathjustify to change the default. Added code to input user additions, defaults, etc., in mfpic.usr, if it exists. - -REVISION 0.69g - +0.69g Bug fix to \tlabelrect. - -REVISION 0.7 beta, 14 Nov 2003 - +0.7 beta, 14 Nov 2003 Packed up and put on web page and CTAN. - -REVISION 0.7a beta, 16 Apr 2004 - +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. - -REVISIONS 0.71 alpha--0.8 beta, 17 May 2005 - +0.71 alpha--0.8 beta, 17 May 2005 Added \arc[r], \arc[q], \circle[r], circle[q]. \arrow* (star form). @@ -744,20 +626,14 @@ the version info and emit a message if there is a mismatch. Sent to CTAN 13 May 2005. - -REVISION 0.8a 17 May 2005 - +0.8a 17 May 2005 Added forgotton \belowfcn plus the documentation of \btwnplrfcn. - -REVISION 0.8b 27 Sep 2005 - +0.8b 27 Sep 2005 Bug fixed concerning unprintable characters in filenames. NOT uploaded. - -REVISION 0.89 08 May 2006 - +0.89 08 May 2006 Added: \arrowhead, \arrowtail and \arrowmid for arrows. Added: \zigzag, \sinewave and \corkscrew renderings. @@ -810,12 +686,10 @@ mfpman.tex. Corrected behavior of mfpic environments with regard to \everypar. -REVISION 0.90 01 Jun 2006 - +0.90 01 Jun 2006 Uploaded to CTAN -REVISION 0.94 09 Sep 2009 - +0.94 09 Sep 2009 Added support for cmyk and grayscale color models that have been available in MetaPost since version 1.000. @@ -901,17 +775,10 @@ Correct minor error in mfpic.dtx affecting only the documentation. 1.02 Add work-around for verbatimtex (added a commented blank line after -user-supplied verbatimtex material). Metapost comments out final eol in -a verbatimtex group, also ignoring trailing spaces, also ignoring blank -lines. This causes problems if user ends one verbatimtex with an -assignment, and then follows with another verbatimtex before any btex's. -These two verbatimtex's are then effectively concatenated, contrary to a -user's expectation that a line end separates them. +user-supplied verbatimtex material). 1.03 -Correct iscolor in grafbase. Added parentheses around "color clr" to -force it to be interpreted as a boolean expression rather than an -incomplete color variable declaration. +Correct iscolor in grafbase, adding parentheses. Change detection of amstex to \ifx\amstexloaded@\relax (don't know why I rejected this before). This takes care of formats built on top of @@ -938,3 +805,35 @@ support macros *RKIV (4-step Runge-Kutta numerical method). Removed mfppatch.tex from the distribution. Add lcheadings.ist for the index. +1.07 +Added mfpicdef.tex for metapost labels and removed token register +\mfp@commonverbatimtex. + +Added \quarterellipse, \halfellipse and \fullellipse. + +Use \MFPeverylabel in the metapost file instead of \everylabel in case +someone uses a LaTeX package that includes such a macro. + +Added \gbrace. + +Changed the detection of AmS-TeX. Check that both \amstexloaded@=\relax +and \NoBlackBoxes is defined. The former alone is too easy to occur by +accident. + +Added hyperbolic geodesics. Also a half-plane version of pshdist(,). + +Added \browniangraph and \randomwalk. + +Added the Kelvin transform, kelvin(z). Also the complex function +zsqrt(z) and complex number operations zmul and zdiv. + +1.08 +Added gradients: \gradient, \areagradient and \radialgradient. + +1.09 +Testing... + +1.10 +Added commands to interpolate between two paths. +Added \reversepath=\reverse. + diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/data.dat b/Master/texmf-dist/doc/generic/mfpic/examples/data.dat index 834ab5b57d1..12222ede486 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/data.dat +++ b/Master/texmf-dist/doc/generic/mfpic/examples/data.dat @@ -1,5 +1,5 @@ # File: data.dat -# A part of mfpic 1.06 2011/03/08 +# A part of mfpic 1.10 2012/12/03 # # A file of data to plot a function curve # ("#", not "%", must be comment character when this is read.) diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex b/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex index d2832c8ac90..76fcdbb8b70 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex +++ b/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex @@ -1,5 +1,5 @@ % File: forfun.tex -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % \nopagenumbers \input mfpic.tex @@ -7,7 +7,7 @@ \usetruebbox \opengraphsfile{fun} -\mfpicunit=1bp +\mfpicunit=2bp \noindent \mfpic{-1.25}{118.5}{-11.25}{40} diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex b/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex index 4247e3b7b15..4400d8734d6 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex +++ b/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex @@ -1,5 +1,5 @@ % File: lapictures.tex -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % % Magnify to same scale as pictures.tex : % (Use of \mag is against the law of LaTeX, but Bugs Bunny set a precedent.) @@ -121,10 +121,10 @@ \noindent \begin{mfpframe} \begin{mfpic}[30]{-1.3}{1.7}{-1}{1.1} -\gfill\sector{(0.3,0.2), 1, 0,60} -\shade\sector{(0,0), 1, 60,105} -\turtle{(0,0), \plr{(1,105)}} -\sector{(0,0), 1, 60,360} +\gfill\sector{(0.3,0.2), 1, 0, 60} +\shade\sector{(0,0), 1, 60, 105} +\turtle{(0,0), \plr{(1, 105)}} +\sector{(0,0), 1, 60, 360} \tcaption{{\it Figure 5:} Pie Chart.} \end{mfpic} \end{mfpframe} diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex b/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex index 649a8dd27d8..44146130a5f 100644 --- a/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex +++ b/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex @@ -1,5 +1,5 @@ % File: pictures.tex -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % \magnification=\magstep1 @@ -120,9 +120,9 @@ Filled Circle.} \mfpframe \mfpic[30]{-1.3}{1.7}{-1}{1.1} \gfill\sector{(0.3,0.2), 1, 0,60} -\shade\sector{(0,0), 1, 60,105} -\turtle{(0,0), \plr{(1,105)}} -\sector{(0,0), 1, 60,360} +\shade\sector{(0,0), 1, 60, 105} +\turtle{(0,0), \plr{(1, 105)}} +\sector{(0,0), 1, 60, 360} \tcaption{{\it Figure 5:} Pie Chart.} \endmfpic \endmfpframe diff --git a/Master/texmf-dist/doc/generic/mfpic/install.txt b/Master/texmf-dist/doc/generic/mfpic/install.txt index 7f98437d374..8c8df9a5c4f 100644 --- a/Master/texmf-dist/doc/generic/mfpic/install.txt +++ b/Master/texmf-dist/doc/generic/mfpic/install.txt @@ -1,136 +1,102 @@ % File: install.txt -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % -This is version 1.06 of mfpic. See README.txt for a list of files and a +This is version 1.10 of mfpic. See README for a list of files and a brief description of each. Generating and installing the files ----------------------------------- -This sections is unnecessary if you just get mfpic.tds.zip, copy it to -your local texmf directory , and unzip it there. You can find it on -CTAN: /install/generic/mfpic.tds.zip - --- Put mfpic.ins, mfpic.dtx and grafbase.dtx in the same temporary - directory and change to that directory. Run latex (or tex) on - mfpic.ins, which should produce the five files - mfpic.tex - mfpic.sty - grafbase.mf - grafbase.mp - dvipsnam.mp - - -- If you have an older version of mfpic, remove the old files with the - same names as the above five from your TeX directories, or ensure - that the following procedure overwrites them (back them up somewhere - else first if you wish). - - -- Copy mfpic.tex where TeX and LaTeX will find it, and mfpic.sty where - LaTeX will find it. On any TDS compliant system (such as TeX Live - MacTeX, or MiKTeX) they can all be put in $TEXMF/tex/generic/mfpic/ - (where $TEXMF indicates a directory serving as a root of a texmf - tree). - - -- Copy grafbase.mp and dvipsnam.mp where MetaPost will find them, for - example $TEXMF/metapost/mfpic/ . - - -- Copy grafbase.mf where Metafont will find it. For example, - $TEXMF/metafont/mfpic/ . - - -- Copy mfpguide.pdf, mfpic-doc.pdf. mfpcard.pdf where documentation is - kept. For example, $TEXMF/doc/generic/mfpic/ . Optionally, copy - the .tex versions of these, plus mfpdoc.sty, lcheaders.ist and coil.mps, - as well as examples/*.* to the documentation area - Also optional: copy the two .dtx files and mfpic.ins to the source area - ($TEXMF/source/generic/mfpic/). - - -- Some distributions might have a copy of the file grafbase.mf in the - directory $TEXMF/fonts/public/mfpic. If so, delete it or replace it - with a copy of the new one. If some package needs that particular - version, put it someplace where mf and mpost will _not_ find it and - arrange for that package to find it when necessary. - - -- If required by your TeX system (MiKTeX, MacTeX, and TeXLive all DO - require it): !!UPDATE THE TeX FILENAME DATABASE!! - -There is one optional step that may be useful (if you only wish to use -mfpic to produce MetaPost pictures, you may skip this): find the file -modes.mf on your system. Typically this will be in $TEXMF/metafont/misc/ -Find near the end a line similar to +This sections is unnecessary if you get + http://mirror.ctan.org/install/graphics/mfpic.tds.zip +when it becomes available. Just unzip it in a texmf directory. +Alternatively, you can get the entire graphics/mfpic/ directory from +http://mirror.ctan.org/ and move those files as described below + +-- If you have acquired only mfpic.ins, mfpic.dtx and grafbase.dtx, put + the three in the same temporary directory and change to that + directory. Run latex (or tex) on mfpic.ins, which should produce + these six files: + mfpic.tex grafbase.mf + mfpic.sty grafbase.mp + mfpicdef.tex dvipsnam.mp + +-- If you have an older version of mfpic, remove any old files with the + same names as the above from your TeX directories, or ensure that the + following procedure overwrites them (back them up first, if you wish). + +-- Copy mfpic.tex and mfpicdef.tex where TeX and LaTeX will find them, + and mfpic.sty where LaTeX will find it. On any TDS compliant system + (such as TeXLive, MacTeX and MiKTeX) they can all be put in + $TEXMF/tex/generic/mfpic/ (where $TEXMF indicates a directory serving + as a root of a texmf tree). + +-- Copy grafbase.mp and dvipsnam.mp where MetaPost will find them, for + example $TEXMF/metapost/mfpic/ . + +-- Copy grafbase.mf where Metafont will find it. For example, + $TEXMF/metafont/mfpic/ . + +-- Copy mfpguide.pdf, mfpic-doc.pdf. mfpcard.pdf where documentation is + kept. For example, $TEXMF/doc/generic/mfpic/ . Optionally, copy the + *.tex versions of these, plus mfpdoc.sty, lcheadings.ist and + coil.mps, as well as examples/*.* either to the documentation area or + to the same place as mfpic.tex. Also optional: copy the two .dtx + files and mfpic.ins to the source area + ($TEXMF/source/generic/mfpic/). + +-- If required by your TeX system (most do): update the tex filename + database. + +There is one optional step that may be useful if you plan to make use of +mfpic's support for Metafont (you may skip this if you only wish to use +its MetaPost support): find the file modes.mf on your system. Typically +this will be in $TEXMF/metafont/misc/ . Find, near the end of that file, +a line similar to localfont := ljfour; -Replace, if necessary, the string "ljfour" by one of the modes listed in -that file. At minimum, select one whose resolution (DPI) matches your -printer and/or the configuration of your dvi viewer. If you make such a -change, regenerate the mf.base file (fmtutil on TeXLive or MacTeX; +Replace, if necessary, the string "ljfour" by one of the modes defined +in that file. At minimum, select one whose resolution (DPI) matches both +your printer and the configuration of your dvi viewer. If you make such +a change, regenerate the mf.base file (fmtutil on MacTeX or TeXLive; MiKTeX Options in MiKTeX). On some systems this may be named plain.base. Read mfpguide.pdf before trying anything further. If you are already familiar with mfpic (version 0.2.10.9 or later) you can probably get going right away. -If you want to read the documented source code for mfpic, run latex on -mfpic.dtx and grafbase.dtx (Peter Wilson's docmfp.sty is required -for grafbase.dtx) 2 or 3 times each. Then run makeindex for each: - +If you want to read the documented source code for mfpic, run pdflatex +on mfpic.dtx and grafbase.dtx three times each. Then run makeindex for +each: makeindex -s gind.ist -o mfpic.ind mfpic.idx makeindex -s gind.ist -o grafbase.ind grafbase.idx - -and then latex again (once each). The docmfp package can be found at -your favorite CTAN mirror. A copy of docmfp.sty is also on my web page -(see README). (Some TeX distributions (e.g., TeXLive) contain a rogue -copy of ltxdoc.cfg in the TeX input path (e.g., tex/latex/subfig), which -can mess up the indexes of these documents. Move it from the texinputs -area to the documentation area of your system. +and then pdflatex again. ------------------------------------------------------------------------ -If you desire to remake the mfpic manual (and why in the world would you -be wanting to do a daft thing like that?), make sure mfpic-doc.tex and +If you desire to remake mfpic-doc.pdf, make sure mfpic-doc.tex and mfpdoc.sty are in the current directory or where LaTeX can find them. Make sure that coil.mps is also where LaTeX can find it. Edit, if you -like, the paper size option in the \documentclass command in mfpic-doc.tex. -(The document uses Times for the main font family, LuxiMono for a -typewriter font, and CMSS for a sans serif font. Packages mathptmx amd -luximono are required.) Then run pdflatex three times: - - pdflatex mfpic-doc (Hundreds of undefined labels messages) - pdflatex mfpic-doc (Labels have changed message may occur) - pdflatex mfpic-doc (All resolved) - -Now page numbers should be correct in the index, so run makeindex, -making sure that lcheaders.ist is where makeindex can find it: - - makeindex -s lcheaders.ist -o mfpic-doc.ind mfpic-doc.idx - -then run latex two more times: - - pdflatex mfpic-doc (mfpic-doc.toc now has index added) - pdflatex mfpic-doc (Document toc now correct) - -You can use latex instead of pdflatex, but you won't get clickable links -in the result. (I was too lazy to make that work.) - -You could do something similar for mfpguide.tex (but that, too, would be -daft): - - pdflatex mfpguide (produces guide.mp) - mpost guide.mp (creates guide.1, guide.2, etc.) - pdflatex mfpguide (includes figures, which changes pagination) - pdflatex mfpguide (All resolved) - -This relies on mfpic so you should probably wait to do that until after -you are accustomed to that process. (And then take a cold shower until -this compulsion passes.) It also leaves a few dozen files guide.*, which -you will want to delete. - -And finally, if you forgot: - - ************************************** - !! UPDATE THE TeX FILENAME DATABASE !! - ************************************** +like, the paper size option in the \documentclass command in +mfpic-doc.tex. (The document uses Times for the main font family, +LuxiMono for a typewriter font, and CMSS for a sans serif font. Packages +mathptmx amd luximono are required.) Then run + pdflatex mfpic-doc +three times. Make sure lcheadings.ist is where makeindex can find it +and run + makeindex -s lcheadings.ist -o mfpic-doc.ind mfpic-doc.idx +Then + pdflatex mfpic-doc +at least 2 more times. + +You could do something similar for mfpguide.tex: + pdflatex mfpguide + mpost guide.mp + pdflatex mfpguide + pdflatex mfpguide +This relies on the mfpic package itself. \sig Dan Luecking (luecking at uark dot edu) diff --git a/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist b/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist index c9873b1de04..145317b8b11 100644 --- a/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist +++ b/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist @@ -1,8 +1,11 @@ % File: lcheadings.ist -% A part of mfpic 1.06 2011/03/08 -% -% Generic lowercase headings +% A part of mfpic 1.10 2012/12/03 % +%% Generic headings. The macros \headingprefix and \headingsuffix must +%% be defined in the document or in a package that it uses. +%% heading_prefix "\n\\headingprefix{" heading_suffix "}\\headingsuffix\n" headings_flag -1 +%% headings_flag = +/-1 turns on headings. Positive for uppercase, +%% negative for lowercase. diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf Binary files differindex 69d9f311eec..3422bfacc10 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf +++ b/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex b/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex index 1e7504e9efc..6d79fc79df6 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex +++ b/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex @@ -1,5 +1,5 @@ % File: mfpcard.tex -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % % (Ask your driver to print so that longer dimension is horizontal.) \newdimen\paperlongside @@ -199,9 +199,9 @@ \title{MFPIC Quick Reference} -\centerline{(Copyright 2000--2011 by Daniel Luecking)} +\centerline{(Copyright 2000--2012 by Daniel Luecking)} \medskip -This information was prepared for version 1.06 of \prog{mfpic}. +This information was prepared for version 1.10 of \prog{mfpic}. \section{Preamble commands} @@ -484,6 +484,12 @@ These filling prefixes turn off automatic drawing of the curve. \describe{} {\cs{hatch} $=$ \cs{xhatch}} \describe{Shading} {\cs{shade}\oarg{\meta{space}}$\ldots$} +\describe{Gradients$^{\dag}$} + {\cs{gradient}\marg{\meta{clr},\meta{width},\meta{angle}}$\ldots$} +\describe{} + {\cs{areagradient}\marg{\meta{clr},\meta{h-wd},\meta{v-wd}}$\ldots$} +\describe{} + {\cs{radialgradient}\marg{\meta{clr},\meta{wd},\meta{center}}$\ldots$} \describe{Polkadot fill}{\cs{polkadot}\oarg{\meta{space}}$\ldots$} \describe{Fill with copies of a tile} {\cs{tess}\marg{\meta{tile}}$\ldots$} \describe{\quad Define a tile*} @@ -491,11 +497,14 @@ These filling prefixes turn off automatic drawing of the curve. \meta{drawing commands} \cs{endtile}} \smallskip +$^{\dag}$ \meta{clr} is a function that returns a color for parameter(s) +in $(0,1)$.\brk * Creates a mini-mfpic, clipped if \meta{clip}${}={}${\tt true}. \subsection{Storing and reusing a path} \describe{Store a path} {\cs{store}\marg{\meta{name}}$\ldots$} +\nobreak \describe{\quad reusing a stored path} {\cs{mfobj}\marg{\meta{name}}} \subsection{Subpaths} diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty index 8814c8c89ff..405a80fe071 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty +++ b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty @@ -1,11 +1,10 @@ % File: mfpdoc.sty -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % -\ProvidesPackage{mfpdoc}[2011/03/08 v1.06 macros for mfpic documentation] -\newcommand\mfpversion{1.06} -\newcommand\mfpicversion{106} -\newcommand\mfpfiledate {2011/03/08} - +\ProvidesPackage{mfpdoc}[2012/12/03 v1.10 macros for mfpic documentation] +\newcommand\mfpversion{1.10} +\newcommand\mfpicversion{110} +\newcommand\mfpfiledate {2012/12/03} \newif\if@chapters \@chaptersfalse \DeclareOption{chapters}{\@chapterstrue} @@ -35,10 +34,10 @@ \advance\topmargin-\headheight \advance\topmargin-\headsep +\ifpdf % These two are now defaults in TeX Live: % \pdfminorversion 5 % \pdfobjcompresslevel 2 -\ifpdf \pdfpageheight\paperheight \pdfpagewidth\paperwidth \def\mfpHyOpts{% @@ -70,7 +69,6 @@ {-1ex\@plus -.2ex \@minus -.1ex}% {.4ex \@plus .1ex}% {\normalfont\itshape\raggedright}} - % % To allow \chapter command in article class, load this package with % [chapters] option @@ -103,9 +101,6 @@ }% \vskip 1em\relax} -\def\mfpindexheading{} -\def\mfpindexpagemarks{} - \def\@listi{\leftmargin\leftmargini \parsep \z@ \@plus\p@ \@minus\z@ \topsep 1ex \@plus.2ex \@minus 1ex @@ -120,7 +115,7 @@ \def\mfpindexheading{} \def\mfpindexpagemarks{} -% If *headings.ist is used we need these: +% If lcheadings.ist or ucheadings.ist is used we need these: \def\headingprefix#1{\textbf{#1}} \def\headingsuffix{\par\nobreak\smallskip} @@ -180,8 +175,21 @@ \def\pdfLaTeX{pdf\kern.06em\LaTeX} \def\ConTeXt{Con\kern-.16em \TeX \kern-0.06em t} \def\eTeX{e\kern-.10em \TeX} + \def\LMcal{\fontencoding{OMS}\fontfamily{lmsy}\selectfont} \def\CMcal{\fontencoding{OMS}\fontfamily{cmsy}\selectfont} - \def\AmSTeX{{\CMcal A\kern-.1667em\lower.5ex\hbox{M}\kern-.125em S}-\TeX} +% +% Use CM mathcal for AMS logo +% \def\AmSTeX{{\CMcal A\kern-.1667em\lower.5ex\hbox{M}\kern-.125em S}-\TeX} +% +% Use whatever is default for \mathcal: +% \def\AmSTeX{% +% $\mathcal{A}\kern-.1667em +% \lower.5ex +% \hbox{$\mathcal{M}$}\kern-.125em +% \mathcal{S}$-\TeX} +% +% Use LM mathcal for AMS logo + \def\AmSTeX{{\LMcal A\kern-.1667em\lower.5ex\hbox{M}\kern-.125em S}-\TeX} \def\PiCTeX{P\kern-.06em\lower.4ex\hbox{I}\kern-.075emC\kern-.06em\TeX} \else \def\TeX {\textsc{TeX}} @@ -212,14 +220,24 @@ %% font commands \def\mytt#1{\relax - \ifmmode \mathtt{#1} - \else {\upshape\ttfamily#1}\fi} + \ifmmode + \mathtt{#1}% + \else + {\upshape\ttfamily#1}% + \fi +} \def\mfc{% % Metafont/Post code \begingroup \ttfamily\catcode`\_=12 \grabit } \def\grabit#1{#1\endgroup} -\def\_{{\upshape\ttfamily\char`\_}} +% like \mfc, but no line breaks +\def\codebox{% + \hbox\bgroup + \ttfamily\catcode`\_=12 \boxgrabit +} +\def\boxgrabit#1{#1\egroup} +\def\_{\mytt{\char`\_}} \def\prog#1{{\mdseries\scshape#1}} % programs, packages \let\file\mytt % filenames \def\opt#1{{\upshape\sffamily#1}} % package options @@ -228,7 +246,7 @@ \let\email\file % email addresses \let\mail \file % (ditto) \let\dim \file % TeX and Metafont dimensions -\let\kw \opt % MF key words, e.g., numeric +\let\kw \opt % MF key word like numeric %% TeX code %%%%%%%%%%%%%%% { @@ -254,7 +272,7 @@ \let\@mkboth\markboth \def\sectionmark##1{\thispagestyle{plain}} \def\subsectionmark##1{% - \markright {\thesection\quad##1}}% + \markright {\thesubsection\enspace##1}}% \def\subsubsectionmark##1{}} \if@chapters @@ -264,7 +282,7 @@ \@starttoc{toc}\clearpage\pagenumbering{arabic}} \fi -%% figures (none so far): +%% figures: \@fptop=-\@fpsep \@addtoreset{figure}{section} diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf Binary files differindex 677cda5f652..65f2568ddcc 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf +++ b/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex index c25b22ba7e4..01cba684717 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex +++ b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex @@ -1,5 +1,5 @@ % File: mfpguide.tex -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % % Tutorial on mfpic \documentclass[letterpaper]{article} @@ -17,26 +17,28 @@ \else \usepackage[dvips,final]{graphics} \fi + \usepackage[metapost]{mfpic} \opengraphsfile{guide} + \dotsize1pt \ifpdf \expandafter\usepackage\expandafter - [\mfpHyOpts]{hyperref} + [\mfpHyOpts,plainpages=false,naturalnames=true]{hyperref} \expandafter\pdfstringdefDisableCommands\expandafter {\mfpHyDisable} + \fi \def\theHfigure{\thefigure} +\begin{document} + \title{\Mfp: A Short Introduction} -\author{Daniel H. Luecking\thanks{Copyright 2003--2011, Daniel H. -Luecking (luecking at uark dot edu)}} +\author{Daniel H. Luecking\thanks{luecking at uark dot edu}} \date{\mfpfiledate} -\begin{document} - \maketitle \tableofcontents @@ -100,17 +102,17 @@ close to figure~\ref{fig1}. \end{mfpic} \end{mfpfig} -What can go wrong? According to Murphy's Law: anything. If \mfp{} is -not properly installed, one could obtain messages of files not found. If +What can go wrong? According to Murphy's Law: anything. If \mfp{} is not +properly installed, one could obtain messages of files not found. If that happens, determine (from your \TeX{} system's documentation) where -\TeX{} input files should go and make sure that \file{mfpic.tex} and -\file{mfpic.sty} reside there. Similarly, find out where \MP{} inputs -should go and make sure that \file{grafbase.mp} and \file{dvipsnam.mp} -reside there. Then run whatever command your \TeX{} system might require -to ``update the filename database''. You may safely ignore the message -from \mfp{} itself that \file{myfigs.1} is not found (on the first run -of \pdfLaTeX). This file should be created only after running -\texttt{mpost}. +\TeX{} input files should go and make sure that \file{mfpic.sty}, +\file{mfpic.tex} and \file{mfpicdef.tex} reside there. Similarly, find +out where \MP{} inputs should go and make sure that \file{grafbase.mp} +and \file{dvipsnam.mp} reside there. Then run whatever command your +\TeX{} system might require to ``update the filename database''. You may +safely ignore the message from \mfp{} itself that \file{myfigs.1} is not +found (on the first run of \pdfLaTeX). This file should be created only +after running \texttt{mpost}. If you get an error message from \LaTeX{}, carefully check your typing. Also check whether an older version of \mfp{} might have been used @@ -149,7 +151,7 @@ to be sure of seeing the changes. One thing you might notice about figure~\ref{fig1} is that the ellipse is positioned quite a bit above the base line of the text. This is because \mfp{} reserves the amount of space specified in the arguments -of the \env{mfpic} environment. These arguments are +of the \env{mfpic} environment. These arguments were \verb$[72]{-1}{1}{-1}{1}$, which means that each unit in the picture is 72 times the value of \cs{mfpicunit}, that is, about one inch. The first pair of mandatory arguments, \verb${-1}{1}$, indicate the @@ -413,8 +415,8 @@ also takes an optional argument: the number of degrees to rotate the ellipse. Here we list some of the more common such figures. Remember that all of them will produce some sort of line drawing if used alone. They can be preceded by \verb$\dashed$ to make the lines dashed or -\verb$dotted$ to make them dotted. If the figure is a closed curve, -\verb$\gfill$ will fill them in. +\verb$\dotted$ to make them dotted. If the figure is a closed curve, +\verb$\gfill$ will fill it in. \begin{verbatim} \begin{mfpic}[72]{0}{4}{0}{1} \rect{(0,0),(1,.75)} @@ -431,7 +433,7 @@ Other possibilities are a three-point form (option \texttt{[t]}), a polar form (option \texttt{[p]}), and a center-point-sweep form (option \texttt{[c]}, specify a center, starting point, and angle). See the manual for details. The default (what would be assumed if no optional -argument is given) is \oarg{s} and is called the point-sweep form. +argument is given) is \oarg{s} and is called the ``point-sweep'' form. \begin{mfpfig}{fig11} \begin{mfpic}[72]{0}{4}{0}{1} \rect{(0,0),(1,.75)} @@ -788,7 +790,7 @@ This illustrates another property of \mfp{} macros: the combination of a rendering prefix and a figure is also treated the same as a figure in its own right: the same figure as the one that follows. In fact, the only difference between \cs{rect} and \cs{draw}\cs{rect} in this -example is that the second one has a minor (!) side effect: the +example is that the second one has a minor(!) side effect: the rectangle is drawn. Finally, try to guess what happens if we add another prefix at the @@ -1151,7 +1153,7 @@ Anyway, here are a few examples, illustrating the use of \cs{arrow}, and some of its optional arguments. \begin{verbatim} \begin{mfpic}{0}{4}{0}{4} - \arrow[r5]\circle{(1,1),.5} + \arrow[r-5]\circle{(1,1),.5} \arrow[b4pt]\arrow\polyline{(3,2),(3,0)} \arrow[cred]\reverse\arrow\polyline{(0,3),(2,3)} \arrow[l 5pt]\rect{(4,2),(2,4)} @@ -1161,7 +1163,7 @@ See figure~\ref{fig31} for the results of this example. There are four possible optional arguments, the first character inside the brackets tells what option the rest of the argument applies to. The first example above starts with `\texttt{r}', which stands for `rotate' and asks for -the arrowhead to be rotated 5 degrees (positive rotation means +the arrowhead to be rotated $-5$ degrees (positive rotation means anticlockwise, negative means clockwise). This is frequently useful for arrows on curved paths, as the default direction (tangent to the path) often just looks wrong). The second example starts with `\texttt{b}', @@ -1180,7 +1182,7 @@ the arrowhead to 5 points (from the \verb$3pt$ default).% case where it will cause no harm.} \begin{mfpfig}{fig31} \begin{mfpic}{0}{4}{0}{4} - \arrow[r5]\circle{(1,1),.5} + \arrow[r-5]\circle{(1,1),.5} \arrow[b4pt]\arrow\polyline{(3,2),(3,0)} \arrow[cred]\reverse\arrow\polyline{(0,3),(2,3)} \arrow[l 5pt]\rect{(4,2),(2,4)} @@ -1407,20 +1409,24 @@ Here's an example comparing the two smooth methods (figure~\ref{fig34}). A word about the labels: we turned off \opt{mplabels} with the command \verb$\nomplabels$, because we used a command (\verb$\cs$) defined for this document and not known to basic \TeX{} or \LaTeX. The labels -therefore are position by \LaTeX{} while it assembles this document, +therefore are positioned by \LaTeX{} while it assembles this document, instead of by \MP{} which would call a separate instance of \TeX{} or \LaTeX{} where \cs{cs} was unknown. We could have kept \opt{mplabels}, provided we had used \verb$\mfpverbtex$ to write the appropriate \LaTeX{} preamble to the \file{.mp} output. It would need to be some subset of the preamble of this document. -\chapter{Appendices} + +\chapter*{Appendices} +\addcontentsline{toc}{section}{Appendices} In addition to \pdfLaTeX, \Mfp{} works with plain \pdfTeX, \LaTeX, and plain \TeX{}. Instead of \MP{} as the figure processor, \MF{} can also be used. Let's start with the difference between using \mfp{} in a plain~\TeX{} document and using it in a \LaTeX{} document. +\renewcommand\thesubsection{\Alph{subsection}} + \section{\Mfp{} in plain \TeX} Here is a sample plain \pdfTeX{} document with results the same as our @@ -1433,7 +1439,7 @@ first ``Hello, world'' example. Let's call this file \file{plfirst} \mfpic[72]{-1}{1}{-1}{1} \ellipse{(0,0),1,.5} \endmfpic - \closegraphsfile +\closegraphsfile \end \end{verbatim} The main difference is the lack of \LaTeX{} commands. The crucial diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf Binary files differindex 03c8f7a498b..58105a908d1 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf +++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex index f4aeb3a2ff4..603a98e59d0 100644 --- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex +++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex @@ -1,5 +1,5 @@ % File: mfpic-doc.tex -% A part of mfpic 1.06 2011/03/08 +% A part of mfpic 1.10 2012/12/03 % % Documentation of mfpic macros \documentclass[letterpaper]{article} @@ -12,11 +12,12 @@ \usepackage{mathptmx} \usepackage[scaled]{luximono} \renewcommand\sfdefault{cmss} -\newcommand\sgn{\mathop{\mathrm{sgn}}\nolimits} % Fake chapters (really sections): \usepackage[chapters]{mfpdoc} \pagestyle{mfpdoc} +\newcommand\sgn{\mathop{\mathrm{sgn}}\nolimits} + \usepackage{makeidx} \makeindex @@ -32,7 +33,8 @@ \stepcounter{secnumdepth} \title{\Mfp{}: Pictures in \TeX{}\\ with Metafont and -MetaPost\thanks{Copyright 2002--2011, Daniel H. Luecking}} +MetaPost\thanks{Copywrite 2002--2012, Daniel H. Luecking}} + \author{% Daniel H. Luecking% @@ -56,6 +58,7 @@ Daniel H. Luecking% \chapter{Introduction}\label{introduction} \thispagestyle{plain} + \section{Why?}\label{why} Tom got the idea for \mfp{}% @@ -99,6 +102,7 @@ access them. Consequently, switches (options) have been added to access some of them. When these are used, output files may no longer be compatible with \MF{}. + \section{Who?}\label{author} The original \mfp{} (and still the core of the current version) was written @@ -118,6 +122,7 @@ The addition of \MP{} support was carried out by Dan Luecking around since then, with help from Geoffrey and a few others mentioned in the Acknowledgements. + \section{What?}\label{manifest} See the \file{README} file for a list of files in the distribution and a @@ -130,12 +135,13 @@ to \mfp{}'s capabilities: \file{mfpic.dtx}, \file{mfpic.ins} and \LaTeX{}.\\ \file{grafbase.mf}, required only if \MF{} will be processing figures.\\ - \file{grafbase.mp} and \file{dvipsnam.mp}, needed only if \MP{} will - be the processor. + \file{grafbase.mp}, \file{dvipsnam.mp} and \file{mfpicdef.tex}, needed + only if \MP{} will be the processor. \end{display} -The file \file{install.txt} gives some guidance on the proper location for the +The README file also gives some guidence on the proper location for the installation of these files. + \section{How?}\label{process} Some guidance on writing files that contain \mfp{} figures can be found @@ -159,8 +165,8 @@ this.% \footnote{The document \textit{Some experiences on running Metafont and MetaPost}, by Peter Wilson, can be useful for beginners. Fetch \file{CTAN/info/metafp.pdf}. `\file{CTAN}' means the Comprehensive - \TeX{} Archive Network. You can access \file{CTAN} by pointing your - web browser at \url{http://mirror.ctan.org/}\,.}) % + \TeX{} Archive Network. You can find the mirror nearest you by + pointing your browser at \url{http://www.ctan.org/}\,.}) % Typically, you just type \begin{verbatim} mpost pics.mp @@ -284,7 +290,7 @@ handled by \MP{}). \smallskip \emph{Note}: In this manual, when describing \mfp{} operations, we will -often refer to ``\MF{}'' when we really mean ``\MF{} or \MP{}''. This +often refer to `\MF{}' when we really mean ``\MF{} or \MP{}''. This will especially be the case whenever we need to refer to commands in the two languages which are substantially the same, but occasionally we will even talk about ``running \MF{}'' when we mean running one or the other @@ -292,7 +298,7 @@ program \texttt{mf} or \texttt{mpost} to process the figures. If we need to discriminate between the two processors, (for example when they have different behavior) we will make the difference explicit. -A similar shorthand is used when referring to ``\TeX{}''. It should not be +A similar shorthand is used when referring to `\TeX{}'. It should not be taken to mean ``plain \TeX{}'', but rather whatever version of \TeX{} is used to process the source file: plain \TeX{}, \LaTeX{}, \pdfTeX{}, or \pdfLaTeX{}. Also \AmSTeX{}, \prog{eplain} and some other variants. When @@ -319,10 +325,10 @@ options are processed. You can create such a file containing an have as default. Actual options to \cs{usepackage} will override these defaults, of course. And so will any of the commands below. -Finally, if a file named \file{mfpic.usr} can be found, it will be input at the -end of the loading of \mfp{}. The user can create such a file containing -any of the commands of this section that he would like to have as -default, plus any other \TeX{} code. +Finally, if a file named \file{mfpic.usr} can be found, it will be input +at the end of the loading of \mfp{}. The user can create such a file +containing any of the commands of this section that he would like to +have as default, plus any other \TeX{} code. \section{\opt{metapost}, \opt{metafont}, \cs{usemetapost}, \cs{usemetafont}.}% @@ -381,6 +387,7 @@ preamble of \LaTeX{} code take care to make sure \MP{} calls \LaTeX{} purpose, or an environmental variable named \texttt{TEX} may be set equal to \texttt{latex} in the command shell of your operating system.). + \section{\opt{overlaylabels}, \cs{overlaylabels}, \cs{nooverlaylabels}.} \label{overlaylabels} \index{overlaylabels@\opt{overlaylabels}}% @@ -413,6 +420,7 @@ subsequent figures, inside a figure they affect all subsequent text in that figure. The commands and option are ignored under the metafont option. + \section{\opt{truebbox}, \cs{usetruebbox}, \cs{notruebbox}.}% \label{truebbox}% \index{truebbox@\opt{truebbox}}% @@ -474,6 +482,7 @@ environment they should come before the \cs{tcaption} command and affect only it, otherwise they affect all subsequent figures. They should not be used in the argument of a \cs{tcaption} command. + \section{\opt{raggedcaptions}, \cs{useraggedcaptions}, \cs{noraggedcaptions}.}\label{raggedcaptions} \index{raggedcaptions@\opt{raggedcaptions}}% @@ -481,17 +490,18 @@ be used in the argument of a \cs{tcaption} command. \index{noraggedcaptions@\cs{noraggedcaptions}} The \opt{raggedcaptions} option causes multiline captions created by -\cs{tcaption} to have raggedright lines. If \opt{centeredcaptions} -is on, both sides will be ragged. The command \cs{noraggedcaptions} -restores the default: all lines except the last justified. The last is -either centered or flush left according to whether -\opt{centeredcaptions} is on or off. +\cs{tcaption} to have all lines ragged\-right. If \opt{centeredcaptions} +is on, both sides will be ragged. This option can be turned off with the +command \cs{noraggedcaptions}. This is the default: to have all lines +except the last justified. The last line is either centered or flush +left according to whether \opt{centeredcaptions} is on or off. The commands can be issued anywhere. If inside an \env{mfpic} environment they should come before the \cs{tcaption} command and affect only it, otherwise they affect all subsequent figures. They should not be used in the argument of a \cs{tcaption} command. + \section{\opt{debug}, \cs{mfpicdebugtrue}, \cs{mfpicdebugfalse}.}\label{debug} \index{debug@\opt{debug}}% @@ -506,6 +516,7 @@ a definition to the command \cs{mfpicdebug} prior to loading. Any definition will work because \prog{mfpic} only checks whether it is defined. + \section{\opt{clearsymbols}, \cs{clearsymbols}, \cs{noclearsymbols}.} \index{clearsymbols@\opt{clearsymbols}}% \index{clearsymbols@\cs{clearsymbols}}% @@ -568,6 +579,7 @@ debugged, some time might be saved (with either \opt{metafont} or \opt{metapost}) by not writing the output file again, then \opt{nowrite} can be used. + \section{\opt{mfpreadlog}, \cs{mfpreadlog}.}\label{readlog} \index{mfpreadlog@\opt{mfpreadlog}}% \index{mfpreadlog@\cs{mfpreadlog}} @@ -644,8 +656,8 @@ only), \kw{path}, \kw{picture} and \kw{boolean}.% is sometimes called the vacuous type, but doesn't allow (or need) variables of this type.} In \MP{} version 1.000, a tenth data type was added, \kw{cmykcolor}, and -the \kw{color} data type can be referred to as `\kw{rgbcolor}' when a -distinction is necessary. +the \kw{color} data type can be referred to as `\kw{rgbcolor}' if one +wants to emphasize the distinction. A \emph{variable} is a symbolic name, which can be a single letter such as \mfc{A}, or a descriptive name like \mfc{origin}. Any sequence of @@ -889,17 +901,17 @@ environment, after which the number is increased by one for each new \env{mfpic} environment. This number is used internally to include the picture. It is also transmitted to the output file where it is used as the argument to a \gbc{beginmfpic} command. In \MF{} this number becomes -the position of the character in the font file, while in \MP{} it is the -extension on the graphic file that is output. The above command tells -\mfp{} to ignore this sequence and number the next \env{mfpic} +the position of the character in the font file, while in \MP{} it is +part of the name of the graphic file that is output. The above command +tells \mfp{} to ignore this sequence and number the next \env{mfpic} figure with \meta{num} (and the one after that $\meta{num}+1$, etc.). It is up to the user to make sure no number is repeated, as no checking is done. Numbers greater than 255 may cause errors, as \TeX{} assumes that -characters are represented by 8-bit numbers. If the first figure is to -be numbered something other than $1$, then, under the \opt{metapost} -option, this command should come before \cs{opengraphsfile}, as that -command checks for the existence of the first numbered figure to -determine if there are figures to be included. +characters are represented by numbers no larger than that. If the first +figure is to be numbered something other than $1$, then, under the +\opt{metapost} option, this command should come before +\cs{opengraphsfile}, as that command checks for the existence of the +first numbered figure to determine if there are figures to be included. \begin{cd}\pagelabel{everymfpic} \cs{everymfpic}\marg{\meta{commands}}\\ @@ -909,11 +921,11 @@ determine if there are figures to be included. \end{cd} These commands store the \meta{commands}. The first arranges for these -commands to be issued first thing in every \env{mfpic} environment and -the second arranges for its commands to be issued as the last thing in -every such environment. These could be any commands that make sense -inside that environment. Their purpose is mainly to save typing if there -is identical setup being performed in every picture. +commands to be issued at the start of every \env{mfpic} environment and +the second arranges for its commands to be issued at the end of every +such environment. These could be any commands that make sense inside +that environment. The purpose of these commands is to save typing if +there is identical setup being performed in every picture. \begin{cd}\pagelabel{envusage} \cs{begin}\marg{mfpic}\texttt{...}\cs{end}\marg{mfpic}% @@ -927,19 +939,21 @@ with \mfp{} illustrates this use of an \env{mfpic} environment in \LaTeX{}. \medskip -A word about \TeX{} groups inside \env{mfpic} environments. These can be -useful to limit the scope of declarations or of changes to some -variables. However, they do not limit the scope of changes to the figure -file that is being written, so there is a danger that \TeX{} and \MF{} -will have different values. There are also some \mfp{} command that need -to be at the outermost level. Thus, grouping should generaly be avoided -except for those groups provided by \mfp{} commands. +One should be careful using \TeX{} groups inside \env{mfpic} +environments. These can be useful to limit the scope of declarations or +of changes to some variables. However, they do not limit the scope of +changes to the figure file that is being written, so there is a danger +that \TeX{} and \MF{} will have different values. There are also some +\mfp{} commands that need to be at the outermost level. Thus, grouping +should generally be avoided except for those groups provided by \mfp{} +commands. \medskip For the remainder of the macros, the numerical parameters are expressed in graph units, the units of the local coordinate system specified by \cs{mfpic}, unless otherwise indicated. + \section{Common objects.}\label{figures} The \mfp{} macros that draw things can be roughly divided into two @@ -1028,7 +1042,7 @@ are: \gbc{SolidSquare}\index{SolidSquare@\gbc{SolidSquare}}, \gbc{SolidTriangle}\index{SolidTriangle@\gbc{SolidTriangle}}, \gbc{SolidStar}\index{SolidStar@\gbc{SolidStar}}, - \gbc{Cross}\index{Cross@\gbc{Cross}} and + \gbc{Cross}\index{Cross@\gbc{Cross}}, and \gbc{Plus}\index{Plus@\gbc{Plus}}. \end{display} The names should be self-explanatory, the `\gbc{Solid}' ones are filled @@ -1093,7 +1107,7 @@ example, after the command \cs{pointdef}\marg{A}\texttt{(1,3)}, \cs{A} expands to \texttt{(1,3)}, while \cs{Ax} and \cs{Ay} expand to \texttt{1} and \texttt{3}, respectively. If \opt{mplabels} is in effect one can use \cs{A} to specify where to place a text label, but if \TeX{} -is placing labels one must use \texttt{ (\cs{Ax},\cs{Ay})}. In most +is placing labels one must use \texttt{(\cs{Ax},\cs{Ay})}. In most other cases, one can use \cs{A} where a pair or point is required. \begin{cd}\pagelabel{polyline} @@ -1131,15 +1145,15 @@ diagonally opposite corners. The same rectangle can be specified in four different ways: either pair of opposite corners in either order. It is occasionally helpful to know that connected paths like those -produced by \cs{polyline} or \cs{rect} have a \emph{start} and an -\emph{end} as well as \emph{sense} (or direction). The path produced by -\cs{polyline} starts at the first listed point and ends at last, having -the direction determined by the order of the points. For \cs{rect} the -sense may be clockwise or anticlockwise depending on the corners used: -it starts by moving horizontally from the first listed point. -Several \mfp{} macros (such as those that add arrowheads) treat the -beginning and the end of a path differently, or adjust their behavior -according to the sense of the curve. +produced by \cs{polyline} or \cs{rect} have a \emph{start} and a +\emph{finish} as well as \emph{sense} (or direction). The path produced +by \cs{polyline} starts at the first listed point and ends at last, +having the direction determined by the order of the points. For +\cs{rect} the sense may be clockwise or anticlockwise depending on the +corners used: it starts by moving horizontally from the first listed +point. Several \mfp{} macros (such as those that add arrowheads) treat +the beginning and the end of a path differently, or adjust their +behavior according to the sense of the curve. \begin{cd}\pagelabel{regpolygon} \cs{regpolygon}\marg{\meta{num}}\marg{\meta{name}}% @@ -1400,14 +1414,15 @@ value. The last two commands are abbreviations for \cs{setaxismarks}\marg{x}\marg{\meta{pos}} and \cs{setaxismarks}\marg{y}\marg{\meta{pos}}, respectively. -Not all combinations make sense (for example, \texttt{ontop} for the -right side axis). In these cases, no error message is produced: -\gbc{ontop} and \gbc{onleft} give the same results, as do \gbc{onbottom} -and \gbc{onright}. The parameters \gbc{inside} and \gbc{outside} make no -sense for the $x$- and $y$-axes, but if they are used then \gbc{inside} -means \gbc{ontop} for the $x$-axis and \gbc{onright} for the $y$-axis. -These words are actually \MF{} numeric variables and the variables -\gbc{ontop} and \gbc{onleft}, for example, have the same value. +Not all combinations make sense (for example, \gbc{ontop} for the right +side axis). In these cases, no error message is produced. These words +are actually \MF{} numeric variables and the variables \gbc{ontop} and +\gbc{onleft}, for example, have the same value. Thus, using \gbc{ontop} +for the right axis will have the same effect as \gbc{onleft}. Similarly, +\gbc{onright} and \gbc{onbottom} are the same. The parameters +\gbc{inside} and \gbc{outside} usually make no sense for the $x$- and +$y$-axes, but if they are used then \gbc{inside} means \gbc{ontop} for +the $x$-axis and \gbc{onright} for the $y$-axis. \begin{cd}\pagelabel{grid} \cs{grid}\oarg{\meta{size}}\marg{\meta{xsep},\meta{ysep}}\\ @@ -1535,7 +1550,7 @@ The following draws a rotational field, omitting the inside of the circle of radius $1$, where the arrows would be excessively long, and especially avoiding $(0,0)$ where the vector field is undefined. \begin{verbatim} -\vectorfield[2.5pt]{.25,.25}{.5*(-y,x)/(x**2 + y**2)}{x**2 + y**2 >= 1} +\vectorfield[2.5pt]{.25,.25}{.5*(-y,x)/(x**2+y**2)}{x**2+y**2 >= 1} \end{verbatim} The following is the same field, represented by arrows whose locations are regularly spaced in polar coordinates. @@ -1665,7 +1680,7 @@ increased by $180$ degrees \item[\oarg{a}] The alternative polar form differs from the polar form above only in the order of the arguments. This seems (to me) a more reasonable order, and matches the order \cs{sector} requires (see below). -The p option is retained for backward compatibility. +The \texttt{[p]} option is retained for backward compatibility. \item[\oarg{c}] The \textit{center-point-angle form} draws the circular arc with center \meta{$c$}, starting at the point \meta{$p_1$}, and @@ -1682,16 +1697,16 @@ form. \item[\oarg{r}] The \textit{point-radius form} draws an arc on the circle that \cs{circle}\oarg{r} would produce. The arc starts at the point \meta{$p_0$} and ends at \meta{$p_1$}. Of the two possible arcs on -that circle, it produces the shorter one that covers an angle $\theta$ -from $0$ to $180$ degrees measured anticlockwise around the center -of the circle. A negative radius is a mathematical error, but the result -is the short arc on the other circle with a clockwise sense. - -\item[\oarg{q}] The \textit{alternative point-radius form} is the same as -\oarg{r} except it produces the longer arc, that covers an angle -$\theta$ between $180$ and $360$ degrees measured anticlockwise around -the center of the circle. A negative radius is a mathematical error, but -the result is the longer arc on the other circle with a clockwise sense. +that circle, it produces the shorter one: the one with an angle $\theta$ +less than $180$ degrees measured anticlockwise around the center of the +circle. A negative radius is a mathematical error, but the result is the +short arc on the other circle with a clockwise sense. + +\item[\oarg{q}] The \textit{alternative point-radius form} is the same +as \oarg{r} except it produces the longer arc: the one with angle +$\theta$ larger than $180$ degrees measured anticlockwise around the +center of the circle. A negative radius is a mathematical error, but the +result is the longer arc on the other circle with a clockwise sense. \end{description} For both options \oarg{r} and \oarg{q} the angle is computed and then @@ -1727,9 +1742,33 @@ ellipse by \meta{$\theta$} degrees anticlockwise around its center. Ellipses may also be created by differentially scaling a circle and perhaps rotating the result. See subsection~\ref{transformation}. - -When dealing with arcs and circles, it is useful to work in polar -coordinates: +\begin{cd}\pagelabel{fullellipse} +\cs{fullellipse}\marg{\meta{$C$},\meta{$M_1$},\meta{$M_2$}}\\% +\cs{halfellipse}\marg{\meta{$M_1$},\meta{$M_2$},\meta{$M_3$}}\\% +\cs{quarterellipse}\marg{\meta{$M_1$},\meta{$A$},\meta{$M_2$}}% +\index{fullellipse@\cs{fullellipse}}% +\index{halfellipse@\cs{halfellipse}}% +\index{quarterellipse@\cs{quarterellipse}}% +\end{cd} + +For any parallelogram there is a unique ellipse incribed in it which is +tangent to the sides at their midpoints. The above allows one to obtain +that ellipse and parts of it. The input to \cs{fullellipse} is the +center \meta{$C$} of that parallelogram and the midpoints \meta{$M_1$} +and \meta{$M_2$} of two adjacent sides. For $\cs{halfellipse}$, one +supplies the midpoints \meta{$M_1$}, \meta{$M_2$}, and \meta{$M_3$} of +three successive sides. Lastly, \cs{quarterellipse} requires the +midpoints of two adjacents sides and the corner \meta{$A$} between them. +Internally, a quarter-circle is transformed to produce the +quarter-ellipse and the other two are built up out of two or four such +quarter-ellipses. + +The reasoning behind my choice of parameters is based on the anticipated +use of these commands. For example, I wanted \cs{quarterellipse} to be +used to round a corner represented by the three points $M_1$, +$A$ and $M_2$. In order for the quarter-ellipse to have +the same direction at $M_1$ and $M_2$ as the polygon $M_1AM_2$, the +associated parallelogram has to have midpoints at $M_1$ and $M_2$. \begin{cd}\pagelabel{plr} \cs{plr}\marg{(\meta{$r_0$},\meta{$\theta_0$}),% @@ -1737,13 +1776,14 @@ coordinates: \index{plr@\cs{plr}}% \end{cd} -The macro \cs{plr} causes \MF{} to replace the specified list of polar -coordinate pairs by the equivalent list of rectangular (cartesian) -coordinate pairs. Through \cs{plr}, commands designed for rectangular -coordinates can be applied to data represented in polar coordinates. It -must be cautioned that this wholesale conversion of a list applies only -to commands that take a list consisting of an arbitrary number of -points, such as \cs{polyline}. +When dealing with arcs and circles, it is useful to work in polar +coordinates. The macro \cs{plr} causes \MF{} to replace the specified +list of polar coordinate pairs by the equivalent list of rectangular +(cartesian) coordinate pairs. Through \cs{plr}, commands designed for +rectangular coordinates can be applied to data represented in polar +coordinates. It must be cautioned that this wholesale conversion of a +list applies only to commands that take a list consisting of an +arbitrary number of points, such as \cs{polyline}. The effect of \cs{plr} is to apply a \MF{} command, \gbc{polar}, to each point in the list, producing a new list. This \MF{} command can also be @@ -1775,8 +1815,34 @@ points with positive $y$-coordinate In this case, the \meta{center} must be in the upper half-plane and the \meta{radius} must still be less than $1$. If you are not versed in hyperbolic geometry, be warned that the actual diameter of the resulting circle is on the order of $2y/(1-R)$, -where $R$ is the \meta{radius}. This can be quite large even for modest -values of $R$ and $y$. +where $R$ is the \meta{radius} and $y$ is the $y$-coordinate of +\meta{center}. This can be quite large even for modest values of $R$ and +$y$. + +Finally, an arc-producing macro. This is also related to the hyperbolic +geometry of a disk or a half-plane. The hyperbolic geometry includes a +notion of distance that allow one to determine `shortest' path between +two points. This shortest path is called a `geodesic' and it turns out +(in the case of the upper half-plane or a disk) to be an arc of a +circle: the unique circle that passes through both points and meets the +boundary (of the half-plane or disk) at right angles. + +\begin{cd}\pagelabel{hypergeodesic} +\cs{hypergeodesic}\marg{$z_1$,$z_2$}\\ +\cs{hypergeodesic}*\marg{$z_1$,$z_2$}% +\index{hypergeodesic@\cs{hypergeodesic}}% +\end{cd} + +This produces the hyperbolic geodesic from $z_1=(x_1,y_1)$ to +$z_2=(x_2,y_2)$. For guaranteed results both points should be in the +unit disk (i.e., $|z_1| < 1$ and $|z_2| < 1$) or, for the star form, +both in the upper half-plane (i.e., $y_1 > 0$ and $y_2 > 0$). However, +if these are not satisfied an arc of the circle described above will be +drawn whenever not prevented by a numeric overflow. The star form +produces the geodesic for points in the upper half-plane. The normal +form produces the geodesic for points in the unit disk (inside of the +circle of radius $1$ and center $(0,0)$). One can use transforms of +these to get geodesics suitable for other disks and other half-planes. \subsection{Curves}\label{curves} @@ -1816,6 +1882,7 @@ loaded, but that can be changed with the following command. This sets the default tension for all commands that take an optional tension parameter. +\medskip Sometimes one would like a convex set of points to produce a convex curve. This will not always be the case with \cs{curve} or \cs{cyclic}. You can verify this with the following example, where the list of points @@ -1906,7 +1973,7 @@ it needs to be inside an \env{mfpic} environment. Starting with version 0.9 of \mfp{} this is no longer required, but the command name \cs{mfpbarchart} must be used outside (in case some other package also defines \cs{barchart}). One can use any of the four synonyms listed that -start with `\cs{mfp}'. The command to draw the bars is still required to +start with `\cs{mfp}'. The commands to draw the bars are still required to be inside an \env{mfpic} environment. \meta{h-or-v} should be \texttt{v} if you want the ends of the bars to @@ -1933,7 +2000,7 @@ reverse them by making \meta{sep} negative, and making \meta{start} the top edge of the first bar. The fraction \meta{r} should be between $-1$ and $1$. A negative value -reverses the direction from the `leading edge' of the bar to the +reverses the direction from the ``leading edge'' of the bar to the `trailing edge'. For example, if one bar chart is created with \begin{ex} \cs{barchart}\oarg{1,1,-.4}\marg{h}\marg{$\ldots$} @@ -2018,6 +2085,27 @@ then the absolute coordinates \texttt{(\meta{x},\meta{y})} in the graph where the point of the wedge should be placed. +\subsection{Braces} + +This figure is intended to group some graphical objects and label them. + +\begin{cd}\pagelabel{gbrace} +\cs{gbrace}\marg{\meta{$z_1$},\meta{C},\meta{$z_2$}}% +\index{grbace@\cs{gbrace}}% +\end{cd} + +This figure macro creates the shape of a brace (i.e., a `$\}$') with its +ends at \meta{$z_1$} and \meta{$z_2$} and its `center' cusp at +\meta{C}. The three points must be expressed as ordered pairs or as +\MF{} pair expressions, and must be separated by commas. The `width' of +the brace (the distance from \meta{C} to the line through the other +two points) is computed automatically and should not be $0$. The cusp of +the brace will not necessarily be in the center of the brace. Users +position it with their choice of \meta{C}. The cusp should not be +positioned too close to one of the endpoints as this can distort the +brace. + + \section{Colors in \mfp{}.}\label{colors} \subsection{\CMP{} color functions}\label{mpcolors} @@ -2053,9 +2141,9 @@ numeric: $0$ for black, $1$ for white). All the names in the \LaTeX{} \prog{color} package's \file{dvipsnam.def} have also been predefined by \mfp{} as color variable names. Since \MP{} -allows color expressions, colors may be added (as long as they are the -same type) and multiplied by numerics. Multiplication by a number -between $0$ and $1$ darkens a \kw{rgbcolor}, but lightens a +allows color expressions, colors may be added together (as long as they +are the same type) and multiplied by numerics. Multiplication by a +number between $0$ and $1$ darkens a \kw{rgbcolor}, but lightens a \kw{cmykcolor}. Moreover, several \MP{} color functions have been defined in @@ -2162,8 +2250,8 @@ returns either that number (recent \MP) or that multiple of \mfc{white} (early \MP). In \MF{}, all three pass the (presumably numeric) argument \meta{clr} unchanged. -All three functions return some kind of black if \meta{clr} is not some -kind of color, or has an unknown value. +All three functions return some version of black if \meta{clr} is not a +color of some type, or has an unknown value. \subsection{Establishing \mfp{} default colors}\label{defaultcolors} @@ -2185,6 +2273,7 @@ kind of color, or has an unknown value. \index{backgroundcolor@\cs{backgroundcolor}}% \end{cd} + These macros set the default color for various drawing elements. Any curve (with one exception, those drawn by \cs{plotdata}), whether solid, dashed, dotted, or plotted in symbols, will be in the color set by @@ -2264,10 +2353,10 @@ The mandatory \meta{model} and \meta{colorspec} are as above. \medskip A final caution, the colors of an \mfp{} figure are stored in the \file{.mp} output file, and are not related to colors used or defined by -the \LaTeX{} \prog{color} package. In particular a color defined only by -\LaTeX{}'s \cs{definecolor} command will remain unknown to \mfp{}. -Conversely, \LaTeX{} commands will not recognize any color defined only -by \cs{mfpdefinecolor}. +any \LaTeX{} package (such as \prog{color} or \prog{xcolor}). In +particular a color defined only by \LaTeX{}'s \cs{definecolor} command +will remain unknown to \mfp{}. Conversely, \LaTeX{} commands will not +recognize any color defined only by \cs{mfpdefinecolor}. \subsection{\CMF{} colors}\label{MFcolor} @@ -2343,7 +2432,7 @@ useful for understanding the \mfp{} system. appending macros (see next), they invoke a default rendering of the path (usually a drawing as a solid stroke) as the side effect. -\item[Apending macros] These\index{prefix macro} pass their input +\item[Appending macros] These\index{prefix macro} pass their input unchanged as their output. Their side effect is the appending of some object such as an arrow head or tail. Currently only the various prefix macros whose names begin with \texttt{arrow} are @@ -2368,6 +2457,7 @@ useful for understanding the \mfp{} system. \end{description} + \subsection{Closure of paths}\label{closure} It should be pointed out that the closure macros will leave already @@ -2437,16 +2527,20 @@ circle through those three points. \label{reversal} \begin{cd}\pagelabel{reverse} -\cs{reverse}$\ldots$% +\cs{reverse}$\ldots$\\ +\cs{reversepath}\ldots% \index{reverse@\cs{reverse}} +\index{reversepath@\cs{reversepath}} \end{cd} This modifies the following path by reversing its sense. This will affect the direction of arrows: bi-directional arrows can be coded with \cs{arrow}\cs{reverse}\cs{arrow}$\ldots$, where the leftmost \cs{arrow} prefix applies to the \emph{reversed} path. The order of endpoints for -the following \env{connect} environment will also be affected. - +a \env{connect} environment will also be affected. The command +\cs{reversepath} is exactly the same. It has been added (in vresion 1.10) to +more closely match the names of other modification macros (see +subsection~\ref{transformation}). \begin{cd}\pagelabel{connect} \cs{connect} $\ldots$ \cs{endconnect}% @@ -2545,7 +2639,7 @@ produced by \cs{arc}, as in the following example: \ \cs{draw}\oarg{red}\cs{partpath}\marg{0,.333}\\ \ \cs{circle}\marg{(0,0),1} \end{ex} -This will draw 1/3 of the circle in red and the rest in blue. +This will draw 1/3 of this circle in red and the rest of it in blue. \CMF{} cannot check if a path is really a circular arc. The \MF{} code, like that of \cs{makesector} (see subsection~\ref{closure}), selects @@ -2556,6 +2650,39 @@ the end of any following path to its beginning (or a straight line if the three chosen points happen to lie in a straight line). However, the result needn't bear any significant relation to the original path. +\begin{cd}\pagelabel{interpolatepath} +\cs{interpolatepath}\marg{\meta{frac},\meta{path1}}\dots +\index{interpolatepath@\cs{interpolatepath}} +\end{cd} + +This modifying macro takes the following path (call it \meta{path0}) and +computes a new path that is \meta{frac} of the way ``between'' it and +the argument \meta{path1}. The argument \meta{path1} would usually be +the name of a \MF{} path variable used to store a figure (see \cs{store} +from subsection~\ref{transformation}). However it can actually be any +legal \MF{} path expression. The argument \meta{frac} is a number. If +\meta{frac} is $0$, nothing is done and the following path \meta{path0} +is produced; if \meta{frac} is $1$, then the argument \meta{path1} is +produced. For values of \meta{frac} between $0$ and $1$ the resulting +path is somewhere between the two. Numbers larger than $1$ or less than +$0$ produce an extrapolated path. An ordered pair can be supplied +instead of the argumant \meta{path1}: it will be interpreted as a +trivial path. If \meta{path0} (the following figure) is closed and if +\meta{path1} is an ordered pair or a closed path, then the resulting +path will also be closed. Otherwise it will not be. + +What this command actually interpolates are the key points of the paths +and the directions of travel at those key points. Therefore, if the two +paths are visually very similar but have very different node structure, +then the interpolated path can be quite unexpectedly different from both +of them. For example +\begin{verbatim} + \store{ABC}\circle{(0,0),1} + \interpolatepath{.5,ABC}\reverse\circle{(0,0),1} +\end{verbatim} +produces a straight line from $(1,0)$ to $(-1,0)$ (and back again). + + \subsection{Arrows}\label{arrows} @@ -2574,7 +2701,7 @@ the value of the \TeX{} dimension \cs{headlen}, initially \dim{3pt}. The optional parameter \meta{rotate} allows the arrowhead to be rotated anticlockwise around its point an angle of \meta{rotate} degrees. The default is 0. The optional parameter \meta{backset} allows the arrowhead -to be `set back' from its original point, thus allowing (for example) +to be ``set back'' from its original point, thus allowing (for example) double arrowheads. This parameter is in the form of a \TeX{} dimension---its default value is \dim{0pt}. If an arrowhead is both rotated and set back, it is set back in the direction after the @@ -2739,6 +2866,7 @@ used to override \mfp{}'s automatic rendering rules. See section~\ref{transformation}, page~\pageref{norenderexample} for an example where one might need to do this. + \subsection{Drawing}\label{drawing} \begin{cd}\pagelabel{draw} @@ -2765,11 +2893,11 @@ separation (distance between centers of the two penstrokes) is twice the pen diameter. This normally leaves one line thickness of white space between. You can change this with the \oarg{\meta{sep}} argument. In order to make the space between the lines transparent, this command is -implemented by calculating two curves that parallel the given curve and -drawing those. For technical reasons, that calculation is rather lengthy -so this is somewhat inefficient and users of slow machines might want to -avoid it. See also comments at \cs{parallelpath} in -subsection~\ref{reversal}. +implemented by calculating two curves that are parallel to the given +curve and drawing those. For technical reasons, that calculation is +rather lengthy so this is somewhat inefficient and users of slow +machines might want to avoid it. See also comments at \cs{parallelpath} +in subsection~\ref{reversal}. \begin{cd}\pagelabel{dashed} \cs{dashed}\oarg{\meta{length},\meta{space}}$\ldots$% @@ -2956,8 +3084,8 @@ path might be open and may need to be explicitly closed, for example by \begin{display} \cs{belowfcn}, \cs{border}, \cs{btwnfcn}, \cs{btwnplrfcn}, \cs{chartbar} (and its aliases),\\ - \cs{circle}, \cs{ellipse}, \cs{levelcurve}, \cs{makesector}, - \cs{piewedge}, \cs{plrregion},\\ + \cs{circle}, \cs{ellipse}, \cs{fullellipse}, \cs{levelcurve}, + \cs{makesector},\cs{piewedge},\\ \cs{plrregion}, \cs{polygon}, \cs{pshcircle}. \cs{rect}, \cs{regpolygon}, \cs{sector}, \cs{tlabelcircle},\\ \cs{tlabelellipse}, \cs{tlabeloval}, and \cs{tlabelrect}. @@ -3075,6 +3203,10 @@ present. However, if one wishes only to override the default color one can use an empty first optional argument (completely empty, no spaces or comma). +An angle of $0$ yields horizontal lines, nonzero angles indicate +rotations from horizontal where, as usual, positive angles indicate +anticlockwise rotation. + \begin{cd}\pagelabel{hatch} \cs{lhatch}\oarg{\meta{hatchsp}}\oarg{\meta{color}}$\ldots$\\ \cs{rhatch}\oarg{\meta{hatchsp}}\oarg{\meta{color}}$\ldots$\\ @@ -3104,10 +3236,112 @@ pattern. It is exactly the same as \cs{rhatch} followed by \cs{lhatch} using the same \meta{hatchsp} and \meta{color}. Hatching should normally be used very sparingly, or never if -alternatives are available (color, shading). However, hatching or -polkadotting on top of another filling macro is almost the only way to -fill in two regions that \emph{automatically} shows the overlap area. -Hatching is at least less garish than polkadots. +alternatives are available (color, shading). However, hatching on top of +another filling macro is a common way to fill in \emph{two} regions in +such a way that the overlap area is clearly evident. Hatching is at +least less garish than polkadots. + +\begin{cd}\pagelabel{gradient} +\cs{gradient}\marg{\meta{clrfcn},\meta{width},\meta{angle}}$\ldots$% +\index{gradient@\cs{gradient}}% +\end{cd} + +Neither \MP{} nor \MF{} can do true gradients, but this rendering macro +obtains a good approximation by filling adjacent narrow strips in a +range of colors. The argument \meta{width} is the width of those strips, +and it should be specified in absolute units, \meta{angle} is the angle +of these strips (horizontal being $0$ degrees). The first argument +takes a little explanation. + +The \meta{clrfcn} should be the name of a function, say \mfc{gr}, +such that \mfc{gr(t)} returns a color\footnote{It can also return a +number between $0$ and $1$, which will result in shades of gray.} for +any value of $t$ from $0$ to $1$ (inclusive). Such a function can be +defined with \cs{fdef} (see subsection~\ref{defining}). The first strip +will have the color returned for \mfc{t}${}=0$ and the last will have +the color returned for \mfc{t}${}=1$. One kind of gradient fill is +obtained by a simple interpolation between two colors in the same model: +\begin{verbatim} +\fdef{gr}{t}{(1-t)*red + t*blue} +\gradient{gr,3pt,45}\circle{(0,0),1} +\end{verbatim} +This example will start the gradient with red and end it with blue. For +an angle of $0$ the starting color is at the bottom and the ending color +at the top, for other angles simply rotate that description. The above +circle will be red at the lower right and blue at the upper left. + +This type of gradient is called an \emph{axial} gradient. The following +is another kind, based on a color function of \emph{two} variables over +an area. + +\begin{cd}\pagelabel{areagradient} +\cs{areagradient}\marg{\meta{clrfcn},\meta{h-dim},\meta{v-dim}}$\ldots$% +\index{areagradient@\cs{areagradient}}% +\end{cd} + +Instead of filling with strips of different colors, \cs{areagradient} +fills with ``pixels'' of different colors. These are rectangles that +have size \meta{h-dim} by \meta{v-dim}, which values must be specified +in absolute units. These rectangles are filled with the color determined +by \meta{clrfcn}. This must be a function of \emph{two} parameters that +returns a color for values of these parameters from $0$ to $1$ +(inclusive). For example, +\begin{verbatim} +\fdef{agr}{t,u}% + {(1-t)(1-u)*white + (1-t)*u*red + t*(1-u)*green + t*u*blue} +\gradient{agr,3pt,4pt}\rect{(0,0),(1,2)} +\end{verbatim} +The color returned for $(0,0)$ is at the lower left and the color +returned for $(1,1)$ is at the upper right. In the above example, the +rectangle will be white at the lower left, red at the upper left, green +at the lower right and blue at the upper right. + +Our last gradient is something like the first, but in polar coordinates. +The colors vary with the distance from a center point. + +\begin{cd}\pagelabel{radialgradient} +\cs{radialgradient}\marg{\meta{clrfcn},\meta{width},\meta{center}}$\ldots$% +\index{radialgradient@\cs{radialgradient}}% +\end{cd} + +This gradient fills with concentric circular strips whose center is +\meta{center} and whose thickness is \meta{width}. The \meta{clrfcn} is +as in \cs{gradient}. The circle of radius \meta{width} and center +\meta{center} is filled with the color returned for parameter value $0$. +The largest concentric circular strip is filled with the color returned +for parameter value $1$. + +These commands all initially compute a bounding figure for the curve. In +the first case it is a rotated rectangle, in the second case an upright +rectangle, and in the third case a circle centered at the given point. +The interiors of the rectangles are considered to have coordinates +$(t,u)$ that vary from $(0,0)$ at the lower left to $(1,1)$ at the upper +right. The inside of the circle is considered to have the polar +coordinate $r$ ranging from $0$ at the center to $1$ at the boundary. +The relevant coordinate(s) are fed to the specified \meta{clrfcn} and +the returned color is used to fill the relevant portion of the rectangle +or circle. The whole picture is then clipped to the boundaries of the +given closed curve and the result added to the picture. + +The process is somewhat wasteful of memory in \MP{}, as each strip or +pixel's path is kept in memory and written to the output file. This can +be quite large for \cs{areagradient} if the pixel dimensions are too +small. For example, covering a one inch square with pixels 1 point on +each side takes over 5000 paths and the resulting EPS is over 100,000 +bytes in size. I would recommend dimensions on the order of 2 to 3 +points. Larger dimensions are not as visually appealing, and smaller +dimensions waste memory with little improvement in appearence. + +This command works in \MF{} using a \meta{clrfcn} that returns numeric +values in the range $0$ to $1$. The result is much like +\cs{gfill}\oarg{\meta{clr}} (see the beginning of this section) except +the dots simulating a gray fill will vary in size corresponding to the +\meta{clrfcn}. The result will be disappointing unless there is +considerable contrast between the lightest and darkest grays of the +gradient. Therefore, it is recommended that the color function cover the +entire range from $0$ to $1$ (black to white). There are no particular +memory problems with gradients in \MF{}, at least no more so than gray +fills. \subsection{Changing the default rendering}\label{default} @@ -3128,15 +3362,15 @@ Initially, \mfp{} uses the \cs{draw} command (stroking) as the default operation when a figure is to be rendered. However, this can be changed to any combination of \mfp{} rendering commands or indeed any \TeX{} commands, by using the \cs{setrender} command. This redefinition is -local inside an \env{mfpic} environment, so it can be enclosed in braces -to restrict its range. Outside an \env{mfpic} environment it is a global -redefinition. +local when it occurs inside an \env{mfpic} environment, so there it can +be enclosed in braces to restrict its range. Outside an \env{mfpic} +environment it is a global redefinition. For example, suppose one uses \cs{setrender}\marg{\cs{dashed}\cs{shade}} in a \env{mfpic} environment. If the command \cs{circle}\marg{(0,0),1} -occurs later, it will produce a shaded circle with a dashed outline. If -an explicit rendering prefix is given in a drawing command, it will -override this default. +occurs later in that environment, it will produce a shaded circle with a +dashed outline. If an explicit rendering prefix is given in a drawing +command, it will override this default. \subsection{Examples}\label{examples} @@ -3167,6 +3401,7 @@ stand for any legal \MF{} expression, in which the only unknown variables are those indicated (\texttt{x} in the first case, and \texttt{t} in the second). + \subsection{Defining functions}\label{defining} \begin{cd}\pagelabel{fdef} @@ -3181,7 +3416,7 @@ the only free parameters are those named. The return type of the function is the same as the type of the expression. What is allowed for the function name \meta{fcn} is more restrictive than \MF{}'s rule for variable names. Roughly speaking, it should consist of letters and -underscore characters only. (In particular, for those that know what +underscore characters only. (In particular, for those who know what this means, the name should have no suffixes.) Try to make the name distinctive to avoid redefining internal \MF{} commands. @@ -3283,9 +3518,10 @@ macros, defining a path to which prefixes may be applied. \index{function@\cs{function}} \end{cd} -This figure macro produces the graph of $y = f(x)$, where $f$ is a \MF{} numeric -function or expression of one numeric argument, which must be denoted by -a literal \texttt{x}. The default \meta{spec} is \texttt{s}. For example +This figure macro produces an approximation to the graph of $y = f(x)$, +where $f$ is a \MF{} numeric function or expression of one numeric +argument, which must be denoted by a literal \texttt{x}. The default +\meta{spec} is \texttt{s}. For example \begin{verbatim} \function{0,pi,pi/10}{sin x} \end{verbatim} @@ -3306,9 +3542,10 @@ argument. This can be a pair of expressions $x(\mathtt{t})$ and $y(\mathtt{t})$ enclosed in parentheses and separated by a comma, with the literal variable \texttt{t}. Alternatively, the last argument can be a \MF{} function or expression in \texttt{t} that returns a pair.% - \footnote{There are very few of these. \CMF{} provides \mfc{dir t}, - which is essentially \mfc{(cosd t, sind t)}. \Mfp{} adds \gbc{cis t} - which is \gbc{(cos t, sin t)}.} + \footnote{There are very few of these. \CMF{} provides + \codebox{dir t}, which is essentially + \codebox{(cosd t, sind t)}. \Mfp{} adds \codebox{cis t} which + is \codebox{(cos t, sin t)}.} The default \meta{spec} is \texttt{s}. For example \begin{verbatim} \parafcn{0,1,.1}{(2t, t+t*t)} @@ -3503,7 +3740,7 @@ but much further apart when measured along the curve. The first of these plots the graph of the solution of the differential equation $$ - \frac{dy}{dx} = f(x,y)\,,\quad y(x_0) = y_0\,. + \frac{dy}{dx} = f(x,y)\,,\quad y(x_0) = y_0\,. $$ The \meta{$\Delta s$} parameter is a step size and the \meta{$N$} parameter is the number of steps. The step size is \emph{not} an @@ -3542,7 +3779,7 @@ $\mathbf{F}(x,y,t)$ by its negative. The purpose of making \meta{$\Delta s$} a distance rather than an $x$-increment or a $t$-increment (as the Runge-Kutta method is taught in -the usual numerical analysis course) is stability: even very simple +the usual mathematics courses) is stability: even very simple differential equations can have graphs the tend to $\infty$ in finite time. These macros, however, never travel more than a distance $N\Delta s$ from the starting point. @@ -3780,6 +4017,12 @@ The command \cs{coloredlines} will produce a warning under the that all curves are drawn in \gbc{drawcolor} by default: the \cs{plotdata} command after \cs{coloredlines} has been issued. +Note that \mfp{} always creates a path internally. It is possible that +your data is not path-like and what you want is a scatter-plot. Simply +use \cs{datapointsonly} and the effect is the same: \MP{} builds a +polygonal path connecting all the points in your file, but when it plots +the path, it only places a dot (or other symbol) at each data point. + If, for some reason, you do not like the default starting line style (say you want to start with a color other than black), you can use one of the following commands. @@ -3815,11 +4058,11 @@ changed: \texttt{dashes}, \texttt{colors} or \texttt{symbols}. The second argument is a list of dash patterns, colors, or symbols. The dash patterns should be names of patterns defined through the use of \cs{dashpattern}. The colors can be any color names already known to -\MP{}, or defined through \cs{mfpdefinecolor}. The symbols can be any of -those listed with the \cs{plotsymbol} command (see -subsection~\ref{points}), or any known \MF{} path variable. The colors -can also be \MP{} color constants or expressions, and the symbols can be -expressions of type path. In recent \MP{} these `colors' can be +\MP{}, or color names defined using \cs{mfpdefinecolor}. +The symbols can be any of those listed with the \cs{plotsymbol} command +(see subsection~\ref{points}), or any known \MF{} path variable. The +colors can also be \MP{} color constants or expressions, and the symbols +can be expressions of type path. In recent \MP{} these `colors' can be \kw{numeric} (selecting gray), \kw{rgbcolor} or \kw{cmykcolor}. Within a \env{mfpic} environment, the changes made are local to that environment. Outside, they affect all subsequent environments. @@ -3844,6 +4087,7 @@ same meaning here (for \cs{plotdata}) as they do for \cs{datafile} (above). The sequence numbering for \cs{sequence} starts over with each new curve. + \section{Labels and Captions.}\label{labels} \subsection{Setting text}\label{text} @@ -4732,6 +4976,7 @@ shifted path: \arrow\norender\shiftpath{(0,1)}\arrow\draw\lines{(0,0),(8,8)} \end{verbatim} + \section{Parameters.}\label{parameters} There are many parameters in \mfp{} which the user can modify to @@ -4961,8 +5206,8 @@ are \dim{0.5pt} and \dim{3pt}. \index{griddotsize@\cs{griddotsize}}% \end{cd} -This dimension gives the default for the sizes of dots in the \cs{grid} -and \cs{plrgridpoints} commands. The initial value is \dim{0.5pt}. +This dimension gives the default sizes of dots in the \cs{grid} and +\cs{plrgridpoints} commands. The initial value is \dim{0.5pt} \begin{cd}\pagelabel{symbolspace} \cs{symbolspace}% @@ -5100,7 +5345,7 @@ required. For the first version, the extra equations give the path zero curvature at the endpoints (a \emph{relaxed} spline). For the closed version, the extra equations are those that close the curve smoothly. The portions of the spline that connect one node to the next are -parametrized cubic B/'eziers, they are computed so that the first and +parametrized cubic B\'eziers, they are computed so that the first and second derivatives (with respect to the parameter) of adjacent curves match at the common node. @@ -5138,6 +5383,7 @@ argument. The corresponding statements are true of \cs{qbclosed}: it is meant to close a quadratic B-spline and \cs{qbclosed}\cs{qspline} should produce the same result as \cs{closedqspline} with the same argument. + \subsection{B\'eziers} The power user, having noticed that \cs{curve} and \cs{cyclic} insert @@ -5213,6 +5459,7 @@ of the control points. Cubic B\'eziers are how curves are represented in PostScript files, and how a number of vector drawing programs represent curves. + \subsection{Raw \MF{} code}\label{mfcode} \begin{cd}\pagelabel{mfsrc} @@ -5256,6 +5503,7 @@ Check out the sample \file{forfun.tex} for a more extensive example. It should produce the word `\textsf{mfpic}' in blue, outlined in green in a box with yellow background. + \subsection{Creating \MF{} variables}\label{variables} \begin{cd}\pagelabel{setmfvariable} @@ -5425,16 +5673,16 @@ the given points in that order. And then \end{verbatim} will draw the lines connecting these four points. The index may optionally be put in square brackets and may be separated from the name -by any number of spaces. That is, \verb$\polyline{X[1],X[2]}$ -and \verb$\polyline{X 1,X 2}$ are the same as \verb$\polyline{X1,X2}$ -to \MF{}. If a numeric \emph{expression} is used instead of an explicit +by any number of spaces. That is, \verb$\polyline{X[1],X[2]}$ and +\verb$\polyline{X 1,X 2}$ are the same as \verb$\polyline{X1,X2}$ to +\MF{}. If a numeric \emph{expression} is used instead of an explicit number, square brackets \emph{must} surround it: \gbc{X[1+1]}, -\gbc{X[2]}, \gbc{X2} and \gbc{X 2} are all the same. For all these array -commands, the variable \gbc{X} by itself (not followed by any digit or -brackets) becomes a numeric variable equal to the number of elements in -the array. Except for \cs{globalsetarray}, the arrays are defined -locally if these commands occur in an \env{mfpic} environment, global -otherwise. +\gbc{X[2]}, \gbc{X2} and \codebox{X 2} are all the same. For all these +array commands, the variable \gbc{X} by itself (not followed by any +digit or brackets) becomes a numeric variable equal to the number of +elements in the array. Except for \cs{globalsetarray}, the arrays are +defined locally if these commands occur in an \env{mfpic} environment, +global otherwise. Array variables may be used only where the values are processed only by \MF{} or \MP{}, they are unknown to \TeX{}. In particular, they cannot be @@ -5497,6 +5745,7 @@ vertical (also change `right' to `top', etc.): had one side on an axis. \end{itemize} + \subsection{Miscelaneous pair expressions}\label{pairexpressions} A useful \MF{} operator that produces points is the intermediation @@ -5505,18 +5754,18 @@ operator, whose syntax is \texttt{(\meta{num})[\meta{$p_1$},\meta{$p_2$}]} \end{cd} That is, a number or numeric expression in parentheses followed by -literal brackets (this is \emph{not} an optional argument) containing two points -or pair expressions separated by a comma. It returns an intermediate point on -the line through \meta{$p_1$} and \meta{$p_2$}. The formula for the -returned value is $p_1 + \mbox{\meta{num}}(p_2 - p_1)$. The midpoint is -obtained with $\mbox{\meta{num}} = .5$. If the \meta{num} is a pure -number, the parentheses can be omitted, but they are required if it is -any other numeric expression. Values of \meta{num} larger than 1 or -less than zero produce points on the line that lie outside the segment -from $p_1$ to $p_2$. This operator can also be applied to numbers or (in -\MP{}) to colors (of the same type). So that \mfc{(2/3)[3,6] = 5} and -\mfc{.7[green,blue] = (0,.3,.7)}. See section~\ref{colors} for a -description of colors in \MP{} and \MF{}. +literal brackets (this is \emph{not} an optional argument) containing +two points or pair expressions separated by a comma. It returns an +intermediate point on the line through \meta{$p_1$} and \meta{$p_2$}. +The formula for the returned value is $p_1 + \mbox{\meta{num}}(p_2 - +p_1)$. The midpoint is obtained with $\mbox{\meta{num}} = .5$. If the +\meta{num} is a pure number, the parentheses can be omitted, but they +are required if it is any other numeric expression. Values of \meta{num} +larger than 1 or less than zero produce points on the line that lie +outside the segment from $p_1$ to $p_2$. This operator can also be +applied to numbers or (in \MP{}) to colors (of the same type). So that +\codebox{(2/3)[3,6] = 5} and \codebox{.7[green,blue] = (0,.3,.7)}. See +section~\ref{colors} for a description of colors in \MP{} and \MF{}. \begin{cd} \gbc{pathpoint(\meta{frac},\meta{name})} @@ -5553,19 +5802,30 @@ complex numbers. Also \gbc{t} denotes an angle in radians. There are both numeric and pair valued functions, the type of each is noted after the description: +\def\Arg{\mathop{\mathrm{Arg}}} + \noindent \begin{tabular}{@{}lp{4.2in}} \gbc{Arg z} & The principle argument of $z$ in radians (numeric).\\ \gbc{Log z} & The principle logarithm of $z$ (pair).\\ \gbc{cis t} & $(\cos t, \sin t)$, same as \gbc{dir degrees(t)} (pair).\\ \gbc{zexp w} & The complex exponential, $e^w$ (pair).\\ -\gbc{sgn z} & The signum, $\sgn (0,0) = (0,0)$ otherwise $\sgn z = z/|z|$ (pair).\\ +\gbc{zsqrt w} & The (principal) complex square root: that $z$ with + $-\pi/2 \le \Arg z \le \pi/2$ and $z^2 = w$ (pair).\\ +\gbc{sgn z} & The signum, $\sgn (0,0) = (0,0)$ otherwise + $\sgn z = z/|z|$ (pair).\\ \gbc{conj z} & The complex conjugate, $\bar z$ (pair).\\ \gbc{Moebius(a) z} & The M\"obius transformation $(z+a)/(1+\bar{a}z)$ (pair)\\ \gbc{pshdist(z,w)} & The pseudohyperbolic distance between $z$ and - $w$: $|z-w| / |1-\bar{w}z|$ (numeric). + $w$: $|z-w| / |1-\bar{w}z|$ (numeric).\\ +\gbc{kelvin(z)} & The Kelvin transform $1/\bar z$ (pair) \end{tabular} +\CMF{} will happily add and subtract pairs but to multiply and divide +complex numbers requires new operations. These are given by \codebox{(z +zmul w)} and \codebox{(z zdiv w)}. They operate on pairs and produce +pairs. + \subsection{Manipulating \MF{} picture variables} @@ -5701,6 +5961,7 @@ One can use the \LaTeX{} environment construct \cs{begin}\marg{mfpimage} $\ldots$ \cs{end}\marg{mfpimage} in a LaTeX document instead of \cs{mfpimage} $\ldots$ \cs{endmfpimage}. + \subsection{\CMF{} loops}\label{loops} All the \mfp{} loop commands create a loop (in the \MF{} language) in @@ -5775,11 +6036,11 @@ reverts to its previous state outside the loop. That is, if it existed before the loop, it regains its previous value after the loop, and if it was undefined before the loop, it is again undefined after. -The single word ``\mfc{upto}'' can be used as an abbreviation for -``\mfc{step 1 until}'' and ``\mfc{downto}'' for ``\mfc{step -1 until}'' +The single word `\mfc{upto}' can be used as an abbreviation for +``\codebox{step 1 until}'' and `\mfc{downto}' for ``\codebox{step -1 until}'' in for-loop headers. Spaces are not significant in for-loop headers, except to distinguish the keywords (e.g. \mfc{step}) from variable names -that might be use (e.g., for \meta{start}). +that might be used (e.g., for \meta{start}). \begin{cd}\pagelabel{mfpwhile} \cs{mfpwhile}\marg{\meta{condition}}\\ @@ -5873,6 +6134,7 @@ by code that causes \MF{} to execute it several times with different values for the variable. From \TeX{}'s point of view, there is only one \mfp{} drawing command. + \subsection{Miscellaneous}\label{misc} \begin{cd}\pagelabel{mfmode} @@ -5925,8 +6187,8 @@ locally, one can globally copy it to another variable with \index{globalassignmpvalue@\cs{globalassignmpvalue}}% \end{cd} -The command names spelled with ``\texttt{mp}'' are no different than the -ones spelled with ``\texttt{mf}''. You can use either spelling with +The command names spelled with `\texttt{mp}' are no different than the +ones spelled with `\texttt{mf}'. You can use either spelling with either the \opt{metafont} or \opt{metapost} option. These commands causes the \meta{MF-expr} to be written to the output @@ -5961,9 +6223,9 @@ The `\texttt{global}' version makes the definition of the it can be used in other pictures. The plain versions create commands that are only locally defined. Past versions of this manual stated that you can say -\begin{ex} +\begin{display} \cs{global}\cs{assignmfvalue} -\end{ex} +\end{display} to define the macro globally. This turns out not to be true in all cases. If a global definition is needed, use the global versions above. @@ -6008,7 +6270,7 @@ object and the path intersect in more than one point, as little as possible (usually% \footnote{\MF{}'s methods for finding the `first' point of intersection do not always find the actual first one.}) % -is cut off. This is reliable only when there is only one point of +is cut off. This is reliable only when there is a unique point of intersection. These macros can be used to create a curve that starts or ends @@ -6036,32 +6298,67 @@ For \cs{randomizepath} the \meta{weirdness} parameter controls how the control vectors are modified. Roughly speaking the control vectors are randomly rotated up to $30\langle\mathit{weirdness}\rangle$ degrees and randomly scaled up or down by a factor of -$2^{\langle\mathit{weirdness}\rangle}$. (A `control vector' is a vector -pointing from a node to one of its control points.) However, this is -done in a way that preserves smoothness at each node where the path is -smooth. Values of \meta{weirdness} greater than 1 are probably too -weird. +$2^{\langle\mathit{weirdness}\rangle}$. (A ``control vector'' is a +vector pointing from a node to one of its control points.) However, this +is done in a way that preserves smoothness at each node where the path +is smooth. Values of \meta{weirdness} greater than 1 are probably much +too weird. \begin{cd}\pagelabel{brownianmotion} -\cs{brownianmotion}\marg{\meta{start},\meta{num},\meta{scale}}% -\index{brownianmotion@\cs{brownianmotion}} -\end{cd} - -This figure macro uses another kind of randomness. The path starts at -the point \meta{start}, then proceeds in a straight line in a random -direction a random distance. The random process used is a normaldeviate -in each coordinate, scaled by \meta{scale}. This is repeated \meta{num} -times. Thus, \meta{start} is a coordinate pair in graph coordinates, -\meta{num} is a positive whole number and \meta{scale} is a positive -real number. In rare cases, the random distance can be quite large, but -on average it will be about $0.56\times{}$\meta{scale}. The size -(bounding box) of the resultant path can also be, in rare cases, -quite large, but it is usually on the order of $\sqrt{\meta{num}}$ times -\meta{scale}. - -The path produced is technically not Brownian motion, but rather a -`random walk'. However, for small \meta{scale} and large \meta{num} it -approximates Brownian motion. +\cs{brownianmotion}\marg{\meta{start},\meta{num},\meta{scale}}\\% +\cs{browniangraph}\marg{\meta{num},\meta{scale}}\\% +\cs{randomwalk}\marg{\meta{start},\meta{num},\meta{scale}}% +\index{brownianmotion@\cs{brownianmotion}}% +\index{browniangraph@\cs{browniangraph}}% +\index{randomwalk@\cs{randomwalk}} +\end{cd} + +These figure macros build a few standard kinds of random paths. The +\cs{brownianmotion} path starts at the point \meta{start}, then proceeds +in a straight line in a random direction a random distance. This is +repeated \meta{num} times to form a polyline. The random process used is +a Gaussian in each coordinate, scaled so that the random distance has a +standard deviation equal to \meta{scale}. Thus, \meta{start} is a +coordinate pair in graph coordinates, \meta{num} is a positive whole +number and \meta{scale} is a positive real number (in graph units). In +rare cases, the random distance can become quite large, but on average +it will be about $0.56\times{}$\meta{scale}. The size of the resultant +path (its bounding box) can also be, in rare cases, quite large, but it +is usually on the order of $\sqrt{\meta{num}}$ times \meta{scale}. + +The second path, \cs{browniangraph}, represents the graph of a +one-dimensional Brownian motion. It is random only in the vertical +direction as the rightward motion represents the uniform passage of +time. It starts at $(0,0)$ and the \meta{scale} is both the constant +rightward step as well as the standard deviation for the $y$-coordinate. +Users will need to apply a shift if they want to change the starting +point, and a vertical scaling if they want a scale factor different from +the step size. + +Despite their names, the paths produced are technically not Brownian +motion, but rather `Gaussian random walks'. However, for small +\meta{scale} and large \meta{num} they can be used to approximate +Brownian motion. + +Finally, \cs{randomwalk} is just like \cs{brownianmotion} except that +only the direction is random. The distance is always equal to +\meta{scale}.% + \footnote{This is only one kind of an infinite variety of possible + random walks. See \url{http://en.wikipedia.org/wiki/Random_walk} for a + discussion. \Mfp{} implementation of other kinds is left to the + interested user (for example, using \cs{turtle} with random + displacements).} + +There can be a problem with the size of \meta{num} in these three +macros. Numbers greater than a certain \MF/\MP{} parameter called +\verb$max_points$ (see the discussing at \cs{levelcurve} in +section~\ref{plotting}) will produce an error from \MF{} or \MP{}. But +also sharp turns will take up space in something called the +\emph{rounding table}. This has no bearing on \MP{}, and in \MF{} it +only matters if the parameter \mfc{autorounding} is positive. \Mfp{} +leaves \mfc{autorounding} at the default of $2$, since this value makes +drawings in \MF{} look best. In this case, the value of \meta{num} +should be less than about $500$. \begin{cd}\pagelabel{mftitle} \cs{mftitle}\marg{\meta{title}}% @@ -6173,6 +6470,15 @@ enough to have this capability. Under the \opt{metafont} option, this command is simply ignored, but \mfp{} has no way of checking the \MP{} version on its own. +If you are using \LaTeX{}, the \verb$\includegraphics$ command requires +that the included figure file be recognized as \MP{} output. In practice, +this usually means its extension \emph{must} be \texttt{.mps}. As an +exception, it may also be the current figure number (the default if +\verb$\setfilenametemplate$ is not used), because \mfp{} has always +arranged for that to be recognized. The user may also issue a +\verb$\DeclareGraphicsRule$ command to get other extensions recognized. +See the documentation of the \prog{graphics} package. + \begin{cd}\pagelabel{preparemfpicgraphic} \cs{preparemfpicgraphic}\marg{\meta{filename}}% @@ -6244,7 +6550,7 @@ get written to the \file{.mf} (or \file{.mp}) output and cause a \MF{} \end{verbatim} The braces prevent \TeX{}'s argument parsing from seeing the first comma -as a delimiter, but upon writing to the \file{.mf}, the \cs{identity} +as a delimiter, but upon writing to the \file{.mf}, any \cs{identity} commands are expanded and only the contents appear in the output. (\TeX{} parses the argument to assign meanings to \cs{Ax} and \cs{Ay}.) @@ -6264,6 +6570,7 @@ for the commands to do these things. \thispagestyle{plain} \chapter{Appendices}\label{appendices} + \section{Acknowledgements.}\label{acknowledgements} Tom would like to thank all of the people at Dartmouth as well as out in @@ -6305,12 +6612,14 @@ for the \cs{assignmfvalue} command, and Zaimi Sami~Alex for suggestions. But mostly, he'd like to thank Tom Leathrum for starting it all. + \section{Changes History.}\label{changes} See the file \file{changes.txt} for a somewhat sporadic history of changes to \mfp{}. See the file \file{README} for changes added since the previous version, and for any known problems. + %\clearpage \section{Summary of Options.}\label{summary} @@ -6377,6 +6686,7 @@ all later environments. \cs{opengraphsfile}. \cr }} + %\clearpage \section{Plotting Styles for \cs{plotdata}.}\label{styles} @@ -6451,6 +6761,7 @@ path variables. (The order changed between versions 0.6 and 0.7.) \mfc{pointtype8}& \mfc{SolidTriangle} \end{tabular} + \section{Special Considerations When Using \CMF{}.}\label{mfconsiderations} The most important restriction in \MF{} is on the size of a picture. @@ -6461,7 +6772,7 @@ fonts prepared for a LaserJet4 (600 DPI), this means 6.825 inches (17.3355cm). For a 1200 DPI pronter, the limit is 3.4125 inches. A similar limit holds for numbers input, and the values of variables: -\MF{} will return an error for ``\mfc{sin 4096}''. Intermediate values +\MF{} will return an error for `\mfc{sin 4096}'. Intermediate values can be greater (\mfc{sin (2*2048)} will cause no error), but final, stored results are subject to the limit. An \mfp{} example that generated an error recently was: @@ -6494,6 +6805,8 @@ working \MP{} installation): \medskip\noindent \begin{tabular}{@{}lp{4.2in}} +\TeX{} format &support needed\\ +\hline plain \TeX{} &The file \file{epsf.tex} or \file{epsf.sty}\\ \LaTeX{}209 &(No longer supported, but plain \TeX{} methods might work)\\ @@ -6503,26 +6816,34 @@ plain \TeX{} &The file \file{epsf.tex} or \file{epsf.sty}\\ plain \pdfTeX{} &\raggedright The files \file{supp-pdf.mkii} or \file{supp-pdf.tex} and (possibly) \file{supp-mis.tex}\tabularnewline -In all cases &\raggedright The files \file{grafbase.mp} and - \file{dvipsnam.mp} plus, of course, - \file{mfpic.tex} (and \file{mfpic.sty} for - \LaTeX{}) +In all cases &\raggedright The files \file{grafbase.mp}, + \file{dvipsnam.mp} and \file{mfpicdef.tex} plus, + of course, \file{mfpic.tex} (and \file{mfpic.sty} + for \LaTeX{}) \end{tabular} \medskip The files \file{grafbase.mp} and \file{dvipsnam.mp} should be in a -directory searched by \MP{}. The remaining files should be in directories -searched by the appropriate \TeX{} variant. If \MP{} cannot find the +directory searched by \MP{}. If \MP{} cannot find the file \file{grafbase.mp}, then by default it will try to input -\file{grafbase.mf}, which is generally futile (or fatal). +\file{grafbase.mf}, which is generally fatal (and always futile). + +The remaining files should be in directories searched by the appropriate +\TeX{} variant. The file \file{mfpicdef.tex} is input by \TeX{} when +\MP{} is processing labels in \file{.mp} files created by \mfp{}. The +user is free to add commands of his own to that file, but be warned that +updates to \mfp{} will overwrite it. Better to create ones own file (say +\file{mydefs.tex}) and arrange its input via +\verb$\mfpverbtex{\input mydefs.tex}$ In case \pdfLaTeX{} is used, the \prog{graphics} package is given the \opt{pdftex} option. This option requires the file \file{pdftex.def} which currently inputs one of the \file{supp-pdf} files. Early versions of \file{supp-pdf.tex} will input \file{supp-mis.tex}. These three files should be supplied with most \TeX{} installations.% - \footnote{At this writing, these files, plus a few others, - can found at \file{CTAN/macros/pdftex/graphics/}.} % + \footnote{They are part of the Con\TeX{}t distribuition. At this writing, + these files, plus a few others, can also be found at\\ + \file{CTAN/graphics/metapost/contrib/tools/mptopdf/tex/context/base/}.} % Older versions had some bugs in connection with the \prog{babel} package. One workaround was to load the \prog{graphics} package and \mfp{} before \prog{babel}. @@ -6533,6 +6854,7 @@ load whichever one it decides is required. In the \LaTeXe{} case, \mfp{} will load the \prog{graphics} package. If the user wishes \prog{graphicx}, then that package must be loaded before \mfp{}. + \subsection{\CMP{} is not \MF{}} \PS{} is not a pixel oriented language and so neither is \MP{}. The model @@ -6574,6 +6896,7 @@ rectangle. On the other hand, filling is done right up to the boundary. In this example, the dashed lines are drawn on top of part of the fill. In the reverse order, the fill would cover part of the dashed outline. + \subsection{Graphic inclusion}\label{graphics} It may be impossible to completely cater to all possible methods of @@ -6617,9 +6940,10 @@ we add code to each figure, so that these graphics are correctly recognized as \EPS{} or \prog{MPS}. For example, to the figure with extension \file{.1}, we add the equivalent of one of the following \begin{itemize} -\item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{eps}\marg{.1}\marg{} in \LaTeXe{}. -\item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{mps}\marg{.1}\marg{} in -\pdfLaTeX{}. + \item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{eps}\marg{.1}\marg{} in + \LaTeXe{}. + \item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{mps}\marg{.1}\marg{} in + \pdfLaTeX{}. \end{itemize} After running the command \cs{setmfpicgraphic}, \mfp{} runs @@ -6650,8 +6974,8 @@ independent of the size of a picture. To rescale all pictures, one need only change \cs{mfpicunit} and rerun \TeX{} and \MP{}. A better reason might be to allow the conversion of your \MP{} figures -to some other format. Then redefining \cs{setmfpicgraphic} -could enable including the appropriate file in the appropriate format. +to some other format. Then redefining \cs{setmfpicgraphic} could enable +including the appropriate file in the appropriate format. The filename argument mentioned above is actually the result obtained by running the macro \cs{setfilename}\index{setfilename@\cs{setfilename}}. @@ -6689,13 +7013,18 @@ filename between the asterisks. \subsection{The literature} -This author has personal knowledge of only one mathematical article +This author has personal knowledge of one mathematical article which definitely uses \mfp{} to create diagrams, and that is this author's joint paper with J.~Duncan and C.~M.~McGregor: \textit{On the value of pi for norms in $\mathbf{R}^2$} in the College Mathematics Journal, vol.~35, pages 84--92. Oddly enough, it was McGregor and not I who chose to use \mfp{} for the illustrations. +There also exists a book that makes use of \mfp{}: \textit{Introduction +to functional equations: theory and problem solving strategies for +mathematical competitions and beyond} by Costas Efthimiou, +MSRI/Mathematical Circles Library, vol. 6, 2011. + There are at least two major publications where \mfp{} has garnered more than a cursory mention. The most up-to-date is a section in \textit{The \LaTeX{} Graphics Companion} by Michel Goossens, Sebastian Rahtz and @@ -6727,8 +7056,8 @@ given for \cs{wedge}: \end{ex} The macro \cs{plr}\marg{(\meta{$r_0$},\meta{$\theta_0$}),% -(\meta{$r_1$},\meta{$\theta_1$}),$\ldots$} is used to convert polar -coordinate pairs to rectangular coordinates, so the commands +(\meta{$r_1$},\meta{$\theta_1$}),$\ldots$} is now used to convert polar +coordinate pairs to rectangular coordinates and the commands \cs{plrcurve}, \cs{plrcyclic}, \cs{plrlines} and \cs{plrpoint} were dropped from \mfp{}. Now use \begin{ex} @@ -6789,6 +7118,7 @@ There is a misprint: \cs{axisheadlin} should be \cs{axisheadlen}. Finally, the \LaTeX{} template on page 496 is no longer the only possiblity: recent \mfp{} may be loaded with \cs{usepackage}. + \subsection{Other programs} There exists a program, \prog{fig2mfpic} that produces \mfp{} code as @@ -6810,6 +7140,7 @@ file (don't ask me what it consists of) and apparently processes it with \renewcommand\mfpindexheading{% \section{Index of commands, options and parameters.}} + \let\oldcs\cs \renewcommand{\cs}[1]{\leavevmode\mytt{\llap{\char`\\}#1}} @@ -6828,6 +7159,7 @@ file (don't ask me what it consists of) and apparently processes it with \let\item\@idxitem \makeatother + \subsection{Figures} \item \cs{arc}, \pageref{arc} @@ -6836,6 +7168,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{belowfcn}, \pageref{belowfcn} \item \cs{border}, \pageref{axisline} \item \cs{brownianmotion}, \pageref{brownianmotion} + \item \cs{browniangraph}, \pageref{brownianmotion} \item \cs{btwnfcn}, \pageref{btwnfcn} \item \cs{btwnplrfcn}, \pageref{btwnfcn} \item \cs{cbeziers}, \cs{closedcbeziers}, \pageref{cbeziers} @@ -6854,10 +7187,14 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{ellipse}, \pageref{ellipse} \item \cs{fcncurve}, \pageref{fcncurve} \item \cs{fcnspline}, \pageref{fcnspline} + \item \cs{fullellipse}, \pageref{fullellipse} \item \cs{function}, \pageref{function} \item \cs{ganttbar}, \pageref{chartbar} + \item \cs{gbrace}, \pageref{gbrace} \item \cs{graphbar}, \pageref{chartbar} + \item \cs{halfellipse}, \pageref{fullellipse} \item \cs{histobar}, \pageref{chartbar} + \item \cs{hypergeodesic}, \pageref{hypergeodesic} \item \cs{levelcurve}, \pageref{levelcurve} \item \cs{lines}, \pageref{polyline} \item \cs{mfbezier}, \cs{closedmfbezier}, \pageref{mfbezier} @@ -6871,7 +7208,9 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{polyline}, \pageref{polyline} \item \cs{pshcircle}, \pageref{pshcircle} \item \cs{qbeziers}, \cs{closedqbeziers}, \pageref{qbeziers} + \item \cs{quarterellipse}, \pageref{fullellipse} \item \cs{qspline}, \cs{closedqspline}, \pageref{qspline} + \item \cs{randomwalk}, \pageref{brownianmotion} \item \cs{rect}, \pageref{rect} \item \cs{regpolygon}, \pageref{regpolygon} \item \cs{sector}, \pageref{sector} @@ -6881,8 +7220,10 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{tlabelrect}, \pageref{tlabelrect} \item \cs{turtle}, \pageref{turtle} + \subsection{Renderings} + \item \cs{areagradient}, \pageref{areagradient} \item \cs{corkscrew}, \pageref{corkscrew} \item \cs{dashed}, \pageref{dashed} \item \cs{dotted}, \pageref{dotted} @@ -6892,12 +7233,14 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{gclip}, \pageref{gclip} \item \cs{gendashed}, \pageref{gendashed} \item \cs{gfill}, \pageref{gfill} + \item \cs{gradient}, \pageref{gradient} \item \cs{hatch}, \pageref{hatch} \item \cs{lhatch}, \pageref{hatch} \item \cs{plot}, \pageref{plot} \item \cs{plotdata}, \pageref{plotdata} \item \cs{plotnodes}, \pageref{plotnodes} \item \cs{polkadot}, \pageref{polkadot} + \item \cs{radialgradient}, \pageref{radialgradient} \item \cs{rhatch}, \pageref{hatch} \item \cs{sinewave}, \pageref{zigzag} \item \cs{shade}, \pageref{shade} @@ -6906,6 +7249,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{xhatch}, \pageref{hatch} \item \cs{zigzag}, \pageref{zigzag} + \subsection{Arrows} \item \cs{arrow}, \pageref{arrow} @@ -6913,6 +7257,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{arrowmid}, \pageref{arrowhead} \item \cs{arrowtail}, \pageref{arrowhead} + \subsection{Modifying figures} \item \cs{bclosed}, \pageref{lclosed} @@ -6920,6 +7265,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{connect}, \cs{endconnect}, \pageref{connect} \item \cs{cutoffafter}, \pageref{cutoffafter} \item \cs{cutoffbefore}, \pageref{cutoffafter} + \item \cs{interpolatepath}, \pageref{interpolatepath} \item \cs{lclosed}, \pageref{lclosed} \item \cs{makesector}, \pageref{makesector} \item \cs{parallelpath}, \pageref{parallelpath} @@ -6929,6 +7275,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{randomlines}, \pageref{random} \item \cs{reflectpath}, \pageref{shiftpath} \item \cs{reverse}, \pageref{reverse} + \item \cs{reversepath}, \pageref{reverse} \item \cs{rotatepath}, \pageref{shiftpath} \item \cs{scalepath}, \pageref{shiftpath} \item \cs{sclosed}, \pageref{lclosed} @@ -6943,6 +7290,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{yscalepath}, \pageref{shiftpath} \item \cs{yslantpath}, \pageref{shiftpath} + \subsection{Lengths} \item \cs{axisheadlen}, \pageref{axisheadlen} @@ -6963,6 +7311,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{sideheadlen}, \pageref{sideheadlen} \item \cs{symbolspace}, \pageref{symbolspace} + \subsection{Coordinate transformation} \item \cs{applyT}, \pageref{applyT} @@ -6983,6 +7332,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{zscale}, \pageref{applyT} \item \cs{zslant}, \pageref{applyT} + \subsection{Symbols, axes, grids, marks} \item \cs{axes}, \pageref{axes} @@ -7014,6 +7364,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{yaxis}, \pageref{axes} \item \cs{ymarks}, \pageref{axismarks} + \subsection{Symbol names} \item \gbc{Arrowhead}, \pageref{arrowhead} @@ -7038,6 +7389,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \gbc{Star}, \pageref{plotsymbol} \item \gbc{Triangle}, \pageref{plotsymbol} + \subsection{Setting options} \item \cs{clearsymbols}, \pageref{clearsymbols} @@ -7063,6 +7415,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{useraggedcaptions}, \pageref{raggedcaptions} \item \cs{usetruebbox}, \pageref{truebbox} + \subsection{Setting values} \item \cs{axismargin}, \pageref{axismargin} @@ -7096,6 +7449,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{setymarks}, \pageref{setaxismarks} \item \cs{shadewd}, \pageref{shadewd} + \subsection{Setting colors} \item \cs{backgroundcolor}, \pageref{drawcolor} @@ -7107,6 +7461,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{pointcolor}, \pageref{drawcolor} \item \cs{tlabelcolor}, \pageref{drawcolor} + \subsection{Defining arrays} \item \cs{barchart}, \pageref{barchart} @@ -7126,6 +7481,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{piechart}, \pageref{piechart} \item \cs{setarray}, \pageref{setarray} + \subsection{Changing behavior} \item \cs{coloredlines}, \pageref{coloredlines} @@ -7158,6 +7514,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{usingnumericdefault}, \pageref{usingpairdefault} \item \cs{usingpairdefault}, \pageref{usingpairdefault} + \subsection{Files and environments} \item \cs{closegraphsfile}, \pageref{opengraphsfile} @@ -7167,6 +7524,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{setfilename}, \pageref{setfilename} \item \cs{setfilenametemplate}, \pageref{setfilenametemplate} + \subsection{Text} \item \cs{axislabels}, \pageref{axislabels} @@ -7177,6 +7535,7 @@ file (don't ask me what it consists of) and apparently processes it with \item \cs{tlabel}, \pageref{tlabel} \item \cs{tlabels}, \pageref{tlabel} + \subsection{Miscellaneous} \item \cs{assignmfvalue}, \cs{assignmpvalue}, \pageref{assignmfvalue} |