考试课程和 align* 环境

考试课程和 align* 环境

align我想知道环境和考试类之间是否存在冲突。我有以下内容,它给出了一个错误\begin{align*}

\documentclass[answers,11pt]{exam}
\usepackage{graphicx}
\usepackage{amssymb}

\title{xxx}
\author{yyy}
\date{ }   

\begin{document}
\maketitle

Please submit the answers by placing hard copy solutions in the assignment boxes.


\qformat{\textbf{Question~\thequestion.} \hfill} 

\begin{questions}
\question Given the following histories:

\begin{align*}
H_{1} = & \{W_{2}(x), W_{1}(x), R_{3}(x), R_{1}(x), W_{2}(y), R_{3}(y), R_{3}(z), R_{2}(x)\} \\
H_{2} = & \{R_{3}(z), R_{3}(y), W_{2}(y), R_{2}(z), W_{1}(x), R_{3}(x), W_{2}(x), R_{1}(x)\} \\
H_{3} = & \{R_{3}(z), W_{2}(x), W_{2}(y), R_{1}(x), R_{3}(x), R_{2}(z), R_{3}(y), W_{1}(x)\} \\
H_{4} = & \{R_{2}(z), W_{2}(x), W_{2}(y), W_{1}(x), R_{1}(x), R_{3}(x), R_{3}(z), R_{3}(y)\}
\end{align*}

\begin{parts}
\part Which of the above histories are conflict equivalent and why?
\part Which of the above histories are serializable and why?
\end{parts}
\end{questions}
\end{document}  

答案1

align(和)环境align*由以下定义:数学包。因此,您需要将其添加\usepackage{amsmath}到您的序言中。我会将其放在紧前面\usepackage{amssymb},这样 AMS 包就会一个接一个地加载。

相关内容