[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-cvs
Subject: [LyX/master] Properly parse biblatex crossref'ed book titles
From: Juergen Spitzmueller <spitz () lyx ! org>
Date: 2024-02-24 14:52:08
Message-ID: b639f4f55b6b293ceec8bd014262c2a4.lyx-cvs () lists ! lyx ! org
[Download RAW message or body]
commit 82064f7bff7e172037a0b579ed96222de58281d9
Author: Juergen Spitzmueller <spitz@lyx.org>
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
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic