<title>When is an update of the .lyx file format number needed?</title>
<para>When you are working on a new feature you may ask yourself whether it needs an update of the .lyx file format number. Whether an update is needed or not is not always obvious. Rule of thumb: </para>
<blockquote>
<para>Whenever there is the danger that a previous version of LyX cannot open a file using the new feature, a file format update is needed.</para>
</blockquote>
<para>The file format change allows lyx2lyx rules to implement backwards compatibility. Below you can find a list of reasons for file format updates with explanations:</para>
<variablelist>
<varlistentry>
<term>New document setting</term>
<listitem>
<para> Whenever you introduce a new setting that is stored in the document header, a file format update is needed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Removed document setting</term>
<listitem>
<para> If a certain setting becomes obsolete and gets removed, a file format update is needed.</para>
<para> The reason for this is that there is no true ERT inset for math formulas: Each command is parsed, and if a user happens to define a local command with the same name as a command that triggers an automatic load of a package, they need to be able to switch off the automatic loading of that package. This switch is stored by the use_package header setting.</para>
<para> Of course a new inset requires a file format update.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>New style</term>
<listitem>
<para> If a new style or inset layout is added to any layout file or module shipped with LyX, then a new file format is needed in the master (development) branch. It is possible to backport new styles to the stable version without a file format change.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Removed style</term>
<listitem>
<para> If a style or inset layout is removed in any layout file or module shipped with LyX, a new file format is required.</para>
<para>However, <emphasisrole='bold'>new</emphasis> layouts and modules do <emphasisrole='bold'>not</emphasis> require a file format update (changed 03/16). </para>
<para>If you are still unsure, please ask on the development list.</para>