groff
[Top][All Lists]
Advanced

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

[Groff] Centering with tables


From: Mark Lawrence
Subject: [Groff] Centering with tables
Date: Fri, 26 Jan 2001 10:54:03 -0600

I've been having a problem getting a column heading to center
properly. For a table described this way:

     1  .TS
     2  box, tab(|), center;
     3  c s s s || c s s s
     4  c s s s || c s c s
     5  c s s s || c s | c s
     6  c s s s || c s | c s
     7  c s s s || c c | c c.
     8  T{
     9  .nf
    10  .ce 2
    11  \fBTable title\fR
    12  \s-2Subtitle
    13  .ps
    14  .fi
    15  T}|Arabic Letter
    16  \^|A|B
    17  \^|_|_
    18  \^|Roman numeral|Roman numeral
    19  \^|I|II|I|II
    20  =
    21  .T&
    22  c c | c c || l | l | l | l.
    23  Direction|Up|Position|Out|a|b|c|d
    24  \^|\^|\^|\^|_|_|_|_
    25  \^|\^|\^|In|a|b|c|d
    26  \^|\^|_|_|_|_|_|_
    27  \^|Down|Position|Out|a|b|c|d
    28  \^|\^|\^|\^|_|_|_|_
    29  \^|\^|\^|In|a|b|c|d
    30  .TE


I've gotten the following with "groff -t -Tascii":


+----------------------------------++------------------------------+
|                                  ||        Arabic Letter         |
|                Table title       ||      A               B       |
|                 Subtitle         |+--------------+---------------+
|                                  ||Roman numeral | Roman numeral |
|                                  || I       II   |  I       II   |
+-----------------+----------------++------+-------+-------+-------+
|                 |            Out ||a     |b      | c     |d      |
|             Up  | Position       |+------+-------+-------+-------+
|                 |            In  ||a     |b      | c     |d      |
|Direction        +----------------++------+-------+-------+-------+
|                 |            Out ||a     |b      | c     |d      |
|            Down | Position       |+------+-------+-------+-------+
|                 |            In  ||a     |b      | c     |d      |
+-----------------+----------------++------+-------+-------+-------+

The problem is that the "Table title" and "Subtitle" parts, although
centered relative to each other, are not centered within their block.
The same problem shows up in the postscript output if I leave off the
"-Tascii" switch. If I remove the .ce command in line 10, I get 

+----------------------------------++------------------------------+
|                                  ||        Arabic Letter         |
|           Table title            ||      A               B       |
|           Subtitle               |+--------------+---------------+
|                                  ||Roman numeral | Roman numeral |
|                                  || I       II   |  I       II   |
+-----------------+----------------++------+-------+-------+-------+
|                 |            Out ||a     |b      | c     |d      |
|             Up  | Position       |+------+-------+-------+-------+
|                 |            In  ||a     |b      | c     |d      |
|Direction        +----------------++------+-------+-------+-------+
|                 |            Out ||a     |b      | c     |d      |
|            Down | Position       |+------+-------+-------+-------+
|                 |            In  ||a     |b      | c     |d      |
+-----------------+----------------++------+-------+-------+-------+

Which is exactly what I would expect, though not what I want because
the subtitle isn't centered under the title.

Have I found a bug in tbl or do I simply not understand how it's
supposed to work?

--
Mark Lawrence

reply via email to

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