groff
[Top][All Lists]
Advanced

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

Re: [Groff] [mom][patch] multipage boxed tables


From: Peter Schaffter
Subject: Re: [Groff] [mom][patch] multipage boxed tables
Date: Sat, 14 Sep 2013 23:16:42 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Sep 13, 2013, Robin Haberkorn wrote:
> I ported the ms package's tbl macros, specifically the multipage boxed
> table support, to Mom.
...
> For instance, why does the address@hidden macro change the
> environment before printing the diversion?

Beats me.  All that's required before outputting the div is '.nf'.

I've gone over your patch, made a few modifications, and
repositioned the table module (renamed "TBL SUPPORT") within
om.tmac.

Modifications:

1. There's no need for the additional HEADER arg to TS, nor for the
   verbose alias END_TABLE_HEADER.  .TS H/.TH are enough, and will
   make emigrés from ms feel right at home.  Usage will be explained
   in the docs.

2. tbl*header-div (in TS) needs to be in its own environment, with
   the params from ev 0 copied into it, otherwise there are problems
   with centred table heads.  The ev is popped when the diversion is
   completed in TS.

3. '.ev nf' replaced by '.nf' in tbl*print-header.

4. I extended TE to accomodate captions below tables.  Args (optional) are

      "caption" L|C|R <distance>

          or

       NO_SHIM
   
   where "caption" is a one-line caption, L|C|R is the quad
   direction, and <distance> is additional space to place between
   the table and the caption.  Tables are shimmed after output
   (which includes the caption), which works fine for one-line
   captions.  However, when multiple lines are required, the
   shimming needs to go after the last line of the caption, and has
   to be entered by the user, which is where NO_SHIM comes into
   play.  Compare (assuming a centred table)

      .TE "Table caption" C 3p
      
          and

      .TE NO_SHIM
      .ALD 3p
      .CENTER
      Table caption 1
      Table caption 2
      .SHIM

   The docs will explain usage.

5. The macro, @div-end!tbl*header-div, doesn't appear to be used
   even in s.tmac, so I've removed it from your patch.
      
Question for tbl experts: Is there a way to make tbl fill more of
the page?  I notice that multi-page tables break to a new page short
of the bottom margin trap even when there's plenty of room for at
least one more table row (including the box rule).

-- 
Peter Schaffter
http://www.schaffter.ca



reply via email to

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