XeTeX

From SMC Wiki

XeTeX

XeTeX is an extension of TeX with built-in support for Unicode and OpenType. For more details see http://scripts.sil.org/xetex

Installing XeTeX

XeTeX is packaged for all famous GNU/Linux distros. The installation method depends your distro. For ease of installation and configuration, we suggest to use a TeXLive version 2012 or above - either standalone TeXLive distribution or install from your distribution's package manager. Windows and OSX versions are also available.

Following packages are required to install to get a working xetex environment in your computer. Note that these packages are relatively large in size and will take time and bandwidth.

  1. texlive-xetex
  2. texlive-latex-extra

You also need reasonably good unicode compatible Malayalam fonts. These fonts also comes with GNU/Linux distros. Search for malayalam fonts in your package manager and install if not already installed. Eg fonts: Meera, Rachana etc.

Creating documents using XeTeX

A simple document to learn usage of xetex is given below.

Using a text editor like gedit or kate, create a new file with .tex as file extension. Eg: example.tex. Copy the following content as the content for that file and save

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{malayalam}
\setmainfont[Script=Malayalam]{Rachana}
\begin{document}
സീടെക്കിൽ മലയാളം ടൈപ്പ്സെറ്റ് ചെയ്തത്.
\end{document}

Now you need to compile this document to generate PDF. xelatex example.tex