[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bugs in a2ps-4.2?
From: |
Koji Murakawa |
Subject: |
Bugs in a2ps-4.2? |
Date: |
Tue, 05 Feb 2002 05:37:54 -1000 |
Dear Sirs/Madams,
I would report 3 bugs in a2ps ver 4.2.
Could you give some advice to fix them?
(1) a2ps command doesn't work.
I use Sun Sparc Ultra10 + solaris2.6.
Try below:
# cd a2ps-4.2
# ./configure --with-medium=Letter
modify etc/a2ps-site.cfg and etc/a2ps_cfg
# make
# make install
The files of etc/a2ps-site.cfg and etc/a2ps_cfg are attached at the end
of this e-mail.
However, when I try a2ps command, error message appears like below:
mciao.ciao01./ciao_src/ciao01/src/spex_test/bigdogic% a2ps spex_struct.h
[spex_struct.h (C): 5 pages on 3 sheets]
lp: option requires an argument -- d
Usage: lp [-d dest] [-cmwsr] [-n num] [-t title] [-p notification] [-P
page-list] [-i job-id] [y modes] [-o options] [-S char-set] [-T
input-type] [H handling] [-q priority] files ...
a2ps: received signal 13: Broken Pipe
How should I fix it? however it works on solaris 2.7.
(2) Default medium is always A4 and option of -o nobanner doesn't work.
On solaris 2.7 machine (Sun Sparc Ultra10), a2ps does work. However the
default paper size is always A4 even though I did same procedure as
avobe.
The option of "-o nobanner" is ignored and header paper is always throw
up.
My printer is HP LaserJet 4100N series. In lp command, "-o nobanner"
works correctly.
In the attached a2ps configure files, I modifed like below:
# Default medium
Options: --medium=Letter
# First, the default printer (option -d, no argument)
# DefaultPrinter: | #{lp.default}
DefaultPrinter: | lp -o nobanner -d
# Second, a printer unkown to a2ps (option -P, argument is #o)
UnknownPrinter: | lp -o nobanner -d prth13
(3) perl missing?
During ./configure, message says like below:
However perl5.6.0 is actually installed in /usr/local/bin and has a file
name of "perl" in my computer. The directory of /usr/local/bin appears
in environmet variables of PATH.
checking for perl... (cached) /usr/local/bin/perl
Killed
checking for perl5... (cached) /usr/local/bin/perl
Killed
configure: warning:
*** You don't seem to have perl5.003 or newer installed.
*** Because of that, you may be unable to regenerate certain files
*** if you modify the sources from which they are derived.
checking for perl5.003 or newer... Killed
no
configure: warning:
*** You don't seem to have perl5.003 or newer installed.
*** Because of that, you may be unable to regenerate certain files
*** if you modify the sources from which they are derived.
checking how to run the C preprocessor... (cached) gcc -E
checking for X... (cached) libraries /usr/openwin/lib, headers
/usr/openwin/include
###########################################################
######### a2ps-4.2/etc/a2ps-site.cfg file below: ##########
###########################################################
# -*- ksh -*-
# a2ps-site.cfg
#
# This file is included from a2ps.cfg
#
# In this file should be defined your specific values you want to keep
# for other installation (future) installation of a2ps.
#################################################################
# 1) System dependent parameters #
#################################################################
# Default encoding
Options: --encoding=latin1
# Default medium
Options: --medium=Letter
#################################################################
# 2) Your printers #
#################################################################
# By default, produce Level 1 PostScript.
# Currently it only means to consider only the 13 level 1 standard
# fonts, and not the 35 standard level 2 fonts.
DefaultPPD: level1
# NOTE:
# Because sending a file to a printer is system dependent and because
# this file is meant to be system independent, there are two variables
# defined in a2ps.cfg you should use here.
# - #{lp.default}
# Its value is typically `lp' or `lpr'.
# - #{lp}
# Its value is typically `lp -d' or `lpr -P'. Immediately after
# #{lp} there should be the name of the printer.
#
### DefaultPrinter
# DefaultPrinter is the printer which is called upon `a2ps -d'.
# DefaultPrinter: | #{lp.default}
DefaultPrinter: | lp -o nobanner
### UnknownPrinter
# The `UnknownPrinter' is the command used when the user specified
# the name of the printer (a2ps -P <printer-name>), but <printer-name>
# is not specified below as a special case.
# <printer-name> is available here as `#o'.
UnknownPrinter: | lp -d prth13 -o nobanner
### Some special printers.
# This section is to fill only if you want to tune your system.
# The entry `UnknownPrinter' is enough to handle any case.
# For instance, I want to specify that arlette is a Level 2 PostScript
# printer. I specif no command, so the `UnknownPrinter' command will
# be used.
#Printer: arlette level2
# dominique is a level 2 PostScript _without_ Duplex support.
# Here I *want* a special command, not that of the UnknownPrinter.
# We use the shell script psmandup to simulate Duplex.
#Printer: dominique level2 | #?d#psmandup -n|## #{lp} dominique
# This is just to show that any command can be used. Instead of
# printing, the output is piped in `wc'.
#Printer: wc | wc -l
# You can also save in a file if you wish.
#Printer: netscape >netscape.ps
# This example uses the fact that `$N' expands in the input file name,
# so a2ps foo -P gzip will save the output in foo.ps.gz.
#Printer: gzip | gzip -c > $N.#..gz
######################################################
######### End of a2ps-4.2/etc/a2ps-site.cfg ##########
######################################################
######################################################
######### a2ps-4.2/etc/a2ps_cfg file below: ##########
######################################################
# a2ps.cfg -*- Makefile -*-
#
# System configuration file for a2ps.
# Copyright (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
# Copyright (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
#
#
# This file is part of a2ps.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#
# This file defines everything a2ps needs to know about
# -- your system (acccess to the printers)
# It is strongly suggested that you check these parameters
# are adpated to your system.
# -- customizable features
#
# It is related to the whole system, i.e., it is not the file
# the users should modify themselves for their own preferences.
# ~/.a2ps/a2psrc is the user's own configuration file, which
# is read after this file.
#
#################################################################
# 1) Definition of some media #
# (Must be defined before --medium) #
#################################################################
# Medium: name, width height [llx lly urx ury]
Medium: A3 842 1190
Medium: A4 595 842
Medium: A5 420 595
Medium: B4 729 1032
Medium: B5 516 729
Medium: Letter 612 792
Medium: Legal 612 1008
Medium: Tabloid 792 1224
Medium: Ledger 1224 792
Medium: Statement 396 612
Medium: Executive 540 720
Medium: Folio 612 936
Medium: Quarto 610 780
Medium: 10x14 720 1008
# Desk Jet users: bigger margins
Medium: A4dj 595 842 24 50 571 818
Medium: Letterdj 612 792 24 40 588 768
#################################################################
# 2) Path to the a2ps resource #
#################################################################
# Default path where a2ps dropped its library files.
LibraryPath: @libpath@
# It may be useful to extend it so that a2ps can see some
# TeX or X11 resources: it likes AFM files and PF[AB] files.
#AppendLibraryPath: foo
#################################################################
# 3) Default settings #
#################################################################
# Two virtual pages per sheet
Options: -2
# Set automatic pretty-printing on (set to "plain" for off)
Options: --pretty-print
# By default, single sided printing
Options: -s1
# Name of the document is the list of files
# (Don't put too many of them: it breaks some PS interpreters)
Options: --title='#10!f|$n|, |'
# Header is the client of the job
Options: --header=%a
# Title of the page is the (short) name of the current file
# or the first taged text if there is
Options: --center-title=#?1|$t1|$n|
# Left part of the title is the mod. date of the file
# or empty is there is a tag2
Options: --left-title='#?2||$e $T|'
# Right part of the title is the page number
# or tag2 if there is
Options: --right-title='#?2|$t2|$Q|'
# If in landscape, print date on the left hand side
# If portrait, then print date on recto, and sheet # on verso
Options: --left-footer=#?l!%E!#?v|%E|%s./%s#|!
# Center footer is the list of files on this sheet if landscape
Options: --footer='#?l|#!s-$f-, -||'
# If in landscape, print date on the right hand side
# If portrait, then print date on verso, and sheet # on recto
Options: --right-footer=#?l!%s./%s#!#?v|%s./%s#|%E|!
# We want the %%Page comments to be instructive.
# There are two predefined choices: #{pl.short} and #{pl.long}
PageLabelFormat: #{pl.short}
###############################################################
# 4) Preconfigured Variables #
###############################################################
#
# Some variables for the delegations
#
# Passes the options to psnup. A problem with psnup is that even if
# no service is ask, the PostScript is altered. There are such problems
# with dvips. A symptome is that the figure are spread on several
# pages. To avoid that, with ``-1'', we use cat instead of psnup -1.
# The files (in and out) are to be given
Variable: del.psnup \
#?o!cat!psnup -#v #?V||-q| #?j|-d|| #?r||-c| -w#w -h#h!
# Passes to psselect for PS page selection.
Variable: del.psselect \
#?p!psselect #?V||-q| -p#p!cat!
# Passes to psselect, and then psnup
Variable: del.psselnup #{del.psselect} | #{del.psnup}
# Calls to dvips. The sequence waits for the file name, and
# produces on stdout.
Variable: del.dvips dvips #?p|-pp#p|| #?V||-q| -T#wpt,#hpt -f
# We use a modified texi2dvi which accepts -b (--batch), -c (--clean),
# and -l (--language).
Variable: del.texi2dvi \
texi2dvi4a2ps -b -c #?V|--verbose|--quiet| 1>&2
# a2ps will be called upon decompressed files.
Variable: del.a2ps\
a2ps #?p|-a#p|| #?V|-v2|-q| -#v -o- --stdin=$N
# convert, part of ImageMagick, is used for many image formats
# If you want the name of the file to be printed along with the picture,
# add `-label $f'
Variable: del.imagick convert -page #wx#h
# Either GV (prefered) or Ghostview will be used as the "display"
printer
# We give -dNOPLATFONTS so that real fonts are used
# (Strange results appear with Ogonkify's fonts for instance).
Variable: ghostview ghostview -arguments -dNOPLATFONTS
#Variable: ghostview gv -antialias -arguments -dNOPLATFONTS
#
# Some macro for ToC or page label
#
# Useful for the page label format:
# pl.short: just the page intervals
Variable: pl.short #!s|$p-|,|
# pl.long: file name and page intervals
Variable: pl.long #!s|$n $p-|,|
# The default layout for Table of Contents
Variable: toc \\Keyword{Table of Contents}\n\
#-1!f\
|$2# \\keyword{$-.20n} sheets $3s< to $3s> ($2s#) pages \
$3p<-$3p> $4l# lines\n||
#################################################################
# 5) Preconfigured delegations #
#################################################################
#
# Delegations are ways to hand off the processing of some
# files to other filters.
#
# When delegating, interesting meta sequences are
# $f -- current filename, i.e. the one to delegate
# #f0 to #f9 -- temporary filename you can use
# rm is done by a2ps itself
#
########## Compressed files
# A compressed file should be decompressed and processed by a2ps
# A consequence is that the decompressed file may be delegated.
Delegation: gzip-a2ps gzip:ps gzip -cd $f | #{del.a2ps}
Delegation: gzip-a2ps compress:ps gzip -cd $f | #{del.a2ps}
#Delegation: bzip-a2ps bzip:ps bzip -cd $f | #{del.a2ps}
#Delegation: bzip2-a2ps bzip2:ps bzip2 -cd $f | #{del.a2ps}
########## DVI files
# Pass DVI files to dvips.
# * A problem with dvips is that even on failure it dumps its *
# prologue, hence it looks like a success (output is produced). To
# avoid that, we use an auxilary files and conditional call to psnup
# instead of piping.
# * It tries to figure if the doc is landscape (use of seminar for
# instance) by looking for `landscape' in the three first strings of
# the DVI file.
Delegation: dvips dvi:ps\
if strings $f | sed 3q | fgrep landscape > /dev/null 2>&1; then \
#{del.dvips} -T#hpt,#wpt $f -o #f0 && #?o|cat|#{del.psnup} -r| #f0;
\
else \
#{del.dvips} $f -o #f0 && #{del.psnup} #f0; \
fi
########## HTML files
# Pass HTML to Netscape, hoping that there is an Netscape running...
# Tricks:
# 1. Netscape can't output on stdout, hence use a tmp file (#f0)
# 2. openfile refuses relative paths, so prepend cwd (%d) when relative
# 3. remote 'openfile' -remote 'saveas' is bad, because it is handled
# asynchronously, and the output can correspond to a previously
# loaded page (not that of openfile). So run Netscape twice.
# 4. It asks the user if s/he wants to replace an existing output file,
# so rm before.
Delegation: Netscape html:ps \
rm -f #f0; \
if echo "$f" | grep '^/' >/dev/null 2>&1; then \
${NETSCAPE:-netscape} -noraise -remote 'openfile($f)'; \
else \
${NETSCAPE:-netscape} -noraise -remote 'openfile(%d/$f)'; \
fi && \
${NETSCAPE:-netscape} -noraise -remote 'saveas(#f0,postscript)' && \
#{del.psselect} #f0 | #{del.psnup}
########## PDF files
# Delegated to pdf2ps, GS 5.10
Delegation: pdf2ps pdf:ps \
pdf2ps $f #f0 && #{del.psselect} #f0 | #{del.psnup}
# Delegated to AcrobatReader
#Delegation: Acrobat pdf:ps \
# acroread -toPostScript < $f | #{del.psselnup}
########## PostScript files
# Pass the PostScript files to psnup and psselect
Delegation: PsNup ps:ps fixps #?V||-q| $f | #{del.psselnup}
########## ROFF files
# Pass the roff files to groff. Ask grog how groff should be called.
# Use fixps to ensure there is a %%BeginSetp/%%EndSetup section.
#Delegation: Groff roff:ps \
# eval `grog -Tps $f` | fixps #?V!!-q! | #{del.psselnup}
########## TeX files, supposed to be LaTeX files in fact
# Use texi2dvi for TeX file
Delegation: texi2dvi tex:ps \
#{del.texi2dvi} -l latex $f && mv $N.dvi #f0 && #{del.dvips} -f #f0 |
#{del.psnup}
########## Texinfo files
# Use texi2dvi for Texinfo file
# In a near future, we might no longer have to specify --expand, but
# currently, it is safer.
#Delegation: texi2dvi texinfo:ps \
# #{del.texi2dvi} -e -l texinfo $f && mv $N.dvi #f0 && #{del.dvips} -f
#f0 | #{del.psnup}
######################## Using ImageMagick for images
########## PNG files
#Delegation: ImageMagick png:ps\
# #{del.imagick} png:$f ps:- | #{del.psselnup}
########## GIF files
#Delegation: ImageMagick gif:ps\
# #{del.imagick} gif:$f ps:- | #{del.psselnup}
########## JPEG files
#Delegation: ImageMagick jpeg:ps\
# #{del.imagick} jpeg:$f ps:- | #{del.psselnup}
########## XBM files
#Delegation: ImageMagick xbm:ps\
# #{del.imagick} xbm:$f ps:- | #{del.psselnup}
########## XPM files
#Delegation: ImageMagick xpm:ps\
# #{del.imagick} xpm:$f ps:- | #{del.psselnup}
#################################################################
# 6) Some interesting UserOptions/Printers #
#################################################################
# Print like an old fashioned ASCII printer
UserOption: lp -1m -Eplain -B --borders=no
# Print mails
UserOption: mail -gEmail --strip=1
UserOption: longmail -gEmail --strip=1 -2R
# This variable defines a hook for `lp'. The output is piped into
# psbook in order to print a booklet.
Variable: lp.hook.book \
#?o! psbook #?V,,-q, | psnup -2 #?V,,-q, | psset -nt | \
! echo "Cannot be used with more than two pages per sheet." >&2 ; exit
1!
# To print a booklet, we must be sure to output Simplex, and 1 up.
# Install the lp hook for booklets.
UserOption: book -1Dlp.hook=#{lp.hook.book} -s1
# Some special setpagedevice requests
UserOption: manual -SManualFeed:true
# It is better not to pipe in ghostview
Printer: display | cat > #f0 && #{ghostview} #f0
# E.g. a2ps src/foo.c => foo.ps
Printer: file > $N.#.
# Dry run. Helpful to know the page usage etc.
Printer: void > /dev/null
# We define the DefaultPrinter and the Unknown Printer just in case
# a2ps-site.cfg fails to define them. Under normal circonstances
# these entries *will* be overrriden.
# First, the default printer (option -d, no argument)
# DefaultPrinter: | #{lp.default}
DefaultPrinter: | lp -o nobanner -d
# Second, a printer unkown to a2ps (option -P, argument is #o)
UnknownPrinter: | lp -o nobanner -d prth13
#################################################################
# 7) Your local settings #
#################################################################
# How to call file(1), and if possible, follow the links
FileCommand: /bin/file
# Define a variable to call lp/lpr on the default printer, preceeded
# with a hook to post-process PostScript (to call psbook for instance).
# Something like `#{lp.hook} lp #{lp.options}'
# or `#{lp.hook} lpr #{lp.options}'.
Variable: lp.default #{lp.hook} lp #{lp.options}
# The same, but when a printer is specified.
# Something like `#{lp.hook} lp #{lp.options} -d'
# or `#{lp.hook} lpr #{lp.options} -P'.
Variable: lp #{lp.hook} lp #{lp.options} -d
# To avoid that the next installation of a2ps destroys your
# definitions, local customization would be better done in
# a2ps-site.cfg.
Include: a2ps-site.cfg
#################################################
######### End of a2ps-4.2/etc/a2ps_cfg ##########
#################################################
--
*********************************************************
Koji MURAKAWA
e-mail: address@hidden
Subaru Telescope, NAOJ
650 North A'ohoku Place, Hilo, HI 96720, USA
Tel: +1-808-934-5924, Fax: +1-808-934-5984
*********************************************************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bugs in a2ps-4.2?,
Koji Murakawa <=