📄 ch43_01.htm
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 43] Printing</TITLE><METANAME="DC.title"CONTENT="UNIX Power Tools"><METANAME="DC.creator"CONTENT="Jerry Peek, Tim O'Reilly & Mike Loukides"><METANAME="DC.publisher"CONTENT="O'Reilly & Associates, Inc."><METANAME="DC.date"CONTENT="1998-10-23T15:51:40Z"><METANAME="DC.type"CONTENT="Text.Monograph"><METANAME="DC.format"CONTENT="text/html"SCHEME="MIME"><METANAME="DC.source"CONTENT="1-56592-260-3"SCHEME="ISBN"><METANAME="DC.language"CONTENT="en-US"><METANAME="generator"CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"><LINKREV="made"HREF="mailto:online-books@oreilly.com"TITLE="Online Books Comments"><LINKREL="up"HREF="part07.htm"TITLE="VII. Terminals and Printers "><LINKREL="prev"HREF="ch42_08.htm"TITLE="42.8 Errors Erased Too Soon? Try These Workarounds "><LINKREL="next"HREF="ch43_02.htm"TITLE="43.2 Introduction to Printing on UNIX "></HEAD><BODYBGCOLOR="#FFFFFF"TEXT="#000000"><DIVCLASS="htmlnav"><H1><IMGSRC="gifs/smbanner.gif"ALT="UNIX Power Tools"USEMAP="#srchmap"BORDER="0"></H1><MAPNAME="srchmap"><AREASHAPE="RECT"COORDS="0,0,466,58"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="467,0,514,18"HREF="jobjects/fsearch.htm"ALT="Search this book"></MAP><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch42_08.htm"TITLE="42.8 Errors Erased Too Soon? Try These Workarounds "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 42.8 Errors Erased Too Soon? Try These Workarounds "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 43</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch43_02.htm"TITLE="43.2 Introduction to Printing on UNIX "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 43.2 Introduction to Printing on UNIX "BORDER="0"></A></TD></TR></TABLE> <HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="CHAPTER"><H1CLASS="chapter"><ACLASS="title"NAME="UPT-CHP-43">43. Printing</A></H1><DIVCLASS="htmltoc"><P><B>Contents:</B><BR><ACLASS="sect1"HREF="#UPT-ART-4960"TITLE="43.1 Introduction to Printing ">Introduction to Printing </A><BR><ACLASS="sect1"HREF="ch43_02.htm"TITLE="43.2 Introduction to Printing on UNIX ">Introduction to Printing on UNIX </A><BR><ACLASS="sect1"HREF="ch43_03.htm"TITLE="43.3 Printer Control with lpc ">Printer Control with lpc </A><BR><ACLASS="sect1"HREF="ch43_04.htm"TITLE="43.4 Using Different Printers ">Using Different Printers </A><BR><ACLASS="sect1"HREF="ch43_05.htm"TITLE="43.5 Using Symbolic Links for Spooling ">Using Symbolic Links for Spooling </A><BR><ACLASS="sect1"HREF="ch43_06.htm"TITLE="43.6 Printing to a Terminal Printer ">Printing to a Terminal Printer </A><BR><ACLASS="sect1"HREF="ch43_07.htm"TITLE="43.7 Quick-and-Dirty Formatting Before Printing ">Quick-and-Dirty Formatting Before Printing </A><BR><ACLASS="sect1"HREF="ch43_08.htm"TITLE="43.8 Fixing Margins with pr and fold ">Fixing Margins with pr and fold </A><BR><ACLASS="sect1"HREF="ch43_09.htm"TITLE="43.9 Indenting Text for Printing ">Indenting Text for Printing </A><BR><ACLASS="sect1"HREF="ch43_10.htm"TITLE="43.10 Filename Headers Above Files Without pr ">Filename Headers Above Files Without pr </A><BR><ACLASS="sect1"HREF="ch43_11.htm"TITLE="43.11 Big Letters: banner ">Big Letters: banner </A><BR><ACLASS="sect1"HREF="ch43_12.htm"TITLE="43.12 Typesetting Overview ">Typesetting Overview </A><BR><ACLASS="sect1"HREF="ch43_13.htm"TITLE="43.13 The Text Formatters nroff, troff, ditroff, ... ">The Text Formatters nroff, troff, ditroff, ... </A><BR><ACLASS="sect1"HREF="ch43_14.htm"TITLE="43.14 nroff/troff and Macro Packages ">nroff/troff and Macro Packages </A><BR><ACLASS="sect1"HREF="ch43_15.htm"TITLE="43.15 From a Source File to the Printer ">From a Source File to the Printer </A><BR><ACLASS="sect1"HREF="ch43_16.htm"TITLE="43.16 groff ">groff </A><BR><ACLASS="sect1"HREF="ch43_17.htm"TITLE="43.17 Don't Have nroff? Try gnroff or awf ">Don't Have nroff? Try gnroff or awf </A><BR><ACLASS="sect1"HREF="ch43_18.htm"TITLE="43.18 How nroff Makes Bold and Underline; How to Remove It">How nroff Makes Bold and Underline; How to Remove It</A><BR><ACLASS="sect1"HREF="ch43_19.htm"TITLE="43.19 Removing Leading Tabs and Other Trivia ">Removing Leading Tabs and Other Trivia </A><BR><ACLASS="sect1"HREF="ch43_20.htm"TITLE="43.20 Displaying a troff Macro Definition ">Displaying a troff Macro Definition </A><BR><ACLASS="sect1"HREF="ch43_21.htm"TITLE="43.21 Preprocessing troff Input with sed ">Preprocessing troff Input with sed </A><BR><ACLASS="sect1"HREF="ch43_22.htm"TITLE="43.22 Converting Text Files to PostScript ">Converting Text Files to PostScript </A><BR><ACLASS="sect1"HREF="ch43_23.htm"TITLE="43.23 psselect: Print Some Pages from a PostScript file">psselect: Print Some Pages from a PostScript file</A><BR><ACLASS="sect1"HREF="ch43_24.htm"TITLE="43.24 Other PostScript Utilities ">Other PostScript Utilities </A><BR><ACLASS="sect1"HREF="ch43_25.htm"TITLE="43.25 The Portable Bitmap Package ">The Portable Bitmap Package </A></P><P></P></DIV><DIVCLASS="sect1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-4960">43.1 Introduction to Printing </A></H2><PCLASS="para"><ACLASS="indexterm"NAME="UPT-ART-4960-IX-PRINTING-SPOOLING-SYSTEM-DESCRIBED"></A><ACLASS="indexterm"NAME="UPT-ART-4960-IX-SPOOLING-SYSTEM-DESCRIBED"></A><ACLASS="indexterm"NAME="AUTOID-47364"></A>This chapter discusses printing, which is a surprisinglycomplicated subject.To understand why printing is so complicated,though, let's think a little bit about what you might want to print.</P><PCLASS="para">First, in the "olden days" we had line printers and their relatives:daisy wheel printers, dot matrix printers, and other pieces ofequipment that generated typewriter-like output.Printing a simpletext file was easy: you didn't need any special processing, you onlyneeded some software to shove the file into the printer.If youwanted, you might add a banner page and do a little simpleformatting, but that was really pretty trivial.</P><PCLASS="para">The one area of complexity in the printing system was the "spooling system,"which had to do several things in addition to force-feeding the printer.Most printers were (and still are) shared devices.This means thatmany people can send jobs to the printer at the same time.There mayalso be several printers on which your file gets printed; you may carewhich one is used, you may not.The spooling system needs to manageall this: receiving data from users, figuring out whether or not anappropriate printer is in use, and sending the file to the printer (ifit's free) or storing the file somewhere (if the printer isn't free).</P><PCLASS="para">Historical note: why is this called the "spooling system"?Dave Birnbaum, a Principal Scientist at Xerox, says:<BLOCKQUOTECLASS="blockquote"><PCLASS="para">"SPOOL (Simultaneous Printing Off and On Line)"<ACLASS="indexterm"NAME="AUTOID-47372"></A>It was written for the early IBM mainframes (of the 3 digit, i.e.,709 kind) and extended to the early 1401 machines.Output for the printer was sent to the spool system which eitherprinted it directly or queued it (on tape) for later printing (hencethe on/off line).There was also a 2nd generation version where the 1401 would act as theprinter controller for the (by then) 7094.The two were usually connected by a switchabletape drive that could be driven by either machine."[There's some controversy about exactly what the acronym means,but Dave's is as good as any I've heard. -<EMCLASS="emphasis">JP</EM> ]</P></BLOCKQUOTE></P><PCLASS="para">The first few articles in this chapter,<ACLASS="xref"HREF="ch43_02.htm"TITLE="Introduction to Printing on UNIX ">43.2</A>,<ACLASS="xref"HREF="ch43_03.htm"TITLE="Printer Control with lpc ">43.3</A>,<ACLASS="xref"HREF="ch43_04.htm"TITLE="Using Different Printers ">43.4</A>,and
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -