]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.C
more cursor dispatch
[lyx.git] / src / output_latex.C
index 3b6b3449bfe036348d1f87e605dbce55f876e1ea..739cec7c62f925330b801875e54ae5de5dd26fa6 100644 (file)
@@ -131,20 +131,14 @@ TeXEnvironment(Buffer const & buf,
        }
 
        if (style->isEnvironment()) {
+               os << "\\begin{" << style->latexname() << '}';
                if (style->latextype == LATEX_LIST_ENVIRONMENT) {
-                       os << "\\begin{" << style->latexname() << "}{"
-                          << pit->params().labelWidthString() << "}\n";
+                       os << "{" << pit->params().labelWidthString() << "}\n";
                } else if (style->labeltype == LABEL_BIBLIO) {
                        // ale970405
-                       os << "\\begin{" << style->latexname() << "}{"
-                          <<  bibitemWidest(buf)
-                          << "}\n";
-               } else if (style->latextype == LATEX_ITEM_ENVIRONMENT) {
-                       os << "\\begin{" << style->latexname() << '}'
-                          << style->latexparam() << '\n';
+                       os << "{" <<  bibitemWidest(buf) << "}\n";
                } else
-                       os << "\\begin{" << style->latexname() << '}'
-                          << style->latexparam() << '\n';
+                       os << style->latexparam() << '\n';
                texrow.newline();
        }
        ParagraphList::iterator par = pit;
@@ -200,8 +194,8 @@ InsetOptArg * optArgInset(Paragraph const & par)
        InsetList::const_iterator it = par.insetlist.begin();
        InsetList::const_iterator end = par.insetlist.end();
        for (; it != end; ++it) {
-               InsetOld * ins = it->inset;
-               if (ins->lyxCode() == InsetOld::OPTARG_CODE) {
+               InsetBase * ins = it->inset;
+               if (ins->lyxCode() == InsetBase::OPTARG_CODE) {
                        return static_cast<InsetOptArg *>(ins);
                }
        }
@@ -250,11 +244,6 @@ TeXOnePar(Buffer const & buf,
                        texrow.newline();
                }
 
-               if (pit->params().spaceTop().kind() != VSpace::NONE) {
-                       os << pit->params().spaceTop().asLatexCommand(bparams);
-                       further_blank_line = true;
-               }
-
                if (further_blank_line) {
                        os << '\n';
                        texrow.newline();
@@ -395,11 +384,6 @@ TeXOnePar(Buffer const & buf,
        if (in == 0 || !in->forceDefaultParagraphs(in)) {
                further_blank_line = false;
 
-               if (pit->params().spaceBottom().kind() != VSpace::NONE) {
-                       os << pit->params().spaceBottom().asLatexCommand(bparams);
-                       further_blank_line = true;
-               }
-
                if (further_blank_line) {
                        os << '\n';
                        texrow.newline();
@@ -442,7 +426,7 @@ TeXOnePar(Buffer const & buf,
        return ++pit;
 }
 
-} //anon namespace
+} // anon namespace
 
 //
 // LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end