Creating and Modifying Styles and Templates

Templates are predesigned files with styles, sometimes text, and other elements that reduce the amount of work you need to do every time you create a new document. Styles are pre-set groups of formatting characteristics that you can apply to text or graphics. Styles and templates go hand-in-hand for a number of reasons:

  • They're both really good ways to cut down on the time it takes to do your work

  • Templates are the primary way your styles are organized and stored

Since Writer and Web are so similar, you can learn how to use styles and templates in Web by just going to the sections of the Writer documentation where it's covered:

  • Power Formatting With Styles on page 247

  • Using Templates on page 262

This section covers a few things that are specific to Web, or are so common that we didn't want to send you chasing cross-country across the book for them.

Templates

Writer contains extensive information on templates, most of which is applicable to HTML as well as Writer files.

Using AutoPilot to Create an HTML Template

There are two ways to create a new document based on a template: AutoPilot (see page 446), or just choosing File > New > From Template. Using the steps in the following procedure makes a template that's available for either approach.

  1. Choose File > AutoPilot > Web Page.

  2. In the AutoPilot Web Page window, select the document structure in the left column and design options in the right column.

  3. Select the Create template option and click Create.

  4. In the Document Templates window (Figure 15-6), make entries and click OK.

    Figure 15-6. Creating a new template using AutoPilot and Document Templates windows

    graphics/15fig06.jpg

You never actually get to specify the filename of the template. However, it's not important.

Creating a Standard HTML Template

You can base a document on this type of template only by choosing File > New > From Template; they don't show up in the list of templates in AutoPilot.

  1. Create an HTML document with the fonts, graphics, and other formatting that you want to base other documents on.

    Note

    It doesn't work to create the styles in a Writer document, or find a document containing those styles and open it in Writer, and then save as HTML. The styles disappear. You need to create the styles in the actual HTML document.

  2. Choose File > Save As.

  3. In the Save As window, select Writer/Web Template as the file type

  4. Save the file in the appropriate subfolder of share/template/ language (in a multi- user environment, these files are on the server computer), or in your user/template folder.

Modifying Any HTML Template
  1. Open the template you want to modify, in share/template/ language (in a multi-user environment, these files are on the server computer) , or in your user/template folder .

    Note

    All template links as well as templates created by the authors are available at: http://www.getopenoffice.org/templates.html

  2. Make the changes.

  3. Save the file, making sure that the file format remains Writer/Web Template.

Styles

This section covers a couple tips on Web and styles. For full coverage of the ins and outs of styles, see Power Formatting With Styles on page 247.

To get styles from one document to another, follow the steps in the Writer documentation for Loading All Styles on page 265 and Loading Individual Styles on page 266.

You can also just create a new template that has the styles you want, and use that template as the basis for all new documents. Create an HTML file, create the styles, then save as an HTML/Writer template. For more information, see page 446.

Note

When you're looking for the style in Stylist, select All Styles in the dropdown list.




OpenOffice. org 1.0 Resource Kit
OpenOffice.Org 1.0 Resource Kit
ISBN: 0131407457
EAN: 2147483647
Year: 2005
Pages: 407

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net