# Is there a way to do an “upside down” \widehat?

I've come across this in a book I'm looking through, but I can't find the code for it. I want it to look exactly like the \widehat and go above text like \widehat does...I just want it to be (vertically) flipped!

-
...and you're not referring to \v{a}, right? – Werner Feb 12 '12 at 1:38
@Werner: That's correct. That's the shape I want, but it needs to be able to work in math mode, and it needs to be able to change size depending on how many characters show up inside the {}. – user11693 Feb 12 '12 at 4:15

The symbol you are looking for is widecheck and can be found in the mathabx font package. Please consult pages 10 and 16 of the mathabx user manual. The syntax is \widecheck{xyz}.

Here is a minimum working example to demonstrate:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathabx}
\begin{document}
$\widecheck{\theta\tilde\theta} + \widecheck{\phi^2-\rho}$
\end{document}


The second example compares the behavior of \hat, \widehat, \check, and \widecheck.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathabx}
\renewcommand\arraystretch{2.5}
\begin{document}
\begin{tabular}{|c|c|c|}
\hline
& \textbf{narrow} & \textbf{wide} \\
\hline
\textbf{hat} & $\hat{I}+\hat{II}+\hat{III}+\hat{IIII}$ & $\widehat{I}+\widehat{II}+\widehat{III}+\widehat{IIII}$\\
\hline
\textbf{check} & $\check{I}+\check{II}+\check{III}+\check{IIII}$ & $\widecheck{I}+\widecheck{II}+\widecheck{III}+\widecheck{IIII}$\\
\hline
\end{tabular}
\end{document}


To install the mathabx font package, one of the following may work:

1. If you are using Debian/Ubuntu, simply run sudo apt-get install texlive-fonts-extra texlive-fonts-extra-doc.
2. If you have a new version of TexLive, then something like sudo tlmgr update --self followed by tlmgr install mathabx should work (I haven't tested this because I do not have tlmgr).
-
+1 very elaborate answer. I think that "widecheck" would have been sufficient:o) – Hans-Peter E. Kristiansen Feb 12 '12 at 8:34
@user001 - WOW. What a thorough and helpful response. Thanks so much; that's exactly what I needed! – user11693 Feb 12 '12 at 17:38

while the answer by @user001 is correct in that \widecheck is supported by the mathabx fonts and package, that package/font collection also changes the shapes of a lot of (most) other symbols. if you want to avoid such "extra" changes, you can load just the symbol(s) you want as shown in this example.

\documentclass{article}
\usepackage{amsmath}
\nofiles
\usepackage{verbatim}

%% code from mathabx.sty and mathabx.dcl
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<5> <6> <7> <8> <9> <10>
<10.95> <12> <14.4> <17.28> <20.74> <24.88>
mathx10
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\widecheck}{0}{mathx}{"71}
\DeclareMathAccent{\wideparen}{0}{mathx}{"75}

\def\cs#1{\texttt{\char\\#1}}

\begin{document}

A wide check should match a wide hat, but inverted.  Observe that
the forms provided have a maximum width.  Some other wide accents
in \verb|mathx| aren't available otherwise.
\begin{align*}
\end{align*}

\vspace{1\baselineskip}
\verbatiminput{\jobname.tex}
\end{document}


note: this demonstration was created long ago for use in ams publications, hence the extra unrelated code; however, the technique of using the verbatim package to generate a list of the example file in the output, using \verbatiminput, has proved very useful here, and may do so for others, so i haven't removed it.

-
Works but add an error only with the beamer class in my case: Too many math alphabets used in version normal. It seems like there is a limitation of 16 math alphabets (see this answer). – remjg May 14 '14 at 15:16

## Code

I copied the following code from someone a long time ago. I don't understand it, but it also seems to produce wide checks in math mode.

\usepackage{mathtools}

\makeatletter
\DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}}
\def\@widecheck#1#2{%
\setbox\z@\hbox{\m@th$#1#2$}%
\setbox\tw@\hbox{\m@th$#1% \widehat{% \vrule\@width\z@\@height\ht\z@ \vrule\@height\z@\@width\wd\z@}$}%
\dp\tw@-\ht\z@

Here is the output with different font sizes and a comparison with the \widecheck{} command from the mathabx` package: