From 1e8dc000d82e27d0e4b1f16c12e3ac27cbadcc73 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 18 Sep 2010 15:13:13 +0000 Subject: [PATCH] Conversion for paragraph-spacing. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35435 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/prefs2prefs_lfuns.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/scripts/prefs2prefs_lfuns.py b/lib/scripts/prefs2prefs_lfuns.py index 3061d3bc23..305b45e7b9 100644 --- a/lib/scripts/prefs2prefs_lfuns.py +++ b/lib/scripts/prefs2prefs_lfuns.py @@ -112,6 +112,27 @@ def toc_insert(line): return simple_renaming(line, "toc-insert", "inset-insert toc") +re_ps = re.compile(r'^(.*)paragraph-spacing\s+(default|single|onehalf|double)\b(.*)$') +re_psother = re.compile(r'^(.*)paragraph-spacing\s+other\s+(\d+\.\d?|\d?\.\d+|\d+)(.*)$') +def paragraph_spacing(line): + # possible args: default, single, onehalf, double, other FLOAT + m = re_ps.search(line) + if m: + arg = m.group(2) + newline = m.group(1) + "paragraph-params \\paragraph-spacing " + arg + \ + m.group(3) + return (True, newline) + + m = re_psother.search(line) + if not m: + return no_match + + arg = m.group(2) + newline = m.group(1) + "paragraph-params \\paragraph-spacing other " + \ + arg + m.group(3) + return (True, newline) + + # # ########################################################### @@ -127,7 +148,8 @@ conversions = [ notes_mutate, all_insets_toggle, line_insert, - toc_insert + toc_insert, + paragraph_spacing ] # end conversions for format 0 ] -- 2.39.5