[XeTeX] Error with \newfontfamily

Alan Munn amunn at gmx.com
Tue Jan 18 18:32:26 CET 2011


On Jan 18, 2011, at 12:22 PM, Herbert Schulz wrote:

> 
> On Jan 18, 2011, at 11:12 AM, Alan Munn wrote:
> 
>> I've encountered a weird error with \newfontfamily.  What am I doing wrong?  -Alan
>> 
>> Minimal example:
>> 
>> % !TEX TS-program = XeLaTeX
>> 
>> \documentclass{article}
>> \usepackage{fontspec}
>> \setmainfont{Linux Libertine O}
>> %\newfontfamily\LM{\fontspec{Luxi Mono}} % fails if uncommented
>> \begin{document}
>> Some text.
>> {\fontspec{Luxi Mono}\selectfont Some Text} % even though this works
>> \end{document}
>> 
> 
> Howdy,
> 
> Not using the \newfontfamily correctly?

Duh!  Thanks a lot Herb.  Despite looking various times at the documentation I still persisted in having the \fontspec command.

Thanks

> 
> % !TEX TS-program = XeLaTeX
> % !TEX encoding = UTF-8 Unicode
> \documentclass{article}
> \usepackage{fontspec}
> \setmainfont{Linux Libertine O}
> \newfontfamily\LM{Luxi Mono}
> \begin{document}
> Some text.
> {\LM Some Text}
> \end{document}
> 

-- 
Alan Munn
amunn at gmx.com







More information about the XeTeX mailing list