]> git.lyx.org Git - features.git/commitdiff
Further fixes for InsetLayout argument (for environments and empty latex names)
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 25 Nov 2012 16:29:08 +0000 (17:29 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 25 Nov 2012 16:29:08 +0000 (17:29 +0100)
src/insets/InsetText.cpp

index 7432f5a9829b5923bb23975c9f4a135327676d87..2b65245b5b67dc966f9615e7f62bd3213081cd85 100644 (file)
@@ -442,16 +442,22 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const
                        os << '{';
                } else if (il.latextype() == InsetLayout::ENVIRONMENT) {
                        if (il.isDisplay())
-                           os << breakln;
+                               os << breakln;
                        else
-                           os << safebreakln;
+                               os << safebreakln;
                        if (runparams.lastid != -1)
                                os.texrow().start(runparams.lastid,
                                                  runparams.lastpos);
-                       os << "\\begin{" << from_utf8(il.latexname()) << "}\n";
+                       os << "\\begin{" << from_utf8(il.latexname()) << "}";
+                       getOptArg(os, runparams);
                        if (!il.latexparam().empty())
                                os << from_utf8(il.latexparam());
+                       os << '\n';
                }
+       } else {
+               getOptArg(os, runparams);
+               if (!il.latexparam().empty())
+                       os << from_utf8(il.latexparam());
        }
        OutputParams rp = runparams;
        if (il.isPassThru())