9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Paper sizes and Troff
@ 2005-03-28  9:07 Devon H. O'Dell 
  2005-03-28 13:40 ` Richard Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Devon H. O'Dell  @ 2005-03-28  9:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Is it possible to define the paper size in troff? I've read
Kernighan's troff tutorial and `Typing Documents on the UNIX
System: Using the -ms and -mcs Macros with Troff' by Cherry and
Lesk, but it's not clear to me if there's a way to define a
different paper size.

For instance, I'd like to format a couple of things for A4
paper, which is most frequently used here in my neck of the
woods so-to-speak. From what I can tell, it's possible to change
margins, but I haven't seen any macros in ms(6) or registers
that would enable me to change the width and height of the page
itself.

Tips :)?

--Devon

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Paper sizes and Troff
  2005-03-28  9:07 [9fans] Paper sizes and Troff Devon H. O'Dell 
@ 2005-03-28 13:40 ` Richard Miller
  2005-03-29  1:20   ` dmr
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Miller @ 2005-03-28 13:40 UTC (permalink / raw)
  To: 9fans

Paper length is set by .pl command.  Troff has no concept of paper
width; you adjust line length and page offset using .ll and .po
respectively.  If you're using -ms macros which give a line length of
6 inches, try prefixing your input with

  .pl 29.7c
  .po 2.88c

and your text should be centred on an A4 page.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Paper sizes and Troff
  2005-03-28 13:40 ` Richard Miller
@ 2005-03-29  1:20   ` dmr
  2005-03-29  6:52     ` Devon H. O'Dell 
  0 siblings, 1 reply; 4+ messages in thread
From: dmr @ 2005-03-29  1:20 UTC (permalink / raw)
  To: 9fans

Richard said,

 > Paper length is set by .pl command.  Troff has no concept of paper
 > width; you adjust line length and page offset using .ll and .po
 > respectively.  If you're using -ms macros which give a line length of
 > 6 inches, try prefixing your input with

 >   .pl 29.7c
 >   .po 2.88c

 > and your text should be centred on an A4 page.

This is true, but be aware that if you're using -ms,
some of these parameters are shadowed by number
registers in the macro package, and tend to
get reset.  In particular, there is a PO and also
a LL number register.  There doesn't seem to
be a PL for .pl shadow, however.

	Dennis


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Paper sizes and Troff
  2005-03-29  1:20   ` dmr
@ 2005-03-29  6:52     ` Devon H. O'Dell 
  0 siblings, 0 replies; 4+ messages in thread
From: Devon H. O'Dell  @ 2005-03-29  6:52 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]

On Mon, Mar 28, 2005 at 08:20:37PM -0500, dmr@plan9.bell-labs.com wrote:
> Richard said,
> 
>  > Paper length is set by .pl command.  Troff has no concept of paper
>  > width; you adjust line length and page offset using .ll and .po
>  > respectively.  If you're using -ms macros which give a line length of
>  > 6 inches, try prefixing your input with
> 
>  >   .pl 29.7c
>  >   .po 2.88c
> 
>  > and your text should be centred on an A4 page.
> 
> This is true, but be aware that if you're using -ms,
> some of these parameters are shadowed by number
> registers in the macro package, and tend to
> get reset.  In particular, there is a PO and also
> a LL number register.  There doesn't seem to
> be a PL for .pl shadow, however.
> 
> 	Dennis

In which case these should be set by 

.nr LL whatever
.nr PO whatever

I assume. Just for completeness' sake, I also needed to use
bullets, which I could only find in tmac.msc (which changed my
font to one without serifs, which was terrible). Russ gave me
the tip to simply use

.IP \(bu
Some text

to make bulleted lists. This has worked for me just fine and is
a bit less complicated than the macros in -mmsc :). Geoff also
gave me a bit of help with this off-list, so I'd like to
acknowledge that here as well.

Hopefully this thread will come up a bit higher in Google next
time anybody else has this problem :)

I also thought that there was a problem with tr2post when
converting troff to postscript, but it turns out that Acrobat
Distiller was truncating the page size when importing the .ps.
I'll try printing it on A4 soon to see what happens :)

--Devon

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-29  6:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-28  9:07 [9fans] Paper sizes and Troff Devon H. O'Dell 
2005-03-28 13:40 ` Richard Miller
2005-03-29  1:20   ` dmr
2005-03-29  6:52     ` Devon H. O'Dell 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).