- another bug manifesting in the UG reversion: \slash and \nobreakdash can also occur
in the middle of a line.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27394
a592a061-630c-0410-9148-
cb99ea01b6c8
def revert_slash(document):
'Revert \\SpecialChar \\slash{} to ERT'
def revert_slash(document):
'Revert \\SpecialChar \\slash{} to ERT'
- r = re.compile(r'\\SpecialChar \\slash{}')
i = 0
while i < len(document.body):
i = 0
while i < len(document.body):
- m = r.match(document.body[i])
+ m = re.match(r'(.*)\\SpecialChar \\slash{}(.*)', document.body[i])
- subst = ['\\begin_inset ERT',
- 'status collapsed', '',
- '\\begin_layout Standard',
- '', '', '\\backslash',
- 'slash{}',
- '\\end_layout', '',
- '\\end_inset', '']
- document.body[i: i+1] = subst
- i = i + len(subst)
+ before = m.group(1)
+ after = m.group(2)
+ subst = [before,
+ '\\begin_inset ERT',
+ 'status collapsed', '',
+ '\\begin_layout Standard',
+ '', '', '\\backslash',
+ 'slash{}',
+ '\\end_layout', '',
+ '\\end_inset', '',
+ after]
+ document.body[i: i+1] = subst
+ i = i + len(subst)
def revert_nobreakdash(document):
'Revert \\SpecialChar \\nobreakdash- to ERT'
i = 0
while i < len(document.body):
def revert_nobreakdash(document):
'Revert \\SpecialChar \\nobreakdash- to ERT'
i = 0
while i < len(document.body):
- line = document.body[i]
- r = re.compile(r'\\SpecialChar \\nobreakdash-')
- m = r.match(line)
+ m = re.match(r'(.*)\\SpecialChar \\nobreakdash-(.*)', document.body[i])
- subst = ['\\begin_inset ERT',
+ before = m.group(1)
+ after = m.group(2)
+ subst = [before,
+ '\\begin_inset ERT',
'status collapsed', '',
'\\begin_layout Standard', '', '',
'\\backslash',
'nobreakdash-',
'\\end_layout', '',
'status collapsed', '',
'\\begin_layout Standard', '', '',
'\\backslash',
'nobreakdash-',
'\\end_layout', '',
- '\\end_inset', '']
- document.body[i:i+1] = subst
+ '\\end_inset', '',
+ after]
+ document.body[i: i+1] = subst
i = i + len(subst)
j = find_token(document.header, "\\use_amsmath", 0)
if j == -1:
i = i + len(subst)
j = find_token(document.header, "\\use_amsmath", 0)
if j == -1:
- Removed "NoStyle Abstract" from AMS book class, which does have an
abstract.
- Removed "NoStyle Abstract" from AMS book class, which does have an
abstract.
-- Fixed reversion of info insets to LyX format 1.5.x. This bug blocked the
+- Fix reversion of info insets to LyX format 1.5.x. This bug blocked the
reversion of the User Guide to LyX 1.5.
reversion of the User Guide to LyX 1.5.
+- Fix reversion of subfloats to version 1.5.x.
+
+- Fix reversion of \slash and \nobreakdash to version 1.5.x.
+