rtf_fc_tables | R Documentation |
Create RTF font and color tables
rtf_fc_tables(..., extra_fonts = "Times", extra_colors = character(0))
... |
One or more objects of class |
extra_fonts |
Extra fonts to include. These will be first in the fonts table. |
extra_colors |
Extra colors to include, as R color names. |
RTF documents have a single table of fonts, and a table of colors, in the RTF header. To
create font and color tables for multiple huxtables, use this command. You can print
the
returned object in the RTF header. Pass it to print_rtf()
or to_rtf()
to ensure that
huxtables print out the correct colour references.
An object of class rtfFCTables
. This is a list containing two items: "fonts"
is a character vector of unique font names; "colors"
is a character vector of unique color
names.
# Printing multiple huxtables:
ht <- huxtable("Blue with red border")
ht <- set_all_borders(ht, 1)
ht <- set_all_border_colors(ht, "red")
background_color(ht) <- "blue"
ht2 <- huxtable("Dark green text")
text_color(ht2) <- "darkgreen"
fc_tbls <- rtf_fc_tables(ht, ht2)
# In the document header:
print(fc_tbls)
# In the document body:
print_rtf(ht, fc_tables = fc_tbls)
print_rtf(ht2, fc_tables = fc_tbls)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.