I use the ulem package to control the depth of underlines by setting
\renewcommand{\ULdepth}{1pt}
This works fine outside math mode. However, when using \uline inside math mode, I seem to lose control over the underline depth. (Adding \smash doesn't really solve the problem either.)
\documentclass{article}
\usepackage[normalem]{ulem}
\setlength{\parskip}{15pt} % add space between paragraphs for illustration
\begin{document}
\renewcommand{\ULdepth}{1pt}
\uline{normal text} $\uline{f(x)=y}$
\uline{normal text} $\uline{\smash{f(x)=y}}$
\renewcommand{\ULdepth}{10pt}
\uline{normal text} $\uline{f(x)=y}$
\end{document}

Is there a way to "regain control" over underline depth within math mode. If such control is not possible with the ulem package (I also tried with soul, which didn't work), are there other packages that can achieve the purpose of making the depth of underlines uniform both inside and outside math mode?

\uline{normal text} \uline{$f(x)=y$}and it seems to obey the parameter – David Carlisle Sep 13 '13 at 22:11\uline{$<math content>$}works. But I'm underlining texts in thegameenvironment provided by Martin Osborne'ssgamepackage, in which the cells in a matrix is automatically set in math mode. So when I do use\ulinein that environment, it would be as if I'm using$\uline{...}$. – Herr K. Sep 13 '13 at 22:11$\mbox{\uline{$....$}}$– David Carlisle Sep 13 '13 at 22:14\mboxworks, nice and easy :) – Herr K. Sep 13 '13 at 22:22\xblackout{abc} $\mblackout[1pt]{y = x^2}$seems to align the math underline and text underline, regardless of descenders in the math mode. – Steven B. Segletes Sep 13 '13 at 22:30\censorruledepth=<length>, then I'll just have to use the optional argument[<length>]with\mblackoutto align the underlines in the two modes? – Herr K. Sep 14 '13 at 07:31