ascii_layout_cell (a, cell, bb, clip, max_width, &h);
if (cell->n_footnotes || strchr (cell->text, ' ')
- || cell->n_subscripts || cell->superscript)
+ || cell->n_subscripts)
{
bb[H][1] = 1;
ascii_layout_cell (a, cell, bb, clip, min_width, &h);
ds_put_cstr (&s, text);
for (size_t i = 0; i < cell->n_subscripts; i++)
ds_put_format (&s, "%c%s", i ? ',' : '_', cell->subscripts[i]);
- if (cell->superscript)
- ds_put_format (&s, "^%s", cell->superscript);
for (size_t i = 0; i < cell->n_footnotes; i++)
ds_put_format (&s, "[%s]", cell->footnotes[i]->marker);
return ds_steal_cstr (&s);
? output_get_text_from_markup (cell->text)
: cell->text);
- /* Append footnotes, subscripts, superscript if any. */
+ /* Append footnotes, subscripts if any. */
const char *text;
- if (cell->n_footnotes || cell->n_subscripts || cell->superscript)
+ if (cell->n_footnotes || cell->n_subscripts)
{
text = add_markers (plain_text, cell);
if (plain_text != cell->text)
PANGO_UNDERLINE_SINGLE));
}
- if (cell->n_footnotes || cell->n_subscripts || cell->superscript)
+ if (cell->n_footnotes || cell->n_subscripts)
{
/* If we haven't already put TEXT into tmp, do it now. */
if (ds_is_empty (&tmp))
ds_put_cstr (&tmp, cell->subscripts[i]);
}
- size_t superscript_ofs = ds_length (&tmp);
- if (cell->superscript)
- ds_put_cstr (&tmp, cell->superscript);
-
size_t footnote_ofs = ds_length (&tmp);
for (size_t i = 0; i < cell->n_footnotes; i++)
{
subscript_ofs, PANGO_ATTR_INDEX_TO_TEXT_END);
if (cell->n_subscripts)
add_attr (attrs, pango_attr_rise_new (-3000), subscript_ofs,
- superscript_ofs - subscript_ofs);
- if (cell->superscript || cell->n_footnotes)
- add_attr (attrs, pango_attr_rise_new (3000), superscript_ofs,
+ footnote_ofs - subscript_ofs);
+ if (cell->n_footnotes)
+ add_attr (attrs, pango_attr_rise_new (3000), footnote_ofs,
PANGO_ATTR_INDEX_TO_TEXT_END);
}
if (x != cell.d[TABLE_HORZ][0] || y != cell.d[TABLE_VERT][0])
csv_output_field (csv, "");
else if (!(cell.options & TAB_MARKUP) && !cell.n_footnotes
- && !cell.n_subscripts && !cell.superscript)
+ && !cell.n_subscripts)
csv_output_field (csv, cell.text);
else
{
for (size_t i = 0; i < cell.n_subscripts; i++)
ds_put_format (&s, "%c%s",
i ? ',' : '_', cell.subscripts[i]);
- if (cell.superscript)
- ds_put_format (&s, "^%s", cell.superscript);
csv_format_footnotes (cell.footnotes, cell.n_footnotes, &s);
csv_output_field (csv, ds_cstr (&s));
ds_destroy (&s);
}
fputs ("</sub>", html->file);
}
- if (cell->superscript)
- escape_tag (html->file, "sup", cell->superscript, " ", "<br>");
html_put_footnote_markers (html, cell->footnotes, cell->n_footnotes);
}
if (value->n_subscripts)
table_add_subscripts (t, x1, y1,
value->subscripts, value->n_subscripts);
-
- if (value->superscript)
- table_add_superscript (t, x1, y1, value->superscript);
}
}
/* Appends a text representation of VALUE to OUT. SHOW_VALUES and
SHOW_VARIABLES control whether variable and value labels are included.
- Subscripts and superscripts and footnotes are included. */
+ Subscripts and footnotes are included. */
void
pivot_value_format (const struct pivot_value *value,
enum settings_value_show show_values,
ds_put_format (out, "%c%s", i ? ',' : '_', value->subscripts[i]);
}
- if (value->superscript)
- ds_put_format (out, "^%s", value->superscript);
-
for (size_t i = 0; i < value->n_footnotes; i++)
{
ds_put_byte (out, '^');
free (value->subscripts[i]);
free (value->subscripts);
- free (value->superscript);
-
switch (value->type)
{
case PIVOT_VALUE_NUMERIC:
char **subscripts;
size_t n_subscripts;
- char *superscript;
-
const struct pivot_footnote **footnotes;
size_t n_footnotes;
char *text; /* A paragraph of text. */
char **subscripts;
size_t n_subscripts;
- char *superscript;
const struct footnote **footnotes;
size_t n_footnotes;
const struct table_area_style *style;
cell->subscripts[i] = pool_strdup (table->container, subscripts[i]);
}
-/* Sets the superscript for column X, row Y in TABLE. */
-void
-table_add_superscript (struct table *table, int x, int y,
- const char *superscript)
-{
- get_joined_cell (table, x, y)->superscript
- = pool_strdup (table->container, superscript);
-}
-
/* Create a footnote in TABLE with MARKER (e.g. "a") as its marker and CONTENT
as its content. The footnote will be styled as STYLE, which is mandatory.
IDX must uniquely identify the footnote within TABLE.
void table_add_subscripts (struct table *, int x, int y,
char **subscripts, size_t n_subscripts);
-void table_add_superscript (struct table *, int x, int y,
- const char *superscript);
/* Footnotes.