|
Home > Archive > Unix Programming > January 2004 > nroff/troff gurus...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
nroff/troff gurus...
|
|
| Joe Cipale 2004-01-23, 5:01 pm |
| Okay... I admit it. It has been a while since I have been deeply involvd
with nroff/troff. Since leaving the dark side (M$) and rturning to
Linux, I have discoverd the joy of generating documents from
applications using the .ms macros.
Here is the problem I have encountered: I have a spreadhseet app (C/C++)
that dumps info into a table. The tabel can grow rather long, as it is
returning the data-queried on a week-by-week basis. The problem is that
when I try to print the document (right now to an HP 640c/612c
Deskjet(s) ), the document is processed correctly, (i.e no erros
dispalyed on the terminal screen), but, instead of printing the table
title and then the tablulate info, the pages that get displayed include
the title, then the page gets ejected before the table is printed. The
table that does get printed, is cut off at the bottom of the page,
showing only 50 of the 53 weeks of data.
The command I am using is this: % tbl 2002_data_weekly.ps | lpr
-Pprinter1
The formatting for the file is below:
..sp 1i
..ce
2002_data_weekly.ps
..sp 2
..TS H
center, allbox, tab(~);
c c c c
l n n n.
Month~Events~Distance~Time
..TH
1~3~ 58.33~3:13:41
2~2~ 37.02~2:4:58
3~3~ 71.43~4:0:43
....
..TE
Is there a subtle thing I am not recalling?
Thank you in advance. You can reply directly to this email if you wish,
or to the newsgroup. Regards,
Joe Cipale
--
#----------------------------------------------------------#
# "Don't fear the penguin!" #
#----------------------------------------------------------#
# Registered Linux user: #309247 http://counter.li.org #
#----------------------------------------------------------#
| |
| Rich Teer 2004-01-23, 5:01 pm |
| On Thu, 6 Nov 2003, Joe Cipale wrote:
quote:
> Okay... I admit it. It has been a while since I have been deeply involvd
> with nroff/troff. Since leaving the dark side (M$) and rturning to
> Linux, I have discoverd the joy of generating documents from
> applications using the .ms macros.
It's the only way!
quote:
> The command I am using is this: % tbl 2002_data_weekly.ps | lpr
> -Pprinter1
Just a thought, but don't you think calling an input file
something.ps is a bit confusing? I'd associate that with
the PostScript file that's produced by troff.
You have to pass your file through troff as well as tbl
(or just tell groff to use tbl). Here's the command line
I use to build my book, written in ms macros that I've
customised to suit my purposes.
groff -Uptmgs input.ms > output.ps
The "t" option means call tbl.
quote:
> .TS H
>
> Is there a subtle thing I am not recalling?
..TS H and .TH are provided by the ms macros, not tbl.
HTH,
--
Rich Teer, SCNA, SCSA
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-online.net
|
|
|
|
|