Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   pic    ( 1 )

компилировать картинки для troff или TeX (compile pictures for troff or TeX)

  Name  |  Synopsis  |  Description  |  Options  |  Usage  |    Conversion    |  Files  |  Bugs  |  See also  |

Conversion

To obtain a stand-alone picture from a pic file, enclose your pic code with .PS and .PE requests; roff configuration commands may be added at the beginning of the file, but no roff text.

It is necessary to feed this file into groff without adding any page information, so you must check which .PS and .PE requests are actually called. For example, the mm macro package adds a page number, which is very annoying. At the moment, calling standard groff without any macro package works. Alternatively, you can define your own requests, e.g., to do nothing:

.de PS .. .de PE ..

groff itself does not provide direct conversion into other graphics file formats. But there are lots of possibilities if you first transform your picture into PostScript® format using the groff option -Tps. Since this ps-file lacks BoundingBox information it is not very useful by itself, but it may be fed into other conversion programs, usually named ps2other or pstoother or the like. Moreover, the PostScript interpreter ghostscript (gs(1)) has built-in graphics conversion devices that are called with the option

gs -sDEVICE=<devname>

Call

gs --help

for a list of the available devices.

An alternative may be to use the -Tpdf option to convert your picture directly into PDF format. The MediaBox of the file produced can be controlled by passing a -P-p papersize to groff.

As the Encapsulated PostScript File Format EPS is getting more and more important, and the conversion wasn't regarded trivial in the past you might be interested to know that there is a conversion tool named ps2eps which does the right job. It is much better than the tool ps2epsi packaged with gs.

For bitmapped graphic formats, you should use pstopnm; the resulting (intermediate) pnm(5) file can be then converted to virtually any graphics format using the tools of the netpbm package.