Placing a PIC image in an arbitrary position of the page using ms macros

35 views Asked by At

I have an image defined using PIC and incorporated to a groff ms document.

I notice that I need to encapsulate the image inside a .DS L - .DE block to have it aligned to left. Otherwise is centered.

What shall be done to have the image in a file and be able to position the image anywhere in the page? (specifying coordinates).

This is what I have tried:

\h'2in'\v'4in'FOOTEXT\v'-4in'

But the problem is if you replace FOOTEXT with a .PS .PE image the image will be centered, and if you use .DS L .DE it does not work, the paragraph is displayed in its normal ms position.

While groff is not a mainstream tool anymore, I was wondering if someone using it could provide some help to achieve this.

1

There are 1 answers

0
Ljm Dullaart On BEST ANSWER

It is one of the limitations of pic. If you need to be more flexible, you can create an encapsulated postscript file of the PIC image:

pic blk.pic > blk.groff
groff blk.groff > blk.ps
eps2eps -B1  blk.ps blk.eps

and include that. This makes it even possible to use the PIC images in-line:

.P
An in-line picture is also possible, and it is not limited to
\v'0.12v'
.dospark block/blk.eps 21.4 12
\v'-0.12v'
pic images.
.P

Note: dospark is a macro by Ted Harding.