Small Corrections

Moved `switch` cases to avoid the confusion between `LATEX`,
`PLAIN_TEXT` and `XML` exports.