rss

Self Picture

Natural Language Processing, Information Extraction and Search consultant.

 learn more   get in touch 

Logo - I Build Search
Dec 19
2007

Using Devanagari in Latex digg

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:

Latex Source Screenshot

to here:

Latex Devanagari Output Screenshot

Setting up your system

On Windows

  1. Download and Install MikTeX.
  2. Start the Package Manager.

    Starting MikTeX Package Manager

    Next, locate and install the devanagari package.

    MikTeX Package Manager

  3. 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
2
3
4
5
6
7
8
9
10
11
12
 
% Using devanagari in latex
% http://pravin.insanitybegins.com/articles/
% Pravin Paratey [pravinp -at- gmail -dot- com]
 
\documentclass[12pt]{article}
\usepackage{devanagari}
\begin{document}
Lets write in devanagari
 
{\dn calo devanagarI me likhate hai}
\end{document}
  1. Save this file as sample.dn.
  2. Next, go to the command line and type devnag sample.dn to generate the corresponding sample.tex file.
  3. Run latex sample.tex to 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.

10 Responses (rss) (trackback)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This page and its contents are copyright © 2010, Pravin Paratey.