Dear All,<br><br>I am new to the wonderful TeX world.<br><br>I tried and successfully created Tamil documents using LyX. I believe I've created the necessary files for hyphenation in this language, and it works fine.<br>
<br>Where now I got blocked is while attempting to automatically switching the languages between English, Tamil & Malayalam. I can switch the font, but the command to switch language is resulting in a 'Tex capacity exceeded error'. I hope somebody from you will be able to help me to put the code right.<br>
<br>Here is my complete code:<br><br>\usepackage{fontspec}<br>\usepackage{xunicode}<br>\usepackage{xltxtra}<br>\usepackage{polyglossia}<br><br>\setdefaultlanguage{english}<br>\setotherlanguage{tamil}<br>\setmainfont{Arial}<br>
\newfontfamily\tamilfont[Script=Tamil]{Latha}<br><br>%Automatic language switching code<br>\newcount\cnt\cnt="0B80<br>\loop<br> \XeTeXcharclass\cnt=10 \ifnum\cnt<"0BFF \advance\cnt1<br>\repeat<br> XeTeXcharclass "200C = 10<br>
XeTeXcharclass "200D = 10<br><br>\XeTeXinterchartoks 0 10 = {\starttamil}<br>\XeTeXinterchartoks 255 10 = {\starttamil}<br>\XeTeXinterchartoks 10 0 = {\finishtamil}<br>\XeTeXinterchartoks 10 255 = {\finishtamil}<br>
<br>\newcommand\starttamil{\begin{tamil}}<br>\newcommand\finishtamil{\end{tamil}}<br><br>\XeTeXinterchartokenstate = 1<br><br>\begin{document}<br>English and தமிழ் and again some English between தமிழ் மேலும் தமிழ் மற்றும் ஆங்கிலம்.<br>
\end{document}<br><br><br>Thanks,<br><br>-- <br>Kevin Siji<br>
<img style="border: medium none ; position: absolute; z-index: 2147483647; opacity: 0.6; display: none;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADsElEQVR4nK2VTW9VVRSGn33OPgWpYLARbKWhQlCHTogoSkjEkQwclEQcNJEwlfgD/AM6NBo1xjhx5LyJ0cYEDHGkJqhtBGKUpm3SFii3vb2956wPB/t+9raEgSs52fuus89613rftdcNH8/c9q9++oe/Vzb5P+3McyNcfm2CcPj9af9w6gwjTwzvethx3Bx3x8xwd1wNM8d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