Also consider xrefs in crossref'ed entries.
This commit is contained in:
Juergen Spitzmueller 2016-09-20 11:34:17 +02:00
parent 7ace3d4f20
commit 5b2f5d056a

View File

@ -796,8 +796,18 @@ vector<docstring> const BiblioInfo::getXRefs(BibTeXInfo const & data, bool const
if (!data.isBibTeX()) if (!data.isBibTeX())
return result; return result;
// Legacy crossref field. This is not nestable. // Legacy crossref field. This is not nestable.
if (!nested && !data["crossref"].empty()) if (!nested && !data["crossref"].empty()) {
result.push_back(data["crossref"]); 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<docstring> const nxdata = getXRefs(xref, true);
if (!nxdata.empty())
result.insert(result.end(), nxdata.begin(), nxdata.end());
}
}
// Biblatex's xdata field. Infinitely nestable. // Biblatex's xdata field. Infinitely nestable.
// XData field can consist of a comma-separated list of keys // XData field can consist of a comma-separated list of keys
vector<docstring> const xdatakeys = getVectorFromString(data["xdata"]); vector<docstring> const xdatakeys = getVectorFromString(data["xdata"]);