[XeTeX] Latex+Tamil

Herbert Schulz herbs at wideopenwest.com
Sat Dec 11 14:39:36 CET 2010


On Dec 11, 2010, at 7:28 AM, Sengottuvel wrote:

> Dear all,
> 
>  I  following this code.
> 
> \documentclass{article}
> 
> \usepackage{fontspec}
> 
> \setmainfont{DejaVu Serif}
> 
> \newfontfamily{\tam}[Script=Tamil]{Lohit Tamil}
> 
> \defaultfontfeatures{Scale=MatchLowercase}
> 
> \begin{document}
> 
> நலம்
> 
> \end{document}
> 
> 
> Error Message:
> 
> ! Fatal fontspec error: "not-pdftex"
> 
> !
> 
> ! Requires XeTeX or LuaTeX to function!
> 
> !
> 
> ! See the fontspec documentation for further information.
> 
> ! For immediate help type H <return>.
> 
> Now i am using Texlive2010 and Ubuntu10.10.
> 
> 
> What solution.,.,.

Howdy,

You must use xelatex to typeset the file, not pdflatex.

Also, before the tamil you must put the \tam declaration to change to the tamil font:

\begin{document}

{\tam நலம்}

\end{document}

to isolate the tamil. If the complete document is in tamil you can leave out the braces:

\begin{document}
\tam

நலம்

\end{document}

which selects the tamil font for the complete document.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the XeTeX mailing list