groff
[Top][All Lists]
Advanced

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

[Groff] pspic: Text around picture?


From: Patrik Schindler
Subject: [Groff] pspic: Text around picture?
Date: Fri, 27 Mar 2009 01:39:02 +0100

Hello,

did  anyone  make  an  effort to enhance the pspic-macro, to
text flows around the picture, like that:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx +---------+ xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx +---------+ xxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx

Should  be  "fairly  easy",  if  I'm  right:  pspic  already
extracts  and  calculates things. In the simple case of left
or right-aligned pictures, we need to change indent (or page
offset?)  and  (only,  for  right-aligned) pictures the line
length and add a small margin (configurable? register?)  for
a little space around the picture.

Ne  also need to to suppress local vertical motion according
to the picture height, so text should run around the picture
just fine.

Next  task  would  be  more  complicated: When do we need to
reset the po/indent/ll? Is there something like a "new  line
trap"  which  gets  called every new line? So pspic can hook
into that and if the vertical motion difference  beween  the
call  of  pspic and the actual position (add the margin men-
tioned before) is greater than the picture  height,  we  can
reset the values to saved ones from before the pspic-call.

More tough things to do:

 · Handle text around centered or indented pictures,
 · Provide  some  mechanism  to center a picture description
   text under the picture (-L|-R|-I also)  which  also  gets
   added to the margin calculation ("makes picture taller"),
 · Provide similar mechanisms for PICtures

Any help or advice would be appreciated. Thanks!

:wq! PoC





reply via email to

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