Following Make mathfont respect the surrounding family I’m trying to set up my document to use Platino and Arev for math depending on text context too. Unfornutalty it gives me the wrong parenthesis in math mode, when Arev is in use:
The problem seems to affect only the normal sized parenthesis; brackets and braces work fine, as well as bigger parenthesis.
How can I set up the right parens?
Code:
\documentclass{book}
\usepackage{parskip}
\usepackage[scaled=1.15]{newpxtext}
\usepackage[varg,scaled=1.15,cmintegrals]{newpxmath}
\usepackage{letltxmacro}
\usepackage{siunitx}
\sisetup{detect-all}
\renewcommand{\sfdefault}{fav}
\DeclareMathVersion{arev}
\SetSymbolFont {operators} {arev} {OT1} {zavm} {m} {n}
\SetSymbolFont {letters} {arev} {OML} {zavm} {m} {it}
\SetSymbolFont {symbols} {arev} {OMS} {zavm} {m} {n}
\SetSymbolFont {largesymbols} {arev} {OMX} {mdbch} {m} {n}
\SetMathAlphabet {\mathrm} {arev} {OT1} {zavm} {m} {n}
\SetMathAlphabet {\mathsf} {arev} {OT1} {zavm} {m} {n}
\SetMathAlphabet {\mathit} {arev} {OT1} {zavm} {m} {it}
\SetMathAlphabet {\mathbf} {arev} {OT1} {zavm} {b} {n}
\SetMathAlphabet {\mathtt} {arev} {T1} {fvm} {m} {n}
\newif\IfInSansMode
\LetLtxMacro\oldsf\sffamily
\renewcommand*{\sffamily}{\oldsf\mathversion{arev}\InSansModetrue}
\LetLtxMacro\oldrm\rmfamily
\renewcommand*{\rmfamily}{\oldrm\InSansModefalse\mathversion{normal}}
\newcommand{\TestText}{%
$\{[(a+b)]\} = \left(\frac{c-d}{e+f}\right)$ (Text-Mode)
}
\begin{document}
\TestText
\sffamily
\TestText
\end{document}



