summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/generic/mfpic/mfpic.dtx')
-rw-r--r--Master/texmf-dist/source/generic/mfpic/mfpic.dtx464
1 files changed, 260 insertions, 204 deletions
diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
index ea14d37321c..cc427bbf7f2 100644
--- a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
+++ b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx
@@ -1,10 +1,10 @@
% \iffalse
%%% File: mfpic.dtx
-%%% A part of mfpic 1.04 2010/03/30
+%%% A part of mfpic 1.05 2010/06/10
%%%
% -------------------------------------------------------------------
%
-% Copyright 2002--2009, Daniel H. Luecking
+% Copyright 2002--2010, 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
@@ -22,7 +22,7 @@
%</driver>
%<sty>\ProvidesPackage{mfpic}
%<*sty>
- [2010/03/30 v1.04. Macros for drawing with Metafont/MetaPost.]%
+ [2010/06/10 v1.05. Macros for drawing with Metafont/MetaPost.]%
%</sty>
%<*driver>
\documentclass{ltxdoc}
@@ -170,9 +170,9 @@
\ifx\mfpfileversion\UndEfInEd\else\expandafter\endinput\fi%
{%
\catcode\lq\.12 \catcode\lq\/12%
- \gdef\mfpfileversion{1.04}%
- \gdef\mfpfiledate{2010/03/30}%
- \gdef\mfpicversion{104}%
+ \gdef\mfpfileversion{1.05}%
+ \gdef\mfpfiledate{2010/06/10}%
+ \gdef\mfpicversion{105}%
}%
% \end{macrocode}
%
@@ -246,9 +246,10 @@
% To turn on debugging before option processing, the user must make sure
% \cs{mfpicdebug} is defined. \cs{mfp@DBlog} writes it contents to the
% log file only if debugging is on.
-% \DescribeMacro{\ifmfpicdebug}\cs{ifmfpicdebug} is normally set to true
-% if the user loads \mfpic{} with the \opt{debug} option, or sets it
-% directly with \cs{mfpicdebugtrue} after loading.
+% \DescribeMacro{\ifmfpicdebug}
+% The switch \cs {ifmfpicdebug} is normally set to true if the user loads
+% \mfpic{} with the \opt{debug} option, or sets it directly with
+% \cs{mfpicdebugtrue} after loading.
% \begin{macrocode}
\newif\ifmfpicdebug
\ifx\mfpicdebug\UndEfInEd \mfpicdebugfalse
@@ -614,10 +615,11 @@
% \DescribeMacro{\setmfvariable}
% A useful abbreviation for a common requirement: declaring and setting
% a \MF{} variable. I have decided to change it to a user-level macro for
-% power users. For consistency, \DescribeMacro{\setmpvariable}\cs{setmpvariable}
-% is an alternative name for it. It takes three arguments: the type of
-% variable, the variable itself, and its value.
-% Example:\\
+% power users.
+% \DescribeMacro{\setmpvariable}
+% For consistency, \cs{setmpvariable} is an alternative name for it. It
+% takes three arguments: the type of variable, the variable itself, and
+% its value. Example:\\
% \indent \cs{setmfvariable}\marg{numeric}\marg{shadewd}\marg{.7pt}.\\
% Since the \MF{} code \mfc{save}\,s the variable, there must be no
% suffix. This is not a big problem since mostly it is for internal use.
@@ -695,10 +697,10 @@
% \DescribeMacro{\usecenteredcaptions}
% This (\opt{centeredcaptions}) is the simplest option. Other options
% follow a similar pattern: a user-level command \cs{usecenteredcaptions}
-% is defined for turning it on and another
-% \DescribeMacro{\nocenteredcaptions}\cs{nocenteredcaptions} is defined
-% for turning it off. Selection of centered captions can be turned on or
-% off at will throughout a document.
+% is defined for turning it on and another,
+% \DescribeMacro{\nocenteredcaptions}
+% \cs{nocenteredcaptions}, is defined for turning it off. Selection of
+% centered captions can be turned on or off at will throughout a document.
% \begin{macrocode}
\newdef\usecenteredcaptions{\mfp@let\ifmfp@centcapt\iftrue}%
\newdef\nocenteredcaptions {\mfp@let\ifmfp@centcapt\iffalse}%
@@ -707,11 +709,12 @@
%
% \DescribeMacro{\useraggedcaptions}
% Here we define the settings for justified and ragged captions.
-% Justified captions are the default. Ragged cptions are normally
+% Justified captions are the default. Ragged captions are normally
% raggedright, but are ragged on both sides if \opt{centeredcaptions} is
-% in effect. \DescribeMacro{\noraggedcaptions}For justified captions,
-% lines are justified on both sides, except the last is centered under
-% \opt{centeredcaptions}.
+% in effect.
+% \DescribeMacro{\noraggedcaptions}
+% For justified captions, lines are justified on both sides, except the
+% last is centered under \opt{centeredcaptions}.
% \begin{macrocode}
\newdef\useraggedcaptions{\mfp@let\mfp@capsettings\mfp@raggedcap}%
\newdef\noraggedcaptions{\mfp@let\mfp@capsettings\mfp@justifiedcap}%
@@ -757,8 +760,9 @@
% \DescribeMacro{\clipmfpic}
% The \opt{clip} option shows only what's inside the rectangle given in
% the \cs{mfpic} command. It can be turned on or off for each figure
-% independently. \DescribeMacro{\noclipmfpic}The default is the old
-% behavior: no clipping.
+% independently.
+% \DescribeMacro{\noclipmfpic}
+% The default is the old behavior: no clipping.
% \begin{macrocode}
\mfp@makeoption\clipmfpic\noclipmfpic{clipall}\ifmfp@clip
% \end{macrocode}
@@ -766,7 +770,8 @@
% \DescribeMacro{\usetruebbox}
% The \opt{truebbox} option lets \MP{} set the true bounding box (which
% may differ from the numbers defined through \cs{mfpic}).
-% \DescribeMacro{\notruebbox}The default is the old behavior, \cs{notruebbox}.
+% \DescribeMacro{\notruebbox}
+% The default is the old behavior, \cs{notruebbox}.
%
% We don't need to be too careful with the scope of these option
% commands. As currently written, \TeX{} never needs to know the setting
@@ -783,10 +788,11 @@
% An option to let \MP{} create labels, \opt{mplabels} mostly just
% switches between two versions of \cs{tlabel} so no \MP{} booleans
% are set and so synchronization of scope is not an issue.
-% \DescribeMacro{\nomplabels}The default is the old behavior: labels are
-% placed by \TeX. The actual setting is delayed until \cs{opengraphsfile}
-% so the order of these commands and \cs{usemetapost} is not significant
-% (before \cs{opengraphsfile}).
+% \DescribeMacro{\nomplabels}
+% The default is the old behavior: labels are placed by \TeX. The actual
+% setting is delayed until \cs{opengraphsfile} so the order of these
+% commands and \cs{usemetapost} is not significant (before
+% \cs{opengraphsfile}).
%
% Because of the frequent need to check this setting, we define
% \cs{@ifmplabels} to execute one of two alternatives based on it.
@@ -808,8 +814,9 @@
% \DescribeMacro{\overlaylabels}
% The option \opt{overlaylabels} instructs \MP{} to defer adding labels
% until the end of the picture. That means they don't get clipped or
-% covered up by any drawing elements. \DescribeMacro{\nooverlaylabels}The
-% default is the old behavior, \cs{nooverlaylabels}. Neither of these
+% covered up by any drawing elements.
+% \DescribeMacro{\nooverlaylabels}
+% The default is the old behavior, \cs{nooverlaylabels}. Neither of these
% commands affect \MF, but they write to the output file anyway if issued
% after \cs{opengraphsfile}.
% \begin{macrocode}
@@ -820,8 +827,9 @@
% \DescribeMacro{\clearsymbols}
% The option \opt{clearsymbols} causes the symbols drawn by
% \cs{plotsymbol} and \cs{plotnodes} to have their interiors erased before
-% being drawn. \DescribeMacro{\noclearsymbols}The default is the old
-% behavior: \cs{noclearsymbols}.
+% being drawn.
+% \DescribeMacro{\noclearsymbols}
+% The default is the old behavior: \cs{noclearsymbols}.
% \begin{macrocode}
\mfp@makeoption%
\clearsymbols\noclearsymbols{clearsymbols}\ifmfp@clearsym
@@ -834,13 +842,14 @@
% in \MF.) The \MF{} code prevents the figure from being added to the font,
% the \TeX{} switch \cs{ifmfp@noship} is checked before \cs{endmfpic}
% attempts to add the (nonexistent) figure to the document.
-% \DescribeMacro{\resumeshipping}\cs{resumeshipping} restores character
-% shipping.
+% \DescribeMacro{\resumeshipping}
+% The macro \cs{resumeshipping} restores character shipping.
%
-% \DescribeMacro{\noship}\cs{noship} is the older name for
-% \cs{stopshipping}. Its name indicated that it was intended for use in
-% one picture. This is not actually an option (that is, there is no
-% corresponding \cs{DeclareOption} in \LaTeX), but it is coded the same.
+% \DescribeMacro{\noship}
+% The macro \cs{noship} is the older name for \cs{stopshipping}. Its name
+% indicated that it was intended for use in one picture. This is not
+% actually an option (that is, there is no corresponding
+% \cs{DeclareOption} in \LaTeX), but it is coded the same.
% \begin{macrocode}
\mfp@makeoption\stopshipping\resumeshipping{noship}\ifmfp@noship
\newlet\noship\stopshipping
@@ -861,8 +870,9 @@
% \DescribeMacro{\mfpicllx}
% The code to include a figure has been divided into three parts. Under
% \opt{metapost} we need to both include the figure and save the
-% \DescribeMacro{\mfpiclly} bounding box coordinates of the lower left
-% corner. Here we initialize the macros that hold these coordinates.
+% \DescribeMacro{\mfpiclly}
+% bounding box coordinates of the lower left corner. Here we initialize
+% the macros that hold these coordinates.
% \begin{macrocode}
\newdef\mfpicllx{0}%
\newdef\mfpiclly{0}%
@@ -1344,13 +1354,15 @@
% \cs{mfp@write}, and then invoke the appropriate continuation command.
%
% \DescribeMacro{\mfsrc}
-% This one is the most basic, merely writing its contents. For figure
-% macros, we ultimately call
-% \DescribeMacro{\mfcmd}\cs{mfcmd}, which appends a semicolon,
-% terminating any pending \MF{} command. For macros which take a comma
-% separated list of values as their arguments, we call
-% \DescribeMacro{\mflist}\cs{mflist} which surrounds the list in
-% parentheses and appends a semicolon
+% The macro \cs{mfsrc} is the most basic, merely writing its contents. For
+% figure macros, we ultimately call
+% \DescribeMacro{\mfcmd}
+% \cs{mfcmd}, which appends a semicolon, terminating any pending \MF{}
+% command. For macros which take a comma separated list of values as their
+% arguments, we call
+% \DescribeMacro{\mflist}
+% \cs{mflist} which surrounds the list in parentheses and appends a
+% semicolon
%
% The ending code is in \cs{mfp@src}. The \cs{begingroup} in
% \cs{mfp@write} matches the \cs{endgroup} in \cs{mfp@src}. The group
@@ -2144,11 +2156,12 @@
\newlet\globalsetmparray\globalsetmfarray
% \end{macrocode}
%
-% Shade adjustment macros.
-% \DescribeMacro{\lightershade}\cs{lightershade}
-% just multiplies \cs{shadespace} by $1.2$. While
-% \DescribeMacro{\darkershade}\cs{darkershade} divides by $1.2$
-% (actually, multiplies by $1/1.2$)
+% \DescribeMacro{\lightershade}
+% Shade adjustment macros. \cs{lightershade} just multiplies
+% \cs{shadespace} by $1.2$.
+% \DescribeMacro{\darkershade}
+% While \cs{darkershade} divides by $1.2$ (actually, multiplies by
+% $1/1.2$)
% \begin{macrocode}
\newdef\lightershade{\shadespace1.2\shadespace}%
\newdef\darkershade{\shadespace.83333\shadespace}%
@@ -2168,7 +2181,9 @@
% \DescribeMacro{\pointfilltrue}
% With the commands \cs{pointfilltrue} or \cs{pointfillfalse} the user
% can specify points drawn with the \cs{point} command to be either
-% filled in or \DescribeMacro{\pointfillfalse}not.
+% filled in or
+% \DescribeMacro{\pointfillfalse}
+% not.
% \begin{macrocode}
\let\ifpointfill\iftrue
\newdef\pointfilltrue{\mfp@let\ifpointfill\iftrue}%
@@ -2189,21 +2204,23 @@
% \DescribeMacro{\mfpfor}
% This is the simplest: it writes the word \mfc{for} plus the contents of
% its only mandatory argument, followed by a colon. The loop is ended by
-% \DescribeMacro{\endmfpfor}\cs{endmfpfor} which merely writes the text
-% \mfc{endfor}.
+% \DescribeMacro{\endmfpfor}
+% \cs{endmfpfor} which merely writes the text \mfc{endfor}.
% \begin{macrocode}
\newdef\mfpfor#1{\begingroup\mfsrc{for #1:}}%
\newdef\endmfpfor{\mfsrc{endfor}\endgroup}%
% \end{macrocode}
%
% \DescribeMacro{\mfploop}
-% This starts a loop with \mfc{forever}. The user is expected to provide
-% an escape condition with \DescribeMacro{\mfpuntil}\cs{mfpuntil}, which
-% can be placed anywhere among the commands contained in the
-% \env{mfploop} environment. \DescribeMacro{\endmfploop}\cs{endmfploop}
-% is a clone of \cs{mfpfor} except for the warning. Grouping keeps
-% the warning from being turned off if \cs{mfpuntil} occurs in a nested
-% loop.
+% The macro \cs{mfploop} starts a loop with \mfc{forever}. The user is
+% expected to provide an escape condition with
+% \DescribeMacro{\mfpuntil}
+% \cs{mfpuntil}, which can be placed anywhere among the commands contained
+% in the \env{mfploop} environment.
+% \DescribeMacro{\endmfploop}
+% The macro \cs{endmfploop} is a clone of \cs{endmfpfor} except for the
+% warning. Grouping keeps the warning from being turned off if
+% \cs{mfpuntil} occurs in a nested loop.
% \begin{macrocode}
\newdef\mfploop{%
\begingroup\mfsrc{forever:}\let\@nountil\mfp@untilwarn}%
@@ -2215,8 +2232,9 @@
% This emulates a while-loop, the condition being given in the mandatory
% argument. It has the same behavior, and writes almost the same code as
% \cs{mfploop} with an immediate \cs{mfpuntil} using the negative of the
-% condition. The closing, \DescribeMacro{\endmfpwhile}\cs{endmfpwhile},
-% is again the same as \cs{endmfpfor}.
+% condition.
+% \DescribeMacro{\endmfpwhile}
+% The closing, \cs{endmfpwhile}, is again the same as \cs{endmfpfor}.
% \begin{macrocode}
\newdef\mfpwhile#1{\begingroup\mfcmd{forever: exitif not(#1)}}%
\newlet\endmfpwhile\endmfpfor
@@ -2397,9 +2415,10 @@
% \cs{mfp@src}), and some \TeX{} code. That code is written into the string
% argument of the \grafbase{} command \gbc{mftitle} and ends up in the
% \MF{} \file{.log} file and as a comment in the GF file. \cs{mftitle}
-% merely calls \cs{mfp@title}, while \DescribeMacro{\tmtitle}\cs{tmtitle}
-% also writes the argument to the \TeX{} \file{.log} file and typesets it
-% in the document.
+% merely calls \cs{mfp@title}, while
+% \DescribeMacro{\tmtitle}
+% \cs{tmtitle} also writes the argument to the \TeX{} \file{.log} file and
+% typesets it in the document.
%
% We write the argument as a token list because that is the the easiest
% verbatim-like way to do it.
@@ -2930,11 +2949,11 @@
% \DescribeMacro{\mfplinetype}
% The user-level command \cs{mfplinetype} allows the user to set the
% starting value of \cs{mfp@linetype}. The default is to start at $0$.
-% \DescribeMacro{\mfplinestyle}\cs{mfplinestyle} is an alias for this
-% same command. The names `linestyle' and `linetype' come from
-% an analogous system of changing rendering in \prog{gnuplot}. (The
-% reason for two names is that \prog{gnuplot} documentation was not
-% consistent in its terminology.)
+% \DescribeMacro{\mfplinestyle}
+% The macro \cs{mfplinestyle} is an alias for this same command. The names
+% `linestyle' and `linetype' come from an analogous system of changing
+% rendering in \prog{gnuplot}. (The reason for two names is that
+% \prog{gnuplot} documentation was not consistent in its terminology.)
% \begin{macrocode}
\newdef\mfplinetype#1{\mfp@local\mfp@linetype#1\relax}%
\newlet\mfplinestyle\mfplinetype
@@ -3001,22 +3020,24 @@
% positions: centered on the axes, on one side, or on the other side.
% The default for the $x$- and $y$-axes is centered, for the border axes it
% is inside.
-% \DescribeMacro{\setaxismarks}For changing this we provide the
-% \cs{setaxismarks} command, whose first argument is the axis letter, and
-% whose second argument is one of the words \texttt{inside},
-% \texttt{outside}, \texttt{centered}, \texttt{ontop}, \texttt{onbottom},
-% \texttt{onleft}, or \texttt{onright}.
+% \DescribeMacro{\setaxismarks}
+% For changing this we provide the \cs{setaxismarks} command, whose first
+% argument is the axis letter, and whose second argument is one of the
+% words \texttt{inside}, \texttt{outside}, \texttt{centered},
+% \texttt{ontop}, \texttt{onbottom}, \texttt{onleft}, or \texttt{onright}.
%
% \DescribeMacro{\setxmarks}
% \cs{setxmarks} takes one argument and sets the position for the $x$ axis
% only, while
-% \DescribeMacro{\setymarks}\cs{setymarks} does the same for the $y$ axis.
-% For the border axes we provide
-% \DescribeMacro{\setbordermarks}\cs{setbordermarks}, which takes four
-% arguments: the positions for the left, bottom, right and top axis (in
-% that order). The abbreviation
-% \DescribeMacro{\setallbordermarks}\cs{setallbordermarks} takes one
-% argument and sets the position for all border axis marks to that.
+% \DescribeMacro{\setymarks}
+% \cs{setymarks} does the same for the $y$ axis. For the border axes we
+% provide
+% \DescribeMacro{\setbordermarks}
+% \cs{setbordermarks}, which takes four arguments: the positions for the
+% left, bottom, right and top axis (in that order).
+% \DescribeMacro{\setallbordermarks}
+% The abbreviation \cs{setallbordermarks} takes one argument and sets the
+% position for all border axis marks to that.
% \begin{macrocode}
\newdef\setaxismarks#1#2{\setmfnumeric{#1tick}{#2}}%
\newdef\setxmarks#1{\setaxismarks x{#1}}%
@@ -3041,9 +3062,10 @@
% be `\texttt{s}' and \cs{mfp@tension} to be the optional argument.
% Default tension is empty rather than 1 so we can implement a scheme to
% change the actual default used.
-% \DescribeMacro{\unsmoothdata}\cs{unsmoothdata} defines
-% \cs{mfp@smoothness} to be `\texttt{p}' and \cs{mfp@tension} to be
-% empty. The latter might not be necessary.
+% \DescribeMacro{\unsmoothdata}
+% The macro \cs{unsmoothdata} defines \cs{mfp@smoothness} to be
+% `\texttt{p}' and \cs{mfp@tension} to be empty. The latter might not be
+% necessary.
% \begin{macrocode}
\newdef\mfp@smdata#1{\mfp@def\mfp@smoothness{#1}%
\mfp@nullopt{\mfp@def\mfp@tension}}%
@@ -3057,13 +3079,14 @@
% controls which datum is plotted against which by \cs{plotdata} and
% \cs{datafile}.
%
-% \DescribeMacro{\usingpairdefault}\cs{usingpairdefault} sets the default,
-% which is to read the first two space separated words on a line as the
-% $x$ and $y$ coordinate of a point. To allow that there might be more
-% data on a line, it is also assumed that the second word is followed by a
-% space and the rest of the line is read as a third parameter that is not
-% used. In case there are only two words, \mfpic{} will always add a space
-% on the end and then the third parameter will be empty.
+% \DescribeMacro{\usingpairdefault}
+% The macro \cs{usingpairdefault} sets the default, which is to read the
+% first two space separated words on a line as the $x$ and $y$ coordinate
+% of a point. To allow that there might be more data on a line, it is also
+% assumed that the second word is followed by a space and the rest of the
+% line is read as a third parameter that is not used. In case there are
+% only two words, \mfpic{} will always add a space on the end and then the
+% third parameter will be empty.
%
% \DescribeMacro{\usingnumericdefault}
% For the occasional command that needs numeric data,
@@ -3113,13 +3136,14 @@
% something like \cs{mfpdatacomment}\marg{\cs{\#}}. This also changes the
% percent character to category `other'. We can also use the percent sign
% as part of the numeric data by placing
-% \DescribeMacro{\makepercentother}\cs{makepercentother} before the
-% \cs{using} command to turn `\texttt\%' into an ordinary character.
-% \DescribeMacro{\makepercentcomment}\cs{makepercentcomment} returns it to
-% its usual role as a comment. Every file reading command issues
-% \cs{mfp@setcomment} before reading. The count register
-% \cs{mfp@commentchar} holds the ASCII code of the current comment
-% character, the default being the percent sign.
+% \DescribeMacro{\makepercentother}
+% \cs{makepercentother} before the \cs{using} command to turn `\texttt\%'
+% into an ordinary character.
+% \DescribeMacro{\makepercentcomment}
+% \cs{makepercentcomment} returns it to its usual role as a comment. Every
+% file reading command issues \cs{mfp@setcomment} before reading. The
+% count register \cs{mfp@commentchar} holds the ASCII code of the current
+% comment character, the default being the percent sign.
% \begin{macrocode}
\newcount\mfp@commentchar \mfp@commentchar`\%%
\newdef\makepercentother{\@makeother\%}%
@@ -3343,18 +3367,22 @@
%
% \DescribeMacro{\polyline}
% The most basic, a polyline or polygonal path, \cs{polyline} draws line
-% segments from each point to the next. \DescribeMacro{\lines}\cs{lines}
-% is an alias.
-%
-% \DescribeMacro{\closedpolyline}\cs{closedpolyline} does the
-% same, except it produces a closed path, connecting the last point to the
-% first. \DescribeMacro{polygon}\cs{polygon} is an alias.
-%
-% \DescribeMacro{\computedspline}The \cs{computedspline} command takes a
-% list of points and computes the controls of a cubic spline that connects
-% the points. Adjacent segments have matching first and second derivatives
-% at the common endpoint. It is limited to what is called a \emph{relaxed}
-% spline, which has zero curvature at the beginning and ending points.
+% segments from each point to the next.
+% \DescribeMacro{\lines}
+% \cs{lines} is an alias.
+%
+% \DescribeMacro{\closedpolyline}
+% The macro \cs{closedpolyline} does the same, except it produces a closed
+% path, connecting the last point to the first.
+% \DescribeMacro{polygon}
+% \cs{polygon} is an alias.
+%
+% \DescribeMacro{\computedspline}
+% The \cs{computedspline} command takes a list of points and computes the
+% controls of a cubic spline that connects the points. Adjacent segments
+% have matching first and second derivatives at the common endpoint. It is
+% limited to what is called a \emph{relaxed} spline, which has zero
+% curvature at the beginning and ending points.
%
% \DescribeMacro{\closedcomputedspline}
% This is similar, but computes the unique \emph{closed} cubic spline that
@@ -3378,29 +3406,30 @@
% the triples $p\sb{n-1}, p\sb{n}, p\sb1$ and $p\sb{n}, p\sb1, p\sb2$ as
% being `successive'.
%
-% \DescribeMacro{\cspline} This produces cubic splines. The points
-% determine the curve as follows: for successive points $p\sb i, p\sb
-% {i+1}$ in the list, the line segment connecting them is divided into
-% thirds with two points $q\sb i$ and $q\sb i'$. The curve then passes
-% through the midpoint of the segment from $q\sb {i-1}'$ to $q\sb i$ and
-% tangent to that segment. This causes adjacent B\'ezier segments to have
-% matching first and second derivatives at their common endpoint. Each
-% four successive data points determines one segment of the path.
+% \DescribeMacro{\cspline}
+% The macro \cs{cspline} produces cubic splines. The points determine the
+% curve as follows: for successive points $p\sb i, p\sb {i+1}$ in the
+% list, the line segment connecting them is divided into thirds with two
+% points $q\sb i$ and $q\sb i'$. The curve then passes through the
+% midpoint of the segment from $q\sb {i-1}'$ to $q\sb i$ and tangent to
+% that segment. This causes adjacent B\'ezier segments to have matching
+% first and second derivatives at their common endpoint. Each four
+% successive data points determines one segment of the path.
%
-% \DescribeMacro{\closedcspline} The closed variant works by viewing the
-% first point as a succesor of the last point, creating three additional
-% path segments.
+% \DescribeMacro{\closedcspline}
+% The closed variant works by viewing the first point as a succesor of the
+% last point, creating three additional path segments.
%
% \DescribeMacro{\qbeziers}
% This produces the equivalent of a sequence of \LaTeX{} \cs{qbezier}
% commands. The mandatory argument will be a list of points alternating
% between nodes and control points, ending with the last node.
-% \DescribeMacro{\closedqbeziers}The closed version ends with the control
-% point between the last node and the first. Therefore, the \cs{qbeziers}
-% command needs an odd number of points in the list, while
-% \cs{closedqbeziers} needs an even number. If this is not the case, the
-% last point in the list is repeated, causing the final segment to be a
-% straight line (closed case) or trivial.
+% \DescribeMacro{\closedqbeziers}
+% The closed version ends with the control point between the last node and
+% the first. Therefore, the \cs{qbeziers} command needs an odd number of
+% points in the list, while \cs{closedqbeziers} needs an even number. If
+% this is not the case, the last point in the list is repeated, causing
+% the final segment to be a straight line (closed case) or trivial.
%
% Note that quadratic B\'eziers need not be smooth at the nodes unless
% the control points line up. Our plural name distinguishes it from the
@@ -3409,8 +3438,10 @@
% \DescribeMacro{\cbeziers}
% Like the above, except it produces a cubic B\'ezier. It requires a
% list of $3n+1$ points in the pattern node-control-control, ending with
-% an extra node. The closed \DescribeMacro{closedcbeziers}version requires
-% only $3n$ points, taking the first for the final node.
+% an extra node.
+% \DescribeMacro{closedcbeziers}
+% The closed version requires only $3n$ points, taking the first for the
+% final node.
%
% \DescribeMacro{\fcnspline}
% The above splines are two dimensional splines, that is, functions of
@@ -3470,22 +3501,26 @@
% for the curve, at point $p\sb n$ to be traveling parallel to the direction
% from $p\sb {n-1}$ to $p\sb {n+1}$ (except at the first and last point).
%
-% The closed version \DescribeMacro{\closedcurve}\cs{closedcurve} treats the
+% \DescribeMacro{\closedcurve}
+% The closed version \cs{closedcurve} treats the
% first point and last point the same as the rest. It has the alias
-% \DescribeMacro{\cyclic}\cs{cyclic}.
+% \DescribeMacro{\cyclic}
+% \cs{cyclic}.
%
% \DescribeMacro{\convexcurve}
% This convex version produces a smooth curve that is convex in those
% places where \cs{polyline} (with the same list of points) would produce
-% a convex shape. \DescribeMacro{\closedconvexcurve}It also comes in a closed
-% version, with the alias \DescribeMacro{\convexcyclic}
+% a convex shape.
+% \DescribeMacro{\closedconvexcurve}
+% It also comes in a closed version, with the alias
+% \DescribeMacro{\convexcyclic}
% \cs{convexcyclic}.
%
% \DescribeMacro{\mfbezier}
% This produces the standard \MF{} cubic B\'ezier using the \MF{} path
% join operator (\mfc{..}) with tension given by an optional argument.
-% \DescribeMacro{\closedmfbezier}The closed version connects the last
-% point to the first in the same way.
+% \DescribeMacro{\closedmfbezier}
+% The closed version connects the last point to the first in the same way.
%
% The command \cs{mfp@curve} examines the optional argument and writes
% the command name (first argument, possibly modified) with the
@@ -3689,7 +3724,8 @@
% \cs{mfobj}\marg{\meta{name}} is a figure macro, and should act exactly
% the same as if the figure macro that had been stored in the variable
% were typed in its place. Its one argument is the variable name.
-% \DescribeMacro{\mpobj}\cs{mpobj} is another name for the same command.
+% \DescribeMacro{\mpobj}
+% The macro \cs{mpobj} is just another name for the same command.
% \begin{macrocode}
\newlet\mfobj\mfp@figmac \newlet\mpobj\mfobj
% \end{macrocode}
@@ -3698,10 +3734,11 @@
% The command \cs{mfpimage} starts a group in which drawing commands
% work just as usual, except they draw in a picture variable, whose name
% is the only mandatory argument to \cs{mfpimage}.
-% \DescribeMacro{\endmfpimage}The command \cs{endmfpimage} ends that
-% group. There is an optional argument to set the reference point of the
-% created picture, the default being \gbc{(0,0)}. The resulting picture
-% can then be placed using \cs{putmfpimage}.
+% \DescribeMacro{\endmfpimage}
+% The command \cs{endmfpimage} ends that group. There is an optional
+% argument to set the reference point of the created picture, the default
+% being \gbc{(0,0)}. The resulting picture can then be placed using
+% \cs{putmfpimage}.
% \begin{macrocode}
\newdef\mfpimage{\mfp@defaultopt\mfp@image{(0,0)}}%
\newdef\endmfpimage{\mfcmd{\@nl concludeimage}}%
@@ -3750,9 +3787,10 @@
% This produces a subpath of the following path. Its mandatory argument
% contains two numbers separated by a comma. The numbers should be between
% 0 and 1 and produce a fraction of the following path.
-% \DescribeMacro{\subpath}\cs{subpath} has a similar argument, but the
-% numbers are between $0$ and the number of segments in the path, and it
-% produces the equivalent of \MF's \mfc{subpath} primitive.
+% \DescribeMacro{\subpath}
+% The macro \cs{subpath} has a similar argument, but the numbers are
+% between $0$ and the number of segments in the path, and it produces the
+% equivalent of \MF's \mfc{subpath} primitive.
% \begin{macrocode}
\newdef\partpath{\mfp@modi{partialpath}}%
\newdef\subpath{\mfp@modi{gsubpath}}%
@@ -3788,7 +3826,8 @@
%
% \DescribeMacro{\dashed}
% \cs{dashed} and \cs{dotted} take one optional argument, which should
-% contain the length of the dashes (diameter of \DescribeMacro{\dotted}
+% contain the length of the dashes (diameter of
+% \DescribeMacro{\dotted}
% dots) and the length of the spaces between, separated by a comma.
%
% Several rendering macros take an optional argument which is written as
@@ -3830,7 +3869,9 @@
% This creates a coil, or corkscrew-shaped rendering. In this case
% \meta{dim$\sb3$} is the distance from one loop to the next and
% \meta{dim$\sb4$} is the maximum distance to each side of the path.
-% An alias, \DescribeMacro{\corkscrew}\cs{corkscrew}, is provided.
+% An alias,
+% \DescribeMacro{\corkscrew}
+% \cs{corkscrew}, is provided.
%
% Both \cs{sinewave} and \cs{corkscrew} take an optional `tension'
% argument that affects the smoothness of the result. The default is $1$
@@ -3903,21 +3944,23 @@
% the tension value (empty if there is no tension option).
%
% \DescribeMacro{\sclosed}
-% The first closes smoothly in the same manner that \cs{curve} creates a
-% smooth path. \DescribeMacro{\bclosed}The second uses an ordinary \MF{}
-% B\'ezier. These two have an optional argument: the amount of tension to
-% put in the connecting link. This makes no sense with the rest.
+% 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
+% have an optional argument: the amount of tension to put in the
+% connecting link. This makes no sense with the rest.
%
% \DescribeMacro{\lclosed}
-% \cs{lclosed} always draws a straight line from the end of a path to
-% its start.
+% The macro \cs{lclosed} always draws a straight line from the end of a
+% path to its start.
%
% \DescribeMacro{\cbclosed}
-% \cs{cbclosed} computes a closure by calculating cubic B-spline control
-% points from the path data and then generating a connecting spline (see
-% \cs{cspline}).
-% \DescribeMacro{\qbclosed}\cs{qbclosed} is similar, but quadratic
-% B-splines are used.
+% The macro \cs{cbclosed} computes a closure by calculating cubic B-spline
+% control points from the path data and then generating a connecting
+% spline (see \cs{cspline}).
+% \DescribeMacro{\qbclosed}
+% The macro \cs{qbclosed} is similar, but quadratic B-splines are used.
%
% \DescribeMacro{\uclosed}
% At one time \cs{uclosed} was defined in a more complicated manner than
@@ -3981,11 +4024,13 @@
% others. Its first optional argument is the separation \emph{and} the
% angle (default $0$) of the lines, separated by a comma. The other
% hatching macros have a fixed angle.
-% \DescribeMacro{\lhatch}\cs{lhatch} has lines at a $-45$
-% degree angle (upper left to lower right),
-% \DescribeMacro{\rhatch}\cs{rhatch} produces the opposite
-% diagonal (angle $45$ degrees), and \DescribeMacro{\xhatch}\cs{xhatch}
-% does both sets of lines (cross hatching).
+% \DescribeMacro{\lhatch}
+% The macro \cs{lhatch} has lines at a $-45$ degree angle (upper left to
+% lower right),
+% \DescribeMacro{\rhatch}
+% \cs{rhatch} produces the opposite diagonal (angle $45$ degrees), and
+% \DescribeMacro{\xhatch}
+% \cs{xhatch} does both sets of lines (cross hatching).
% \begin{macrocode}
\newdef\thatch{\mfp@defaultopt\mfp@thatch{\the\hatchspace,0}}%
\newdef\lhatch{\mfp@defaultopt\mfp@lhatch{\the\hatchspace}}%
@@ -4190,9 +4235,10 @@
% \DescribeMacro{\arrowtail}
% Tails are just like heads except that there is no star-form and the
% \grafbase{} command name (second parameter of \cs{mfp@arr}) is
-% different. And \DescribeMacro{\arrowmid}\cs{arrowmid} is just like
-% \cs{arrowtail} except for the command name and the different default for
-% the position optional argument.
+% different.
+% \DescribeMacro{\arrowmid}
+% And \cs{arrowmid} is just like \cs{arrowtail} except for the command
+% name and the different default for the position optional argument.
% \begin{macrocode}
\newdef\arrowtail##1{\mfp@arr 0{tailpath (##1)}}%
\newdef\arrowmid##1{\mfp@arr{0.5}{midpath (##1)}}%
@@ -4206,12 +4252,12 @@
% The following apply transforms to the \MF{} coordinate system, and
% these can be localized with the \env{coords} environment. In plain
% \TeX{} \cs{coords} starts the environment and
-% \DescribeMacro{\endcoords}\cs{endcoords} closes it. The transforms
-% apply when the curve is \emph{rendered} and do not affect what paths are
-% defined. Thus, for example, \cs{store} will store the same path
-% whatever the state of the coordinate system. In terms of \grafbase{}
-% commands, only \gbc{vtr} and \gbc{ztr} are changed, and these are only
-% applied when rendering.
+% \DescribeMacro{\endcoords}
+% \cs{endcoords} closes it. The transforms apply when the curve is
+% \emph{rendered} and do not affect what paths are defined. Thus, for
+% example, \cs{store} will store the same path whatever the state of the
+% coordinate system. In terms of \grafbase{} commands, only \gbc{vtr} and
+% \gbc{ztr} are changed, and these are only applied when rendering.
%
% \DescribeMacro{\applyT}
% These are implemented by \cs{applyT} which takes as its argument a \MF{}
@@ -4259,12 +4305,14 @@
%
% \DescribeMacro{\axes}
% The original \cs{axes} was therefore not a figure macro. It always drew
-% both axes with solid lines. \DescribeMacro{\xaxis}Later \cs{xaxis} and
-% \cs{yaxis} were introduced, which mimicked the behavior of \cs{axes}.
-% For backward \DescribeMacro{\yaxis}compatibility, the old behavior is
-% supported with the old commands. The optional argument to \cs{axes},
-% \cs{xaxis} and \cs{yaxis} is the length of the arrowhead, defaulting to
-% \cs{the}\cs{axisheadlen}.
+% both axes with solid lines.
+% \DescribeMacro{\xaxis}
+% Later \cs{xaxis} and \cs{yaxis} were introduced, which mimicked the
+% behavior of \cs{axes}. For backward
+% \DescribeMacro{\yaxis}
+% compatibility, the old behavior is supported with the old commands. The
+% optional argument to \cs{axes}, \cs{xaxis} and \cs{yaxis} is the length
+% of the arrowhead, defaulting to \cs{the}\cs{axisheadlen}.
% \begin{macrocode}
\newdef\xaxis{\mfp@defaultopt{\mfp@simple{xaxis}}{\the\axisheadlen}}%
\newdef\yaxis{\mfp@defaultopt{\mfp@simple{yaxis}}{\the\axisheadlen}}%
@@ -4281,10 +4329,10 @@
% (the arrowhead length) and one mandatory argument, a single letter
% designating the axis to draw.
%
-% \DescribeMacro{\axisline}The \cs{axisline} command is provided for users
-% who want more control. It is a figure macro that produces the
-% corresponding line, and the user can use all the flexibility of the
-% \cs{arrowhead} command if necessary.
+% \DescribeMacro{\axisline}
+% The \cs{axisline} command is provided for users who want more control.
+% It is a figure macro that produces the corresponding line, and the user
+% can use all the flexibility of the \cs{arrowhead} command if necessary.
% \begin{macrocode}
\newdef\axis{\mfp@nullopt\mfp@axis}%
\newdef\axisline##1{\mfp@figmac{axisline.##1}}%
@@ -4296,10 +4344,10 @@
% with nothing separating them except optional spaces. \cs{doaxes} is
% implemented via the self-looping macro \cs{mfp@doaxis}.
%
-% \DescribeMacro{\border}The \cs{border} command is almost equivalent to
-% \cs{doaxes}\marg{lbrt}, except it is a figure macro. With it, the
-% whole picture can be filled with a background color, or outlined in any
-% available rendering.
+% \DescribeMacro{\border}
+% The \cs{border} command is almost equivalent to \cs{doaxes}\marg{lbrt},
+% except it is a figure macro. With it, the whole picture can be filled
+% with a background color, or outlined in any available rendering.
% \begin{macrocode}
\newdef\doaxes{\mfp@nullopt\mfp@doaxes}%
\newdef\border{\mfp@figmac{borderrect}}%
@@ -4310,7 +4358,8 @@
% \cs{axismarks} command (\cs{marks} was the original choice, but that
% turned out to conflict with one of e\kern-.06em\TeX's primitives).
% For brevity, therefore, we also have separate commands
-% \DescribeMacro{\xmarks}\cs{xmarks},
+% \DescribeMacro{\xmarks}
+% \cs{xmarks},
% \cs{ymarks}\SpecialUsageIndex\ymarks,
% \cs{lmarks}\SpecialUsageIndex\lmarks,
% \cs{bmarks}\SpecialUsageIndex\bmarks,
@@ -4389,10 +4438,13 @@
% \DescribeMacro{\plrgridpoints}
% \cs{plrgridpoints} is similar but places only dots at the intersections
% of these arcs and rays. It takes an optional argument for the size of
-% the dots, default \cs{griddotsize}. \DescribeMacro{\gridarcs}\cs{gridarcs}
-% draws only the arcs. Its only parameter is the distance between them (in
-% graph units). \DescribeMacro{\gridrays}\cs{gridrays} draws only the rays
-% and its parameter is the angle separating the rays.
+% the dots, default \cs{griddotsize}.
+% \DescribeMacro{\gridarcs}
+% The macro \cs{gridarcs} draws only the arcs. Its only parameter is the
+% distance between them (in graph units).
+% \DescribeMacro{\gridrays}
+% The macro \cs{gridrays} draws only the rays and its parameter is the
+% angle separating the rays.
%
% \DescribeMacro{\plrpatch}
% \cs{plrpatch} draws: a circular arc at a starting radius, then
@@ -4657,7 +4709,8 @@
%
% \DescribeMacro{\mfppiechart}
% We make \cs{mfppiechart} and \cs{mfpbarchart}\label{charts} global,
-% since all they do is define variables \DescribeMacro{\mfpbarchart}
+% since all they do is define variables
+% \DescribeMacro{\mfpbarchart}
% and arrays.
% \begin{macrocode}
\newdef\mfppiechart{\mfp@defaultopt\mfp@piechart{c}}%
@@ -5046,6 +5099,7 @@
\newdef\mfp@vectorfield#1#2#3#4#5{%
\mfcmd{#1vectorfield (#2, #3) (#4) (#5)}}%
% \end{macrocode}
+%
% The first argument of both these is the optional size argument of the
% calling commands (\cs{point} and \cs{plotsymbol}). For
% \cs{mfp@plotsymbol} the second argument is the symbol name.
@@ -5105,9 +5159,9 @@
% \DescribeMacro{\everymfpic}
% This takes a token list and saves it in \cs{every@mfpic} to be issued
% at the very end of the \cs{mfpic} command. There is a companion macro
-% \DescribeMacro{\everyendmfpic} that is issued at the very beginning of
-% \cs{endmfpic}. These are always global, otherwise they are defined much
-% like \cs{everytlabel}.
+% \DescribeMacro{\everyendmfpic}
+% that is issued at the very beginning of \cs{endmfpic}. These are always
+% global, otherwise they are defined much like \cs{everytlabel}.
% \begin{macrocode}
\newdef\everymfpic{\afterassignment\@everymfpic\mfp@toks}%
\newdef\everyendmfpic{\afterassignment\@everyendmfpic\mfp@toks}%
@@ -5185,9 +5239,9 @@
% \DescribeMacro{\xmin}
% \DescribeMacro{\xmax}
% \DescribeMacro{\ymin}
-% \DescribeMacro{\ymax} We make all the arguments of \cs{@mfpic}
-% available to the user. Macro \cs{mfp@setconv} now also makes use of
-% them.
+% \DescribeMacro{\ymax}
+% We make all the arguments of \cs{@mfpic} available to the user. Macro
+% \cs{mfp@setconv} now also makes use of them.
%
% 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}.
@@ -5292,7 +5346,8 @@
% \DescribeMacro{\startbacktext}
% \cs{startbacktext}, labels are saved in a special place to be included
% behind the \mfpic{} graphic. This continues until
-% \DescribeMacro{\stopbacktext}\cs{stopbacktext}.
+% \DescribeMacro{\stopbacktext}
+% \cs{stopbacktext}.
%
% We simply turn off \gbc{overlaylabels} and turn on \gbc{backtextlabels}
% for \MP{}. We also save the box \cs{@alltlabels} in \cs{@wholegraph}
@@ -6281,8 +6336,8 @@
% \DescribeMacro{\mfpverbtex}
% This is a user level utility for putting some \mfc{verbatimtex} material
% in the output file for \MP. We allow the user to do this even before
-% \cs{opengraphsfile} (but only once) by storing it in a token register
-% and setting a flag for that command to test.
+% \cs{opengraphsfile} by appending it to a token register and setting a
+% flag for that command to test.
%
% We now want \texttt\% signs to be written to the output, but also
% want to allow the construct
@@ -6314,7 +6369,6 @@
% \begin{macrocode}
\newif\ifmfp@verbtex
\def\mfp@writetex{%
- \endgroup
\mfp@ifopengraphsfile
{\mfp@ifmpost
{\mfcmd{verbatimtex\@nl\the\mfp@toks\@nl\mfp@p\@nl etex}}%
@@ -6322,7 +6376,9 @@
\global\mfp@verbtexfalse\global\mfp@verbtex{}}%
{\edef\mfp@tempa{\the\mfp@verbtex\the\mfp@toks}%
\global\mfp@verbtex\@xp{\mfp@tempa}%
- \global\mfp@verbtextrue}}%
+ \global\mfp@verbtextrue}%
+ \endgroup
+}%
% \end{macrocode}
%
%