- int colspan = table_cell_colspan (&cell);
- int rowspan = table_cell_rowspan (&cell);
-
- if (html->borders)
- {
- /* Cell borders. */
- struct cell_color color;
-
- int top = table_get_rule (t, TABLE_VERT, x, y, &color);
- put_border (style, top, "top");
-
- if (y + rowspan == table_nr (t))
- {
- int bottom = table_get_rule (t, TABLE_VERT, x, y + rowspan,
- &color);
- put_border (style, bottom, "bottom");
- }
-
- int left = table_get_rule (t, TABLE_HORZ, x, y, &color);
- put_border (style, left, "left");
-
- if (x + colspan == table_nc (t))
- {
- int right = table_get_rule (t, TABLE_HORZ, x + colspan, y,
- &color);
- put_border (style, right, "right");
- }
- }
- style_end (style);
-
- if (colspan > 1)
- fprintf (html->file, " colspan=\"%d\"", colspan);
-
- if (rowspan > 1)
- fprintf (html->file, " rowspan=\"%d\"", rowspan);
-
- putc ('>', html->file);
-
- /* Output cell contents. */
- const char *s = cell.text;
- if (cell.options & TAB_FIX)
- escape_tag (html->file, "tt", s, " ", "<br>");
- else
- {
- s += strspn (s, CC_SPACES);
- escape_string (html->file, s, " ", "<br>");
- }
+ if (layers)
+ {
+ fputs ("<thead>\n", html->file);
+ for (size_t y = 0; y < layers->n[V]; y++)
+ {
+ fputs ("<tr>\n", html->file);
+
+ struct table_cell cell;
+ table_get_cell (layers, 0, y, &cell);
+ cell.d[H][1] = body->n[H];
+ html_put_table_cell (html, pt, &cell, "td", NULL);
+
+ fputs ("</tr>\n", html->file);
+ }
+ fputs ("</thead>\n", html->file);
+ }