[OS X TeX] Intermingling fonts using Fontspec

Jonathan Kew jonathan_kew at sil.org
Sat Feb 17 14:48:44 EST 2007


On 17 Feb 2007, at 7:18 pm, Signups wrote:

> Greetings,
>
> I've just figured out the answer to my own question.  If I define  
> the command \gk{} as follows,
>
> \newcommand{\gk}[1]{\fontspec{Porson}#1\rmfamily}
>
> things turn out much better.

I think a better answer is probably:

   \newcommand{\gk}[1]{{\fontspec{Porson}#1}}

(Note the extra set of braces.)

Better still, if you're doing this often, I believe you could say:

   \newfontfamily{\porson}{Porson}
   \newcommand{\gk}[1]{{\porson #1}}

This saves fontspec having to re-evaluate the font name every time,  
so it is more efficient.

JK


------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list