🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #2291

Re: Rotating troff 90 degrees?

#2291
From: James Clark
Date: Fri, 09 Oct 1992 11:40
48 lines
1489 bytes
In article <4232@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes:

   In article <1992Oct6.211220.20566@jarvis.csri.toronto.edu> acs@csri.toronto.edu (Alvin Chia-Hua Shih) writes:
   <I'm in need of being able to rotate a table and graph 90 degrees.
   <Is there any way to do this in troff?

   Not that I know of.  Troff is an old portrait format formatter.  The GNU groff
   program will let you print the whole document in landscape, but not a single
   page.

You can do it with groff -Tps.  For example

   .de L1
   .br
   .di L1:di
   ..
   .de L2
   .br
   .di
   .ne \\n(dlu+\n(.Vu
   \v'-1v'\X'ps: exec gsave currentpoint 2 copy translate -90 rotate \
   \\n(dl u neg 0 translate neg exch neg exch translate'
   .sp -1
   .mk L1:x
   .ev tmp
   .nf
   .L1:di
   .ev
   .sp |\\n[L1:x]u
   \X'ps: exec grestore'
   .sp -1
   .sp \\n(dlu
   ..
   .sp 2
   .nf
   Some text.
   .L1
   .TS
   tab(&);
   l l.
   A&B
   C&D
   .TE
   .L2
   Some more text.

James Clark
jjc@jclark.com
Technical Details
Message-ID: <JJC.92Oct9114032@jclark.jclark.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!jclark!jjc
References: <1992Oct6.211220.20566@jarvis.csri.toronto.edu> <4232@vidiot.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text
Path: arc1-ca.pugleaf.net!sparky!uunet!jclark!jjc
From: jjc@jclark.com (James Clark)
Subject: Re: Rotating troff 90 degrees?
In-Reply-To: brown@vidiot.UUCP's message of 8 Oct 92 06:40:20 GMT
Message-ID: <JJC.92Oct9114032@jclark.jclark.com>
Sender: jjc@jclark.com (James Clark)
Organization: None, London, England
References: <1992Oct6.211220.20566@jarvis.csri.toronto.edu> <4232@vidiot.UUCP>
Date: Fri, 9 Oct 1992 11:40:32 GMT
Lines: 48