我写了一个 MCQ,其中建议的答案数量异常多(7 个答案)。我意识到不可能对一个问题提出超过 5 个答案。MCQ 怎么能提供超过 5 个答案呢?
\documentclass[a4paper, 12pt,french]{article} % Présentation générale et mise en page
\usepackage[margin=5mm]{geometry}
\usepackage{siunitx}
\sisetup{locale=FR}
\usepackage[right]{eurosym}
%macro from https://tex.stackexchange.com/questions/440382/package-eurosym-how-to-change-the-decimal-separator
\makeatletter
\renewcommand{\EUR}[2][]{%
\if@EURleft\euro\,\fi
\num[#1]{#2}%
\if@EURleft\else\,\euro\fi
}
\makeatother
\usepackage{alterqcm}
\begin{document}
\begin{minipage}{.7\textwidth}
\begin{alterqcm}[lq=.7\columnwidth,num=false,symb = \dingsquare]
\AQquestion{problème 1}{%
{1},
{2},
{3},
{4}}
\AQquestion{problème 2}{%
{1},
{2},
{3},
{4},
{5}}
\AQquestion{problème 3 : choices 6 is invisible}{%
{1},
{2},
{3},
{4},
{5},
{6}}
\AQquestion{problème 4 : choices 6 and 7 are invisible}{%
{1},
{2},
{3},
{4},
{5},
{6},
{7}}
\end{alterqcm}
\end{minipage}
\end{document}
答案1
此修改后的\AQquestion
命令将显示最多 7 个答案。
\documentclass[a4paper, 12pt,french]{article} % Présentation générale et mise en page
\usepackage[margin=5mm]{geometry}
\usepackage{siunitx}
\sisetup{locale=FR}
\usepackage[right]{eurosym}
%macro from https://tex.stackexchange.com/questions/440382/package-eurosym-how-to-change-the-decimal-separator
\makeatletter
\renewcommand{\EUR}[2][]{%
\if@EURleft\euro\,\fi
\num[#1]{#2}%
\if@EURleft\else\,\euro\fi
}
\makeatother
\usepackage{alterqcm}
%****************************************************** added <<<<<<<<<<<<<
\makeatletter
\renewcommand{\AQquestion}[3][]{%
\setkeys[AQ]{local}{#1}%
\stepcounter{AQ@numquestion}%
\setcounter{AQ@numprop}{0} % v0.93
\setcounter{aq@numb}{0}%
\@for\liste:=#3\do{%
\stepcounter{aq@numb}%
\begingroup
\ifnum\aqlocall@ng=3 \nogreekalph\fi
\global\expandafter\let\csname aq@arg\alph{aq@numb}\endcsname\liste
\endgroup}%
\ifAQ@global@alea\ifAQ@global@VF%
\else
\aq@n@arg=0 %
\loop\ifnum\aq@n@arg<\value{aq@numb}\aq@melange\advance\aq@n@arg by1\repeat\fi
\fi
\aq@adjust{#2}%
\multirow{1}{\cmdAQ@global@lq}[\cmdAQ@local@pq]{%
\ifAQ@global@num\aq@style@numquest{\cmdAQ@global@numstyle{AQ@numquestion}.}%
\hspace{3pt}\fi%
\ifAQ@global@transparent\hrule height0pt depth0pt width\aq@wdquest%
\else#2\vss\fi%
}%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@arga}{1}\\%
\ifAQ@global@sep\cline{2-2}\fi%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@argb}{2}\\%
\ifAQ@global@sep\cline{2-2}\fi%
\ifnum\value{aq@numb}=2\hline\else\ifAQ@global@sep\cline{2-2}\fi%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@argc}{3}\\%
\ifnum\value{aq@numb}=3\hline\else\ifAQ@global@sep\cline{2-2}\fi%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@argd}{4}\\%
\ifnum\value{aq@numb}=4\hline\else\ifAQ@global@sep\cline{2-2}\fi%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@arge}{5}\\%
\ifnum\value{aq@numb}=5\hline\else\ifAQ@global@sep\cline{2-2}\fi%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@argf}{6}\\%
\ifnum\value{aq@numb}=6\hline\else\ifAQ@global@sep\cline{2-2}\fi%
&\setkeys[AQ]{local}{#1}\aq@prop{\aq@argg}{7}\\%
\hline\fi\fi\fi\fi\fi%
}%
\makeatother
%******************************************************
\begin{document}
\begin{minipage}{.7\textwidth}
\begin{alterqcm}[lq=.7\columnwidth,num=false,symb = \dingsquare]
\AQquestion{problème 1}{%
{1},
{2},
{3},
{4}}
\AQquestion{problème 2}{%
{1},
{2},
{3},
{4},
{5}
}
\AQquestion{problème 3 : choices 6 is visible}{%
{1},
{2},
{3},
{4},
{5},
{6}}
\AQquestion{problème 4 : choices 6 and 7 are visible}{%
{1},
{2},
{3},
{4},
{5},
{6},
{7}}
\end{alterqcm}
\end{minipage}
\end{document}