commit 82064f7bff7e172037a0b579ed96222de58281d9
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Feb 24 15:51:35 2024 +0100
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;
}
}
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs