From cc472f5d69ea72c9a48dc2640ef988b917bdcc44 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 11 May 2011 14:33:49 +0000 Subject: [PATCH] There's no reason to leave in place the 10pt option, as it may not be the default option. Also account for the fact that babel may be switched off. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38708 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/lyxpreview-lytex2bitmap.py | 4 ++-- lib/scripts/lyxpreview2bitmap.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/scripts/lyxpreview-lytex2bitmap.py b/lib/scripts/lyxpreview-lytex2bitmap.py index 259c95eaee..1e4cf5d863 100755 --- a/lib/scripts/lyxpreview-lytex2bitmap.py +++ b/lib/scripts/lyxpreview-lytex2bitmap.py @@ -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[12]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\n" % (match.group(1), match.group(3))) + tmp.write("%s%s%s\n" % (match.group(1), match.group(3), match.group(4))) if changed: copyfileobj(tmp, open(latex_file,"wb"), 1) diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index d75dc069b2..7929ae014e 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -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[12]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\n" % (match.group(1), match.group(3))) + tmp.write("%s%s%s\n" % (match.group(1), match.group(3), match.group(4))) if changed: copyfileobj(tmp, open(latex_file,"wb"), 1) -- 2.39.2