[XeTeX] selecting feature in Devanagari MT with fontspec

Yves Codet ycodet at club-internet.fr
Wed Aug 10 10:38:16 CEST 2005


Le 10 août 05, à 02:59, Will Robertson a écrit :

>
> Yves wrote:
>
>>>
>>> Le 8 août 05, à 11:17, somadeva vasudeva a écrit :
>>>
>>>
>>>> I had slightly more success when I put another set of brackets 
>>>> around your def.:
>>>>
>>>> \newcommand{\dev}[1]{{\devanagarifont #1}}
>>>>
>>>
>>> Maybe Will will want to do something about the extra brackets :)
>>>
>
> Oh, NOW I see what the problem was! Sorry for the misunderstanding.
> Yeah, those brackets are required to limit the scope of the font 
> changing command. Remember, macros define "replacement text", so when 
> TeX sees \dev it essentially replaces it by whatever its definition 
> is.
>
> Compare "words words words \dev{something} words words words" when 
> "\dev{something}" is replaced by "\devanagarifont something" or 
> "{\devanagarifont something}"; only in the latter will the devanagari 
> font switch remain local to the word "something".
>
> Clear as mud, eh?
>

Indeed, but all I need to know is that it's a feature and no bug. 
Thanks for the clarification.

Best wishes,

Yves



More information about the XeTeX mailing list