Bug 142590 - a2ps has troubles with counting
a2ps has troubles with counting
Status: CLOSED DUPLICATE of bug 140584
Product: Fedora
Classification: Fedora
Component: a2ps (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2004-12-10 15:00 EST by Michal Jaegermann
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 14:07:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2004-12-10 15:00:43 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.	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 09:29:27 EST
What version of urw-fonts have you got installed?
Comment 2 Michal Jaegermann 2004-12-13 10:17:28 EST
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 11:39:14 EST
What about if you downgrade urw-fonts to 2.1-7 from FC2?

See bug #140584.
Comment 4 Michal Jaegermann 2004-12-13 15:16:09 EST
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 16:49:21 EST

*** This bug has been marked as a duplicate of 140584 ***
Comment 6 Red Hat Bugzilla 2006-02-21 14:07:39 EST
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.