examyv1.1.0

configelement

config

Global 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
Whether to show solutions. The --input show-solutions=.. command-line option overrides this setting.
institutiondefaultnone| content
The institution name shown by #maketitle().
exam-namedefaultnone| content
The name of the exam (e.g. Midterm 1) shown by #maketitle().
termdefaultnone| content
The term of the exam (e.g. Fall 2026) shown by #maketitle().
durationdefaultnone| duration | content
The length of the exam shown by #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
Whether to show rubrics (see #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| bool
Whether to draw a dotted line from each rubric item written in a question's text to the rubric. Setting to auto draws lines only for rubrics in the margin. A rubric item's own trace overrides this.
rubric-widthdefaultauto| length
The width of rubrics in the margin. Setting to auto fills the margin.
embed-metadatabool | auto | "rubric" | "question-regions"defaultfalse

Whether 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| color
The primary color for solutions; i.e., the color of the text of a solution or the outline and check mark of a filled-in bubble. Setting to auto derives it from solution-background-color.
solution-background-colordefaultauto| color
The background color for a solution. Setting to auto derives it from solution-color by lightening.
bubble-strokelength | color | gradient | tiling | stroke | dictionarydefault0.1em
The outline of bubbles drawn by #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"
The font of the labels inside bubbles (see choices-enumerate).
bubble-sizedefaultauto| length
The diameter of bubbles drawn by #choice[..], #bubble(), #square-bubble(), and #choices[..]. Setting to auto uses 1em (which scales with the surrounding text).
bubble-outsetlength | dictionarydefault(right: 0.4em)
The space around each bubble, specified like #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
Determines how #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
Show #choices[..] inline in a paragraph. If you would like a grid of choices, consider using choices-columns instead.
choices-columnsdefaultnone| int
Split #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
The space between items in a #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
The default height of an #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
The default width of an #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
The outline stroke of an #answer-box[..], specified like a box's stroke (e.g. (bottom: .5pt) for a single line to write on).
answer-box-filldefaultnone| color | gradient | tiling
The background fill of an #answer-box[..], specified like a box's fill (e.g. luma(245)).
answer-box-default-heightlengthdefault2cm
The height of an empty #answer-box[..] with an otherwise unspecified height.
answer-box-default-widthlengthdefault2cm
The width of an #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.5em
How far each question/part/subpart is indented from the question/part it is in (a question, from the left edge of the text).
numbering-fullbooldefaultfalse
Similar to enum'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
A 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
A 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-totalsbooldefaultfalse

When 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"
Determines the layout of #points-table(): "horizontal" (a column per question) or "vertical" (a row per question).
points-table-granularitydefault"question"| "part" | "subpart" | "page"
How points are grouped into the cells of a #points-table(): one cell per "question" (the default), "part", "subpart", or "page".
points-table-scorebooldefaultfalse
Whether #points-table() includes an empty row for a grader to fill in.
points-table-bonusbooldefaultfalse
Whether #points-table() includes a row for the bonus points (only visible if the exam has bonus points).
points-table-max-columnsdefaultnone| int
The maximum number of columns in a horizontal #points-table(). A wider table wraps to multiple rows. Use none for no limit.