latex parser: removing spaces after \begin and before \end of environment