groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Re: pic page scale?


From: Werner LEMBERG
Subject: [Groff] Re: pic page scale?
Date: Fri, 11 Jul 2003 09:55:32 +0200 (CEST)

> I couldn't google and pic newsgroups so if you could either point me
> at some, or even just tell me what I'm doing wrong, that be much
> appreciated.

Use the address@hidden mailing list (details can be found in the
README file of groff).

> It seems that placing objects at absolute locations on the page
> changes the relative size of the page. This happens with pic objects
> as well as, say different sized fonts.

pic has not been invented to do what you want.  To have an image
positioned on the page it is normally the best solution to crop to the
smallest bounding box, and this is what pic does -- *before* writing
out the data.  This is not documented yet; I will add something to the
docs.

If you give arguments to the .PS macro, the image is *scaled* to the
values -- if you want an image to be exactly 8.5x11" you have to
assure that the image dimensions are exactly 8.5x11".  In the example
below, I've placed two invisible boxes at the lower left and upper
right corner, respectively.

Finally, you have to convince troff that the first possible position
on a paper is not (0,\n[.v]) but (0,0).  This can be achieved by
setting the vertical spacing to zero.

Here is the solution:

  .vs 0
  .PS
  .po 0
  .nr HM 0

  box invisible with .sw at (0,0)
  box invisible with .ne at (8.5,11)

  copy thru % circle rad 0.2 outlined $1 $2 at ($3, $4) % until "END"
    "violetred" "1" 1 1
    "blue" "2" 2 2
    "green" "3" 3 3
    "purple" "4" 4 4
    "orange" "5" 5 5
    "violetred" "6" 6 6
    "blue" "7" 7 7
    "green" "8" 8 8
    "purple" "9" 7 8
    "orange" "10" 6 8
  END
  .PE


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]