[XeTeX] Hyphenation in Transliterated Sanskrit

Yves Codet yves.codet at sfr.fr
Sun Sep 11 10:01:54 CEST 2011


Hello, Neal.

You could do something like this to have correct hyphenations:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Charis SIL}
\newfontfamily\sanskritfont[Script=Devanagari]{Sanskrit 2003}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{sanskrit}

\newcommand{\dev}[1]{{\begin{sanskrit}#1\end{sanskrit}}}
\newcommand{\tra}[1]{{\fontspec{Charis SIL}\begin{sanskrit}#1\end{sanskrit}}}

\textwidth 6cm % only to have more hyphenations

\begin{document}

Greetings. Greetings. Greetings. Greetings. Greetings. Greetings. Greetings. Greetings. Greetings. Greetings. Greetings. Greetings.

\dev{नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते। नमस्ते।}

\tra{Namaste. Namaste. Namaste. Namaste. Namaste. Namaste. Namaste. Namaste. Namaste. Namaste. Namaste. Namaste.}

\end{document}

Regards,

Yves

P.S. For some reason I don't receive Neal's messages but I do receive replies to his messages. Anything wrong with the list?







More information about the XeTeX mailing list