Properly parse biblatex crossref'ed book titles

This commit is contained in:
Juergen Spitzmueller 2024-02-24 15:51:35 +01:00
parent 3eaa374506
commit 82064f7bff

View File

@ -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 we have no result, check in the cross-ref'ed entries
if (ret.empty() && !xrefs.empty()) { if (ret.empty() && !xrefs.empty()) {
bool const biblatex =
buf.params().documentClass().citeFramework() == "biblatex";
// xr is a (reference to a) BibTeXInfo const * // xr is a (reference to a) BibTeXInfo const *
for (auto const & xr : xrefs) { for (auto const & xr : xrefs) {
if (!xr) if (!xr)
@ -1289,6 +1291,13 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
if (!ret.empty()) if (!ret.empty())
// success! // success!
break; 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;
} }
} }