From 322eb96219052db1002a0342c22764e3ac6651bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 25 May 2009 08:13:56 +0000 Subject: [PATCH] * Allow manual setting of bibliography indendation 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 | 3 ++- src/Paragraph.cpp | 3 ++- src/output_latex.cpp | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index b5dc10bd56..ae6d82e94b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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 { diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 87c878b192..37d2957f8d 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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!"); diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 534bf48be4..4736530e83 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -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(); -- 2.39.5