A/UX® Text Processing Tools
Total Page:16
File Type:pdf, Size:1020Kb
A/UX® Text Processing Tools 030-0761 • APPLE COMPUTER, INC. © 1990, Apple Computer, Inc., and MacPaint is a registered trademark of UniSoft Corporation. All rights Claris Corporation. reserved. POSTSCRIPT is a registered trademark, Portions of this document have been and TRANSCRIPT is a trademark, of previously copyrighted by AT&T Adobe Systems, Incorporated. Information Systems and the Regents Teletype is a registered trademark of of the University of California, and are AT&T. reproduced with permission. Under the copyright laws, this· manual may TermiNet is a trademark of General not be copied, in whole or part, Electric. without the written consent of Apple UNIX is a registered trademark of or UniSoft. The same proprietary and AT&T Information Systems. copyright notices must be afftxed to any permitted copies as were afftxed to Versatec is a registered trademark of the original. Under the law, copying Versatec. includes translating into another Wang C/ AlT is a trademark of Wang language or format. Laboratories. The Apple logo is a registered Simultaneously published in the trademark of Apple Computer, Inc. United States and Canada. Use of the "keyboard" Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws. Apple Computer, Inc. 20525 Mariani Ave. Cupertino, California 95014 (408) 996-1010 Apple, the Apple logo, AlUX, ImageWriter, LaserWriter, and Macintosh are registered trademarks of Apple Computer, Inc. APS-5 is a trademark of Autologic. DEC is a trademark of Digital Equipment Corporation. Diablo is a registered trademark of Xerox Corporation. Hewlett-Packard 2631 is a trademark of Hewlett -Packard. 030-0761 UMITED WARRANTY ON MEDIA Even though Apple has reviewed this AND REPLACEMENT manual, APPLE MAKES NO WARRANlY OR REPRESENTATION, If you discover physical defects in the EITHER EXPRESS OR IMPLIED, manual or in the media on which a WITH RESPECT TO nns MANUAL, software product is distributed, Apple ITS QUALI1Y, ACCURACY, will replace the media or manual at MERCHANTABILITY, OR FITNESS no charge to you provided you return FOR A PARTICULAR PURPOSE. AS A the item to be replaced with proof of RESULT, THIS MANUAL IS SOlD purchase to Apple or an authorized "AS IS," AND YOU, THE Apple dealer during the 90-day period PURCHASER, ARE ASSUMING THE after you purchased the software. In ENTIRE RISK AS TO ITS QUAIlTY addition, Apple will replace damaged AND ACCURACY •. software media and manuals for as long as the software product is IN NO EVENT WILL APPLE BE included in Apple's Media Exchange UABLE FOR DIRECT, INDIRECT, Program. While not an upgrade or SPECIAL, INCIDENTAL, OR update method, this program offers CONSEQUENTIAL DAMAGES additional protection for up to two RESULTING FROM ANY DEFECT OR years or more from the date of your INACCURACY IN THIS MANUAL, original purchase. See your even if advised of the possibility of authorized Apple dealer for program such damages. coverage and details. In some countries the replacement period THE WARRANTY AND REMEDIES may be different, check with your SET FORm ABOVE ARE EXCLUSIVE authorized Apple dealer. AND IN LIEU OF AIL OmERS, ORAL OR WRfl1'EN, EXPRESS OR AIL IMPLIED WARRANTIES ON IMPLIED. No Apple dealer, agent, or THIS MANUAL, INCLUDING employee is authorized to make any IMPLIED WARRANTIES OF modification, extension, or addition to MERCHANTABIIlTY AND FITNESS this warranty. FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO NINElY Some states do not allow the exclusion (90) DAYS FROM THE DATE OF THE or limitation of implied warranties or ORIGINAL RETAIL PURCHASE OF liability for incidental or consequential TInS PRODUCT. damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state. 030-0761 A1UX Text Processing Tools Contents Preface Chapter 1 Introduction to AlUX Text Processing Chapter 2 troff/nun Tutorial Chapter 3 nroff/troff Reference Chapter 4 nun Reference Chapter 5 ms and me Reference Chapter 6 tbl. Reference Chapter 7 eqn Reference Chapter 8 pic Reference Chapter 9 grap Reference Chapter 10 Other Text Processing Tools Appendix A Additional Reading Appendix B Glossary - v- Preface Conventions Used in This Manual Throughout the A/UX manuals, words that must be typed exactly as shown or that would actually appear on the screen are in Courier type. Words that you must replace with actual values appear in italics (for example, user-name might have an actual value of joe). Key names appear in CAPS (for example, RETURN). Special terms are in bold type when they are introduced; many of these tenns are also defined in the glossary in the A/UX System Overview. Syntax notation All A/UX manuals use the following conventions to represent command syntax. A typical A/UX command has the form command [flag-option] [argument] ... where: command Command name (the name of an executable file). flag-option One or more flag options. Historically, flag options have the form -[opt . .. ] where opt is a letter representing an option. The form of flag options varies from program to program. Note that with respect to flag options, the notation [-a][ -b][ -c] means you can select one or more letters from the list enclosed in brackets. If you select more than one letter you use only one hyphen, for example, -abo argument Represents an argument to the command, in this context usually a filename or symbols representing one or more filenames. [] Surround an optional item. Follows an argument that may be repeated any number of times. Courier type anywhere in the syntax diagram indicates that characters must be typed literally as shown. italics for an argument name indicates that a value must be supplied for that argument. Other conventions used in this manual are: <CR> indicates that the RETURN key must be pressed. An abbreviation for CONTROL-X, where X may be any key. cmd(sect) A cross-reference to an NUX reference manual. cmd is the name of a command, program, or other facility, and sect is the section number where the entry resides. For example, cat(l). Chapter 1 Introduction to A/UX Text Processing Contents 1. NUX text formatting tools: A brief overview 1 1.1 Formatting text: troff and nroff. 2 1.2 Formatting text: The mm macro package • 3 1.3 Formatting tables: tbl. 4 1.4 Formatting equations: eqn .... 5 1.5 Formatting pictures: pic 6 1.6 Formatting graphs: grap 8 1.7 Other macro packages . 10 2. Page layout concepts 11 2.1 Principal units of measurement 13 2.2 Line length 13 2.3 Page length . • • • 14 2.4 Paragraph types • • • • • 14 2.5 Margins . • • • 15 2.6 Adjusting and filling 15 2.7 Indentation 16 2.8 Headers and footers 17 2.9 Centered text • 18 2.10 Footnotes • • • 19 2.11 Heading levels 19 3. Font description concepts 20 3.1 Type families: Changing fonts 20 3.2 Point size . • 22 3.3 Vertical spacing • . • . • 24 3.4 Character set • • • • • . 25 3.5 Accents 26 3.6 Overstriking • 27 4. Other formatting features 27 - i - 4.1 Displays 27 4.2 Lists • • • • 28 4.3 Table of contents 29 4.4 Multicolumn output • 29 4.5 Strings. • • • 30 4.6 Number registers 30 4.7 Defining and using macros. 31 4.8 Motions • • • • 32 4.9 Line drawing. • 32 5. Document printing 32 5.1 Output devices 33 5.2 The TranScript package 33 Figures Figure 1-1. Producing a printed document 1 Figure 1-2. A simple picture 6 Figure 1-3. A more complicated picture 7 Figure 1-4. An even more complicated picture 8 Figure 1-5. A graph • • • • • • 9 Figure 1-6. A more complicated graph • 10 Figure 1-7. Parts of a page 12 - ii - Chapter 1 Introduction to A/UX Text Processing 1. AlUX text formatting tools: A brief overview The A/UX operating system provides a large number of tools for editing, formatting, and printing text and graphics. You can use these tools to prepare almost any kind or size of document, from newsletters to books. This chapter is a general introduction to A/UX text processing. To understand the A/UX text processing tools, it is helpful to understand the process involved in producing a final printed document. The sequence typically looks something like that in Figure 1-1. Figure 1-1. Producing a printed document enter/edit format text text file It is a basic assumption of the A/UX text processing system that these tasks are separable from one another and ought to be handled by different programs. First, you use one of the standard A/UX editors to enter and edit your text. The editor doesn't format or print the file; it merely stores your text, exactly as you enter it. To arrange the text into pages and paragraphs, you use aformatting program (usually troff or nroff in conjunction with a macro package). These programs use instructions you have entered in the text file, which indicate how you want the final output to look. Once the text is edited and formatted, Introduction to NUX Text Processing 1-1 you may print the document by directing the formatted output to a printer. 1.1 Formatting text: troff and nroff The A!UX text processing system is based on a pair of programs called troff and nroff. troff formats its input for printing on any high-resolution typesetter or laser printer that is capable of printing multiple fonts and type sizes. nroff formats its input for printing on less-capable devices such as daisy wheel and dot matrix printers, or your terminal screen.