Red Hat Bugzilla – Bug 142590
a2ps has troubles with counting
Last modified: 2007-11-30 17:10:56 EST
Description of problem:
'a2ps' seem to be easily confused about locations of particular
pieces in an output. Try with the following fake /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
184.108.40.206 some.hosts.somewhere some
where fields are separated by tabs and not strings of spaces
and with a command like
a2ps -o /tmp/hosts.ps < hosts
to see a scrambled output. Giving it various ridiculously high
counts for tabs, like in
a2ps -T 40 -o /tmp/hosts.ps < hosts
may improve the situation in some places but in other may have
weird side-effects which do not seem to be "monotonic in a declared
tab size". OTOH doing
expand hosts | a2ps -o /tmp/hosts.ps
with the file above produces something reasonable.
'a2ps' also wraps long lines. The problem is that wrapping is
done way past the right margin.
expand /etc/fstab | a2ps -o /tmp/fstab.ps
will likely be good enough to demonstrate that.
Version-Release number of selected component (if applicable):
What version of urw-fonts have you got installed?
I got the same trouble on FC3 installation with a2ps-4.13b-41
and on a test machine with a2ps-4.13b-43. On FC3 a2ps was always
in a default configuration, i.e. /etc/a2ps.cfg and
/usr/share/a2ps/afm/fonts.map. In both cases the same
urw-fonts-2.2-6.noarch are installed.
Yes, I thought about metrics too but adding to a2ps serch path
/usr/X11R6/lib/X11/fonts/Type1 directory and modyfying fonts.map
to use cour.afm or c0419bt_.afm (Courier10PitchBT-Roman) instead
does not change really anything in the picture.
I do not recall now if I tried on x86 setup, although I thought
that I did, or only on x86_64 machines.
What about if you downgrade urw-fonts to 2.1-7 from FC2?
See bug #140584.
Indeed, this is another manifestation of the same bug #140584.
After replacing urw-fonts with 2.1-7 I do not even have to use
'expand' and in a2ps output pieces of a text do not bump into each
other and they wrap, if they are too long, on the right margin.
*** This bug has been marked as a duplicate of 140584 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.