+2002-03-05 Herbert Voss <voss@lyx.org>
+
+ biblio.C: (getInfo) simplify if using paragraph layout "bibliography".
+
2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
* biblio.C (getInfo): return the info field correctly if the key
lyx::Assert(!map.empty());
InfoMap::const_iterator it = map.find(key);
- if (it == map.end()) return string();
+ if (it == map.end())
+ return string();
+ // is the entry a BibTeX one or one from lyx-layout "bibliography"?
+ if (!contains(it->second,'='))
+ return it->second.c_str();
// Search for all possible "required" keys
string author = parseBibTeX(it->second, "author");
char const * const tmp = result.str().c_str();
string result_str = tmp ? strip(tmp) : string();
- if (result_str.empty()) // not a BibTeX record
+
+ if (result_str.empty())
+ // This should never happen (or at least be very unusual!)
result_str = it->second;
return result_str;