Use wait to get async output from mathjax