I'm generating some troff-style documentation. Is there a way to embed an image (jpg, etc) into a groff file?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With