Browse Source

improved support for abstracts after a long discussion with the Google Scholar Team:\neach paper needs to be listed on a separate URL; and at least the full author-written abstract must be clearly visible on the URL\n see http://scholar.google.com/intl/en/scholar/inclusion.html

hg/35a367e65a464cf6cdf277c73f977a6828b723fe/bookmarks/master
Martin Monperrus 15 years ago
parent
commit
2173a354d2
  1. 14
      bibtexbrowser.php
  2. 11
      test/bibacid-iso8859.bib

14
bibtexbrowser.php

@ -1284,11 +1284,19 @@ class BibEntry {
*/
function toEntryUnformatted() {
echo '<pre class="purebibtex">'; // pre is nice when it is embedded with no CSS available
$entry = $this->getFullText();
if ($this->hasField('url')) {
$url=$this->getField('url');
$url = $this->getField('url');
// this is not a parsing but a simple replacement
echo str_replace($url,'<a href="'.$url.'">'.$url.'</a>',$this->getFullText());
} else echo $this->getFullText();
$entry = str_replace($url,'<a href="'.$url.'">'.$url.'</a>', $entry);
}
if ($this->hasField('abstract')) {
$abstract = $this->getField('abstract');
// Google Scholar: http://scholar.google.com/intl/en/scholar/inclusion.html
// "each paper needs to be listed on a separate URL; and at least the full author-written abstract must be clearly visible on the URL"
$entry = str_replace($abstract,'<span class="abstract">'.$abstract.'</span>', $entry);
}
echo $entry;
echo '</pre>';
}

11
test/bibacid-iso8859.bib

@ -2,7 +2,6 @@
%% test the home page feature
@string{hp_J.Abounader="http://www.google.com"}
@inproceedings{classical,
author = {J. Abounader and D. Tooj},
title = {This is {classical}},
@ -10,6 +9,16 @@
year = {1997}
}
%% testing the abstract
@inproceedings{with_abstract,
author = {J. Abounader and D. Tooj},
title = {This is with abstract},
institution = {Queen's University, Kingston, ON.},
year = {1997},
abstract = {This is an abstract}
}
%% using double quotes
%% also Took test the advanced search
@TECHREPORT{dquotes,

Loading…
Cancel
Save