tech-userlevel archive

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

Re: groff/-mandoc replacement (OT)



> I think that putting multiple Pp macros in sequence they won't make
> any difference "by design" - the macro language is tagging semantic
> structures so that I can interpret it how *I* want it

That's my understanding of what mdoc is for, yes.  But that doesn't
explain multiple consecutive .Pps not working, unless you believe that
a zero-length paragraph is an oxymoron.

> Multiple separators in a row don't make any sense to me.

How do you get a blank line in a text file?  Two adjacent line
separators.

>> .br wasn't enough in my tests.  The incantation I eventually settled
>> on, which seems to work for me, is

>> .de bL
>> .nf
>> \&\ \&
>> .br
>> .fi
>> ..

> what does this do for you that .Pp doesn't?

It works.

In particular, consider the following snippet, extracted from a sample
manpage (quoted in full below):

The flags recognized are:
.Bl -tag -width indent
.It Fl one
Flag description one.
.It Fl two
Flag description two.
.El
Of these, half don't work.

When I nroff -mdoc this, there is no blank line between the "Flag
description two" and "Of these, half don't work" lines, though there is
between "The flags recognized are:" and "Flag description one".  If I
insert a .Pp, I get a blank line (but that means inserting a paragraph
break in the middle of a paragraph).  Inserting two consecutive .Pp
lines produces only one blank line in the output.

If I use .bL, though, rather than .Pp, each .bL produces a blank line,
even when I use two of them consecutively.  And, it doesn't declare a
paragraph boundary where none conceptually exists.

It would, of course, be better to use a proper markup macro.  But as
far as I can tell mdoc doesn't have a markup macro that means
"compensate for something else's failure to avoid smushing things
together here".

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Here's the whole sample manpage:

.\" Grr, why do .Bl/.El produce a blank line before but not after?!
.\" It seems damn near impossible to get a blank line.
.\" .D1 and .Dl with no argument produce a whine.
.\" Neither of
.\" .D1 \&
.\" .D1 \&\ \&
.\" work.
.de bL
.nf
\&\ \&
.br
.fi
..
.Dd July 31, 2000
.Dt FOO 1
.Os NetBSD 1.4T
.Sh NAME
.Nm foo
.Nd sample manpage utility
.Sh SYNOPSIS
.Nm foo
.Op flags
.Sh DESCRIPTION
.Nm
exists to support a sample manpage.
.Pp
The flags recognized are:
.Bl -tag -width indent
.It Fl one
Flag description one.
.It Fl two
Flag description two.
.El
.bL
.bL
Of these, half don't work.
.Sh AUTHOR
Someone unknown.


Home | Main Index | Thread Index | Old Index