\documentclass{article} %  -*- coding:utf-8 -*-

%http://svichet.wordpress.com/2008/06/12/khmer_unicode_latex/
\usepackage[bloc,completemulti]{automultiplechoice}    

\usepackage{fontspec}

\begin{document}

%\setfontwrapdefaultfont{}
%\setunicodegroupfont[Khmer]{KhmerOS}
%\fontspec{KhmerOS}

\setmainfont[Script=Khmer]{Khmer OS}
\newfontscript{Khmer}{khmr}
\newfontlanguage{Khmer}{KHM}
\XeTeXlinebreaklocale "khm"    % use to break line


\AMCrandomseed{1527384}

% questions...

\element{group}{
\begin{question}{test}    
 ភាសាខ្មែរ /   បញ្ច​តន្ត្រ​(៣)  /  មួយ​ពាន់​មួយ​យប់​(៨១)
 \begin{reponses}
    \bonne{ជំពូក}
    \mauvaise{មាតិកា}
    \mauvaise{បង្អែក}
    \mauvaise{សង្ខេប}
  \end{reponses}
\end{question}
}

\element{group}{
\begin{question}{integrale}    
  What is the value of $\int_0^1 x^2\,dx$ ?
  \begin{reponses}
    \bonne{1/3}
    \mauvaise{1/2}
    \mauvaise{0}
  \end{reponses}
\end{question}
}

\exemplaire{10}{    

%%% debut de l'en-tête des copies :    

\noindent{\bf QCM  \hfill KHMER TEST}

\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
\centering\large\bf Test\\ 01/01/2008\end{minipage}
\champnom{\fbox{    
                \begin{minipage}{.5\linewidth}
                  Name and surname:

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

\begin{center}\em
This is only for khmer characters testing: please forgive me if the text does not mean anything.
\end{center}
\vspace{1ex}

%%% fin de l'en-tête

\shufflegroup{group}
\insertgroup{group}

\cleardoublepage    

}

\end{document}
