This answer provides the following code for lowering the \widetilde accent:
\makeatletter
\newcommand*\wt[1]{\mathpalette\wthelper{#1}}
\newcommand*\wthelper[2]{%
\hbox{\dimen@\accentfontxheight#1%
\accentfontxheight#11.3\dimen@
$\m@th#1\widetilde{#2}$%
\accentfontxheight#1\dimen@
}%
}
\newcommand*\accentfontxheight[1]{%
\fontdimen5\ifx#1\displaystyle
\textfont
\else\ifx#1\textstyle
\textfont
\else\ifx#1\scriptstyle
\scriptfont
\else
\scriptscriptfont
\fi\fi\fi3
}
\makeatother
Can someone explain how this code works? In particular, I would like to know:
- The answer says that the code scales the "x-height" of the accent by 1.3. What exactly is the x-height of an accent? I am familiar with the notion of the x-height of a font, but I can't see why scaling the x-height would lower the accent.
- What do the various commands (e.g.,
\mathpalette,\dimen@,\fontdimen,\m@th) in the above code do? What is the command\accentfontxheightsupposed to do? - Why doesn't the code have any effect on lowercase letters? The answer provides an explanation, but I don't understand why it works for uppercase letters but not lowercase letters.
- Is there a way to modify the code so that it lowers the accent on lowercase letters?