next up previous contents
Next: Document Titles Up: Writing Documents Previous: Text classes   Contents

Templates: Writing a Letter

One of the most popular text classes is Letter. One way to write a letter would be to open a new file, and choose Letter from the Class menu in the Layout $ \triangleright$Document dialog. While this is the most obvious way to write a letter, it seems like extra work. Every time you write a business letter, you want to have your address, the address you're sending to, a body, a signature, etc. LYX therefore has a template for letters, which contains a sample letter; once you have a template, you can just replace a couple parts of the letter with your text each time you write a letter.

Open a new file with File $ \triangleright$New from Template. Select letter.lyx as the template. Save and print the file to see how the various environments are typeset.

When you look at the Environment menu, you'll see several environments, like the My Address environment, which don't even exist in most other text classes. Others, like Quote and Description, are familiar. You can play around for a while to figure out how the various environments work. You'll notice for example that the Signature environment has the word ``Signature:`` in red before the actual text of the signature. This word doesn't show up in the actual letter, as you'll see if you try printing the file. It's just there to let you know where the signature goes. Also, note that it doesn't matter where in the file the Signature line is placed. Remember, LYX is WYSIWYM; you can put the Signature environment anywhere you want, but LYX knows that in the printout, the signature should be at the end.

A template is just a regular LYX file. This means you can fill in your address and signature and save the file as a new template. From now on, any time you want to write a letter, you can use the new template to save time. We probably don't have to suggest an actual ``exercise'' here; just write a letter to someone3.3!

Templates can be a huge time-saver, and we urge you to use them whenever possible. In addition, they can help a person learn how to use some of the fancier text classes. Finally, they may be useful for a person who is configuring LYX for a bunch of less computer-aware users. When they're first learning LYX, it will be much less intimidating if they have a letter template customized for their company, for example.


next up previous contents
Next: Document Titles Up: Writing Documents Previous: Text classes   Contents
Jay Bolton 2004-04-15