def fix_latex_file(latex_file):
- documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt)(.)(.+)")
+ documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt,?)(.+)")
tmp = mkstemp()
continue
changed = 1
- tmp.write("%s%s%s\n" % (match.group(1), match.group(3), match.group(4)))
+ tmp.write("%s%s%s\n" % (match.group(1), match.group(3)))
if changed:
copyfileobj(tmp, open(latex_file,"wb"), 1)
def fix_latex_file(latex_file):
- documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt)(.)(.+)")
+ documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt,?)(.+)")
tmp = mkstemp()
continue
changed = 1
- tmp.write("%s%s%s\n" % (match.group(1), match.group(3), match.group(4)))
+ tmp.write("%s%s\n" % (match.group(1), match.group(3)))
if changed:
copyfileobj(tmp, open(latex_file,"wb"), 1)