So I'm working on a LaTeX document that is written mostly with a serif font. But I want to have some blocks of text in a sans-serif font so it's easier to distinguish them. However I haven't found yet a way to have a block of text written in sans-serif that automatically changes the math font to one that is sans-serif when in \sffamily.
I've tried using mathhastext and this changes the alphabet symbols on math mode but it does not change math symbols.
Specifically I would like to use newtxsf for the sans-serif font and newpxmath for the serif one.