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 am learning how to type an exam under the exam documentclass, below is how I typed it, but it couldn't be compiled and I have no clue why.

\documentclass[11pt,addpoints,a4paper]{exam}  

\begin{questions}  
\question Why is there air?  
\question What if there were no air?  
\end{questions}

I think there shouldn't be any mistake and I have checked that I have the exam.cls.
Many thanks for any help, I will really appreciate it!

share|improve this question

1 Answer 1

up vote 5 down vote accepted

As with all LaTeX documents, you need to include \begin{document}...\end{document} as follows:

% arara: pdflatex
\documentclass[11pt,addpoints,a4paper]{exam}  

\begin{document}
\begin{questions}  
\question Why is there air?  
\question What if there were no air?  
\end{questions}
\end{document}
share|improve this answer
    
Thanks! Now I learned a very important and basic knowledge. –  Henry Feb 1 at 4:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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