Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

I was able to typeset Tamil using LaTeX on Ubuntu by installing the itrans and itrans-fonts packages via synaptic (or apt-get). It doesn't let you type in Tamil directly, rather you have to key in the ASCII transcription, then process it with itrans from the command prompt, then run (pdf)latex on the resultant file.

Say I have the following file nandri-pre.tex:

\documentclass{minimal}
\usepackage[preprocess]{itrans}

\newfont{\tmlb}{wntml12}
\newfont{\tmls}{wntml10}
\hyphenchar\tmlb=-1 
\hyphenchar\tmls=-1 

#tamilifm=wntml.ifm
#tamilfont=\tmlb

\begin{document}
Hi! {#tamil na^nRi #endtamil}
\end{document}

Process it with itrans:

$ itrans -i nandri-pre.tex -o nandri.tex

Then run (pdf)latex on nandri.tex, which is of course the file to edit if you have further text to add.

share|improve this answer

To use various indic languages in latex with texmaker I recommend following steps to be followed by viewers of this post.

  1. Download latest version of MikTeX. Install it in your system. I use the C:/latex/ directory.

  2. Download devnag developed by velthuis from CTAN. Install it in your system. I use the c:/latex/velthuis directory.

  3. Open mycomputer->all programmes->miktex->miktex settings. Go to root tab and add c:/latex/velthuis directory and click OK.

  4. Install TeXMaker and go to "user" tab and open "user command" and then "edit user command". Enter "devnagari" in menu item and commands

    c:/latex/velthuis/bin/devnag.exe %.dn|c:/latex/miktex/bin/latex.exe -interaction=nonstopmode %.tex|"C:/latex/MiKTex/miktex/bin/yap.exe" %.dvi     
    

    in command field. Click OK.

  5. Now devnagri will appear in dropdown in menu bar after arrow. You can add extra command using | having no space before and after |.

  6. Now copy misspal file from c:/latex/velthuis/doc/generic/ folder in TeXMaker and save it as misspall.dn. Now run devnagri command and you will see out put in DVI preview in devnagari script. If you want write document in tamils then use itrans instead of devnag. It is also working with LaTeX and TeXMaker very well.

  7. Remember %.dn means % denotes to filename without extension and .dn extension of file. Users must read doc or manual of devnag or itrans.

share|improve this answer
3  
While a link to your homepage may be part of your user profile, it should not be included in answers. –  lockstep Apr 10 '11 at 12:56

For Hindi, you can probably use the devanagari package for LaTeX. I've used it for Sanskrit. Just note that the "internal" codes for the script is a bit obtuse, so it is suggested that you follow the documentation and type in a more readable format, and then pass the source file through a preprocessor. (Included in the distribution.)

There are also language packages for Telugu and Tamil, but not having used either I cannot say more about them.

share|improve this answer
    
Thanks Willie. I've installed Tamil packages but couldn't get them work yet. Heard about Xetex's support for Unicode characters. Any idea how to use it in Ubungu? (Guess it should go to another question) –  ananth.p Jul 27 '10 at 21:11
    
Sorry, but I've really limited experience with Xetex, and had never played with the Tamil package myself. Good luck! –  Willie Wong Jul 27 '10 at 21:15
    
Will try devanagari first. 'Internal Codes' meaning I should be typing the source with some kind of hex code letter-by-letter? Thanks for the tip. –  ananth.p Jul 27 '10 at 21:30
    
This page has a code example that works (partially)- tug.org/pipermail/xetex/2009-December/015051.html Letters with dot about (க், ல்) are rendered wrong. TexMaker didn't help much. It wouldn't let me type in Tamil, but I could copy-paste unicode text into it. TexMaker, by default, tries to compile with Latex, I had to compile from command line ($ xelatex <source>) –  ananth.p Jul 27 '10 at 21:46

For my Ubuntu system I did as Lian Tze Lim suggested. Use the package manager to install the itrans and itrans-fonts packages. No muss No fuss.

For Windows and MiKTex 2.9 the set up process was more involved. Below is the batch file I created to facilitate the copying.

1) Install MiKTeX

2) Use the MiKTeX package manager to install the indic-type1 package and the devanagari packages.

