[XeTeX] Devanagari Ligature Problem Resolved --- Now Hyphenation

Neal Delmonico ndelmonico at sbcglobal.net
Wed Sep 30 21:58:28 CEST 2009


Yves Codet wrote:
> Hello.
>
> Le 29 sept. 09 à 22:12, Neal Delmonico a écrit :
>
>> Thanks for the suggestions.  It looks like I am up to date with 
>> MikTeX (2.8 and I regularly run update).  My gloss-sanskrit.ldf is 
>> dated 1/23/2009, too.  If the way I have the preamble set up is 
>> right, then it should work.  But for some reason the no Sanskrit 
>> hyphenation patterns load.  Maybe I will try TeX Live 2009 and see if 
>> that solves the problem.
>
> You must tell Polyglossia what is in Sanskrit. This modified version 
> of the original file works by me (with TeX Live 2008):
>
> %%%%%%%%%%
> \documentclass[10pt]{article}
>
> %\usepackage{bidi}
>
> \usepackage{polyglossia}
>
> \usepackage{fontspec,xltxtra,xunicode}
>
> \setmainfont[]{Gentium Basic}
>
> \setdefaultlanguage{english}
>
> \setotherlanguage{sanskrit}
>
> \newfontfamily\sanskritfont[Script=Devanagari,Mapping=velthuis-sanskrit]{Nakula} 
> % this defines a Sanskrit font which Polyglossia will use in a 
> Sanskrit environment
> \newcommand{\dev}[1]{{\begin{sanskrit}\large #1\end{sanskrit}}} % this 
> says that the text enclosed in \dev{} is in Sanskrit
>
> \textwidth=5cm
>
> \begin{document}
>
> \dev{
>
> \begin{verse}
>
> anyaabhilaa.sitaa"suunya.m j~naanakarmaadyanaav.rtam|\\
> aanukuulyena k.r.s.naanu"siilana.m bhaktiruttamaa||
>
> \end{verse}
>
> \noindent asyaartha.h---anyaabhilaa.saj~naanakarmaadirahitaa
> "sriik.r.s.namuddi"syaanukulyena kaayavaa"nmanobhiryaavatii kriyaa saa
> bhakti.h|| 1||
>
> }
>
> \end{document}
> %%%%%%%%%%
>
> The \textwidth=5cm is only to get more hyphenations. Incidentally, you 
> don't need to load bidi if your text is in English and Sanskrit.
>
> Best wishes,
>
> Yves
>
>

Thanks for the suggestion.  It seems to work, not with MikTeX 2.8 but 
with TeX Live 2008 which I have installed in the meantime.  How do I 
handle the ligature problem (\catcode `\~=12) then?  Also what does the 
#1 do and why is there a [1] after the {\dev}.  Sorry to be a pest.  I 
am trying to understand how this works.

Thanks,

Neal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20090930/2194dfbf/attachment.html>


More information about the XeTeX mailing list