# Moving underset text closer to main text

I have an arrow with some text directly underneath, using the command

\newcommand*{\tautrans}%
{\underset{\scriptstyle \tau^*}{\longrightarrow}}%


Since \tau^* is not close enough to \longrightarrow, I changed to

\newcommand*{\tautrans}%
{\underset{\scriptstyle \raisebox{.2em}{\ensuremath{\tau^*}}}{\longrightarrow}}%


Unfortunately, this changes the distance between lines, but not between \tau^* and \longrightarrow.

So how can I move \tau^* a little bit up without moving anything else, so that \tau^* comes closer to \longrightarrow?

-
What about \underset{\smash{\scriptstyle \tau^*}}{\longrightarrow} ? – Alex Jun 1 '13 at 21:19
you don't need the \scriptstyle -- that's the default size. including it actually causes the \tau to be moved down a hair. removing it won't move the \tau as close as you want, but you should omit \scriptstyle anyhow. – barbara beeton Jun 1 '13 at 21:24

Here's a possible solution. I defined \tautransi using \xrightarrow; the text under the arrow can be raised using a \raisebox (change the length according to your needs). The code shows a comparison between \tautrans and \tautransi

\documentclass{article}
\usepackage{amsmath}

\newcommand*{\tautrans}{%
\underset{\tau^*}{\longrightarrow}}
\newcommand*{\tautransi}{%
\xrightarrow[{\raisebox{.4ex}[0pt][0pt]{$\scriptstyle\tau^*$}}]{\quad}}

\begin{document}

$\tautrans\quad\tautransi$

\end{document}


-
Thanks for the answer, xrightarrow's great. Here is what I ended up with: \newcommand*{\tautrans}[1] {\xrightarrow[{\raisebox{.4ex}[0pt][0pt]{\ensuremath{\scriptstyle \tau^*}}}]{\ensuremath{\scriptstyle #1}}} – DaveBall aka user750378 Jun 2 '13 at 8:49