Linux Know-How provides a collection of introductory texts on often needed Linux skills.


Word processing

OpenOffice is a complete office suite: word processor, spreadsheet, presentation program, drawing program, graphing module, and editor for mathematical equations. It sports the best, and the most feature-packed word processor and spreadsheet for Linux. Highly recommended. OpenOffice is included on the more recent Linux distribution CDs (Nov.2002). The latest version can be downloaded (free) from http://www.openoffice.org/ (large, ~70 MB download, probably not practical with a modem). The current (non-developer) version of OpenOffice is 1.0.1 (Oct. 2002). OpenOffice is cross-platform: it runs on Linux, MS Windows, Solaris, and Mac OS X, with full file-level compatibility.


Brief history. StarOffice used to be a commercial program ("Star Division", Germany). It was purchased by Sun Microsystems and the source code donated to the open source community under General Public Licence (Aug.2000). It is being rapidly developed by programmers many of whom are still associated with / paid by Sun. The open-source version is called "OpenOffice.org". Sun occasionally releases its own product based on a recent stable built of OpenOffice and calls it "StarOffice". Thus "OpenOffice.org" and "StarOffice" are basically the same products, with some (minor) feature additions in StarOffice. OpenOffice is officially called OpenOffice.org because of some trademark issues.

Description. OpenOffice looks and acts very much like MS Office for Windows. This includes richness of features, large size (requires considerable amount of disk space, memory, and processor speed), and well-buried features (may require some careful mouse-clicking to access some items). OpenOffice may not be worth your trouble without at least 64 MB of physical memory; the more memory the better. Open Office is very stable, although it sometimes displays weird artifacts ("ghosts") on my screen. It has a good file-level compatibility with MS Office: read and write MS Word, MS Excel and MS PowerPoint file formats. Natively, it uses a ground-breaking xml open file format: the text and pictures are zipped together into one file. When I unzip the file (unzip my_file.sxv), I can extract the original pictures--something MS Office cannot possibly do (with sometimes serious consequences for document management).

OpenOffice does not look as "sexy" as some other Linux office alternatives. Yet, it is a real productivity workhorse and its polish is rapidly improving. In brief, we highly recommend StarOffice/OpenOffice to cover even demanding office needs. Feature-for-feature, it matches almost anything found in MS Word (although has more trouble matching MS Excel) and adds some extras (long missing in MS Office).

Best of all, OpenOffice sports an open and beautifully designed file format which is rapidly becoming a standard (only unimaginative or corrupt decisions makers would insist on storing their data in a file format that can be read exclusively by a product of one company). This file format is suitable for serious uses because it can be parsed with third-party tools.

Installation. The installation of OpenOffice/StarOffice can be confusing. It goes like this:

  • Make sure you have enough hard drive space. To check the space use the df (="disk free") command:

df -h

This displays a report on the used and available hard drive space in a human-legible form (option -h). At minimum, you need some 350 MB of free disk space (of which, ~100 MB you can release after installation).

  • Decompress the downloaded file. I did it as root in the /usr/local directory for "local server" installation, but you may also choose /home/your_login for "personal" installation:

cd /usr/local

tar -xvf StarOffice5.2.tgz

Substitute the filename "StarOffice5.2.tgz" with the name of the file you downloaded.

  • As root, run the setup program for a "local server" with the DOS-style /net switch:

cd /usr/local/OpenOffice641

./setup /net

[Without the "/net" or "-net" switch, OpenOffice will perform a personal installation (into your home directory!), and then only one user will be able to run it, plus your home directory will be clogged.]

  • After this "network" installation, each user has to perform her own installation to put some personal files into their "home" directories. This is done by running (as a user, without the /net switch):

cd /usr/local/OpenOffice641

./setup

To run any of the OpenOffice component from the command line (in X terminal), I could use:

ooffice& (word processor)

oowriter& (same as above)

oocalc& (spreadsheet)

oodraw& (vector drawing program)

ooimpress& (presentation program similar to MS PowerPoint)

oosetup& (installation program)

oopadmin& (printer administration utility)

oomath& (equation editor, it is not typical to run it stand-alone)

