I'm trying to use the \newenvironment command under XeLaTeX with the fontspec and polyglossia packages, and it seems that the closing commands of the new environment is not recognized. How can I make it work?