[ Pobierz całość w formacie PDF ]
.Therefore,the physical printing device should start each line below the end of the previousline.Some printers can be set to treat "linefeed" as "carriage return,linefeed," others cannot be set this way.If your printer can be set to treat"linefeed" as "carriage return, linefeed," then do that.If theprinter cannot be modified, you should create a shell script filter that reads likethis:#!/bin/shif [ "$1" = -c ]; thencatelsesed -e s/$/^M/fi# the "echo -ne" assumes that /bin/sh is really bashecho -ne \\fInstall this filter as the if filter by putting :if=/usr/lib/lpf:(or whatever) in your /etc/printcap entry for the printer.Magic filters deduce their input files types from "magic numbers," whichis a distinctive byte pattern at particular offsets.Magic filters are usually Perlscripts, Shell scripts, or C programs that simply identify the file type and thencall the appropriate non-magic filter.A magic filter usage example is the "file"command which tries to interpret the type of file by reading the first few bytes.PostScript SupportThe Linux and UNIX community is completely PostScript dependent when it comesto documentation.If you don't have PostScript printing capability in your printer,there are times when you cannot even read documentation for software packages.If you have access to a PostScript printer, no problem.Print all you want.Onthe other hand, if you want to save paper or do not have access to a PostScript printer,consider using Ghostscript.See Chapter 25, "Ghostscript," for more informationabout installing and using Ghostscript.In a nutshell, Ghostscript, which comes fromthe GNU project, is a PostScript interpreter that accepts PostScript input and generatesoutput appropriate for X displays, printers, and some specialized display hardwareand fax software.There are a number of utilities that enable text to be printed to a PostScriptdevice.a2ps.This utility takes text and turns it into a PostScript documentwith headers and footers and page numbers.You can even print two pages on one sheetof paper.nenscript.The nenscript program is a clone of a commercialenscript program.The functionality is the same as that of a2ps.gslp.This is a PostScript program that comes with Ghostscript and isused to print a preamble to text files to convert the text files into PostScript.Check the man pages for gslp.ps.Printing DVI FilesA DVI file is the processed output from a LaTeX or TeX inputfile.To print a DVI file to a PostScript printer, you can use dvips oreps.The dvips program converts DVI into PostScript.The outputcan be piped into Ghostscript or sent directly via lpr to a PostScript printer.eps is a program which converts DVI files directly into the standard Epsonprinter language.It is a DVI driver for Epson printers.SummaryThis chapter has given you a quick tour of the printing system under Linux.Armedwith the information in this chapter, you should be able to get printing to workon your Linux machine
[ Pobierz całość w formacie PDF ]