1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/themes.R
\name{theme_vanilla}
\alias{theme_vanilla}
\title{Apply vanilla theme}
\usage{
theme_vanilla(x)
}
\arguments{
\item{x}{a flextable object}
}
\description{
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.
}
\section{behavior}{
Theme functions are not like 'ggplot2' themes. They are applied to the existing
table \strong{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 \code{theme_fun} argument of \code{\link[=set_flextable_defaults]{set_flextable_defaults()}}; be
aware that this theme function is applied as the last instruction when
calling \code{flextable()} - so if you add headers or footers to the array,
they will not be formatted with the theme.
You can also use the \code{post_process_html} argument
of \code{\link[=set_flextable_defaults]{set_flextable_defaults()}} (or \code{post_process_pdf},
\code{post_process_docx}, \code{post_process_pptx}) to specify a theme
to be applied systematically before the \code{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.
}
\section{Illustrations}{
\if{html}{\figure{fig_theme_vanilla_1.png}{options: width="400"}}
}
\examples{
ft <- flextable(head(airquality))
ft <- theme_vanilla(ft)
ft
}
\seealso{
Other functions related to themes:
\code{\link{get_flextable_defaults}()},
\code{\link{set_flextable_defaults}()},
\code{\link{theme_alafoli}()},
\code{\link{theme_apa}()},
\code{\link{theme_booktabs}()},
\code{\link{theme_box}()},
\code{\link{theme_tron_legacy}()},
\code{\link{theme_tron}()},
\code{\link{theme_vader}()},
\code{\link{theme_zebra}()}
}
\concept{functions related to themes}
|