[LyX/master] Consider biblatex author -> bookauthor mapping in preview

Juergen Spitzmueller spitz at lyx.org
Sun Feb 25 07:10:58 UTC 2024


commit ce27f5beca427ddcc2d1d22f4bb2fffd6d91e970
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Feb 25 08:10:23 2024 +0100

    Consider biblatex author -> bookauthor mapping in preview
---
 src/BiblioInfo.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp
index 2a2e8d476c..a9245c6a77 100644
--- a/src/BiblioInfo.cpp
+++ b/src/BiblioInfo.cpp
@@ -1295,6 +1295,10 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
 			// to booktitle. Same for subtitle etc.
 			if (biblatex && prefixIs(key, "book"))
 				ret = (*xr)[key.substr(4)];
+			// likewise, author is maped onto bookauthor
+			else if (biblatex && contains(key, ":bookauthor"))
+				ret = xr->getValueForKey(subst(key, "bookauthor", "author"),
+							 buf, ci, xr_dummy, maxsize);
 			if (!ret.empty())
 				// success!
 				break;


More information about the lyx-cvs mailing list