[Top][All Lists]

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

Re: [Groff] tbl footnotes and graph position

From: Tadziu Hoffmann
Subject: Re: [Groff] tbl footnotes and graph position
Date: Tue, 15 Nov 2011 23:52:51 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

> 1.  Why is the last column in both tables so wide?  tbl
> columns can set a minimum width, but I don't see how to
> encourage tbl to make one particular column narrower.

Werner already answered that one, but I have a few more
suggestions for improving the formatting of the tables.

The following not only makes the layout cleaner, but also
removes the ".B" and ".R" macro calls which screw up the

Also, note that you can specify new format descriptions
later on in the table using ".T&".

  box nokeep;
  c | cb cb | cb s s s s | c
  c | cb cb |  c c c c c | c
  n | n  n  |  n n n n n | n.
        Number  Market  Quintile Average Relative to Market Average
        Stocks  Average Q1      Q2      Q3      Q4      Q5      Q1\[en]Q5
  (...table rows with all the numbers...)
  lb | n nb | nb nb nb nb nb | nb.
  Annualized Return*
  T}            10.04%  ...
  (...more table rows...)

> 2.  The last two rows in the first table are too tall.
> I think it's the footnotes, but I don't understand why.
> AIUI tbl calls groff to render what lies in T{ ... T},
> and surely groff isn't telling tbl it needs all that
> vertical space.

To determine the height of a text block, groff renders the
block into a temporary diversion and then reads the height of
that diversion.  Apparently, the footnotes are also formatted
into that diversion, and accordingly use up space, which,
however, is not actually used when the table is finally output,
since the footnotes are placed outside the table cell.

A quick fix for this would be to simply ignore the footnotes
when not in the top-level diversion, like so:

  Annualized Return*
  .if !'\n(.z'' .ig
  * (footnote text)

A better solution might perhaps be to do this already in
the FS/FE macros.

> 3.  This report is to be two columns; the right column holds
> graph.  When I added the .2C macro, the display after the
> 2nd table suddenly jumped to the top of the second column.

When I delete the line containing ".2C", the whole text
shifts upward a bit and makes more room at the bottom.
Do you also get this effect?

> I had to reduce the top and bottom margins to get the
> formatter to include it in the first column.

I guess that simply means the stuff was taller than the
remaining space in that column, and so it got moved to
the next one.

> How might I tell groff to keep the display in column 1?
> In effect, I want the display to be "attached" to the
> second table.

You might try to put the table into the display that
contains the notes,

  .DS L
  (table stuff)

so that both are kept together.

reply via email to

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