I want to use eulerpx with the alternative hat accent provided by eulervm (via the euler-hat-accent option). To this end, I copied the relevant commands from eulervm.sty (see also this answer). The problem is that the redefinition messes with parentheses:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools,newpxtext,eulerpx}
\DeclareSymbolFont{symbols}{U}{zeus}{m}{n}
\DeclareMathAccent{\hat}{\mathalpha}{symbols}{222}
\begin{document}
$\hat{a}\qquad(b)$
\end{document}
Without the redefinition of the hat accent (DeclareSymbolFont,DeclareMathAccent) the output is as expected: no omitted parentheses and no extra colon, but of course the modified hat is not obtained.
Am I redefining the hat accent in a wrong way? Is there a way to avoid this strange behavior?


