groff
[Top][All Lists]
Advanced

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

Re: What is the difference between GNU groff and Mac OS X groff


From: Ingo Schwarze
Subject: Re: What is the difference between GNU groff and Mac OS X groff
Date: Sun, 12 Apr 2020 20:44:31 +0200
User-agent: Mutt/1.12.2 (2019-09-21)

Hello Peny Yu,

generally speaking, most software delivered with Mac OS X is totally
outdated, usually by several years, sometimes by more than a decade,
so if you care about up-to-date software, use a different operating
system.  An example of a system that is not as outdated as Mac OS X
and otherwise similar to it is FreeBSD.

Peng Yu wrote on Sun, Apr 12, 2020 at 01:27:54PM -0500:

>  { echo ".ll 14.2i"; echo ".nr LL 14.2i"; cat
> '/usr/share/man/man1/man.1'; } | tbl | /usr/bin/groff -Wall -mtty-char
> -Tascii -mandoc -c | less -is
> 
> When I use the above command (Mac OS X groff), it works fine.
> 
>  { echo ".ll 14.2i"; echo ".nr LL 14.2i"; cat
> '/usr/share/man/man1/man.1'; } | tbl | groff -Wall -mtty-char -Tascii
> -mandoc -c | less -is
> 
> When I use the above command (GNU groff), I see something like this.
> 
> ESC[1m-M  pathESC[0m
> 
> What options are needed to make GNU groff behave the same as Mac OS X
> groff? Thanks.

In general, you don't want that, the groff contained in Mac OS X
is positively ancient.  Of course, you could compile yourself a
groff from a decade ago, but why would you?


For the specific question at hand, use "-P -c" instead of "-c".

The -c option is a troff(1) option and disables color output.

But you want the -c passed to grotty(1), not to troff(1),
such that it disables ANSI escapes.  Passing options to the
preprocessor is what -P does.  See the groff(1) manual for
details.

Hope that helps,
  Ingo



reply via email to

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