I want to create a multi-language document using polyglossia in which Khmer is set to be a main language and English as another language. I also have khmer-gloss.ldf available so that Khmer font is a default font. All pseudo codes appears in boxes as in the picture below and even caption does not display either. I know it is the problem of font but I am pretty new to polyglossia package. Anybody knows how to solve this problem? The below code is just an example.


\newfontfamily{\khmerfont}[Script=Khmer,BoldFont={Khmer OS Content},ItalicFont={Khmer OS Content},Scale=0.9]{Khmer OS Content}
\newfontfamily{\K}[Scale=0.90]{Khmer OS Content}
\newfontfamily{\T}[Scale=0.90]{Khmer OS Moul}

\setsansfont[Script=Khmer,Scale=0.95]{Khmer OS Content}
\setmonofont[Script=Khmer,Scale=0.95]{Khmer OS Content}

អាល់កូរីតដើម្បីរកតួចែករួមធំបំផុត (\textenglish{PGCD})។

    \underline{function Euclid} $(a,b)$\;
    \Input{Two non negative integers $a$ and $b$}
        return $a$\;
        return Euclid$(b, a mod b)$\;
    \caption{\textenglish{Euclid's algorithm for finding the greatest common divisor of two non negative integers}}


enter image description here

Another problem that I encountered is that the command \mod is not recognised either. If I wrote this

   return $a$\;
   return Euclid$(b, a \mod b)$\;

I got error "Undefined control sequence return Eucli$(b, a \mod ..."


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.