# Underline shift

How can i prevent downshift with mixing \underset and \underline? My code:

\underset{\text{должность}}
{\underline{\hspace{1cm}\text{доцент, к.т.н.}\hspace{1cm}}}


How it looks now:

You have to make sure that the content has the same height. To ensure this, you can add \struts:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$\underset{\text{Text on left}} {\underline{\hspace{1cm}\text{\strut Quick brown fox}\hspace{1cm}}} \quad\underset{\text{Text in middle}}{\underline{\strut\hspace{4cm}}} \quad\underset{\text{Text on right}} {\underline{\hspace{1cm}\text{\strut Lazy dog}\hspace{1cm}}}$

\end{document}


However, you could achieve something similar using tabular:

\documentclass{article}

\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

\begin{document}

\begin{center}
\begin{tabular}{ C{10em} *{2}{ c C{10em} } }
Quick brown fox & & & & Lazy dog \\
\cline{1-1}\cline{3-3}\cline{5-5}
\footnotesize Text on left & &
\footnotesize Text in middle & &
\footnotesize Text on right
\end{tabular}
\end{center}

\end{document}