[XeTeX] Temporarily change font

Steven Woody narkewoody at gmail.com
Fri May 16 07:54:06 CEST 2008


On Fri, May 16, 2008 at 11:31 AM, Will Robertson <wspr81 at gmail.com> wrote:
> On 16/05/2008, at 12:50 PM, Steven Woody wrote:
>
>> In my document, I need to temporarily change to another font for one
>> statement and then change back to the main roman font. How do i do
>> this?  Thank you.
>
> You want to do something like this:
>
> normal text {\fontspec{Zapfino} different text} normal text.
>
> Most things in LaTeX are scoped by braces. If you will be using the "other
> font" many times, then it would be better to write
>
> \newfontfamily\otherfont{Zapfino}
> ...
> normal text {\otherfont different text} normal text.
>
> Then you can change every single one by editing the \otherfont definition
> rather than a possibly error-prone search/replace.
>
> Will

Got it! Thanks.


More information about the XeTeX mailing list