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: Sat, 11 Aug 2012 12:33:29 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Ingo Schwarze <address@hidden>:
> I'm not aware that mdoc(7) uses .Bd for tabular displays,
> and i'm not sure what you mean by .Be.  Sure, mdoc(7) does
> use a lot of .Bd/.Ed, but almost exclusively for code examples,
> which is apropriate.  The tables in mdoc(7) use .Bl -column/.El
> which is less powerful than tbl(7) but works quite well for
> the simple tables needed in mdoc(7).

Sorry, that was a typo./thinko on my part; I meant .Bl/El.  The
trouble with that markup is that it works well at presentation level
but would for various reasons be a very serious pain in the butt to
parse into tables.  In effect I'd have to write a new processing
engine with the approximate complexity of my TBL interpreter, and that
was quite hard to get right the first time.  I'm not willing to do it
again, not for the small number of instances of pseudo-tables; there
are only about a dozen of them, all on three particular groff pages.

> >> Kristaps: can you read Python?  It would be good to have someone's
> >> eyes other than mine on the doclifter interpreter.
> 
> I do read Python.  Then again, i'm not sure i can afford the time
> for a full doclifter code review right now due to time constraints;
> from what i heard, doclifter is neither small nor trivial.

Alas, that is true.  8400 lines of arcane parsing technology and an
expert-system-like baby AI with hundreds of cliche recognizers.  
It works, but simple it is not.

> Then again, if we run into ambiguities, i can certainly have a look
> at specific parts for comparison with groff and mandoc.

You'd get to ignore the hairiest parts, like the command-synopsis parser
and the aforementioned TBL interpreter.  The mdoc interpreter is actually
one of the simpler components.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

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