discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc and nroff differs for Em macro construct in columnated list
@ 2011-10-11 22:20 Thomas Klausner
  2011-10-12  0:18 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Klausner @ 2011-10-11 22:20 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

Another issue found by Nicolas Joly. I can reproduce it with mdocml-1.12.0.

Cheers,
 Thomas

----- Forwarded message from Nicolas Joly <njoly@pasteur.fr> -----

Hi Thomas,

I just found another nroff vs. mandoc difference while looking into
bwi(4) man page.

In a columnated list, use of Em macro differs with a quoted string of
words separated by tab characters. While nroff do emphasis all words,
mandoc do only make the first one.

The attached sample output differs for the second item line.  While we
can rewrite this by using constructs like the 3rd item line, i wonder
if this behaviour is to be expected ?

Thanks.

NB: At least the following man pages suffer from this:

man1/mt.1
man1/nl.1
man3/rpc.3
man4/ath.4
man4/bwi.4
man4/crypto.4
man4/dge.4
man4/rtw.4
man4/swcrypto.4
man4/termios.4
man8/ccdconfig.8

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.

----- End forwarded message -----

[-- Attachment #2: sample.1 --]
[-- Type: text/plain, Size: 367 bytes --]

.Dd October 10, 2011
.Dt SAMPLE 1
.Os
.Sh NAME
.Nm sample
.Nd sample description
.Sh SYNOPSIS
.Nm sample
.Sh DESCRIPTION
The
.Nm
is a sample test for Em macro.
.Pp
.Em "Words separated by spaces"
.Pp
.Em "Words	separated	by	tabs"
.Bl -column "column1" "column2" "column3"
.It Em "word1 word2 word3"
.It Em "word1	word2	word3"
.It Em word1 Ta Em word2 Ta Em word3
.El

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mandoc and nroff differs for Em macro construct in columnated list
  2011-10-11 22:20 mandoc and nroff differs for Em macro construct in columnated list Thomas Klausner
@ 2011-10-12  0:18 ` Ingo Schwarze
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2011-10-12  0:18 UTC (permalink / raw)
  To: Thomas Klausner; +Cc: discuss

Hi Thomas,

Thomas Klausner wrote on Wed, Oct 12, 2011 at 12:20:00AM +0200:

> In a columnated list, use of Em macro differs with a quoted string of
> words separated by tab characters. While nroff do emphasis all words,
> mandoc do only make the first one.

Yes, this is a known bug in mandoc.
It is listed in the TODO list here:

- In .Bl -column,
  .It Em Authentication<tab>Key Length
  ought to render "Key Length" with emphasis, too,
  see OpenBSD iked.conf(5).

Actually, it's one of the nastier bugs we have and not at all
easy to fix.  It's a bad nesting issue:

  begin .It
    begin .Ta
      begin .Em
    end .Ta
    begin .Ta
    end .Ta
      end .Em
  end .It

Two blocks (.Ta and .Em) overlap, but none of them fully contains
the other.  On top of that, .Ta requires different handling
depending on whether it's written "Ta" or <tab>.  And on top
of that, the quoted string also spans blocks.

I have implemented bad nesting support for .Xo some time ago,
but this case it yet more complicated since .Bl -column is by
far the most complicated mdoc block even without such additional
complications.

I hope we will come round to fix that one day, but it's not
going to be quick or easy.

Yours,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-12  0:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-11 22:20 mandoc and nroff differs for Em macro construct in columnated list Thomas Klausner
2011-10-12  0:18 ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).