groff
[Top][All Lists]
Advanced

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

Re: Long text in tbl won't wrap, maybe related to mom


From: Peter Schaffter
Subject: Re: Long text in tbl won't wrap, maybe related to mom
Date: Fri, 5 Feb 2021 17:31:45 -0500
User-agent: Mutt/1.9.4 (2018-02-28)

On Fri, Feb 05, 2021, Bento Borges Schirmer wrote:
> I'm having great joy composing little documents for some homework
> and assignments using groff and the mom package.  Yesterday I
> wanted to learn how to make tables so I read through mom's
> excellent documentation and reproduced all tables except the last
> one from L. L. Cherry and M. E. Lesk's Tbl --A Program to Format
> Tables, when I encountered a problem where the lines wouldn't
> wrap:

The problem is twofold.  The first is that your example doesn't
appear to be formatted correctly with respect to tabs.  Your email
shows spaces.  I don't know if that's something that happened with
my mail client or whether you genuinely used spaces.  At any rate,
it's always a good idea with tbl(1) to specify the tab character so
it's visible.  Most folks use tab(@) in their global options.

The other source of your problem is indeed in mom.  Tbl appears to
require that adjusting be turned off in order to process text blocks
correctly, which mom is not presently doing.  If you precede calls
to '.TS' with '.na', and follow calls to '.TE' with '.ad',
tables process as expected.  The following, copied directly from
Lesk with the addition of @ as the tab delimiter, produces the table
as expected (with mom-2.4-4_e and 'pdfmom -t file.mom > file.pdf')

.PRINTSTYLE TYPESET
.START
.na
.TS
expand tab(@);
cb s s s
c | c | cs
ltiw(1i) | ltw(2i) | lp8 | lw(1.5i)p8.
Some Interesting Places
_
Name@Description@Practical Information
_
T{
American Museum of Natural History
T}@T{
The collections fill 11.5 acres (Michelin) or 25 acres (MTA)
of exhibition halls on four floors. There is a full-sized replica
of a blue whale and the world's largest star sapphire (stolen in 1964).
T}@Hours@10-5, ex. Sun 11-5, Wed. to 9
\^@\^@Location@T{
Central Park West & 79th St.
T}
\^@\^@Admission@Donation: $1.00 asked
\^@\^@Subway@AA to 81st St.
\^@\^@Telephone@212-873-4225
.TE
.ad

I will make the necessary change to om.tmac and commit it as
bugfix release (2.4-4_f) in the next day or two.  The change will
also be present in the 'current release' tarball on mom's website.
Meantime, just manually add the .na/.ad.

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



reply via email to

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