table of contents
| mkpic(1) | DekDoc scripts | mkpic(1) |
NAME¶
mkpic - interface for making pictures with mfpic
Synopsis¶
mkpic [options] [picfile]
Options¶
-c,--clean
Without an input file, the DATA section is used.
Command overview¶
begin
name xl yl xmin ymin xmax ymax xlabel ylabel
comment
xcenter ycenter xstart ystart theta
xstart ystart xend yend theta
xcenter ycenter radius theta1 theta2
x1 y1 x2 y2 x3 y3
[label1] x1 [label2] x2 ...
[label1] x1 [label2] x2 ...
[label1] y1 [label2] y2 ...
[label1] y1 [label2] y2 ...
x y
x y
x y
x1 y1 x2 y2 label
YX x y label
YX x y dx label ...
YX x y dy label ...
x1 y1 x2 y2 ...
x1 y1 dx1 dy1 ...
x1 y1 x2 y2 ...
x1 y1 dx1 dy1 ...
x1 y1 x2 y2 ...
x1 y1 dx1 dy1 ...
x1 y1 x2 y2
x y dx dy
x y dx dy
x1 y1 x2 y2
xc yc width height theta
x xdev height
xmin xmax step expression-in-x
dx dy xgap ygap
Description¶
mkpic provides an easy interface for making small pictures with mfpic. To this end an input file has to be created consisting of commands, one per line, with space separated parameters (or you modify the DATA section of the mkpic script, which is used if you run it without an input file). For an extensive description see the files mkpicdoc.tex and mkpicdoc.pdf, which are part of the distribution.
mkpic produces two files. Assuming an input file named picfile defaulting to mkpic these are:
picfile.mac
With the --pdfsample option, two other files are produced:
picfile.pdf
picfile.tex
In LaTeX, you have to include \usepackage{picfile} and to include commands like \Figname in your source, where name is the name you gave one of your pictures in an mkpic begin command.
In TeX and ConTeXt, you have to \input␣picfile.mac and to include commands like \Figname in your source, where name is the name you gave one of your pictures in an mkpic begin command.
In TeX, you must use the \bye command (not \end to finish your TeX source
See the RUNNING section for how to run mkpic and TeX, LaTeX, or ConTeXt.
Commands¶
The source is set up so that it is easy to add your own commands, Currently the following commands have been implemented (the arguments are not listed here; for those, refer to the SYNOPSIS section):
begin, end
begin aa ...
label tl 0 0 Hello World!
Running mkpic/TeX¶
The effect of running mkpic picfile
is the creation of picfile.mac, which you can \input into a TeX or ConTeXt source, and picfile.sty which can be input into a LaTeX source using the \usepackage command.
After running TeX (or LaTeX or ConTeXt), you will find a file picfile.mf and you will have to run Metafont on it, which (assuming you configured TeX for 600 dpi) produces picfile.600gf. This file will have to be converted to a pk file with gftopk. Finally, you need to run TeX, normally at least twice, again. So for pdfLaTeX the sequence is:
mkpic picfile pdflatex file.tex mf picfile gftopk picfile.600gf pdflatex file pdflatex file
Bug¶
Currently only up to 256 pictures can be generated. In the future this problem will probably be solved by introducing more than one font and generating tex-command names that have the font name in front.
Author¶
Wybo Dekker (wybodekker@me.com)
Copyright¶
Released under the GNU General Public License (www.gnu.orgcopyleftgpl.html)
| October 3, 2025 | mkpic version 1.03 |