I learned from Stefan's reply to Putting a character above another character to use \stackrel
in math mode to do just that. I'm using that right now to mark segments of a word as having a high (H) or low (L) tone. In some words, however, the characters that I put H or L above are of different heights. How can I align the raised characters H and L vertically?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
h$\stackrel{\text{L}}{\text{a}}$nd$\stackrel{\text{H}}{\text{l}}$
\end{document}
EDIT:
The accepted answer to Adjusting vertical and horizonal spacing in \stackrel suggests (like Barbara below) to use \strut
for each element. When using double spacing, however, this raises the characters way too high.
\documentclass{article}
\usepackage{amsmath,setspace}
\doublespacing
\begin{document}
h$\stackrel{\text{L}}{\strut{\text{a}}}$nd$\stackrel{\text{H}}{\strut{\text{l}}}$
\end{document}
\strut
to the lower element to ensure that it will always be full height.\strut
to both, but I'd prefer to not raise the characters more than necessary.