examyv1.1.0

A Typst package for writing exams, quizzes, and homework with automatically numbered questions, answer boxes, points accounting, smart cross-references, and solutions that can be toggled on and off. This package follows the spirit of the exam class for LaTeX.

A quiz with empty answer boxes and multiple-choice bubbles
A quiz…
The same quiz compiled with solutions shown
…and solutions from the same source.

Installation

To use examy, import it and start the exam with a show rule:

#import "@preview/examy:1.1.0": *

#show: exam

A quick-start template is available by choosing examy under Start from template in the Typst web app or on the command line by running

typst init @preview/examy

A first exam

A basic document is built out of an #exam[..]. Inside are questions, created with #question[..] (see Questions and numbering), along with #answer-box[..]s (see Answer boxes) for students to write in and #solution[..]s (see Solutions) whose visibility can be toggled to create regular/key versions of a test.

Additionally, examy comes with helpers like #name-block() to give students a place to write their name (see Cover pages).

#import "@preview/examy:1.1.0": *

#show: exam.with(show-solutions: false)

// A fill-in block (Name / Student ID) at the top of the page
#{
  set text(font: "DejaVu Sans Mono")
  name-block()
}

#question(points: 2)[
  State the definition of a _continuous function_.
  #answer-box(height: 1fr)[
    #solution[A function $f$ is continuous at $a$ if
      $lim_(x -> a) f(x) = f(a)$.]
  ]
]
#question(points: 3)[
  Give an example of a continuous function that is not
  differentiable.
  #answer-box(height: 2fr)[
    #solution[$f(x) = abs(x)$, at $x = 0$.]
  ]
]
ExamAnswer key

Basic features