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!
3 Answers
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:
- If you are using Debian/Ubuntu, simply run
sudo apt-get install texlive-fonts-extra texlive-fonts-extra-doc
. - If you have a new version of TexLive, then something like
sudo tlmgr update --self
followed bytlmgr install mathabx
should work (I haven't tested this because I do not havetlmgr
).
-
3+1 very elaborate answer. I think that "
widecheck
" would have been sufficient:o) Feb 12, 2012 at 8:34 -
@user001 - WOW. What a thorough and helpful response. Thanks so much; that's exactly what I needed! Feb 12, 2012 at 17:38
-
2\usepackage{mathabx} makes certain symbols look weird, not standard (e.g. \infty becomes a rotated unsymmetric number 8; \in has three different length lines etc). Jan 30, 2020 at 12:19
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*}
\cs{widehat}:\quad & \widehat{A}\quad\widehat{AB}\quad
\widehat{ABC}\quad\widehat{ABCD}\quad\widehat{ABCDE}\\
\cs{widecheck}:\quad & \widecheck{A}\quad\widecheck{AB}\quad
\widecheck{ABC}\quad\widecheck{ABCD}\quad\widecheck{ABCDE}\\
\cs{wideparen}:\quad & \wideparen{A}\quad\wideparen{AB}\quad
\wideparen{ABC}\quad\wideparen{ABCD}\quad\wideparen{ABCDE}
\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).– remjgMay 14, 2014 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@
\@tempdima\ht\z@ \advance\@tempdima2\ht\tw@ \divide\@tempdima\thr@@
\setbox\tw@\hbox{%
\raise\@tempdima\hbox{\scalebox{1}[-1]{\lower\@tempdima\box
\tw@}}}%
{\ooalign{\box\tw@ \cr \box\z@}}}
\makeatother
Output and comparison
Here is the output with different font sizes and a comparison with the \widecheck{}
command from the mathabx
package:
-
7
-
It seems that only
\scalebox
is used from themathtools
package, and it is actually from thegraphicx
package. Jul 8, 2017 at 13:11 -
2Unfortunately, exponents end up in the wrong place with this code. Compare
\widecheck{y}^2
with this code and mathabx... Jul 15, 2018 at 0:22 -
\v{a}
, right?mathabx
, which is incompatible withamssymb
.