mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Assure that \layout is the first element of the lyx file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7135 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
13a21fe510
commit
68fd7bc22a
@ -1,3 +1,8 @@
|
||||
2003-06-09 José Matos <jamatos@fep.up.pt>
|
||||
|
||||
* lyx2lyx/lyxconvert_215 (first_layout): new function to assure
|
||||
that \layout is the first element in a lyx file.
|
||||
|
||||
2003-06-07 José Matos <jamatos@fep.up.pt>
|
||||
|
||||
* lyx2lyx/lyxconvert_216 (update_tabular): small fix to work with
|
||||
|
@ -107,6 +107,12 @@ def remove_vcid(lines):
|
||||
if i != -1:
|
||||
del lines[i]
|
||||
|
||||
def first_layout(lines):
|
||||
while (lines[0] == ""):
|
||||
del lines[0]
|
||||
if lines[0][:7] != "\\layout":
|
||||
lines[:0] = ["\\layout Standard"]
|
||||
|
||||
def remove_space_in_units(lines):
|
||||
margins = ["\\topmargin","\\rightmargin",
|
||||
"\\leftmargin","\\bottommargin"]
|
||||
@ -132,6 +138,7 @@ def remove_space_in_units(lines):
|
||||
i = i + 1
|
||||
|
||||
def convert(header,body):
|
||||
first_layout(body)
|
||||
remove_vcid(header)
|
||||
remove_cursor(body)
|
||||
update_toc(body)
|
||||
|
Loading…
Reference in New Issue
Block a user