From 82064f7bff7e172037a0b579ed96222de58281d9 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 24 Feb 2024 15:51:35 +0100 Subject: [PATCH] Properly parse biblatex crossref'ed book titles --- src/BiblioInfo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } } -- 2.39.5