2

Here is the MWE:

\documentclass{article}
\usepackage[answers, usedefaultargs]{probsoln}
\PSNrandseed{\time}
\begin{document}
\newproblem*{1}{%
  This is Q1}
\newproblem*{2}{%
  This is Q2 करमल}
\newproblem*{3}{%
  This is Q3}
\useproblem{1}

\useproblem{2}

\useproblem{3}
\end{document}

\useproblem{2} does not include the non-latin characters when compiled with xelatex or lualatex.

How do I typeset questions with non-latin text?

deshmukh
  • 2,435
  • 1
  • 26
  • 46
  • 1
    Does your font support those characters? If not you need to change to another font for the non-latin characters. – TeXnician Oct 17 '17 at 05:24
  • @TeXnician Yes, indeed. Thanks. I added \usepackage{fontspec} and \newfontfamily\deva{Lohit Devanagari}. And added {\deva करमल}. And that did the trick. Will you please post this as an answer? I will, then, accept it. – deshmukh Oct 17 '17 at 06:34

1 Answers1

3

Your problem is that by default Latin Modern will be loaded, a font that does not support Devanagari (afaik). So you need to add a font that does have the characters you need (e.g. using fontspec). Then those non-latin characters need to be set using the other font.

TeXnician
  • 33,589