Published on Linux DevCenter (http://www.linuxdevcenter.com/)
See this if you're having trouble printing code examples

## Linux Word Processing Road Map

03/28/2000

If you're coming into Linux with a Microsoft Windows or Apple Mac OS background, or from some other non-Unix computing environment, you probably have a notion of how you perform all the tasks that we generally group under the category of word processing. In this column, I'd like to show you the Linux way of doing things, which is a little different, but can still accommodate you and in fact expand your capabilities.

People often complain that there isn't a word processor for Linux. While that isn't so -- even commercial favorites such as WordPerfect are available, and have been for years -- the standard personal computing paradigm known as "word processing" has never really taken off in Linux, or with Unix-like operating systems in general. The reason is because a monolithic, specialized application such as a word processor is in opposition to the generalized, tools-based and plain-text philosophy of Linux.

### If you must use a word processor

But as it turns out, there are word processors available for Linux -- so before going further, I will list some to get you going, if a word processor is what you're really after.

Among those available are the open source

There are non-open source word processors as well, such as

Another alternative -- a halfway point between the word processor you might be expecting and the typesetting systems we're about to describe -- is the LyX "document processor" explained below.

For more information on this subject, I recommend Christopher B. Browne's analysis, Word Processors for Linux. Christopher lists many of the more esoteric applications available for Linux and explores the differences between PC word processors and the Linux approach.

### Tools for text processing

Word processing may be an obsolete idea of the 1980s -- no longer a necessity in the age of the Web and e-mail where plain, unformatted text is native, and proprietary word processing formats aren't.

When you keep a file in plain text, you can use command-line tools to format the pages and paragraphs (fmt and fold); add page numbers and headers (pr); check the spelling, style, and usage (ispell, spell, style, and dict); count the lines, words, and characters it contains (wc); convert to HTML and other formats (plain2); and even print the text in a font of your choosing (enscript). The text can be formatted, analyzed, cut, chopped, sliced, diced, and otherwise processed by the vast array of other Linux command-line tools that work on text -- there are over 750 of them in an average installation.

You might not even need to use a word processor, depending on exactly what it is you need to do with your text. With many operating systems, almost all writing is done in a word processor, no matter where the intended output will go (even if it's just your diary). With Linux, most writing is done in a text editor, such as emacs or vi.

It may seem primitive at first -- especially to those weaned in a computing environment that dictates all writing must be set in a typeface from the moment of creation -- but the word processing approach can be excessive compared to what Linux provides. You can, if you like, view or print plain text in a font, with a single command -- which is what most people want to do with a word processor. This will be the subject of a future column. On the next page, we look at tools for typesetting and offer a guide to choosing the right tool based on the task at hand.

### The typesetting approach

In Linux, when you want to print some text that needs to look nice on paper, you generally don't "word process" it -- you typeset it.

Typesetting is to produce quality output suitable for printing. You use software to specify how the text will look. Typesetting systems usually use a markup language instead of a WYSIWYG approach -- a conversion tool reads the text and creates a file you can print.

What's great about these tools is that their output is gorgeous, with advanced hyphenation, line, and paragraph breaking; kerning; and other font policies and algorithms that output much better than anything you can currently get from a word processor.

The most popular typesetting system is TeX and its derivatives, including the popular LaTeX. With these systems, you write a text file containing the text you want to typeset in a markup language with commands that look like:

\it{Hello}

Which sets the text Hello in italics.

The LyX "document processor" is an exciting new way of doing this -- it provides a visual, graphical means of writing input for LaTeX, without having to know the markup codes at all.

An alternative to the TeX family is SGML (Standard Generalized Markup Language). Here, you write a document in an SGML DTD (Document Type Definition, a file format), which is plain text with heavy markup. There are packages like SGMLtools for writing and processing documents written in an SGML DTD.

All of these systems allow for multiple output formats -- such as typeset output that you print, plus plain text and HTML for the Web. If you're making a book or other document that needs to be presented in typeset form, one of these systems is what you need to use.

### Choosing the right method for the job

The following list should help you determine which system is best for a particular task. There isn't one way of doing things, of course -- these come only as my own recommendations.

 Task Solution Recommendation E-mail message, diary, notes or journal entry, Usenet article, or other document that is going to be kept electronically and not normally printed out as its final form Your favorite text editor Printed output in a font -- such as from an outline, e-mail message, shopping list, or manuscript draft Write your document in a text editor and output it with enscript Printed, typeset output where keeping an unformatted text version is not beneficial -- business correspondence or letter, a printed report, or photo-ready copy of a book manuscript LyX or LaTeX Printed, typeset output and electronic HTML or text file output -- for example, an Internet FAQ or white paper SGMLtools, or LyX or LaTeX Printed, typeset output with a layout you specify, like a brochure or newsletter with multiple columns and images LyX An envelope, mailing label, other specialized document to print TeX Typeset poster or sign to print Enscript, LyX or TeX Large banner to hang on a wall Linux jbanner command A line of text in an ASCII art "font" consisting of text characters, for use in an e-mail message or Usenet article figlet

Over the coming weeks, we'll take a closer look at some of these tools and show how to use them.

Michael Stutz was one of the first reporters to cover Linux and the free software movement in the mainstream press.