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: Werner LEMBERG
Subject: Re: [Groff] Suggestion for images in groff/gpic, current state
Date: Sun, 01 Dec 2002 17:17:47 +0100 (CET)

> >     .image file [width [height [xoffset [yoffset]]]]
> > 
> >   This is two arguments less, and it fits better the idea of using
> >   zero for padding arguments.
> 
> I like that, but I have one gripe: 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

To place an image does *not* depend on %%BoundingBox at all!  If no
offset are given, the image's origin is (0,0) -- no shifting!

> >     \n[imaget]
> >     \n[imageb]
> > 
> >   These two registers should be r/w, so starting the names with a
> >   dot is probably not optimal.
> 
> Agreed that this should be consistent, so no dot if r/w.  But what
> about namespace pollution?

We can't avoid that currently, so I don't care.  Providing namespace
facilities would be useful, but I believe that other things are more
important currently (well, patches are welcome :-).

> I am sort of very divided wrt. the entire .imageinfo request.  In
> many ways it is pedagogically wrong to have a fancy command for this
> function, since using it is for many situations the wrong thing.  I
> have not used it at all in my example document, for instance.  I
> sort of slapped it on as a last minute thing, anyway.

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

> > . There is no \n[.w] register, and I'm not sure that \n[.cdp] and
> >   \n[.cht] are really appropriate for \i.  Images are not
> >   characters...
> 
> 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 :-)

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.

> 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 -- \n[imaget] and \n[imageb] is sufficient IMHO.


    Werner

reply via email to

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