groff
[Top][All Lists]
Advanced

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

Re: [Groff] Using real tables in groff_mdoc(7)


From: Eric S. Raymond
Subject: Re: [Groff] Using real tables in groff_mdoc(7)
Date: Sun, 12 Aug 2012 11:37:20 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Ingo Schwarze <address@hidden>:
> Ugly or not, .Bl -column is a traditional mdoc(7) feature that has
> been in common use for a long time, and not supporting it doesn't
> remotely look like a viable option.

Actually, now that I look at it, I have partial .Bl column parsing
support; I had forgotten implementing this, because doclifter blew up
on some particularly elaborate tables in mdoc(7) and groff_mdoc(7)
that didn't use .Bl column but some very nasty complex custom macros.

Looking at my Ubuntu installation, here's what I see:

address@hidden:~/WWW/doclifter$ zgrep -l -e 'Bl.*-column' `find /usr/share/man 
-print`
/usr/share/man/man1/hd.1.gz
/usr/share/man/man1/dash.1.gz
/usr/share/man/man1/hexdump.1.gz
/usr/share/man/man1/sh.1.gz
/usr/share/man/man7/groff_mdoc.7.gz
/usr/share/man/man7/mdoc.7.gz
/usr/share/man/man7/rpcinfo.7.gz

The hd, dash/sh, and hexdump instances parse correctly to tables.  The
rpcinfo instance parses to a table, but the result isn't quite right;
the "Ta" macros got treated as column data rather than properly
evaluated.  I'll try to fix that, but the effect of the bug is minor
enough that I may document it as a known problem.  It is likely most
of the cases you're worried about will be handled correctly.

One reason I didn't push this harder is that I've seen a fair number
of .Bl -column uses that are semanticaly wrong - several pages use 
it for columnating BNF!  That should not be encouraged; the right
thing to use for that is a no-fill display in a constant-width font.

> I worry that turning .Bl -column into tbl(7) might actually decrease
> portability to some more traditional systems lacking both groff(1)
> and mandoc(1).  Are you really sure all of those have usable tbl(7)?

Yes.  I have the advantage that I've actually been using TBL since
around 1983, so I have lots of experience with how it behaves on older
systems.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

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