Section 16.3 Divisions of
You can also put several
<exercise>s as part of an
<exercises> element within a division, which is the typical way for creating a collection of exercises togther at the end of a division such as a chapter or section. The content of an
<exercises> division is rather limited. It can begin with an
<introduction> (perhaps a set of common instructions), followed by a mixture of
<exercisegroup> (see Subsection 16.3.1) elements, followed by an optional
<conclusion>. The sample code in Listing 16.3.1 illustrates this structure, which is rendered later as “16.4 Exercises”.
An alternative structure for an
<exercises> division is to use a sequence of
<subsexercises> elements, optionally preceded by an
<introduction> and followed by a
<conclusion>. The content of a
<subexercises> element is identical to what was described above for an
<exercises> element, but we emphasize that a strong rationale for using
<subexercises> (as opposed to
<exercisegroup>) is that a
<subexercises> element can begin with a
<title>, providing a clear way of organizing the
<exercise>s for the reader.
Sometimes you have several exercises that should all have a common set of instructions, which is when you will use the
<exercisegroup> tag. An
<exercisegroup> can only be used as part of an
<exercises> element or a
<subexercises> element, however! The portion of this section headed as “16.4 Exercises” is produced using the code in Listing 16.3.1.
If you want the contents of an
<exercisegroup> to be put in multiple columns, you can add a
@cols attribute to the
<exercisegroup> with value (for example)
3. The integer value of
@cols must be between 2 and 6 (inclusive).
Subsection 16.3.2 Reading questions
Another specialized division,
<reading-questions>, can be used to house
<exercise>s designed to test or guide a reader's comprehension of the material in that division. The structure of a
<reading-questions> element is similar to an
<exercises> element, but without the grouping options of
<exercisegroup>. The portion of this section headed as “16.3.3 Check your understanding!” is produced using the code in Listing 16.3.2.
Reading Questions 16.3.3 Check your understanding!
Here is a spot to explain the purpose of these questions. It's optional, like most introductions.
Here is a question.
A second comprehension question. We don't bother with answers or solutions.
A little wrap up, perhaps giving guidance or encouragement if the student struggled with the questions. Optional like most conclusions.