%%AMC:latex_engine=xelatex
\documentclass{article}
\usepackage{xltxtra}
\usepackage[bloc,separateanswersheet,automarks]{automultiplechoice}
\setmainfont{Linux Libertine O}
\begin{document}

\scoringDefaultS{b=3,m=-1,e=-1}

\element{chemistry}
{
    \begin{question}{Q002}
        At which of the four conditions, the density of nitrogen will be the largest?
        \begin{choiceshoriz}
            \wrongchoice{STP}
            \correctchoice{273 K and 2 atm}
            \wrongchoice{546 K and 1 atm}
            \wrongchoice{546 K and 2 atm}
        \end{choiceshoriz}
    \end{question}
}

    \insertgroup{chemistry}
    \clearpage

    \AMCformBegin

    %%% beginning of the answer sheet header

    \begin{center}
        \bf Answer sheet
    \end{center}

    \begin{minipage}{.47\linewidth}
    \namefield{\fbox{%
        \begin{minipage}{.9\linewidth}Name and Roll Number

            \vspace*{.5cm}\dotfill
            \vspace*{1mm}
        \end{minipage}}
        }
    \end{minipage}\vspace{2mm}

    \vspace{2mm}\noindent\hrule

    %%% end of the answer sheet header

    \AMCform

\end{document}
