I'm using the great exam package to create exams. But sometimes there are many students so I need to create different "versions" - Group A and Group B.
Mainly the differences are only the numbers in questions so the text of questions are similar. Now I do the follow:
- create a command named
\finalexamwhich has the questions with macros (\question[5] What is the result of $\a\cdot\b$) - create the macros (
\def\a{10},\def\b{20}) - call
\finalexam - change the macros (
\def\a{20},def\b{30}) - call
\finalexam
Is there any other (better) solution or a ready-to-use package?
Edit: a simple example
\documentclass{exam}
\usepackage[magyar]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{t1enc}
\usepackage{nicefrac}
\usepackage{siunitx}
\usepackage{multicol}
\pagestyle{empty}
\addpoints
\pointname{ pont}
\pointsinrightmargin
\marginpointname{ pont}
\begin{document}
\newcommand{\doga}{
\centerline{\large V. exam -- \group\ group}
\begin{questions}
\question[5]What is the result of $\a\cdot\b$?
\end{questions}}
%
\newcommand{\group}{A}
\renewcommand{\a}{5}
\renewcommand{\b}{10}
\doga
%
\renewcommand{\group}{B}
\renewcommand{\a}{10}
\renewcommand{\b}{20}
\doga
\end{document}
