groff
[Top][All Lists]
Advanced

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

Re: mandoc Dislikes .br in a tbl?


From: Ingo Schwarze
Subject: Re: mandoc Dislikes .br in a tbl?
Date: Tue, 21 Jan 2020 01:19:44 +0100
User-agent: Mutt/1.12.2 (2019-09-21)

Hi Ralph,

Ralph Corderoy wrote on Mon, Jan 20, 2020 at 11:20:40PM +0000:

> I saw a fetchmail(1) announcement and noticed a fix with this patch that
> seems to be because mandoc doesn't handle a .br in a tbl table.
> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208049&action=diff
> 
> Isn't that a mandoc fault?

Yes, you are right, that is a known limitation of mandoc, see e.g.

  https://cvsweb.bsd.lv/mandoc/TODO?rev=HEAD

which says:

  --- missing tbl features -----------------------------------------------
  [...]
  - support mdoc(7) and man(7) macros inside tbl(7) code;
    probably requires the parser reorg and letting tbl(7)
    use roff_node such that macro sets can mix;
    informed by bapt@ that FreeBSD needs this: 3 Jan 2015 23:32:23 +0100
    loc ***  exist **  algo ***  size **  imp ***

It is known that this also applies to low-level roff requests (like .br)
mixed into tables, not only to high-level macros.

Mixing of languages is very hard to fix in mandoc because it builds
syntax trees (ASTs) that preserve semantic structure.  Mixing elements
from different grammars is hard, and turning the resulting mixed
syntax tree into some formatting that makes sense will also be hard.

During the past few years, i have made some progress in mandoc with
respect to language mixing.  For example, you can now mix low-level
roff requests like .br, .ce, .fi, .ft, .nf, .rj, .ti with high-level
macro code like man(7) .EX and mdoc(7) .Bd and it mostly works in
both terminal and HTML output.  But there is still quite some way
to go before stuff can possibly mix with tbl(7).

Besides, i consider mixing low-level roff or high-level macros into
tbl(7) code even more dubious style than mixing low-level roff
requests into man(7) code: the latter is often unavoidable due to
the stunted nature of the man(7) language.  I think there is value
in keeping the structure of manual pages simple and in avoiding
physical, non-semantic markup as much as possible even independent
of missing features in mandoc, so i would have encouraged a change
like this in any case.

Yours,
  Ingo



reply via email to

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