# Re: XeTeX - Load packages before fontspec

On 10/09/2011 05:45 PM, Guenter Milde wrote:


\documentclass{minimal}

\PassOptionsToPackage{utopia}{mathdesign}
\usepackage{mathdesign}
\PassOptionsToPackage{greekuppercase=italicized}{mathdesign}
\usepackage{mathdesign}

\begin{document}
$\Gamma$
\end{document}

shows, \PassOptionsToPackage after \usepackage is silently ignored.
I.e. if LyX were to use it, this would not prevent the error but only the
error detection.




That's clear, but \PassOptions... at least gives you an opportunity to put some more options, and the result, or the lack of the result can be seen in the produced document. So, first both LyX and user can \PassOptions..., LyX will or will not call some package at the end, in the latter case user will call it herself.


\documentclass{minimal}

\PassOptionsToPackage{utopia}{mathdesign} % set by LyX


\PassOptionsToPackage{something_other_than_utopia,greekuppercase=italicized}{mathdesign} % set by user


\usepackage{mathdesign} % called by either LyX or user

\begin{document}
$\Gamma$
\end{document}