man page table preprocessing
(Related to a post of mine on -devel)
I'm packaging powstatd. It comes with a man page that displays
tables correctly on Red Hat, but (disappointingly) doesn't on
Debian. It seems we don't use the same man pre-processors?
The offending bits look like:
[cut]
Hit ^C to stop after you see something like:
.in +3
.TS
tab(#);
l2 s2 s2 s4 s2 s4 s
l2 l2 l2 l4 l2 l4 l.
powstatd: online (standalone), watching /dev/ttyS0.#
CTS#DSR#DCD#RNG#DTR#RTS#STATUS
1#0#1#1#0#1#OK
1#0#1#1#0#1#OK
1#0#1#1#0#1#OK
1#0#1#1#0#1#OK
.TE
.in -3
[cut]
On Red Hat, the page looks like:
Hit ^C to stop after you see something like:
powstatd: online (standalone), watching /dev/ttyS0.
CTS DSR DCD RNG DTR RTS STATUS
1 0 1 1 0 1 OK
1 0 1 1 0 1 OK
1 0 1 1 0 1 OK
1 0 1 1 0 1 OK
On Debian (slink), it looks like:
tab(#); l2 s2 s2 s4 s2 s4 s1 s l2 l2 l2 l4 l2 l4 l1 l.
powstatd: online (standalone), watching /dev/ttyS1.#
CTS#DSR#DCD#RNG#DTR#RTS#STATUS# 1#0#1#1#0#1#OK#
1#0#1#1#0#1#OK# 1#0#1#1#0#1#OK# 1#0#1#1#0#1#OK#
0#0#1#1#0#1#FAIL#<- plug pulled 0#0#1#1#0#1#FAIL#
0#0#1#1#0#1#FAIL# 0#0#1#1#0#1#FAIL# 1#0#1#1#0#1#OK#<-
plug reinserted 1#0#1#1#0#1#OK# 1#0#1#1#0#1#OK#
The only way of getting ptroper formating is using:
# man -pt powstatd
Obviously, I can't expect users to do this. I can preprocess the
man page (before installing it) like this:
gtbl powstatd.8 | egrep -v "^\.lf [0-9][0-9][0-9]"$ > newpowstatd.8
(the egrep is to removing .lf lines that generate errors when I
invoke man on it on my system).
However, the table parts in the man page are `processed' beyond
recognition. It's no longer an ASCII readable and editable file.
Is that desirable? Or should try to change the formatting of the
Debian man page to not use such tables?
(Which don't we preprocess the same way as Red hat?)
Thanks!
Peter
Reply to: