[XeTeX] Error with \newfontfamily

Herbert Schulz herbs at wideopenwest.com
Tue Jan 18 18:22:55 CET 2011


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?

% !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}

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the XeTeX mailing list