0
\documentclass[12pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amssymb}
\begin{document}
\pagestyle{empty}
\begin{displaymath}
स्कूल
\end{displaymath}
\end{document}

This tex file throwing error ! Undefined control sequence.

I want to to use Unicode hindi chars in tex

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149

1 Answers1

2

What's happening in your case is that utf8x defines (for instance) the letter as \textdevanagarisa. I think that in turn is meant to be used with the LDV font encoding, which tries to use arialuni090t, and… it's all a mess.

Instead, just use XeTeX, with any font of your choice — compile the following with xelatex:

\documentclass[12pt]{article}

\usepackage{fontspec}
\setmainfont{Arial Unicode MS} % Or any font of your choice, which covers Devanagari
\tracinglostchars=2 % Usability bug in TeX: https://tex.stackexchange.com/q/41230/48

\begin{document}
स्कूल
\end{document}

You can use any system font that covers the Devanagari characters that you care about. (Also, you may want to pass [Script=Devanagari] to \setmainfont.) If your document contains a mixture of Devanagari and non-Devanagari (English, say) text, then you can use the polyglossia package and switch between languages when necessary, etc.

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149