#but if this happens deal with it greacefully adding
#the missing \end_deeper.
i = len(document.body) - 1
- document.body[i:i] = ["\end_deeper",""]
+ document.body[i:i] = ["\\end_deeper",""]
return
else:
del document.body[i]
# We could use a heuristic and take the current directory,
# and we could try to find out if documentname has an extension,
# but that would be just guesses and could be wrong.
- document.warning("""Warning: Can not determine whether document
+ document.warning("""Warning: Cannot determine whether document
%s
needs an extension when reading from standard input.
You may need to correct the document manually or run
if k == -1:
break
document.body[k:k+1] = ["\\end_layout", "", '\\begin_layout %s' % document.default_layout]
- k = k + 4
- j = j + 3
+ k = k + 3
+ j = j + 2
# We need an empty line if document.default_layout == ''
- if document.body[k-1] != '':
- document.body.insert(k-1, '')
+ if document.body[k] != '':
+ document.body.insert(k, '')
k = k + 1
j = j + 1
i = i + 1