summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-22 23:27:10 +0000
committerKarl Berry <karl@freefriends.org>2011-03-22 23:27:10 +0000
commit0587d82718f50b92630e55b97f0d9d5babed5186 (patch)
tree71977ed8884f799473908d317cce6307110354a9 /Master/texmf-dist
parenteee8031373817b3d9212b1204672090752bb543a (diff)
mfpic 1.06 (21mar11)
git-svn-id: svn://tug.org/texlive/trunk@21800 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/README107
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/changes.txt15
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/examples/data.dat6
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex6
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex6
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex6
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/install.txt76
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/lcheadings.ist8
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpcard.pdfbin145032 -> 145233 bytes
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpcard.tex10
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty53
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpguide.pdfbin344646 -> 346088 bytes
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpguide.tex11
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdfbin528015 -> 536239 bytes
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex497
-rw-r--r--Master/texmf-dist/metafont/mfpic/grafbase.mf96
-rw-r--r--Master/texmf-dist/metapost/mfpic/dvipsnam.mp5
-rw-r--r--Master/texmf-dist/metapost/mfpic/grafbase.mp99
-rw-r--r--Master/texmf-dist/source/generic/mfpic/grafbase.dtx193
-rw-r--r--Master/texmf-dist/source/generic/mfpic/mfpic.dtx220
-rw-r--r--Master/texmf-dist/source/generic/mfpic/mfpic.ins14
-rw-r--r--Master/texmf-dist/tex/generic/mfpic/mfpic.sty7
-rw-r--r--Master/texmf-dist/tex/generic/mfpic/mfpic.tex78
-rw-r--r--Master/texmf-dist/tex/generic/mfpic/mfppatch.tex15
24 files changed, 980 insertions, 548 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/README b/Master/texmf-dist/doc/generic/mfpic/README
index a18b8b5f682..e7da761bce3 100644
--- a/Master/texmf-dist/doc/generic/mfpic/README
+++ b/Master/texmf-dist/doc/generic/mfpic/README
@@ -1,9 +1,9 @@
-%%% File: README
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: README
+% A part of mfpic 1.06 2011/03/08
+%
-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
@@ -12,14 +12,14 @@ 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 official release (0.9). See the
-manual mfpic-doc.pdf for more detailed instructions and descriptions
-of features.
+features added since the previous major release (1.00). See the manual
+mfpic-doc.pdf for more detailed instructions and descriptions of
+features.
-This is mfpic version 1.05.
+This is mfpic version 1.06.
-LEGALITIES
-----------
+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)
@@ -30,6 +30,8 @@ any later version. The latest version of this license is in
and version 1.3c or later is part of all distributions of LaTeX version
2008/12/01 or later.
+DISCLAIMER
+----------
While every effort has been made to make mfpic useful, it comes with no
warranty, expressed or implied.
@@ -40,50 +42,50 @@ 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.
-The four files marked with * below are the only ones essential
-for using all the facilities of mfpic.
+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
+sufficient to generate those essential files.
-All the *.tex files in the doc directory (except the plainTeX file
-mfpcard.tex) require the LaTeX style file mfpdoc.sty. The mfpic manual
-is mfpic-doc.pdf.
+The mfpic reference manual is mfpic-doc.pdf. A tutorial is available in
+mfpguide.pdf.
Source files:
------------
-*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 only
- required run-time files: mfpic.sty, mfpic.tex,
- grafbase.mf, grafbase.mp, and dvipsnam.mp
+* 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.tex Basic TeX/LaTeX code
-*mfpic.sty LaTeX2e \usepackage wrapper for mfpic.tex
-*mfppatch.tex patches and bugfixes. (Not actually required unless
- there are some patches.)
+ + mfpic.tex Basic TeX/LaTeX code
+ + mfpic.sty LaTeX2e \usepackage wrapper for mfpic.tex
MetaPost/Metafont code:
----------------------
-*grafbase.mp MetaPost macros supporting mfpic
-*dvipsnam.mp Color definitions for MetaPost, input by grafbase.mp
-*grafbase.mf Metafont macos supporting mfpic
+ + grafbase.mp MetaPost macros supporting mfpic
+ + dvipsnam.mp Color definitions for MetaPost, input by grafbase.mp
+ + grafbase.mf Metafont macros supporting mfpic
Documentation:
-------------
- changes.txt Summary of 17 years of changes
+ changes.txt Summary of 19 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.pdf Precompiled reference card (usletter, landscape).
- mfpdoc.sty LaTeX style used by the next two
+ mfpcard.tex plain TeX source for mfpcard.pdf, should fit on two
+ sides of either USletter or A4, rotated.
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.
+ 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
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.
Examples:
--------
@@ -99,39 +101,26 @@ available at my web site:
http://comp.uark.edu/~luecking/tex/mfpic.html
-NEW FEATURES since Version 0.9
+NEW FEATURES since Version 1.0
-------------------------------
- -- Color functions cmyk() and gray() produce colors in the cmyk and
- grayscale color models, if the MetaPost version is at least 1.000.
- Extensive changes needed in grafbase, almost none in mfpic itself.
- Also cyan, magenta and yellow now predefined to be cmykcolor.
-
- -- Color functions makecmyk, makergb and makegray force the conversion
- of their argument to the indicated color model.
-
- -- Command \setfilenametemplate to set the file names for the graphics
- output by MetaPost. Does not support putting the system time/date
- in the name, even though MetaPost does.
+ -- bugfix in \vectorfield. (1.01)
- -- Commands \mfmode and \mfresolution to set the Metafont printer mode
- and resolution, if pictures are to be created by Metafont.
+ -- Work-around for some not-so-nice behavior of verbatimtex in some
+ versions of MetaPost. (1.02)
- -- Commands \cbeziers and \closedcbeziers. The cubic equivalents of
- the quadratic \qbeziers and \closedqbeziers.
+ -- Bugfix in grafbase handling of color. (1.03)
- -- Command \pshcircle produces a circle in the hyperbolic geometry of
- the unit disk or (star form) the upper half-plane. If you don't
- know what that means, don't worry, it's for complex function
- theorists (like me).
+ -- Bugfix in \mfresolution and \mfmode. (1.04)
- -- Command \brownianmotion simulates Brownian motion.
+ -- Changes to avoid namespace clashes in some internal macros. (1.05)
- -- \mfpverbtex is now cumulative when used prior to \opengraphsfile.
+ -- Differential equation plotters \DEgraph and \DEtrajectory added. (1.06)
- -- Better(?) handling of the filename argument of \opengraphsfile.
+ -- Some internal macros changed, some documentation changes made.
+ (1.01-1.06)
- -- bugfix in \vectorfield.
+ -- Remove mfppatch.tex (which has never been used). (1.06)
\sig
Dan Luecking (luecking at uark dot edu)
diff --git a/Master/texmf-dist/doc/generic/mfpic/changes.txt b/Master/texmf-dist/doc/generic/mfpic/changes.txt
index 3835ebf55c1..2086042b8ce 100644
--- a/Master/texmf-dist/doc/generic/mfpic/changes.txt
+++ b/Master/texmf-dist/doc/generic/mfpic/changes.txt
@@ -1,6 +1,6 @@
-%%% File: changes.txt
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: changes.txt
+% A part of mfpic 1.06 2011/03/08
+%
Summaries of changes.
@@ -925,9 +925,16 @@ documented) grafbase did nothing with them. Corrected.
(no change in version; documentation changes only 2010/04/07)
Correct a wrong checksum and some typos in the dtx. Reformat the source
-files grafbase.dtx and mfpic.dtx.
+files grafbase.dtx and mfpic.dtx.
1.05
Name changes in grafbase ("GB" prefixed to romannumeral, etc.) \endgroup
moved in mfpic.
+1.06
+Added differential equation plotters \DEgraph and \DEtrajectory and MF
+support macros *RKIV (4-step Runge-Kutta numerical method).
+
+Removed mfppatch.tex from the distribution. Add lcheadings.ist for the
+index.
+
diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/data.dat b/Master/texmf-dist/doc/generic/mfpic/examples/data.dat
index 91d6d0fb9fe..834ab5b57d1 100644
--- a/Master/texmf-dist/doc/generic/mfpic/examples/data.dat
+++ b/Master/texmf-dist/doc/generic/mfpic/examples/data.dat
@@ -1,6 +1,6 @@
-### File: data.dat
-### A part of mfpic 1.05 2010/06/10
-###
+# File: data.dat
+# A part of mfpic 1.06 2011/03/08
+#
# 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 5b8c88fae76..d2832c8ac90 100644
--- a/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/examples/forfun.tex
@@ -1,6 +1,6 @@
-%%% File: forfun.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: forfun.tex
+% A part of mfpic 1.06 2011/03/08
+%
\nopagenumbers
\input mfpic.tex
\usemetapost
diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex b/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex
index 3191a8ce15d..4247e3b7b15 100644
--- a/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/examples/lapictures.tex
@@ -1,6 +1,6 @@
-%%% File: lapictures.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: lapictures.tex
+% A part of mfpic 1.06 2011/03/08
+%
% Magnify to same scale as pictures.tex :
% (Use of \mag is against the law of LaTeX, but Bugs Bunny set a precedent.)
\mag=1200
diff --git a/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex b/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex
index 03e247a27cc..649a8dd27d8 100644
--- a/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/examples/pictures.tex
@@ -1,6 +1,6 @@
-%%% File: pictures.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: pictures.tex
+% A part of mfpic 1.06 2011/03/08
+%
\magnification=\magstep1
\newdimen\paperheight
diff --git a/Master/texmf-dist/doc/generic/mfpic/install.txt b/Master/texmf-dist/doc/generic/mfpic/install.txt
index c334a7f4326..7f98437d374 100644
--- a/Master/texmf-dist/doc/generic/mfpic/install.txt
+++ b/Master/texmf-dist/doc/generic/mfpic/install.txt
@@ -1,8 +1,8 @@
-%%% File: install.txt
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: install.txt
+% A part of mfpic 1.06 2011/03/08
+%
-This is version 1.05 of mfpic. See README.txt for a list of files and a
+This is version 1.06 of mfpic. See README.txt for a list of files and a
brief description of each.
Generating and installing the files
@@ -21,39 +21,38 @@ CTAN: /install/generic/mfpic.tds.zip
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). Do the same for mfppatch.tex.
+ -- 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 and mfppatch.tex where TeX and LaTeX will find it, and
- mfpic.sty where LaTeX will find it. On any TDS compliant system (such
- as teTeX, fpTeX, TeXLive, 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 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.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 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 and coil.mps, as well as
- and 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/).
+ -- 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.
+ -- 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, teTeX, MacTeX, and
- TeXLive all DO require it): !!UPDATE THE TeX FILENAME DATABASE!!
+ -- 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
@@ -65,7 +64,7 @@ Find near the end a line similar to
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 teTeX or TeXLive;
+change, regenerate the mf.base file (fmtutil on TeXLive or MacTeX;
MiKTeX Options in MiKTeX). On some systems this may be named plain.base.
Read mfpguide.pdf before trying anything further. If you are already
@@ -98,15 +97,15 @@ 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)
+ 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:
+Now page numbers should be correct in the index, so run makeindex,
+making sure that lcheaders.ist is where makeindex can find it:
- makeindex -o mfpic-doc.ind mfpic-doc.idx
+ makeindex -s lcheaders.ist -o mfpic-doc.ind mfpic-doc.idx
-(or just "makeindex mfpic-doc" on many systems) then run latex two more
-times:
+then run latex two more times:
pdflatex mfpic-doc (mfpic-doc.toc now has index added)
pdflatex mfpic-doc (Document toc now correct)
@@ -124,7 +123,8 @@ daft):
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.)
+this compulsion passes.) It also leaves a few dozen files guide.*, which
+you will want to delete.
And finally, if you forgot:
diff --git a/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist b/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist
new file mode 100644
index 00000000000..c9873b1de04
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/mfpic/lcheadings.ist
@@ -0,0 +1,8 @@
+% File: lcheadings.ist
+% A part of mfpic 1.06 2011/03/08
+%
+% Generic lowercase headings
+%
+heading_prefix "\n\\headingprefix{"
+heading_suffix "}\\headingsuffix\n"
+headings_flag -1
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf
index 2b60fe2002c..69d9f311eec 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpcard.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex b/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex
index 832e9095f77..1e7504e9efc 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpcard.tex
@@ -1,6 +1,6 @@
-%%% File: mfpcard.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: mfpcard.tex
+% A part of mfpic 1.06 2011/03/08
+%
% (Ask your driver to print so that longer dimension is horizontal.)
\newdimen\paperlongside
\paperlongside 11 truein
@@ -199,9 +199,9 @@
\title{MFPIC Quick Reference}
-\centerline{(Copyright 2000--2010 by Daniel Luecking)}
+\centerline{(Copyright 2000--2011 by Daniel Luecking)}
\medskip
-This information was prepared for version 1.05 of \prog{mfpic}.
+This information was prepared for version 1.06 of \prog{mfpic}.
\section{Preamble commands}
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
index 60b3648bf89..8814c8c89ff 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
@@ -1,7 +1,10 @@
-%%% File: mfpdoc.sty
-%%% A part of mfpic 1.05 2010/06/10
-%%%
-\ProvidesPackage{mfpdoc}[2010/06/10 v1.05 macros for mfpic documentation]
+% File: mfpdoc.sty
+% A part of mfpic 1.06 2011/03/08
+%
+\ProvidesPackage{mfpdoc}[2011/03/08 v1.06 macros for mfpic documentation]
+\newcommand\mfpversion{1.06}
+\newcommand\mfpicversion{106}
+\newcommand\mfpfiledate {2011/03/08}
\newif\if@chapters
\@chaptersfalse
@@ -21,8 +24,6 @@
\pdftrue
\fi\fi\fi}
-\newcommand\mfpversion{1.05}
-\newcommand\mfpdate {2010/06/10}
%% Text size:
@@ -34,6 +35,9 @@
\advance\topmargin-\headheight
\advance\topmargin-\headsep
+% These two are now defaults in TeX Live:
+% \pdfminorversion 5
+% \pdfobjcompresslevel 2
\ifpdf
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
@@ -42,8 +46,8 @@
pdfstartview={XYZ null null null},%
plainpages=false,hypertexnames=true}
\def\mfpHyDisable{%
- \def\cs##1{\otherbackslash##1}\let\opt\@firstofone\let\prog\@firstofone}
-\else
+ \let\opt\@firstofone\let\prog\@firstofone}
+\else % dvi output could be for dvipdfm or dvips
\ifx\mfpdvipdfm\UndEfInEd
\special{papersize=\the\paperwidth,\the\paperheight}
\else
@@ -67,6 +71,9 @@
{.4ex \@plus .1ex}%
{\normalfont\itshape\raggedright}}
+%
+% To allow \chapter command in article class, load this package with
+% [chapters] option
\if@chapters
\let\chapter\section
\let\section\subsection
@@ -109,6 +116,14 @@
\renewcommand\labelitemiii{\textperiodcentered}
\leftmargini 1.5\parindent
+% Index stuff
+\def\mfpindexheading{}
+\def\mfpindexpagemarks{}
+
+% If *headings.ist is used we need these:
+\def\headingprefix#1{\textbf{#1}}
+\def\headingsuffix{\par\nobreak\smallskip}
+
\renewenvironment{theindex}
{%
\@restonecoltrue
@@ -128,7 +143,7 @@
\newcommand\pagelabel{\ifpdf \phantomsection \fi\label}
%% Displays %%%%%%%%%%%
-%% command descriptions:
+%% command descriptions (cd):
\newenvironment{cd}
{\par\addvspace{1.75ex plus .3ex minus .1ex}
\parindent0pt
@@ -139,7 +154,7 @@
\aftergroup\@afterindenttrue\aftergroup\@afterheading
\nobreak\vskip.75ex plus .3ex minus .1ex}
-%% examples:
+%% examples (ex):
\newenvironment{ex}
{\par\addvspace{1ex plus.2ex minus.1ex}%
\parindent0pt
@@ -154,7 +169,7 @@
\def\verbatim@processline{\hspace{\leftmargini}\the\verbatim@line\par}
\addto@hook\every@verbatim{\predisplaypenalty\@M}
-%% other:
+%% displayed text:
\newenvironment{display}{\list{}{}\item[]}{\endlist}
%% end displays %%%%%%%
@@ -182,7 +197,7 @@
\hyphenation{meta-font meta-post Post-Script Ghost-script}
-%% Special words %%%%%%
+%% Special words %%%%%%%%%%
\def\MF{\prog{metafont}}
\def\CMF{\prog{Metafont}}
\def\MP{\prog{metapost}}
@@ -215,15 +230,23 @@
\let\dim \file % TeX and Metafont dimensions
\let\kw \opt % MF key words, e.g., numeric
-\edef\otherbackslash{\expandafter\@gobble\string\\}
-\DeclareRobustCommand\cs[1]{\mytt{\char`\\#1}}
-\def\bbsl{\cs{}\cs{}}% prints "\\"
+%% TeX code %%%%%%%%%%%%%%%
+{
+\escapechar`\\
+\xdef\otherbsbs{\string\\}
+\escapechar-1
+\xdef\otherbackslash{\string\\}
+}
+\DeclareRobustCommand\cs[1]{%
+ \texorpdfstring{\leavevmode\mytt{\otherbackslash#1}}{\textbackslash#1}}
+\def\bbsl{\mytt{\otherbsbs}}% prints "\\"
\DeclareRobustCommand\meta[1]{%
\ensuremath{\langle\mbox{\rmfamily\itshape#1\/}\rangle}}
\providecommand\marg[1]{\mytt{\char`\{#1\char`\}}}
\providecommand\oarg[1]{\mytt{[#1]}}
\providecommand\parg[1]{\mytt{(#1)}}
+%% page style %%%%%%%%%%%%%%%
\def\ps@mfpdoc{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
\def\@oddhead{\small{\scshape\rightmark}\hfil\thepage}%
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf
index 5718f42d497..677cda5f652 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpguide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
index b0e720cc67a..c25b22ba7e4 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
@@ -1,6 +1,6 @@
-%%% File: mfpguide.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: mfpguide.tex
+% A part of mfpic 1.06 2011/03/08
+%
% Tutorial on mfpic
\documentclass[letterpaper]{article}
@@ -31,8 +31,9 @@
\def\theHfigure{\thefigure}
\title{\Mfp: A Short Introduction}
-\author{Daniel H. Luecking\thanks{luecking at uark dot edu}}
-\date{\mfpdate}
+\author{Daniel H. Luecking\thanks{Copyright 2003--2011, Daniel H.
+Luecking (luecking at uark dot edu)}}
+\date{\mfpfiledate}
\begin{document}
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf
index 617241cd511..03c8f7a498b 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
index c818579dfd1..f4aeb3a2ff4 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
@@ -1,13 +1,16 @@
-%%% File: mfpic-doc.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: mfpic-doc.tex
+% A part of mfpic 1.06 2011/03/08
+%
% Documentation of mfpic macros
\documentclass[letterpaper]{article}
-% Fonts: TimesRoman, CM Sans serif, and LuxiMono for TeX commands.
+% Fonts:
+% Body text: TimesRoman,
+% Titles: CM Sans serif,
+% Typewriter: LuxiMono.
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
-\usepackage[scaled=.85]{luximono}
+\usepackage[scaled]{luximono}
\renewcommand\sfdefault{cmss}
\newcommand\sgn{\mathop{\mathrm{sgn}}\nolimits}
% Fake chapters (really sections):
@@ -29,7 +32,7 @@
\stepcounter{secnumdepth}
\title{\Mfp{}: Pictures in \TeX{}\\ with Metafont and
-MetaPost\thanks{Copyright 2002--2010, Daniel H. Luecking}}
+MetaPost\thanks{Copyright 2002--2011, Daniel H. Luecking}}
\author{%
Daniel H. Luecking%
@@ -39,7 +42,7 @@ Daniel H. Luecking%
\and Thomas E. Leathrum
\and Geoffrey Tobin}
-\date{\mfpdate}
+\date{\mfpfiledate}
\begin{document}
@@ -118,22 +121,19 @@ Acknowledgements.
\section{What?}\label{manifest}
See the \file{README} file for a list of files in the distribution and a
-brief explanation of each. Only four are actually needed for full access
-to \mfp{}'s capabilities: \file{mfpic.dtx}, \file{mfpic.ins},
-\file{grafbase.dtx} and \file{mfppatch.tex}. Running \LaTeX{} on
+brief explanation of each. Only three are actually needed for full access
+to \mfp{}'s capabilities: \file{mfpic.dtx}, \file{mfpic.ins} and
+\file{grafbase.dtx}. Running \LaTeX{} on
\file{mfpic.ins} creates the only required files:
\begin{display}
- \file{mfpic.tex} and \file{mfpic.sty}, the latter required only for
- \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{mfppatch.tex} is used to distribute simple bug fixes. It does
- nothing after a major update, but if it is not installed and a
- previous one is, a warning will be issued.
+ \file{mfpic.tex} and \file{mfpic.sty}, the latter required only for
+ \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.
\end{display}
-The README file also gives some guidence on the proper location for the
+The file \file{install.txt} gives some guidance on the proper location for the
installation of these files.
\section{How?}\label{process}
@@ -154,7 +154,7 @@ no file \file{pics.1}, but \TeX{} will continue processing the file
anyway. When \TeX{} is finished, you will now have a file called
\file{pics.mp}. This is the \MP{} file containing the descriptions of
the pictures for \file{pictures.tex}. You need to run \MP{} on
-\file{pics.mp} (Read your \MF{} manual to see how to do
+\file{pics.mp} (Read your \MP{} manual to see how to do
this.%
\footnote{The document \textit{Some experiences on running Metafont
and MetaPost}, by Peter Wilson, can be useful for beginners. Fetch
@@ -165,14 +165,18 @@ Typically, you just type
\begin{verbatim}
mpost pics.mp
\end{verbatim}
-(or possibly ``\verb$mp pics.mp$'', but try ``\verb$mpost$'' first).
-This produces files \file{pics.1}, \file{pics.2}, etc., the number of
-files depending on the version of \file{pictures.tex}. You then
-reprocess \file{pictures.tex} with \TeX{} to produce a DVI file. This
-file can then be processed with \prog{dvips} (for example) to produce
-\PS{} output which can be printed or viewed. One can also process the
-DVI with \prog{dvipdfm(x)} to produce a PDF file.
+This usually produces files named%
+ \footnote{Recent \MP{} allows one to change the default names of the
+ output files. Current \mfp{} provides an interface to that
+ capability: see \cs{setfilenametemplate} on page
+ \pageref{setfilenametemplate}.}
+\file{pics.1}, \file{pics.2}, etc., the number of files depending on the
+version of \file{pictures.tex}. You then reprocess \file{pictures.tex}
+with \TeX{} to produce a DVI file. This file can then be processed with
+\prog{dvips} (for example) to produce \PS{} output which can be printed
+or viewed. One can also process the DVI with \prog{dvipdfm(x)} to
+produce a PDF file.
If \pdfTeX{} is used instead of \TeX{} on the second run, you should be
able to view the resulting PDF file immediately, without any further
@@ -315,16 +319,11 @@ 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.
-If a file named \file{mfpic.usr} can be found, it will be input at the
+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.
+default, plus any other \TeX{} code.
-Finally, if the file \file{mfppatch.tex} can be found, it will be input
-slightly before the end of loading \mfp{}. It is part of the \mfp{}
-distribution, and will be used to implement minor corrections when bugs
-are found. The user should \emph{not} modify this file unless
-he really knows what he is doing.
\section{\opt{metapost}, \opt{metafont}, \cs{usemetapost}, \cs{usemetafont}.}%
\label{metapost}\index{metapost@\opt{metapost}}\index{usemetapost@\cs{usemetapost}}%
@@ -414,8 +413,8 @@ 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}
+\section{\opt{truebbox}, \cs{usetruebbox}, \cs{notruebbox}.}%
+\label{truebbox}%
\index{truebbox@\opt{truebbox}}%
\index{usetruebbox@\cs{usetruebbox}}%
\index{notruebbox@\cs{notruebbox}}
@@ -442,17 +441,18 @@ bounding box. Thus, anything running outside those bounds is lost.
\index{clipmfpic@\cs{clipmfpic}}%
\index{noclipmfpic@\cs{noclipmfpic}}
-Causes all parts of the figure outside the rectangle specified by the
-\cs{mfpic} command to be removed. The commands can come anywhere. If
-issued inside an \env{mfpic} environment they affect the current figure
-only. Otherwise all subsequent figures are affected. Note: this is a
-rather rudimentary option. It has an often unexpected interaction with
-truebbox. When both are in effect, \MP{} will produce a bounding box
-that is the intersection of two rectangles: the true one \emph{without
-clipping}, and the clipping rectangle (i.e., the one specified in the
-\cs{mfpic} command). It is possible for the actual figure to be much
-smaller than this bounding box (even empty!). This is a property of the
-\MP{} \gbc{clip} command and we know of no way to avoid it.
+The \opt{clip} option causes all parts of the figure outside the
+rectangle specified by the \cs{mfpic} command to be removed. The
+commands can come anywhere. If issued inside an \env{mfpic} environment
+they affect the current figure only. Otherwise all subsequent figures
+are affected. Note: this is a rather rudimentary option. It has an often
+unexpected interaction with truebbox. When both are in effect, \MP{}
+will produce a bounding box that is the intersection of two rectangles:
+the true one \emph{without clipping}, and the clipping rectangle (i.e.,
+the one specified in the \cs{mfpic} command). It is possible for the
+actual figure to be much smaller than this bounding box (even empty!).
+This is a property of the \MP{} \gbc{clip} command and we know of no way
+to avoid it.
\section{\opt{centeredcaptions}, \cs{usecenteredcaptions},
@@ -461,9 +461,9 @@ smaller than this bounding box (even empty!). This is a property of the
\index{usecenteredcaptions@\cs{usecenteredcaptions}}%
\index{nocenteredcaptions@\cs{nocenteredcaptions}}
-Causes multiline captions created by \cs{tcaption} to have all lines
-centered. This has no effect on the normal \LaTeX{} \cs{caption}
-command.%
+The \opt{centeredcaptions} option causes multiline captions created by
+\cs{tcaption} to have all lines centered. This has no effect on the
+normal \LaTeX{} \cs{caption} command.%
\footnote{This writer [DHL] feels that \cs{tcaption} is too limited
and users ought to apply the caption by other means, such as
\LaTeX{}'s \cs{caption} command, outside the \env{mfpic}
@@ -480,11 +480,12 @@ be used in the argument of a \cs{tcaption} command.
\index{useraggedcaptions@\cs{useraggedcaptions}}%
\index{noraggedcaptions@\cs{noraggedcaptions}}
-Causes multiline captions created by \cs{tcaption} to have all lines
-raggedright. 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.
+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.
The commands can be issued anywhere. If inside an \env{mfpic}
environment they should come before the \cs{tcaption} command and affect
@@ -497,12 +498,13 @@ be used in the argument of a \cs{tcaption} command.
\index{mfpicdebugtrue@\cs{mfpicdebugtrue}}%
\index{mfpicdebugfalse@\cs{mfpicdebugfalse}}
-Causes \mfp{} to write a rather large amount of information to the
-\file{.log} file and sometimes to the terminal. Debug information
-generated by \file{mfpic.tex} \emph{while loading} is probably of
-interest only to developers, but can be turned on by giving a definition
-to the command \cs{mfpicdebug} prior to loading. Any definition will
-work because \prog{mfpic} only checks whether it is defined.
+The \opt{debug} option causes \mfp{} to write a rather large amount of
+information to the \file{.log} file and sometimes to the terminal. Debug
+information generated by \file{mfpic.tex} \emph{while loading} is
+probably of interest only to developers, but can be turned on by giving
+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}}%
@@ -573,11 +575,11 @@ can be used.
From version 0.8, there exists a scheme to allow \MF{} or \MP{} to pass
information back to the \file{.tex} file. This is done by writing code
to the figure file requesting \MF{} to place that information in the
-\file{.log} file it produces. This option instructs \mfp{} to
-read through that log file line-by-line looking for such information.
-Since such log files can be potentially quite lengthy, this is made an
-option. If the command form \cs{mfpreadlog} is used, it must come before
-the \cs{opengraphsfile} command, since that is when the file will be
+\file{.log} file it produces. This option instructs \mfp{} to read
+through that log file line-by-line looking for such information. Since
+such log files can be potentially quite lengthy, this is made an option.
+If the command form \cs{mfpreadlog} is used, it must come before the
+\cs{opengraphsfile} command, since that is when the file will be
examined. At the present time, the only \mfp{} facility that requires
this two-way communication is \cs{assignmfvalue} (see
subsection~\ref{misc}). If this is used, the filename given to
@@ -607,13 +609,12 @@ document that fact, please let me know.
The following are special:
\begin{display}
-\cs{usemetapost}\index{usemetapost@\cs{usemetapost}},
-\cs{usemetafont}\index{usemetafont@\cs{usemetafont}},
-\cs{mfpicdraft}\index{mfpicdraft@\cs{mfpicdraft}},
-\cs{mfpicfinal}\index{mfpicfinal@\cs{mfpicfinal}},
-\cs{mfpicnowrite}\index{mfpicnowrite@\cs{mfpicnowrite}},\\
-and
-\cs{mfpreadlog}\index{mfpreadlog@\cs{mfpreadlog}}.
+ \cs{usemetapost}\index{usemetapost@\cs{usemetapost}},
+ \cs{usemetafont}\index{usemetafont@\cs{usemetafont}},
+ \cs{mfpicdraft}\index{mfpicdraft@\cs{mfpicdraft}},
+ \cs{mfpicfinal}\index{mfpicfinal@\cs{mfpicfinal}},
+ \cs{mfpicnowrite}\index{mfpicnowrite@\cs{mfpicnowrite}},\\
+ and \cs{mfpreadlog}\index{mfpreadlog@\cs{mfpreadlog}}.
\end{display}
\noindent Their effects are always global, partly because they should
occur prior to the initialization command \cs{opengraphsfile} (described
@@ -722,7 +723,7 @@ name without actually drawing it. However, because of their complexity,
objects of type \kw{picture} require somewhat more care than paths or
other data types. Do not expect to use stored pictures in the same way
as stored paths. In fact, one should use \kw{picture} variables only in
-those command that are explicitely designed for them. In \mfp{} to date
+those command that are explicitly designed for them. In \mfp{} to date
these are only \cs{tile...}\cs{endtile} and \cs{mfpimage} to store
pictures, and \cs{putmfpimage} to draw copies of one. There is also
\cs{tess}, but it is used only to fill a region with copies of a picture
@@ -800,13 +801,13 @@ file and open another, and even to change between \opt{metapost} and
maintainer and it might be fixed in some later version.
There may be limitations on what can be used as a filename. As of \mfp{}
-version \mfpversion, we have tried to permit \cs{jobname} as part of
+version 1.00, we have tried to permit \cs{jobname} as part of
\meta{file}. Thus we permit \TeX{} macros, but they should expand to
non-special characters. Permitting macros makes it essentially
impossible for the filename to contain the backslash and brace
characters. Also spaces are problematic. However other special \TeX{}
characters (for example: tilde, underscore and percent) can be used,
-though that is really not recommended.
+though that is not recommended.
\begin{cd}\pagelabel{mfpic}
\cs{mfpic}\oarg{\meta{xfactor}}\oarg{\meta{yfactor}}%
@@ -1016,19 +1017,19 @@ Draws small symbols centered at the points \meta{$p_0$}, \meta{$p_1$},
and so on. The symbols must be given by name, and the available symbols
are:
\begin{display}
-\gbc{Asterisk}\index{Asterisk@\gbc{Asterisk}},
-\gbc{Circle}\index{Circle@\gbc{Circle}},
-\gbc{Diamond}\index{Diamond@\gbc{Diamond}},
-\gbc{Square}\index{Square@\gbc{Square}},
-\gbc{Triangle}\index{Triangle@\gbc{Triangle}},
-\gbc{Star}\index{Star@\gbc{Star}},
-\gbc{SolidCircle}\index{SolidCircle@\gbc{SolidCircle}},\\
-\gbc{SolidDiamond}\index{SolidDiamond@\gbc{SolidDiamond}},
-\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{Plus}\index{Plus@\gbc{Plus}}.
+ \gbc{Asterisk}\index{Asterisk@\gbc{Asterisk}},
+ \gbc{Circle}\index{Circle@\gbc{Circle}},
+ \gbc{Diamond}\index{Diamond@\gbc{Diamond}},
+ \gbc{Square}\index{Square@\gbc{Square}},
+ \gbc{Triangle}\index{Triangle@\gbc{Triangle}},
+ \gbc{Star}\index{Star@\gbc{Star}},
+ \gbc{SolidCircle}\index{SolidCircle@\gbc{SolidCircle}},\\
+ \gbc{SolidDiamond}\index{SolidDiamond@\gbc{SolidDiamond}},
+ \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{Plus}\index{Plus@\gbc{Plus}}.
\end{display}
The names should be self-explanatory, the `\gbc{Solid}' ones are filled
in, the others are outlines. Under \opt{metapost}, symbols are drawn in
@@ -1043,24 +1044,23 @@ symbols. The command \cs{symbol} was already taken (standard \LaTeX{}).
While one would rarely want to use them for this purpose, the following
symbols are also available:
\begin{display}
-\gbc{Arrowhead}\index{Arrowhead@\gbc{Arrowhead}},
-\gbc{Crossbar}\index{Crossbar@\gbc{Crossbar}},
-\gbc{Leftbar}\index{Leftbar@\gbc{Leftbar}},
-\gbc{Rightbar}\index{Rightbar@\gbc{Rightbar}},
-\gbc{Lefthook}\index{Lefthook@\gbc{Lefthook}},
-\gbc{Righthook}\index{Righthook@\gbc{Righthook}},
-\gbc{Leftharpoon}\index{Leftharpoon@\gbc{Leftharpoon}},\\
-\gbc{Rightharpoon}\index{Rightharpoon@\gbc{Rightharpoon}}.
+ \gbc{Arrowhead}\index{Arrowhead@\gbc{Arrowhead}},
+ \gbc{Crossbar}\index{Crossbar@\gbc{Crossbar}},
+ \gbc{Leftbar}\index{Leftbar@\gbc{Leftbar}},
+ \gbc{Rightbar}\index{Rightbar@\gbc{Rightbar}},
+ \gbc{Lefthook}\index{Lefthook@\gbc{Lefthook}},
+ \gbc{Righthook}\index{Righthook@\gbc{Righthook}},
+ \gbc{Leftharpoon}\index{Leftharpoon@\gbc{Leftharpoon}},\\
+ \gbc{Rightharpoon}\index{Rightharpoon@\gbc{Rightharpoon}}.
\end{display}
These are mainly intended for making arrows. See subsection~\ref{arrows}
for a further description.
-The difference between \cs{pointfillfalse}\cs{point}$\ldots$ and
-\cs{plotsymbol}\marg{Circle}$\ldots$ is that the inside of the circle
-will not be erased in the second version, so whatever else has already
-been drawn in that area will remain visible. This is the default (for
-backward compatibility), but that can be changed with the commands
-below.
+The difference between \cs{pointfillfalse}\cs{point} and
+\cs{plotsymbol}\marg{Circle} is that the inside of the circle will not
+be erased in the second version, so whatever else has already been drawn
+in that area will remain visible. This is the default (for backward
+compatibility), but that can be changed with the commands below.
\begin{cd}\pagelabel{clearsymbols}
\cs{clearsymbols}\\
@@ -1258,7 +1258,7 @@ be affected.
These are figure macros that draw the line or lines that an \cs{axis}
command would draw. An \cs{axis} command is almost the equivalent of
\begin{display}
-\cs{arrow}\oarg{l\meta{hlen}}\cs{axisline}\marg{\meta{one-axis}}.
+ \cs{arrow}\oarg{l\meta{hlen}}\cs{axisline}\marg{\meta{one-axis}}.
\end{display}
The \cs{axisline} command is provided as a figure macro for maximum
flexibility. For example, one can use the star-form of the \cs{arrow}
@@ -1400,15 +1400,14 @@ 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,
-\cs{setaxismarks}\marg{r}\marg{ontop}). 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, \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.
\begin{cd}\pagelabel{grid}
\cs{grid}\oarg{\meta{size}}\marg{\meta{xsep},\meta{ysep}}\\
@@ -2047,10 +2046,10 @@ several have been predefined. The colors \mfc{red}, \mfc{green},
\mfc{blue}, \mfc{white} and \mfc{black} are built in to \MP{} and are of
type \kw{rgbcolor}. Colors \gbc{cyan}, \gbc{magenta} and \gbc{yellow}
are defined by \mfp{}'s \MP{} support macros to be \kw{cmykcolor}. In
-addition, \mfp{} defines \gbc{cmykblack}, \gbc{cmykwhite},
-\gbc{rgbblack}, \gbc{rgbwhite}, \gbc{grayscaleblack} and
-\gbc{grayscalewhite}. These give black and white in the indicated data
-type (grayscale being a numeric: $0$ for black, $1$ for white).
+addition, \mfp{} defines \gbc{grayscaleblack}, \gbc{grayscalewhite},
+\gbc{cmykblack}, \gbc{cmykwhite}, \gbc{rgbblack} and \gbc{rgbwhite}.
+These give black and white in the indicated data type (grayscale being a
+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{}
@@ -2149,7 +2148,7 @@ colors produce a black in the appropriate model. Then one can use
\draw{.5*RGB(255,0,0) + .5*makergb cmyk(1,0,0,0)}\circle{(0,0),1}
\end{verbatim}
%
-If one didn't know that \mfc{RGB} returned an \kw{rgbcolor}, one
+If one has forgotton whether \mfc{RGB} returns an \kw{rgbcolor}, one
could write \verb$makergb RGB(255,0,0)$ to be sure to get an
\kw{rgbcolor}.
@@ -2191,11 +2190,12 @@ curve (with one exception, those drawn by \cs{plotdata}), whether solid,
dashed, dotted, or plotted in symbols, will be in the color set by
\cs{drawcolor}. Set the color used by \cs{gfill} with \cs{fillcolor}.
For all the hatching commands use \cs{hatchcolor}. For the \cs{point},
-\cs{plotsymbol} and \cs{gridpoints} commands use \cs{pointcolor}, and
-for arrowheads, \cs{headcolor}. One can set the color used by
-\cs{gclear} with \cs{backgroundcolor} (the same color will also be used
-in the interior of unfilled points that are drawn with \cs{point}) and,
-when \opt{mplabels} is in effect, the color of labels can be set with
+and \cs{plotsymbol} commands, as well as \cs{gridpoints} and
+\cs{plrgridpoints}, use \cs{pointcolor}, and for arrowheads,
+\cs{headcolor}. One can set the color used by \cs{gclear} with
+\cs{backgroundcolor} (the same color will also be used in the interior
+of unfilled points that are drawn with \cs{point}) and, when
+\opt{mplabels} is in effect, the color of labels can be set with
\cs{tlabelcolor}.
The optional \meta{model} may be one of \texttt{rgb}, \texttt{RGB},
@@ -2311,11 +2311,14 @@ same effect as \cs{gclear}.
Some \mfp{} macros operate by \emph{modifying} a figure macro: if you
want to turn an open arc into a closed figure by adding a straight line,
-you can write: \cs{lclosed}\cs{arc}\marg{(0,0),(1,0),45}. These are
-always prefixed to some figure drawing command, and apply only to the
-next following figure macro provided that only other prefix commands
-intervene. This is a rather long section, but even more modification
-prefixes are documented in subsection~\ref{transformation}.
+you can write:
+\begin{ex}
+ \cs{lclosed}\cs{arc}\marg{(0,0),(1,0),45}.
+\end{ex}
+These are always prefixed to some figure drawing command, and apply only
+to the next following figure macro provided that only other prefix
+commands intervene. This is a rather long section, but even more
+modification prefixes are documented in subsection~\ref{transformation}.
The combination of a modifying macro, followed by a figure macro, can
usually be thought of as a new figure macro, to which further prefixes
@@ -2538,7 +2541,7 @@ complementary arc will have the same direction, clockwise or
anticlockwise, as the original. The arc that follows doesn't have to be
produced by \cs{arc}, as in the following example:
\begin{ex}
-\cs{draw}\oarg{blue}\cs{arccomplement}\\
+ \cs{draw}\oarg{blue}\cs{arccomplement}\\
\ \cs{draw}\oarg{red}\cs{partpath}\marg{0,.333}\\
\ \cs{circle}\marg{(0,0),1}
\end{ex}
@@ -2748,8 +2751,9 @@ draw a curve and hatch its interior, \cs{draw}\cs{hatch} must be used.
The default for \meta{color} is \gbc{drawcolor}.
To save repetition, the color used for the following commands is also
-\gbc{drawcolor}: \cs{dashed}, \cs{dotted}, \cs{doubledraw}, \cs{plot},
-\cs{plotnodes}, and \cs{gendashed},
+\gbc{drawcolor}:\\
+\cs{dashed}, \cs{dotted}, \cs{doubledraw}, \cs{plot}, \cs{plotnodes},
+and \cs{gendashed},
\begin{cd}\pagelabel{doubledraw}
\cs{doubledraw}\oarg{\meta{sep}}\oarg{\meta{color}}$\ldots$
@@ -3012,8 +3016,8 @@ with dots. The diameter of the dots is the \MF{} variable \mfc{shadewd},
set by the macro \cs{shadewd}\marg{\meta{size}}. Normally this is
\dim{0.5bp}. The optional argument specifies the spacing between (the
centers of) the dots, which defaults to the \TeX{} dimension
-\cs{shadespace}, initially \dim{1pt}. If \cs{shadespace} is less than
-\mfc{shadewd}, the closed path is filled with black, as if with
+\cs{shadespace}, initially \dim{1pt}. If \mfc{shadewd} is larger than
+\cs{shadespace}, the closed path is filled with black, as if with
\cs{gfill}. Under \MP{} this macro actually fills the path's interior
with a shade of gray. The shade to use is computed based on
\cs{shadespace} and \mfc{shadewd}. The default values of these
@@ -3086,13 +3090,13 @@ These rendering macros are just \cs{thatch} with predefined values of
the angle. \cs{lhatch} fills the region with left slanted lines (from
upper left to lower right). It is exactly the same as
\begin{display}
-\cs{thatch}\oarg{\meta{hatchsp},-45}\oarg{\meta{color}}$\ldots$
+ \cs{thatch}\oarg{\meta{hatchsp},-45}\oarg{\meta{color}}$\ldots$
\end{display}
\cs{rhatch} draws right slanted lines (lower left to upper right). It is
exactly the same as
\begin{display}
-\cs{thatch}\oarg{\meta{hatchsp},45}\oarg{\meta{color}}$\ldots$
+ \cs{thatch}\oarg{\meta{hatchsp},45}\oarg{\meta{color}}$\ldots$
\end{display}
\cs{hatch} (\cs{xhatch} is a synonym) draws lines in a cross-hatched
@@ -3128,20 +3132,23 @@ 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.
-For example, after \cs{setrender}\marg{\cs{dashed}\cs{shade}} the
-command \cs{circle}\marg{(0,0),1} produces a shaded circle with a dashed
-outline. Any explicit rendering prefix overrides this default.
+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.
+
\subsection{Examples}\label{examples}
It may be instructive, for the purpose of understanding the syntax of
\emph{shape-modifier and rendering prefixes}, to consider two examples:
\begin{ex}
- \cs{draw}\cs{gfill}\oarg{red}\cs{lclosed}\cs{polyline}\marg{$\ldots$}
+ \cs{draw}\cs{gfill}\oarg{red}\cs{lclosed}\cs{polyline}\marg{$\ldots$}
\end{ex}
which fills inside a polygon and draws its outline; and
\begin{ex}
- \cs{gfill}[red]\cs{lclosed}\cs{draw}\cs{polyline}\marg{$\ldots$}
+ \cs{gfill}[red]\cs{lclosed}\cs{draw}\cs{polyline}\marg{$\ldots$}
\end{ex}
which draws all of the outline \emph{except} the line segment supplied
by \cs{lclosed}, then fills the interior. Thus, in the first case the
@@ -3254,16 +3261,16 @@ function will be smooth with a tension equal to the number. See the
tension. The default \meta{spec} depends on the purpose of the macro.
One compulsory argument contains three values \meta{min}, \meta{max} and
-\meta{step} separated by commas. The independent variable of a function
+\meta{step} separated by commas. The independent variable of a function
starts at the value \meta{min} and steps by \meta{step} until reaching
-\meta{max}. If \meta{max}${}-{}$\meta{min} is not a whole number of
-steps, then round$((\meta{max}-\meta{min})/\meta{step})$ equal steps are
-used. One may have to experiment with the size of \meta{step}, since
-\MF{} merely connects the points corresponding to these steps with what
-\emph{it} considers to be a smooth curve. Smaller \meta{step} gives
-better accuracy, but too small may cause the curve to exceed \MF{}'s
-capacity or slow down its processing. Increasing the tension may help
-keep the curve in line, but at the expense of reduced smoothness.
+\meta{max}. If (\meta{max}${}-{}$\meta{min})/\meta{step} is not a whole
+number, the nearest whole number of equal steps are used. One may have
+to experiment with the size of \meta{step}, since \MF{} merely connects
+the points corresponding to these steps with what \emph{it} considers to
+be a smooth curve. Smaller \meta{step} gives better accuracy, but too
+small may cause the curve to exceed \MF{}'s capacity or slow down its
+processing. Increasing the tension may help keep the curve in line, but
+at the expense of reduced smoothness.
There are one or more subsequent arguments, each of which is a \MF{}
function or expression as described above. All the macros are figure
@@ -3413,6 +3420,12 @@ shading. However, drawing the boundary is often needed:
\end{verbatim}
shades one loop of the 4-petal rosette, and then draws it.
+The next sets of macros are similar to the previous function plotting
+macros, but don't fit the \meta{max}, \meta{min} \meta{step} model for
+the first argument. For the first (\cs{levelcurve}) this is a limitation
+of the task being performed. For the others (\cs{DEgraph},
+\cs{DEtrajectory}) it is a design choice.
+
\begin{cd}\pagelabel{levelcurve}
\cs{levelcurve}\oarg{\meta{spec}}\marg{\meta{seed},\meta{step}}
\marg{\meta{inequality}}%
@@ -3476,6 +3489,72 @@ The algorithm used will produce imprecise results if there are two
points on the curve closer than \meta{step} in straight-line distance,
but much further apart when measured along the curve.
+\begin{cd}\pagelabel{DEgraph}
+\cs{DEgraph}\oarg{\meta{spec}}%
+ \marg{\meta{$x_0$},\meta{$y_0$},\meta{$\Delta s$},\meta{$N$}}%
+ \marg{$f(\mathtt{x},\mathtt{y})$}\\
+\cs{DEtrajectory}\oarg{\meta{spec}}%
+ \marg{\meta{$p_0$},\meta{$\Delta s$},\meta{$N$}}%
+ \marg{$\mathbf{F}(\mathtt{x},\mathtt{y},\mathtt{t})$}%
+\index{DEgraph@\cs{DEgraph}}%
+\index{DEtrajectory@\cs{DEtrajectory}}%
+\end{cd}
+
+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\,.
+$$
+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
+increment in the $x$ variable. Rather is is (roughly) the distance from
+one point to the next along the graph as \MF{} computes them. That is,
+\MF{} computes using a variable $x$-step $\Delta x$, chosen so that
+$\sqrt{\Delta x^2 + \Delta y^2}$ is approximately \meta{$\Delta s$}. The
+algorithm used is a modified 4-step Ringe-Kutta method.
+
+The second macro, \cs{DEtrajectory} draws the path traced by the
+solution $(x(t),y(t))$ of
+$$
+ \left( \frac{dx}{dt},\frac{dy}{dt} \right) = \mathbf{F}(x,y,t)\,,
+ \quad (x(0),y(0)) = p_0\,.
+$$
+This is not a \emph{graph}, since the dependence on $t$ cannot be shown
+in two dimensions (a third dimension would be needed). The parameter
+\meta{$p_0$} should be an ordered pair of numbers, the \meta{$\Delta s$} and
+\meta{$N$} are as for \cs{DEgraph}. The function $\mathbf{F}(x,y,t)$
+should be either a pair-valued expression or an ordered pair of numeric
+expressions. The variables must be literally \texttt{x}, \texttt{y} and
+\texttt{t}. The expressions do not have to explicitly depend on these
+variables. In fact, the \cs{DEgraph} macro is implemented using the same
+internal macro as \cs{DEtrajectory} with $\mathbf{F}(x,y,t) = (1,
+f(x,y))$ and $p_0 = (x_0,y_0)$.
+
+Notice that the trajectory starts at $t=0$. If you need some other
+starting value $t=a$, then replace $t$ in the formula for
+$\mathbf{F}(x,y,t)$ with $(t+a)$.
+
+It is possible to use a negative value of $\Delta s$ in both these
+macros. For \cs{DEgraph} this produces the graph to the left of $x=x_0$,
+and for \cs{DEtrajectory} it produces the trajectory with time running
+backward. For the latter, it is also equivalent to replacing
+$\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
+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.
+
+If you want to use \mfp{} to illustrate the results of the standard
+Runge-Kutta method or other methods, you can use the \prog{mfpic4ode}
+package. That package also includes the Euler method and the two-step
+Runge-Kutta method. It loads \mfp{} if it has not already been loaded.
+Like \mfp{}, it works in plain \TeX{} (with \verb$\input mfpic4ode$) or
+\LaTeX{} (with \verb$\usepackage{mfpic4ode}$).
+
+
\subsection{Plotting external data files}\label{external}
\begin{cd}\pagelabel{datafile}
@@ -3734,16 +3813,16 @@ below can be used to change the default dashes, colors, or symbols.
The first argument of \cs{reconfigureplot} is the rendering method to be
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 previously defined through the use of
-\cs{dashpattern}. The colors can be any names already known to \MP{}, or
-defined through \cs{mfpdefinecolor}. The symbols can be any of those
-listed with the \cs{plotsymbol} command (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.
+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
+\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.
Using \cs{reconfigureplot}\marg{colors} under the \opt{metafont} option
will have no effect, but may produce an error from \MF{} unless the
@@ -4236,8 +4315,8 @@ command should not be used \emph{inside} an \env{mfpic} environment.)
The next picture will not be placed, but saved in the box for later use.
This is primarily intended as a convenience. One \emph{could} use
\begin{ex}
- \cs{savebox}\marg{\meta{picname}}\marg{\meta{entire
- \env{mfpic} environment}},
+ \cs{savebox}\marg{\meta{picname}}\marg{\meta{entire \env{mfpic}
+ environment}},
\end{ex}
but \cs{savepic} avoids having to place the \env{mfpic} environment in
braces, and avoids one extra level of \TeX{} grouping. It also avoids
@@ -4468,7 +4547,7 @@ Here are some examples of the use of \cs{store} and \cs{mfobj}.
% one outline:
\store{MyTriang}{\polyline{(-.5,-.5),(.5,-.5),(0,.5),(-.5,-.5)}
% one solid:
-\store{MySolidTriang}{\polygon{(-.5,-.5),(.5,-.5),(0,.5)}
+\store{MySolidTriang}\polygon{(-.5,-.5),(.5,-.5),(0,.5)}
% Use them as symbols:
\plotsymbols{MyTriang}{(0,0),(2,2)}
\arrowmid{MySolidTriang}\polyline{(1,1),(0,2)}
@@ -5721,7 +5800,7 @@ true. Example:
\mfcmd{R:=R/2}
\endmfpwhile
\end{verbatim}
-There are no \mfp{} command to \emph{systematically} change a variable,
+There are no \mfp{} commands to \emph{systematically} change a variable,
so in this example we have resorted to directly writing a \MF{} assignment
command via \cs{mfcmd} (see subsection~\ref{mfcode} above) that reduces
\mfc{R} by half. The loop will be executed with \mfc{R} having the
@@ -5748,7 +5827,10 @@ not contain an \cs{mfpuntil} command, then the \cs{endmfploop} command
will generate a warning message. If the warning is ignored, and the user
has not otherwise arranged for loop termination,%
\footnote{Perhaps by means of \cs{mfsrc} commands. It is because of
- this possibility that only a warning is produced and not an error.}
+ this possibility that only a warning is produced and not an error.
+ If the warning becomes annoying, adding \cs{mfpuntil\marg{false}} to
+ the loop will silence it. This command will never break the loop
+ because the condition \mfc{false} (of course) never becomes true.}
the \file{.mf} file will contain an infinite loop. The \cs{mfpuntil}
command will break the loop at whatever point it occurs. Example:
\begin{verbatim}
@@ -5765,11 +5847,11 @@ true, and the break occurs before the next rectangle is drawn. Note that
any \cs{mfpwhile} could be encoded with \cs{mfploop}. In fact, the code
written to the output file by
\begin{display}
-\cs{mfpwhile}\marg{\meta{condition}}
+ \cs{mfpwhile}\marg{\meta{condition}}
\end{display}
is identical to that written by
\begin{display}
-\cs{mfploop}\cs{mfpuntil}\marg{not \meta{condition}}
+ \cs{mfploop}\cs{mfpuntil}\marg{not \meta{condition}}
\end{display}
The command \cs{mfpuntil} can also be used in \env{mfpfor} and
@@ -5879,9 +5961,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{display}
- \cs{global}\cs{assignmfvalue}
-\end{display}
+\begin{ex}
+ \cs{global}\cs{assignmfvalue}
+\end{ex}
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.
@@ -6067,16 +6149,16 @@ further dicussion.
\end{cd}
With the \opt{metapost} option, when you write
-\cs{opengraphsfile}\marg{figs}, a file \file{figs.mp} is created. By
-default, running \MP{} on it results in files named \file{figs.1},
-\file{figs.2}, etc. Recent \MP{} allows the output filenames to be
-modified. As of \mfp{} version 1.00, you can do this to some extent from
-your \file{.tex} file. One needs to define a template that tells \MP{}
-how to construct the output file name from the `jobname' and the figure
-number. This is done with the above command. In \meta{template} you can
-put any plain characters, plus the two special tokens: \verb$\_$ and
-\verb$\#$. Each figure's filename is constructed by replacing these
-tokens with the \MP{} jobname and the figure number, respectively. For
+\cs{opengraphsfile}\marg{figs}, a file \file{figs.mp} is created. By
+default, running \MP{} on it results in files named \file{figs.1},
+\file{figs.2}, etc. Recent \MP{} allows the output filenames to be
+modified. As of \mfp{} version 1.00, you can do this to some extent from
+your \file{.tex} file. One needs to define a template that tells \MP{}
+how to construct the output file name from the `jobname' and the figure
+number. This is done with the above command. In \meta{template} you can
+put any plain characters, plus the two special tokens: \verb$\_$ and
+\verb$\#$. Each figure's filename is constructed by replacing these
+tokens with the \MP{} jobname and the figure number, respectively. For
example, with the jobname \file{figs},
\begin{verbatim}
\setfilenametemplate{my\_-\#.mps}
@@ -6135,8 +6217,8 @@ with the \cs{opengraphsfile} commands reading of these booleans.
\end{cd}
This expands to the current \mfp{} version multiplied by 100. At this
-writing, it produces `\texttt{105}' because the version is 1.05. It can
-be used to test the version:
+writing, it produces `\texttt{\mfpicversion}' because the version is
+\mfpversion. It can be used to test the version:
\begin{verbatim}
\ifx\mfpicversion\undefined \def\mfpicversion{0}\fi
\ifnum\mfpicversion<70 ... \else ... \fi
@@ -6300,11 +6382,11 @@ all later environments.
When \cs{plotdata} passes from one curve to the next, it increments a
counter and uses that counter to select a dash pattern, color, or
-symbol. It uses predefined dash patterns named \mfc{dashtype0} through
-\mfc{dashtype5}, or predefined colors named \mfc{colortype0} through
-\mfc{colortype7}, or predefined symbols named \mfc{pointtype0} through
-\mfc{pointtype8}. Here follows a description of each of these variables.
-These variables must not be used in the second argument of
+symbol. It uses predefined dash patterns named \mfc{dashtype0} through
+\mfc{dashtype5}, or predefined colors named \mfc{colortype0} through
+\mfc{colortype7}, or predefined symbols named \mfc{pointtype0} through
+\mfc{pointtype8}. Here follows a description of each of these variables.
+These variables must not be used in the second argument of
\cs{reconfigureplot}, whose purpose is to redefine these variables.
\medskip
@@ -6379,9 +6461,9 @@ 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
-can be greater (\mfc{sin (2*2048)} will cause no error), but final,
-stored results are subject to the limit. An \mfp{} example that
+\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:
\begin{verbatim}
\mfpicunit 1mm
@@ -6486,8 +6568,8 @@ occurrence. Example:
This adds the dashed outline to the filled rectangle. That is, first the
rectangle is defined, then it is filled, then the outline is drawn in
dashed lines. This makes a difference when colors other than black are
-used. Drawing is done with the center of the virtual pen stroked down
-the middle of the boundary, so half of its width falls inside the
+used. Drawing is done with the center of the virtual pen stroked along
+the boundary curve(s), so half of its width falls inside the
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.
@@ -6576,10 +6658,12 @@ running the macro \cs{setfilename}\index{setfilename@\cs{setfilename}}.
The command \cs{setfilename} gets two arguments: the name of the \MP{}
output file (set in the \cs{opengraphsfile} command) without extension,
and the number of the picture. The default definition of
-\cs{setfilename} merely inserts a dot between the two arguments. That is
-\cs{setfilename}\marg{fig}\marg{1} produces \file{fig.1}. You can
-redefine this behavior also. Any changes to \cs{setfilename} must come
-after the \mfp{} macros are input and before the
+\cs{setfilename} merely inserts a dot between the two arguments.%
+ \footnote{Unless modified by \cs{setfilenametemplate}, of course.
+ See subsection~\ref{misc}.}
+That is \cs{setfilename}\marg{fig}\marg{1} produces \file{fig.1}. You
+can redefine this behavior also. Any changes to \cs{setfilename} must
+come after the \mfp{} macros are input and before the
\cs{opengraphsfile} command. Any changes to \cs{setmfpicgraphic} must
come after the \mfp{} macros are input and before any \cs{mfpic}
commands, but it is best to place it before the \cs{opengraphsfile}
@@ -6609,7 +6693,7 @@ This author has personal knowledge of only 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 me
+Journal, vol.~35, pages 84--92. Oddly enough, it was McGregor and not I
who chose to use \mfp{} for the illustrations.
There are at least two major publications where \mfp{} has garnered more
@@ -6644,7 +6728,7 @@ given for \cs{wedge}:
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 commands
+coordinate pairs to rectangular coordinates, so the commands
\cs{plrcurve}, \cs{plrcyclic}, \cs{plrlines} and \cs{plrpoint} were
dropped from \mfp{}. Now use
\begin{ex}
@@ -6713,23 +6797,24 @@ mostly incompatible with the description in this manual. Fortunately, it
is accompanied by the appropriate versions of files \file{mfpic.tex} and
\file{grafbase.mf}. Unfortunately, the names conflict with the current
filenames and so they should only be used in circumstances where no
-substitution will occur, say in a local directory with the other sources
-for the document being produced. Moreover, the documentation in this
-manual may not apply to the code produced. However the information in
-\textit{\TeX{} Unbound} may apply.
+substitution will occur, say in a local directory together with the
+other sources for the document being produced. Moreover, the
+documentation in this manual may not apply to the code produced. However
+the information in \textit{\TeX{} Unbound} may apply.
There exist a package, \prog{circuit\_macros}, that can produce a
variety of output formats, one of which is \mfp{} code. One writes a
file (don't ask me what it consists of) and apparently processes it with
-\prog{m4} and then \prog{dpic} to produce the output. The \mfp{} code
-produced appears to be compatible with the current \mfp{}.
+\prog{m4} and then (perhaps) \prog{dpic} to produce the output. The
+\mfp{} code produced appears to be compatible with the current \mfp{}.
\renewcommand\mfpindexheading{%
\section{Index of commands, options and parameters.}}
\let\oldcs\cs
\renewcommand{\cs}[1]{\leavevmode\mytt{\llap{\char`\\}#1}}
-\InputIfFileExists{mfpic-doc.ind}{}{\mfpindexheading}
+\renewcommand\headingprefix[1]{\textbf{\large #1}}
+\InputIfFileExists{\jobname.ind}{}{\mfpindexheading}
\let\cs\oldcs
@@ -6764,6 +6849,8 @@ produced appears to be compatible with the current \mfp{}.
\item \cs{curve}, \cs{closedcurve}, \pageref{curve}
\item \cs{cyclic}, \pageref{curve}
\item \cs{datafile}, \pageref{datafile}
+ \item \cs{DEgraph}, \pageref{DEgraph}
+ \item \cs{DEtrajectory}, \pageref{DEgraph}
\item \cs{ellipse}, \pageref{ellipse}
\item \cs{fcncurve}, \pageref{fcncurve}
\item \cs{fcnspline}, \pageref{fcnspline}
diff --git a/Master/texmf-dist/metafont/mfpic/grafbase.mf b/Master/texmf-dist/metafont/mfpic/grafbase.mf
index 10f23e9688f..87492e00849 100644
--- a/Master/texmf-dist/metafont/mfpic/grafbase.mf
+++ b/Master/texmf-dist/metafont/mfpic/grafbase.mf
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2010, Daniel H. Luecking
+%% Copyright 2002--2011, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -21,9 +21,6 @@
%% is Daniel H. Luecking. There are several Base Interpreters associated
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
-%%% File: grafbase.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
if (known grafbaseversion) or (known grafbase):
message "Grafbase (" & jobname & "): You have loaded grafbase more "
& "than once! Please make sure that it is loaded only once.";
@@ -32,7 +29,7 @@ fi
boolean grafbase; grafbase := true;
string fileversion, filedate;
-fileversion := "1.05"; filedate := "2010/06/10";
+fileversion := "1.06"; filedate := "2011/02/25";
message " Loading grafbase macros, version " & fileversion & ", " &
filedate & ".";
@@ -60,7 +57,7 @@ def checkversions (expr g)=
fi
enddef;
-checkversions (105);
+checkversions (106);
if unknown base_name : input plain;
elseif not string base_name: input plain;
@@ -1642,7 +1639,7 @@ enddef;
vardef gettime (suffix arr, ct) (expr lngth) =
setnumeric (_gtl) emax (arr[ct], emin (arr[arr], lngth));
setsplit (_s) segment_split;
- forever: exitif ( (arr[ct] <= _gtl) and (_gtl <= arr[ct+1]) );
+ forever: exitif inrange (arr[ct], arr[ct+1]) (_gtl);
next ct;
endfor
if arr[ct] = arr[ct+1]: ct
@@ -1869,11 +1866,17 @@ vardef borderrect =
rect((xlow,ylow),(xhigh,yhigh))
enddef;
+vardef between (expr A, B, X) = (A < X) and (X < B) enddef;
+vardef inrange (expr A, B, X) = (A <= X) and (X <= B) enddef;
+
vardef inbounds (expr Z) =
- (xpart Z >= xlow ) and (ypart Z >= ylow ) and
- (xpart Z <= xhigh) and (ypart Z <= yhigh)
+ inrange (xlow, xhigh) (xpart Z) and inrange (ylow, yhigh) (ypart Z)
enddef;
+tertiarydef X isbetween P = between (xpart P, ypart P, X) enddef;
+tertiarydef X isinrange P = inrange (xpart P, ypart P, X) enddef;
+tertiarydef P contains X = between (xpart P, ypart P, X) enddef;
+
numeric inside, outside, centered, onleft, onright, ontop, onbottom;
inside := -2;
outside := -1;
@@ -1955,7 +1958,7 @@ def plrvectorfield (expr len, rsp, tsp) (text fcn) (text cond) =
vardef _vf (expr r,t) = ((0,0)--(fcn)) shifted (r*dir t) enddef;
vardef _is_OK (expr r,t) =
save _X, _Y; _X := r*cosd t; _Y := r*sind t;
- (cond) and (_A < _X) and (_X < _B) and (_C < _Y) and (_Y < _D)
+ (cond) and between (_A, _B) (_X) and between (_C, _D) (_Y)
enddef;
mkplrvectorfield (len, rsp, tsp) (_vf, _is_OK);
enddef;
@@ -2053,7 +2056,7 @@ def getpolarbounds =
if rmax < r[j]: rmax := r[j]; fi
endfor
rmin := 0;
- if (xneg < 0) and (xpos > 0) and (yneg < 0) and (ypos > 0):
+ if between (xneg, xpos) (0) and between (yneg, ypos) (0):
tmin := 0; tmax := 360;
elseif (p0 = origin): tmin := 0; tmax := 90;
elseif (p1 = origin): tmin := -90; tmax := 0;
@@ -2066,9 +2069,9 @@ def getpolarbounds =
if tmax < t: tmax := t; fi
if tmin > t: tmin := t; fi
endfor
- if (xneg < 0) and (0 < xpos):
+ if between (xneg, xpos) (0):
rmin := emin (abs(yneg), abs(ypos));
- elseif (yneg < 0) and (0 < ypos):
+ elseif between (yneg, ypos) (0):
rmin := emin (abs(xneg), abs(xpos));
else:
rmin := min (r0, r1, r2, r3);
@@ -2147,8 +2150,10 @@ vardef anglefromto (expr u, v) =
enddef;
vardef cornerangle (expr A, B, C) =
- if (A = B) and (B = C) : 60
- elseif (A=B) or (A=C) : 90
+ if (A = B) or (A = C) :
+ if (B = C) : 60
+ else: 90
+ fi
else: anglefromto (B - A, C - A)
fi
enddef;
@@ -2704,14 +2709,14 @@ vardef pshcircle (expr disk, ctr, rad) =
if disk:
if rad >= 1 :
if rad > 1:
- GBerrmsg ("Impossible pseudohyperbolic circle.")
+ GBerrmsg ("Impossible radius of pseudohyperbolic circle.")
"The radius of a pseudohyperbolic circle can be at most 1.";
fi
circle ((0,0),1)
elseif abs(ctr) >= 1 :
if abs(ctr) > 1:
- GBerrmsg ("Impossible pseudohyperbolic circle.")
- "The center of a pseudohyperbolic circle must be in"
+ GBerrmsg ("Impossible center of pseudohyperbolic circle.")
+ "The center of a pseudohyperbolic circle must be in "
& "the unit disk.";
fi
onepointpath (true,ctr)
@@ -2731,7 +2736,7 @@ vardef pshcircle (expr disk, ctr, rad) =
elseif ypart ctr <= 0:
if ypart ctr < 0:
GBerrmsg ("Impossible pseudohyperbolic circle.")
- "The center of a pseudohyperbolic circle must be in"
+ "The center of a pseudohyperbolic circle must be in "
& "the upper half-plane.";
fi
onepointpath (true,ctr)
@@ -2829,8 +2834,7 @@ tolerancefactor := .02;
vardef mklevelset (expr sm, tens, X, Y, t, a, b, c, d) =
save _inside_;
vardef _inside_ (expr U, V) =
- inside_levelset (U, V) and (a < U) and (U < b)
- and (c < V) and (V < d)
+ inside_levelset (U, V) and between (a, b) (U) and between (c, d) (V)
enddef;
if not _inside_ (X, Y):
GBwarn "Invalid seed point for levelset.";
@@ -2881,6 +2885,56 @@ vardef tlevelset (expr smth, tens, seed, seg) (text cond) =
(xneg, xpos, yneg, ypos)
enddef;
+def RKIV (expr sm) = tRKIV (sm, default_tension)
+enddef;
+vardef tRKIV (expr sm, tens, zstart, ds, N) (text _RHS_) =
+ save _trj, _ztr, _dz, _ztmp, _ctm;
+ pair _trj[], % The trajectory
+ _ztr, % current point
+ _dz[], % array[4] of displacements
+ _ztmp; % current point for calculating velocity
+ _trj := N+1; % ultimate size of _trj array
+ _trj1 := _ztr := zstart;
+ save _tt, % current time
+ _dt, % current time step
+ _th; % current time plus half a step
+ _tt := 0;
+ for _idx := 2 upto _trj:
+ _dt := ds/emax(1,abs(_RHS_(_tt,_ztr)));
+ _th := _tt + .5_dt;
+ _dz1 := _dt*_RHS_(_tt, _ztr); % displacement based on current point
+ _ztmp := _ztr + .5_dz1; % 1st midpoint
+ % use _th instead of twice calculating (_tt + .5_dt)
+ _dz2 := _dt*_RHS_(_th, _ztmp); % displacement based on 1st midpoint
+ _ztmp := _ztr + .5_dz2; % 2nd midpoint
+ _dz3 := _dt*_RHS_(_th, _ztmp); % displacement based on 2nd midpoint
+ _ztmp := _ztr + _dz3; % temporary end point
+ % get time for next loop now since we need it right away in next line:
+ _tt := _tt + _dt;
+ _dz4 := _dt*_RHS_(_tt, _ztmp); % displacement based on end point
+ % get next point
+ _ztr := _ztr + (_dz1 + 2_dz2 + 2_dz3 + _dz4)/6;
+ _trj[_idx] := _ztr;
+ endfor
+ mkpath (sm, tens, false, _trj)
+enddef;
+
+def xyRKIV (expr sm) = txyRKIV (sm, default_tension)
+enddef;
+vardef txyRKIV (expr sm, tens, zstart, ds, N) (text _RHS_) =
+ save _fgxy, __fgxy;
+ vardef __fgxy (expr t, x, y) = _RHS_ enddef;
+ vardef _fgxy (expr t, Z) = __fgxy(t, xpart Z, ypart Z) enddef;
+ tRKIV (sm, tens, zstart, ds, N) (_fgxy)
+enddef;
+
+def odeRKIV (expr sm) = todeRKIV (sm, default_tension)
+enddef;
+vardef todeRKIV (expr sm, tens, xstart, ystart, ds, N)
+(text _fxy) =
+ txyRKIV (sm, tens, (xstart, ystart), ds, N) ((1, _fxy))
+enddef;
+
vardef lclosed expr f =
f
if not cycle f:
diff --git a/Master/texmf-dist/metapost/mfpic/dvipsnam.mp b/Master/texmf-dist/metapost/mfpic/dvipsnam.mp
index 2a3ae21c8a8..ce41b42cd0a 100644
--- a/Master/texmf-dist/metapost/mfpic/dvipsnam.mp
+++ b/Master/texmf-dist/metapost/mfpic/dvipsnam.mp
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2010, Daniel H. Luecking
+%% Copyright 2002--2011, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -21,9 +21,6 @@
%% is Daniel H. Luecking. There are several Base Interpreters associated
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
-%%% File: grafbase.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
if unknown grafbaseversion:
if unknown mpversion:
let cmykcolor=color;
diff --git a/Master/texmf-dist/metapost/mfpic/grafbase.mp b/Master/texmf-dist/metapost/mfpic/grafbase.mp
index 1b7cf501f82..ad20b43df1b 100644
--- a/Master/texmf-dist/metapost/mfpic/grafbase.mp
+++ b/Master/texmf-dist/metapost/mfpic/grafbase.mp
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2010, Daniel H. Luecking
+%% Copyright 2002--2011, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -21,9 +21,6 @@
%% is Daniel H. Luecking. There are several Base Interpreters associated
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
-%%% File: grafbase.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
if (known grafbaseversion) or (known grafbase):
message "Grafbase (" & jobname & "): You have loaded grafbase more "
& "than once! Please make sure that it is loaded only once.";
@@ -32,7 +29,7 @@ fi
boolean grafbase; grafbase := true;
string fileversion, filedate;
-fileversion := "1.05"; filedate := "2010/06/10";
+fileversion := "1.06"; filedate := "2011/02/25";
message " Loading grafbase macros, version " & fileversion & ", " &
filedate & ".";
@@ -60,7 +57,7 @@ def checkversions (expr g)=
fi
enddef;
-checkversions (105);
+checkversions (106);
if unknown base_name : input plain;
elseif not string base_name: input plain;
@@ -215,7 +212,8 @@ if has_cmyk :
enddef;
vardef makergb primary clr =
colorchoice (clr)(rgbblack)(rgbgray(clr))(clr)
- (cmyktorgb(cyanpart clr, magentapart clr, yellowpart clr, blackpart clr))
+ (cmyktorgb(cyanpart clr, magentapart clr, yellowpart clr,
+ blackpart clr))
enddef;
vardef makegray primary clr =
colorchoice (clr)(grayscaleblack)(grayscalegray(clr))
@@ -1601,7 +1599,7 @@ enddef;
vardef gettime (suffix arr, ct) (expr lngth) =
setnumeric (_gtl) emax (arr[ct], emin (arr[arr], lngth));
setsplit (_s) segment_split;
- forever: exitif ( (arr[ct] <= _gtl) and (_gtl <= arr[ct+1]) );
+ forever: exitif inrange (arr[ct], arr[ct+1]) (_gtl);
next ct;
endfor
if arr[ct] = arr[ct+1]: ct
@@ -1832,11 +1830,17 @@ vardef borderrect =
rect((xlow,ylow),(xhigh,yhigh))
enddef;
+vardef between (expr A, B, X) = (A < X) and (X < B) enddef;
+vardef inrange (expr A, B, X) = (A <= X) and (X <= B) enddef;
+
vardef inbounds (expr Z) =
- (xpart Z >= xlow ) and (ypart Z >= ylow ) and
- (xpart Z <= xhigh) and (ypart Z <= yhigh)
+ inrange (xlow, xhigh) (xpart Z) and inrange (ylow, yhigh) (ypart Z)
enddef;
+tertiarydef X isbetween P = between (xpart P, ypart P, X) enddef;
+tertiarydef X isinrange P = inrange (xpart P, ypart P, X) enddef;
+tertiarydef P contains X = between (xpart P, ypart P, X) enddef;
+
numeric inside, outside, centered, onleft, onright, ontop, onbottom;
inside := -2;
outside := -1;
@@ -1918,7 +1922,7 @@ def plrvectorfield (expr len, rsp, tsp) (text fcn) (text cond) =
vardef _vf (expr r,t) = ((0,0)--(fcn)) shifted (r*dir t) enddef;
vardef _is_OK (expr r,t) =
save _X, _Y; _X := r*cosd t; _Y := r*sind t;
- (cond) and (_A < _X) and (_X < _B) and (_C < _Y) and (_Y < _D)
+ (cond) and between (_A, _B) (_X) and between (_C, _D) (_Y)
enddef;
mkplrvectorfield (len, rsp, tsp) (_vf, _is_OK);
enddef;
@@ -2016,7 +2020,7 @@ def getpolarbounds =
if rmax < r[j]: rmax := r[j]; fi
endfor
rmin := 0;
- if (xneg < 0) and (xpos > 0) and (yneg < 0) and (ypos > 0):
+ if between (xneg, xpos) (0) and between (yneg, ypos) (0):
tmin := 0; tmax := 360;
elseif (p0 = origin): tmin := 0; tmax := 90;
elseif (p1 = origin): tmin := -90; tmax := 0;
@@ -2029,9 +2033,9 @@ def getpolarbounds =
if tmax < t: tmax := t; fi
if tmin > t: tmin := t; fi
endfor
- if (xneg < 0) and (0 < xpos):
+ if between (xneg, xpos) (0):
rmin := emin (abs(yneg), abs(ypos));
- elseif (yneg < 0) and (0 < ypos):
+ elseif between (yneg, ypos) (0):
rmin := emin (abs(xneg), abs(xpos));
else:
rmin := min (r0, r1, r2, r3);
@@ -2110,8 +2114,10 @@ vardef anglefromto (expr u, v) =
enddef;
vardef cornerangle (expr A, B, C) =
- if (A = B) and (B = C) : 60
- elseif (A=B) or (A=C) : 90
+ if (A = B) or (A = C) :
+ if (B = C) : 60
+ else: 90
+ fi
else: anglefromto (B - A, C - A)
fi
enddef;
@@ -2667,14 +2673,14 @@ vardef pshcircle (expr disk, ctr, rad) =
if disk:
if rad >= 1 :
if rad > 1:
- GBerrmsg ("Impossible pseudohyperbolic circle.")
+ GBerrmsg ("Impossible radius of pseudohyperbolic circle.")
"The radius of a pseudohyperbolic circle can be at most 1.";
fi
circle ((0,0),1)
elseif abs(ctr) >= 1 :
if abs(ctr) > 1:
- GBerrmsg ("Impossible pseudohyperbolic circle.")
- "The center of a pseudohyperbolic circle must be in"
+ GBerrmsg ("Impossible center of pseudohyperbolic circle.")
+ "The center of a pseudohyperbolic circle must be in "
& "the unit disk.";
fi
onepointpath (true,ctr)
@@ -2694,7 +2700,7 @@ vardef pshcircle (expr disk, ctr, rad) =
elseif ypart ctr <= 0:
if ypart ctr < 0:
GBerrmsg ("Impossible pseudohyperbolic circle.")
- "The center of a pseudohyperbolic circle must be in"
+ "The center of a pseudohyperbolic circle must be in "
& "the upper half-plane.";
fi
onepointpath (true,ctr)
@@ -2792,8 +2798,7 @@ tolerancefactor := .02;
vardef mklevelset (expr sm, tens, X, Y, t, a, b, c, d) =
save _inside_;
vardef _inside_ (expr U, V) =
- inside_levelset (U, V) and (a < U) and (U < b)
- and (c < V) and (V < d)
+ inside_levelset (U, V) and between (a, b) (U) and between (c, d) (V)
enddef;
if not _inside_ (X, Y):
GBwarn "Invalid seed point for levelset.";
@@ -2844,6 +2849,56 @@ vardef tlevelset (expr smth, tens, seed, seg) (text cond) =
(xneg, xpos, yneg, ypos)
enddef;
+def RKIV (expr sm) = tRKIV (sm, default_tension)
+enddef;
+vardef tRKIV (expr sm, tens, zstart, ds, N) (text _RHS_) =
+ save _trj, _ztr, _dz, _ztmp, _ctm;
+ pair _trj[], % The trajectory
+ _ztr, % current point
+ _dz[], % array[4] of displacements
+ _ztmp; % current point for calculating velocity
+ _trj := N+1; % ultimate size of _trj array
+ _trj1 := _ztr := zstart;
+ save _tt, % current time
+ _dt, % current time step
+ _th; % current time plus half a step
+ _tt := 0;
+ for _idx := 2 upto _trj:
+ _dt := ds/emax(1,abs(_RHS_(_tt,_ztr)));
+ _th := _tt + .5_dt;
+ _dz1 := _dt*_RHS_(_tt, _ztr); % displacement based on current point
+ _ztmp := _ztr + .5_dz1; % 1st midpoint
+ % use _th instead of twice calculating (_tt + .5_dt)
+ _dz2 := _dt*_RHS_(_th, _ztmp); % displacement based on 1st midpoint
+ _ztmp := _ztr + .5_dz2; % 2nd midpoint
+ _dz3 := _dt*_RHS_(_th, _ztmp); % displacement based on 2nd midpoint
+ _ztmp := _ztr + _dz3; % temporary end point
+ % get time for next loop now since we need it right away in next line:
+ _tt := _tt + _dt;
+ _dz4 := _dt*_RHS_(_tt, _ztmp); % displacement based on end point
+ % get next point
+ _ztr := _ztr + (_dz1 + 2_dz2 + 2_dz3 + _dz4)/6;
+ _trj[_idx] := _ztr;
+ endfor
+ mkpath (sm, tens, false, _trj)
+enddef;
+
+def xyRKIV (expr sm) = txyRKIV (sm, default_tension)
+enddef;
+vardef txyRKIV (expr sm, tens, zstart, ds, N) (text _RHS_) =
+ save _fgxy, __fgxy;
+ vardef __fgxy (expr t, x, y) = _RHS_ enddef;
+ vardef _fgxy (expr t, Z) = __fgxy(t, xpart Z, ypart Z) enddef;
+ tRKIV (sm, tens, zstart, ds, N) (_fgxy)
+enddef;
+
+def odeRKIV (expr sm) = todeRKIV (sm, default_tension)
+enddef;
+vardef todeRKIV (expr sm, tens, xstart, ystart, ds, N)
+(text _fxy) =
+ txyRKIV (sm, tens, (xstart, ystart), ds, N) ((1, _fxy))
+enddef;
+
vardef lclosed expr f =
f
if not cycle f:
diff --git a/Master/texmf-dist/source/generic/mfpic/grafbase.dtx b/Master/texmf-dist/source/generic/mfpic/grafbase.dtx
index 32d14a5b676..a309f242f6e 100644
--- a/Master/texmf-dist/source/generic/mfpic/grafbase.dtx
+++ b/Master/texmf-dist/source/generic/mfpic/grafbase.dtx
@@ -1,10 +1,10 @@
% \iffalse
-%%% File: grafbase.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: grafbase.dtx
+% A part of mfpic 1.06 2011/03/08
+%
% -------------------------------------------------------------------
%
-% Copyright 2002--2010, Daniel H. Luecking
+% Copyright 2002--2011, Daniel H. Luecking
%
% Mfpic may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3b of this license or (at
@@ -19,7 +19,7 @@
%
%<*driver>
\ProvidesFile{grafbase.dtx}
- [2010/06/10 v1.05. Metafont/post macros to interface with mfpic.]%
+ [2011/03/08 v1.06. Metafont/post macros to interface with mfpic.]%
\documentclass{ltxdoc}
\usepackage{docmfp}
@@ -113,7 +113,7 @@
%</driver>
%\fi
%
-% \CheckSum{1453}
+% \CheckSum{1473}
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -187,7 +187,7 @@ fi
boolean grafbase; grafbase := true;
string fileversion, filedate;
-fileversion := "1.05"; filedate := "2010/06/10";
+fileversion := "1.06"; filedate := "2011/02/25";
message " Loading grafbase macros, version " & fileversion & ", " &
filedate & ".";
@@ -236,7 +236,7 @@ def checkversions (expr g)=
fi
enddef;
-checkversions (105);
+checkversions (106);
% \end{macrocode}
%
@@ -672,11 +672,11 @@ vardef cmykgray (expr g) = cmyk(0,0,0,1 - snapto g) enddef;
% with three-way booleans (often containing nested booleans).
%
% For all three engines we require a definition of the color functions
-% \gbc{gray(g)}, \gbc{rgb(r,g,b)}, and \gbc{cmyk(c,m,y,k)}, conversion
-% functions \gbc{makegray(x)}, \gbc{makergb(x)}, amd \gbc{makecmyk(x)},
-% and the boolean \gbc{iscolor clr}. The first three have to return
-% numerics for \MF{}, colors for early \MP{}, and the associated color
-% type for recent \MP{}.
+% \gbc{gray(g)}, \gbc{rgb(r,g,b)}, and \gbc{cmyk(c,m,y,k)}, as well as
+% conversion functions \gbc{makegray(x)}, \gbc{makergb(x)}, and
+% \gbc{makecmyk(x)}, and the boolean \gbc{iscolor clr}. The first three
+% have to return numerics for \MF{}, colors for early \MP{}, and the
+% associated color type for recent \MP{}.
% \begin{macrocode}
%<*MP>
if has_cmyk :
@@ -729,7 +729,8 @@ if has_cmyk :
enddef;
vardef makergb primary clr =
colorchoice (clr)(rgbblack)(rgbgray(clr))(clr)
- (cmyktorgb(cyanpart clr, magentapart clr, yellowpart clr, blackpart clr))
+ (cmyktorgb(cyanpart clr, magentapart clr, yellowpart clr,
+ blackpart clr))
enddef;
vardef makegray primary clr =
colorchoice (clr)(grayscaleblack)(grayscalegray(clr))
@@ -4513,12 +4514,14 @@ enddef;
% Once we know what segment we are in, we determine the time by linear
% interpolation between the times corresponding to \gbc{ct} and
% \gbc{ct+1}. Note: in the \mfc{forever} loop, the exit must come before
-% the increment.
+% the increment. The function \gbc{inrange} is defined in
+% section~\ref{axes}. It checks if the third argument is between the
+% first two, or equal to one of them.
% \begin{macrocode}
vardef gettime (suffix arr, ct) (expr lngth) =
setnumeric (_gtl) emax (arr[ct], emin (arr[arr], lngth));
setsplit (_s) segment_split;
- forever: exitif ( (arr[ct] <= _gtl) and (_gtl <= arr[ct+1]) );
+ forever: exitif inrange (arr[ct], arr[ct+1]) (_gtl);
next ct;
endfor
if arr[ct] = arr[ct+1]: ct
@@ -4987,17 +4990,48 @@ vardef axisline.t = axisline.x shifted (0, yhigh) enddef;
vardef axis@# (expr len) = headpath (len, 0, 0) axisline@# enddef;
+% \end{macrocode}
+%
+% \DescribeRoutine{borderrect}
+% These are mostly for the simplification of \mfpic{} and readability of
+% code. The command \gbc{borderrect} produces the border of the picture
+% in graph coordinates, taking into account the four margins.
+%
+% \DescribeRoutine{between}
+% The boolean \gbc{between} checks if the last argument is strictly
+% between the first two (which must be in order).
+%
+% \DescribeRoutine{inrange}
+% The boolean \gbc{inrange} checks if the last argument is in the closed
+% interval determined by the first two (which must be in order).
+%
+% \DescribeRoutine{inbounds}
+% The boolean \gbc{inbounds} checks if the argument (a pair) is in
+% the closed border rectangle (\gbc{borderrect}). It is not yet used in
+% \grafbase{}, though it would seem it ought to be useful.
+% \begin{macrocode}
vardef borderrect =
rect((xlow,ylow),(xhigh,yhigh))
enddef;
+vardef between (expr A, B, X) = (A < X) and (X < B) enddef;
+vardef inrange (expr A, B, X) = (A <= X) and (X <= B) enddef;
+
vardef inbounds (expr Z) =
- (xpart Z >= xlow ) and (ypart Z >= ylow ) and
- (xpart Z <= xhigh) and (ypart Z <= yhigh)
+ inrange (xlow, xhigh) (xpart Z) and inrange (ylow, yhigh) (ypart Z)
enddef;
% \end{macrocode}
%
+% Possible binary relation versions. The last is just a reversal of the
+% order of the first. These are not yet used in \grafbase{}.
+% \begin{macrocode}
+tertiarydef X isbetween P = between (xpart P, ypart P, X) enddef;
+tertiarydef X isinrange P = inrange (xpart P, ypart P, X) enddef;
+tertiarydef P contains X = between (xpart P, ypart P, X) enddef;
+
+% \end{macrocode}
+%
% Tick marks can be on the inside or outside of a border axis,
% above or below any horizontal axes, left or right of any vertical axis
% or centered on any axis. The following numerics are merely used to
@@ -5216,7 +5250,7 @@ def plrvectorfield (expr len, rsp, tsp) (text fcn) (text cond) =
vardef _vf (expr r,t) = ((0,0)--(fcn)) shifted (r*dir t) enddef;
vardef _is_OK (expr r,t) =
save _X, _Y; _X := r*cosd t; _Y := r*sind t;
- (cond) and (_A < _X) and (_X < _B) and (_C < _Y) and (_Y < _D)
+ (cond) and between (_A, _B) (_X) and between (_C, _D) (_Y)
enddef;
mkplrvectorfield (len, rsp, tsp) (_vf, _is_OK);
enddef;
@@ -5385,7 +5419,7 @@ def getpolarbounds =
% \gbc{tmin}${} < \theta < {}$\gbc{tmax} includes the graph.
% \begin{macrocode}
rmin := 0;
- if (xneg < 0) and (xpos > 0) and (yneg < 0) and (ypos > 0):
+ if between (xneg, xpos) (0) and between (yneg, ypos) (0):
tmin := 0; tmax := 360;
elseif (p0 = origin): tmin := 0; tmax := 90;
elseif (p1 = origin): tmin := -90; tmax := 0;
@@ -5406,9 +5440,9 @@ def getpolarbounds =
% the following order: (1)~above or below, (2)~left or right, and (3)~one
% of the four corner regions.
% \begin{macrocode}
- if (xneg < 0) and (0 < xpos):
+ if between (xneg, xpos) (0):
rmin := emin (abs(yneg), abs(ypos));
- elseif (yneg < 0) and (0 < ypos):
+ elseif between (yneg, ypos) (0):
rmin := emin (abs(xneg), abs(xpos));
else:
rmin := min (r0, r1, r2, r3);
@@ -5596,8 +5630,10 @@ vardef anglefromto (expr u, v) =
enddef;
vardef cornerangle (expr A, B, C) =
- if (A = B) and (B = C) : 60
- elseif (A=B) or (A=C) : 90
+ if (A = B) or (A = C) :
+ if (B = C) : 60
+ else: 90
+ fi
else: anglefromto (B - A, C - A)
fi
enddef;
@@ -6834,14 +6870,14 @@ vardef pshcircle (expr disk, ctr, rad) =
if disk:
if rad >= 1 :
if rad > 1:
- GBerrmsg ("Impossible pseudohyperbolic circle.")
+ GBerrmsg ("Impossible radius of pseudohyperbolic circle.")
"The radius of a pseudohyperbolic circle can be at most 1.";
fi
circle ((0,0),1)
elseif abs(ctr) >= 1 :
if abs(ctr) > 1:
- GBerrmsg ("Impossible pseudohyperbolic circle.")
- "The center of a pseudohyperbolic circle must be in"
+ GBerrmsg ("Impossible center of pseudohyperbolic circle.")
+ "The center of a pseudohyperbolic circle must be in "
& "the unit disk.";
fi
onepointpath (true,ctr)
@@ -6861,7 +6897,7 @@ vardef pshcircle (expr disk, ctr, rad) =
elseif ypart ctr <= 0:
if ypart ctr < 0:
GBerrmsg ("Impossible pseudohyperbolic circle.")
- "The center of a pseudohyperbolic circle must be in"
+ "The center of a pseudohyperbolic circle must be in "
& "the upper half-plane.";
fi
onepointpath (true,ctr)
@@ -7112,8 +7148,7 @@ tolerancefactor := .02;
vardef mklevelset (expr sm, tens, X, Y, t, a, b, c, d) =
save _inside_;
vardef _inside_ (expr U, V) =
- inside_levelset (U, V) and (a < U) and (U < b)
- and (c < V) and (V < d)
+ inside_levelset (U, V) and between (a, b) (U) and between (c, d) (V)
enddef;
if not _inside_ (X, Y):
GBwarn "Invalid seed point for levelset.";
@@ -7175,6 +7210,104 @@ enddef;
% \end{macrocode}
%
+% Our next set of macros produce approximations to the solutions of
+% differential equations. While we could have several different macros
+% each using a different method (Euler, two-step Runge-Kutta, four-step
+% Runge-Kutta, etc.), our point of view is that we just want to draw a
+% reasonably accurate solution, so we only utilize one method: four-step
+% Runge-Kutta. The variations we allow are the following:
+% \begin{enumerate}
+% \item Drawing the graph of a one-dimensional differential
+% equation,
+% \[ \frac{dy}{dx} = g(x,y)\,.\]
+%
+% \item Drawing the trajectory of a two-dimensional differential
+% equation,
+% \[ \left( \frac{dx}{dt},\frac{dy}{dt} \right) =
+% (f(x,y,t), g(x,y,t))\,.\]
+% \end{enumerate}
+% The first of these is implemented using the second with $f(x,y,t) \equiv
+% 1$ and $g(x,y,t)$ not depending on $t$. The parameters passed include
+% the starting point, the step size, the number of steps and an expression
+% representing the right side of the equation.
+%
+% We do not use exactly the traditional Runge-Kutta method: we use the
+% Runge-Kutta algorithm, but with a variable step size. The time step
+% $\Delta t$ is chosen so that $|\mathbf{F}(x,y,t)|\Delta t$ equals the
+% given step size parameter, and thus the parameter passed is actually a
+% distance step. This makes drawing more stable, especially if the DE is
+% one that produces an infinite path in finite time.
+%
+% This modification is itself unstable if $|\mathbf{F}|$ is very
+% small (and impossible if it is zero), so we never use a $\Delta t$
+% larger than the given step size parameter $\Delta s$. That is, we
+% actually use $\Delta t = \Delta s/\max(1,|\mathbf{F}|)$.
+%
+% As with our other function-like paths, we offer two variants. The basic
+% version has a final text parameter which is the name of a pair-valued
+% function of a numeric (representing $t$) and a pair variable
+% (representing $x$ and $y$). The other version takes a text
+% parameter, which must be a pair-valued expression in \mfc{x}, \mfc{y}
+% and \mfc{t}. This parameter is copied into the definition text of a
+% function and then the first form is called with that function's name.
+%
+% Also like other function-like paths, we offer polygonal or smooth
+% versions controlled by a boolean argument, and the smooth versions make
+% use of a tension parameter.
+% \begin{macrocode}
+def RKIV (expr sm) = tRKIV (sm, default_tension)
+enddef;
+vardef tRKIV (expr sm, tens, zstart, ds, N) (text _RHS_) =
+ save _trj, _ztr, _dz, _ztmp, _ctm;
+ pair _trj[], % The trajectory
+ _ztr, % current point
+ _dz[], % array[4] of displacements
+ _ztmp; % current point for calculating velocity
+%
+ _trj := N+1; % ultimate size of _trj array
+ _trj1 := _ztr := zstart;
+ save _tt, % current time
+ _dt, % current time step
+ _th; % current time plus half a step
+ _tt := 0;
+ for _idx := 2 upto _trj:
+ _dt := ds/emax(1,abs(_RHS_(_tt,_ztr)));
+ _th := _tt + .5_dt;
+ _dz1 := _dt*_RHS_(_tt, _ztr); % displacement based on current point
+ _ztmp := _ztr + .5_dz1; % 1st midpoint
+ % use _th instead of twice calculating (_tt + .5_dt)
+ _dz2 := _dt*_RHS_(_th, _ztmp); % displacement based on 1st midpoint
+ _ztmp := _ztr + .5_dz2; % 2nd midpoint
+ _dz3 := _dt*_RHS_(_th, _ztmp); % displacement based on 2nd midpoint
+ _ztmp := _ztr + _dz3; % temporary end point
+ % get time for next loop now since we need it right away in next line:
+ _tt := _tt + _dt;
+ _dz4 := _dt*_RHS_(_tt, _ztmp); % displacement based on end point
+ % get next point
+ _ztr := _ztr + (_dz1 + 2_dz2 + 2_dz3 + _dz4)/6;
+ _trj[_idx] := _ztr;
+ endfor
+ mkpath (sm, tens, false, _trj)
+enddef;
+
+def xyRKIV (expr sm) = txyRKIV (sm, default_tension)
+enddef;
+vardef txyRKIV (expr sm, tens, zstart, ds, N) (text _RHS_) =
+ save _fgxy, __fgxy;
+ vardef __fgxy (expr t, x, y) = _RHS_ enddef;
+ vardef _fgxy (expr t, Z) = __fgxy(t, xpart Z, ypart Z) enddef;
+ tRKIV (sm, tens, zstart, ds, N) (_fgxy)
+enddef;
+
+def odeRKIV (expr sm) = todeRKIV (sm, default_tension)
+enddef;
+vardef todeRKIV (expr sm, tens, xstart, ystart, ds, N)
+(text _fxy) =
+ txyRKIV (sm, tens, (xstart, ystart), ds, N) ((1, _fxy))
+enddef;
+
+% \end{macrocode}
+%
% \section{Modification of Paths}\label{modification}
%
% \subsection{Closing a path}\label{closing}
diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
index cc427bbf7f2..5da4b773a74 100644
--- a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
+++ b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
@@ -1,17 +1,17 @@
% \iffalse
-%%% File: mfpic.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: mfpic.dtx
+% A part of mfpic 1.06 2011/03/08
+%
% -------------------------------------------------------------------
%
-% Copyright 2002--2010, Daniel H. Luecking
+% Copyright 2002--2011, Daniel H. Luecking
%
% Mfpic may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, either version 1.3b of this license or (at
+% 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
% <http://www.latex-project.org/lppl.txt>
-% and version 1.3b or later is part of all distributions of LaTeX version
-% 2003/12/01 or later.
+% and version 1.3c or later is part of all distributions of LaTeX version
+% 2008/12/01 or later.
%
% Mfpic has maintenance status "author-maintained". The Current Maintainer
% is Daniel H. Luecking. There are several Base Interpreters: plain TeX, LaTeX,
@@ -22,7 +22,7 @@
%</driver>
%<sty>\ProvidesPackage{mfpic}
%<*sty>
- [2010/06/10 v1.05. Macros for drawing with Metafont/MetaPost.]%
+ [2011/03/08 v1.06. Macros for drawing with Metafont/MetaPost.]%
%</sty>
%<*driver>
\documentclass{ltxdoc}
@@ -106,7 +106,7 @@
\end{document}
%</driver>
%\fi
-% \CheckSum{5119}
+% \CheckSum{5145}
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -134,9 +134,9 @@
% produce the picture. The picture is then included on a second pass
% through \TeX.
%
-% This file documents the source code. See \file{mfpic-doc.pdf} (source
-% \file{mfpic.doc.tex} for the user documentation or \file{mfpguide.pdf}
-% (source \file{mfpguide.tex}) for an introductory guide.
+% This file documents the source code. See \file{mfpic-doc.pdf}/\file{tex}
+% for the user documentation, or \file{mfpguide.pdf}/\file{tex}) for an
+% introductory guide.
% \end{abstract}
%
% \StopEventually{\PrintIndex}
@@ -170,9 +170,9 @@
\ifx\mfpfileversion\UndEfInEd\else\expandafter\endinput\fi%
{%
\catcode\lq\.12 \catcode\lq\/12%
- \gdef\mfpfileversion{1.05}%
- \gdef\mfpfiledate{2010/06/10}%
- \gdef\mfpicversion{105}%
+ \gdef\mfpfileversion{1.06}%
+ \gdef\mfpfiledate{2011/02/25}%
+ \gdef\mfpicversion{106}%
}%
% \end{macrocode}
%
@@ -335,18 +335,20 @@
% The following might be useful in patching things or adding to
% \cs{mfp@additions}.
% \begin{macrocode}
-\mfp@ifdefined\g@addto@macro{}{%
+\mfp@ifundefined\g@addto@macro
\long\def\g@addto@macro#1#2{%
\begingroup
\toks@\@xp{#1#2}%
\xdef#1{\the\toks@}%
- \endgroup}}%
-\mfp@ifdefined\g@prependto@macro{}{%
+ \endgroup}%
+\mfp@enddef
+\mfp@ifundefined\g@prependto@macro
\long\def\g@prependto@macro#1#2{%
\begingroup
\toks@{#2}\toks2\@xp{#1}%
\xdef#1{\the\toks@\the\toks2}%
- \endgroup}}%
+ \endgroup}%
+\mfp@enddef
% \end{macrocode}
%
% We test for LaTeX. We assume plain\TeX{}, or something compatible,
@@ -527,7 +529,7 @@
\newdef\mfp@justify@error{%
\mfp@errmsg{Invalid justification parameter for text label}%
{The optional argument for an mfpic text label must be^^J%
- one of B, b, c or t, followed by^^J
+ one of B, b, c or t, followed by^^J%
one of l, r or c, optionally followed by an angle.}}%
% \end{macrocode}
%
@@ -722,7 +724,7 @@
\ifmfp@latex
\ifmfp@centcapt \centering \else \raggedright \fi
\else
- \rightskip 0pt plus 1fil
+ \rightskip 0pt plus 1fil\relax
\ifmfp@centcapt
\leftskip 0pt plus 1fil
\parfillskip 0pt plus 1fil\relax
@@ -1065,6 +1067,11 @@
\let\Gread@parse@bb\mfp@parse@bb}%
\global\let\setmfpicgraphic\includegraphics
\gdef\getmfpicoffset##1{}}%
+% \end{macrocode}
+%
+% The \LaTeX{} wrapper ends by inputing \file{mfpic.tex}.
+% \begin{macrocode}
+\input mfpic.tex\relax
%</sty>
% \end{macrocode}
%
@@ -1214,11 +1221,16 @@
% executed. When neither follows, nothing is removed and \arg3 is
% executed. Normally, this last is the main command being applied to each
% element of the list.
+%
+% We also define \LaTeX's \cs{@ifstar} for the few cases that require it.
% \begin{macrocode}
\def\mfp@iftoken#1#2{\@ifnextchar#1{\@firstoftwo{#2}}}%
\def\mfp@ifstar#1#2#3{\mfp@iftoken*{#1{#2}}{#1{#3}}}%
\def\mfp@ifend{\mfp@iftoken\mfp@end}%
\def\mfp@ifendorcomma#1#2#3{\mfp@ifend{#1}{\mfp@iftoken,{#2}{#3}}}%
+\mfp@ifundefined\@ifstar
+ \def\@ifstar#1{\@ifnextchar*{\@firstoftwo{#1}}}%
+\mfp@enddef
% \end{macrocode}
%
% I've taken to making an empty optional argument the default for a lot
@@ -1390,6 +1402,19 @@
\newdef\mfp@wlist#1{\mfp@src\mflist{(#1);}}%
% \end{macrocode}
%
+% If \prog{babel} is loaded with some options, certain punctuation will
+% be made active. These will then be expanded when written to the graph
+% file. \prog{Babel} provides a way to turn this off, but it would be an
+% error to run those commands if \prog{babel} is not loaded. Rather than
+% try to detect \prog{babel}, we run these commands only if they are
+% defined.
+% \begin{macrocode}
+\def\mfp@safe@activestrue{%
+ \mfp@ifdefined\@safe@activestrue\@safe@activestrue{}}%
+\def\mfp@safe@activesfalse{%
+ \mfp@ifdefined\@safe@activesfalse\@safe@activesfalse{}}%
+% \end{macrocode}
+%
% \subsection{Initializing the output file}\label{output}
%
% Category 12 characters percent, sharp and backslash signs for the
@@ -1501,7 +1526,7 @@
% \grafbase{} macros to be loaded.
% \begin{macrocode}
\newdef\mfp@versioninfo{%
- \mfp@p\space\mfp@filename.m\mfp@ifmpost{p}{f},
+ \mfp@p\space\mfp@filename.m\mfp@ifmpost{p}{f}, %
generated by Mfpic, v\mfpfileversion\space\mfpfiledate,\@nl
\mfp@p\space from TeX source "\jobname" on \mfp@now\@nl
numeric mfpicversion; mfpicversion := \mfpicversion;\@nl}%
@@ -1654,7 +1679,7 @@
% \begin{macrocode}
\mfp@ifopengraphsfile%
{\Mfpic@warn
- {\@nl An attempt has been made to open a graph file,
+ {\@nl An attempt has been made to open a graph file, %
\mfp@sanitized\mfp@tempa\@msgbreak
while another, \mfp@filename, is still open. \@msgbreak
Closing \mfp@filename.}\mfp@closegraphsfile}%
@@ -1758,8 +1783,8 @@
#1\edef#2{%
\@ifundefined{\mfp@cmdname#2}{???}{\@nameuse{\mfp@cmdname#2}}}%
\@ifundefined{\mfp@cmdname#2}%
- {\mfp@msg{}\Mfpic@msg{No value for \string#2\ifin@mfpicenv\space in
- mfpic figure \number\mfp@count\fi.\@nl}}%
+ {\mfp@msg{}\Mfpic@msg{No value for \string#2\ifin@mfpicenv\space
+ in mfpic figure \number\mfp@count\fi.\@nl}}%
{}%
\mfsrc{\@ifmplabels{\@nl verbatimtex #1\def\string#2{#2} etex;\@nl}{}%
message "\string\mfpicvalue";\@nl
@@ -2674,7 +2699,7 @@
\mfp@local\edef\tl@rot{#2}%
\@ifmplabels{}%
{\mfp@ifexist{#2}%
- {\Mfpic@warn{Rotation of labels is not supported without the
+ {\Mfpic@warn{Rotation of labels is not supported without the %
mplabels\@msgbreak option. Rotation setting\on@line\space
may be ignored.}}%
}}%
@@ -2888,7 +2913,7 @@
\mfp@ifmpost
{\mfp@local\mfp@linetype0
\mfp@def\mfp@setstyle{\draw[getcolor \number\mfp@linetype]}}%
- {\Mfpic@warn{You can't use \mfp@b coloredlines in
+ {\Mfpic@warn{You can't use \mfp@b coloredlines in %
Metafont.\@msgbreak Using \dashedlines instead}%
\dashedlines}}%
% \end{macrocode}
@@ -3669,6 +3694,68 @@
\def\levelcurve{\mfp@fcn{levelset}p}%
% \end{macrocode}
%
+% We now define two macros for depicting the solution of an
+% ordinary differential equation. THe first of these, \cs{DEgraph},
+% produces the graph of solutions of equations of the form
+% $$
+% \frac{dy}{dx} = f(x,y),\quad y(x_0) = y_0.
+% $$
+% The data required are the \emph{initial values} (the two numbers $x_0$
+% and $y_0$), the formula $f(x,y)$ (an explicit \MF{} numerical expression
+% with literal variables \mfc{x} and \mfc{y} as the only unknowns. Since
+% the \MF{} and only handle paths connecting discrete points, also
+% required is a step size which, roughly speaking, is the distance between
+% points in graph coordinates, and the number of steps $N$ to use. The \MF{}
+% macros then calculate $N$ additional points (the first is $(x_0,y_0)$) and join
+% them together to produce the graph.
+%
+% The second macro, \cs{DEtrajectory}, draws the trajectory of a
+% two-dimentional differential equation of the form
+% $$
+% \left( \frac{dx}{dt}, \frac{dy}{dt}\right) = (f(x,y,t),g(x,y,t)\,,
+% \quad (x(0),y(0)) = (x\sb0,y\sb0)
+% $$
+% This is not, strictly speaking, a \emph{graph} since that would
+% require three dimensions to indicate the relation between $x$, $y$, and
+% $t$. Mathematicians call it a trajectory, and it only shows the
+% two-dimensional path followed by the moving object. The required data
+% are an initial point $(x_0,y_0)$, the formula for the right-hand side
+% (an explicit \MF{} pair-valued expression or a pair of numerical
+% expressions in parentheses, with literal variables \mfc{x}, \mfc{y} and
+% \mfc{t} as the only unknowns. Also required are a step size and the
+% number of steps, as in \cs{DEgraph}.
+%
+% The method used to calculate the points to connect is a modified version
+% of the four-step Runge-Kutta method. The modifications are intended to
+% avoid numerical overflow. That is, infinite blow-up in finite time. An
+% example is the simple equation
+% $$
+% \frac{dy}{dx} = y^2 \quad y(0) = 1,
+% $$
+% whose solution is $y = 1/(1-x)$. The usual definition of
+% Runge-Kutta-IV would have one process equally spaced $x$-values. If a
+% user had no idea of the character of the solution, and asked for $N$
+% $x$-values with separation $h$ to get a graph on $0\le x \le Nh$, and if
+% $Nh > 1$, then the result would be either quite different from the actual
+% solution (especially around $x=1$), or would reach a point of numerical
+% overflow.
+%
+% Thus our macros require the user to supply a parameter that will be
+% interpreted as a distance step: if $h$ is this parameter, instead of
+% finding values of $y$ at $x_0$, $x_0+h$, $x_0+2h$, etc., it finds points
+% $(x_n,y_n)$ on the graph so that the two-dimensional distance from $(x_0,y_0)$
+% to $(x_1,y_1)$ is $h$, then the distance from $(x_1,y_1)$ to $(x_2,y_2)$
+% is also $h$, etc. The resulting graph therefore simply follow the graph
+% of $y = 1/(1-x)$ a distance roughly $Nh$ and numerical overflow is
+% impossible unless the value of $Nh$ exceeds \MF{}'s size limits.
+%
+% There is an optional smoothness parameter as in \cs{function}.
+% \begin{macrocode}
+ \newdef\DEgraph{\mfp@fcn{odeRKIV}s}%
+ \newdef\DEtrajectory{\mfp@fcn{xyRKIV}s}%
+% \end{macrocode}
+%
+%
% \subsection{Plotting data from files}\label{datafiles}
%
% \DescribeMacro{\plotdata}
@@ -3944,7 +4031,7 @@
% the tension value (empty if there is no tension option).
%
% \DescribeMacro{\sclosed}
-% The first, \cs{sclosed} closes smoothly in the same manner that
+% The first, \cs{sclosed}, closes smoothly in the same manner that
% \cs{curve} creates a smooth path.
% \DescribeMacro{\bclosed}
% The second, \cs{bclosed}, uses an ordinary \MF{} B\'ezier. These two
@@ -4781,15 +4868,16 @@
\mfp@listmac{\mfp@ifempty{#1}{fcncurve}{functioncurve (#1)}}}%
% \end{macrocode}
%
-% \cs{mfp@fcn} is called by six commands: \cs{levelcurve},
-% \cs{plrregion}, \cs{belowfcn}, \cs{function}, \cs{plrfcn} and,
-% \cs{parafcn}. They have a common argument structure for both
-% the \mfpic{} and \grafbase{} command. \cs{mfp@fcn} calls
-% \cs{mfp@dotension} to parse the optional tension argument (the second
-% argument) leaving the results in the macros \cs{mfp@t} (a \texttt{t}
-% for command name if a tension value was present) and \cs{mfp@sval}
-% (\texttt{true} or \texttt{false} and the tension value if it was
-% present). The first argument is the base name of a \grafbase{} command.
+% \cs{mfp@fcn} is called by eight commands: \cs{levelcurve},
+% \cs{plrregion}, \cs{belowfcn}, \cs{function}, \cs{plrfcn},
+% \cs{parafcn}, \cs{DEgraph} and \cs{DEtrajectory}. They have a common
+% argument structure for both the \mfpic{} and \grafbase{} command.
+% \cs{mfp@fcn} calls \cs{mfp@dotension} to parse the optional tension
+% argument (the second argument) leaving the results in the macros
+% \cs{mfp@t} (a \texttt{t} for command name if a tension value was
+% present) and \cs{mfp@sval} (\texttt{true} or \texttt{false} and the
+% tension value if it was present). The first argument is the base name of
+% a \grafbase{} command.
%
% Ultimately, \cs{mfp@@fcn} is called, and only then the two mandatory
% arguments of the calling command are read.
@@ -5035,15 +5123,15 @@
\mfp@ifexist{#1}{\mfp@@arropt#1\mfp@end}\mfp@@arr}%
\newdef\mfp@@arropt#1#2\mfp@end{%
\mfp@ifempty{#2}%
- {\Mfpic@warn{Arrow option #1 has no value\on@line;
+ {\Mfpic@warn{Arrow option #1 has no value\on@line; %
it will be ignored.}}%
{\@ifundefined{mfp@arr@#1}%
- {\Mfpic@warn{Arrow option #1 invalid \on@line;
+ {\Mfpic@warn{Arrow option #1 invalid \on@line; %
it will be ignored}}%
{\@nameuse{mfp@arr@#1}{#2}}%
}}%
\newdef\mfp@doarrow{%
- \mfp@addmac{\mfp@clropt{\mfp@hcolour}{\mfp@hcommand} (\mfp@hlength,
+ \mfp@addmac{\mfp@clropt{\mfp@hcolour}{\mfp@hcommand} (\mfp@hlength, %
\mfp@hrotate, \mfp@hlocate)}}%
% \end{macrocode}
%
@@ -5209,7 +5297,7 @@
\save@mfpicdimens
\begingroup % ended near end of \endmfpic
\@mfpicunit\mfpicunit
- \@nameuse{@safe@activestrue}%
+ \mfp@safe@activestrue
\mfp@ifopengraphsfile{}%
{\ifmfp@nowrite\else \mfp@nooutput@error\mfpic
\def\mfp@src##1##2{\endgroup}%
@@ -5234,14 +5322,23 @@
% We also define the coordinate conversion macros \cs{@xconv} and
% \cs{@yconv} via \cs{mfp@setconv}. These are used to calculate the
% nominal dimensions of the picture and to position \TeX{} labels.
+%
+% We make all the arguments of \cs{@mfpic} available to the user. Macro
+% \cs{mfp@setconv} now also makes use of them.
+% \begin{itemize}
+% \item the x-scaling factor.
% \DescribeMacro{\xfactor}
+% \item the y-scaling factor.
% \DescribeMacro{\yfactor}
+% \item the leftmost x-coordinate.
% \DescribeMacro{\xmin}
+% \item the rightmost x-coordinate.
% \DescribeMacro{\xmax}
+% \item the leftmost y-coordinate.
% \DescribeMacro{\ymin}
+% \item the rightmost y-coordinate.
% \DescribeMacro{\ymax}
-% We make all the arguments of \cs{@mfpic} available to the user. Macro
-% \cs{mfp@setconv} now also makes use of them.
+% \end{itemize}
%
% We are going to add all text labels to a box \cs{@alltlabels} and put
% that whole box on top of the graph during \cs{endmfpic}.
@@ -5626,7 +5723,7 @@
% \begin{macrocode}
\newdef\set@textbox#1{%
\setbox\@textbox\vbox{\def\\{\cr}\mfp@restorepar
- \@tcurr\@nameuse{@safe@activesfalse}\every@tlabel
+ \mfp@safe@activesfalse\@tcurr\every@tlabel
\halign{##\hfil\cr#1\crcr}}}%
% \end{macrocode}
%
@@ -5795,7 +5892,7 @@
\newdef\tlabelpath@{\@ifmplabels{}{\measure@textbox{\the\mfp@toks}}%
\mfp@setMPpos
\mfcmd{text\mfp@name x (\mfp@MPpos)\@nl
- (\@ifmplabels{origin, \mfp@btex{\the\mfp@toks}}{\tb@ll, \tb@ur},
+ (\@ifmplabels{origin, \mfp@btex{\the\mfp@toks}}{\tb@ll, \tb@ur}, %
\mfp@param) (\tl@points)}%
\ifmfp@switch\else \mfp@thelabel\fi \endgroup}%
% \end{macrocode}
@@ -5908,7 +6005,7 @@
\def\mfp@docaption{%
\setbox\@textbox
\hbox{\def\\{\hskip\@M\p@\let\\\relax}\mfp@restorepar
- \@nameuse{@safe@activesfalse}\@tcurr#3}%
+ \mfp@safe@activesfalse\@tcurr#3}%
% \end{macrocode}
%
% If the above \cs{hbox} is too wide, we re-assign \cs{@textbox} to a
@@ -5922,10 +6019,10 @@
\hbox{%
\vbox{%
\hsize#2\mfp@scratch \mfp@restorepar
- \leftskip0pt
- \rightskip0pt
+ \leftskip0pt \rightskip0pt\relax
\mfp@capsettings
- \@nameuse{@safe@activesfalse}\noindent\@tcurr #3%
+ \mfp@safe@activesfalse
+ \noindent\@tcurr #3%
}% End vbox.
}% End hbox.
\fi
@@ -5974,7 +6071,8 @@
% \begin{macrocode}
\mfp@DBlog{Definition of closure of mfpic environment.}%
\newdef\endmfpic{\every@endmfpic
- \mfsrc{\mfp@ifmpost{\@nl verbatimtex \relax\egroup\space etex;}{}\@nl
+ \mfsrc{%
+ \mfp@ifmpost{\@nl verbatimtex \relax\egroup\space etex;}{}\@nl
endmfpic; \mfp@p\space(\number\mfp@count) \mfp@lineno.\@nl
\mfp@p\mfp@d\mfp@d\mfp@d\@nl}%
\ifmfpicdebug\wlog{}\wlog{Mfpic: ENTERED endmfpic.}\wlog{}\fi
@@ -6056,7 +6154,7 @@
{\@graphright\wd\@wholegraph
\@graphtop\ht\@wholegraph}{}%
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of wholegraph before labels
+ \wlog{Mfpic debug: Dimensions of wholegraph before labels %
are added, and before truebbox adjustments:}%
\wlog{Mfpic: graphleft = \the\@graphleft}%
\wlog{Mfpic: graphright = \the\@graphright}%
@@ -6081,7 +6179,7 @@
% (or both) that is nonempty, so one of the box resets may be redundant.
% \begin{macrocode}
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of alltlabels, before
+ \wlog{Mfpic debug: Dimensions of alltlabels, before %
truebbox adjustments:}%
\mfp@scratch\mfpicllx bp\relax
\wlog{Mfpic: mfpicllx = \the\mfp@scratch}%
@@ -6126,7 +6224,7 @@
% detected by \TeX.
% \begin{macrocode}
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of alltlabels after
+ \wlog{Mfpic debug: Dimensions of alltlabels after %
truebbox adjustments:}%
\wlog{Mfpic: tlabelsleft = \the\@tlabelsleft}%
\wlog{Mfpic: tlabelstop = \the\@tlabelstop}%
@@ -6147,7 +6245,7 @@
% graphht${}={}$graphtop${}-{}$graphbot, and graphdp${}= 0$.
% \begin{macrocode}
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of wholegraph after
+ \wlog{Mfpic debug: Dimensions of wholegraph after %
labels are added:}%
\wlog{Mfpic: graphleft = \the\@graphleft}%
\wlog{Mfpic: graphright = \the\@graphright}%
@@ -6391,12 +6489,6 @@
\mfpicnumber{1}%
% \end{macrocode}
%
-% Create a system for adding patches in the file \file{mfppatch.tex},
-% and for user defaults in a file \file{mfpic.usr}.
-% \begin{macrocode}
-\InputIfFileExists{mfppatch.tex}{}{}%
-% \end{macrocode}
-%
% Set the font for missing or draft mode figures (for the file name or
% figure number). This will already have been defined if \file{mfpic.sty}
% was used, so here we can probably assume \LaTeX{} wasn't used, and
@@ -6406,7 +6498,8 @@
% \end{macrocode}
%
% Restore the meaning of \cs{+}, and execute the command that restores all
-% the saved category codes and \cs{newlinechar}.
+% the saved category codes and \cs{newlinechar}. Input user defaults in
+% the file \file{mfpic.usr}.
% \begin{macrocode}
\mfp@DBlog{Punctuation, etc., will revert to old catcodes now.}%
\let\+\mfpsaveplus
@@ -6415,10 +6508,5 @@
%</tex>
% \end{macrocode}
%
-% The \LaTeX{} wrapper inputs \file{mfpic.tex}.
-% \begin{macrocode}
-%<sty>\input mfpic.tex\relax
-% \end{macrocode}
-%
%\clearpage
%\Finale
diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.ins b/Master/texmf-dist/source/generic/mfpic/mfpic.ins
index 5a528221027..4b04ba5007b 100644
--- a/Master/texmf-dist/source/generic/mfpic/mfpic.ins
+++ b/Master/texmf-dist/source/generic/mfpic/mfpic.ins
@@ -1,13 +1,13 @@
-%%% File: mfpic.ins
-%%% A part of mfpic 1.05 2010/06/10
-%%%
+% File: mfpic.ins
+% A part of mfpic 1.06 2011/03/08
+%
\input docstrip
\keepsilent
\preamble
-------------------------------------------------------------------
-Copyright 2002--2010, Daniel H. Luecking
+Copyright 2002--2011, Daniel H. Luecking
Mfpic may be distributed and/or modified under the conditions of the
LaTeX Project Public License, either version 1.3c of this license or (at
@@ -41,9 +41,9 @@ endinput.^^J%
^^J
^^J To finish the installation:
^^J
-^^J -- Copy the files mfpic.tex, mfpic.sty and mfppatch.tex to a
-\sJ location where TeX and LaTeX will find them. For example, in a
-\sJ TDS compliant system, the directory TEXMF/tex/generic/mfpic/ .
+^^J -- Copy the files mfpic.tex and mfpic.sty to a location where
+\sJ TeX and LaTeX will find them. For example, in a TDS compliant
+\sJ system, the directory TEXMF/tex/generic/mfpic/ .
^^J
^^J -- Copy the file grafbase.mf to a location where Metafont
\sJ will find it, for example TEXMF/metafont/mfpic/ .
diff --git a/Master/texmf-dist/tex/generic/mfpic/mfpic.sty b/Master/texmf-dist/tex/generic/mfpic/mfpic.sty
index 733961888dc..622d081e0ce 100644
--- a/Master/texmf-dist/tex/generic/mfpic/mfpic.sty
+++ b/Master/texmf-dist/tex/generic/mfpic/mfpic.sty
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2010, Daniel H. Luecking
+%% Copyright 2002--2011, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -21,11 +21,8 @@
%% is Daniel H. Luecking. There are several Base Interpreters associated
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
-%%% File: mfpic.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
\ProvidesPackage{mfpic}
- [2010/06/10 v1.05. Macros for drawing with Metafont/MetaPost.]%
+ [2011/03/08 v1.06. Macros for drawing with Metafont/MetaPost.]%
\DeclareOption{draft}{\mfpicdraft}%
\DeclareOption{final}{%
\mfpicfinal\PassOptionsToPackage{final}{graphics}}%
diff --git a/Master/texmf-dist/tex/generic/mfpic/mfpic.tex b/Master/texmf-dist/tex/generic/mfpic/mfpic.tex
index fc6efa8e1cc..d2596ed2cd9 100644
--- a/Master/texmf-dist/tex/generic/mfpic/mfpic.tex
+++ b/Master/texmf-dist/tex/generic/mfpic/mfpic.tex
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2010, Daniel H. Luecking
+%% Copyright 2002--2011, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -21,15 +21,12 @@
%% is Daniel H. Luecking. There are several Base Interpreters associated
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
-%%% File: mfpic.dtx
-%%% A part of mfpic 1.05 2010/06/10
-%%%
\ifx\mfpfileversion\UndEfInEd\else\expandafter\endinput\fi%
{%
\catcode\lq\.12 \catcode\lq\/12%
- \gdef\mfpfileversion{1.05}%
- \gdef\mfpfiledate{2010/06/10}%
- \gdef\mfpicversion{105}%
+ \gdef\mfpfileversion{1.06}%
+ \gdef\mfpfiledate{2011/02/25}%
+ \gdef\mfpicversion{106}%
}%
\let\mfpsaveplus\+%
\let\+\tabalign%
@@ -109,18 +106,20 @@
\else \@xp\@secondoftwo
\fi}%
\mfp@enddef
-\mfp@ifdefined\g@addto@macro{}{%
+\mfp@ifundefined\g@addto@macro
\long\def\g@addto@macro#1#2{%
\begingroup
\toks@\@xp{#1#2}%
\xdef#1{\the\toks@}%
- \endgroup}}%
-\mfp@ifdefined\g@prependto@macro{}{%
+ \endgroup}%
+\mfp@enddef
+\mfp@ifundefined\g@prependto@macro
\long\def\g@prependto@macro#1#2{%
\begingroup
\toks@{#2}\toks2\@xp{#1}%
\xdef#1{\the\toks@\the\toks2}%
- \endgroup}}%
+ \endgroup}%
+\mfp@enddef
\newif\ifmfp@latex \mfp@latexfalse
\mfp@ifdefined\documentstyle
{\ifx \amstexloaded@\relax \mfp@DBlog{AmS-TeX detected.}%
@@ -202,7 +201,7 @@
\newdef\mfp@justify@error{%
\mfp@errmsg{Invalid justification parameter for text label}%
{The optional argument for an mfpic text label must be^^J%
- one of B, b, c or t, followed by^^J
+ one of B, b, c or t, followed by^^J%
one of l, r or c, optionally followed by an angle.}}%
\newdef\mfp@untilwarn{%
\Mfpic@warn{\mfp@b mfploop without \string\mfpuntil!}}%
@@ -259,7 +258,7 @@
\ifmfp@latex
\ifmfp@centcapt \centering \else \raggedright \fi
\else
- \rightskip 0pt plus 1fil
+ \rightskip 0pt plus 1fil\relax
\ifmfp@centcapt
\leftskip 0pt plus 1fil
\parfillskip 0pt plus 1fil\relax
@@ -408,6 +407,9 @@
\def\mfp@ifstar#1#2#3{\mfp@iftoken*{#1{#2}}{#1{#3}}}%
\def\mfp@ifend{\mfp@iftoken\mfp@end}%
\def\mfp@ifendorcomma#1#2#3{\mfp@ifend{#1}{\mfp@iftoken,{#2}{#3}}}%
+\mfp@ifundefined\@ifstar
+ \def\@ifstar#1{\@ifnextchar*{\@firstoftwo{#1}}}%
+\mfp@enddef
{%
\catcode`Q3 \catcode`\~12
\gdef\mfp@ifempty#1{\if~#1~\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}%
@@ -438,6 +440,10 @@
{\mfp@nooutput@error{#1}}\endgroup}%
\newdef\mfp@cmd#1{\mfp@src\mfcmd{#1;}}%
\newdef\mfp@wlist#1{\mfp@src\mflist{(#1);}}%
+\def\mfp@safe@activestrue{%
+ \mfp@ifdefined\@safe@activestrue\@safe@activestrue{}}%
+\def\mfp@safe@activesfalse{%
+ \mfp@ifdefined\@safe@activesfalse\@safe@activesfalse{}}%
\edef\mfp@p{\@xp\@gobble\string\%}% percent (%)
\edef\mfp@s{\@xp\@gobble\string\#}% sharp (#)
\edef\mfp@b{\@xp\@gobble\string\\}% backslash (\)
@@ -480,7 +486,7 @@
\halign{##\hfil\cr#1\crcr}}}%
}\endgroup%
\newdef\mfp@versioninfo{%
- \mfp@p\space\mfp@filename.m\mfp@ifmpost{p}{f},
+ \mfp@p\space\mfp@filename.m\mfp@ifmpost{p}{f}, %
generated by Mfpic, v\mfpfileversion\space\mfpfiledate,\@nl
\mfp@p\space from TeX source "\jobname" on \mfp@now\@nl
numeric mfpicversion; mfpicversion := \mfpicversion;\@nl}%
@@ -550,7 +556,7 @@
\endgroup
\mfp@ifopengraphsfile%
{\Mfpic@warn
- {\@nl An attempt has been made to open a graph file,
+ {\@nl An attempt has been made to open a graph file, %
\mfp@sanitized\mfp@tempa\@msgbreak
while another, \mfp@filename, is still open. \@msgbreak
Closing \mfp@filename.}\mfp@closegraphsfile}%
@@ -588,8 +594,8 @@
#1\edef#2{%
\@ifundefined{\mfp@cmdname#2}{???}{\@nameuse{\mfp@cmdname#2}}}%
\@ifundefined{\mfp@cmdname#2}%
- {\mfp@msg{}\Mfpic@msg{No value for \string#2\ifin@mfpicenv\space in
- mfpic figure \number\mfp@count\fi.\@nl}}%
+ {\mfp@msg{}\Mfpic@msg{No value for \string#2\ifin@mfpicenv\space
+ in mfpic figure \number\mfp@count\fi.\@nl}}%
{}%
\mfsrc{\@ifmplabels{\@nl verbatimtex #1\def\string#2{#2} etex;\@nl}{}%
message "\string\mfpicvalue";\@nl
@@ -865,7 +871,7 @@
\mfp@local\edef\tl@rot{#2}%
\@ifmplabels{}%
{\mfp@ifexist{#2}%
- {\Mfpic@warn{Rotation of labels is not supported without the
+ {\Mfpic@warn{Rotation of labels is not supported without the %
mplabels\@msgbreak option. Rotation setting\on@line\space
may be ignored.}}%
}}%
@@ -932,7 +938,7 @@
\mfp@ifmpost
{\mfp@local\mfp@linetype0
\mfp@def\mfp@setstyle{\draw[getcolor \number\mfp@linetype]}}%
- {\Mfpic@warn{You can't use \mfp@b coloredlines in
+ {\Mfpic@warn{You can't use \mfp@b coloredlines in %
Metafont.\@msgbreak Using \dashedlines instead}%
\dashedlines}}%
\newdef\pointedlines{\mfp@local\mfp@linetype0
@@ -1037,6 +1043,8 @@
\newdef\belowfcn{\mfp@fcn{belowfcn}p}%
\newdef\plrregion{\mfp@fcn{plrregion}p}%
\def\levelcurve{\mfp@fcn{levelset}p}%
+ \newdef\DEgraph{\mfp@fcn{odeRKIV}s}%
+ \newdef\DEtrajectory{\mfp@fcn{xyRKIV}s}%
\newdef\plotdata{\mfp@nullopt\mfp@plotdata}%
\newdef\datafile{\mfp@nullopt\mfp@datafile}%
\newdef\store##1##2{\mfp@rendmac{stored (##1)}##2}%
@@ -1277,15 +1285,15 @@
\mfp@ifexist{#1}{\mfp@@arropt#1\mfp@end}\mfp@@arr}%
\newdef\mfp@@arropt#1#2\mfp@end{%
\mfp@ifempty{#2}%
- {\Mfpic@warn{Arrow option #1 has no value\on@line;
+ {\Mfpic@warn{Arrow option #1 has no value\on@line; %
it will be ignored.}}%
{\@ifundefined{mfp@arr@#1}%
- {\Mfpic@warn{Arrow option #1 invalid \on@line;
+ {\Mfpic@warn{Arrow option #1 invalid \on@line; %
it will be ignored}}%
{\@nameuse{mfp@arr@#1}{#2}}%
}}%
\newdef\mfp@doarrow{%
- \mfp@addmac{\mfp@clropt{\mfp@hcolour}{\mfp@hcommand} (\mfp@hlength,
+ \mfp@addmac{\mfp@clropt{\mfp@hcolour}{\mfp@hcommand} (\mfp@hlength, %
\mfp@hrotate, \mfp@hlocate)}}%
\newdef\mfp@turn#1#2{\rotatearound{#1}{#2}}%
\newdef\mfp@axis#1#2{\mfp@getaxis#2{(none)}\mfp@end\axis
@@ -1330,7 +1338,7 @@
\save@mfpicdimens
\begingroup % ended near end of \endmfpic
\@mfpicunit\mfpicunit
- \@nameuse{@safe@activestrue}%
+ \mfp@safe@activestrue
\mfp@ifopengraphsfile{}%
{\ifmfp@nowrite\else \mfp@nooutput@error\mfpic
\def\mfp@src##1##2{\endgroup}%
@@ -1417,7 +1425,7 @@
(\tl@points)}}%
\newdef\set@textbox#1{%
\setbox\@textbox\vbox{\def\\{\cr}\mfp@restorepar
- \@tcurr\@nameuse{@safe@activesfalse}\every@tlabel
+ \mfp@safe@activesfalse\@tcurr\every@tlabel
\halign{##\hfil\cr#1\crcr}}}%
\newdef\tex@tlabel{\@xp\@textlabel\tl@points\mfp@end}%
\newdef\@textlabel{\mfp@ifendorcomma{}\@textlabel\@@textlabel}%
@@ -1488,7 +1496,7 @@
\newdef\tlabelpath@{\@ifmplabels{}{\measure@textbox{\the\mfp@toks}}%
\mfp@setMPpos
\mfcmd{text\mfp@name x (\mfp@MPpos)\@nl
- (\@ifmplabels{origin, \mfp@btex{\the\mfp@toks}}{\tb@ll, \tb@ur},
+ (\@ifmplabels{origin, \mfp@btex{\the\mfp@toks}}{\tb@ll, \tb@ur}, %
\mfp@param) (\tl@points)}%
\ifmfp@switch\else \mfp@thelabel\fi \endgroup}%
\newdef\measure@textbox#1{\set@textbox{#1}%
@@ -1534,17 +1542,17 @@
\def\mfp@docaption{%
\setbox\@textbox
\hbox{\def\\{\hskip\@M\p@\let\\\relax}\mfp@restorepar
- \@nameuse{@safe@activesfalse}\@tcurr#3}%
+ \mfp@safe@activesfalse\@tcurr#3}%
\mfp@scratch\wd\@wholegraph
\ifdim\tb@wd>#1\mfp@scratch
\setbox\@textbox
\hbox{%
\vbox{%
\hsize#2\mfp@scratch \mfp@restorepar
- \leftskip0pt
- \rightskip0pt
+ \leftskip0pt \rightskip0pt\relax
\mfp@capsettings
- \@nameuse{@safe@activesfalse}\noindent\@tcurr #3%
+ \mfp@safe@activesfalse
+ \noindent\@tcurr #3%
}% End vbox.
}% End hbox.
\fi
@@ -1561,7 +1569,8 @@
#1\mfp@scratch}%
\mfp@DBlog{Definition of closure of mfpic environment.}%
\newdef\endmfpic{\every@endmfpic
- \mfsrc{\mfp@ifmpost{\@nl verbatimtex \relax\egroup\space etex;}{}\@nl
+ \mfsrc{%
+ \mfp@ifmpost{\@nl verbatimtex \relax\egroup\space etex;}{}\@nl
endmfpic; \mfp@p\space(\number\mfp@count) \mfp@lineno.\@nl
\mfp@p\mfp@d\mfp@d\mfp@d\@nl}%
\ifmfpicdebug\wlog{}\wlog{Mfpic: ENTERED endmfpic.}\wlog{}\fi
@@ -1593,7 +1602,7 @@
{\@graphright\wd\@wholegraph
\@graphtop\ht\@wholegraph}{}%
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of wholegraph before labels
+ \wlog{Mfpic debug: Dimensions of wholegraph before labels %
are added, and before truebbox adjustments:}%
\wlog{Mfpic: graphleft = \the\@graphleft}%
\wlog{Mfpic: graphright = \the\@graphright}%
@@ -1605,7 +1614,7 @@
\wlog{}%
\fi
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of alltlabels, before
+ \wlog{Mfpic debug: Dimensions of alltlabels, before %
truebbox adjustments:}%
\mfp@scratch\mfpicllx bp\relax
\wlog{Mfpic: mfpicllx = \the\mfp@scratch}%
@@ -1632,7 +1641,7 @@
\fi
\fi
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of alltlabels after
+ \wlog{Mfpic debug: Dimensions of alltlabels after %
truebbox adjustments:}%
\wlog{Mfpic: tlabelsleft = \the\@tlabelsleft}%
\wlog{Mfpic: tlabelstop = \the\@tlabelstop}%
@@ -1646,7 +1655,7 @@
\hbox{\kern-\@graphleft\box\@wholegraph}%
\kern-\@graphbot}% End vbox.
\ifmfpicdebug
- \wlog{Mfpic debug: Dimensions of wholegraph after
+ \wlog{Mfpic debug: Dimensions of wholegraph after %
labels are added:}%
\wlog{Mfpic: graphleft = \the\@graphleft}%
\wlog{Mfpic: graphright = \the\@graphright}%
@@ -1754,7 +1763,6 @@
\endgroup
}%
\mfpicnumber{1}%
-\InputIfFileExists{mfppatch.tex}{}{}%
\mfp@ifdefined\mfpdraftfont{}{\newdef\mfpdraftfont{\tt}}%
\mfp@DBlog{Punctuation, etc., will revert to old catcodes now.}%
\let\+\mfpsaveplus
diff --git a/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex b/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex
deleted file mode 100644
index f11c19525ed..00000000000
--- a/Master/texmf-dist/tex/generic/mfpic/mfppatch.tex
+++ /dev/null
@@ -1,15 +0,0 @@
-%%% File: mfppatch.tex
-%%% A part of mfpic 1.05 2010/06/10
-%%%
-\def\mfp@versionpatched{1.05}%
-\def\mfp@patchinfo{%
- \Mfpic@warn{This patch is only for mfpic version \mfp@versionpatched!\@nl}}%
-\let\mfp@dopatches\endinput
-\ifx\mfpfileversion\mfp@versionpatched
- \def\mfp@patchinfo{}% Make this issue a message when patches occur.
- \def\mfp@dopatches{}%
-\fi
-\mfp@patchinfo
-\mfp@dopatches
-% None at this time.
-\endinput