Hints. ooofice comes with a extensive, contex-sensitve help (press <F1>). Here, we are going to collect some quick reference on using oowriter (just started Nov.2002).

  • Consider using "styles" for formatting documents. Unless you are writing a very simple document, avoid "physical formatting". Press <F11> for a full style list. Inspect the drop box on the tool-bar (left-hand side) for a list of paragraph styles used in the current document.

  • The styles are divided into the following groups:

  • Character styles (applies to a letter or a group of letters)

  • Paragraph styles (a paragraph extends from <Enter> to <Enter>)

  • Frame styles (a frame a box containing text, graph, picture, etc.)

  • Page styles

  • Numbering styles (for bullet and numbered lists)

The most important are the paragraph styles. I use them to format chapter headings, captions, table headings, etc. To apply a style to a paragraph, I place the cursor in the paragraph to be modified, and then double-click on the name of the style in the "Stylelist". To modify a style (or create a new one), I use the menu "Format"-"Style-"Catalog".

  • For numbered chapter headings, I set the numbering system under the menu "Tools"-"Outline Numbering".

  • To insert a caption (for a table, figure, etc.), I position the cursor over the table (figure, etc) and use the menu "Insert"-"Caption". I can modify the caption numbering level with the button "Options" in the dialog box. It can also be modified later in the dialog box which appears when I click on the caption number.

  • To update all the fields (numbers for heading, captions, table of contents, etc.), I press <Ctrl>a and then <F9>. This select the entire document and then updates the fields. Alternatively, I can use the menu "Tools"-"Update"-"Update All".

  • To display an outline of the document, I press <F5>.

  • To modify a default document template, make a "default" document and save it as "Default" ("File"-"Templates"-"Save").

  • To spell-as-you-type, enable it under menu "Tools"-SpellCheck"-"AutoSpellCheck". To spellcheck of a word, position a cursor over it and press <F7>.

  • For "type-ahead" autocompletion, I may press <Enter> to accept the selection when it appears.

  • Cells in tables can be split. (If you are coming from MS Word, you can now start using split cells again.)

  • Pressing <F2> produces a "formula bar". In tables, you can calculate results based on the numbers in other cells. The status bar shows the cell references. Outside of tables, one can use the formula bar to make simple "on-the-spot" calculations.

  • You can insert a pre-formated and numbered "dummy equation" into the document by typing fn at a beginning of a paragraph and pressing <F3>. (This uses the "auto text" feature of the word processor.)

  • Mail marging is described in http://documentation.openoffice.org/HOW_TO/word_processing/writer2_EN.html

Some useful keyboard shortcuts (most of them apply across the entire OpenOffice, not only the wordprocessor):

<Ctrl>x Cut

<F1> Help

<Ctrl><Space> Non-breaking space

<Ctrl>c Copy

<F2> Formula bar

<Ctrl><Shift> Non-breaking hyphen

<Ctrl>v Paste

<F3> Autotext completion

<Ctrl><Enter> Manual (hard) page-break

<Ctrl>a Select All

<F4> Data source view on/off

<Shift><Enter> Line-break without paragraph change

<Ctrl>f Find (and replace)

<Shift><F4> Toggle asolute-relative references in a spreadsheet formula.

<Ctrl><Shift><Enter> Manual column break (in multi-columnar document)

<Ctrl>z Undo

<F5> Navigator on/off

<Insert> Insert/overwrite mode on/off

<Ctrl><Shift>p Superscript

<F7> Spellcheck

<Home> Go to beginning of the line

<Ctrl><Shift>b Subscript

<F9> Update fields (or recalculate spreadsheet)

<End> Go to end of the line


<F11> Stylist on/off

<Ctrl><Home> Go to beginning of the document


<F12> Numbering on/off

<Ctrl><End> Go to end of the document

Selection with mouse:

<LeftMouseButton> Select text, cells, etc.

<Shift><LeftMouseButton> Extend the current selection.

Dragging with Mouse:

<LeftMouseButton> Drag the selection to move it.

<Ctrl><LeftMouseButton> Copy the selection to the dragged location.

Some codes used inside equations:

Element type

Example

Fractions

1 over {2+3}
{a + b} over {d + e}

Superscripts

a^2 + b^c = c^2
a^n a^m = a^{n+m}

Subscripts

