Theme functions apply a complete visual style to a flextable in one call. Unlike ggplot2 themes, flextable themes are applied immediately to the existing table structure. Rows or columns added after the theme call are not formatted by the theme.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/davidgohel/flextable/llms.txt
Use this file to discover all available pages before exploring further.
theme_vanilla()
External horizontal lines are black and 2 pt thick. Internal horizontal lines are 0.5 pt. Header text is bold. Text columns are left-aligned; numeric columns are right-aligned.Example
theme_booktabs()
Publication-style theme based on the LaTeXbooktabs package. Thick borders at the top and bottom of the header and at the bottom of the body. An optional thin line separates header rows.
A
flextable object.If
TRUE, header text is rendered in bold.Example
theme_box()
All cells have outer and inner borders. Header text is bold; footer text is italic. Text columns are left-aligned; numeric columns are right-aligned.Example
theme_borderless()
All borders are removed. Header text is bold. Text columns are left-aligned; numeric columns are right-aligned.Example
theme_zebra()
Alternating row background colors in the header and body.A
flextable object.Background color for odd header rows.
Background color for odd body rows.
Background color for even header rows.
Background color for even body rows.
Example
theme_alafoli()
Minimalist theme with transparent backgrounds, gray text, and only a bottom border under the header.Example
theme_apa()
Style conforming to the American Psychological Association (APA) publication guidelines. Uses Times New Roman, double line spacing, centered alignment, and horizontal rules at the top, bottom of the header, and bottom of the body.Example
theme_tron()
Dark background (#000000) with blue borders (#a4cee5), orange header text (#ec9346), and blue body text (#a4cee5). Header text is bold.
Example
theme_tron_legacy()
Variant oftheme_tron() with a dark navy background (#0C141F), cyan borders (#6FC3DF), orange header text (#DF740C), and yellow body text (#FFE64D).
Example
theme_vader()
Dark background (#242424) with red borders, light gray text (#dfdfdf), and bold header text. Named after Darth Vader.
Example
Parameters common to all themes
A
flextable object. The function stops with an error if x is not a flextable.Return value
All theme functions return the modifiedflextable object.