Browse Source

updating test data: we now transform abstracts as well

replace/c24a8d1de403113542ba0936e844151de2785013
Martin Monperrus 15 years ago
parent
commit
f4514348b1
  1. 12
      bibtexbrowser.php

12
bibtexbrowser.php

@ -909,8 +909,8 @@ class BibEntry {
function setField($name, $value) {
$name = strtolower($name);
// fields that should not be transformed
if ($name!='abstract' && $name!='url' ) {
$value = xtrim($value); /* abstract should stay as is for later use with str_replace */
if ($name!='url' ) {
$value = xtrim($value);
$value = latex2html($value);
} else {
//echo "xx".$value."xx\n";
@ -1299,13 +1299,7 @@ class BibEntry {
// this is not a parsing but a simple replacement
$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"
// this will be also used to hijax the abstract with jquery
$entry = str_replace($abstract,'<span class="abstract">'.$abstract.'</span>', $entry);
}
echo $entry;
echo '</pre>';
}

Loading…
Cancel
Save