This section demonstrates the numbering patterns used throughout PreTeXt. There are five subsections. Two intermediate subsections each have two subsubsections. This creates a total of seven divisions that are leaves of the document tree. In each leaf we have placed two numbered theorems, for a total of fourteen. There is no real content, this is just a demonstration.

Use values of 0 through 3 for the numbering.theorems.level parameter to see how these numbers change accordingly. It is easiest to compare if you use chunk.level < 2 so the theorems all land on the same page if you are previewing in HTML.

A document leaf.

### Subsection25.2Two

Further subdivided.

A document leaf.

A document leaf.

A document leaf.

### Subsection25.4Four

Further subdivided. We include two theorems as numbered items in the introduction to test their numbers, which should always be logical.

A document leaf.

#### Subsubsection25.4.2Dos

A document leaf.

Conclusion now. We include two theorems as numbered items in the conclusion to test their numbers, which are sometimes totally illogical and are inconsistent across output formats. To see the effect, use --stringparam numbering.theorems.level 3 in the xsltproc invocation. See this GitHub issue for details.

A document leaf.

### Subsection25.6Theorems in This Section

We have a lot of theorems in this section, so we illustrate including an automatic list of these here. We use the elements attribute to limit the list to theorem elements, and we use the scope attribute to limit the list to this section. You can use an introductory p like this one, or not. The list gets no title or visual separation, so use the usual subdivision elements to make that happen. The elements attribute can be a space-delimited list of many different elements. This list should not include the Fundamental Theorem of Calculus, Theorem 2.1. See a slightly different example in Appendix C.

Theorem 25.1 First Theorem
Theorem 25.2 Second Theorem
Theorem 25.3 First Theorem!
Theorem 25.4 Second Theorem?
Theorem 25.5 First Theorem?
Theorem 25.6 Second Theorem!
Theorem 25.7 First Theorem
Theorem 25.8 Second Theorem
Theorem 25.9 Good Numbered Theorem One
Theorem 25.10 Good Numbered Theorem Two
Theorem 25.11 First Theorem
Theorem 25.12 Second Theorem
Theorem 25.13 First Theorem
Theorem 25.14 Second Theorem
Theorem 25.15 Bad Numbered Theorem One
Theorem 25.16 Bad Numbered Theorem Two
Theorem 25.17 First Theorem
Theorem 25.18 Second Theorem

### Subsection25.7A Title with ] a Right Bracket

has trouble with brackets that end up inside optional arguments, so this subsection title is only a check on the defense against that. And now an <exercise> with a title that could really be a problem.

The right brace is obtained with an empty element, <rbrace/>, and the right bracket is simply the character, ]. Both are used by as grouping characters, so need to be handled with care in titles.

Hint

A faux hint to get this exercise to migrate into a <solutions>.