Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

groff: can I embed images?

Tags:

image

groff

troff

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

like image 567
Mark Harrison Avatar asked Apr 23 '10 20:04

Mark Harrison


1 Answers

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.

like image 167
Bad Sector Avatar answered Oct 04 '22 00:10

Bad Sector