← All templates

Exam from question banks (examz)

Two versions of an exam built with examz, each drawing one question at random from separate question-bank files.

Create an account to use this
Category
Teaching
Document class
examz (examz.cls) — ships with TeX Live
Workflow
Assignment / problem set — no revision rounds
Author
Christopher McClain
Source
CTAN
Licence
examz.cls: The LaTeX Project Public License 1.3c. Sample text: Manulyx, CC0 1.0 (free to use, no conditions).

What you get

  • main.tex — the file that is compiled · 2 KB
  • bank-derivatives.tex · 487 B
  • bank-integrals.tex · 527 B

These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.

Link to this template. Send it to a student or co-author: it starts a new paper in this template, through sign-up if they need an account.

https://manulyx.com/start/ctan-teaching-examz

Source

main.tex — the file that is compiled · 2 KB
% examz extends the exam class. Each compile picks a question at random from each bank
% file (option randomize, the default); use norandomize to keep the last selection.
\documentclass[11pt,addpoints]{examz}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{booktabs}

\setcoursename{Course Code -- Course Name}
\setexamname{Your paper}
\setinstructorname{Instructor Name}
\settermname{Term 2026}

\pagestyle{headandfoot}
\header{\coursename}{\examname}{Version \theversion}
\headrule
\footer{\instructorname}{Page \thepage\ of \numpages}{\termname}

\begin{document}

% Two versions of the exam, each with its own random selection from the banks.
\begin{versions}[2]

\begin{center}
  {\Large\bfseries \examname}\\[4pt]
  \coursename \quad \termname \quad Version \theversion
\end{center}

\noindent\namespace\hfill Student ID:~\makebox[4cm]{\hrulefill}

\vspace{8pt}
\noindent Show all of your work. This version has \numquestions\ questions worth \numpoints\ points.

\begin{center}
\gradetable[h][questions]
\end{center}

\begin{questions}
  \questionfrombank[10]{bank-derivatives}
  \questionfrombank[10]{bank-integrals}

  \question[5] The table gives the velocity $v$ of a cart at three times.
  \begin{center}
  \begin{tabular}{@{}lccc@{}}
  \toprule
  $t$ (s) & 0 & 2 & 4 \\
  \midrule
  $v$ (m/s) & 1.0 & 5.0 & 9.0 \\
  \bottomrule
  \end{tabular}
  \end{center}
  Find the acceleration, assuming it is constant.
  \begin{solution}[3cm]
    $a = \Delta v / \Delta t = (9.0 - 1.0)/4 = 2.0$\,m/s$^{2}$.
  \end{solution}
\end{questions}

\end{versions}

\end{document}
bank-derivatives.tex · 487 B

Loading…

bank-integrals.tex · 527 B

Loading…

The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