[XeTeX] Redefining \em and \emph

Will Robertson wspr81 at gmail.com
Fri Sep 24 02:45:25 CEST 2010


On 2010-09-23 22:20:05 +0930, Gareth Hughes 
<garzohugo at gmail.com> said:

> Will Robertson wrote:
>> On 2010-09-23 09:07:39 +0930, Gareth Hughes 
>> <garzohugo at gmail.com> said:
>> 
>>> I'm looking at ways to redefine emphasis within Syriac text (seeing as
>>> slanted text is not traditional or pretty). I've got most of the
>>> redefinitions working, but I'd also like to redefine \emph as an alias
>>> for \aemph in Syriac text. What's the best way of doing that?
>> 
>> Good question.
>> I'm not very familiar with multilingual typesetting -- how do you switch
>> fonts? Is there a switch that you can query in this case?
> 
> I think the most obvious query would be directionality, so \if at RTL from
> Vafa's bidi package might be the appropriate test: it would be true for
> Syriac (and Persian etc.) and false for English (and Korean etc.). I
> don't know if polyglossia has any language conditionals, but that would
> give finer control.

It doesn't seem to. In that case I'd write something like

\let\oldemph\emph
\renewcommand\emph{%
  \if at RTL \expandafter\aemph \else \expandafter\oldelse \fi
}

Hope that helps,
Will




More information about the XeTeX mailing list