Index: formats/xhtml.php
===================================================================
RCS file: /repository/phd/formats/xhtml.php,v
retrieving revision 1.56
diff -u -u -r1.56 xhtml.php
--- formats/xhtml.php	11 Feb 2008 21:39:44 -0000	1.56
+++ formats/xhtml.php	26 Feb 2008 16:13:05 -0000
@@ -1,5 +1,5 @@
 <?php
-/*  $Id: xhtml.php,v 1.56 2008/02/11 21:39:44 gwynne Exp $ */
+/*  $Id: xhtml.php,v 1.57 2008/02/12 08:53:53 RichardQ  Exp$ */
 
 class XHTMLPhDFormat extends PhDFormat {
     protected $elementmap = array( /* {{{ */
@@ -977,7 +977,10 @@
             $valign = PhDFormat::valign($attrs[PhDReader::XMLNS_DOCBOOK]);
             return '<tr valign="' .$valign. '">';
         }
-        return "</tr>\n";
+        return ((PhDFormat::getNextCol() < PhDFormat::getColCount()) 
+	        	? ' <td colspan="' . (1 + PhDFormat::getColCount() - PhDFormat::getNextCol()) . '">&nbsp;</td>' . "\n"
+	        	: '') . 
+        	"</tr>\n";
     }
     public function format_th_entry($open, $name, $attrs) {
         if ($open) {
Index: include/PhDFormat.class.php
===================================================================
RCS file: /repository/phd/include/PhDFormat.class.php,v
retrieving revision 1.10
diff -u -u -r1.10 PhDFormat.class.php
--- include/PhDFormat.class.php	4 Feb 2008 21:17:25 -0000	1.10
+++ include/PhDFormat.class.php	26 Feb 2008 16:02:02 -0000
@@ -1,5 +1,5 @@
 <?php
-/*  $Id: PhDFormat.class.php,v 1.10 2008/02/04 21:17:25 bjori Exp $ */
+/*  $Id: PhDFormat.class.php,v 1.11 2008/02/05 09:46:30 RichardQ  Exp$ */
 
 abstract class PhDFormat extends PhDHelper {
     private $TABLE          = array();
@@ -36,6 +36,9 @@
     public function getColCount() {
         return $this->TABLE["cols"];
     }
+    public function getNextCol() {
+        return $this->TABLE["next_colnum"];
+    }
 
     public function valign($attrs) {
         return isset($attrs["valign"]) ? $attrs["valign"] : "middle";
