XeTeX: Difference between revisions

From SMC Wiki
No edit summary
Line 4: Line 4:
=== Creating documents using XeTeX ===
=== Creating documents using XeTeX ===


* Install TeX Live.
# Install TeX Live. <br/>Install latex and xetex. 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. <br/>In Fedora, you can install the packages texlive-latex and texlive-xetex.
Install latex and xetex. 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.
# Install Fontspec and Hyphenation packages. <br/>Install polyglossia and Indic hyphenation rules. <br/>In Fedora, the packages are texlive-fontspec, texlive-polyglossia and texlive-hyphen-indic
In Fedora, you can install the packages texlive-latex and texlive-xetex.
# Install the fonts. <br/> For Malayalam, let us try to use Rachana. <br/> In Fedora, the package is smc-rachana-fonts.
* Install Fontspec and Hyphenation packages.
# Create your tex document. <br/> An example document is: <br/>
Install polyglossia and Indic hyphenation rules.
#:<code>
In Fedora, the packages are texlive-fontspec, texlive-polyglossia and texlive-hyphen-indic
#: \documentclass{article}
* Install the fonts.
#: \usepackage{fontspec}
For Malayalam, let us try to use Rachana.
#: \usepackage{polyglossia}
In Fedora, the package is smc-rachana-fonts.
#: \setdefaultlanguage{malayalam}
* Create your tex document.
#: \setmainfont[Script=Malayalam]{Rachana}
An example document is:
#: \begin{document}
 
#: സീടെക്കിൽ മലയാളം ടൈപ്പ്സെറ്റ് ചെയ്തത്.
\documentclass{article}
#: \end{document}
\usepackage{fontspec}
#:</code>
\usepackage{polyglossia}
# Compile the document using XeTeX
\setdefaultlanguage{malayalam}
#:<code>
\setmainfont[Script=Malayalam]{Rachana}
#: xelatex yourdocument.tex
\begin{document}
#:</code>
സീടെക്കിൽ മലയാളം ടൈപ്പ്സെറ്റ് ചെയ്തത്.
\end{document}
 
* Compile the document using XeTeX
xelatex yourdocument.tex

Revision as of 10:23, 13 April 2013

XeTeX

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

Creating documents using XeTeX

  1. Install TeX Live.
    Install latex and xetex. 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.
    In Fedora, you can install the packages texlive-latex and texlive-xetex.
  2. Install Fontspec and Hyphenation packages.
    Install polyglossia and Indic hyphenation rules.
    In Fedora, the packages are texlive-fontspec, texlive-polyglossia and texlive-hyphen-indic
  3. Install the fonts.
    For Malayalam, let us try to use Rachana.
    In Fedora, the package is smc-rachana-fonts.
  4. Create your tex document.
    An example document is:
    \documentclass{article}
    \usepackage{fontspec}
    \usepackage{polyglossia}
    \setdefaultlanguage{malayalam}
    \setmainfont[Script=Malayalam]{Rachana}
    \begin{document}
    സീടെക്കിൽ മലയാളം ടൈപ്പ്സെറ്റ് ചെയ്തത്.
    \end{document}
  5. Compile the document using XeTeX
    xelatex yourdocument.tex