[XeTeX] Devanagari, xelatex, and \footnote

Hueckstedt, Robert A. (rah2k) rah2k at eservices.virginia.edu
Mon Aug 15 16:56:15 CEST 2016


For my purposes, the best way of solving this problem was to use the script below, from Zdenek Wagner, from the discussion in the cikitsa website (thanks, Dominik) (note that all I did was change \dev to \dn, for compatibility, and I changed the name of the font:

\newfontfamily{\devanagarifont}[Script=Devanagari,Language=Sanskrit,Mapping=velthuis-sanskrit]{Chandas}

\DeclareRobustCommand{\dn}{%
\let~\inactivetilde
\devanagarifont}
{\catcode`\~=12 \gdef\inactivetilde{~}}

Bob Hueckstedt
________________________________________
From: XeTeX [xetex-bounces at tug.org] on behalf of David Carlisle [d.p.carlisle at gmail.com]
Sent: Monday, August 15, 2016 5:36 AM
To: XeTeX (Unicode-based TeX) discussion.
Subject: Re: [XeTeX] Devanagari, xelatex, and \footnote

If you base it on catcode changes it will never work in the argument
of another command, not just footnotes. There is no need to switch
catcodes.

leave ~ as active always and when you want it locally to be a normal ~ do

\edef~{\string~}

so the active ~ just expands to a non-active one.

David



On 15 August 2016 at 09:58, ShreeDevi Kumar <shreeshrii at gmail.com> wrote:
> See
> http://cikitsa.blogspot.in/2010/09/xelatex-velthuis-encoding-and-palatal.html
> and the last comment .
>
> Here are modified tex and pdf files based on the above, tested with
> texlive2016. However, tilde does not get displayed in the english text.
>
>
>
> ShreeDevi
> ____________________________________________________________
> भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
>
> On Mon, Aug 15, 2016 at 9:12 AM, ShreeDevi Kumar <shreeshrii at gmail.com>
> wrote:
>>
>> You may need to use a footnotefont that supports devanagari.
>>
>> Or try using ucharclasses to automatically switch fonts based on unicode
>> blocks.
>>
>> ShreeDevi
>> ____________________________________________________________
>> भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
>>
>> On Mon, Aug 15, 2016 at 6:16 AM, Hueckstedt, Robert A. (rah2k)
>> <rah2k at eservices.virginia.edu> wrote:
>>>
>>> I attach a simple tex file and the pdf it produces to illustrate the
>>> problem.
>>>
>>> We set the ~ character to catcode 12 so that it can function normally in
>>> devanagari text (typed in the tex file in roman). When j and ~n come
>>> together in a word, then they produce the conjunct consonant as seen in the
>>> pdf file, but when the same j and ~n come together in the same word in a
>>> footnote, the catcode for ~ seems to revert to 13 and it causes the
>>> interword space. How do I make that ~ function in the footnote as it does in
>>> the text?
>>>
>>> Thanks in advance for any help or for any suggestions for other fora to
>>> use to solve this problem.
>>>
>>>
>>>
>>>
>>>
>>> --------------------------------------------------
>>> Subscriptions, Archive, and List information, etc.:
>>>   http://tug.org/mailman/listinfo/xetex
>>>
>>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list