TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently trying to write text over a squiggly arrow (\rightsquigarrow). For normal arrows, I use the extarrows package, which provides commands like \xlongrightarrow and \xLongrightarrow which dynamically stretch the arrow depending on the text length. However, the package does not provide commands for squiggly arrows and I was not able to find another one which does so.

share|improve this question
up vote 4 down vote accepted

This gives the gist of how you might do it. The key is finding a symbol that is periodic. I used the \sim character, but there might be better. Also, I used the \! symbol for backspacing, but there may be more precise ways of doing it (you'll note the overlap is not perfect in my example).

I created three commands, for the squiggle, the left squig end, and the right squig end. One can just repeat invocations of \squig to make the squiggle longer.

Or one can use \squigs with an argument to get the desired number of squiggles. Next step was to create the commands that allow text to go over the squiggle.

So the real commands you would in general use are \rsquigarrow and \lsquigarrow, each with two arguments: the text to go atop the squiggle, and the squiggle length.

\parskip 1ex
\textwidth 2in
Here are the commands to make periodic squiggles, with no text above

$2H_2 + O_2 ~\squig\squig\squig\rsquigend~ 2H_2O $\\
$2H_2 + O_2 ~\lsquigend\squig\squig\squig~ 2H_2O $

Now I will create commands to place text over them


  \whiledo {\value{index}< #1}



$2H_2 + O_2 \rsquigarrow{exothermic}{7} 2H_2O $\\
$2H_2 + O_2 \lsquigarrow{heat}{3} ~ 2H_2O $


enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.