groff
[Top][All Lists]
Advanced

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

[Groff] Bottom Line of tbl Cell.


From: Ralph Corderoy
Subject: [Groff] Bottom Line of tbl Cell.
Date: Mon, 02 Apr 2012 13:03:18 +0100

Hi,

Consider

    .\" set -eu
    .\" f=foo
    .\" tbl $f.tbl >$f.tr
    .\" groff -Tutf8 $f.tr | cat -s
    .\" groff $f.tr | ps2pdf - $f.pdf
    .\" exit
    .
    .ad l
    .nh
    .
    .sp |1i
    .TS
    center tab(:);
    c c
    l n.
    =
    Description:\(Po
    _
    T{
    Few things are harder to put up with than the annoyance of a good
    example.  \(em Mark Twain
    T}:\v'\n[3bot]u-1v'3,141.59
    _
    .T&
    r n.
    Amount due:3,141.59
    _
    .TE

It gives

    ─────────────────────────────────
         Description           £
    ─────────────────────────────────
    Few things are harder
    to put up with than
    the annoyance of a
    good example.  — Mark
    Twain                   3,141.59
    ─────────────────────────────────
               Amount due   3,141.59
    ─────────────────────────────────

The use of \n[3bot] to have the initial 3,141.59 level with the last
line of the text block rather than the first seems a bit fragile;  does
anyone have anything better?

Whilst here, note how the `=' above `Description' in the PDF has become
a single line of U+2500;  it would be nice if it were U+2550.

    ────  http://www.fileformat.info/info/unicode/char/2500/
    ════  http://www.fileformat.info/info/unicode/char/2550/

troff's output with -Tutf8 draws the two lines atop one another,

    H384
    md
    s10
    Dl 768 0
    H384
    Dl 768 0

with no vertical movement between them so I don't think grotty(1) can be
expected to know it's really two lines and not a genuine case of the ink
hitting the same place twice.  Is there any room for troff to take tbl's
line drawing and pass two lines onto grotty despite the lower
resolution?  Or for tbl to generate troff that's conditional on the
output device?

sed '/^$/{n; s/─/═/g}' fixes things up in my case but it would be nice
for tables everywhere to benefit.

Cheers, Ralph.



reply via email to

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