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: T. Kurt Bond
Subject: Re: Long text in tbl won't wrap, maybe related to mom
Date: Sat, 6 Feb 2021 16:52:56 -0500

Peter Schaffter said:

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.

And I'd like to point out that this problem is *not* something specific to
mom - it happens with all the macro packages for troff.  I recently
mentioned
<https://groups.google.com/g/pandoc-discuss/c/m9O-uJ6rT1M/m/v4fLh5jcCAAJ>
this problem in regard to the -ms output that pandoc produces on
pandoc-discuss <https://groups.google.com/g/pandoc-discuss?pli=1>,
providing a lua filter that fixed the problem by wrapping the pandoc output
in .na/.ad pairs, and as a result they changed the default to include the
.na/.ad pairs.

On Fri, Feb 5, 2021 at 6:33 PM Peter Schaffter <peter@schaffter.ca> wrote:

> 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
>
>

-- 
T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io


reply via email to

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