My main goal is to display Tamil script in LaTeX using ShareLaTeX. I would be happy to figure out a minimal working code to display வணக்கம் in ShareLaTeX.
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Tirukkural}
\date{April 2014}
\begin{document}
\maketitle
அகர முதல எழுத்தெல்லாம் ஆதி
பகவன் முதற்றே உலகு
\end{document}
I have tried several packages, however, I run into a lot of errors whenever I use them. Here are some of my attempts:
1) itrans-package: Transliteration Example
LaTeX/XeTeX setup Tamil/Indic languages
When I use the code suggested in the thread above, I get the error: 'File 'itrans.sty' not found'. How could I include it into ShareLaTeX?
2) otamil-package: Tamil Font Example
When I try to include the otamil-package the documentation says I have to install Yudit which would therefore not allow me to use tamil through ShareLaTeX. Does anyone have a suggestion how I could bring the code to use?
\usepackage[chandra]{otamil}
3) babel-package: Tamil Font Example
http://www.sharelatex.com/learn/International_language_support
ShareLaTeX has a sample code for using Russian script. However, applying the same logic to Tamil I get the following error message: Package babel Error: Unknown option `tamil'. Either you misspelled it
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english, tamil]{babel}
\usepackage[T1, T2A]{fontenc}
\begin{document}
அகர முதல எழுத்தெல்லாம் ஆதி
பகவன் முதற்றே உலகு
\end{document}
Best Answer
My best guess is that there is no solution for ShareLaTeX/WriteLaTeX at the moment. As far as I know, there is no font in TeX distribution supporting Tamil. There is/was support for Omega, see
tamil-omega
, but you cannot run it. Even an example initrans-xetex
uses theJanaTamil
font which must be installed somehow. There is a great support for Indic fonts in T1 encoding created by Karel Píška, but you cannot install it on those servers by yourself.There are fonts on the Internet, but you need to grab, install and use them, see a list of them. If you are a Microsoft Windows user, use
Arial Unicode MS
, if you are a Linux user, installttf-indic-fonts
package (8 fonts). If nothing from these options is working for you on your local computer, use the Code2000 font as a starting point.The only solution I see is to upload font file to the server's project (in the same way as uploading pictures) and use
ExternalLocation
from thefontspec
package (untested). Uploading files is possible in TeXonWeb project, http://tex.mendelu.cz/en/. It is similar project to the ShareLaTeX.Edit 1: I am uploading
TAMu_Kadampari.ttf
file from Linux distribution (ttf-indic-fonts
) as my testing font sample. I haven't found solution in ShareLaTeX (I am not able to switch toxelatex
/lualatex
frompdflatex
, so installing a font is almost impossible there, but uploading files is possible - I wrote an email to the maintainers if they could improve it), but after registration this approach works in WriteLaTeX, http://www.writelatex.com/, and TeXonWeb, http://tex.mendelu.cz/en/. I enclose several screenshots, the first picture is taken from ShareLaTeX (not working), the second picture is taken from WriteLaTeX (working) and the last one is from TeXonWeb project (it is working in Czech version, in English version we cannot switch the engine toxelatex
right now - I have notified the author of this project).Edit 2: It is working in ShareLaTeX as well. We need to switch to the project settings in the left tool bar, return to code and recompile the document. I illustrate it with two screenshots.
Screenshots from Edit 1:
Solution for local computer: On a local computer this task is rather easy as already mentioned by David Carlisle. Use
polyglossia
and run thexelatex
engine. I enclose my example and a preview of it.