From: Juergen Spitzmueller Date: Sat, 24 Feb 2024 14:51:35 +0000 (+0100) Subject: Properly parse biblatex crossref'ed book titles X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=82064f7bff7e172037a0b579ed96222de58281d9;p=features.git Properly parse biblatex crossref'ed book titles --- diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 8ce296b372..2a2e8d476c 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -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; } }