]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Get InsetCollapsable working, at least to some extent.
[lyx.git] / src / output_latex.cpp
index 99843639632c1e539cd5ba2213fb999dbb636c5b..4736530e8322d8e806d1663d67833a0d97940321 100644 (file)
@@ -169,8 +169,12 @@ TeXEnvironment(Buffer const & buf,
                           << pit->params().labelWidthString()
                           << "}\n";
                } else if (style.labeltype == LABEL_BIBLIO) {
-                       // ale970405
-                       os << '{' << bibitemWidest(buf) << "}\n";
+                       if (pit->params().labelWidthString().empty())
+                               os << '{' << bibitemWidest(buf) << "}\n";
+                       else
+                               os << '{'
+                                 << pit->params().labelWidthString()
+                                 << "}\n";
                } else
                        os << from_ascii(style.latexparam()) << '\n';
                texrow.newline();
@@ -442,11 +446,8 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
                        // With CJK, only add switch if we have CJK content at the beginning
                        // of the paragraph
                        if (encoding->package() != Encoding::CJK || i == 0) {
-                               OutputParams tmp_rp = runparams;
-                               runparams.moving_arg = false;
                                pair<bool, int> enc_switch = switchEncoding(os, bparams, runparams,
                                        *encoding);
-                               runparams = tmp_rp;
                                // the following is necessary after a CJK environment in a multilingual
                                // context (nesting issue).
                                if (par_language->encoding()->package() == Encoding::CJK &&
@@ -580,7 +581,7 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
                        break;
        }
 
-               // fall through possible
+       // fall through possible
        default:
                // we don't need it for the last paragraph!!!
                if (nextpit != paragraphs.end())
@@ -700,9 +701,11 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
        // If this is the last paragraph, and a local_font was set upon entering
        // the inset, and we're using "auto" or "default" encoding, the encoding
        // should be set back to that local_font's encoding.
+       // However, do not change the encoding when XeTeX is used.
        if (nextpit == paragraphs.end() && runparams_in.local_font != 0
            && runparams_in.encoding != runparams_in.local_font->language()->encoding()
-           && (bparams.inputenc == "auto" || bparams.inputenc == "default")) {
+           && (bparams.inputenc == "auto" || bparams.inputenc == "default")
+           && (!bparams.useXetex)) {
                runparams_in.encoding = runparams_in.local_font->language()->encoding();
                os << setEncoding(runparams_in.encoding->iconvName());
        }
@@ -798,8 +801,7 @@ void latexParagraphs(Buffer const & buf,
                // FIXME This check should not be needed. We should
                // perhaps issue an error if it is.
                Layout const & layout = par->forcePlainLayout() ?
-                               tclass.plainLayout() :
-                               par->layout();
+                               tclass.plainLayout() : par->layout();
 
                if (layout.intitle) {
                        if (already_title) {