When writing a long document in a word-processor... have you ever seen people creating a table of contents by hand? Numbering pages manually? Having to change the font face of their section headers one by one? Poor guys; I often feel annoyed because word processors impose no rules on how to write documents, and people don't care to discover all the marvelous features they provide. Yes, I'm talking about styles.

Styles are a way to organize your document logically (as in chapters, sections, paragraphs, etc.). When using styles, you don't have to — or ideally, you mustn't have to — care about how your document looks during its writing, only about its contents. All you have to do is tag special parts of it as titles, notes, outlines or any other kind of logical constructions that make sense for it.

But why? First of all because changing the whole look of your document is a matter of editing the specific style you used for each "logical construction". For example, if you wanted to leave 0.40mm between paragraphs, all you'd have to do is edit the "Paragraph" style to reflect your change and the entire document would benefit from it. On the other hand, the word processor understands how your document is internally organized, so it can do a lot of work for you, like generation of indexes, calculation of references to sections or figures, etc. You read it correctly: all these things can be automatically done by the program!

If you have ever written a page using XHTML Strict or Docbook/XML (to name a few), you know what I'm talking about. Styles are based on the same idea. For example, you are not allowed to use all those problematic tags present in HTML 4 (font being the main offender), because they are meant to change the look of your writing. In order to change how the document is rendered, you either use a CSS or an XSL, which define how each logical concept will be drawn.

To conclude: (almost?) all word processors support styles; it's a matter of looking for them and start using them. However, Openoffice is specially good at this (it could be improved in some areas, though); take a look at its Stylist, which is open by default. At last, a tip: remove the "formatting toolbar" from the program's window and forget about the "Format" menu; you will avoid many bad practices.

Comments from the original Blogger-hosted post: