#!/usr/bin/perl -w $Version='0.1'; =head1 NAME mkpic - interface for making pictures with mfpic =head1 SYNOPSIS mkpic [-pdf] [filename] options: --pdf pdf output instead of dvi --clean remove all but input file and die --keep keep unnecessary files after run --box produce framed boxes --version report version number and die --help display help info and die commands: begin name xl yl xmin ymin xmax ymax xlabel ylabel xmark [label1] x1 [label2] x2 ... Xmark [label1] x1 [label2] x2 ... ymark [label1] y1 [label2] y2 ... Ymark [label1] y1 [label2] y2 ... xdrop x y ydrop x y xydrop x y arrow x1 y1 x2 y2 label label YX x y label point x1 y1 x2 y2 ... lines x1 y1 x2 y2 ... curve x1 y1 x2 y2 ... rect x1 y1 x2 y2 crect x1 y1 x2 y2 func xmin xmax step expression-in-x grid dx dy # comment hatch bhat ehat end stop =head1 DESCRIPTION B provides an easy interface for generating commands for making small pictures with mfpic. To this end either an input file or a C<__DATA__> section has to be created consisting of commands with space separated parameters. F is the name of the input file; if no filename is given input is taken from the C<__DATA__> section. B produces two files: F, a macro file which will contain TeX commands for every picture, and F, a TeX source file containing nothing but the pictures produced. This TeX source file will be compiled to a F<.dvi> file or, if the B<-pdf> option was present, to a F<.pdf> file. If no F is given, F will be used for the macro file, and F for the TeX source file. The source is set up so that it is easy to add your own commands, Currently the following commands are implemented: =over 8 =item B Every picture begins with the B command and ends with the B command. The B command defines a name for the picture and defines a tex command with that name, prefixed with 'Fig'. The resulting command> is written to a F<.mac> file. Thus the command begin aa ... starts writing C<\def\Figaa{...> to the F<.mac> file, and the picture can be reproduced in a TeX document by importing the F<.mac> file and using the C<\Figaa> command. xl and yl are the lengths of the x- and y-axes. xlabel and ylabel are the label that are placed at the ends of those axes. Use a space to suppress labeling, or "-" to suppress drawing the axes at all. =item B These commands place one or more labels along the x- or y-axes, either below (B and B) of above (B and B) the axis. For the B<[xXyY]mark> commands a parameter containing any character other than [-.0-9] is interpreted as the label to be placed and its position is expected in the next parameter. If a parameter is just a number, it is placed at that x-position. =item B These commands draw dotted arrows perpendicularly to the x-axis, the y-axis and both axes, respectively, ending on the axes with the arrow head. =item B draws an arrow from I<(x1,y1)> to I<(x2,y2)> labeled on its tail with I