Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I wonder if there is a conflict between the align environment and the exam class. I have the following and it gives an error for \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}  
share|improve this question
2  
You're aware you're not loading amsmath (which you need), are you? –  cgnieder Nov 16 '12 at 20:11
    
Real red face -- no, I had totally missed that straightforward issue. Thanks much. –  ozsu Nov 16 '12 at 20:13
2  
don't worry, it happens to all of us :) except egreg :) –  cmhughes Nov 16 '12 at 20:14
1  
@cgnieder: Started typing my answer before your comment (+1 for it) but was too slow. Well, should this be closed as too localized now? –  Stephen Nov 16 '12 at 20:24
    
@Stephen probably, @ ozso: never mind :) –  cgnieder Nov 16 '12 at 20:35
add comment

closed as too localized by cgnieder, Kurt, Stefan Kottwitz Nov 17 '12 at 0:23

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

The align (and align*) environment is defined by the amsmath package. Thus you need to add \usepackage{amsmath} to your preamble. I would place it immediately before \usepackage{amssymb}, thus that the AMS packages are loaded one after the other.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.