From: Angus Leeming Date: Fri, 26 Apr 2002 14:35:04 +0000 (+0000) Subject: WYSIWYM citation labels for sub-standard BibTeX databases. X-Git-Tag: 1.6.10~19329 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=93837964558cfe78ae48a31707a3608041f96a01;p=features.git 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 --- diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 36493308d8..638359f286 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2002-04-22 Angus Leeming + + * biblio.C (getAbbreviatedAuthor, getYear): Deal with sub-standard + BibTeX databases in a WYSIWYM way. + 2002-04-22 Angus Leeming * biblio.C (getAbbreviatedAuthor, getYear): Cæsar is dead. RIP; he was diff --git a/src/frontends/controllers/biblio.C b/src/frontends/controllers/biblio.C index 1027032633..ccbc6cdfc5 100644 --- a/src/frontends/controllers/biblio.C +++ b/src/frontends/controllers/biblio.C @@ -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 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; }