Index: trunk/niupepa/perllib/plugins/AbstractPlug.pm
===================================================================
--- trunk/niupepa/perllib/plugins/AbstractPlug.pm	(revision 1551)
+++ trunk/niupepa/perllib/plugins/AbstractPlug.pm	(revision 1554)
@@ -73,11 +73,11 @@
 
     # process each issue
-    $$textref =~ s/(<p(?:\s[^>]*)?>\s*\n
-		    [^\n]+\n # series title line
-		    <\/p>\n
-		    <p(?:\s[^>]*)?>\s*\n
-		    <b>(.*?)<\/b>.*?\n # issue line (i.e. volume, issue number, date)
-		    <\/p>\n
-		    (?:<table[^>]*>.*?<\/table>)?) # the table itself (may not always be defined)
+    $$textref =~ s/<p(?:\s[^>]*)?>\s*\n
+		   [^\n]+\n # series title line
+		   <\/p>\n
+		   <p(?:\s[^>]*)?>\s*\n
+		   <b>(.*?)<\/b>.*?\n # issue line (i.e. volume, issue number, date)
+		   <\/p>\n
+		   (<table[^>]*>.*?<\/table>)? # the table itself (may not always be defined)
 	          /$self->process_issue($1, $2, $seriesnum, $dir)/isgxe;
 }
@@ -85,5 +85,5 @@
 sub process_issue {
     my $self = shift @_;
-    my ($text, $issue, $seriesnum, $dir) = @_;
+    my ($issue, $text, $seriesnum, $dir) = @_;
 
     my $OID = $seriesnum . "_";
@@ -108,13 +108,20 @@
     }
 
-    # links to page numbers
-    $text =~ s/(td(?:\s[^>]*)?>\s*\n
-		<p(?:\s[^>]*)?>\s*\n)
-	        (pp?\s*\.\s*(\d+)(?:-\d+)?)(\s*\n)
-	      /$1<a href=\"_httpdocument_&cl=_cgiargcl_&d=${OID}\.$3\">$2<\/a>$4/isgx;
-
     my $abfile = &util::filename_cat ($dir, "$OID.abstract");
     open (ABFILE, ">$abfile") || die;
-    print ABFILE $text;
+
+    # links to page numbers
+    if (defined $text) {
+	$text =~ s/(td(?:\s[^>]*)?>\s*\n
+		   <p(?:\s[^>]*)?>\s*\n)
+	           (pp?\s*\.\s*(\d+)(?:-\d+)?)(\s*\n)
+		  /$1<a href=\"_httpdocument_&cl=_cgiargcl_&d=${OID}\.$3&gg=prev\">$2<\/a>$4/isgx;
+
+        print ABFILE $text;
+    } else {
+	# some don't have any abstract information - we'll just use
+	# the issue line to prevent a completely empty page
+        print ABFILE $issue;
+    }
     close ABFILE;
 }
@@ -129,4 +136,5 @@
     $$textref =~ s/\s*?(row|col)span=\"1\"//igs; # rowspan|colspan=1 don't seem real useful
     $$textref =~ s/\s*?line\-height:[^;]+;//igs; # don't really want hard-coded line heights either
+    $$textref =~ s/(<td)/$1 valign=top/igs; # like to valign tables
 
     # convert macron characters to _amn_ type macros
Index: trunk/niupepa/perllib/plugins/NPPlug.pm
===================================================================
--- trunk/niupepa/perllib/plugins/NPPlug.pm	(revision 1551)
+++ trunk/niupepa/perllib/plugins/NPPlug.pm	(revision 1554)
@@ -198,5 +198,4 @@
     my $doc_obj = new doc ($file, "indexed_doc");
     my $topsection = $doc_obj->get_top_section();
-    my $cursection = $topsection;
     $self->associate_cover_images ($doc_obj, $dir, $issuekey);
     $doc_obj->set_metadata_element ($topsection, 'Title', $self->get_title_string($file));
@@ -216,9 +215,9 @@
 	    $line =~ s/^\s+//;
 	    $line =~ s/\s+$//;
-	    $cursection = $doc_obj->insert_section($doc_obj->get_end_child($topsection));
 	    my ($pagenum) = $line =~ /(\d+)$/;
-	    $doc_obj->set_metadata_element($cursection, 'Title', $pagenum);
-	    $self->process_text ($dir, $line, $doc_obj, $cursection);
-	    $self->process_images ($dir, $line, $doc_obj, $cursection);
+	    $doc_obj->create_named_section($pagenum);
+	    $doc_obj->set_metadata_element($pagenum, 'Title', $pagenum);
+	    $self->process_text ($dir, $line, $doc_obj, $pagenum);
+	    $self->process_images ($dir, $line, $doc_obj, $pagenum);
 	}
     }
@@ -289,6 +288,5 @@
 	my $cursection = $doc_obj->get_top_section();
 	$self->associate_cover_images ($doc_obj, $dir, $issuekey);
-	$doc_obj->set_metadata_element ($cursection, 'Title', "_abstract_ " . 
-					$self->get_title_string($file));
+	$doc_obj->set_metadata_element ($cursection, 'Title', $self->get_title_string($file));
 	$self->set_main_metadata ($doc_obj, $dir);
 	map { $doc_obj->set_metadata_element ($cursection, $_, $meta->{$_}); } keys %$meta;
@@ -416,5 +414,5 @@
     $title .= "_vol_ $vol" if defined $vol && $vol =~ /\w/;
     if (defined $num && $num =~ /\w/) {
-	$title .= ": " if defined $vol && $vol =~ /\w/;
+	$title .= ", " if defined $vol && $vol =~ /\w/;
 	$title .= "_num_ $num";
     }
