23.10.2014 Views

mfpic-doc.pdf.

mfpic-doc.pdf.

mfpic-doc.pdf.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.9 PICTURE FRAMES. 55<br />

ment, \newsavepic is actually defined to be \newsavebox.<br />

\savepic saves the next \<strong>mfpic</strong> picture in the named box, which should have been previously<br />

allocated with \newsavepic. (This command should not be used inside an <strong>mfpic</strong> environment.)<br />

The next picture will not be placed, but saved in the box for later use. This is primarily intended as<br />

a convenience. One could use<br />

\savebox{〈picname〉}{〈entire <strong>mfpic</strong> environment〉},<br />

but \savepic avoids having to place the <strong>mfpic</strong> environment in braces, and avoids one extra level<br />

of TEX grouping. It also avoids reading the entire <strong>mfpic</strong> environment as a parameter, which would<br />

nullify MFPIC’s efforts to preserve line breaks in parameters written to the METAFONT output file. If<br />

you repeat \savepic with the same 〈picname〉, the old contents are replaced with the next picture.<br />

\usepic copies the picture that had been saved in the named box. This may be repeated as often<br />

as liked to create multiple copies of one picture. The \usepic command is essentially a clone of<br />

the LATEX \usebox command. Since the contents of the saved picture are only defined during the<br />

TEX run, \usebox cannot be used in the TEX-commands argument of the \tlabel command while<br />

mplabels is in effect.<br />

4.9 Picture Frames.<br />

When TEX is run but before METAFONT or METAPOST has been run on the output file, MFPIC detects<br />

that the .tfm file is missing or that the first METAPOST figure file 〈file〉.1 is missing. In these cases,<br />

the <strong>mfpic</strong> environment draws only a rectangular frame with dimensions equal to the nominal size of<br />

the picture, containing the figure number (and any text placed by \tlabel and its relatives without<br />

mplabels in effect). The command(s) used internally to do this are made available to the user.<br />

\mfpframe[〈fsep〉]〈 material-to-be-framed 〉\endmfpframe<br />

\mfpframed[〈fsep〉]{〈material-to-be-framed〉}<br />

These commands surround their contents with a rectangular frame consisting of lines with thickness<br />

\mfpframethickness separated from the contents by the 〈fsep〉 if specified, otherwise by the<br />

value of the dimension \mfpframesep. The default value of the TEX dimensions \mfpframesep<br />

and \mfpframethickness are 2pt and 0.4pt, respectively. The \mfpframe ... \endmfpframe<br />

version is preferred around <strong>mfpic</strong> environments or verbatim material since it avoids reading the<br />

enclosed material before appropriate \catcode changes go into effect. In LATEX, one can also use<br />

environment syntax: \begin{mfpframe} ... \end{mfpframe}.<br />

An alternative way to frame <strong>mfpic</strong> pictures is to save them with \savepic (see previous section)<br />

and issue a corresponding \usepic command inside any framing environment or command of the<br />

user’s choice or devising.<br />

4.10 Affine Transforms.<br />

Coordinate transformations that keep parallel lines in parallel are called affine transforms. These include<br />

translation, rotation, reflection, scaling and skewing (slanting). For the METAFONT coordinate<br />

system only (that is, for paths, but not for \tlabel nor \tcaption) MFPIC provides the ability to<br />

apply METAFONT affine transforms.<br />

4.10.1 TRANSFORMING THE METAFONT COORDINATE SYSTEM<br />

\coords . . . \endcoords<br />

All affine transforms are restricted to the innermost enclosing \coords...\endcoords pair. If<br />

there is no such enclosure, then the transforms will apply to the rest of the <strong>mfpic</strong> environment. In<br />

LATEX, one can use the environment named coords.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!