mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Properly parse biblatex crossref'ed book titles
This commit is contained in:
parent
3eaa374506
commit
82064f7bff
@ -1279,6 +1279,8 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
|
||||
|
||||
// If we have no result, check in the cross-ref'ed entries
|
||||
if (ret.empty() && !xrefs.empty()) {
|
||||
bool const biblatex =
|
||||
buf.params().documentClass().citeFramework() == "biblatex";
|
||||
// xr is a (reference to a) BibTeXInfo const *
|
||||
for (auto const & xr : xrefs) {
|
||||
if (!xr)
|
||||
@ -1289,6 +1291,13 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
|
||||
if (!ret.empty())
|
||||
// success!
|
||||
break;
|
||||
// in biblatex, cross-ref'ed titles are mapped
|
||||
// to booktitle. Same for subtitle etc.
|
||||
if (biblatex && prefixIs(key, "book"))
|
||||
ret = (*xr)[key.substr(4)];
|
||||
if (!ret.empty())
|
||||
// success!
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user