groff
[Top][All Lists]
Advanced

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

Re: groff man(7) `B` macro behavior with `\c`, and input traps


From: Ingo Schwarze
Subject: Re: groff man(7) `B` macro behavior with `\c`, and input traps
Date: Fri, 17 Jun 2022 20:53:13 +0200

Hi Branden,

during the testing described below (which i foolishly expected to
be minor), i tripped over several new candidates for regressions
that look unrelated.  This is not a serious report yet, i'll have to
investigate in more detail and then report properly.  The candidates
include the following effects that i saw in my usual test setup:

 * The build died when trying to install font/devpdf/download
   because the file was never built and consequently didn't exist.
 * The PDF font description files (font/devpdf/TR and friends)
   no longer got installed.
 * In the top left corner of manual pages written in man(7),
   the page name in the header line was set in italic instead
   of in the correct roman font.


G. Branden Robinson wrote on Fri, Jun 10, 2022 at 08:07:06AM -0500:
> At 2022-06-06T09:18:01+0200, Ingo Schwarze wrote:

>> So since .B uses .itc, and that appears to match Heirloom behaviour
>> according to your research, it might be unwise to change that now.

> I've changed it anyway.

That's fine with me.  With "might", i only meant that that compatibiliby
should be considered, which you did.  Thoroughly!

The change makes sense to me.

I can confirm that

  .B bold\c
  roman

and

  .B
  bold\c
  roman

now both render "roman" in roman font.  With mandoc, the first already
renders like groff now does.  With mandoc, the second still renders
the word "roman" in bold.  I need to take care of that and fix mandoc
in that respect.

I noticed one other change in behaviour here.
Consider the following input, which includes a blank input line:

  preceding text
  .B
  
  bold
  following text

It used to render all on one output line.  Now it inserts an output
line break and 1v vertical space after "preceding text".

I wouldn't consider that a regression.  The input is terrible style
and nobody should insert a blank line at such a place.  Then again, *if*
encoutering such bad input, i think the new behaviour makes more sense.

> I now regard Heirloom's man(7) as buggy in this
> respect.  If I run Heirloom nroff with V7's tmac.an, then the input
> 
> .TH foo 1
> .B bar\c
> baz
> 
> results in a bold "bar" and a roman "baz".
> I've also confirmed Unix V7 troff (yes, troff) behavior thanks to John
> Gardner's cat2dit tool, which he helped me get working without having to
[...]

Ack.

> (All that said, I have never been offered any reason to believe that
> clean-room reimplementing a troff macro package is easy.)

Well, rocket science is likely harder, but when you try, you *are*
in for more surprises than you might expect.  At least that's my
experience.

> What ever will become of my reputation for never changing my mind?  ;-)

That would be quite a bad reputation in the first place, and i don't
think you have any such reputation that you could lose.  :-)

Yours,
  Ingo



reply via email to

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