tags:

views:

20

answers:

1

I'm generating some troff-style documentation. Is there a way to embed an image (jpg, etc) into a groff file?

A: 

Depends on the output format. If you are creating a PostScript file, you can use PSPIC which uses a PS file itself with a single image. For example:

.PSPIC image.ps

Alignment, etc is a bit limited. By default it is aligned to the center but you can put it at the left or the right corner using -L or -R. There are some other options, check the groff_tmac manpage for these (search for pspic).

If you are creating a webpage you might need to use .IMG instead. The syntax is the same.

Bad Sector