mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* lyx_1_6.py:
- 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
This commit is contained in:
parent
c1309f2fc2
commit
c86be3e543
@ -1804,40 +1804,45 @@ def revert_framed_notes(document):
|
||||
|
||||
def revert_slash(document):
|
||||
'Revert \\SpecialChar \\slash{} to ERT'
|
||||
r = re.compile(r'\\SpecialChar \\slash{}')
|
||||
i = 0
|
||||
while i < len(document.body):
|
||||
m = r.match(document.body[i])
|
||||
m = re.match(r'(.*)\\SpecialChar \\slash{}(.*)', document.body[i])
|
||||
if m:
|
||||
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)
|
||||
else:
|
||||
i = i + 1
|
||||
i = i + 1
|
||||
|
||||
|
||||
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])
|
||||
if m:
|
||||
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', '',
|
||||
'\\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:
|
||||
|
@ -54,9 +54,13 @@ What's new
|
||||
- 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.
|
||||
|
||||
- Fix reversion of subfloats to version 1.5.x.
|
||||
|
||||
- Fix reversion of \slash and \nobreakdash to version 1.5.x.
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user