Thursday, December 10, 2020

Typesetting in Tamil using Babel in XeLaTeX

 

 I have written in an previous post on how to typeset in Tamil  using the Polyglossia Package. In this post we will typeset in Tamil using the Babel Package. To typeset as usual we have to load a few packages and these are the most important to load 

\usepackage{babel}
\usepackage{fontspec}    
                        \usepackage{microtype}
\usepackage{geometry}
\usepackage{blindtext}
\usepackage{seqsplit}
\usepackage[absolute]{textpos}
\usepackage[utf8]{inputenc} \usepackage[T1,TS1,OT1,OT4,TU,EU1,QX,T5,LY1]{fontenc}
  

Set the Following options in your preamble 

\babelprovide[main, import]{tamil}
\babelprovide[import]{english}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TAU-Barathi}[Renderer=Harfbuzz,Script=Tamil]
\newfontfamily\englishfont{Times New Roman}[Scale=0.98,Renderer=Harfbuzz,Ligatures=TeX]

Now we can begin our document 

 \begin{document}
  வணக்கம்                                            \end{document} 
 

 Now you can typeset in Tamil.

Reference: 

https://tex.stackexchange.com/a/498941/229186

https://tex.stackexchange.com/a/171448/229186

No comments:

Post a Comment

Popular Posts