17

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

0

2 Answers 2

17

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.

enter image description here

9
  • 2
    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, 2012 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, 2012 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, 2012 at 3:32
  • I should also add that I'm using the mathptmx package
    – Tristan
    Jul 6, 2012 at 3:42
  • 2
    Which is at tex.stackexchange.com/questions/62747/…
    – chmullig
    Nov 6, 2013 at 2:45
3

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}
1
  • this will not work for some cases, e.g. (\mu_{\undertilde{A}}(x)) will cause A to be printed in full size, rather than scriptsize.
    – sfranky
    Feb 10, 2017 at 10:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .