3

Consider the following piece of code:

\documentclass{article}
\usepackage{mathabx}
\begin{document}
$\widehat{f_{\overline{K}}}$
$\widehat{f_{\bar{K}}}$
\end{document}

This outputs the following image:

enter image description here

On the other hand, if I use:

\documentclass{amsart}
\usepackage{mathabx}
\begin{document}
$\widehat{f_{\overline{K}}}$
$\widehat{f_{\bar{K}}}$
\end{document}

This outputs the following image:

enter image description here

I was wondering what accounts for the strange looking widehat of f_{\bar{K}} when using amsart+mathabx? Why is the use of overline not affected? These issues do not occur if one is not using the mathabx package, regardless of whether one is using the article or amsart document class.

Zane Li
  • 33

1 Answers1

1

The difference is in the fact that amsart loads amsmath and your first example would fail in the same way if you add \usepackage{amsmath}.

The issue is the same as in Why do arguments to nested \tilde or \breve commands reappear when amsmath is used? you don't get “reappearing” accents just because you have only one nested accent.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathabx}

\newsavebox{\accentbox} \newcommand{\compositeaccents}[2]{% \sbox\accentbox{$#2$}#1{\usebox\accentbox}}

\begin{document}

$\widehat{f_{\overline{K}}}$ $\compositeaccents{\widehat}{f_{\bar{K}}}$

\end{document}

You don't need \compositeaccents in the first case, because \overline is not an accent.

enter image description here

egreg
  • 1,121,712