[texhax] \sim symbol with text above it

Lars Madsen daleif at imf.au.dk
Tue Oct 11 18:00:43 CEST 2005


Peter Flom :

> Hello
>
> I am trying to typeset the \sim symbol (a tilde) with text ('iid')
> directly above it.  I tried
> \sim^{iid} but this makes a 'usual' superscript (that is, to the right
> of the tilde)
>

\stackrel{above}{symbol}

should do the trick, you might have a small problem with the width because 
iid might be wider than the \sim

in that case something like this might help:

\usepackage{mathtools}

\newcommand\iidsim{\stackrel{\mathclap{iid}}{\sim}}




/daleif

``You cannot help men permanently by doing for them 
what they could and should do for themselves. ''
  -- Abraham Lincoln



More information about the texhax mailing list