mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
small fix to ControlCitation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1797 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9f29ab3aa5
commit
1e4e0efe0e
@ -1,3 +1,7 @@
|
||||
2001-03-20 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlCitation.C (getBibkeyInfo): parse non-BibTeX entries correctly.
|
||||
|
||||
2001-03-20 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlLog.[Ch]:
|
||||
|
@ -89,23 +89,23 @@ string const ControlCitation::getBibkeyInfo(string const & key)
|
||||
InfoMap::const_iterator it = bibkeysInfo_.find(key);
|
||||
if (it != bibkeysInfo_.end()) {
|
||||
// Search for all possible "required" keys
|
||||
string author = parseBibTeX((*it).second, "author");
|
||||
string author = parseBibTeX(it->second, "author");
|
||||
if (author.empty())
|
||||
author = parseBibTeX((*it).second, "editor");
|
||||
author = parseBibTeX(it->second, "editor");
|
||||
|
||||
string year = parseBibTeX((*it).second, "year");
|
||||
string title = parseBibTeX((*it).second, "title");
|
||||
string booktitle = parseBibTeX((*it).second, "booktitle");
|
||||
string chapter = parseBibTeX((*it).second, "chapter");
|
||||
string pages = parseBibTeX((*it).second, "pages");
|
||||
string year = parseBibTeX(it->second, "year");
|
||||
string title = parseBibTeX(it->second, "title");
|
||||
string booktitle = parseBibTeX(it->second, "booktitle");
|
||||
string chapter = parseBibTeX(it->second, "chapter");
|
||||
string pages = parseBibTeX(it->second, "pages");
|
||||
|
||||
string media = parseBibTeX((*it).second, "journal");
|
||||
string media = parseBibTeX(it->second, "journal");
|
||||
if (media.empty())
|
||||
media = parseBibTeX((*it).second, "publisher");
|
||||
media = parseBibTeX(it->second, "publisher");
|
||||
if (media.empty())
|
||||
media = parseBibTeX((*it).second, "school");
|
||||
media = parseBibTeX(it->second, "school");
|
||||
if (media.empty())
|
||||
media = parseBibTeX((*it).second, "institution");
|
||||
media = parseBibTeX(it->second, "institution");
|
||||
|
||||
result = author;
|
||||
if (!year.empty())
|
||||
@ -120,6 +120,9 @@ string const ControlCitation::getBibkeyInfo(string const & key)
|
||||
result += ", " + media;
|
||||
if (!pages.empty())
|
||||
result += ", pp. " + pages;
|
||||
|
||||
if (result.empty()) // not a BibTeX record
|
||||
result = it->second;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user