#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
""" Convert files to the file format generated by lyx 1.1.5"""
" Replace protected separator. "
lines = document.body
i=0
- while 1:
+ while True:
i = find_token(lines, "\\protected_separator", i)
if i == -1:
break
" Merge formula insets. "
lines = document.body
i=0
- while 1:
+ while True:
i = find_token(lines, "\\begin_inset Formula", i)
if i == -1: break
if lines[i+1] in math_env:
lines = document.body
lyxtable_re = re.compile(r".*\\LyXTable$")
i=0
- while 1:
+ while True:
i = find_re(lines, lyxtable_re, i)
if i == -1:
break
" Update table of contents. "
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines,
'\\begin_inset LatexCommand \\tableofcontents', i)
if i == -1:
for margin in margins:
i = 0
- while 1:
+ while True:
i = find_token(lines, margin, i)
if i == -1:
break
lines = document.body
# play safe, clean empty lines
- while 1:
+ while True:
if lines[i]:
break
del lines[i]
del lines[i:j + 1]
# play safe, clean empty lines
- while 1:
+ while True:
if lines[i]:
break
del lines[i]
" Update reference inset. "
lines = document.body
i = 0
- while 1:
+ while True:
i = find_token(lines, '\\begin_inset LatexCommand', i)
if i == -1:
return
lines = document.body
i = 0
latexdel_re = re.compile(r".*\\begin_inset LatexDel")
- while 1:
+ while True:
i = find_re(lines, latexdel_re, i)
if i == -1:
return