答案1
这是一个 Ti钾Z 解决方案。您可以调整曲线的许多方面:幅度、柱长、段长、高度等。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary {decorations.pathmorphing}
\newcommand{\oversquiggle}[1]{\tikz[baseline=(A.text), decoration={zigzag, post=lineto, post length=2pt, segment length=3pt, amplitude=.6pt}]{
\node[inner xsep=0pt, inner ysep=2.5pt, outer sep=0pt](A){$#1$};
\draw[->, decorate]([xshift=1pt]A.north west)--(A.north east);
}}
\begin{document}
$\oversquiggle{ABCDEF}$
\end{document}
答案2
我已经使用过scalered
包。https://ctan.mirror.garr.it/mirrors/ctan/macros/latex/contrib/scalerel/scalerel.pdf
\documentclass[12pt]{article}
\usepackage{amsmath, amssymb, scalerel}
\newcommand{\oversquigarrow}[1]{%
\overset{\hstretch{2.5}{\rightsquigarrow\mkern-4.5mu}}{#1}%
}
\begin{document}
\[
\oversquigarrow{ABC}
\]
\end{document}
另一个解决方案:
\documentclass[12pt]{article}
\usepackage{amsmath, amssymb, scalerel, stackengine}
\newcommand{\myoversquigarrow}[1]{%
\ThisStyle{\ensurestackMath{%
\stackengine{0pt}{\SavedStyle#1}{%
\hstretch{1.35}{\scalebox{1.5}[1]{$\SavedStyle\rightsquigarrow\mkern-4.5mu$}}%
}{O}{c}{F}{F}{S}%
}}%
}
\begin{document}
\[
\myoversquigarrow{ABC}
\]
\end{document}