configelement
configGlobal configuration of package options. Give options to the exam, e.g. #show: exam.with(show-solutions: true), or set them with #show: e.set_(config, show-solutions: true).
Fields
show-solutionsbooldefaulttrue--input show-solutions=.. command-line option overrides this setting.institutiondefaultnone| content#maketitle().exam-namedefaultnone| content#maketitle().termdefaultnone| content#maketitle().durationdefaultnone| duration | content#maketitle(). Durations are shown in minutes (e.g. duration(hours: 1, minutes: 50) shows as "110 Minutes"). Pass content for complete control over what is shown (e.g., pass [1 h 50 min]).show-rubricsauto | booldefaultfalse#rubric[..]). Setting to auto shows rubrics whenever solutions are shown. The --input show-rubrics=.. command-line option overrides this setting.rubric-positiondefault"margin-right"| "margin-left" | "end"Determines where rubrics are displayed.
"margin-left" or "margin-right": in the page margin, next to the question/part/subpart they belong to (see rubric-width). Those of every column go in that margin, stacked.
"end": after the question/part/subpart, taking up space on the page, so an exam with visible rubrics is laid out differently from one without.
rubric-tracedefaultauto| boolauto draws lines only for rubrics in the margin. A rubric item's own trace overrides this.rubric-widthdefaultauto| lengthauto fills the margin.embed-metadatabool | auto | "rubric" | "question-regions"defaultfalseWhether to embed extra metadata into the PDF (as attached JSON files). The --input embed-metadata=.. command-line option overrides this setting.
true: Embed all metadata.
false: Don't embed metadata.
auto: Embed the question regions, and the rubric data only when solutions are shown.
"rubric": Embed rubric data as examy-rubric.json (the same data as <examy-rubric>).
"question-regions": Embed rectangles indicating where each question/part/subpart starts and ends, where its answer boxes are, where the lines of a #name-block() are, and the size and margins of each page, as examy-regions.json.
solution-colordefaultauto| colorauto derives it from solution-background-color.solution-background-colordefaultauto| colorauto derives it from solution-color by lightening.bubble-strokelength | color | gradient | tiling | stroke | dictionarydefault0.1em#choice[..], #bubble(), #square-bubble(), and #choices[..], specified like a circle's stroke: a thickness (e.g. .15em), a color (e.g. blue), or both (e.g. .15em + blue). A thickness left out is .1em, and a color left out is black. On the answer key, a correct bubble's outline takes the solution color.bubble-label-fontstr | arraydefault"DejaVu Sans Mono"choices-enumerate).bubble-sizedefaultauto| length#choice[..], #bubble(), #square-bubble(), and #choices[..]. Setting to auto uses 1em (which scales with the surrounding text).bubble-outsetlength | dictionarydefault(right: 0.4em)#choice[..]'s outset: a length (the gap after the bubble) or a dictionary of sides (left, right, top, bottom, x, y, rest).choices-enumeratebool | str | function | arraydefaultfalse#choices[..] labels its bubbles. Setting to false results in no labels; true results in A, B, C, …. A numbering pattern, function, or array of labels can be used (e.g., "a" or ("x", "y", "z")).choices-inlinebooldefaultfalse#choices[..] inline in a paragraph. If you would like a grid of choices, consider using choices-columns instead.choices-columnsdefaultnone| int#choices[..] into the specified number of columns. Setting to none results in a single column (i.e., each choice on its own line). Cannot be combined with choices-inline.choices-gapdefaultauto| length | fraction#choices[..] block. Setting to auto uses the usual line spacing for choices on separate lines, and 1.5em for choices side by side. A fraction (e.g. 1fr) spreads side-by-side choices across the line.answer-box-heightdefaultauto| length | ratio | relative | fraction#answer-box[..]. Setting to auto sizes a non-empty box to fit its contents, excluding #solution[..]s, and gives an empty box answer-box-default-height.answer-box-widthdefaultauto| length | ratio | relative | fraction#answer-box[..]. Setting to auto makes a box answer-box-default-width wide, or full width if its height is fractional (e.g. 1fr).answer-box-strokelength | color | gradient | tiling | stroke | dictionary | nonedefault0.5pt#answer-box[..], specified like a box's stroke (e.g. (bottom: .5pt) for a single line to write on).answer-box-filldefaultnone| color | gradient | tilinganswer-box-default-heightlengthdefault2cm#answer-box[..] with an otherwise unspecified height.answer-box-default-widthlengthdefault2cm#answer-box[..] with a width of auto, unless its height is a fractional unit (e.g. 2fr).numberingstr | function | (str | function)[]default("1.", "(a)", "i.")Determines how questions, parts, and subparts are numbered. This option behaves like enum's numbering, taking a numbering pattern (e.g. "1.a.i.") or a function that generates a label. In addition, numbering also accepts an array of numbering patterns (e.g. ("Problem 1.", "(a)", "i.")), with the left-most pattern applying to the highest level (almost always the #question[..]).
A config rule inside an exam (e.g. #show: e.set_(config, numbering: ("Bonus 1.", "(i)"))) sets the numbering of the questions/parts/subparts after it in its scope. Its left-most pattern still applies to questions, even when the rule is inside a question.
indentlengthdefault1.5emnumbering-fullbooldefaultfalseenum's full, if set, ensures that questions/parts/subparts get globally unique identifiers (e.g., part (a) of question 1 is labelled "1 (a)" by default, or "1.a." with numbering: "1.a.i."). This also affects @name references to questions.stringsdictionary(content)default(
question: [Question],
page: [Page],
points: [Points],
bonus: [Bonus],
score: [Score],
total: [Total],
)Words that can be localized to different languages. These include question, page, points, bonus, score, and total. Any subset of these may be set.
Note: the words in points badges are set by points-format and bonus-points-format.
points-formatdefaultauto| function(points) => [content] that determines how points are visibly displayed. Defaults to a function that renders (X points). Other examples include p => [[#p]] or p => [(#p Punkte)].bonus-points-formatdefaultauto| function(bonus-points) => [content] that determines how bonus points are visibly displayed. Defaults to a function that renders (X bonus points).points-positiondefault"start"| "margin-left" | "margin-right" | "end"Determines where the points are visibly displayed.
"start": before the question text.
"margin-left" or "margin-right": in the page margin. Those of every column go in that margin, stacked.
"end": right-aligned, after the question text.
points-show-totalsbooldefaultfalseWhen set to true, a question/part/subpart whose parts/subparts have points shows a total even when it is not given points itself: the sum of the points of its parts/subparts. One with no points of its own and none in its parts/subparts still shows none.
For example, #question[#part(points: 2)[]] shows 1. (2 points), with (a) (2 points) on the line below.
When set, a question that is assigned points while its parts/subparts are too shows a warning in red in place of its points.
points-table-directiondefault"horizontal"| "vertical"#points-table(): "horizontal" (a column per question) or "vertical" (a row per question).points-table-granularitydefault"question"| "part" | "subpart" | "page"#points-table(): one cell per "question" (the default), "part", "subpart", or "page".points-table-scorebooldefaultfalse#points-table() includes an empty row for a grader to fill in.points-table-bonusbooldefaultfalse#points-table() includes a row for the bonus points (only visible if the exam has bonus points).points-table-max-columnsdefaultnone| int#points-table(). A wider table wraps to multiple rows. Use none for no limit.