rss
logo

I provide consulting and custom development for Natural Language Processing, Information Extraction and Search solutions.Self Picture


 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.

8 Responses (rss) (trackback)

#1

Amber Habib

January 29th, 2008 at 2:37 pm

Thanks – I wanted to add a comment about the pronunciation of the Greek letter chi to a TeX document and your page helped me do that using Devanagari.

#2

Bala

July 20th, 2008 at 6:02 pm

That is fine, but what if want to input text in Devnagari itself, and not in Roman? Is there a way to do that?

I have heard about omega, ucs.sty, etc., could you explain how to get these things working?

#3

Dawar Praveen

October 15th, 2008 at 3:36 am

achaa laga yaha aakar talash khatma ho gayI
dhanyabaad

praveen

#4

P.C.

December 15th, 2008 at 4:02 pm

hi,
how do I write the letter “sha” (?) in the Devnag transliteration system?
dhanyavaada.

#5

sindhu

January 25th, 2009 at 5:59 pm

is there a way i can get direct typesetting in hindi using latex? i dont want transileration, its too much of a pain to type.

#6

Benjamin Slade

July 15th, 2009 at 5:07 am

sindhu – you can use xelatex for direct typesetting in devanagari: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=XeTeX

#7

Satish

October 17th, 2009 at 2:03 pm

How do u type Marathi letter L which is unique to marathi only.
Is there any manual for the procedure you have explained ?

#8

v8r

November 8th, 2009 at 7:30 pm

Hi,

Can you tell what is the procedure for MAC OS X?

Thanks,
v8r.

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="">

Latest Articles

Feb
19

Join a list of integers in Python

How do you run a string join on a list of integers in Python? After googling for about 10 mins, I gave up and did this. I am sure there is a better way of doing it! [Read More]
Jan
21

Writing a spider in 10 mins using Scrapy

I came across Scrapy a few days back and have grown to really love it. This tutorial will illustrate how you can write a simple spider using Scrapy to scrape data off Paul Smith. All this in 10 minutes. [Read More]

Featured Projects

NLP classes for PHP

NLP classes for PHP

This is an ongoing project to develop a set of classes for Natural Language Processing. Some code would be ported from the NLTK project.

[Read More]

Yahoo Messenger Client for *nix

Yahoo Messenger Client for *nix

Yux is an alternative Yahoo Messenger client for *nix systems that attempts to match the look and feel of the original Windows client.

[Read More]

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