23.10.2014 Views

mfpic-doc.pdf.

mfpic-doc.pdf.

mfpic-doc.pdf.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.4 MODIFYING THE FIGURES. 34<br />

\arrowhead{〈symbol〉}[l〈length〉][r〈rotate〉][b〈backset〉][c〈color〉]...<br />

\arrowmid{〈symbol〉}[l〈length〉][r〈rotate〉][f〈fraction〉][c〈color〉]...<br />

\arrowtail{〈symbol〉}[l〈length〉][r〈rotate〉][f〈forward〉][c〈color〉]...<br />

These macros add some sort of symbol at different locations along a path. The first adds an<br />

arrowhead, but the head can be any appropriately designed symbol. It has been arranged that any of<br />

the symbols usable in \plotsymbol (see subsection 4.2.1) can be used: you can have Diamond- or<br />

Asterisk-tipped arrows. The special symbol Arrowhead produces the same shape as the head in<br />

the \arrow command. In total eight special 〈symbols〉 have been made available, intended for use<br />

with \arrowhead, \arrowmid and \arrowtail. Here is a list and description of all these symbols.<br />

Arrowhead The shape that would be drawn at the end of a path by \arrow.<br />

Leftharpoon The left half of Arrowhead.<br />

Rightharpoon The right half of Arrowhead.<br />

Crossbar A short line crossing the path perpendicularly unless rotated.<br />

Leftbar Essentially the left half of Crossbar.<br />

Rightbar The right half.<br />

Lefthook An open semicircle with its open face in the direction of the path, added to the left side<br />

of the path.<br />

Righthook Like Lefthook but on the right side.<br />

Here ‘left’ and ‘right’ are from the point of view of an observer facing in the direction of the path.<br />

If the symbol is a closed path (see subsection 4.4.1 for the difference between a closed path<br />

and one that merely looks closed), the head will be filled, otherwise its outline will be drawn. Thus<br />

\arrowhead{Diamond} draws an outline, and \arrowhead{SolidDiamond} draws a filled shape<br />

because Diamond has been left open, while SolidDiamond has been defined to be closed.<br />

It is possible, to get an outline drawn with the inside erased: just place the solid version with color<br />

background (usually the same as white) and then the outline version. This can produce a pleasing<br />

result. But recall that the prefix macro nearest the figure macro is executed first. For example:<br />

\arrowmid{Circle}\arrowmid{SolidCircle}[cwhite]\polyline{(0,0),(1,1)}<br />

The symbol is always rotated so that it points in the direction of the path (for this purpose, all<br />

symbols are initially assumed to point straight upward) before the [r〈rotate〉] parameter is applied.<br />

There is a star-form \arrowhead* that behaves like \arrow* (when possible). The optional<br />

arguments are exactly as in \arrow, with the same defaults for all of them.<br />

The second command, \arrowmid, places the symbol somewhere between the start and the end<br />

of the path. In this case the optional parameter [f〈fraction〉] gives the location of the symbol as a<br />

fraction of the length of the path. The default is [f0.5], which places it approximately in the middle.<br />

The other optional arguments have the same meaning as for \arrowhead. As with \arrowhead, the<br />

symbol is rotated to ‘point’ in the direction of the path before the [r〈rotate〉] is applied.<br />

The third command \arrowtail places the symbol at the start of the path. Otherwise it behaves<br />

as the other two commands, except the option [f〈forward〉] is an amount to shift the symbol forward<br />

from that first point.<br />

One might be tempted to use \arrowmid with the 〈fraction〉 equal to 1 or 0 to get arrowheads<br />

or tails. This will work sometimes. However, some shapes have a ‘tip’, that is, a particular point<br />

designated as the tip of the arrowhead. The \arrowhead and \arrowtail commands pay attention<br />

to this, while \arrowmid does not. Also, \arrowmid has no star-form.<br />

You can design your own 〈symbol〉 for these commands: use \store to store a path in a path variable<br />

(see subsection 4.10.2). These commands assume that the length is 1, that the symbol ‘points’<br />

up and that the ‘tip’ (the ‘pointy end’) is at (0,0) (unless the pair variable 〈symbol〉.tip is defined,<br />

in which case that is taken to be the tip). So draw your symbol pointing up with its tip at (0,0) and

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

Saved successfully!

Ooh no, something went wrong!