LaTeX for Secretaries

How to survive without Microsoft Word.

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. What is this thing? Can it be used for anything practical, like writing letters, memos, reports, sending faxes or printing price lists? These are some of the first questions that come to mind when you start using it. Fortunately, with LaTeX, it is just as easy to typeset a 1,000-page book filled with mathematical formulae as it is to prepare a short letter or a price list. These kinds of real-world office applications are what we are going to discuss below.

Not a Word Processor

Probably the most common misconception about LaTeX is thinking of it as some kind of text editor or word processor. It is neither of those tools. Let me explain. When you start Word or WordPerfect in Microsoft Windows or on a Macintosh, it opens a window, displaying buttons, menus and a white space where what you type shows up immediately on-screen and can be edited at will. To display or print documents, word processors use an “engine” of some sort that changes simple keystrokes into nice-looking type according to your choice of font and style. LaTeX can be thought of as such an engine, reading plaintext files on one end and changing them into professional-looking documents and saving in its own format called DVI on the other end.

Although LaTeX is only a pure typesetting system (it is not a visual DTP package like Microsoft Publisher, Adobe PageMaker or QuarkXPress) and the documents you process must be created using a plaintext editor, the quality of the documents generated in LaTeX are often much superior to Word's own efforts. However, learning to typeset documents in the former might be harder at first than doing it in the latter because of the need to manually add control commands to the text, which some people find confusing. You might think of it as an unnecessary burden, but you should remember that in reality, all word processors and text editors add control commands to the text you type—they just don't make them visible to us.

Typing Your First Letter

The best way to learn LaTeX is by example, so log in to your system (in case you do not know what logging in means, try some beginner Linux books) and type the following command:

emacs businessletter.latex

File extensions are optional and could be just about anything you like, although using .latex or .tex is good practice, as it makes documents easier to find.

After pressing the ENTER (or RETURN) key, you should see Emacs in all its glory—two toolbars and an empty space waiting to be filled with text. The \ character marks the beginning of LaTeX commands, so remember to put it in as well, and do not get confused by a \ showing up from time to time in the rightmost column of the Emacs window—it's there to show you that a particular line of text is longer than the width of the window and has been wrapped. Let's type in the lines shown in Listing 1.

Listing 1

To save what you have just typed in, press the CTRL-X and S keys. You should see a message at the bottom of the window saying Wrote .../businessletter.latex to inform you that your document has just been saved. If you accidentally press the wrong keys and Emacs starts complaining and beeping at you, pressing CTRL-G will almost always get you out of trouble.

Basic LaTeX Commands

As you can see, the example letter is sprinkled with many strange commands and curly brackets. Besides making a document less readable, they tell LaTeX how to format it. Unfortunately, you will need to learn at least a few of them. While you read the following paragraphs, refer to Listing 1 to see how each command is used in practice.

First comes the obligatory \documentclass[...]{...} command, which is not as scary as it looks and is just an obscure way of telling LaTeX what kind of document you are trying to print. It could be one of the following: article, book, letter, report and slides. Whatever you choose, put the appropriate word between curly braces.

The square brackets surround more specific options used to set the size of paper (available sizes include a4paper, a5paper, b5paper, letterpaper, legalpaper and executivepaper).

Additional information that can go there includes page orientation (landscape, useful for printing presentation slides, or portrait), main font size (e.g., 10pt, 12pt, etc.) and many others.

The \frenchspacing command solves some of the typesetting problems related to setting the amount of space between a full stop and the next word after abbreviations like Ms. or at the end of a sentence. I suggest you always put it somewhere at the beginning of a file, perhaps just after the \documentclass[...]{...} command. Purists will surely complain about this advice, but using \frenchspacing will automatically make documents look better without causing you to worry how it happened. However, if you want to be “politically correct”, always put a ~ between an abbreviated word ending with a full stop and the next letter, number or word, e.g., Ms.~Green instead of just typing Ms. Green.

After setting those options, you will need to specify the sender's address with the \address{...} command; every line should be separated by \\--this method is used in many other commands as well. If you are using official company letterhead, you may leave this out.

LaTeX automatically puts the current date into a letter, but you can use the \date{...} command to specify a different one.

The signature text should go into the \signature{...} command.

To let the program know where your letter begins, use the \begin{document} and \begin{letter} commands. Just after the latter, insert the recipient's address in curly brackets. Then, begin the greeting with the \opening{...} command and start writing your letter. Write as much or as little as you need, separating each paragraph with a blank line (you will need to press the ENTER key twice).

At the end of your letter, use the \closing{...} command and, if needed, add the \cc{...} for “copies to:”, \encl{...} for “enclosed items:” and \ps{...} for PostScript.

You should end a letter file with the following commands: \end{letter} and \end{document}. That's it. You can save it as described above.

There is one trick which you can use to save yourself a bit of work when you need to type several letters. It is possible to begin another letter in the same file, just put the \begin{letter}{...} and the other commands mentioned above between the \end{letter} and the \end{document} commands. LaTeX will automatically use the signature, date and sender's address you specified at the beginning of a file (that's why you had to put your signature text at the top of the file).

______________________

Comments

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.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix