Bug 142590

Summary: a2ps has troubles with counting
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: a2psAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:07:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.
127.0.0.1	localhost.localdomain	localhost
123.123.123.200	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):
a2ps-4.13b-43

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.