I'm brand new to TeX and am making my first beamerposter. I'm using XeLaTeX and I like the package pxfonts for the math and the body text. However, I'd like to have sans serif text in the block headers, and I don't like the default sans serif font that results from the pxfonts package. Can someone explain to me, in simple terms, why I cannot use the package fontspec to modify the sans serif font after I have loaded pxfonts? And what should I use instead?
Consider the code below. How can I change the font of the sans-serif part while keeping the first paragraph and the equation as they currently appear?
\documentclass[11pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{pxfonts}
\begin{document}
\blindtext
\[
\int_0^1 x^2 \, dx = 1/3
\]
\sffamily \blindtext %This is the text whose font I wish to change to something already loaded on my computer.
\end{document}


pxfonts. – user1577636 Apr 22 '14 at 23:20fontspeconly for certain contexts, and the packagepxfontsfor others. The question you've cited merely shows how to switch between various fonts usingfontspec. – user1577636 Apr 23 '14 at 01:11fontspecfor part andpxfontsfor part as I understand it. You can certainly usepxfontsand change the sans-serif afterwards. But if you insist on doing so withfontspecyou are out of luck. Why not simply usefontspec? What doespxfontsdo whichfontspeccannot? – cfr Apr 23 '14 at 01:41fontspecif you have some alternative method to achieve my desired result... – user1577636 Apr 23 '14 at 01:51mathpazobeforefontspec, by the way. – cfr Apr 23 '14 at 01:53mathpazobeforefontspecand everything was changed to cmr!! – user1577636 Apr 23 '14 at 01:57getnonfreefonts-sysand selecting the appropriate package. The script will handle the installation etc. Optima cannot be distributed as part of TeX Live. – cfr Apr 23 '14 at 02:02