]> git.lyx.org Git - features.git/commitdiff
tex2lyx: fix some issues spotted by Vincent
authorUwe Stöhr <uwestoehr@lyx.org>
Wed, 27 Jun 2012 00:52:09 +0000 (02:52 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Wed, 27 Jun 2012 00:52:09 +0000 (02:52 +0200)
src/tex2lyx/Preamble.cpp
src/tex2lyx/text.cpp

index e4dc4883a6e6d015d94e4341a870787ec90ea960..dc258ea829400a722f675f911f3f95721c35fdf2 100644 (file)
@@ -754,7 +754,7 @@ void Preamble::handle_package(Parser &p, string const & name,
 
        else if (name == "CJK") {
                // It is impossible to determine the document language if CJK is used.
-               // All we can do is to notify the user that he has to set this by hisself.
+               // All we can do is to notify the user that he has to set this by himself.
                have_CJK = true;
                // set the encoding to "auto" because it might be set to "default" by the babel handling
                // and this would not be correct for CJK
index 6d32c8b742be4bf3d21222f11fa9145e0c53e305..2962cffcbf6078bc69703d5774984f5207247d18 100644 (file)
@@ -1472,7 +1472,7 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                // LyX doesn't support the second argument so if
                // this is used we need to output everything as ERT
                string const mapping = p.getArg('{', '}');
-               if ( (!mapping.empty() && mapping != " ")
+               if ((!mapping.empty() && mapping != " ")
                        || (!is_known(encoding, supported_CJK_encodings))) {
                        parent_context.check_layout(os);
                        handle_ert(os, "\\begin{" + name + "}{" + encoding + "}{" + mapping + "}",
@@ -1480,7 +1480,6 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                        // we must parse the content as verbatim because e.g. SJIS can contain
                        // normally invalid characters
                        string const s = p.plainEnvironment("CJK");
-                       string::const_iterator it2 = s.begin();
                        for (string::const_iterator it = s.begin(), et = s.end(); it != et; ++it) {
                                if (*it == '\\')
                                        handle_ert(os, "\\", parent_context);
@@ -2113,7 +2112,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                   << "\\begin_layout Plain Layout\n"
                   << "This document contains text in Chinese, Japanese or Korean.\n"
                   << " It was therefore impossible for tex2lyx to set the correct document langue for your document."
-                  << " Please set in the document settings by yourself!\n"
+                  << " Please set the language manually in the document settings.\n"
                   << "\\end_layout\n";
                end_inset(os);
                have_CJK = false;