在 mcexam 中放置一个 tkz 图形(浮点数)

在 mcexam 中放置一个 tkz 图形(浮点数)

使用 mcexam 包,我想要一个问题引用一个图。

从图形上看,最好的方法是:

  • 问题运行完整的 \textwidth
  • 数字在问题下方的 .4\textwidth 列中
  • 可能的答案在图右侧的 .6\textwidth 列中

如果失败了,第二好的方案是:

  • 问题运行完整的 \textwidth
  • 数字问题下方的完整 \textwidth
  • 可能的答案图形下方的完整 \textwidth

这是第一个选项的 MWE,表明了我想要的评论:

\documentclass{article}

\usepackage[output=exam
  ,numberofversions=1
  ,version=1
  ,seed=1
  ,randomizequestions=true
  ,randomizeanswers=true
  ,writeRfile=false
]{mcexam}

\begin{document}

\begin{mcquestions}

\question What is missing from the figure below?
  % begin .4 \textwidth column
  % input figure
  % begin .6 \textwidth column
  \begin{mcanswerslist}[ordinal]
    \answer egg and bacon;
    \answer egg, sausage and bacon;
    \answer egg and Spam;
    \answer egg, bacon and Spam;
    \answer[correct] lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle paté, brandy and a fried egg on top and Spam
  \end{mcanswerslist}
  % end columns

\question Is this going to be on the exam?
\begin{mcanswerslist}[fixlast]
  \answer Russell's antinomy
  \answer Gödel's numbering
  \answer Borges' library
  \answer[correct] none of the above
  \answer all of the above
\end{mcanswerslist}

\end{mcquestions}

\end{document}

答案1

使用mcanswers环境而不是mcanswerslist环境可以让布局更加灵活。答案也会在此环境中随机化,尽管我不确定是否correct可以或如何使用该选项。

在该环境中,您可以使用minipage来放置图像,使用另一个minipage来放置答案列表。答案可以放在enumerate不带标签的列表中(使用enumitem包),使用\answernum宏作为每个答案的标签。请注意,enumerate不带标签的 并不是真正的 ,enumerate但它可以用作类似列表的环境。

梅威瑟:

\documentclass{article}
\usepackage{graphicx}
\usepackage{enumitem}

\usepackage[output=exam
  ,numberofversions=1
  ,version=1
  ,seed=1
  ,randomizequestions=true
  ,randomizeanswers=true
  ,writeRfile=false
]{mcexam}

\begin{document}

\begin{mcquestions}

\question What is missing from the figure below?
  \begin{mcanswers}
  \begin{minipage}{0.4\textwidth}
  \includegraphics[width=\textwidth]{example-image}
  \end{minipage}
  \begin{minipage}{0.6\textwidth}
  \begin{enumerate}[label=]
  \item\answernum{1} \answer{1}{egg and bacon;}
  \item\answernum{2} \answer{2}{egg, sausage and bacon;}
  \item\answernum{3} \answer{3}{egg and Spam;}
  \item\answernum{4} \answer{4}{egg, bacon and Spam;}
  \item\answernum{5} \answer{5}{lobster Thermidor aux crevettes with a Mornay sauce, served in a Provencale manner with shallots and aubergines, garnished with truffle pat\'e, brandy and a fried egg on top and Spam}
  \end{enumerate}
  \end{minipage}
  \end{mcanswers}

\question Is this going to be on the exam?
\begin{mcanswerslist}[fixlast]
  \answer Russell's antinomy
  \answer G\"odel's numbering
  \answer Borges' library
  \answer[correct] none of the above
  \answer all of the above
\end{mcanswerslist}

\end{mcquestions}

\end{document}

结果:

在此处输入图片描述

相关内容