mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25482 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
89695eb813
commit
3a2153b287
@ -803,33 +803,33 @@ def convert_latexcommand_index(document):
|
||||
r = re.compile('^(.*?)(\$.*?\$)(.*)')
|
||||
lines = fullcontent.split('\n')
|
||||
for line in lines:
|
||||
#document.warning("LINE: " + line)
|
||||
#document.warning(str(i) + ":" + document.body[i])
|
||||
#document.warning("LAST: " + document.body[-1])
|
||||
g = line
|
||||
while r.match(g):
|
||||
m = r.match(g)
|
||||
s = m.group(1)
|
||||
f = m.group(2).replace('\\\\', '\\')
|
||||
g = m.group(3)
|
||||
if s:
|
||||
# this is non-math!
|
||||
s = wrap_into_ert(s, r'\\', '\\backslash')
|
||||
s = wrap_into_ert(s, '{', '{')
|
||||
s = wrap_into_ert(s, '}', '}')
|
||||
subst = s.split('\n')
|
||||
document.body[i:i] = subst
|
||||
i += len(subst)
|
||||
document.body.insert(i + 1, "\\begin_inset Formula " + f)
|
||||
document.body.insert(i + 2, "\\end_inset")
|
||||
i += 2
|
||||
# Generic, \\ -> \backslash:
|
||||
g = wrap_into_ert(g, r'\\', '\\backslash')
|
||||
g = wrap_into_ert(g, '{', '{')
|
||||
g = wrap_into_ert(g, '}', '}')
|
||||
subst = g.split('\n')
|
||||
document.body[i+1:i+1] = subst
|
||||
i += len(subst)
|
||||
#document.warning("LINE: " + line)
|
||||
#document.warning(str(i) + ":" + document.body[i])
|
||||
#document.warning("LAST: " + document.body[-1])
|
||||
g = line
|
||||
while r.match(g):
|
||||
m = r.match(g)
|
||||
s = m.group(1)
|
||||
f = m.group(2).replace('\\\\', '\\')
|
||||
g = m.group(3)
|
||||
if s:
|
||||
# this is non-math!
|
||||
s = wrap_into_ert(s, r'\\', '\\backslash')
|
||||
s = wrap_into_ert(s, '{', '{')
|
||||
s = wrap_into_ert(s, '}', '}')
|
||||
subst = s.split('\n')
|
||||
document.body[i:i] = subst
|
||||
i += len(subst)
|
||||
document.body.insert(i + 1, "\\begin_inset Formula " + f)
|
||||
document.body.insert(i + 2, "\\end_inset")
|
||||
i += 2
|
||||
# Generic, \\ -> \backslash:
|
||||
g = wrap_into_ert(g, r'\\', '\\backslash')
|
||||
g = wrap_into_ert(g, '{', '{')
|
||||
g = wrap_into_ert(g, '}', '}')
|
||||
subst = g.split('\n')
|
||||
document.body[i+1:i+1] = subst
|
||||
i += len(subst)
|
||||
document.body.insert(i + 1, "\\end_layout")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user