[XeTeX] Devanagari Ligature Problem Resolved --- Now Hyphenation
Neal Delmonico
ndelmonico at sbcglobal.net
Sat Oct 3 11:21:32 CEST 2009
Thanks. This did the trick. I've found, however, that when I use the
\dev{} scheme in a page header or in the table of contents, I get all
kinds of errors and the program quits without completing the document.
My solution has been to use both \dev{} and {\dn }, the latter in
headings and toc where hyphenation is not that important and the former
(\dev{}) when I am typesetting large passages of Sanskrit. Somehow,
{\dn } does not offend xelatex.
On another note, is there something comparable for Bengali? I know
there is for Hindi and I shall need to ask about that at some point in
the near future. For now I have a book that uses occasional Bengali
script and would like to handle it the way I now do Sanskrit.
Best regards,
Neal
Yves Codet wrote:
> Hello.
>
> Le 30 sept. 09 à 21:58, Neal Delmonico a écrit :
>
>> 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?
>
> Sorry, I had forgotten about it. You can put that command in your
> preamble so that your test file now looks like this:
>
> %%%%%%%%%%
> \documentclass[10pt]{article}
> \usepackage{polyglossia}
> \usepackage{xltxtra} % this is enough because xltxtra loads fontspec
> and xunicode
> \setmainfont{Gentium Basic}
> \setdefaultlanguage{english}
> \setotherlanguage{sanskrit}
> \newfontfamily\sanskritfont[Script=Devanagari,Mapping=velthuis-sanskrit]{Nakula}
>
> \newcommand{\dev}[1]{{\begin{sanskrit}\large #1\end{sanskrit}}}
> \catcode`\~=12
>
> \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}
> %%%%%%%%%%
>
>
>> 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.
>
> [1] means that the new command \dev has one argument, the text that
> you want to typeset in Devanagari. #1 refers to that argument in what
> follows, i.e. the definition of \dev.
>
> Best wishes,
>
> Yves
>
>
>
>
>
>
More information about the XeTeX
mailing list