Summary: | sys-apps/groff: `groff -Tascii -mandoc` doesn't process manpages correctly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Shigeru Akiyama <akyms_hm> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | grobian, Mathias.Laurin+gentoo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Shigeru Akiyama
2005-08-17 02:43:56 UTC
What exactly you mean with "doesn't process manpages correctly"? The same thing as in Bug 102760? I mean output is not plain text; a manpage is not convert to a plain text file. I am sorry, now I realize my subject line was not informative. No, not the same bug; #102760 is a bug of `col', and its effect is truncation only. rather than blaming groff, maybe it's col's fault (Bug 102760) No, definitely not. Output of $ groff -t -e -mandoc -Tascii wc.1 is like this: ^[[1mNAME^[[0m wc - print the number of newlines, words, and bytes in files ^[[1mSYNOPSIS^[[0m ^[[1mwc ^[[22m[^[[4mOPTION^[[24m]... [^[[4mFILE^[[24m]... And, output of $ nroff -c -mandoc -Tlatin1 wc.1 is like this: N^HNA^HAM^HME^HE wc - print the number of newlines, words, and bytes in files S^HSY^HYN^HNO^HOP^HPS^HSI^HIS^HS w^Hwc^Hc [_^HO_^HP_^HT_^HI_^HO_^HN]... [_^HF_^HI_^HL_^HE]... The latter can be filtered correctly by `col'. the former outputs control codes which look fine if you give it to something which understands control codes like `less` hey i'm french, i prefer to read the manual in my native your subject line is not unuseful. i saw this problem yesterday. the letter with some accents in the french man-pages are displayed like this e(C). i don't know how to fix this while i "can't" RTFM. (In reply to comment #6) > hey i'm french, i prefer to read the manual in my native > your subject line is not unuseful. > i saw this problem yesterday. the letter with some accents in the french > man-pages are displayed like this e(C). > i don't know how to fix this while i "can't" RTFM. > The problem is not coming from groff. Scuse me for this msg Hi all, it is a groff problem and the solution is to pass it the -c option. This can be set in /etc/man.conf. You may also compare man.conf on your suse and gentoo. (Do not mind the funny location of my man.conf, I am a alt-prefix user, but this is irrelevant.) 17:25 /Users/laurin/Library/Gentoo/etc [0]1 % diff -u man.conf{.orig,} --- man.conf.orig 2008-07-02 17:06:44 +0900 +++ man.conf 2008-07-02 17:25:37 +0900 @@ -93,8 +93,8 @@ # causes problems, add the -c option to TROFF, NROFF, JNROFF. # TROFF /Users/laurin/Library/Gentoo/usr/bin/groff -Tps -mandoc -NROFF /Users/laurin/Library/Gentoo/usr/bin/nroff -mandoc -JNROFF /Users/laurin/Library/Gentoo/usr/bin/groff -Tnippon -mandocj +NROFF /Users/laurin/Library/Gentoo/usr/bin/nroff -mandoc -c +JNROFF /Users/laurin/Library/Gentoo/usr/bin/groff -Tnippon -mandocj -c EQN /Users/laurin/Library/Gentoo/usr/bin/geqn -Tps NEQN /Users/laurin/Library/Gentoo/usr/bin/geqn -Tlatin1 JNEQN /Users/laurin/Library/Gentoo/usr/bin/geqn -Tnippon `man grotty` is the only man-page which for me shows colours (in the background and foreground example texts). People with garbled text seem to be able to get something useful when using man -P "less -R", while setting PAGER to "less -R" doesn't work. you need to pass these additional args: -P -c -P -b -P -B these tell the postprocessor (grotty) to not use escape sequences. the escape sequences that show up in the output are part of ascii, so the -Tascii format doesn't tell groff to filter it out. the -mandoc says you want to do things like bold/color, so it includes the escape sequences. or i could be full of crap and you should check with upstream to verify: https://lists.gnu.org/archive/html/groff/ |