# how to typeset document in indian script

Is there an MWE for typesetting indian scripts (like tamil / kannada). There are couple of examples for devanagari scripts. Can i use the same for other scipts.

As long as you have the appropriate fonts, you should be able to use XeLaTeX and the polyglossia package. Assuming that you have fonts that support Tamil already installed on your system (i.e., available to non-TeX applications like Open Office) XeLaTeX should find them automatically. As noted in the comments, if the Tamil font doesn't support Latin script characters, then you need to explicitly markup the non-Tamil text. I've shown how to do that in this example too.

% !TEX TS-program = XeLaTeX

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{tamil}
\setotherlanguage{english}
\newfontfamily\englishfont[Scale=.98]{TeX Gyre Termes}
\begin{document}

மதுரைத் திட்டம் எந்தவித அரசாங்க (அ) தனியார் நிறுவன உதவியின்றி, எந்தவித வியாபார
நோக்கமுமின்றி நடைபெறுகின்ற ஒரு தன்னார்வ \textenglish{(voluntary)} முயற்சி. 1998-ம்
ஆண்டு தமிழர் திருநாள் (பொங்கல்) அன்று ஆரம்பிக்கப்பட்ட இத்திட்டம் இன்றும் தொடர்ந்து
இயன்று வருகின்றது. உலகில் வெவ்வேறு நாடுகளில் வசிக்கும் முன்னூற்றுக்கு மேற்பட்ட தமிழர்களும்
தமிழார்வலர்களும் ஒன்றுகூடி இத்திட்டத்தை நடத்தி வருகின்றனர்.

\end{document}


(I don't know any Tamil, so the text above is simply taken from this web page.)

• Note that if the main font does not contain Latin-script characters, you'll need to indicate English words (like the “voluntary” in the example above) explicitly, so that a different script can be used for them. – ShreevatsaR Jul 20 '19 at 18:13
• @ShreevatsaR Thanks. I've updated the answer to show this. – Alan Munn Jul 20 '19 at 18:43

As of 2019, it is also possible to do this using the babel package and XeLaTeX. (There’s an experimental project with Harfbuzz and LuaTeX that should support it as well.)

\documentclass{article}
\usepackage{babel}
\usepackage{fontspec}

\babelprovide[main, import]{english}
\babelprovide[import]{tamil}

\defaultfontfeatures{Scale=MatchLowercase}
\babelfont{rm}[Scale=1.0]{Latin Modern Roman}
\babelfont[tamil]{rm}{Latha}

\begin{document}
\foreignlanguage{tamil}{தமிழ் அரிச்சுவடி-தமிழ் மொழி}
\end{document}


You can add Language=Default options to your \babelfont commands to suppress some harmless error messages.

• Just to be clear, neither polyglossia nor babel is strictly needed to just get paragraphs of text on the page, unless you want things like hyphenation, changing the formatting of headings like “Chapter” and “Section” or counters and page numbers, etc — and there the support varies. – ShreevatsaR Jul 20 '19 at 18:39
• @ShreevatsaR Yeah, but then you need to write your own environments that change the font, the script, and its features anyway, so it’s actually more complicated. – Davislor Jul 20 '19 at 18:50