question, part, subpartfunction
#question(
body,
points: none,
intent: none,
rubric: none,
number: auto,
height: auto,
indent: auto,
label: none,
)
#part(..) // the same arguments
#subpart(..) // the same argumentsDeclare a question, part, or subpart, numbered "1.", "(a)", and "i." respectively. #question[..], #part[..], and #subpart[..] are aliases of the same function, taking the same arguments. The numbering style is chosen by nesting depth, not by function, so #question[#part[..]] and #question[#question[..]] will render identically.
Arguments
bodycontent | strrequiredpositionalThe text of the question/part/subpart. Can contain nested question/part/subparts.
pointsdefaultnone| int | floatThe number of points shown for this question/part/subpart (e.g.
points: 2 shows "(2 points)"). Points are also shown in #points-table() and related functions.intentdefaultnone| "practice" | "bonus"Setting to
"bonus" counts the points as bonus points, which are totaled separately. Setting to "practice" leaves the points out of the exam's totals and its points table; num-points(intent: "practice") counts them.rubricdefaultnone| contentRubric items for the question/part/subpart (see
#rubric[..]). Rubric items written here are shown after any #rubric[..] items in body.numberdefaultauto| int | str | content | noneBy default, questions/parts/subparts automatically increment their number. Providing a
number overrides this behaviour. A numerical value will cause numbering to skip to that value; a non-numerical value or general content will pause the counter and show that content. To omit a number completely, set number: none.heightdefaultauto| length | ratio | relative | fractionThe height of the question/part/subpart, including its parts. A length (e.g. 5cm, or 50% of the page), or a fraction (e.g. 1fr), makes it a single block of that height, which cannot break across pages.
Note: prefer #answer-box[..] (e.g. #answer-box(width: 100%, height: 3cm)[]) over setting a question's height if your goal is to give students a space to write in.
labeldefaultnone| labelA label for referencing the question/part/subpart with
@name (e.g. label: <derivative>).