getTitle(); $type = $bibentry->getType(); // later on, all values of $entry will be joined by a comma $entry=array(); // title // usually in bold: .bibtitle { font-weight:bold; } $title = ''.$title.''; if ($bibentry->hasField('url')) $title = ' '.$title.''; // author if ($bibentry->hasField('author')) { $coreInfo = $title . ' ('.$bibentry->formattedAuthors().')';} else $coreInfo = $title; // core info usually contains title + author $entry[] = $coreInfo; // now the book title $booktitle = ''; if ($type=="inproceedings") { $booktitle = 'In '.$bibentry->getField(BOOKTITLE); } if ($type=="incollection") { $booktitle = 'Chapter in '.$bibentry->getField(BOOKTITLE);} if ($type=="inbook") { $booktitle = 'Chapter in '.$bibentry->getField('chapter');} if ($type=="article") { $booktitle = 'In '.$bibentry->getField("journal");} if (($type=="misc") && $bibentry->hasField("note")) { $booktitle = $bibentry->getField("note");} //// we may add the editor names to the booktitle $editor=''; if ($bibentry->hasField(EDITOR)) { $editors = array(); foreach ($bibentry->getEditors() as $ed) { $editors[]=formatAuthor($ed); } $editor = implode(', ',$editors).', '.(count($editors)>1?'eds.':'ed.'); } if ($editor!='') $booktitle .=' ('.$editor.')'; // end editor section // is the booktitle available if ($booktitle!='') { $entry[] = ''.$booktitle.''; } $publisher=''; if ($type=="phdthesis") { $publisher = 'PhD thesis, '.$bibentry->getField(SCHOOL); } if ($type=="mastersthesis") { $publisher = 'Master\'s thesis, '.$bibentry->getField(SCHOOL); } if ($type=="bachelorsthesis") { $publisher = 'Bachelor\'s thesis, '.$bibentry->getField(SCHOOL); } if ($type=="techreport") { $publisher = 'Technical report, '.$bibentry->getField("institution"); } if ($type=="misc") { $publisher = $bibentry->getField('howpublished'); } if ($bibentry->hasField("publisher")) { $publisher = $bibentry->getField("publisher"); } if ($publisher!='') $entry[] = ''.$publisher.''; if ($bibentry->hasField('volume')) $entry[] = "volume ".$bibentry->getField("volume"); if ($bibentry->hasField(YEAR)) $entry[] = $bibentry->getYear(); $result = implode(", ",$entry).'.'; // some comments (e.g. acceptance rate)? if ($bibentry->hasField('comment')) { $result .= " (".$bibentry->getField("comment").")"; } if ($bibentry->hasField('note')) { $result .= " (".$bibentry->getField("note").")"; } // add the Coin URL $result .= "\n".$bibentry->toCoins(); return $result; } ?>