Styles and Formatting¶
This section demonstrates how to apply styles and formatting to the document at every level.
Topics Covered:
Applying Styles¶
Paragraphs¶
Headings¶
Lists¶
The Making Lists tutorial explains how to create lists. For simple lists, a default paragraph style is automatically selected, based on whether the list is numbered or bulleted. Anything more complicated will require explicitly setting a style.
A good example of when to use explicit list styles is when a list item contains multiple paragraphs. Consider the following snippet:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <par list="num">
<run>
This is an example of a list item containing multiple
paragraphs.
</run>
</par>
<par style="List Continue">
<run>The second paragraph is part of the first list item.</run>
</par>
<par list="cont">
<run>
The third paragraph continues the numbering of the list where
we left off.
</run>
</par>
|
The result is a multi-paragraph list item for item #1. If we had not explicitly added the same style to the middle paragraph, its indentation would not have been correct for a list item:
Todo
Add a big blurb about the fact that this only works because the default list styles are sensibly set in the global defaults file. If not, the most default default list style is actually not very useful (indents by 4 tabs).