But my question is how to make the GNU groff the same as the original Mac groff. I don't think all of you answer this question.
On 4/12/20, John Gardner <gardnerjo...@gmail.com> wrote: > Use Homebrew <https://brew.sh/> to install the latest version of Groff: > > $ brew install groff > > > For a full-blown setup: > > $ brew install groff ghostscript grap less > $ brew tap alhadis/troff > $ brew install alhadis/troff/man-db dformat > > > >> so if you care about up-to-date software, use a different operating >> system > > Hah. If only it were that easy... > > On Mon, 13 Apr 2020 at 12:43, Bjarni Ingi Gislason <bjarn...@rhi.hi.is> > wrote: > >> On Sun, Apr 12, 2020 at 01:27:54PM -0500, Peng Yu wrote: >> > { 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. >> > >> >> Using on CentOS release 6.10 (Final) >> >> GNU groff version 1.18.1.4 >> Copyright (C) 2002 Free Software Foundation, Inc. >> >> less 436 >> Copyright (C) 1984-2009 Mark Nudelman >> >> show no escapes on my terminal. >> >> Maybe you have to add the option -R to "less" to interpret the >> escapes. >> >> Directing the output to a file could easy the reading (displaying) it >> with different commands, >> like an editor, "less -r", "less -R", cat, etc. >> >> N.B. >> >> For the meaning of escapes, >> see for example the man page "console_codes(4)" or >> look for the term "escape" >> in you man database (man -k ...)). >> >> For knowing the diference, you have to read the changelog from your >> distribution. >> >> -- >> Bjarni I. Gislason >> >> > -- Regards, Peng