这个问题类似于这个问题,但我没能将建议的答案应用到这个案例中。
我想创建一个类似于\xrightarrow{text}
但用箭头\rightsquigarrow
代替的命令\rightarrow
。我想有一种简单的方法来修改\xrightarrow
命令,但我不知道该怎么做。
答案1
可以使用此链接中的答案\xRightarrow(文本)并声明一个新命令,我用\xra
(对于\rightsquigarrow
)和\xla
(对于\leftsquigarrow
)命名。
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{mathabx}
\newcommand{\xra}[1]{\overset{#1}{\rightsquigarrow}}
\newcommand{\xla}[1]{\overset{#1}{\leftsquigarrow}}
\begin{document}
I love cheese, especially everyone loves cow. Pepper jack cut the cheese cheesy feet cheeseburger danish fontina cheesy feet taleggio airedale. Croque monsieur roquefort cottage cheese jarlsberg cheesy feet pepper jack jarlsberg bocconcini. Ricotta monterey jack cheese triangles goat lancashire st. agur blue cheese.
\[\xra{\text{cheese}}\]
Swiss edam cheese strings. Airedale boursin rubber cheese hard cheese say cheese jarlsberg melted cheese cottage cheese. Cheesecake fromage frais edam chalk and cheese $\xla{\text{hamburger}}$ red leicester chalk and cheese red leicester who moved my cheese. Cheeseburger cheese strings airedale cheeseburger paneer.
\end{document}