XeTeX is an extension of TeX with built-in support for Unicode and OpenType. In this tutorial, we are going to learn how to typeset Malayalam using XeTeX. With some learning effort, we can produce high quality typesetting using XeTeX.
XeTeX is a Unicode TeX engine which can load system fonts directly using the HarfBuzz library, which is built in. To do this, the \font primitive is extended. In order to support these major concepts, a range of TeX primitives are extended. For most LaTeX end users, these subtleties are transparent, with the LaTeX kernel and fontspec package providing interfaces.
Like Knuthโs TeX, it does not directly produce PDF output but rather works via an intermediate format, XDV (eXtended DVI). Unlike the classical DVI format produced by TeX, XDV files cannot be viewed directly, and are normally converted directly to PDF as part of the xetex run. (The conversion itself is carried out by xdvpdfmx.(reference)
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.
texlive-xetex
texlive-latex-extra
texlive-lang-other or
texlive-lang-indic (in older distros)
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.
Now you need to compile this document to generate PDF.
xelatex example.tex
Output of the above content should look like this:
The above tutorial is a very basic tutorial on using XeTeX with Malayalam. For detailed tutorial, please refer any tutorial available freely in internet. Example: https://en.wikibooks.org/wiki/LaTeX
Faux slanted text
To generate faux(artificial, fake) slanted text from a font that does not have it, following trick can be used: