diff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index 806e30a47c..ef1fae208b 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -120,7 +120,22 @@ begin{CJK}{EUC-JP}{hei} \end_inset - Japanese + Japanese + (this CJK environment will be put in ERT because LyX supports only one CJK + font mapping per document, this environment uses the +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash + +\end_layout + +\end_inset + +texttt{hei} mapping, + and the first mapping is empty. \begin_inset ERT status collapsed @@ -245,7 +260,7 @@ begin{CJK}{JIS}{} \end_inset -JIS-code  + JIS-code  \begin_inset ERT status collapsed diff --git a/src/tex2lyx/test/CJK.tex b/src/tex2lyx/test/CJK.tex index 434477b85f..a9fae3b4f8 100644 --- a/src/tex2lyx/test/CJK.tex +++ b/src/tex2lyx/test/CJK.tex @@ -15,7 +15,10 @@ Japanese \end{CJK} \begin{CJK}{UTF8}{}Chinese traditional\end{CJK} \begin{CJK}{E Japanese \end{CJK} hello \begin{CJK}{GB}{}% -Chinese simplified \end{CJK}\begin{CJK}{EUC-JP}{hei} Japanese \end{CJK} \begin{CJK}{GB}{}Chinese simplified +Chinese simplified \end{CJK}\begin{CJK}{EUC-JP}{hei} Japanese +(this CJK environment will be put in ERT because LyX supports only one CJK +font mapping per document, this environment uses the \texttt{hei} mapping, +and the first mapping is empty.\end{CJK} \begin{CJK}{GB}{}Chinese simplified \end{CJK} % The following Bg5 encoded text cannot be processed as is by latex. diff --git a/src/tex2lyx/test/Dummy Document.lyx b/src/tex2lyx/test/Dummy Document.lyx index f9a4d91e8a..52daa2e007 100644 --- a/src/tex2lyx/test/Dummy Document.lyx +++ b/src/tex2lyx/test/Dummy Document.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 462 +\lyxformat 463 \begin_document \begin_header \textclass article @@ -7,7 +7,7 @@ \maintain_unincluded_children false \language english \language_package none -\inputencoding latin9 +\inputencoding iso8859-15 \fontencoding T1 \font_roman default \font_sans default diff --git a/src/tex2lyx/test/DummyDocument.lyx b/src/tex2lyx/test/DummyDocument.lyx index 92ec53cb32..310e9a7c79 100644 --- a/src/tex2lyx/test/DummyDocument.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 462 +\lyxformat 463 \begin_document \begin_header \textclass article @@ -7,7 +7,7 @@ \maintain_unincluded_children false \language english \language_package none -\inputencoding latin9 +\inputencoding iso8859-15 \fontencoding T1 \font_roman default \font_sans default diff --git a/src/tex2lyx/test/Dummy~Document.lyx b/src/tex2lyx/test/Dummy~Document.lyx index da5ab722b0..03ab7bef1e 100644 --- a/src/tex2lyx/test/Dummy~Document.lyx +++ b/src/tex2lyx/test/Dummy~Document.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.1.0dev -\lyxformat 462 +\lyxformat 463 \begin_document \begin_header \textclass article @@ -7,7 +7,7 @@ \maintain_unincluded_children false \language english \language_package none -\inputencoding latin9 +\inputencoding iso8859-15 \fontencoding T1 \font_roman default \font_sans default diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 855ac28e99..f8c42d1519 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1480,6 +1480,8 @@ void parse_environment(Parser & p, ostream & os, bool outer, output_ert_inset(os, "\\", parent_context); else if (*it == '$') output_ert_inset(os, "$", parent_context); + else if (*it == '\n' && it + 1 != et && s.begin() + 1 != it) + os << "\n "; else os << *it; }