Last update: Tue, Apr 17, 2012 at 10:54 PM.
How Rules work
    • A rule gives you a way to say things about the way the outline is formatted. You can say, for example, that all the headlines at level 1 and 2 are bold. You can set fonts, indents, spacing, alignment of text.
    • Rules can say that all headlines are expanded when the outline is displayed, or only the first two levels of headlines. And you can have a section expanded even if its siblings are not.
    • Rules scope and order is important.
    • So if I want all lines in a section to be green, except for the first, I could write a rule to do that.
    • As you can see this section is also a demo. :-)
    • If you want to control the spacing between paragraphs, use the list rules.
    • outline-space puts space after each line of text, whether or not it has subs. Specify space as you do in CSS, so for example 5px means five pixels.
    • list-space puts space after the last sub of the item it applies to. This allows you to add a bit of space between lists.
    • outline-indent is the amount of space that added to the beginning of a line for each level.
    • All these rules add styles to the lines in the HTML we generate.
    • You can change the "wedge" icons to whatever 16x16 graphic you want. Or you can turn icons off.
    • icon-expand is the image that's displayed on collapsed items.
    • icon-collapse is on expanded items with subs.
    • no-icons can be true or false. Turns off and on icons.
    • permalink can be true or false. Puts a purple-hash paragraph-level permalink at the end of each line.
    • Here's a source of 16x16 icons.
    • If I create a rule that everthing down from here is expanded, but if the thing above me is not expanded, it's all for naught. If you are puzzled by the way expand works, keep that in mind. Try substituting color for expand and see if what you're trying works.
    • I should be able to set an outline attribute that says "Expand me" by default. Shouldn't have to do a rule for that.
    • They use the structure of the outline to determine formatting.
    • So if you understand structure, you understand rules.
    • But it's like programming. Basically the rules work, they do what they're supposed to do, but you may have to stare at something that isn't working until you understand why it does what it does.
    • Big question. What do you do when you hit an include node in an outline?
    • Here's an outline that uses lots of rules. I used it for testing when I was getting it to work, so there's a bit of perverse stuff in there, which is good. :-)
    • Rules first appeared in MORE, and were used to control the appearance of printed outlines, bullet charts and tree charts.
    • We implemented rules in Frontier's website framework with the Pike renderer.
    • Now they are helping us do structured styling in the world outline.
    • 2/9/12 by DW