Fix inconsistent version in .lyx files (#7951)

LyX, lyx2lyx and tex2lyx produce now all the same version indicator consisting
only of the major and minor version. It is not decided yet whether future
development versions will add a -dev suffix, but for 2.1.0 this change fixes
the inconsistencies.
This commit is contained in:
Georg Baum 2013-07-07 09:56:34 +02:00 committed by Vincent van Ravesteijn
parent da8b77b0b9
commit 822e171762
15 changed files with 22 additions and 14 deletions

View File

@ -16,7 +16,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
version = "@PACKAGE_VERSION@"
# Important: Keep the version formatting in sync with LyX and
# tex2lyx (bug 7951)
version = "@LYX_MAJOR_VERSION@.@LYX_MINOR_VERSION@"
if __name__ == "__main__":
pass

View File

@ -1404,6 +1404,8 @@ bool Buffer::write(ostream & ofs) const
// The top of the file should not be written by params().
// write out a comment in the top of the file
// Important: Keep the version formatting in sync with lyx2lyx and
// tex2lyx (bug 7951)
ofs << "#LyX " << lyx_version_major << "." << lyx_version_minor
<< " created this file. For more info see http://www.lyx.org/\n"
<< "\\lyxformat " << LYX_FORMAT << "\n"

View File

@ -21,6 +21,7 @@
#include "Layout.h"
#include "Lexer.h"
#include "TextClass.h"
#include "version.h"
#include "support/convert.h"
#include "support/FileName.h"
@ -1040,7 +1041,10 @@ bool Preamble::writeLyXHeader(ostream & os, bool subdoc)
}
// output the LyX file settings
os << "#LyX file created by tex2lyx " << PACKAGE_VERSION << "\n"
// Important: Keep the version formatting in sync with LyX and
// lyx2lyx (bug 7951)
os << "#LyX file created by tex2lyx " << lyx_version_major << '.'
<< lyx_version_minor << '\n'
<< "\\lyxformat " << LYX_FORMAT << '\n'
<< "\\begin_document\n"
<< "\\begin_header\n"

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header

View File

@ -1,4 +1,4 @@
#LyX file created by tex2lyx 2.1.0
#LyX file created by tex2lyx 2.1
\lyxformat 474
\begin_document
\begin_header