I am using \documentclass[11pt]{amsart}. When I added scalerel and stackengine packages in order to solve the \widehat problem (as described in the here) appearance of table of contents changed. Is there a way of using these packages without changing the table of content?
\documentclass[11pt]{amsart}
\usepackage[utf8]{inputenc}
\usepackage{scalerel,stackengine}
\stackMath
\newcommand\reallywidehat[1]{%
\savestack{\tmpbox}{\stretchto{%
\scaleto{%
\scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}%
{\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE
}{\textheight}%
}{0.5ex}}%
\stackon[1pt]{#1}{\tmpbox}%
}
\parskip 1ex
\title{ToC}
\author{ABCD}
\usepackage{natbib}
\usepackage{graphicx}
\begin{document}
More precisely, when I remove the part starting from \usepackage{scalerel,stackengine} and ending before \title{ToC} appearance of table of contents changes.