- fprintf (html->file, " ROWSPAN=%d", rowspan);
-
- /* Cell borders. */
- n_borders = 0;
-
- top = table_get_rule (t, TABLE_VERT, x, y);
- if (top > TAL_GAP)
- put_border (html->file, n_borders++, top, "top");
-
- if (y == table_nr (t) - 1)
- {
- bottom = table_get_rule (t, TABLE_VERT, x, y + 1);
- if (bottom > TAL_GAP)
- put_border (html->file, n_borders++, bottom, "bottom");
- }
-
- left = table_get_rule (t, TABLE_HORZ, x, y);
- if (left > TAL_GAP)
- put_border (html->file, n_borders++, left, "left");
-
- if (x == table_nc (t) - 1)
- {
- right = table_get_rule (t, TABLE_HORZ, x + 1, y);
- if (right > TAL_GAP)
- put_border (html->file, n_borders++, right, "right");
- }
-
- if (n_borders > 0)
- fputs ("\"", html->file);
+ fprintf (html->file, " ROWSPAN=\"%d\"", rowspan);
+
+ if (html->borders)
+ {
+ /* Cell borders. */
+ int n_borders = 0;
+
+ struct cell_color color;
+ top = table_get_rule (t, TABLE_VERT, x, y, &color);
+ put_border (html->file, &n_borders, top, "top");
+
+ if (y + rowspan == table_nr (t))
+ {
+ bottom = table_get_rule (t, TABLE_VERT, x, y + rowspan,
+ &color);
+ put_border (html->file, &n_borders, bottom, "bottom");
+ }
+
+ left = table_get_rule (t, TABLE_HORZ, x, y, &color);
+ put_border (html->file, &n_borders, left, "left");
+
+ if (x + colspan == table_nc (t))
+ {
+ right = table_get_rule (t, TABLE_HORZ, x + colspan, y,
+ &color);
+ put_border (html->file, &n_borders, right, "right");
+ }
+
+ if (n_borders > 0)
+ fputs ("\"", html->file);
+ }