多项选择题,答案

多项选择题,答案

解决方案是,答案键是垂直显示的,这样需要很大的空间,当我打印它们时,我会使用更多的纸张,我希望答案键可以水平显示。谢谢

\documentclass{exam} \usepackage{answers}

\Newassociation{sol}{Solution}{ans}

\newtheorem{ex}{}{} \renewcommand\questionlabel{} 
\renewcommand\questionshook{\leftmargin0pt} \begin{document}

\Opensolutionfile{ans}[ans1] \section{Problems}

\begin{ex} 
\begin{questions} 
\question One of these things is not like the 
others; one of these things is not the same. Which one is different?

\begin{oneparchoices} 
\choice John 
\choice Paul 
\choice George 
\choice Ringo 
\choice Socrates \end{oneparchoices}
\begin{sol} 
Socrates 
\end{sol} 
\end{questions} \end{ex}

\begin{ex} \begin{questions} \stepcounter{question} \question One of these 
numbers is perfect.

\begin{oneparchoices} 
\choice $2$ 
\choice $28$ 
\choice $5$ 
\choice $3$ 
\choice $7$ \end{oneparchoices} \end{questions} 
\begin{sol} 
$7$ 
\end{sol} 
\end{ex}

\Closesolutionfile{ans} 
\section{Solutions} 
\input{ans1}

\end{document}

<code>在此处输入图片描述</code>

答案1

重新定义解决方案的显示方式。您可以根据需要更改答案之间的间距或格式的其他方面。

\documentclass{exam} \usepackage{answers}

\Newassociation{sol}{Solution}{ans}

\newtheorem{ex}{}{} \renewcommand\questionlabel{} 
\renewcommand\questionshook{\leftmargin0pt} \begin{document}

\renewenvironment{Solution}[1]{\textbf{#1} }{\hspace{10pt}} %NEW

\Opensolutionfile{ans}[ans1] \section{Problems}

\begin{ex} 
\begin{questions} 
\question One of these things is not like the others; one of these things is not the same. Which one is different?

\begin{oneparchoices} 
\choice John 
\choice Paul 
\choice George 
\choice Ringo 
\choice Socrates \end{oneparchoices}
\begin{sol} 
Socrates 
\end{sol} 
\end{questions} \end{ex}

\begin{ex} \begin{questions} \stepcounter{question} \question One of these numbers is perfect.

\begin{oneparchoices} 
\choice $2$ 
\choice $28$ 
\choice $5$ 
\choice $3$ 
\choice $7$ \end{oneparchoices} \end{questions} 
\begin{sol} 
$7$ 
\end{sol} 
\end{ex}

\Closesolutionfile{ans} 
\section{Solutions} 
\input{ans1}

\end{document}

相关内容