nroff/troff gurus... - Unix

This is a discussion on nroff/troff gurus... - Unix ; 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 ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: nroff/troff gurus...

  1. nroff/troff gurus...

    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 #
    #----------------------------------------------------------#

  2. Re: nroff/troff gurus...

    On Thu, 6 Nov 2003, Joe Cipale wrote:

    > 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!

    > 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.

    > .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

  3. hacking old unix

    hi, i have a old server which is running SLXOS FOR UNIXWARE 2.X.

    and it asks for login and password, any body know a way around this?
    email me: krawczuk@dodo.com.au





  4. Re: hacking old unix

    "mark krawczuk" wrote in message news:<3faaff84$1@news.comindico.com.au>...
    > hi, i have a old server which is running SLXOS FOR UNIXWARE 2.X.
    >
    > and it asks for login and password, any body know a way around this?
    > email me: krawczuk@dodo.com.au

    **
    Do a search for this string on the following page.
    " root password recovery unixware2 "

    http://aplawrence.com/cgi-bin/search3.pl

    Walt R.

  5. Re: nroff/troff gurus...

    I'm pretty sure that there is a function that you can use to tell tbl
    to not split on a page boundary. Unfortunately, I no longer have my
    (20 yar old) tbl manuals (part of the original UNIX reference set).

    Joe Cipale wrote:
    > 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



    --
    Stephen Samuel +1(604)876-0426 samuel@bcgreen.com
    http://www.bcgreen.com/~samuel/
    Powerful committed communication. Transformation touching
    the jewel within each person and bringing it to light.

  6. Re: nroff/troff gurus...

    In comp.unix.programmer Stephen Samuel wrote:
    > I'm pretty sure that there is a function that you can use to tell tbl
    > to not split on a page boundary. Unfortunately, I no longer have my
    > (20 yar old) tbl manuals (part of the original UNIX reference set).


    it's called a "keep" (a macro, not a function),
    and is documented more/less for groff.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  7. Re: nroff/troff gurus...


    > Joe Cipale wrote:


    >> 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.


    It's been a while, but if I remember right: you could put a ".bp" before
    the title so the title appears at the top of a page, and set the page
    length explicitly using ".pl". e.g. if your current pager length is 50
    and you want to change it to 60 for the page that has your table:

    stuff from preceeding pages
    ..pl 60
    ..bp
    ..sp 1i
    ..ce
    2002_data_weekly.ps
    ..sp 2
    ..TS H
    ....
    ..TE
    ..pl 50
    ..bp

    If you need to set the page length back, there's a register I can't
    remember off the top of my head that you can save before your .pl and
    then use later, or just explicitly use ".pl 50" or whatever, or "pl" MAY
    let you use relative incrmenets/decrements (e.g. .pl +10 ... .pl -10).
    Note that I placed the ".pl" before the ".bp" to make sure it's applied
    to the upcoming page.

    Another alternative might be to reduce the point size before your table.
    I THINK that's ".ps" and can use a relative increment/decrement, e.g.:

    ..ps -2
    ..sp 1i
    ..ce
    2002_data_weekly.ps
    ..sp 2
    ..TS H
    ....
    ..TE
    ..ps +2

    to shrink the point size by 2 so your table physically requires less
    vertical space and then restore it again afterwards. This will work for
    troff, but I don't believe it will for nroff.

    Ed.


  8. Re: nroff/troff gurus...


    > > Joe Cipale wrote:

    >
    > >> 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.

    >


    Cannot see the top of this thread but ...

    There seem to be two problems. Firstly, the table starts right at
    the bottom of a page. You can use ".ne xx" to say that you need
    at least xx space, otherwise move onto the next page. xx should be
    of the order of a couple of inches -- enough room for the top of
    the table rather than the whole table. If you wanted to keep
    the whole table together, perhaps with a caption or similar,
    then you can use a keep or display as others have mentioned
    but that does not seem to be the problem here.

    The second problem is that the table is too big to sit on a single
    page. Therefore, it must be split over more than one page, and
    what you can do is specify that the column headings should be
    repeated on each new page using:

    .TS H
    format
    format
    title to be repeated
    .TH
    data
    .TE

    This needs a suitable macro package like mm.

    If the OP means that the bottom of the table is simply cut off and
    never printed, then the page length has been specified incorrectly,
    either to troff or to the printer. It might be an A4/Letter mix-up.

    John.



  9. Re: nroff/troff gurus...

    In Joe Cipale wrote:
    > 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.


    Just curious...
    - Why are you using nroff/troff instead of TeX/LaTeX?

    --
    William Park, Open Geometry Consulting,
    Linux solution for data management and processing.

  10. Re: nroff/troff gurus...

    On Sun, 25 Jan 2004, William Park wrote:

    > In Joe Cipale wrote:
    > > 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.

    >
    > Just curious...
    > - Why are you using nroff/troff instead of TeX/LaTeX?


    Why not, especially considering that the OP already know *roff?

    --
    Rich Teer, SCNA, SCSA

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-online.net

  11. Re: nroff/troff gurus...


    "William Park" a écrit dans le message de
    news:bv18ol$mr4l0$2@ID-99293.news.uni-berlin.de...
    > In Joe Cipale wrote:
    > > 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.

    >
    > Just curious...
    > - Why are you using nroff/troff instead of TeX/LaTeX?
    >
    > --
    > William Park, Open Geometry Consulting,
    > Linux solution for data management and processing.




+ Reply to Thread