]> git.lyx.org Git - features.git/commitdiff
Don't write a comma if not needed.
authorEnrico Forestieri <forenr@lyx.org>
Wed, 11 May 2011 17:11:08 +0000 (17:11 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 11 May 2011 17:11:08 +0000 (17:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38710 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/lyxpreview-lytex2bitmap.py
lib/scripts/lyxpreview2bitmap.py

index 1e4cf5d8636565b63fe29226c9592955f667c224..26efeb612a60c58b31331d6e2bb66737d3f5257f 100755 (executable)
@@ -149,7 +149,7 @@ def color_pdf(latex_file, bg_color, fg_color):
 
 
 def fix_latex_file(latex_file):
-    documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt)(.)(.+)")
+    documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt,?)(.+)")
 
     tmp = mkstemp()
 
@@ -161,7 +161,7 @@ def fix_latex_file(latex_file):
             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)
index 7929ae014ef4b2bc77ab21da799469666bba1447..dbc5d566f6d73e9fcb58b5705dbf5c13adf81032 100755 (executable)
@@ -168,7 +168,7 @@ def color_pdf(latex_file, bg_color, fg_color):
 
 
 def fix_latex_file(latex_file):
-    documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt)(.)(.+)")
+    documentclass_re = re.compile("(\\\\documentclass\[)(1[012]pt,?)(.+)")
 
     tmp = mkstemp()
 
@@ -180,7 +180,7 @@ def fix_latex_file(latex_file):
             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)