Dec 19 2007
Dec 19 2007
Using Devanagari in Latex
Ever wanted to write latex documents in Hindi, Marathi or Sanskrit? This article shows you how to do just that. At the end of this article, you'll learn to go from here:

to here:

Setting up your system
On Windows
- Download and Install MikTeX.
Start the Package Manager.

Next, locate and install the devanagari package.

- Get the Devnag Binary and copy it to
C:\Program Files\MiKTeX 2.7\miktex\bin\.
That's it. We're all set to write latex documents in Devanagari!
On Linux
If you're running a debian based system, get the following packages: texlive-latex-base, texlive-lang-indic, texlive-fonts-recommended
Writing in devanagari
Now fire up your editor and add the following code:
1 % Using devanagari in latex 2 % http://pravin.insanitybegins.com/articles/ 3 % Pravin Paratey [pravinp -at- gmail -dot- com] 4 5 \documentclass[12pt]{article} 6 \usepackage{devanagari} 7 \begin{document} 8 Lets write in devanagari 9 10 {\dn calo devanagarI me likhate hai} 11 \end{document}
- Save this file as
sample.dn. - Next, go to the command line and type
devnag sample.dnto generate the corresponding sample.tex file. - Run
latex sample.texto generate sample.dvi
Figuring out what to type
Figuring out what string of English characters give a Devanagari word isn't always apparent. This document should be somewhat useful.