Part 14: MatrixMCAnswer¶
With the answer type mc.matrix
you can arrange your multiple choice problem in a matrix layout.
\permuterows{min index}{max index}
\permutecolumns{min index}{max index}
\rowTitle{row title}
\columnTitle{column title}
\tasks
command. The labels are seperated by a simicolon. As usualyou can write TeX, math, use variables and image references as a label.
\tasks{column 1 label; column 2 label; ...}
, e.g.\tasks{$e^x$; some text; function $\var{f}$;\image{image lid}}
\begin{row} ... \end{row}
\text
command inside a row environment. As usual you can write TeX, math, use variables and image references as a label.
\text{row label}
As in other multiple choice problems, a choice is defined by a choice
environment.
See Part 2: create multiple choice problems for details.
Example code¶
(for result see screenshot above)
\begin{question} \begin{variables} \randint{a}{2}{7} \end{variables} \type{mc.matrix} \text{We are curious:} \explanation{Please reconsider your answer} \begin{answer} \text{What do you think of the following functions?} \permuterows{1}{2} %optional \permutecolumns{1}{3} %optional \rowTitle{Properties} %optional \columnTitle{Functions} %optional % column 1-4 labels \tasks{$sin(\var{a}x)$;$e^x$;$42$; \image[100][100]{image1}} \begin{row} % row 1 label \text{beautiful} \begin{choice} \solution{compute} \iscorrect{a}{<}{4} \end{choice} \begin{choice} \solution{true} \end{choice} \begin{choice} \solution{false} \end{choice} \begin{choice} \solution{false} \end{choice} \end{row} \begin{row} % row 2 label \text{useful} \begin{choice} \solution{true} \end{choice} \begin{choice} \solution{true} \end{choice} \begin{choice} \solution{true} \end{choice} \begin{choice} \solution{true} \end{choice} \end{row} \end{answer} \end{question}