-\usepackage{ifpdf} % part of the hyperref bundle
-\ifpdf % if pdflatex is used
-
- % set fonts for nicer pdf view
- \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
-
-\fi % end if pdflatex is used
+% Work around a bug in Babel-Spanish with \lim if non-TeX fonts are used:
+\@ifpackageloaded{fontspec}{\unaccentedoperators}{}