[XeTeX] Latex+Tamil

R (Chandra) Chandrasekhar chyavana at gmail.com
Sat Dec 11 15:23:12 CET 2010


On Saturday 11 December 2010 06:58 PM, 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}
-- 
------------------
R (Chandra) Chandrasekhar
Web: http://swanlotus.com
email: chyavana at gmail.com
------------------
>
>
>
> 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.,.,.

Save
---
\documentclass{article}
\usepackage{fontspec}
\setmainfont{DejaVu Serif}
\newfontfamily{\tam}[Script=Tamil]{Lohit Tamil}
\defaultfontfeatures{Scale=MatchLowercase}
\begin{document}
{\tam நலம்} % <-- Changed here
\end{document}
---
into a file called example.tex and compile it with xelatex:

xelatex example.tex

and you should see it compile without errors and produce PDF output. I 
am on a system similar to yours and get no errors.

Also, if you intend to use Tamil script exclusively in a document, 
without other scripts, you might wish to set the main font as Tamil and 
hence bypass the need to declare {\tam நலம்} each time you use Tamil.

In that case, use:
---
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Script=Tamil]{Lohit Tamil}
\begin{document}
நலம்
\end{document}
---
and compile with xelatex.

HTH.

Chandra


More information about the XeTeX mailing list