0

This question is similar to this question, but I didn't manage to adapt the proposed answer to this case.

I would like to create a command similar to \xrightarrow{text} but with the arrow \rightsquigarrow instead of \rightarrow. I guess there is an easy way to modify the \xrightarrow command, but I don't know how to do it.

J.-E. Pin
  • 619
  • Could you provide more detail? Do you want a straight line with the \rightsquigarrow head, or should the whole line be squiggly? (For the latter see https://tex.stackexchange.com/q/60216/82917.) – campa Dec 12 '19 at 11:37
  • @campa I would like to have the whole line be squiggly. I looked at the link. It is indeed a similar question, but I would like to avoid using tikz if possible. – J.-E. Pin Dec 12 '19 at 11:41
  • 4
    Related: https://tex.stackexchange.com/questions/75669/how-do-i-put-text-over-a-squiggly-arrow (no tikz) – Steven B. Segletes Dec 12 '19 at 12:36

1 Answers1

2

It is possible to use the answer into this link \xRightarrow (text) and declare a new command that I named with \xra (for the \rightsquigarrow) and \xla (for the \leftsquigarrow).

enter image description here


\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}

Sebastiano
  • 54,118