# how to align text in different uputs

As can be seen from the image, there are 2 labels (a,b) that have misaligned baselines. I know that the problem arises because the height of the content in both uputs is different (b is taller than a). So the question is how can I simulate a box with the height of a b but the contents of an a

There is a trivial answer using rput or tinkering with labelsep but I'm interested in a solution with uput's content

# MWE

\documentclass{minimal}
\usepackage{pstricks}
\begin{document}
\begin{pspicture}(-2,-2)(2,2)%
\psline{->}(-2,0)(2,0)%
\psdot(-1,0)\uput[270](-1,0){$a$}%
\psdot(+1,0)\uput[270](+1,0){$b$}%
\end{pspicture}
\end{document}

• Use $\mathstrut a$ and $\mathstrut b$, but there can be better methods (I'm no expert with pstricks). Aug 31 '15 at 11:17
• The problem was tangentially about pstricks. The content inside the uput is what I was looking for and vphantom does the trick. I'll have to take a look at mathstrut because I have no idea what it does. Perhaps the question could use some editing Aug 31 '15 at 11:43
• \mathstrut is defined as \vphantom( so it has the height and depth of a simple math element. Aug 31 '15 at 14:06

You could insert a vphantom{b} in front of a:

\documentclass{minimal}
\usepackage{pstricks}
\begin{document}
\begin{pspicture}(-2,-2)(2,2)%
\psline{->}(-2,0)(2,0)%
\psdot(-1,0)\uput[270](-1,0){$\vphantom{b}a$}%
\psdot(+1,0)\uput[270](+1,0){$b$}%
\end{pspicture}
\end{document}


• Perfect, phantoms are a feature I soon forget exist Aug 31 '15 at 11:39
\psdots(-1,0)(1,0)
\rput[b](-1,-3ex){$a$}\rput[b](1,-3ex){$b$}

• I already knew that rput would be enough. What I don't know is the -3ex length. Three heights of x under? Aug 31 '15 at 22:35