]> git.lyx.org Git - features.git/commitdiff
* src/output_latex.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Fri, 23 Nov 2007 14:59:35 +0000 (14:59 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Fri, 23 Nov 2007 14:59:35 +0000 (14:59 +0000)
- prevent wrong whitespace by trailing '%' on line endings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21742 a592a061-630c-0410-9148-cb99ea01b6c8

src/output_latex.cpp

index 085a6f1ccdf21cc077eaa855cac740d31781941b..7b68bcb25e6b12dcaa45ea70a2c9d7eaa7dcd364 100644 (file)
@@ -117,7 +117,8 @@ TeXEnvironment(Buffer const & buf,
                                lyxrc.language_command_end,
                                "$$lang",
                                prev_par_language->babel()))
-                          << '\n';
+                          // the '%' is necessary to prevent unwanted whitespace
+                          << "%\n";
                        texrow.newline();
                }
 
@@ -128,7 +129,8 @@ TeXEnvironment(Buffer const & buf,
                                lyxrc.language_command_begin,
                                "$$lang",
                                par_language->babel()))
-                          << '\n';
+                          // the '%' is necessary to prevent unwanted whitespace
+                          << "%\n";
                        texrow.newline();
                }
        }
@@ -284,7 +286,7 @@ TeXOnePar(Buffer const & buf,
        Language const * const par_language = pit->getParLanguage(bparams);
        // The document's language
        Language const * const doc_language = bparams.language;
-       // The language that was in effect when the environemnt this paragraph is 
+       // The language that was in effect when the environment this paragraph is 
        // inside of was opened
        Language const * const outer_language = 
                (runparams.local_font != 0) ?
@@ -311,7 +313,8 @@ TeXOnePar(Buffer const & buf,
                        os << from_ascii(subst(lyxrc.language_command_end,
                                "$$lang",
                                prev_language->babel()))
-                          << '\n';
+                          // the '%' is necessary to prevent unwanted whitespace
+                          << "%\n";
                        texrow.newline();
                }
 
@@ -364,7 +367,8 @@ TeXOnePar(Buffer const & buf,
                                lyxrc.language_command_begin,
                                "$$lang",
                                par_language->babel()))
-                          << '\n';
+                          // the '%' is necessary to prevent unwanted whitespace
+                          << "%\n";
                        texrow.newline();
                }
        }
@@ -394,7 +398,8 @@ TeXOnePar(Buffer const & buf,
                        if (encoding->package() == Encoding::inputenc && enc_switch.first) {
                                runparams.encoding = encoding;
                                if (enc_switch.second > 0) {
-                                       os << '\n';
+                                       // the '%' is necessary to prevent unwanted whitespace
+                                       os << "%\n";
                                        texrow.newline();
                                }
                        }