groff
[Top][All Lists]
Advanced

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

Re: [Groff] pspic: Text around picture?


From: Patrik Schindler
Subject: Re: [Groff] pspic: Text around picture?
Date: Fri, 27 Mar 2009 23:32:28 +0100

Hello Werner,

Am 27.03.2009 um 16:13 schrieb Werner LEMBERG:

AFAIK, no.


So, I'm again on the front ;-)


It's much simpler: Just set (vertical) traps at the end of the image
to reset the margins.


I didn't have the time to search the docs for that, but I had in mind that there's some kind of trigger I could use. Thanks for the pointer!


A quick solution for an image which should appear exactly at the
position where it is inserted in the source is straightforward.


If the image fits onto the page, I see no problem with that.


It's far more complicated to do the same for floating images: Just imagine
that an image no longer fits on the current page and has to be shifted
around...


You're right. Hm. Pspic simply leaves space. Consequently this is not what I intend. This means, there has to be another "if" - the image won't fit, pull it onto the next page.


 · Handle text around centered or indented pictures,
Even TeX can't do this...


So that would be a huge plus for groff, won't it? ;-)


 · 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"),
I don't really understand this.  Please give an example.


xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx +---------+ xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx |         | xxxxxxxxxxx
xxxxx +---------+ xxxxxxxxxxx
xxxxx  pic1: foo  xxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx


 · Provide similar mechanisms for PICtures
It's basically the same: Put the pic drawing into a diversion so that
its dimensions get calculated, which can then in turn be used to make
the text float around the image.  However, there's the same problem as
with other images, namely, what to do if the pic drawing is larger
than the remaining space on the current page.


Could not be *that* hard, but I'm not really used to the groff registers and many escapes around if's and calculations, which makes me feel a bit handicapped ;-) AND I don't have a clue how to accomplish that nicely (say: fairly readable in a normal document). But that's and exercise for later. First, I'll stick with eps's.


Below is a first simple try which you could use to start with.


Thank you *very* much! It works basically, great! The picture gets placed a bit too far to the right (exact the amount of space between text and image on the left side of the image), I'll have a look into that later.

May I ask how long you took to write that down?


:wq! PoC






reply via email to

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