Thank you Günter, the encoding trick indeed solved the problem. In my opinion, however, it would be ideal if there was a way to configure when preamble statements are loaded (before or after lyx ones), but given the complexity that such a change would imply the current design is understandable.
Again, thanks for the tip! :) Spyros On 10/06/2011 11:12 AM, Guenter Milde wrote: > On 2011-10-04, Spyros Stathopoulos wrote: > >> I'm using the first option already since I need to pass options to the >> font definitions. Still the problem lies with fontspec not the font >> definition. > > The problem lies with mathdesign:: > > %% ---------------------------------------------------------------- > %% Encoding is automatically set to T1 > %% ---------------------------------------------------------------- > > \RequirePackage[T1]{fontenc} > > The workaround is to re-set the TeX font encoding to EU1 (or U, if you use > LuaTeX). The following example: > > > \documentclass[english]{article} > \usepackage{fontspec} > \usepackage{xunicode} > \usepackage{polyglossia} > \setdefaultlanguage{english} > > \usepackage[mdugm]{mathdesign} > %% Mathdesign sets font encoding to T1, reset with one of: > % \RequirePackage[EU1]{fontenc} > \renewcommand{\encodingdefault}{EU1} > \setmainfont[Mapping=tex-text]{Comic Sans MS} > > \begin{document} > Was ist das? > \[ > 2^{2}=4 > \] > \end{document} > > > results in mathdesign math and comic text fonts. > > Günter >