mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
Fix bug #10817.
Respect 'literal' setting when calculating longest bibitem.
This commit is contained in:
parent
f8e8877f83
commit
224e56c935
@ -249,6 +249,7 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
|
|||||||
ParagraphList::const_iterator it = buffer.paragraphs().begin();
|
ParagraphList::const_iterator it = buffer.paragraphs().begin();
|
||||||
ParagraphList::const_iterator end = buffer.paragraphs().end();
|
ParagraphList::const_iterator end = buffer.paragraphs().end();
|
||||||
|
|
||||||
|
bool is_literal = false;
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
if (it->insetList().empty())
|
if (it->insetList().empty())
|
||||||
continue;
|
continue;
|
||||||
@ -274,11 +275,14 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
|
|||||||
if (wx > w) {
|
if (wx > w) {
|
||||||
w = wx;
|
w = wx;
|
||||||
lbl = label;
|
lbl = label;
|
||||||
|
is_literal = (bitem->getParam("literal") == "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lbl.empty()) {
|
if (!lbl.empty()) {
|
||||||
InsetCommandParams p(BIBITEM_CODE);
|
InsetCommandParams p(BIBITEM_CODE);
|
||||||
|
if (is_literal)
|
||||||
|
p["literal"] = from_ascii("true");
|
||||||
return p.prepareCommand(runparams, lbl, ParamInfo::HANDLING_LATEXIFY);
|
return p.prepareCommand(runparams, lbl, ParamInfo::HANDLING_LATEXIFY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user