summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/mfpic/mfpguide.tex')
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpguide.tex60
1 files changed, 33 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
index c25b22ba7e4..01cba684717 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpguide.tex
@@ -1,5 +1,5 @@
% File: mfpguide.tex
-% A part of mfpic 1.06 2011/03/08
+% A part of mfpic 1.10 2012/12/03
%
% Tutorial on mfpic
\documentclass[letterpaper]{article}
@@ -17,26 +17,28 @@
\else
\usepackage[dvips,final]{graphics}
\fi
+
\usepackage[metapost]{mfpic}
\opengraphsfile{guide}
+
\dotsize1pt
\ifpdf
\expandafter\usepackage\expandafter
- [\mfpHyOpts]{hyperref}
+ [\mfpHyOpts,plainpages=false,naturalnames=true]{hyperref}
\expandafter\pdfstringdefDisableCommands\expandafter
{\mfpHyDisable}
+
\fi
\def\theHfigure{\thefigure}
+\begin{document}
+
\title{\Mfp: A Short Introduction}
-\author{Daniel H. Luecking\thanks{Copyright 2003--2011, Daniel H.
-Luecking (luecking at uark dot edu)}}
+\author{Daniel H. Luecking\thanks{luecking at uark dot edu}}
\date{\mfpfiledate}
-\begin{document}
-
\maketitle
\tableofcontents
@@ -100,17 +102,17 @@ close to figure~\ref{fig1}.
\end{mfpic}
\end{mfpfig}
-What can go wrong? According to Murphy's Law: anything. If \mfp{} is
-not properly installed, one could obtain messages of files not found. If
+What can go wrong? According to Murphy's Law: anything. If \mfp{} is not
+properly installed, one could obtain messages of files not found. If
that happens, determine (from your \TeX{} system's documentation) where
-\TeX{} input files should go and make sure that \file{mfpic.tex} and
-\file{mfpic.sty} reside there. Similarly, find out where \MP{} inputs
-should go and make sure that \file{grafbase.mp} and \file{dvipsnam.mp}
-reside there. Then run whatever command your \TeX{} system might require
-to ``update the filename database''. You may safely ignore the message
-from \mfp{} itself that \file{myfigs.1} is not found (on the first run
-of \pdfLaTeX). This file should be created only after running
-\texttt{mpost}.
+\TeX{} input files should go and make sure that \file{mfpic.sty},
+\file{mfpic.tex} and \file{mfpicdef.tex} reside there. Similarly, find
+out where \MP{} inputs should go and make sure that \file{grafbase.mp}
+and \file{dvipsnam.mp} reside there. Then run whatever command your
+\TeX{} system might require to ``update the filename database''. You may
+safely ignore the message from \mfp{} itself that \file{myfigs.1} is not
+found (on the first run of \pdfLaTeX). This file should be created only
+after running \texttt{mpost}.
If you get an error message from \LaTeX{}, carefully check your typing.
Also check whether an older version of \mfp{} might have been used
@@ -149,7 +151,7 @@ to be sure of seeing the changes.
One thing you might notice about figure~\ref{fig1} is that the ellipse
is positioned quite a bit above the base line of the text. This is
because \mfp{} reserves the amount of space specified in the arguments
-of the \env{mfpic} environment. These arguments are
+of the \env{mfpic} environment. These arguments were
\verb$[72]{-1}{1}{-1}{1}$, which means that each unit in the picture is
72 times the value of \cs{mfpicunit}, that is, about one inch. The first
pair of mandatory arguments, \verb${-1}{1}$, indicate the
@@ -413,8 +415,8 @@ also takes an optional argument: the number of degrees to rotate the
ellipse. Here we list some of the more common such figures. Remember
that all of them will produce some sort of line drawing if used alone.
They can be preceded by \verb$\dashed$ to make the lines dashed or
-\verb$dotted$ to make them dotted. If the figure is a closed curve,
-\verb$\gfill$ will fill them in.
+\verb$\dotted$ to make them dotted. If the figure is a closed curve,
+\verb$\gfill$ will fill it in.
\begin{verbatim}
\begin{mfpic}[72]{0}{4}{0}{1}
\rect{(0,0),(1,.75)}
@@ -431,7 +433,7 @@ Other possibilities are a three-point form (option \texttt{[t]}), a
polar form (option \texttt{[p]}), and a center-point-sweep form (option
\texttt{[c]}, specify a center, starting point, and angle). See the
manual for details. The default (what would be assumed if no optional
-argument is given) is \oarg{s} and is called the point-sweep form.
+argument is given) is \oarg{s} and is called the ``point-sweep'' form.
\begin{mfpfig}{fig11}
\begin{mfpic}[72]{0}{4}{0}{1}
\rect{(0,0),(1,.75)}
@@ -788,7 +790,7 @@ This illustrates another property of \mfp{} macros: the combination of a
rendering prefix and a figure is also treated the same as a figure in
its own right: the same figure as the one that follows. In fact, the
only difference between \cs{rect} and \cs{draw}\cs{rect} in this
-example is that the second one has a minor (!) side effect: the
+example is that the second one has a minor(!) side effect: the
rectangle is drawn.
Finally, try to guess what happens if we add another prefix at the
@@ -1151,7 +1153,7 @@ Anyway, here are a few examples, illustrating the use of \cs{arrow}, and
some of its optional arguments.
\begin{verbatim}
\begin{mfpic}{0}{4}{0}{4}
- \arrow[r5]\circle{(1,1),.5}
+ \arrow[r-5]\circle{(1,1),.5}
\arrow[b4pt]\arrow\polyline{(3,2),(3,0)}
\arrow[cred]\reverse\arrow\polyline{(0,3),(2,3)}
\arrow[l 5pt]\rect{(4,2),(2,4)}
@@ -1161,7 +1163,7 @@ See figure~\ref{fig31} for the results of this example. There are four
possible optional arguments, the first character inside the brackets
tells what option the rest of the argument applies to. The first example
above starts with `\texttt{r}', which stands for `rotate' and asks for
-the arrowhead to be rotated 5 degrees (positive rotation means
+the arrowhead to be rotated $-5$ degrees (positive rotation means
anticlockwise, negative means clockwise). This is frequently useful for
arrows on curved paths, as the default direction (tangent to the path)
often just looks wrong). The second example starts with `\texttt{b}',
@@ -1180,7 +1182,7 @@ the arrowhead to 5 points (from the \verb$3pt$ default).%
case where it will cause no harm.}
\begin{mfpfig}{fig31}
\begin{mfpic}{0}{4}{0}{4}
- \arrow[r5]\circle{(1,1),.5}
+ \arrow[r-5]\circle{(1,1),.5}
\arrow[b4pt]\arrow\polyline{(3,2),(3,0)}
\arrow[cred]\reverse\arrow\polyline{(0,3),(2,3)}
\arrow[l 5pt]\rect{(4,2),(2,4)}
@@ -1407,20 +1409,24 @@ Here's an example comparing the two smooth methods (figure~\ref{fig34}).
A word about the labels: we turned off \opt{mplabels} with the command
\verb$\nomplabels$, because we used a command (\verb$\cs$) defined for
this document and not known to basic \TeX{} or \LaTeX. The labels
-therefore are position by \LaTeX{} while it assembles this document,
+therefore are positioned by \LaTeX{} while it assembles this document,
instead of by \MP{} which would call a separate instance of \TeX{} or
\LaTeX{} where \cs{cs} was unknown. We could have kept \opt{mplabels},
provided we had used \verb$\mfpverbtex$ to write the appropriate
\LaTeX{} preamble to the \file{.mp} output. It would need to be some
subset of the preamble of this document.
-\chapter{Appendices}
+
+\chapter*{Appendices}
+\addcontentsline{toc}{section}{Appendices}
In addition to \pdfLaTeX, \Mfp{} works with plain \pdfTeX, \LaTeX, and
plain \TeX{}. Instead of \MP{} as the figure processor, \MF{} can also
be used. Let's start with the difference between using \mfp{} in a
plain~\TeX{} document and using it in a \LaTeX{} document.
+\renewcommand\thesubsection{\Alph{subsection}}
+
\section{\Mfp{} in plain \TeX}
Here is a sample plain \pdfTeX{} document with results the same as our
@@ -1433,7 +1439,7 @@ first ``Hello, world'' example. Let's call this file \file{plfirst}
\mfpic[72]{-1}{1}{-1}{1}
\ellipse{(0,0),1,.5}
\endmfpic
- \closegraphsfile
+\closegraphsfile
\end
\end{verbatim}
The main difference is the lack of \LaTeX{} commands. The crucial