groff
[Top][All Lists]
Advanced

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

[Groff] Re: Groff and paper size selection.


From: Bernd Salbrechter
Subject: [Groff] Re: Groff and paper size selection.
Date: Fri, 21 Jan 2000 22:31:58 +0100 (CET)

In-Reply-To: <address@hidden>

On Tue, 11 Jan 2000 09:37:59 +0200, Fabrizio Polacco <address@hidden> wrote:
> On Mon, Jan 10, 2000 at 10:10:43PM +0100, Bernd Salbrechter wrote:
> > 
> > On Fri, 7 Jan 2000 20:38:09 +0200 Fabrizio Polacco <address@hidden> wrote:
> > ...
> > > This way, I can substitute the line 
> > > 
> > >   papersize a4
> > > 
> > > in the DESC of lj4 and ps font (which is actually added by the Makefile)
> > > with 
> > > 
> > >   paperfile /etc/papersize
> > > 
> > > to get it from the configuration file, without the need of setting the
> > > -p option (which is not so trivial when you, as example, issue command
> > > "man" :-)
> > 
> > Dose this not interfere with groffs correction of the origin, which is
> > hard encoded as "paperlength 792000" in my groffs DESC.
> 
> I wasn't 100% precise in the statement above.
> The line "papersize a4" is in the devlj4/DESC; in devps we have
> "paperlength 792000" to be substituted by paperfile.

Ok that sound better.

> While the lj4 chenges works greatly, I wasn't able to get any difference
> from the postscript formatting of some manpages, even with hand changes
> to the "paperlength" value. I know too little of postscript to
> understand if this is due to the closeness of the two formats, or
> because grops guesses a common sub-format or what.

I didn't have looked into grops, but from my knowledge of PostScript
i assume "paperlength 792000" should compensate the different idea
of the origin between groff and PostScript. PostScript have the origin
(0,0) at the lower left corner of the page (at most printers outside
the printable area, because they need 5 to 10 mm margins) and groff
have the origin at the upper left corner. In addition the y-axes
have different orientation, therefore grops mirrors the coordinate
system at the x-axes and moves the hight of a page up.

>From my understanding of groff and grops, grops do no formating at
all, it only converts the device independent groff output to PostScript.
The formating is done by groff. So you should verify that groffs
idea of line length (.ll) and paperlength (.pl) changes. There are
registers for that values you can print out with ".tm", sorry
doesn't know the names of head and haven't the manual at hand.

FYI the 792000 are 297 mm on the output, if this is A4. Letter will
not differ much.

...
> > Is this library public available?
> 
> Yes: http://www.uk.debian.org/Packages/unstable/libs/libpaperg.html
> you can see the links in the line Source Code; they point to the
> original package
> (http://ftp.debian.org/debian/dists/unstable/main/source/text/libpaper_1.0.3.orig.tar.gz)
> and to a patch that I suggest you apply
> (http://ftp.debian.org/debian/dists/unstable/main/source/text/libpaper_1.0.3-12.2.diff.gz).

Thanks for that information.

...
> If you have a Debian system handy, just add to /etc/apt/sources.list

No I use NetBSD, but groff is used there also.

...
> Description: Library for handling paper characteristics [libc6]
>  This package contains a simple library for use by programs needing
>  to handle papers. It lets program automatically recognize a lot of
>  different papers with their properties (actually their size).

Sounds good, I will look into it, how easy it is for an average
user to add his very special paper format. I mean really very special
i.e. 61mm width and 114 mm high. I look for a way to say print me
that file on my very special paper format and mount it on the
printers A4 paper in a way I only have to fold, punch and cut it
to get it in the right order to and it to my notebook. I have this
already running with hand calculated values and groff and pstools
as tool chain, work great.

Anyway, if you really want to make groff more flexible on the
papersize, I would suggest an option to pass it in and every filter
get it also if it needs it.

Have a nice day
Bernd

PS. Sorry for the late answer.

reply via email to

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