diff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index b497c30d8a..1f7f68fa4c 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article diff --git a/src/tex2lyx/test/CJKutf8.lyx.lyx b/src/tex2lyx/test/CJKutf8.lyx.lyx index a4759196e7..b7e0701ca6 100644 --- a/src/tex2lyx/test/CJKutf8.lyx.lyx +++ b/src/tex2lyx/test/CJKutf8.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx index 35b01cc4fc..71c75da38e 100644 --- a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx +++ b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article diff --git a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx index 4e3912df0c..b491ecd92c 100644 --- a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx +++ b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article @@ -142,7 +142,7 @@ has_inner_box 1 inner_pos "c" use_parbox 0 use_makebox 1 -width "-999col%" +width "" special "none" height "1in" height_special "totalheight" @@ -663,7 +663,7 @@ has_inner_box 0 inner_pos "c" use_parbox 0 use_makebox 0 -width "-999col%" +width "" special "none" height "1in" height_special "totalheight" @@ -688,7 +688,7 @@ has_inner_box 0 inner_pos "c" use_parbox 0 use_makebox 0 -width "-999col%" +width "" special "none" height "1in" height_special "totalheight" diff --git a/src/tex2lyx/test/test-insets.lyx.lyx b/src/tex2lyx/test/test-insets.lyx.lyx index b9ec26523b..c1baf269b0 100644 --- a/src/tex2lyx/test/test-insets.lyx.lyx +++ b/src/tex2lyx/test/test-insets.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article @@ -734,7 +734,7 @@ We can input files too, like this \begin_inset CommandInset include LatexCommand input preview false -filename "DummyDocument.lyx" +filename "DummyDocument.lyx.lyx" \end_inset @@ -742,7 +742,7 @@ filename "DummyDocument.lyx" \begin_inset CommandInset include LatexCommand include preview false -filename "Dummy Document.lyx" +filename "Dummy Document.lyx.lyx" \end_inset @@ -750,7 +750,7 @@ filename "Dummy Document.lyx" \begin_inset CommandInset include LatexCommand include preview false -filename "Dummy Document.lyx" +filename "Dummy Document.lyx.lyx" \end_inset @@ -758,7 +758,7 @@ filename "Dummy Document.lyx" \begin_inset CommandInset include LatexCommand include preview false -filename "Dummy~Document.lyx" +filename "Dummy~Document.lyx.lyx" \end_inset @@ -766,7 +766,7 @@ filename "Dummy~Document.lyx" \begin_inset CommandInset include LatexCommand include preview false -filename "Dummy~Document.lyx" +filename "Dummy~Document.lyx.lyx" \end_inset diff --git a/src/tex2lyx/test/test-modules.lyx.lyx b/src/tex2lyx/test/test-modules.lyx.lyx index 13c769d155..8310403836 100644 --- a/src/tex2lyx/test/test-modules.lyx.lyx +++ b/src/tex2lyx/test/test-modules.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass amsart diff --git a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx index a6110368c8..1ab729bec4 100644 --- a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx +++ b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass book diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx index a78f200016..51a14d80f5 100644 --- a/src/tex2lyx/test/test-structure.lyx.lyx +++ b/src/tex2lyx/test/test-structure.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article diff --git a/src/tex2lyx/test/test.lyx.lyx b/src/tex2lyx/test/test.lyx.lyx index 74017aad99..c2e89e7932 100644 --- a/src/tex2lyx/test/test.lyx.lyx +++ b/src/tex2lyx/test/test.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article diff --git a/src/tex2lyx/test/verbatim.lyx.lyx b/src/tex2lyx/test/verbatim.lyx.lyx index e37120065a..f3c8c752d5 100644 --- a/src/tex2lyx/test/verbatim.lyx.lyx +++ b/src/tex2lyx/test/verbatim.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 471 +\lyxformat 472 \begin_document \begin_header \textclass article diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 9239d30984..f32ac84d14 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -818,6 +818,12 @@ bool skipChildren() } +bool roundtripMode() +{ + return roundtrip; +} + + namespace { /*! diff --git a/src/tex2lyx/tex2lyx.h b/src/tex2lyx/tex2lyx.h index 1e23b7add5..4fc7ebc6f4 100644 --- a/src/tex2lyx/tex2lyx.h +++ b/src/tex2lyx/tex2lyx.h @@ -193,6 +193,8 @@ extern bool overwriteFiles(); extern bool copyFiles(); /// Shall we skip child documents and keep them as TeX? extern bool skipChildren(); +/// Does tex2lyx run in roundtrip mode? +extern bool roundtripMode(); /*! diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index a11723ed17..5d90fed629 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -3929,8 +3929,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, string const absfigname = changeExtension(abstexname, ".fig"); fix_child_filename(filename); - string const lyxname = - changeExtension(filename, ".lyx"); + string const lyxname = changeExtension(filename, + roundtripMode() ? ".lyx.lyx" : ".lyx"); string const abslyxname = makeAbsPath( lyxname, getParentFilePath(false)).absFileName(); bool xfig = false;