]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Micro-optimization.
[lyx.git] / src / output_latex.cpp
index f5d6af679f354994ff91f42ba13d9f62ade9df14..5457dee3dfdd6ec0331f61a250cb370021b398ae 100644 (file)
@@ -181,7 +181,7 @@ TeXEnvironment(Buffer const & buf,
                           << "}\n";
                } else if (style.labeltype == LABEL_BIBLIO) {
                        if (pit->params().labelWidthString().empty())
-                               os << '{' << bibitemWidest(buf) << "}\n";
+                               os << '{' << bibitemWidest(buf, runparams) << "}\n";
                        else
                                os << '{'
                                  << pit->params().labelWidthString()
@@ -319,6 +319,15 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
        OutputParams runparams = runparams_in;
        runparams.isLastPar = nextpit == paragraphs.end();
 
+       bool const maintext = text.isMainText();
+       // we are at the beginning of an inset and CJK is already open;
+       // we count inheritation levels to get the inset nesting right.
+       if (pit == paragraphs.begin() && !maintext
+           && (cjk_inherited_ > 0 || open_encoding_ == CJK)) {
+               cjk_inherited_ += 1;
+               open_encoding_ = none;
+       }
+
        if (runparams.verbatim) {
                int const dist = distance(paragraphs.begin(), pit);
                Font const outerfont = text.outerFont(dist);
@@ -341,15 +350,6 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
 
        runparams.moving_arg |= style.needprotect;
 
-       bool const maintext = text.isMainText();
-       // we are at the beginning of an inset and CJK is already open;
-       // we count inheritation levels to get the inset nesting right.
-       if (pit == paragraphs.begin() && !maintext
-           && (cjk_inherited_ > 0 || open_encoding_ == CJK)) {
-               cjk_inherited_ += 1;
-               open_encoding_ = none;
-       }
-
        // This paragraph's language
        Language const * const par_language = pit->getParLanguage(bparams);
        // The document's language