Skip to Content

<page>

The content of one printed pageIn development

<page> marks the content of one printed page. On screen it is an unformatted container, like a <div>. When the document is exported to PreTeXt for printing, each <page> starts on a new sheet of paper, and the room left for writing answers (an expanded <textInput>) is stretched or shrunk, in proportion to the heights written on the inputs, so that the page fills its sheet.

A <page> does not start a count of its own: a <section> or <problem> inside it is numbered along with the ones beside the <page>. Inside a <problems>, the problems on each page are numbered as items of the list, so a set of problems can be printed one per page by putting each <problem> in a <page> of its own.

A document is printed in pages only when its <page>s are written at its top level, or inside a <problems>, <exercises>, <div> or <cascade> there; the title of such a <problems> is not printed. A <page> inside a <section> prints as its content, with no page break.

Attributes and Properties

Attributes for <page>

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <page name="p">

Other (5)
$p.asList

boolean. Whether this page's children are rendered as a list, which is whatever its parent does.

$p.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$p.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$p.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$p.hidden

boolean. Whether this component is hidden from the rendered output.

Common to all components (4)
$p.doenetML

text. The DoenetML source code that produced this component.

$p.hide

boolean. Whether to hide this component from the rendered output.

$p.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$p.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: An exam with one problem per page

The two problems are numbered 1 and 2, as they would be without the <page>s. Exported to PreTeXt and printed, the introduction, the first problem and the second problem are each on a sheet of their own.

Last updated on