有没有办法向考试类别添加可重复使用的元数据?

有没有办法向考试类别添加可重复使用的元数据?

假设我想建立一个大型的题目池,可以在考试和测试中重复使用,我该如何扩展考试类中的问题部分,以便添加对

  • 可以在教科书/网上找到该作业/解决方案的地方
  • 特定问题涉及哪部分工作/主要概念,最好将类似工作部分的问题放在一起,以及
  • 特定问题的难度级别

我主要使用模板和标准类,并没有扩展任何标准模板,所以请温和地回答。

\question[12] Did you need this?

\begin{solution}
Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore--- While I
nodded, nearly napping, suddenly there came a tapping, As of some
one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
and nothing more.’’
\end{solution}

能够添加变量或修饰符/元数据就太好了

  1. 参考
  2. 主要概念和
  3. 难度级别。

也许执行此操作的最佳位置是在解决方案部分内?

答案1

由于我仍然不知道你想要什么,所以我认为你可能想要(<- 糟糕的字距调整的好例子,是吗?)。

代码

\documentclass[answers]{exam}
\usepackage{pifont}
\usepackage{xifthen}
\usepackage{tikz}
\usepackage{makeidx}
\usepackage[columns=1]{idxlayout}
\makeindex
\usepackage[colorlinks]{hyperref}

\newcommand{\difflevel}[3][]% [some words], diff from 1 to 5, short question title
{ \ifthenelse{#2=1}{\xdef\mycolor{blue!50!gray}}{}
    \ifthenelse{#2=2}{\xdef\mycolor{green!50!gray}}{}
    \ifthenelse{#2=3}{\xdef\mycolor{yellow!50!gray}}{}
    \ifthenelse{#2=4}{\xdef\mycolor{orange!50!gray}}{}
    \ifthenelse{#2=5}{\xdef\mycolor{red!50!gray}}{}
    \pgfmathtruncatemacro{\dingnum}{201+#2}
    \tikz{\node[text width=\textwidth,inner sep=2pt] {\textcolor{\mycolor}{\ding{\dingnum}} #1};}
    %\index{Difficulty!1!#3@\ding{\dingnum}}
    \index{Difficulty!\ding{\dingnum}!#3}
}

\newenvironment{usefulstuff}{\textbf{Important concepts\\}}{}

\newcommand{\usefulconcept}[3]% label, linked text, further info
{   \tikz{\node[text width=\textwidth,inner sep=2pt] {$\bullet$ \hyperref[#1]{\textbf{#2}} #3};}
}

\begin{document}

\begin{questions}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[A particularly easy question]{1}{The first bogus question}
    \begin{usefulstuff}
        \usefulconcept{th.pythagoras}{The Pythagorean theorem}{is important here as there is a right angle in the triangle}
    \end{usefulstuff}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[Quite easy, if you listened in the lecture]{2}{The second bogus question}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[A little challenge, but you'll have to think carefully]{3}{The bogus question between second and fourth}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[Quite a challenge]{4}{The bogus question after the third}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[The question that will determine weather you're a PRO]{5}{The bogus question number five}
    \begin{usefulstuff}
        \usefulconcept{th.thales}{The theorem of Thales}{will be usefull as there's a semi circle involved.}
    \end{usefulstuff}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[A particularly easy question]{1}{The 6$^{th}$ bogus question}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[The question that will determine weather you're a PRO]{5}{The bogus question number seven}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\question[12] Did you need this?
    \begin{solution}\\
    \difflevel[A little challenge, but you'll have to think carefully]{3}{The bogus question between seventh and 9$^{th}$}
    \begin{usefulstuff}
        \usefulconcept{th.pythagoras}{Quantum mechanics}{need to be used as something really strange is going on.}
    \end{usefulstuff}
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--- While I
    nodded, nearly napping, suddenly there came a tapping, As of some
    one gently rapping, rapping at my chamber door. ‘‘\,’Tis some
    visitor,’’ I muttered, ‘‘tapping at my chamber door--- Only this
    and nothing more.’’
    \end{solution}

\end{questions}

\clearpage

{\fontsize{20}{24}\selectfont\noindent Important Concepts}
\begin{description}
    \item[Pythagorean theorem]\label{th.pythagoras}\index{Concept!Theorem!Pythagorean theorem} $a^2+b^2=c^2$
    \item[Thales' theorem]\label{th.thales}\index{Concept!Theorem!Thales' theorem} if A, B and C are points on a circle where the line AC is a diameter of the circle, then the angle ABC is a right angle.
    \item[Quantum mechanics]\label{pt.quantum}\index{Concept!Theory!Quantum mechanic} Tiny particles behave unexpectedly
\end{description}

\clearpage

\printindex

\end{document}  

结果

在此处输入图片描述

答案2

几天前ExSheets已上传至 CTAN。快速阅读后,它看起来很有希望。它允许向练习添加元数据并使用它们来过滤问题。

手册摘要部分内容:

ExSheets 提供创建练习或问题及其相应解决方案的方法。问题可以分为类别和/或主题,并可以有选择地打印。可以添加和恢复问题的元数据。

相关内容