groff
[Top][All Lists]
Advanced

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

Re: Selecting Papersize


From: Deri
Subject: Re: Selecting Papersize
Date: Mon, 10 Jul 2023 13:59:00 +0100

On Monday, 10 July 2023 07:21:10 BST Damian McGuckin wrote:
> Here is the laser paragraph from the Usage section of my User Guide
> 
>       All of those command line examples in this section
>       assume the default paper size. If one wants this to
>       be a specific size, say A4, then the two options
>       -dpaper=a4 and -P-pa4 should be passed to the groff
>       wrapper.
> 
> I would really like to omit -P-pa4 in the name of simplicity.
> 
> When I run tests with this omitted,m every still seems to work. But then I
> only send to -Tpdf or laser printers with either a single bin or two bins
> which are identical.
> 
> I may start using -Thtml shortly if I want to be able to get Grammarly to
> check my English.
> 
> I like Deri's suggestion which means I only use the -P-p option when I
> have a really whiz-bang laser printer or phototypsetter. I am about to
> overwrite my 1.22.4 papersize.tmnac with Deri's and check things still
> work like I assume.
> 
Using the papersize.tmac I sent. You can have different page sizes within the 
pdf, by stacking grout files:-

Using this example:-

.  if d paper-\*[paper-p]-length \{\
.    ie '\*[paper-l]'l' \{\
.      sp |(p;\*[paper-\*[paper-p]-width]/2u)p
.    \}
.    el \{\
.      if '\*[paper-l]'' \{\
.        sp |(p;\*[paper-\*[paper-p]-length]/2u)p
.      \}
.    \}
.  \}
.ps 24
.ce
Using page size \*[paper-p]\*[paper-l]

And these commands:-

groff -Tpdf -dpaper=a4 paper.t -Z > a4.Z
groff -Tpdf -dpaper=a4l paper.t -Z > a4l.Z
groff -Tpdf -dpaper=letter paper.t -Z > letter.Z
groff -Tpdf -dpaper=a5l paper.t -Z > a5l.Z
gropdf a4.Z a4l.Z letter.Z a5l.Z > Display.pdf

You end up with a 4 page pdf each page a different size/orientation. This is 
not particularly useful if you are intending to print the document, but the 
majority of pdfs are created for viewing.

The result is more noticeable in the pdf viewer if you turn off auto zoom 
(i.e. fit width) and set it to 100%.

Of course, you can achieve similar in one run by using the \X'papersize=' 
command within your troff file, which would be useful if you have a wide table 
you want presented in landscape, but you have to adjust page length/width 
yourself to notify the troff formatter of the changed dimensions.

Cheers 

Deri

> 
> Thanks - Damian
> 
> Pacific Engineering Systems International ..... 20D Grose St, Glebe NSW 2037
> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted
> here Views & opinions here are mine and not those of any past or present
> employer

Attachment: Display.pdf
Description: Adobe PDF document


reply via email to

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