[XeTeX] XeTeX & sanskrit : how to sart
Gildas Hamel
gweltaz at ucsc.edu
Tue Aug 14 23:27:19 CEST 2012
* Skriv a reas Helios (helios at frmail.net):
|>
|> Dear All,
|>
|> For example, at this page
|> http://www.sacred-texts.com/hin/mbs/mbs01001.htm
|> you can see sanskrit text in the left column.
|>
|> A little select followed by a copy/paste is enough.
|>
|> This font is unicode type and the file is in UTF-8
|>
|> In XeTeX, the same way product only error or unreadable result.
|>
|> How can i process with XeTeX ?
%!TEX TS-program = xelatexmk
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguage{sanskrit}
%\setmainfont[Ligatures=TeX,
% Scale=MatchLowercase]{Junicode} % Hoefler Text, etc.
\newfontfamily\sanskritfont[Script=Devanagari]{Sanskrit2003} % ou autre police
\begin{document}
Texte en français, suivi de ce texte copié sur la page web:
\textsanskrit{नारायणं नमस्कृत्य नरं चैव नरॊत्तमम}
Retour au français.
Forme versifiée:
\begin{sanskrit}
\begin{verse}
0 नारायणं नमस्कृत्य नरं चैव नरॊत्तमम\\
देवीं सरस्वतीं चैव ततॊ जयम उदीरयेत
\end{verse}
\end{sanskrit}
\end{document}
--Gildas
More information about the XeTeX
mailing list