1

This is essentially a repost of this question but for the \check symbol:

I would like to replace the usual \check in maths with a larger one, but I do not want it to stretch. The size I want is "the smallest \widecheck" (as in $\widecheck{.}$). Is there a way to put that one above a wide character like M ($\widecheck{M}$ would stretch and give be an even wider check).

My main problem seems to be that I cannot find a corresponding symbol for \widecheck in the largesymbols font family.


Here is one workaround I was able to get. There is probably a simpler way.

enter image description here

\documentclass[12pt]{article}
\usepackage{amsmath,accents}    

\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}
    
    \DeclareMathSymbol{\widechecksym}{\mathord}{mathx}{"71}
    \newcommand\lowerwidechecksym{%
      \text{\smash{\hspace*{-0.25ex}\raisebox{-1.1ex}{%
        $\widechecksym$}}}}
    \newcommand\wcheck[1]{%
      \mathchoice
        {\accentset{\displaystyle\lowerwidechecksym}{#1}}
        {\accentset{\textstyle\lowerwidechecksym}{#1}}
        {\accentset{\scriptstyle\lowerwidechecksym}{#1}}
        {\accentset{\scriptscriptstyle\lowerwidechecksym}{#1}}
    }
    
    
    \DeclareMathSymbol{\widehatsym}{\mathord}{mathx}{"70}
    \newcommand\lowerwidehatsym{%
      \text{\smash{\hspace*{-0.25ex}\raisebox{-1.1ex}{%
        $\widehatsym$}}}}
    \newcommand\what[1]{%
      \mathchoice
        {\accentset{\displaystyle\lowerwidehatsym}{#1}}
        {\accentset{\textstyle\lowerwidehatsym}{#1}}
        {\accentset{\scriptstyle\lowerwidehatsym}{#1}}
        {\accentset{\scriptscriptstyle\lowerwidehatsym}{#1}}
    }

\end{document}
2
  • A wide check accent does not exist because it would be very problematic to understand what it refers to; the hat instead covers making usually clear what is its extent. On the other hand, I'd not recommend using very wide checks, for the same readability reason.
    – egreg
    Dec 18, 2020 at 22:44
  • @egreg Maybe I'm misunderstanding your comment, but \widecheck does exist as part of the mathx font family. I just haven't been able to get it working as in the linked post.
    – Mobius
    Dec 18, 2020 at 22:49

1 Answer 1

5

Do you mean this?

enter image description here

I find it awful and difficult to read, but you're the judge. Here's the code for importing the accent from mathabx.

\documentclass{article}
\usepackage{amsmath}

\DeclareFontFamily{U}{mathx}{}
\DeclareFontShape{U}{mathx}{m}{n}{ <-> mathx10 }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}

\DeclareMathAccent{\widecheck}{0}{mathx}{"71}

\begin{document}

$\check{a}\widecheck{aa}\widecheck{aaa}\widecheck{aaaa}\widecheck{aaaaa}$

\end{document}

If you just want the shortest wide check, the following code emulates the accent placement but is only apt for Latin letters. It could be extended also for Greek letters.

\documentclass{article}

\DeclareFontFamily{U}{mathx}{}
\DeclareFontShape{U}{mathx}{m}{n}{ <-> mathx10 }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}

\DeclareMathAccent{\widecheck}{0}{mathx}{"71}

\makeatletter
\newcommand{\wcheck}[1]{\mathpalette\wcheck@{#1}}
\newcommand{\wcheck@}[2]{%
  \begingroup
  \edef\wcheck@font{\the
    \ifx#1\displaystyle\textfont\else\ifx#1\textstyle\textfont
    \else\ifx#1\scriptstyle\scriptfont\else\scriptscriptfont\fi\fi\fi\@ne
  }%
  \sbox\z@{\wcheck@font\mbox{#2}\mbox{\char\the\skewchar\font}}%
  \sbox\tw@{\wcheck@font#2\char\the\skewchar\font}%
  \dimen@=\dimexpr\wd\tw@-\wd\z@\relax
  {\,\kern2\dimen@\widecheck{\!\kern-2\dimen@#2\!}\,}%
  \endgroup
}
\makeatother

\begin{document}

$\wcheck{M}$ $\wcheck{A}$

$\check{M}$ $\widecheck{A}$

\end{document}

In the example I use \check over M just to show that the accent placement is right.

\documentclass{article}

\DeclareFontFamily{U}{mathx}{}
\DeclareFontShape{U}{mathx}{m}{n}{ <-> mathx10 }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}

\DeclareMathAccent{\widecheck}{0}{mathx}{"71}

\makeatletter
\newcommand{\wcheck}[1]{\mathpalette\wcheck@{#1}}
\newcommand{\wcheck@}[2]{%
  \begingroup
  \edef\wcheck@font{\the
    \ifx#1\displaystyle\textfont\else\ifx#1\textstyle\textfont
    \else\ifx#1\scriptstyle\scriptfont\else\scriptscriptfont\fi\fi\fi\@ne
  }%
  \sbox\z@{\wcheck@font\mbox{#2}\mbox{\char\the\skewchar\font}}%
  \sbox\tw@{\wcheck@font#2\char\the\skewchar\font}%
  \dimen@=\dimexpr\wd\tw@-\wd\z@\relax
  {\,\kern2\dimen@\widecheck{\!\kern-2\dimen@#2\!}\,}%
  \endgroup
}
\makeatother

\begin{document}

$\wcheck{M}$ $\wcheck{A}$
$\scriptstyle\wcheck{M}\scriptstyle\check{M}$
$\scriptstyle\wcheck{A}\scriptstyle\widecheck{A}$

$\check{M}$ $\widecheck{A}$

\end{document}

enter image description here

An altogether different method is outlined below.

  1. Copy mathx10.tfm to mathxy10.tfm in the working directory; on a Unix system with bash or similar shell,

    cp $(kpsewhich mathx10.tfm) mathxy10.tfm
    
  2. Convert the .tfm file into .pl

    tftopl mathxy10.tfm > mathxy10.pl
    
  3. Edit the file just created to find the entries with CHARACTER C p and CHARACTER C q to remove the NEXTLARGER property from both (just remove the line)

  4. Convert the .pl file back to .tfm

    pltotf mathxy10.pl
    
  5. Add at the beginning of you TeX file the line

    \pdfmapline{+mathxy10 TeX-mathx10 <mathx10.pfb}
    
  6. Use the newly created font file as symbol font

Example

\pdfmapline{+mathxy10 TeX-mathx10 <mathx10.pfb}

\documentclass{article}

\DeclareFontFamily{U}{mathx}{}
\DeclareFontShape{U}{mathx}{m}{n}{ <-> mathxy10 }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}

\DeclareMathAccent{\what}{0}{mathx}{"70}
\DeclareMathAccent{\wcheck}{0}{mathx}{"71}

\begin{document}

$\wcheck{M}\wcheck{A}$

$\what{M}\what{A}$

\end{document}

enter image description here

These are the edits to do in the .pl file

Before

(CHARACTER C p
   (CHARWD R 0.55542)
   (CHARHT R 0.722046)
   (NEXTLARGER C x)
   )
(CHARACTER C q
   (CHARWD R 0.55542)
   (CHARHT R 0.722046)
   (NEXTLARGER O 174)
   )

After:

(CHARACTER C p
   (CHARWD R 0.55542)
   (CHARHT R 0.722046)
   )
(CHARACTER C q
   (CHARWD R 0.55542)
   (CHARHT R 0.722046)
   )
3
  • No. I want the \widecheck to always remain the same size, but be larger than \check.
    – Mobius
    Dec 19, 2020 at 0:05
  • 1
    @Mobius Added for Latin letters. I also add a different method.
    – egreg
    Dec 19, 2020 at 11:11
  • The first method seems to be working, but I really need it for Greek letters as well. Is this a simple fix?
    – Mobius
    Dec 19, 2020 at 19:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .