[XeTeX] Nested \textit in an italic fontinstance

Bruno Voisin bvoisin at mac.com
Wed Sep 13 11:37:48 CEST 2006


Le 13 sept. 06 à 11:14, Will Robertson a écrit :

> OThe OP created a new LaTeX font family selected with "\italic"
> (as if you wrote \newcommand\italic{\fontfamily{xyz}\selectfont})
> and fontspec tried to "fill in the blanks" by using XeTeX's auto
> font recognition to obtain the matching italic and bold shapes to  
> match
> up with \textit and \textbf.
>
> The equivalent in Plain XeTeX would be
>   \font\1="Myriad Pro Italic"
>   \1 test
>   \font\2="Myriad Pro Italic/I" % what's the italic shape of an  
> italic font?!?
>   \2 surely this should be italic too? but maybe not

I'm not quite sure what you mean by "filling in the blanks", but on  
this issue I agree with Peter: in LaTeX, \textit{...} and  
{\itshape ...} should select the italic shape, whatever the context,  
in contrast to \emph{...} which should select italic when the context  
is upright, and upright when the context is italic.

As a result, "Myriad Pro Italic/I" should be exactly the same as  
"Myriad Pro Italic", I think. And \2 exactly the same as \1 in your  
above example. And \textit to have no effect at all when used in  
{\itshape ... \textit{...}}.

As to why would anybody want to write {\itshape ... \textit{...}},  
that's another story. Think, rather, of automatically produced code  
by packages or converters. For example, if you ever look at the HTML  
code produced by WYSIWYG HTML editors, or at the XML code produced by  
Pages or Keynote, then you'll be shocked by the amount of redundant  
markup that this code contains.

Bruno



More information about the XeTeX mailing list