[XeTeX] Reset bold, italic or small-caps to "normal"

Andy Black andy_black at sil.org
Tue Mar 31 01:16:58 CEST 2009

I'm transforming some XML to use XeLaTeX.  The XML allows for sequences 
of embedded data like this (lines broken for clarity - I hope):

<p>I'm normal,
<object type="tBold">I'm bold</object>,
<object type="tItalic">I'm italic</object>,
<object type="tBoldItalic">I'm bold and italic</object>, and
<object type="tBoldItalic">Bold-italic <object type="tNormal">I'm an 
embedded normal</object> bold-italic </object>.</p>

Notice that at the end, it has an embedded <object> element which is to 
be typeset with neither bold nor italic even though its parent element 
is to be typeset using both bold and italic.

My transform currently produces this TeX output (lines broken for 
clarity - I hope):

I'm normal,
{\textbf{I'm bold}},
{\textit{I'm italic}},
{\textit{\textbf{I'm bold and italic}}}, and
{\textit{\textbf{Bold-italic {I'm an embedded normal} bold-italic}}}.

What I'm wondering is this: is there is a way to tell XeLaTeX to use 
"normal" rather than bold or italic for the "I'm an embedded normal" 
portion?  I see that there is \textnormal, but it uses the main document 
font and there is no guarantee that the main document font will be the 
correct one in the context.

Thanks for any help you can give on this,


More information about the XeTeX mailing list