summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex136
1 files changed, 72 insertions, 64 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
index 37d6c93bc53..e420947df95 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
@@ -1,5 +1,5 @@
%%% File: mfpic-doc.tex
-%%% A part of mfpic 1.03 2009/11/18
+%%% A part of mfpic 1.04 2010/03/30
%%%
% Documentation of mfpic macros
\documentclass[letterpaper]{article}
@@ -31,13 +31,12 @@
\title{\Mfp{}: Pictures in \TeX{}\\ with Metafont and
MetaPost\thanks{Copywrite 2002--2006, Daniel H. Luecking}}
-
\author{%
Daniel H. Luecking%
\thanks{\email {luecking@uark.edu}: Communications regarding \mfp{}
should be sent to this author. Any first-person references in this
manual refer to Dr.~Luecking.}
-\and Dr Thomas E. Leathrum
+\and Thomas E. Leathrum
\and Geoffrey Tobin}
\date{\mfpdate}
@@ -160,13 +159,13 @@ this.%
\footnote{The document \textit{Some experiences on running Metafont
and MetaPost}, by Peter Wilson, can be useful for beginners. Fetch
\file{CTAN/info/metafp.pdf}. `\file{CTAN}' means the Comprehensive
- \TeX{} Archive Network. You can find the mirror nearest you by
- pointing your browser at \file{http://www.ctan.org/}.}) %
+ \TeX{} Archive Network. You can access \file{CTAN} by pointing your
+ web browser at \url{http://mirror.ctan.org/}\,.}) %
Typically, you just type
\begin{verbatim}
mpost pics.mp
\end{verbatim}
-(or possibly "\verb$mp pics.mp$", but try \verb$mpost$ first).
+(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
@@ -189,8 +188,8 @@ should do whatever is necessary (perhaps nothing!) to insure that \TeX{}
looks in the current directory for \file{.tfm} files, and that your DVI
drivers look in the current directory for \file{.pk} files. There may
also be some setup needed to ensure that the \file{.pk} files are
-created at a resolution that matches that of your printer and of your DVI
-viewer. See the discussion in \file{mfpguide.pdf}.
+created at a resolution that matches that of your printer and of your
+DVI viewer. See the discussion in \file{mfpguide.pdf}.
If you want to test this process on the supplied sample files, edit
\file{pictures.tex} removing the \cs{usemetapost} command (or edit
@@ -2150,8 +2149,8 @@ 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}
%
-And if one didn't know that \mfc{RGB} returned an \kw{rgbcolor}, one
-could also write \verb$makergb RGB(255,0,0)$ to be sure to get an
+If one didn't know that \mfc{RGB} returned an \kw{rgbcolor}, one
+could write \verb$makergb RGB(255,0,0)$ to be sure to get an
\kw{rgbcolor}.
The first two commands are never necessary in early \MP{}, but they are
@@ -2505,7 +2504,7 @@ problems can occur, at one end or the other, if the path is shorter than
the sum of the dimensions.
\begin{cd}\pagelabel{parallelpath}
-\cs{parallelpath}{\meta{dist}}$\ldots$
+\cs{parallelpath}\marg{\meta{dist}}$\ldots$
\index{parallelpath@\cs{parallelpath}}
\end{cd}
@@ -3737,18 +3736,18 @@ below can be used to change the default dashes, colors, or symbols.
\end{cd}
The first argument of \cs{reconfigureplot} is the rendering method to be
-changed: \texttt{dashes}, \texttt{colors}, or \texttt{symbols}. The
+changed: \texttt{dashes}, \texttt{colors} or \texttt{symbols}. The
second argument is a list of dash patterns, colors, or symbols. The dash
-patterns should be names of patterns defined through the use of
-\cs{dashpattern}. The colors can be any color names already known to
-\MP{}, or defined through \cs{mfpdefinecolor}. The symbols can be any of
-those listed with the \cs{plotsymbol} command (see
-subsection~\ref{points}), or any known \MF{} path variable. The colors
-can also be \MP{} color constants or expressions, and the symbols can be
-expressions of type path. In recent \MP{} these `colors' can be
-\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 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.
Using \cs{reconfigureplot}\marg{colors} under the \opt{metafont} option
will have no effect, but may produce an error from \MF{} unless the
@@ -3980,14 +3979,13 @@ can use \cs{axislabels}\marg{x}\oarg{cr90}\marg{\marg{first}1,
\index{plottext@\cs{plottext}}
\end{cd}
-Similar in effect to \cs{point} and \cs{plotsymbol} (but without
-requiring \MF{}), \cs{plottext} places a copy of \meta{text} at each of
-the listed points. Since version 0.9, when \cs{tlabel} was enhanced to
-allow lists of points, it is implemented by an equivalent \cs{tlabel}
-command and is only kept for backward compatibility. It differs from
-\cs{tlabel} when the optional argument is absent: the default
-justification is \oarg{cc} regardless of the setting of
-\cs{tlabeljustify}.
+Similar in effect to \cs{point} and \cs{plotsymbol}, \cs{plottext}
+places a copy of \meta{text} at each of the listed points. Since \mfp{}
+version 0.9, when \cs{tlabel} was enhanced to allow lists of points, it
+is implemented by an equivalent \cs{tlabel} command and is only kept for
+backward compatibility. It differs from \cs{tlabel} when the optional
+argument is absent: the default justification is \oarg{cc} regardless of
+the setting of \cs{tlabeljustify}.
\begin{cd}\pagelabel{mfpverbtex}
\cs{mfpverbtex}\marg{\meta{\TeX{}-cmds}}%
@@ -4306,9 +4304,9 @@ choice or devising.
Coordinate transformations that keep parallel lines in parallel are
called \emph{affine transforms}. These include translation, rotation,
reflection, scaling and skewing (slanting). For the \MF{} coordinate
-system only---that is, for paths, but not for \cs{tlabel}'s (let alone
-\cs{tcaption}'s)---\mfp{} provides the ability to apply \MF{}
-affine transforms.
+system only (that is, for paths, but not for \cs{tlabel} nor
+\cs{tcaption}) \mfp{} provides the ability to apply \MF{} affine
+transforms.
\subsection{Transforming the \MF{} coordinate system}\label{affine}
@@ -4361,7 +4359,7 @@ environment. In \LaTeX{}, one can use the environment named
& Scale only the $y$ coordinates by a factor of \meta{s}.\\
\cs{zscale}\marg{\meta{pair}}%
\index{zscale@\cs{zscale}}%
- & Scale by the magnitude of vector \meta{v}, and rotate by its
+ & Scale by the length of vector \meta{v}, and rotate by its
angle.\\
\cs{xslant}\marg{\meta{s}}%
\index{xslant@\cs{xslant}}%
@@ -4634,11 +4632,16 @@ will not produce a rotated dashed rectangle. Rather the original
rectangle will be dashed, and the rotated rectangle will be filled.
One complication is the handling of the default rendering. One expects
-\verb$\rect{(0,0),(1,1)}$ to draw a rectangle, and
-\verb$\rotatepath{(0,0),45}\rect{(0,0),(1,1)}$ to draw a rotated
-rectangle (but not the original). That is, a transformation + figure is
-treated as if it were a single figure. But what would one expect in the
-following?
+\begin{verbatim}
+\rect{(0,0),(1,1)}
+\end{verbatim}
+to draw a rectangle, and
+\begin{verbatim}
+\rotatepath{(0,0),45}\rect{(0,0),(1,1)}
+\end{verbatim}
+to draw a rotated rectangle (but not the original). That is, a
+transformation + figure is treated as if it were a single figure. But
+what would one expect in the following?
\begin{verbatim}
\rotatepath{(0,0),45}\dashed\rect{(0,0),(1,1)}
\end{verbatim}
@@ -4883,9 +4886,8 @@ are \dim{0.5pt} and \dim{3pt}.
\index{griddotsize@\cs{griddotsize}}%
\end{cd}
-This dimension is used as the default for the sizes of dots in the
-\cs{grid} and \cs{plrgridpoints} commands. The initial value is
-\dim{0.5pt}
+This dimension gives the default for the sizes of dots in the \cs{grid}
+and \cs{plrgridpoints} commands. The initial value is \dim{0.5pt}.
\begin{cd}\pagelabel{symbolspace}
\cs{symbolspace}%
@@ -5375,7 +5377,7 @@ other commands. The main ones are \cs{regpolygon}, \cs{piechart} and
use is restricted to an \env{mfpic} environment or for backward
compatibility with the time when they were so restricted).
-Using \cs{regpolygon}{\meta{num}}\marg{X}\marg{...}\marg{...} causes a
+Using \cs{regpolygon}\marg{\meta{num}}\marg{X}\marg{...}\marg{...} causes a
pair array named \gbc{X} to be defined having \meta{num} elements (and
the additional pair \gbc{X0} for the center). This is in addition to
creating the actual figure. The variable \gbc{X} alone becomes a numeric
@@ -5477,7 +5479,7 @@ both numeric and pair valued functions, the type of each is noted after
the description:
\noindent
-\begin{tabular}{@{}ll}
+\begin{tabular}{@{}lp{4.2in}}
\gbc{Arg z} & The principle argument of $z$ in radians (numeric).\\
\gbc{Log z} & The principle logarithm of $z$ (pair).\\
\gbc{cis t} & $(\cos t, \sin t)$, same as \gbc{dir degrees(t)} (pair).\\
@@ -5547,7 +5549,7 @@ command. Now we have the following command to place multiple copies of
a picture:
\begin{cd}\pagelabel{putmfpimage}
- \cs{putmfpimage}\marg{\meta{name}}{\meta{list}}%
+ \cs{putmfpimage}\marg{\meta{name}}\marg{\meta{list}}%
\index{putmfpimage@\cs{putmfpimage}}
\end{cd}
@@ -5665,7 +5667,7 @@ above, \gbc{center} is equated to pairs, but in the following
\dotted\circle{(0,0),radius}
\endmfpfor
\end{verbatim}
-\gbc{radius} gets numeric data.
+\gbc{radius} gets numeric values.
The other type of header uses a stepped variable:
\begin{verbatim}
@@ -5791,7 +5793,7 @@ Just to be clear: in all the examples, what is written to the figure
file is a \emph{single} circle or rectangle drawing command, bracketed
by code that causes \MF{} to execute it several times with different
values for the variable. From \TeX{}'s point of view, there is only one
-drawing command command.
+\mfp{} drawing command.
\subsection{Miscellaneous}\label{misc}
@@ -5808,7 +5810,12 @@ viewing/printing program and the file \file{modes.mf} are correctly
configured, nothing may need to be done. If not, as a last resort, you
can set the \MF{} mode or the \MF{} resolution in your \file{.tex} file
with these commands. If you don't know what that means, ask a guru, but
-then you probably shouldn't be using \MF{} at all.
+then you should probably be using \MP{} and not \MF{}.
+
+Note that this is a \emph{last resort}. The code in \file{grafbase.mf}
+first checks if \mfc{mode} has been defined, then checks if
+\mfc{localfont} is defined and only then checks if the resolution has
+been set by this method (if all three fail, it uses a value of 600 DPI).
\begin{cd}\pagelabel{noship}
\cs{noship}\\%
@@ -5840,9 +5847,9 @@ locally, one can globally copy it to another variable with
\index{globalassignmpvalue@\cs{globalassignmpvalue}}%
\end{cd}
-The commands \cs{assignmpvalue} and \cs{globalassignmpvalue} are just
-alternative spellings. You can use either spelling with either the
-\opt{metafont} or \opt{metapost} option.
+The command names spelled with ``\texttt{mp}'' are no different than the
+ones spelled with ``\texttt{mf}''. You can use either spelling with
+either the \opt{metafont} or \opt{metapost} option.
These commands causes the \meta{MF-expr} to be written to the output
file for \MF{} to evaluate. The resulting value is then written to the
@@ -5884,7 +5891,7 @@ cases. If a global definition is needed, use the global versions above.
Because of the asynchronous nature of the definition process, using
\cs{assignmfvalue} with the same macro name more than once in the same
-\env{mfpic} environment will not work. The macro acquires its definition
+\env{mfpic} environment will not work. The macro becomes defined
upon reading the logfile during the execution of \cs{opengraphsfile},
and it will end up with the last definition encountered. (The same is
true for uses outside \env{mfpic} environments: the macro acquires the
@@ -6132,7 +6139,7 @@ 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{103}' because the version is 1.03. It can
+writing, it produces `\texttt{104}' because the version is 1.04. It can
be used to test the version:
\begin{verbatim}
\ifx\mfpicversion\undefined \def\mfpicversion{0}\fi
@@ -6415,8 +6422,9 @@ plain \TeX{} &The file \file{epsf.tex} or \file{epsf.sty}\\
\LaTeX{} &The package \prog{graphics} or \prog{graphicx}\\
\pdfLaTeX{} &The package \prog{graphics} or
\prog{graphicx} with option \opt{pdftex}\\
-plain \pdfTeX{} &The files \file{supp-pdf.mkii} or \file{supp-pdf.tex}
- and (possibly) \file{supp-mis.tex}\\
+plain \pdfTeX{} &\raggedright The files \file{supp-pdf.mkii} or
+ \file{supp-pdf.tex} and (possibly)
+ \file{supp-mis.tex}\tabularnewline
In all cases &\raggedright The files \file{grafbase.mp} and
\file{dvipsnam.mp} plus, of course,
\file{mfpic.tex} (and \file{mfpic.sty} for
@@ -6640,7 +6648,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 the commands
+coordinate pairs to rectangular coordinates, so commands
\cs{plrcurve}, \cs{plrcyclic}, \cs{plrlines} and \cs{plrpoint} were
dropped from \mfp{}. Now use
\begin{ex}
@@ -6698,8 +6706,8 @@ a semicolon to its argument.
\smallskip
There is a misprint: \cs{axisheadlin} should be \cs{axisheadlen}.
-Finally, in the \LaTeX{} template on page 496: recent \mfp{} may be
-loaded with \cs{usepackage}.
+Finally, the \LaTeX{} template on page 496 is no longer the only
+possiblity: recent \mfp{} may be loaded with \cs{usepackage}.
\subsection{Other programs}
@@ -6739,7 +6747,7 @@ produced appears to be compatible with the current \mfp{}.
\let\item\@idxitem
\makeatother
-\subsection{Figure macros}
+\subsection{Figures}
\item \cs{arc}, \pageref{arc}
\item \cs{axis}, \pageref{axis}
@@ -6790,7 +6798,7 @@ produced appears to be compatible with the current \mfp{}.
\item \cs{tlabelrect}, \pageref{tlabelrect}
\item \cs{turtle}, \pageref{turtle}
-\subsection{Macros that render}
+\subsection{Renderings}
\item \cs{corkscrew}, \pageref{corkscrew}
\item \cs{dashed}, \pageref{dashed}
@@ -6815,14 +6823,14 @@ produced appears to be compatible with the current \mfp{}.
\item \cs{xhatch}, \pageref{hatch}
\item \cs{zigzag}, \pageref{zigzag}
-\subsection{Macros that append (arrows)}
+\subsection{Arrows}
\item \cs{arrow}, \pageref{arrow}
\item \cs{arrowhead}, \pageref{arrowhead}
\item \cs{arrowmid}, \pageref{arrowhead}
\item \cs{arrowtail}, \pageref{arrowhead}
-\subsection{Macros that modify}
+\subsection{Modifying figures}
\item \cs{bclosed}, \pageref{lclosed}
\item \cs{cbclosed}, \pageref{cbclosed}
@@ -7005,7 +7013,7 @@ produced appears to be compatible with the current \mfp{}.
\item \cs{setymarks}, \pageref{setaxismarks}
\item \cs{shadewd}, \pageref{shadewd}
-\subsection{Changing colors}
+\subsection{Setting colors}
\item \cs{backgroundcolor}, \pageref{drawcolor}
\item \cs{drawcolor}, \pageref{drawcolor}
@@ -7086,7 +7094,7 @@ produced appears to be compatible with the current \mfp{}.
\item \cs{tlabel}, \pageref{tlabel}
\item \cs{tlabels}, \pageref{tlabel}
-\subsection{Misc}
+\subsection{Miscellaneous}
\item \cs{assignmfvalue}, \cs{assignmpvalue}, \pageref{assignmfvalue}
\item \cs{fdef}, \pageref{fdef}