Watch: How to write documents with groff -me
Watch this video if you want to learn how to write documents with groff -me on Linux.
I ran DOS at home throughout the 1980s and into the 1990s. When I was an undergraduate student in the early 1990s, I tried Unix for the first time in our campus computer lab. I wanted the Unix experience at home, and that's how I discovered Linux. I dual booted my computer with DOS and Linux; I booted into Linux when I wanted to run Unix, and I booted back into DOS when I needed to run DOS applications.
In 1993, Linux didn't have a lot of applications. Specifically, Linux didn't have word processors in 1993. DOS had lots of word processors to choose from, but Linux didn't offer any "word processor" programs. When I needed to write a paper for class, I rebooted back into DOS so I could use my word processor.
To save myself from constantly rebooting my computer, I wanted to learn the Unix tools so I could write my papers in Linux. I learned the nroff and groff text formatting systems, which worked well to generate documents I could print on my dot matrix printer.
I recently shared this experience in a video. This starts with a simple document that demonstrates a few basic macros, then shows how to write an academic paper using the -me macro package:
If you'd like to write documents with groff -me on Linux, use this document as a starting point:
.tp
.he 'left'center'right'
.fo 'left''%'
.sp 6
.ce 5
.b "Title of my paper"
.sp 2
Jim Hall
.sp
Class
.sp
Instructor
.sp
Date
.bp
.ls 2
.sh 1 Introduction
.pp
One cool thing I like about the history of Unix is how
Unix developed into a document processing system.
The short history of that is the Unix team wanted to
purchase a new computer to keep working on Unix.
But management said
.q No.
.pp
Around that same time, the Patents team wanted to buy a
new computer to write patent applications, but the
vendor hadn't finished the software yet.
The Unix went to them and said:
.(q
Hey, if you buy us a new computer,
we'll update the existing
.b roff
typesetting system so you can write patent applications.
.)q
.pp
That's how Unix created the first
.b roff
program,
.i "new roff" .
Later, the updated
.b nroff
to become
.b troff ,
the
.i "typesetter roff" ,
and even later
.b ditroff ,
the
.i "device independent"
version of
.b troff .