Browse Source

pass #2 on abstracts

hg/35a367e65a464cf6cdf277c73f977a6828b723fe/bookmarks/master
Martin Monperrus 15 years ago
parent
commit
99d91151dc
  1. 13
      bibtexbrowser.php
  2. 3
      test/bibacid-iso8859.bib

13
bibtexbrowser.php

@ -519,6 +519,9 @@ for ( $i=0; $i < strlen( $sread ); $i++) { $s=$sread[$i];
$isinentry = false;$delegate->endEntry($entrysource);
$entryvalue=''; // resetting the value buffer
}
else if ($s==' ' || $s=="\t" || $s=="\n" ) {
// blank characters are not taken into account when values are not in quotes or curly brackets
}
else { $entryvalue=$entryvalue.$s;}
}
@ -905,8 +908,14 @@ class BibEntry {
/** Sets a field of this bib entry. */
function setField($name, $value) {
$name = strtolower($name);
$value = xtrim($value);
if ($name!='url') $value = latex2html($value);
// 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 */
$value = latex2html($value);
} else {
//echo "xx".$value."xx\n";
}
$this->fields[$name] = $value;
}

3
test/bibacid-iso8859.bib

@ -15,7 +15,8 @@
title = {This is with abstract},
institution = {Queen's University, Kingston, ON.},
year = {1997},
abstract = {This is an abstract}
abstract = {This is an abstract
on several lines}
}

Loading…
Cancel
Save