Generation of answer file, minor changes on latex output