[XeTeX] Reset bold, italic or small-caps to "normal"
Ulrike Fischer
news3 at nililand.de
Tue Mar 31 10:08:02 CEST 2009
Am Mon, 30 Mar 2009 16:16:58 -0700 schrieb Andy Black:
> 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.
And what will be the correct one?
Do you want to go back to \upshape +\mdseries?
Or do you want to go back to the font of "I'm normal" regardless
what this font was (e.g. even if it was \slshape or \scshape or of
"light series".)?
And in the first case: what should <object type="tNormal"> give if
in the surrounding context there is also a change of family like
\textsf?
--
Ulrike Fischer
More information about the XeTeX
mailing list