Log InGet OrdStyle

I colored a heading style and the whole chapter turned that color. Why?

That is what a section style does — it reaches the heading and everything under it. Put settings meant for the heading line on that heading's own title style instead.

This is the single most common surprise in the style system, and it is deliberate: the heading style for a level is the style for that whole section, not for the one line the heading sits on.

Why it works that way

Styles fall back on each other in a chain. A level-3 body paragraph looks for a level-3 body style; failing that the general body style; failing that the level-3 section style, then level 2, then level 1, then the document default.

That chain is what makes one setting reach a lot of text on purpose. Set a font on the default and the whole document follows it. Set a background on a level-1 section and that chapter gets it — heading, body, bullets, captions and all — without your tagging a single paragraph.

The cost of that convenience is exactly the surprise above:

  • A bare heading style styles the whole section.
  • Anything meant for the heading line alone goes on that heading’s own title style.

The fix

Move the setting off the section style and onto the title style for that level. The heading line changes; everything under it goes back to what it was.

Finding out what a line is actually using

Output > Styling Help (Ctrl+Shift+H) puts a band along the bottom of the window naming the style the line at the cursor is using — and which style each of its settings came from. When a page does not look the way you expect, that band answers “why does this look like that” faster than reading the settings pages does.

Reaching a few blocks rather than a whole section

If what you actually wanted was “the first paragraph of each chapter” or “every second bullet”, a style name can carry a selector for that:

[#2.1-2]        the first two level-2 headings under each level-1
[Bd./2]         every 2nd body paragraph
[#3_Bd.first]   the first body paragraph of each level-3 section

.first, .last, .odd, .even and .only work too. A selector overrides only the settings it names — everything else still comes from the normal style.

See also