LaTeX for Secretaries

How to survive without Microsoft Word.
Changing Text into Type

To start LaTeX, type this at the prompt:

latex businessletter.latex

After you press the ENTER key, LaTeX will print some cryptic messages, two of which are most important: Output written on businessletter.dvi... and Transcript written on businessletter.log. Your letter is output into a DVI (device independent) file, a universal format, which you can turn into fax, PostScript or printer files.

If there are problems, LaTeX will sometimes stop in the middle of its work and ask you for help. When that happens, make a note of the line number at which the error has been found, then keep tapping the ENTER key until you see the “Transcript written on” message or the command prompt. Then run xdvi, and after visually finding the place where the error occurred, go back to Emacs and correct your mistake. Usually it will be a missing bracket or a misspelled command.

Previewing Documents

The best way to find errors and check the document's look before you print it is to use the xdvi previewer. It works only in the X Window System. To start it, you either choose it from a menu or type xdvi businessletter.dvi & on a command line in a terminal window and press the ENTER key.

Using xdvi is easy. The buttons on the right-hand side of a window are fairly self-explanatory, and you can press the PAGEUP/PAGEDOWN keys to flip pages back and forth or use the arrow-up/arrow-down keys to scroll the page you are looking at up and down (the scroll bars work just like in MS Windows, although with a two-button mouse, you will have to press both buttons to use them). Pressing the Q key exits xdvi.

Some Unbreakable Rules

The most common errors that can be found just by looking at a page in xdvi are the overfull boxes and sudden changes in font and style. These errors usually happen when you forget to obey some of the following rules of typesetting in LaTeX:

  • Each paragraph must by separated from another by a blank line (just tap the ENTER key twice at the end of a paragraph).

  • No matter how many spaces you put between words, LaTeX will treat them as one space and will format it according to its own typesetting rules. (You might change this behaviour, as described in the section “Overriding LaTeX Rules” below.)

  • Quotation marks are made using ` and ' or and instead of ", so to typeset ''funny'', you'll need to type ''Funny'' instead of "funny".

  • Ellipsis (...) is printed with the \ldots command; consequently, to typeset bye..., you ought to type bye\ldots and not bye....

  • LaTeX commands should be separated from the actual text. We achieve that in one of the following ways:

that begins above]

  • bye, bye\ldots my love (note: the \ character starts a command and therefore does not need to be separated with a space, also see the list of special characters below).

  • bye, bye\ldots{ }my love.

  • LaTeX interprets some characters as special, and to print them literally, we need to use a special command instead. See list in “Special LaTeX Characters”.

Special LaTeX Characters
  • Commands can be nested, i.e., you can put one or more commands within curly brackets of another, e.g., extsf{life is \emph{wonderful}!}.

Getting Rid of Overfull Boxes

LaTeX is very good at documenting its work and puts a lot of information, including error messages, into a log file. For businessletter.latex, it will be called businessletter.log. Every error is described there as best as LaTeX can, together with a line number, which helps to quickly find the right place in a file.

Although the visual method of finding errors with the help of xdvi is probably best for a beginner, there is one category of bugs that requires a different approach—the famous Overfull box. LaTeX produces that message when it cannot properly break a line of text or hyphenate a word, which happens quite often when trying to print a long web page address.

The quickest way of finding those messages is by using grep:

grep Overfull businessletter.log | less

After issuing the above command in an Xterm window, you will see either an empty window (a good thing) or a list of lines where LaTeX has put the ominous word. Go back to Emacs, find the offending lines, then use xdvi to judge how to best fix your document.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Life is not fair, is it? You

Anonymous's picture

Life is not fair, is it? You learned how to use Microsoft Word or Corel WordPerfect, only to find yourself at a job where your boss says you must use LaTeX.

If you think that's not fair, just imagine the other way around, I assure you it is a true nightmare.