a_1, a_2, ... a_n
K_r=K_0 e^{-E_a over {kT}}

Roots

Sqrt {a+b}
nroot 3 {a+b}

Greek letters

%alpha %beta %gamma %delta %epsilon %varepsilon %zeta %eta %theta %vartheta %iota %kappa %lambda %mu %nu %xi %omicron %pi %varpi %rho %varrho %sigma %varsigma %tau %upsilon %phi %varphi %chi %psi %omega newline
%ALPHA %BETA %GAMMA %DELTA %EPSILON %ZETA %ETA %THETA %IOTA %KAPPA %LAMBDA %MU %NU %XI %OMICRON %PI %RHO %SIGMA %TAU %UPSILON %PHI %CHI %PSI %OMEGA

Common relationships

= approxequiv def sim simeq prop <> < <= << > >= >> <> dlarrow drarrow dlrarrow towards parallel ortho leslant geslant transl transr

Common operators

+ - +- -+ cdot times and or in notin

Arrows

lefarrow rightarrow uparrow downarrow

Other common symbols

infinity empty-set

Sum and product

sum X_n
sum from 1 to n X_n
prod X_n

Integrals and derivatives

int f(x) dx
int from 1 to 2 f(x) dx
{partial x} over {partial t}

(type abiword or AbiWord in an X-terminal) AbiWord (http://www.abisource.com). It is a good light-weight wordprocessor. Really worth trying for simple word processing needs. Although still fairly light on features, it is quite useful to me, e.g. it supports spelling-as-you-type without the overhead of StarOffice. It is under heavy development and both versions for Linux an MS Windows are available.

kword is still in development and we would not recommend using it for anything important--it may crash. However, it looks like the coolest office application of the three main (GPL) office suites. It is frame-based, like "framemaker" (hearsay, never used framemaker) which makes it easy to use and powerful for desktop publishing. Pretty feature-rich (certainly more features than in abiword).

To run kword in another language, I can do something like this (in X terminal, runs kword in the Dutch language):

exec sh -c "KDE_LANG=nl kword" &

Here is a list of some useful "standard" keyboard shortcuts. These shortcuts are used inside any kde-based applications (where applicable):

<Alt> Access the top menu.

<Alt><a character> Quick access to the items in the top menu. The character is the underlined letter in the menu name. For example (for the English-language menus): <Alt>f -- "File" menu; <Alt>e -- "Edit" menu; <Alt>v -- "View" menu; <Alt>i -- "Insert" menu. <Alt>o -- "Format" menu.

<Ctrl>x Cut

<Ctrl>c Copy

<Ctrl>v Paste

<Ctrl>a Select All

(Type lyx in an X-windows terminal). lyx is a front end (WYSIWYG, running under X-Windows) for Latex. [There is also Klyx, which is a "K-desktop" variant of lyx, but it is not updated any more.] For decades, Latex has been the heavy-duty document preparation and typesetting program, particularly popular in academia because it is good with equations, can handle very large documents, etc.

The good news is that even if you do not know what Latex is, you may still be able to use lyx. Think of lyx as a word processor, although its philosophy is different from that of other popular word processors, and therefore it may require an adjustment of your mindset. Latex (and lyx) philosophy is to type in the text, define the "styles" and leave the formatting to the typesetting program. This means you never adjust the spacing (between words, sentences, paragraphs, chapter, etc.) manually. When done with typing of your document, you "compile" your text to create a device independent file ("*.dvi"). The *.dvi file can be viewed using a dvi viewer and printed. The quality of the output is usually outstanding, but its creation process is typically somewhat more frustrating than using a regular word processor.

The strength of Latex is the excellent quality of the printouts, its capability to cope with long, complex documents (technical books, math, etc.), availability of a large array of foreign characters and even rarely used symbols, its portability across many different platforms, and the popularity of the file format. Its weakness is the relative complexity of use.

lyx is free and it is included on your Mandrake or RedHat CD for you to try. As almost any piece of Linux software, you can also download it from Linuxberg: http://idirect.linuxberg.com/kdehtml/off_word.html or any other fine Linux software depository on the Internet.

If instead of easier lyx, you wanted to try straight, hard-core Latex, here is some intro to get you started:

  • Use your favorite plain-text editor to create a Latex document, spell check it, etc., save the text file with the extension "*.tex". Read on to see my sample Latex document.

  • Invoke Latex to "compile" the text file into a "*.dvi" ("device independent") file by typing on the command line:

latex my_latex_file.tex

  • Print the "my_latex_file.dvi" file which was created by the previous command by invoking the dvi to postscript utility, that on default send the output to the lpr printer:

dvips my_file.dvi

  • You can also save the output to postscript file by typing:

dvips -o output_file.ps my_file.dvi

The option -o introduces the output file.

  • You can also create a pfd file using

dvipdf my_file.dvi output_file.pdf

or

ps2pdf my_file.ps my_file.pdf

  • You can view any of the files (dvi, ps, or pdf), for example using (in X terminal):

kdvi my_file.dvi&

or

kghostview my_file.pdf&

Here is my sample Latex file:

% Any line starting with "%" is a comment.

% "\" (backslash) is a special Latex character which introduces a Latex

% command.

\documentclass[10pt]{article}

\begin{document}

% Three commands are present in every Latex document. Two of them are

% above and one at the very end of this sample document.

This is a simple document to try \LaTeX. Use your favorite plain text editor to type in your text. See how the command \LaTeX produces the \LaTeX logo. Here is the end of the first paragraph.

Here starts the second paragraph (use one or more empty lines in your input file to introduce a new paragraph). The document class of this sample is ``article'' and it is defined at the very beginning of the document. Other popular classes are ``report'', ``book'' and ``letter''.

Please note that the double quote is hardly ever used, utilize two ` to begin a quote and two ' to close it. This nicely formats the opening and closing quotes.

Here are different typefaces:

{\rm This is also roman typeface. It is the default typeface.}

{\bf This is bold typeface. }

{\em This is emphasize (italic) typeface.}

{\sl This is slanted typeface, which is different from the italic.}

{\tt This is typewriter typeface.}

{\sf This is sans serif typeface.}

{\sc This is small caps style.}

You can itemize things:

\begin{itemize}

\item one

\item two

\item three

\end{itemize}

You can also enumerate things:

\begin{enumerate}

\item one

\item two

\item three

\end{enumerate}

Try some foreign letters and symbols:

\aa \AA \o \O \l \L \ss \ae \AE \oe \OE \pounds \copyright \dag \ddag \S \P.

There are also three dashes of different length:

- -- ---.

Try some accents over the letter ``a'':

\'{a} \`{a} \"{a} \^{a} \~{a} \={a} \.{a} \b{a} \c{a} \d{a} \H{a} \t{a} \u{a} \v{a}.

Other letters can be accented in a similar way.

The pair of ``\$'' marks a math context. Many special characters are available only in the ``math'' context. For example, try the Greek alphabet:

Small:

$ \alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \vartheta \iota \kappa \lambda \mu \nu \xi o \pi \varpi \rho \varrho \sigma \varsigma \tau \upsilon \phi \varphi \chi \psi \omega $

Capital:

$ A B \Gamma \Delta E Z H \Theta I K \Lambda M \Xi \Pi P \Sigma T \Upsilon \Phi X \Psi \Omega $

Try some equations:

$ x^{y+1} + \sqrt{p \times q}=z_{try_subscripts} $

\begin{center}

$ \frac{x \times y}{x/2+1}=\frac{1}{3} $

\end{center}

\LaTeX math commands are very similar to those in the old ``Word Perfect'' equation editor.

Use the verbatim mode to print the 10 special symbols which normally have special meaning in \LaTeX: \verb|%${}_#&^~\|. The special symbols must be contained between any two identical characters which in the example above is |. Most of these special symbols can also be printed by preceding the character with a backslash:

\% \$ \{ \} \_ \# \& \^.


% This command ends the document (this is the third one that *must* be

% present in every document).

\end{document}


As a dictionary and thesaurus, I use WordNet (type wn in text terminal). It did not come on RH 7.0 CDs, so I had to download (10 MB) and install it myself. Really worth it. Try: http://www.cogsci.princeton.edu/~wn/. RedHat 8.0 came with wn pre-installed, and a GUI frontend to it:

ktheasurus&


Last Update: 2010-12-16