commit bebc18405430a87718d7b398235bf2483d2994f2
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Apr 19 09:33:31 2019 +0200

    Display full author list with Natbib (non-BibTeX) if requested
---
 src/BiblioInfo.cpp               |    6 ++++++
 src/frontends/qt4/GuiBibitem.cpp |    4 +++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp
index dac2097..80cafeb 100644
--- a/src/BiblioInfo.cpp
+++ b/src/BiblioInfo.cpp
@@ -524,6 +524,12 @@ docstring const BibTeXInfo::getAuthorList(Buffer const * 
buf,
                        // in this case, we didn't find a "(",
                        // so we don't have author (year)
                        return docstring();
+               if (full) {
+                       // Natbib syntax is "Jones et al.(1990)Jones, Baker, 
and Williams"
+                       docstring const fullauthors = trim(rsplit(remainder, 
')'));
+                       if (!fullauthors.empty())
+                               return fullauthors;
+               }
                return authors;
        }
 
diff --git a/src/frontends/qt4/GuiBibitem.cpp b/src/frontends/qt4/GuiBibitem.cpp
index 462a870..84bffe4 100644
--- a/src/frontends/qt4/GuiBibitem.cpp
+++ b/src/frontends/qt4/GuiBibitem.cpp
@@ -64,7 +64,9 @@ void GuiBibitem::paramsToDialog(Inset const * inset)
                int const i = label.lastIndexOf("(");
                int const j = label.lastIndexOf(")");
                if (i != -1 && j != -1 && i < j) {
-                       // Split Author(Year) to Author and Year
+                       // Split Author(s) and Year
+                       // Natbib syntax is "Jones et al.(1990)Jones, Baker, 
and Williams"
+                       // (full list is optional)
                        QString const year = label.left(j).mid(i + 1);
                        QString const author = label.left(i);
                        QString const allauthors = label.mid(j + 1);

Reply via email to