Apply vanilla themeSource:
Apply theme vanilla to a flextable: The external horizontal lines of the different parts of the table (body, header, footer) are black 2 points thick, the external horizontal lines of the different parts are black 0.5 point thick. Header text is bold, text columns are left aligned, other columns are right aligned.
Theme functions are not like 'ggplot2' themes. They are applied to the existing table immediately. If you add a row in the footer, the new row is not formatted with the theme. The theme function applies the theme only to existing elements when the function is called.
That is why theme functions should be applied after all elements of the table have been added (mainly additionnal header or footer rows).
If you want to automatically apply a theme function to each flextable,
you can use the
theme_fun argument of
aware that this theme function is applied as the last instruction when
flextable() - so if you add headers or footers to the array,
they will not be formatted with the theme.
You can also use the
post_process_pptx) to specify a theme
to be applied systematically before the
flextable() is printed;
in this case, don't forget to take care that the theme doesn't
override any formatting done before the print statement.
Other functions related to themes: