Thursday, September 1, 2011

Forcing LyX to open newer file formats

Sometimes you create LyX files on the newer version, say, on your office machine, and try to open them on an older version, say, at your home machine. In order to put off upgrading my whole system (long story), I can simply rewrite the header information on the file.

Make a backup of the old file.
Identify the first two lines, which should look like:

#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413


Comment out those lines and add the following two lines above the now-commented-out lines

LyX 1.6.7 created this file. For more info see http://www.lyx.org/
\lyxformat 345


So that it reads

LyX 1.6.7 created this file. For more info see http://www.lyx.org/
\lyxformat 345

##LyX 2.0 created this file. For more info see http://www.lyx.org/
#\lyxformat 413


Note that when you open your new file you may receive error messages from LyX. You can ignore them at your own risk. If I see something serious I look more closely, but at the very least I can at least copy and paste my content into a new clean file from the older LyX.

Lastly, consider destroying the backup of the LyX file.

No comments:

Post a Comment