WYSIWYM citation labels for sub-standard BibTeX databases.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4078 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-04-26 14:35:04 +00:00
parent 96075e576e
commit 9383796455
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-04-22 Angus Leeming <a.leeming@ic.ac.uk>
* biblio.C (getAbbreviatedAuthor, getYear): Deal with sub-standard
BibTeX databases in a WYSIWYM way.
2002-04-22 Angus Leeming <a.leeming@ic.ac.uk>
* biblio.C (getAbbreviatedAuthor, getYear): Cæsar is dead. RIP; he was

View File

@ -198,6 +198,13 @@ string const getAbbreviatedAuthor(InfoMap const & map, string const & key)
if (author.empty())
author = parseBibTeX(it->second, "editor");
if (author.empty()) {
author = parseBibTeX(it->second, "key");
if (author.empty())
author = key;
return author;
}
vector<string> authors = getVectorFromString(author, "and");
if (!authors.empty()) {
@ -247,6 +254,9 @@ string const getYear(InfoMap const & map, string const & key)
}
string year = parseBibTeX(it->second, "year");
if (year.empty())
year = _("No year");
return year;
}