.(c .b "Five Signs That You Write In groff" .)c .sp 2 .lp I first discovered Unix systems in the early 1990s, when I was an undergraduate at university. I liked it so much that I replaced the MS-DOS system on my home computer with the Linux operating system. .pp One thing that Linux didn't have in the early to mid 1990s was a word processor. A standard office application on other desktop operating systems, a word processor lets you edit text easily. I often used a word processor on DOS to write my papers for class. I wouldn't find a Linux-native word processor until the late 1990s. Until then, word processing was one of the rare reasons I maintained dual-boot on my first computer, so I could occasionally boot back into DOS to write papers. .pp Then I discovered that Linux provided a kind of word processor. GNU .b groff is a modern implementation of a classic .i "text processing" system called .b troff , for .i "typesetter roff" , which itself is an improved version of the .b nroff system. And .b nroff was meant to be a .i new implementation of the original .b roff (which stood for .i "run off" , as in to .q "run off" a document). .pp With .i "text processing" , you edit text in a plain text editor, and you add formatting through .q macros or other processing commands. You later process that text file through the text processing system such as .b groff to generate .i "formatted output" suitable for a printer. Another well-known text processing system is LaTeX, but .b groff was simple enough for my needs. .pp With a little practice, I found I could write my class papers just as easily in .b groff on Linux as I could using a word processor on Linux. While I don't use .b groff to write documents today, I still remember the macros and commands to generate printed documents with .b groff . And if you're the same as me, and you learned how to write with .b groff all those years ago, you probably fit these five signs that you write in .b groff . .sh 1 "You have a favorite macro set" .lp You format a document in .b groff by writing plain text interspersed with .i macros . Each macro in .b groff is a short command that starts with a single period at the beginning of a line. For example: if you want to insert a few lines into your output, the .q ".sp 2" macro command will add two blank lines. .b groff supports other basic macros for all kinds of formatting. .pp To make formatting a document easier for the writer, .b groff also provides different .i "macro sets" , collections of new macros that let you format documents your own way. The first macro set I learned was the .q -me macro set. Really, the macro set is called the .q e macro set, and you specify the .q e macro set when you process a file using the .q -me option. So many writers who use .b groff refer to the macro set with the .q -m option prepended to the name. .pp But .b groff includes other macro sets, too. For example, the .q -man macro set used to be the standard macro set to format the built-in .b man ual pages on Unix systems, and the .q -ms macro set is often used to format certain other technical documents. If you have ever learned to write with .b groff , you probably have a favorite macro set. .sh 1 "You want to focus on your content, not the formatting" .lp One great feature of writing with .b groff is that you can focus just on your .i content and not worry too much about what it looks like. And that is a handy feature for technical writers. .b groff is a great .q distraction-free environment for professional writers. At least, as long as you don't mind delivering your final output in any of the formats that .b groff supports with the .q -T command line option, including PDF, Postscript, HTML, and plain text. You can't currently generate a LibreOffice ODT file or Word DOC file directly from .b groff . .pp Once you get comfortable writing in nroff, the macros start to .i "disappear" . The formatting macros become part of the background, and you focus purely on the text in front of you. I've done enough writing in .b groff that I don't even see the macros anymore. Maybe it's like writing programming code, and your mind just switches gears so you think like a computer and see the code as a set of instructions. For me, writing in .b groff is like that; I just see my text, and my mind interprets the macros automatically into formatting. .sh 1 "You like the old-school feel" .lp Sure, it might be .i easier to write your documents with a more typical word processor like LibreOffice Writer, or even Google Docs or Microsoft Word. And for certain kinds of documents, a desktop word processor is the right fit. But if you want the .q old-school feel, it's hard to beat writing in .b groff . .pp I'll admit that I do most of my writing with LibreOffice Writer, which does an outstanding job. But when I get that itch to do it .q old-school, I'll open an editor and write my document using .b groff . .sh 1 "You can use it anywhere" .lp .b groff or its cousins are a standard package on almost any Unix system. And with .b groff , the macros don't change. For example, the .q -me macros should be the same from system to system. So once you've learned to use the macros on one system, you can use them on the next system. .pp And because .b groff documents are just plain text, you can use any editor you like to edit your documents for .b groff . I like to use GNU Emacs to edit my .b groff documents, but you can use GNOME Gedit, Vim, or your favorite text editor. Most editors include some kind of .q mode that will highlight the .b groff macros in a different color from the rest of your text, to help you spot errors before you process the file. .sh 1 "You wrote this article in -me" .lp When I decided to write this article, I thought the best way to write it would be to use .b groff directly. I wanted to demonstrate how flexible .b groff was in preparing documents. So even though you're reading this on a website, the article itself was originally written using .b groff . .pp I hope this article has interested you in learning how to use .b groff to write documents. If you'd like to use more advanced functions in .q -me macro set, refer to Eric Allman's .i "Writing Papers with Groff using -me" , which you should find on your system as .q meintro.me in .b groff 's documentation. It's a great reference document that explains other ways to format papers using the .q "-me" macros. .pp I've also included a copy of the original draft of my article, using the .q -me macros. Save the file as .b five-signs-groff.me to your system, and run it through .b groff to view it. The .q -T option sets the output type, such as .b -Tps to generate Postscript output, or .b -Thtml to create an HTML file. For example: .(q groff -me -Thtml five-signs-groff.me > five-signs-groff.html .)q