[comp.emacs] Correct! solution to Elisp Manual printing problem.

jc@raven.bu.edu (James Cameron) (06/26/91)

Due to memory and size limitations, the elisp.dvi file cannot be
printed out on many postscript files directly.  One solution is
to change it to postscript and print it out say 20 pages at a time.

The following script needs to have "dvi2ps" within your path.  It
is the program which converts the dvi file to postscript.  It is
available at many anonymous ftp locations or you can check the
"archie database" for a site near you.  

Hope this helps!  Also, if anyone knows how to do change it so that
it prints on both sides of the paper, please contact me.  I will
then add that feature.  

jc

-----CUT HERE-----
#! /bin/csh -f

#  This shell script simply takes the formated elisp.dvi 
#  created from the GnuEmacs Reference Manual Makefile and
#  prints it 20 pages at a time using dvi2ps (which is 
#  available at your nearest ftp site or find it by 
#  telneting to quiche.cs.mcgill.ca, logging in as archie,
#  and do a "prog dvi2ps"

#  This is not a strongly written script but it solves the problem
#  with postscript printers trying to print out a HUGE dvi file like
#  this one.  

#  This is freely given software and you are welcome to make modifications
#  so long as all modifications are commented in by who made them and
#  follow the example shown. 

#  This program follows under the GNU GENERAL PUBLIC LICENSE.

#  Created by:  James Cameron
#          on: Tue Jun 25 01:50:37 EDT 1991

#  Modified by: James Cameron jc@raven.bu.edu
#           on: Tue Jun 25 02:32:53 EDT 1991
#
#  Changes:     Fixed it so that it prints to 540+ instead of 240+ (which
#               was a typo.
#               Decreased the number of times it asks to change paper from
#               every 60 pages to 100.

#  Modified by: James Cameron jc@raven.bu.edu
#           on: Tue Jun 25 16:48:16 EDT 1991
#
#  Changes:     Changed the starting point such that it printed the 
#               negative pages which I were not aware existed.  *8-)
  

echo ""
echo "Print GnuEmacs Elisp Reference Manual"
echo ""
echo -n "Please fill paper tray and then hit [enter]: "
set ENTER = $<
echo ""
 
set START_PAGE = -19
set END_START_PAGE = 540
set COUNT = 0

while ($START_PAGE < $END_START_PAGE)
  @ END_PAGE = $START_PAGE + 19
  echo "Starting - $START_PAGE  Ending - $END_PAGE"
  dvi2ps -r -f "$START_PAGE" -t "$END_PAGE" elisp.dvi | lpr
  @ START_PAGE = $START_PAGE + 20
  @ COUNT++
  if ($COUNT == 5) then
     echo ""
     echo -n "Please add more paper and then hit enter: "
     set ENTER = $<
     echo ""
     set COUNT = 0
  endif

end

echo "Starting - $START_PAGE  Ending - Whenever it does....*8-)"
dvi2ps -r -f "$START_PAGE" elisp.dvi | lpr
-----CUT HERE-----
--
					-- James Cameron  (jc@raven.bu.edu)

Signal Processing and Interpretation Lab.  Boston, Mass  (617) 353-2879
------------------------------------------------------------------------------
"But to risk we must, for the greatest hazard in life is to risk nothing.  For
the man or woman who risks nothing, has nothing, does nothing, is nothing."
	(Quote from the eulogy for the late Christa McAuliffe.)