我有以下示例考试文档,我想将其转换为 beamer 表示,以便每个问题在 beamer 演示文稿中都有自己的页面(这样我就可以逐一查看)。这可能吗?尝试将 {exam} 更改为 {beamer} 并保持其余部分不变当然行不通,因为无法识别不同的命令。也许两者之间有什么关系?
\documentclass[addpoints]{exam}
\usepackage{graphicx}
\begin{document}
\begin{questions}
\question
Question 1
\begin{choices}
\item answer 1
\item answer 2
\item answer 3
\item answer 4
\end{choices}
\question Question 2
\begin{choices}
\item answer 1
\item answer 2
\item answer 3
\item answer 4
\end{choices}
\end{questions}
\end{document}
答案1
并不是真正自动化的(你仍然必须在问题周围插入框架环境),但你可以模仿类中的命令exam
:
\documentclass{beamer}
\newcounter{points}
\newenvironment{choices}{\begin{enumerate}}{\end{enumerate}}
\newenvironment{questions}{\setcounter{points}{0}}{}
\newcommand{\question}[1][1]{\addtocounter{points}{#1}}
\begin{document}
\begin{questions}
\question
\begin{frame}{Question 1}
\begin{choices}
\item answer 1
\item answer 2
\item answer 3
\item answer 4
\end{choices}
\end{frame}
\question[42]
\begin{frame}{Question 2}
\begin{choices}
\item answer 1
\item answer 2
\item answer 3
\item answer 4
\end{choices}
\end{frame}
\end{questions}
\begin{frame}
Total number of points: \thepoints
\end{frame}
\end{document}