#1031911 man-db: MAN_KEEP_FORMATTING does not work

Package:
man-db
Source:
man-db
Description:
tools for reading manual pages
Submitter:
Witold Baryluk
Date:
2023-02-25 05:09:04 UTC
Severity:
normal
#1031911#5
Date:
2023-02-25 05:06:29 UTC
From:
To:
I am tring to dump some formatted man pages (some standard ones, and some
generated from Markdown using pandoc), to a file and other program.

After setting MANWIDTH=80, and MANPAGER=cat, or PAGER=cat, or -P cat, or
pipeing to cat, I lose formatting, like colors, bold, underlines, etc.

MAN_KEEP_FORMATTING=1 makes no difference.

It appears one needs to also use GROFF_SGR=1 to make it work, but it is
poorly documented in man manpage.

Regards,
Witold