Hi,

Stephen Gregoratto wrote on Sat, Feb 09, 2019 at 10:41:17AM +1100:

> In my opinion I find the PostScript/PDF output from groff to be
> better than mandoc's, sorry Ingo :(.

Absolutely, that is exactly what i always say.

> The font size and line spacing makes a better print, which makes
> sense considering that groff is a typesetting suite.

There are lots of aspects in which groff(1) PostScript and PDF
output - i.e., output from a real typesetting system - is better
than mandoc(1)'s.

> The catch is that groff doesn't detect if eqn(1) or tbl(1) needs 
> to be run for the man page, while mandoc does.

Yes.  One goal of mandoc(1) -T ps/pdf is to make calling it easy,
without having to worry about *any* options, such that it can be
used casually (safely and reliably) to get a quick printout.

> You would need to use grog(1) for that.

I strongly advise against using grog(1).  It is a disgusting kludge
written by an extremely careless programmer (Bernd Warken).  Since
Bernd is no longer able to do any programming at all AFAIK, it is
now also effectively unmaintained and subject to bitrot on top of
the poor quality it has in the first place.

At one point, i considered simply deleting grog(1) from the OpenBSD
textproc/groff package - but then again, OpenBSD packages should
not be prejudiced, and since grog(1) is still distributed upstream,
it is still contained in the groff package.  But that doesn't mean
anyone should run it.

If you want to use groff, use options like "-k", "-e" or "-t" to
the groff(1) program as needed or construct pipelines the traditional
way.  Even that is clearly more fragile and riskier with untrusted
input than running mandoc, but not quite as bad as grog(1).

> Here are some example pdf's for the 6.4 version of man(1):
> https://www.sgregoratto.me/paste/man-groff.1.pdf
> https://www.sgregoratto.me/paste/man-mandoc.1.pdf
> It's up to you to decide which one looks better.

It is not just a matter of personal taste.  The groff(1) output is
objectively better.  For example, these two URIs show that mandoc
fails to do adjustment (look at the right margin in the ENVIRONMENT
section) and fails to use constant-width font where it should (look
at the displays in the EXAMPLES section).  All the same, it is
convenient for just getting a quick printout.

Yours,
  Ingo

Reply via email to