3) download itrans53-win32.zip from http://www.aczoom.com/files/itrans/53/itrans53-win32.zip

4) extract itrans53-win32.zip to some temporary location. I used C:\temp\Tamil\ITRANS53.

5) Open a command window which is running as administrator. (many of the copies are into c:\program files\ and that requires the process be run with elevated privilege)

6) CD to the temporary location of ITrans (e.g. C:\temp\Tamil\ITRANS53)

7) execute the batchfile commands below.

8) close the command window

9) Right click on start->computer and select Properties.

10) Select Advanced System Settings->Environment Variables

11) add new system environment variable named: ITRANSPATH. See the batch file commands below for the exact value for this variable.

12) open a command window

13) The command:

itrans -I <filename>.itx -o <filename>.tex 

will now work and (pdf)latex can resolve the packages, fonts, and commands referenced in the output from itrans.exe.

I can now process LaTeX files in both Ubuntu and Windows 7 and have the source files (.Tex, .ITX, etc.) under revision control

The batch file is:

echo off

rem Record where is MikTeX is installed
set MiktexRoot=C:\Program Files\MiKTeX 2.9

rem copy itrans.exe to a directory already within the path environment variable
rem   namely the path adjustment made by the installer for MiKTeX which puts
rem   all of the MiKTeX installed tools on the PATH variable
rem
rem for 32-bit windows systems remove the x64 suffix
copy ".\bin\*.exe" "%MiktexRoot%\miktex\bin\x64\*.*" /Y /V 

rem Create the directories within the MikTeX structure used or referenced by the itrans package
mkdir "%MiktexRoot%\doc\itrans"
mkdir "%MiktexRoot%\doc\itrans\contrib"
mkdir "%MiktexRoot%\fonts\source\public\itrans"
mkdir "%MiktexRoot%\fonts\type1\public\itrans" 
mkdir "%MiktexRoot%\fonts\tfm\public\itrans" 
mkdir "%MiktexRoot%\fonts\afm\public\itrans" 
mkdir "%MiktexRoot%\fonts\truetype\public\itrans" 
mkdir "%MiktexRoot%\tex\latex\itrans"
mkdir "%MiktexRoot%\tex\latex\itrans\fonts"

rem Copy itrans package files into the MiKTeX structure
rem used http:\\tex.stackexchange.com\questions\1754\tamil-tex-in-windows
rem and the installation script for Tamil-Omega as guides for the copy commands
rem Listed below
rem

rem Copy Documentation files
copy ".\doc\*.*" "%MiktexRoot%\doc\itrans\*.*" /Y /V 
copy ".\contrib\*.*" "%MiktexRoot%\doc\itrans\contrib\*.*" /Y /V 
rem copy Font Files
copy ".\lib\fonts\*.mf"  "%MiktexRoot%\fonts\source\public\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.pfa" "%MiktexRoot%\fonts\type1\public\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.pfb" "%MiktexRoot%\fonts\type1\public\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.pfm" "%MiktexRoot%\fonts\type1\public\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.tfm" "%MiktexRoot%\fonts\tfm\public\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.afm" "%MiktexRoot%\fonts\afm\public\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.ttf" "%MiktexRoot%\fonts\truetype\public\itrans\*.*" /Y /V 
rem copy all of the ITRANS Lib structure into MiKTeX structure.
copy ".\lib\*.*" "%MiktexRoot%\tex\latex\itrans\*.*" /Y /V 
copy ".\lib\fonts\*.*" "%MiktexRoot%\tex\latex\itrans\fonts\*.*" /Y /V 

rem post installation commands to rebuilt the font name database ans to process all of the font MAPping files.    
texhash
updmap

rem
rem With the above copies MikTeX can now find the ITRANS fonts and resolve references created by the itrans.exe preprocessor
rem
rem But the preprocessor cannot be run from the command line because itrans.exe is expecting to find a 
rem specific ITRANS structure somewhere on the disk via the environment variable: ITRANSPATH
rem instruct the user about this environment variable requirement
rem

echo "Set the environment variable: ITRANSPATH"
echo "ITRANSPATH=%MiktexRoot%\tex\latex\itrans;%MiktexRoot%\tex\latex\itrans\fonts"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.