この連載でも紹介してきたように、
先に紹介したように、
全パッケージの再ビルドというのは面倒な作業ではあるものの、
Plamoの場合、
groffの更新
groffは、
UNIX/
組版ソフトとは言うものの、
Plamo Linuxにもgroffのパッケージはありますが、
$ man fd /usr/bin/groff: can't find `DESC' file /usr/bin/groff:fatal error: invalid device `nippon'
groffは組版ソフトという特徴上、
ざっとイジった感じでは、
$ cat /usr/share/man/ja_JP.eucJP/man1/fd.1 | groff -DeucJP -Tutf8 | nkf -e <standard input>:40: warning [p 1, 0.5i]: cannot adjust line <standard input>:44: warning [p 1, 1.0i]: cannot adjust line ... <standard input>:673: warning [p 7, 0.3i]: cannot adjust line fd - ファイル・ディレクトリ管理ツール [ ] [ ] [ [ ]] [ ] [ ] は、 UNIX 汎用のテキスト端末用に考えられた、 ファイルやディレクトリの管理ツールです。 PC/AT 互換機と PC‐98x1 専用に作られている同名ユーティリティのクローンを目指しています。 実際、機能的には上位互換となっています。 ....
これらの不具合は将来のバージョンでは解決していくとは思うものの、
謎のESCコード
ところが、

安定環境のマシンにログインして、
おかしいなぁ……、

強調や背景色などの文字飾りをESCシーケンスを使って実現するのはコンソールでは常套手段ですが、
文字飾りの表示方法を古い形式にするような機能は無いのだろうか。。とgroff-1.
VERSION 1.18
============
***************************************************************************
* *
* PLEASE READ THE CHANGES BELOW REGARDING GROTTY, GROFF'S TTY FRONTEND. *
* *
***************************************************************************
(VERSION 1.18
GROFFのTTY用フロントエンドであるGROTTYについて以下の変更を読んでください)
Troff
-----
o Color support has been added to troff and pic (and to the device drivers
grops, grodvi, grotty, and grohtml -- other preprocessors and drivers will follow)
...
(Troff: troffとpic(とデバイスドライバであるgrops、grodvi、grottyとgrohtml--他のプリプロセッサと
ドライバも順次対応の予定)にカラーサポート機能が追加されました。)
Outputting color can be disabled in troff and groff with the option -c
(it is always disabled in compatibility mode). See the section on grotty
for the GROFF_NO_SGR environment variable also.
(カラー出力は troff と groff に -c オプションを与えることで抑制できます(互換モードでは常に抑制されます)。
grottyのセクションのGROFF_NO_SGR環境変数についても合わせて見ること。)
なるほど、

おかしいなぁ……、
これは明らかにバグですが、
発見! SGRモード
先にNEWSファイルに紹介されていたTTY端末用のGROTTYの日本語manページを読んでみたけど、
そこでexport LANG=Cとして英語版のgrottyのmanページを見ると、
By default, grotty emits SGR escape sequences (from ISO 6429, also
called ANSI color escapes) to change text attributes (bold,
italic, colors). This makes it possible to have eight different
background and foreground colors; additionally, bold and italic
attributes can be used at the same time (by using the BI font).
(デフォルトでは、grottyはSGRエスケープシーケンス(ISO6429、あるいはANSIカラーエスケープ
由来)を使ってテキストの属性(太字、イタリック、カラー)を変更します。この機能を使えば、
8つの異なる背景色と前景色を利用でき、合わせて太字やイタリックといった属性も
(BIフォントを使うことで)同時に利用することができます)
For SGR support, it is necessary to use the -R option of less(1)
to disable the interpretation of grotty's old output format. Con-
sequently, all programs which use less as the pager program have
to pass this option to it. For man(1) in particular, either add
-R to the $PAGER environment variable, e.g.
PAGER="/usr/bin/less -R"
export PAGER
or use the -P option of man to set the pager executable and its
options, or modify the configuration file of man in a similar
fashion.
(SGR機能を使うには、less(1)に-Rオプションを指定して、grottyの古い形式の出力を
解釈させないようにする必要があります。結果として、lessをページャに使っている
全てのプログラムがこのオプションを指定する必要があります。たとえば、man(1)の場合、
$PAGER環境変数に下記のように-Rオプションを追加するか、manコマンドの-Pオプションで
指定するページャにオプションを指定するか、あるいはmanの設定ファイルに同様の
オプションを指定する必要があります。)
なるほど、

こんな機能があったのか、
-r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display con-
trol characters using the caret notation; for example, a control-A (octal 001)
is displayed as "^A". Warning: when the -r option is used, less cannot keep
track of the actual appearance of the screen (since this depends on how the
screen responds to each type of control character). Thus, various display prob-
lems may result, such as long lines being split in the wrong place.
(-r あるいは --raw-control-chars
「生の」コントロールキャラクタをそのまま表示する。デフォルトでは、コントロールキャラクタは
キャレット(^)モード(たとえば control-A(8進で001)は^A)で表示する。
注意:-r オプションを使った場合、less は画面の実際の表示に追従することができなくなる
(各コントロールキャラクタにスクリーンがどう反応するかに依存するため)。そのため、いくつかの
ディスプレイでは、長い行が正しく分割されないなどの問題が生じる恐れがある。 )
-R or --RAW-CONTROL-CHARS
Like -r, but only ANSI "color" escape sequences are output in "raw" form.
Unlike -r, the screen appearance is maintained correctly in most cases. ANSI
"color" escape sequences are sequences of the form:
ESC [ ... m
where the "..." is zero or more color specification characters For the purpose
of keeping track of screen appearance, ANSI color escape sequences are assumed
to not move the cursor. You can make less think that characters other than "m"
can end ANSI color escape sequences by setting the environment variable LESSAN-
SIENDCHARS to the list of characters which can end a color escape sequence. And
you can make less think that characters other than the standard ones may appear
between the ESC and the m by setting the environment variable LESSANSIMIDCHARS
to the list of characters which can appear.
(-R あるいは --RAW-CONTROL-CHARS
-r に似ているが、ANSIの「カラー」エスケープシーケンスのみを「生の」状態で表示する。
-r とは異なり、ほとんどの場合で画面表示は正しく保たれるだろう。ANSIの「カラー」エスケープ
シーケンスは以下のような形式を取る
ここで "..." には0か複数の色指定用の文字が入る。画面の状況を保持するため、ANSIカラー
エスケープシーケンスはカーソルを動かさないと想定している。環境変数LESSANSIENDCHARSに
指定することで、ANSIのカラーエスケープシーケンスの終端を示すのにm以外の文字を使うことも
可能である。また、出現するであろうキャラクタのリストをLESSANSIMIDCHARS環境変数に登録することで、
ESCとmの間に標準的な文字以外の文字を含めることも可能である。)
なるほど、
個人的には、
昔から使っているソフトウェアは、