Fix handling of older tex2lyx files.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10139 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2005-07-06 16:13:20 +00:00
parent e579fdec82
commit 38801aed7f
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-07-06 José Matos <jamatos@lyx.org>
* lyx_1_4.lyx (convert_paperpackage): older tex2lyx generated files
had \paperpackage with 'default' instead of 'none'.
2005-07-05 José Matos <jamatos@lyx.org> 2005-07-05 José Matos <jamatos@lyx.org>
* LyX.py (LyX_Base): * LyX.py (LyX_Base):

View File

@ -1515,7 +1515,7 @@ def convert_paperpackage(file):
file.warning("Malformed lyx file: Missing '\\paperpackage'.") file.warning("Malformed lyx file: Missing '\\paperpackage'.")
return return
packages = {'a4':'none', 'a4wide':'a4', 'widemarginsa4':'a4wide'} packages = {'default':'none','a4':'none', 'a4wide':'a4', 'widemarginsa4':'a4wide'}
paperpackage = split(file.header[i])[1] paperpackage = split(file.header[i])[1]
file.header[i] = replace(file.header[i], paperpackage, packages[paperpackage]) file.header[i] = replace(file.header[i], paperpackage, packages[paperpackage])