You can do it with \overset
, where the upper part is a zero width tabular
in the appropriate size, namely, \scriptsize
.
In case you have various annotations, you may need to help TeX in order to get them at the same vertical position.
\documentclass{article}
\usepackage{amsmath}
\newcommand{\annot}[2]{% #1 symbol to annotate, #2 = text
\overset{%
\makebox[0pt]{%
\normalfont\scriptsize
\begin{tabular}{@{}c@{}} #2 \\ $\downarrow$ \end{tabular}%
}%
}{\mathstrut #1}%
}
\begin{document}
\begin{equation}
\mathbf{v}_{\mathrm{h}}=
\mathbf{v}_{\mathrm{h},0}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon}{interesting}\mathbf{v}_{\mathrm{h},1}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\epsilon^2\mathbf{v}_{\mathrm{h},2}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\dotsb.
\end{equation}
\begin{equation}
\mathbf{v}_{\mathrm{h}}=
\mathbf{v}_{\mathrm{h},0}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon\vphantom{\epsilon^2}}{interesting}
\mathbf{v}_{\mathrm{h},1}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon^2}{more interesting}
\mathbf{v}_{\mathrm{h},2}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\dotsb.
\end{equation}
\end{document}
Note the omission of the useless \left
and \right
tokens, but also \dotsb
instead of \cdots
.
You can modify the code to allow for both above and below annotation: below positioning is obtained with \annot*
.
\documentclass{article}
\usepackage{amsmath}
\NewDocumentCommand{\annot}{smm}{%
% if *, below, otherwise above
% #2 = symbol to annotate
% #3 = text
\IfBooleanTF{#1}{%
\innerannot{\underset}{#2}{#3}{\textuparrow}%
}{%
\innerannot{\overset}{#2}{\textdownarrow}{#3}%
}%
}
\NewDocumentCommand{\innerannot}{mmmm}{%
#1{% \overset or underset
\makebox[0pt]{%
\normalfont\scriptsize
\begin{tabular}{@{}c@{}} #4 \\ #3 \end{tabular}%
}%
}{\mathstrut #2}%
}
\begin{document}
\begin{equation}
\mathbf{v}_{\mathrm{h}}=
\mathbf{v}_{\mathrm{h},0}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon}{interesting}\mathbf{v}_{\mathrm{h},1}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\epsilon^2\mathbf{v}_{\mathrm{h},2}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\dotsb.
\end{equation}
\begin{equation}
\mathbf{v}_{\mathrm{h}}=
\mathbf{v}_{\mathrm{h},0}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon\vphantom{\epsilon^2}}{interesting}
\mathbf{v}_{\mathrm{h},1}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon^2}{more interesting}
\mathbf{v}_{\mathrm{h},2}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\dotsb.
\end{equation}
\begin{equation}
\mathbf{v}_{\mathrm{h}}=
\mathbf{v}_{\mathrm{h},0}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot{\epsilon}{interesting}
\mathbf{v}_{\mathrm{h},1}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\annot*{\epsilon^2}{more interesting}
\mathbf{v}_{\mathrm{h},2}(X_{\mathrm{m}},X_{\mathrm{s}}, z)
+\dotsb.
\end{equation}
\end{document}
\textnormal
here; instead, use\mathrm
.