Creating non-math mode substitutes for \overset and \underset not dependent on the amsmath package

How to implement a \textunderset macro and its companion \textoverset depends on your real necessities. Here's one that tries keeping the main text and the subscript aligned with each other, while avoiding clashes between ascendents and discendents

\documentclass{article}
\makeatletter
\newcommand{\dynscriptsize}{\check@mathfonts\fontsize{\sf@size}{\z@}\selectfont}
\makeatother
\newcommand\textunderset[2]{%
  \leavevmode
  \vtop{\offinterlineskip
    \halign{%
      \hfil##\hfil\cr % center
      \strut#2\cr
      \noalign{\kern-.3ex}
      \dynscriptsize\strut#1\cr
    }%
  }%
}
\newcommand\textoverset[2]{%
  \leavevmode
  \vbox{\offinterlineskip
    \halign{%
      \hfil##\hfil\cr % center
      \dynscriptsize\strut#1\cr
      \noalign{\kern-.3ex}
      \strut#2\cr
    }%
  }%
}

\begin{document}
Abc \textunderset{du}{axy} \textunderset{ud}{axy} def

\bigskip

Abc \textoverset{du}{axy} \textoverset{ud}{axy} def

\bigskip

Abc \textoverset{du}{axy} \textunderset{ud}{axy} def
\end{document}

enter image description here


\limits is a TeX primitive used in the specification of super- and subscripts for math operators.

You could still use math mode, but just force the arguments to be typeset in text mode via some manipulation of the original \overset and \underset definitions:

\overset and \underset without AMSmath

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath

\begin{document}
\mbox{}\phantom{Without}\llap{With} \verb|amsmath|: $\overset{\text{x}}{\text{a}}~\quad~\underset{\text{x}}{\text{a}}$

\makeatletter
\renewcommand{\overset}[2]{\ensuremath{\mathop{\kern\z@\mbox{#2}}\limits^{\mbox{\scriptsize #1}}}}
\renewcommand{\underset}[2]{\ensuremath{\mathop{\kern\z@\mbox{#2}}\limits_{\mbox{\scriptsize #1}}}}
\makeatother

\mbox{}Without \verb|amsmath|: \overset{x}{a}~\quad~\underset{x}{a}

\end{document}

In the above minimal example, the redefinition of \overset and \underset style sets the two arguments in math mode, although it is not required to be specified explicitly. Additionally, since you're not interested in a math mode application, the binary relation spacing has been removed.