latex parser: environment subtree, handling newlines in environments