Code Monkey home page Code Monkey logo

unix-text-processing's Introduction

Unix Text Processing

UTP is one of the best books on Unix from a user's perspective.
– Jack Redman

Original book coverOriginally published in 1987, Unix Text Processing (UTP) (written by Dale Dougherty and Tim O'Reilly) provides one of the few comprehensive looks at all the tools involved in a typical troff-based writing workflow. It covers:

  • UNIX and troff basics
  • text editors (vi, ex, and sed)
  • the ms and mm macro packages
  • scripting with sh, awk, and sed
  • the tbl, eqn and pic preprocessors
  • macro writing

The appendices provide a collection of reference material and other useful pointers.

UTP was originally published by Hayden Books (which was acquired by Howard W. Sams before the book was actually published). In the early 21^st^ century, the authors made the book available at the Open Books Project under the Creative Commons Attribution License. Scanned pages are available in PBM (Portable BitMap) and PDF formats. The original troff markup is lost.

In 2002, some members of the GNU Troff (groff) mailing list began transcribing the book and recreating the source code. It took a little over a year of manic activity, punctuated by long naps, and we released "UTP Revival" in 2004. We still hope to modernize the book ("UTP Revisited"). Whether you want to use GNU Troff, or Plan 9 or one of its derivatives (Heirloom Troff and Neatroff), UTP is still an excellent guide to the nuts and bolts of print publishing.

The current (main) branch is UTP 1.1, which provides a clickable index, TOC, and cross-references within the PDF (thanks to Deri James). You will need groff 1.22 or newer to format it, as it uses the -Tpdf driver. If you have an older groff, switch to the 1.0 branch.

The UTP Revival Release is distributed according to the terms of the Creative Commons Attribution License. A copy of the license is available at http://creativecommons.org/licenses/by/1.0.

Note: The transcription project predated Plan 9 and its derivatives. Thus, the recreated source and macros were written for groff, and we made no attempt to be compatible with the original troff. Patches for Heirloom or Neatroff (if needed) are welcome!


Acknowledgements

  • First, a big thanks to the original authors for making the book available in the first place. Nothing else could have happened without that first step.
  • Jon Snader provided the scripts to build the table of contents.
  • Michael Hobgood and Andreas Kähäri handled proofreading chores.
  • Deri James added PDF links for the contents and index.

Individuals who worked on various chapters:

Chapter Title Transcriber Markup Indexing
Front matter Ralph Corderoy Ralph Corderoy n/a
Preface Stewart Russell Larry Kollar n/a
From Typewriters to Word Processors Stewart Russell Michael Hobgood Michael Hobgood
UNIX Fundamentals Stewart Russell Michael Hobgood Heinz-Jürgen Oertel
Learning vi Heinz-Jürgen Oertel Heinz-Jürgen Oertel Jack Redman
nroff and troff Colin Watson Michael Hobgood Heinz-Jürgen Oertel
The ms macros Larry Kollar Larry Kollar Larry Kollar
The mm macros Larry Kollar Larry Kollar Larry Kollar
Advanced Editing Heinz-Jürgen Oertel Heinz-Jürgen Oertel Jack Redman
Formatting with tbl Michael Hobgood Michael Hobgood Michael Hobgood
Typesetting Equations with eqn Michael Hobgood Michael Hobgood Jack Redman
Drawing Pictures Michael Hobgood Michael Hobgood Jack Redman
A Miscellany of UNIX Commands Manas Laha Manas Laha Manas Laha
Let the Computer do the Dirty Work Larry Kollar Larry Kollar Larry Kollar
The awk Programming Language Larry Kollar Larry Kollar Jack Redman
Writing nroff and troff Macros Michael Hobgood Michael Hobgood
Figures and Special Effects Michael Hobgood Michael Hobgood Larry Kollar
What's in a Macro Package? Michael Hobgood Michael Hobgood
An Extended ms Macro Package Michael Hobgood Michael Hobgood
Putting it All Together Michael Hobgood Michael Hobgood Michael Hobgood
Editor Command Summary Heinz-Jürgen Oertel Heinz-Jürgen Oertel Heinz-Jürgen Oertel
Formatter Command Summary Manas Laha Manas Laha Manas Laha
Shell Command Summary Ralph Corderoy Ralph Corderoy
Format of troff Width Tables Ralph Corderoy Ralph Corderoy
Comparing mm and ms Ralph Corderoy Ralph Corderoy
The format Macros Ralph Corderoy Ralph Corderoy
Selected Readings Ralph Corderoy Ralph Corderoy

unix-text-processing's People

Contributors

alhadis avatar derijames avatar larrykollar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unix-text-processing's Issues

chapter headers font

Hi! this is a pretty cool project. I am learning a bit of *roff so its really handy to see a full blown project's source.
Anyway, i was comparing the book with the output the source generates on my end, and noticed some slight discrepancies with the way page numbers and headers are typeset. Namely the font is Times Roman instead of Helvetica. Maybe this is a problem on my end? Anyway, my diff to make it look more like the original is:

diff --git a/src/utp.mac b/src/utp.mac
index b0b5bb2..bf64eff 100644
--- a/src/utp.mac
+++ b/src/utp.mac
@@ -643,8 +643,8 @@ Version of 16 November 2002
 .ev header_footer
 .nr PN \\n[%]
 .if !\\n[chapter_page2] \{.   \" if this page doesn't start a chapter
-.	ie o .tl ''\\*[chapter_name]'\\n[PN]'
-.	el .tl '\\n[PN]'\*[square]  Unix Text Processing  \*[square]''
+.	ie o .tl ''\\fH \\*[chapter_name]' \\n[PN]'
+.	el .tl '\\fH\\n[PN]'\*[square]  UNIX Text Processing  \*[square]''
 .\}
 .ev
 ..

Which I hope just changes the font to Helvetica and also capitalizes unix. And hopefully doesnt break everything.
cheers

Change path to groff and awk in Makefile to use env

I'd suggest changing

GROFF = /usr/bin/groff
AWK = /usr/bin/awk

to

GROFF = /usr/bin/env groff
AWK = /usr/bin/env awk

I ran into an issue on OS X where when I installed an updated groff via homebrew, because the script was hardcoded to a particular path, it didn't pick up the change.

.PE instead of .PF in chapter 10: Drawing pictures

Hello,

I noticed what I believe is a typo in chapter 10 > The pic Prepocessor > Controlling the Dimensions of a Drawing. The example used to illustrate the use of .PF does not use .PF and instead uses .PE.

This typo is also present in the original book.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.