UNIX® Text Processing

Dale Dougherty, Tim O'Reilly

Publisher: SAMS, 1987, 665 pages

ISBN: 0-672-46291-5

Keywords: Programming

Last modified: April 6, 2021, 8:40 a.m.

Today, writers not only work with words, they work with computers and the software programs, printers, and terminals that are part of a computer system.

UNIX Text Processing reveals how computers can be used effectively in the preparation of written documents, particularly major book-length projects. The useful tools and techniques featured in UNIX Text Processing can help you unlock the resources and power of a computer system to tackle such writing projects as technical manuals, reports, and proposals.

In these pages, you'll learn:

  • What's in the UNIX toolbox for writers, including format design, printing, and editing.
  • How to make the computer do most of the work, using shell scripts and editing scripts.
  • How to make use of the awk programming language for managing information.
  • How to create simple line drawings, tables, and equations.
  • How troff helps you take advantage of the capabilities of laser printers and typesetters.
  • How to customize macros for document formatting.
  1. From Typewriters to Word Processors
    • A Workspace
    • Tools for Editing
    • Document Formatting
    • Printing
    • Other UNIX Text-Processing Tools
  2. UNIX Fundamentals
    • The UNIX Shell
    • Output Redirection
    • Special Characters
    • Environment Variables
    • Pipes and Filters
    • Shell Scripts
  3. Learning vi
    • Session 1: Basic Commands
    • Opening a File
    • Moving the Cursor
    • Simple Edits
    • Session 2: Moving Around in a Hurry
    • Movement by Screens
    • Movement by Text Blocks
    • Movement by Searches
    • Movement by Line Numbers
    • Session 3: Beyond the Basics
    • Command-Line Options
    • Customizing vi
    • Edits and Movement
    • More Ways to Insert Text
    • Using Buffers
    • Marking Your Place
    • Other Advanced Edits
  4. nroff and troff
    • What the Formatter Does
    • Using nroff
    • Using troff
    • The Markup Language
    • Turning Filling On and Off
    • Controlling Justification
    • Hyphenation
    • Page Layout
    • Page Transitions
    • Changing Fonts
    • A First Look at Macros
  5. The ms Macros
    • Formatting a Text File with ms
    • Page Layout
    • Paragraphs
    • Changing Font and Point Size
    • Displays
    • Headings
    • Cover Sheet Macros
    • Miscellaneous Features
    • Page Headers and Footers
    • Problems on the First Page
    • Extensions to ms
  6. The mm Macros
    • Formatting a Text File
    • Page Layout
    • Justification
    • Word Hyphenation
    • Displays
    • Changing Font and Point Size
    • More about Displays
    • Forcing a Page Break
    • Formatting Lists
    • Headings
    • Table of Contents
    • Footnotes and References
    • Extensions to mm
  7. Advanced Editing
    • The ex Editor
    • Using ex Commands in vi
    • Write Locally, Edit Globally
    • Pattern Matching
    • Writing and Quitting Files
    • Reading In a File
    • Executing UNIX Commands
    • Editing Multiple Files
    • Word Abbreviation
    • Saving Commands with map
  8. Formatting with tbl
    • Using tbl
    • Specifying Tables
    • A Simple Table Example
    • Laying Out a Table
    • Describing Column Formats
    • Changing the Format within a Table
    • Putting Text Blocks in a Column
    • Breaking Up Long Tables
    • Putting Titles on Tables
    • A tbl Checklist
    • Some Complex Tables
  9. Typesetting Equations with eqn
    • A Simple eqn Example
    • Using eqn
    • Specifying Equations
    • Spaces in Equations
    • Using Braces for Grouping
    • Special Character Names
    • Special Symbols
    • Other Positional Notation
    • Diacritical Marks
    • Defining Terms
    • Quoted Text
    • Fine-Tuning the Document
    • Keywords and Precedence
    • Problem Checklist
  10. Drawing Pictures
    • The pic Preprocessor
    • From Describing to Programming Drawings
    • pic Enhancements
  11. A Miscellany of UNIX Commands
    • Managing Your Files
    • Viewing the Contents of a File
    • Searching for Information in a File
    • Proofing Documents
    • Comparing Versions of the Same Document
    • Manipulating Data
    • Cleaning Up and Backing Up
    • Compressing Files
    • Communications
    • Scripts of UNIX Sessions
  12. Let the Computer Do the Dirty Work
    • Shell Programming
    • ex Scripts
    • Stream Editing (sed)
    • A Proofreading Tool You Can Build
  13. The awk Programming Language
    • Invoking awk
    • Records and Fields
    • Testing Fields
    • Passing Parameters from a Shell Script
    • Changing the Field Separator
    • System Variables
    • Looping
    • awk Applications
    • Testing Programs
  14. Writing nroff and troff Macros
    • Comments
    • Defining Macros
    • Macro Names
    • Macro Arguments
    • Nested Macro Definitions
    • Conditional Execution
    • Interrupted Lines
    • Number Registers
    • Defining Strings
    • Diversions
    • Environment Switching
    • Redefining Control and Escape Characters
    • Debugging Your Macros
    • Error Handling
    • Macro Style
  15. Figures and Special Effects
    • Formatter Escape Sequences
    • Local Vertical Motions
    • Local Horizontal Motions
    • Absolute Motions
    • Line Drawing
    • Talking Directly to the Printer
    • Marking a Vertical Position
    • Overstriking Words or Characters
    • Tabs, Leaders, and Fields
    • Constant Spacing
    • Pseudo-Fonts
    • Character Output Translations
    • Output Line Numbering
    • Change Bars
    • Form Letters
    • Reading in Other Files or Program Output
  16. What's in a Macro Package?
    • Just What Is a Macro Package, Revisited
    • Building a Consistent Framework
    • Page Transitions
    • Page Transitions in ms
    • Some Extensions to the Basic Package
    • Other Exercises in Page Transition
  17. An Extended ms Macro Package
    • Creating a Custom Macro Package
    • Structured Technical Documents
    • Figure and Table Headings
    • Lists, Lists, and More Lists
    • Source Code and Other Examples
    • Notes, Cautions, and Warnings
    • Table of Contents, Index, and Other End Lists
  18. Putting It All Together
    • Saving an External Table of Contents
    • Index Processing
    • Let make Remember the Details
    • Where to Go from Here
  1. Editor Command Summary
    • Pattern-Matching Syntax
    • The vi Editor
    • The ex Editor
    • The sed Editor
    • awk
  2. Formatter Command Summary
    • nroff/troff Command-Line Syntax
    • nroff/troff Requests
    • Escape sequences
    • Predefined Number Registers
    • Special Characters
    • The ms macros
    • The mm Macros
    • tbl Command Characters and Words
    • eqn Command Characters
    • The pic Preprocessor
  3. Shell Command Summary
  4. Format of troff Width Tables
    • The DESC File
    • Font Description Files
    • Compiling Font Files
    • Font Usage Limitations
  5. Comparing mm and ms
    • Paragraphs
    • Justification
    • Displays
    • Formatting Lists
    • Change Font
    • Change Point Size
    • Headers and Footers
    • Section Headings
    • Footnotes
  6. The format Macros
    • Summary of the Macros
  7. Selected Readings
    • Introductory UNIX Texts
    • Advanced Topics

Reviews

UNIX® Text Processing

Reviewed by Roland Buresund

Excellent ********** (10 out of 10)

Last modified: May 21, 2007, 2:51 a.m.

This book is the most referenced book I have ever owned.

You're only an old-timer if you've written hundreds of presentations with troff, pic, etc.

Excellent book and a lifesaver a number of times.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required