[Tex/LaTex] LaTeX/XeTeX setup Tamil/Indic languages

indictamilunicode

I use TexMaker and LyX in Ubuntu. I'd like to typeset Tamil/Telugu/Hindi text, and so far I've been unsuccessful.

Please suggest me a working TeX/LaTeX/variants setup for Indic languages, especially Tamil.

edit: XeTeX seems to have good Unicode support, and I read TexMaker has XeteX support too. I installed all XeTeX, latex-tamil packages etc. But couldn't make them work yet.

Documentations talk about Arabic or Korean text. Nothing mentioned about Tamil/Indic text.

Best Answer

I will give what I learned by trial and error. This is pertaining to Windows platform.

( I used the material given found here at the XeLaTeX wiki.)

The trick is to

  1. use the fonts available in the system's font directory. (Windows7 provides Latha font for Tamil) and
  2. compile your source file with xelatex, not pdflatex! (For this in Windows platform, 'Texworks' can be used as this is an unicode editor. Check whether your favourite editor can save your file in utf-8 format)

In the preamble include the following

\usepackage{fontspec}

\newfontfamily{\lathatam}{Latha}

The declaration in the first set of parentheses is the command to call Tamil encoding in the body of your document such as:

{\lathatam அய்யா வணக்கம்.} 

I used Microsoft's Indic Tamil Input Method. (For downloading and installation see the relevant web site. You can also use Google's method).

Another Tamil font encoding is 'Arial Unicode MS'. To use this declare

\newfontfamily{\anothertam}{Arial Unicode MS}

in the preamble, and use it by doing:

{\anothertam நான் நலம். நீங்கள் நலமா}

When you compile with xelatex, you will see the difference between these fonts.