itrans package and the devanagari fonts, this exact question was asked on the TeX-LaTeX Stack Exchange site, to which I posted what worked for me. So this post is essentially a re-write of my answers there.(These instructions are LaTeX-only; I’ve not dabbled much in XƎLaTeX.)
Installation on Ubuntu (TeXLive)
This one’s easy. Grab theitrans and itrans-fonts packages for Tamil, and also the texlive-lang-indic package for the Hindi fonts via synaptic (or apt-get).Installation on Windows XP (MikTeX)
Grab thedevanagari package using MikTeX’s Package Manager. As for itrans, since it’s not packaged properly in MikTeX, so we’ll need to install it manually. Download itrans53-win32.zip from CTAN. After unzipping the contents (say C:\itrans53\), assuming <texmf> being your local TEXMF tree,- Move the contents of the
libfolder into<texmf>\tex\latex\itrans - Move the contents of the
fontsfolder into the appropriate locations, i.e. *.mfin<texmf>\fonts\source\itrans*.afmin<texmf>\fonts\afm\itrans*.tfmin<texmf>\fonts\tfm\itrans*.pfb,*.pfa,*.pfmin<texmf>\fonts\type1\itrans*.ttfin<texmf>\fonts\truetype\itrans*.fdin<texmf>\tex\latex\itrans- Refresh the file name database (e.g. via MikTeX Options/Settings)
Using itrans
itrans doesn’t let you type in Tamil or Hindi (or Marathi, Sanskrit, Telugu and Gujarati) 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
indic-pre.tex:
\documentclass[11pt]{article}
\usepackage[preprocess]{itrans}
\newfont{\tmlb}{wntml12}
\newfont{\tmls}{wntml10}
\newfont{\devnf}{dvng10 scaled \magstep1}
#tamilifm=wntml.ifm
#tamilfont=\tmlb
#hindiifm=dvng.ifm
#hindifont=\devnf
\begin{document}
Thank you!
{#tamil na^nRi #endtamil}
{#hindi dhanyavaad #endhindi}
\end{document}
\usepackage[preprocess]{itrans}
\newfont{\tmlb}{wntml12}
\newfont{\tmls}{wntml10}
\newfont{\devnf}{dvng10 scaled \magstep1}
#tamilifm=wntml.ifm
#tamilfont=\tmlb
#hindiifm=dvng.ifm
#hindifont=\devnf
\begin{document}
Thank you!
{#tamil na^nRi #endtamil}
{#hindi dhanyavaad #endhindi}
\end{document}
Process it with
itrans: (Windows MikTeX users need to change path to itrans53\bin to evoke itrans.exe
$ itrans -i indic-pre.tex -o indic.tex
Then run
(pdf)latex on indic.tex, which is of course the file to edit if you have further text to add. Here's the output of that little file:
Hold on! How’d you know you needed to type na^nRi etc?
I peeked at the transliteration map files ☺. For example, tamil.ps for the Tamil transliteration, dvng.ps for the Hindi (devanagari) transliteration, etc. If your LaTeX set up doesn’t install these files by default, you can download the package source .zip and look in the doc folder. The .itx files are sample source .tex files that generated the .ps files.
very nice
ReplyDeletebut i want to know how this newfont is defined
Rajan, I don't quite understand your question, can you describe in more detail what is it that you want to know?
ReplyDeleteThanks for sharing, I will bookmark and be back again.
ReplyDeleteTamil Transcription
@Rajan T K, There are many tools for creating fonts. E.g Metafont is a free but powerful tool.
ReplyDelete