quiz-2 directive#
The quiz-2 directive creates an interactive quiz using nested quiz-question and quiz-answer directives. This allows rich content (plots, code, images) inside questions and answers.
Basic usage#
:::::{quiz-2}
::::{quiz-question}
What is $2+2$?
:::{quiz-answer}
:correct:
4
:::
:::{quiz-answer}
3
:::
::::
:::::
What is \(2+2\)?
4
3
Syntax overview#
quiz-2— outer containerquiz-question— one per question; body is the question textquiz-answer— one per answer choice; use:correct:to mark the right answer
Options#
quiz-2 (container)#
Option |
Meaning |
Default |
|---|---|---|
|
Randomize answer order |
off |
quiz-answer (nested)#
Option |
Meaning |
Default |
|---|---|---|
|
Mark this answer as correct |
off |
Notes#
For simple text-only quizzes, see
quiz.