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

Neal Delmonico ndelmonico at sbcglobal.net
Mon Sep 28 13:02:19 CEST 2009


>
> On Thu, Sep 24, 2009 at 4:21 PM, Neal Delmonico
> <ndelmonico at sbcglobal.net <http://tug.org/mailman/listinfo/xetex>> wrote:
> >/ Greetings,
> />/
> />/ I am new to XeTeX though I have been working with LaTeX using the Devanagari
> />/ and Sanskrit packages for years. Recently I decided to see what Unicode and
> />/ XeTeX is about and after some struggle have managed to set up a document
> />/ using both Devanagari and English that looks great, with one small
> />/ exception, I can't get the j + n combination to work. Since I am used to the
> />/ Velthuis system of typing in Devanagari, I start with the Velthuis system
> />/ and use mapping of the text with velthuis.tec. It works great again with
> />/ this one exception. In the Velthuis system the j~na combo is turned into ???
> />/ . But now the result is j with halanta, a space, and a dental n. I have
> />/ tried various fonts but always with the same result. Any suggestions?
> />/
> />/ Here is my preamble:
> />/
> />/ \documentclass[10pt]{article}
> />/
> />/ \usepackage{bidi}
> />/
> />/ \usepackage{polyglossia}
> />/
> />/ \usepackage{fontspec,xltxtra,xunicode}
> />/
> />/ \setmainfont[]{Gentium Basic}
> />/
> />/ \setdefaultlanguage{english}
> />/
> />/ \setotherlanguage{sanskrit}
> />/
> />/ \newfontfamily{\dev}[Script=Devanagari,Mapping=velthuis-sanskrit]{Nakula}
> />/
> />/
> />/ And here is the input text:
> />/
> />/
> />/ {\dev \large
> />/
> />/ \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 kaaya\-vaa"n\-manobhiryaavatii kriyaa saa
> />/
> />/ bhakti.h|| 1||
> />/
> />/ }
> /
> I am a newbie to using xetex and have been working on a few devanagari
> documents myself. Did you look at the examples (especially
> xetex-misspaal.tex) posted here:
> http://www.ctan.org/tex-archive/language/devanagari/velthuis/doc/generic/velthuis/
>
> I made the following changes to your doc and can now see the conjunct
> consonant j~n as expected:
>
> newcommand\dn{\catcode`\~=12
> \fontspec[Script=Devanagari,Mapping=velthuis-sanskrit]{Nakula}}
>
> {\dn \large
>
> \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 kaaya\-vaa"n\-manobhiryaavatii kriyaa saa
>
> bhakti.h|| 1||
>
> }
>
>   

Thanks.  This resolved the problem.  I now get that ligature.  The 
problem for me now is how to get the hyphenation working.  I don't 
recall whether it was working before making this change, but it 
certainly is not now.

Here is what I have in the preamble:

\usepackage{polyglossia}

\usepackage{fontspec,xltxtra,xunicode}

\setmainfont[]{Gentium Basic}

\setdefaultlanguage{english}

\setotherlanguage{sanskrit}

\newfontfamily\sanskritfont{Nakula}

\newcommand\dn{\catcode `\~=12

\fontspec[Script=Devanagari,Mapping=velthuis-sanskrit]{Nakula}}


I am using TeXworks to generate the pdf.

Using these settings I get the following error message:

"("C:\Program Files\MiKTeX 2.8\tex\xelatex\polyglossia\gloss-sanskrit.ldf"

Package polyglossia Warning: No hyphenation patterns were loaded for 
`Sanskrit'

(polyglossia) I will use the patterns loaded for \language=0

(polyglossia) instead on input line 6."


Where am I going astray?

> The advantage of using xetex is that you can directly input devanagari
> text into your document using your system fonts and map this
> devanagari input to one of the unicode-compatible fonts such as Nakula
> / Sahadeva / Sanskrit 2003 that you'd like to see in your pdf.
>   
Any suggestions for a devanagari input method that might be better 
(easier) than using the velthuis system?  I am working in Vista and with 
MiKTeX. 

Thanks.

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


More information about the XeTeX mailing list