X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBiblioInfo.cpp;h=243f78c59f6595fb7d24ac0cede957e04e2db87c;hb=63e2ac459745c1f5a650edf1b59fa7f9ff7f680c;hp=7653db0e549c814ba5cefc02989826133ba1a176;hpb=67da1431def33a5f22ec703f4ff0988f332c8b4b;p=lyx.git diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 7653db0e54..243f78c59f 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -796,8 +796,18 @@ vector const BiblioInfo::getXRefs(BibTeXInfo const & data, bool const if (!data.isBibTeX()) return result; // Legacy crossref field. This is not nestable. - if (!nested && !data["crossref"].empty()) - result.push_back(data["crossref"]); + if (!nested && !data["crossref"].empty()) { + docstring const xrefkey = data["crossref"]; + result.push_back(xrefkey); + // However, check for nested xdatas + BiblioInfo::const_iterator it = find(xrefkey); + if (it != end()) { + BibTeXInfo const & xref = it->second; + vector const nxdata = getXRefs(xref, true); + if (!nxdata.empty()) + result.insert(result.end(), nxdata.begin(), nxdata.end()); + } + } // Biblatex's xdata field. Infinitely nestable. // XData field can consist of a comma-separated list of keys vector const xdatakeys = getVectorFromString(data["xdata"]);