Hi Ikumi, many thanks for your feedback. > Is it really necessary to delete leading whitespaces? At the end of this > function, we do `indent-region', which I expect would do the job. (And > then, we can just call `delete-trailing-whitespace'.) Deleting whitespace is relevant when converting from display to inline. It seemed like the appropriate way to handle the variety of ways users might write display math, e.g., $$ x + y $$ with or without newlines. Other suggestions would be welcome. I've incorporated all the other suggested changes, together with the following further changes: - replaced calls to LaTeX-environment-list-filtered with a new helper function LaTeX-math-environment-list (which could be made internal, I suppose?) that returns a more suitable list. - factored our a helper function LaTeX--strip-labels. Any further feedback welcome. Thanks, best, Paul