| 1 |
\documentclass{ltxdoc} |
| 2 |
|
| 3 |
\usepackage{fullpage} |
| 4 |
\usepackage{url} |
| 5 |
\usepackage{holtxdoc} |
| 6 |
\usepackage{listings} |
| 7 |
\usepackage{xcolor} |
| 8 |
\usepackage{multicol} |
| 9 |
\usepackage{multiple-choice} |
| 10 |
|
| 11 |
\lstdefinestyle{BashInputStyle}{ |
| 12 |
basicstyle=\footnotesize\sffamily, |
| 13 |
frame=tb, |
| 14 |
columns=fullflexible, |
| 15 |
backgroundcolor=\color{gray!10}, |
| 16 |
} |
| 17 |
\lstset{basicstyle=\ttfamily} |
| 18 |
|
| 19 |
\title{The \xpackage{multiple-choice} Package} |
| 20 |
\author{Seiied Mohammad Javad Razavian} |
| 21 |
|
| 22 |
\date{\choicesdate,\space version \choicesversion} |
| 23 |
|
| 24 |
\parindent=0pt |
| 25 |
|
| 26 |
\thispagestyle{empty} |
| 27 |
|
| 28 |
\begin{document} |
| 29 |
\maketitle{ |
| 30 |
\centerline{\large\bfseries Abstract} |
| 31 |
\bigskip |
| 32 |
\begin{multicols}{2} |
| 33 |
The \xpackage{multiple-choice} package adjusts the choices of the multiple-choice question automatically. |
| 34 |
It has been wholly inspired by the work of Enrico Gregorio\footnote{\url{https://tex.stackexchange.com/questions/140923}} |
| 35 |
and improved by Vafa Khalighi. I've just packed and redistributed it. It works with \XeLaTeX, \pdfLaTeX, and \LuaLaTeX. |
| 36 |
Please, report any issues including bugs, typos in the documentation |
| 37 |
or feature requests on \url{https://github.com/javadr/multiple-choice.sty/issues}. |
| 38 |
\end{multicols} |
| 39 |
} |
| 40 |
|
| 41 |
\section{Loading Package} |
| 42 |
The package can be loaded in the ordinary way |
| 43 |
\cs{usepackage{multiple-choice}}. |
| 44 |
|
| 45 |
\section{Typesetting the multiple-choice question} |
| 46 |
The package defines the \texttt{choices} environment with the \cs{choice} macro for the choices of the multiple-chocie question. |
| 47 |
|
| 48 |
\begin{lstlisting}[style=BashInputStyle, escapechar={|},] |
| 49 |
\begin{choices} |
| 50 |
\choice The first choice. |
| 51 |
\choice The second choice. |
| 52 |
\choice The third choice. |
| 53 |
\choice The fourth choice. |
| 54 |
\end{choices} |
| 55 |
\end{lstlisting} |
| 56 |
|
| 57 |
\section{Sample} |
| 58 |
\begin{enumerate} |
| 59 |
|
| 60 |
\item First question? |
| 61 |
\begin{choices} |
| 62 |
\choice The first choice. |
| 63 |
\choice The second choice. |
| 64 |
\choice The third choice. |
| 65 |
\choice The fourth choice. |
| 66 |
\end{choices} |
| 67 |
|
| 68 |
\item Second question? |
| 69 |
\begin{choices} |
| 70 |
\choice The first choice. |
| 71 |
\choice The second choice. |
| 72 |
\choice The third choice. |
| 73 |
\choice The fourth choice. |
| 74 |
\choice The fifth choice. |
| 75 |
\choice The sixth choice. |
| 76 |
\end{choices} |
| 77 |
|
| 78 |
\item Third question? |
| 79 |
\begin{choices} |
| 80 |
\choice The very very very first choice. |
| 81 |
\choice The second choice. |
| 82 |
\choice The third choice. |
| 83 |
\choice The fourth choice. |
| 84 |
\end{choices} |
| 85 |
|
| 86 |
\item Fourth question? |
| 87 |
\begin{choices} |
| 88 |
\choice The very very very very very very very very very first choice. |
| 89 |
\choice The second choice. |
| 90 |
\choice The third choice. |
| 91 |
\choice The fourth choice. |
| 92 |
\end{choices} |
| 93 |
|
| 94 |
\end{enumerate} |
| 95 |
|
| 96 |
\end{document} |