lyx2lyx/lyx_2_1.py: typos

This commit is contained in:
Uwe Stöhr 2013-03-21 02:11:42 +01:00
parent 9af4d0fa8c
commit b79bc9b566

View File

@ -17,7 +17,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
""" Convert files to the file format generated by lyx 2.1"""
""" Convert files to the file format generated by LyX 2.1"""
import re, string
import unicodedata
@ -544,7 +544,7 @@ def revert_verbatim(document):
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of Verbatim layout")
document.warning("Malformed LyX document: Can't find end of Verbatim layout")
i += 1
continue
# delete all line breaks insets (there are no other insets)
@ -594,18 +594,18 @@ def revert_tipa(document):
return
j = find_end_of_inset(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of IPA inset")
document.warning("Malformed LyX document: Can't find end of IPA inset")
i += 1
continue
Multipar = False
n = find_token(document.body, "\\begin_layout", i, j)
if n == -1:
document.warning("Malformed lyx document: IPA inset has no embedded layout")
document.warning("Malformed LyX document: IPA inset has no embedded layout")
i += 1
continue
m = find_end_of_layout(document.body, n)
if m == -1:
document.warning("Malformed lyx document: Can't find end of embedded layout")
document.warning("Malformed LyX document: Can't find end of embedded layout")
i += 1
continue
content = document.body[n+1:m]
@ -750,7 +750,7 @@ def convert_listoflistings(document):
return
j = find_end_of_inset(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of ERT inset")
document.warning("Malformed LyX document: Can't find end of ERT inset")
i += 1
continue
ert = get_ert(document.body, i)
@ -771,7 +771,7 @@ def revert_listoflistings(document):
if document.body[i+1] == "LatexCommand lstlistoflistings":
j = find_end_of_inset(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of TOC inset")
document.warning("Malformed LyX document: Can't find end of TOC inset")
i += 1
continue
subst = put_cmd_in_ert("\\lstlistoflistings{}")
@ -1276,7 +1276,7 @@ def convert_latexargs(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -1329,7 +1329,7 @@ def revert_latexargs(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -1345,7 +1345,7 @@ def revert_latexargs(document):
# Revert to old syntax
document.body[p] = "\\begin_inset Argument"
if j == -1:
document.warning("Malformed lyx document: Can't find end of Argument inset")
document.warning("Malformed LyX document: Can't find end of Argument inset")
continue
if val > 0:
args[val] = document.body[p : j + 1]
@ -2025,7 +2025,7 @@ def revert_itemargs(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[3]
@ -2088,7 +2088,7 @@ def convert_beamerargs(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -2345,7 +2345,7 @@ def revert_beamerargs(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -2525,7 +2525,7 @@ def revert_beamerargs2(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -2607,7 +2607,7 @@ def revert_beamerargs3(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -2761,7 +2761,7 @@ def revert_beamerblocks(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -2892,7 +2892,7 @@ def convert_overprint(document):
# Find end of sequence
j = find_end_of_sequence(document.body, i)
if j == -1:
document.warning("Malformed lyx document. Cannot find end of Overprint sequence!")
document.warning("Malformed LyX document. Cannot find end of Overprint sequence!")
i = i + 1
continue
endseq = j
@ -2908,7 +2908,7 @@ def convert_overprint(document):
if argbeg != -1:
argend = find_end_of_layout(document.body, argbeg)
if argend == -1:
document.warning("Malformed lyx document. Cannot find end of Overprint argument!")
document.warning("Malformed LyX document. Cannot find end of Overprint argument!")
i = i + 1
continue
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", argbeg)
@ -2946,7 +2946,7 @@ def revert_overprint(document):
# Find end of sequence
j = find_end_of_sequence(document.body, i)
if j == -1:
document.warning("Malformed lyx document. Cannot find end of Overprint sequence!")
document.warning("Malformed LyX document. Cannot find end of Overprint sequence!")
i = i + 1
continue
endseq = j
@ -2971,7 +2971,7 @@ def revert_overprint(document):
if argbeg != -1:
argend = find_end_of_inset(document.body, argbeg)
if argend == -1:
document.warning("Malformed lyx document. Cannot find end of Overprint argument!")
document.warning("Malformed LyX document. Cannot find end of Overprint argument!")
i = i + 1
continue
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", argbeg)
@ -2994,7 +2994,7 @@ def revert_overprint(document):
if document.body[p] == "\\begin_layout Overprint":
q = find_end_of_layout(document.body, p)
if q == -1:
document.warning("Malformed lyx document. Cannot find end of Overprint layout!")
document.warning("Malformed LyX document. Cannot find end of Overprint layout!")
p += 1
continue
subst = ["\\begin_layout Standard"] + put_cmd_in_ert("\\onslide")
@ -3002,7 +3002,7 @@ def revert_overprint(document):
if argbeg != -1:
argend = find_end_of_inset(document.body, argbeg)
if argend == -1:
document.warning("Malformed lyx document. Cannot find end of Overprint item argument!")
document.warning("Malformed LyX document. Cannot find end of Overprint item argument!")
p += 1
continue
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", argbeg)
@ -3035,7 +3035,7 @@ def revert_frametitle(document):
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of FrameTitle layout")
document.warning("Malformed LyX document: Can't find end of FrameTitle layout")
i = i + 1
continue
endlay = j
@ -3087,7 +3087,7 @@ def convert_epigraph(document):
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of Epigraph layout")
document.warning("Malformed LyX document: Can't find end of Epigraph layout")
i = i + 1
continue
endlay = j
@ -3128,7 +3128,7 @@ def revert_epigraph(document):
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of Epigraph layout")
document.warning("Malformed LyX document: Can't find end of Epigraph layout")
i = i + 1
continue
endlay = j
@ -3314,7 +3314,7 @@ def revert_fragileframe(document):
# Find end of sequence
j = find_end_of_sequence(document.body, i)
if j == -1:
document.warning("Malformed lyx document. Cannot find end of FragileFrame sequence!")
document.warning("Malformed LyX document. Cannot find end of FragileFrame sequence!")
i = i + 1
continue
endseq = j
@ -3417,7 +3417,7 @@ def revert_newframes(document):
# Find end of sequence
j = find_end_of_sequence(document.body, i)
if j == -1:
document.warning("Malformed lyx document. Cannot find end of Frame sequence!")
document.warning("Malformed LyX document. Cannot find end of Frame sequence!")
i = i + 1
continue
endseq = j
@ -3920,7 +3920,7 @@ def revert_powerdot_pause(document):
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of Pause layout")
document.warning("Malformed LyX document: Can't find end of Pause layout")
i = i + 1
continue
endlay = j
@ -3961,7 +3961,7 @@ def revert_powerdot_itemargs(document):
# Find containing paragraph layout
parent = get_containing_layout(document.body, i)
if parent == False:
document.warning("Malformed lyx document: Can't find parent paragraph layout")
document.warning("Malformed LyX document: Can't find parent paragraph layout")
i = i + 1
continue
parbeg = parent[1]
@ -4012,7 +4012,7 @@ def revert_powerdot_columns(document):
return
j = find_end_of_layout(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of Twocolumn layout")
document.warning("Malformed LyX document: Can't find end of Twocolumn layout")
i = i + 1
continue
endlay = j