197 lines
11 KiB
HTML
197 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>1.4.2 Text processing and word processing</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="1.4.2 Text processing and word processing">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html1834 HREF="node15.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html1832 HREF="node12.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html1826 HREF="node13.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html1836 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html1837 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html1835 HREF="node15.html">1.4.3 Programming languages and </A>
|
|
<B>Up:</B> <A NAME=tex2html1833 HREF="node12.html">1.4 Software Features</A>
|
|
<B> Previous:</B> <A NAME=tex2html1827 HREF="node13.html">1.4.1 Basic commands and </A>
|
|
<BR> <HR> <P>
|
|
<H2><A NAME=SECTION00342000000000000000>1.4.2 Text processing and word processing</A></H2>
|
|
<P>
|
|
Almost every computer user has a need for some kind of document preparation
|
|
system. (How many computer enthusiasts do you know who still use pen and
|
|
paper? Not many, we'll wager.)
|
|
In the PC world, <em>word processing</em> is the norm: it involves
|
|
editing and manipulating text (often in a
|
|
``What-You-See-Is-What-You-Get'' environment) and
|
|
producing printed copies of the text, complete with figures, tables, and
|
|
other garnishes.
|
|
<A NAME=263> </A>
|
|
<P>
|
|
In the UNIX world, <em>text processing</em> is much more common, which is
|
|
quite different than the classical concept of word processing.
|
|
With a text processing system, text is entered by the
|
|
author using a ``typesetting language'', which describes how the
|
|
text should be formatted. Instead of entering the text within a special
|
|
word processing environment, the source may be modified with any text
|
|
editor such as <tt>vi</tt> or Emacs. Once the source text (in the typesetting
|
|
language) is complete, the user formats the text with a separate program,
|
|
which converts the source to a format suitable for printing.
|
|
This is somewhat analogous to programming in a language such as C, and
|
|
``compiling'' the document into a printable form.
|
|
<P>
|
|
<A NAME=300> </A>
|
|
<A NAME=305> </A>
|
|
<A NAME=306> </A>
|
|
There are many text processing systems available for Linux. One is
|
|
<tt>groff</tt>, the GNU version of the classic <tt>nroff</tt> text formatter
|
|
originally developed by Bell Labs and still used on many UNIX systems
|
|
worldwide. Another modern text processing system is <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img13.gif">, developed by
|
|
Donald Knuth of computer science fame.
|
|
Dialects of <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img14.gif">, such as <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img15.gif">, are also available.
|
|
<P>
|
|
Text processors such as <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img16.gif"> and <tt>groff</tt> differ mostly in the syntax
|
|
of their formatting languages.
|
|
The choice of one formatting system over
|
|
another is also based upon what utilities are available to satisfy your needs,
|
|
as well as personal taste.
|
|
<P>
|
|
For example, some people consider the <tt>groff</tt> formatting language to
|
|
be a bit obscure, so they use <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img17.gif">, which is more readable by humans.
|
|
However, <tt>groff</tt> is capable of producing plain ASCII output, viewable
|
|
on a terminal, while <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img18.gif"> is intended primarily for output to a printing
|
|
device. However, various programs exist to produce plain ASCII from
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img19.gif">-formatted documents, or to convert <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img20.gif"> to <tt>groff</tt>, for example.
|
|
<P>
|
|
Another text processing system is <tt>texinfo</tt>, an extension to
|
|
<A NAME=303> </A>
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img21.gif"> used for software documentation by the Free Software Foundation.
|
|
<tt>texinfo</tt> is capable of producing a printed document, or
|
|
an online-browsable hypertext ``Info'' document from a single source
|
|
file. Info files are the main format of documentation used by GNU software
|
|
such as Emacs.
|
|
<A NAME=278> </A>
|
|
<A NAME=304> </A>
|
|
<P>
|
|
Text processors are used widely in the computing community
|
|
for producing papers, theses, magazine articles, and books (in fact, this
|
|
book was produced using <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img22.gif">). The ability to process the source
|
|
language as a plain text file opens the door to many extensions to the
|
|
text processor itself. Because source documents are not stored in an
|
|
obscure format, readable only by a particular word processor, programmers
|
|
are able to write parsers and translators for the formatting language,
|
|
extending the system.
|
|
<P>
|
|
What does such a formatting language look like? In general, the
|
|
formatting language source consists mostly of the text itself, along with
|
|
``control codes'' to produce a particular effect, such as changing fonts,
|
|
setting margins, creating lists, and so on.
|
|
<P>
|
|
As an example, take the following text:
|
|
<blockquote> Mr. Torvalds:
|
|
<P>
|
|
We are very upset with your current plans to implement <em>post-hypnotic
|
|
suggestion</em> in the <b>Linux</b> terminal driver code. We feel this
|
|
way for three reasons:
|
|
<OL><LI> Planting subliminal messages in the terminal driver is not only
|
|
immoral, it is a waste of time;
|
|
<LI> It has been proven that ``post-hypnotic suggestions'' are ineffective
|
|
when used upon unsuspecting UNIX hackers;
|
|
<LI> We have already implemented high-voltage electric shocks, as a
|
|
security measure, in the code for <tt>login</tt>.
|
|
</OL>
|
|
We hope you will reconsider.
|
|
</blockquote>
|
|
<P>
|
|
This text would appear in the <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img23.gif"> formatting language as the following:
|
|
<P><TT> <PRE>\begin{quote}
|
|
Mr. Torvalds:
|
|
|
|
We are very upset with your current plans to implement {\em post-hypnotic
|
|
suggestion\/} in the {\bf Linux} terminal driver code. We feel this
|
|
way for three reasons:
|
|
\begin{enumerate}
|
|
\item Planting subliminal messages in the kernel driver is not only
|
|
immoral, it is a waste of time;
|
|
\item It has been proven that ``post-hypnotic suggestions'' are ineffective
|
|
when used upon unsuspecting UNIX hackers;
|
|
\item We have already implemented high-voltage electric shocks, as a
|
|
security measure, in the code for {\tt login}.
|
|
\end{enumerate}
|
|
We hope you will reconsider.
|
|
\end{quote}
|
|
</PRE> <P></TT>
|
|
<P>
|
|
The author enters the above ``source'' text using any text editor, and
|
|
generates the formatted output by processing the source with <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img24.gif">.
|
|
At first glance, the typesetting language may appear to be obscure, but
|
|
it's actually quite easy to learn. Using a text processing system
|
|
enforces typographical standards when writing. For example, all
|
|
enumerated lists within a document will look the same, unless the author
|
|
modifies the definition of the enumerated list ``environment''. The
|
|
primary goal is to allow the author to concentrate on writing the
|
|
actual text, instead of worrying about typesetting conventions.
|
|
<P>
|
|
WYSIWYG word processors are attractive for many reasons; they provide a
|
|
<A NAME=289> </A>
|
|
powerful (and sometimes complex) visual interface for editing the
|
|
document. However, this interface is inherently limited to those aspects
|
|
of text layout which are accessible to the user. For example, many word
|
|
processors provide a special ``format language'' for producing complicated
|
|
expressions such as mathematical formulae. This is identical
|
|
text processing, albeit on a much smaller scale.
|
|
<P>
|
|
The subtle benefit of text processing is that the system allows you to specify
|
|
exactly what you mean. Also, text processing systems allow you to edit the
|
|
source text with any text editor, and the source is easily converted to
|
|
other formats.
|
|
The tradeoff for this flexibility and power is the lack of a
|
|
WYSIWYG interface.
|
|
<P>
|
|
Many users of word processors are used to seeing the formatted text as
|
|
they edit it. On the other hand, when writing with a text processor,
|
|
one generally does not worry about how the text will appear when formatted.
|
|
The writer learns to expect how the text should look from the formatting
|
|
commands used in the source.
|
|
<P>
|
|
There are programs which allow you to view the formatted document on
|
|
a graphics display before printing. For example, the <tt>xdvi</tt> program
|
|
displays a ``device independent'' file generated by the <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img25.gif"> system under
|
|
the X Windows environment. Other software applications, such as <tt>xfig</tt>,
|
|
provide a WYSIWYG graphics interface for drawing figures and diagrams, which
|
|
are subsequently converted to the text processing language for inclusion in
|
|
your document.
|
|
<P>
|
|
Admittedly, text processors such as <tt>nroff</tt> were around long before
|
|
word processing was available. However, many people still prefer to use
|
|
text processing, because it is more versatile and independent of
|
|
a graphics environment. In either case, the <tt>idoc</tt> word processor
|
|
is also available for Linux, and before long we expect to see commercial
|
|
word processors becoming available as well. If you absolutely don't want to
|
|
give up word processing for text processing, you can always run MS-DOS,
|
|
or some other operating system, in addition to Linux.
|
|
<P>
|
|
|
|
<P>
|
|
There are many other text-processing-related utilities available. The
|
|
powerful METAFONT system, used for designing fonts for <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img26.gif">, is included
|
|
<A NAME=294> </A>
|
|
with the Linux port of <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img27.gif">. Other programs include <tt>ispell</tt>, an
|
|
interactive spell checker and corrector; <tt>makeindex</tt>, used for
|
|
generating indicies in <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img28.gif"> documents; as well as many <tt>groff</tt>
|
|
and <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img29.gif">-based macro packages for formatting many types of documents
|
|
and mathematical texts. Conversion programs to translate between
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img30.gif"> or <tt>groff</tt> source to a myriad of other formats are available.
|
|
<P>
|
|
<A NAME=299> </A>
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html1834 HREF="node15.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html1832 HREF="node12.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html1826 HREF="node13.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html1836 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html1837 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html1835 HREF="node15.html">1.4.3 Programming languages and </A>
|
|
<B>Up:</B> <A NAME=tex2html1833 HREF="node12.html">1.4 Software Features</A>
|
|
<B> Previous:</B> <A NAME=tex2html1827 HREF="node13.html">1.4.1 Basic commands and </A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|