n-t-roff / heirloom-doctools

The Heirloom Documentation Tools: troff, nroff, and related utilities
http://n-t-roff.github.io/heirloom/doctools.html
Other
129 stars 22 forks source link

tbl: column alignement #14

Closed bapt closed 9 years ago

bapt commented 9 years ago

with the following file https://svnweb.freebsd.org/base/head/share/doc/usd/10.exref/summary/ex.summary?view=markup I can see that the columns are not correctly aligned

I'm rendering with tbl ex.summary | nroff -ms | col -x

n-t-roff commented 9 years ago

From first view it looks ok to me. Could you please describe where one of the differences is?

(Because of the page layout setup of the macro packages the layout may not be exactly equal. Also please note that the documents from issue #14, #15, and #16 had been designed for troff. Viewing them with nroff is possible but is a compromise in both groff and original nroff.)

bapt commented 9 years ago

pilot error probably as I can't reproduce this one

bapt commented 9 years ago

I have found why freebsd col(1) is not resulting in the same output as heirloom col, but I do not know if the bug is on FreeBSD side or in heirloom

I can see that heirloom col is expecting ^[7 while freebsd col is expecting ^[^G

aka \007 while heirloom tools prints '7' is there a document somewhere that explains what is the right behaviour for col(1) and then if the tool are supposed to export 7 or \007 ?

bapt commented 9 years ago

heirloom is right and freebsd is wrong here: http://pubs.opengroup.org/onlinepubs/7908799/xcu/col.html

bapt commented 9 years ago

FYI it was a bug in FreeBSD col(1) introduced 25 years ago, this is fixed now

n-t-roff commented 9 years ago

Ok. Anyway--if no intense tests are done (like you did) I suggest to use heirlooms col to others. One of the reasons is the support for wide char data which may not be implemented in any col. Furthermore I don't test any col and since I know that at least Linux col seems to be completely useless it is clear that there can be severe issues with other versions. If you test FreeBSD col thoroughly it is ok to use it (but if in question I recommend heirloom col to others to reduce error sources).

bapt commented 9 years ago

Sure that makes sense, actually I thought I was testing with heirloom col but messed up with PATH :) I'm quite happy with that given that made me fix the bug (btw freebsd version do support widechar, but I'll test it further more)