# How to add unicode (devanagari) text to a LaTeX document without using XeTeX or LuaTeX?

I am using an online LaTeX compiler(scribtex) so I dont have the luxury of using XeTeX and other LaTeX compilers.

I tried to include unicode text into my document using the following syntax:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}

\begin{document}

\section{Introduction}

song वो पहली बार जब हम मिले
\end{document}


But I get errors like the following on compiling:

Package inputenc Error: Unicode char \u8:प not set up for use with LaTeX.


Any ideas, on how to fix this?

• You can use XeLaTeX with ScribTeX: See the Choose your compiler: pdflatex, latex or xelatex blog entry. Jul 23 '11 at 13:19
• @diabonas: But there may be no proper font installed. I'm not sure which font I can try. Jul 23 '11 at 13:26
• @Leo Liu Devanagari MT is a font family installed with Mac OS X as default. Maybe you can try it. Jul 23 '11 at 14:56

Well, it is said that you can choose XeLaTeX in ScribTeX. I think you don't need worry about that.

If there is no font installed in ScribTeX's Linux system, you can try devanagari package in pdfLaTeX. I don't know Devanagari at all, but you can try.

The package doesn't use Unicode for pdfTeX, and needs a preprocess. Thus you may need to download the preprocessor to preprocess the file yourself and upload the file.

\def\DevnagVersion{2.15}
% After preprocess
\documentclass{article}
\usepackage{devanagari}
\begin{document}
{\dn d\?vAnA\2 E\3FEwy,}

{\dn Dm\0\322w\?/\? \7{k}z\322w\?/\? smv\?tA \7{y}\7{y}(sv, . \\
mAmkA, pA\317wXvA\396w\4v Ekm\7{k}v\0t s\2jy ..}
\end{document}