+void
+tab_footnote (struct tab_table *table, int x, int y, const char *format, ...)
+{
+ int index = x + y * table->cf;
+ unsigned char opt = table->ct[index];
+ struct tab_joined_cell *j;
+ va_list args;
+
+ if (opt & TAB_JOIN)
+ j = table->cc[index];
+ else
+ {
+ char *text = table->cc[index];
+
+ j = add_joined_cell (table, x, y, x, y, table->ct[index]);
+ j->u.text = text ? text : xstrdup ("");
+ }
+
+ j->footnotes = xrealloc (j->footnotes,
+ (j->n_footnotes + 1) * sizeof *j->footnotes);
+
+ va_start (args, format);
+ j->footnotes[j->n_footnotes++] = pool_vasprintf (table->container, format, args);
+ va_end (args);
+}
+