Skip to content

Instantly share code, notes, and snippets.

@arthurlevy
Created April 16, 2026 16:26
Show Gist options
  • Select an option

  • Save arthurlevy/3e52e91cbf9a312f69b1359a8e33ebef to your computer and use it in GitHub Desktop.

Select an option

Save arthurlevy/3e52e91cbf9a312f69b1359a8e33ebef to your computer and use it in GitHub Desktop.
auto-multiple-choice tricks
%Auto-multiple choice tricks
\usepackage{tikz}
\usepackage[nomessages]{fp}
\newcommand{\baremesur}[1]{
\FPeval{\n}{clip(#1-1)}
\foreach \i in{0,...,\n} {\mauvaise{\i}\scoring{\i}} \bonne{#1}\scoring{#1}
}
\begin{question}{myref}
Write answer
\AMCOpen{lines=5}
{\baremesur{5}
}
\end{question}
\newenvironment{reponsescol}[1][2] %one argument, default value:2
{\begin{multicols}{#1} \AMCBoxedAnswers \begin{reponses} }
{\end{reponses} \end{multicols} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment