fix a bug for techreport in IEEE's style JanosBibliographyStyle
This commit is contained in:
@@ -758,9 +758,15 @@ class BTBTest extends PHPUnit_Framework_TestCase {
|
|||||||
$this->assertEquals(4,count($btb->bibdb['arXiv-1807.05030']->getRawAuthors()));
|
$this->assertEquals(4,count($btb->bibdb['arXiv-1807.05030']->getRawAuthors()));
|
||||||
$this->assertEquals(4,count($btb->bibdb['arXiv-1807.05030']->getFormattedAuthorsArray()));
|
$this->assertEquals(4,count($btb->bibdb['arXiv-1807.05030']->getFormattedAuthorsArray()));
|
||||||
$this->assertEquals("Oscar Luis Vera-Pérez, Benjamin Danglot, Martin Monperrus and Benoit Baudry",$btb->bibdb['arXiv-1807.05030']->getAuthor());
|
$this->assertEquals("Oscar Luis Vera-Pérez, Benjamin Danglot, Martin Monperrus and Benoit Baudry",$btb->bibdb['arXiv-1807.05030']->getAuthor());
|
||||||
|
|
||||||
|
bibtexbrowser_configure('BIBTEXBROWSER_LINK_STYLE','nothing');
|
||||||
|
bibtexbrowser_configure('BIBLIOGRAPHYSTYLE','JanosBibliographyStyle');
|
||||||
|
$this->assertEquals("Oscar Luis Vera-Pérez, Benjamin Danglot, Martin Monperrus and Benoit Baudry, \"A Comprehensive Study of Pseudo-tested Methods\", Technical report, arXiv 1807.05030, 2018.\n ",strip_tags($btb->bibdb['arXiv-1807.05030']->toHTML()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // end class
|
} // end class
|
||||||
|
|
||||||
@copy('bibtexbrowser.local.php.bak','bibtexbrowser.local.php');
|
@copy('bibtexbrowser.local.php.bak','bibtexbrowser.local.php');
|
||||||
|
|||||||
+5
-3
@@ -2413,11 +2413,11 @@ function JanosBibliographyStyle($bibentry) {
|
|||||||
$publisher = 'Master\'s thesis, '.$bibentry->getField(SCHOOL);
|
$publisher = 'Master\'s thesis, '.$bibentry->getField(SCHOOL);
|
||||||
}
|
}
|
||||||
if ($type=="techreport") {
|
if ($type=="techreport") {
|
||||||
$publisher = 'Technical report';
|
$publisher = 'Technical report, ';
|
||||||
|
$publisher .=$bibentry->getField("institution");
|
||||||
if ($bibentry->hasField("number")) {
|
if ($bibentry->hasField("number")) {
|
||||||
$publisher = $bibentry->getField("number");
|
$publisher .= ' '.$bibentry->getField("number");
|
||||||
}
|
}
|
||||||
$publisher .=', '.$bibentry->getField("institution");
|
|
||||||
}
|
}
|
||||||
if ($bibentry->hasField("publisher")) {
|
if ($bibentry->hasField("publisher")) {
|
||||||
$publisher = $bibentry->getField("publisher");
|
$publisher = $bibentry->getField("publisher");
|
||||||
@@ -2425,8 +2425,10 @@ function JanosBibliographyStyle($bibentry) {
|
|||||||
|
|
||||||
if ($publisher!='') $entry[] = $publisher;
|
if ($publisher!='') $entry[] = $publisher;
|
||||||
|
|
||||||
|
if ($type=="article") {
|
||||||
if ($bibentry->hasField('volume')) $entry[] = "vol. ".$bibentry->getField("volume");
|
if ($bibentry->hasField('volume')) $entry[] = "vol. ".$bibentry->getField("volume");
|
||||||
if ($bibentry->hasField('number')) $entry[] = 'no. '.$bibentry->getField("number");
|
if ($bibentry->hasField('number')) $entry[] = 'no. '.$bibentry->getField("number");
|
||||||
|
}
|
||||||
|
|
||||||
if ($bibentry->hasField('address')) $entry[] = $bibentry->getField("address");
|
if ($bibentry->hasField('address')) $entry[] = $bibentry->getField("address");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user