[XeTeX] selecting feature in Devanagari MT with fontspec
Will Robertson
will at guerilla.net.au
Wed Aug 10 02:59:00 CEST 2005
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?
Will
More information about the XeTeX
mailing list