]> git.lyx.org Git - features.git/commitdiff
* Allow manual setting of bibliography indendation
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 25 May 2009 08:13:56 +0000 (08:13 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 25 May 2009 08:13:56 +0000 (08:13 +0000)
 that overrides bibitemWidest (bug 5960).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29840 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/Paragraph.cpp
src/output_latex.cpp

index b5dc10bd5637d3001fc996405ec5f7e4042f1cfe..ae6d82e94bacc7b8b0d51d7b9ab53b23f2ff550f 100644 (file)
@@ -3144,7 +3144,8 @@ static void setLabel(Buffer const & buf, ParIterator & it)
        // Compute the item depth of the paragraph
        par.itemdepth = getItemDepth(it);
 
-       if (layout.margintype == MARGIN_MANUAL) {
+       if (layout.margintype == MARGIN_MANUAL
+           || layout.latextype == LATEX_BIB_ENVIRONMENT) {
                if (par.params().labelWidthString().empty())
                        par.params().labelWidthString(par.translateIfPossible(layout.labelstring(), bp));
        } else {
index 87c878b19278af4d2d9a571162e57666101528fa..37d2957f8d8cfa8336a3b20738edc493a688052f 100644 (file)
@@ -1589,7 +1589,8 @@ docstring const & Paragraph::labelString() const
 // the next two functions are for the manual labels
 docstring const Paragraph::getLabelWidthString() const
 {
-       if (d->layout_->margintype == MARGIN_MANUAL)
+       if (d->layout_->margintype == MARGIN_MANUAL
+           || d->layout_->latextype == LATEX_BIB_ENVIRONMENT)
                return d->params_.labelWidthString();
        else
                return _("Senseless with this layout!");
index 534bf48be4bf217360674612de12b7e42c0d2cc9..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();