groff
[Top][All Lists]
Advanced

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

Re: [Groff] Suggestion for images in groff/gpic, current state


From: Egil Kvaleberg
Subject: Re: [Groff] Suggestion for images in groff/gpic, current state
Date: 02 Dec 2002 11:42:49 +0100

On Sun, 2002-12-01 at 17:17, Werner LEMBERG wrote:
> > Does does four arguments provide
> > enough information for including PostScript items that lack a
> > %%BoundingBox? I fear it does not.
> 
> It is sufficient information:
> 
>     llx = xoffset
>     lly = yoffset
>     urx = xoffset + width
>     ury = yoffset + height

Only if you assume a fixed scale in both directions, as far as I can
see. That would make treatment of PostScript with and without an
explicit %%BoundingBox assymetrical, and I'm quite certain we do not
want that to happen.

There is a reason why \X'ps: import ..' requres six numeric arguments. I
can't see how we can get rid of two of them by as by a stroke of magic.
Chances we get get Harry Potter to help us are slim, I'm afraid.

There is also a further problem with your suggestion: Since 0 is a
valid, and indeed probable value for an offset, it cannot use the "0
means default" paradigm. Which I am not particularly fond of anyway. One
suggestion may be to have ".image height=2c" or something like that, but
that also is questionable, since it introduces a new syntactical
element. 

But I agree six parameters are not good. Since the last four ones only
should be required for non-encapsulated postscript, it might be just as
well to specify them separately. I'll let that simmer for a while.

> .imageinfo *is* necessary, namely to extract the bounding box (if
> available).

As I've said a number of times before, you never should need that. That
is the wrong starting point, and that just emphasises exactly why I
think that .imageinfo is bad from a pedagogical point of view. Consider
it deleted.

> > There is a \n[.w], I just forgot to mention it.
>
> Do you think we really need this?
> 
>   .nr xx \w'...'
> 
> was OK for at least 20 years :-)

That judgement is not for me to make. Joseph Ossanna saw the need for
the .w register 26 years ago, and that is good enough for me.

> Anyway, don't use names consisting of two characters only!  This might
> be used by old troff macro packages, so name clashes are much more
> likely to happen.

See above.

> > In a similar manner, the byproducts of \w are the same.  I have two
> > open issues here: What should \[ct] be? It currently is set to 0.
> > The other is, what is the real difference between \n[rsb] \[rst] and
> > \n[sb] \n[st]?  In my current implementation, they do not give the
> > same values for images (rsb and rst seem to be OK), and I think
> > there may be something fishy.
> 
> I think this is too much analogy.  \i and .image should use its own
> set of registers

As noted before, I am very convinced that they should not. I had hoped
that my example had shown that treating images as equal to text as
possible is the way to go.

Anyway, it is obvious that it is time for me to enter 'think' mode
again. So I will now try to continue on my 'todo' list...

Egil
-- 
Email: address@hidden  
Voice/videophone: +47 22523641 Voice: +47 92022780 Fax: +47 22525899
Mail:  Egil Kvaleberg, Husebybakken 14A, 0379 Oslo, Norway
Home:  http://www.kvaleberg.com/

reply via email to

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