Bug 142590 - a2ps has troubles with counting
Summary: a2ps has troubles with counting
Status: CLOSED DUPLICATE of bug 140584
Alias: None
Product: Fedora
Classification: Fedora
Component: a2ps
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-10 20:00 UTC by Michal Jaegermann
Modified: 2007-11-30 22:10 UTC (History)
0 users

Clone Of:
Last Closed: 2006-02-21 19:07:39 UTC

Attachments (Terms of Use)

Description Michal Jaegermann 2004-12-10 20:00:43 UTC
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.	localhost.localdomain	localhost	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):

Comment 1 Tim Waugh 2004-12-13 14:29:27 UTC
What version of urw-fonts have you got installed?

Comment 2 Michal Jaegermann 2004-12-13 15:17:28 UTC
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.

Comment 3 Tim Waugh 2004-12-13 16:39:14 UTC
What about if you downgrade urw-fonts to 2.1-7 from FC2?

See bug #140584.

Comment 4 Michal Jaegermann 2004-12-13 20:16:09 UTC
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.

Comment 5 Tim Waugh 2004-12-13 21:49:21 UTC

*** This bug has been marked as a duplicate of 140584 ***

Comment 6 Red Hat Bugzilla 2006-02-21 19:07:39 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.