]> git.lyx.org Git - features.git/commitdiff
Fix bug #10817.
authorRichard Heck <rgheck@lyx.org>
Thu, 22 Feb 2018 20:40:05 +0000 (15:40 -0500)
committerRichard Heck <rgheck@lyx.org>
Thu, 22 Feb 2018 20:44:29 +0000 (15:44 -0500)
Respect 'literal' setting when calculating longest bibitem.

(cherry picked from commit 224e56c935074729b39aa59994d3e42031f6db17)

src/insets/InsetBibitem.cpp
status.23x

index 08e8c7666549cfa82e2686601fc0ab259ad77e62..f9b244c4603f556d3a5c68af74a1c182f4830b22 100644 (file)
@@ -249,6 +249,7 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
        ParagraphList::const_iterator it = buffer.paragraphs().begin();
        ParagraphList::const_iterator end = buffer.paragraphs().end();
 
+       bool is_literal = false;
        for (; it != end; ++it) {
                if (it->insetList().empty())
                        continue;
@@ -274,11 +275,14 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
                if (wx > w) {
                        w = wx;
                        lbl = label;
+                       is_literal = (bitem->getParam("literal") == "true");
                }
        }
 
        if (!lbl.empty()) {
                InsetCommandParams p(BIBITEM_CODE);
+               if (is_literal)
+                       p["literal"] = from_ascii("true");
                return p.prepareCommand(runparams, lbl, ParamInfo::HANDLING_LATEXIFY);
        }
 
index d72f1bb6f12a022ce6a95957c414714c0217bf08..19a25ef6aecbfa9fb98e739c715c1ce86345f5ad 100644 (file)
@@ -55,6 +55,8 @@ What's new
 - Fix language settings annd line spacing in InPreamble-titles
   (bug 9332, 1049).
 
+- Respect 'literal' setting when calculating longest bibitem (bug 10817).
+
 
 * LYX2LYX