Marking up the structure
After working through this section, you should be able to:
Mark up the top-level structure of a document
Mark up the hierarchical structure of a document
Mark up numbered elements
Mark up nested elements.
Introduction
The parser relies on indentation to group content and reflect the hierarchical structure of a document.
Keywords introduce a group, and everything that falls into that group is indented below the keyword.
Top-level structure
At the highest level, a document is broken up into the following blocks:
PREFACE
PREAMBLE
BODY
SCHEDULE(s)
If there is no Preface or Preamble, BODY
will be assumed until a Schedule-like block, after which everything will be in the Schedules.
Example
The content of BODY
doesn't need to be indented under it, because it's the main block.
Hierarchical structure
Within the main body and in Schedules, content is usually grouped under headings.
In legislation, the most common groupings are Chapters, Parts, and Subparts.
Under these (or ungrouped), usually in this order, are sections, subsections, paragraphs, and subparagraphs. Articles are also sometimes used.
All of the above are hierarchical elements, and they all follow the same pattern.
The pattern for hierarchical elements is as follows:
On a new line, the keyword, e.g.
CHAP
for a ChapterOn the same line, optionally, a space and a number
On the same line, optionally,
-
and a headingOn the next line, optionally, an indent and
SUBHEADING
, followed by a space and the subheadingBelow the main heading, indented, the content of the grouping
To mark the end of a grouping, unindent the next element or line.
Tips
If there is a number and no heading, you don't need to use a
-
.If there is no number but there is a heading, you do need to use a
-
to indicate the start of the heading.If there is a number and a heading, the
-
should come between the number and the heading.
See the examples below for an illustration, paying close attention to the placement of the -
.
Examples
Number and no heading
No number, heading
Number and heading
Subheading
More examples
If the content isn't indented, it won't be captured correctly and the keyword will be captured as text.
Nested elements
To show that one element falls inside another element in the document hierarchy, indent the whole element.
If the parent element has content of its own, the indented element will line up with that content.
Example
Nesting can get complicated! Look at the table of contents to help guide you, or collapse an element to hide its content.
Note that the numbers of the elements above don't rules about needing a stop, round brackets, etc: anything given after the keyword and before -
will be accepted as the number of that element.
Bulleted lists
The pattern for bulleted lists is as follows:
On a new line, the keyword
BULLETS
Below the keyword, indented,
*
followed by the content of each bulletTo mark the end of the bulleted list, unindent the next element.
If a bullet has more than one paragraph, maintain the indentation so the text lines up, otherwise a *
will automatically be added at the start of the next line.
Example
Nested bullets
Numbered lists
Do not use this markup for numbered elements like paragraphs or subparagraphs. Only use it for numbered lists in defined terms, the Preface, or tables.
The pattern for numbered lists is as follows:
On a new line, the keyword
ITEMS
Below the keyword, indented, the keyword
ITEM
Below the second keyword, indented, the content of the item
To mark the end of the numbered list, unindent the next element.
Examples
Definitions
Preface
Nested items
Repeat the pattern, with the nested ITEMS
keyword inside the ITEM
in which it appears.
Exercises
Hierarchical structure 1
Copy the text below and paste it into a practise document, then see the instructions that follow.
Correct the ordering of each numbered element: keyword, then number, then content indented below. Paragraph 3 has a heading.
Correct the indentation of each numbered element, paying close attention to nested elements.
Ensure the wrap-up text at the end of the second paragraph is indented correctly.
When you're done, it should look like this in View mode:
and like this in Edit mode:
Hierarchical structure 2
Copy the text below and paste it into a practise document, then see the instructions that follow.
Mark up the two Big headings with
DIVISION
, and the others withSUBDIVISION
. You can useCHAP
andPART
if you prefer.Nest the two Medium headings under the first Big heading.
Nest the Small heading under the first Medium heading.
When you're done, it should look like this in View mode:
and like this in Edit mode:
Note the indentation in the Table of Contents:
Last updated