# Sub tilde in LaTeX

In LaTeX, \tilde{x} puts a ~ on top of the x.
How can I put a ~ below the x?

-

Use the command \utilde from the undertilde package.

Added by the crowd: This package is not part of TeX Live, so you may have to install it manually. This having been done, using the package is simple:

\documentclass{article}
\usepackage{undertilde}
\begin{document}
$\utilde{x}$
\end{document}


This produces the following output.

-
Interestingly, the \utilde command does not work properly in any sort of multi-line environment -- it inserts too much space between the tilde and the argument. –  Tristan Jul 4 '12 at 4:48
@Tristan: What specifically multiline environments? Like, say, align? I wonder if it's an issue with \everycr (which would be weird)? –  Ryan Reich Jul 4 '12 at 5:29
It gave extra space in every multiline environment I tried. I'm not really sure what causes it -- I'm looking into it, but it seems the \utilde command really only depends on \fontdimen5. I wonder if that dimension is redefined in a multiline environment.... –  Tristan Jul 6 '12 at 3:32
I should also add that I'm using the mathptmx package –  Tristan Jul 6 '12 at 3:42
Looks like in a normal equation environment, the original \baselineskip is 12pt, while in an aligned environment, the original \baselineskip is 15pt. The \utilde command uses a \baselineskip=1pt command to stack the symbols. –  Tristan Jul 6 '12 at 5:36

Or just copy the 4 lines of code:

\def\undertilde#1{\mathord{\vtop{\ialign{##\crcr
$\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern1.5pt\nointerlineskip}
$\hfil\tilde{}\hfil$\crcr\noalign{\kern1.5pt}}}}}


from

undertilde.sty


and use the command

\undertilde{x}

-