Heading 1

Heading 2

Heading 3

Heading 4 is not defined yet, so we ignore it when formatting.

Normal is just a nice way to make sure that you've got a basic style you can use for all your paragraphs. By default, everything is in this style. We've also predefined a few other basic styles, just to show how this works.

For example, Block Text can be used for inset quotes. I happen to think that the full inch indents on either side are ridiculous, but that's the way Word 97 ships, so I figured it'd be worth at least showing off that we can do the same thing.

Of course, I'd much rather make something decent looking. :-)

And for code, etc. we have:

Plain Text, which is another paragraph-level style.

How do you like them apples? :-)

Customization

Most of the styles demonstrated in this document come from the current built-in set of styles. Until we hook up the Format/Styles menu, these are the only styles you'll be able to use. However, for testing purposes, this document redefines the Heading 2 style to also be right-aligned and strike-through. Likewise, Heading 3 is redefined to be basedon Heading 2, plus underline. In addition, this document has one Custom paragraph style which is used for this paragraph. The document also defines an Unused style, mostly to demonstrate that user-defined styles persist, whether they're referenced or not. Finally, there's a character-level Highlight style, which is used for all the style names in this document.

TODO

1. When the user sets a style "over" existing explicit formatting, do the Right Thing. If it's a different style, nuke the explicit formatting. If it's the same, pop up a dialog and ask whether to update the style to include those properties, or just revert to the existing definition.

2. Likewise, we may want logic to avoid setting explicit properties which duplicate the underlying style.

4. Honor the followedby attribute.

5. Allow style definitions to be added and edited. This is more significant work because, not only does it require a few rich dialogs, but we also need to efficiently reformat the document to use the new style definitions.

6. Rework styles mechanism so they can be loaded from templates, instead of always being hardwired. The current trick of overwriting built-in styles may not work in this case, especially if we want to do something like the Style Gallery, which swaps templates underneath the existing document, thereby updating all its styles.

7. Also, decide what the hardwired set of style definitions should be. Something less ugly than this would be nice. :-)