I am preparing a multiple choice exam template, mainly with \oneparchoices
in exam class. I want to change \oneparchoices
(or using any other method), so that the answers always appear in three rows ( will be more clear with the MWE). Using the suggestion given in a previous discussion "Centering Answers in Exam Class", I did some work:
\documentclass[noaddpoints,12pt]{exam}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgf}
\footer{}{\thepage}{}
\usepackage{graphicx}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\setlength{\multicolsep}{1.2em}
\usepackage{color}
\usepackage{wrapfig}
\setlength{\columnseprule}{0.5pt}
\def\columnseprulecolor{\color{black}}
\usepackage{tasks}
\newenvironment{oneparchoicescentering}{
\begingroup
\leftskip=-0cm plus .5fil%
\rightskip=0cm plus -.5fil%
\parfillskip=0cm plus 1fil\relax
\begin{oneparchoices}
}{
\end{oneparchoices}
\par
\endgroup
}
\begin{document}
\noindent\framebox[\textwidth][s]{Test No: 001\hfill Topic: Elements}
\begin{multicols}{2}
\begin{questions}
\noindent\begin{minipage}{\linewidth}
\question Which one of the entries does not fit with the others?
\begin{oneparchoicescentering}
\CorrectChoice $\frac{\frac{1}{2}+1}{2+\pi}+1$
\choice $\sqrt{3\pi}$
\choice $e^x$
\choice Text
\choice $\int xdx$
\end{oneparchoicescentering}
\vspace{3cm}
\end{minipage}
\noindent\begin{minipage}{\linewidth}
\question Which one of the entries does not fit with the others?
\begin{oneparchoicescentering}
\CorrectChoice aaaaaaaaaa
\choice bbbbbbbbbb
\choice cccccccccc
\choice dddddddddd
\choice eeeeeeeeee
\end{oneparchoicescentering}
\vspace{3cm}
\end{minipage}
\end{questions}
\end{multicols}
\end{document}
Now, I want to make the following changes:
- As you can see, depending on the length of the answers, they appear in two or three rows. My purpose is to get the answers always in three rows (as in the second question of MWE), how can I do that ?
- The mathematical terms (especially the fraction) appear too small. Is there any way to avoid this ? (Probably I will need to increase the vertical spacing between the answer lines.)
- In the second question of MWE, choice B and choice D are not aligned. How can I avoid this ? (I believe that solving my first question will also solve this one, but I wanted to mention it.)
Thank you in advance, Cheers.
\dfrac{}{}
D
is wider thanB
. But the periods are aligned.