
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]Perhaps you would like to include graphs drawn using PicSure in a troff document you are writing. This can be accomplished by converting the graph drawn by PicSure into a pic file which can be included in your troff document. This document can then be processed using pic and troff for output on a Printronix or laser printer.
To convert your PicSure graph into a pic file you first need to save the graph as a metafile. This metafile is then converted into a pic file using the ``MDpic'' program. For example, the command:
$ MDpic meta >graph
would cause the graph drawn by PicSure and saved in the metafile ``meta'' to be converted to the pic file ``graph''.
If you look at the pic file created by MDpic you will notice that the first line is ``.PS''. If you'd like to change the size of your graph simply put the desired width of the drawing, measured in inches, after the ``.PS''. For example, if the first line is modified to be ``.PS 4.5'' then pic will scale the drawing so that the resulting graph is 4.5 inches wide.
Now that you have a pic file you are ready to incorporate it into your troff document. One way of doing this is to edit your troff document and use the appropriate editor command to read the pic file into your document at the place in the text where you wish the graph to appear. You would then process this document just as you would process any troff document containing pic commands. For example, the command:
$ mmt. -Tptrx -p -e document | dptrx | lpr -Pxp -n
would print a document containing text, equations, and PicSure graphs on the ``xp'' Printronix printer.
The pic files generated by PicSure and MDpic are often large so
it may be inconvenient to include them directly in your troff
document. Another way of incorporating a pic file in a troff
document is to edit your document and insert a line containing
``.PS
would print a document containing text, equations, and lines like
``.PS
webmaster@ecn.purdue.edu
Last modified: Saturday, 01-Nov-97 13:23:10 EST