I'm trying to create beautiful Mcq (Multiple Choice Question) Answer Grid so could someone help me please to improve it with the following needs:
- Add Arguments to get automatic row-column numbers in grid table
- to mark correct answer automatic with
\ding{53}
The input would resemble \McqAnswerGrid{<number of questions>}{<number of choices>}{<correct cells>} where the <number of choices> should be alphabetically enumerated and <correct cells> is a list of lists containing possible correct choices.
Here is an example of input of arguments you can make your own or adapt with that one:
Indicate all the answers that apply
\McqAnswerGrid{6}{6}{ {1,2,3},{1,6},{1,3},{2,3},{2,4},{2,4} }implies we have 6 question with 6 choices A, B, C, D, E, and F where answers that apply to
Question 1 are 1, 2, and 3
Question 2 are 1, and 6
Question 3 are 1, and 3
Question 4 are 2, and 3
Question 5 are 2, and 4
Question 6 are 2, and 4
Select one answer choice
\McqAnswerGrid{5}{4}{ {1},{1},{3},{2},{4} }implies we have 5 question with 4 choices A, B, C, and D where the correct answer for
Question 1 is 1
Question 2 is 1
Question 3 is 3
Question 4 is 2
Question 5 is 4
Note that most books provide 4 choices for Mcq math, while others may provide 5 or 6 at most, so the maximum number of choices will be 6 at least and for the maximum number of questions 80 at least.
At first I tried with tikz and after that tabular but it takes lot of time to fill it manually.
Here is my code:
\documentclass{article}
\usepackage{tikz}
\newcounter{row}
\newcounter{col}
\usepackage{tabu}
\usepackage{pifont}
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=.4]
\begin{scope}
\draw (0, 0) grid (5,10);
\end{scope}
\end{tikzpicture}
\end{center}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
N & A & B & C & D & E & F \\ \hline
1 & \ding{53} & \ding{53} & \ding{53} & & & \\ \hline
2 & \ding{53} & & & & & \ding{53}\\ \hline
3 & \ding{53} & & \ding{53} & & & \\ \hline
4 & & \ding{53} & \ding{53} & & & \\ \hline
5 & & \ding{53} & & \ding{53} & & \\ \hline
6 & & \ding{53} & & \ding{53} & & \\ \hline
\end{tabular}
\begin{tabular}{|c|c|c|c|c|}
\hline
N & A & B & C & D \\ \hline
1 & \ding{53} & & & \\ \hline
2 & \ding{53} & & & \\ \hline
3 & & & \ding{53} & \\ \hline
4 & & \ding{53} & & \\ \hline
5 & & & & \ding{53} \\ \hline
\end{tabular}
\end{document}
If someone can't make it with this input of arguments you can come up with your one solution to cover that problem.




\McqAnswerGrid{10}{5}{1,1,3,2,4,2}. Also, what would your the macro look like that would result in your picture?\McqAnswerGrid{12}{4}{?}... – Werner Dec 23 '15 at 20:4910is the number of questions (N in your picture, running down) and5is the number of choices (A, B, C, D, E, for example)? You need to be very clear what you want. Specifics are important. – Werner Dec 23 '15 at 20:53\ding{53}in some locations. Surely they indicate incorrect choices made, but you never mention how they are obtained/used in your example. – Werner Dec 23 '15 at 20:59@in front of their user name. However, you can only ping one person per comment. (You don't need to do this if only you and one other person are commenting as the system will automatically ping the other person. But as soon as there are 3 of us, the system will only ping you as it is your question, and nobody else.) – cfr Dec 24 '15 at 02:21