At the present time, I have little reason to do this in LaTeX, so my interest in the topic has faded. However, the pst-asr package by John Frampton appears to make this much easier than many other methods. I recommend this package and its documentation as a good starting point.
Keep in mind that the above package (and many methods you may
find to do something similar) depends on pstricks
,
which requires compiling the LaTeX document to PostScript (PS) initially.
It cannot be compiled direclty to PDF, although it can be converted to PDF as
part of the process. This
means that such documments cannot be compiled directly with pdflatex
(but,
for example, latex
, dvips
, then
ps2pdf
will work). If you use the popular
TeXworks editor, this may require some modification, which is
explained here for Windows.