Marking up the structure
Last updated
Last updated
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.
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.
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 , after which everything will be in the Schedules.
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 Chapter
On the same line, optionally, a space and a number
On the same line, optionally, -
and a heading
On the next line, optionally, an indent and SUBHEADING
, followed by a space and the subheading
Below the main heading, indented, the content of the grouping
To mark the end of a grouping, unindent the next element or line.
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 -
.
If the content isn't indented, it won't be captured correctly and the keyword will be captured as text.
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.
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 bullet
To mark the end of the bulleted list, unindent the next element.
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.
Repeat the pattern, with the nested ITEMS
keyword inside the ITEM
in which it appears.
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:
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 with SUBDIVISION
. You can use CHAP
and PART
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: