我是一名数学老师,我的测验有一个 .tex 模板,如下所示:
\begin{document}
\begin{flushleft}
Name: \underline{\hspace{2in}} \hfill /XX % where XX is the total possible points
\end{flushleft}
%\includeQuestionFrom{"../Questions/bankA.tex"} %Randomly chooses question from file "bankA.tex".
%\includeQuestionFrom{"../Questions/bankB.tex"} %Randomly chooses question from file "bankB.tex".
\includeQuestionFrom{"../Questions/bankC.tex"} %Randomly chooses question from file "bankC.tex".
%\includeQuestionFrom{"../Questions/bankD.tex"} %Randomly chooses question from file "bankD.tex".
\includeQuestionFrom{"../Questions/bankE.tex"} %Randomly chooses question from file "bankE.tex".
.
.
.
%\includeQuestionFrom{"../Questions/bankZ.tex"} %Randomly chooses question from file "bankZ.tex".
\end{document}
在这种情况下,生成的测验将包含来自 bankC 的一个问题和来自 bankE 的一个问题。到目前为止,这个系统运行良好,但是,我发现自己对注释和取消注释行的纠结比我愿意承认的要多,因此,我试图自己编写一个程序或脚本来帮我完成注释/取消注释部分。我想象界面很简单,类似于
唯一的问题是我完全不知道从哪里开始后端。