" Change \begin_float .. \end_float into \begin_inset Float .. \end_inset"
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_float", i)
if i == -1:
break
lines = document.body
i = 0
flag = 0
- while 1:
+ while True:
i = find_re(lines, pextra_type2_rexp, i)
if i == -1:
break
j = get_next_paragraph(lines, i, document.format + 1)
count = 0
- while 1:
+ while True:
# collect more paragraphs to the minipage
count = count+1
if j == -1 or not check_token(lines[j], "\\layout"):
""]
lines = document.body
i = 0
- while 1:
+ while True:
i = find_tokens(lines, ["\\latex latex", "\\layout LaTeX"], i)
if i == -1:
break
j = i+1
- while 1:
+ while True:
# \end_inset is for ert inside a tabular cell. The other tokens
# are obvious.
j = find_tokens(lines, ["\\latex default", "\\layout", "\\begin_inset", "\\end_inset", "\\end_float", "\\the_end"],
new = ['\layout %s' % document.default_layout, "", ""]
k = i+1
- while 1:
+ while True:
k2 = find_re(lines, ert_rexp, k, j)
inset = hfill = specialchar = 0
if k2 == -1:
# Delete remaining "\latex xxx" tokens
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\latex ", i)
if i == -1:
break
" ERT insert are hidden feature of lyx 1.1.6. This might be removed in the future."
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset ERT", i)
if i == -1:
break
" Combine ERT paragraphs."
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset ERT", i)
if i == -1:
break
" Remove figinset."
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset Figure", i)
if i == -1:
break
regexp = re.compile(r'^\\begin_inset\s+Tabular')
lines = document.body
i = 0
- while 1:
+ while True:
i = find_re(lines, regexp, i)
if i == -1:
break
regexp = re.compile(r'^\\begin_inset\s+Tabular')
body = document.body
i = 0
- while 1:
+ while True:
i = find_re(body, regexp, i)
if i == -1:
break
" Figure insert are hidden feature of lyx 1.1.6. This might be removed in the future."
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset Float ", i)
if i == -1:
break
" Change listof insets."
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset LatexCommand \\listof", i)
if i == -1:
break
" Change info inset."
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset Info", i)
if i == -1:
break
if i == -1:
return
lines[i+1:i+1] = ["\\use_natbib 0",
- "\use_numerical_citations 0"]
+ "\\use_numerical_citations 0"]
supported_versions = ["1.2.%d" % i for i in range(5)] + ["1.2"]