RegexConfigurator conf = new RegexConfigurator();
if (latex) {
List<Tag> tags = conf.read("/regex.properties", "/latex.properties");
Parser parser = new LatexParser(tags, showNotes, noAnswer);
LatexGenerator generator = new LatexGenerator(parser, templateDir, noAnswer);
File file = new File(outputDir, "latex");
FileUtils.forceMkdir(file);
try {
generator.generate(b, file, outputFileName);