帶有考試課程和 probsoln 套件的隨機問題排序

帶有考試課程和 probsoln 套件的隨機問題排序

我正在使用exam帶有probsoln包的課程來對學生應該知道的材料的隨機子集進行測驗。如果我做這樣的事情:

\documentclass[12pt,addpoints]{exam}
\usepackage{probsoln}

\begin{document}


        \header{English 213}{Quiz on vocab lists 1--2}{Fall 2017}


    \loadrandomproblems{5}{prob_set_1.tex}
    \loadrandomproblems{5}{prob_set_2.tex}


    \begin{questions}
    \foreachproblem{\question[1]\thisproblem\dotfill}
    \end{questions}

\end{document}

我從問題集 1 中得到五個隨機問題,然後從問題集 2 中得到五個隨機問題。

我確實嘗試過

\loadrandomproblems{10}{prob_set_1.tex,prob_set_2.tex}

但這產生了一個錯誤。

答案1

從 v3.05 (2017-07-10) 開始,您可以提供以逗號分隔的檔案名稱清單:

\loadrandomproblems{10}{prob_set_1.tex,prob_set_2.tex}

在新版本可用之前,這是一個臨時修復:

\documentclass[12pt,addpoints]{exam}
\usepackage{probsoln}

\begin{document}


        \header{English 213}{Quiz on vocab lists 1--2}{Fall 2017}


    \let\orginput\input
    \makeatletter
    \renewcommand*{\input}[1]{\@for\thisfile:=#1\do{\orginput{\thisfile}}}
    \loadrandomproblems{10}{prob_set_1.tex,prob_set_2.tex}
    \makeatother
    \let\input\orginput

    \begin{questions}
    \foreachproblem{\question[1]\thisproblem\dotfill}
    \end{questions}

\end{document}

相關內容