From: gtaylor@god.ext.tufts.edu (Grant Taylor) Subject: "How to Print under Linux, release Aug 5-93" <-------- Date: Thu, 5 Aug 1993 20:15:11 GMT
(note - my mail-server was down for 2 weeks, but it's up as of today)
How to print (and preview and fax and etc ... ) under Linux
release Aug 5-93
INTRO <<<<<<--------
This is my printing/previewing how to for Linux. Please send
comments, bug reports, etc, to:
Grant Taylor <gtaylor@cs.tufts.edu>
If you know anything or can point me towards any useful programs not
in this document that should be, please let me know!
I now have a mail server set up on my machine. It stores documents
and other things related to printing and previewing with Linux,
including the latest and greatest version of this document. Send mail
with the subject `help' to:
mail-server@god.hounix.org
for further information.
Summary of changes since release july 18-93:
ghostscript - driver list updated to 2.6.1pl4
lpd - example printcap, permissions
nroff/man - mention of lpf
hardware/kernel - don't screw with the kernel, use lptune
ghostview - 1.5 is out
remote printing - mention of printing over uucp
****************************************************************
** -main categories are followed in the text by; **
** CATEGORY <<<<<<<<<<---------- , **
** ^^^^^^^^^^^^^^^^^^^^ **
** -sub categories all begin with; **
** '-- CATEGORY', **
** ^^^ **
** -user input field variables are designated by; **
** '?' character. You fill in the information. **
****************************************************************
INDEX <<<<<<<<<<----------
intro
me
changes
index
printing
ascii
pr
postscript
fonts
lpr
remote printing
faxing
*roff/man pages
mpage
a2ps
enscript
gslp
psutils
tex/dvi
dvilj
texinfo
hardware and kernel drivers
previewing
ghostview
gspreview
xdvi
xtex
gxditview
non-x-previewing
ascii translation
from tex
from dvi
from ps
from troff
from ascii
contributors
PRINTING <<<<<<<<----------
-- ASCII TEXT
Under Linux, or under most any Un*x operating system, the easiest
thing to print with most printers is plain ASCII. Any way you can
arrange to send the text to the printer is perfectly valid. If you
have a serial printer, then try devices /dev/ttys?, /dev/ttyS?,
/dev/cua?, etc, and if you have a regular parallel hookup, use
/dev/lp?. typing
cat file >/dev/????
should do it. You may need root privileges, or you may wish to chmod
your printer device if this is all you ever print. (Note security
hole there if you've more than one user) Some printers (ie, HP
DeskJet) want dos-style end of lines: newline+carriage return. For
these, you can simply filter them through a little sed script which
adds a cr after each nl:
cat file |sed -e "s/$/^M/" >/dev/????
You can also arrange to send the appropriate commands to the printer
(or change some little switches at the back/underneath) so that it
will not require the carriage-returns to print things sanely.
-- PR
Most plain ascii files in the unix world have a tendency to be just
that - plain, unformatted ascii with no page breaks or anything else
to make a printed copy look nice and not have lines printed over
perferations. The answer to this problem is to run your text through a
formatter such as pr. Pr is a standard unix utility designed to
format plain text for printing on a line printer. The usual
appearance of the resulting formatted text has a header and/or footer,
page numbers, the date, possibly margins, double spacing, etc. As is
common with unix utils, pr has a bazillion options. They are detailed
in the man page (which you should read), but a few useful ones are:
-d Double space the output.
-e[in-tab-char[in-tab-width]]
Expand tabs to spaces on input. Optional argument
in-tab-char is the input tab character, default
tab. Optional argument in-tab-width is the input
tab character's width, default 8.
-h header
Replace the filename in the header with the string
header.
-l page-length
Set the page length to page-length lines. The
default is 66. If page-length is less than 10, the
headers and footers are omitted, as if the -t
option had been given.
-n[number-separator[digits]]
Precede each column with a line number; with paral-
lel files, precede each line with a line number.
Optional argument number-separator is the character
to print after each number, default tab. Optional
argument digits is the number of digits per line
number, default 5.
-o left-margin
Offset each line with a margin left-margin spaces
wide. The total page width is this offset plus the
width set with the -w option.
-w page-width
Set the page width to page-width columns. The
default is 72.
-- POSTSCRIPT
Printing almost anything other than plain text under unix involves
the ability to print postscript. If you have a postscript printer,
you're all set. But for most, this is not so easy.
The established way to interpret postscript under Linux is to use
ghostscript which, like nearly everything else, comes from the GNU
project. Ghostscript is a postscript interpreter which accepts
postscript input and generates output appropriate for X displays, most
printers, some specialized display hardware, and fax software.
The following devices are available as of ghostscript 2.6.1pl4:
linux PC vga using linux vgalib
# x11 X Windows version 11, release >=4 [Unix and VMS only]
# Printers:
# * appledmp Apple Dot Matrix Printer (should also work with Imagewriter)
# bj10e Canon BubbleJet BJ10e
# * bj200 Canon BubbleJet BJ200
# * cdeskjet H-P DeskJet 500C with 1 bit/pixel color
# * cdjcolor H-P DeskJet 500C with 24 bit/pixel color and
# high-quality color (Floyd-Steinberg) dithering
# * cdjmono H-P DeskJet 500C printing black only
# * cdj500 H-P DeskJet 500C (same as cdjcolor)
# * cdj550 H-P DeskJet 550C
# * declj250 alternate DEC LJ250 driver
# + deskjet H-P DeskJet and DeskJet Plus
# * dfaxhigh DigiBoard, Inc.'s DigiFAX software format (high resolution)
# * dfaxlow DigiFAX low (normal) resolution
# djet500 H-P DeskJet 500
# * djet500c H-P DeskJet 500C
# epson Epson-compatible dot matrix printers (9- or 24-pin)
# + eps9high Epson-compatible 9-pin, interleaved lines
# (triple resolution)
# * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers
# * escp2 Epson ESC/P 2 language printers, including Stylus 800
# + ibmpro IBM 9-pin Proprinter
# * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852)
# + laserjet H-P LaserJet
# * la50 DEC LA50 printer
# * la75 DEC LA75 printer
# * lbp8 Canon LBP-8II laser printer
# * ln03 DEC LN03 printer
# * lj250 DEC LJ250 Companion color printer
# + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression
# + ljet3 H-P LaserJet III* with Delta Row compression
# + ljet4 H-P LaserJet 4 (defaults to 600 dpi)
# + ljetplus H-P LaserJet Plus
# * m8510 C.Itoh M8510 printer
# * necp6 NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
# * nwp533 Sony Microsystems NWP533 laser printer [Sony only]
# * oki182 Okidata MicroLine 182
# paintjet H-P PaintJet color printer
# * pj alternate PaintJet XL driver
# * pjxl H-P PaintJet XL color printer
# * pjxl300 H-P PaintJet XL300 color printer
# * r4081 Ricoh 4081 laser printer
# * sparc SPARCprinter
# * t4693d2 Tektronix 4693d color printer, 2 bits per R/G/B component
# * t4693d4 Tektronix 4693d color printer, 4 bits per R/G/B component
# * t4693d8 Tektronix 4693d color printer, 8 bits per R/G/B component
# * tek4696 Tektronix 4695/4696 inkjet plotter
#%* trufax TruFax facsimile driver [Unix only]
# File formats and others:
# bit A plain "bit bucket" device
# bmpmono Monochrome MS Windows .BMP file format
# bmp16 4-bit (EGA/VGA) .BMP file format
# bmp256 8-bit (256-color) .BMP file format
# bmp16m 24-bit .BMP file format
# gifmono Monochrome GIF file format
# gif8 8-bit color GIF file format
# pcxmono Monochrome PCX file format
# pcxgray 8-bit gray scale PCX file format
# pcx16 Older color PCX file format (EGA/VGA, 16-color)
# pcx256 Newer color PCX file format (256-color)
# pbm Portable Bitmap (plain format)
# pbmraw Portable Bitmap (raw format)
# pgm Portable Graymap (plain format)
# pgmraw Portable Graymap (raw format)
# ppm Portable Pixmap (plain format)
# ppmraw Portable Pixmap (raw format)
# * tiffg3 TIFF/F (G3 fax)
Lines beginning with a `#' are drivers included with the gs261
source distribution.
Drivers marked with % require commercial software to work
Installations of ghostscript are available from several places:
A full, and presumably correct, installation is available in the SLS;
note that this binary requires libX.so.???, as it includes the X11
display driver. It didn't used to have the fonts, but I believe it
does now.
The `official' installation is to obtain the sources and build it
yourself:
prep.ai.mit.edu(or any gnu mirror):/pub/gnu/ghostscript-xxxx.tar.gz
and ghostscript-fonts-xxxx.tar.gz
This is probably best, as you can get the latest version (currently
2.6.1pl4 (the four patches are separate, they are available from my
mail-server as gs261-patches-1-thru-4.tar.gz.uue)) without waiting for
the SLS to get it in there. Relying on softlanding will make your
system inefficient; you certainly don't need drivers for every printer
there is in your gs binary. You should learn how to build things
under unix yourself. If you haven't the time, others do, and post
binary installations independently from the SLS folk to major linux
ftp sites. (This is not an SLS bash; the SLS is the best way to
bootstrap yourself into the Linux world, but it is not very good for
upgrading purposes). One of these options may be needed if you don't
have X libraries; the SLS binaries usually include the X11 device and
therefore want the X libraries.
A minimal binary installation of ghostscript and several other
packages needed for printing the linux documentation (which is in the
works and comes in LaTeX - now in partial alpha release (!) and very
well done, if I may say) is available as:
sunsite.unc.edu:/pub/linux/apps/tex/texmin/texmin-0.1.tar.z
Note that this does not contain any postscript fonts. (Nor do you
need them to print dvi (aka TeX).)
The main Ghostscript documentation is contained in the file use.doc,
either in the source directory, or ...lib/ghostscript/doc/use.doc if
you haven't the sources.
To print ps, first determine your driver name with:
gs -help
which lists installed drivers. If your favorite device is not listed,
you must compile gs yourself from the source distribution (do not
panic. do follow the instructions in make.doc. you will need 5 or 6
megs of space.) Then type
gs -dNOPAUSE -sDEVICE=?????? -sOutputFile=/dev/???? file.ps
and your output should (hopefully) appear at your printer. Those of
you with non-US paper sizes may wish to build gs yourself with the
right default, or you may use the -sPAPERSIZE=a4 option.
Ghostscript may be used to print at most of the resolutions your
printer supports; -r300, -r150, -r360x180 are examples of the option
used to control this. Dot matrix printers in general and 24 pin Epson
compatibles in particular need to choose an appropriate resolution.
Note that versions 2.6 and greater of ghostscript have more drivers.
-- FONTS
(This section contains font information not specific to any
ghostscript driver (nor even specific to ghostscript. Font
information pertaining to the X11 gs drivers (and thus to ghostview)
is included in the ghostview section under previewing))
All versions of ghostscript come with assorted public-domain fonts,
most of which were generated from bitmaps. (read - "lame font
quality"). However, ghostscript can use any Type 1 or 3 fonts you may
have handy. For example, the Adobe Type Manager (for any platform
other than mac (a conversion util for mac ps fonts is on simtel in the
windows3 directory)) comes with fonts you can use. (get out some of
that old windoze software :) . There may be some licensing
considerations, but if you're not a large company, no one will
notice. Place the fonts (*.pc?) in .../lib/ghostscript/fonts/ and add
to your fontmap lines such as:
%(lines toward the end override earlier entries, so put these at the end)
%(this is taken from the ms-dos distribution of gs on simtel-20)
%(font names must be the same at in the actual font, but you may use
% aliasing in this file to use a different font, read the docs)
% Fontmap.ATM - an alternative Fontmap for Ghostscript,
% suitable for use with Adobe Type Manager fonts.
% Before you use ATM fonts with Ghostscript, please read carefully
% the license that accompanies the ATM fonts; Aladdin Enterprises and
% the Free Software Foundation take no responsibility for any possible
% violations of such licenses.
% ATM fonts.
/Courier (com_____.pfb) ;
/Courier-Oblique (coo_____.pfb) ;
/Courier-Bold (cob_____.pfb) ;
/Courier-BoldOblique (cobo____.pfb) ;
/Helvetica (hv______.pfb) ;
/Helvetica-Oblique (hvo_____.pfb) ;
/Helvetica-Narrow (phvrrn.gsf) ;
/Helvetica-Bold (hvb_____.pfb) ;
/Helvetica-BoldOblique (hvbo____.pfb) ;
/Symbol (sy______.pfb) ;
/Times-Roman (tir_____.pfb) ;
/Times-Italic (tii_____.pfb) ;
/Times-Bold (tib_____.pfb) ;
/Times-BoldItalic (tibi____.pfb) ;
TimesNewRomanPS and ArialMT fonts are interchangable with Times Roman
and Helvetica, so you can alias them this way if this is what you
have.
Adobe Type 1 fonts may be found on the net:
ftp.cica.indiana.edu:/pub/pc/win3/fonts
ftp.cica.indiana.edu:/pub/pc/win3/fonts/atm
archive.umich.edu:/msdos/mswindows/fonts
I have not looked in these places, but this information is lifted
straight from the comp.fonts FAQ (which you should read if fonts are a
thing for you. I'll be glad to mail you a copy).
Conversion between various font types is tricky. Ghostscript comes
with the tools needed to take a bitmap (hopefully large) and make a
scalable ps font. Groff comes with the tools to allow use of tfm
(TeX) and pfb (Type 1) fonts in *roff documents. X11R5 includes
several font utilities and Type 1 rendering code contributed by IBM.
I have used none of the above, but they all come with manpages, so
read them. Other font conversion utilities are listed in the
comp.fonts FAQ. Also look into the package fontutils on
prep.ai.mit.edu:/pub/gnu
-- LPR
(This is an attempt at describing a few simple lpd setups. From more
information, consult the documentation and the lpd FAQ by Brian
McCauley <mccauleyba@vax1.bham.ac.uk>. The lpd FAQ is now (but not
for long) a part of the main Linux FAQ, available from all Linux ftp
sites.)
Most unix systems use lpd (or the System V variant lp), the line
printer daemon, and friends to spool print jobs and run them through
all needed filters. While line printers are certainly on their way
out, spooling print jobs and running them through filters is
definitely a convenient thing. Thus lpr. (subliminal note: PLEASE
find and read the lpr, lpd, printcap, lpc, lpq, and lprm man pages.
They are in the source dist of the net-2, if you haven't got them.)
Lpd and family are available in several places. The new Linux net-2
package contains a working lpd. I now use this one with my stock
0.99pl10 kernel after following the directions in Matt Welsh's net-2
faq to get my NET-2 going (you only need loopback). A binary package
which can be coaxed into working with the old net things (pre 0.99pl10
kernel) is in the SLS. Note a subtle difference between the two
versions: the old one placed lock files and such in /var/spool, while
the net-2 version requires the directory /var/spool/lpd to exist for
it's lock file.
You will need to edit /etc/printcap to configure lpd to use your
printer. Setting up lpd to accept postscript and print it is not very
difficult; simply make the following shell script:
#!/bin/sh
/path.../gs -q -dSAFER -dNOPAUSE -r??? -sDevice=?????? -sOutputFile=- -
and place its full pathname as the `if' (not 'of'!) parameter in the
printcap for your printer. I suggest putting it in the lpd directory
/var/spool/lpd/. Do not forget to chmod it +x. (-dSAFER attempts to
protect against ps interpreter security holes, -q and -dNOPAUSE make
it churn right along quietly, and Device is the appropriate driver for
your printer). You may wish to have several entries, perhaps for
different ghostscript resolutions (ie, draft and final mode). If so,
just create a new entry in printcap with the same port, but different
names, spool dirs, and `if' parameters. An example of this is below.
Remember that most programs default to printing into the printer `lp'
unless the environment variable `PRINTER' is set. You will also need
to set up a spooling directory (/var/spool/lpd/... is suggested), and
make sure you have the binaries lpd, lpr, lprm, lpq, lpc, and pac.
The biggest problem seems to be figuring out the permissions for the
spool directories and programs. Single user systems can just make
everything write and read-able, but multi-user systems will want to be
careful about it. The net-2 lpd makefile sets the following:
lp.lp 500 /usr/etc/lpc
lp.lp 500 /usr/etc/lpd
lp.lp 6555 /usr/bin/lpq
root.lp 6555 /usr/bin/lpr
lp.lp 555 /usr/bin/lprm
lp.lp 500 /usr/etc/pac
This shows another difference between the net-2 lpd and the net-1:
there didn't used to be a user or group lp (at least on my vintage
0.98pl5 SLS). So make one.
Another problem seems to occur when you haven't compiled tcp/ip into
your kernel. A proper configuration of your networking services (at
least enough for loopback mode) is needed to let the lpd utilities
talk to each other. Consult the net-2 faq.
Once you have done all this, simply saying:
lpr file.ps or cat file.ps | lpr or ....
will print out postscript on your (probably not postscript) printer,
assuming that lpd is running. (Lpd is a daemon, which runs, or rather
sleeps, in the background until something to do comes along. It then
processes whatever you want it to print, and keeps it in its spool
area until it has finished printing it. Start it in your /etc/rc.local
(or equivalent) with the line /etc/lpd [-l], where -l enables logging
of errors - do this when it doesn't work for you). This use of lpr is
what most programs expect to do under unix when they want to generate
printed output.
This is my /etc/printcap. It is simple, but does the job I ask of it:
#
# My simple printcap. high and low are the short names I actually
# use which can be moved to different entries when I change
# printers between my epson at home and djet500 in boston
#
# There are two (or rather, four) spool dirs. lpd does the right
# thing and only prints from one at a time. (I suppose it locks
# /dev/lp?)
#
# My printers are a DeskJet 500, and a Panasonic 1124. The epson
# driver was twiddled to use a Y-base res of 60 instead of the
# default 72, and 3* that to boot. The X-res was set at 180.
# There are parameters like this in many of the drivers.
#
high|epson-180|Epson driver at 360x180 (?) dpi:\
:lp=/dev/lp1:\
:sd=/usr/spool/lpd/lp1b:\
:if=/usr/spool/lpd/epson-high:\
:lf=/dev/console:
lp|low|epson-120|Epson driver at 120x180 dpi:\
:lp=/dev/lp1:\
:sd=/usr/spool/lpd/lp1:\
:if=/usr/spool/lpd/epson-low:\
:lf=/dev/console:
#djet-300|HP Deskjet 500 at 300dpi:\
# :lp=/dev/lp1:\
# :sd=/usr/spool/lpd/lp1c:\
# :if=/usr/spool/lpd/djet-300:\
# :lf=/dev/console:
#djet-150|HP Deskjet 500 at 150dpi:\
# :lp=/dev/lp1:\
# :sd=/usr/spool/lpd/lp1d:\
# :if=/usr/spool/lpd/djet-150:\
# :lf=/dev/console:
This is a relatively simple and unsophisticated installation of lpr.
You power users and unix wizard wannabe's may wish to do something
more elegant. This may be accomplished by substituting a more complex
script or program for the filter `if'. A shell script or C program to
determine the type of input and print it appropriately can be easily
written, and there are several versions floating around out there.
The following is an example of a magic shell script which should take
either postscript or text and deal with it:
#!/bin/sh
# This is based on a script I received from Scott Doty and which was
# written by Keith Walker. Keith's script made use of the fact that
# lpd passes options to if:
#
# <if> -w<width> -l<length> -i<indent> -n <user> -h <host> <accountingfile>
#
# to print text out well at any size. This one does not. These options
# are also handy if you want to do your own snazzy header page, much
# like NeWSPrint from Sun does (although running PostScript through
# the display server to get it interpreted is a bit much :)
#
# This is untested, but bits of it came from working programs, so it
# should work.
#
# gs will reset the printer anyway, so the this text setup doesn't matter
# setup should include the escape code for \n conversion, if applicable
printf "<printer setup for text printing (escape codes, etc)>"
read first_line
first_two_chars=`expr $first_line : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then # it's postscript
/usr/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=??????? -sOutputFile=- -
else # it's plain text
echo -n $first_line
cat
printf "\014"
fi
Note that for the paranoid, shell scripts run as someone other that
the user are a security hole, but they are illustrative.
Even more snazzy things can be done. The following was the gzip'd,
uuencoded, C source to a full-featured program which automagically
recognizes text, dvi, postscript, and direct printer driving (aka
binary) and does the appropriate thing. You will have to modify it to
reflect your printer rather than a LaserJet. In particular, the
driver used for gs, and the use of dvips instead of dvilj2p would need
changing. This approach also has less overhead as there is not
another incarnation of bash interpreting it. This was sent to me by
Hal Brooks; he wins the award for best print spooler setup from those
who responded to my survey. :) Note that this program is also
somewhat in need of a real test, nor does it make any use of the
arguments passed to `if', but it works for him.
<This was a tad long; it is available via my mailserver if you want it>
You may find that you don't like or ever expect to need the header
page which lpr by default prints out. According to the man page, the
`sh' printcap parameter will let you turn this off. (I hope you have
the man pages :) Try this first. For me binaries, this didn't work
(go figure), so I made the following shell script, which I called lpr:
#!/bin/sh
real.lpr -h $*
Setting up lpr correctly is definitely worth the trouble if you are
going to do any printing at all. Of course, if all you ever print is
the occasional man page or instruction book, then you can get by
without it (but even then it's nice).
Ghostscript 2.6.x also comes with a complicated script and utilities
to generate printcap entries and manage multiple types of queues for a
printer. I have not tested these, but I assume they can be made to
work. If you are in a large-scale environment with varied printing
needs, these are probably worth a look.
-- REMOTE PRINTING
(This is an excerpt from a message on the NORMAL channel by Rusty Carruth)
< This may have changed since net-2 came out, but probably not much>
> I have a problem: I want to print on a remote machine. What did I
> have to do for this ? Local host is a pc running linux, remote host
> is a rs6000 running aix3.2 .
>
> Any Ideas ?
If the remote machine is using the lpr print service, then you "simply"
have to:
On the linux machine:
set your /etc/printcap to point to the remote machine, like this:
ps1w01|lp|Brother ps1w01:\
:lp=:rm=qip:rp=ps1w01:\
:lf=/usr/adm/lpd-errs:\
:sd=/usr/spool/lpd/ps1w01:
Where "ps1w01" is the printer name locally (on the linux box),
"|lp" means this is the default printer.
"|Brother ps1w01" is a comment
"lp=" says no local printer
"rm=qip" means that the remote machine is named "qip"
"rp=ps1w01" means that the remote printer name is "ps1w01"
"lf=/blah" tells where the log file is (locally)
"sd=/blah" tells where the spool directory is (locally)
Create the spool directory and fire up lpd, assuming its not already
running (gotta start it as root) (its a good idea to put the lpd
starup into your initialization sequence, also, so you don't have
to fire up lpd after booting).
On the remote machine, assuming it already knows about its printer
and is running lpd:
put the name of the linux box into /etc/hosts.lpd (or whatever silliniess
AIX uses as its equivalent).
Finally, go to the linux box and type "lpq -Pprinter" where "printer"
is the name of the printer you defined. If it says "no entries"
or shows the queue then you are set up. IF not, sorry about that...
Once lpd is running on both machines, it takes less time to install
a new printer on the remote machine than it did for you to read this
entire message!
(End excerpt)
Note also that uux is ideal for sending something into someone else's
lpr, if they let you run lpr... This was common in the past, and many
people don't think of it in these days of ethernet and FDDI, but it
works very well. Read the uux/uucp man page and you'll get the idea.
-- FAXING
If you have a fax modem, you can arrage to fax things out (and in),
including PostScript, dvi, ascii, etc... Arranging for e-mail to fax
itself somewhere is also quite doable.
<note that I may have class 1 and 2 backwards... look in the flexfax
docs to get it reliably right>
Fax modems correspond to one of two types: Classes 1 and 2. Class one
modems are fairly common and have less of what goes on in a fax
supported in firmware (thus the software has to do more and do it
carefully. supporting such timing-critical things under a preemptive
multitasking environment is tricky at best). The class 1 standard is
EIA 578. Class 2 modems tend to be more expensive and comply with the
standard EIA 592. Mention of your fax modem's level of support should
be in its manuals. Do not confuse class and group, you would be hard
pressed to find a non-group III fax modem these days (but you probably
could).
Most (all?) fax software which runs under linux must convert input in
whatever format into a Group III compatible image format for
transmission. As usual, Ghostscript does the job. The devices
dfaxhigh and dfaxlow generate faxable output at the two common fax
resolutions (200x200 and 200x100). tiffg3 generates standard g3/tiff
encoded fax messages. You must compile them in if they are not there
already; this is yet another reason to get the source. Some fax
sofware on commercial platforms can use the display PostScript
renderer to render the fax image; this is not an option under Linux.
The GNU program netfax supports Class 2 fax modems only. It builds
nearly out of the box under linux. It runs a server and accepts jobs
in a queue from the local machine and the net. netfax is in use at
MIT. It accepts postscript, dvi, ascii, and can be configured to work
as an email gate. Documentation in the package is limited to compile
notes and man pages for the individual programs; actual installation
tips are few and far between. But this is nothing new in linux :)
prep.ai.mit.edu:/pub/gnu/fax-3.2.1.tar.gz
FlexFax is available from:
sgi.com (192.48.153.1):/sgi/fax/?????.src.tar.Z
There is a beta containing a linux port; it built happily for me (but
I haven't tried it yet). FlexFax supports class 1 and 2 modems, uses
ghostview or a display postscript server for rendering, and generally
is more complete, or at least general than the somewhat MIT-specific
netfax. It also can run in place of getty and either receive a fax or
spawn a login as appropriate for the type of call.
mgetty+sendfax is a Linux and SCO-specific getty for faxmodems and a simple
sendfax program. This package is on sunsite.
modgetty (which uses tcl, an interpreted language) can receive faxes.
Try harbor.ecu.purdue.edu:/pub/tcl
efax is in beta, it offers simple fax functionality for Class 2 fax
modems under Linux.
-- {N,T,G}ROFF, MAN PAGES:
Man pages can often be printed straight from the cat pages which come
with the SLS (in lieu of the normal nroff source pages) as though they
were a normal text file (which they mostly are). However, many
printers do not like the VT escape codes for highlighting and what not
that find themselves imbedded in these. A filter for this purpose
comes with the net-2 lpd package. It is called lpf.
If you have the nroff source to the page (the finding of which I
highly recommend) you can say:
man -t foobar |lpr
and your man program will (hopefully) format the man page using groff
into PostScript, which will then be sent to your lpd and on to the
printer. This form of man page output looks MUCH better than the
plain ASCII version.
If your man doesn't do this, you might try the perl version of man,
available near:
sunsite.unc.edu:/pub/Linux/system/Manual-Pagers/man-pl*
It is written entirely in perl, and is thus easily customizable (perl
being an interpreted language reminiscent of C and sh).
You can also find the nroff source file in the man directories (most
mans have an option to just spit out the filename) and do it yourself,
into any format supported by groff:
groff -mandoc -T{ascii,dvi,ps,X100,X75,latin8} foobar.1 \
[|{dvips,lpr}]
-- MPAGE
The package mpage is an ASCII postscript-ifyer and n-up reformatter
for postscript. It is available as:
wuarchive.wustl.edu:/pub/mirrors/unix-c/postscript/mpage.tar-z
or thereabouts. Note that wuarchive uses the -z suffix to mean .Z,
ie, compress, not GNUzip or freeze.
man -t foobar|mpage
will send a 2-up (depending on the environment variable MPAGE) version
of the man page to lpr and its postscript interpreter. This saves
paper and speeds up printing.
-- A2PS
A2ps will take ASCII and turn it into a nice postscript document with
headers and footers and page numbers, printed two pages on one (or
otherwise, if you say so). A2ps does a very nice job at this. It is
available at the same place mpage is.
-- ENSCRIPT
Enscript is a program which does basically the same thing as a2ps. I
do not know where to get it. It comes with most unixes.
A clone version of enscript is called nenscript, available as
/pub/Linux/system/Printing/nenscript-1.13++.bin.tar.z or
/pub/Linux/system/Printing/nenscript-1.13++.tar.z
on sunsite (?).
-- GSLP
Gslp is one of the uilities which comes with ghostscript 2.6.1 and
purports to do the same ascii --> ps conversion as enscript and a2ps.
I have not used it, but the docs say that
gs -q -sDEVICE=????? -dNOPAUSE -- gslp.ps text.file [options]
should do the trick. (gslp.ps is the actual program, which is written
in postscript. Here it is run with the argument `text.file.'
Postscript is in many respects a programming language more than a mere
printer command language.) Further documentation is in the file
gslp.ps. There is a script file which does the above for you.
-- PSUTILS
Those of you who deal with large amounts of postscript may wish for
more utility programs than come with the SLS. There are probably
millions of little programs which do things to your Postscript. A
representative package of them may be found as:
achilles.doc.ic.ac.uk:/tex/inter/psutils/*
or guardian.cs.psu.edu: /pub/src/psutil.tar.Z
These handle page selection, double-sided printing, booklet creation,
etc. Most large ftp sites (eg, wuarchive.wustl.edu, ftp.uu.uunet)
will have many such packages to choose from.
-- TEX/DVI
[La]TeX is the text formatting package used by most in the academic
world and many in other places where people realize word perfect to be
annoying. TeX works much like any other compiler -- source code is
run through the program `tex' to become a .dvi file (analogous to an
.o object file in C) which can be further manipulated to produce
printed output. This manipulation of a dvi (device independant) file
usually takes a little bit of doing. This `bit of doing' is well
worth it; TeX's output is of professional quality.
For those in the real world who cannot afford a dvi understanding
printer, it is usually best to convert the dvi into postscript that
you can pipe into ghostscript or lpr. The SLS comes with a
functioning installation of both TeX and dvips. Typing
dvips -f1 file.dvi |lpr
will do it. Dvips must be able to seek around in its input file, so
it will not accept a pipe as input (ie, cat file.dvi |dvips...).
Dvips responds to either command line arguments or a file
/usr/TeX/lib/tex/ps/config.ps (in the SLS, at least) in which you can
arrange to have dvips automatically send its output to lpr. Thus
dvips file.dvi
will do everything that needs to be done. (this is much better than
the 'manual'
dvips -f1 file.dvi |gs -q -rxxx -dNOPAUSE -sDEVICE=xxx \
-sOutputFile=- - |/dev/????)
Note that some .dvi's may include PostScript graphics in the dvips
stage rather than the tex stage of the game; if they are not found,
you will get a hole instead of a picture. This follows naturally from
the object file analogy above :) Usually, pre-made documentation in
this form has a makefile or script. Lilo docs are an example of
this.
Dvips has several interesting options; for exemple:
dvips -r1 file.dvi
will print it out backwards. We deskjet users love this one.
If all you are given is a file with a .tex ending, try either tex
file.tex or latex file.tex. One of these is bound to work. Then you
have a dvi. (You may have to run it twice for indexing)
-- DVILJ
For LaserJet owners, there is a separate program which I beleive is in
the SLS that will take dvi and convert it directly into your printer's
language (PCL). It is called dvilj2p or dvilj, and if not on tsx or
sunsite, is certainly available on ftp.uu.net.
(Description by Nils Rennebarth)
Its a nice driver, but a little out of fashion in the sense that
configuration (especially of font-paths) font-paths is not very
flexible and that it doesn't support virtual fonts (at least the
version 0.51 not). The biggest advantage over the dvips/ghostscript
combo is that it uses downloadable fonts which:
a) reduces data transmission to the printer drastically, which
makes the printer usable even on a serial line.
b) reduces printer-memory-requirements drastically. A standard
Laserjet with 512k memory is able to print almost every
TeX-document.
It has support for double side printing and most options you expect a
driver to have. It compiles cleanly and worked flawlessly on our
diverse hardware here.
There are other specific dvi drivers for different printers, as well.
I know of ones for the HP Deskjet and Epson.
-- TEXINFO
This is the native documentation format of the GNU project. Emacs can
be coerced into producing an info file out of this, and TeX can
produce nice printed docs from the same file. It is a bit of a
stretch for both systems, but it works. It is really just TeX source
which expects the macro file texinfo.tex to be installed on your
system. The SLS ought to have the macro package. Just do:
tex thefile.texi[nfo]
twice (for index generation purposes), and you end up with a plain
.dvi, to print or preview at your leisure.
In emacs, you can also do M-x texinfo-format-buffer to convert the
texinfo file into an info file viewable with emacs M-x info or an info
viewer of your choice.
-- HARDWARE AND DRIVERS
(This information is based on perusal of the source to Linux 0.99p9
and a letter from Michael K. Johnson.)
There are two ways the kernel driver may be used to run the parallel
ports. One, the original, is the polling driver. The other is the
interrupt driver. In principle, the interrupt driver only deals with
the port when it gets an interrupt and should therefore be more
efficient. In practice, people have found that it depends on the
machine. It probably doesn't make too much difference in most
situations.
For the polling driver, you may adjust its polling frequency with the
program lptune without kernel twiddling. The actual driver is in
.../linux/kernel/chr_drv/lp.c.
To choose the interrupt driver rather than the polled, use the program
lptune (or lpcntl) to set it. (Lptune (and lpcntl) is available on
sunsite, or from my mail-server.) Just put the appropriate line in
/etc/rc.
You can also change it in the kernel if you really want to.
Seven is the usual "LPT1:" IRQ, 5 is "LPT2:" for an AT class machine.
Note that if your printer is on lp0, the interrupt driver will
probably not work. The first parameter should already contain the
correct i/o base address. Many bios boot screens have this
information if you need it.
PREVIEWING <<<<<---------
-- GHOSTVIEW
Ghostview, a companion program for gs, previews postscript on an X
display. It also lets you select individual or ranges of pages from a
postscript document to print using lpr. The new version, 1.5, has
fixed a few glitches which never bothered me but may make a difference
to you. It also calls gs with the -dSAFER option and has a few more
resource and command-line options relative to 1.4.1. A binary
installation of this is probably in the SLS. The real installation is
from source
prep.ai.mit.edu:/pub/gnu/ghostview-xxx.tar.z
and is a clean build. Ghostview requires gs to work. The new version
of gs, 2.6.1, will use X display fonts in an effort to improve
legibility at low resolution (a previous failing of this pair relative
to commercial display-postscript based systems such as Sun's
pageview). This works very well for me at least, at the expense of
exact character positioning (x fonts have different widths). If you
prefer exact character representation (within the limits of your
display), you might wish to let gs render some Type 1 fonts you
install instead of using platform fonts (or the awful fonts gs comes
with. To do this while in ghostview (or in any situation involving
the X11 driver), place:
ghostscript.useExternalFonts: false
in your .Xdefaults file, and the platform fonts will not be used.
This is part of a message posted to gnu.ghostscript.bug by Tim
Theisen <ghostview@cs.wisc.edu>:
(note that the usual Linux X-server, XFree-1.3, does contain a Type 1
rasterizer which I beleive was contributed by IBM. I do not know if
XS3, X8514, or Xega include this. Look and see :)
X Resources:
Ghostscript now uses the X Toolkit to pick up X Resources. Now
ghostscript uses the standard X rules that allow more specific
resources to override less specific ones giving users the full
power of X resources to control the X11 driver. It also allows
system administrators to establish an application defaults file
with resources specific to their ghostscript installation.
The customization choices mentioned in make.doc have been moved into
X resources and are now configured at run time rather than compile
time. Sorry, this section of make.doc did not get revised for the
2.6.1 release.
If useBackingPixmap is set, ghostscript will attempt to allocate
a backing pixmap. If one cannot be allocated, ghostscript will
issue a warning and ask for backing store instead. (Since there
were insufficient resources for a backing pixmap, the X server
may not provide backing store either.)
Color Handling:
Color Handling was totally revamped for gs 2.6.
Ghostscript first checks for a suitable standard colormap. If you
have static colormap in your X server, it would be best to store a
standard colormap property on the root window describing the color
layout. Ghostscript will then be able to take full advantage of the
device. If you have a standard colormap installed, ghostscript will
start slightly faster since it does not have to allocate colors for
a cube or ramp.
If no standard colormap is available, ghostscript will allocate an
RGB cube or gray ramp. Ghostscript tries for a 5x5x5 cube on a color
device, and a 128 gray ramp on grayscale devices. It will never ask
for more than 1/2 of the colors for a RGB cube or gray ramp. It also
takes into account the number of significant bits per pixel. (i.e.
It won't ask for 128 gray levels if you only have 16 available.)
Ghostscript will attempt to allocate colors that are off the color
cube/ramp as the picture is being rendered. Ghostscript will keep
track of 256 dynamic colors. After all these are allocated,
ghostscript asks the X server directly.
The foreground and background color can be set explicitly. This
is important for the visually impaired and when using the ghostview
widget.
Color Resources:
palette(Palette): Default value: "Color". Other allowable settings:
"Grayscale", "Monochrome". The palette resource is used to restrict
the palette used for display. One can set palette to "Grayscale" or
"Monochrome" to see how a file would be rendered in grayscale or
monochrome on a color display. I use it to avoid dithering of gray-
scale figures on a color display with 4-bit DACs.
maxGrayRamp(MaxGrayRamp): Default value: 128. Maximum number of
gray levels that ghostscript will attempt to allocate. (It won't
try for more than this on an 8-bit pseudo color display even if you
set it higher.) Set this lower if you want a smaller ramp and
would prefer ghostscript to use dynamic colors.
maxRGBCube(MaxRGBCube): Default value: 5. Maximum number of
colors levels that ghostscript will attempt to allocate. (It won't
try for more than this on an 8-bit pseudo color display even if you
set it higher.) Set this lower if you want a smaller ramp and
would prefer ghostscript to use dynamic colors.
I believe these values to be a good compromise between dynamic
allocation and fall back onto a fairly good color cube for dithering.
You can use the foreground and background colors to accomplish
"reverse video". However, if you have a grayscale device, it may be
better to reverse the gray ramp using the following PostScript code
fragment:
[{1 exch sub} /exec load currenttransfer /exec load] cvx settransfer
Platform Fonts:
The X11 driver now support native X11 fonts. If you have installed
the HP XLFD font extensions into your font or X server. Ghostscript
will also be able to use platform fonts at rotations of 90 degrees,
with mirroring, and anamorphic scaling.
The X11 driver does most if its work silently. You can get it to
report when it is using an X11 font by setting the logExternalFonts
boolean in your X resources.
The X11 driver is setup to use the standard fonts distributed with
X11R5. We purchased the Adobe Type Manager and the Adobe Plus Pack.
These font packages give all the fonts normally found in the Apple
LaserWriter Plus. The X11 driver is setup to handle these fonts as
well. (They are a superset of the bitmap fonts distributed with X11.)
You may set the regularFonts, symbolFonts, or dinbatFonts resources
if you have different fonts available. Each font name must have 7
dashes or it will be ignored. Minimize the use of wildcards to
promote faster matching. (I once encountered an X server that took
many seconds to do a font lookup when wildcards were carelessly used.)
There is a different list of fonts for each common encoding. Regular
fonts may be accessed in standard or ISO Latin 1 encoding. The bdf
files that are distributed with X11 are in the ISO Latin 1 encoding.
This leaves out the ligatures. Luckily, the ligatures are present in
the bdf files, but are not given an encoding, essentially commenting
them out. You can use the fixfont program from the xproof
distribution (ftp.cs.wisc.edu:/pub/X/xproof.tar.Z, or
export.lcs.mit.edu:/contrib/xproof.tar.Z) to reencode the bdf files
and build X11 fonts that contain the ligatures (i.e standard encoding).
If you have the Type1 fonts mentioned above, and you installed the
Type1 rasterizer into you font or X server, you can use the appended
fonts.scale to name your fonts so that ghostscript can find them.
Font resources:
useExternalFonts(UseExternalFonts): Default value: true.
This resource controls whether X11 fonts will be used.
useScalableFonts(UseScalableFonts): Default value: true.
This resource controls whether scalable fonts will be used.
If you have an outline scaler in your X server, you should have
this on. If you have an X terminal, you may get slightly better
performance with this on. If you have to use the X11 bitmap scaler,
turn this off. Fonts scaled by the bitmap scaler look worse than
the default ghostscript fonts.
logExternalFonts(LogExternalFonts): Default value: false.
Controls whether to report when X11 fonts are being used.
The following fonts.scale makes all of the fonts of the Adobe Type Manager
and Adobe Plus pack available in standard and ISO Latin 1 encoding.
(We were able to purchase the above two packages at an educational discount
price of $150.)
70
agw_____.pfb -Adobe-ITC Avant Garde Gothic-Book-r-normal--0-0-0-0-p-0-iso8859-1
agwo____.pfb -Adobe-ITC Avant Garde Gothic-Book-o-normal--0-0-0-0-p-0-iso8859-1
agd_____.pfb -Adobe-ITC Avant Garde Gothic-Demi-r-normal--0-0-0-0-p-0-iso8859-1
agdo____.pfb -Adobe-ITC Avant Garde Gothic-Demi-o-normal--0-0-0-0-p-0-iso8859-1
bkl_____.pfb -Adobe-ITC Bookman-Light-r-normal--0-0-0-0-p-0-iso8859-1
bkli____.pfb -Adobe-ITC Bookman-Light-i-normal--0-0-0-0-p-0-iso8859-1
bkd_____.pfb -Adobe-ITC Bookman-Demi-r-normal--0-0-0-0-p-0-iso8859-1
bkdi____.pfb -Adobe-ITC Bookman-Demi-i-normal--0-0-0-0-p-0-iso8859-1
com_____.pfb -Adobe-Courier-Medium-r-normal--0-0-0-0-m-0-iso8859-1
coo_____.pfb -Adobe-Courier-Medium-o-normal--0-0-0-0-m-0-iso8859-1
cob_____.pfb -Adobe-Courier-Bold-r-normal--0-0-0-0-m-0-iso8859-1
cobo____.pfb -Adobe-Courier-Bold-o-normal--0-0-0-0-m-0-iso8859-1
hv______.pfb -Adobe-Helvetica-Medium-r-normal--0-0-0-0-p-0-iso8859-1
hvo_____.pfb -Adobe-Helvetica-Medium-o-normal--0-0-0-0-p-0-iso8859-1
hvb_____.pfb -Adobe-Helvetica-Bold-r-normal--0-0-0-0-p-0-iso8859-1
hvbo____.pfb -Adobe-Helvetica-Bold-o-normal--0-0-0-0-p-0-iso8859-1
hvn_____.pfb -Adobe-Helvetica-Medium-r-Narrow--0-0-0-0-p-0-iso8859-1
hvno____.pfb -Adobe-Helvetica-Medium-o-Narrow--0-0-0-0-p-0-iso8859-1
hvnb____.pfb -Adobe-Helvetica-Bold-r-Narrow--0-0-0-0-p-0-iso8859-1
hvnbo___.pfb -Adobe-Helvetica-Bold-o-Narrow--0-0-0-0-p-0-iso8859-1
ncr_____.pfb -Adobe-New Century Schoolbook-Medium-r-normal--0-0-0-0-p-0-iso8859-1
nci_____.pfb -Adobe-New Century Schoolbook-Medium-i-normal--0-0-0-0-p-0-iso8859-1
ncb_____.pfb -Adobe-New Century Schoolbook-Bold-r-normal--0-0-0-0-p-0-iso8859-1
ncbi____.pfb -Adobe-New Century Schoolbook-Bold-i-normal--0-0-0-0-p-0-iso8859-1
por_____.pfb -Adobe-Palatino-Medium-r-normal--0-0-0-0-p-0-iso8859-1
poi_____.pfb -Adobe-Palatino-Medium-i-normal--0-0-0-0-p-0-iso8859-1
pob_____.pfb -Adobe-Palatino-Bold-r-normal--0-0-0-0-p-0-iso8859-1
pobi____.pfb -Adobe-Palatino-Bold-i-normal--0-0-0-0-p-0-iso8859-1
sy______.pfb -Adobe-Symbol-Medium-r-normal--0-0-0-0-p-0-iso8859-1
tir_____.pfb -Adobe-Times-Medium-r-normal--0-0-0-0-p-0-iso8859-1
tii_____.pfb -Adobe-Times-Medium-i-normal--0-0-0-0-p-0-iso8859-1
tib_____.pfb -Adobe-Times-Bold-r-normal--0-0-0-0-p-0-iso8859-1
tibi____.pfb -Adobe-Times-Bold-i-normal--0-0-0-0-p-0-iso8859-1
zcmi____.pfb -Adobe-ITC Zapf Chancery-Medium-i-normal--0-0-0-0-p-0-iso8859-1
zd______.pfb -Adobe-ITC Zapf Dingbats-Medium-r-normal--0-0-0-0-p-0-iso8859-1
agw_____.pfb -Adobe-ITC Avant Garde Gothic-Book-r-normal--0-0-0-0-p-0-adobe-fontspecific
agwo____.pfb -Adobe-ITC Avant Garde Gothic-Book-o-normal--0-0-0-0-p-0-adobe-fontspecific
agd_____.pfb -Adobe-ITC Avant Garde Gothic-Demi-r-normal--0-0-0-0-p-0-adobe-fontspecific
agdo____.pfb -Adobe-ITC Avant Garde Gothic-Demi-o-normal--0-0-0-0-p-0-adobe-fontspecific
bkl_____.pfb -Adobe-ITC Bookman-Light-r-normal--0-0-0-0-p-0-adobe-fontspecific
bkli____.pfb -Adobe-ITC Bookman-Light-i-normal--0-0-0-0-p-0-adobe-fontspecific
bkd_____.pfb -Adobe-ITC Bookman-Demi-r-normal--0-0-0-0-p-0-adobe-fontspecific
bkdi____.pfb -Adobe-ITC Bookman-Demi-i-normal--0-0-0-0-p-0-adobe-fontspecific
com_____.pfb -Adobe-Courier-Medium-r-normal--0-0-0-0-m-0-adobe-fontspecific
coo_____.pfb -Adobe-Courier-Medium-o-normal--0-0-0-0-m-0-adobe-fontspecific
cob_____.pfb -Adobe-Courier-Bold-r-normal--0-0-0-0-m-0-adobe-fontspecific
cobo____.pfb -Adobe-Courier-Bold-o-normal--0-0-0-0-m-0-adobe-fontspecific
hv______.pfb -Adobe-Helvetica-Medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
hvo_____.pfb -Adobe-Helvetica-Medium-o-normal--0-0-0-0-p-0-adobe-fontspecific
hvb_____.pfb -Adobe-Helvetica-Bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
hvbo____.pfb -Adobe-Helvetica-Bold-o-normal--0-0-0-0-p-0-adobe-fontspecific
hvn_____.pfb -Adobe-Helvetica-Medium-r-Narrow--0-0-0-0-p-0-adobe-fontspecific
hvno____.pfb -Adobe-Helvetica-Medium-o-Narrow--0-0-0-0-p-0-adobe-fontspecific
hvnb____.pfb -Adobe-Helvetica-Bold-r-Narrow--0-0-0-0-p-0-adobe-fontspecific
hvnbo___.pfb -Adobe-Helvetica-Bold-o-Narrow--0-0-0-0-p-0-adobe-fontspecific
ncr_____.pfb -Adobe-New Century Schoolbook-Medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
nci_____.pfb -Adobe-New Century Schoolbook-Medium-i-normal--0-0-0-0-p-0-adobe-fontspecific
ncb_____.pfb -Adobe-New Century Schoolbook-Bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
ncbi____.pfb -Adobe-New Century Schoolbook-Bold-i-normal--0-0-0-0-p-0-adobe-fontspecific
por_____.pfb -Adobe-Palatino-Medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
poi_____.pfb -Adobe-Palatino-Medium-i-normal--0-0-0-0-p-0-adobe-fontspecific
pob_____.pfb -Adobe-Palatino-Bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
pobi____.pfb -Adobe-Palatino-Bold-i-normal--0-0-0-0-p-0-adobe-fontspecific
sy______.pfb -Adobe-Symbol-Medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
tir_____.pfb -Adobe-Times-Medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
tii_____.pfb -Adobe-Times-Medium-i-normal--0-0-0-0-p-0-adobe-fontspecific
tib_____.pfb -Adobe-Times-Bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
tibi____.pfb -Adobe-Times-Bold-i-normal--0-0-0-0-p-0-adobe-fontspecific
zcmi____.pfb -Adobe-ITC Zapf Chancery-Medium-i-normal--0-0-0-0-p-0-adobe-fontspecific
zd______.pfb -Adobe-ITC Zapf Dingbats-Medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
-- GSPREVIEW
This is another front-end for ghostscript. I have gotten and built
it, and actually preferred the user interface, but it had a slight
glitch which was probably me doing a careless install rather than a
program bug. It didn't seem as feature-full as ghostview, though.
(Not that there are all THAT many features in ghostview, but it does
its job well)
export.lcs.mit.edu:/contrib/GSPreview...
-- XDVI
A beautifully legible previewing program for dvi with a handy
zoom+pan feature. Will not interpret ps specials, which are
understood only by dvips (back to the compiler, object file, and now
linker analogy :) To view a file, do:
xdvi file.dvi
Mine (from export.lcs.mit.edu:/contrib/... ) has the selfile feature,
where xdvi puts up a file browser... cute but useless. This comes
with either TeX or X in the SLS -- I don't remember. Either way,
you've probably got one.
-- XTEX
Xtex is similar in purpose to xdvi. I have tried to build it under
Linux and failed. It is available as:
export.lcs.mit.edu:/contrib/xtex-2.18.5.tar.Z
-- GXDITVIEW
Produces a preview version of troff source using X fonts (this means
it's legible and typeset-looking.)
groff -TX100 -mandoc man_page.1
will typeset and run gxditview to show you a typeset version of the
man page. -TX75 is the same thing, but tiny. My SLS didn't have a
working one at all. A good one comes with the source to groff, which
you might want to get anyway for the additional drivers (the SLS,
until recently, was missing several, including postscript).
prep.ai.mit.edu:/pub/gnu/groff-xxxx.tar.z
-- NON-X-PREVIEWING
Gs comes with pc video hardware drivers, but under unix these are not
a good thing. However, there are gs binaries around which will use
the Linux VGA library (vgalib). I do not know where to find them or
the patch, but they must be on tsx-11 somewhere. The ghostscript
device for this is called linux, thus
gs -sDEVICE=linux file.ps
will show you an image of the Postscript. The environment variable
GSVGAMODE is evidently important for this. At one point the SLS
binaries had this driver, hopefully they still do. (gs -help will
list the available drivers in your binary.)
Texmgr is a program which will preview dvi under mgr. I don't beleive
that it currently works under Linux MGR, but if it does, MGR uses
sufficiently less memory and disk that this might be an attractive
option for some.
ASCII TRANSLATION <<<<<<------------
-- FROM TEX
Lametex will generate ascii from tex source. a beta (?) version is
now available:
sunsite.unc.edu:/pub/Linux/apps/tex/lametex.tar.z
L2a is a program available via FTP which is currently NOT in beta.
However, as lametex is being tailored to the needs of the Linux
community in general and the LDP in particular, I feel it is the
better choice for Linux users. (But feel free to differ).
-- FROM DVI
Dvi2tty is the name of a program which will process dvi into text.
Aparently, it will also make an effort at reproducing graphics as
well.
-- FROM PS
Ghostscript 2.6.1 comes with a script file which will use gs to
extract just the text from a ps file, called ps2ascii. See the gs
information above for where it can be found. Further documentation is
in the ghostscript 2.6.1 distribution files `gs_2asc.ps' and `use.doc'
-- FROM TROFF
groff -Tascii or -Tlatin1.....
-- FROM ASCII/LATIN1
The GNU recode program handles conversion between various forms of
straight text encoding, ie from Latin-1 to ASCII. This would be
available on prep.ai.mit.edu.
CONTRIBUTORS <<<<<<<<<<<<<<<<--------------
The following people have offered suggestions, answered surveys,
provided examples, or otherwise contributed to this document:
Steven S. Dick
Ian McCloghrie
Scott Doty
Keith Walker
Werner Almesberger
Hal N. Brooks
Kai Makisara
Kris Gleason
Savio Lam
Matthew Ewin Maguire
James Henrickson
Telly Mavroidis
Lloyd Miller
Richard Brown
Erik Stenvall
Ian Turton
Ian Jackson
Harri Pasanen
Nils Rennebarth
Rusty Carruth
Martin Neimeier
Brian McCauley
Michael K. Johnson
Erik Stenval
Fazal Majid
Tim Thiesen
END <<<<<<<<<<<<<<---------------
-- Grant Taylor gtaylor@cs.tufts.edu Read `how to print under linux' ---- sunsite.unc.edu:/pub/Linux... or via mailserver: To: mail-server@god.hounix.org